:root {
  /* Mac 苹方 / Windows 微软雅黑 */
  --font-ui: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --felt: #1a5c3a;
  --felt-deep: #0f3d28;
  --felt-rim: #8b5a2b;
  --ink: #1a1814;
  --paper: #f3efe6;
  --cream: #ebe4d4;
  --accent: #c45c26;
  --gold: #d4a017;
  --danger: #b33a3a;
  --warn: #c47a12;
  --muted: #6b6458;
  --seat-bg: rgba(10, 28, 18, 0.72);
  --line: 0.0625rem;
  --radius-sm: 0.2rem;
  --radius-md: 0.5rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --card-w: clamp(3.4rem, 7.2vmin, 5.6rem);
  --card-h: clamp(4.8rem, 10vmin, 7.8rem);
  --hole-card-w: clamp(4rem, 9vmin, 6.4rem);
  --hole-card-h: clamp(5.6rem, 12.6vmin, 9rem);
  --seat-w: clamp(4.4rem, 9.5vmin, 6.8rem);
  --seat-card-w: clamp(1.35rem, 3.2vmin, 2.2rem);
  --seat-card-h: clamp(1.9rem, 4.5vmin, 3.1rem);
  --topbar-h: clamp(2.4rem, 7vh, 3.2rem);
  --action-h: clamp(8.2rem, 24vh, 12rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* display:grid/flex 会盖掉原生 hidden，必须强制隐藏 */
[hidden] {
  display: none !important;
}

html {
  font-size: 16px;
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  height: 100%;
  min-height: 100%;
  font-family: var(--font-ui);
  color: var(--paper);
  background: #0a0908;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

/* 固定设计画布：1280×720，由 JS 等比缩放/竖屏旋转 */
#stageRoot {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #0a0908;
  /* 宽高/位置由 layoutStage 按 visualViewport 写入，避免真机地址栏跳动 */
}

#stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1280px;
  height: 720px;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  background:
    radial-gradient(ellipse at 30% 20%, #2a2218 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, #1a2418 0%, transparent 45%),
    #12100e;
  /* 画布内尺寸定死，避免真机 vmin/dvh 乱跳 */
  --card-w: 4.4rem;
  --card-h: 6.2rem;
  --hole-card-w: 5rem;
  --hole-card-h: 7rem;
  --seat-w: 6.2rem;
  /* 明牌可读：座位手牌略大，减轻舞台 scale 后花色发糊 */
  --seat-card-w: 2.4rem;
  --seat-card-h: 3.35rem;
  --topbar-h: 2.6rem;
  --action-h: 9.2rem;
  --side-gap: 0.4rem;
  font-size: 16px;
}

.screen {
  min-height: 100%;
  height: 100%;
  width: 100%;
}

/* Lobby */
#lobby {
  display: grid;
  place-items: stretch;
  padding: 0.65rem 1rem 0.5rem;
  background:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(40, 120, 72, 0.45), transparent 58%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(90, 55, 18, 0.28), transparent 55%),
    linear-gradient(180deg, #16130f 0%, #0e0c0a 100%);
  overflow: auto;
  height: 100%;
  max-height: 100%;
  -webkit-overflow-scrolling: touch;
}

.lobby-shell {
  width: min(72rem, 98%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 0;
  height: 100%;
}

.lobby-hero {
  flex-shrink: 0;
  text-align: center;
  padding: 0.55rem 0.5rem 0.15rem;
  animation: lobby-hero-in 0.55s ease-out both;
}

.brand {
  font-family: var(--font-ui);
  letter-spacing: 0.14em;
  color: var(--gold);
  font-size: clamp(1.35rem, 3.1vmin, 1.95rem);
  font-weight: 700;
  line-height: 1.15;
  text-indent: 0.42em;
  text-shadow: 0 0.12rem 1.2rem rgba(212, 160, 23, 0.28);
  margin: 0;
}

.lobby-tagline {
  margin: 0.35rem 0 0;
  color: rgba(200, 190, 170, 0.72);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
}

.lobby-toolbar {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.15rem 0 0.1rem;
  animation: lobby-panel-in 0.45s ease-out 0.08s both;
}

.lobby-toolbar .btn.primary {
  min-width: 8.5rem;
  padding-left: 1.4rem;
  padding-right: 1.4rem;
}

.lobby-create,
.lobby-create-fields,
.lobby-create-actions {
  display: none;
}

/* 创建房间弹窗 */
.create-room-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding:
    max(0.65rem, env(safe-area-inset-top, 0px))
    max(0.65rem, env(safe-area-inset-right, 0px))
    max(0.65rem, env(safe-area-inset-bottom, 0px))
    max(0.65rem, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}

.create-room-modal[hidden] {
  display: none !important;
}

.create-room-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 5, 4, 0.72);
  backdrop-filter: blur(0.2rem);
}

.create-room-card {
  position: relative;
  z-index: 1;
  width: min(28rem, 100%);
  max-height: min(92dvh, calc(100dvh - 1.2rem));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.95rem 1rem 1rem;
  border-radius: 0.55rem;
  background:
    linear-gradient(165deg, rgba(42, 52, 42, 0.98), rgba(18, 16, 12, 0.98) 55%);
  border: var(--line) solid rgba(212, 160, 23, 0.35);
  box-shadow: 0 1rem 2.4rem rgba(0, 0, 0, 0.55);
  animation: create-room-in 0.28s ease-out;
  box-sizing: border-box;
}

.create-room-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.create-room-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--gold);
  font-family: var(--font-ui);
}

.create-room-head h2 {
  margin: 0.2rem 0 0;
  font-family: var(--font-ui);
  font-size: 1.35rem;
  color: var(--cream);
  letter-spacing: 0.08em;
}

.create-room-close {
  appearance: none;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(235, 228, 212, 0.85);
  width: 2rem;
  height: 2rem;
  border-radius: 0.3rem;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.create-room-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.create-room-form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.create-room-form .field {
  min-width: 0;
  width: 100%;
}

.create-room-section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.5rem 0.6rem 0.55rem;
  border-radius: 0.4rem;
  border: var(--line) solid rgba(200, 190, 160, 0.14);
  background: rgba(10, 12, 10, 0.28);
}

.create-room-section--ai {
  border-color: rgba(120, 200, 160, 0.22);
  background: rgba(28, 48, 38, 0.28);
}

.create-room-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 1.35rem;
}

.create-room-section-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(212, 176, 96, 0.92);
  text-transform: uppercase;
}

.create-room-section-tag {
  font-size: 0.68rem;
  color: rgba(180, 210, 190, 0.72);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.create-room-note {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.4;
  color: rgba(180, 170, 150, 0.62);
  letter-spacing: 0.02em;
}

.create-room-grid {
  display: grid;
  gap: 0.55rem;
}

.create-room-grid--2 {
  grid-template-columns: 1fr 1fr;
}

.create-room-grid--3 {
  grid-template-columns: 1.15fr 1fr 1fr;
}

.mode-lock-pill--inline {
  min-height: 1.45rem;
  padding: 0.12rem 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  border-radius: 999px;
  background: rgba(60, 70, 48, 0.55);
  border-color: rgba(180, 190, 140, 0.28);
}

.create-room-blinds {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.create-room-rise {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  align-items: end;
}

.create-room-form .field.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.create-room-rise .rise-check-field .rise-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.35rem;
  padding: 0 0.55rem;
  border-radius: 0.35rem;
  border: var(--line) solid rgba(200, 190, 160, 0.28);
  background: rgba(20, 18, 14, 0.35);
  color: rgba(230, 220, 200, 0.9);
  font-size: 0.86rem;
  cursor: pointer;
}

.create-room-rise .rise-check input {
  width: 1rem;
  height: 1rem;
  accent-color: #c4a35a;
}

.create-rise-help-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.create-rise-cap-hint {
  font-size: 0.78rem;
  color: rgba(200, 190, 170, 0.72);
}

.rise-help-btn {
  white-space: nowrap;
}

.rise-on-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-sm);
  border: 0.06rem solid rgba(212, 160, 23, 0.45);
  background: rgba(120, 80, 20, 0.42);
  color: #f0d58a;
  white-space: nowrap;
}

.rise-on-badge[hidden] {
  display: none !important;
}

.blind-rise-modal {
  position: fixed;
  inset: 0;
  /* 需高于创建房间弹窗(120)及其他事件层，避免被挡住 */
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 1rem;
  isolation: isolate;
}

.blind-rise-modal[hidden] {
  display: none !important;
}

.blind-rise-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 6, 0.72);
  backdrop-filter: blur(0.18rem);
}

.blind-rise-card {
  position: relative;
  z-index: 1;
  width: min(34rem, 100%);
  max-height: min(86vh, 44rem);
  display: flex;
  flex-direction: column;
  padding: 1rem 1.05rem 1.05rem;
  border-radius: 0.55rem;
  background:
    linear-gradient(165deg, rgba(42, 52, 42, 0.98), rgba(18, 16, 12, 0.98) 55%);
  border: var(--line) solid rgba(212, 160, 23, 0.35);
  box-shadow: 0 1rem 2.4rem rgba(0, 0, 0, 0.55);
}

.blind-rise-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.blind-rise-eyebrow {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  color: var(--gold);
}

.blind-rise-head h2 {
  margin: 0.2rem 0 0;
  font-size: 1.25rem;
  color: var(--cream);
  letter-spacing: 0.06em;
}

.blind-rise-close {
  appearance: none;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(235, 228, 212, 0.85);
  width: 2rem;
  height: 2rem;
  border-radius: 0.3rem;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.blind-rise-body {
  overflow: auto;
  padding-right: 0.15rem;
  min-height: 0;
}

.blind-rise-actions {
  margin-top: 0.85rem;
  display: flex;
  justify-content: flex-end;
}

.rise-explain-title {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(235, 220, 180, 0.95);
  letter-spacing: 0.04em;
}

.rise-explain-rules {
  margin: 0 0 0.65rem;
  padding: 0 0 0 1rem;
  color: rgba(210, 200, 180, 0.86);
  font-size: 0.84rem;
  line-height: 1.45;
}

.rise-explain-rules li {
  margin: 0.16rem 0;
}

.rise-lv-caption {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(196, 163, 90, 0.85);
}

.rise-lv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

.rise-lv {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.35rem 0.45rem;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(200, 190, 160, 0.14);
  font-variant-numeric: tabular-nums;
}

.rise-lv-n {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #c4a35a;
  min-width: 2.1rem;
}

.rise-lv-b {
  font-size: 0.82rem;
  color: rgba(235, 228, 212, 0.92);
  text-align: right;
}

.rise-lv.is-cap {
  border-color: rgba(196, 163, 90, 0.45);
  background: rgba(196, 163, 90, 0.12);
}

.rise-lv.is-cap .rise-lv-n {
  color: #e2c57a;
}

@media (max-width: 420px) {
  .rise-lv-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.settings-fields .rise-toggle input[type='checkbox'] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #c4a35a;
}

.create-room-error {
  margin: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 0.3rem;
  background: rgba(120, 30, 30, 0.35);
  border: var(--line) solid rgba(200, 80, 80, 0.4);
  color: #ffc8c8;
  font-size: 0.82rem;
}

.join-name-room-hint {
  margin: -0.15rem 0 0;
  font-size: 0.82rem;
  color: rgba(200, 190, 170, 0.78);
  letter-spacing: 0.04em;
}

.create-room-actions {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.create-room-actions .btn {
  width: 100%;
  justify-content: center;
}

@media (max-width: 520px), (max-height: 480px) {
  .create-room-card {
    width: min(26rem, 100%);
    padding: 0.85rem 0.9rem 0.95rem;
    max-height: min(94dvh, calc(100dvh - 0.8rem));
  }

  .create-room-head h2 {
    font-size: clamp(1.1rem, 4.5vw, 1.25rem);
  }

  .create-room-form {
    gap: 0.55rem;
  }

  .create-room-section {
    padding: 0.55rem 0.6rem 0.6rem;
    gap: 0.4rem;
  }

  .create-room-blinds,
  .create-room-rise,
  .create-room-grid--2 {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .create-room-grid--3 {
    grid-template-columns: 1fr 1fr;
  }

  .create-room-grid--3 .field:first-child {
    grid-column: 1 / -1;
  }

  .create-room-actions {
    grid-template-columns: 1fr 1fr;
  }

  .create-room-actions .btn {
    min-height: 2.35rem;
  }
}

@media (max-width: 380px) {
  .create-room-blinds,
  .create-room-rise,
  .create-room-grid--2,
  .create-room-grid--3,
  .create-room-actions {
    grid-template-columns: 1fr;
  }

  .create-room-grid--3 .field:first-child {
    grid-column: auto;
  }
}

@keyframes create-room-in {
  from { opacity: 0; transform: translateY(0.45rem) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.lobby-head {
  display: none; /* 旧结构保留兼容，视觉改走 hero + create */
}

.lobby-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem;
}

.lobby-head h1,
.sub {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.field.inline {
  min-width: clamp(7.2rem, 16vmin, 10.5rem);
}

.field.inline.narrow {
  min-width: 4.2rem;
  max-width: 5.2rem;
}

.field input,
.field select,
.blind-edit select {
  background: #0c0b09;
  border: var(--line) solid #3a342c;
  color: var(--cream);
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.95rem;
  min-height: 2.35rem;
  width: 100%;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: rgba(212, 160, 23, 0.55);
  box-shadow: 0 0 0 0.12rem rgba(212, 160, 23, 0.15);
}

.blind-edit select {
  padding: 0.25rem 0.4rem;
  min-height: 2rem;
}

.field span {
  font-size: 0.7rem;
  color: rgba(180, 170, 150, 0.85);
  letter-spacing: 0.06em;
}

.field .field-hint {
  margin-top: -0.1rem;
  font-size: 0.68rem;
  color: rgba(180, 170, 150, 0.62);
  letter-spacing: 0.02em;
}

.room-list-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: rgba(12, 14, 12, 0.55);
  border: var(--line) solid rgba(255, 255, 255, 0.06);
  border-radius: 0.4rem;
  overflow: hidden;
  animation: lobby-panel-in 0.5s ease-out 0.14s both;
}

.room-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  border-bottom: var(--line) solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
}

.room-list-head h2 {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.08em;
}

.room-count {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.room-list {
  overflow: auto;
  padding: 0.7rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 0.7rem;
  align-content: start;
  flex: 1;
  min-height: 0;
}

.empty-rooms {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 2.4rem 1rem;
  border: var(--line) dashed rgba(255, 255, 255, 0.1);
  border-radius: 0.4rem;
  background: rgba(0, 0, 0, 0.15);
}

.empty-rooms-title {
  font-family: var(--font-ui);
  font-size: 1.05rem;
  color: rgba(235, 228, 212, 0.88);
  letter-spacing: 0.1em;
  margin: 0 0 0.35rem;
}

.empty-rooms-sub {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(140, 130, 115, 0.9);
}

.room-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.8rem 0.85rem 0.75rem;
  background:
    linear-gradient(165deg, rgba(38, 48, 38, 0.92) 0%, rgba(22, 20, 16, 0.96) 55%, rgba(18, 24, 18, 0.94) 100%);
  border: var(--line) solid rgba(212, 160, 23, 0.16);
  border-radius: 0.45rem;
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.28);
  min-width: 0;
  height: 100%;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  animation: room-card-in 0.4s ease-out both;
}

.room-card:nth-child(1) { animation-delay: 0.02s; }
.room-card:nth-child(2) { animation-delay: 0.06s; }
.room-card:nth-child(3) { animation-delay: 0.1s; }
.room-card:nth-child(4) { animation-delay: 0.14s; }
.room-card:nth-child(5) { animation-delay: 0.18s; }
.room-card:nth-child(6) { animation-delay: 0.22s; }

.room-card:hover {
  transform: translateY(-0.12rem);
  border-color: rgba(212, 160, 23, 0.42);
  box-shadow: 0 0.55rem 1.35rem rgba(0, 0, 0, 0.38);
}

.room-card.is-full {
  opacity: 0.82;
}

.room-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.room-id {
  font-family: var(--font-ui);
  font-size: 1.35rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  line-height: 1.1;
  text-indent: 0.12em;
}

.room-card-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
  gap: 0.28rem;
  min-height: 1.55rem;
}

.room-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.55rem;
}

.room-stat {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.room-stat-k {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: rgba(160, 150, 130, 0.75);
  text-transform: uppercase;
}

.room-stat-v {
  font-size: 0.86rem;
  font-weight: 700;
  color: #e8efe6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-occupancy {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.room-occupancy-bar {
  height: 0.28rem;
  border-radius: 999rem;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.room-occupancy-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f8a55, #d4a017);
  width: var(--occ, 0%);
  transition: width 0.35s ease;
}

.room-occupancy-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: rgba(183, 207, 192, 0.9);
}

.room-players {
  font-size: 0.74rem;
  color: rgba(160, 150, 135, 0.92);
  line-height: 1.35;
  min-height: 1.9em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-my-reg {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: rgba(215, 240, 226, 0.95);
  min-height: 1.35em;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-my-reg strong {
  font-weight: 700;
  color: #f0e6d2;
}

.event-my-reg.is-muted {
  color: rgba(160, 150, 135, 0.85);
}

.event-roster-me {
  font-size: 0.62rem;
  opacity: 0.9;
  letter-spacing: 0.04em;
}

.event-roster-empty {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: rgba(160, 150, 135, 0.85);
  text-align: center;
}

/* MTT 名单弹窗内容（layer type:1） */
.event-roster-modal {
  padding: 0.15rem 0.1rem 0.35rem;
  min-width: min(18rem, 72vw);
}

.event-roster-modal-meta {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  color: rgba(215, 240, 226, 0.9);
}

.event-roster-modal-meta strong {
  color: #ffd56a;
}

.event-roster-modal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(50vh, 18rem);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.event-roster-modal-item {
  display: grid;
  grid-template-columns: 1.6rem 1fr auto;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.45rem;
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(230, 220, 200, 0.92);
  font-size: 0.82rem;
}

.event-roster-modal-item.is-me {
  background: rgba(26, 92, 58, 0.5);
  color: #d7f0e2;
  font-weight: 700;
}

.event-roster-modal-idx {
  color: #ffd56a;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: center;
}

.event-roster-modal-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-standings-list .event-roster-modal-item {
  grid-template-columns: 5.2rem minmax(0, 1fr) 3.2rem auto;
}

.event-standings-chips {
  font-variant-numeric: tabular-nums;
  color: rgba(230, 220, 200, 0.85);
  text-align: right;
  font-size: 0.85em;
}

.event-standings-tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.28rem;
  border-radius: 0.2rem;
  font-size: 0.68em;
  font-weight: 700;
  vertical-align: middle;
}

.event-standings-tag.is-on {
  background: rgba(40, 120, 80, 0.45);
  color: #c8f0d8;
}

.event-standings-tag.is-out {
  background: rgba(80, 80, 80, 0.45);
  color: rgba(200, 200, 200, 0.85);
}

.event-standings-list .event-roster-modal-item.is-left {
  opacity: 0.78;
}

.event-standings-podium {
  margin: 0 0 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.45rem;
  background: linear-gradient(135deg, rgba(212, 160, 23, 0.22), rgba(40, 28, 8, 0.55));
  border: 1px solid rgba(212, 160, 23, 0.4);
  text-align: center;
}

.event-standings-champ {
  margin: 0;
  font-size: 0.95rem;
  color: #f5e6b8;
}

.event-standings-champ strong {
  color: #ffe08a;
  font-size: 1.05em;
}

.event-standings-medal {
  display: inline-block;
  margin-right: 0.2rem;
  font-size: 1.05em;
  line-height: 1;
}

.event-standings-place-txt {
  font-weight: 700;
}

.event-standings-list .event-roster-modal-item.is-top3.is-gold {
  background: linear-gradient(90deg, rgba(212, 160, 23, 0.35), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(212, 160, 23, 0.45);
  color: #ffe9a8;
}

.event-standings-list .event-roster-modal-item.is-top3.is-silver {
  background: linear-gradient(90deg, rgba(180, 190, 205, 0.28), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(190, 200, 215, 0.4);
  color: #e8eef8;
}

.event-standings-list .event-roster-modal-item.is-top3.is-bronze {
  background: linear-gradient(90deg, rgba(180, 110, 60, 0.3), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(200, 130, 70, 0.4);
  color: #f3d2b0;
}

.event-standings-list .event-roster-modal-item.is-top3 .event-roster-modal-idx {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  color: inherit;
}

.roster-panel.is-event-standings .roster-head strong {
  letter-spacing: 0.04em;
}

.roster-panel.is-event-standings .roster-row.is-top3.is-gold {
  background: linear-gradient(90deg, rgba(212, 160, 23, 0.28), transparent);
}

.roster-panel.is-event-standings .roster-row.is-top3.is-silver {
  background: linear-gradient(90deg, rgba(180, 190, 205, 0.22), transparent);
}

.roster-panel.is-event-standings .roster-row.is-top3.is-bronze {
  background: linear-gradient(90deg, rgba(180, 110, 60, 0.24), transparent);
}

.roster-panel.is-event-standings .roster-rank {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  min-width: 2.4rem;
}

.win-banner.is-mtt-champion {
  border-color: rgba(212, 160, 23, 0.65);
  box-shadow: 0 0.35rem 1.2rem rgba(0, 0, 0, 0.45), 0 0 1.5rem rgba(212, 160, 23, 0.2);
}

.pill {
  display: inline-block;
  padding: 0.12rem 0.42rem;
  border-radius: 0.2rem;
  background: rgba(26, 92, 58, 0.55);
  color: #d7f0e2;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.pill.mode-tournament {
  background: rgba(120, 50, 30, 0.55);
  color: #ffd0b0;
}

.pill.mode-casual {
  background: rgba(40, 90, 120, 0.5);
  color: #c8e0f5;
}

.pill.phase {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(230, 220, 200, 0.88);
}

.pill.phase.is-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(160, 150, 135, 0.75);
  font-weight: 600;
}

.settings-fields.tournament .blind-edit:has(#chipsSelect) {
  opacity: 0.55;
}

.room-actions {
  display: grid;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.2rem;
}

/* 休闲/普通：加入 + 观看，两列等高 */
.room-actions--dual {
  grid-template-columns: 1.15fr 1fr;
}

/* MTT：固定 3×2，格子数不随角色变化 */
.room-actions--mtt {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.room-actions .btn {
  width: 100%;
  min-width: 0;
  min-height: 2.15rem;
  height: 2.15rem;
  padding: 0.28rem 0.35rem;
  justify-content: center;
  align-items: center;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

/* 无权限操作位占位，维持 3×2 网格对齐 */
.room-actions .room-act-slot {
  display: block;
  min-height: 2.15rem;
  height: 2.15rem;
  visibility: hidden;
  pointer-events: none;
}

@keyframes lobby-hero-in {
  from { opacity: 0; transform: translateY(-0.45rem); }
  to { opacity: 1; transform: none; }
}

@keyframes lobby-panel-in {
  from { opacity: 0; transform: translateY(0.4rem); }
  to { opacity: 1; transform: none; }
}

@keyframes room-card-in {
  from { opacity: 0; transform: translateY(0.35rem) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.spectate-badge,
.host-badge,
.god-badge,
.mode-badge,
.blind-badge,
.rise-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.blind-badge.is-clickable,
.rise-badge {
  cursor: pointer;
}

.blind-badge.is-clickable {
  text-decoration: underline dotted rgba(196, 163, 90, 0.55);
  text-underline-offset: 0.18em;
}

.blind-badge.is-clickable:hover,
.rise-badge:hover {
  color: #e8d7a4;
}

.rise-badge {
  appearance: none;
  border: 0.06rem solid rgba(212, 160, 23, 0.45);
  background: rgba(120, 80, 20, 0.42);
  color: #f0d58a;
}

.rise-badge[hidden] {
  display: none !important;
}

.rise-badge.is-soon {
  border-color: rgba(255, 170, 70, 0.65);
  background: rgba(150, 70, 20, 0.5);
  color: #ffd2a0;
  animation: rise-badge-pulse 1.4s ease-in-out infinite;
}

.rise-badge.is-max {
  border-color: rgba(160, 160, 160, 0.4);
  background: rgba(70, 70, 70, 0.45);
  color: rgba(220, 220, 220, 0.85);
  animation: none;
}

@keyframes rise-badge-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.18); }
}

.mode-badge {
  background: rgba(40, 90, 120, 0.4);
  color: #b8d8f0;
  border: 0.06rem solid rgba(140, 190, 230, 0.35);
}

.mode-badge.tournament {
  background: rgba(120, 50, 30, 0.45);
  color: #ffd0b0;
  border-color: rgba(255, 160, 100, 0.4);
}

.mode-badge.tournament.formal {
  background: rgba(110, 40, 30, 0.55);
  color: #ffc8a8;
  border-color: rgba(255, 140, 90, 0.5);
}

.mode-lock-pill {
  display: flex;
  align-items: center;
  min-height: 2.35rem;
  padding: 0 0.7rem;
  border-radius: 0.35rem;
  border: var(--line) solid rgba(200, 190, 160, 0.28);
  background: rgba(20, 18, 14, 0.35);
  color: rgba(235, 228, 212, 0.92);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.create-mode-note {
  margin: -0.15rem 0 0;
  padding: 0.45rem 0.55rem;
  border-radius: 0.3rem;
  border: var(--line) solid rgba(200, 190, 160, 0.2);
  background: rgba(12, 14, 12, 0.4);
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(220, 210, 190, 0.82);
}

.spectate-badge {
  background: rgba(196, 122, 18, 0.25);
  color: #f0c57a;
}

.host-badge {
  background: rgba(196, 92, 38, 0.3);
  color: #f0b090;
}

.god-badge {
  background: rgba(120, 40, 160, 0.4);
  color: #e8c4ff;
  border: 0.06rem solid rgba(220, 160, 255, 0.45);
}

.auto-host-btn {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  background: rgba(30, 90, 140, 0.35);
  color: #b8d8f0;
  border: 0.06rem solid rgba(120, 180, 230, 0.35);
}
.auto-host-btn.is-on {
  background: rgba(40, 120, 80, 0.45);
  color: #c8f0d8;
  border-color: rgba(120, 210, 160, 0.5);
}
.auto-host-btn.is-on.is-timeout-host {
  background: rgba(140, 90, 30, 0.5);
  color: #ffe2a8;
  border-color: rgba(240, 180, 80, 0.55);
}
.badge.host-ai {
  background: rgba(40, 120, 80, 0.4);
  color: #c8f0d8;
}

.blind-badge,
.chip-badge {
  background: rgba(26, 92, 58, 0.4);
  color: #c8e6d4;
}

.chip-badge {
  background: rgba(120, 90, 30, 0.4);
  color: #f0d78a;
}

.chip-badge-btn {
  appearance: none;
  border: 0.06rem solid rgba(240, 215, 138, 0.35);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
}

.chip-badge-btn:hover {
  border-color: rgba(255, 213, 106, 0.7);
  background: rgba(160, 120, 40, 0.5);
  color: #ffe7a8;
}

#table.spectating .hole-wrap {
  opacity: 0.35;
}

.badge.host {
  background: #8a3c1c;
  color: #ffe8da;
}

.badge.ready {
  background: rgba(26, 92, 58, 0.85);
  color: #d7f0e2;
}

.badge.sb {
  background: #2c5f8a;
  color: #dcefff;
}

.badge.bb {
  background: #6b3d8a;
  color: #f0e2ff;
}

.bet-chip {
  margin-top: 0.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-width: 2.4rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999rem;
  background: radial-gradient(circle at 30% 30%, #f6df7a, #c49312 55%, #8a6508);
  color: #241805;
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: 0 0.15rem 0.35rem rgba(0, 0, 0, 0.4);
  border: 0.08rem solid rgba(255, 236, 170, 0.65);
}

.bet-chip.leading {
  transform: scale(1.08);
  box-shadow: 0 0 0 0.12rem #fff3c0, 0 0.2rem 0.55rem rgba(0, 0, 0, 0.45);
  animation: bet-pulse 1.1s ease-in-out infinite;
}

.bet-chip .bet-tag {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

@keyframes bet-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.18); }
}

.chip-stack {
  color: var(--gold);
  font-weight: 700;
}

input {
  background: #0c0b09;
  border: var(--line) solid #3a342c;
  color: var(--cream);
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 1rem;
  min-height: 2.5rem;
}

input:focus {
  outline: var(--line) solid var(--gold);
  border-color: var(--gold);
}

.lobby-actions {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.join-row {
  display: flex;
  gap: 0.5rem;
}

.join-row input {
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  min-width: 0;
}

.btn {
  appearance: none;
  border: var(--line) solid #4a4338;
  background: #2a261f;
  color: var(--cream);
  padding: 0.65rem 0.95rem;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  white-space: nowrap;
  min-height: 2.5rem;
}

.btn:hover:not(:disabled) { background: #353028; }
.btn:active:not(:disabled) { transform: translateY(0.06rem); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn.primary {
  background: var(--felt);
  border-color: #2d7a4e;
  color: #e8f5ee;
}
.btn.primary:hover:not(:disabled) { background: #216b44; }

.btn.accent {
  background: var(--accent);
  border-color: #a3481c;
  color: #fff6ef;
}
.btn.danger {
  background: #5c2222;
  border-color: #8a3535;
}
.btn.warn {
  background: #5c4218;
  border-color: #8a6a28;
}
.btn.small {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  min-height: 2.1rem;
}

.error,
#lobbyError,
.create-room-error {
  /* 全平台改用 layer.alert，不再内联红字提示 */
  display: none !important;
}

.hint {
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  word-break: break-all;
}

/* Table shell：顶栏 + 牌桌；操作台半透明叠在台面底部，避免硬黑块遮挡 */
#table {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.45rem;
  min-height: var(--topbar-h);
  max-height: 3.2rem;
  padding: 0.28rem 0.7rem;
  background: rgba(0, 0, 0, 0.45);
  border-bottom: var(--line) solid rgba(212, 160, 23, 0.15);
  overflow: hidden;
}

.room-badge {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

.room-badge strong {
  color: var(--gold);
  letter-spacing: 0.18em;
  margin-left: 0.3rem;
}

.status {
  flex: 1;
  text-align: center;
  font-size: clamp(0.72rem, 1.6vmin, 0.88rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: var(--cream);
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
  padding: 0 0.15rem;
}

/* 右侧在座玩家榜（可收起） */
.roster-panel {
  position: absolute;
  top: calc(var(--topbar-h) + 0.35rem);
  right: var(--side-gap);
  z-index: 14;
  display: flex;
  flex-direction: row-reverse;
  align-items: stretch;
  max-height: calc(100% - var(--topbar-h) - var(--action-h) - 0.7rem);
  pointer-events: none;
}

.roster-panel > * {
  pointer-events: auto;
}

.roster-toggle {
  writing-mode: vertical-rl;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-width: 1.7rem;
  padding: 0.55rem 0.2rem;
  border: 0.08rem solid rgba(200, 160, 90, 0.45);
  border-right: none;
  border-radius: 0.45rem 0 0 0.45rem;
  background: rgba(12, 14, 12, 0.82);
  color: #f0e2c0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
  box-shadow: -0.15rem 0.2rem 0.7rem rgba(0, 0, 0, 0.35);
}

.roster-toggle-arrow {
  writing-mode: horizontal-tb;
  font-size: 0.95rem;
  line-height: 1;
  color: #e8c56a;
  transition: transform 0.2s ease;
}

.roster-panel.collapsed .roster-toggle {
  border-right: 0.08rem solid rgba(200, 160, 90, 0.45);
  border-radius: 0.45rem;
}

.roster-panel.collapsed .roster-toggle-arrow {
  transform: rotate(180deg);
}

.roster-body {
  /* 固定栏宽：名字弹性截断，筹码/盈亏列对齐 */
  width: min(16.5rem, 28vw);
  min-width: 14.5rem;
  max-width: min(22rem, 32vw);
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 0.08rem solid rgba(200, 160, 90, 0.4);
  border-right: none;
  border-radius: 0.5rem 0 0 0.5rem;
  background: rgba(10, 12, 11, 0.88);
  box-shadow: -0.2rem 0.25rem 0.9rem rgba(0, 0, 0, 0.4);
  overflow: hidden;
  transform-origin: right center;
  transition: width 0.22s ease, min-width 0.22s ease, max-width 0.22s ease, opacity 0.18s ease, border-width 0.18s ease;
}

.roster-panel.collapsed .roster-body {
  width: 0;
  min-width: 0;
  max-width: 0;
  opacity: 0;
  border-width: 0;
  pointer-events: none;
}

.roster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.4rem 0.55rem 0.3rem;
  border-bottom: 0.06rem solid rgba(212, 160, 23, 0.22);
  color: #f3e7c8;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

.roster-count {
  min-width: 1.2rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999rem;
  background: rgba(212, 160, 23, 0.22);
  color: #ffd56a;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
}

.roster-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.5rem 3.5rem;
  gap: 0.2rem 0.45rem;
  align-items: center;
  padding: 0.28rem 0.55rem 0.2rem;
  color: rgba(243, 239, 230, 0.55);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.roster-col.name {
  padding-left: 0.1rem;
  min-width: 0;
}

.roster-col.sort-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  cursor: pointer;
  text-align: right;
  white-space: nowrap;
  justify-self: stretch;
}

.roster-col.sort-btn[aria-pressed='true'] {
  color: #ffd56a;
  font-weight: 700;
}

.roster-col .sort-mark {
  display: inline-block;
  min-width: 0.7em;
  font-size: 0.72em;
}

.roster-list {
  list-style: none;
  margin: 0;
  padding: 0.1rem 0 0.35rem;
  overflow-y: auto;
  min-height: 0;
  flex: 1;
}

.roster-panel.is-ranking .roster-cols,
.roster-panel.is-ranking .roster-row.is-rank-row {
  grid-template-columns: 2rem minmax(0, 1fr) 3.8rem;
}

.roster-col.rank {
  text-align: center;
  padding-left: 0;
}

.roster-rank {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: #ffd56a;
  font-size: 0.78rem;
}

.roster-row.is-rank-row:nth-child(1) .roster-rank {
  color: #ffd56a;
}
.roster-row.is-rank-row:nth-child(2) .roster-rank {
  color: #d0d7de;
}
.roster-row.is-rank-row:nth-child(3) .roster-rank {
  color: #d4a574;
}

.roster-name .out-tag {
  margin-left: 0.2rem;
  font-size: 0.62rem;
  font-weight: 700;
  /* 子标签不受昵称渐变裁切影响 */
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: rgba(229, 115, 115, 0.95);
  color: rgba(229, 115, 115, 0.95);
}

.roster-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.5rem 3.5rem;
  gap: 0.2rem 0.45rem;
  align-items: center;
  padding: 0.28rem 0.55rem;
  border-top: 0.04rem solid rgba(255, 255, 255, 0.04);
  font-size: 0.78rem;
}

.roster-row:nth-child(odd) {
  background: rgba(255, 255, 255, 0.03);
}

.roster-row.is-you {
  background: rgba(212, 160, 23, 0.14);
}

.roster-row.is-eliminated {
  opacity: 0.55;
}

.roster-name {
  display: flex;
  align-items: center;
  gap: 0.22rem;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  font-weight: 600;
}

.roster-name-text {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: linear-gradient(165deg, #f8e6a8 0%, #e8c56a 38%, #d4a017 72%, #a87a12 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.roster-name .you-tag {
  flex: 0 0 auto;
  margin-left: 0;
  font-size: 0.68rem;
  font-weight: 700;
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: #ffe08a;
  color: #ffe08a;
}

.roster-name .ai-tag {
  flex: 0 0 auto;
  margin-left: 0;
  padding: 0.05rem 0.28rem;
  border-radius: 0.2rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(40, 72, 58, 0.85);
  border: 0.05rem solid rgba(120, 200, 160, 0.4);
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: #b8f0d0;
  color: #b8f0d0;
}

.roster-name .out-tag {
  flex: 0 0 auto;
}

.roster-row.is-ai .roster-chips {
  color: #b8f0d0;
}

.roster-chips {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #e8c56a;
}

.roster-profit {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.roster-profit.up { color: #7dcea0; }
.roster-profit.down { color: #e57373; }
.roster-profit.flat { color: rgba(243, 239, 230, 0.55); }

.roster-empty {
  padding: 0.7rem 0.55rem;
  text-align: center;
  color: rgba(243, 239, 230, 0.45);
  font-size: 0.75rem;
}

/* 左上角牌型大小说明图：限制高度，给左下聊天留空 */
.hand-ranks-panel {
  position: absolute;
  top: calc(var(--topbar-h) + 0.3rem);
  left: var(--side-gap);
  z-index: 12;
  width: 7.6rem;
  max-height: 10.5rem;
  pointer-events: auto;
  cursor: zoom-in;
  border-radius: 0.35rem;
  overflow: hidden;
  box-shadow: 0 0.25rem 0.8rem rgba(0, 0, 0, 0.45);
  border: 0.08rem solid rgba(160, 120, 70, 0.55);
  background: rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hand-ranks-panel:hover {
  transform: scale(1.03);
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.55);
}

.hand-ranks-panel img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 10.5rem;
  object-fit: contain;
  object-position: top center;
  pointer-events: none;
}

/* 牌型说明放大弹窗 */
.hand-ranks-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.hand-ranks-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  cursor: pointer;
}

.hand-ranks-modal-dialog {
  position: relative;
  z-index: 1;
  max-width: min(28rem, 92vw);
  max-height: min(92vh, 56rem);
  padding: 0.55rem;
  border-radius: 0.55rem;
  background: rgba(18, 14, 10, 0.96);
  border: 0.1rem solid rgba(200, 160, 90, 0.55);
  box-shadow: 0 0.6rem 2rem rgba(0, 0, 0, 0.55);
  animation: ranks-pop 0.22s ease-out;
}

.hand-ranks-modal-dialog img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(84vh, 52rem);
  object-fit: contain;
  border-radius: 0.3rem;
}

.hand-ranks-modal-close {
  position: absolute;
  top: -0.55rem;
  right: -0.55rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999rem;
  background: #c45c26;
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0.15rem 0.4rem rgba(0, 0, 0, 0.4);
}

.hand-ranks-modal-close:hover {
  background: #d96a30;
}

@keyframes ranks-pop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.felt {
  display: grid;
  place-items: center;
  padding: 0.55rem 0.7rem;
  /* 给底部半透明操作台留出可视空间，台面可透过操作台看见 */
  padding-bottom: calc(var(--action-h) * 0.45);
  min-height: 0;
  /* 矩形裁切即可；椭圆裁切改由 .felt-surface，避免切掉边缘座位卡 */
  overflow: hidden;
}

.felt-inner {
  position: relative;
  /* 画布内定死桌面尺寸；overflow 放开给座位/气泡，绿色椭圆另层裁切 */
  width: 1100px;
  height: 520px;
  max-width: 100%;
  max-height: 100%;
  overflow: visible;
  background: transparent;
}

.felt-surface {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: 50% / 42%;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 45%, #247a4c 0%, var(--felt) 45%, var(--felt-deep) 100%);
  box-shadow:
    inset 0 0 0 0.55rem var(--felt-rim),
    inset 0 0 0 0.8rem #5c3a1a,
    0 1.1rem 2.6rem rgba(0, 0, 0, 0.55);
}

.table-hud {
  position: absolute;
  /* 再下移一点，躲开上沿座位注码；图层高于普通座位，低于聊天气泡 */
  top: 24%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 14;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.22rem;
  width: min(34rem, 72%);
  pointer-events: none;
  max-height: 28%;
}

/* 全场行动播报：固定在底池上方 */
.action-broadcast {
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.38rem 0.85rem;
  border-radius: 0.55rem;
  background: rgba(8, 12, 10, 0.82);
  border: 0.1rem solid rgba(240, 200, 120, 0.55);
  color: #ffe9b8;
  font-size: clamp(0.8rem, 2.1vmin, 1.05rem);
  font-weight: 650;
  text-align: center;
  letter-spacing: 0.01em;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-shadow: 0 0.2rem 0.7rem rgba(0, 0, 0, 0.4);
  animation: broadcast-in 0.28s ease-out;
}

/* 开局提示：分段标签，避免一长串被裁切 */
.action-broadcast.hand-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.28rem 0.35rem;
  padding: 0.42rem 0.7rem;
  font-weight: 600;
}

.action-broadcast .hm-hand {
  flex: 0 0 auto;
  padding: 0.12rem 0.55rem;
  border-radius: 999rem;
  background: rgba(255, 213, 106, 0.16);
  border: 0.06rem solid rgba(255, 213, 106, 0.4);
  color: #ffe7a8;
  font-weight: 800;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.action-broadcast .hm-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.22rem;
  max-width: 100%;
  padding: 0.1rem 0.45rem;
  border-radius: 999rem;
  background: rgba(255, 255, 255, 0.06);
  border: 0.05rem solid rgba(255, 255, 255, 0.1);
  color: rgba(243, 239, 230, 0.88);
  font-size: 0.92em;
  font-weight: 600;
  line-height: 1.25;
}

.action-broadcast .hm-chip .hm-k {
  color: rgba(243, 239, 230, 0.52);
  font-size: 0.86em;
  font-weight: 600;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.action-broadcast .hm-chip .hm-v {
  color: #ffe9b8;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 7.5rem;
}

.action-broadcast .hm-note {
  flex: 1 1 100%;
  margin: 0.05rem 0 0;
  padding: 0;
  color: rgba(255, 213, 106, 0.78);
  font-size: 0.78em;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.action-broadcast.fold {
  border-color: rgba(180, 90, 90, 0.65);
  color: #ffc8c8;
  animation: broadcast-in 0.28s ease-out, broadcast-fold-drift 0.7s ease-out;
}
.action-broadcast.check {
  border-color: rgba(140, 160, 180, 0.55);
  color: #d8e4f0;
  animation: broadcast-in 0.28s ease-out, broadcast-soft-ping 0.55s ease-out;
}
.action-broadcast.call {
  border-color: rgba(90, 180, 120, 0.65);
  color: #c8f0d4;
  animation: broadcast-in 0.28s ease-out, broadcast-call-pop 0.5s ease-out;
}
.action-broadcast.bet,
.action-broadcast.raise {
  border-color: rgba(255, 150, 80, 0.75);
  color: #ffd2a8;
  background: rgba(60, 28, 12, 0.88);
  animation: broadcast-in 0.28s ease-out, broadcast-raise-punch 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
.action-broadcast.openface,
.action-broadcast.show {
  color: #ffe7a0;
  border-color: rgba(240, 200, 90, 0.55);
  background: rgba(60, 42, 12, 0.78);
}

.action-broadcast.allin {
  border-color: rgba(255, 80, 40, 0.95);
  color: #ffe0a8;
  background: rgba(80, 12, 8, 0.92);
  text-shadow: 0 0 0.6rem rgba(255, 90, 40, 0.55);
  animation: broadcast-in 0.28s ease-out, allin-broadcast-pulse 0.7s ease-in-out 2;
}

@keyframes broadcast-fold-drift {
  0% { filter: brightness(1.15); transform: translateY(-0.2rem) scale(1.02); }
  100% { filter: brightness(1); transform: none; }
}
@keyframes broadcast-soft-ping {
  0% { box-shadow: 0 0 0 0 rgba(160, 190, 220, 0.55); }
  100% { box-shadow: 0 0.2rem 0.7rem rgba(0, 0, 0, 0.4); }
}
@keyframes broadcast-call-pop {
  0% { transform: scale(0.94); }
  55% { transform: scale(1.05); }
  100% { transform: none; }
}
@keyframes broadcast-raise-punch {
  0% { transform: scale(0.88) translateY(0.25rem); }
  60% { transform: scale(1.08) translateY(-0.1rem); }
  100% { transform: none; }
}

@keyframes allin-broadcast-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

/* —— ALL IN 震撼动画 —— */
.allin-fx {
  position: absolute;
  inset: 0;
  z-index: 28;
  pointer-events: none;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.allin-fx[hidden] {
  display: none !important;
}

.allin-flash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 120, 40, 0.55), transparent 55%),
    rgba(255, 40, 20, 0.28);
  animation: allin-flash 0.85s ease-out forwards;
}

.allin-rings {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 0.1rem;
  height: 0.1rem;
}

.allin-rings::before,
.allin-rings::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  border: 0.22rem solid rgba(255, 170, 60, 0.85);
  transform: translate(-50%, -50%) scale(0.15);
  animation: allin-ring 0.95s ease-out forwards;
}

.allin-rings::after {
  border-color: rgba(255, 70, 40, 0.7);
  animation-delay: 0.12s;
}

.allin-boom {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0.6rem 1.4rem 0.75rem;
  transform: scale(0.4);
  opacity: 0;
  animation: allin-boom-in 0.55s cubic-bezier(0.15, 0.95, 0.3, 1.2) forwards;
  filter: drop-shadow(0 0 1.2rem rgba(255, 90, 30, 0.7));
}

.allin-eyebrow {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #ffe2b0;
  margin-bottom: 0.15rem;
  text-shadow: 0 0.12rem 0.4rem rgba(0, 0, 0, 0.65);
}

.allin-title {
  font-family: var(--font-ui);
  font-size: clamp(2.8rem, 8vmin, 4.6rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.08em;
  color: #fff4d0;
  text-shadow:
    0 0 0.15rem #ff3b1f,
    0 0 0.55rem #ff6a20,
    0 0.2rem 0 #7a1208,
    0 0.35rem 0.1rem rgba(0, 0, 0, 0.45);
  animation: allin-title-shake 0.45s ease-in-out 0.15s 2;
}

.allin-amount {
  margin-top: 0.35rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffd56a;
  letter-spacing: 0.06em;
  text-shadow: 0 0.1rem 0.35rem rgba(0, 0, 0, 0.55);
}

.felt-inner.allin-shake {
  animation: allin-table-shake 0.55s ease-in-out;
}

.seat.allin-slam .seat-card,
.hole-wrap.allin-slam {
  border-color: #ff6a30 !important;
  box-shadow:
    0 0 0 0.18rem rgba(255, 100, 40, 0.65),
    0 0 1.8rem rgba(255, 80, 20, 0.75) !important;
  animation: allin-seat-slam 0.7s ease-out;
}

@keyframes allin-flash {
  0% { opacity: 0; }
  18% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes allin-ring {
  to {
    opacity: 0;
    width: 22rem;
    height: 22rem;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes allin-boom-in {
  0% { opacity: 0; transform: scale(0.35) translateY(1.2rem); }
  55% { opacity: 1; transform: scale(1.12) translateY(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes allin-title-shake {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  25% { transform: translateX(-0.35rem) rotate(-1.5deg); }
  75% { transform: translateX(0.35rem) rotate(1.5deg); }
}

@keyframes allin-table-shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-0.35rem, 0.2rem); }
  40% { transform: translate(0.4rem, -0.15rem); }
  60% { transform: translate(-0.25rem, -0.2rem); }
  80% { transform: translate(0.2rem, 0.15rem); }
}

@keyframes allin-seat-slam {
  0% { transform: scale(0.85); }
  40% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* —— 行动气氛特效（弃牌 / 过牌 / 跟注 / 加注） —— */
.action-fx-layer {
  position: absolute;
  inset: 0;
  z-index: 26;
  pointer-events: none;
  overflow: hidden;
}

.action-stamp {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  padding: 0.28rem 0.7rem;
  border-radius: 0.4rem;
  font-size: clamp(0.85rem, 2.2vmin, 1.15rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
  pointer-events: none;
  animation: action-stamp-pop 0.85s cubic-bezier(0.15, 0.9, 0.3, 1.1) forwards;
  box-shadow: 0 0.2rem 0.7rem rgba(0, 0, 0, 0.45);
}

.action-stamp.fold {
  color: #ffd0d0;
  background: rgba(70, 18, 18, 0.92);
  border: 0.1rem solid rgba(255, 120, 120, 0.7);
}
.action-stamp.check {
  color: #e4eef8;
  background: rgba(28, 38, 48, 0.9);
  border: 0.1rem solid rgba(160, 190, 220, 0.55);
}
.action-stamp.call {
  color: #d4ffe4;
  background: rgba(14, 48, 28, 0.92);
  border: 0.1rem solid rgba(90, 210, 140, 0.7);
}
.action-stamp.bet,
.action-stamp.raise {
  color: #ffe2c0;
  background: rgba(72, 28, 8, 0.94);
  border: 0.1rem solid rgba(255, 150, 70, 0.8);
  text-shadow: 0 0 0.45rem rgba(255, 120, 40, 0.45);
}

@keyframes action-stamp-pop {
  0% { opacity: 0; transform: translate(-50%, -40%) scale(0.55); filter: blur(0.12rem); }
  35% { opacity: 1; transform: translate(-50%, -58%) scale(1.12); filter: none; }
  70% { opacity: 1; transform: translate(-50%, -62%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -78%) scale(0.92); }
}

.action-ripple {
  position: absolute;
  left: 0;
  top: 0;
  width: 0.2rem;
  height: 0.2rem;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.2);
  animation: action-ripple-out 0.7s ease-out forwards;
}

.action-ripple.check {
  border: 0.16rem solid rgba(170, 200, 230, 0.75);
  box-shadow: 0 0 0.6rem rgba(140, 180, 220, 0.35);
}
.action-ripple.call {
  border: 0.16rem solid rgba(90, 210, 140, 0.7);
}
.action-ripple.raise,
.action-ripple.bet {
  border: 0.18rem solid rgba(255, 150, 70, 0.8);
  box-shadow: 0 0 0.8rem rgba(255, 120, 40, 0.35);
}
.action-ripple.fold {
  border: 0.16rem solid rgba(200, 100, 100, 0.55);
}

@keyframes action-ripple-out {
  to {
    opacity: 0;
    width: 9rem;
    height: 9rem;
    transform: translate(-50%, -50%) scale(1);
  }
}

.felt-inner.action-fold-wash {
  animation: action-fold-wash 0.65s ease-out;
}

@keyframes action-fold-wash {
  0% { filter: brightness(1); }
  30% { filter: brightness(0.82) saturate(0.85); }
  100% { filter: none; }
}

.felt-inner.action-raise-flash {
  animation: action-raise-flash 0.55s ease-out;
}

@keyframes action-raise-flash {
  0% { filter: brightness(1); }
  25% { filter: brightness(1.12) saturate(1.15); }
  100% { filter: none; }
}

.seat.action-fx-fold .seat-card,
.hole-wrap.action-fx-fold {
  animation: seat-fold-out 0.75s ease-out;
}

.seat.action-fx-fold .seat-cards {
  animation: seat-cards-fold 0.7s ease-out forwards;
}

@keyframes seat-fold-out {
  0% { filter: brightness(1); transform: scale(1); }
  40% { filter: brightness(0.75) grayscale(0.35); transform: scale(0.96); }
  100% { filter: grayscale(0.45); transform: scale(1); }
}

@keyframes seat-cards-fold {
  0% { opacity: 1; transform: translateY(0) rotate(0deg); }
  100% { opacity: 0.35; transform: translateY(0.35rem) rotate(-8deg); filter: grayscale(0.7); }
}

.seat.action-fx-check .seat-card,
.hole-wrap.action-fx-check {
  animation: seat-check-ping 0.55s ease-out;
}

@keyframes seat-check-ping {
  0% { box-shadow: 0 0 0 0 rgba(160, 190, 220, 0.55); }
  100% { box-shadow: 0 0.15rem 0.55rem rgba(0, 0, 0, 0.35); }
}

.seat.action-fx-call .seat-card,
.hole-wrap.action-fx-call {
  animation: seat-call-pulse 0.6s ease-out;
  border-color: rgba(90, 200, 130, 0.85) !important;
}

@keyframes seat-call-pulse {
  0% { transform: scale(0.96); box-shadow: 0 0 0 0 rgba(90, 200, 130, 0.5); }
  50% { transform: scale(1.06); box-shadow: 0 0 0 0.25rem rgba(90, 200, 130, 0.35); }
  100% { transform: scale(1); }
}

.seat.action-fx-raise .seat-card,
.hole-wrap.action-fx-raise,
.seat.action-fx-bet .seat-card,
.hole-wrap.action-fx-bet {
  animation: seat-raise-slam 0.65s cubic-bezier(0.15, 0.9, 0.3, 1.15);
  border-color: rgba(255, 150, 70, 0.9) !important;
  box-shadow:
    0 0 0 0.14rem rgba(255, 140, 50, 0.55),
    0 0 1.2rem rgba(255, 110, 30, 0.45) !important;
}

@keyframes seat-raise-slam {
  0% { transform: scale(0.88) translateY(0.2rem); }
  45% { transform: scale(1.1) translateY(-0.12rem); }
  100% { transform: scale(1) translateY(0); }
}

.action-fly-chip {
  position: absolute;
  left: 0;
  top: 0;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.48rem;
  font-weight: 800;
  color: #1a1208;
  pointer-events: none;
  z-index: 27;
  box-shadow: 0 0.1rem 0.35rem rgba(0, 0, 0, 0.45);
  animation: action-chip-to-pot 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

@keyframes action-chip-to-pot {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
  }
  100% {
    opacity: 0.15;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.55);
  }
}

.turn-broadcast {
  max-width: 100%;
  padding: 0.22rem 0.7rem;
  border-radius: 999rem;
  background: rgba(18, 22, 16, 0.88);
  border: var(--line) solid rgba(212, 160, 23, 0.55);
  color: #f0d78a;
  font-size: clamp(0.72rem, 1.7vmin, 0.88rem);
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0.15rem 0.55rem rgba(0, 0, 0, 0.45);
}

.turn-broadcast.urgent {
  background: rgba(180, 40, 30, 0.35);
  border-color: rgba(255, 110, 80, 0.75);
  color: #ffd0c0;
  animation: turn-urgent-pulse 0.7s ease-in-out infinite;
}

.mtt-wait-banner {
  max-width: min(92%, 26rem);
  margin: 0.15rem auto 0;
  padding: 0.4rem 0.85rem;
  border-radius: 0.55rem;
  background: rgba(12, 28, 22, 0.92);
  border: 1px solid rgba(120, 200, 160, 0.45);
  color: #d8f5e6;
  font-size: clamp(0.78rem, 1.9vmin, 0.95rem);
  text-align: center;
  line-height: 1.35;
  letter-spacing: 0.02em;
  box-shadow: 0 0.2rem 0.7rem rgba(0, 0, 0, 0.4);
  animation: mtt-wait-in 0.35s ease-out;
}

.mtt-wait-banner.is-results {
  border-color: rgba(212, 160, 23, 0.55);
  color: #f5e6b8;
  background: rgba(28, 22, 10, 0.92);
}

@keyframes mtt-wait-in {
  from { opacity: 0; transform: translateY(-0.25rem); }
  to { opacity: 1; transform: none; }
}

/* MTT 并桌 / 下一轮对手就位 · 转场遮罩 */
.mtt-transit {
  position: absolute;
  inset: 0;
  z-index: 28;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
}
.mtt-transit:not([hidden]) {
  animation: mtt-transit-in 0.45s ease-out forwards;
}
.mtt-transit.is-out {
  animation: mtt-transit-out 0.4s ease-in forwards;
}
.mtt-transit-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 48%, rgba(8, 28, 20, 0.55), rgba(4, 10, 8, 0.78)),
    rgba(0, 0, 0, 0.35);
}
.mtt-transit-card {
  position: relative;
  z-index: 1;
  min-width: min(17rem, 78%);
  max-width: 22rem;
  padding: 1rem 1.35rem 1.15rem;
  border-radius: 0.9rem;
  text-align: center;
  background: linear-gradient(165deg, rgba(16, 36, 28, 0.96), rgba(8, 18, 14, 0.94));
  border: 1px solid rgba(140, 210, 170, 0.55);
  box-shadow:
    0 0 0 1px rgba(80, 140, 110, 0.2),
    0 0.55rem 1.8rem rgba(0, 0, 0, 0.55),
    0 0 2rem rgba(70, 180, 120, 0.22);
  transform: translateY(0.4rem) scale(0.94);
  animation: mtt-transit-card-in 0.5s cubic-bezier(0.2, 0.9, 0.25, 1.1) 0.05s both;
}
.mtt-transit-eyebrow {
  margin: 0 0 0.3rem;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  color: #9fd9b8;
  font-weight: 700;
}
.mtt-transit-title {
  margin: 0;
  font-size: clamp(1.2rem, 3.2vmin, 1.55rem);
  font-weight: 800;
  color: #f2fff8;
  letter-spacing: 0.06em;
  text-shadow: 0 0 0.9rem rgba(120, 220, 160, 0.35);
  line-height: 1.25;
}
.mtt-transit-sub {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  color: rgba(210, 240, 222, 0.82);
  letter-spacing: 0.04em;
  line-height: 1.35;
}
@keyframes mtt-transit-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes mtt-transit-out {
  to { opacity: 0; }
}
@keyframes mtt-transit-card-in {
  from { opacity: 0; transform: translateY(0.85rem) scale(0.9); }
  to { opacity: 1; transform: none; }
}

@keyframes turn-urgent-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

@keyframes broadcast-in {
  from { opacity: 0; transform: translateY(-0.35rem) scale(0.96); }
  to { opacity: 1; transform: none; }
}

/* 底池 + 当前注额：同一行左右排，少占纵向空间 */
.pot-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.55rem;
  max-width: 100%;
}

.pot {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.28rem 0.85rem;
  border-radius: 999rem;
  font-weight: 700;
  font-size: clamp(0.78rem, 1.8vmin, 0.95rem);
  color: var(--gold);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.pot .pot-label {
  font-weight: 600;
  opacity: 0.9;
}

.pot strong {
  font-size: 1.05em;
}

/* —— 台面筹码（8 色规格） —— */
.poker-chip {
  --chip: #c8c2b4;
  --chip-ink: #1a1814;
  --chip-rim: rgba(255, 255, 255, 0.88);
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.45), transparent 42%),
    radial-gradient(circle at 50% 55%, var(--chip) 0 58%, color-mix(in srgb, var(--chip) 70%, #000) 100%);
  color: var(--chip-ink);
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  border: 0.11rem dashed var(--chip-rim);
  box-shadow:
    0 0.12rem 0.2rem rgba(0, 0, 0, 0.45),
    inset 0 0 0 0.12rem color-mix(in srgb, var(--chip) 55%, #000);
  user-select: none;
  flex-shrink: 0;
}

.poker-chip[data-v='10'] {
  --chip: #efe8dc;
  --chip-ink: #3a342c;
}
.poker-chip[data-v='50'] {
  --chip: #c62828;
  --chip-ink: #fff4f0;
  --chip-rim: rgba(255, 220, 210, 0.9);
}
.poker-chip[data-v='100'] {
  --chip: #1565c0;
  --chip-ink: #eef6ff;
  --chip-rim: rgba(210, 230, 255, 0.9);
}
.poker-chip[data-v='200'] {
  --chip: #2e7d32;
  --chip-ink: #eefaf0;
  --chip-rim: rgba(210, 245, 215, 0.9);
}
.poker-chip[data-v='500'] {
  --chip: #212121;
  --chip-ink: #f5f0e6;
  --chip-rim: rgba(240, 220, 160, 0.85);
}
.poker-chip[data-v='1000'] {
  --chip: #6a1b9a;
  --chip-ink: #f8efff;
  --chip-rim: rgba(230, 200, 255, 0.9);
}
.poker-chip[data-v='2000'] {
  --chip: #ef6c00;
  --chip-ink: #fff8f0;
  --chip-rim: rgba(255, 230, 190, 0.9);
}
.poker-chip[data-v='5000'] {
  --chip: #ad1457;
  --chip-ink: #fff0f6;
  --chip-rim: rgba(255, 200, 220, 0.9);
}
.poker-chip.odd {
  --chip: #8d7a55;
  --chip-ink: #fff8e8;
  font-size: 0.45rem;
}

.chip-pile {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.2rem;
  flex-wrap: wrap;
  max-width: 100%;
  pointer-events: none;
}

.chip-pile.compact .poker-chip {
  width: 1.25rem;
  height: 1.25rem;
  font-size: 0.4rem;
  border-width: 0.09rem;
}

.chip-col {
  position: relative;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  min-height: 1.55rem;
}

.chip-col .poker-chip {
  margin-top: -0.72rem;
}

.chip-col .poker-chip:last-child {
  margin-top: 0;
}

.chip-x {
  position: absolute;
  top: -0.55rem;
  right: -0.45rem;
  z-index: 2;
  min-width: 1rem;
  padding: 0.05rem 0.22rem;
  border-radius: 999rem;
  background: rgba(0, 0, 0, 0.75);
  color: #ffe9a8;
  font-size: 0.55rem;
  font-weight: 700;
  line-height: 1.2;
}

.chip-amt {
  margin-left: 0.15rem;
  padding: 0.1rem 0.35rem;
  border-radius: 999rem;
  background: rgba(0, 0, 0, 0.55);
  color: #ffe7a0;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.chip-pile .bet-tag {
  align-self: center;
  margin-right: 0.1rem;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f0e0b0;
  opacity: 0.9;
}

.chip-pile.seat-bet {
  position: absolute;
  z-index: 6; /* 高于座位卡片，低于聊天气泡 */
  white-space: nowrap;
  pointer-events: none;
}

/* 默认/下沿：注码在座位上方（朝桌心） */
.chip-pile.seat-bet.chip-above {
  left: 50%;
  top: 0;
  right: auto;
  bottom: auto;
  transform: translate(-50%, calc(-100% - 0.15rem));
}

/* 对面/上沿：注码改到座位下方（朝桌心），避免被台面裁切 */
.chip-pile.seat-bet.chip-below {
  left: 50%;
  top: 100%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, 0.12rem);
  /* 金额过长时不要横向铺进中央播报 */
  max-width: 7.5rem;
}

/* 左侧：注码向右朝桌心 */
.chip-pile.seat-bet.chip-right {
  left: 100%;
  top: 50%;
  right: auto;
  bottom: auto;
  transform: translate(0.15rem, -50%);
}

/* 右侧：注码向左朝桌心 */
.chip-pile.seat-bet.chip-left {
  right: 100%;
  left: auto;
  top: 50%;
  bottom: auto;
  transform: translate(-0.15rem, -50%);
}

.chip-pile.seat-bet.leading {
  filter: drop-shadow(0 0 0.35rem rgba(255, 220, 120, 0.65));
}

/* 座位注码不要盖住公共牌区域附近时的可读性 */
.seat .chip-pile:not(.seat-bet) {
  position: relative;
  z-index: 1;
}

.pot-chips {
  position: absolute;
  top: 33%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3; /* 低于公共牌，避免遮挡 */
  display: flex;
  margin-top: 0;
  min-height: 0;
  max-width: min(22rem, 70%);
  justify-content: center;
  pointer-events: none;
}

.pot-chips .poker-chip {
  width: 1.25rem;
  height: 1.25rem;
  font-size: 0.4rem;
}

.pot-chips .chip-pile {
  max-width: 100%;
}

.pot-chips .chip-amt {
  font-size: 0.65rem;
}

.chip-legend {
  position: absolute;
  left: 50%;
  bottom: 3.5%;
  transform: translateX(-50%);
  z-index: 1; /* 低于公共牌与座位注码 */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.15rem 0.4rem;
  border-radius: 999rem;
  background: rgba(0, 0, 0, 0.22);
  pointer-events: none;
  opacity: 0.72;
}

.chip-legend .poker-chip {
  width: 1.15rem;
  height: 1.15rem;
  font-size: 0.36rem;
  border-width: 0.08rem;
}

.chip-legend .legend-item {
  display: inline-flex;
}

.to-call-banner {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.28rem 0.85rem;
  border-radius: 999rem;
  background: linear-gradient(180deg, rgba(196, 92, 38, 0.96), rgba(140, 55, 18, 0.98));
  border: 0.08rem solid rgba(255, 210, 160, 0.55);
  box-shadow: 0 0.2rem 0.7rem rgba(0, 0, 0, 0.45);
  color: #fff7ef;
  white-space: nowrap;
}

.to-call-banner .to-call-label {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  opacity: 0.9;
}

.to-call-banner strong {
  font-size: clamp(0.95rem, 2.4vmin, 1.2rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.board {
  position: absolute;
  top: 52%; /* 略下移，给上方注额/底池留空 */
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: clamp(0.2rem, 0.8vmin, 0.45rem);
  z-index: 8; /* 压过筹码；仍低于 table-hud(11)，避免挡住注额 */
  min-height: var(--card-h);
}

/* —— 每手胜者 / 筹码飞行动效 —— */
.self-win-anchor {
  position: absolute;
  left: 50%;
  top: 72%;
  width: 0.1rem;
  height: 0.1rem;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}

.win-fx {
  position: absolute;
  inset: 0;
  z-index: 25;
  pointer-events: none;
  overflow: hidden;
}

.win-banner {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%) scale(0.86);
  min-width: min(16rem, 72%);
  padding: 0.7rem 1.25rem 0.8rem;
  border-radius: 0.85rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(48, 32, 8, 0.94), rgba(14, 10, 6, 0.9));
  border: 0.12rem solid rgba(255, 214, 110, 0.85);
  box-shadow:
    0 0 0 0.14rem rgba(255, 220, 120, 0.22),
    0 0.5rem 1.6rem rgba(0, 0, 0, 0.5),
    0 0 2.4rem rgba(255, 190, 40, 0.45);
  opacity: 0;
  animation: win-banner-in 0.5s cubic-bezier(0.2, 0.9, 0.25, 1.15) forwards;
  z-index: 3;
}

.win-banner.out {
  animation: win-banner-out 0.35s ease-in forwards;
}

.win-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: #ffe08a;
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.win-banner-text {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff6d8;
  line-height: 1.25;
  text-shadow: 0 0 0.8rem rgba(255, 200, 60, 0.45);
}

.win-banner-text .win-amt {
  color: #ffd56a;
  font-size: 1.55rem;
}

.win-banner-sub {
  margin-top: 0.28rem;
  font-size: 0.78rem;
  color: rgba(255, 236, 180, 0.78);
  letter-spacing: 0.04em;
}

@keyframes win-banner-in {
  0% { opacity: 0; transform: translate(-50%, -35%) scale(0.72); }
  70% { opacity: 1; transform: translate(-50%, -52%) scale(1.05); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes win-banner-out {
  to { opacity: 0; transform: translate(-50%, -58%) scale(0.92); }
}

/* 仅赢家本机：彩屑庆祝 */
.win-confetti {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.win-confetti .shard {
  position: absolute;
  top: -8%;
  left: var(--x);
  width: var(--w);
  height: var(--h);
  background: var(--c);
  border-radius: 0.12rem;
  opacity: 0;
  animation: confetti-fall var(--dur) ease-in forwards;
  animation-delay: var(--delay);
  transform: rotate(var(--rot));
}

.win-confetti .shard.circle {
  border-radius: 50%;
}

.win-confetti .shard.ribbon {
  width: 0.22rem;
  height: 0.9rem;
}

@keyframes confetti-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(var(--rot)) scale(0.6);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift), 118%, 0) rotate(calc(var(--rot) + 360deg)) scale(0.9);
  }
}

.win-burst {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 0.1rem;
  height: 0.1rem;
  z-index: 1;
  pointer-events: none;
}

.win-burst::before,
.win-burst::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  border: 0.18rem solid rgba(255, 214, 100, 0.75);
  transform: translate(-50%, -50%) scale(0.2);
  animation: win-ring 0.9s ease-out forwards;
}

.win-burst::after {
  animation-delay: 0.18s;
  border-color: rgba(255, 170, 60, 0.55);
}

@keyframes win-ring {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(3.2);
  }
}

.fly-chip {
  position: absolute;
  z-index: 26;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.4rem;
  font-weight: 800;
  color: #1a1814;
  border: 0.1rem dashed rgba(255, 255, 255, 0.85);
  box-shadow: 0 0.15rem 0.35rem rgba(0, 0, 0, 0.4);
  animation: chip-fly 0.85s cubic-bezier(0.2, 0.75, 0.2, 1) forwards;
  will-change: transform, opacity;
}

.fly-chip[data-v='10'] { background: radial-gradient(circle at 30% 30%, #fff, #d9d2c4); }
.fly-chip[data-v='50'] { background: radial-gradient(circle at 30% 30%, #ef5350, #b71c1c); color: #fff; }
.fly-chip[data-v='100'] { background: radial-gradient(circle at 30% 30%, #42a5f5, #1565c0); color: #fff; }
.fly-chip[data-v='200'] { background: radial-gradient(circle at 30% 30%, #66bb6a, #2e7d32); color: #fff; }
.fly-chip[data-v='500'] { background: radial-gradient(circle at 30% 30%, #616161, #212121); color: #f5f0e6; }
.fly-chip[data-v='1000'] { background: radial-gradient(circle at 30% 30%, #ab47bc, #6a1b9a); color: #fff; }
.fly-chip[data-v='2000'] { background: radial-gradient(circle at 30% 30%, #ffa726, #ef6c00); color: #fff; }
.fly-chip[data-v='5000'] { background: radial-gradient(circle at 30% 30%, #ec407a, #ad1457); color: #fff; }

@keyframes chip-fly {
  0% {
    transform: translate(-50%, -50%) scale(0.85);
    opacity: 0;
  }
  12% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
  }
  100% {
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.55);
    opacity: 0;
  }
}

.seat.hand-winner {
  z-index: 7;
}

.seat.hand-winner .seat-card {
  border-color: #f0c84a;
  box-shadow:
    0 0 0 0.16rem rgba(240, 200, 74, 0.55),
    0 0 1.6rem rgba(255, 200, 60, 0.55);
  animation: winner-glow 0.9s ease-in-out 3;
}

.seat.hand-winner .seat-card::after {
  content: '胜';
  position: absolute;
  right: -0.35rem;
  top: -0.45rem;
  padding: 0.08rem 0.35rem;
  border-radius: 999rem;
  background: #f0c84a;
  color: #2a1c05;
  font-size: 0.62rem;
  font-weight: 800;
}

.hole-wrap.hand-winner {
  animation: winner-glow 0.9s ease-in-out 3;
  filter: drop-shadow(0 0 0.55rem rgba(240, 200, 74, 0.7));
}

@keyframes winner-glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2); }
}

.seats {
  position: absolute;
  inset: 0;
  z-index: 5;
  /* 座位可略探出椭圆边，由外层 .felt 矩形兜住 */
  overflow: visible;
  pointer-events: none;
}

.seat {
  position: absolute;
  width: var(--seat-w);
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 3;
  pointer-events: auto;
}

.seat.occupied {
  z-index: 4;
}

.seat-card {
  position: relative;
  background: var(--seat-bg);
  border: var(--line) solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0.22rem 0.3rem 0.28rem;
  backdrop-filter: blur(0.25rem);
}

/* 座位对话气泡：按方位朝桌心伸出，避免贴边被 felt overflow 裁切 */
.seat-bubble {
  position: absolute;
  z-index: 12; /* 同座位内高于注码 */
  width: max-content;
  max-width: calc(8em + 0.9rem); /* 约 8 个汉字一行 */
  padding: 0.28rem 0.45rem;
  border-radius: 0.55rem;
  background: rgba(255, 248, 230, 0.96);
  color: #2a2114;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  word-break: break-all;
  overflow-wrap: anywhere;
  box-shadow: 0 0.2rem 0.55rem rgba(0, 0, 0, 0.35);
  border: 0.06rem solid rgba(212, 160, 23, 0.45);
  pointer-events: none;
  opacity: 0;
  animation: seat-bubble-fade-in 0.22s ease-out forwards;
}

/* 同侧已有注码时，气泡再让出一截，避免盖住筹码金额 */
.seat.has-bet .seat-bubble.bubble-above {
  bottom: calc(100% + 2.15rem);
}
.seat.has-bet .seat-bubble.bubble-below {
  top: calc(100% + 2.15rem);
}
.seat.has-bet .seat-bubble.bubble-right {
  left: calc(100% + 2.4rem);
}
.seat.has-bet .seat-bubble.bubble-left {
  right: calc(100% + 2.4rem);
}

.seat-bubble::after {
  content: '';
  position: absolute;
  border: 0.28rem solid transparent;
}

/* 默认 / 下沿座位：气泡在卡片上方 */
.seat-bubble.bubble-above {
  left: 50%;
  bottom: calc(100% + 0.28rem);
  top: auto;
  right: auto;
  transform: translateX(-50%);
}
.seat-bubble.bubble-above::after {
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border-top-color: rgba(255, 248, 230, 0.96);
}

/* 对面 / 上沿：气泡改到卡片下方（朝向桌心），避免被台面裁掉 */
.seat-bubble.bubble-below {
  left: 50%;
  top: calc(100% + 0.28rem);
  bottom: auto;
  right: auto;
  transform: translateX(-50%);
}
.seat-bubble.bubble-below::after {
  left: 50%;
  bottom: 100%;
  top: auto;
  transform: translateX(-50%);
  border-bottom-color: rgba(255, 248, 230, 0.96);
}

/* 左侧座位：气泡向右 */
.seat-bubble.bubble-right {
  left: calc(100% + 0.28rem);
  right: auto;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}
.seat-bubble.bubble-right::after {
  left: auto;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-right-color: rgba(255, 248, 230, 0.96);
}

/* 右侧座位：气泡向左 */
.seat-bubble.bubble-left {
  right: calc(100% + 0.28rem);
  left: auto;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}
.seat-bubble.bubble-left::after {
  left: 100%;
  right: auto;
  top: 50%;
  transform: translateY(-50%);
  border-left-color: rgba(255, 248, 230, 0.96);
}

.seat-bubble.out {
  animation: seat-bubble-fade-out 0.25s ease-in forwards;
}

.seat.has-bubble {
  /* 高于普通座位与 HUD 底池行，保证气泡可读；中央播报带宽已收窄 */
  z-index: 16;
}

.self-chat-bubble {
  left: 50%;
  bottom: 14%;
  top: auto;
  right: auto;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(8em + 0.9rem);
  z-index: 16;
}

@keyframes seat-bubble-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes seat-bubble-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* 右下角：个人筹码账单（贴底贴右） */
.my-ledger-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 22; /* 盖在操作台之上，便于直接看 */
  width: 14.2rem;
  height: min(42%, 18rem);
  max-height: min(42%, 18rem);
  display: flex;
  flex-direction: column;
  border: 0.08rem solid rgba(200, 160, 90, 0.45);
  border-right: none;
  border-bottom: none;
  border-radius: 0.55rem 0 0 0;
  background: rgba(10, 12, 11, 0.94);
  box-shadow: -0.2rem -0.15rem 0.9rem rgba(0, 0, 0, 0.45);
  overflow: hidden;
  pointer-events: auto;
}

.my-ledger-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.32rem 0.5rem;
  border-bottom: 0.06rem solid rgba(212, 160, 23, 0.22);
  color: #f3e7c8;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.my-ledger-toggle {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(243, 239, 230, 0.65);
  font-size: 0.7rem;
  cursor: pointer;
  padding: 0.1rem 0.25rem;
}

.my-ledger-toggle:hover {
  color: #ffd56a;
}

.my-ledger-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.my-ledger-panel.collapsed .my-ledger-body {
  display: none;
}

.my-ledger-panel.collapsed {
  height: auto;
  max-height: none;
  width: auto;
}

.my-ledger-summary {
  flex-shrink: 0;
  padding: 0.3rem 0.5rem 0.25rem;
  font-size: 0.7rem;
  color: rgba(243, 239, 230, 0.62);
  border-bottom: 0.05rem solid rgba(255, 255, 255, 0.06);
}

.my-ledger-summary strong.up { color: #7ddea0; }
.my-ledger-summary strong.down { color: #ff9b9b; }

.my-ledger-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.28rem 0.4rem 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  background: rgba(0, 0, 0, 0.16);
}

.my-ledger-empty {
  color: rgba(243, 239, 230, 0.4);
  font-size: 0.72rem;
  text-align: center;
  padding: 0.7rem 0.2rem;
}

.my-ledger-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.1rem 0.45rem;
  padding: 0.32rem 0.4rem;
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.04);
  border: 0.05rem solid rgba(255, 255, 255, 0.05);
}

.my-ledger-row .lg-main {
  font-size: 0.74rem;
  color: rgba(243, 239, 230, 0.92);
  line-height: 1.3;
}

.my-ledger-row .lg-meta {
  grid-column: 1 / -1;
  font-size: 0.64rem;
  color: rgba(243, 239, 230, 0.4);
}

.my-ledger-row .lg-delta {
  font-size: 0.82rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.my-ledger-row .lg-delta.up { color: #7ddea0; }
.my-ledger-row .lg-delta.down { color: #ff9b9b; }

/* 左下角聊天：贴底贴左 */
.chat-log-panel {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 22; /* 与右下角账单同层，盖在操作台之上 */
  width: 14.8rem;
  height: min(48%, 22rem);
  max-height: min(48%, 22rem);
  display: flex;
  flex-direction: column;
  border: 0.08rem solid rgba(200, 160, 90, 0.45);
  border-left: none;
  border-bottom: none;
  border-radius: 0 0.55rem 0 0;
  background: rgba(10, 12, 11, 0.94);
  box-shadow: 0.2rem -0.15rem 0.9rem rgba(0, 0, 0, 0.45);
  overflow: hidden;
  pointer-events: auto;
}

.chat-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.32rem 0.5rem;
  border-bottom: 0.06rem solid rgba(212, 160, 23, 0.22);
  color: #f3e7c8;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.chat-log-toggle {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(243, 239, 230, 0.65);
  font-size: 0.7rem;
  cursor: pointer;
  padding: 0.1rem 0.25rem;
}

.chat-log-toggle:hover {
  color: #ffd56a;
}

.chat-log-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.chat-log-panel.collapsed .chat-log-body,
.chat-log-panel.collapsed .table-chat-form {
  display: none;
}

.chat-log-panel.collapsed {
  height: auto;
  max-height: none;
  width: auto;
}

.chat-log-list {
  flex: 1 1 auto;
  min-height: 0; /* 必须可收缩，否则会被父级 overflow 裁掉最新消息 */
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.28rem 0.4rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  background: rgba(0, 0, 0, 0.18);
  scroll-padding-bottom: 0.4rem;
}

.chat-log-empty {
  color: rgba(243, 239, 230, 0.4);
  font-size: 0.72rem;
  text-align: center;
  padding: 0.6rem 0.2rem;
}

.chat-log-item {
  font-size: 0.74rem;
  line-height: 1.3;
  word-break: break-word;
}

.chat-log-item .chat-name {
  color: #ffd56a;
  font-weight: 700;
  margin-right: 0.25rem;
}

.chat-log-item.is-you .chat-name {
  color: #7dcea0;
}

.chat-log-item.is-system .chat-text {
  color: #ffd56a;
  font-weight: 700;
}

.chat-log-item.is-action .chat-text {
  color: rgba(200, 220, 210, 0.82);
  font-weight: 600;
}

.chat-log-item.is-result .chat-text {
  color: #ffe2a0;
  font-weight: 800;
}

.chat-log-item .chat-text {
  color: rgba(243, 239, 230, 0.92);
}

.chat-log-panel .table-chat-form {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.35rem 0.4rem 0.42rem;
  border-top: 0.06rem solid rgba(212, 160, 23, 0.18);
  flex: 0 0 auto;
  background: rgba(10, 12, 11, 0.96);
}

.chat-log-panel .table-chat-input {
  flex: 1;
  min-width: 0;
  height: 1.9rem;
  min-height: 1.9rem;
  box-sizing: border-box;
  padding: 0.25rem 0.45rem;
  border-radius: 0.35rem;
  border: 0.08rem solid rgba(200, 160, 90, 0.4);
  background: rgba(8, 14, 12, 0.72);
  color: var(--paper);
  font-size: 0.78rem;
}

.chat-log-panel .table-chat-input::placeholder {
  color: rgba(243, 239, 230, 0.42);
}

.chat-log-panel .table-chat-form .btn {
  flex-shrink: 0;
  height: 1.9rem;
  min-height: 1.9rem;
  box-sizing: border-box;
  padding: 0 0.55rem;
  font-size: 0.75rem;
  line-height: 1;
}

/* 互动道具（聊天窗内）：完整展示，不滚动；对话记录自己滚 */
.throw-dock {
  padding: 0.18rem 0.4rem 0.16rem;
  border-bottom: 0.06rem solid rgba(212, 160, 23, 0.18);
  flex: 0 0 auto;
  overflow: visible;
}

.throw-target-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.28rem;
  font-size: 0.72rem;
  color: rgba(243, 239, 230, 0.65);
}

.throw-target-name {
  color: #ffd56a;
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.throw-target-name.empty {
  color: rgba(243, 239, 230, 0.4);
  font-weight: 500;
}

.throw-items {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.22rem;
}

.emoji-dock {
  margin-top: 0.22rem;
  padding-top: 0.2rem;
  border-top: 0.05rem solid rgba(255, 255, 255, 0.06);
}

.emoji-dock .throw-target-label {
  display: inline-block;
  margin-bottom: 0.12rem;
}

.emoji-items {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.12rem;
}

.emoji-btn {
  appearance: none;
  border: 0.06rem solid rgba(255, 255, 255, 0.08);
  border-radius: 0.3rem;
  background: rgba(255, 255, 255, 0.05);
  min-height: 1.45rem;
  font-size: 0.85rem;
  cursor: pointer;
  line-height: 1;
}

.emoji-btn:hover {
  background: rgba(255, 213, 106, 0.16);
}

.emoji-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.seat-emoji-pop {
  position: absolute;
  left: 50%;
  top: -0.2rem;
  transform: translate(-50%, -100%);
  font-size: 1.55rem;
  z-index: 14;
  pointer-events: none;
  animation: seat-emoji-pop 1.6s ease-out forwards;
  filter: drop-shadow(0 0.12rem 0.25rem rgba(0, 0, 0, 0.4));
}

@keyframes seat-emoji-pop {
  0% { opacity: 0; transform: translate(-50%, -70%) scale(0.4); }
  18% { opacity: 1; transform: translate(-50%, -110%) scale(1.25); }
  70% { opacity: 1; transform: translate(-50%, -125%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -150%) scale(0.9); }
}

.self-emoji-pop {
  position: absolute;
  left: 50%;
  bottom: 18%;
  transform: translateX(-50%);
  font-size: 2rem;
  z-index: 18;
  pointer-events: none;
  animation: seat-emoji-pop 1.6s ease-out forwards;
}

/* 底池数字跳动 */
.pot strong.pot-bump {
  display: inline-block;
  animation: pot-bump 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  color: #ffe08a;
}

@keyframes pot-bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.28); }
  100% { transform: scale(1); }
}

/* 轮到你：仅手牌模块呼吸光（不再给整条 action-bar 套外框） */
.action-bar.my-turn-pulse {
  box-shadow: none;
  animation: none;
}

.hole-wrap.my-turn-pulse {
  animation: my-turn-glow 1.4s ease-in-out infinite;
  filter: drop-shadow(0 0 0.55rem rgba(240, 200, 74, 0.65));
}

@keyframes my-turn-glow {
  0%, 100% { filter: drop-shadow(0 0 0.35rem rgba(240, 200, 74, 0.35)); }
  50% { filter: drop-shadow(0 0 0.85rem rgba(255, 210, 80, 0.85)); }
}

.ledger-btn {
  flex-shrink: 0;
  padding: 0.2rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-color: rgba(255, 213, 106, 0.55);
  color: #ffd56a;
  background: rgba(255, 213, 106, 0.12);
}

.ledger-btn:hover {
  border-color: rgba(255, 213, 106, 0.85);
  background: rgba(255, 213, 106, 0.22);
  color: #ffe9a8;
}

/* 筹码账单 */
.chip-ledger-modal {
  position: fixed;
  inset: 0;
  z-index: 96;
  display: grid;
  place-items: center;
  padding: 0.8rem;
  touch-action: manipulation;
}

.chip-ledger-modal[hidden] {
  display: none !important;
}

.chip-ledger-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.chip-ledger-card {
  position: relative;
  z-index: 2;
  width: min(26rem, 94vw);
  max-height: min(78vh, 34rem);
  display: flex;
  flex-direction: column;
  border-radius: 0.75rem;
  border: 0.1rem solid rgba(200, 170, 90, 0.45);
  background: linear-gradient(165deg, rgba(22, 20, 16, 0.97), rgba(10, 12, 11, 0.97));
  box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.chip-ledger-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.9rem;
  border-bottom: 0.06rem solid rgba(212, 160, 23, 0.22);
  color: #f3e7c8;
  letter-spacing: 0.08em;
}

.chip-ledger-close {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(243, 239, 230, 0.7);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem 0.35rem;
}

.chip-ledger-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.55rem 0.9rem 0.2rem;
}

.chip-ledger-tab {
  appearance: none;
  border: 0.06rem solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(243, 239, 230, 0.7);
  border-radius: 999rem;
  padding: 0.22rem 0.75rem;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.chip-ledger-tab.is-active {
  border-color: rgba(255, 213, 106, 0.55);
  color: #ffd56a;
  background: rgba(255, 213, 106, 0.12);
}

.chip-ledger-summary {
  padding: 0.35rem 0.9rem 0.55rem;
  font-size: 0.78rem;
  color: rgba(243, 239, 230, 0.65);
}

.chip-ledger-summary strong.up { color: #7ddea0; }
.chip-ledger-summary strong.down { color: #ff9b9b; }

.chip-ledger-list {
  flex: 1 1 auto;
  min-height: 10rem;
  overflow-y: auto;
  padding: 0.2rem 0.7rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.chip-ledger-empty {
  text-align: center;
  color: rgba(243, 239, 230, 0.4);
  font-size: 0.8rem;
  padding: 1.5rem 0.5rem;
}

.chip-ledger-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.6rem;
  padding: 0.4rem 0.5rem;
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  border: 0.05rem solid rgba(255, 255, 255, 0.05);
}

.chip-ledger-row .lg-main {
  font-size: 0.8rem;
  color: rgba(243, 239, 230, 0.92);
  line-height: 1.35;
}

.chip-ledger-row .lg-meta {
  grid-column: 1 / -1;
  font-size: 0.68rem;
  color: rgba(243, 239, 230, 0.42);
}

.chip-ledger-row .lg-delta {
  font-size: 0.88rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  align-self: start;
}

.chip-ledger-row .lg-delta.up { color: #7ddea0; }
.chip-ledger-row .lg-delta.down { color: #ff9b9b; }

.chip-ledger-row .lg-name {
  color: #ffd56a;
  font-weight: 700;
  margin-right: 0.25rem;
}

/* 局末战报 */
.hand-report-modal {
  position: fixed;
  inset: 0;
  z-index: 70; /* 低于赢家/转运/保险箱事件，避免挡住「资助」等按钮 */
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}

.hand-report-modal[hidden] {
  display: none !important;
}

.hand-report-card {
  width: min(22rem, 92vw);
  max-height: min(86dvh, 34rem);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.9rem 1.1rem 1rem;
  border-radius: 0.75rem;
  background: linear-gradient(180deg, rgba(36, 28, 14, 0.96), rgba(12, 10, 8, 0.94));
  border: 0.1rem solid rgba(240, 200, 100, 0.65);
  box-shadow: 0 0.5rem 1.8rem rgba(0, 0, 0, 0.5);
  text-align: center;
  animation: hand-report-in 0.35s ease-out;
  box-sizing: border-box;
}

.hand-report-card.hand-report-split {
  width: min(44rem, 96vw);
  max-height: min(82dvh, 36rem);
  text-align: left;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* 外层不跟着人多无限变长，内部滚动 */
}

.hand-report-split .hand-report-eyebrow,
.hand-report-split .hand-report-title {
  text-align: center;
  flex-shrink: 0;
}

.hand-report-board-label {
  margin: 0.15rem 0 0.35rem;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: rgba(232, 197, 106, 0.9);
  font-weight: 700;
  flex-shrink: 0;
}

.hand-report-board {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin: 0 0 0.7rem;
  min-height: 2.8rem;
  flex-shrink: 0;
}

.hand-report-board .card {
  width: 2.35rem;
  height: 3.25rem;
  font-size: 0.78rem;
  animation: none;
}

.hand-report-board-empty {
  margin: 0 0 0.65rem;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(243, 239, 230, 0.5);
  flex-shrink: 0;
}

.hand-report-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0; /* 允许子项内部滚动 */
}

.hand-report-left,
.hand-report-right {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 100%;
}

.hand-report-col-title {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: rgba(232, 197, 106, 0.9);
  font-weight: 700;
  flex-shrink: 0;
}

.hand-report-players {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1 1 auto;
  min-height: 8rem;
  max-height: min(42dvh, 18rem);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 0.25rem;
  scrollbar-gutter: stable;
  mask-image: linear-gradient(to bottom, #000 92%, transparent 100%);
}

.hand-report-players::-webkit-scrollbar {
  width: 0.28rem;
}

.hand-report-players::-webkit-scrollbar-thumb {
  background: rgba(232, 197, 106, 0.45);
  border-radius: 999px;
}

.hand-report-comments {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(28dvh, 12rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 0.15rem;
}

.hand-report-player {
  padding: 0.45rem 0.5rem;
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.05);
  border: 0.08rem solid rgba(240, 200, 100, 0.22);
}

.hand-report-player-top {
  display: flex;
  justify-content: space-between;
  gap: 0.45rem;
  align-items: baseline;
  margin-bottom: 0.28rem;
}

.hand-report-player-name {
  font-weight: 800;
  color: #fff4d4;
  font-size: 0.88rem;
}

.hand-report-player-meta {
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hand-report-player-meta.up { color: #7ddea0; }
.hand-report-player-meta.down { color: #ff9b9b; }
.hand-report-player-meta.flat { color: rgba(243, 239, 230, 0.65); }

.hand-report-player-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.3rem;
}

.hand-report-tag {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.08rem 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 230, 180, 0.88);
}

.hand-report-tag.win {
  background: rgba(80, 160, 100, 0.28);
  color: #b6f0c6;
}

.hand-report-tag.fold {
  background: rgba(120, 60, 60, 0.35);
  color: #ffc0c0;
}

.hand-report-tag.show {
  background: rgba(200, 150, 40, 0.28);
  color: #ffe2a0;
}

.hand-report-player-cards {
  display: flex;
  gap: 0.28rem;
  flex-wrap: wrap;
  min-height: 0;
  margin-top: 0.2rem;
}

.hand-report-player-cards .card {
  width: 2.15rem;
  height: 3rem;
  font-size: 0.72rem;
  animation: none;
}

.hand-report-player-cards .card .center-suit .suit-icon.suit-lg {
  width: 0.95em;
  height: 1.1em;
}

.hand-report-player-empty {
  font-size: 0.72rem;
  color: rgba(243, 239, 230, 0.45);
}

.hand-report-comments {
  list-style: none;
  margin: 0 0 0.55rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hand-report-right .hand-report-comments {
  margin-bottom: 0.45rem;
}

.hand-report-comments li {
  padding: 0.4rem 0.5rem;
  border-radius: 0.4rem;
  background: rgba(255, 210, 120, 0.08);
  border: 0.08rem solid rgba(240, 200, 100, 0.28);
  color: rgba(255, 240, 210, 0.92);
  font-size: 0.8rem;
  line-height: 1.45;
}

.hand-report-comments li::before {
  content: '💬 ';
}

.hand-report-stats {
  margin-bottom: 0;
}

.hand-report-split .hand-report-close,
.hand-report-split #handReportClose {
  display: block;
  margin: 0 auto;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .hand-report-card.hand-report-split {
    max-height: min(88dvh, 40rem);
  }
  .hand-report-body {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
  .hand-report-players {
    max-height: min(32dvh, 13rem);
  }
  .hand-report-right .hand-report-comments {
    max-height: min(18dvh, 8rem);
  }
}

@keyframes hand-report-in {
  from { opacity: 0; transform: translateY(0.6rem) scale(0.94); }
  to { opacity: 1; transform: none; }
}

.hand-report-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: #e8c56a;
  margin-bottom: 0.2rem;
}

.hand-report-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff4d4;
  margin-bottom: 0.55rem;
}

.hand-report-list {
  list-style: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0 0 0.75rem;
  padding: 0;
}

.hand-report-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.82rem;
  color: rgba(243, 239, 230, 0.9);
}

.hand-report-list .tag {
  color: #ffd56a;
  font-weight: 700;
  flex-shrink: 0;
}

.hand-report-list .val {
  text-align: right;
  font-weight: 700;
  color: #fff6d8;
  font-variant-numeric: tabular-nums;
}

.hand-report-list .val.up { color: #7ddea0; }
.hand-report-list .val.down { color: #ff9b9b; }
.hand-report-list .val.flat { color: rgba(243, 239, 230, 0.7); }

.prev-hand-btn {
  white-space: nowrap;
}

.prev-hand-card {
  width: min(26rem, 94vw);
}

.prev-hand-label {
  margin: 0.15rem 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: rgba(232, 197, 106, 0.85);
  text-align: left;
}

.prev-hand-board {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin-bottom: 0.75rem;
  min-height: 3.2rem;
}

.prev-hand-board .card {
  width: clamp(2.2rem, 5.2vmin, 3rem);
  height: clamp(3.1rem, 7.2vmin, 4.2rem);
  font-size: clamp(0.72rem, 1.7vmin, 0.95rem);
}

.prev-hand-winners {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  text-align: left;
}

.prev-hand-winner {
  padding: 0.45rem 0.55rem;
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.05);
  border: 0.08rem solid rgba(240, 200, 100, 0.28);
}

.prev-hand-winner-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 0.35rem;
}

.prev-hand-winner-name {
  font-weight: 800;
  color: #fff4d4;
  font-size: 0.9rem;
}

.prev-hand-winner-meta {
  font-size: 0.72rem;
  color: #ffd56a;
  font-weight: 700;
  text-align: right;
}

.prev-hand-winner-cards {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.prev-hand-winner-cards .card {
  width: clamp(2rem, 4.8vmin, 2.7rem);
  height: clamp(2.8rem, 6.6vmin, 3.8rem);
  font-size: clamp(0.68rem, 1.55vmin, 0.88rem);
}

.prev-hand-empty {
  margin: 0.4rem 0 0.85rem;
  color: rgba(243, 239, 230, 0.72);
  font-size: 0.85rem;
  line-height: 1.45;
}

.hand-report-list .hand-report-section {
  background: transparent;
  border-bottom: 1px solid rgba(240, 200, 100, 0.22);
  border-radius: 0;
  padding: 0.15rem 0.15rem 0.35rem;
  margin-bottom: 0.1rem;
}

.hand-report-list .hand-report-result .hr-name {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  min-width: 0;
  font-weight: 700;
  color: rgba(243, 239, 230, 0.95);
}

.hand-report-list .hand-report-result .hr-tip {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(255, 213, 106, 0.75);
}

.hand-report-list .hand-report-result.is-down .hr-tip {
  color: rgba(255, 155, 155, 0.85);
}

.hand-report-list .hand-report-result.is-up .hr-tip {
  color: rgba(125, 222, 160, 0.9);
}

@media (max-width: 520px), (max-height: 480px) {
  .hand-report-modal {
    padding: 0.55rem;
    align-items: end;
  }

  .hand-report-card {
    width: min(24rem, 100%);
    max-height: min(78dvh, 30rem);
    padding: 0.75rem 0.85rem 0.85rem;
  }

  .hand-report-title {
    font-size: 1.05rem;
  }

  .hand-report-list li {
    font-size: 0.78rem;
    padding: 0.3rem 0.4rem;
  }
}

.throw-item-btn {
  appearance: none;
  border: 0.06rem solid rgba(255, 255, 255, 0.1);
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.06);
  min-height: 1.55rem;
  font-size: 0.92rem;
  cursor: pointer;
  line-height: 1;
  transition: transform 0.12s ease, background 0.12s ease;
}

.throw-item-btn:hover {
  background: rgba(255, 213, 106, 0.18);
  transform: scale(1.08);
}

.throw-item-btn:active {
  transform: scale(0.94);
}

.throw-item-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.seat.throw-target .seat-card {
  border-color: #7dd3fc !important;
  box-shadow:
    0 0 0 0.14rem rgba(125, 211, 252, 0.55),
    0 0 1rem rgba(56, 189, 248, 0.45) !important;
}

.seat.throwable {
  cursor: pointer;
}

.seat.throwable:hover .seat-card {
  border-color: rgba(125, 211, 252, 0.65);
}

.throw-fx-layer {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  overflow: hidden;
}

.throw-fly {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1.8rem;
  line-height: 1;
  z-index: 31;
  offset-path: path(var(--throw-path));
  offset-distance: 0%;
  offset-rotate: 0deg;
  animation: throw-fly-move 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  filter: drop-shadow(0 0.15rem 0.25rem rgba(0, 0, 0, 0.35));
}

@keyframes throw-fly-move {
  0% {
    offset-distance: 0%;
    transform: scale(0.7) rotate(-20deg);
    opacity: 0.3;
  }
  20% { opacity: 1; }
  100% {
    offset-distance: 100%;
    transform: scale(1.15) rotate(25deg);
    opacity: 1;
  }
}

/* fallback when offset-path unsupported: use --dx/--dy */
.throw-fly.fallback {
  offset-path: none;
  animation: throw-fly-fallback 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

@keyframes throw-fly-fallback {
  0% {
    transform: translate(-50%, -50%) scale(0.7) rotate(-20deg);
    opacity: 0.35;
  }
  100% {
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.15) rotate(28deg);
    opacity: 1;
  }
}

.throw-impact {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.6rem;
  z-index: 13;
  pointer-events: none;
  animation: throw-impact-pop 0.85s ease-out forwards;
}

@keyframes throw-impact-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  25% { opacity: 1; transform: translate(-50%, -60%) scale(1.35); }
  100% { opacity: 0; transform: translate(-50%, -90%) scale(1.1); }
}

.seat.throw-hit .seat-card {
  animation: throw-seat-shake 0.45s ease-in-out;
}

@keyframes throw-seat-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-0.25rem) rotate(-2deg); }
  40% { transform: translateX(0.28rem) rotate(2deg); }
  60% { transform: translateX(-0.18rem); }
  80% { transform: translateX(0.15rem); }
}

.seat-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.08rem;
  font-size: clamp(0.55rem, 1.25vmin, 0.7rem);
}

.seat.acting {
  z-index: 6;
}

.seat.acting .seat-card {
  border: 0.14rem solid #f0c84a;
  box-shadow:
    0 0 0 0.18rem rgba(240, 200, 74, 0.45),
    0 0 1.4rem rgba(240, 180, 40, 0.55),
    inset 0 0 0.6rem rgba(240, 200, 74, 0.12);
  animation: acting-glow 1.1s ease-in-out infinite;
}

.seat.acting .seat-card::before {
  content: '行动中';
  position: absolute;
  top: -0.85rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.08rem 0.45rem;
  border-radius: 999rem;
  background: #f0c84a;
  color: #2a1c05;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  white-space: nowrap;
  box-shadow: 0 0.1rem 0.35rem rgba(0, 0, 0, 0.35);
}

@keyframes acting-glow {
  0%, 100% { box-shadow: 0 0 0 0.18rem rgba(240, 200, 74, 0.4), 0 0 1rem rgba(240, 180, 40, 0.4); }
  50% { box-shadow: 0 0 0 0.28rem rgba(240, 200, 74, 0.7), 0 0 1.8rem rgba(255, 210, 80, 0.7); }
}

.seat.folded { opacity: 0.72; }
.seat.folded .seat-cards { filter: grayscale(0.55); }
.seat.eliminated { opacity: 0.65; }
.seat.eliminated .seat-card {
  border-color: rgba(180, 80, 80, 0.45);
}

.seat.empty {
  width: clamp(3rem, 7vmin, 4.6rem);
  z-index: 2;
  opacity: 0.78;
}

.seat.empty .seat-card,
.seat-card.empty-seat {
  min-height: 0;
  padding: 0.22rem 0.28rem;
  display: grid;
  place-content: center;
  gap: 0.08rem;
  background: rgba(10, 28, 18, 0.32);
  border: 0.08rem dashed rgba(255, 255, 255, 0.2);
  color: #9bb5a6;
}

.seat.claimable {
  cursor: pointer;
}

.seat.claimable .seat-card {
  border-color: rgba(212, 160, 23, 0.55);
  color: #e8d7a0;
}

.seat.claimable:hover .seat-card {
  background: rgba(40, 60, 35, 0.55);
  border-color: var(--gold);
}

.empty-title {
  font-size: 0.68rem;
  font-weight: 700;
}

.empty-hint {
  font-size: 0.58rem;
  opacity: 0.8;
}

.seat-profit {
  font-size: inherit;
  font-weight: 700;
  margin-top: 0;
}

.seat-profit.up { color: #7ddea0; }
.seat-profit.down { color: #f0a0a0; }
.seat-profit.flat { color: #9aa89e; }

.badge.fold {
  background: #4a5560;
  color: #dce3ea;
}

.badge.wait {
  background: #3d5a40;
  color: #c8e6c9;
}

.badge.inspect {
  background: rgba(70, 90, 130, 0.55);
  color: #d4e2ff;
  border: 0.05rem solid rgba(150, 180, 230, 0.45);
}

.badge.ai {
  background: rgba(40, 72, 58, 0.75);
  color: #b8f0d0;
  border: 0.05rem solid rgba(120, 200, 160, 0.4);
}

.badge.out {
  background: #6a2a2a;
  color: #ffd0d0;
}

.seat-name {
  font-size: clamp(0.62rem, 1.4vmin, 0.8rem);
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* 昵称：偏金属金，少柠檬黄 */
  background: linear-gradient(165deg, #f8e6a8 0%, #e8c56a 38%, #d4a017 72%, #a87a12 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 rgba(40, 28, 6, 0.4));
}

.seat-row .chip-stack {
  color: var(--gold);
  font-weight: 700;
}

.seat-meta {
  font-size: clamp(0.58rem, 1.35vmin, 0.75rem);
  color: #b7cfc0;
  margin-top: 0.1rem;
}

.seat-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.15rem;
  margin-top: 0.1rem;
  min-height: 0;
}

.seat-badges:empty {
  display: none;
}

.badge {
  font-size: clamp(0.5rem, 1.2vmin, 0.65rem);
  padding: 0.08rem 0.3rem;
  border-radius: 0.12rem;
  background: #3a342c;
  color: var(--cream);
  letter-spacing: 0.04em;
}

.badge.dealer { background: var(--gold); color: #1a1408; font-weight: 700; }
.badge.allin { background: var(--warn); color: #1a1408; }
.badge.show { background: #2f6f9f; color: #e8f4ff; }
.badge.bet {
  background: rgba(212, 160, 23, 0.2);
  color: var(--gold);
}

.seat-cards {
  display: flex;
  justify-content: center;
  gap: 0.12rem;
  margin-top: 0.15rem;
  min-height: 0;
}

.seat-cards:empty {
  display: none;
  margin: 0;
}

.seat .card {
  width: var(--seat-card-w);
  height: var(--seat-card-h);
  font-size: 11px;
  border-radius: 0.28rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  overflow: hidden;
}

/* 座位迷你牌：只留左上角点数 + 中央大花色，避免小尺寸叠糊 */
.seat .card.face .corner.br {
  display: none;
}

.seat .card.face .corner .suit {
  display: none;
}

.seat .card.face .corner .rank {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.seat .card.face .center-suit {
  font-size: 16px;
}

.seat .card.face .center-suit .suit-icon.suit-lg {
  width: 18px;
  height: 22px;
}

.seat .card .suit-icon {
  shape-rendering: geometricPrecision;
}

.seat.you-bet-only {
  z-index: 3; /* 低于公共牌 */
  width: auto;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.seat.you-bet-only .chip-pile {
  margin-top: 0;
}

.seat.seat-bottom-gap {
  opacity: 0.35;
}

.seat.seat-bottom-gap:not(.claimable) {
  pointer-events: none;
}

/* 12 人时座位更紧凑 */
.felt-inner.crowded {
  --seat-w: clamp(4rem, 8.8vmin, 6.2rem);
  --seat-card-w: 2.15rem;
  --seat-card-h: 3rem;
}


.felt-inner.crowded .seat-name {
  font-size: clamp(0.62rem, 1.4vmin, 0.82rem);
  font-weight: 700;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-row .chip-stack {
  color: var(--gold);
  font-weight: 700;
}

.felt-inner.crowded .seat-meta {
  font-size: clamp(0.5rem, 1.15vmin, 0.65rem);
}

/* Action bar：操作在上、手牌居中在下；外层无大蒙层/外框，仅三模块自带底板 */
.action-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  min-height: var(--action-h);
  max-height: 48%;
  overflow: visible;
  padding: 0.3rem 0.7rem 0.4rem;
  background: transparent;
  border-top: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  z-index: 20;
  pointer-events: none;
}

.action-bar .controls-row,
.action-bar .hole-wrap,
.action-bar .my-stack-bar {
  pointer-events: auto;
}

.action-bar .controls-row {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  padding: 0;
  width: min(42rem, 100%);
  background: transparent;
  box-shadow: none;
}

.action-bar .hole-wrap {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  padding: 0.35rem 0.85rem 0.4rem;
  border-radius: 0.65rem;
  background: rgba(10, 16, 14, 0.48);
  overflow: visible;
  box-shadow: 0 0.15rem 0.5rem rgba(0, 0, 0, 0.28);
  overflow: visible;
  --hole-card-w: 4.6rem;
  --hole-card-h: 6.4rem;
}

.action-bar .btn,
.action-bar input,
.action-bar select,
.action-bar .actions,
.action-bar .idle-actions {
  pointer-events: auto;
}

.controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.4rem;
}

.idle-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.35rem 0.55rem;
  border-radius: 0.65rem;
  background: rgba(10, 16, 14, 0.48);
  box-shadow: 0 0.15rem 0.5rem rgba(0, 0, 0, 0.28);
}

.host-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.settings-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.settings-fields.locked {
  opacity: 0.55;
}

.blind-edit {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.blind-edit input {
  width: 4.2rem;
  min-height: 2rem;
  padding: 0.25rem 0.4rem;
}

.idle-actions .btn.primary {
  min-width: 8rem;
  min-height: 2.5rem;
  font-size: 1rem;
  padding: 0.55rem 1.4rem;
}

.actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: auto;
  max-width: min(42rem, 100%);
  box-sizing: border-box;
  padding: 0.35rem 0.55rem;
  border-radius: 0.65rem;
  background: rgba(10, 16, 14, 0.48);
  box-shadow: 0 0.15rem 0.5rem rgba(0, 0, 0, 0.28);
}

.action-bar.is-acting .actions {
  /* 有下注滑条时再撑开，避免只有几个钮却整行铺满 */
  width: auto;
}

.actions:has(.bet-panel:not([hidden])) {
  width: min(42rem, 100%);
}

.my-stack-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem 0.85rem;
  width: min(42rem, 100%);
  padding: 0.28rem 0.7rem;
  border-radius: 0.55rem;
  background: rgba(10, 16, 14, 0.48);
  border: var(--line) solid rgba(255, 255, 255, 0.08);
  color: #c5d6cb;
  font-size: 0.78rem;
  line-height: 1.3;
}

.my-stack-item strong {
  font-weight: 800;
  color: #ffe7a0;
  margin-left: 0.15rem;
}

.my-stack-item strong.up { color: #7ddea0; }
.my-stack-item strong.down { color: #ff9b9b; }
.my-stack-item strong.flat { color: #d5d0c4; }

.action-info {
  font-size: 0.78rem;
  color: #b7cfc0;
  text-align: center;
}

.action-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  width: auto;
  max-width: 100%;
}

.action-main .call-btn:not([hidden]):not(:disabled) {
  background: #2d6b4a;
  border-color: #3f8f64;
  box-shadow: 0 0 0 0.08rem rgba(90, 180, 120, 0.35);
}

.bet-panel {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 100%;
  max-width: 28rem;
}

/* 非己方回合已改为隐藏整个 #playActions，dimmed 仅作兜底 */
.bet-panel.dimmed {
  display: none;
}

.bet-hint {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

.bet-presets {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem;
}

.preset-btn {
  appearance: none;
  border: var(--line) solid #4a4338;
  background: #2a261f;
  color: var(--cream);
  border-radius: var(--radius-sm);
  padding: 0.28rem 0.55rem;
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.preset-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.bet-slider-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.bet-slider-row input[type='range'] {
  flex: 1;
  min-width: 0;
  accent-color: var(--accent);
}

.bet-amount-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.12rem;
  flex-shrink: 0;
  min-width: 4.8rem;
}

.bet-amount-tip {
  font-size: 0.62rem;
  line-height: 1;
  color: rgba(243, 239, 230, 0.72);
  letter-spacing: 0.06em;
  text-align: center;
  user-select: none;
}

.bet-slider-row input[type='number'],
.bet-amount-field input[type='number'] {
  width: 4.8rem;
  min-height: 2rem;
  padding: 0.25rem 0.4rem;
  border: 0.08rem solid rgba(212, 160, 23, 0.35);
  border-radius: 0.3rem;
  background: rgba(8, 14, 12, 0.55);
  color: var(--paper);
  text-align: center;
  font-weight: 700;
}

.bet-amount-field input[type='number']::placeholder {
  color: rgba(243, 239, 230, 0.45);
  font-weight: 500;
}


.hole-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  flex-shrink: 0;
}

.hole-show-btn {
  min-height: 2rem;
  padding: 0.3rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hole-peek-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.hole-peek-btn {
  min-height: 1.85rem;
  padding: 0.22rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.pray-fortune-btn {
  min-height: 1.85rem;
  padding: 0.22rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #5a2e08;
  border-color: rgba(232, 170, 70, 0.55);
  background: linear-gradient(180deg, #ffe2a0, #e0a84a);
}

.pray-fortune-btn:hover {
  filter: brightness(1.06);
}

.pray-fortune-fx {
  position: fixed;
  inset: 0;
  z-index: 88;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.pray-fortune-fx[hidden] {
  display: none !important;
}

.pray-fortune-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 190, 80, 0.22), transparent 42%),
    rgba(8, 6, 4, 0.55);
  animation: pray-veil-in 0.35s ease-out;
}

.pray-fortune-card {
  position: relative;
  z-index: 2;
  width: min(20rem, 86vw);
  padding: 1.15rem 1.2rem 1.2rem;
  border-radius: 0.9rem;
  text-align: center;
  border: 0.1rem solid rgba(240, 190, 90, 0.65);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 210, 120, 0.22), transparent 55%),
    linear-gradient(165deg, rgba(48, 28, 10, 0.96), rgba(12, 10, 8, 0.96));
  box-shadow: 0 1rem 2.4rem rgba(0, 0, 0, 0.55);
  animation: pray-card-in 0.55s cubic-bezier(0.18, 0.9, 0.25, 1.12) forwards;
  overflow: hidden;
}

.pray-fortune-incense {
  position: relative;
  height: 3rem;
  margin: 0 auto 0.45rem;
  width: 5rem;
}

.pray-fortune-eyebrow {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: rgba(255, 210, 140, 0.82);
}

.pray-fortune-title {
  margin: 0.2rem 0 0.45rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffe3a0;
  letter-spacing: 0.12em;
}

.pray-fortune-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(255, 240, 210, 0.92);
}

.pray-fortune-sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.pray-coin {
  position: absolute;
  left: var(--x, 50%);
  top: -8%;
  font-size: var(--size, 1.1rem);
  animation: pray-coin-fall var(--dur, 1.4s) linear forwards;
  animation-delay: var(--delay, 0s);
  filter: drop-shadow(0 0.1rem 0.15rem rgba(0, 0, 0, 0.35));
}

@keyframes pray-veil-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pray-card-in {
  from { opacity: 0; transform: translateY(0.7rem) scale(0.92); }
  to { opacity: 1; transform: none; }
}

@keyframes pray-coin-fall {
  0% { transform: translate(-50%, 0) rotate(0deg); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--drift, 0px)), 118%) rotate(220deg); opacity: 0.15; }
}

.hole-peek-hint {
  margin: 0;
  font-size: 0.68rem;
  color: rgba(243, 239, 230, 0.55);
  letter-spacing: 0.04em;
}

.badge.unseen {
  background: rgba(90, 120, 160, 0.35);
  color: #c8daf0;
  border: 0.05rem solid rgba(160, 190, 230, 0.4);
}

.hole-wrap .label {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.12em;
}

.hand-strength {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.1rem;
  padding: 0.28rem 0.75rem;
  border-radius: 999rem;
  background: linear-gradient(180deg, rgba(212, 160, 23, 0.22), rgba(120, 80, 20, 0.35));
  border: var(--line) solid rgba(212, 160, 23, 0.55);
  color: #f6e2a8;
  white-space: nowrap;
}

.hand-strength-label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  opacity: 0.85;
}

.hand-strength strong {
  font-size: clamp(0.95rem, 2.2vmin, 1.15rem);
  font-weight: 800;
  color: #ffe7a8;
}

.hand-strength.rank-high { border-color: rgba(180, 180, 180, 0.4); color: #ddd; }
.hand-strength.rank-high strong { color: #eee; }
.hand-strength.rank-mid {
  background: linear-gradient(180deg, rgba(60, 120, 90, 0.35), rgba(30, 70, 50, 0.45));
  border-color: rgba(120, 200, 150, 0.45);
  color: #c8f0d8;
}
.hand-strength.rank-mid strong { color: #e0ffe8; }
.hand-strength.rank-strong {
  background: linear-gradient(180deg, rgba(196, 92, 38, 0.4), rgba(120, 50, 20, 0.5));
  border-color: rgba(255, 170, 100, 0.55);
  color: #ffd2b0;
}
.hand-strength.rank-strong strong { color: #ffe0c8; }
.hand-strength.rank-monster {
  background: linear-gradient(180deg, rgba(180, 50, 80, 0.45), rgba(100, 20, 50, 0.55));
  border-color: rgba(255, 140, 180, 0.55);
  color: #ffd0e0;
  animation: bet-pulse 1.2s ease-in-out infinite;
}
.hand-strength.rank-monster strong { color: #ffe4ee; }

.hole {
  display: flex;
  justify-content: center;
  gap: clamp(0.55rem, 1.4vmin, 0.85rem);
  overflow: visible;
  /* 给上方常显「搓牌」留空，避免贴边点不到/被裁切 */
  padding-top: 1.35rem;
}

.hole .card.my-hole-card {
  position: relative;
  overflow: visible;
}

.hole .card.my-hole-card.is-open-faced {
  box-shadow:
    0 0 0 0.12rem rgba(232, 197, 106, 0.75),
    0 0.25rem 0.7rem rgba(0, 0, 0, 0.35);
}

/* 明牌：贴在左右两侧常显（可点到才挂按钮），勿靠悬停，否则移出牌面点不到 */
.hole-open-face-btn {
  position: absolute;
  top: 50%;
  bottom: auto;
  z-index: 5;
  min-height: 1.35rem;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  border: 0.08rem solid rgba(240, 200, 100, 0.85);
  background: linear-gradient(180deg, #ffe7a8, #e0a84a);
  color: #4a2c08;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0.15rem 0.35rem rgba(0, 0, 0, 0.35);
  opacity: 0.98;
  pointer-events: auto;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.hole .card.my-hole-card[data-hole-index='0'] .hole-open-face-btn {
  left: 0;
  right: auto;
  transform: translate(-100%, -50%) translateX(-0.22rem);
}

.hole .card.my-hole-card[data-hole-index='1'] .hole-open-face-btn {
  left: auto;
  right: 0;
  transform: translate(100%, -50%) translateX(0.22rem);
}

.hole .card.my-hole-card[data-hole-index='0'] .hole-open-face-btn:hover,
.hole .card.my-hole-card[data-hole-index='0'] .hole-open-face-btn:focus-visible {
  filter: brightness(1.08);
  transform: translate(-100%, -50%) translateX(-0.28rem);
}

.hole .card.my-hole-card[data-hole-index='1'] .hole-open-face-btn:hover,
.hole .card.my-hole-card[data-hole-index='1'] .hole-open-face-btn:focus-visible {
  filter: brightness(1.08);
  transform: translate(100%, -50%) translateX(0.28rem);
}

/* 搓牌：贴在手牌上方常显（有次数才挂按钮），勿靠悬停，否则移出牌面点不到 */
.hole-rub-btn {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 6;
  min-height: 1.35rem;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  border: 0.08rem solid rgba(180, 90, 70, 0.9);
  background: linear-gradient(180deg, #ffd0c2, #c45a3a);
  color: #2a0e08;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0.15rem 0.35rem rgba(0, 0, 0, 0.35);
  opacity: 0.98;
  pointer-events: auto;
  transform: translate(-50%, calc(-100% - 0.32rem));
  transition: transform 0.15s ease, filter 0.15s ease;
}
.hole .card.my-hole-card.has-rub .hole-rub-btn:hover,
.hole .card.my-hole-card.has-rub .hole-rub-btn:focus-visible {
  filter: brightness(1.08);
  transform: translate(-50%, calc(-100% - 0.4rem));
}

/* 搓牌变牌过渡：搓动 → 侧翻 → 亮出 */
@keyframes hole-rub-scrub {
  0% { transform: translateY(0) rotate(0deg) scale(1); filter: brightness(1); }
  18% { transform: translateY(-0.12rem) rotate(-7deg) scale(1.04); filter: brightness(1.08); }
  36% { transform: translateY(0.08rem) rotate(6deg) scale(1.02); }
  54% { transform: translateY(-0.1rem) rotate(-5deg) scale(1.05); filter: brightness(1.12); }
  72% { transform: translateY(0.06rem) rotate(4deg); }
  100% { transform: translateY(0) rotate(0deg) scale(1); filter: brightness(1); }
}
@keyframes hole-rub-midflip {
  0% { transform: scaleX(1) rotateY(0deg); opacity: 1; }
  100% { transform: scaleX(0.08) rotateY(90deg); opacity: 0.75; }
}
@keyframes hole-rub-reveal {
  0% { transform: scaleX(0.08) rotateY(-90deg); opacity: 0.7; filter: brightness(1.25); }
  55% { transform: scaleX(1.06) rotateY(0deg); opacity: 1; filter: brightness(1.1); }
  100% { transform: scaleX(1) rotateY(0deg); opacity: 1; filter: brightness(1); }
}
.hole .card.my-hole-card.is-rubbing {
  z-index: 8;
  transform-origin: center center;
  animation: hole-rub-scrub 0.32s ease-in-out both;
  box-shadow:
    0 0 0 0.1rem rgba(232, 160, 100, 0.55),
    0 0.35rem 0.9rem rgba(0, 0, 0, 0.4);
}
.hole .card.my-hole-card.is-rub-midflip {
  z-index: 8;
  transform-origin: center center;
  animation: hole-rub-midflip 0.15s ease-in both;
}
.hole .card.my-hole-card.is-rub-reveal {
  z-index: 8;
  transform-origin: center center;
  animation: hole-rub-reveal 0.28s ease-out both;
  box-shadow:
    0 0 0 0.12rem rgba(232, 197, 106, 0.65),
    0 0.3rem 0.85rem rgba(0, 0, 0, 0.35);
}

.card.face.abnormal {
  background: #1a1210;
  color: #f3d2c4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  border: 0.1rem solid rgba(220, 90, 70, 0.85);
  box-shadow: inset 0 0 0.6rem rgba(0, 0, 0, 0.45);
}
.card.face.abnormal-half {
  clip-path: polygon(0 0, 58% 0, 42% 100%, 0 100%);
  background: linear-gradient(135deg, #2a1814, #5a2a22);
}
.card.face.abnormal-black {
  background: #050505;
  color: #bbb;
  border-color: #333;
}
.card.face.abnormal-blank {
  background: #f4f0e8;
  color: #8a7a68;
  border-color: #cbb89a;
}
.abnormal-mark {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.abnormal-sub {
  font-size: 0.58rem;
  opacity: 0.8;
}

.rub-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.rub-modal[hidden] {
  display: none !important;
}
.rub-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 4, 0.62);
}
.rub-modal-card {
  position: relative;
  z-index: 1;
  width: min(94vw, 28rem);
  padding: 1.15rem 1.2rem 1.05rem;
  border-radius: 1rem;
  background: linear-gradient(165deg, #2a221c, #16110e 55%, #0f0c0a);
  border: 1px solid rgba(232, 197, 106, 0.35);
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.45);
  color: #f6ecd7;
}
.rub-modal.is-danger .rub-modal-card {
  border-color: rgba(220, 100, 80, 0.55);
}
.rub-modal-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: #e8c56a;
  opacity: 0.9;
}
.rub-modal-title {
  margin: 0.35rem 0 0.55rem;
  font-size: 1.25rem;
  font-weight: 800;
}
.rub-modal-text {
  margin: 0;
  line-height: 1.55;
  font-size: 0.92rem;
  color: rgba(246, 236, 215, 0.92);
}
.rub-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}
.rub-confirm-preview,
.rub-expose-cards {
  display: flex;
  gap: 0.45rem;
  justify-content: center;
  margin-top: 0.85rem;
}
.rub-confirm-preview .card,
.rub-expose-cards .card {
  width: 3.6rem;
  height: 5rem;
  font-size: 0.85rem;
}
.rub-pick-step-label {
  margin: 0.85rem 0 0.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: rgba(232, 197, 106, 0.92);
}
.rub-pick-suits,
.rub-pick-ranks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}
.rub-pick-suits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}
.rub-pick-suit-btn,
.rub-pick-rank-btn {
  min-height: 2.4rem;
  border-radius: 0.55rem;
  border: 0.08rem solid rgba(240, 220, 170, 0.28);
  background: rgba(20, 16, 12, 0.72);
  color: #f6ecd7;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.12s ease, transform 0.12s ease, background 0.12s ease;
}
.rub-pick-suit-btn {
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.45rem 0.2rem;
}
.rub-pick-suit-btn.is-red {
  color: #e85a5a;
}
.rub-pick-suit-btn.is-black {
  color: #e8e2d4;
}
.rub-pick-rank-btn {
  min-width: 2.35rem;
  flex: 0 0 auto;
  padding: 0.35rem 0.45rem;
  font-size: 0.95rem;
}
.rub-pick-suit-btn:hover,
.rub-pick-rank-btn:hover,
.rub-pick-suit-btn.is-selected,
.rub-pick-rank-btn.is-selected {
  border-color: rgba(240, 200, 100, 0.85);
  background: rgba(80, 55, 18, 0.55);
  transform: translateY(-0.05rem);
}

.hole .card {
  width: var(--hole-card-w);
  height: var(--hole-card-h);
  font-size: clamp(0.85rem, 2.1vmin, 1.2rem);
  border-radius: 0.4rem;
}

.action-main .btn {
  padding: 0.45rem 0.75rem;
  min-height: 2.2rem;
  font-size: clamp(0.75rem, 1.7vmin, 0.92rem);
  position: relative;
  z-index: 2;
}

#waitText {
  color: var(--muted);
  font-size: clamp(0.78rem, 1.7vmin, 0.92rem);
  text-align: center;
}

/* CSS Poker Cards */
.card {
  width: var(--card-w);
  height: var(--card-h);
  border-radius: 0.35rem;
  position: relative;
  user-select: none;
  box-shadow: 0 0.12rem 0.35rem rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
  animation: deal-in 0.28s ease-out;
  font-size: clamp(0.72rem, 1.9vmin, 1.15rem);
}

@keyframes deal-in {
  from { opacity: 0; transform: translateY(-0.45rem) scale(0.92); }
  to { opacity: 1; transform: none; }
}

.card.face {
  background: linear-gradient(165deg, #fffef9, #f0ebe0);
  border: var(--line) solid #d5cec0;
  color: var(--ink);
  font-family: var(--font-ui);
}

.card.face.red { color: #c0392b; }
.card.face.black { color: #1a1a1a; }

.card.face.red .suit-icon path { fill: #c0392b; }
.card.face.black .suit-icon path { fill: #1a1a1a; }

.card .corner {
  position: absolute;
  top: 0.14em;
  left: 0.16em;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  font-weight: 800;
  z-index: 1;
}

.card .corner .rank { font-size: 0.95em; }
.card .corner .suit {
  font-size: 0.85em;
  margin-top: 0.04em;
  display: grid;
  place-items: center;
}

.card .corner.br {
  top: auto;
  left: auto;
  bottom: 0.14em;
  right: 0.16em;
  transform: rotate(180deg);
}

.card .center-suit {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.55em;
  opacity: 1;
}

.card .suit-icon {
  width: 1em;
  height: 1.15em;
  display: block;
  overflow: visible;
  shape-rendering: geometricPrecision;
  flex-shrink: 0;
}

.card .suit-icon.suit-sm {
  width: 0.78em;
  height: 0.9em;
}

.card .suit-icon.suit-lg {
  width: 0.92em;
  height: 1.08em;
}

/* SVG 正常时隐藏字符回退，避免叠字 */
.card .suit-fallback {
  display: none;
}

.card.back {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%) -0.5rem 0 / 1rem 1rem,
    linear-gradient(225deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%) -0.5rem 0 / 1rem 1rem,
    linear-gradient(45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%) 0 0 / 1rem 1rem,
    linear-gradient(315deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%) 0 0 / 1rem 1rem,
    linear-gradient(145deg, #1f3d6e, #132848);
  border: 0.12rem solid #c9b896;
}

.card.back::after {
  content: '';
  position: absolute;
  inset: 0.28rem;
  border: var(--line) solid rgba(201, 184, 150, 0.45);
  border-radius: 0.18rem;
}

.card.slot {
  background: rgba(0, 0, 0, 0.18);
  border: var(--line) dashed rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

/* 公共牌翻牌：先牌背，约 2 秒翻到正面 */
.board-card {
  width: var(--card-w);
  height: var(--card-h);
  flex-shrink: 0;
  perspective: 900px;
  position: relative;
}

.board-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 1.85s cubic-bezier(0.4, 0.05, 0.2, 1);
}

.board-card.revealed .board-card-inner {
  transform: rotateY(180deg);
}

.board-card.no-anim .board-card-inner {
  transition: none;
}

.board-card-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 0.12rem 0.35rem rgba(0, 0, 0, 0.35);
}

.board-card-face.back-face {
  transform: rotateY(0deg);
}

.board-card-face.front-face {
  transform: rotateY(180deg);
}

/* 画布方案下不再按真机矮屏改桌面尺寸，避免把定死的椭圆打乱 */

/* 画布内已定死桌面，不再按大屏/超宽改 html 字号与桌面尺寸 */

#stage .felt-inner {
  width: 1100px;
  height: 520px;
}

/* —— 富二代保险箱赞助（仅本人） —— */
.sponsor-safe-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  pointer-events: auto;
  touch-action: manipulation;
}

.sponsor-safe-modal[hidden] {
  display: none !important;
}

.sponsor-safe-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 8, 0.62);
  animation: sponsor-backdrop-in 0.45s ease-out;
}

.sponsor-safe-card {
  position: relative;
  z-index: 2;
  width: min(22rem, 88vw);
  padding: 1.35rem 1.4rem 1.25rem;
  border-radius: 1rem;
  border: 0.1rem solid rgba(240, 190, 90, 0.55);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 200, 90, 0.18), transparent 55%),
    linear-gradient(165deg, rgba(28, 22, 14, 0.96), rgba(12, 14, 16, 0.96));
  box-shadow:
    0 1rem 2.5rem rgba(0, 0, 0, 0.55),
    0 0 0 0.08rem rgba(255, 220, 140, 0.12) inset;
  text-align: center;
  transform-origin: 50% 60%;
  animation: sponsor-card-in 0.7s cubic-bezier(0.18, 0.9, 0.25, 1.15) forwards;
}

.sponsor-safe-modal.is-accepting .sponsor-safe-card {
  animation: sponsor-card-out 0.45s ease-in forwards;
}

.sponsor-safe-vault {
  position: relative;
  width: 6.2rem;
  height: 5.4rem;
  margin: 0 auto 0.85rem;
  animation: vault-float 2.4s ease-in-out infinite;
}

.vault-body {
  position: absolute;
  inset: 0.35rem 0.45rem 0.2rem;
  border-radius: 0.55rem;
  background: linear-gradient(160deg, #c9a24a, #8a6418 55%, #5c4210);
  border: 0.12rem solid rgba(255, 230, 160, 0.55);
  box-shadow:
    0 0.35rem 0.8rem rgba(0, 0, 0, 0.45),
    0 0 1.2rem rgba(255, 190, 60, 0.25);
  overflow: hidden;
}

.vault-door {
  position: absolute;
  inset: 0.45rem;
  border-radius: 0.35rem;
  background: linear-gradient(145deg, #3a3a3e, #1a1b1f 60%, #0d0e10);
  border: 0.08rem solid rgba(255, 220, 140, 0.35);
  animation: vault-door-pulse 1.8s ease-in-out infinite;
}

.vault-dial {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 1.55rem;
  height: 1.55rem;
  margin: -0.775rem 0 0 -0.775rem;
  border-radius: 50%;
  border: 0.14rem solid #e6c56a;
  background:
    conic-gradient(from 40deg, #2a2a2e, #6a5a30, #2a2a2e 40%, #8a7340, #2a2a2e);
  box-shadow: 0 0 0.35rem rgba(255, 200, 80, 0.35);
  animation: vault-dial-spin 3.2s linear infinite;
}

.vault-handle {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  width: 0.55rem;
  height: 0.55rem;
  margin-top: -0.275rem;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffe29a, #b8862a);
  box-shadow: 0 0 0.25rem rgba(255, 200, 80, 0.5);
}

.vault-glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle, rgba(255, 200, 80, 0.35), transparent 65%);
  animation: vault-glow-breathe 1.6s ease-in-out infinite;
  pointer-events: none;
}

.vault-shine {
  position: absolute;
  left: -30%;
  top: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-18deg);
  animation: vault-shine-sweep 2.8s ease-in-out infinite;
  pointer-events: none;
}

.sponsor-safe-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: rgba(255, 220, 150, 0.7);
  text-transform: uppercase;
}

/* 不同赞助桥段主题色 */
.sponsor-safe-modal[data-theme='lady'] .vault-body {
  background: linear-gradient(160deg, #e8a0c0, #a05078 55%, #6a2848);
  border-color: rgba(255, 190, 220, 0.55);
}
.sponsor-safe-modal[data-theme='lady'] .sponsor-safe-title { color: #ffd0e8; }
.sponsor-safe-modal[data-theme='tycoon'] .vault-body {
  background: linear-gradient(160deg, #d4c48a, #8a7020 55%, #4a3a10);
}
.sponsor-safe-modal[data-theme='angel'] .vault-body {
  background: linear-gradient(160deg, #a8c8e8, #5078a8 55%, #284868);
  border-color: rgba(180, 210, 255, 0.5);
}
.sponsor-safe-modal[data-theme='angel'] .sponsor-safe-title { color: #d0e8ff; }
.sponsor-safe-modal[data-theme='relative'] .vault-body {
  background: linear-gradient(160deg, #c8e0a8, #688848 55%, #385028);
}
.sponsor-safe-modal[data-theme='boss'] .vault-body {
  background: linear-gradient(160deg, #e0b070, #a06028 55%, #603010);
}

.sponsor-safe-title {
  margin: 0.25rem 0 0.55rem;
  font-family: var(--font-ui);
  font-size: 1.55rem;
  font-weight: 700;
  color: #ffe7b0;
  text-shadow: 0 0.12rem 0.45rem rgba(0, 0, 0, 0.45);
}

.sponsor-safe-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(245, 236, 220, 0.92);
}

.sponsor-safe-amount {
  margin: 0.7rem 0 1rem;
  font-size: 0.85rem;
  color: rgba(255, 220, 150, 0.75);
}

.sponsor-safe-amount strong {
  color: #ffd56a;
  font-size: 1.15rem;
  margin-left: 0.2rem;
}

.sponsor-safe-actions {
  display: flex;
  gap: 0.55rem;
  justify-content: center;
}

.sponsor-safe-actions .btn {
  min-width: 6.5rem;
}

.sponsor-chip-rain {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.sponsor-chip-rain[hidden] {
  display: none !important;
}

.sponsor-rain-chip {
  position: absolute;
  top: -2rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.5rem;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 0.12rem 0.35rem rgba(0, 0, 0, 0.4);
  animation: sponsor-chip-fall var(--dur, 1.6s) linear forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes sponsor-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes sponsor-card-in {
  0% { opacity: 0; transform: translateY(2.2rem) scale(0.72) rotate(-2deg); filter: blur(0.2rem); }
  60% { opacity: 1; transform: translateY(-0.25rem) scale(1.04) rotate(0.5deg); filter: none; }
  100% { opacity: 1; transform: none; }
}

@keyframes sponsor-card-out {
  to { opacity: 0; transform: scale(0.9) translateY(-0.8rem); }
}

@keyframes vault-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.28rem); }
}

@keyframes vault-door-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 200, 80, 0.15); }
  50% { box-shadow: 0 0 0.55rem 0.1rem rgba(255, 200, 80, 0.28); }
}

@keyframes vault-dial-spin {
  to { transform: rotate(360deg); }
}

@keyframes vault-glow-breathe {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.9; }
}

@keyframes vault-shine-sweep {
  0% { left: -40%; opacity: 0; }
  20% { opacity: 0.8; }
  55% { left: 110%; opacity: 0; }
  100% { left: 110%; opacity: 0; }
}

@keyframes sponsor-chip-fall {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(0.8);
    opacity: 0;
  }
  12% { opacity: 1; }
  100% {
    transform: translate3d(var(--drift, 0px), 110vh, 0) rotate(var(--rot, 360deg)) scale(0.95);
    opacity: 0.15;
  }
}

.action-broadcast.sponsor,
.action-broadcast.winnerEvent {
  border-color: rgba(255, 200, 90, 0.8);
  color: #ffe7b0;
  background: rgba(60, 40, 10, 0.9);
  animation: broadcast-in 0.28s ease-out, broadcast-raise-punch 0.55s ease-out;
}

/* —— 连续高牌转运仪式（仅本人） —— */
.luck-event-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  touch-action: manipulation;
}

.luck-event-modal[hidden] {
  display: none !important;
}

.luck-event-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 8, 6, 0.62);
  animation: sponsor-backdrop-in 0.4s ease-out;
}

.luck-event-card {
  position: relative;
  z-index: 2;
  width: min(22rem, 90vw);
  padding: 1.2rem 1.3rem 1.15rem;
  border-radius: 1rem;
  border: 0.1rem solid rgba(220, 120, 70, 0.55);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 120, 60, 0.18), transparent 55%),
    linear-gradient(165deg, rgba(40, 16, 12, 0.96), rgba(12, 10, 10, 0.96));
  box-shadow: 0 1rem 2.4rem rgba(0, 0, 0, 0.55);
  text-align: center;
  animation: sponsor-card-in 0.65s cubic-bezier(0.18, 0.9, 0.25, 1.15) forwards;
}

.luck-incense {
  position: relative;
  height: 3.2rem;
  margin: 0 auto 0.55rem;
  width: 5rem;
}

.incense-stick {
  position: absolute;
  bottom: 0.2rem;
  width: 0.14rem;
  height: 2.1rem;
  background: linear-gradient(180deg, #f0c070, #8a4a18);
  border-radius: 0.1rem;
}

.incense-stick:nth-child(1) { left: 1.2rem; }
.incense-stick:nth-child(2) { left: 2.4rem; height: 2.4rem; }
.incense-stick:nth-child(3) { left: 3.55rem; }

.incense-smoke {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2.5rem;
  height: 1.6rem;
  margin-left: -1.25rem;
  background: radial-gradient(ellipse, rgba(255, 220, 180, 0.35), transparent 70%);
  animation: incense-smoke 2.2s ease-in-out infinite;
}

@keyframes incense-smoke {
  0%, 100% { opacity: 0.35; transform: translateY(0.15rem) scale(0.9); }
  50% { opacity: 0.85; transform: translateY(-0.35rem) scale(1.1); }
}

.luck-event-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: rgba(255, 190, 140, 0.8);
}

.luck-event-title {
  margin: 0.25rem 0 0.55rem;
  font-family: var(--font-ui);
  font-size: 1.4rem;
  color: #ffd2a8;
}

.luck-event-text {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 236, 220, 0.92);
}

.luck-event-actions {
  display: flex;
  gap: 0.55rem;
  justify-content: center;
  flex-wrap: wrap;
}

.luck-event-actions .btn {
  min-width: 6.5rem;
}

.luck-event-fx {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.luck-event-fx[hidden] {
  display: none !important;
}

.luck-spark {
  position: absolute;
  left: 50%;
  top: 40%;
  font-size: 1.5rem;
  animation: winner-spark-fly 0.95s ease-out forwards;
}

/* —— 大赢家随机事件（仅本人） —— */
.winner-event-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  pointer-events: auto;
  touch-action: manipulation;
}

.winner-event-modal[hidden] {
  display: none !important;
}

.winner-event-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 12, 0.58);
  animation: sponsor-backdrop-in 0.4s ease-out;
}

.winner-event-card {
  position: relative;
  z-index: 2;
  width: min(23rem, 90vw);
  padding: 1.25rem 1.35rem 1.2rem;
  border-radius: 1rem;
  border: 0.1rem solid rgba(120, 190, 220, 0.5);
  background:
    radial-gradient(circle at 20% 0%, rgba(90, 170, 220, 0.2), transparent 50%),
    linear-gradient(165deg, rgba(16, 24, 32, 0.96), rgba(10, 12, 16, 0.96));
  box-shadow: 0 1rem 2.4rem rgba(0, 0, 0, 0.55);
  text-align: center;
  animation: sponsor-card-in 0.65s cubic-bezier(0.18, 0.9, 0.25, 1.15) forwards;
}

.winner-event-eyebrow {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: rgba(180, 220, 240, 0.75);
}

.winner-event-title {
  margin: 0.3rem 0 0.35rem;
  font-family: var(--font-ui);
  font-size: 1.45rem;
  font-weight: 700;
  color: #d8f0ff;
}

.winner-event-win {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: #ffd56a;
}

.winner-event-text {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(236, 244, 250, 0.92);
}

.winner-event-actions {
  display: flex;
  gap: 0.55rem;
  justify-content: center;
  flex-wrap: wrap;
}

.winner-event-actions .btn {
  min-width: 7rem;
  touch-action: manipulation;
  position: relative;
  z-index: 5;
  pointer-events: auto;
}

.winner-event-error {
  margin: 0 0 0.65rem;
  min-height: 1.1em;
  font-size: 0.78rem;
  color: #ff9b9b;
}

.winner-event-fx {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.winner-event-fx[hidden] {
  display: none !important;
}

.winner-spark {
  position: absolute;
  left: 50%;
  top: 42%;
  font-size: 1.6rem;
  animation: winner-spark-fly 0.9s ease-out forwards;
}

@keyframes winner-spark-fly {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  30% { opacity: 1; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.15); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx) * 1.6), calc(-50% + var(--dy) * 1.6)) scale(0.7); }
}

/* D11 shot clock */
.shot-clock-ring {
  position: absolute;
  right: 0.85rem;
  top: calc(var(--topbar-h, 3rem) + 0.55rem);
  z-index: 40;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    conic-gradient(#7dff9a calc(var(--shot-pct, 1) * 1turn), rgba(255,255,255,0.12) 0),
    rgba(8, 12, 8, 0.72);
  box-shadow: 0 0 0 0.12rem rgba(125, 255, 154, 0.35);
  pointer-events: none;
}
.shot-clock-ring::after {
  content: '';
  position: absolute;
  inset: 0.38rem;
  border-radius: 50%;
  background: rgba(10, 14, 10, 0.92);
}
.shot-clock-num {
  position: relative;
  z-index: 1;
  font-weight: 800;
  font-size: 1.05rem;
  color: #e8ffe8;
}
.shot-clock-ring.is-mine { box-shadow: 0 0 0 0.14rem rgba(255, 210, 90, 0.55); }
.shot-clock-ring.is-urgent {
  background:
    conic-gradient(#ffb14a calc(var(--shot-pct, 1) * 1turn), rgba(255,255,255,0.12) 0),
    rgba(8, 12, 8, 0.72);
  animation: turn-urgent-pulse 0.7s ease-in-out infinite;
}
.shot-clock-ring.is-critical {
  background:
    conic-gradient(#ff6b5a calc(var(--shot-pct, 1) * 1turn), rgba(255,255,255,0.12) 0),
    rgba(8, 12, 8, 0.72);
}
.shot-clock-ring[hidden] { display: none !important; }
.hand-report-actions {
  display: flex;
  gap: 0.45rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.55rem;
}
