:root {
  --bg: #0a110e;
  --felt-1: #1e4536;
  --felt-2: #0d2018;
  --gold: #d3a94f;
  --gold-dim: rgba(211, 169, 79, 0.35);
  --gold-soft: rgba(211, 169, 79, 0.1);
  --text: #e9eff0;
  --muted: #8ba09d;
  --win: #e0a94f;
  --lose: #8c9ba3;
  --up: #d4614f;
  --down: #4f9c77;
  --danger: #c4564b;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(120% 80% at 50% 0%, #14231d 0%, var(--bg) 60%);
  color: var(--text);
  font-size: 14px;
  user-select: none;
}

.hidden { display: none !important; }

.screen { position: absolute; inset: 0; display: flex; flex-direction: column; }

/* ============ 登录 ============ */
.login {
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 360px;
  padding: 36px 28px 28px;
  border-radius: 20px;
  background: linear-gradient(170deg, rgba(30, 69, 54, 0.55), rgba(13, 32, 24, 0.9));
  border: 1px solid rgba(211, 169, 79, 0.18);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px);
}

.brand { text-align: center; margin-bottom: 30px; }

.brand-mark {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: 16px;
  border: 1px solid var(--gold-dim);
  background: linear-gradient(160deg, #22493a, #12281f);
  display: flex; align-items: center; justify-content: center;
  gap: 2px;
  font-size: 20px;
}
.bm-s { color: #dfe7e4; }
.bm-h { color: #c4564b; }

.brand h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #f2e6c9;
}

.brand .sub {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
}

.field { display: block; margin-bottom: 18px; }
.field span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 7px;
  letter-spacing: 1px;
}
.field input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
.field input:focus { border-color: var(--gold-dim); }
.field input::placeholder { color: #5d6d6b; }

.btn {
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid var(--gold-dim);
  background: transparent;
  color: var(--gold);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.5px;
}
.btn:hover:not(:disabled) { background: var(--gold-soft); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.35; cursor: default; }

.btn.primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(180deg, #dcb75f, #b48a33);
  color: #1a1305;
  border: none;
  font-size: 15px;
  letter-spacing: 2px;
  box-shadow: 0 8px 24px rgba(180, 138, 51, 0.22);
}
.btn.primary:hover { filter: brightness(1.06); }

.login-note {
  margin-top: 20px;
  text-align: center;
  font-size: 11px;
  color: #607270;
  line-height: 1.7;
}

/* ============ 顶栏 ============ */
.game {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.topbar {
  height: auto;
  min-height: 54px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 5px 16px 6px;
  background: rgba(10, 17, 14, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 5;
}

/* 顶部两行：第一行 = 第 N 局 · 阶段 · 余额；第二行 = 房间/底注/按钮
   阶段文字以前是垂直居中的绝对定位，会压到第二行的「房间 5361」上，现在收进第一行 */
.tb-top {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
  min-height: 26px;
}
.tb-round { grid-column: 1; justify-self: start; }
.tb-right { grid-column: 3; justify-self: end; min-width: 0; }

.tb-left, .tb-right { display: flex; align-items: center; gap: 10px; }

/* 左上角：第 N 局 */
.tb-left {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.tb-round {
  font-size: 13px;
  font-weight: 700;
  color: #f0e2be;
  letter-spacing: 0.5px;
  line-height: 1;
  white-space: nowrap;
}
.tb-round b {
  font-size: 16px;
  font-weight: 800;
  color: #e9cd8c;
  font-variant-numeric: tabular-nums;
  margin: 0 1px;
}
.tb-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.tb-meta::-webkit-scrollbar { display: none; }

.room-tag, .ante-tag {
  font-size: 11px;
  color: var(--muted);
  padding: 5px 9px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  white-space: nowrap;
}
.room-tag b, .ante-tag b { color: #cfdcd8; font-weight: 600; }

.tb-meta .room-tag, .tb-meta .ante-tag {
  font-size: 9.5px;
  padding: 2px 6px;
  border-radius: 5px;
  letter-spacing: 0.2px;
}

/* 语音播报开关 */
.voice-btn {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(211, 169, 79, 0.24);
  background: rgba(255, 255, 255, 0.04);
  color: #e9cd8c;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.voice-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.voice-btn .vspk { stroke: none; }
.voice-btn .vcut { display: none; stroke-width: 2; fill: none; }
.voice-btn.off { color: #63736f; border-color: rgba(255, 255, 255, 0.1); }
.voice-btn.off .vwave { display: none; }
.voice-btn.off .vcut { display: block; }
.voice-btn:active { transform: scale(0.94); }

.tb-center {
  grid-column: 2;
  position: static;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  pointer-events: none;   /* 纯展示，别挡住两侧的按钮 */
  white-space: nowrap;
}

.phase-text {
  font-size: 13px;
  font-weight: 600;
  color: #f0e2be;
  letter-spacing: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.countdown {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 18px;
}

.coin-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(211, 169, 79, 0.1);
  border: 1px solid rgba(211, 169, 79, 0.2);
}
.coin-chip b {
  color: #e9cd8c;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: linear-gradient(180deg, #e8c877, #b48a33);
  box-shadow: 0 0 8px rgba(211, 169, 79, 0.6);
}

.conn-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4a9e6f;
  box-shadow: 0 0 6px rgba(74, 158, 111, 0.7);
}
.conn-dot.off { background: var(--danger); box-shadow: 0 0 6px rgba(196, 86, 75, 0.7); }

/* ============ 倒计时条 ============ */
.timerbar {
  height: 2px;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
#bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #b48a33, #e8c877);
  transition: width 0.1s linear;
}

/* ============ 桌面 ============ */
.table {
  flex: 1 1 0;
  min-height: 0;
  padding: 8px 10px 2px;
  position: relative;
}

.felt {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  background:
    radial-gradient(78% 62% at 50% 42%, var(--felt-1) 0%, var(--felt-2) 82%);
  box-shadow:
    inset 0 0 0 1px rgba(211, 169, 79, 0.16),
    inset 0 0 90px rgba(0, 0, 0, 0.6),
    0 18px 50px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.felt::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 38%);
  pointer-events: none;
}

.felt::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 17px;
  border: 1px dashed rgba(211, 169, 79, 0.09);
  pointer-events: none;
}

.seats { position: absolute; inset: 0; }

.chips {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 16;
  overflow: hidden;
}

.chip {
  position: absolute;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #ffeeb8, #e0b556 52%, #96701f);
  border: 1.5px solid rgba(255, 244, 210, 0.75);
  box-shadow:
    0 0 12px rgba(240, 205, 120, 0.55),
    0 2px 7px rgba(0, 0, 0, 0.6);
  will-change: transform, opacity;
}
.chip::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 1px dashed rgba(120, 88, 26, 0.5);
}

.center-info {
  position: absolute;
  left: 50%; top: 45%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  width: min(262px, 62vw);
  z-index: 4;
}

/* 牌桌中央的倒计时时钟 */
.clock {
  position: relative;
  width: 70px;
  height: 70px;
  margin: 0 auto 4px;
  display: block;
}
.clock.hidden { display: none; }
.clk-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.clk-track {
  fill: rgba(6, 14, 11, 0.62);
  stroke: rgba(240, 207, 133, 0.16);
  stroke-width: 5;
}
.clk-arc {
  fill: none;
  stroke: #f0cf85;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 270.2;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.25s linear, stroke 0.3s;
  filter: drop-shadow(0 0 6px rgba(240, 207, 133, 0.55));
}
.clock.urgent .clk-arc { stroke: #ef6b52; filter: drop-shadow(0 0 8px rgba(239, 107, 82, 0.65)); }
.clk-body {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  line-height: 1;
}
.clk-body b {
  font-size: 27px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: #ffe9b8;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
}
.clock.urgent .clk-body b { color: #ffb9a6; }
.clk-phase {
  margin-top: 2px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(226, 236, 232, 0.72);
}

.center-mult {
  font-size: 26px;
  font-weight: 800;
  color: rgba(232, 205, 140, 0.9);
  letter-spacing: 1px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  font-variant-numeric: tabular-nums;
  min-height: 36px;
  transition: color 0.2s;
}

.log-line {
  display: inline-block;
  margin-top: 14px;
  padding: 3px 10px;
  border-radius: 8px;
  background: rgba(7, 15, 12, 0.74);
  font-size: 11.5px;
  line-height: 1.45;
  color: rgba(206, 224, 217, 0.92);
  letter-spacing: 0.3px;
  min-height: 17px;
  max-width: 74vw;
  transition: opacity 0.3s;
}
.log-line:empty {
  background: none;
  padding: 0;
}

.center-mult.win { color: #e8c877; text-shadow: 0 4px 28px rgba(232, 200, 119, 0.35); }
.center-mult.lose { color: #97a5ab; }
.center-mult.tie { color: #b8c8c4; }

/* 结算大数字加底，避免被两侧牌面切碎 */
.center-mult.win,
.center-mult.lose,
.center-mult.tie {
  display: inline-block;
  padding: 1px 14px;
  border-radius: 13px;
  background: rgba(7, 15, 12, 0.82);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 6px 20px rgba(0, 0, 0, 0.45);
}

.pot-note {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 9px;
  border-radius: 8px;
  background: rgba(7, 15, 12, 0.7);
  font-size: 11px;
  color: rgba(206, 224, 217, 0.78);
  letter-spacing: 0.6px;
  white-space: nowrap;
}
.pot-note:empty { background: none; padding: 0; }

.pot-note .pn { font-weight: 700; letter-spacing: 0.5px; }
.pot-note .pn.strong { color: #f0cf85; }
.pot-note .pn.mid { color: #9fd0c2; }
.pot-note .pn.weak { color: #93a5a0; }
.pot-note .pn-sep { margin: 0 5px; opacity: 0.45; }

/* ============ 抢庄战况面板 ============ */
.bid-panel {
  position: relative;
  overflow: hidden;
  margin-top: 14px;
  padding: 12px 13px 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(26, 48, 40, 0.96), rgba(9, 20, 16, 0.96));
  border: 1px solid rgba(211, 169, 79, 0.2);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: bpIn 0.32s ease-out both;
}

.bid-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 207, 133, 0.55), transparent);
}

@keyframes bpIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.bp-hand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bp-label {
  font-size: 10px;
  letter-spacing: 1px;
  color: rgba(160, 185, 178, 0.75);
}

.bp-chip {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 7px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.bp-chip.strong {
  color: #f0cf85;
  background: rgba(211, 169, 79, 0.16);
  border-color: rgba(211, 169, 79, 0.36);
  box-shadow: 0 0 14px rgba(211, 169, 79, 0.18);
}
.bp-chip.mid {
  color: #9fd0c2;
  background: rgba(120, 200, 180, 0.1);
  border-color: rgba(120, 200, 180, 0.24);
}
.bp-chip.weak {
  color: #8b9d99;
  background: rgba(140, 155, 163, 0.08);
  border-color: rgba(140, 155, 163, 0.18);
}

.bp-dots {
  display: flex;
  gap: 4px;
  margin: 10px 0 8px;
}

.bp-dots .dot {
  flex: 1;
  height: 8px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.bp-dots .dot.off { background: #4d5f5b; box-shadow: none; }
.bp-dots .dot.m1 { background: #7a6733; }
.bp-dots .dot.m2 { background: #a98a41; }
.bp-dots .dot.m3 { background: #d7b060; }
.bp-dots .dot.m4 {
  background: #f2cd7a;
  box-shadow: 0 0 9px rgba(242, 205, 122, 0.55);
}
.bp-dots .dot.mine { outline: 1px solid rgba(233, 239, 240, 0.55); outline-offset: 1px; }

.bp-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: rgba(160, 185, 178, 0.7);
}

.bp-best {
  font-weight: 700;
  color: rgba(200, 220, 214, 0.6);
}
.bp-best.hot {
  color: #f0cf85;
  text-shadow: 0 0 12px rgba(240, 207, 133, 0.4);
}

/* ============ 座位 ============ */
/* 结构：牌组一列 + 「头像 / 名字 / 分数」一列，头像在上、名字分数紧贴其下 */
.seat {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 3px;
  z-index: 3;
  transition: opacity 0.2s;
}

.seat.pos-bottom {
  flex-direction: column-reverse;
  align-items: center;
  gap: 2px;
}

.seat.pos-right { flex-direction: row-reverse; }

.seat.me { z-index: 5; }

.who {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  min-width: 0;
}

/* 本局输赢：结算时浮在头像上方，几秒后飘走 */
.card-delta {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 2px);
  z-index: 16;
  transform: translate(-50%, 8px) scale(0.7);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  font-size: 18px;
  line-height: 20px;
  font-weight: 900;
  letter-spacing: 0.2px;
  font-variant-numeric: tabular-nums;
  color: #ffd24a;
  padding: 1px 8px;
  border-radius: 10px;
  background: rgba(8, 15, 12, 0.78);
  box-shadow: 0 0 0 1px rgba(255, 210, 100, 0.32);
  text-shadow:
    0 2px 5px rgba(0, 0, 0, 0.95),
    0 0 14px rgba(255, 176, 40, 0.55);
}
.card-delta.show {
  animation: cardDelta 4.6s cubic-bezier(.2, .9, .3, 1) both;
}
@keyframes cardDelta {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(0.55); }
  10% { opacity: 1; transform: translate(-50%, -7px) scale(1.16); }
  20% { transform: translate(-50%, -9px) scale(1); }
  72% { opacity: 1; transform: translate(-50%, -13px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -30px) scale(0.95); }
}

.meta { display: none; }

.avatar-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  flex: 0 0 auto;
}

.avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: transform 0.22s cubic-bezier(.3,1.4,.5,1), box-shadow 0.22s;
}

.seat.banker .avatar {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(211, 169, 79, 0.16), 0 4px 18px rgba(0, 0, 0, 0.45);
}

.seat.bid-win .avatar {
  transform: scale(1.2);
  box-shadow: 0 0 0 5px rgba(211, 169, 79, 0.22), 0 0 26px rgba(232, 200, 119, 0.5);
}

.seat.offline .avatar { filter: grayscale(1); opacity: 0.5; }

/* 抢庄点亮的光环 */
.avatar-wrap .ring {
  position: absolute;
  left: 50%; top: 50%;
  width: 46px; height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  border: 2px solid rgba(255, 226, 160, 0.95);
  box-shadow: 0 0 14px rgba(232, 200, 119, 0.75), inset 0 0 10px rgba(232, 200, 119, 0.35);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

.seat.bid-flash .ring { animation: ringOut 0.55s ease-out; }
.seat.bid-win .ring { animation: ringOut 0.75s ease-out 2; }

@keyframes ringOut {
  0% { opacity: 0.9; transform: scale(0.9); }
  100% { opacity: 0; transform: scale(1.9); }
}

.seat.bid-flash .avatar { animation: bump 0.42s ease-out; }

@keyframes bump {
  0% { transform: scale(1); }
  38% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

.name {
  font-size: 12.5px;
  line-height: 15px;
  font-weight: 700;
  color: #e6f0ec;
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  margin-top: 2px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}

/* 头像正下方的当前分数：平时是筹码，结算时换成本局输赢 */
.score {
  font-size: 15px;
  line-height: 18px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.2px;
  color: #f2d795;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  margin-top: 1px;
}

/* 本期累计输赢：正为金、负为灰绿、零/未开局为中性灰 */
.score.cum {
  color: #93a5a1;
  font-size: 14px;
}
.score.cum.up { color: #ffd98a; text-shadow: 0 1px 6px rgba(240, 190, 90, 0.35); }
.score.cum.down { color: #8fb0ab; }
.score.cum.bump { animation: scorePop 0.42s cubic-bezier(.3,1.5,.5,1) both; }
.score.win {
  color: #fff0c8;
  background: linear-gradient(180deg, rgba(196, 74, 56, 0.95), rgba(140, 44, 32, 0.95));
  padding: 0 7px;
  border-radius: 7px;
  box-shadow: 0 0 0 1px rgba(255, 210, 140, 0.5);
  animation: scorePop 0.34s cubic-bezier(.3,1.5,.5,1) both;
}
.score.lose {
  color: #dcebf2;
  background: linear-gradient(180deg, rgba(52, 84, 70, 0.95), rgba(30, 54, 44, 0.95));
  padding: 0 7px;
  border-radius: 7px;
  box-shadow: 0 0 0 1px rgba(170, 210, 195, 0.3);
  animation: scorePop 0.34s cubic-bezier(.3,1.5,.5,1) both;
}
@keyframes scorePop {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.hist {
  font-size: 9.5px;
  line-height: 11px;
  margin-top: 1px;
  font-variant-numeric: tabular-nums;
  color: #6d8280;
  min-height: 11px;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.hist.up { color: var(--up); }
.hist.down { color: var(--down); }
.hist.flat { color: #7f918e; }

.badge {
  position: absolute;
  top: -6px;
  right: -16px;
  height: 23px;
  line-height: 23px;
  padding: 0 8px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.2px;
  color: #1a1305;
  background: rgba(211, 169, 79, 0.92);
  white-space: nowrap;
  opacity: 0;
  transform: scale(0.7);
  transition: all 0.2s;
  pointer-events: none;
  z-index: 8;
}
.badge.show { opacity: 1; transform: scale(1); }
.badge.pop { animation: badgePop 0.3s cubic-bezier(.3,1.5,.5,1); }

@keyframes badgePop {
  0% { transform: scale(0.5); }
  60% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

.pos-left .badge,
.pos-top .badge { right: auto; left: -10px; top: -14px; }
.pos-right .badge { right: -10px; left: auto; top: -14px; }
.pos-bottom .badge { right: -12px; top: -12px; }

.badge.ghost {
  background: rgba(20, 30, 26, 0.9);
  color: #b8c8c4;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 500;
}
.badge.gold { box-shadow: 0 0 10px rgba(211, 169, 79, 0.5); }

/* 庄家印章 */
.stamp {
  position: absolute;
  right: -2px;
  bottom: -3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #ffe9b8;
  background: linear-gradient(160deg, #b8433a, #8d2b25);
  border: 1.5px solid rgba(255, 214, 150, 0.65);
  box-shadow: 0 3px 10px rgba(140, 40, 32, 0.6);
  opacity: 0;
  transform: rotate(-14deg) scale(0.4);
  transition: opacity 0.2s, transform 0.28s cubic-bezier(.3,1.6,.5,1);
  z-index: 9;
  pointer-events: none;
}
.stamp.show {
  opacity: 1;
  transform: rotate(-14deg) scale(1);
}

/* 骰子 */
.dice {
  position: absolute;
  left: 50%;
  top: -52px;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  border-radius: 8px;
  background: linear-gradient(155deg, #fffdf6, #e3d9c2);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.55), inset 0 -2px 4px rgba(0, 0, 0, 0.14);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 6px;
  gap: 1.5px;
  z-index: 74;
  pointer-events: none;
}
.dice i { border-radius: 50%; background: transparent; }
/* 骰子飞行动画的独立层（不挂在座位上，才能从头顶抛到屏幕中央） */
.dice-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 76;
}
.fx-dice-wrap {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  will-change: left, top, transform;
}
.fx-dice-wrap > .dice {
  position: relative;
  left: auto;
  top: auto;
  margin: 0;
  width: 46px;
  height: 46px;
  border-radius: 9px;
  padding: 6px;
  border: 1px solid rgba(255, 226, 160, 0.55);
  box-shadow: 0 0 30px rgba(240, 207, 133, 0.5), 0 10px 26px rgba(0, 0, 0, 0.65);
}

/* 骰子在中央时，其他座位稍稍后退，保证骰子是视觉中心 */
body.dice-live .seat { opacity: 0.5; }
body.dice-live .seat.dice-count,
body.dice-live .seat.bid-win { opacity: 1; }

/* 逆时针数数时点亮的座位 */
.seat.dice-count .avatar {
  transform: scale(1.2);
  border-color: #ffdc93;
  box-shadow: 0 0 0 4px rgba(240, 207, 133, 0.3), 0 0 28px rgba(240, 207, 133, 0.8);
}
.seat.dice-count .name { color: #ffe6ae; }
.seat.dice-count .avatar-wrap::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(255, 226, 160, 0.75);
  animation: countRing 0.45s ease-out both;
  pointer-events: none;
}
@keyframes countRing {
  0% { opacity: 0.9; transform: scale(0.86); }
  100% { opacity: 0; transform: scale(1.35); }
}

/* 骰子宿主座位提到提示条之上，保证骰子永远可见 */
.seat.dice-host { z-index: 73; }
.dice i.on {
  background: radial-gradient(circle at 35% 30%, #d9503f, #a52a22);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.45);
}
.dice.rolling { animation: diceShake 0.14s linear infinite; }
.dice.land {
  animation: diceLand 0.44s cubic-bezier(.3, 1.6, .5, 1) both;
  box-shadow: 0 0 20px rgba(240, 207, 133, 0.75), 0 5px 16px rgba(0, 0, 0, 0.5);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.dice.gone { opacity: 0; transform: translateY(-14px) scale(0.85); }

@keyframes diceShake {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-1.5px, 1px) rotate(-7deg); }
  50% { transform: translate(1.5px, -1px) rotate(6deg); }
  75% { transform: translate(-1px, -1.5px) rotate(-4deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes diceLand {
  0% { transform: scale(1.5) rotate(-12deg); }
  55% { transform: scale(0.92) rotate(4deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* 跳庄：骰子点到的座位逐个弹一下 */
.seat.hop .avatar {
  animation: hopBump 0.34s ease-out;
  box-shadow: 0 0 0 3px rgba(240, 207, 133, 0.8), 0 0 22px rgba(240, 207, 133, 0.55);
}

@keyframes hopBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.24); }
  100% { transform: scale(1); }
}



.seat.collect-glow .avatar {
  box-shadow: 0 0 0 4px rgba(232, 200, 119, 0.25), 0 0 30px rgba(232, 200, 119, 0.55);
}

.mini-cards {
  display: flex;
  gap: 1px;
  height: 38px;
  align-items: flex-start;
  flex: 0 0 auto;
}

.mini-cards .card {
  --w: 26px;
  --h: 36px;
  --fs: 11px;
  --cs: 8px;
  --pip: 14px;
  box-shadow:
    inset 0 0 0 1px rgba(18, 26, 23, 0.12),
    0 2px 5px rgba(0, 0, 0, 0.45);
}
.mini-cards .card.tail { margin-left: 3px; }

/* 牌型一行字：翻牌后每家显示自己的牛几 */
.hand-tag {
  position: absolute;
  left: 50%;
  top: 100%;
  margin-top: 1px;
  transform: translateX(-50%);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.5px;
  line-height: 19px;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.18s ease;
  z-index: 12;
}
.hand-tag.show {
  opacity: 1;
  animation: tagPop 0.32s cubic-bezier(.3,1.5,.5,1) both;
}
.hand-tag.hot {
  color: #ffd98a;
  text-shadow: 0 0 10px rgba(255, 200, 110, 0.65), 0 1px 2px rgba(0, 0, 0, 0.8);
}
.hand-tag.good {
  color: #9fe3cd;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}
.hand-tag.norm { color: #d7e2de; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); }
.hand-tag.none { color: #8da19c; }
.hand-tag.sm { font-size: 13px; letter-spacing: 0; }

@keyframes tagPop {
  0% { transform: translateX(-50%) scale(0.4); opacity: 0; }
  65% { transform: translateX(-50%) scale(1.22); opacity: 1; }
  100% { transform: translateX(-50%) scale(1); }
}

/* 亮牌后 3 张凑十成组，与后面两张拉开距离 */
.mini-cards .card.grp { margin-left: 5px; }
.myhand .card.grp { margin-left: 14px; }

/* 最后一张暗牌的翻牌动画 */
.mini-cards { perspective: 700px; }
.card.flip-in {
  animation: cardFlip 0.52s cubic-bezier(.3,.9,.4,1) both;
  transform-origin: center;
}
@keyframes cardFlip {
  0% { transform: rotateY(-92deg) scale(0.85); filter: brightness(0.55); }
  30% { transform: rotateY(0deg) scale(2.1); filter: brightness(1.7); }
  62% { transform: rotateY(0deg) scale(1.85); filter: brightness(1.25); }
  100% { transform: rotateY(0deg) scale(1); filter: brightness(1); }
}

/* 庄家的底牌翻得更张扬 */
.card.flip-banker {
  z-index: 5;
  animation: cardFlipBanker 0.78s cubic-bezier(.3,.9,.4,1) both;
  box-shadow: 0 0 0 2px rgba(240, 207, 133, 0.9), 0 0 26px rgba(240, 207, 133, 0.7), 0 4px 12px rgba(0,0,0,.5);
}
@keyframes cardFlipBanker {
  0% { transform: rotateY(-92deg) scale(0.85); filter: brightness(0.55); }
  38% { transform: rotateY(0deg) scale(3.1); filter: brightness(2.05); }
  70% { transform: rotateY(0deg) scale(2.7); filter: brightness(1.4); }
  100% { transform: rotateY(0deg) scale(1); filter: brightness(1); }
}

.card.flip-self {
  animation: cardFlip 0.6s cubic-bezier(.3,.9,.4,1) both;
}


.delta {
  display: none;
  margin: 3px 0 1px;
  padding: 1px 8px;
  border-radius: 7px;
  font-size: 14px;
  line-height: 18px;
  font-weight: 900;
  letter-spacing: 0.2px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  white-space: nowrap;
  white-space: nowrap;
}
.delta.show { display: inline-block; animation: deltaPop 0.34s cubic-bezier(.3,1.5,.5,1) both; }
.delta.win {
  color: #ffe9b8;
  background: linear-gradient(180deg, rgba(196, 74, 56, 0.95), rgba(140, 44, 32, 0.95));
  box-shadow: 0 0 0 1px rgba(255, 210, 140, 0.55), 0 3px 12px rgba(0, 0, 0, 0.45);
}
.delta.lose {
  color: #dbe8ef;
  background: linear-gradient(180deg, rgba(58, 92, 76, 0.95), rgba(34, 60, 48, 0.95));
  box-shadow: 0 0 0 1px rgba(180, 220, 200, 0.35), 0 3px 12px rgba(0, 0, 0, 0.45);
}

@keyframes deltaPop {
  0% { opacity: 0; transform: scale(0.6); }
  60% { opacity: 1; transform: scale(1.12); }
  100% { opacity: 1; transform: scale(1); }
}

/* ============ 扑克牌 ============ */
/* 尺寸全走变量：改牌大小只改变量，角标/花色自动等比缩放 */
.card {
  --w: 34px;
  --h: 47px;
  --fs: 14px;   /* 角标数字 */
  --cs: 10px;   /* 角标花色 */
  --pip: 20px;  /* 中央花色 */
  position: relative;
  width: var(--w);
  height: var(--h);
  border-radius: calc(var(--w) * 0.11);
  background: #fff;
  color: #0f1113;
  flex: 0 0 auto;
  box-shadow:
    inset 0 0 0 1px rgba(18, 26, 23, 0.12),
    0 2px 6px rgba(0, 0, 0, 0.38);
  animation: dealIn 0.28s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

/* 花色图形：内联 SVG，实心裁切，fill 跟随 currentColor */
.card .sp {
  display: block;
  fill: currentColor;
}

/* 左上角：大数字 + 紧贴其下的花色 */
.card .corner {
  position: absolute;
  top: calc(var(--h) * 0.03);
  left: calc(var(--w) * 0.065);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.card .corner .r {
  font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", sans-serif;
  font-size: var(--fs);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: -0.1em;
}
.card .corner .cs {
  width: var(--cs);
  height: var(--cs);
  display: none;   /* 小牌空间紧，只留数字，避免糊 */
}
/* 10 这类两位数收窄，免得挤到中央花色 */
.card .corner .r.wide {
  font-size: calc(var(--fs) * 0.8);
  letter-spacing: -0.07em;
}
.card.big .corner .cs { display: block; }

/* 中央大花色：居中偏下，和参考图一致 */
.card .pip {
  position: absolute;
  left: 50%;
  top: 65%;
  width: var(--pip);
  height: var(--pip);
  transform: translate(-50%, -50%);
}

.card.red { color: #d91f14; }

.card.big {
  --w: 66px;
  --h: 90px;
  --fs: 27px;
  --cs: 14px;
  --pip: 40px;
  box-shadow:
    inset 0 0 0 1px rgba(18, 26, 23, 0.1),
    0 6px 16px rgba(0, 0, 0, 0.45);
}

/* 牌背：砖红底 + 白细框 + 菱形暗纹 */
.card.back {
  background-color: #b8433a;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(255, 242, 232, 0.55) 0 1.2px, transparent 1.8px),
    repeating-linear-gradient(45deg, rgba(255, 242, 232, 0.07) 0 1px, transparent 1px 10px),
    repeating-linear-gradient(-45deg, rgba(255, 242, 232, 0.07) 0 1px, transparent 1px 10px);
  background-size: 10px 10px, auto, auto;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.card.back::after {
  content: "";
  position: absolute;
  inset: 7%;
  border: 1px solid rgba(255, 240, 228, 0.45);
  border-radius: calc(var(--w) * 0.04);
  pointer-events: none;
}

.card.flip { animation: flipIn 0.34s ease-out both; }
@keyframes flipIn {
  0% { transform: rotateY(86deg) scale(0.94); opacity: 0.25; }
  55% { opacity: 1; }
  100% { transform: rotateY(0deg) scale(1); opacity: 1; }
}

@keyframes dealIn {
  from { opacity: 0; transform: translateY(-18px) scale(0.9); }
  to { opacity: 1; transform: none; }
}

/* ============ 底部 ============ */
.bottom {
  flex: 0 0 auto;
  padding: 2px 14px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

/* 底部预留区：给后续功能按钮留位置，当前留空 */
/* 底部操作区按钮 */
.dock-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(211, 169, 79, 0.3);
  background: rgba(255, 255, 255, 0.045);
  color: #d9c690;
  font-size: 11.5px;
  font-family: inherit;
  letter-spacing: 0.5px;
  cursor: pointer;
}
.dock-btn svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.dock-btn:active { transform: scale(0.96); }
.dock {
  width: 100%;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.myhand {
  display: flex;
  gap: 6px;
  min-height: 98px;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  perspective: 900px;
}

.myhand .card.tail { margin-left: 10px; }

.myhand:empty::after {
  content: "等待发牌";
  font-size: 12px;
  color: #5d6d6b;
  letter-spacing: 2px;
}

.myhand .hand-label {
  font-size: 17px;
  color: #1a1305;
  margin-left: 12px;
  padding: 4px 11px;
  border-radius: 9px;
  letter-spacing: 1px;
  font-weight: 800;
  white-space: nowrap;
  background: linear-gradient(180deg, #e6c574, #bd9340);
  box-shadow: 0 4px 14px rgba(200, 160, 70, 0.28);
  animation: labelIn 0.34s cubic-bezier(.3,1.4,.5,1) both;
}
/* 带倍数：牌型名一行、×N 一行，宽度只占三个字，长名字也放得下 */
.myhand .hand-label.two {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  letter-spacing: 0;
  line-height: 1.12;
}
.myhand .hand-label.two b { font-size: 15px; font-weight: 800; }
.myhand .hand-label.two i {
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  opacity: 0.72;
}

@keyframes labelIn {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

.actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  min-height: 46px;
}

.actions .hint.full {
  flex-basis: 100%;
  text-align: center;
}

.actions .hint {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.actions .btn {
  min-width: 76px;
  padding: 11px 16px;
  font-size: 14.5px;
  border-radius: 12px;
  transition: transform 0.09s ease, box-shadow 0.18s ease, background 0.18s ease, filter 0.12s ease;
  /* 抢庄 / 下注统一黄色实底 */
  background: linear-gradient(180deg, #f7d97e 0%, #e9bd52 48%, #cf9a2e 100%);
  border: 1px solid rgba(255, 236, 178, 0.75);
  color: #2b1d05;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(150, 105, 20, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.actions .btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #ffe58f 0%, #f0c65c 48%, #d8a234 100%);
}
.actions .btn.small { min-width: 66px; }

/* 下注按钮：比抢庄按钮更大更重，按金额平分一行 */
/* 「翻牌」确认按钮：亮金实底，比其它按钮更抢眼 */
.actions .btn.reveal-btn {
  min-width: 132px;
  padding: 13px 26px;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 3px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffe9a3 0%, #f5c94f 46%, #d99b1e 100%);
  color: #33200a;
  border: 1px solid rgba(255, 244, 196, 0.9);
  box-shadow:
    0 8px 22px rgba(160, 110, 15, 0.45),
    0 0 0 1px rgba(255, 230, 160, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  animation: revealPulse 1.6s ease-in-out infinite;
}
.actions .btn.reveal-btn:active:not(:disabled) {
  transform: scale(0.95) translateY(2px);
  animation: none;
}
@keyframes revealPulse {
  0%, 100% { box-shadow: 0 8px 22px rgba(160, 110, 15, 0.45), 0 0 0 1px rgba(255, 230, 160, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
  50% { box-shadow: 0 8px 26px rgba(200, 145, 30, 0.6), 0 0 0 4px rgba(255, 214, 110, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
}

.actions .btn.bet-btn {
  flex: 0 0 auto;
  min-width: 76px;
  padding: 13px 10px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  border-radius: 14px;
  white-space: nowrap;
}
.actions .btn.bet-btn:active:not(:disabled) {
  transform: scale(0.94) translateY(2px);
}

/* 打击感：按下瞬间收紧 + 提亮 */
.actions .btn:active:not(:disabled) {
  transform: scale(0.93) translateY(1px);
  filter: brightness(1.18);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.22), 0 0 0 2px rgba(240, 207, 133, 0.35);
}

/* 抢庄：不抢（次级）+ 倍数（梯度） */
.actions .btn.ghost {
  min-width: 74px;
  border-color: rgba(233, 189, 82, 0.45);
  color: #e9c877;
  background: rgba(233, 189, 82, 0.1);
  box-shadow: none;
  font-weight: 700;
}
.actions .btn.ghost:hover:not(:disabled) {
  border-color: rgba(247, 217, 126, 0.8);
  color: #ffe6a8;
  background: rgba(233, 189, 82, 0.18);
}

.bid-group { display: flex; gap: 6px; }

.bid-btn {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  min-width: 80px !important;
  padding: 12px 12px !important;
  border-radius: 12px;
  position: relative;
  transition: transform 0.14s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.bid-btn .bm { font-size: 11px; opacity: 0.62; margin-right: 2px; }
.bid-btn .bn { font-size: 22px; font-weight: 800; line-height: 1; letter-spacing: -0.5px; }
.bid-btn .bu { font-size: 11px; opacity: 0.62; margin-left: 2px; }

.bid-btn.b1 { background: rgba(211, 169, 79, 0.04); border-color: rgba(211, 169, 79, 0.16); color: #a8946a; }
.bid-btn.b2 { background: linear-gradient(180deg, rgba(211, 169, 79, 0.1), rgba(211, 169, 79, 0.03)); border-color: rgba(211, 169, 79, 0.3); color: #cdac6d; }
.bid-btn.b3 { background: linear-gradient(180deg, rgba(211, 169, 79, 0.2), rgba(211, 169, 79, 0.06)); border-color: rgba(220, 180, 100, 0.48); color: #e6c88b; }
.bid-btn.b4 {
  background: linear-gradient(180deg, #e6c574, #bd9340);
  border-color: #f4d898;
  color: #1c1407;
  box-shadow: 0 6px 20px rgba(220, 180, 90, 0.34), inset 0 1px 0 rgba(255, 245, 215, 0.5);
}
.bid-btn.b4 .bm,
.bid-btn.b4 .bu { opacity: 0.66; }
.bid-btn:hover:not(:disabled) { transform: translateY(-2px); }
.bid-btn.b4:hover:not(:disabled) { box-shadow: 0 8px 24px rgba(220, 180, 90, 0.32); }

.bid-btn.locked { opacity: 0.34; }
.bid-btn.picked,
.actions .btn.ghost.picked {
  opacity: 1;
  outline: 2px solid rgba(240, 207, 133, 0.85);
  outline-offset: 1px;
  box-shadow: 0 0 18px rgba(240, 207, 133, 0.35);
}

/* ============ 战绩弹窗 ============ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 7, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 60;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.report-box {
  width: min(540px, 100%);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  background: #0f1a16;
  border: 1px solid rgba(211, 169, 79, 0.26);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: popIn 0.26s cubic-bezier(.3,1.3,.5,1);
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.report-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  color: #e8d8b0;
  letter-spacing: 1px;
}
.report-head > span {
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 左上角：返回大厅 */
.report-back {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 5px 10px 5px 6px;
  border-radius: 8px;
  border: 1px solid rgba(211, 169, 79, 0.34);
  background: rgba(211, 169, 79, 0.12);
  color: var(--gold);
  font-size: 12px;
  font-family: inherit;
  letter-spacing: 0.5px;
  cursor: pointer;
  white-space: nowrap;
}
.report-back svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.report-back:active { transform: scale(0.96); }

.report-close {
  justify-self: end;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid rgba(211, 169, 79, 0.3);
  background: transparent;
  color: var(--gold);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}

.report-img-wrap {
  padding: 12px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.report-img-wrap img {
  width: 100%;
  display: block;
  border-radius: 10px;
}

.report-tip {
  padding: 0 14px 12px;
  text-align: center;
  font-size: 10px;
  color: #5d6d6b;
  letter-spacing: 1px;
}

/* ============ 牌型说明 ============ */
.rules-box {
  width: min(460px, 100%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: #0f1a16;
  border: 1px solid rgba(211, 169, 79, 0.26);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: popIn 0.26s cubic-bezier(.3,1.3,.5,1);
}
.rules-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
  color: #e8d8b0;
  letter-spacing: 1px;
  font-weight: 700;
}
.bid-rule-body { padding: 18px 18px 22px; color: #d8e6dd; font-size: 15px; line-height: 1.8; }
.bid-rule-body p { margin: 0 0 14px; }
.bid-rule-body strong { color: #ffe0a0; }
.bid-rule-body .bid-rule-note {
  font-size: 12.5px; color: #93a89e; line-height: 1.7;
  border-top: 1px dashed rgba(255,255,255,.1); padding-top: 12px;
}
.rules-list {
  padding: 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.rule-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.rule-item .ri-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}
.rule-item .ri-name {
  font-size: 13px;
  font-weight: 800;
  color: #e9e2cd;
  letter-spacing: 0.3px;
}
.rule-item .ri-mult {
  font-size: 13px;
  font-weight: 800;
  color: #e5c169;
  font-variant-numeric: tabular-nums;
}
.rule-item .ri-desc {
  font-size: 10.5px;
  color: #7d918c;
  line-height: 1.35;
}
.rule-item.top { background: rgba(211, 169, 79, 0.1); border-color: rgba(211, 169, 79, 0.18); }
.rule-item.top .ri-name { color: #f2e2b8; }

@media (max-width: 375px) {
  .rules-list { grid-template-columns: 1fr; }
  .rule-item .ri-name, .rule-item .ri-mult { font-size: 12.5px; }
}

/* ============ Toast ============ */
.toast {
  position: fixed;
  left: 50%;
  top: 47%;
  transform: translate(-50%, 10px);
  padding: 9px 18px;
  border-radius: 8px;
  background: rgba(20, 32, 27, 0.96);
  border: 1px solid var(--gold-dim);
  color: #e6d6ac;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s;
  z-index: 70;
  white-space: nowrap;
  max-width: 88vw;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translate(-50%, -10px); }
/* 骰子阶段：文案落在牌桌中心，配合骰子动画 */
.log-line.dice-log {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 9px;
  background: rgba(7, 15, 12, 0.82);
  box-shadow: 0 0 0 1px rgba(240, 207, 133, 0.28);
  color: #f0cf85;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.6px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
  animation: diceLogIn 0.28s ease-out both;
}
@keyframes diceLogIn {
  0% { opacity: 0; transform: translateY(6px) scale(0.96); }
  100% { opacity: 1; transform: none; }
}

/* ============ 响应式 ============ */
@media (max-width: 720px) {
  .topbar { padding: 4px 10px 5px; min-height: 52px; gap: 2px; }
  .tb-top { min-height: 24px; column-gap: 6px; }
  .room-tag, .ante-tag { font-size: 10px; padding: 4px 7px; }
  .tb-left { gap: 1px; }
  .tb-round { font-size: 11.5px; }
  .tb-round b { font-size: 14px; }
  .tb-meta .room-tag, .tb-meta .ante-tag { font-size: 8.5px; padding: 1px 5px; }
  .tb-right { gap: 6px; }
  .voice-btn { width: 24px; height: 24px; }
  .voice-btn svg { width: 14px; height: 14px; }
  .phase-text { font-size: 12px; }
  .coin-chip { padding: 3px 9px; }
  .coin-chip b { font-size: 13px; }

  .table { padding: 6px 6px 2px; }
  .felt { border-radius: 18px; }
  .felt::after { inset: 8px; border-radius: 13px; }

  .seat .avatar { width: 30px; height: 30px; font-size: 12px; border-width: 1.5px; }
  .name { font-size: 9px; line-height: 11px; max-width: 60px; }
  .hist { font-size: 8px; line-height: 10px; min-height: 10px; }
  .badge { font-size: 8px; height: 13px; line-height: 13px; padding: 0 4px; right: -8px; top: -5px; }
  .stamp { width: 16px; height: 16px; font-size: 8px; right: -1px; bottom: -2px; }

  .mini-cards { height: 28px; gap: 1.5px; }
  .mini-cards .card { --w: 19px; --h: 27px; --fs: 9.5px; --cs: 6px; --pip: 11px; }
  .mini-cards .card.tail { margin-left: 2px; }

  .delta { font-size: 9px; padding: 1px 4px; }
  .chip { width: 16px; height: 16px; }

  .card { --w: 26px; --h: 36px; --fs: 11px; --cs: 8px; --pip: 16px; }

  .card.big { --w: 54px; --h: 74px; --fs: 22px; --cs: 12px; --pip: 32px; }
  .myhand { gap: 5px; min-height: 80px; }
  .myhand .card.tail { margin-left: 7px; }
  .myhand .hand-label { font-size: 15px; margin-left: 8px; padding: 3px 9px; }
  .hand-tag { font-size: 13.5px; margin-top: 1px; }
  .hand-tag.show { height: 17px; line-height: 16px; }

  .center-mult { font-size: 22px; }
  .pot-note { font-size: 10.5px; letter-spacing: 0.3px; }
  .bid-panel { display: none; }
  .bottom { padding: 2px 10px 8px; gap: 6px; }
  .actions { gap: 5px; min-height: 46px; }
  .actions .btn { min-width: 58px; padding: 11px 8px; font-size: 13px; border-radius: 10px; }
  .actions .btn.ghost { min-width: 52px; padding: 11px 6px; }
  .bid-group { gap: 4px; }
  .bid-btn { min-width: 56px !important; padding: 10px 4px !important; border-radius: 10px; }
  .bid-btn .bn { font-size: 18px; }
  .bid-btn .bm, .bid-btn .bu { font-size: 9px; }

  .report-box { max-height: 96vh; }
  .report-img-wrap { padding: 8px; }
}

/* 矮屏（横屏手机、小笔记本） */
/* 超窄屏：5 张牌 + 牌型标签容易顶出屏幕，整体收一号 */
@media (max-width: 375px) {
  .myhand { gap: 4px; }
  .myhand .card.big { --w: 52px; --h: 72px; --fs: 21px; --cs: 11.5px; --pip: 31px; }
  .myhand .card.tail { margin-left: 6px; }
  .myhand .hand-label { font-size: 13px; margin-left: 6px; padding: 3px 7px; }
}

@media (max-height: 620px) {
  .seat .avatar { width: 30px; height: 30px; }
  .myhand { min-height: 64px; }
  .card.big { --w: 46px; --h: 62px; --fs: 18px; --cs: 10px; --pip: 27px; }
  .center-mult { font-size: 20px; }
  .topbar { min-height: 48px; padding: 3px 10px 4px; }
}

/* ================= 点底牌：放大特写 ================= */

/* 自己的底牌可点：呼吸光 + 上浮 */
.card.tap-tail {
  cursor: pointer;
  animation: tapPulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 0 2px rgba(240, 207, 133, 0.42), 0 0 20px rgba(240, 207, 133, 0.42);
}
.card.tap-tail::before {
  content: "点";
  position: absolute;
  left: 50%;
  top: -15px;
  transform: translateX(-50%);
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f0cf85, #c39a3f);
  color: #241a06;
  font-size: 9px;
  font-weight: 900;
  line-height: 15px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
@keyframes tapPulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.05); }
}

.zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  perspective: 1100px;
  background: radial-gradient(circle at 50% 40%, rgba(4, 14, 10, 0.3), rgba(0, 0, 0, 0.8));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.zoom-overlay.show { opacity: 1; pointer-events: auto; }
.zoom-overlay.fade { opacity: 0; }

.zoom-card {
  position: fixed;
  border-radius: 10px;
  box-sizing: border-box;
  z-index: 2;
  perspective: 900px;
  touch-action: none;
  cursor: grab;
  transition:
    left 0.46s cubic-bezier(.22, .9, .28, 1),
    top 0.46s cubic-bezier(.22, .9, .28, 1),
    width 0.46s cubic-bezier(.22, .9, .28, 1),
    height 0.46s cubic-bezier(.22, .9, .28, 1),
    opacity 0.4s ease,
    box-shadow 0.3s ease;
}
.zoom-card:active { cursor: grabbing; }
.zoom-card.lift {
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7), 0 0 42px rgba(240, 207, 133, 0.3);
}
.zoom-card.landed { animation: zoomLand 0.42s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes zoomLand {
  0% { transform: scale(0.96); }
  60% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* 3D 双面：左右拖动时整张牌绕 Y 轴翻转 */
.zc-3d {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}
.zc-face {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}
.zc-back {
  background-color: #b8433a;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(255, 242, 232, 0.55) 0 1.6px, transparent 2.4px),
    repeating-linear-gradient(45deg, rgba(255, 242, 232, 0.07) 0 1px, transparent 1px 13px),
    repeating-linear-gradient(-45deg, rgba(255, 242, 232, 0.07) 0 1px, transparent 1px 13px);
  background-size: 13px 13px, auto, auto;
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.8),
    inset 0 0 0 6px rgba(184, 67, 58, 1),
    inset 0 0 0 7px rgba(255, 255, 255, 0.4);
  border-radius: 10px;
}
.zc-back::after {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
}
.zc-front {
  --w: var(--zw);
  --h: calc(var(--zw) * 1.4);
  transform: rotateY(180deg);
  background: #fff;
  color: #0f1113;
  border: 1px solid rgba(240, 207, 133, 0.45);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.66), inset 0 0 40px rgba(240, 207, 133, 0.12);
}
.zc-front .corner {
  position: absolute;
  top: calc(var(--h) * 0.028);
  left: calc(var(--w) * 0.065);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.zc-front .corner .r {
  font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", sans-serif;
  font-size: calc(var(--w) * 0.27);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: -0.1em;
}
.zc-front .corner .cs {
  width: calc(var(--w) * 0.16);
  height: calc(var(--w) * 0.16);
}.zc-front .corner .r.wide {
  font-size: calc(var(--w) * 0.215);
  letter-spacing: -0.07em;
}
.zc-front .pip {
  position: absolute;
  left: 50%;
  top: 65%;
  width: calc(var(--w) * 0.58);
  height: calc(var(--w) * 0.58);
  transform: translate(-50%, -50%);
}
.zc-front .sp { display: block; fill: currentColor; }
.zc-front.red { color: #d91f14; }

.zoom-card.recoil { opacity: 0; transform: scale(0.5) translateY(40px); }

.zoom-hint {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #ffe9b8;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
  z-index: 3;
  animation: hintSway 1.6s ease-in-out infinite;
}
.zoom-hint.show { opacity: 1; }
@keyframes hintSway {
  0%, 100% { transform: translateX(-50%) translateX(-6px); }
  50% { transform: translateX(-50%) translateX(6px); }
}

.zoom-tag {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) scale(0.65);
  padding: 5px 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, #e6c574, #bd9340);
  color: #1a1305;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 2px;
  opacity: 0;
  z-index: 3;
  white-space: nowrap;
  box-shadow: 0 8px 26px rgba(200, 160, 70, 0.38);
  transition: opacity 0.25s ease, transform 0.32s cubic-bezier(.3, 1.5, .5, 1);
}
.zoom-tag.show { opacity: 1; transform: translateX(-50%) scale(1); }

/* ============ 大厅 ============ */
.lobby {
  overflow: hidden;
  background: #0b0710;
}

/* 天幕：顶部金色穹顶光 */
.lb-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(58% 30% at 50% 4%, rgba(255, 208, 126, 0.5) 0%, rgba(214, 150, 52, 0.18) 38%, transparent 72%),
    radial-gradient(96% 62% at 50% 0%, #2d1a30 0%, #1a1120 42%, #0b0710 100%);
}

/* 地砖：45° 双向细线叠出菱形，带一点透视 */
.lb-floor {
  position: absolute;
  left: -14%;
  right: -14%;
  top: 44%;
  bottom: -6%;
  background:
    repeating-linear-gradient(45deg, rgba(255, 214, 150, 0.055) 0 1px, transparent 1px 52px),
    repeating-linear-gradient(-45deg, rgba(255, 214, 150, 0.055) 0 1px, transparent 1px 52px),
    linear-gradient(180deg, rgba(88, 50, 30, 0.3), rgba(12, 8, 16, 0.9) 78%);
  transform: perspective(460px) rotateX(56deg);
  transform-origin: 50% 0;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.25) 72%, transparent);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.25) 72%, transparent);
}

/* 穹顶：中心发光球 + 两圈金环 */
.lb-dome {
  position: absolute;
  left: 50%;
  top: 2px;
  width: 340px;
  height: 190px;
  margin-left: -170px;
  pointer-events: none;
  z-index: 1;
}
.dome-core {
  position: absolute;
  left: 50%;
  top: 0;
  width: 118px;
  height: 118px;
  margin-left: -59px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #fff3c8 0%, #f2c463 34%, #a06a1c 68%, rgba(120, 76, 20, 0) 76%);
  box-shadow: 0 0 60px rgba(255, 198, 100, 0.42), 0 0 130px rgba(255, 170, 60, 0.18);
}
.dome-ring {
  position: absolute;
  left: 50%;
  border: 1px solid rgba(233, 190, 106, 0.35);
  border-radius: 50%;
  transform: translateX(-50%);
}
.dome-ring.r1 {
  top: 34px;
  width: 232px;
  height: 232px;
  border-color: rgba(233, 190, 106, 0.22);
  box-shadow: inset 0 0 40px rgba(255, 196, 100, 0.1);
}
.dome-ring.r2 {
  top: 62px;
  width: 322px;
  height: 322px;
  border-color: rgba(233, 190, 106, 0.12);
}
.dome-halo {
  position: absolute;
  left: 50%;
  top: 30px;
  width: 300px;
  height: 300px;
  margin-left: -150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 190, 90, 0.14), transparent 62%);
  filter: blur(6px);
}

/* 顶栏 */
.lb-top {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  height: 56px;
  padding: 0 10px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: linear-gradient(180deg, rgba(7, 5, 11, 0.95), rgba(7, 5, 11, 0.4));
  border-bottom: 1px solid rgba(211, 169, 79, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.lb-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 4px;
  color: #f8e6bb;
  text-shadow: 0 0 16px rgba(255, 200, 110, 0.4), 0 1px 0 #3d2b12;
}

.lb-me {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 4px 10px 4px 4px;
  border: 1px solid rgba(211, 169, 79, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #ddd2b6;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}
.lb-me:active { transform: scale(0.97); }
.lb-me-av {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  background: linear-gradient(160deg, #3c7a5a, #1b3d2c);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.lb-me b {
  max-width: 84px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.lb-refresh {
  justify-self: end;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(211, 169, 79, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: #e2c98d;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-refresh svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.lb-refresh.spin svg { animation: spin 0.6s linear; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 房间列表 */
.lb-body {
  position: relative;
  z-index: 3;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 14px 6px;
  display: flex;
  flex-direction: column;
}
.lb-rooms {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.lb-tip {
  margin: 16px 0 6px;
  text-align: center;
  font-size: 11px;
  color: #6f6274;
  letter-spacing: 0.6px;
}

/* 绿色宝石场次卡 */
.room-card {
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  cursor: pointer;
  animation: cardIn 0.42s cubic-bezier(.2, .8, .3, 1) both;
}
.room-card:nth-child(2) { animation-delay: 0.06s; }
.room-card:nth-child(3) { animation-delay: 0.12s; }
/* 定时刷新（机器人进桌）时只换内容、不播入场动画，卡面不抖 */
.lb-rooms.lb-quiet > .room-card { animation: none; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
.room-card:active .rc-gem { transform: scale(0.97); }

.rc-gem {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.12;
  border-radius: 50%;
  background:
    radial-gradient(120% 56% at 50% 0%, rgba(150, 255, 200, 0.26), transparent 66%),
    linear-gradient(176deg, #2b7d54 0%, #175a3c 44%, #0c3624 100%);
  border: 2px solid rgba(219, 184, 108, 0.78);
  box-shadow:
    inset 0 0 0 1px rgba(255, 238, 186, 0.16),
    inset 0 20px 32px rgba(120, 255, 190, 0.1),
    inset 0 -22px 30px rgba(0, 0, 0, 0.38),
    0 14px 30px rgba(0, 0, 0, 0.5),
    0 0 24px rgba(70, 200, 140, 0.16);
  color: #eafaf1;
  transition: transform 0.16s;
  overflow: hidden;
}
/* 椭圆四周的座位环 */
.rc-ring { position: absolute; inset: 0; pointer-events: none; }
.rc-av {
  position: absolute;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  background: transparent;
  overflow: hidden;
}
.rc-av .face { width: 100%; height: 100%; display: block; }
.rc-av.bot { opacity: 0.9; }
.rc-av.empty {
  background: rgba(0, 0, 0, 0.22);
  border: 1px dashed rgba(190, 255, 220, 0.25);
  box-shadow: none;
}
/* 卡片中间信息 */
.rc-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 22% 18%;
  text-align: center;
}
/* 宝石高光 */
.rc-gem::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 3px;
  height: 40%;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 78%);
  pointer-events: none;
}

.rc-tier {
  font-size: 9.5px;
  letter-spacing: 1.6px;
  color: #bfe8cd;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(190, 255, 220, 0.18);
}
.rc-title {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #fff8e2;
  text-shadow: 0 2px 0 rgba(0, 40, 20, 0.55), 0 0 16px rgba(180, 255, 210, 0.3);
  margin: 0 0 1px;
}
.rc-line {
  font-size: 11.5px;
  color: #d9f0e1;
  letter-spacing: 0.6px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.rc-line b { color: #ffe9ae; font-weight: 700; }
.rc-humans { color: #bfe8cd; }

.rc-avatars {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 22px;
  margin-top: 4px;
  padding-bottom: 1px;
}
.rc-avatars .av {
  width: 20px;
  height: 20px;
  margin-left: -7px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  border: 1.5px solid rgba(6, 26, 16, 0.9);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  background: linear-gradient(160deg, var(--c1, #3c7a5a), var(--c2, #1b3d2c));
}
.rc-avatars .av:first-child { margin-left: 0; }
.rc-avatars .av.bot { opacity: 0.88; }

/* 底部两个大按钮 */
.lb-bottom {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  display: flex;
  gap: 12px;
  padding: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(8, 5, 12, 0), rgba(8, 5, 12, 0.92) 46%);
}
.lb-tab {
  flex: 1;
  height: 50px;
  border-radius: 25px;
  border: 1px solid rgba(211, 169, 79, 0.45);
  background: linear-gradient(180deg, #6a4420, #33200f);
  color: #f6dca6;
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 228, 166, 0.3), 0 8px 22px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}
.lb-tab:active { transform: scale(0.98); }
.lb-tab .tab-suit { font-size: 14px; opacity: 0.8; }
/* 右下角「刷新」：点一下图标转半圈 */
.lb-tab .tab-suit { display: inline-block; transform-origin: 50% 50%; }
.lb-tab.spin .tab-suit { animation: spin 0.6s linear; }
.lb-tab.on {
  background: linear-gradient(180deg, #5240a8, #241a52);
  border-color: rgba(190, 175, 255, 0.55);
  color: #f0eaff;
  box-shadow: inset 0 1px 0 rgba(220, 210, 255, 0.35), 0 8px 24px rgba(60, 40, 140, 0.45);
}

/* 登录页：头像选择 */
.avatar-field .avatar-pick {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.av-pick {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(160deg, #2b6a4c, #163526);
  font-size: 19px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  font-family: inherit;
}
.av-pick:active { transform: scale(0.92); }
.av-pick.on {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(211, 169, 79, 0.25), 0 0 14px rgba(255, 200, 110, 0.25);
  transform: scale(1.04);
}

@media (max-width: 360px) {
  .rc-title { font-size: 19px; letter-spacing: 2px; }
  .rc-line { font-size: 10.5px; }
  .lb-rooms { gap: 10px; }
  .lb-tab { height: 46px; font-size: 15px; }
}

/* 头像 SVG：铺满容器，不依赖 emoji 字体 */
.avatar .face,
.lb-me-av .face,
.rc-avatars .av .face,
.av-pick .face {
  width: 100%;
  height: 100%;
  display: block;
}
.avatar { overflow: hidden; }
.lb-me-av { overflow: hidden; }
.rc-avatars .av { overflow: hidden; background: #12321f; }

/* 自定义头像（机器人后台上传的图片）：铺满圆形区域 */
.face.face-img {
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  width: 100%;
  height: 100%;
  display: block;
}

/* 荣耀池：今日机器人与玩家贡献 */
.pool-today { display: flex; gap: 8px; margin: 10px 0 12px; }
.pt-card {
  flex: 1; min-width: 0; padding: 10px 11px; border-radius: 12px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
}
.pt-card.bot { border-color: rgba(122,182,255,.28); background: rgba(122,182,255,.07); }
.pt-card.human { border-color: rgba(255,206,110,.28); background: rgba(255,206,110,.06); }
.pt-card span { display: block; font-size: 10.5px; color: #8b9a94; letter-spacing: .4px; }
.pt-card b { display: block; margin-top: 3px; font-size: 19px; color: #cfe9ff; font-variant-numeric: tabular-nums; }
.pt-card.human b { color: #ffe0a0; }
.pt-card b.neg { color: #ff9a9a; }
.pt-card i { display: block; margin-top: 3px; font-style: normal; font-size: 9.5px; color: #6f7f79; }
.pt-adj { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 7px; }
.pt-adj button {
  min-width: 0; padding: 5px 4px; font-size: 10.5px;
  border-radius: 8px; border: 1px solid rgba(122,182,255,.32);
  background: rgba(122,182,255,.1); color: #b8dcff; font-family: inherit;
}
.pt-adj button:active { transform: scale(.96); }

/* 大厅布局微调：卡片区垂直居中，三张卡时最后一张居中，地砖再亮一点 */
.lb-body { justify-content: center; padding-bottom: 0; }
.lb-rooms > .room-card:nth-child(3):last-child {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc(50% - 7px);
}
.lb-floor {
  background:
    repeating-linear-gradient(45deg, rgba(255, 214, 150, 0.075) 0 1px, transparent 1px 52px),
    repeating-linear-gradient(-45deg, rgba(255, 214, 150, 0.075) 0 1px, transparent 1px 52px),
    linear-gradient(180deg, rgba(88, 50, 30, 0.32), rgba(20, 12, 26, 0.75) 82%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.55) 78%, rgba(0, 0, 0, 0.3));
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.55) 78%, rgba(0, 0, 0, 0.3));
}
.lb-tip { margin: 14px 0 0; }

/* 房间卡为椭圆形，四周头像环绕；中间信息略收紧避免与头像重叠 */
.rc-gem {
  border-radius: 50%;
}
.rc-center { padding: 15% 20%; }

/* 穹顶加放射纹，别像一颗光球 */
.dome-core::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-conic-gradient(from -90deg,
    rgba(255, 244, 214, 0.3) 0 2.5deg, rgba(255, 214, 140, 0) 2.5deg 11deg);
  mask-image: radial-gradient(circle, rgba(0,0,0,0.2) 28%, #000 58%, transparent 76%);
  -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,0.2) 28%, #000 58%, transparent 76%);
}

.lb-me-av { width: 30px; height: 30px; }
.lb-me { font-size: 12.5px; padding-right: 12px; }

/* 头像底板透明，让 SVG 的脸直接贴在卡片/座位上 */
.rc-avatars .av { background: transparent; border-color: rgba(4, 22, 14, 0.55); }
.rc-avatars .av { border-width: 1px; border-color: rgba(0, 0, 0, 0.35); }

/* 四个场次 2×2 铺满：取消三张卡时的居中特例 */
.lb-rooms > .room-card:nth-child(3):last-child {
  grid-column: auto;
  justify-self: stretch;
  width: auto;
}
.lb-rooms { gap: 16px; }

/* 宽屏：四个场次排成一行，底部按钮限宽，地砖上下都淡入 */
@media (min-width: 720px) {
  .lb-rooms {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 940px;
    gap: 18px;
  }
  .lb-bottom {
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
  }
  .rc-title { font-size: 20px; }
}
.lb-floor {
  mask-image: linear-gradient(180deg, transparent 0%, #000 16%, #000 64%, rgba(0, 0, 0, 0.45) 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 16%, #000 64%, rgba(0, 0, 0, 0.45) 100%);
}

/* 头像 20 个 → 5 列 4 行正好排满；登录页也换成大厅同款紫金背景 */
.avatar-field .avatar-pick { grid-template-columns: repeat(5, 1fr); gap: 8px; }
.av-pick { font-size: 22px; }

.login {
  background:
    radial-gradient(56% 34% at 50% 0%, rgba(255, 202, 112, 0.16), transparent 72%),
    radial-gradient(110% 70% at 50% 0%, #2a1930 0%, #150e1b 48%, #0b0710 100%);
}

/* ================= 大厅：ID / 荣耀 / 菜单 ================= */
.lb-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 6px;
}
.lb-coins {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(211, 169, 79, 0.34);
  background: rgba(211, 169, 79, 0.08);
  color: #f0d69b;
  font-family: inherit;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.lb-coins:active { transform: scale(0.96); }
.lb-coins .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe9a8, #c9992f);
  box-shadow: 0 0 6px rgba(240, 200, 110, 0.6);
}
.lb-me-id {
  font-style: normal;
  font-size: 10px;
  color: #9a8b63;
  letter-spacing: 0.5px;
  padding-left: 5px;
  border-left: 1px solid rgba(211, 169, 79, 0.22);
  font-variant-numeric: tabular-nums;
}
.rc-bets {
  font-size: 10.5px;
  color: #9fe0b8;
  letter-spacing: 0;
  opacity: 0.9;
}
.rc-tag {
  display: inline-block;
  margin-left: 2px;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 9.5px;
  color: #ffe1a5;
  background: rgba(211, 169, 79, 0.24);
  border: 1px solid rgba(211, 169, 79, 0.4);
}

/* 进行中的房卡：金边 + 顶部「进行中」，和候场卡一眼分开；我在这桌再加绿边 */
.room-card.rc-live .rc-gem {
  border-color: rgba(255, 208, 116, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(255, 238, 186, 0.2),
    inset 0 20px 32px rgba(120, 255, 190, 0.1),
    inset 0 -22px 30px rgba(0, 0, 0, 0.38),
    0 14px 30px rgba(0, 0, 0, 0.5),
    0 0 26px rgba(255, 196, 92, 0.3);
}
.room-card.rc-mine .rc-gem {
  border-color: #5ee89a;
  box-shadow:
    inset 0 0 0 1px rgba(180, 255, 214, 0.24),
    inset 0 20px 32px rgba(120, 255, 190, 0.12),
    inset 0 -22px 30px rgba(0, 0, 0, 0.38),
    0 14px 30px rgba(0, 0, 0, 0.5),
    0 0 26px rgba(94, 232, 154, 0.45);
}
.rc-live-tag, .rc-mine-tag {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.6px;
  white-space: nowrap;
  pointer-events: none;
}
.rc-live-tag {
  top: 4%;
  color: #2a1a04;
  font-weight: 700;
  background: linear-gradient(180deg, #ffe0a0, #e8a93c);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.42);
}
.rc-mine-tag {
  bottom: 4%;
  color: #04220f;
  font-weight: 700;
  background: linear-gradient(180deg, #a8f8c9, #3cc982);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.42);
}
.lb-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #7c6d80;
  font-size: 12px;
  line-height: 1.9;
  padding: 40px 0;
  margin: 0;
}
.room-flag {
  display: none;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 9.5px;
  letter-spacing: 0.5px;
  color: #ffe1a5;
  background: rgba(211, 169, 79, 0.18);
  border: 1px solid rgba(211, 169, 79, 0.36);
}
.room-flag.show { display: inline-block; }

/* ================= 底部抽屉 ================= */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 62;
  background: rgba(4, 8, 7, 0.66);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.18s ease-out;
}
.sheet {
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  border-radius: 20px 20px 0 0;
  background:
    radial-gradient(120% 40% at 50% 0%, rgba(255, 205, 120, 0.12), transparent 70%),
    linear-gradient(180deg, #17211c 0%, #0c1310 62%, #080d0b 100%);
  border: 1px solid rgba(211, 169, 79, 0.3);
  border-bottom: 0;
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.6);
  animation: sheetUp 0.26s cubic-bezier(.2, .9, .3, 1) both;
}
@keyframes sheetUp {
  from { transform: translateY(24px); opacity: 0.6; }
  to { transform: none; opacity: 1; }
}
.sheet-top {
  position: relative;
  flex: 0 0 auto;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(211, 169, 79, 0.16);
}
.sheet-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #f6e6bd;
}
.sheet-ico {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #cfd9d3;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.sheet-ico svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.sheet-ico:active { transform: translateY(-50%) scale(0.94); }
#sheetClose { right: 12px; }
#sheetBack { left: 12px; }
.sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px calc(22px + env(safe-area-inset-bottom, 0px));
}
.sheet-load {
  text-align: center;
  color: #7d8b85;
  font-size: 12.5px;
  line-height: 1.9;
  padding: 34px 0;
}

/* ---------- 菜单宫格 ---------- */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 6px 12px;
  border-radius: 14px;
  border: 1px solid rgba(211, 169, 79, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)),
    rgba(10, 20, 15, 0.6);
  color: #e9dfc8;
  font-family: inherit;
  cursor: pointer;
}
.menu-item:active { transform: scale(0.97); border-color: rgba(211, 169, 79, 0.55); }
.mi-ico {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 32%, rgba(255, 215, 130, 0.26), rgba(120, 80, 20, 0.14));
  border: 1px solid rgba(211, 169, 79, 0.32);
  color: #f2cf87;
}
.mi-ico svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.menu-item b { font-size: 13px; letter-spacing: 0.5px; }
.menu-item i {
  font-style: normal;
  font-size: 9.5px;
  color: #7f8f88;
  text-align: center;
  line-height: 1.4;
}
.menu-foot {
  margin-top: 16px;
  text-align: center;
  font-size: 11px;
  color: #7b8781;
}
.menu-foot b { color: #f0cf85; letter-spacing: 1px; font-size: 12.5px; }
.menu-foot em { font-style: normal; color: #c98d6a; }
.menu-foot em.ok { color: #7fd6a4; }

/* ---------- 表单元件 ---------- */
.pf-block {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  padding: 12px 12px 13px;
  margin-bottom: 11px;
}
.pf-h {
  font-size: 12px;
  font-weight: 700;
  color: #d9c69a;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}
.pf-sub {
  font-size: 10.5px;
  color: #7e8b85;
  line-height: 1.5;
  margin: -4px 0 8px;
}
.pf-note {
  font-size: 11px;
  color: #7f8b86;
  line-height: 1.7;
  margin: 0 0 12px;
}
.pf-note b { color: #f0cf85; letter-spacing: 1px; }
.pf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.pf-chips.three .pf-chip { flex: 1 1 0; text-align: center; }
.pf-chip {
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: #cfd8d3;
  font-family: inherit;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.pf-chip.on {
  border-color: rgba(226, 185, 96, 0.75);
  background: linear-gradient(180deg, rgba(226, 185, 96, 0.22), rgba(226, 185, 96, 0.06));
  color: #ffe9b6;
  box-shadow: 0 0 12px rgba(226, 185, 96, 0.18);
}
.pf-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
}
.pf-row + .pf-row { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.pf-row b { font-size: 12.5px; color: #e6ddc8; display: block; }
.pf-row span { font-size: 10.5px; color: #7e8b85; }
.pf-row2 { display: flex; gap: 8px; margin-bottom: 11px; }
.pf-row2 .pf-go { flex: 1 1 0; margin: 0; }
.sw {
  position: relative;
  width: 44px;
  height: 25px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: 0.18s;
}
.sw i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #8d9a94;
  transition: 0.18s;
}
.sw.on { background: rgba(96, 200, 140, 0.24); border-color: rgba(96, 200, 140, 0.6); }
.sw.on i { left: 22px; background: #9ef0bf; box-shadow: 0 0 8px rgba(120, 240, 170, 0.5); }
.pf-input {
  width: 100%;
  margin: 2px 0 9px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(211, 169, 79, 0.26);
  background: rgba(0, 0, 0, 0.28);
  color: #f2ead6;
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
.pf-input::placeholder { color: #6d7a74; }
.pf-input:focus { border-color: rgba(226, 185, 96, 0.65); }
.pf-go {
  width: 100%;
  margin-top: 6px;
  padding: 13px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #e8c675, #b98f34);
  color: #2a1c06;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(200, 150, 60, 0.28);
}
.pf-go:active:not(:disabled) { transform: scale(0.985); }
.pf-go:disabled { opacity: 0.42; box-shadow: none; }
.pf-go.sm { padding: 10px; font-size: 13px; letter-spacing: 1px; }
.pf-go.ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(211, 169, 79, 0.36);
  color: #f0d9a4;
  box-shadow: none;
}
.pf-go.danger {
  background: rgba(180, 70, 60, 0.18);
  border: 1px solid rgba(190, 90, 78, 0.5);
  color: #f0a79b;
  box-shadow: none;
}
.pf-lock {
  border: 1px dashed rgba(211, 169, 79, 0.4);
  border-radius: 12px;
  background: rgba(211, 169, 79, 0.06);
  padding: 12px;
  margin-bottom: 10px;
  text-align: center;
}
.pf-lock b { font-size: 13px; color: #f0c98a; }
.pf-lock p { margin: 6px 0 0; font-size: 11px; color: #9aa49e; }
.pf-lock em {
  font-style: normal;
  color: #ffe1a5;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 2px;
}

/* ---------- 战队 ---------- */
.tm-hero { text-align: center; padding: 6px 0 16px; }
.tm-hero b { font-size: 15px; color: #e8dcc0; }
.tm-hero p { margin: 6px 0 0; font-size: 11px; color: #7e8b85; }
.tm-card {
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  text-align: center;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(150, 255, 200, 0.18), transparent 70%),
    linear-gradient(180deg, #1e5a3e, #0d2e21);
  border: 1px solid rgba(211, 169, 79, 0.5);
}
.tm-name { font-size: 18px; font-weight: 900; letter-spacing: 2px; color: #fff6e0; }
.tm-rename {
  margin-left: 8px; padding: 3px 9px; font-size: 11px; font-weight: 600;
  letter-spacing: 0; color: #ffe0a0; background: rgba(211, 169, 79, .14);
  border: 1px solid rgba(211, 169, 79, .45); border-radius: 20px;
  cursor: pointer; vertical-align: middle;
}
.tm-rename:active { background: rgba(211, 169, 79, .3); }
.tm-code { margin-top: 6px; font-size: 11.5px; color: #bfe8cd; }
.tm-code b {
  font-size: 15px;
  letter-spacing: 2px;
  color: #ffe9ae;
  font-family: ui-monospace, monospace;
}
.tm-cap { margin-top: 5px; font-size: 10.5px; color: #9fc7b0; }
/* 战队菜单里的机器人开关条 */
.tm-bot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(28, 46, 38, 0.95), rgba(15, 27, 22, 0.95));
  border: 1px solid rgba(120, 150, 135, 0.28);
  transition: border-color 0.18s, background 0.18s;
}
.tm-bot.on {
  border-color: rgba(47, 208, 122, 0.45);
  background: linear-gradient(180deg, rgba(24, 60, 44, 0.95), rgba(13, 34, 26, 0.95));
}
.tm-bot-l { min-width: 0; }
.tm-bot-l b { display: block; font-size: 12.5px; color: #e8f3ec; font-weight: 700; }
.tm-bot-l span { display: block; margin-top: 3px; font-size: 10px; line-height: 1.4; color: #8fa79a; }
.tm-bot.on .tm-bot-l span { color: #93cfae; }
.tm-bot:active { transform: scale(0.995); }
.tm-switch {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px 0 4px;
  border-radius: 999px;
  border: 1px solid rgba(140, 160, 150, 0.35);
  background: rgba(10, 20, 16, 0.9);
  color: #9aa9a1;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.tm-switch i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #5b6b63;
  transition: transform 0.18s, background 0.18s;
}
.tm-switch.on {
  padding: 0 4px 0 10px;
  border-color: rgba(47, 208, 122, 0.6);
  background: rgba(20, 74, 50, 0.9);
  color: #a9f0c6;
}
.tm-switch.on i { background: #2fd07a; box-shadow: 0 0 8px rgba(47, 208, 122, 0.75); }
.tm-switch[disabled] { opacity: 0.55; cursor: not-allowed; }
/* 每个机器人一行的启停小开关 */
.tm-bot-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid rgba(140, 160, 150, 0.32);
  background: rgba(12, 22, 18, 0.9);
  color: #93a39b;
  font-size: 9.5px;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.tm-bot-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #59685f;
  transition: background 0.18s, box-shadow 0.18s;
}
.tm-bot-pill.on {
  border-color: rgba(47, 208, 122, 0.5);
  background: rgba(18, 58, 40, 0.92);
  color: #a9f0c6;
}
.tm-bot-pill.on i { background: #2fd07a; box-shadow: 0 0 6px rgba(47, 208, 122, 0.9); }
.tm-bot-pill[disabled] { opacity: 0.6; cursor: not-allowed; }
.tm-m.off b { color: #8e9a94; }
.tm-m.off .tm-score { opacity: 0.55; }
.tm-list { display: flex; flex-direction: column; gap: 6px; }.tm-m {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.tm-m.cap { border-color: rgba(211, 169, 79, 0.36); background: rgba(211, 169, 79, 0.07); }
.tm-mid {
  font-family: ui-monospace, monospace;
  font-size: 11.5px;
  color: #ffd98a;
  letter-spacing: 1px;
}
.tm-m b { font-size: 12px; color: #e3ecE7; font-weight: 600; flex: 1; }
.tm-m em { font-style: normal; font-size: 9.5px; color: #e6c88b; }

/* ---------- 荣耀 / 荣耀池 ---------- */
.seg {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 14px;
}
.seg button {
  flex: 1 1 0;
  padding: 9px 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #9aa69f;
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.seg button.on {
  background: linear-gradient(180deg, rgba(226, 185, 96, 0.24), rgba(226, 185, 96, 0.08));
  color: #ffe9b6;
  font-weight: 700;
}
.hn-hero {
  text-align: center;
  padding: 8px 0 16px;
  border-radius: 16px;
  background: radial-gradient(90% 70% at 50% 0%, rgba(226, 185, 96, 0.16), transparent 72%);
}
.hn-hero span { display: block; font-size: 11px; color: #9aa69f; letter-spacing: 2px; }
.hn-hero b {
  display: block;
  margin: 4px 0 2px;
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -1px;
  color: #ffe4a6;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 22px rgba(240, 190, 90, 0.3);
}
.hn-hero i { font-style: normal; font-size: 10.5px; color: #7f8b86; }
.hn-hero.pool b { color: #a8ecc4; text-shadow: 0 4px 22px rgba(110, 230, 170, 0.25); }
.hn-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.hn-grid > div {
  padding: 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.hn-grid span { display: block; font-size: 10px; color: #7e8b85; }
.hn-grid b { font-size: 15px; color: #e9e1cb; font-variant-numeric: tabular-nums; }
.up { color: #ff8f79 !important; }
.down { color: #74c99b !important; }
.wl-list, .pl-list { display: flex; flex-direction: column; gap: 1px; }
.wl-row, .pl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.wl-l, .pl-l { min-width: 0; }
.wl-l b, .pl-l b { display: block; font-size: 12.5px; color: #e4ddc9; font-weight: 600; }
.pl-who {
  display: inline-block; margin-top: 2px; padding: 1px 6px; border-radius: 6px;
  font-style: normal; font-size: 10.5px; color: #9fe3ff;
  background: rgba(90, 170, 215, 0.14); border: 1px solid rgba(120, 200, 240, 0.25);
  font-variant-numeric: tabular-nums;
}
.wl-l span, .pl-l span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: #75817b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wl-r, .pl-r { text-align: right; flex: 0 0 auto; }
.wl-r b, .pl-r b { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.wl-r i, .pl-r i { display: block; font-style: normal; font-size: 9.5px; color: #6d7a74; }

/* ---------- 荣耀奖励 ---------- */
.rw-card {
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 8px;
}
.rw-top { display: flex; justify-content: space-between; align-items: baseline; }
.rw-top b { font-size: 12.5px; color: #f0cf85; }
.rw-top span { font-size: 10px; color: #7e8b85; }
.rw-line { margin-top: 5px; font-size: 11px; color: #b9c4be; }
.rw-line b { color: #ffe1a5; }
.rw-line.dim { color: #75817b; font-size: 10px; }

/* ---------- 战绩查询 ---------- */
.rh-card {
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
  margin-bottom: 9px;
  overflow: hidden;
}
.rh-card.open { border-color: rgba(211, 169, 79, 0.34); }
.rh-head {
  width: 100%;
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border: 0;
  background: transparent;
  color: #dfe8e3;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.rh-room {
  font-size: 10px;
  color: #9aa69f;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
}
.rh-no { font-size: 12.5px; font-weight: 700; color: #f0e6cc; }
.rh-time { font-size: 10px; color: #6f7c76; }
.rh-delta { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rh-arrow {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7d8a84;
  transition: transform 0.2s;
}
.rh-arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.rh-arrow.on { transform: rotate(180deg); }
.rh-body { padding: 2px 8px 8px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.rh-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
}
.rh-row:last-of-type { border-bottom: 0; }
.rh-row.me { background: rgba(211, 169, 79, 0.06); border-radius: 8px; }
.rh-row.banker { background: rgba(211, 169, 79, 0.1); border-radius: 8px; }
.rh-name {
  flex: 0 0 58px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.rh-nline {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  font-style: normal;
}
.rh-nline b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rh-name b {
  font-size: 10.5px;
  color: #dde6e1;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rh-name em {
  font-style: normal;
  font-size: 8.5px;
  color: #7a877f;
  font-family: ui-monospace, monospace;
  letter-spacing: 0.4px;
}
.rh-b {
  flex: 0 0 auto;
  font-style: normal;
  font-size: 8.5px;
  color: #2a1c06;
  background: linear-gradient(180deg, #f0d089, #c39a3c);
  border-radius: 3px;
  padding: 0 3px;
  margin-right: 3px;
  vertical-align: 1px;
}
.rh-mid { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rh-cards { display: flex; align-items: center; }
.rh-cards .card {
  --w: 26px;
  --h: 36px;
  --fs: 11.5px;
  --cs: 7px;
  --pip: 15px;
  margin-right: 2px;
  animation: none;
  box-shadow: inset 0 0 0 1px rgba(18, 26, 23, 0.14), 0 1px 3px rgba(0, 0, 0, 0.4);
}
.rh-cards .card.grp { margin-left: 6px; }
.rh-hand {
  font-size: 9.5px;
  color: #8fa39c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rh-hand.lv20, .rh-hand.lv19, .rh-hand.lv18, .rh-hand.lv17,
.rh-hand.lv16, .rh-hand.lv15, .rh-hand.lv14, .rh-hand.lv13 { color: #f0c98a; }
.rh-hand.lv12, .rh-hand.lv11 { color: #ffb9a0; }
/* 战绩逐局：每家当时的下注倍数 / 庄家的抢庄倍数 */
.rh-bet {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 9px;
  font-style: normal;
  font-weight: 600;
  color: #cdb27a;
  background: rgba(226, 185, 96, 0.12);
  border: 1px solid rgba(226, 185, 96, 0.28);
  vertical-align: middle;
}
.rh-bet.banker { color: #ffb9a0; background: rgba(224, 122, 95, 0.12); border-color: rgba(224, 122, 95, 0.3); }
.rh-d {
  flex: 0 0 52px;
  text-align: right;
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #8c9a94;
}
.rh-cap {
  margin: 8px 2px 2px;
  font-size: 9.5px;
  color: #6e7b75;
  text-align: center;
}

/* ---------- 封房提示 ---------- */
.closed-mask {
  position: fixed;
  inset: 0;
  z-index: 58;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 8, 7, 0.82);
  backdrop-filter: blur(4px);
}
.closed-box {
  width: 100%;
  max-width: 300px;
  padding: 22px 20px 18px;
  border-radius: 18px;
  text-align: center;
  background: linear-gradient(180deg, #1a241f, #0c1310);
  border: 1px solid rgba(211, 169, 79, 0.34);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.closed-box b { font-size: 16px; color: #f2e2b8; letter-spacing: 2px; }
.closed-box p { margin: 8px 0 16px; font-size: 11.5px; color: #8b978f; line-height: 1.7; }
.closed-box .btn { width: 100%; }

@media (max-width: 360px) {
  .menu-grid { gap: 8px; }
  .menu-item { padding: 12px 4px 10px; }
  .menu-item b { font-size: 12px; }
  .rh-name { flex-basis: 52px; }
  .rh-cards .card { --w: 24px; --h: 33px; --fs: 10.5px; --pip: 13px; }
  .rh-d { flex-basis: 46px; font-size: 11px; }
}

/* 长表单：主按钮钉在抽屉底部 */
.pf-foot {
  position: sticky;
  bottom: -22px;
  margin: 4px -16px -22px;
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(12, 19, 16, 0) 0%, rgba(12, 19, 16, 0.94) 34%, #0a100d 100%);
}
.pf-foot .pf-go { margin-top: 0; }
.pf-perm {
  flex: 0 0 auto;
  font-style: normal;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  color: #c98d6a;
  background: rgba(201, 141, 106, 0.12);
  border: 1px solid rgba(201, 141, 106, 0.35);
}
.pf-perm.ok {
  color: #9ff0c0;
  background: rgba(96, 200, 140, 0.14);
  border-color: rgba(96, 200, 140, 0.45);
}

/* ---------- 荣耀池为负：队长待补 ---------- */
.hn-hero.pool.neg b {
  color: #f09a7e;
  text-shadow: 0 4px 22px rgba(230, 120, 90, 0.28);
}
.pf-debt {
  border-color: rgba(214, 126, 96, 0.42);
  background: rgba(214, 126, 96, 0.08);
  margin-bottom: 12px;
}
.pf-debt .pf-h { color: #f0a78d; }
.pf-debt .pf-sub { margin: 0 0 8px; }
.pf-debt-num {
  font-style: normal;
  font-size: 13.5px;
  font-weight: 800;
  color: #f5a98f;
  font-variant-numeric: tabular-nums;
}
.pf-debt-day {
  font-style: normal;
  font-size: 11px;
  color: #9aa49e;
  font-variant-numeric: tabular-nums;
}
.hn-grid b.neg { color: #f5a98f; }

/* ---------- 入座：头像依次点亮 ---------- */
.seat.seat-in {
  animation: seatIn 0.52s cubic-bezier(.2, .9, .3, 1) both;
  animation-delay: var(--d, 0ms);
}
@keyframes seatIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.55);
    filter: brightness(0.4) saturate(0.5);
  }
  62% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.06);
    filter: brightness(1.16);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: none;
  }
}
.seat.seat-in .avatar {
  animation: seatGlow 0.9s ease-out both;
  animation-delay: var(--d, 0ms);
}
@keyframes seatGlow {
  0% { box-shadow: 0 0 0 0 rgba(255, 214, 132, 0); }
  28% { box-shadow: 0 0 0 6px rgba(255, 214, 132, 0.42), 0 0 22px rgba(255, 200, 100, 0.75); }
  100% { box-shadow: 0 0 0 15px rgba(255, 214, 132, 0); }
}

/* 底注输入 */
.pf-ante {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
}
.pf-ante .pf-input { margin: 0; flex: 1 1 auto; text-align: center; letter-spacing: 2px; }
.pf-ante span { font-size: 11.5px; color: #8b978f; flex: 0 0 auto; }

/* 前三名比例：一行一名 */
.rate-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
}
.rate-row + .rate-row { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.rate-name {
  flex: 0 0 46px;
  font-size: 12px;
  color: #d9c69a;
  letter-spacing: 0.5px;
}
.pf-chips.tight { gap: 5px; flex: 1 1 auto; }
.pf-chip.tiny {
  padding: 6px 0;
  min-width: 40px;
  flex: 1 1 0;
  text-align: center;
  font-size: 11.5px;
  border-radius: 8px;
}
.pf-chips.bots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.pf-chips.bots .pf-chip { padding: 9px 0; min-width: 0; }

/* 窄屏：比例三行要挤在一行里，按钮再压窄一点 */
@media (max-width: 380px) {
  .rate-name { flex-basis: 38px; font-size: 11px; }
  .rate-row { gap: 6px; }
  .pf-chips.tight { gap: 4px; }
  .pf-chip.tiny { min-width: 32px; padding: 6px 0; font-size: 11px; }
}

/* ============ 登录找回 / 房卡弹窗 / 观战 / 战绩按房 / 战队审核 ============ */

/* 顶部观战标记 */
.watch-flag {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 20px;
  color: #9fe3ff;
  border: 1px solid rgba(120, 200, 240, 0.42);
  background: rgba(60, 150, 200, 0.16);
  letter-spacing: 1px;
  white-space: nowrap;
}

/* 观战：收起自己的手牌与操作区，牌桌往下让出空间 */
body.watching #actions,
body.watching #myhand { display: none !important; }
body.watching .bottom { padding-bottom: 6px; }
body.watching .dock { margin-top: 4px; }

/* 大厅房卡弹窗 */
.room-pop { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; }
.rp-mask {
  position: absolute; inset: 0;
  background: rgba(2, 8, 6, 0.62);
  backdrop-filter: blur(2px);
  animation: rpFade 0.18s ease;
}
.rp-box {
  position: relative;
  width: 100%;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0;
  background: linear-gradient(180deg, #172a22, #0c1712);
  border-top: 1px solid rgba(211, 169, 79, 0.28);
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.6);
  animation: rpUp 0.22s cubic-bezier(0.22, 0.9, 0.3, 1);
}
@keyframes rpFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rpUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.rp-head { text-align: center; margin-bottom: 14px; }
.rp-head b {
  display: block;
  font-size: 15px;
  color: #ffe4a6;
  letter-spacing: 1px;
}
.rp-head span { display: block; margin-top: 5px; font-size: 11px; color: #8ba09d; }
.rp-btn {
  display: block;
  width: 100%;
  margin-bottom: 9px;
  padding: 13px 14px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  color: #e9eff0;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.rp-btn span { display: block; font-size: 14.5px; font-weight: 700; letter-spacing: 1px; }
.rp-btn i {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-size: 10.5px;
  color: #7f8f89;
}
.rp-btn.play {
  background: linear-gradient(180deg, rgba(226, 185, 96, 0.24), rgba(226, 185, 96, 0.07));
  border-color: rgba(226, 185, 96, 0.5);
  color: #ffe9b6;
}
.rp-btn.play i { color: #c4ab74; }
.rp-btn.watch {
  background: linear-gradient(180deg, rgba(110, 190, 220, 0.16), rgba(110, 190, 220, 0.05));
  border-color: rgba(120, 200, 240, 0.36);
  color: #c9ecff;
}
.rp-btn.watch i { color: #8fb3c2; }
.rp-btn.end {
  background: linear-gradient(180deg, rgba(220, 110, 90, 0.18), rgba(220, 110, 90, 0.05));
  border-color: rgba(230, 130, 105, 0.42);
  color: #ffc9bd;
}
.rp-btn.end i { color: #d59a8d; }
.rp-btn.cancel {
  text-align: center;
  color: #9aa69f;
  font-size: 13px;
  margin-bottom: 0;
  background: transparent;
  border-color: transparent;
}
.rp-btn:active { transform: scale(0.985); }

/* 菜单：退出登录 */
.menu-exit {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(196, 86, 75, 0.3);
  background: rgba(196, 86, 75, 0.08);
  color: #e2a49c;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 1px;
  cursor: pointer;
}
.menu-exit:active { background: rgba(196, 86, 75, 0.16); }

/* 战绩：房间号查询 */
.hs-bar { display: flex; gap: 8px; margin-bottom: 10px; }
.hs-bar .pf-input { flex: 1 1 auto; min-width: 0; letter-spacing: 1px; }
.hs-bar .pf-go.sm { flex: 0 0 68px; }
.hs-chips {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 4px;
  scrollbar-width: none;
}
.hs-chips::-webkit-scrollbar { display: none; }
.hs-chip {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
  color: #cfd9d4;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}
.hs-chip i { font-style: normal; font-size: 9.5px; color: #7d8b85; }
.hs-chip.on {
  border-color: rgba(226, 185, 96, 0.55);
  background: rgba(226, 185, 96, 0.14);
  color: #ffe9b6;
}
.hs-chip.on i { color: #c2ab7a; }

/* 战队：待审核 / 积分 / 加减分 */
.tm-wait { font-style: normal; color: #ffbe8a; }
.tm-badge {
  display: inline-block;
  margin-left: 5px;
  min-width: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #c4564b;
  color: #fff;
  font-style: normal;
  font-size: 9.5px;
  line-height: 15px;
  text-align: center;
  vertical-align: 1px;
}
.tm-reqs { display: flex; flex-direction: column; gap: 6px; }
.tm-req {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(226, 185, 96, 0.07);
  border: 1px solid rgba(226, 185, 96, 0.24);
}
.tm-req b { flex: 1; font-size: 12px; font-weight: 600; color: #e9efe8; }
.tm-ok, .tm-no {
  border: 0;
  border-radius: 7px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
}
.tm-ok { background: linear-gradient(180deg, #d8b264, #ac8332); color: #2a1c06; font-weight: 700; }
.tm-no { background: rgba(255, 255, 255, 0.07); color: #b6c1bb; }
.tm-cap-tag {
  font-size: 9px;
  color: #e6c88b;
  border: 1px solid rgba(226, 200, 139, 0.4);
  border-radius: 4px;
  padding: 1px 4px;
  line-height: 1.3;
}
.tm-score {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: #ffe1a0;
  min-width: 52px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tm-adj-btns { display: flex; gap: 4px; }
.tm-adj-btns button {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #d8e4de;
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.tm-adj-btns button:first-child { color: #8fd6ab; border-color: rgba(120, 210, 160, 0.3); }
.tm-adj-btns button:last-child { color: #e2a49c; border-color: rgba(200, 110, 96, 0.3); }
.tm-adj {
  margin-top: 10px;
  padding: 10px;
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(226, 185, 96, 0.22);
}
.tm-adj-h { font-size: 11.5px; color: #ffe1a5; margin-bottom: 8px; }
.tm-adj-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
.tm-adj-chips button {
  padding: 8px 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #dfe9e4;
  font-family: inherit;
  font-size: 11.5px;
  cursor: pointer;
}
.tm-adj-row { display: flex; gap: 8px; }
.tm-adj-row .pf-input { flex: 1 1 auto; min-width: 0; }
.tm-adj-row .pf-go.sm { flex: 0 0 62px; }
.tm-adj-x {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 7px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #87948e;
  font-family: inherit;
  font-size: 11.5px;
  cursor: pointer;
}
.tm-hero.wait b { color: #ffe0a8; }
.tm-hero .tm-pend { color: #d0a97a; margin-top: 8px; }

/* 按钮后面紧跟的说明文字别贴着按钮边 */
.pf-block .pf-go.sm + .pf-sub,
.pf-block .pf-go + .pf-sub { margin-top: 9px; }

/* 观战标记：浮在牌桌左上角，不去挤顶栏中间那一行 */
body.watching #watchFlag {
  position: absolute;
  top: 62px;
  left: 12px;
  z-index: 8;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10.5px;
  letter-spacing: 1px;
  color: #b6ecff;
  border: 1px solid rgba(120, 200, 240, 0.45);
  background: rgba(24, 74, 96, 0.72);
  backdrop-filter: blur(4px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
body.watching #watchFlag::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #6fd0ff;
  animation: wPulse 1.6s ease-in-out infinite;
}
@keyframes wPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.7); }
}

/* 开房里那几行「不可改」的固定规则，用徽标表示，别做成开关让人以为能关 */
.pf-fix {
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid rgba(226, 185, 96, 0.32);
  background: rgba(226, 185, 96, 0.1);
  color: #d9bd83;
  font-size: 10.5px;
  letter-spacing: 1px;
}

/* ============ 荣耀门槛 / 灰头像 / 准备按钮 / 荣耀池拆分 / 战队搜索 / 战绩图 ============ */

/* 开房：三道荣耀门槛 */
.min-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}
.min-row:first-of-type { border-top: 0; }
.min-l { flex: 1 1 auto; min-width: 0; }
.min-l b { display: block; font-size: 12.5px; font-weight: 600; color: #e8efe9; }
.min-l i { display: block; font-style: normal; font-size: 10px; color: #7f8f89; margin-top: 2px; }
.min-r { flex: 0 0 auto; display: flex; align-items: center; gap: 5px; }
.min-r span { font-size: 10.5px; color: #8b9a93; }
.min-in {
  width: 86px;
  padding: 8px 10px;
  text-align: right;
  font-family: ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.5px;
}

/* 离开牌桌：头像转灰、名牌褪色、赢分不亮 */
.seat.away .avatar,
.seat.away .avatar-wrap .ring { filter: grayscale(1) brightness(0.55); opacity: 0.55; }
.seat.away .name { color: #6d7a74; }
.seat.away .score { color: #5f6b65; }
/* 名字下面原本显示本期累计的位置，直接换成「已离开」，不额外占空间 */
.seat.away .score { font-size: 0; }
.seat.away .score::after {
  content: '已离开';
  font-size: 9.5px;
  color: #7d8a84;
  letter-spacing: 0.5px;
  font-family: inherit;
}
.seat.away .avatar .badge { display: none; }
.seat.away .mini-cards { opacity: 0.35; filter: grayscale(1); }

/* 副队长：任命标记、分红展示 */
.tm-cap-tag.vice { color: #b8e0d4; border-color: rgba(142, 214, 190, 0.45); }
.tm-cap-tag.by { color: #93a39b; border-color: rgba(255, 255, 255, 0.12); }
.tm-cap-tag.down { color: #d8c48a; border-color: rgba(211, 169, 79, 0.35); }
.tm-cap-tag.bot { color: #a9d4ff; border-color: rgba(122, 182, 255, 0.45); }
.tm-m.vice b::after { content: ''; }
.tm-hero.vice b { color: #b8e0d4; }
.tm-hero.vice .tm-pend { color: #88a99d; }
.mn-tag.vice { color: #b8e0d4; }
.tm-vice .pf-sub { margin: 6px 0 10px; }
.tm-vice .tm-adj-row { flex-wrap: wrap; gap: 8px; }
.tm-vice .tm-adj-row .pf-input { width: 78px; flex: 0 0 auto; }
/* 「撤销副队长 / 只改比例」按钮别被压成竖排字 */
.tm-vice .tm-adj-row .pf-go.sm {
  flex: 1 1 0;
  width: auto;
  min-width: 84px;
  padding: 10px 8px;
  white-space: nowrap;
  letter-spacing: 1px;
}

/* 开房：百分比可输入 0~100，不再只有几个快捷档 */
.rate-row .pf-chips.tight { flex-wrap: wrap; }
.rate-in {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.rate-in .pct-in {
  width: 52px;
  padding: 6px 4px;
  margin: 0;
  text-align: center;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}
.rate-in i { font-style: normal; font-size: 11px; color: #8b9a93; }
.ratio-row { justify-content: flex-end; border-top: 0 !important; padding-top: 0; }
.ratio-row .rate-name { flex: 1 1 auto; }

/* 准备按钮：长在自己分数下面，尺寸比原来底部那条大一圈 */
.seat-ready {
  margin-top: 4px;
  min-width: 78px;
  height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(240, 200, 110, 0.75);
  background: linear-gradient(180deg, #f1cf82, #c99540);
  color: #2a1d05;
  font-family: inherit;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.42), 0 0 12px rgba(226, 185, 96, 0.25);
}
.seat-ready:active:not(:disabled) { transform: scale(0.95); }
.seat-ready.on {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: #9fb0a9;
  box-shadow: none;
  letter-spacing: 1px;
}
.seat-ready:disabled { cursor: default; opacity: 0.82; }
.seat.away .seat-ready { display: none; }

/* 自动准备开关（原来叫「自动」） */
.dock { gap: 8px; }
.dock-auto {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #8b9a93;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.5px;
}
.dock-auto.on {
  color: #ffe0a2;
  border-color: rgba(226, 185, 96, 0.36);
  background: rgba(226, 185, 96, 0.12);
}
.dock-auto i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #58655f;
}
.dock-auto.on i { background: #e2b960; box-shadow: 0 0 6px rgba(226, 185, 96, 0.7); }

/* 荣耀池：机器人 / 玩家 / 总荣耀 */
.pool-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0 4px;
}
.ps-cell {
  padding: 10px 11px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.ps-cell span { display: block; font-size: 10px; color: #82918a; letter-spacing: 0.5px; }
.ps-cell b {
  display: block;
  margin-top: 3px;
  font-family: ui-monospace, monospace;
  font-size: 15px;
  color: #e8efe9;
  font-variant-numeric: tabular-nums;
}
.ps-cell.bot b { color: #9fd3ff; }
.ps-cell.human b { color: #ffd88f; }
.ps-cell.total {
  grid-column: 1 / -1;
  background: linear-gradient(180deg, rgba(226, 185, 96, 0.14), rgba(226, 185, 96, 0.04));
  border-color: rgba(226, 185, 96, 0.3);
}
.ps-cell.total b { color: #ffe1a6; font-size: 18px; }

/* 战队搜索：结果行 + 玩家明细页 */
.tm-found-list { margin-top: 8px; }
.tm-found-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  margin-bottom: 5px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #e2eae5;
  font-family: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.tm-found-row:active { background: rgba(255, 255, 255, 0.08); }
.tm-found-row b {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.tm-arrow { font-style: normal; font-size: 10.5px; color: #8ea39a; flex: 0 0 auto; }
.tm-m[data-member] { cursor: pointer; }
.tm-m[data-member]:active { background: rgba(255, 255, 255, 0.05); }

.mn-hero {
  padding: 15px 14px 13px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(226, 185, 96, 0.16), rgba(226, 185, 96, 0.03));
  border: 1px solid rgba(226, 185, 96, 0.26);
  text-align: center;
  margin-bottom: 12px;
}
.mn-id {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #c9b285;
  font-family: ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 1px;
}
.mn-hero > b {
  display: block;
  margin-top: 8px;
  font-size: 17px;
  color: #ffe9bb;
  letter-spacing: 0.5px;
}
.mn-coins { margin-top: 9px; display: flex; align-items: baseline; justify-content: center; gap: 6px; }
.mn-coins i { font-style: normal; font-size: 10.5px; color: #b8a780; }
.mn-coins em {
  font-style: normal;
  font-family: ui-monospace, monospace;
  font-size: 22px;
  color: #ffe1a6;
  font-variant-numeric: tabular-nums;
}
.mn-tag { margin-top: 7px; font-size: 10.5px; color: #9fd3a8; }
.mn-tag.out { color: #9aa69f; }
.mn-h { margin: 14px 0 8px; }
.tm-adj.on { margin-top: 0; }

/* 战绩查询：整期战绩图 + 暗牌标记 */
.hs-report {
  margin: 6px 0 12px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(226, 185, 96, 0.24);
  background: rgba(0, 0, 0, 0.26);
}
.hs-rhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.hs-rhead b { font-size: 12px; color: #ffe1a6; letter-spacing: 0.5px; }
.hs-rhead span { font-size: 9.5px; color: #7f8f89; }
.hs-report img { display: block; width: 100%; height: auto; }
/* 最后一张（暗牌）：绿色加粗，一眼能认出来 */
.rh-cards .card.tail-card {
  --fs: 12.5px;
  --cs: 8px;
  background: linear-gradient(180deg, #eafff3, #c9f5dc);
  color: #067a41;
  box-shadow:
    0 0 0 2px #2fd07a,
    0 0 9px rgba(47, 208, 122, 0.55),
    0 1px 3px rgba(0, 0, 0, 0.4);
}
.rh-cards .card.tail-card .corner .r { font-weight: 900; letter-spacing: -0.02em; }
.rh-cards .card.tail-card .corner .cs { display: block; }
.rh-cards .card.tail-card .pip { filter: drop-shadow(0 0 1px rgba(6, 122, 65, 0.4)); }
.rh-cards .card.tail-card::after {
  content: '';
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2fd07a;
  box-shadow: 0 0 6px rgba(47, 208, 122, 0.95);
}
.rh-tail-key {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2fd07a;
  box-shadow: 0 0 5px rgba(47, 208, 122, 0.8);
  vertical-align: 1px;
  margin: 0 2px;
}
.actions .btn.ready-go {
  background: linear-gradient(180deg, #e2b960, #b98c34);
  color: #2a1c06;
  border: 0;
  font-weight: 700;
}

/* 大厅房卡：进房荣耀门槛 */
.rc-min {
  color: #e0b96f;
  font-size: 10px;
  letter-spacing: 0.3px;
}

/* 荣耀池三项可点：点一下只看这一类流水 */
.ps-cell {
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
}
.ps-cell i { display: block; margin-top: 4px; font-style: normal; font-size: 9px; color: #6f7f79; }
.ps-cell.on {
  border-color: rgba(226, 185, 96, 0.5);
  background: rgba(226, 185, 96, 0.1);
}
.ps-cell.on i { color: #c0a878; }

/* 荣耀池：按日期查看（起止筛选 + 每天小计 + 区间汇总） */
.pd-block { margin-top: 12px; }
.pd-bar { display: flex; align-items: center; gap: 6px; }
.pd-bar .pf-input {
  flex: 1 1 0; min-width: 0; margin: 0;
  font-size: 12px; padding: 9px 6px; text-align: center;
  color-scheme: dark;
}
.pd-sep { font-size: 11px; color: #7e8b85; flex: 0 0 auto; }
.pd-bar .pf-go.sm { flex: 0 0 54px; padding: 9px 0; }
.pd-clear {
  display: block; margin: 8px 0 0 auto; padding: 2px 0;
  background: none; border: 0; color: #c0a878;
  font-size: 10.5px; cursor: pointer; font-family: inherit;
}
.pd-sum {
  margin: 10px 0 4px; padding: 8px 9px;
  border-radius: 9px; background: rgba(0, 0, 0, 0.18);
  font-size: 10.5px; color: #8c9a94; line-height: 1.7;
}
.pd-sum b { color: #d7e0da; font-variant-numeric: tabular-nums; }
.pd-sum b.up, .pd-day em.up, .pd-day i.up { color: #e0736b; }
.pd-sum b.down, .pd-day em.down, .pd-day i.down { color: #57b98a; }
.pd-days { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; max-height: 260px; overflow-y: auto; }
.pd-day {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 10px; border-radius: 9px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  font-family: inherit; text-align: left; color: #cbd6d0;
}
.pd-day b { flex: 0 0 auto; font-size: 12px; color: #e4d3a8; font-variant-numeric: tabular-nums; }
.pd-day span { flex: 1 1 auto; font-size: 10px; color: #87938d; }
.pd-day span i { font-style: normal; }
.pd-day em { flex: 0 0 auto; font-size: 11.5px; font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.pd-day.on { border-color: rgba(226, 185, 96, 0.5); background: rgba(226, 185, 96, 0.1); }

/* ============ 需求4/7/10：团队总荣耀 / 房主关房 / 观战席 ============ */
.tm-glory {
  margin-top: 8px; padding: 8px 12px; border-radius: 9px;
  background: linear-gradient(90deg, rgba(226, 185, 96, 0.16), rgba(226, 185, 96, 0.04));
  border: 1px solid rgba(226, 185, 96, 0.28);
  font-size: 12px; color: #e7d3a2; text-align: center;
  letter-spacing: 0.5px;
}
.tm-glory b { font-size: 17px; margin-left: 6px; color: #f5df9f; font-variant-numeric: tabular-nums; }

/* 顶栏小按钮：观战席 / 关闭房间 */
.tb-mini-btn {
  position: relative; z-index: 10;
  padding: 2px 8px; margin-left: 6px; border-radius: 20px; cursor: pointer;
  font-family: inherit; font-size: 10px; line-height: 1.6; white-space: nowrap;
  color: #9fe3ff; border: 1px solid rgba(120, 200, 240, 0.42);
  background: rgba(60, 150, 200, 0.14); transition: filter 0.15s;
}
.tb-mini-btn:hover { filter: brightness(1.2); }
.tb-mini-btn b { font-variant-numeric: tabular-nums; }
.tb-mini-btn.danger {
  color: #ffb3a7; border-color: rgba(224, 122, 95, 0.5);
  background: rgba(200, 70, 50, 0.18);
}

/* 观战席面板 */
.watch-list-box {
  width: min(420px, 100%); max-height: 86vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px; border-radius: 16px;
  background: linear-gradient(180deg, #16281f, #0c1611);
  border: 1px solid rgba(120, 200, 240, 0.24);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
}
.wl-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; font-weight: 700; color: #cfe3da;
}
.wl-head b { color: #9fe3ff; }
.wl-body { display: flex; flex-direction: column; gap: 6px; min-height: 48px; }
.wl-row {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.wl-av { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 50%; overflow: hidden; background: #2a4035; }
.wl-av svg { width: 100%; height: 100%; display: block; }
.wl-row b { flex: 1 1 auto; font-size: 12.5px; color: #d7e2de; }
.wl-row i { font-style: normal; font-size: 11px; color: #87938d; }

/* 观战基准位（庄家）的牌移到头像正下方，避免与左右两家的牌连成一排 */
body.watching .seat.watch-anchor.pos-bottom {
  flex-direction: column;
  gap: 3px;
  transform: translate(-50%, -62%);
}
body.watching .seat.watch-anchor.pos-bottom .mini-cards {
  margin-top: 2px;
}

/* 账密设置：一行「标签 + 输入框」，与开房面板的输入风格一致 */
.pf-line {
  display: flex; align-items: center; gap: 10px;
  margin-top: 10px;
}
.pf-line > span {
  flex: 0 0 44px; font-size: 12px; color: #9fb3a9; letter-spacing: .5px;
}
.pf-line > .pf-input { flex: 1 1 auto; min-width: 0; margin: 0; }
.pf-line > .pf-input[type="password"] { letter-spacing: 2px; }

/* 登录页：账号密码登录 */
.acc-login { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.acc-login input {
  width: 100%; padding: 10px 12px; font-family: inherit; font-size: 13px;
  color: #e8f0ec; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.12); border-radius: 10px; outline: none;
}
.acc-login input:focus { border-color: rgba(226,185,96,.65); }

/* 审核列表里的「副队推荐」小字 */
.tm-req-by {
  font-style: normal; font-size: 10px; color: #8fb6a6;
  padding: 2px 6px; border-radius: 999px;
  background: rgba(122, 182, 255, 0.1); border: 1px solid rgba(122, 182, 255, 0.22);
  white-space: nowrap;
}

/* ============ 荣耀池（重写）：当日两块 + 两张按天查询表 ============ */
.pool-day-head {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin: 4px 0 10px; padding: 9px 11px;
  border-radius: 11px; background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.07);
}
.pool-day-head span { font-size: 10.5px; color: #8b9a94; letter-spacing: 1px; }
.pool-day-head b { font-size: 13px; color: #e7d7ae; font-variant-numeric: tabular-nums; }
.pool-day-head i { font-style: normal; font-size: 9.5px; color: #6f7f79; margin-left: auto; }

.pt-card.human {
  text-align: left; font-family: inherit; color: inherit; cursor: pointer;
  transition: transform .16s, border-color .16s;
}
.pt-card.human:active { transform: scale(.985); }
.pt-card b.up { color: #ff9b8a; }
.pt-card.bot b.up { color: #9fd3ff; }

.pool-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 12px; }
.pool-links button:last-child:nth-child(3) { grid-column: 1 / -1; }
/* 今日分红：队长 / 副队 / 小副队 合计，单独占一行 */
.pool-today { flex-wrap: wrap; }
.pt-card.div {
  flex: 1 1 100%; text-align: left; font-family: inherit; color: inherit; cursor: pointer;
  border-color: rgba(211,169,79,.32);
  background: linear-gradient(160deg, rgba(211,169,79,.12), rgba(211,169,79,.04));
}
.pt-card.div b { color: #ffe0a0; }
.pt-card.div i { color: #a08f6c; }
.pool-links button {
  display: block; padding: 11px 12px; text-align: left; font-family: inherit;
  border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(211,169,79,.26);
  background: linear-gradient(160deg, rgba(211,169,79,.1), rgba(211,169,79,.03));
  color: #e9dcbe;
}
.pool-links button:active { transform: scale(.985); }
.pool-links button b { display: block; font-size: 12px; letter-spacing: .2px; }
.pool-links button i {
  display: block; margin-top: 3px; font-style: normal; font-size: 9.5px; color: #a08f6c;
}

/* 贡献 / 机器人分房明细行 */
.pc-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.pc-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 10px;
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.06);
}
.pc-l { flex: 1 1 auto; min-width: 0; }
.pc-l b { display: block; font-size: 12.5px; color: #e2ebe6; }
.pc-l span { display: block; margin-top: 2px; font-size: 10px; color: #7f8f88; }
.pc-row em {
  flex: 0 0 auto; font-style: normal; font-weight: 800; font-size: 14px;
  color: #ffb9a6; font-variant-numeric: tabular-nums;
}
.pc-row em.up { color: #ff9b8a; }
.pc-row em.down { color: #57b98a; }

/* 按天查询表 */
.pday-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; max-height: 420px; overflow-y: auto; }
.pday-row {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 10px 11px; border-radius: 10px; font-family: inherit; text-align: left;
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.06);
  color: inherit; cursor: pointer;
}
.pday-row.on { border-color: rgba(211,169,79,.4); background: rgba(211,169,79,.08); }
.pday-row b { flex: 0 0 48px; font-size: 12.5px; color: #e7d7ae; font-variant-numeric: tabular-nums; }
.pday-row span { flex: 1 1 auto; font-size: 10px; color: #87938d; }
.pday-row em {
  flex: 0 0 auto; font-style: normal; font-weight: 800; font-size: 13px;
  color: #cfdcd5; font-variant-numeric: tabular-nums;
}
.pday-row em.up { color: #ff9b8a; }
.pday-row em.down { color: #57b98a; }
.pday-row s { flex: 0 0 auto; text-decoration: none; font-size: 12px; color: #7d8c86; padding-left: 2px; }
.pday-open { padding: 2px 2px 6px; }

/* 分红表：按 ID 查汇总 */
.pdiv-bar { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; }
.pdiv-bar .pf-input {
  flex: 1 1 auto; min-width: 0; margin: 0;
  font-size: 12px; padding: 9px 10px; text-align: left;
}
.pdiv-bar .pf-go.sm { flex: 0 0 92px; padding: 9px 0; font-size: 12px; letter-spacing: 0; }
.pdiv-card {
  margin-top: 10px; padding: 11px 11px 12px; border-radius: 12px;
  border: 1px solid rgba(211,169,79,.28);
  background: linear-gradient(165deg, rgba(211,169,79,.10), rgba(211,169,79,.02));
}
.pdiv-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pdiv-top b { font-size: 12.5px; color: #f0e2c0; line-height: 1.5; }
.pdiv-top .pd-clear { margin: 0; flex: 0 0 auto; }
.pdiv-kpi {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 9px;
}
.pdiv-kpi > div {
  padding: 7px 4px; border-radius: 9px; text-align: center;
  background: rgba(0,0,0,.2); border: 1px solid rgba(255,255,255,.05);
}
.pdiv-kpi b {
  display: block; font-size: 12.5px; color: #ffcf9e;
  font-variant-numeric: tabular-nums; letter-spacing: -0.2px;
}
.pdiv-kpi .all b { color: #ffb37a; font-size: 14px; }
.pdiv-kpi i { display: block; margin-top: 2px; font-size: 9.5px; color: #8d9a93; font-style: normal; }
.pdiv-meta { margin-top: 8px; font-size: 10px; color: #8d9a93; line-height: 1.7; }
.pdiv-meta b { color: #d9e2dc; }
.pdiv-days { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; max-height: 240px; overflow-y: auto; }
.pdiv-day {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 9px;
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.06);
}
.pdiv-day b { flex: 0 0 46px; font-size: 12px; color: #e7d7ae; font-variant-numeric: tabular-nums; }
.pdiv-day span { flex: 1 1 auto; font-size: 10px; color: #87938d; }
.pdiv-day em {
  flex: 0 0 auto; font-style: normal; font-weight: 800; font-size: 13px;
  color: #ff9b8a; font-variant-numeric: tabular-nums;
}

/* 机器人总输赢：赢红输绿（与战绩图、国内涨跌习惯一致） */
.pt-card b.neg { color: #57b98a; }

/* 两张查询表之间直接切换 */
.pool-tabs { display: flex; gap: 6px; margin: 2px 0 10px; }
.pool-tabs button {
  flex: 1 1 0; padding: 8px 0; font-family: inherit; font-size: 12px;
  color: #93a49c; background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.08); border-radius: 10px; cursor: pointer;
}
.pool-tabs button.on {
  color: #f0dcaa; border-color: rgba(211,169,79,.45);
  background: rgba(211,169,79,.12); font-weight: 700;
}

/* 牌型说明底部：机器人抢庄 / 打倍规则 */
.bot-rule {
  grid-column: 1 / -1;
  margin-top: 4px; padding: 10px 11px; border-radius: 11px;
  background: rgba(211,169,79,.06);
  border: 1px solid rgba(211,169,79,.22);
  display: flex; flex-direction: column; gap: 4px;
}
.bot-rule b {
  font-size: 11px; color: #e9d3a0; letter-spacing: .3px;
}
.bot-rule b + b { margin-top: 4px; }
.bot-rule span { font-size: 10px; line-height: 15px; color: #9faea6; }
.bot-rule i {
  margin-top: 2px; font-style: normal; font-size: 9.5px; color: #7d8c86;
}

/* ---------- 菜单「调节」：输 / 赢 → 机器人 / 玩家 ---------- */
.adj-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-bottom: 10px;
}
.adj-tabs button {
  height: 38px; border-radius: 9px; font-size: 13px; font-weight: 700;
  color: #9fb3a7; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.09);
}
.adj-tabs button.on {
  color: #d8ffe9; background: linear-gradient(180deg, rgba(72,206,140,.28), rgba(28,116,74,.28));
  border-color: rgba(94,232,154,.55);
}
.adj-tip {
  margin: 0 0 12px; font-size: 11px; line-height: 1.6; color: #9aada2;
}
.adj-card {
  margin-bottom: 10px; padding: 12px 13px; border-radius: 12px;
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08);
}
.adj-card.on { border-color: rgba(94,232,154,.5); background: rgba(60,190,120,.07); }
.adj-h { display: flex; justify-content: space-between; align-items: baseline; }
.adj-h b { font-size: 13px; color: #eafaf1; }
.adj-h span { font-size: 10.5px; color: #8ba296; }
.adj-card.on .adj-h span { color: #7ff0b2; }
.adj-h span .adj-ok { color: #7ff0b2; font-style: normal; }
.adj-h span .adj-act { color: #ffcf7a; font-style: normal; }
.adj-num b.up { color: #ff8f8f; }
.adj-num b.down { color: #7ff0b2; }
.adj-sub { margin-top: 5px; font-size: 10.5px; line-height: 1.5; color: #8fa79a; }
.adj-bar {
  height: 5px; margin: 10px 0 5px; border-radius: 3px; overflow: hidden;
  background: rgba(255,255,255,.08);
}
.adj-bar i { display: block; height: 100%; background: linear-gradient(90deg,#3cc982,#a8f8c9); }
.adj-num { font-size: 10.5px; color: #9fb3a7; }
.adj-num b { color: #ffe1a5; font-variant-numeric: tabular-nums; }
.adj-row { display: flex; gap: 6px; align-items: center; margin-top: 10px; }
.adj-row .pf-input { flex: 1; min-width: 0; text-align: center; }
.adj-row .pf-go { flex: 0 0 auto; width: auto; min-width: 56px; }
.adj-tilde { color: #9fb3a7; font-size: 13px; flex: 0 0 auto; }
.adj-sw {
  min-width: 42px; height: 32px; border-radius: 8px; font-size: 12px;
  color: #93a79b; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
}
.adj-sw.on {
  color: #072315; font-weight: 700; background: linear-gradient(180deg,#a8f8c9,#3cc982);
  border-color: rgba(94,232,154,.7);
}
.iv-card { padding: 13px 14px; }
.pf-block > .iv-card:first-of-type { border-color: rgba(255,225,165,.38); }
.adj-picked { margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(255,255,255,.1); }
.adj-picked > b { color: #ffe1a5; font-size: 12px; }
.adj-hits { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.adj-hits button {
  padding: 6px 9px; border-radius: 8px; font-size: 11px;
  color: #d9f0e1; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
}

/* ---------- 上传头像（登录页 / 菜单「昵称头像」） ---------- */
.avatar-field .av-tip {
  font-style: normal;
  font-size: 10.5px;
  color: #7e9088;
  margin-left: 6px;
  letter-spacing: 0;
}
.av-up-row { display: flex; gap: 8px; margin-top: 9px; }
.av-up-btn {
  flex: 1 1 0;
  height: 34px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 12.5px;
  color: #ffd98a;
  background: rgba(211, 169, 79, 0.1);
  border: 1px solid rgba(211, 169, 79, 0.38);
}
.av-up-btn:active { transform: scale(0.97); }
.av-up-btn.ghost {
  color: #9aa8a1;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.13);
}
.av-pick.up {
  position: relative;
  overflow: hidden;
  padding: 0;
  background: #0d1a14;
  border-color: var(--gold);
}
.av-pick.up img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-pick .av-mine {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  font-style: normal;
  font-size: 8px;
  line-height: 1.5;
  color: #ffe6b0;
  background: rgba(0, 0, 0, 0.55);
  text-align: center;
}

/* 菜单「昵称头像」面板 */
.pf-av-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.pf-av-img,
.pf-av-face {
  width: 76px; height: 76px;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  background: #163526;
  border: 2px solid rgba(211, 169, 79, 0.45);
}
.pf-av-img { object-fit: cover; }
.pf-av-face .face { width: 100%; height: 100%; display: block; }
.pf-av-r { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.pf-av-r .pf-go { margin: 0; }
.pf-av-r .pf-sub { margin: 0; }

/* ---------- 战队成员行：任命 / 撤职 / 踢出 ---------- */
.tm-m { flex-wrap: wrap; }
.tm-m b { min-width: 54px; }
.tm-mini {
  flex: 0 0 auto;
  height: 23px;
  padding: 0 8px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 10.5px;
  line-height: 21px;
  color: #cdbcff;
  background: rgba(120, 90, 200, 0.16);
  border: 1px solid rgba(150, 120, 220, 0.5);
}
.tm-mini:active { transform: scale(0.94); }
.tm-mini.ghost {
  color: #9aa6a0;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.16);
}
.tm-mini.kick {
  color: #f5a98f;
  background: rgba(180, 60, 40, 0.16);
  border-color: rgba(232, 120, 96, 0.45);
}
.pf-row2.one .pf-go { flex: 1 1 auto; }

/* 成员行右侧操作组：任命 / 撤职 / 踢出，整组靠右，放不下时整组换行 */
.tm-ops {
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ============ 注册 / 登录（两个按钮：注册 / 登录） ============ */
.login {
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto;
  padding: 26px 22px 40px;
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  margin: -8px 0 20px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.auth-tab {
  padding: 9px 0;
  border-radius: 9px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #9faeab;
  background: transparent;
  transition: color .16s, background .16s;
}
.auth-tab.on {
  color: #1b1408;
  background: linear-gradient(180deg, #f0cf82, #d3a94f);
  box-shadow: 0 4px 12px rgba(211, 169, 79, 0.22);
}
.auth-pane { animation: authIn .2s ease; }
@keyframes authIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.auth-note {
  margin-top: 12px;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 10.5px;
  line-height: 1.85;
  color: #8b9c96;
  background: rgba(211, 169, 79, 0.06);
  border: 1px solid rgba(211, 169, 79, 0.14);
}
.auth-note b { color: #e8cd93; font-weight: 600; white-space: nowrap; }
.auth-pane .btn.primary { margin-top: 4px; }
@media (max-height: 720px) {
  .login-card { padding: 24px 20px 22px; }
  .brand { margin-bottom: 18px; }
}

/* ============ 反馈与建议 ============ */
.fb-text {
  width: 100%;
  min-height: 130px;
  padding: 10px 11px;
  border-radius: 10px;
  resize: vertical;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  background: rgba(0, 0, 0, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.1);
  user-select: text;
}
.fb-text:focus { outline: none; border-color: rgba(226, 185, 96, 0.55); }
.fb-text::placeholder { color: #64746f; }
.fb-count { margin-top: 5px; text-align: right; font-size: 10px; color: #7c8c86; }

/* 注册页头像栏：不留预设表情，只放一个空位等玩家上传 */
.auth-pane .avatar-pick { display: flex; gap: 6px; }
.auth-pane .av-pick { width: 64px; height: 64px; font-size: 18px; }
.av-pick.empty {
  border: 2px dashed rgba(211, 169, 79, 0.5);
  background: rgba(255, 255, 255, 0.03);
}
.av-empty-plus {
  color: rgba(211, 169, 79, 0.8);
  font-size: 30px;
  font-weight: 200;
  line-height: 1;
}
.auth-pane .auth-note { margin: 0 0 14px; }
