:root {
  --felt: #0f5132;
  --felt-dark: #0a3a24;
  --felt-light: #17703f;
  --ink: #e9f2ec;
  --muted: #8fb3a0;
  --gold: #f0c674;
  --red: #d64545;
  --blue: #3d7dff;
  --panel: #16221c;
  --panel-2: #1d2c24;
  --line: #2b3d33;
}

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

html, body {
  height: 100%;
  background: #0a1410;
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", system-ui, sans-serif;
  overflow: hidden;
  /* 手机上不许左右晃:页面固定在原地,只让内部区域自己滚 */
  overscroll-behavior: none;
  touch-action: pan-y;
}

.hidden { display: none !important; }

/* ------------------------------------------------------------ 登录 ---- */

.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, #14472f 0%, #071009 70%);
  z-index: 50;
}

.login-card {
  width: min(360px, 90vw);
  padding: 32px 28px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  text-align: center;
}

.login-card h1 { font-size: 30px; letter-spacing: 2px; color: var(--gold); }
.login-card .subtitle { margin: 8px 0 24px; color: var(--muted); font-size: 13px; }

.login-card label {
  display: block;
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  margin: 12px 0 6px;
}

.login-card input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0e1713;
  color: var(--ink);
  font-size: 15px;
  outline: none;
}

.login-card input:focus { border-color: var(--gold); }

.login-card button {
  width: 100%;
  margin-top: 22px;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #d9a94c, #b8842c);
  color: #23180a;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.login-card button:hover { filter: brightness(1.08); }

.login-card button.second-btn {
  margin-top: 10px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

.login-card button.second-btn:hover { color: var(--gold); border-color: var(--gold); }

.login-card .hint {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  opacity: .8;
}

.error { margin-top: 12px; color: #ff8080; font-size: 13px; min-height: 18px; }

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

.lobby-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.lobby-user {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.lobby-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  gap: 20px;
  padding: 20px;
  align-items: flex-start;
}

.lobby-main h2 {
  font-size: 14px;
  color: var(--gold);
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.lobby-rooms { flex: 1; min-width: 0; }
.lobby-create { width: min(300px, 100%); flex: 0 0 auto; }

.room-list { display: flex; flex-direction: column; gap: 8px; }

.room-item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "name state" "info state";
  gap: 2px 10px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
}

.room-item:hover { border-color: var(--gold); }
.room-name { grid-area: name; font-size: 16px; font-weight: 600; }
.room-info { grid-area: info; color: var(--muted); font-size: 12px; }
.room-state { grid-area: state; align-self: center; font-size: 12px; padding: 2px 8px; border-radius: 20px; }
.room-state.free { color: var(--muted); border: 1px solid var(--line); }
.room-state.busy { color: var(--gold); border: 1px solid var(--gold); }

.empty-hint { color: var(--muted); font-size: 13px; padding: 10px 2px; }

.lobby-create {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.lobby-create label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0 5px;
}

.lobby-create input {
  width: 100%;
  padding: 10px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0e1713;
  color: var(--ink);
  font-size: 15px;
  outline: none;
}

.lobby-create input:focus { border-color: var(--gold); }

.field-row { display: flex; gap: 10px; }
.field-row > div { flex: 1; min-width: 0; }

.lobby-create button {
  width: 100%;
  margin-top: 18px;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #d9a94c, #b8842c);
  color: #23180a;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.lobby-create button:hover { filter: brightness(1.08); }

/* 管理员开关 */
.reveal-switch {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--gold);
  cursor: pointer;
  white-space: nowrap;
}

.reveal-switch input { accent-color: var(--gold); width: 15px; height: 15px; }

/* ---------------------------------------------------------- 顶栏 ------ */

.app { display: flex; flex-direction: column; height: 100%; }

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  background: #0d1813;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}

.brand { color: var(--gold); font-weight: 700; font-size: 17px; }

.table-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
  flex: 1;
}

.street-chip {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--ink);
  border: 1px solid var(--line);
}

.ghost-btn {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
}

.ghost-btn:hover { color: var(--ink); border-color: var(--muted); }

/* ---------------------------------------------------------- 布局 ------ */

.layout { display: flex; flex: 1; min-height: 0; }

.felt-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  min-width: 0;
}

.felt {
  position: relative;
  width: min(100%, 940px);
  aspect-ratio: 16 / 9;
  max-height: 100%;
  border-radius: 220px / 160px;
  background:
    radial-gradient(ellipse at 50% 45%, var(--felt-light), var(--felt) 55%, var(--felt-dark) 100%);
  border: 12px solid #2a1d12;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, .45), 0 20px 50px rgba(0, 0, 0, .5);
  transition: box-shadow .25s, border-color .25s;
}

/* 轮到自己时,牌桌四周亮一圈 */
.felt.is-my-turn {
  border-color: var(--gold);
  box-shadow:
    inset 0 0 80px rgba(0, 0, 0, .45),
    0 0 0 3px rgba(240, 198, 116, .55),
    0 0 34px rgba(240, 198, 116, .35);
  animation: felt-glow 1.8s ease-in-out infinite;
}

@keyframes felt-glow {
  0%, 100% { box-shadow: inset 0 0 80px rgba(0,0,0,.45), 0 0 0 3px rgba(240,198,116,.45), 0 0 22px rgba(240,198,116,.25); }
  50%      { box-shadow: inset 0 0 80px rgba(0,0,0,.45), 0 0 0 4px rgba(240,198,116,.75), 0 0 44px rgba(240,198,116,.5); }
}

@media (prefers-reduced-motion: reduce) {
  .felt.is-my-turn { animation: none; }
}

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

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

.seat {
  position: absolute;
  width: 132px;
  transform: translate(-50%, -50%);
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(9, 20, 14, .82);
  border: 1px solid var(--line);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .45);
  font-size: 12px;
  transition: border-color .18s, box-shadow .18s, opacity .18s;
}

.seat.is-turn {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(240, 198, 116, .35), 0 6px 18px rgba(0, 0, 0, .5);
  animation: turn-pulse 1.6s ease-in-out infinite;
}

@keyframes turn-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(240, 198, 116, .35), 0 6px 18px rgba(0, 0, 0, .5); }
  50% { box-shadow: 0 0 0 6px rgba(240, 198, 116, .10), 0 6px 18px rgba(0, 0, 0, .5); }
}

@media (prefers-reduced-motion: reduce) {
  .seat.is-turn { animation: none; }
}

.seat.is-folded { opacity: .42; }
.seat.is-me { border-color: var(--blue); }

.seat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.seat-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 84px;
}

.seat-name .tag {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
}

.seat-stack { color: var(--gold); font-variant-numeric: tabular-nums; }

/* The dealer badge lives in the seat header: a floating button would overlap
 * the neighbouring seat on a small screen. */
.dealer-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #f3f3f3;
  color: #222;
  font-size: 9px;
  font-weight: 700;
}

.seat-hint { color: var(--muted); font-size: 10px; padding: 4px 0; }

.seat-cards { display: flex; gap: 3px; margin-top: 5px; min-height: 26px; }
.seat-cards .mini-card { width: 20px; height: 28px; font-size: 11px; }

.seat-bet {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, 8px);
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(240, 198, 116, .16);
  color: var(--gold);
  border: 1px solid rgba(240, 198, 116, .4);
  font-size: 11px;
  white-space: nowrap;
}

.seat-badge {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translate(-50%, 8px);
  font-size: 10px;
  color: var(--muted);
}

.seat-wrap { position: absolute; transform: translate(-50%, -50%); }

/* ---------------------------------------------------------- 牌桌中心 -- */

.table-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 62%;
}

.board { display: flex; gap: 8px; min-height: 84px; }

.card {
  width: 54px;
  height: 76px;
  border-radius: 6px;
  background: linear-gradient(180deg, #fdfdfb, #e9e7e0);
  color: #1a1a1a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 19px;
  line-height: 1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .45);
  border: 1px solid #cfcbc0;
}

.card.red { color: #c62828; }
.card.mini-card { width: 20px; height: 28px; font-size: 11px; border-radius: 3px; }
.card.placeholder { background: rgba(255, 255, 255, .07); border: 1px dashed rgba(255,255,255,.22); box-shadow: none; }
.card.back { background: repeating-linear-gradient(45deg, #1e4a8a, #1e4a8a 5px, #17396e 5px, #17396e 10px); border-color: #0f2a55; }

.pot-line { display: flex; align-items: baseline; gap: 10px; }
.pot-label { color: var(--muted); font-size: 12px; }
.pot-size { color: var(--gold); font-size: 25px; font-weight: 700; font-variant-numeric: tabular-nums; }

.pot-layers { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

.pot-layer {
  font-size: 11px;
  color: var(--muted);
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .25);
}

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

.sidebar {
  width: 268px;
  flex: 0 0 auto;
  border-left: 1px solid var(--line);
  background: #0c1510;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.panel { border-bottom: 1px solid var(--line); padding: 12px 14px; }
.panel-title { font-size: 12px; color: var(--muted); margin-bottom: 9px; letter-spacing: 1px; }

.my-cards { display: flex; gap: 8px; min-height: 76px; }

.log-panel { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.log { flex: 1; overflow-y: auto; font-size: 12px; line-height: 1.75; }
.log-line { color: var(--muted); }
.log-line b { color: var(--ink); font-weight: 600; }
.log-line .act-fold { color: #e08a8a; }
.log-line .act-call { color: #9ec9ff; }
.log-line .act-raise { color: var(--gold); }
.log-line .act-check { color: #9fd7b4; }
.log-line .head { color: var(--gold); }
.log-line .win { color: #ffd76e; }
.log-line .auto-tag { color: #ff9d9d; font-size: 11px; }

/* --------------------------------------------- 牌局动态(抽屉) ------- */

/*
 * 过程记录收进一个抽屉:平时不占地方,点右下角的悬浮按钮才滑出来。
 */
.log-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: calc(100% - var(--bar-h, 120px));
  width: min(320px, 86vw);
  display: flex;
  flex-direction: column;
  background: #0c1510;
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 30px rgba(0, 0, 0, .5);
  transform: translateX(100%);
  transition: transform .22s ease;
  z-index: 45;
}

.log-drawer.open { transform: none; }

.log-drawer .panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--line);
}

.log-drawer .log { padding: 10px 14px; }

.log-toggle {
  position: fixed;
  right: 14px;
  bottom: calc(var(--bar-h, 120px) + 12px);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: rgba(22, 34, 28, .95);
  color: var(--gold);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .5);
  z-index: 44;
  touch-action: manipulation;
}

.log-toggle.open { background: rgba(240, 198, 116, .18); }

/* ---------------------------------------------------------- 操作栏 ---- */

.actionbar {
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
  background: #0d1813;
  padding: 10px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  /* The seats are absolutely positioned, so without this they would be
   * painted on top of the buttons and swallow the taps. */
  position: relative;
  z-index: 5;
}

.actionbar.my-turn { box-shadow: inset 0 2px 0 var(--gold); }

.action-head { display: flex; align-items: center; gap: 10px; }

.action-status { flex: 1; font-size: 13px; color: var(--muted); min-height: 19px; }
.action-status b { color: var(--gold); }

.turn-timer {
  flex: 0 0 auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(240, 198, 116, .14);
  border: 1px solid rgba(240, 198, 116, .45);
  color: var(--gold);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.turn-timer.urgent {
  background: rgba(214, 69, 69, .2);
  border-color: var(--red);
  color: #ff9d9d;
}

.action-buttons { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.act-btn {
  padding: 11px 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  touch-action: manipulation;
  transition: filter .15s, opacity .15s;
}

.act-btn:disabled { opacity: .28; cursor: not-allowed; }
.act-btn:not(:disabled):hover { filter: brightness(1.12); }

.act-btn.fold { background: #5a3030; }
.act-btn.check { background: #2c4a3a; }
.act-btn.call { background: #2f5ea8; }
.act-btn.raise { background: #b8842c; color: #23180a; }

.raise-group { display: flex; align-items: center; gap: 9px; }
.raise-group input[type=range] { width: 220px; accent-color: var(--gold); }
.raise-group output { color: var(--gold); font-weight: 700; min-width: 66px; font-variant-numeric: tabular-nums; }

.quick-raises, .quick-bbs { display: flex; gap: 7px; flex-wrap: wrap; }
.quick-bbs[hidden] { display: none; }

.quick-raises button, .quick-bbs button {
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  touch-action: manipulation;
}

.quick-raises button:hover:not(:disabled),
.quick-bbs button:hover:not(:disabled) { color: var(--ink); border-color: var(--gold); }
.quick-raises button:disabled,
.quick-bbs button:disabled { opacity: .3; cursor: not-allowed; }

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

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bar-h, 120px) + 16px);
  transform: translateX(-50%) translateY(14px);
  padding: 10px 20px;
  border-radius: 8px;
  background: rgba(20, 32, 25, .96);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
  z-index: 40;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================ 手机 ====== */

@media (max-width: 900px) {
  .sidebar { display: none; }
  .felt-wrap { padding: 8px; }
  .topbar { padding: 6px 12px; gap: 10px; }
  .brand { display: none; }
  .table-meta { font-size: 11px; gap: 8px; flex-wrap: nowrap; overflow: hidden; }
  /* The top bar is one line on a phone: the table name gives up space
     first, the numbers stay readable. */
  .table-meta > span { white-space: nowrap; }
  .table-meta #meta-table { overflow: hidden; text-overflow: ellipsis; }
  .reveal-switch { font-size: 11px; white-space: nowrap; gap: 4px; }
  .act-btn { padding: 12px 16px; }

  /* 大厅:牌桌列表在上,开桌的表单在下 */
  .lobby-main { flex-direction: column; gap: 14px; padding: 14px; }
  .lobby-create { width: 100%; }
  .lobby-user { font-size: 12px; }
}

/* 横屏手机:屏幕矮,牌桌和按钮都要缩小 */
@media (max-width: 900px) and (max-height: 520px) {
  .felt { aspect-ratio: auto; height: 100%; border-width: 8px; border-radius: 120px / 70px; }
  .seat { width: 96px; font-size: 10px; padding: 5px 7px; }
  .seat-cards { min-height: 20px; margin-top: 3px; }
  .seat-cards .mini-card { width: 16px; height: 22px; font-size: 9px; }
  /* 屏幕矮的时候座位框只有 176px 高,下注筹码不能再往下叠一行,
     把它挪到手牌旁边,座位框就矮一截 */
  .seat {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "head head" "cards bet";
    align-items: center;
    column-gap: 4px;
  }
  .seat-head { grid-area: head; }
  .seat-cards { grid-area: cards; }
  .seat-bet {
    grid-area: bet;
    position: static;
    transform: none;
    display: inline-block;
    margin-top: 3px;
    padding: 1px 7px;
    font-size: 10px;
  }
  /* 中间的公共牌要留出上下座位的空间,否则会跟下方的座位打架:
     底池数字和边池标签排成一行,中间内容整体矮一截 */
  .table-center {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 12px;
  }
  .board { flex: 0 0 100%; justify-content: center; }
  .pot-line { flex: 0 0 auto; }
  .pot-layers { flex: 0 0 auto; }
  /* 自己的座位略微上移,给下注筹码留出位置 */
  .seat-wrap.is-me { top: 90% !important; }
  .card { width: 34px; height: 46px; font-size: 13px; }
  .board { gap: 4px; min-height: 46px; }
  .pot-size { font-size: 17px; }
  .pot-label { font-size: 10px; }
  .pot-layer { font-size: 10px; padding: 1px 7px; }
  .actionbar { padding: 6px 12px 8px; gap: 6px; }
  .action-status { font-size: 12px; min-height: 16px; }
  .act-btn { padding: 9px 16px; font-size: 14px; }
  .raise-group input[type=range] { width: 150px; }
  .quick-raises button, .quick-bbs button { padding: 4px 10px; }
  /* 提示条放在右下角:横屏时中间就是玩家自己的手牌,别挡住;
     右边还要让开"牌局动态"的悬浮按钮 */
  .toast { left: auto; right: 72px; transform: translateY(14px); }
  .toast.show { transform: translateY(0); }
}

/* ------------------------------------------------------ 竖屏(手机) ----- */
/*
 * 竖屏没有足够的高度横着摆一圈座位,所以改成竖着排:
 *   公共牌 + 底池 → 对手(两列小格子)→ 自己的座位(整行,贴着操作栏)
 * 座位从"绝对定位的圆环"变成"普通文档流",所以要把定位全部复位。
 */
@media (orientation: portrait) and (max-width: 900px) {
  .felt {
    aspect-ratio: auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border-width: 8px;
    border-radius: 30px;
  }

  .table-center {
    position: static;
    transform: none;
    width: 100%;
    gap: 8px;
    flex: 0 0 auto;
    order: -1; /* 公共牌在上,座位在下 */
  }

  .board { gap: 5px; min-height: 62px; }
  .card { width: 44px; height: 62px; font-size: 16px; }
  .pot-size { font-size: 21px; }
  .pot-label { font-size: 11px; }

  .seats {
    position: static;
    inset: auto;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    /* space-between 只在有富余空间时才生效,座位太多时自动退回顶部对齐,
       所以不会出现"上面的行被顶出可视区"的情况 */
    align-content: space-between;
    justify-content: center;
    gap: 6px;
    overflow-y: auto;
  }

  .seat-wrap {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: calc(50% - 3px);
    display: flex;
    justify-content: center;
  }

  .seat-wrap.is-me { width: 100%; }

  .seat {
    position: static;
    transform: none;
    width: 100%;
    padding: 6px 8px;
    font-size: 11px;
  }

  .seat-wrap.is-me .seat { padding: 8px 10px; font-size: 12px; }
  .seat-wrap.is-me .seat-cards .mini-card { width: 30px; height: 42px; font-size: 14px; }
  .seat-wrap.is-me .seat-name { max-width: none; }

  .seat-bet {
    position: static;
    transform: none;
    display: inline-block;
    margin-top: 4px;
    padding: 1px 8px;
    font-size: 10px;
  }


  /* 操作栏:三个动作按钮一行,加注单独一行 */
  .actionbar {
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    gap: 7px;
  }

  .action-head { gap: 8px; }
  .action-status { font-size: 13px; min-height: 18px; }
  .turn-timer { font-size: 15px; padding: 4px 12px; }

  .action-buttons { gap: 8px; }
  .act-btn { flex: 1 1 0; min-width: 0; padding: 17px 4px; font-size: 17px; min-height: 56px; }

  .raise-group { flex: 1 1 100%; gap: 10px; }
  .raise-group .act-btn { flex: 0 0 auto; padding: 17px 22px; min-height: 56px; }
  .raise-group input[type=range] { flex: 1; width: auto; height: 34px; }
  .raise-group output { min-width: 62px; text-align: right; font-size: 17px; }

  .quick-raises, .quick-bbs { gap: 6px; }
  .quick-raises button, .quick-bbs button { flex: 1 1 0; padding: 13px 2px; font-size: 14px; min-height: 46px; }

  /* 提示条挪到上面,不然会盖住操作按钮 */
  .toast { top: 52px; bottom: auto; }
}
