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

:root {
  --felt: #1b6b3a;
  --felt-dark: #14502c;
  --gold: #e8c468;
  --card-bg: #fdfdfd;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #0f1216;
  color: #f0f0f0;
  min-height: 100vh;
}

#app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 12px 150px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 顶栏 */
.topbar {
  position: relative;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 14px;
  background: linear-gradient(180deg, #1a212b 0%, #11161d 100%);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}
.topbar h1 { font-size: 22px; color: var(--gold); }
.topbar h1 .sub { font-size: 13px; color: #9aa; font-weight: normal; }
.topbar-info { display: flex; gap: 12px; align-items: center; font-size: 14px; color: #cdd; flex-wrap: wrap; }

/* 牌桌 */
.table {
  position: relative;
  margin-top: 30px;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.018) 0 3px, transparent 3px 6px),
    repeating-linear-gradient(-45deg, rgba(0,0,0,0.03) 0 3px, transparent 3px 6px),
    radial-gradient(ellipse 70% 75% at 50% 38%, #2a8a4f 0%, #1c6e3c 55%, #124e29 100%);
  border: 14px solid #6b4622;
  border-radius: 200px;
  height: clamp(440px, 54vh, 560px);
  box-shadow:
    inset 0 0 0 3px rgba(0,0,0,0.4),
    inset 0 0 80px rgba(0,0,0,0.5),
    inset 0 4px 14px rgba(255,255,255,0.07),
    0 0 0 2px #3c2611,
    0 16px 40px rgba(0,0,0,0.6);
}
/* 实木栏圈：边框上的高光，增加质感 */
.table::before {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(150deg, rgba(255,225,180,0.22) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.3) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  padding: 14px;
}

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

.seat {
  position: absolute;
  width: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: opacity 0.2s;
}

.seat.folded { opacity: 0.4; }
.seat.out { opacity: 0.25; filter: grayscale(1); }
.seat.active .seat-info {
  box-shadow: 0 0 0 2px var(--gold), 0 0 18px var(--gold);
  animation: pulse-glow 1.2s ease-in-out infinite;
}
.seat.winner .seat-info {
  box-shadow: 0 0 0 2px #ffe680, 0 0 26px #ffd24d;
  animation: winner-pulse 0.9s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 2px var(--gold), 0 0 10px var(--gold); }
  50%      { box-shadow: 0 0 0 2px var(--gold), 0 0 22px var(--gold); }
}
@keyframes winner-pulse {
  0%, 100% { box-shadow: 0 0 0 2px #ffe680, 0 0 14px #ffd24d; transform: scale(1); }
  50%      { box-shadow: 0 0 0 3px #ffe680, 0 0 30px #ffd24d; transform: scale(1.05); }
}

.seat-info {
  background: linear-gradient(165deg, rgba(33,44,37,0.94) 0%, rgba(14,20,16,0.94) 100%);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  padding: 7px 13px;
  text-align: center;
  min-width: 120px;
  box-shadow: 0 5px 14px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.07);
  transition: box-shadow 0.2s, transform 0.2s;
}
.seat.active .seat-info { transform: translateY(-1px); }
.seat-name { font-weight: 600; font-size: 14px; letter-spacing: 0.3px; }
.seat-stack { font-size: 13px; color: var(--gold); margin-top: 2px; }
.seat-bet { font-size: 12px; color: #8ec5ff; margin-top: 2px; }
.seat-action { font-size: 12px; color: #ffd; margin-top: 2px; }
.seat-allin { font-size: 12px; color: #ff6b6b; font-weight: 700; margin-top: 2px; }
.btn-chip {
  display: inline-block;
  background: #fff; color: #000;
  border-radius: 50%;
  width: 16px; height: 16px;
  font-size: 11px; line-height: 16px;
  font-weight: 700;
}

/* 牌 */
.seat-cards { display: flex; gap: 4px; }
.card {
  width: 42px; height: 60px;
  background: linear-gradient(160deg, #ffffff 0%, #eceef2 100%);
  border-radius: 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 3px 8px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.9);
  color: #111;
  position: relative;
}
.card .rank { font-size: 18px; line-height: 1; }
.card .suit { font-size: 16px; line-height: 1; }
.card.red { color: #d4213d; }
.card.black { color: #1a1a1a; }
.card.dim { opacity: 0.5; }
.card.back {
  background: #2f67c9 url('assets/cards/guandan/back.png') center / cover no-repeat;
  border: 0;
}
.card.placeholder {
  background: rgba(255,255,255,0.08);
  border: 1px dashed rgba(255,255,255,0.25);
  box-shadow: none;
}
.card.deal-in {
  animation: deal-in 0.32s ease-out backwards;
}
@keyframes deal-in {
  0%   { opacity: 0; transform: translateY(-26px) rotate(-8deg) scale(0.8); }
  100% { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}

/* 中央区域 */
.board-area {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.pot {
  position: relative;
  z-index: 6;
  background: rgba(0,0,0,0.7);
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 15px;
  color: var(--gold);
  font-weight: 600;
}
.community { display: flex; gap: 6px; }
.community .card { width: 52px; height: 72px; }
.community .card .rank { font-size: 22px; }
.community .card .suit { font-size: 20px; }
.stage {
  font-size: 14px;
  color: #dfe;
  background: rgba(0,0,0,0.4);
  padding: 4px 14px;
  border-radius: 16px;
  text-align: center;
  max-width: 420px;
}

/* 日志 */
.log-panel {
  background: #161a20;
  border-radius: 10px;
  padding: 8px 14px;
  max-height: 96px;
  display: flex;
  flex-direction: column;
}
.log-header { font-size: 13px; color: var(--gold); margin-bottom: 6px; }
.log { overflow-y: auto; font-size: 13px; color: #cdd; }
.log-line { padding: 1px 0; line-height: 1.5; }

/* 控制区 */
.controls {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(13, 16, 20, 0.96);
  border-top: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 -6px 24px rgba(0,0,0,0.5);
}
.action-buttons {
  display: none;
  gap: 10px;
}
.action-buttons.show { display: flex; }
.action-buttons.dim { opacity: 0.4; pointer-events: none; }

.btn {
  border: none;
  border-radius: 8px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  transition: filter 0.15s, transform 0.1s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; filter: none; }

.btn-fold { background: #b23b3b; }
.btn-call { background: #2f7d4f; }
.btn-raise { background: #c78a2a; }
.btn-allin { background: #8a2be2; }
.btn-deal { background: #2f7d4f; font-size: 17px; padding: 14px 40px; }
.btn-confirm { background: #2f7d4f; padding: 8px 18px; }
.btn-cancel { background: #555; padding: 8px 18px; }

.bet-slider {
  display: none;
  align-items: center;
  gap: 12px;
  background: #161a20;
  padding: 10px 18px;
  border-radius: 10px;
}
.bet-slider.show { display: flex; }
.bet-slider input[type=range] { width: 260px; accent-color: var(--gold); }
.raise-amount {
  min-width: 60px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
}

.deal-controls { display: none; }
.deal-controls.show { display: block; }

/* 设置按钮 */
.btn-settings {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #dfe;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-settings:hover { background: rgba(255,255,255,0.2); }

/* 设置弹窗 */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal {
  background: #1c2128;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 26px 30px;
  width: 360px;
  max-width: 92vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
}
.modal h2 { color: var(--gold); font-size: 19px; margin-bottom: 18px; }
.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 14px;
  color: #dde;
}
.setting-item input[type=number], .setting-item select {
  width: 110px;
  padding: 7px 9px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.2);
  background: #11151b;
  color: #fff;
  font-size: 14px;
}
.setting-checkbox input { width: 18px; height: 18px; accent-color: var(--gold); }
.modal-note { font-size: 12px; color: #8a9; margin: 6px 0 18px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* 胜率提示面板 */
.strength-panel {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: #161a20;
  border-radius: 10px;
  padding: 10px 16px;
  width: 320px;
}
.strength-panel.show { display: flex; }
.strength-row { display: flex; align-items: center; gap: 10px; }
.strength-label { font-size: 13px; color: #9ab; width: 56px; flex-shrink: 0; }
.strength-hand { font-size: 15px; font-weight: 700; color: var(--gold); }
.strength-bar-wrap {
  flex: 1;
  height: 12px;
  background: rgba(255,255,255,0.1);
  border-radius: 6px;
  overflow: hidden;
}
.strength-bar {
  height: 100%;
  width: 0;
  background: #2f9e5f;
  border-radius: 6px;
  transition: width 0.4s ease, background 0.4s;
}
.strength-pct { font-size: 14px; font-weight: 700; color: #dfe; width: 40px; text-align: right; }

/* —— 联机：大厅登录页 —— */
.lobby-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lobby-card {
  background: #1c2128;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 30px 28px;
  width: 360px;
  max-width: 92vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.lobby-card h1 { color: var(--gold); font-size: 26px; text-align: center; }
.lobby-sub { color: #9ab; text-align: center; font-size: 13px; margin: 6px 0 22px; }
.lobby-field { display: block; margin-bottom: 16px; }
.lobby-field span { display: block; font-size: 13px; color: #cdd; margin-bottom: 6px; }
.lobby-field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.2);
  background: #11151b;
  color: #fff;
  font-size: 16px;
}
.lobby-card .btn-deal { width: 100%; margin-top: 4px; }
.conn-status { text-align: center; font-size: 13px; color: #ffd; margin-top: 12px; min-height: 18px; }

/* —— 联机：房间页 —— */
.room-screen {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 12px 160px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100vh;
}
.room-code { color: var(--gold); font-weight: 600; }

/* 大厅座位区 */
.lobby-area { padding: 10px 4px; }
.lobby-area-title { color: var(--gold); font-size: 18px; margin-bottom: 6px; text-align: center; }
.lobby-config { text-align: center; color: #9ab; font-size: 13px; margin-bottom: 18px; }
.blind-info { color: #cdd; font-size: 13px; }
.lobby-seats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.lobby-seat {
  background: #161a20;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 16px;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.lobby-seat.empty { border-style: dashed; opacity: 0.5; align-items: center; }
.ls-name { font-size: 16px; font-weight: 600; color: #fff; }
.ls-empty { color: #889; }
.ls-tags { margin-top: 6px; display: flex; gap: 6px; }
.tag { font-size: 11px; padding: 2px 7px; border-radius: 10px; font-weight: 600; }
.tag.host { background: #c78a2a; color: #fff; }
.tag.ai { background: #5a6; color: #fff; }
.tag.off { background: #844; color: #fff; }
.lobby-controls { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.lobby-hint { text-align: center; color: #9ab; font-size: 13px; margin-top: 14px; }

/* 倒计时 / 等待提示 */
.turn-timer { margin-left: auto; font-size: 15px; font-weight: 700; }
.wait-msg { color: #9ab; font-size: 14px; min-height: 20px; text-align: center; }

/* 暂离 / 补充筹码 */
.self-controls { display: flex; gap: 8px; }
.btn-chip-action {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #dfe; border-radius: 8px; padding: 6px 14px;
  font-size: 13px; cursor: pointer; transition: background 0.15s;
}
.btn-chip-action:hover { background: rgba(255,255,255,0.2); }
.btn-chip-action.active { background: #c78a2a; color: #fff; border-color: #c78a2a; }
.btn-chip-action.rebuy { background: #2f7d4f; color: #fff; border-color: #2f7d4f; }
.seat.sitting { opacity: 0.55; }

/* 成牌 5 张高亮 */
.card.win-card {
  box-shadow: 0 0 0 2px #ffd24d, 0 0 14px #ffd24d;
  animation: win-card-pulse 0.9s ease-in-out infinite;
}
@keyframes win-card-pulse {
  0%, 100% { box-shadow: 0 0 0 2px #ffd24d, 0 0 10px #ffd24d; }
  50%      { box-shadow: 0 0 0 3px #ffe680, 0 0 22px #ffd24d; }
}

/* 飞动的筹码 */
.fx-layer { position: absolute; inset: 0; pointer-events: none; }
.flying-chip {
  position: fixed;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe17a, #d99b1c 70%);
  border: 2px solid #fff3c4;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  z-index: 200;
  transition: transform 0.55s cubic-bezier(.4,.1,.3,1), opacity 0.55s ease;
}

/* 轮到你：屏幕脉冲 */
body.my-turn { animation: screen-pulse 1.3s ease-in-out infinite; }
@keyframes screen-pulse {
  0%, 100% { box-shadow: inset 0 0 0 0 rgba(232,196,104,0); }
  50%      { box-shadow: inset 0 0 70px 0 rgba(232,196,104,0.35); }
}

/* 聊天 */
.btn-settings.badge { position: relative; }
.btn-settings.badge::after {
  content: ''; position: absolute; top: -3px; right: -3px;
  width: 9px; height: 9px; border-radius: 50%; background: #ff5252;
}
.chat-panel {
  display: none;
  position: fixed;
  right: 14px; bottom: 96px;
  width: 300px; max-width: 90vw;
  height: 360px; max-height: 56vh;
  background: #161a20;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  z-index: 60;
  flex-direction: column;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}
.chat-panel.show { display: flex; }
.chat-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; color: var(--gold); font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.chat-close { background: none; border: none; color: #9ab; font-size: 20px; cursor: pointer; }
.chat-log { flex: 1; overflow-y: auto; padding: 10px 14px; font-size: 14px; }
.chat-line { padding: 3px 0; color: #dfe; line-height: 1.4; word-break: break-word; }
.chat-name { color: var(--gold); font-weight: 600; }
.chat-emojis { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 10px; border-top: 1px solid rgba(255,255,255,0.06); }
.chat-emojis button {
  background: rgba(255,255,255,0.08); border: none; border-radius: 6px;
  font-size: 18px; width: 34px; height: 32px; cursor: pointer;
}
.chat-emojis button:hover { background: rgba(255,255,255,0.18); }
.chat-input-row { display: flex; gap: 6px; padding: 10px; }
.chat-input-row input {
  flex: 1; padding: 9px 11px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2); background: #11151b; color: #fff; font-size: 14px;
}
.chat-input-row .btn { padding: 8px 14px; }

/* 头顶聊天气泡 */
.chat-bubble {
  position: fixed;
  transform: translate(-50%, -100%) translateY(6px) scale(0.92);
  max-width: 180px;
  padding: 6px 11px;
  background: #fff;
  color: #1a1a1a;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  word-break: break-word;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  z-index: 60;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.chat-bubble::after {
  content: '';
  position: absolute;
  left: 50%; bottom: -6px;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #fff;
  border-bottom: 0;
}
.chat-bubble.emoji { font-size: 26px; padding: 4px 12px; }
.chat-bubble.show {
  opacity: 1;
  transform: translate(-50%, -100%) translateY(0) scale(1);
}

/* 喝酒记分板 */
.score-body { flex: 1; overflow-y: auto; padding: 10px 14px; }
.score-row {
  padding: 9px 10px; margin-bottom: 8px; border-radius: 9px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.06);
}
.score-row.you { background: rgba(212,175,55,0.12); border-color: rgba(212,175,55,0.35); }
.score-name { font-weight: 600; color: #ffe; font-size: 14px; margin-bottom: 3px; }
.score-nums { font-size: 13px; color: #bcd; }
.score-nums b { color: var(--gold); }
.score-nums b.pend { color: #ff9d5c; }
.score-tag { font-size: 11px; padding: 1px 6px; border-radius: 8px; margin-left: 4px; }
.score-tag.most { background: #5b2b2b; color: #ffb3a0; }
.score-tag.least { background: #2b4b34; color: #9be8b4; }

/* 喝酒控件条 */
.drink-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 10px; }
.drink-pending { color: #ff9d5c; font-weight: 700; font-size: 14px; }

/* 座位喝酒信息 */
.seat-pending { font-size: 12px; color: #ff9d5c; margin-top: 2px; }
.seat-handbet { font-size: 12px; color: #ffd24a; font-weight: 700; margin-top: 2px; }
.seat-drink { font-size: 12px; color: #ffcaa0; font-weight: 700; margin-top: 2px; }

/* 杯 / 口 换算显示：杯更醒目，口次要 */
.cup { color: #ffce3a; font-weight: 800; font-size: 1.12em; letter-spacing: 0.5px; }
.cup::before { content: '🍺'; font-size: 0.85em; margin-right: 2px; }
.sip { color: #cdd6e0; font-size: 0.88em; margin-left: 4px; }
.score-seg { display: inline-block; margin-right: 12px; }
/* 待喝(欠酒,橙) / 结余(赢来的抵扣,绿) / 已结清(灰) */
.pend-owe { color: #ff9d5c; }
.pend-owe .cup, .pend-owe .sip { color: inherit; }
.pend-credit { color: #5fd08a; font-weight: 700; }
.pend-credit .cup, .pend-credit .sip { color: inherit; }
.pend-credit .cup::before { content: '🍺'; }
.pend-zero { color: #8aa; }

/* 让记分板按钮更显眼 */
#btnScore { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(212,175,55,0.4) inset; }

/* 结算解散按钮 */
.btn-settings.danger { border-color: #b14a3a; color: #ffbcae; }
.btn-settings.danger:hover { background: rgba(177,74,58,0.25); }

/* 大厅整晚战报 */
.lobby-settle {
  max-width: 460px; margin: 0 auto 18px; padding: 14px 16px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(212,175,55,0.25); border-radius: 12px;
}
.settle-title { margin: 0 0 10px; font-size: 16px; color: var(--gold); text-align: center; }
.lobby-settle .score-row { text-align: left; }

/* 自填喝酒口数 */
.drink-amount-input {
  width: 64px; padding: 7px 8px; border-radius: 8px; text-align: center;
  border: 1px solid rgba(255,255,255,0.25); background: #11151b; color: #fff; font-size: 15px;
}
.btn-chip-action.drink-go { background: #6b3f1f; border-color: #b9783a; color: #ffe3c8; font-weight: 700; }

/* 喝酒全体提示 toast */
.toast {
  position: fixed; top: 70px; left: 50%;
  transform: translateX(-50%) translateY(-12px);
  background: linear-gradient(180deg, #c98a3a, #a86b22);
  color: #fff; font-weight: 700; font-size: 15px;
  padding: 9px 18px; border-radius: 22px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.45);
  opacity: 0; z-index: 300; pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 喝酒记录 + 房主调整 */
.drink-log-title { margin: 14px 0 6px; font-size: 13px; color: var(--gold); font-weight: 700; }
.drink-log-line { font-size: 13px; color: #bcd; padding: 2px 0; }
.drink-log-line.adjust { color: #ff9d5c; }
.drink-log-line.buyin { color: #5fd08a; }
.host-adjust { margin-top: 12px; padding: 10px; border-radius: 9px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); }
.adjust-row { display: flex; gap: 6px; align-items: center; }
.adjust-row select, .adjust-row input {
  padding: 7px 8px; border-radius: 7px; border: 1px solid rgba(255,255,255,0.2);
  background: #11151b; color: #fff; font-size: 13px;
}
.adjust-row select { flex: 1; }
.adjust-row input { width: 56px; text-align: center; }
.adjust-row .btn-chip-action { white-space: nowrap; }

/* 买入复活 */
.btn-chip-action.buyin { background: #6b3f1f; border-color: #b9783a; color: #ffe3c8; }
.buyin-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.buyin-list .buyin-pick { width: 100%; text-align: left; }

@media (max-width: 720px) {
  .room-screen { padding: 8px 8px 150px; }
  .topbar { padding: 7px 10px; gap: 6px; border-radius: 11px; }
  .topbar h1 { font-size: 17px; }
  .topbar h1 .sub { display: none; }
  .topbar-info { gap: 6px; font-size: 11px; }
  .btn-settings { padding: 6px 9px; font-size: 12px; }

  /* 竖屏：牌桌拉高成纵向椭圆，座位更紧凑 */
  .table { margin-top: 20px; height: clamp(440px, 62vh, 600px); border-radius: 130px; border-width: 10px; }
  .seat { width: 72px; gap: 3px; }
  .seat-info { min-width: 64px; padding: 3px 6px; border-radius: 9px; }
  .seat-name { font-size: 10px; }
  .seat-stack, .seat-bet, .seat-action, .seat-pending, .seat-handbet, .seat-drink { font-size: 9px; margin-top: 1px; }
  .card { width: 24px; height: 34px; border-radius: 4px; }
  .card .rank { font-size: 11px; }
  .card .suit { font-size: 9px; }
  .seat-cards { gap: 2px; }
  .community { gap: 3px; }
  .community .card { width: 28px; height: 40px; }
  .community .card .rank { font-size: 13px; }
  .community .card .suit { font-size: 11px; }
  .pot { font-size: 12px; padding: 3px 10px; }
  .stage { font-size: 12px; max-width: 86vw; }

  /* 控件区竖屏紧凑 */
  .strength-panel { width: 100%; }
  .controls { padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); gap: 6px; }
  .self-controls, .drink-bar { flex-wrap: wrap; justify-content: center; }
  .btn { padding: 11px 12px; font-size: 14px; }
  .action-buttons { gap: 6px; }
  .btn-chip-action { padding: 7px 10px; font-size: 12px; }
  .drink-amount-input { width: 52px; }
  .bet-slider input[type=range] { width: 150px; }

  /* 侧边面板竖屏左右留小边距，占满宽度更好用 */
  .chat-panel, .score-panel { left: 8px; right: 8px; width: auto; max-width: none; }
}

/* ===== 游戏中心首页 ===== */
.home-screen { max-width: 720px; margin: 0 auto; padding: 48px 16px 60px; text-align: center; }
.home-title { font-size: 30px; color: var(--gold); margin-bottom: 6px; }
.home-sub { color: #9ab; margin-bottom: 32px; }
.home-recent {
  display: inline-flex; align-items: center; gap: 8px;
  margin: -14px auto 24px; padding: 10px 20px;
  border: 1px solid var(--gold); border-radius: 999px;
  color: var(--gold); background: rgba(232,196,104,0.08);
  text-decoration: none; font-size: 14px; font-weight: 600;
}
.home-recent:hover { background: rgba(232,196,104,0.18); transform: translateY(-1px); }
/* 我的 / 排行榜入口 */
.home-topline { display: flex; justify-content: center; gap: 12px; margin: -12px 0 20px; }
.home-pill {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.05);
  color: #cfdae5;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}
.home-pill:hover { border-color: var(--gold); color: var(--gold); }
/* 我的页面 */
.profile-card, .rank-card { max-width: 460px; width: 100%; }
.profile-row { display: flex; gap: 8px; }
.profile-row input { flex: 1; min-width: 0; }
.profile-id { color: #8fa2b3; font-size: 12px; margin: 6px 0 0; }
.profile-id b { color: #cfdae5; }
.profile-section { margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.08); text-align: left; }
.profile-section h2 { font-size: 15px; color: #ffe8a6; margin-bottom: 10px; }
.profile-section .profile-row { margin-bottom: 8px; }
.profile-stats { font-size: 14px; }
.profile-stat-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed rgba(255,255,255,0.07); }
.profile-stat-row b { color: #ffe8a6; font-weight: 700; }
.profile-code { color: #ffd34d; font-size: 22px; letter-spacing: 4px; align-self: center; }
/* 排行榜页面 */
.rank-tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 14px; }
.rank-tab {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  color: #b9c7d4;
  font-size: 13px;
  cursor: pointer;
}
.rank-tab.active { border-color: var(--gold); color: var(--gold); background: rgba(232,196,104,0.10); }
.rank-self { color: #7df0a6; font-size: 13px; margin-bottom: 10px; font-weight: 700; }
.rank-list { text-align: left; }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-bottom: 1px solid rgba(255,255,255,0.07); font-size: 14px; }
.rank-row.you { color: #ffd34d; font-weight: 800; }
.rank-no { width: 34px; text-align: center; font-weight: 800; }
.rank-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row b { color: #ffe8a6; font-weight: 700; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.home-card {
  display: block; text-decoration: none; color: #f0f0f0;
  background: linear-gradient(165deg, #1c2530, #131922);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 16px;
  padding: 26px 18px; transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.home-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,0.5); border-color: var(--gold); }
/* 在线人数角标 */
.home-card { position: relative; }
.home-live {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #7df0a6;
  background: rgba(35,80,52,0.55);
  border: 1px solid rgba(125,240,166,0.35);
  border-radius: 999px;
  padding: 2px 8px;
}
.home-card.poker:hover { border-color: #6fae7f; }
.home-card.counter:hover { border-color: #d8a23a; }
.home-card-emoji { font-size: 46px; margin-bottom: 10px; }
.home-card-name { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.home-card-desc { font-size: 13px; color: #9ab; line-height: 1.5; }
.home-foot { margin-top: 30px; color: #678; font-size: 13px; }

/* ===== 喝酒计数器 ===== */
.ctr-entry { max-width: 460px; margin: 0 auto; padding: 30px 16px 60px; }
.ctr-card {
  background: #161b22; border: 1px solid rgba(255,255,255,0.08); border-radius: 14px;
  padding: 16px 18px; margin-bottom: 16px;
}
.ctr-card h3 { color: var(--gold); font-size: 16px; margin-bottom: 12px; }
.ctr-card .btn { width: 100%; margin-top: 4px; }
.ctr-resume-list { display: flex; flex-direction: column; gap: 8px; }
.ctr-resume { width: 100%; text-align: left; }

.ctr-main { max-width: 760px; margin: 0 auto; padding: 12px 12px 60px; }
.ctr-identify {
  background: rgba(216,162,58,0.14); border: 1px solid rgba(216,162,58,0.4);
  border-radius: 10px; padding: 10px 14px; margin: 12px 0; font-size: 14px; color: #ffe3b0;
}
.ctr-h2 { font-size: 16px; color: var(--gold); margin: 18px 0 10px; }
.ctr-tip { font-size: 12px; color: #788; font-weight: normal; }
.ctr-board { display: flex; flex-direction: column; gap: 10px; }
.ctr-row {
  background: linear-gradient(165deg, rgba(33,44,37,0.7), rgba(14,20,16,0.7));
  border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 12px 14px;
}
.ctr-row.me { border-color: rgba(212,175,55,0.5); background: rgba(212,175,55,0.08); }
.ctr-row-top { display: flex; justify-content: space-between; align-items: center; }
.ctr-name { font-weight: 600; font-size: 16px; }
.ctr-count { font-weight: 800; font-size: 17px; }
.ctr-count.owe { color: #ff9d5c; }
.ctr-count.credit { color: #5fd08a; }
.ctr-count.zero { color: #8aa; font-weight: 600; }
.ctr-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ctr-btn {
  border: 1px solid rgba(255,255,255,0.18); background: #222a33; color: #fff;
  border-radius: 9px; padding: 9px 14px; font-size: 15px; font-weight: 700; cursor: pointer;
}
.ctr-btn:hover { background: #2b343f; }
.ctr-btn.plus { background: #6b3f1f; border-color: #b9783a; color: #ffe3c8; }
.ctr-btn.minus { background: #2b4b34; border-color: #4f8a63; color: #c9f0d6; }
.ctr-btn.claim { background: #5a4a1a; border-color: var(--gold); color: #ffe9a8; margin-top: 10px; }
.ctr-btn.custom, .ctr-btn.rename { font-weight: 600; font-size: 13px; }

.ctr-log {
  background: #11151b; border: 1px solid rgba(255,255,255,0.07); border-radius: 10px;
  padding: 10px 14px; max-height: 320px; overflow-y: auto; font-size: 13px;
}
.ctr-log-head { font-weight: 700; color: var(--gold); margin-bottom: 6px; font-size: 13px; }
.dlog-empty { color: #7a8694; font-size: 13px; padding: 2px 0; }
.ctr-log-line { padding: 3px 0; color: #bcd; line-height: 1.5; }
.ctr-log-line.owe { color: #ffcaa0; }
.ctr-log-line.credit { color: #9be8b4; }
.ctr-log-time { color: #678; margin-right: 6px; font-variant-numeric: tabular-nums; }

@media (max-width: 720px) {
  .ctr-btn { padding: 10px 13px; }
  .home-screen { padding: 32px 14px 50px; }
}

/* 计数器：房主控制 */
.ctr-hint { font-size: 12px; color: #788; margin-bottom: 10px; }
.ctr-hostbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: rgba(212,175,55,0.1); border: 1px solid rgba(212,175,55,0.35);
  border-radius: 10px; padding: 8px 12px; margin: 12px 0;
}
.ctr-hostbar-label { color: var(--gold); font-weight: 700; margin-right: 4px; }
.ctr-crown { font-size: 13px; }
.ctr-controls.host { margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(255,255,255,0.1); }
.ctr-controls.host .ctr-btn { font-size: 13px; font-weight: 600; padding: 7px 11px; background: #3a2e16; border-color: rgba(212,175,55,0.4); color: #ffe9a8; }
.ctr-btn.hremove { background: #4a2020 !important; border-color: #b14a3a !important; color: #ffbcae !important; }

/* 计数器：封存横幅 + 重置身份 */
.ctr-archived {
  background: rgba(120,120,140,0.18); border: 1px solid rgba(180,180,200,0.35);
  border-radius: 10px; padding: 10px 14px; margin: 12px 0; font-size: 14px; color: #cdd5e0;
}
.ctr-btn.hreset { background: #2a3a4a !important; border-color: #5a7a9a !important; color: #cfe6ff !important; }

/* ===== 炸弹翻牌 ===== */
.mine-app {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 12px 60px;
  min-height: 100vh;
}
.mine-panel {
  margin: 14px 0 12px;
  padding: 14px;
  background:
    linear-gradient(160deg, rgba(33,42,54,0.92), rgba(15,20,27,0.95));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.28);
}
.mine-turn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.mine-kicker {
  color: #8fa2b4;
  font-size: 12px;
  margin-bottom: 3px;
}
.mine-current {
  color: #ffe0a3;
  font-size: 24px;
  font-weight: 800;
}
.mine-turn-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mine-turn-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #cdd9e4;
  font-size: 13px;
}
.mine-players {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.mine-player {
  min-height: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
}
.mine-player.active {
  border-color: #e8c468;
  background: rgba(232,196,104,0.12);
  box-shadow: 0 0 0 1px rgba(232,196,104,0.25), 0 0 18px rgba(232,196,104,0.18);
}
.mine-player-name {
  font-size: 15px;
  font-weight: 800;
  color: #f7fbff;
  word-break: break-word;
}
.mine-player-score {
  font-size: 12px;
  color: #93a6b8;
}
.mine-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.mine-actions .btn {
  padding: 10px 16px;
}
.mine-board-wrap {
  position: relative;
  padding: 14px;
  background:
    radial-gradient(circle at 50% 0%, rgba(232,196,104,0.13), transparent 34%),
    linear-gradient(180deg, #151b23, #10141a);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
}
.mine-board {
  --mine-card-size: clamp(56px, 10vw, 92px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--mine-card-size), 1fr));
  gap: 9px;
}
.mine-card {
  width: 100%;
  aspect-ratio: 3 / 4;
  min-height: 74px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: transparent;
  transform-style: preserve-3d;
  transition: transform 0.16s ease, filter 0.16s ease;
}
.mine-card:not(.revealed):hover {
  transform: translateY(-3px);
  filter: brightness(1.08);
}
.mine-card:disabled {
  cursor: default;
}
.mine-card-back {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.82);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.14), transparent 28%, rgba(0,0,0,0.18) 72%),
    repeating-linear-gradient(45deg, #214f84 0 7px, #17385f 7px 14px);
  box-shadow: 0 5px 14px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(0,0,0,0.2);
}
.mine-card-back::before {
  content: '';
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(255,255,255,0.38);
  border-radius: 7px;
}
.mine-back-mark {
  width: 44%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(9,14,20,0.55);
  color: #d9ecff;
  font-size: clamp(12px, 2.2vw, 18px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  border: 1px solid rgba(255,255,255,0.25);
}
.mine-card.revealed {
  animation: mine-flip 0.28s ease-out;
}
@keyframes mine-flip {
  0% { transform: rotateY(88deg) scale(0.92); opacity: 0.65; }
  100% { transform: rotateY(0) scale(1); opacity: 1; }
}
.mine-card.safe {
  background:
    linear-gradient(160deg, #f8fbff, #dce7f0);
  border: 1px solid rgba(20,28,34,0.18);
  color: #15202b;
  box-shadow: 0 5px 14px rgba(0,0,0,0.34), inset 0 1px 0 rgba(255,255,255,0.9);
}
.mine-safe-face {
  font-size: clamp(22px, 4vw, 40px);
  font-weight: 900;
  line-height: 1;
  color: #1f6b45;
}
.mine-safe-sub {
  position: absolute;
  bottom: 9%;
  color: #60717f;
  font-size: clamp(9px, 1.6vw, 12px);
  font-weight: 900;
  letter-spacing: 0;
}
.mine-card.bomb {
  background:
    radial-gradient(circle at 52% 48%, rgba(255,230,145,0.55), transparent 25%),
    linear-gradient(155deg, #351618, #12090b 72%);
  border: 1px solid rgba(255,105,88,0.5);
  box-shadow: 0 0 0 1px rgba(255,105,88,0.22), 0 0 28px rgba(255,77,62,0.28), 0 6px 18px rgba(0,0,0,0.52);
}
.mine-bomb-art {
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  position: relative;
  background:
    radial-gradient(circle at 32% 28%, #59616a 0 11%, transparent 12%),
    radial-gradient(circle at 50% 55%, #20252a, #050608 72%);
  border: 2px solid #090b0e;
  box-shadow: inset -8px -10px 12px rgba(0,0,0,0.55), 0 8px 14px rgba(0,0,0,0.45);
}
.mine-bomb-art::before {
  content: '';
  position: absolute;
  width: 34%;
  height: 13%;
  left: 60%;
  top: -6%;
  border-radius: 8px;
  background: #12161a;
  transform: rotate(-18deg);
  border: 1px solid #2b3036;
}
.mine-bomb-art::after {
  content: '';
  position: absolute;
  width: 44%;
  height: 30%;
  left: 82%;
  top: -25%;
  border-top: 3px solid #e4b642;
  border-right: 3px solid #e4b642;
  border-radius: 0 12px 0 0;
  transform: rotate(-18deg);
}
.mine-bomb-art span {
  position: absolute;
  width: 20%;
  aspect-ratio: 1;
  right: -56%;
  top: -38%;
  background: #ffdf6b;
  clip-path: polygon(50% 0, 62% 35%, 100% 18%, 74% 50%, 100% 82%, 62% 65%, 50% 100%, 38% 65%, 0 82%, 26% 50%, 0 18%, 38% 35%);
  filter: drop-shadow(0 0 6px rgba(255,114,67,0.9));
}
.mine-bomb-text {
  position: absolute;
  bottom: 9%;
  color: #ffd2b0;
  font-size: clamp(10px, 1.8vw, 14px);
  font-weight: 900;
  letter-spacing: 0;
}
.mine-result {
  position: fixed;
  left: 50%;
  top: 76px;
  z-index: 90;
  max-width: min(90vw, 540px);
  transform: translateX(-50%) translateY(-12px);
  opacity: 0;
  pointer-events: none;
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(18,25,32,0.95);
  border: 1px solid rgba(255,255,255,0.15);
  color: #ecf5ff;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 12px 34px rgba(0,0,0,0.46);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.mine-result.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.mine-result.danger {
  background: linear-gradient(180deg, #a82e27, #651816);
  border-color: rgba(255,180,150,0.34);
  color: #fff0e8;
}
.mine-log {
  margin-top: 12px;
  max-height: 180px;
}
.mine-modal {
  width: 420px;
}
.mine-name-editor {
  margin: 10px 0 16px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255,255,255,0.1);
}
.mine-name-title {
  color: #cdd9e4;
  font-size: 14px;
  margin-bottom: 8px;
}
.mine-name-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.mine-name-input {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: #11151b;
  color: #fff;
  font-size: 14px;
}
body.mine-shock {
  animation: mine-screen-shock 0.58s linear;
}
@keyframes mine-screen-shock {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-5px, 2px); }
  30% { transform: translate(4px, -3px); }
  45% { transform: translate(-3px, -2px); }
  60% { transform: translate(3px, 3px); }
  75% { transform: translate(-2px, 1px); }
}
@media (max-width: 720px) {
  .mine-app { padding: 8px 8px 44px; }
  .mine-panel, .mine-board-wrap { border-radius: 10px; padding: 10px; }
  .mine-current { font-size: 20px; }
  .mine-players { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mine-player { min-height: 50px; padding: 7px 8px; }
  .mine-player-name { font-size: 13px; }
  .mine-player-score { font-size: 11px; }
  .mine-actions .btn { flex: 1 1 120px; padding: 10px 12px; }
  .mine-board {
    --mine-card-size: clamp(48px, 18vw, 72px);
    gap: 7px;
  }
  .mine-card { min-height: 64px; border-radius: 7px; }
  .mine-card-back, .mine-card.safe, .mine-card.bomb { border-radius: 7px; }
  .mine-result { top: auto; bottom: 18px; font-size: 14px; border-radius: 18px; }
  .mine-name-fields { grid-template-columns: 1fr; }
}

/* ===== 骰子吹牛 ===== */
.dice-entry {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 16px 60px;
  text-align: center;
}
.dice-mode-card {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  font: inherit;
  text-align: center;
}
.link-button {
  background: none;
  border: none;
  color: #9ab;
  cursor: pointer;
  font: inherit;
}
.link-button:hover { color: var(--gold); }
.dice-app {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 12px 60px;
  min-height: 100vh;
}
.dice-hero {
  margin: 14px 0 12px;
  padding: 14px;
  background: linear-gradient(160deg, rgba(35,43,55,0.94), rgba(14,18,25,0.96));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.28);
}
.dice-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.dice-kicker {
  color: #8fa2b4;
  font-size: 12px;
  margin-bottom: 3px;
}
.dice-current {
  color: #ffe0a3;
  font-size: 24px;
  font-weight: 900;
}
.dice-lastbid {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #dbe7f2;
  font-size: 14px;
}
.dice-lastbid b {
  color: var(--gold);
  font-size: 18px;
  margin: 0 3px;
}
.dice-lastbid span {
  color: #9fd0ff;
  font-weight: 800;
  margin-right: 4px;
}
.dice-controls {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(170px, 1fr) minmax(250px, 1fr) auto;
  gap: 12px;
  align-items: center;
}
.dice-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.dice-picker label span {
  display: block;
  color: #95a7b7;
  font-size: 12px;
  margin-bottom: 5px;
}
.dice-picker input,
.dice-picker select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: #11151b;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}
.dice-count-pick {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.dice-count-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: #dfe8f2;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}
.dice-count-btn.active {
  border-color: var(--gold);
  background: rgba(232,196,104,0.16);
  color: #ffe7a8;
}
.dice-face-pick {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.dice-face-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  cursor: pointer;
}
.dice-face-btn.active {
  border-color: var(--gold);
  background: rgba(232,196,104,0.14);
  box-shadow: 0 0 0 1px rgba(232,196,104,0.25);
}
.dice-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.dice-actions .btn {
  padding: 10px 16px;
}
.dice-players {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.dice-player {
  min-height: 142px;
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(165deg, rgba(34,43,54,0.86), rgba(15,20,27,0.92));
  border: 1px solid rgba(255,255,255,0.08);
}
.dice-player.active {
  border-color: var(--gold);
  background: rgba(232,196,104,0.1);
  box-shadow: 0 0 0 1px rgba(232,196,104,0.2), 0 0 18px rgba(232,196,104,0.14);
}
.dice-player.rolling .dice-die.hidden {
  animation: dice-cup-shake 0.28s linear infinite;
}
body.dice-rolling-body .dice-hero {
  box-shadow: 0 0 0 1px rgba(232,196,104,0.22), 0 0 28px rgba(232,196,104,0.12);
}
@keyframes dice-cup-shake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(-2px, 1px) rotate(-5deg); }
  40% { transform: translate(2px, -1px) rotate(4deg); }
  60% { transform: translate(-1px, -2px) rotate(5deg); }
  80% { transform: translate(1px, 2px) rotate(-4deg); }
}
.dice-player-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.dice-player-name {
  color: #f7fbff;
  font-size: 17px;
  font-weight: 900;
  word-break: break-word;
}
.dice-player-score {
  color: #ffb879;
  font-size: 12px;
  margin-top: 3px;
}
.dice-peek {
  padding: 7px 11px;
  font-size: 13px;
}
.dice-cup-row,
.dice-peek-cup {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
  align-items: center;
  min-height: 58px;
  margin-top: 14px;
}
.dice-peek-cup {
  min-height: 92px;
  margin: 8px 0 16px;
}
.dice-die {
  width: 42px;
  height: 42px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
  padding: 7px;
  border-radius: 8px;
  background: linear-gradient(160deg, #fff, #dce5ee);
  box-shadow: 0 4px 10px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.9);
}
.dice-die i {
  width: 7px;
  height: 7px;
  align-self: center;
  justify-self: center;
  border-radius: 50%;
  background: #16202a;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.2);
}
.dice-die.d1 i:nth-child(1) { grid-column: 2; grid-row: 2; }
.dice-die.d2 i:nth-child(1) { grid-column: 1; grid-row: 1; }
.dice-die.d2 i:nth-child(2) { grid-column: 3; grid-row: 3; }
.dice-die.d3 i:nth-child(1) { grid-column: 1; grid-row: 1; }
.dice-die.d3 i:nth-child(2) { grid-column: 2; grid-row: 2; }
.dice-die.d3 i:nth-child(3) { grid-column: 3; grid-row: 3; }
.dice-die.d4 i:nth-child(1) { grid-column: 1; grid-row: 1; }
.dice-die.d4 i:nth-child(2) { grid-column: 3; grid-row: 1; }
.dice-die.d4 i:nth-child(3) { grid-column: 1; grid-row: 3; }
.dice-die.d4 i:nth-child(4) { grid-column: 3; grid-row: 3; }
.dice-die.d5 i:nth-child(1) { grid-column: 1; grid-row: 1; }
.dice-die.d5 i:nth-child(2) { grid-column: 3; grid-row: 1; }
.dice-die.d5 i:nth-child(3) { grid-column: 2; grid-row: 2; }
.dice-die.d5 i:nth-child(4) { grid-column: 1; grid-row: 3; }
.dice-die.d5 i:nth-child(5) { grid-column: 3; grid-row: 3; }
.dice-die.d6 i:nth-child(1) { grid-column: 1; grid-row: 1; }
.dice-die.d6 i:nth-child(2) { grid-column: 3; grid-row: 1; }
.dice-die.d6 i:nth-child(3) { grid-column: 1; grid-row: 2; }
.dice-die.d6 i:nth-child(4) { grid-column: 3; grid-row: 2; }
.dice-die.d6 i:nth-child(5) { grid-column: 1; grid-row: 3; }
.dice-die.d6 i:nth-child(6) { grid-column: 3; grid-row: 3; }
.dice-die.hidden {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  place-items: center;
  padding: 0;
  background:
    radial-gradient(circle at 50% 36%, rgba(255,255,255,0.18), transparent 28%),
    linear-gradient(160deg, #5b3422, #24120c);
  color: #ffe1b0;
  font-size: 20px;
  font-weight: 900;
  border: 1px solid rgba(255,210,150,0.28);
}
.dice-log {
  margin-top: 12px;
  max-height: 220px;
}
.dice-modal {
  width: 430px;
}
.dice-peek-modal {
  width: 360px;
  text-align: center;
}
.dice-peek-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.dice-rules p {
  margin: 7px 0;
  color: #cdd6e0;
  font-size: 14px;
  line-height: 1.55;
}
@media (max-width: 760px) {
  .dice-app { padding: 8px 8px 44px; }
  .dice-entry { padding: 34px 14px 50px; }
  .dice-current { font-size: 20px; }
  .dice-hero { padding: 10px; border-radius: 10px; }
  .dice-lastbid { min-height: 34px; font-size: 13px; }
  .dice-controls {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .dice-count-pick { justify-content: flex-start; }
  .dice-count-btn {
    min-width: 42px;
    height: 38px;
  }
  .dice-face-pick { justify-content: space-between; }
  .dice-face-btn {
    width: calc((100vw - 58px) / 6);
    max-width: 52px;
    height: 44px;
  }
  .dice-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dice-actions .btn {
    width: 100%;
  }
  #diceBtnNext {
    grid-column: 1 / -1;
  }
  .dice-players {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .dice-player {
    min-height: 118px;
    padding: 10px;
  }
  .dice-die {
    width: 38px;
    height: 38px;
    padding: 6px;
  }
  .dice-die i {
    width: 6px;
    height: 6px;
  }
  .dice-cup-row {
    justify-content: flex-start;
    min-height: 46px;
    margin-top: 10px;
  }
}

/* ===== 梦幻炸金花 ===== */
.home-card.dream:hover { border-color: #b06fd8; }
.home-card.gande:hover { border-color: #4aa3d8; }
.home-card.guandan:hover { border-color: #f0c35a; }
.home-card.mine:hover { border-color: #ff6b5f; }
.home-card.dice:hover { border-color: #8bc8ff; }
.home-card.draw:hover { border-color: #ff98c8; }
.home-card.billiards:hover { border-color: #65d0a4; }
.home-card.vampire:hover { border-color: #b88cff; }
.home-card.starbud:hover { border-color: #9eea76; }

/* ===== 桌球 ===== */
.pool-mode-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.pool-mode-row#poolAiRow,
.pool-mode-row.pool-ai-levels {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.pool-mode-btn,
.pool-ai-btn {
  min-height: 42px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: #d9e7ef;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}
.pool-mode-btn:hover,
.pool-ai-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(137,221,178,0.5);
}
.pool-mode-btn.active,
.pool-ai-btn.active {
  background: linear-gradient(180deg, #2f875b, #205f43);
  border-color: rgba(148,232,186,0.72);
  color: #f2fff7;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 8px 18px rgba(25,104,68,0.28);
}
.pool-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: #8193a2;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}
.pool-divider::before,
.pool-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.1);
}
.lobby-status {
  min-height: 20px;
  margin-top: 10px;
  color: #a8bac7;
  font-size: 13px;
  text-align: center;
  line-height: 1.4;
}
.lobby-back {
  display: block;
  margin-top: 18px;
  color: #91a8b8;
  text-align: center;
  text-decoration: none;
  font-size: 13px;
}
.lobby-back:hover { color: var(--gold); }

.pool-room-seats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 14px;
}
.pool-seat {
  min-height: 68px;
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.055);
  color: #e8f1f6;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}
.pool-seat.empty {
  border-style: dashed;
  color: #7f909e;
  font-weight: 700;
}
.pool-host-controls {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.pool-host-controls .btn { width: 100%; }
.pool-host-title {
  color: #a8bac7;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  margin-top: 4px;
}

.pool-game {
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(68,93,108,0.24), transparent 42%),
    linear-gradient(180deg, #121820 0%, #090c10 100%);
}
.pool-topbar {
  position: relative;
  z-index: 12;
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(12,17,22,0.92);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 10px 24px rgba(0,0,0,0.32);
}
.pool-hud {
  min-width: 0;
  color: #dfeaf0;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  line-height: 1.35;
}
.pool-hud b { color: #ffe8a6; }
/* 快捷聊天 */
.pool-topbar-right { display: flex; align-items: center; gap: 8px; }
.pool-chat-btn { font-size: 16px; padding: 8px 10px; }
.pool-chat-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(12,17,22,0.96);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 14px 34px rgba(0,0,0,0.5);
  max-width: 320px;
}
.pool-chat-item {
  border: 1px solid rgba(255,255,255,0.12);
  background: #1d2733;
  color: #dfe8f0;
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.pool-chat-item:active { background: #2b3a4a; }
/* 聊天气泡：浮在球台上方 */
.pool-bubbles {
  position: absolute;
  z-index: 20;
  top: 8px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}
.pool-bubble {
  max-width: 70%;
  padding: 7px 12px;
  border-radius: 14px;
  background: rgba(16,22,30,0.92);
  border: 1px solid rgba(255,255,255,0.16);
  color: #eef4fa;
  font-size: 13px;
  line-height: 1.35;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
  transition: opacity 0.6s;
}
.pool-bubble b { color: #ffd34d; margin-right: 6px; font-size: 12px; }
.pool-bubble.left { align-self: flex-start; margin-left: 10px; }
.pool-bubble.right { align-self: flex-end; margin-right: 10px; }
.pool-bubble.mid { align-self: center; opacity: 0.95; }
.pool-bubble.fade { opacity: 0; }
/* 顶栏计分板：双方名字 + 实时比分，高亮当前回合方 */
.pool-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.2;
}
.pool-score-side {
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #8fa2b3;
  font-size: 12px;
  font-weight: 700;
}
.pool-score-side.active { color: #ffd34d; }
.pool-score-side.active::before { content: '● '; font-size: 8px; vertical-align: 1px; }
.pool-score-num {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
}
.pool-score-num i { font-style: normal; color: #6d7f8f; margin: 0 4px; }
.pool-hud-sub {
  font-size: 11px;
  color: #9ab0c0;
  line-height: 1.3;
  margin-top: 1px;
}
.pool-hud-target {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #ffffff !important;
}
.pool-spin-btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  cursor: pointer;
}
.pool-spin-btn:hover { background: rgba(255,255,255,0.14); }
.pool-spin-btn canvas {
  width: 34px;
  height: 34px;
  display: block;
}
.pool-canvas-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  touch-action: none;
  user-select: none;
}
#poolCanvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}
.pool-power-wrap {
  position: absolute;
  z-index: 10;
  left: 8px;               /* 力度条在左（参考主流台球布局） */
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  padding: 7px 6px;
  border-radius: 999px;
  background: rgba(9,13,18,0.76);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}
.pool-power-bar {
  position: relative;
  width: 26px;
  height: min(52vh, 340px);
  min-height: 180px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(180deg, #24313c, #111820);
  border: 1px solid rgba(255,255,255,0.18);
  touch-action: none;
}
.pool-power-fill {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;              /* 顶部锚定：手指往下滑，力道槽跟着从上往下涨 */
  height: 0;
  background: linear-gradient(180deg, #ffdf6d, #f1873d 55%, #d6422b 100%);
  border-radius: inherit;
  box-shadow: 0 0 18px rgba(255,154,72,0.36);
}
/* 角度微调刻度尺：上下拖动细调瞄准角，刻度跟随手指滚动 */
.pool-ruler {
  position: absolute;
  z-index: 10;
  right: 8px;              /* 瞄准刻度尺在右 */
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: min(58vh, 400px);
  border-radius: 999px;
  background: linear-gradient(90deg, #303c48, #131a22);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  overflow: hidden;
  touch-action: none;
  cursor: ns-resize;
}
.pool-ruler-track {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(180deg, rgba(255,255,255,0.60) 0 2px, transparent 2px 36px),
    repeating-linear-gradient(180deg, rgba(255,255,255,0.22) 0 1px, transparent 1px 9px);
}
.pool-ruler-pointer {
  position: absolute;
  left: 1px;
  top: 50%;
  transform: translateY(-50%);
  color: #ffd34d;
  font-size: 13px;
  text-shadow: 0 0 6px rgba(0,0,0,0.8);
  pointer-events: none;
}
.pool-spin-modal {
  text-align: center;
}
#poolSpinBig {
  display: block;
  margin: 0 auto 14px;
  max-width: 100%;
  touch-action: none;
}

@media (max-width: 720px) {
  .pool-topbar {
    grid-template-columns: auto 1fr auto;
    min-height: 54px;
    padding: 8px;
    gap: 6px;
  }
  .pool-topbar .ctr-btn {
    padding: 8px 10px;
    font-size: 12px;
  }
  .pool-hud {
    font-size: 12px;
  }
  .pool-spin-btn {
    width: 42px;
    height: 42px;
  }
  .pool-power-wrap {
    left: 4px;
    padding: 5px 4px;
  }
  .pool-power-bar {
    width: 21px;
    height: min(50vh, 320px);
    min-height: 150px;
  }
  .pool-ruler {
    right: 4px;
    width: 26px;
    height: min(52vh, 340px);
  }
  .pool-room-seats {
    grid-template-columns: 1fr;
  }
}

/* ===== 暗夜幸存者 ===== */
.survivor-app {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 10px 28px;
  min-height: 100vh;
}
.survivor-topbar {
  margin-bottom: 10px;
}
.survivor-stage {
  position: relative;
  height: calc(100vh - 92px);
  min-height: 560px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  background: #070b12;
  box-shadow: 0 18px 44px rgba(0,0,0,0.45);
}
#svCanvas {
  width: 100%;
  height: 100%;
  display: block;
}
.survivor-hud {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  pointer-events: none;
}
.sv-bars {
  width: min(420px, 58vw);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.sv-bar {
  position: relative;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.14);
}
.sv-bar span {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}
.sv-bar b {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #d74552, #ff8a6a);
  transition: width 0.15s linear;
}
.sv-bar.xp b {
  width: 0;
  background: linear-gradient(90deg, #4ba3ff, #71f2ff);
}
.sv-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.sv-tags span {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.12);
  color: #dbe9ff;
  font-size: 12px;
  font-weight: 800;
}
.survivor-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 120;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(5,8,14,0.68);
}
.survivor-overlay.show {
  display: flex;
}
.survivor-panel {
  width: min(430px, 92vw);
  padding: 24px;
  border-radius: 14px;
  text-align: center;
  background: linear-gradient(160deg, rgba(30,37,50,0.96), rgba(13,18,27,0.98));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 20px 70px rgba(0,0,0,0.62);
}
.survivor-panel h2 {
  color: var(--gold);
  font-size: 28px;
  margin-bottom: 14px;
}
.sv-hero-mark {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  margin: 6px auto 18px;
  border-radius: 50%;
  color: #d8e5ff;
  font-size: 48px;
  background: radial-gradient(circle at 35% 30%, #7a88bd, #222942 72%);
  box-shadow: 0 0 34px rgba(122,136,189,0.35);
}
.sv-name-field {
  display: block;
  text-align: left;
  margin: 0 auto 10px;
}
.sv-name-field span {
  display: block;
  color: #9fb0c0;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 5px;
}
.sv-name-field input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 9px;
  color: #eef5ff;
  background: #0f141b;
  border: 1px solid rgba(255,255,255,0.16);
  font-size: 15px;
  outline: none;
}
.sv-name-field input:focus {
  border-color: rgba(232,196,104,0.65);
  box-shadow: 0 0 0 3px rgba(232,196,104,0.12);
}
.sv-profile-status {
  min-height: 34px;
  margin-bottom: 10px;
  color: #9fb0c0;
  font-size: 12px;
  line-height: 1.45;
}
.sv-account-box {
  display: grid;
  gap: 7px;
  margin: 0 0 12px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  text-align: left;
}
.sv-account-title {
  color: #ffe0a3;
  font-size: 12px;
  font-weight: 900;
}
.sv-account-box input {
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
  border-radius: 8px;
  color: #eef5ff;
  background: #0f141b;
  border: 1px solid rgba(255,255,255,0.14);
  font-size: 14px;
  outline: none;
}
.sv-account-box input:focus {
  border-color: rgba(93,180,255,0.55);
  box-shadow: 0 0 0 3px rgba(93,180,255,0.12);
}
.sv-account-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.sv-account-actions .btn {
  width: 100%;
  min-height: 38px;
  margin-top: 0;
  padding: 8px 10px;
  font-size: 13px;
}
.sv-meta-shop {
  margin: 0 0 12px;
  padding: 10px;
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(232,196,104,0.08), rgba(93,180,255,0.05));
  border: 1px solid rgba(232,196,104,0.18);
  text-align: left;
}
.sv-meta-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.sv-meta-head b {
  color: var(--gold);
  font-size: 14px;
}
.sv-meta-head span {
  color: #ffe0a3;
  font-size: 13px;
  font-weight: 900;
}
.sv-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.sv-meta-card {
  min-height: 74px;
  padding: 8px;
  border-radius: 8px;
  color: #eaf3ff;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  text-align: left;
}
.sv-meta-card:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.sv-meta-card b {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  color: #eef6ff;
  font-size: 13px;
  margin-bottom: 4px;
}
.sv-meta-card em {
  color: #8fd0ff;
  font-style: normal;
  white-space: nowrap;
}
.sv-meta-card span {
  display: block;
  color: #9fb0c0;
  font-size: 11px;
  line-height: 1.35;
}
.sv-meta-card i {
  display: block;
  margin-top: 5px;
  color: #ffe0a3;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}
.sv-secondary {
  margin-top: 8px;
  background: linear-gradient(180deg, #2b3544, #18202b);
  color: #e8f2ff;
  border: 1px solid rgba(255,255,255,0.14);
}
.sv-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.sv-leaderboard {
  margin-top: 16px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.08);
  text-align: left;
}
.sv-leaderboard b {
  display: block;
  color: var(--gold);
  font-size: 14px;
  margin-bottom: 8px;
}
.sv-leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #b9c6d8;
  font-size: 12px;
}
.sv-rank-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 28px;
  padding: 5px 7px;
  border-radius: 7px;
  background: rgba(255,255,255,0.05);
}
.sv-rank-row.me {
  border: 1px solid rgba(232,196,104,0.5);
  background: rgba(232,196,104,0.09);
}
.sv-rank-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #eef5ff;
  font-weight: 800;
}
.sv-rank-score {
  color: #ffe0a3;
  font-weight: 900;
  white-space: nowrap;
}
.survivor-panel.level {
  width: min(720px, 94vw);
}
.sv-upgrades {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.sv-upgrade {
  position: relative;
  min-height: 132px;
  padding: 14px;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  color: #f7fbff;
  background: linear-gradient(160deg, rgba(42,50,68,0.95), rgba(18,24,35,0.98));
  border: 1px solid rgba(232,196,104,0.28);
  border-left-width: 4px;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.sv-upgrade:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.sv-rarity {
  display: inline-block;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 2px 8px;
  margin-bottom: 8px;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: rgba(0,0,0,0.25);
}
.sv-rar-common { border-left-color: #9fb2c8; }
.sv-rar-rare   { border-left-color: #5db4ff; box-shadow: 0 0 12px rgba(93,180,255,0.18); }
.sv-rar-epic   { border-left-color: #c47bff; box-shadow: 0 0 18px rgba(196,123,255,0.28); }
.sv-rar-evo    { border-left-color: #ffce4f; box-shadow: 0 0 24px rgba(255,206,79,0.34); }
.sv-rar-epic:hover { border-color: #c47bff; }
.sv-rar-evo:hover { border-color: #ffce4f; }
.sv-upgrade b {
  display: block;
  color: #ffe0a3;
  font-size: 16px;
  margin-bottom: 8px;
}
.sv-upgrade span {
  color: #b9c6d8;
  font-size: 13px;
  line-height: 1.5;
}
.sv-final {
  color: #dbe9ff;
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 16px;
  font-weight: 800;
}
.sv-joystick {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 5;
  width: 112px;
  height: 112px;
  display: none;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  touch-action: none;
}
.sv-joystick i {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(232,196,104,0.86);
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}
@media (max-width: 760px) {
  .survivor-app { padding: 8px; }
  .survivor-topbar h1 { font-size: 18px; }
  .survivor-stage {
    height: calc(100vh - 84px);
    min-height: 520px;
    border-radius: 10px;
  }
  .sv-tags { display: none; }
  .sv-bars { width: calc(100vw - 40px); }
  .sv-joystick { display: grid; }
  .sv-upgrades { grid-template-columns: 1fr; }
  .survivor-panel { padding: 20px; }
}

/* ===== 你画我猜 ===== */
.draw-app {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 12px 60px;
  min-height: 100vh;
}
.draw-status {
  margin: 14px 0 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: linear-gradient(160deg, rgba(36,43,55,0.94), rgba(14,18,25,0.96));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
}
.draw-kicker {
  color: #8fa2b4;
  font-size: 12px;
  margin-bottom: 3px;
}
.draw-drawer {
  color: #ffe0a3;
  font-size: 24px;
  font-weight: 900;
}
.draw-word {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #eaf3ff;
  font-size: 16px;
  font-weight: 900;
}
.draw-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.draw-actions .btn {
  padding: 10px 16px;
}
.draw-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 12px;
  align-items: start;
}
.draw-waiting {
  display: none;
  background: #121821;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.22);
}
.draw-waiting-main h2 {
  color: var(--gold);
  font-size: 20px;
  margin-bottom: 6px;
}
.draw-waiting-main p {
  color: #9fb0c0;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 14px;
}
.draw-waiting-players {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.draw-waiting-player {
  min-height: 54px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}
.draw-waiting-player.you {
  border-color: rgba(143,200,255,0.4);
}
.draw-waiting-player span {
  color: #eef5ff;
  font-size: 14px;
  font-weight: 800;
  word-break: break-word;
}
.draw-waiting-player b {
  color: #ffe0a3;
  white-space: nowrap;
}
.draw-board-panel,
.draw-card {
  background: #121821;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.22);
}
.draw-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.draw-color {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c);
  border: 2px solid rgba(255,255,255,0.4);
  cursor: pointer;
}
.draw-color.active {
  box-shadow: 0 0 0 2px var(--gold), 0 0 14px rgba(232,196,104,0.35);
}
.draw-size {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #9fb0c0;
  font-size: 13px;
}
.draw-size input {
  width: 120px;
  accent-color: var(--gold);
}
.draw-eraser.active {
  background: #f3f6fa;
  color: #111820;
  border-color: #fff;
}
.draw-canvas-wrap {
  position: relative;
  height: min(62vh, 620px);
  min-height: 430px;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  background: #fbfcff;
  touch-action: none;
}
#drawCanvas {
  width: 100%;
  height: 100%;
  display: block;
  background: #fbfcff;
  cursor: crosshair;
}
.draw-canvas-hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  color: #94a3b8;
  font-size: 16px;
  font-weight: 800;
}
.draw-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.draw-card {
  padding: 12px;
}
.draw-card h2 {
  color: var(--gold);
  font-size: 16px;
  margin-bottom: 10px;
}
.draw-players {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* 桌面端：侧栏整体不超过视口，人多时玩家列表内部滚动，猜词框始终在首屏 */
@media (min-width: 861px) {
  .draw-side { max-height: calc(100vh - 175px); }
  .draw-side > .draw-card:first-child { display: flex; flex-direction: column; min-height: 150px; }
  .draw-players { flex: 1; min-height: 0; overflow-y: auto; }
  .draw-guess-card { flex: none; }
}
.draw-player {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}
.draw-player.drawer {
  border-color: var(--gold);
  background: rgba(232,196,104,0.11);
}
.draw-player.you {
  box-shadow: inset 0 0 0 1px rgba(143,200,255,0.25);
}
.draw-player.offline, .draw-waiting-player.offline { opacity: 0.5; }
/* 房主踢人按钮 */
.draw-kick {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(224,91,91,0.5);
  background: rgba(224,91,91,0.15);
  color: #e88;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.draw-kick:hover { background: rgba(224,91,91,0.35); color: #fff; }
/* 观战席 */
.draw-watchers { margin-top: 8px; color: #9ab3d0; font-size: 12px; line-height: 1.5; }
.draw-waiting-player.watcher { opacity: 0.8; }
.draw-waiting-player.watcher span { color: #9ab3d0; font-weight: 600; }
.draw-player-name {
  font-size: 14px;
  font-weight: 800;
  color: #eef5ff;
  word-break: break-word;
}
.draw-player-score {
  color: #ffe0a3;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.draw-guess-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
}
.draw-chat {
  flex: 1;
  min-height: 210px;
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
  border-radius: 9px;
  background: #0f141b;
  border: 1px solid rgba(255,255,255,0.06);
}
.draw-chat-line {
  padding: 5px 0;
  color: #cdd8e4;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}
.draw-chat-line.correct {
  color: #7df0a6;
  font-weight: 900;
}
.draw-chat-line.scoped { color: #9ab3d0; font-style: italic; }   /* 已猜中者小圈聊天 */
.draw-chat-line.close { color: #f0a35b; font-weight: 800; }      /* 仅自己可见的"很接近"提示 */
/* 大厅聊天卡片 */
.draw-wait-chat-card { margin-top: 18px; text-align: left; }
.draw-wait-chat-card .draw-chat { max-height: 180px; min-height: 90px; overflow-y: auto; }
/* 画手三选一 */
.draw-choose {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(10,14,20,0.55);
  border-radius: inherit;
  z-index: 5;
}
.draw-choose-title { color: #ffe8a6; font-weight: 800; font-size: 16px; }
.draw-choose-sub { color: #b8c5d4; font-size: 12px; margin-top: -6px; }
.draw-choose-btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.draw-choose-btn { font-size: 17px; padding: 12px 22px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.draw-choose-stars { font-style: normal; font-size: 11px; line-height: 1; }
/* 答案揭晓浮层：盖在画作上，展示答案+本轮得分+自动下一轮倒计时 */
.draw-reveal {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px;
  text-align: center;
  background: rgba(10,14,20,0.72);
  border-radius: inherit;
  z-index: 5;
}
.draw-reveal-word { color: #eaf3ff; font-size: 17px; font-weight: 800; }
.draw-reveal-word b { color: #ffd34d; font-size: 26px; margin-left: 4px; }
.draw-reveal-gains { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 92%; }
.draw-reveal-gain {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(125,240,166,0.14);
  color: #7df0a6;
  font-size: 14px;
  font-weight: 800;
}
.draw-reveal-gain.you { box-shadow: 0 0 0 1px rgba(255,211,77,0.7); color: #ffd34d; background: rgba(255,211,77,0.12); }
.draw-reveal-gain.none { background: rgba(255,255,255,0.08); color: #9fb0c0; }
.draw-reveal-count { color: #9fb0c0; font-size: 13px; }
.draw-reveal-count span { color: #ffe8a6; font-weight: 900; }
/* 揭晓时给画作点赞（画手每个赞 +1 分） */
.draw-like-btn {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.1);
  color: #eaf3ff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.draw-like-btn:disabled { opacity: 0.75; cursor: default; }
.draw-like-btn.liked {
  background: rgba(232,196,104,0.2);
  border-color: rgba(255,211,77,0.7);
  color: #ffd34d;
}
/* 玩家列表里的本轮加分徽标 */
.draw-player-gain { margin-left: 6px; font-style: normal; color: #7df0a6; font-weight: 900; font-size: 12px; }
/* 房间语音开关（各联机游戏通用）：加在游戏自己的按钮类上，on/off 由 voice.js 切换 */
.voice-btn { position: relative; cursor: pointer; transition: background 0.15s, box-shadow 0.15s; }
.voice-btn.on {
  background: rgba(63,185,106,0.25);
  border-color: rgba(125,240,166,0.7);
  box-shadow: 0 0 8px rgba(125,240,166,0.35);
}
.voice-btn.off { opacity: 0.75; }
.voice-btn.off::after {
  content: '';
  position: absolute;
  left: 7px;
  right: 7px;
  top: 50%;
  height: 2px;
  background: #e05b5b;
  transform: rotate(-45deg);
  border-radius: 2px;
  pointer-events: none;
}
.pool-lobby-voice { display: flex; justify-content: center; gap: 10px; margin: 6px 0; }
/* 房间语音：话筒/听筒开关 */
.draw-voice { display: flex; gap: 8px; }
.draw-voice-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  font-size: 18px;
  cursor: pointer;
  position: relative;
  transition: background 0.15s, box-shadow 0.15s;
}
.draw-voice-btn.on {
  background: rgba(63,185,106,0.25);
  border-color: rgba(125,240,166,0.7);
  box-shadow: 0 0 10px rgba(125,240,166,0.35);
}
.draw-voice-btn.off { opacity: 0.75; }
.draw-voice-btn.off::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: 2px;
  background: #e05b5b;
  transform: rotate(-45deg);
  border-radius: 2px;
}
.draw-voice-badge { font-style: normal; font-size: 11px; opacity: 0.85; }
/* 终局排行 */
.draw-final-best { color: #ffd9e8; font-size: 14px; margin: 4px 0 2px; }
.draw-final-best b { color: #ffd34d; }
.draw-final-rank { margin: 6px 0 4px; }
/* 设置里的自定义词库 */
.draw-set-custom { flex-direction: column; align-items: stretch; gap: 6px; }
.draw-set-custom textarea {
  width: 100%;
  resize: vertical;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.18);
  background: #0f141b;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
}
.draw-final-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 15px;
}
.draw-final-row.you { color: #ffd34d; font-weight: 800; }
.draw-final-row b { color: #ffe8a6; }
.draw-guess-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.draw-guess-row input {
  min-width: 0;
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.18);
  background: #0f141b;
  color: #fff;
  font-size: 15px;
}
.draw-modal {
  width: 400px;
}
/* 手机：单屏布局 —— 画布/玩家/猜词/输入框全部塞进一屏，不再上下滑 */
@media (max-width: 860px) {
  .draw-app {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    padding: 6px 8px 8px;
    gap: 6px;
    overflow: hidden;
  }
  .draw-app .topbar { flex: none; padding: 6px 10px; gap: 6px; border-radius: 10px; }
  .draw-app .topbar h1 { display: none; }
  .draw-app .topbar-info { width: 100%; justify-content: space-between; gap: 8px; font-size: 12px; }
  .draw-app .btn-settings { padding: 5px 8px; font-size: 12px; }
  .draw-status { flex: none; margin: 0; padding: 7px 10px; border-radius: 10px; gap: 8px; }
  .draw-kicker { display: none; }
  .draw-drawer { font-size: 15px; }
  .draw-word { min-height: 34px; flex: 1; padding: 6px 10px; font-size: 13px; border-radius: 10px; }
  .draw-actions .btn { padding: 8px 12px; font-size: 13px; }
  .draw-voice { gap: 6px; }
  .draw-voice-btn { width: 34px; height: 34px; font-size: 15px; }
  .draw-waiting { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; border-radius: 10px; }
  .draw-waiting-players { grid-template-columns: 1fr; }
  .draw-layout { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
  .draw-board-panel { flex: none; }
  .draw-canvas-wrap { height: 42dvh; min-height: 170px; }
  .draw-toolbar { gap: 6px; padding: 6px 8px; }
  .draw-color { width: 26px; height: 26px; }
  .draw-size input { width: 70px; }
  .draw-side { flex: 1; min-height: 0; gap: 6px; }
  .draw-card { padding: 8px; }
  .draw-card h2 { display: none; }
  /* 排序：输入框紧贴画布下方 → 聊天 → 玩家条放最底（键盘弹起挡住也不影响操作） */
  .draw-side > .draw-card { order: 2; }
  .draw-side > .draw-guess-card { order: 1; }
  .draw-guess-card .draw-guess-row { order: -1; margin: 0 0 6px; }
  /* 玩家横向滑动一行（人多左右划，不换行不挤占竖向空间） */
  .draw-players { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
  .draw-player { flex: none; min-height: 0; padding: 5px 10px; white-space: nowrap; gap: 6px; border-radius: 999px; }
  .draw-player-name { font-size: 12px; }
  .draw-player-score { font-size: 12px; }
  .draw-guess-card { flex: 1; min-height: 0; }
  .draw-chat { flex: 1; min-height: 0; max-height: none; }
  .draw-chat-line { font-size: 13px; padding: 4px 0; }
  .draw-guess-row { margin-top: 6px; }
  .draw-guess-row .btn { padding: 10px 12px; }
  .draw-choose-btn { font-size: 15px; padding: 10px 16px; }
  .draw-reveal-word b { font-size: 22px; }
}

.dream-center {
  display: flex; justify-content: center; gap: 30px; flex-wrap: wrap;
  padding: 16px; margin: 10px 0; background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07); border-radius: 14px;
}
.dream-label { font-size: 12px; color: #9ab; margin-bottom: 6px; text-align: center; }
.dream-public, .dream-mine { display: flex; flex-direction: column; align-items: center; }
.dream-public .card, .dream-mine .card { width: 64px; height: 90px; }
.dream-public .card .rank { font-size: 26px; } .dream-public .card .suit { font-size: 22px; }
.dream-mine .card .rank { font-size: 26px; } .dream-mine .card .suit { font-size: 22px; }
.dream-best { margin-top: 8px; font-size: 14px; color: #cdd; }
.dream-type { color: #d8a23a; font-weight: 800; }
.dream-players { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px; }
.dream-player {
  min-width: 86px; padding: 8px 10px; border-radius: 10px; text-align: center;
  background: linear-gradient(165deg, rgba(33,44,37,0.8), rgba(14,20,16,0.8));
  border: 1px solid rgba(255,255,255,0.08);
}
.dream-player.banker { border-color: var(--gold); }
.dream-player.selected { box-shadow: 0 0 0 2px rgba(176,111,216,0.6); }
.dream-player.me { background: rgba(212,175,55,0.1); }
.dream-player.off { opacity: 0.45; }
.dp-name { font-weight: 600; font-size: 13px; }
.dp-tags { display: flex; gap: 3px; justify-content: center; flex-wrap: wrap; margin-top: 3px; }
.dp-tag { font-size: 10px; padding: 1px 5px; border-radius: 6px; }
.dp-tag.banker { background: #5a4a1a; color: #ffe9a8; }
.dp-tag.sel { background: #3a2a4a; color: #e0c0ff; }
.dp-tag.ok { background: #2b4b34; color: #c9f0d6; }
.dp-tag.wait { background: #5b3a2a; color: #ffd0b0; }
.dp-pend { font-size: 11px; color: #ff9d5c; margin-top: 3px; }
.dream-phase { margin: 14px 12px 30px; padding: 14px; background: #161b22; border-radius: 12px; border: 1px solid rgba(255,255,255,0.07); }
.dream-hint { font-size: 14px; color: #dfe; line-height: 1.6; margin-bottom: 10px; }
.dream-pick, .dream-kou { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ctr-btn.pick.on { background: #5a3a7a; border-color: #b06fd8; color: #fff; }
.dream-reveal .rv-banker { font-size: 15px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rv-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-top: 1px dashed rgba(255,255,255,0.08); font-size: 14px; }
.rv-name { font-weight: 600; min-width: 56px; }
.rv-best { color: var(--gold); }
.rv-kou { color: #9ab; font-size: 13px; }
.rv-win { color: #6ee7a0; font-weight: 700; }
.rv-lose { color: #ff9d5c; font-weight: 700; }
.rv-verdict { margin: 12px 0; font-size: 15px; font-weight: 700; color: #ffe3b0; }
.dream-reveal .card, .rv-row .card { width: 38px; height: 54px; }
.rv-row .card .rank { font-size: 16px; } .rv-row .card .suit { font-size: 13px; }

.dp-tag.ai { background: #2a3f5a; color: #9fd0ff; }
.dp-tag.kou { background: #4a3a1a; color: #ffd98a; }
.pick-kou { font-size: 11px; color: #ffd98a; margin-left: 4px; }

/* ===== 梦幻炸金花 · 围桌 ===== */
.dream-table { margin-top: 22px; height: clamp(380px, 58vh, 580px); }
.dream-table .board-area { gap: 6px; }
#dPublicCard .card { width: 56px; height: 78px; }
#dPublicCard .card .rank { font-size: 22px; } #dPublicCard .card .suit { font-size: 18px; }
.dream-seat { width: 96px; }
.dream-seat .seat-cards { position: relative; justify-content: center; }
.dream-seat .card { width: 40px; height: 56px; }
.dream-seat .card .rank { font-size: 16px; } .dream-seat .card .suit { font-size: 13px; }
.dream-seat .seat-info { min-width: 70px; padding: 4px 9px; }
.dream-seat .seat-name { font-size: 12px; }
.dream-seat.banker .seat-info { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.dream-seat.picked .seat-info { box-shadow: 0 0 0 2px #b06fd8, 0 0 14px rgba(176,111,216,0.65); }
.dream-seat.selectable { cursor: pointer; }
.dream-seat.selectable:hover .seat-info { box-shadow: 0 0 0 2px #b06fd8; }
.dream-seat.off { opacity: 0.45; }
.dream-chip {
  position: absolute; right: -12px; top: -6px;
  background: linear-gradient(180deg, #e2b34a, #a8741a); color: #2a1c00;
  font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 12px;
  border: 2px solid #fff3d0; box-shadow: 0 2px 6px rgba(0,0,0,0.55); white-space: nowrap; z-index: 2;
}
.seat-best { font-size: 12px; color: var(--gold); margin-top: 2px; }
.seat-rvres { font-size: 12px; font-weight: 800; margin-top: 2px; }
.seat-rvres.win { color: #6ee7a0; } .seat-rvres.lose { color: #ff9d5c; }
.dream-center-result { text-align: center; margin-top: 6px; min-height: 22px; }
.dcr-verdict { font-size: 15px; font-weight: 800; color: #ffe3b0; }
.dcr-verdict.rotate { color: #6ee7a0; }
.dream-actbtns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 720px) {
  .dream-table { height: clamp(420px, 62vh, 600px); }
  .dream-seat { width: 78px; }
  .dream-seat .card { width: 32px; height: 45px; }
  .dream-seat .card .rank { font-size: 13px; } .dream-seat .card .suit { font-size: 11px; }
  .dream-seat .seat-info { min-width: 58px; padding: 3px 6px; }
  .dream-seat .seat-name { font-size: 11px; }
  .dream-chip { font-size: 10px; padding: 1px 5px; right: -8px; }
  #dPublicCard .card { width: 46px; height: 64px; }
}

/* ===== 干瞪眼 ===== */
.gande-table { margin-top: 14px; height: clamp(330px, 44vh, 460px); }
.gande-seat { width: 108px; display: flex; flex-direction: column; align-items: center; gap: 0; }

/* 本墩出了什么牌 / 不要（停留在座位旁） */
.gs-actrow { min-height: 40px; display: flex; align-items: flex-end; justify-content: center; }
.gs-act { display: inline-flex; gap: 2px; align-items: center; }
.gs-act.pass { background: rgba(70,76,86,0.95); color: #c8d0d8; font-size: 12px; font-weight: 800;
  padding: 2px 10px; border-radius: 11px; box-shadow: 0 2px 6px rgba(0,0,0,0.5); }
.gs-act.play { background: rgba(0,0,0,0.35); padding: 3px 4px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.gs-act.play.pop { animation: gande-pop 0.45s cubic-bezier(.2,1.3,.5,1) backwards; }
@keyframes gande-pop { 0% { opacity: 0; transform: translateY(-16px) scale(0.6); } 100% { opacity: 1; transform: none; } }
.gs-act-empty { min-height: 1px; }
.card.tiny { width: 24px; height: 34px; border-radius: 4px; }
.card.tiny .rank { font-size: 12px; } .card.tiny .suit { font-size: 9px; }

/* 扇形背牌：有几张展开几张 */
.gs-cardsrow { position: relative; min-height: 48px; display: flex; align-items: center; justify-content: center; }
.gs-fanwrap { position: relative; display: inline-block; }
.gs-fan { position: relative; display: inline-block; width: 60px; height: 44px; }
.gs-fan .card.back.fan { position: absolute; left: 50%; bottom: 0; margin-left: -12px;
  width: 24px; height: 34px; border-width: 1px; transform-origin: bottom center; box-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.gs-cnt { position: absolute; right: -6px; bottom: -4px; background: rgba(0,0,0,0.8); color: #ffd86b;
  font-weight: 800; font-size: 11px; border-radius: 9px; padding: 0 6px; border: 1px solid rgba(255,255,255,0.15); }
.gs-done { color: #6ee7a0; font-weight: 800; font-size: 13px; }

.gande-seat .gs-plate { margin-top: 4px; background: linear-gradient(180deg, rgba(11,18,30,0.94), rgba(5,9,17,0.94));
  border: 1px solid rgba(255,255,255,0.12); border-radius: 11px; padding: 4px 10px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.gande-seat.turn .gs-plate { border-color: #6ee7a0; box-shadow: 0 0 14px rgba(110,240,110,0.5); animation: pulse-glow 1.2s infinite; }
.gande-seat.me .gs-plate { border-color: var(--gold); }
.gande-seat.done { opacity: 0.6; }
.gande-seat.off { opacity: 0.4; }
.gs-name { font-size: 12px; color: #dbe4ee; font-weight: 600; white-space: nowrap; }
.gs-pendtag { font-size: 11px; font-weight: 700; color: #2a1c00; background: linear-gradient(180deg,#f2c54e,#d89a22);
  border-radius: 8px; padding: 0 7px; white-space: nowrap; }

.gande-tableplay { display: flex; gap: 5px; justify-content: center; min-height: 76px; align-items: center; flex-wrap: wrap; }
.gande-tableplay .card { width: 50px; height: 70px; }
.gande-freelead { color: #9fb0c0; font-size: 15px; font-style: italic; }
.gande-tableinfo { display: flex; gap: 14px; justify-content: center; margin-top: 6px; font-size: 13px; }
.gti-by { color: #ffe3b0; font-weight: 700; }
.gti-deck { color: #9ab; }

/* 手牌区 */
.gande-handwrap { margin: 6px auto 0; max-width: 920px; padding: 0 10px; }
.gande-mymeta { text-align: center; color: #bcd; font-size: 13px; margin-bottom: 4px; }
.gande-pendtag { color: #ffb86b; font-weight: 800; }
.gande-hand { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; min-height: 84px; padding: 6px 0; }
.gande-hand .card { width: 54px; height: 78px; cursor: pointer; transition: transform 0.12s, box-shadow 0.12s; }
.gande-hand .card.sel { transform: translateY(-14px); box-shadow: 0 0 0 2px var(--gold), 0 8px 18px rgba(0,0,0,0.55); }
.gande-hand .card.joker .rank { font-size: 15px; }
.gande-spectate { color: #8a96a4; }
.gande-acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.gande-turnnote { text-align: center; color: #9fb0c0; font-size: 13px; margin-top: 6px; }
.gande-turnnote.wait { color: #7a8694; }

/* 结算 */
.gande-over { margin-top: 8px; }
.gande-result { background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; padding: 10px 16px; display: inline-block; }
.gov-title { color: var(--gold); font-weight: 800; margin-bottom: 6px; }
.gov-row { color: #cdd6e0; font-size: 14px; padding: 2px 0; }
.gov-row.win { color: #6ee7a0; font-weight: 800; }
.gande-result .btn { margin-top: 8px; }
.gande-rules p { margin: 6px 0; color: #cdd6e0; font-size: 14px; line-height: 1.5; }

.gande-toast { position: fixed; left: 50%; bottom: 16%; transform: translateX(-50%) translateY(10px);
  background: rgba(0,0,0,0.86); color: #fff; padding: 9px 18px; border-radius: 22px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 99; border: 1px solid rgba(255,255,255,0.14); }
.gande-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 720px) {
  /* 顶栏紧凑 */
  #ggRoomScreen .topbar { padding: 8px 10px; }
  #ggRoomScreen .topbar h1 { font-size: 18px; }
  #ggRoomScreen .topbar .btn-settings { padding: 4px 9px; font-size: 12px; }

  /* 牌桌：拉高一点，给环形座位留够纵向空间，避免与中央出牌区重叠 */
  .gande-table { margin-top: 8px; height: clamp(360px, 46vh, 440px); }

  /* —— 座位整体压缩 —— */
  .gande-seat { width: 60px; }
  .gs-actrow { min-height: 28px; }
  .card.tiny { width: 18px; height: 26px; border-radius: 3px; }
  .card.tiny .rank { font-size: 10px; } .card.tiny .suit { font-size: 7px; }
  .gs-act.pass { font-size: 10px; padding: 1px 6px; border-radius: 9px; }
  .gs-act.play { padding: 2px 3px; gap: 1px; }

  /* 扇形背牌缩小 */
  .gs-cardsrow { min-height: 32px; }
  .gs-fan { width: 40px; height: 28px; }
  .gs-fan .card.back.fan { width: 16px; height: 24px; margin-left: -8px; }
  .gs-cnt { font-size: 9px; padding: 0 4px; right: -3px; bottom: -2px; }
  .gs-done { font-size: 11px; }

  /* 名牌缩小 */
  .gande-seat .gs-plate { margin-top: 2px; padding: 2px 6px; border-radius: 8px; }
  .gs-name { font-size: 10px; }
  .gs-pendtag { font-size: 9px; padding: 0 5px; }

  /* —— 中央出牌区缩小，腾出空间 —— */
  .board-area { gap: 4px; }
  .gande-tableplay { min-height: 52px; gap: 3px; }
  .gande-tableplay .card { width: 36px; height: 52px; }
  .gande-tableplay .card .rank { font-size: 17px; } .gande-tableplay .card .suit { font-size: 13px; }
  .gande-tableinfo { gap: 8px; font-size: 11px; margin-top: 2px; }
  .gande-freelead { font-size: 13px; }

  /* —— 底部手牌 + 操作 —— */
  .gande-handwrap { margin-top: 4px; padding: 0 6px; }
  .gande-mymeta { font-size: 12px; margin-bottom: 2px; }
  .gande-hand { gap: 4px; min-height: 66px; padding: 4px 0; }
  .gande-hand .card { width: 42px; height: 60px; }
  .gande-hand .card .rank { font-size: 16px; } .gande-hand .card .suit { font-size: 13px; }
  .gande-hand .card.sel { transform: translateY(-12px); }
  .gande-acts { gap: 6px; }
  .gande-acts .btn { padding: 9px 12px; font-size: 14px; }
  .gande-pass { padding: 9px 14px; }
  .gande-turnnote { font-size: 12px; margin-top: 4px; }

  /* 喝酒条：紧凑换行 */
  .drink-bar { flex-wrap: wrap; gap: 6px; margin-top: 8px; justify-content: center; }
  .drink-bar .ctr-btn { padding: 7px 11px; font-size: 13px; }

  #gLog { margin: 8px 6px !important; }

  /* 提示浮层移到牌桌上方，避免压住底部按钮 */
  .gande-toast { bottom: auto; top: 16%; }
}

/* 干瞪眼“不要”按钮：琥珀色，明显可点（不像禁用） */
.gande-pass { background: linear-gradient(180deg, #e6913f, #c46a1c); color: #fff; padding: 8px 18px; font-weight: 700; }
.gande-pass:hover { filter: brightness(1.08); }

/* ===== 掼蛋 ===== */
.guandan-lobby-seat { display: grid; gap: 2px; }
.guandan-lobby-seat.off { opacity: 0.72; border-color: rgba(255, 216, 107, 0.28); }
.guandan-lobby-seat b { color: var(--gold); }
.guandan-lobby-seat i { font-style: normal; color: #8fb6d8; font-size: 11px; }
.gd-seat-btn {
  justify-self: center;
  margin-top: 6px;
  border: 1px solid rgba(240, 195, 90, 0.3);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(95, 69, 28, 0.96), rgba(58, 40, 18, 0.96));
  color: #ffe7a6;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.gd-seat-btn:hover { filter: brightness(1.12); }
.gd-ai-btn {
  background: linear-gradient(180deg, #2f7d4f, #1d5a39);
  color: #f3fff7;
  border: 1px solid rgba(129, 230, 166, 0.22);
}
.gd-ai-remove {
  background: linear-gradient(180deg, #624435, #3f2b24);
  color: #ffe6d4;
  border: 1px solid rgba(255, 183, 120, 0.22);
}
.gd-hint-btn {
  background: linear-gradient(180deg, #315b86, #203d62);
  color: #eaf5ff;
  border: 1px solid rgba(139, 200, 255, 0.24);
}
.gd-actionbar .gd-action-primary {
  min-width: 128px;
}
.gd-actionbar .gd-action-pass {
  background: linear-gradient(180deg, rgba(47, 55, 66, 0.96), rgba(32, 38, 47, 0.96));
  color: #cbd5e1;
  border: 1px solid rgba(255,255,255,0.13);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.gd-actionbar .gd-action-pass:hover {
  filter: brightness(1.08);
}
.guandan-scoreline {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 8px 12px 0; color: #dbe4ee; font-size: 13px;
}
.guandan-scoreline b {
  color: #251700; background: linear-gradient(180deg, #ffe58a, #d79a20);
  border-radius: 10px; padding: 1px 9px;
}
.guandan-scoreline span { width: 1px; height: 14px; background: rgba(255,255,255,0.18); }
.guandan-table { height: clamp(390px, 52vh, 560px); }
.guandan-table .board-area { gap: 6px; }
.guandan-level {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  color: #ffd86b; font-size: 13px; margin-bottom: 2px;
}
.guandan-level b {
  min-width: 30px; height: 30px; display: inline-grid; place-items: center;
  border-radius: 50%; color: #2a1a00;
  background: radial-gradient(circle at 35% 30%, #fff0aa, #d99b25 68%, #7a4d09);
  box-shadow: 0 3px 10px rgba(0,0,0,0.45);
}
.guandan-level small { color: #9fb0c0; }
.guandan-tribute-box {
  min-width: min(560px, 88vw);
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(6, 10, 18, 0.82);
  border: 1px solid rgba(240, 195, 90, 0.24);
  box-shadow: 0 8px 22px rgba(0,0,0,0.36);
  color: #dbe4ee;
}
.guandan-tribute-box > b {
  display: block;
  color: #ffd86b;
  font-size: 13px;
  margin-bottom: 7px;
}
.guandan-tribute-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(76px, auto);
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-top: 1px dashed rgba(255,255,255,0.08);
  font-size: 12px;
}
.guandan-tribute-row:first-of-type { border-top: none; }
.guandan-tribute-row i,
.guandan-tribute-row em {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-style: normal;
  color: #9fb0c0;
}
.guandan-seat .gs-plate small { color: #8fb6d8; font-size: 10px; }
.guandan-seat.me .gs-plate small { color: #ffd86b; }
.guandan-seat.danger .gs-plate {
  border-color: rgba(255, 122, 122, 0.72);
  box-shadow: 0 0 14px rgba(255, 92, 92, 0.34);
}
.guandan-seat.danger .gs-plate small { color: #ff9d9d; font-weight: 900; }
.card.wild {
  box-shadow: inset 0 0 0 2px rgba(240,195,90,0.82), 0 0 12px rgba(240,195,90,0.22);
}
.card.asset-card,
.card.guandan-card {
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(155deg, rgba(255,255,255,0.96), rgba(245,247,250,0.96) 54%, rgba(228,232,238,0.96)),
    radial-gradient(circle at 24% 16%, rgba(255,255,255,0.9), transparent 34%);
  border: 1px solid rgba(20, 26, 34, 0.18);
  box-shadow:
    0 3px 8px rgba(0,0,0,0.42),
    inset 0 0 0 1px rgba(255,255,255,0.76),
    inset 0 -10px 18px rgba(20,26,34,0.05);
}
.card.asset-card.with-img.img-ready,
.card.guandan-card.with-img.img-ready {
  background: transparent;
  border: 0;
  box-shadow: 0 3px 8px rgba(0,0,0,0.46);
}
.card.asset-card.with-img.img-pending,
.card.guandan-card.with-img.img-pending {
  background:
    linear-gradient(155deg, rgba(255,255,255,0.96), rgba(245,247,250,0.96) 54%, rgba(228,232,238,0.96)),
    radial-gradient(circle at 24% 16%, rgba(255,255,255,0.9), transparent 34%);
  border: 1px solid rgba(20, 26, 34, 0.18);
  box-shadow:
    0 3px 8px rgba(0,0,0,0.42),
    inset 0 0 0 1px rgba(255,255,255,0.76),
    inset 0 -10px 18px rgba(20,26,34,0.05);
}
.card.asset-card .card-face-img,
.card.guandan-card .card-face-img {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}
.card.asset-card.with-img.img-ready .card-face-img,
.card.guandan-card.with-img.img-ready .card-face-img {
  display: block;
  animation: card-face-ready 0.08s ease-out;
}
@keyframes card-face-ready {
  from { opacity: 0.45; }
  to { opacity: 1; }
}
.card.asset-card.with-img.img-ready .card-corner,
.card.asset-card.with-img.img-ready .card-center,
.card.asset-card.with-img.img-ready::after,
.card.guandan-card.with-img.img-ready .card-corner,
.card.guandan-card.with-img.img-ready .card-center,
.card.guandan-card.with-img.img-ready::after {
  display: none;
}
.card.asset-card .card-corner,
.card.guandan-card .card-corner {
  position: absolute;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 0;
  min-width: 14px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.85);
}
.card.asset-card .card-corner.top,
.card.guandan-card .card-corner.top {
  left: 4px;
  top: 4px;
}
.card.asset-card .card-corner.bottom,
.card.guandan-card .card-corner.bottom {
  right: 4px;
  bottom: 4px;
  transform: rotate(180deg);
}
.card.asset-card .card-corner b,
.card.guandan-card .card-corner b {
  font-size: 13px;
  line-height: 0.9;
  font-weight: 950;
  letter-spacing: 0;
}
.card.asset-card .card-corner i,
.card.guandan-card .card-corner i {
  font-size: 11px;
  line-height: 0.9;
  font-style: normal;
}
.card.asset-card .card-center,
.card.guandan-card .card-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateY(2px);
  opacity: 0.88;
}
.card.asset-card::after,
.card.guandan-card::after {
  content: attr(data-suit);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 0;
  font-size: 26px;
  line-height: 1;
  opacity: 0.075;
  pointer-events: none;
}
.card.asset-card.joker .card-corner,
.card.guandan-card.joker .card-corner {
  min-width: 13px;
}
.card.asset-card.joker .card-corner i,
.card.guandan-card.joker .card-corner i {
  font-size: 9px;
}
.card.asset-card.tiny .card-corner,
.card.guandan-card.tiny .card-corner {
  min-width: 9px;
}
.card.asset-card.tiny .card-corner.top,
.card.guandan-card.tiny .card-corner.top { left: 2px; top: 2px; }
.card.asset-card.tiny .card-corner.bottom,
.card.guandan-card.tiny .card-corner.bottom { right: 2px; bottom: 2px; }
.card.asset-card.tiny .card-corner b,
.card.guandan-card.tiny .card-corner b { font-size: 8px; }
.card.asset-card.tiny .card-corner i,
.card.guandan-card.tiny .card-corner i { font-size: 7px; }
.card.asset-card.tiny .card-center,
.card.guandan-card.tiny .card-center {
  transform: translateY(3px) scale(0.9);
}
.wild-mark {
  position: absolute; right: 3px; bottom: 2px;
  z-index: 3;
  font-style: normal; font-size: 10px; font-weight: 900;
  color: #3a2100; background: linear-gradient(180deg, #ffe58a, #d99b25);
  border-radius: 8px; padding: 0 4px;
}
.guandan-hand .card { position: relative; }
.gd-hand-row { display: contents; }
.gd-sel-ok { color: #8ff0b2; font-weight: 800; }
.gd-sel-bad { color: #ff9d7a; font-weight: 800; }
.gd-danger-text { color: #ff9d9d; font-weight: 900; }
.gd-hint-note {
  max-width: min(720px, calc(100vw - 20px));
  margin: 7px auto 0;
  padding: 7px 11px;
  border-radius: 10px;
  background: rgba(25, 50, 78, 0.72);
  border: 1px solid rgba(139, 200, 255, 0.22);
  color: #dceeff;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
}
.gd-reconnect-status {
  position: fixed;
  left: 50%;
  top: 52px;
  transform: translateX(-50%);
  z-index: 80;
  color: #ffe7a6;
  font-size: 12px;
  font-weight: 800;
  text-shadow: 0 2px 8px #000;
  pointer-events: none;
}
.score-row em { color: #8fb6d8; font-style: normal; font-size: 11px; margin-left: 4px; }
@media (max-width: 720px) {
  #gdRoomScreen .topbar { padding: 8px 10px; }
  #gdRoomScreen .topbar h1 { font-size: 18px; }
  #gdRoomScreen .topbar .btn-settings { padding: 4px 8px; font-size: 12px; }
  .guandan-scoreline { margin-top: 5px; font-size: 12px; gap: 7px; }
  .guandan-table { height: clamp(350px, 46vh, 450px); margin-top: 6px; }
  .guandan-level b { min-width: 26px; height: 26px; }
  .gd-seat-btn { padding: 6px 10px; font-size: 11px; }
  .guandan-tribute-box { min-width: min(330px, 88vw); padding: 8px; }
  .guandan-tribute-row {
    grid-template-columns: 1fr auto;
    gap: 5px;
    font-size: 11px;
  }
  .guandan-tribute-row em { grid-column: 1 / -1; }
  .guandan-seat { width: 66px; }
  .guandan-seat .gs-plate small { font-size: 9px; }
  .guandan-handwrap {
    position: sticky;
    bottom: 0;
    z-index: 30;
    margin-top: 2px;
    padding: 5px 6px calc(7px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(8, 12, 20, 0.55), rgba(8, 12, 20, 0.96) 30%, rgba(8, 12, 20, 0.98));
    border-top: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
  }
  .guandan-hand {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 0;
    overflow: visible;
    min-height: 124px;
    padding: 16px 4px 6px;
  }
  .guandan-hand .gd-hand-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    height: min(56px, 14.6vw);
  }
  .guandan-hand .gd-hand-row + .gd-hand-row {
    margin-top: -18px;
  }
  .guandan-hand .card {
    flex: 0 0 auto;
    width: min(40px, 10.4vw);
    height: min(56px, 14.6vw);
    margin-left: -6px;
    margin-top: 0;
  }
  .guandan-hand .gd-hand-row .card:first-child { margin-left: 0; }
  .guandan-hand .card .rank { font-size: 15px; }
  .guandan-hand .card .suit { font-size: 12px; }
  .guandan-hand .card.guandan-card .card-corner {
    min-width: 14px;
  }
  .guandan-hand .card.guandan-card .card-corner.top { left: 4px; top: 4px; }
  .guandan-hand .card.guandan-card .card-corner.bottom { right: 4px; bottom: 4px; }
  .guandan-hand .card.guandan-card .card-corner b { font-size: 14px; }
  .guandan-hand .card.guandan-card .card-corner i { font-size: 12px; }
  .guandan-hand .card.guandan-card .card-center {
    display: none;
  }
  .guandan-hand .card.guandan-card::after {
    font-size: 24px;
    opacity: 0.055;
    transform: translateY(5px);
  }
  .guandan-hand .card.sel {
    transform: translateY(-12px);
    z-index: 3;
  }
  .guandan-handwrap .gd-actionbar {
    display: grid;
    grid-template-columns: minmax(58px, 0.72fr) minmax(58px, 0.72fr) minmax(58px, 0.72fr) minmax(92px, 1.22fr);
    grid-template-areas: "hint pass clear play";
    gap: 6px;
    align-items: stretch;
  }
  .guandan-handwrap .gd-actionbar-lead,
  .guandan-handwrap .gd-return-actions {
    grid-template-columns: minmax(72px, 0.82fr) minmax(66px, 0.74fr) minmax(108px, 1.24fr);
    grid-template-areas: "hint clear play";
  }
  .guandan-handwrap .gd-action-secondary { grid-area: hint; }
  .guandan-handwrap .gd-action-pass { grid-area: pass; }
  .guandan-handwrap .gd-action-clear { grid-area: clear; }
  .guandan-handwrap .gd-action-primary { grid-area: play; }
  .guandan-handwrap .gd-actionbar .btn {
    min-width: 0;
    height: 48px;
    padding: 10px 6px;
    font-size: 13px;
    white-space: nowrap;
    border-radius: 10px;
  }
  .guandan-handwrap .gd-actionbar .gd-action-primary {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0;
    box-shadow: 0 8px 18px rgba(41, 125, 79, 0.28), inset 0 1px 0 rgba(255,255,255,0.16);
  }
  .guandan-handwrap .gd-actionbar .gd-action-pass {
    padding: 10px 4px;
    font-size: 12px;
    font-weight: 700;
    opacity: 0.9;
  }
  .guandan-handwrap .gd-actionbar .gd-action-clear {
    padding: 10px 4px;
  }
  .guandan-handwrap .gande-turnnote { margin-top: 5px; }
  .gd-hint-note {
    margin-top: 6px;
    padding: 6px 9px;
    font-size: 12px;
  }
  .gd-reconnect-status {
    top: auto;
    bottom: calc(148px + env(safe-area-inset-bottom));
  }
  .wild-mark { font-size: 8px; right: 2px; bottom: 1px; padding: 0 3px; }
  #gdLog { margin: 8px 6px !important; }
}
