/* =========================================================
   打大猫 · 视觉系统
   深绿毡桌 / 米纸 / 鎏金 / 朱砂
   ========================================================= */
:root {
  --felt-0: #061b10;
  --felt-1: #0a2f1d;
  --felt-2: #10482b;
  --felt-3: #155c36;
  --cream: #f5eedf;
  --cream-2: #e9dfc9;
  --paper: #fbf7ee;
  --ink: #242116;
  --ink-soft: #5f5a49;
  --gold: #c8a45c;
  --gold-2: #e6ca8c;
  --gold-deep: #8f6828;
  --red: #a72d28;
  --red-2: #d24a3e;
  --green-ok: #2c8054;
  --muted: #93ac9d;
  --line: rgba(232, 218, 186, .18);
  --line-dark: rgba(62, 48, 22, .16);
  --shadow: 0 22px 60px rgba(0, 0, 0, .38);
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --card-w: clamp(94px, 10.4vw, 150px);
  --card-h: calc(var(--card-w) * 1.44);
  --hand-step: clamp(34px, 5.9vw, 84px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--sans);
  color: var(--cream);
  background: var(--felt-0);
  overflow-x: hidden;
}
button, input { font: inherit; }
button { color: inherit; }
a { color: var(--gold-2); }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: var(--gold); color: #1d1a10; }

.serif { font-family: var(--serif); }
.muted { color: var(--muted); }
.gold { color: var(--gold-2); }
.red { color: var(--red-2); }
.hidden { display: none !important; }

/* ---------- 按钮与表单 ---------- */
.btn {
  --btn-bg: rgba(255, 255, 255, .07);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--cream);
  font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, opacity .16s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); border-color: rgba(230, 202, 140, .55); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .38; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }
.btn-gold {
  --btn-bg: linear-gradient(135deg, #e7cb8d, #c49a4b);
  border-color: #efdba9;
  color: #292314;
  box-shadow: 0 8px 24px rgba(201, 165, 92, .24);
}
.btn-gold:hover:not(:disabled) { background: linear-gradient(135deg, #f3dda8, #d0a557); }
.btn-red {
  --btn-bg: linear-gradient(135deg, #c3493f, #94241f);
  border-color: #dc7568;
  color: #fff7ee;
  box-shadow: 0 8px 24px rgba(167, 45, 40, .3);
}
.btn-ghost { --btn-bg: transparent; }
.btn-paper { --btn-bg: #fbf7ee; color: var(--ink); border-color: #d8c9a9; }
.btn-large { min-height: 56px; padding: 14px 30px; font-size: 17px; }
.btn-small { min-height: 34px; padding: 6px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  color: var(--cream);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease;
}
.icon-btn:hover { background: rgba(255, 255, 255, .1); transform: rotate(4deg); }
.text-btn {
  padding: 2px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-btn:hover { color: var(--gold-2); }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > span, .field-label {
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.input {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid rgba(232, 218, 186, .28);
  border-radius: 10px;
  background: rgba(5, 22, 13, .55);
  color: var(--cream);
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.input::placeholder { color: rgba(245, 238, 223, .36); }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200, 164, 92, .14); }
.input-code {
  text-transform: uppercase;
  letter-spacing: .35em;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
}
.input-code.invite-glow {
  border-color: rgba(226, 202, 148, .65);
  box-shadow: 0 0 0 4px rgba(200, 164, 92, .12);
  animation: invite-pulse 2.2s ease-in-out 2;
}
@keyframes invite-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(200, 164, 92, .1); }
  50% { box-shadow: 0 0 0 9px rgba(200, 164, 92, .02); }
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(4, 20, 12, .4);
}
.segmented button {
  min-width: 48px;
  padding: 7px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.segmented button[aria-pressed="true"], .segmented button.active {
  background: var(--gold);
  color: #251f12;
  font-weight: 700;
}

/* ---------- 首页 ---------- */
.home {
  min-height: 100dvh;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1100px 620px at 78% 8%, rgba(39, 123, 76, .5), transparent 62%),
    radial-gradient(900px 700px at 8% 92%, rgba(14, 74, 44, .55), transparent 60%),
    linear-gradient(145deg, #061c11 0%, #0a2f1d 48%, #05180e 100%);
}
.home::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(47deg, transparent 0 27px, rgba(255, 255, 255, .014) 27px 28px),
    radial-gradient(ellipse at center, transparent 44%, rgba(0, 0, 0, .35) 100%);
}
.home::after {
  content: "猫";
  position: absolute;
  right: -3vw;
  bottom: -16vh;
  font-family: var(--serif);
  font-size: min(56vw, 660px);
  line-height: 1;
  color: rgba(226, 197, 132, .028);
  pointer-events: none;
  user-select: none;
}
.home-shell { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 0 28px; }
.home-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 82px;
}
.home-music-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid rgba(226, 202, 148, .3);
  border-radius: 999px;
  background: rgba(4, 24, 14, .52);
  color: #ead9b7;
  font-size: 12px;
  letter-spacing: .06em;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.home-music-btn:hover {
  border-color: rgba(226, 202, 148, .7);
  background: rgba(200, 164, 92, .14);
  color: #fff0cd;
}
.home-music-btn .music-icon {
  color: var(--gold-2);
  font-size: 15px;
  line-height: 1;
}
.home-music-btn.playing {
  border-color: rgba(226, 202, 148, .48);
  box-shadow: 0 0 14px rgba(224, 187, 114, .1);
}
.lobby-music-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lobby-music-btn .music-icon {
  color: var(--gold-2);
  font-size: 13px;
  line-height: 1;
}
@media (max-width: 640px) {
  .home-music-btn { padding: 7px 11px; font-size: 11px; gap: 6px; }
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--cream); }
.brand-seal {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 7px;
  background: var(--red);
  color: #f9e9cb;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  box-shadow: inset 0 0 0 2px rgba(255, 240, 210, .25), 0 7px 20px rgba(0, 0, 0, .3);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font-family: var(--serif); font-size: 23px; letter-spacing: .12em; }
.brand-text small { margin-top: 5px; color: var(--gold); font-size: 9px; letter-spacing: .34em; }
.home-credit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: -28px 0 28px;
  color: rgba(245, 238, 223, .62);
  font-size: 16px;
  letter-spacing: .14em;
}
.home-credit-dot { color: var(--gold); opacity: .7; }
.home-main {
  display: grid;
  grid-template-columns: minmax(0, 640px);
  justify-content: center;
  gap: 0;
  align-items: center;
  min-height: calc(100dvh - 172px);
  padding: 50px 0 60px;
}
.hero-copy { max-width: 640px; width: 100%; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3em;
}
.eyebrow::before { content: ""; width: 36px; height: 1px; background: var(--gold); }
.home-title {
  margin: 18px 0 10px;
  font-family: var(--serif);
  font-size: clamp(64px, 8.6vw, 118px);
  font-weight: 700;
  line-height: .95;
  letter-spacing: .055em;
  color: #f7f0df;
  text-shadow: 0 16px 50px rgba(0, 0, 0, .34);
  white-space: nowrap;
}
.home-title span { color: var(--gold-2); }
.home-title .dot { color: var(--red-2); }
.home-tagline {
  margin: 14px 0 12px;
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: .14em;
  color: #eadbbd;
}
.home-desc {
  max-width: 540px;
  color: #b8cabf;
  font-size: 15px;
  line-height: 1.9;
}
.home-desc b { color: #f0dfbc; font-weight: 600; }
.feature-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 30px; }
.feature-chip {
  padding: 6px 12px;
  border: 1px solid rgba(232, 218, 186, .2);
  border-radius: 999px;
  color: #c7d4cb;
  font-size: 12px;
  letter-spacing: .04em;
  background: rgba(255, 255, 255, .025);
}
.feature-chip b { color: var(--gold-2); }
.home-entry {
  width: 100%;
  max-width: 520px;
  margin-top: 30px;
  padding: 20px;
  border: 1px solid rgba(232, 218, 186, .2);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(14, 58, 35, .82), rgba(4, 24, 14, .72));
  box-shadow: 0 24px 60px rgba(0, 0, 0, .26);
  backdrop-filter: blur(8px);
}
.entry-name-row { display: flex; gap: 12px; align-items: flex-end; }
.entry-name-row .field { flex: 1; }
.quick-row { display: flex; gap: 8px; align-items: center; }
.entry-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 14px; }
.home-entry .segmented { margin-top: 6px; }
.entry-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 17px 0 14px;
  color: rgba(245, 238, 223, .42);
  font-size: 11px;
  letter-spacing: .2em;
}
.entry-divider::before, .entry-divider::after { content: ""; height: 1px; flex: 1; background: rgba(232, 218, 186, .14); }
.entry-join { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.entry-help { margin-top: 12px; color: rgba(245, 238, 223, .4); font-size: 11px; line-height: 1.6; }
.rejoin-banner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 12px 11px;
  border: 1px solid rgba(230, 198, 129, .5);
  border-radius: 12px;
  background: rgba(200, 164, 92, .1);
}
.rejoin-copy { display: flex; align-items: center; gap: 8px; }
.rejoin-label { color: #c9b68c; font-size: 10px; letter-spacing: .12em; }
.rejoin-copy b { color: #ffe3a8; font-family: var(--serif); font-size: 18px; letter-spacing: .18em; }
.rejoin-banner .btn { width: 100%; }
.rejoin-forget {
  align-self: flex-end;
  padding: 0;
  border: 0;
  background: transparent;
  color: #a9b7aa;
  font-size: 10px;
  cursor: pointer;
}

.hero-visual { position: relative; display: grid; place-items: center; min-height: 520px; }
.hero-orbit {
  position: relative;
  width: min(100%, 490px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(226, 202, 148, .26);
  background:
    radial-gradient(circle at 50% 46%, rgba(31, 100, 62, .8), rgba(8, 43, 26, .92) 58%, rgba(4, 24, 14, .96) 100%);
  box-shadow: inset 0 0 70px rgba(0, 0, 0, .4), 0 30px 80px rgba(0, 0, 0, .38);
}
.hero-orbit::before, .hero-orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hero-orbit::before { inset: 9%; border: 1px dashed rgba(226, 202, 148, .2); }
.hero-orbit::after {
  inset: 22%;
  border: 1px solid rgba(226, 202, 148, .13);
  box-shadow: 0 0 50px rgba(200, 164, 92, .06);
}
.orbit-core {
  position: absolute;
  inset: 33%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(226, 202, 148, .22);
  background: radial-gradient(circle, rgba(20, 76, 46, .92), rgba(6, 31, 19, .86));
  text-align: center;
}
.orbit-core b { font-family: var(--serif); font-size: 38px; color: var(--gold-2); letter-spacing: .12em; }
.orbit-core small { margin-top: 5px; color: #9fb8a6; font-size: 10px; letter-spacing: .22em; }
.ghost-seat {
  position: absolute;
  width: 78px;
  padding: 8px 5px;
  text-align: center;
  border-radius: 12px;
  background: rgba(5, 27, 16, .72);
  border: 1px solid rgba(232, 218, 186, .15);
  color: #c8d6cc;
  font-size: 11px;
}
.ghost-seat .glyph {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  margin: 0 auto 5px;
  border-radius: 50%;
  background: linear-gradient(145deg, #2e6a49, #153d29);
  border: 1px solid rgba(232, 218, 186, .24);
  font-family: var(--serif);
  font-size: 16px;
  color: #eadbbd;
}
.ghost-seat.cat .glyph { background: linear-gradient(145deg, #b48b46, #6f4e1c); color: #241b0a; }
.ghost-seat.partner .glyph { box-shadow: 0 0 0 2px rgba(210, 74, 62, .55); }
.gs-1 { left: 50%; top: 2%; transform: translateX(-50%); }
.gs-2 { right: 1%; top: 34%; }
.gs-3 { right: 15%; bottom: 7%; }
.gs-4 { left: 15%; bottom: 7%; }
.gs-5 { left: 1%; top: 34%; }
.hero-fan {
  position: absolute;
  left: 50%;
  bottom: 19%;
  display: flex;
  transform: translateX(-50%);
  filter: drop-shadow(0 22px 24px rgba(0, 0, 0, .35));
}
.hero-fan .display-card {
  width: 63px;
  height: 90px;
  margin-left: -20px;
  transform-origin: 50% 120%;
}
.hero-fan .display-card:first-child { margin-left: 0; transform: rotate(-17deg); }
.hero-fan .display-card:nth-child(2) { transform: rotate(-8deg) translateY(-4px); }
.hero-fan .display-card:nth-child(3) { transform: rotate(0deg) translateY(-9px); }
.hero-fan .display-card:nth-child(4) { transform: rotate(8deg) translateY(-4px); }
.hero-fan .display-card:nth-child(5) { transform: rotate(17deg); }

/* ---------- 展示用扑克 ---------- */
.display-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 7px;
  width: 64px;
  height: 92px;
  border-radius: 7px;
  background: linear-gradient(150deg, #fffdf8, #eee5d1);
  border: 1px solid #c9bda4;
  color: #1e211c;
  box-shadow: 0 7px 16px rgba(0, 0, 0, .24);
}
.display-card.red { color: var(--red); }
.display-card .dc-rank { font-family: var(--serif); font-size: 20px; font-weight: 700; line-height: 1; }
.display-card .dc-suit { font-size: 18px; line-height: 1; }
.display-card .dc-big { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: 25px; opacity: .14; }
.display-card.joker { background: linear-gradient(150deg, #fffdf8, #efe2c7); border-color: #c89c4b; }
.display-card.joker .dc-rank { writing-mode: vertical-rl; font-size: 15px; letter-spacing: .1em; color: var(--gold-deep); }

/* ---------- 顶栏 ---------- */
.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 58px;
  padding: 8px 20px;
  border-bottom: 1px solid rgba(232, 218, 186, .12);
  background: rgba(5, 25, 15, .72);
  backdrop-filter: blur(12px);
}
.topbar .brand { flex-shrink: 0; }
.topbar .brand-seal { width: 32px; height: 32px; font-size: 19px; border-radius: 6px; }
.topbar .brand-text b { font-size: 18px; }
.topbar .brand-text small { font-size: 7px; margin-top: 3px; }
.topbar-center { display: flex; align-items: center; gap: 8px; flex: 1; justify-content: center; flex-wrap: wrap; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.game-screen .topbar {
  position: fixed;
  left: auto;
  right: 10px;
  bottom: 10px;
  top: auto;
  /* 高于聊天抽屉(90)，抽屉打开时右下角「音/语/聊/离」仍可点击，
     再点同一个按钮即可关闭，不会因为被抽屉盖住而点不到。 */
  z-index: 95;
  width: auto;
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.game-screen .topbar > *:not(.topbar-right) { display: none !important; }
.game-screen .topbar .topbar-right { display: flex; gap: 6px; padding: 0; }
.game-screen .called-k-strip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 95;
}
.called-k-strip {
  position: relative;
  z-index: 18;
  flex-shrink: 0;
  min-height: 58px;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-bottom: 1px solid rgba(226, 202, 148, .2);
  background:
    linear-gradient(90deg, rgba(8, 36, 24, .96), rgba(53, 42, 20, .78) 50%, rgba(8, 36, 24, .96));
  color: #e8d8b6;
  font-size: 16px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
}
.called-k-strip-cat {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #f1d695;
  background: linear-gradient(145deg, #e0bb72, #7b521a);
  color: #241b0b;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(224, 187, 114, .3);
}
.called-k-strip-title { color: #e1c585; font-size: 14px; }
.called-k-strip-name { color: #ffe7b0; font-weight: 700; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.called-k-strip-label { color: #a9946b; font-size: 13px; }
.called-k-strip-card {
  width: 36px;
  height: 46px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #c8a45c;
  border-radius: 3px;
  background: linear-gradient(155deg, #fffdf8, #eee1c5);
  color: #232018;
  line-height: 1;
  transform: rotate(3deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .28);
}
.called-k-strip-card b { font-family: var(--serif); font-size: 21px; }
.called-k-strip-card span { font-size: 14px; margin-top: 1px; }
.called-k-strip-card.red { border-color: #c77b70; color: var(--red); }
.called-k-strip-suit { color: #f0d89f; font-weight: 600; font-size: 17px; }
.called-k-strip-divider { width: 1px; height: 24px; margin: 0 4px; background: rgba(226, 202, 148, .24); }
.oldk-strip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 5px;
  border: 1px solid rgba(123, 201, 189, .35);
  border-radius: 999px;
  background: rgba(39, 111, 101, .2);
  color: #bce8df;
  font-size: 14px;
}
.oldk-strip-badge {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #a5ddd3;
  background: #276f65;
  color: #effffb;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
}
.oldk-strip.unknown {
  border-color: rgba(226, 202, 148, .16);
  background: rgba(8, 28, 19, .32);
  color: #8fa499;
  font-size: 13px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid rgba(232, 218, 186, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  color: #c8d5cc;
  font-size: 12px;
  white-space: nowrap;
}
.pill b { color: var(--gold-2); font-weight: 700; }
.pill.room-code { font-family: var(--serif); font-size: 14px; letter-spacing: .14em; color: var(--gold-2); }
.pill.live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #54c98a;
  box-shadow: 0 0 0 4px rgba(84, 201, 138, .13);
}
.pill.live.offline::before { background: #d66a55; box-shadow: 0 0 0 4px rgba(214, 106, 85, .13); }
.pill.auto { color: #e4b98a; }

/* ---------- 大厅 ---------- */
.lobby-screen {
  min-height: 100dvh;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(31, 108, 65, .48), transparent 68%),
    linear-gradient(155deg, #071f13, #0b3522 55%, #061b10);
}
.lobby-shell { max-width: 1120px; margin: 0 auto; padding: 28px 22px 46px; }
.lobby-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0 24px;
}
.lobby-kicker { color: var(--gold); font-size: 11px; letter-spacing: .3em; }
.lobby-title { margin-top: 8px; font-family: var(--serif); font-size: clamp(30px, 4vw, 46px); color: var(--cream); letter-spacing: .06em; }
.lobby-sub { margin-top: 6px; color: #9fb5a6; font-size: 13px; }
.room-ticket {
  min-width: 230px;
  padding: 14px 18px;
  border: 1px solid rgba(226, 202, 148, .3);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(201, 165, 92, .12), rgba(0, 0, 0, .15));
  text-align: center;
}
.room-ticket small { display: block; color: var(--muted); font-size: 10px; letter-spacing: .25em; }
.room-ticket strong { display: block; margin: 4px 0 8px; font-family: var(--serif); font-size: 34px; letter-spacing: .28em; color: var(--gold-2); }
.lobby-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .75fr); gap: 18px; align-items: start; }
.panel {
  border: 1px solid rgba(232, 218, 186, .16);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(15, 58, 36, .72), rgba(4, 24, 14, .62));
  box-shadow: 0 22px 60px rgba(0, 0, 0, .2);
}
.lobby-table-panel { padding: 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-title { font-family: var(--serif); font-size: 20px; letter-spacing: .06em; }
.panel-note { color: var(--muted); font-size: 12px; }
.seats-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.lobby-seat {
  position: relative;
  min-height: 166px;
  padding: 16px 9px 12px;
  border: 1px solid rgba(232, 218, 186, .15);
  border-radius: 12px;
  background: rgba(4, 25, 14, .38);
  text-align: center;
  transition: border-color .18s ease, background .18s ease;
}
.lobby-seat.filled { background: linear-gradient(165deg, rgba(25, 78, 49, .56), rgba(5, 28, 17, .44)); }
.lobby-seat.you { border-color: rgba(226, 202, 148, .5); box-shadow: inset 0 0 0 1px rgba(226, 202, 148, .16); }
.lobby-seat.empty { border-style: dashed; }
.lobby-seat .mini-avatar {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 1px solid rgba(232, 218, 186, .3);
  background: linear-gradient(145deg, #2e714f, #143a26);
  color: #f1e2c4;
  font-family: var(--serif);
  font-size: 23px;
}
.lobby-seat.bot .mini-avatar { background: linear-gradient(145deg, #6d5a39, #362b1b); }
.lobby-seat.empty .mini-avatar { border-style: dashed; color: rgba(232, 218, 186, .32); background: transparent; font-size: 30px; }
.lobby-seat .seat-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; }
.lobby-seat .seat-meta { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.lobby-seat .seat-badge-line { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; margin-top: 7px; }
.lobby-seat .remove-bot {
  margin-top: 9px;
  padding: 2px 6px;
  border: 0;
  background: none;
  color: #c88c76;
  font-size: 10px;
  cursor: pointer;
}
.lobby-seat .add-seat-btn {
  margin-top: 8px;
  border: 0;
  background: none;
  color: var(--gold-2);
  font-size: 11px;
  cursor: pointer;
}
.lobby-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(232, 218, 186, .12);
  flex-wrap: wrap;
}
.lobby-actions .hint-line { color: var(--muted); font-size: 12px; }
.lobby-side { display: flex; flex-direction: column; gap: 14px; }
.side-card { padding: 18px; }
.side-card h3 { font-family: var(--serif); font-size: 17px; margin-bottom: 9px; color: #eadbbd; }
.side-card p { color: #9fb5a6; font-size: 12px; line-height: 1.8; }
.side-card .kv { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid rgba(232, 218, 186, .1); font-size: 12px; color: #a9bcb0; }
.side-card .kv:last-child { border-bottom: 0; }
.side-card .kv b { color: var(--cream); font-weight: 600; }
.share-box { display: grid; gap: 8px; margin-top: 10px; }
.share-row { display: flex; gap: 7px; }
.share-row .input { min-height: 38px; padding: 8px 11px; font-size: 11px; }
.share-tip { color: #d9b978; font-size: 10px; line-height: 1.6; }
.rule-mini { display: grid; gap: 9px; margin-top: 10px; }
.rule-mini span { font-size: 11px; color: #a9bcb0; line-height: 1.65; }
.rule-mini b { color: var(--gold-2); }
.lobby-flow { margin-top: 18px; padding: 18px 22px 20px; }
.flow-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 3px; }
.flow-step {
  position: relative;
  padding: 12px 12px 12px 42px;
  border: 1px solid rgba(232, 218, 186, .11);
  border-radius: 9px;
  background: rgba(4, 25, 14, .25);
}
.flow-no {
  position: absolute;
  left: 11px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  border: 1px solid rgba(200, 164, 92, .45);
  color: var(--gold-2);
  font-family: var(--serif);
  font-size: 9px;
}
.flow-step b { display: block; color: #e8d9ba; font-family: var(--serif); font-size: 14px; font-weight: 600; }
.flow-step p { margin-top: 3px; color: #91a799; font-size: 10px; line-height: 1.6; }

/* ---------- 牌桌 ---------- */
.game-screen {
  height: 100dvh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #051a0f;
}
.game-body { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.felt {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 66% at 50% 46%, #17613b 0%, #0f4b2d 38%, #0a321f 68%, #061e12 100%);
}
.felt::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(99, 193, 140, .11), transparent 38%),
    repeating-linear-gradient(38deg, transparent 0 36px, rgba(255, 255, 255, .012) 36px 37px);
  pointer-events: none;
}
.felt::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 130px rgba(0, 0, 0, .5);
  pointer-events: none;
}
.table-ring {
  position: absolute;
  left: 50%;
  top: 45%;
  width: min(82vw, 980px);
  height: min(65vh, 620px);
  transform: translate(-50%, -50%);
  border: 1px solid rgba(226, 202, 148, .17);
  border-radius: 50%;
  box-shadow: 0 0 0 10px rgba(226, 202, 148, .025), inset 0 0 60px rgba(0, 0, 0, .12);
  pointer-events: none;
}
.table-ring::before {
  content: "";
  position: absolute;
  inset: 7%;
  border-radius: 50%;
  border: 1px dashed rgba(226, 202, 148, .11);
}
.table-mark {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  color: rgba(226, 202, 148, .055);
  font-family: var(--serif);
  font-size: clamp(100px, 17vw, 220px);
  letter-spacing: .12em;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

/* 座位 */
.seat {
  position: absolute;
  z-index: 6;
  width: 148px;
  transform: translate(-50%, -50%);
  text-align: center;
  transition: opacity .2s ease, filter .2s ease;
}
.seat.pos-1 { left: 8%; top: 47%; }
.seat.pos-2 { left: 25%; top: 16%; }
.seat.pos-3 { left: 75%; top: 16%; }
.seat.pos-4 { left: 92%; top: 47%; }
.seat.is-offline { opacity: .58; filter: saturate(.6); }
.avatar-wrap {
  position: relative;
  width: 132px;
  height: 132px;
  margin: 0 auto;
}
.avatar-wrap::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(var(--gold-2) calc(var(--p, 1) * 1turn), rgba(255, 255, 255, .09) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  opacity: 0;
  transition: opacity .2s ease;
}
.seat.is-turn .avatar-wrap::before { opacity: 1; }
.avatar {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(232, 218, 186, .3);
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, .16), transparent 40%),
    linear-gradient(145deg, #347553, #123b27);
  color: #f1e2c5;
  font-family: var(--serif);
  font-size: 54px;
  box-shadow: 0 7px 20px rgba(0, 0, 0, .28);
}
.avatar.bot { background: radial-gradient(circle at 34% 26%, rgba(255, 255, 255, .12), transparent 40%), linear-gradient(145deg, #735e39, #352a1b); }
.avatar.bigcat {
  background: radial-gradient(circle at 34% 26%, rgba(255, 255, 255, .28), transparent 40%), linear-gradient(145deg, #e0bb72, #7b521a);
  color: #241b0b;
  border-color: #f1d695;
  box-shadow: 0 0 0 3px rgba(240, 211, 143, .42), 0 0 26px rgba(224, 187, 114, .4), 0 8px 24px rgba(0, 0, 0, .3);
  animation: bigcat-glow 2.4s ease-in-out infinite;
}
.avatar.bigcat::before,
.avatar.bigcat::after {
  content: "";
  position: absolute;
  top: -2px;
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-bottom: 20px solid #c8a45c;
  filter: drop-shadow(0 -1px 2px rgba(0, 0, 0, .3));
  z-index: 3;
}
.avatar.bigcat::before { left: 13px; transform: rotate(-15deg); }
.avatar.bigcat::after { right: 13px; transform: rotate(15deg); }
.avatar.bigcat .avatar-initial { font-size: 1.12em; font-weight: 700; transform: translateY(2px); }
.avatar-crown {
  position: absolute;
  left: 50%;
  top: 2px;
  transform: translateX(-50%);
  z-index: 8;
  color: #f7dfa5;
  font-size: 26px;
  line-height: 1;
  text-shadow: 0 2px 5px rgba(0, 0, 0, .55), 0 0 10px rgba(247, 223, 165, .35);
  pointer-events: none;
}
.avatar.exploder { background: radial-gradient(circle at 34% 26%, rgba(255, 255, 255, .16), transparent 40%), linear-gradient(145deg, #c14b3f, #6b1b18); }
.avatar.oldk { background: radial-gradient(circle at 34% 26%, rgba(255, 255, 255, .18), transparent 40%), linear-gradient(145deg, #2e6963, #123631); }
.oldk-k-mark {
  position: absolute;
  left: -9px;
  top: -9px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #a5ddd3;
  background: #276f65;
  color: #effffb;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  z-index: 8;
  box-shadow: 0 3px 9px rgba(0, 0, 0, .35);
}
.seat.is-turn .avatar { box-shadow: 0 0 0 3px rgba(226, 202, 148, .18), 0 0 28px rgba(226, 202, 148, .24); }
.seat.finished .avatar { filter: grayscale(.45); }
.avatar-initial { transform: translateY(1px); position: relative; z-index: 2; }
.avatar-photo {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  pointer-events: none;
}
.count-badge {
  position: absolute;
  right: -5px;
  bottom: -3px;
  min-width: 24px;
  height: 22px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(226, 202, 148, .42);
  background: #082418;
  color: var(--gold-2);
  font-size: 11px;
  font-weight: 700;
}
.called-k-card {
  position: absolute;
  right: -27px;
  top: -12px;
  left: auto;
  bottom: auto;
  z-index: 9;
  width: 35px;
  height: 45px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3px 2px;
  border: 1px solid #c8a45c;
  border-radius: 5px;
  background: linear-gradient(155deg, #fffdf8, #eee1c5);
  color: #232018;
  box-shadow: 0 5px 12px rgba(0, 0, 0, .38);
  transform: rotate(7deg);
  pointer-events: auto;
}
.called-k-card.red { border-color: #c77b70; color: var(--red); }
.called-k-caption {
  position: absolute;
  left: -1px;
  top: -7px;
  padding: 0 3px;
  border-radius: 3px;
  background: var(--gold);
  color: #251d0b;
  font-family: var(--sans);
  font-size: 7px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: .06em;
}
.called-k-rank { font-family: var(--serif); font-size: 19px; font-weight: 700; line-height: 1; }
.called-k-suit { margin-top: 1px; font-size: 13px; line-height: 1; }
.called-k-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 13px;
  border: 1px solid rgba(240, 211, 143, .6);
  border-radius: 999px;
  background: rgba(200, 164, 92, .24);
  color: #ffe6ae;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  box-shadow: 0 0 0 2px rgba(200, 164, 92, .06);
}
.called-k-inline small { color: #c5a66b; font-size: 10px; }
.called-k-inline b { font-weight: 800; }
.called-k-inline.red { border-color: rgba(226, 153, 139, .65); background: rgba(167, 45, 40, .26); color: #ffc4b8; }
.seat-name-line { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 8px; min-width: 0; flex-wrap: wrap; row-gap: 3px; }
.seat-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; color: #f1e6d1; }
.seat.has-bigcat .seat-name { color: #ffe7b0; text-shadow: 0 0 12px rgba(240, 197, 96, .35); }
.seat.has-oldk .seat-name { color: #b8e7df; }
.you-mark { padding: 1px 5px; border-radius: 4px; background: rgba(226, 202, 148, .16); color: var(--gold-2); font-size: 9px; }
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(232, 218, 186, .16);
  color: #a9bcb0;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}
.role-badge.bigcat { border-color: rgba(226, 202, 148, .55); background: rgba(200, 164, 92, .18); color: #f2d795; }
.seat-count-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  padding: 2px 9px;
  border: 1px solid rgba(226, 202, 148, .28);
  border-radius: 999px;
  background: rgba(8, 34, 23, .58);
  color: #e5d5b2;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}
.seat-count-line.revealed {
  border-color: rgba(255, 225, 153, .9);
  background: linear-gradient(135deg, rgba(200, 164, 92, .95), rgba(160, 118, 47, .95));
  color: #241a08;
  box-shadow: 0 0 14px rgba(240, 197, 96, .45);
}
.role-badge.oldk { border-color: rgba(96, 175, 166, .5); background: rgba(45, 123, 115, .18); color: #9fded4; }
.role-badge.exploder { border-color: rgba(210, 74, 62, .5); background: rgba(167, 45, 40, .22); color: #f2a69a; }
.role-badge.farmer, .role-badge.challenger { color: #b7c9bd; }
.seat-meta { margin-top: 3px; color: #8fa99a; font-size: 10px; }
.seat-meta .score-pos { color: #86d3a4; }
.seat-meta .score-neg { color: #e09384; }
.seat-reveal {
  position: absolute;
  z-index: 30;
  left: 50%;
  top: calc(100% + 8px);
  width: 420px;
  max-width: 420px;
  transform: translateX(-50%);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.seat.pos-1 .seat-reveal { transform: translateX(calc(-50% + 100px)); }
.seat.pos-4 .seat-reveal { transform: translateX(calc(-50% - 100px)); }
.seat-reveal-fan { display: flex; align-items: flex-end; justify-content: center; padding-top: 2px; }
.seat-reveal-fan .card {
  width: 96px;
  height: 138px;
  padding: 5px;
  margin-left: -66px;
  border-radius: 7px;
  z-index: var(--i, 0);
}
.seat-reveal-fan .card:first-child { margin-left: 0; }
.seat-reveal-fan .card .corner { left: 6px; top: 5px; }
.seat-reveal-fan .card .corner-rank { font-size: 30px; }
.seat-reveal-fan .card .corner-suit { font-size: 20px; }
.seat-reveal-fan .card .center-suit { font-size: 42px; }
.seat-reveal-fan .card .bottom-rank { right: 6px; bottom: 4px; font-size: 15px; }
.seat-reveal-fan .card .trump-pin { top: 5px; right: 5px; font-size: 9px; }
.seat-bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 2px);
  transform: translateX(-50%);
  min-width: 38px;
  padding: 4px 9px;
  border-radius: 8px;
  background: #f7eedb;
  color: #413823;
  font-size: 11px;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .25);
}
.seat-bubble.play {
  padding: 7px 15px;
  border: 1px solid #f8e8bd;
  border-radius: 10px;
  background: linear-gradient(135deg, #f8e9bf, #ddbb74);
  color: #2b2210;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .04em;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .3), 0 0 0 3px rgba(200, 164, 92, .1);
}
.seat-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #f7eedb;
}
.seat-bubble.play::after { border-top-color: #e2c27b; }
.seat-bubble.pass { background: #d9cfb7; }
.seat-bubble.finish { background: var(--gold); color: #2a2110; font-weight: 700; }
.seat-chat,
.self-chat {
  position: absolute;
  z-index: 20;
  max-width: 210px;
  max-height: 76px;
  padding: 7px 11px;
  border: 1px solid rgba(240, 211, 143, .7);
  border-radius: 12px;
  background: rgba(250, 242, 224, .98);
  color: #2e2515;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  overflow: hidden;
  overflow-wrap: anywhere;
  box-shadow: 0 7px 18px rgba(0, 0, 0, .35), 0 0 0 2px rgba(200, 164, 92, .12);
  pointer-events: none;
}
.seat-chat {
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  animation: seat-chat-fade 9s both;
}
.seat.pos-2 .seat-chat,
.seat.pos-3 .seat-chat {
  bottom: auto;
  top: calc(100% + 8px);
}
.seat.pos-2 .seat-chat::after,
.seat.pos-3 .seat-chat::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: rgba(250, 242, 224, .98);
}
.self-chat {
  left: 0;
  bottom: calc(100% + 6px);
  max-width: 260px;
  animation: self-chat-fade 9s both;
}
.seat-chat::after,
.self-chat::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(250, 242, 224, .98);
}
@keyframes seat-chat-fade {
  0% { opacity: 0; transform: translate(-50%, 6px) scale(.92); }
  8%, 78% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -4px) scale(.98); }
}
@keyframes self-chat-fade {
  0% { opacity: 0; transform: translateY(6px) scale(.92); }
  8%, 78% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-4px) scale(.98); }
}
.seat-cards {
  position: absolute;
  right: -8px;
  top: 12px;
  width: 30px;
  height: 38px;
  pointer-events: none;
}
.seat-cards i {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  border: 1px solid rgba(245, 238, 223, .3);
  background: repeating-linear-gradient(45deg, #8c2d2a 0 3px, #6f201e 3px 6px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .25);
}
.seat-cards i:nth-child(2) { transform: translate(-3px, 2px); }
.seat-cards i:nth-child(3) { transform: translate(-6px, 4px); }

/* 中央出牌区 */
.table-center {
  position: absolute;
  z-index: 10;
  left: 50%;
  top: 45%;
  width: min(52vw, 520px);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.turn-readout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(4, 24, 14, .56);
  border: 1px solid rgba(226, 202, 148, .14);
  color: #b9cbbf;
  font-size: 11px;
  letter-spacing: .04em;
  backdrop-filter: blur(4px);
}
.turn-readout b { color: var(--gold-2); }
.turn-readout.you { border-color: rgba(226, 202, 148, .5); color: #f1e2c5; background: rgba(200, 164, 92, .12); }
.turn-readout .clock { font-variant-numeric: tabular-nums; color: #e7d5b3; }
.last-play-label {
  padding: 4px 11px;
  border: 1px solid rgba(226, 202, 148, .24);
  border-radius: 999px;
  background: rgba(3, 22, 12, .42);
  color: #d8c6a3;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
}
.last-play-label b { color: var(--gold-2); }
.center-play-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  margin: 2px 0 3px;
  padding: 7px 24px 8px;
  border: 1px solid rgba(226, 202, 148, .28);
  border-radius: 10px;
  background: rgba(3, 22, 12, .46);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  backdrop-filter: blur(3px);
}
.center-play-name { color: #a9bfae; font-size: 10px; letter-spacing: .1em; }
.center-play-combo {
  color: var(--gold-2);
  font-family: var(--serif);
  font-size: clamp(23px, 2.7vw, 33px);
  font-weight: 700;
  letter-spacing: .08em;
  text-shadow: 0 3px 12px rgba(0, 0, 0, .3);
}
.seat-play {
  position: absolute;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 9px;
  border: 1px solid rgba(226, 202, 148, .22);
  border-radius: 9px;
  background: rgba(3, 21, 12, .56);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .32);
  backdrop-filter: blur(3px);
  pointer-events: none;
  opacity: .72;
  transition: opacity .18s ease, border-color .18s ease;
}
.seat-play.current {
  opacity: 1;
  border-color: rgba(240, 211, 143, .62);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .4), 0 0 0 2px rgba(200, 164, 92, .12);
}
.seat-play .card { width: 78px; height: 112px; margin-left: -11px; border-radius: 6px; box-shadow: 0 7px 16px rgba(0, 0, 0, .3); }
.seat-play .card:first-child { margin-left: 0; }
.seat-play .card .corner { left: 5px; top: 4px; }
.seat-play .card .corner-rank { font-size: 26px; }
.seat-play .card .corner-suit { font-size: 15px; }
.seat-play .card .center-suit { font-size: 35px; padding-top: 6px; }
.seat-play .card .bottom-rank { font-size: 16px; right: 4px; bottom: 4px; }
.seat-play .card .trump-pin { font-size: 8px; padding: 0 2px; }
.seat.pos-1 .seat-play { left: calc(50% + 40px); top: 12%; }
.seat.pos-4 .seat-play { right: calc(50% + 40px); top: 12%; }
.seat.pos-2 .seat-play, .seat.pos-3 .seat-play {
  left: 50%;
  top: calc(100% + 7px);
  transform: translateX(-50%);
}
.self-play {
  position: absolute;
  z-index: 35;
  left: 8px;
  bottom: calc(100% + 5px);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid rgba(226, 202, 148, .3);
  border-radius: 9px;
  background: rgba(3, 21, 12, .78);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .34);
  backdrop-filter: blur(4px);
  pointer-events: none;
  opacity: .74;
  transition: opacity .18s ease, border-color .18s ease;
}
.self-play.current {
  opacity: 1;
  border-color: rgba(240, 211, 143, .64);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .4), 0 0 0 2px rgba(200, 164, 92, .12);
}
.self-play-label { color: #a9bfae; font-size: 9px; letter-spacing: .08em; white-space: nowrap; }
.self-play .card { width: 58px; height: 84px; margin-left: -7px; border-radius: 6px; box-shadow: 0 7px 16px rgba(0, 0, 0, .3); }
.self-play .card:first-of-type { margin-left: 0; }
.self-play .card .corner { left: 5px; top: 4px; }
.self-play .card .corner-rank { font-size: 20px; }
.self-play .card .corner-suit { font-size: 12px; }
.self-play .card .center-suit { font-size: 27px; padding-top: 6px; }
.self-play .card .bottom-rank { font-size: 13px; right: 4px; bottom: 4px; }
.self-play .card .trump-pin { font-size: 7px; padding: 0 2px; }
.played-cards {
  min-height: 96px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px 14px;
}
.played-cards .card { width: 62px; height: 89px; border-radius: 7px; margin-left: -8px; box-shadow: 0 12px 24px rgba(0, 0, 0, .34); }
.played-cards .card:first-child { margin-left: 0; }
.played-cards .card .corner-rank { font-size: 19px; }
.played-cards .card .corner-suit { font-size: 12px; }
.played-cards .card .center-suit { font-size: 27px; }
.played-cards .empty-table {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: rgba(226, 202, 148, .36);
  font-size: 11px;
}
.empty-table .ornament { font-size: 24px; color: rgba(226, 202, 148, .25); }
.table-status {
  min-height: 17px;
  color: #91aa9b;
  font-size: 11px;
  text-align: center;
  line-height: 1.5;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}
.table-status b { color: var(--gold-2); }
.pass-row { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; }
.pass-chip {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .2);
  border: 1px solid rgba(232, 218, 186, .1);
  color: #8fa699;
  font-size: 9px;
}

/* 手牌 Dock */
.hand-dock {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 18px max(58px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(3, 17, 9, .94) 0%, rgba(5, 26, 15, .84) 58%, rgba(5, 26, 15, 0) 100%);
}
.dock-inner { position: relative; max-width: 980px; margin: 0 auto; }
.dock-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  margin-bottom: 4px;
}
.self-cluster { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; }
.self-avatar {
  position: relative;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(232, 218, 186, .3);
  background: linear-gradient(145deg, #347553, #123b27);
  color: #f1e2c5;
  font-family: var(--serif);
  font-size: 28px;
  flex-shrink: 0;
}
.self-avatar.bigcat {
  background: linear-gradient(145deg, #e0bb72, #7b521a);
  color: #241b0b;
  border-color: #f1d695;
  box-shadow: 0 0 0 2px rgba(240, 211, 143, .36), 0 0 16px rgba(224, 187, 114, .4);
}
.self-avatar.bigcat .avatar-crown { top: -30px; font-size: 22px; }
.self-avatar.bigcat::before,
.self-avatar.bigcat::after {
  content: "";
  position: absolute;
  top: -7px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 15px solid #c8a45c;
  z-index: 0;
}
.self-avatar.bigcat::before { left: 7px; transform: rotate(-15deg); }
.self-avatar.bigcat::after { right: 7px; transform: rotate(15deg); }
.self-avatar.oldk {
  background: linear-gradient(145deg, #2e6963, #123631);
  border-color: #8ad1c5;
  box-shadow: 0 0 0 2px rgba(94, 181, 168, .3);
}
.self-avatar .oldk-k-mark { left: -7px; top: -7px; width: 24px; height: 24px; font-size: 12px; }
.self-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.self-bigcat-name .self-name { color: #ffe7b0; }
.self-oldk-name .self-name { color: #b8e7df; }
.self-score { color: #9fb3a5; font-size: 10px; }
.selection-chip {
  flex: 1;
  min-width: 0;
  color: #a7bbad;
  font-size: 11px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.selection-chip b { color: var(--gold-2); }
.selection-chip.invalid { color: #e09b8e; }
.selection-chip:empty { display: none; }
.dock-tools { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.mini-tool {
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #9fb3a5;
  font-size: 10px;
  cursor: pointer;
  white-space: nowrap;
}
.mini-tool:hover { color: var(--gold-2); border-color: rgba(226, 202, 148, .18); }
.hand {
  position: relative;
  height: var(--card-h);
  margin: 0 auto;
  width: calc(var(--card-w) + (var(--n, 1) - 1) * var(--hand-step));
  max-width: 94vw;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.hand .card { touch-action: none; }
.hand-countdown {
  position: absolute;
  z-index: 45;
  top: auto;
  right: 0;
  bottom: calc(var(--card-h) + 12px);
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
  padding: 6px 11px 5px;
  border: 1px solid rgba(255, 228, 160, .75);
  border-radius: 13px;
  background: rgba(5, 26, 15, .9);
  color: #ffe6a8;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .42), 0 0 18px rgba(240, 197, 96, .22);
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.hand-countdown .countdown-label {
  align-self: center;
  color: #bda880;
  font-size: 9px;
  letter-spacing: .12em;
}
.hand-countdown b {
  font-family: var(--serif);
  font-size: 34px;
  line-height: .9;
  font-variant-numeric: tabular-nums;
  color: #ffe6a8;
  text-shadow: 0 0 14px rgba(240, 197, 96, .35);
}
.hand-countdown .countdown-unit {
  margin-bottom: 1px;
  color: #c7af82;
  font-size: 12px;
}
.hand > .empty-table {
  position: absolute;
  inset: 0;
  justify-content: center;
  color: #b5a888;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: .08em;
}
.hand.empty { width: 280px; max-width: 80vw; }
.card {
  position: relative;
  flex-shrink: 0;
  width: var(--card-w);
  height: var(--card-h);
  padding: 5px;
  border-radius: 8px;
  border: 1px solid #d0c5ae;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0) 35%),
    linear-gradient(155deg, #fffdf8 0%, #f2e9d7 100%);
  color: #1e211c;
  box-shadow: 0 6px 13px rgba(0, 0, 0, .26);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
button.card { cursor: pointer; font: inherit; text-align: left; }
.hand .card { position: absolute; left: calc(var(--i, 0) * var(--hand-step)); top: 0; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, filter .16s ease; }
.hand .card:hover { transform: none; z-index: var(--i, 0); }
.hand .card.selected { transform: translateY(-16px); box-shadow: 0 0 0 2px var(--gold-2), 0 14px 22px rgba(0, 0, 0, .35); z-index: 40 !important; }
.hand .card.selected:hover { transform: translateY(-16px); }
.hand .card.disabled { filter: saturate(.75) brightness(.9); }
.hand .card.disabled.selected { filter: none; }
.card.red { color: var(--red); }
.card.joker { border-color: #c59645; background: linear-gradient(155deg, #fffdf8, #f0e1bf); }
.card.joker-photo,
.display-card.joker-photo {
  padding: 0;
  overflow: hidden;
  background: #f8f3e8;
}
.card.joker-photo .joker-photo-img,
.display-card.joker-photo .joker-photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}
.card.joker-photo .card-glow { border-radius: inherit; }
.card.trump:not(.joker) { border-color: #c3a15c; background: linear-gradient(155deg, #fffdf8 58%, #f1e5c8 100%); }
.card.trump:not(.joker)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 7px 0 0 7px;
  background: linear-gradient(to bottom, #e2c782, #987028);
  z-index: 4;
}
.card.trump.joker::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 7px 0 0 7px;
  background: linear-gradient(to bottom, #e2c782, #987028);
  z-index: 4;
}
.card.dim { opacity: .55; }
.card.partner-card {
  border-color: #79c9bc;
  box-shadow: inset 3px 0 0 #4fa99b, 0 0 0 2px rgba(121, 201, 188, .5), 0 8px 20px rgba(0, 0, 0, .3);
}
.partner-pin {
  position: absolute;
  left: 4px;
  bottom: 4px;
  z-index: 7;
  padding: 1px 4px;
  border-radius: 3px;
  border: 1px solid rgba(201, 245, 237, .7);
  background: #276f65;
  color: #effffb;
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: .02em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
  pointer-events: none;
}
.card .corner {
  position: absolute;
  left: 5px;
  top: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: .92;
  z-index: 2;
}
.card .corner-rank { font-family: var(--serif); font-size: clamp(24px, 2.6vw, 36px); font-weight: 700; letter-spacing: -.04em; }
.card .corner-suit { margin-top: 2px; font-size: clamp(14px, 1.55vw, 19px); line-height: 1; }
.card .center-suit {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-top: 10px;
  font-family: var(--serif);
  font-size: clamp(38px, 4.8vw, 62px);
  opacity: .2;
  pointer-events: none;
}
.card .bottom-rank {
  position: absolute;
  right: 7px;
  bottom: 6px;
  transform: rotate(180deg);
  font-family: var(--serif);
  font-size: clamp(15px, 1.7vw, 22px);
  font-weight: 700;
  opacity: .6;
}
.card .trump-pin {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 1px 3px;
  border-radius: 3px;
  background: rgba(143, 104, 40, .13);
  color: var(--gold-deep);
  font-size: 7px;
  letter-spacing: .06em;
  z-index: 3;
}
.card.joker .corner-rank { writing-mode: vertical-rl; font-size: clamp(17px, 2vw, 24px); letter-spacing: .12em; color: var(--gold-deep); }
.card.joker .corner-suit { color: var(--gold-deep); font-size: 11px; }
.card.joker .center-suit { font-family: var(--serif); writing-mode: vertical-rl; font-size: clamp(24px, 3vw, 38px); letter-spacing: .12em; opacity: .18; }
.card .card-glow {
  position: absolute;
  inset: 0;
  border-radius: 7px;
  box-shadow: inset 0 0 18px rgba(200, 164, 92, .12);
  pointer-events: none;
}

/* 操作栏 */
.action-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  margin-top: 7px;
}
.hand-dock .action-row { margin: 2px 0 26px; }
.action-row .btn { min-width: 94px; }
.action-row .btn-play { min-width: 122px; }
.action-turn-note {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #a2b7a9;
  font-size: 11px;
  text-align: center;
}
.action-turn-note b { color: var(--gold-2); }
.action-turn-note .status-time { font-variant-numeric: tabular-nums; color: #e4cfa7; font-size: 15px; font-family: var(--serif); }

/* 爆了 / 叫K 面板 */
.decision-panel {
  position: absolute;
  z-index: 60;
  left: 50%;
  top: 43%;
  width: min(92vw, 480px);
  transform: translate(-50%, -50%);
  padding: 22px;
  border-radius: 16px;
  border: 1px solid rgba(226, 202, 148, .42);
  background:
    linear-gradient(160deg, rgba(250, 244, 230, .98), rgba(234, 222, 198, .98));
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .48);
  text-align: center;
  animation: panel-in .25s cubic-bezier(.2, .8, .2, 1);
}
.decision-panel::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(115, 85, 35, .18);
  border-radius: 11px;
  pointer-events: none;
}
.decision-kicker { color: var(--gold-deep); font-size: 10px; font-weight: 700; letter-spacing: .28em; }
.decision-title { margin: 5px 0 6px; font-family: var(--serif); font-size: clamp(24px, 4vw, 34px); color: #143d29; }
.decision-text { color: #665d49; font-size: 13px; line-height: 1.7; }
.decision-taunt {
  margin: 8px 0 2px;
  color: #b62f27;
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: .14em;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .5), 0 0 18px rgba(167, 45, 40, .18);
}
.decision-countdown {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin: 10px 0 3px;
  color: var(--red);
  font-family: var(--serif);
  font-size: 34px;
  font-variant-numeric: tabular-nums;
}
.decision-countdown small { font-family: var(--sans); font-size: 10px; letter-spacing: .16em; color: #8c7d61; }
.decision-actions { display: flex; justify-content: center; gap: 9px; margin-top: 14px; flex-wrap: wrap; }
.decision-actions .btn { min-width: 116px; }
.decision-foot { margin-top: 10px; color: #8e8067; font-size: 10px; }
.decision-panel.risk { border-color: rgba(167, 45, 40, .45); }
.decision-panel.risk .decision-title { color: #7e211d; }
.explode-banner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(167, 45, 40, .1);
  color: #8a2c26;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
}
.k-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 7px; margin-top: 14px; }
.k-choice {
  position: relative;
  min-height: 98px;
  padding: 9px 4px;
  border: 1px solid #d3c4a6;
  border-radius: 9px;
  background: #fffdf8;
  color: #1e211c;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.k-choice:hover { transform: translateY(-3px); border-color: var(--gold-deep); box-shadow: 0 8px 18px rgba(80, 60, 25, .13); }
.k-choice.red { color: var(--red); }
.k-choice .k-suit { display: block; font-size: 25px; line-height: 1; }
.k-choice .k-rank { display: block; margin-top: 2px; font-family: var(--serif); font-size: 25px; font-weight: 700; }
.k-choice .k-label { display: block; margin-top: 5px; color: #72664f; font-size: 9px; }
.k-choice .k-own {
  position: absolute;
  left: 50%;
  bottom: 3px;
  transform: translateX(-50%);
  color: #a23a31;
  font-size: 8px;
  white-space: nowrap;
}
.k-choice.own { border-color: rgba(167, 45, 40, .42); background: #fff7f1; }
.waiting-call {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border: 1px solid rgba(226, 202, 148, .24);
  border-radius: 999px;
  background: rgba(4, 24, 14, .56);
  color: #c7d5cb;
  font-size: 12px;
  backdrop-filter: blur(4px);
}
.waiting-call .cats {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(145deg, #d1a85e, #76501e);
  color: #241b0b;
  font-family: var(--serif);
}
.waiting-call b { color: var(--gold-2); }

/* 身份提示 */
.role-strip {
  position: absolute;
  z-index: 12;
  left: 50%;
  top: calc(14% + 82px);
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  width: min(90vw, 700px);
  pointer-events: none;
}
.role-note {
  padding: 4px 10px;
  border: 1px solid rgba(232, 218, 186, .14);
  border-radius: 999px;
  background: rgba(3, 21, 12, .36);
  color: #aabfb0;
  font-size: 10px;
  backdrop-filter: blur(3px);
}
.role-note b { color: var(--gold-2); }
.role-note.oldk { border-color: rgba(96, 175, 166, .34); color: #a8d6ce; }
.role-note.bigcat { border-color: rgba(226, 202, 148, .34); color: #eed9a9; }

/* 结算 */
.result-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 13, 7, .78);
  backdrop-filter: blur(7px);
  animation: fade-in .25s ease;
}
.result-card {
  width: min(94vw, 780px);
  max-height: 92dvh;
  overflow: auto;
  border-radius: 16px;
  border: 1px solid rgba(226, 202, 148, .42);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 35px 100px rgba(0, 0, 0, .55);
  animation: result-in .32s cubic-bezier(.2, .8, .2, 1);
}
.result-head {
  position: relative;
  padding: 24px 26px 20px;
  background:
    radial-gradient(500px 180px at 20% 0%, rgba(49, 137, 89, .28), transparent 70%),
    linear-gradient(150deg, #0d3d26, #082a19);
  color: var(--cream);
}
.result-head::after {
  content: "";
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(226, 202, 148, .42), transparent);
}
.result-kicker { color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .3em; }
.result-title { margin-top: 6px; font-family: var(--serif); font-size: clamp(25px, 3.6vw, 36px); letter-spacing: .04em; }
.result-sub { margin-top: 5px; color: #a9bfae; font-size: 11px; }
.result-close {
  position: absolute;
  right: 15px;
  top: 15px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(232, 218, 186, .2);
  background: transparent;
  color: #c9d6cd;
  font-size: 21px;
  cursor: pointer;
}
.result-body { padding: 18px 24px 22px; }
.pause-overlay {
  position: absolute;
  z-index: 70;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 16, 9, .7);
  backdrop-filter: blur(3px);
}
.pause-card {
  width: min(90vw, 420px);
  padding: 22px 24px;
  border-radius: 16px;
  border: 1px solid rgba(230, 198, 129, .45);
  background: linear-gradient(160deg, rgba(10, 49, 30, .98), rgba(4, 28, 16, .98));
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.pause-card .pause-kicker { color: var(--gold); font-size: 9px; font-weight: 800; letter-spacing: .28em; }
.pause-card h2 { margin: 4px 0 6px; font-family: var(--serif); font-size: 28px; color: #ffe2a6; }
.pause-card p { color: #d6e2d7; font-size: 14px; line-height: 1.6; }
.pause-card small { display: block; margin-top: 9px; color: #93a99a; font-size: 10px; }
.result-top-actions {
  display: flex;
  justify-content: center;
  padding: 12px 24px 0;
  background: #f8efdc;
}
.result-top-actions .result-rematch {
  min-width: 170px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 800;
  border-radius: 10px;
}
.result-scoreboard { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.result-remaining { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.remaining-line {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border: 1px solid rgba(151, 133, 102, .15);
  border-radius: 7px;
  background: rgba(255, 253, 247, .44);
}
.remaining-line:nth-child(odd) { background: rgba(28, 68, 45, .045); }
.remaining-line.you { background: rgba(200, 164, 92, .13); box-shadow: inset 2px 0 0 var(--gold); }
.remaining-who { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.remaining-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.remaining-count { color: #8d7d62; font-size: 9px; }
.remaining-cards { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.remaining-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 27px;
  padding: 3px 6px;
  border: 1px solid #d6c9b1;
  border-radius: 5px;
  background: #fffdf7;
  color: #25231d;
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
}
.remaining-card.red { color: var(--red); }
.remaining-card.joker { border-color: #c8a45c; background: #f5e8c9; color: #75501a; }
.remaining-empty { color: #9a8c73; font-size: 10px; }
.score-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(2, auto);
  gap: 14px;
  align-items: center;
  padding: 9px 11px;
  border-radius: 7px;
  font-size: 13px;
}
.score-line:nth-child(odd) { background: rgba(28, 68, 45, .055); }
.score-line.you { background: rgba(200, 164, 92, .15); box-shadow: inset 2px 0 0 var(--gold); }
.result-card .role-badge {
  border-color: #d9cdb5;
  background: #f3ead9;
  color: #5e6458;
}
.result-card .role-badge.bigcat,
.result-card .role-badge.bigcat_oldk {
  border-color: #c8a45c;
  background: #f3e2ba;
  color: #75501a;
}
.result-card .role-badge.oldk {
  border-color: #9fc4bd;
  background: #e0efeb;
  color: #235c55;
}
.result-card .role-badge.exploder {
  border-color: #d8a69c;
  background: #f5e1db;
  color: #8f2b24;
}
.result-card .you-mark {
  background: #e7d8b8;
  color: #6f5221;
}
.score-who { display: flex; align-items: center; gap: 7px; min-width: 0; }
.score-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-delta { font-family: var(--serif); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 50px; text-align: right; }
.score-delta.plus { color: var(--green-ok); }
.score-delta.minus { color: var(--red); }
.score-total { min-width: 62px; text-align: right; color: #7a6e58; font-size: 11px; font-variant-numeric: tabular-nums; }
.result-order {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 16px;
}
.order-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid #dfd3bc;
  border-radius: 999px;
  background: #fffdf7;
  font-size: 10px;
  color: #655b49;
}
.order-pill b { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: #173f2a; color: #f4e9d3; font-size: 9px; }
.order-pill.not-out { border-style: dashed; color: #9a8e78; }
.result-actions { display: flex; justify-content: center; gap: 9px; flex-wrap: wrap; margin-top: 18px; }
.result-note { margin-top: 11px; text-align: center; color: #8c7e65; font-size: 10px; line-height: 1.7; }
.result-section-label { margin-top: 14px; color: #8b7d64; font-size: 9px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }

/* 完成/等待横幅 */
.table-banner {
  position: absolute;
  z-index: 40;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 22px;
  border: 1px solid rgba(226, 202, 148, .4);
  border-radius: 999px;
  background: rgba(4, 24, 14, .9);
  color: var(--gold-2);
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: .1em;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}

/* ---------- 聊天抽屉 ---------- */
.chat-scrim {
  position: fixed;
  z-index: 80;
  inset: 0;
  background: rgba(0, 0, 0, .42);
  backdrop-filter: blur(2px);
}
.chat-drawer {
  position: fixed;
  z-index: 90;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 92vw);
  display: flex;
  flex-direction: column;
  transform: translateX(102%);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
  border-left: 1px solid rgba(226, 202, 148, .25);
  background:
    radial-gradient(400px 300px at 100% 0%, rgba(31, 108, 65, .3), transparent 65%),
    linear-gradient(160deg, #0b3220, #04190f);
  box-shadow: -25px 0 70px rgba(0, 0, 0, .42);
}
.chat-drawer.open { transform: translateX(0); }
.chat-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 18px 14px; border-bottom: 1px solid rgba(232, 218, 186, .12); }
.chat-kicker { color: var(--gold); font-size: 8px; letter-spacing: .28em; }
.chat-head h2 { margin-top: 2px; font-family: var(--serif); font-size: 21px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 9px; scrollbar-width: thin; }
.chat-msg { max-width: 92%; align-self: flex-start; font-size: 12px; line-height: 1.65; }
.chat-msg .chat-name { display: block; margin-bottom: 2px; color: #8fa99a; font-size: 9px; }
.chat-msg .chat-bubble { display: inline-block; padding: 7px 10px; border-radius: 3px 10px 10px 10px; background: rgba(255, 255, 255, .07); color: #e8dcC6; word-break: break-word; }
.chat-msg.me { align-self: flex-end; }
.chat-msg.me .chat-name { text-align: right; color: var(--gold); }
.chat-msg.me .chat-bubble { border-radius: 10px 3px 10px 10px; background: rgba(200, 164, 92, .2); color: #f4e8cf; }
.chat-msg.system { align-self: center; max-width: 100%; text-align: center; color: #7f978a; font-size: 10px; }
.chat-msg.system .chat-bubble { background: transparent; padding: 2px 4px; color: inherit; }
.chat-quick { display: flex; flex-wrap: wrap; gap: 5px; padding: 9px 14px; border-top: 1px solid rgba(232, 218, 186, .1); }
.quick-chip {
  padding: 4px 9px;
  border: 1px solid rgba(232, 218, 186, .18);
  border-radius: 999px;
  background: transparent;
  color: #acbeb2;
  font-size: 10px;
  cursor: pointer;
}
.quick-chip:hover { border-color: var(--gold); color: var(--gold-2); }
.quick-chip.voice-toggle {
  border-color: rgba(226, 202, 148, .55);
  color: var(--gold-2);
  font-weight: 700;
}
.quick-chip.voice-toggle.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #241c0d;
}
.chat-voice {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  max-height: 190px;
  overflow-y: auto;
  padding: 8px 14px;
  border-top: 1px solid rgba(232, 218, 186, .1);
  background: rgba(0, 0, 0, .1);
  scrollbar-width: thin;
}
.chat-voice[hidden] { display: none; }
.voice-phrase {
  padding: 8px 10px;
  border: 1px solid rgba(232, 218, 186, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  color: #ddceb2;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}
.voice-phrase:hover,
.voice-phrase:focus-visible {
  border-color: rgba(226, 202, 148, .7);
  background: rgba(200, 164, 92, .14);
  color: #fff1cf;
}
.voice-phrase.special {
  border-color: rgba(226, 202, 148, .55);
  background: rgba(200, 164, 92, .12);
  color: #f3dca6;
  font-weight: 700;
}
.chat-form { display: flex; gap: 7px; padding: 11px 14px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid rgba(232, 218, 186, .12); }
.chat-form .input { min-height: 40px; padding: 8px 12px; font-size: 12px; }

/* 点「语」时同一个抽屉只显示快捷语音；点「聊」仍显示完整聊天 */
.chat-drawer.voice-only .chat-messages,
.chat-drawer.voice-only .chat-quick,
.chat-drawer.voice-only .chat-form {
  display: none !important;
}
.chat-drawer.voice-only .chat-voice {
  flex: 1;
  max-height: none;
  padding: 14px 16px max(16px, env(safe-area-inset-bottom));
  border-top: 0;
  align-content: start;
}

/* ---------- 弹窗 / 规则 ---------- */
.modal-overlay {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 13, 7, .72);
  backdrop-filter: blur(5px);
}
.rules-modal {
  width: min(94vw, 780px);
  max-height: 90dvh;
  overflow: auto;
  border-radius: 14px;
  border: 1px solid #d6c5a4;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
}
.rules-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: linear-gradient(160deg, #0c3a24, #072716);
  color: var(--cream);
}
.rules-head h2 { font-family: var(--serif); font-size: 22px; letter-spacing: .08em; }
.rules-head p { color: var(--gold); font-size: 9px; letter-spacing: .22em; margin-top: 2px; }
.rules-body { padding: 18px 22px 24px; }
.rules-lead { color: #6d634f; font-size: 12px; line-height: 1.8; }
.rules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.rule-block { padding: 12px 13px; border: 1px solid #dfd3bc; border-radius: 8px; background: #fffdf7; }
.rule-block h3 { color: #17462d; font-family: var(--serif); font-size: 15px; margin-bottom: 4px; }
.rule-block p { color: #6d634f; font-size: 11px; line-height: 1.7; }
.rule-table { width: 100%; border-collapse: collapse; margin-top: 13px; font-size: 11px; }
.rule-table th, .rule-table td { padding: 7px 9px; border-bottom: 1px solid #e5dac5; text-align: left; }
.rule-table th { color: #17462d; background: #f0e8d7; }
.rank-line { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 8px; }
.rank-line span { padding: 2px 5px; border: 1px solid #ddd0b8; border-radius: 3px; background: #fffdf7; font-family: var(--serif); font-size: 11px; }
.rank-line span.trump { background: #17462d; color: #f3e9d4; border-color: #17462d; }
.rules-warn { margin-top: 13px; padding: 9px 11px; border-left: 3px solid var(--gold); background: #f2e9d7; color: #6d634f; font-size: 10px; line-height: 1.7; }

/* ---------- Toast / 加载 ---------- */
.toast-root {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  pointer-events: none;
}
body.in-game .toast-root { bottom: 360px; }
.toast {
  max-width: min(90vw, 440px);
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(226, 202, 148, .28);
  background: rgba(8, 38, 23, .95);
  color: #f1e4ca;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .38);
  animation: toast-in .2s ease;
}
.toast.error { border-color: rgba(210, 74, 62, .45); color: #f4c5bb; }
.toast.good { border-color: rgba(84, 201, 138, .4); color: #c5f0d7; }
.permission-overlay {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 12, 7, .62);
  backdrop-filter: blur(3px);
  animation: permission-fade .2s ease;
  transition: opacity .2s ease;
}
.permission-overlay.out { opacity: 0; }
.permission-toast {
  width: min(86vw, 430px);
  padding: 30px 36px 28px;
  display: grid;
  justify-items: center;
  gap: 9px;
  border: 2px solid rgba(240, 211, 143, .78);
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 0%, rgba(200, 164, 92, .22), transparent 62%),
    linear-gradient(150deg, #123c27, #071c11);
  color: #fff0cf;
  text-align: center;
  box-shadow:
    0 0 0 5px rgba(200, 164, 92, .08),
    0 26px 70px rgba(0, 0, 0, .6),
    0 0 42px rgba(224, 187, 114, .22);
  animation: permission-pop .28s cubic-bezier(.2, .9, .25, 1.15);
}
.permission-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 3px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f1d695, #c89c4b);
  color: #2c1e08;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 0 22px rgba(240, 211, 143, .35);
}
.permission-title {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .08em;
  color: #ffe6ad;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .4);
}
.permission-text {
  font-size: 18px;
  letter-spacing: .12em;
  color: #e6cfa0;
}
@keyframes permission-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes permission-pop {
  from { opacity: 0; transform: translateY(12px) scale(.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 640px) {
  .permission-toast { width: min(88vw, 360px); padding: 25px 22px 23px; }
  .permission-icon { width: 42px; height: 42px; font-size: 26px; }
  .permission-title { font-size: 24px; }
  .permission-text { font-size: 16px; }
}
.loading-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 40%, #0f4b2d, #051a0f 70%);
}
.loading-box { text-align: center; color: #a9bfae; font-size: 12px; letter-spacing: .12em; }
.loading-cat { margin: 0 auto 16px; width: 62px; height: 62px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(226, 202, 148, .4); background: rgba(200, 164, 92, .12); color: var(--gold-2); font-family: var(--serif); font-size: 28px; animation: breathe 1.5s ease-in-out infinite; }

/* ---------- 动画 ---------- */
@keyframes panel-in { from { opacity: 0; transform: translate(-50%, -46%) scale(.97); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes result-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 0 rgba(200, 164, 92, .08); } 50% { box-shadow: 0 0 0 14px rgba(200, 164, 92, 0); } }
@keyframes pulse-turn { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes bigcat-glow {
  0%, 100% { box-shadow: 0 0 0 3px rgba(240, 211, 143, .36), 0 0 20px rgba(224, 187, 114, .32), 0 8px 24px rgba(0, 0, 0, .3); }
  50% { box-shadow: 0 0 0 4px rgba(248, 223, 164, .55), 0 0 34px rgba(240, 197, 96, .5), 0 8px 24px rgba(0, 0, 0, .3); }
}
.is-turn .turn-readout .live-dot { animation: pulse-turn 1.4s ease-in-out infinite; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .home-main { grid-template-columns: minmax(0, 640px); gap: 0; }
  .hero-visual { min-height: 450px; }
  .hero-orbit { width: min(100%, 420px); }
  .seats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lobby-grid { grid-template-columns: 1fr; }
  .lobby-side { display: grid; grid-template-columns: 1fr 1fr; }
  .flow-steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .home-shell { padding: 0 18px; }
  .home-nav { height: 68px; }
  .brand-text b { font-size: 19px; }
  .home-main { grid-template-columns: 1fr; min-height: auto; padding: 34px 0 30px; gap: 28px; }
  .hero-copy { max-width: none; }
  .home-title { font-size: clamp(64px, 17vw, 100px); }
  .home-desc { max-width: none; }
  .hero-visual { min-height: 410px; order: 2; }
  .hero-orbit { width: min(88vw, 420px); }
  .home-entry { max-width: none; }
  .topbar { gap: 8px; padding: 7px 12px; }
  .topbar .brand-text small { display: none; }
  .topbar-center { gap: 5px; }
  .pill { font-size: 10px; padding: 4px 8px; }
  .lobby-shell { padding: 16px 14px 36px; }
  .lobby-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .room-ticket { min-width: 0; }
  .lobby-side { grid-template-columns: 1fr; }
  .table-ring { width: 96vw; height: 54vh; }
  .seat { width: 120px; }
  .seat.pos-1 { left: 8%; top: 31%; }
  .seat.pos-2 { left: 26%; top: 12%; }
  .seat.pos-3 { left: 74%; top: 12%; }
  .seat.pos-4 { left: 92%; top: 31%; }
  .avatar-wrap { width: 112px; height: 112px; }
  .avatar { font-size: 46px; }
  .table-center { top: 47%; width: min(72vw, 480px); }
  .role-strip { top: 30%; }
}

@media (max-width: 640px) {
  .home-title { font-size: clamp(60px, 19vw, 84px); }
  .home-tagline { font-size: 18px; letter-spacing: .08em; }
  .feature-chips { margin: 18px 0 22px; }
  .hero-visual { min-height: 360px; }
  .hero-orbit { width: min(82vw, 340px); }
  .orbit-core b { font-size: 30px; }
  .ghost-seat { width: 64px; font-size: 9px; padding: 6px 3px; }
  .ghost-seat .glyph { width: 28px; height: 28px; font-size: 13px; }
  .hero-fan .display-card { width: 49px; height: 71px; margin-left: -17px; }
  .entry-actions { grid-template-columns: 1fr; }
  .entry-name-row { flex-direction: column; align-items: stretch; }
  .seats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lobby-seat { min-height: 148px; }
  .game-screen { min-height: 560px; }
  .topbar .brand-text { display: none; }
  .topbar .brand-seal { width: 30px; height: 30px; font-size: 18px; }
  .topbar { min-height: 50px; padding: 5px 8px; gap: 5px; }
  .topbar-center { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .topbar-center::-webkit-scrollbar { display: none; }
  .topbar-right { gap: 4px; }
  .topbar-right .icon-btn { width: 30px; height: 30px; font-size: 17px; }
  .score-pill { display: none; }
  .pill { min-height: 26px; }
  .called-k-strip { min-height: 48px; padding: 5px 9px; gap: 7px; font-size: 13px; }
  .called-k-strip-cat { width: 28px; height: 28px; font-size: 16px; }
  .called-k-strip-title { display: none; }
  .called-k-strip-name { max-width: 70px; }
  .called-k-strip-label { font-size: 12px; }
  .called-k-strip-card { width: 30px; height: 39px; }
  .called-k-strip-card b { font-size: 18px; }
  .called-k-strip-card span { font-size: 13px; }
  .called-k-strip-suit { font-size: 15px; }
  .called-k-strip-divider { height: 20px; margin: 0 1px; }
  .oldk-strip { padding-right: 7px; font-size: 12px; }
  .oldk-strip-badge { width: 23px; height: 23px; font-size: 13px; }
  .pill.round-pill, .pill.host-pill { display: none; }
  .seat { width: 92px; }
  .seat.pos-1 { left: 11.5%; top: 50%; }
  .seat.pos-2 { left: 24%; top: 11%; }
  .seat.pos-3 { left: 76%; top: 11%; }
  .seat.pos-4 { left: 88.5%; top: 50%; }
  .avatar-wrap { width: 92px; height: 92px; }
  .avatar { font-size: 38px; }
  .count-badge { min-width: 20px; height: 19px; font-size: 9px; right: -3px; }
  .called-k-card { right: -18px; top: -9px; width: 30px; height: 39px; }
  .called-k-caption { top: -6px; font-size: 6px; }
  .called-k-rank { font-size: 16px; }
  .called-k-suit { font-size: 11px; }
  .called-k-inline { font-size: 12px; padding: 4px 9px; }
  .seat-name { font-size: 11px; max-width: 72px; }
  .seat-meta { font-size: 9px; }
  .role-badge { font-size: 11px; padding: 2px 7px; }
  .seat-count-line { margin-top: 3px; padding: 1px 7px; font-size: 10px; }
  .role-badge.unknown { display: none; }
  .seat-cards { display: none; }
  .seat-bubble { font-size: 9px; padding: 3px 7px; }
  .seat-bubble.play { font-size: 12px; padding: 5px 10px; }
  .table-ring { height: 46vh; top: 44%; }
  .table-mark { font-size: 90px; }
  .table-center { top: 50%; width: 64vw; gap: 5px; }
  .turn-readout { font-size: 9px; padding: 3px 8px; }
  .last-play-label { font-size: 10px; padding: 3px 8px; }
  .center-play-summary { padding: 6px 16px 7px; }
  .center-play-name { font-size: 8px; }
  .center-play-combo { font-size: 23px; }
  .seat-play { padding: 6px 8px; border-radius: 7px; }
  .seat-play .card { width: 58px; height: 82px; margin-left: -10px; border-radius: 5px; }
  .seat-play .card .corner-rank { font-size: 21px; }
  .seat-play .card .corner-suit { font-size: 12px; }
  .seat-play .card .center-suit { font-size: 26px; }
  .seat-play .card .bottom-rank { font-size: 12px; }
  .seat-play .card .trump-pin { display: none; }
  .seat.pos-1 .seat-play { left: calc(50% + 34px); top: 12%; }
  .seat.pos-4 .seat-play { right: calc(50% + 34px); top: 12%; }
  .seat.pos-2 .seat-play { top: calc(100% + 5px); transform: translateX(-38%); }
  .seat.pos-3 .seat-play { top: calc(100% + 5px); transform: translateX(-62%); }
  .self-play { left: 8px; gap: 5px; padding: 5px 7px; }
  .self-play-label { font-size: 8px; }
  .self-play .card { width: 44px; height: 64px; margin-left: -6px; border-radius: 5px; }
  .self-play .card .corner-rank { font-size: 15px; }
  .self-play .card .corner-suit { font-size: 9px; }
  .self-play .card .center-suit { font-size: 20px; }
  .self-play .card .bottom-rank { font-size: 10px; }
  .self-play .card .trump-pin { display: none; }
  .played-cards { min-height: 73px; padding: 2px 4px; }
  .played-cards .card { width: 48px; height: 69px; margin-left: -8px; border-radius: 5px; }
  .played-cards .card .corner-rank { font-size: 15px; }
  .played-cards .card .corner-suit { font-size: 9px; }
  .played-cards .card .center-suit { font-size: 20px; }
  .played-cards .card .trump-pin { display: none; }
  .table-status { font-size: 9px; }
  .role-strip { top: 29%; width: 94vw; gap: 4px; }
  .role-note { font-size: 8px; padding: 3px 7px; }
  .hand-dock { padding: 5px 7px max(46px, env(safe-area-inset-bottom)); }
  .dock-toolbar { min-height: 27px; margin-bottom: 1px; }
  .self-avatar { width: 50px; height: 50px; font-size: 24px; }
  .self-name { font-size: 10px; max-width: 78px; }
  .self-score { font-size: 9px; }
  .selection-chip { font-size: 9px; }
  .mini-tool { font-size: 9px; padding: 4px 5px; }
  .hand { --card-w: 64px; --card-h: 92px; --hand-step: 29px; height: 92px; }
  .hand-countdown { top: auto; right: 0; bottom: 104px; padding: 5px 8px 4px; gap: 3px; }
  .hand-countdown b { font-size: 30px; }
  .hand .card.selected { transform: translateY(-16px); }
  .hand .card:hover { transform: none; }
  .hand .card.selected:hover { transform: translateY(-16px); }
  .card .corner { left: 4px; top: 3px; }
  .card .corner-rank { font-size: 21px; }
  .card .corner-suit { font-size: 12px; }
  .card .center-suit { font-size: 30px; padding-top: 6px; }
  .card .bottom-rank { font-size: 13px; right: 3px; bottom: 3px; }
  .card .trump-pin { font-size: 6px; padding: 0 2px; top: 3px; right: 3px; }
  .card.joker .corner-rank { font-size: 14px; }
  .partner-pin { left: 3px; bottom: 3px; padding: 0 2px; font-size: 6px; }
  .action-row { gap: 6px; min-height: 44px; margin-top: 4px; }
  .hand-dock .action-row { margin-bottom: 18px; }
  .action-row .btn { min-height: 40px; min-width: 70px; padding: 8px 14px; font-size: 13px; }
  .action-row .btn-play { min-width: 92px; }
  body.in-game .toast-root { bottom: 215px; }
  .decision-panel { top: 45%; padding: 17px 14px; width: min(94vw, 430px); }
  .decision-actions .btn { min-width: 96px; min-height: 40px; padding: 8px 15px; font-size: 13px; }
  .k-choice { min-height: 86px; }
  .k-choice .k-suit { font-size: 21px; }
  .k-choice .k-rank { font-size: 21px; }
  .waiting-call { font-size: 10px; padding: 8px 12px; }
  .result-card { max-height: 94dvh; }
  .result-head { padding: 19px 18px 16px; }
  .result-body { padding: 14px 15px 18px; }
  .result-actions .btn { min-height: 42px; padding: 8px 18px; font-size: 13px; }
  .score-line { grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; padding: 8px; }
  .score-delta { font-size: 16px; min-width: 42px; }
  .score-total { min-width: 52px; }
  .remaining-line { grid-template-columns: 80px minmax(0, 1fr); gap: 6px; padding: 6px; }
  .remaining-who strong { font-size: 11px; }
  .remaining-card { min-width: 24px; padding: 2px 4px; font-size: 11px; }
  .chat-drawer { top: auto; width: 100%; height: 74dvh; transform: translateY(102%); border-left: 0; border-top: 1px solid rgba(226, 202, 148, .25); border-radius: 14px 14px 0 0; }
  .chat-drawer.open { transform: translateY(0); }
  .rules-grid { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  .home-title { font-size: 60px; }
  .seat { width: 96px; }
  .seat.pos-1 { left: 12.5%; }
  .seat.pos-4 { left: 87.5%; }
  .table-center { width: 66vw; }
  .self-name { max-width: 58px; }
  .dock-tools .mini-tool:first-child { display: none; }
  .action-row .btn { min-width: 62px; padding: 7px 10px; }
}

@media (max-width: 370px) {
  .hand { --card-w: 60px; --card-h: 86px; --hand-step: 27px; height: 86px; }
  .hand-countdown { bottom: 98px; }
}

@media (max-width: 340px) {
  .hand { --card-w: 50px; --card-h: 72px; --hand-step: 22px; height: 72px; }
  .hand-countdown { bottom: 84px; }
  .self-play .card { width: 34px; height: 49px; }
}

.game-screen .seat-name { font-size: 15px; }
.game-screen .role-badge { font-size: 13px; padding: 3px 11px; }
.game-screen .seat-count-line { font-size: 14px; }
.game-screen .seat-meta { font-size: 11px; }
.game-screen .seat-bubble.pass,
.game-screen .seat-bubble.finish { font-size: 12px; }
.game-screen .turn-readout { font-size: 14px; }
.game-screen .table-status { font-size: 12px; }
.game-screen .center-play-name { font-size: 12px; }
.game-screen .self-name { font-size: 14px; }
.game-screen .self-score { font-size: 11px; }
.game-screen .selection-chip { font-size: 12px; }
.game-screen .action-row .btn { font-size: 15px; }
.game-screen .action-turn-note { font-size: 13px; }
.game-screen .mini-tool { font-size: 11px; }

@media (max-width: 640px) {
  .game-screen .seat-name { font-size: 12px; }
  .game-screen .role-badge { font-size: 12px; padding: 2px 8px; }
  .game-screen .seat-count-line { font-size: 12px; }
  .game-screen .seat-meta { font-size: 10px; }
  .game-screen .seat-bubble.pass,
  .game-screen .seat-bubble.finish { font-size: 11px; }
  .game-screen .turn-readout { font-size: 12px; }
  .game-screen .table-status { font-size: 10px; }
  .game-screen .center-play-name { font-size: 10px; }
  .game-screen .self-name { font-size: 11px; }
  .game-screen .self-score { font-size: 10px; }
  .game-screen .selection-chip { font-size: 10px; }
  .game-screen .action-row .btn { font-size: 14px; }
  .game-screen .action-turn-note { font-size: 11px; }
  .seat-chat { max-width: 160px; padding: 6px 8px; bottom: 5px; font-size: 12px; }
  .self-chat { max-width: 220px; padding: 6px 9px; font-size: 12px; }
}

/* 大猫 / 老K 身份强化 */
.avatar.bigcat {
  border-width: 2px;
  animation: bigcat-flash .95s ease-in-out infinite;
}
.avatar.bigcat .avatar-crown { top: -3px; font-size: 34px; }
.avatar.bigcat::before,
.avatar.bigcat::after {
  top: -5px;
  border-left-width: 18px;
  border-right-width: 18px;
  border-bottom-width: 26px;
}
.avatar.bigcat::before { left: 10px; }
.avatar.bigcat::after { right: 10px; }
.seat.has-bigcat .role-badge.bigcat,
.self-cluster .role-badge.bigcat {
  padding: 4px 14px;
  border-width: 2px;
  border-color: rgba(255, 225, 153, .8);
  background: linear-gradient(135deg, #f5d792, #c99b48);
  color: #2b1e08;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .08em;
  box-shadow: 0 0 16px rgba(240, 197, 96, .38);
}
.self-avatar.bigcat {
  border-width: 2px;
  animation: self-bigcat-flash .95s ease-in-out infinite;
}
.self-avatar.bigcat .avatar-crown { top: -28px; font-size: 30px; }

.avatar.oldk {
  border-width: 2px;
  border-color: #9ce9dd;
  animation: oldk-flash .95s ease-in-out infinite;
}
.oldk-k-mark {
  left: -12px;
  top: -12px;
  width: 42px;
  height: 42px;
  border-width: 2px;
  border-color: #ccfff8;
  background: radial-gradient(circle at 32% 28%, #5fc7b8, #1b625a 70%);
  color: #ffffff;
  font-size: 22px;
  box-shadow: 0 0 0 3px rgba(91, 202, 184, .3), 0 0 20px rgba(94, 225, 205, .55), 0 4px 12px rgba(0, 0, 0, .38);
}
.self-avatar .oldk-k-mark {
  left: -9px;
  top: -9px;
  width: 30px;
  height: 30px;
  font-size: 14px;
}
.seat.has-oldk .role-badge.oldk,
.self-cluster .role-badge.oldk {
  padding: 4px 13px;
  border-width: 2px;
  border-color: rgba(156, 233, 221, .8);
  background: linear-gradient(135deg, #3b9a8e, #1b5d56);
  color: #f1fffc;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .06em;
  box-shadow: 0 0 16px rgba(91, 202, 184, .4);
}
.self-avatar.oldk.revealed { animation: oldk-flash .95s ease-in-out infinite; }

.avatar.exploder {
  border-width: 2px;
  border-color: #ff6f61;
  animation: exploder-flash .95s ease-in-out infinite;
}
.self-avatar.exploder {
  border-width: 2px;
  border-color: #ff6f61;
  animation: self-exploder-flash .95s ease-in-out infinite;
}

@keyframes exploder-flash {
  0%, 100% {
    opacity: 1;
    border-color: #c94539;
    box-shadow: 0 0 0 3px rgba(201, 69, 57, .42), 0 0 22px rgba(255, 91, 73, .45), 0 8px 24px rgba(0, 0, 0, .3);
    filter: brightness(1);
  }
  50% {
    opacity: .8;
    border-color: #ff7163;
    box-shadow: 0 0 0 8px rgba(255, 104, 86, .9), 0 0 52px rgba(255, 70, 52, .95), 0 8px 24px rgba(0, 0, 0, .3);
    filter: brightness(1.28) saturate(1.2);
  }
}
@keyframes self-exploder-flash {
  0%, 100% {
    opacity: 1;
    border-color: #c94539;
    box-shadow: 0 0 0 3px rgba(201, 69, 57, .45), 0 0 18px rgba(255, 91, 73, .45);
    filter: brightness(1);
  }
  50% {
    opacity: .78;
    border-color: #ff7163;
    box-shadow: 0 0 0 6px rgba(255, 104, 86, .88), 0 0 34px rgba(255, 70, 52, .9);
    filter: brightness(1.3) saturate(1.2);
  }
}

@keyframes bigcat-flash {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(240, 211, 143, .45), 0 0 22px rgba(224, 187, 114, .45), 0 8px 24px rgba(0, 0, 0, .3);
    filter: brightness(1);
  }
  50% {
    opacity: .78;
    box-shadow: 0 0 0 8px rgba(255, 236, 174, .95), 0 0 54px rgba(255, 211, 107, .95), 0 8px 24px rgba(0, 0, 0, .3);
    filter: brightness(1.28) saturate(1.15);
  }
}
@keyframes self-bigcat-flash {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(240, 211, 143, .45), 0 0 18px rgba(224, 187, 114, .42);
    filter: brightness(1);
  }
  50% {
    opacity: .76;
    box-shadow: 0 0 0 6px rgba(255, 236, 174, .9), 0 0 36px rgba(255, 211, 107, .9);
    filter: brightness(1.3) saturate(1.15);
  }
}
@keyframes oldk-flash {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(91, 202, 184, .32), 0 0 22px rgba(94, 225, 205, .4), 0 8px 24px rgba(0, 0, 0, .28);
    filter: brightness(1);
  }
  50% {
    opacity: .78;
    box-shadow: 0 0 0 8px rgba(180, 255, 243, .9), 0 0 50px rgba(94, 225, 205, .95), 0 8px 24px rgba(0, 0, 0, .28);
    filter: brightness(1.28) saturate(1.15);
  }
}

@media (max-width: 640px) {
  .avatar.bigcat .avatar-crown { font-size: 26px; }
  .avatar.bigcat::before,
  .avatar.bigcat::after {
    border-left-width: 14px;
    border-right-width: 14px;
    border-bottom-width: 21px;
  }
  .avatar.bigcat::before { left: 8px; }
  .avatar.bigcat::after { right: 8px; }
  .seat.has-bigcat .role-badge.bigcat,
  .self-cluster .role-badge.bigcat { padding: 3px 11px; font-size: 14px; }
  .oldk-k-mark { left: -9px; top: -9px; width: 34px; height: 34px; font-size: 18px; }
  .seat.has-oldk .role-badge.oldk,
  .self-cluster .role-badge.oldk { padding: 3px 10px; font-size: 13px; }
  .self-avatar .oldk-k-mark { width: 26px; height: 26px; font-size: 12px; }
  .self-avatar.bigcat .avatar-crown { font-size: 26px; }
}

@media (orientation: landscape) and (max-height: 520px) {
  .game-screen {
    height: 100dvh;
    min-height: 0;
  }
  .game-body { min-height: 0; }
  .decision-panel {
    top: 50%;
    width: min(92vw, 640px);
    max-height: calc(100% - 10px);
    padding: 12px 18px;
    overflow-y: auto;
  }
  .decision-title { margin: 2px 0 3px; font-size: 24px; }
  .decision-text { font-size: 11px; line-height: 1.5; }
  .decision-taunt { margin: 4px 0 1px; font-size: clamp(24px, 4vw, 34px); }
  .decision-countdown { margin: 4px 0 2px; font-size: 26px; }
  .decision-foot { font-size: 9px; }
  .decision-actions { margin-top: 6px; gap: 8px; }
  .decision-actions .btn { min-height: 38px; padding: 7px 18px; font-size: 13px; }
}

@media (orientation: landscape) and (max-height: 520px) {
  .game-screen { height: 100dvh; min-height: 0; }
  .topbar { min-height: 44px; padding: 4px 10px; gap: 8px; }
  .brand-seal { width: 30px; height: 30px; border-radius: 8px; font-size: 17px; }
  .brand-name { font-size: 17px; }
  .brand-sub { display: none; }
  .topbar .pill { font-size: 9px; padding: 3px 7px; }
  .topbar-right .icon-btn { width: 34px; height: 34px; font-size: 16px; }
  .called-k-strip { min-height: 42px; padding: 4px 12px; gap: 8px; }
  .called-k-strip-title, .called-k-strip-label { font-size: 11px; }
  .called-k-strip-name { max-width: 110px; font-size: 12px; }
  .called-k-strip-card { width: 30px; height: 38px; }
  .called-k-strip-card b { font-size: 17px; }
  .called-k-strip-card span { font-size: 11px; }
  .oldk-strip { font-size: 10px; padding: 3px 8px 3px 3px; }

  .game-body { min-height: 0; }
  .seat { width: 92px; }
  .seat.pos-1 { top: 62px; left: 12%; }
  .seat.pos-2 { top: 62px; left: 37%; }
  .seat.pos-3 { top: 62px; left: 63%; }
  .seat.pos-4 { top: 62px; left: 88%; }
  .seat-play, .self-play { display: none !important; }
  .avatar-wrap { width: 60px; height: 60px; }
  .avatar { font-size: 23px; }
  .avatar.bigcat .avatar-crown { top: -1px; font-size: 21px; }
  .avatar.bigcat::before, .avatar.bigcat::after {
    top: -3px; border-left-width: 9px; border-right-width: 9px; border-bottom-width: 14px;
  }
  .avatar.bigcat::before { left: 5px; }
  .avatar.bigcat::after { right: 5px; }
  .oldk-k-mark { width: 26px; height: 26px; left: -7px; top: -7px; font-size: 13px; border-width: 1px; }
  .seat-name-line { margin-top: 3px; gap: 3px; }
  .seat-name { font-size: 11px; }
  .seat .role-badge { padding: 1px 6px; font-size: 9px; border-width: 1px; }
  .seat.has-bigcat .role-badge.bigcat, .seat.has-oldk .role-badge.oldk { padding: 2px 7px; font-size: 10px; }
  .seat-count-line { margin-top: 2px; padding: 1px 5px; font-size: 9px; }
  .seat-meta { display: none; }
  .seat-bubble.thinking, .seat-bubble.pass { font-size: 18px; padding: 5px 10px; min-width: 68px; border-radius: 12px; }
  .seat-bubble.thinking::after, .seat-bubble.pass::after { border-width: 6px; }
  .seat.pos-2 .seat-bubble.thinking, .seat.pos-2 .seat-bubble.pass,
  .seat.pos-3 .seat-bubble.thinking, .seat.pos-3 .seat-bubble.pass { top: 64px; bottom: auto; }

  .table-center { width: 48vw; top: 42%; }
  .turn-readout { font-size: 10px; padding: 4px 9px; }
  .center-play-combo { font-size: 24px; }
  .center-play-name { font-size: 9px; }
  .table-status { font-size: 9px; }

  .hand-dock { padding: 3px 8px max(8px, env(safe-area-inset-bottom)); }
  .dock-toolbar { min-height: 22px; margin-bottom: 0; }
  .self-avatar { width: 38px; height: 38px; font-size: 16px; }
  .self-name { font-size: 10px; }
  .self-score { font-size: 9px; }
  .self-avatar.bigcat .avatar-crown { top: -17px; font-size: 17px; }
  .selection-chip { font-size: 9px; }
  .mini-tool { display: none; }
  .hand-dock .action-row { margin: 0 0 5px; }
  .action-row .btn { min-width: 64px; min-height: 31px; padding: 5px 12px; font-size: 12px; }
  .action-row .btn-play { min-width: 84px; }
  .hand { --card-w: 72px; --card-h: 104px; --hand-step: 29px; height: 104px; }
  .hand-countdown { top: auto; right: 0; bottom: 116px; padding: 4px 8px 3px; }
  .hand-countdown b { font-size: 24px; }
  .hand-countdown .countdown-label { font-size: 8px; }
  .hand-countdown .countdown-unit { font-size: 10px; }

  .decision-panel {
    top: 0; transform: translateX(-50%); width: min(92vw, 620px);
    max-height: calc(100% - 112px); padding: 10px 16px; overflow-y: auto;
  }
  .decision-title { margin: 1px 0 2px; font-size: 23px; }
  .decision-text { font-size: 10px; line-height: 1.45; }
  .decision-taunt { margin: 3px 0 0; font-size: clamp(23px, 4vw, 32px); }
  .decision-countdown { margin: 3px 0 1px; font-size: 22px; }
  .decision-foot { font-size: 8px; }
  .decision-actions { margin-top: 4px; gap: 8px; }
  .decision-actions .btn { min-height: 34px; padding: 6px 15px; font-size: 12px; }
}

@media (max-height: 700px) {
  .home-nav { height: 58px; }
  .brand-seal { width: 34px; height: 34px; font-size: 19px; }
  .brand-text b { font-size: 19px; }
  .brand-text small { margin-top: 3px; font-size: 8px; }
  .home-main {
    min-height: calc(100dvh - 100px);
    padding: 8px 0 12px;
  }
  .home-title {
    margin: 6px 0 2px;
    font-size: clamp(44px, 11vh, 86px);
  }
  .home-entry {
    max-width: 480px;
    margin-top: 12px;
  }
  .entry-help { display: none; }
  .home-credit { margin: 2px 0 10px; font-size: 11px; }
  .home-music-btn { padding: 6px 10px; font-size: 10px; }
}

@media (max-height: 700px) {
  .lobby-shell { padding: 8px 16px 14px; }
  .lobby-head { align-items: center; gap: 12px; }
  .lobby-kicker { font-size: 9px; }
  .lobby-title { margin-top: 2px; font-size: 30px; }
  .lobby-sub { margin-top: 2px; font-size: 10px; }
  .room-ticket { min-width: 190px; padding: 8px 12px; }
  .room-ticket small { font-size: 8px; }
  .room-ticket strong { margin: 2px 0 5px; font-size: 24px; }
  .room-ticket .quick-row { gap: 5px; }
  .room-ticket .btn { min-height: 26px; padding: 3px 8px; font-size: 10px; }
  .lobby-grid { gap: 10px; }
  .lobby-table-panel { padding: 12px; }
  .panel-head { margin-bottom: 8px; }
  .panel-title { font-size: 17px; }
  .panel-note { font-size: 10px; }
  .seats-grid { gap: 6px; }
  .lobby-seat { min-height: 122px; padding: 8px 6px 7px; }
  .lobby-seat .mini-avatar { width: 68px; height: 68px; margin-bottom: 6px; font-size: 16px; }
  .lobby-seat.empty .mini-avatar { font-size: 22px; }
  .lobby-seat .seat-name { font-size: 12px; }
  .lobby-seat .seat-meta { margin-top: 2px; font-size: 9px; }
  .lobby-seat .seat-badge-line { margin-top: 4px; }
  .lobby-seat .remove-bot { margin-top: 4px; font-size: 9px; }
  .lobby-seat .add-seat-btn { margin-top: 3px; font-size: 10px; }
  .lobby-actions { margin-top: 8px; gap: 8px; }
  .lobby-actions .hint-line { font-size: 10px; }
  .lobby-actions .btn { min-height: 32px; padding: 5px 10px; font-size: 11px; }
  .lobby-side { gap: 8px; }
  .side-card { padding: 11px 12px; }
  .side-card h3 { margin-bottom: 4px; font-size: 14px; }
  .side-card p { font-size: 10px; line-height: 1.45; }
  .side-card .kv { padding: 4px 0; font-size: 10px; }
  .lobby-flow { display: none; }
  .invite-links { margin-top: 5px; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  /* 大猫/老K的身份闪烁是牌局提示，不随系统减少动态效果关闭。 */
  .avatar.bigcat { animation: bigcat-flash .95s ease-in-out infinite !important; }
  .self-avatar.bigcat { animation: self-bigcat-flash .95s ease-in-out infinite !important; }
  .avatar.oldk { animation: oldk-flash .95s ease-in-out infinite !important; }
  .self-avatar.oldk.revealed { animation: oldk-flash .95s ease-in-out infinite !important; }
  .avatar.exploder { animation: exploder-flash .95s ease-in-out infinite !important; }
  .self-avatar.exploder { animation: self-exploder-flash .95s ease-in-out infinite !important; }
  /* 聊天气泡靠动画控制显隐；减少动态效果时直接常亮，否则会瞬间停在透明帧。 */
  .seat-chat, .self-chat { animation: none !important; opacity: 1 !important; }
  .seat-chat { transform: translateX(-50%); }
}

/* 思考中 / 不出：头像上方大字状态 */
.game-screen .seat-bubble.thinking,
.game-screen .seat-bubble.pass {
  z-index: 16;
  min-width: 108px;
  padding: 11px 22px;
  border: 2px solid rgba(226, 202, 148, .55);
  border-radius: 20px;
  font-size: 33px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: .04em;
  white-space: nowrap;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .42);
}
.game-screen .seat-bubble.pass {
  border-color: rgba(226, 202, 148, .4);
  background: #e3d8c0;
}
.game-screen .seat-bubble.thinking::after,
.game-screen .seat-bubble.pass::after {
  border-width: 10px;
}
.game-screen .seat.pos-1 .seat-bubble.thinking,
.game-screen .seat.pos-1 .seat-bubble.pass {
  left: 0;
  transform: none;
}
.game-screen .seat.pos-4 .seat-bubble.thinking,
.game-screen .seat.pos-4 .seat-bubble.pass {
  left: auto;
  right: 0;
  transform: none;
}
.game-screen .seat.pos-2,
.game-screen .seat.pos-3 {
  top: 21%;
  z-index: 25;
}
@media (max-width: 820px) {
  .game-screen .seat.pos-2,
  .game-screen .seat.pos-3 { top: 20%; }
}
@media (max-width: 640px) {
  .game-screen .seat.pos-2,
  .game-screen .seat.pos-3 { top: 20%; }
}
