:root {
  --bg: #080f0c;
  --bg-soft: #0d1713;
  --panel: #101b16;
  --panel-2: #14221b;
  --line: rgba(232, 214, 174, 0.12);
  --line-strong: rgba(232, 214, 174, 0.24);
  --ivory: #f1e8d6;
  --ivory-dim: #c3b9a6;
  --muted: #82978b;
  --muted-2: #5f7468;
  --gold: #d7b26b;
  --gold-bright: #f2d79b;
  --gold-dim: #8f7546;
  --red: #d76d63;
  --red-deep: #8f2f2b;
  --green: #3d8b6a;
  --felt: #124a37;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Songti SC", "Noto Serif CJK SC", serif;
  --sans: "Avenir Next", "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  background:
    radial-gradient(1100px 720px at 12% -12%, #1a4030 0%, transparent 56%),
    radial-gradient(900px 600px at 108% 108%, #1b3328 0%, transparent 52%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.85'/%3E%3C/svg%3E");
}

#app { position: relative; z-index: 1; }
.hidden { display: none !important; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(215, 178, 107, 0.35); color: #fff; }

.eyebrow {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(215, 178, 107, 0.55);
  color: var(--gold-bright);
  font-size: 21px;
  line-height: 1;
  background: radial-gradient(circle at 35% 25%, rgba(215, 178, 107, 0.18), rgba(0, 0, 0, 0.15));
  box-shadow: inset 0 0 14px rgba(215, 178, 107, 0.12);
}
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-text strong {
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.2em;
  font-weight: 600;
}
.brand-text small {
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.brand.small .brand-mark { width: 34px; height: 34px; font-size: 17px; }
.brand.small .brand-text strong { font-size: 13px; }

/* ---------- 按钮与表单 ---------- */

.primary-btn {
  appearance: none;
  border: 1px solid rgba(255, 234, 190, 0.55);
  border-radius: 10px;
  padding: 12px 18px;
  color: #171208;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #f1d69d 0%, #d7b26b 52%, #bf9850 100%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}
.primary-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.primary-btn:active { transform: translateY(0); filter: brightness(0.97); }
.primary-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.primary-btn.wide { width: 100%; }
.ghost-btn {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--ivory-dim);
  font-size: 12px;
  letter-spacing: 0.04em;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}
.ghost-btn:hover { border-color: var(--line-strong); color: var(--ivory); background: rgba(255, 255, 255, 0.04); }
.ghost-btn.danger:hover { border-color: rgba(215, 109, 99, 0.5); color: #efb0a9; }
.icon-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--ivory-dim);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
}
.icon-btn:hover { color: var(--ivory); border-color: var(--line-strong); }

.field { display: flex; flex-direction: column; gap: 7px; font-size: 11px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }
.field input, .field select {
  width: 100%;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0a1410;
  color: var(--ivory);
  padding: 12px 13px;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
.field input::placeholder { color: #54685d; }
.field input:focus, .field select:focus {
  border-color: rgba(215, 178, 107, 0.6);
  box-shadow: 0 0 0 3px rgba(215, 178, 107, 0.09);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 11px; line-height: 1.7; color: var(--muted-2); }
.muted { color: var(--muted); }

/* ---------- 大厅 ---------- */

.lobby {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 clamp(20px, 6vw, 84px);
  position: relative;
  overflow: hidden;
}
.lobby::after {
  content: "♠";
  position: absolute;
  right: -4vw;
  top: 50%;
  transform: translateY(-50%);
  font-size: 58vw;
  line-height: 1;
  color: rgba(215, 178, 107, 0.025);
  pointer-events: none;
  font-family: var(--serif);
}
.lobby-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0;
  position: relative;
  z-index: 2;
}
.lobby-grid {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.82fr);
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
  padding: 3vh 0 5vh;
}
.hero-copy { position: relative; z-index: 2; max-width: 620px; }
.hero-copy .eyebrow { margin-bottom: 22px; }
.hero-copy h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(52px, 7vw, 100px);
  line-height: 0.93;
  letter-spacing: -0.035em;
  margin-bottom: 26px;
}
.hero-copy h1 em { font-style: italic; color: var(--gold-bright); }
.lede {
  max-width: 44ch;
  color: var(--ivory-dim);
  font-size: 14px;
  line-height: 1.9;
  margin-bottom: 30px;
}
.hero-art {
  position: relative;
  height: 150px;
  margin: 4px 0 22px;
}
.hero-card {
  position: absolute;
  width: 84px;
  height: 118px;
  border-radius: 8px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #18231c;
  background: linear-gradient(155deg, #fffdf6, #e8decb);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.38), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  font-family: var(--sans);
  font-weight: 700;
  animation: floatCard 7s ease-in-out infinite;
}
.hero-card span { font-size: 20px; line-height: 1; }
.hero-card b { font-size: 30px; line-height: 1; align-self: flex-end; font-weight: 400; }
.hero-card.red { color: #b23b36; }
.hero-card.c1 { left: 0; top: 16px; transform: rotate(-9deg); }
.hero-card.c2 { left: 70px; top: 2px; transform: rotate(1deg); animation-delay: -2s; }
.hero-card.c3 { left: 142px; top: 22px; transform: rotate(9deg); animation-delay: -4s; }
.chip-stack { position: absolute; left: 250px; bottom: 0; width: 76px; height: 86px; }
.chip-stack i {
  position: absolute;
  left: 0;
  width: 64px;
  height: 21px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, #b94b44 0 18deg, #e8d8b4 18deg 36deg);
  border: 2px solid #7e2f2b;
  box-shadow: 0 5px 9px rgba(0, 0, 0, 0.35);
}
.chip-stack i:nth-child(1) { bottom: 0; }
.chip-stack i:nth-child(2) { bottom: 15px; }
.chip-stack i:nth-child(3) { bottom: 30px; }
.chip-stack i:nth-child(4) { bottom: 45px; background: repeating-conic-gradient(from 0deg, #1e6b52 0 18deg, #e8d8b4 18deg 36deg); border-color: #144a39; }
.chip-stack i:nth-child(5) { bottom: 60px; background: repeating-conic-gradient(from 0deg, #2a2c2a 0 18deg, #d7b26b 18deg 36deg); border-color: #191b19; }
.hero-facts {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero-facts i { width: 3px; height: 3px; border-radius: 50%; background: var(--gold-dim); }

.lobby-card {
  position: relative;
  z-index: 2;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px;
  background: linear-gradient(155deg, rgba(20, 35, 28, 0.96), rgba(8, 16, 12, 0.98));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
}
.lobby-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(215, 178, 107, 0.09), transparent 32%);
}
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; position: relative; }
.tab {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  padding: 10px 14px 13px;
  font-size: 12px;
  letter-spacing: 0.08em;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.tab:hover { color: var(--ivory-dim); }
.tab.active { color: var(--ivory); border-color: var(--gold); }
.pane { display: none; flex-direction: column; gap: 15px; }
.pane.active { display: flex; }
.lobby-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0 26px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.1em;
}

/* ---------- 游戏框架 ---------- */

.game {
  height: 100dvh;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.topbar {
  flex: 0 0 auto;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 15, 12, 0.78);
  backdrop-filter: blur(16px);
  position: relative;
  z-index: 30;
}
.room-info { display: flex; align-items: center; gap: 12px; margin-left: 8px; min-width: 0; }
.code-chip {
  appearance: none;
  border: 1px solid rgba(215, 178, 107, 0.32);
  background: rgba(215, 178, 107, 0.07);
  color: var(--gold-bright);
  border-radius: 8px;
  padding: 7px 11px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
}
.code-chip:hover { background: rgba(215, 178, 107, 0.12); }
.room-meta { font-size: 10px; color: var(--muted); letter-spacing: 0.08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(61, 139, 106, 0.14), 0 0 10px rgba(61, 139, 106, 0.7);
  flex: 0 0 auto;
}
.conn-dot.offline { background: var(--red); box-shadow: 0 0 0 3px rgba(215, 109, 99, 0.14); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.room {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 16px 20px 20px;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 330px;
  gap: 16px;
}
.table-column { min-height: 0; display: flex; flex-direction: column; gap: 12px; }

/* ---------- 牌桌两侧规则 ---------- */

.rank-rail {
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(16, 28, 22, 0.82), rgba(7, 14, 11, 0.9));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  overflow: hidden;
}
.rank-rail-head {
  flex: 0 0 auto;
  padding: 15px 16px 12px;
  border-bottom: 1px solid var(--line);
}
.rank-rail-head .eyebrow { margin-bottom: 6px; font-size: 8px; }
.rank-rail-head h2 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.rank-rail-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.12em;
}
.rank-rail-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 14px 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(215, 178, 107, 0.25) transparent;
}
.rank-rail-body::-webkit-scrollbar { width: 5px; }
.rank-rail-body::-webkit-scrollbar-thumb { background: rgba(215, 178, 107, 0.2); border-radius: 5px; }
.rank-rail .rank-section { min-width: 0; }
.rank-rail .rank-section > h3 { display: none; }
.rank-rail .rank-row {
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  padding: 3px 0;
}
.rank-rail .rank-name { font-size: 11.5px; gap: 6px; }
.rank-rail .rank-name b { width: 18px; font-size: 8px; }
.rank-rail .rank-cards { justify-self: start; gap: 3px; }
.rank-rail .rank-cards .c {
  width: 26px;
  height: 30px;
  border-radius: 4px;
  flex-direction: column;
  gap: 1px;
  font-size: 9px;
  line-height: 1;
  padding: 2px;
}
.rank-rail .c-rank,
.rank-rail .c-suit { display: block; line-height: 1; }
.rank-rail .c-rank { font-size: 9px; }
.rank-rail .c-suit { font-size: 10px; }
.rank-rail .rank-row p { display: none; }

.rules-pane {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 14px 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(215, 178, 107, 0.25) transparent;
}
.rules-pane::-webkit-scrollbar { width: 5px; }
.rules-pane::-webkit-scrollbar-thumb { background: rgba(215, 178, 107, 0.2); border-radius: 5px; }
.rules-pane .rules-rail-body { overflow: visible; padding: 10px 0 0; }
.rules-pane .rules-other { gap: 18px; }
.rules-pane .rules-other > section { padding-top: 16px; }
.rules-pane .rules-intro p,
.rules-pane .rules-body p,
.rules-pane .rules-other p { font-size: 11.5px; line-height: 1.75; }
.rules-pane .rules-other h3 { margin-bottom: 9px; font-size: 16px; }
.rules-pane .steps { gap: 8px; }
.rules-pane .steps li { font-size: 11px; }
.rules-pane .steps li span { font-size: 11px; line-height: 1.7; }
.rules-pane .action-list { gap: 0; }
.rules-pane .action-list div { grid-template-columns: 62px minmax(0, 1fr); gap: 8px; padding: 7px 0; }
.rules-pane .action-list dt { font-size: 10.5px; }
.rules-pane .action-list dd { font-size: 11px; line-height: 1.65; }
.rules-pane .house-grid { grid-template-columns: 1fr; gap: 9px; }
.rules-pane .house-grid div { padding: 8px 9px; }
.rules-pane .house-grid b { font-size: 10.5px; }
.rules-pane .house-grid span { font-size: 10.5px; line-height: 1.6; }
.table-stage { position: relative; flex: 1; min-height: 380px; }

/* ---------- 牌桌 ---------- */

.felt {
  position: absolute;
  inset: 11% 7.5%;
  border-radius: 50% / 50%;
  background:
    radial-gradient(ellipse at 50% 38%, #1d5e46 0%, #124a37 46%, #0a2d22 100%);
  border: 2px solid rgba(235, 210, 158, 0.24);
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.35),
    inset 0 0 90px rgba(0, 0, 0, 0.5),
    0 0 0 9px #2a1c11,
    0 0 0 10px rgba(215, 178, 107, 0.28),
    0 0 0 22px #140e09,
    0 32px 64px rgba(0, 0, 0, 0.5);
  isolation: isolate;
}
.felt::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.5;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 4px 4px;
  mix-blend-mode: overlay;
}
.felt-ring {
  position: absolute;
  inset: 9%;
  border: 1px solid rgba(235, 210, 158, 0.09);
  border-radius: 50%;
  pointer-events: none;
}
.table-brand {
  position: absolute;
  top: 15.5%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.52em;
  color: rgba(240, 215, 160, 0.18);
  white-space: nowrap;
  pointer-events: none;
}
.center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  pointer-events: none;
  padding: 0 12%;
}
.pot-line { display: flex; align-items: baseline; gap: 9px; }
.pot-line span { font-size: 9px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold-dim); }
.pot-line strong {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
.board { display: flex; gap: 8px; align-items: center; justify-content: center; min-height: 90px; }
.board .card { width: 62px; height: 88px; }
.stage-line {
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(220, 208, 185, 0.5);
  min-height: 12px;
  text-align: center;
}
.result-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 10px;
  padding: 8px 12px;
  border: 1px solid rgba(215, 178, 107, 0.35);
  border-radius: 10px;
  background: rgba(215, 178, 107, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  text-align: left;
  animation: fadeIn 0.25s ease both;
}
.result-banner .rb-title { font-size: 8px; letter-spacing: 0.26em; color: var(--gold-dim); text-transform: uppercase; }
.result-banner .rb-line { font-size: 12px; color: var(--ivory); line-height: 1.55; }
.result-banner .rb-line b { color: var(--gold-bright); font-weight: 600; }
.result-banner .rb-line span { color: var(--muted); font-size: 10px; margin-left: 5px; }

/* ---------- 座位 ---------- */

.seats { position: absolute; inset: 0; pointer-events: none; }
.seat {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  width: 148px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  z-index: 4;
  pointer-events: auto;
  transition: opacity 0.2s ease;
}
.seat.empty { width: 78px; opacity: 0.55; }
.empty-seat {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 1px dashed rgba(215, 178, 107, 0.22);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.12em;
  background: rgba(5, 12, 9, 0.25);
}
.empty-seat span { font-family: var(--serif); font-size: 15px; color: rgba(215, 178, 107, 0.4); }
.seat-cards { display: flex; gap: 4px; justify-content: center; height: 48px; align-items: flex-end; }
.seat-body {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 12px;
  border: 1px solid rgba(232, 214, 174, 0.14);
  background: linear-gradient(155deg, rgba(18, 32, 25, 0.97), rgba(7, 15, 11, 0.97));
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}
.seat.self .seat-body { border-color: rgba(215, 178, 107, 0.32); }
.seat.active .seat-body {
  border-color: var(--gold);
  animation: seatPulse 2.2s ease-in-out infinite;
}
.seat.folded { opacity: 0.5; }
.seat.folded .seat-cards { visibility: hidden; }
.seat.winner .seat-body {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 1px rgba(242, 215, 155, 0.4), 0 0 34px rgba(215, 178, 107, 0.28);
  animation: winnerPop 0.5s ease both;
}
.avatar {
  position: relative;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ivory);
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.22), transparent 42%),
    hsl(var(--hue, 150) 28% 26%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.24);
}
.avatar .dealer {
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #f2d79b, #c99f53);
  color: #1a1409;
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 800;
  border: 1px solid #0b120e;
}
.seat-meta { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.seat-name {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.seat-name .tag {
  flex: 0 0 auto;
  font-size: 7px;
  letter-spacing: 0.06em;
  padding: 1px 3px;
  border-radius: 3px;
  border: 1px solid rgba(215, 178, 107, 0.3);
  color: var(--gold);
  font-weight: 600;
}
.seat-chips {
  font-size: 10.5px;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.seat-status {
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.seat-status.allin { color: var(--red); }
.seat-status.offline { color: #8a6d4a; }
.seat-bet {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 18px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(4, 10, 7, 0.8);
  border: 1px solid rgba(215, 178, 107, 0.24);
  color: var(--gold-bright);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.seat-bet.show { opacity: 1; }
.chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: repeating-conic-gradient(#d7b26b 0 30deg, #8f2f2b 30deg 60deg);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.seat-winnings {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--gold-bright);
  color: #1a1409;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* ---------- 扑克牌 ---------- */

.card {
  position: relative;
  width: 62px;
  height: 88px;
  border-radius: 7px;
  padding: 6px 7px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(155deg, #fffdf7 0%, #f3ecdd 58%, #e5dac4 100%);
  color: #16211a;
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.32), inset 0 0 0 1px rgba(0, 0, 0, 0.09);
  font-family: var(--sans);
  font-weight: 700;
  line-height: 1;
  user-select: none;
  flex: 0 0 auto;
}
.card .rank { font-size: 20px; letter-spacing: -0.06em; }
.card .suit { font-size: 19px; align-self: flex-end; }
.card.red { color: #b03934; }
.card.black { color: #17211a; }
.card.mini { width: 32px; height: 46px; border-radius: 5px; padding: 4px 4px 3px; box-shadow: 0 4px 9px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.card.mini .rank { font-size: 12px; }
.card.mini .suit { font-size: 11px; }
.card.back {
  background:
    repeating-linear-gradient(45deg, rgba(240, 215, 160, 0.09) 0 3px, transparent 3px 7px),
    linear-gradient(155deg, #164b39, #0b2b20);
  border: 1px solid rgba(240, 215, 160, 0.45);
  display: grid;
  place-items: center;
  color: rgba(240, 215, 160, 0.45);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.35);
}
.card.back .card-back-mark { font-size: 16px; }
.card.slot {
  background: rgba(3, 9, 6, 0.18);
  border: 1px dashed rgba(240, 225, 195, 0.16);
  box-shadow: none;
}
.card.dealt { animation: dealIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.25) both; }
.card.winner-card { box-shadow: 0 0 0 1px var(--gold-bright), 0 0 18px rgba(242, 215, 155, 0.25), 0 7px 16px rgba(0, 0, 0, 0.32); }

/* ---------- 行动栏 ---------- */

.action-bar {
  position: relative;
  flex: 0 0 auto;
  min-height: 94px;
  padding: 15px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(19, 33, 26, 0.95), rgba(8, 16, 12, 0.98));
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.timer-track { position: absolute; top: -1px; left: 14px; right: 14px; height: 2px; background: rgba(255, 255, 255, 0.05); border-radius: 2px; overflow: hidden; }
#timer-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright)); transition: width 0.18s linear; }
.turn-info {
  min-height: 17px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  color: var(--ivory-dim);
  letter-spacing: 0.02em;
}
.turn-info b { color: var(--gold-bright); font-weight: 600; }
.turn-info .turn-time { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.04em; }
.turn-info .spectator-note { color: var(--muted); }
.action-controls { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.action-controls .btn { min-width: 104px; }
.btn {
  appearance: none;
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.07); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.38; cursor: not-allowed; transform: none; filter: none; }
.btn.fold { background: rgba(143, 47, 43, 0.12); border-color: rgba(215, 109, 99, 0.34); color: #e9a49d; min-width: 84px; }
.btn.fold:hover { background: rgba(143, 47, 43, 0.22); }
.btn.check, .btn.call {
  background: linear-gradient(180deg, #f1d69d, #d7b26b 60%, #c09850);
  color: #171208;
  border-color: rgba(255, 235, 195, 0.5);
  min-width: 130px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn.raise { background: rgba(215, 178, 107, 0.08); border-color: rgba(215, 178, 107, 0.42); color: var(--gold-bright); }
.btn.raise:hover { background: rgba(215, 178, 107, 0.14); }
.btn.allin { background: rgba(215, 109, 99, 0.09); border-color: rgba(215, 109, 99, 0.3); color: #e9a49d; }
.btn.start { background: rgba(61, 139, 106, 0.12); border-color: rgba(61, 139, 106, 0.45); color: #a9dfc6; }
.btn.seat { background: rgba(215, 178, 107, 0.09); border-color: rgba(215, 178, 107, 0.4); color: var(--gold-bright); }
.btn.rebuy { background: rgba(215, 178, 107, 0.09); border-color: rgba(215, 178, 107, 0.4); color: var(--gold-bright); }

.raise-panel {
  position: absolute;
  z-index: 20;
  left: 12px;
  right: 12px;
  bottom: calc(100% + 9px);
  padding: 15px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(22, 38, 30, 0.99), rgba(8, 16, 12, 0.99));
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: panelIn 0.18s ease both;
}
.raise-head { display: flex; align-items: baseline; justify-content: space-between; }
.raise-head span { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.raise-head output { font-family: var(--serif); font-size: 24px; color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.raise-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.quick-btn {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--ivory-dim);
  font-size: 10px;
  letter-spacing: 0.04em;
}
.quick-btn:hover { border-color: var(--line-strong); color: var(--ivory); }
.quick-btn.allin { border-color: rgba(215, 109, 99, 0.35); color: #e9a49d; }
.raise-actions { display: flex; gap: 8px; justify-content: flex-end; }
.raise-actions .primary-btn { padding: 10px 18px; }

input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gold) var(--p, 50%), rgba(255, 255, 255, 0.1) var(--p, 50%));
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold-bright);
  border: 3px solid #1a140c;
  box-shadow: 0 0 0 1px var(--gold), 0 3px 8px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold-bright);
  border: 3px solid #1a140c;
  box-shadow: 0 0 0 1px var(--gold);
  cursor: pointer;
}

/* ---------- 侧栏 ---------- */

.side-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(16, 28, 22, 0.82), rgba(7, 14, 11, 0.9));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  overflow: hidden;
}
.side-tabs { display: flex; padding: 4px 6px 0; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.side-tabs .tab { flex: 1; padding: 11px 8px 12px; font-size: 11px; }
.log-list { flex: 1; min-height: 0; overflow-y: auto; padding: 9px 14px 14px; font-size: 11.5px; line-height: 1.6; scrollbar-width: thin; scrollbar-color: rgba(215, 178, 107, 0.25) transparent; }
.log-list::-webkit-scrollbar, .chat-list::-webkit-scrollbar { width: 5px; }
.log-list::-webkit-scrollbar-thumb, .chat-list::-webkit-scrollbar-thumb { background: rgba(215, 178, 107, 0.2); border-radius: 5px; }
.log-line { display: flex; gap: 9px; padding: 4px 0; color: var(--ivory-dim); border-bottom: 1px solid rgba(255, 255, 255, 0.025); }
.log-line:last-child { border-bottom: 0; }
.log-line time { flex: 0 0 34px; padding-top: 1px; font-family: var(--mono); font-size: 9px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.log-line .log-text { min-width: 0; }
.log-line.gold { color: var(--gold-bright); }
.log-line.muted { color: var(--muted-2); }
.log-line.divider { margin-top: 7px; padding-top: 9px; border-top: 1px solid var(--line); color: var(--gold); font-size: 10px; letter-spacing: 0.1em; }
.chat-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-list { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; font-size: 12px; line-height: 1.55; scrollbar-width: thin; scrollbar-color: rgba(215, 178, 107, 0.25) transparent; }
.chat-msg { display: flex; flex-direction: column; gap: 2px; }
.chat-msg .who { font-size: 10px; color: var(--gold); letter-spacing: 0.04em; }
.chat-msg .what { color: var(--ivory-dim); word-break: break-word; }
.chat-form { flex: 0 0 auto; display: flex; gap: 7px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: #0a1410; padding: 9px 11px; font-size: 12px; outline: none; }
.chat-form input:focus { border-color: rgba(215, 178, 107, 0.5); }
.chat-form .primary-btn { padding: 9px 13px; border-radius: 8px; font-size: 11px; }
.side-foot { flex: 0 0 auto; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 9px; letter-spacing: 0.06em; color: var(--muted-2); display: flex; justify-content: space-between; gap: 10px; }
.side-foot b { color: var(--ivory-dim); font-weight: 500; }

/* ---------- 规则弹窗 ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(3, 7, 5, 0.72);
  backdrop-filter: blur(9px);
  animation: fadeIn 0.2s ease both;
}
.modal-card {
  width: min(940px, 100%);
  max-height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: linear-gradient(160deg, #13211a, #0a120e 70%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.rules-card { width: min(1060px, 100%); transition: width 0.24s ease; }
.rules-card.collapsed { width: min(560px, 100%); }
.rules-card.collapsed .rules-body { display: none; }
.modal-head { flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 26px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin-top: 6px; font-family: var(--serif); font-size: 28px; font-weight: 500; letter-spacing: -0.01em; }
.modal-head-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.rules-toggle { min-width: 64px; white-space: nowrap; }
.rules-body { overflow-y: auto; padding: 24px 28px 34px; scrollbar-width: thin; scrollbar-color: rgba(215, 178, 107, 0.3) transparent; }
.rules-body::-webkit-scrollbar { width: 7px; }
.rules-body::-webkit-scrollbar-thumb { background: rgba(215, 178, 107, 0.22); border-radius: 7px; }
.rules-columns { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: 34px; align-items: start; }
.rules-other { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.rules-other > section { border-top: 1px solid var(--line); padding-top: 20px; }
.rules-other > section:first-of-type { border-top: 0; padding-top: 0; }
.rules-intro { padding: 14px 16px; border-left: 2px solid var(--gold-dim); background: rgba(215, 178, 107, 0.04); border-radius: 0 8px 8px 0; }
.rules-body p { color: var(--ivory-dim); font-size: 12.5px; line-height: 1.9; }
.rules-body h3 { color: var(--ivory); font-family: var(--serif); font-size: 19px; font-weight: 500; margin-bottom: 12px; display: flex; align-items: baseline; gap: 10px; }
.rules-body h3 small { font-family: var(--sans); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-dim); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.steps li { display: grid; grid-template-columns: 26px 1fr; row-gap: 1px; }
.steps li::before { counter-increment: step; content: counter(step, decimal-leading-zero); grid-row: 1 / span 2; font-family: var(--mono); font-size: 9px; color: var(--gold-dim); padding-top: 3px; }
.steps { counter-reset: step; }
.steps b { grid-column: 2; font-size: 12px; font-weight: 600; color: var(--ivory); }
.steps span { grid-column: 2; font-size: 11.5px; line-height: 1.75; color: var(--muted); }
.action-list { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.action-list > div { display: grid; grid-template-columns: 76px 1fr; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.035); }
.action-list dt { font-size: 11.5px; color: var(--gold); font-weight: 600; }
.action-list dd { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.rank-section { min-width: 0; }
.rules-columns > .rank-section { position: sticky; top: 0; align-self: start; }
.rank-table { display: flex; flex-direction: column; }
.rank-row { display: grid; grid-template-columns: 96px 162px minmax(0, 1fr); align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.rank-row:last-child { border-bottom: 0; }
.rank-name { font-size: 11.5px; font-weight: 600; color: var(--ivory); display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.rank-name b { font-family: var(--mono); font-size: 9px; color: var(--gold-dim); font-weight: 400; }
.rank-row p { font-size: 10.5px; line-height: 1.55; color: var(--muted); }
.rank-cards { display: flex; gap: 3px; justify-self: end; }
.c {
  width: 30px;
  height: 40px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(155deg, #fffdf6, #e7ddc9);
  color: #17211a;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: 0 4px 9px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(0, 0, 0, 0.07);
}
.c.red { color: #b03934; }
.house-rules { border-top: 1px solid var(--line); padding-top: 22px; }
.house-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.house-grid > div { padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.018); display: flex; flex-direction: column; gap: 4px; }
.house-grid b { font-size: 11px; color: var(--gold); font-weight: 600; }
.house-grid span { font-size: 10.5px; line-height: 1.65; color: var(--muted); }

/* ---------- 提示 ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 120;
  max-width: min(90vw, 460px);
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(215, 178, 107, 0.4);
  background: rgba(12, 22, 17, 0.96);
  color: var(--ivory);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.22s ease both;
  text-align: center;
}

/* ---------- 动画 ---------- */

@keyframes floatCard {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}
@keyframes seatPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(215, 178, 107, 0.35), 0 0 22px rgba(215, 178, 107, 0.1); }
  50% { box-shadow: 0 0 0 1px rgba(242, 215, 155, 0.65), 0 0 34px rgba(215, 178, 107, 0.28); }
}
@keyframes winnerPop {
  from { transform: scale(0.96); }
  60% { transform: scale(1.02); }
  to { transform: scale(1); }
}
@keyframes dealIn {
  from { opacity: 0; transform: translateY(-9px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes bannerIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- 响应式 ---------- */

@media (max-width: 1180px) {
  .game { height: auto; min-height: 100dvh; overflow: visible; }
  .room { grid-template-columns: 230px minmax(0, 1fr); }
  .table-column { grid-column: 1 / -1; order: 1; }
  .table-stage { flex: 0 0 auto; height: min(62vh, 560px); min-height: 420px; }
  .rank-rail { grid-column: 1; order: 2; height: 360px; }
  .side-panel { grid-column: 2; order: 3; height: 420px; }
  .action-bar { position: sticky; bottom: 10px; z-index: 25; backdrop-filter: blur(16px); }
  .seat { width: 136px; }
  .avatar { width: 33px; height: 33px; }
}

@media (max-width: 980px) {
  .lobby { min-height: 100dvh; height: auto; overflow: visible; padding-bottom: 10px; }
  .lobby-grid { grid-template-columns: 1fr; gap: 34px; padding: 20px 0 40px; }
  .hero-copy { max-width: 100%; }
  .hero-copy h1 { font-size: clamp(48px, 10vw, 76px); }
  .hero-art { height: 132px; }
  .lobby-card { max-width: 560px; width: 100%; }
  .game { height: auto; min-height: 100dvh; overflow: visible; }
  .room { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .table-column { grid-column: 1; order: 1; }
  .rank-rail { grid-column: 1; order: 2; height: 300px; }
  .side-panel { grid-column: 1; order: 3; height: 380px; }
  .table-stage { flex: 0 0 auto; height: min(62vh, 560px); min-height: 420px; }
  .action-bar { position: sticky; bottom: 10px; z-index: 25; backdrop-filter: blur(16px); }
  .raise-panel { left: 0; right: 0; }
  .modal-card { max-height: 92vh; }
  .rules-columns { grid-template-columns: 1fr; gap: 26px; }
  .rules-columns > .rank-section { position: static; }
  .house-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .lobby { padding: 0 18px; }
  .lobby-head { padding: 18px 0; }
  .brand-mark { width: 36px; height: 36px; font-size: 18px; }
  .brand-text strong { font-size: 13px; }
  .brand-text small { font-size: 8px; }
  .hero-copy .eyebrow { margin-bottom: 14px; }
  .hero-copy h1 { font-size: clamp(44px, 12vw, 64px); margin-bottom: 18px; }
  .lede { font-size: 12.5px; margin-bottom: 20px; }
  .hero-art { display: none; }
  .hero-facts { font-size: 9px; gap: 10px; }
  .lobby-card { padding: 20px; border-radius: 18px; }
  .lobby-foot { flex-direction: column; align-items: flex-start; gap: 5px; padding: 18px 0 22px; }
  .topbar { height: 54px; padding: 0 10px; gap: 10px; }
  .brand.small .brand-mark { width: 28px; height: 28px; font-size: 14px; }
  .brand.small .brand-text strong { font-size: 11px; letter-spacing: 0.14em; }
  .room-info { margin-left: 0; gap: 7px; }
  .room-meta { display: none; }
  .code-chip { padding: 6px 8px; font-size: 10px; }
  .top-actions .ghost-btn { padding: 7px 9px; font-size: 10.5px; }
  .room { padding: 9px; gap: 9px; }
  .table-stage { height: min(58vh, 480px); min-height: 390px; }
  .felt { inset: 9% 3.5%; border-radius: 48% / 50%; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.35), inset 0 0 60px rgba(0, 0, 0, 0.5), 0 0 0 6px #2a1c11, 0 0 0 7px rgba(215, 178, 107, 0.25), 0 0 0 15px #140e09, 0 20px 40px rgba(0, 0, 0, 0.45); }
  .table-brand { top: 10.5%; font-size: 8px; letter-spacing: 0.38em; }
  .center { gap: 9px; padding: 0 8%; }
  .pot-line strong { font-size: 19px; }
  .pot-line span { font-size: 8px; }
  .board { gap: 5px; min-height: 64px; }
  .board .card { width: 44px; height: 62px; border-radius: 5px; padding: 4px 5px; }
  .board .card .rank { font-size: 14px; }
  .board .card .suit { font-size: 13px; }
  .stage-line { font-size: 8px; }
  .seat { width: 108px; gap: 3px; }
  .seat.empty { width: 58px; }
  .empty-seat { width: 48px; height: 48px; font-size: 8px; }
  .empty-seat span { font-size: 12px; }
  .seat-body { padding: 5px 7px; gap: 6px; border-radius: 10px; }
  .avatar { width: 28px; height: 28px; font-size: 11px; }
  .avatar .dealer { width: 14px; height: 14px; font-size: 7px; right: -4px; bottom: -3px; }
  .seat-name { font-size: 10px; }
  .seat-chips { font-size: 9px; }
  .seat-status { font-size: 8px; }
  .seat-cards { height: 38px; gap: 3px; }
  .card.mini { width: 26px; height: 38px; padding: 3px; }
  .card.mini .rank { font-size: 10px; }
  .card.mini .suit { font-size: 9px; }
  .card.back .card-back-mark { font-size: 12px; }
  .seat-bet { font-size: 8.5px; padding: 2px 6px; min-height: 16px; }
  .chip-dot { width: 6px; height: 6px; }
  .seat-winnings { font-size: 8px; top: -24px; }
  .result-banner { padding: 7px 10px; }
  .result-banner .rb-line { font-size: 11px; }
  .action-bar { padding: 12px 11px 12px; min-height: 88px; gap: 9px; }
  .turn-info { font-size: 10.5px; }
  .action-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .action-controls .btn { min-width: 0; width: 100%; padding: 10px 8px; font-size: 11.5px; }
  .action-controls .btn.start, .action-controls .btn.seat, .action-controls .btn.rebuy { grid-column: span 2; }
  .action-controls .btn.fold { min-width: 0; }
  .raise-panel { padding: 12px; }
  .raise-head output { font-size: 21px; }
  .side-panel { height: 340px; }
  .rank-rail { height: 280px; }
  .modal { padding: 8px; }
  .modal-head { padding: 16px 16px 13px; gap: 12px; }
  .modal-head h2 { font-size: 22px; }
  .modal-head-actions { gap: 6px; }
  .rules-toggle { min-width: 56px; padding: 7px 10px; font-size: 11px; }
  .rules-body { padding: 16px 16px 26px; }
  .rules-columns { gap: 20px; }
  .rank-row { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; padding: 10px 0; }
  .rank-row p { grid-column: 1 / -1; }
  .rank-cards { justify-self: end; }
  .house-grid { grid-template-columns: 1fr; }
  .toast { bottom: 16px; font-size: 11px; }
}

@media (max-width: 420px) {
  .seat { width: 98px; }
  .seat .avatar { width: 25px; height: 25px; font-size: 10px; }
  .seat-name { font-size: 9.5px; }
  .seat-chips { font-size: 8.5px; }
  .card.mini { width: 23px; height: 34px; }
  .board .card { width: 40px; height: 57px; }
  .brand.small .brand-text { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
