/* 由小程序样式转换而来，之后在这里直接维护 */

/* ===== .p-hall ===== */
.p-hall .hall {
  padding: 0.16rem 0.32rem calc(0.48rem + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
.p-hall .nav-avatar {
  width: 0.64rem;
  height: 0.64rem;
  font-size: 0.36rem;
}
.p-hall .ph {
  color: var(--muted);
}

/* 个人信息 */
.p-hall .profile {
  display: flex;
  align-items: center;
  gap: 0.24rem;
}
.p-hall .profile-avatar {
  width: 1.04rem;
  height: 1.04rem;
  font-size: 0.44rem;
  border-color: var(--gold);
}
.p-hall .profile-main {
  flex: 1;
  min-width: 0;
}
.p-hall .name-input {
  height: 0.56rem;
  font-size: 0.36rem;
  font-weight: 700;
  color: var(--on);
}
.p-hall .profile-id {
  font-size: 0.24rem;
  color: var(--muted);
  letter-spacing: 0.01rem;
}
.p-hall .profile-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.12rem;
}
.p-hall .conn {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  height: 0.52rem;
  padding: 0 0.2rem;
  border-radius: 0.14rem;
  background: var(--surface-lowest);
  font-size: 0.24rem;
  color: var(--muted);
}
.p-hall .conn .dot {
  width: 0.12rem;
  height: 0.12rem;
  border-radius: 50%;
  background: var(--muted);
}
.p-hall .conn.on {
  color: var(--primary);
}
.p-hall .conn.on .dot {
  background: var(--primary);
}
.p-hall .profile-note {
  font-size: 0.22rem;
  color: var(--muted);
}

/* 创建房间 */
.p-hall .create {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.36rem 0.32rem;
  border-radius: 0.28rem;
  background: linear-gradient(100deg, var(--felt) 0%, #123a30 55%, var(--surface) 100%);
  border: 1px solid var(--hair);
}
.p-hall .create-title {
  display: flex;
  align-items: center;
  gap: 0.14rem;
  font-size: 0.4rem;
  font-weight: 700;
}
.p-hall .pulse {
  width: 0.16rem;
  height: 0.16rem;
  border-radius: 50%;
  background: var(--gold);
}
.p-hall .create-sub {
  margin-top: 0.08rem;
  font-size: 0.26rem;
  color: var(--on-variant);
}
.p-hall .create-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.96rem;
  height: 0.96rem;
  border-radius: 0.24rem;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.52rem;
}

/* 加入牌局 */
.p-hall .join-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.24rem;
}
.p-hall .join-title {
  display: flex;
  align-items: center;
  gap: 0.14rem;
  font-size: 0.3rem;
  font-weight: 700;
}
.p-hall .join-title .icon {
  font-size: 0.36rem;
}
.p-hall .join-hint {
  font-size: 0.24rem;
  color: var(--muted);
}
.p-hall .digits {
  position: relative;
  display: flex;
  gap: 0.14rem;
}
.p-hall .digit {
  flex: 1;
  height: 1rem;
  line-height: 1rem;
  text-align: center;
  border-radius: 0.18rem;
  background: var(--surface-lowest);
  border: 1px solid transparent;
  color: var(--outline);
  font-size: 0.44rem;
  font-weight: 700;
}
.p-hall .digit.filled {
  color: var(--on);
}
.p-hall .digit.cursor {
  border-color: var(--gold);
}
/* 透明输入框盖在格子上，负责唤起数字键盘 */
.p-hall .code-input {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}
.p-hall .join-row {
  display: flex;
  gap: 0.16rem;
  margin-top: 0.24rem;
}
.p-hall .paste {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.14rem;
  height: 0.96rem;
  border-radius: 0.18rem;
  background: var(--surface-high);
  font-size: 0.28rem;
}
.p-hall .paste .icon {
  font-size: 0.36rem;
}
.p-hall .go {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.96rem;
  height: 0.96rem;
  border-radius: 0.18rem;
  background: var(--gold);
  color: var(--on-gold);
  font-size: 0.44rem;
}

/* 玩法卡片 */
.p-hall .section-title {
  margin-top: 0.08rem;
  font-size: 0.34rem;
  font-weight: 700;
}
.p-hall .modes {
  display: flex;
  gap: 0.2rem;
}
.p-hall .mode {
  flex: 1;
  min-width: 0;
  padding: 0.24rem;
  border-radius: 0.24rem;
  background: var(--surface);
  border: 1px solid var(--hair);
}
.p-hall .mode.zjh {
  background: linear-gradient(160deg, rgba(224, 82, 82, 0.16), var(--surface) 55%);
}
.p-hall .mode.holdem {
  background: linear-gradient(160deg, rgba(163, 208, 190, 0.14), var(--surface) 55%);
}
.p-hall .mode-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.p-hall .mode-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.64rem;
  height: 0.64rem;
  border-radius: 0.14rem;
  font-size: 0.38rem;
}
.p-hall .mode.zjh .mode-icon {
  background: #6f000f;
  color: #ffdad7;
}
.p-hall .mode.holdem .mode-icon {
  background: var(--felt);
  color: var(--primary);
}
.p-hall .mode-name {
  margin-top: 0.2rem;
  font-size: 0.36rem;
  font-weight: 700;
}
.p-hall .mode-desc {
  margin-top: 0.08rem;
  min-height: 0.72rem;
  font-size: 0.24rem;
  color: var(--on-variant);
}
.p-hall .mode-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.2rem;
  padding-top: 0.18rem;
  border-top: 1px solid var(--hair);
  font-size: 0.24rem;
  font-weight: 600;
}
.p-hall .mode-seats {
  display: flex;
  align-items: center;
  gap: 0.08rem;
  color: var(--on-variant);
  font-weight: 400;
}

/* 声明 */
.p-hall .notice {
  padding: 0.28rem;
  border-radius: 0.24rem;
  background: var(--surface-lowest);
  text-align: center;
}
.p-hall .notice-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  font-size: 0.24rem;
  font-weight: 600;
}
.p-hall .notice-body {
  margin-top: 0.12rem;
  font-size: 0.24rem;
  line-height: 1.7;
  color: var(--muted);
}

/* ===== .p-create ===== */
.p-create .page {
  padding: 0.16rem 0.32rem 2.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
}

/* 玩法切换 */
.p-create .tabs {
  display: flex;
  gap: 0.12rem;
  padding: 0.08rem;
  border-radius: 0.24rem;
  background: var(--surface-lowest);
}
.p-create .tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  height: 1rem;
  border-radius: 0.18rem;
  border: 1px solid transparent;
  color: var(--on-variant);
  font-size: 0.34rem;
  font-weight: 700;
}
.p-create .tab .icon {
  font-size: 0.4rem;
}
.p-create .tab.on {
  background: var(--felt);
  border-color: rgba(233, 195, 73, 0.5);
  color: var(--gold);
}
.p-create .tab-tag {
  padding: 0.02rem 0.12rem;
  border-radius: 0.1rem;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.2rem;
  font-weight: 600;
}
.p-create .tab.on .tab-tag {
  background: rgba(233, 195, 73, 0.18);
}
.p-create .tagline {
  display: flex;
  align-items: center;
  gap: 0.14rem;
  font-size: 0.24rem;
  color: var(--on-variant);
}
.p-create .pulse {
  flex: none;
  width: 0.12rem;
  height: 0.12rem;
  border-radius: 50%;
  background: var(--gold);
}

/* 规则面板 */
.p-create .panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--hair);
}
.p-create .panel-title {
  display: flex;
  align-items: center;
  gap: 0.14rem;
  font-size: 0.34rem;
  font-weight: 700;
}
.p-create .panel-title .icon {
  font-size: 0.4rem;
}
.p-create .row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0.28rem 0 0.16rem;
  font-size: 0.28rem;
}
.p-create .row-note {
  font-size: 0.24rem;
  color: var(--muted);
}
.p-create .row-note.gold {
  color: var(--gold);
}
.p-create .opts {
  display: flex;
  gap: 0.14rem;
}
.p-create .opt {
  flex: 1;
  min-width: 0;
  height: 0.84rem;
  line-height: 0.84rem;
  text-align: center;
  border-radius: 0.18rem;
  background: var(--surface-low);
  border: 1px solid transparent;
  color: var(--on-variant);
  font-size: 0.28rem;
  white-space: nowrap;
}
.p-create .opt.on {
  background: var(--felt);
  border-color: rgba(233, 195, 73, 0.5);
  color: var(--gold);
  font-weight: 600;
}

/* 开关行 */
.p-create .switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.24rem;
  margin-top: 0.24rem;
  padding: 0.24rem;
  border-radius: 0.18rem;
  background: var(--surface-low);
  font-size: 0.28rem;
}
.p-create .switch-note {
  margin-top: 0.04rem;
  font-size: 0.24rem;
  color: var(--muted);
}
.p-create .switch {
  flex: none;
  position: relative;
  width: 0.96rem;
  height: 0.52rem;
  border-radius: 0.26rem;
  background: var(--surface-highest);
  transition: background 0.2s;
}
.p-create .knob {
  position: absolute;
  left: 0.06rem;
  top: 0.06rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--outline);
  transition: all 0.2s;
}
.p-create .switch.on {
  background: var(--primary);
}
.p-create .switch.on .knob {
  left: 0.5rem;
  background: var(--surface-lowest);
}

/* 说明 */
.p-create .tip {
  display: flex;
  gap: 0.2rem;
  padding: 0.28rem;
  border-radius: 0.24rem;
  background: var(--surface-lowest);
  font-size: 0.24rem;
  line-height: 1.7;
  color: var(--on-variant);
}
.p-create .tip .icon {
  margin-top: 0.04rem;
  font-size: 0.4rem;
}
.p-create .tip-title {
  font-size: 0.26rem;
  color: var(--on);
}

/* 底部主按钮 */
.p-create .cta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.24rem 0.32rem calc(0.24rem + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(16, 20, 24, 0), var(--bg) 30%);
}
.p-create .cta-btn {
  height: 1.12rem;
  font-size: 0.34rem;
  font-weight: 700;
}
.p-create .cta-btn .icon {
  font-size: 0.44rem;
}
.p-create .cta-note {
  margin-top: 0.14rem;
  text-align: center;
  font-size: 0.24rem;
  color: var(--muted);
}

/* ===== .p-room ===== */
.p-room .page {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.p-room .loading {
  padding-top: 45vh;
  text-align: center;
  color: var(--muted);
}
.p-room .pulse {
  flex: none;
  width: 0.16rem;
  height: 0.16rem;
  border-radius: 50%;
  background: var(--gold);
}
.p-room .dot {
  flex: none;
  width: 0.12rem;
  height: 0.12rem;
  border-radius: 50%;
  background: var(--primary);
}
.p-room .strong {
  font-weight: 700;
  color: var(--on);
}

/* ============ 房间大厅 ============ */
.p-room .lobby {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.16rem 0.32rem calc(0.4rem + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
}
.p-room .lobby > * {
  flex: none;
}
.p-room .room-top {
  display: flex;
  align-items: center;
  gap: 0.16rem;
}
.p-room .room-code {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 0.14rem;
  min-width: 0;
}
.p-room .room-code .pulse {
  align-self: center;
}
.p-room .room-label {
  white-space: nowrap;
  font-size: 0.24rem;
  color: var(--on-variant);
}
.p-room .room-num {
  white-space: nowrap;
  font-size: 0.54rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.02rem;
  line-height: 1.1;
}
.p-room .room-btn {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  height: 0.72rem;
  padding: 0 0.2rem;
  border-radius: 0.36rem;
  background: var(--surface-high);
  font-size: 0.26rem;
  white-space: nowrap;
}
.p-room .room-btn.square {
  width: 0.72rem;
  padding: 0;
  justify-content: center;
  color: var(--gold);
  font-size: 0.36rem;
}
.p-room .room-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.12rem;
  margin-top: 0.24rem;
}
.p-room .room-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.24rem;
  font-size: 0.26rem;
  color: var(--on-variant);
}
.p-room .room-count {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}
.p-room .room-count .strong {
  margin: 0 0.08rem;
}
.p-room .bar {
  height: 0.1rem;
  margin-top: 0.18rem;
  border-radius: 0.05rem;
  background: var(--surface-lowest);
  overflow: hidden;
}
.p-room .bar-fill {
  height: 100%;
  border-radius: 0.05rem;
  background: var(--primary);
  transition: width 0.3s;
}

/* 座位格 */
.p-room .seat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  padding: 0.24rem;
  border-radius: 0.28rem;
  background: radial-gradient(ellipse at center, #0f4636 0%, #0a2f25 100%);
  box-shadow: inset 0 0 0.6rem rgba(0, 0, 0, 0.45);
}
.p-room .cell {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  width: calc(50% - 0.1rem) !important;
  padding: 0.2rem;
  border-radius: 0.22rem;
  background: rgba(11, 15, 18, 0.72);
}
.p-room .cell.empty {
  display: flex;
  width: calc(50% - 0.1rem) !important;
  padding: 0.2rem;
  border-radius: 0.22rem;
  background: rgba(11, 15, 18, 0.4);
}
.p-room .cell-avatar {
  width: 0.96rem;
  height: 0.96rem;
  font-size: 0.4rem;
}
.p-room .cell-avatar.host {
  border-color: var(--gold);
}
.p-room .cell-avatar.ghost {
  border-color: transparent;
  background: var(--surface-high);
  color: var(--muted);
  font-size: 0.44rem;
}
.p-room .host-tag {
  position: absolute;
  left: 50%;
  bottom: -0.14rem;
  transform: translateX(-50%);
  padding: 0 0.12rem;
  border-radius: 0.12rem;
  background: var(--gold);
  color: var(--on-gold);
  font-size: 0.18rem;
  font-weight: 700;
  white-space: nowrap;
}
.p-room .cell-main {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.p-room .cell-name {
  font-size: 0.28rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.p-room .cell-status {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  font-size: 0.22rem;
  color: var(--gold);
}
.p-room .cell-status .dot {
  background: var(--gold);
}
.p-room .cell-status.on {
  color: var(--on-variant);
}
.p-room .cell-status.on .dot {
  background: var(--primary);
}
.p-room .cell-chips {
  display: flex;
  align-items: center;
  gap: 0.08rem;
  font-size: 0.26rem;
  font-weight: 600;
}
.p-room .cell-invite {
  font-size: 0.24rem;
  font-weight: 600;
}

/* 快捷短语 */
.p-room .chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.2rem;
}
.p-room .chat-title {
  display: flex;
  align-items: center;
  gap: 0.12rem;
  font-size: 0.26rem;
  font-weight: 600;
}
.p-room .chat-title .icon {
  font-size: 0.34rem;
}
.p-room .chat-tip {
  font-size: 0.22rem;
}
.p-room .chat-scroll {
  width: 100%;
  white-space: nowrap;
}
.p-room .chat-row {
  display: inline-flex;
  gap: 0.16rem;
}
.p-room .phrase {
  height: 0.68rem;
  line-height: 0.68rem;
  padding: 0 0.28rem;
  border-radius: 0.34rem;
  background: var(--surface-high);
  font-size: 0.26rem;
}
.p-room .chat-last {
  margin-top: 0.2rem;
  font-size: 0.24rem;
  color: var(--on-variant);
}

.p-room .btn.invite {
  display: flex;
  height: 1.04rem;
  border-radius: 0.2rem;
  background: var(--surface-high);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.32rem;
  font-weight: 700;
}
.p-room .invite .icon {
  font-size: 0.44rem;
}
.p-room .start {
  height: 1.04rem;
  font-size: 0.32rem;
  font-weight: 700;
}
.p-room .start .icon {
  font-size: 0.4rem;
}
.p-room .lobby-foot {
  display: flex;
  justify-content: space-between;
  font-size: 0.24rem;
  color: var(--muted);
}
.p-room .leave {
  color: var(--red);
}

/* ============ 牌桌 ============ */
.p-room .infobar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.12rem;
  margin: 0.08rem 0.24rem 0.16rem;
  padding: 0.14rem 0.16rem 0.14rem 0.24rem;
  border-radius: 0.24rem;
  background: var(--surface);
  border: 1px solid var(--hair);
}
.p-room .info-left {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.08rem;
  font-size: 0.24rem;
  white-space: nowrap;
  overflow: hidden;
}
.p-room .sep {
  width: 1px;
  height: 0.28rem;
  background: var(--outline);
}
.p-room .info-v {
  font-weight: 700;
}
.p-room .info-btn {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.08rem;
  height: 0.64rem;
  padding: 0 0.2rem;
  border-radius: 0.16rem;
  background: var(--surface-high);
  font-size: 0.24rem;
  font-weight: 600;
}
.p-room .info-btn.square {
  width: 0.64rem;
  padding: 0;
  font-size: 0.34rem;
}

.p-room .table-felt {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 0 0.16rem;
  border-radius: 1.1rem;
  background: radial-gradient(ellipse at 50% 45%, #17574a 0%, var(--felt) 55%, #0a2f25 100%);
  border: 0.1rem solid #0f4a3a;
  box-shadow: inset 0 0 0.8rem rgba(0, 0, 0, 0.45);
}

/* 其他玩家：以头像中心为定位点 */
.p-room .seat {
  position: absolute;
  width: 1.4rem;
  transform: translate(-50%, -0.44rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}
.p-room .seat.dim {
  opacity: 0.45;
}
.p-room .seat-avatar {
  width: 0.88rem;
  height: 0.88rem;
  font-size: 0.36rem;
  background: var(--surface);
}
/* 轮到谁：哑光金描边 + 柔和外发光 */
.p-room .seat.turn .seat-avatar,
.p-room .me-pod.turn .me-avatar {
  border-color: var(--gold);
  box-shadow: 0 0 0 0.06rem rgba(212, 175, 55, 0.25);
}
.p-room .seat.winner .seat-avatar,
.p-room .me-pod.winner .me-avatar {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.06rem rgba(163, 208, 190, 0.25);
}
.p-room .seat.pick .seat-avatar {
  border-color: var(--red);
  box-shadow: 0 0 0 0.08rem rgba(255, 109, 107, 0.3);
}
.p-room .seat-badge {
  position: absolute;
  right: -0.16rem;
  top: -0.1rem;
  min-width: 0.36rem;
  height: 0.36rem;
  line-height: 0.36rem;
  padding: 0 0.08rem;
  border-radius: 0.18rem;
  background: var(--gold);
  color: var(--on-gold);
  font-size: 0.18rem;
  font-weight: 800;
  text-align: center;
}
.p-room .seat-state {
  position: absolute;
  right: -0.2rem;
  bottom: -0.08rem;
  height: 0.32rem;
  line-height: 0.32rem;
  padding: 0 0.1rem;
  border-radius: 0.16rem;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.18rem;
  font-weight: 700;
  white-space: nowrap;
}
.p-room .seat.dim .seat-state {
  background: var(--surface-highest);
  color: var(--on-variant);
}
.p-room .seat-timer {
  position: absolute;
  left: -0.16rem;
  top: -0.1rem;
  min-width: 0.36rem;
  height: 0.36rem;
  line-height: 0.36rem;
  padding: 0 0.08rem;
  border-radius: 0.18rem;
  background: var(--surface-lowest);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.2rem;
  font-weight: 700;
  text-align: center;
}
.p-room .seat-name {
  max-width: 1.4rem;
  margin-top: 0.06rem;
  font-size: 0.24rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.p-room .seat.turn .seat-name {
  color: var(--gold);
}
.p-room .seat-chips {
  font-size: 0.22rem;
  color: var(--on-variant);
}
.p-room .seat-pill {
  flex: none;
  height: 0.4rem;
  line-height: 0.4rem;
  margin-top: 0.06rem;
  padding: 0 0.16rem;
  border-radius: 0.2rem;
  background: rgba(11, 15, 18, 0.75);
  font-size: 0.22rem;
  font-weight: 700;
  white-space: nowrap;
}
.p-room .seat-pill.bet {
  color: var(--gold);
}
.p-room .seat-pill.think {
  background: rgba(233, 195, 73, 0.16);
  color: var(--gold);
}
.p-room .seat-pill.allin {
  background: #6f000f;
  color: #ffdad7;
}
.p-room .seat-pill.win {
  color: var(--primary);
}
.p-room .seat-pill.lose {
  color: var(--tertiary, #ffb3af);
}
.p-room .seat-pill.muted {
  color: var(--muted);
  font-weight: 400;
}
.p-room .seat-cards {
  display: flex;
  margin-top: 0.06rem;
}
.p-room .seat-card + .seat-card {
  margin-left: -0.1rem;
}
.p-room .seat-hand {
  font-size: 0.2rem;
  color: var(--gold);
  white-space: nowrap;
}

/* 牌桌中央 */
.p-room .center {
  position: absolute;
  left: 50%;
  top: 47%;
  width: 4.4rem;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.14rem;
  text-align: center;
  z-index: 1;
}
.p-room .stage {
  display: flex;
  align-items: center;
  gap: 0.12rem;
  height: 0.52rem;
  padding: 0 0.24rem;
  border-radius: 0.26rem;
  background: rgba(11, 15, 18, 0.6);
  font-size: 0.24rem;
  white-space: nowrap;
}
.p-room .pot {
  display: flex;
  align-items: center;
  gap: 0.18rem;
  padding: 0.14rem 0.36rem 0.14rem 0.22rem;
  border-radius: 0.28rem;
  background: rgba(11, 15, 18, 0.82);
  text-align: left;
}
.p-room .pot-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.64rem;
  height: 0.64rem;
  border-radius: 50%;
  background: #b89528;
  color: var(--on-gold);
  font-size: 0.4rem;
}
.p-room .pot-label {
  font-size: 0.2rem;
  font-weight: 600;
  letter-spacing: 0.02rem;
  color: var(--on-variant);
}
.p-room .pot-num {
  font-size: 0.46rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--gold);
}
.p-room .board {
  display: flex;
  gap: 0.06rem;
}
.p-room .banner {
  padding: 0.08rem 0.24rem;
  border-radius: 0.16rem;
  background: rgba(11, 15, 18, 0.7);
  color: var(--gold);
  font-size: 0.26rem;
  font-weight: 700;
}
.p-room .center-hint {
  font-size: 0.24rem;
  color: var(--on-variant);
}
.p-room .center-start {
  height: 0.8rem;
  padding: 0 0.4rem;
}
.p-room .bubble {
  position: absolute;
  left: 0.4rem;
  bottom: 0.28rem;
  max-width: 70%;
  padding: 0.12rem 0.28rem;
  border-radius: 0.36rem;
  background: rgba(49, 53, 58, 0.92);
  font-size: 0.26rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 3;
}

/* ============ 操作区 ============ */
.p-room .dock {
  position: relative;
  flex: none;
  padding: 0.16rem 0.24rem calc(0.2rem + env(safe-area-inset-bottom));
}
.p-room .me-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.16rem;
  min-height: 1.5rem;
}
.p-room .me-pod {
  display: flex;
  align-items: center;
  gap: 0.18rem;
  min-width: 0;
  padding: 0.16rem 0.24rem 0.16rem 0.16rem;
  border-radius: 0.28rem;
  background: var(--surface);
  border: 1px solid var(--hair);
}
.p-room .me-avatar {
  width: 0.88rem;
  height: 0.88rem;
  font-size: 0.36rem;
  border-color: var(--gold);
}
.p-room .me-main {
  min-width: 0;
}
.p-room .me-name {
  font-size: 0.28rem;
  font-weight: 700;
  white-space: nowrap;
}
.p-room .me-you {
  margin-left: 0.06rem;
  padding: 0 0.1rem;
  border-radius: 0.1rem;
  background: var(--felt);
  color: var(--primary);
  font-size: 0.2rem;
  font-weight: 600;
}
.p-room .me-chips {
  font-size: 0.32rem;
  font-weight: 700;
}
.p-room .pts {
  font-size: 0.22rem;
  font-weight: 400;
}
.p-room .me-cards {
  flex: none;
}
.p-room .me-cards.dim {
  opacity: 0.45;
}
.p-room .hand-pill {
  position: absolute;
  right: 0.24rem;
  top: -0.52rem;
  display: flex;
  align-items: center;
  gap: 0.1rem;
  height: 0.48rem;
  padding: 0 0.2rem;
  border-radius: 0.24rem;
  background: var(--surface);
  border: 1px solid var(--hair);
  color: var(--gold);
  font-size: 0.24rem;
  font-weight: 600;
  z-index: 4;
}
.p-room .hand-pill .dot {
  background: var(--gold);
}
/* 手牌扇形展开，向上探出一点压在牌桌边缘 */
.p-room .fan {
  display: flex;
  margin-top: -0.4rem;
  padding-right: 0.08rem;
}
.p-room .fan-card + .fan-card {
  margin-left: -0.36rem;
}
.p-room .fan.n2 .fan-card + .fan-card {
  margin-left: -0.2rem;
}
.p-room .fan.n3 .c0 {
  transform: rotate(-9deg) translateY(0.08rem);
}
.p-room .fan.n3 .c2 {
  transform: rotate(9deg) translateY(0.08rem);
}
.p-room .fan.n2 .c0 {
  transform: rotate(-6deg);
}
.p-room .fan.n2 .c1 {
  transform: rotate(6deg);
}

.p-room .hint-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 0.56rem;
  font-size: 0.24rem;
}
.p-room .quick {
  display: flex;
  gap: 0.12rem;
  padding: 0.12rem;
  margin-bottom: 0.16rem;
  border-radius: 0.2rem;
  background: var(--surface);
}
.p-room .q {
  flex: 1;
  height: 0.6rem;
  line-height: 0.6rem;
  text-align: center;
  border-radius: 0.14rem;
  background: var(--surface-high);
  font-size: 0.26rem;
  font-weight: 600;
  white-space: nowrap;
}
.p-room .q:last-child {
  color: var(--gold);
}
.p-room .q.off,
.p-room .ab.off {
  opacity: 0.38;
}

/* 主操作按钮 */
.p-room .acts {
  display: flex;
  gap: 0.14rem;
}
.p-room .ab {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.06rem;
  height: 1.32rem;
  border-radius: 0.24rem;
  background: var(--surface-high);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.28rem;
  font-weight: 700;
  white-space: nowrap;
}
.p-room .ab .icon {
  font-size: 0.44rem;
}
.p-room .ab.fold {
  background: var(--red-dim);
  border-color: rgba(224, 82, 82, 0.4);
  color: var(--red);
}
.p-room .ab.call {
  background: linear-gradient(120deg, #c9a52e, #f3d573);
  border-color: transparent;
  color: var(--on-gold);
}
.p-room .ab.active {
  border-color: var(--gold);
}
.p-room .ab.wide {
  flex: 1.5;
}
.p-room .ab-big {
  font-size: 0.32rem;
  font-weight: 800;
}
.p-room .ab-sub {
  font-size: 0.2rem;
  font-weight: 600;
  letter-spacing: 0.01rem;
  opacity: 0.75;
}
.p-room .acts.three .ab {
  height: 1.16rem;
}

/* 德州加注面板 */
.p-room .raise-panel {
  margin: 0.08rem 0 0.16rem;
  padding: 0.18rem 0.2rem;
  border-radius: 0.24rem;
  background: var(--surface);
  border: 1px solid var(--hair);
}
.p-room .raise-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 0.24rem;
}
.p-room .raise-num {
  font-size: 0.4rem;
  font-weight: 800;
}
.p-room .slider-row {
  display: flex;
  align-items: center;
  gap: 0.08rem;
  margin: 0.06rem 0 0.12rem;
}
.p-room .step {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.68rem;
  height: 0.68rem;
  border-radius: 0.18rem;
  background: var(--surface-high);
  font-size: 0.36rem;
}
.p-room .slider {
  flex: 1;
  margin: 0 0.12rem;
}
.p-room .presets {
  display: flex;
  gap: 0.1rem;
}
.p-room .preset {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 0.76rem;
  border-radius: 0.14rem;
  background: var(--surface-high);
  font-size: 0.22rem;
  line-height: 1.25;
  white-space: nowrap;
}
.p-room .preset-v {
  color: var(--on-variant);
}
.p-room .preset.allin {
  background: #4a0d14;
  color: #ffdad7;
}
.p-room .preset.allin .preset-v {
  color: #ffb3af;
}

/* ============ 单局结算 ============ */
.p-room .res-title {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
}
.p-room .res-icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 0.2rem;
  background: rgba(233, 195, 73, 0.14);
  color: var(--gold);
  font-size: 0.44rem;
}
.p-room .res-sub {
  font-size: 0.24rem;
  color: var(--on-variant);
}
.p-room .res-pot {
  flex: none;
  text-align: right;
}
.p-room .res-pot-label {
  font-size: 0.22rem;
  color: var(--muted);
}
.p-room .res-pot-num {
  font-size: 0.4rem;
  font-weight: 800;
}
.p-room .res-row,
.p-room .rank-row {
  display: flex;
  align-items: center;
  gap: 0.18rem;
  margin-top: 0.14rem;
  padding: 0.2rem 0.24rem;
  border-radius: 0.2rem;
  background: var(--surface);
}
.p-room .res-row.first,
.p-room .rank-row.first {
  background: var(--surface-high);
  border: 1px solid var(--hair);
}
.p-room .res-rank {
  width: 0.32rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.26rem;
}
.p-room .res-row.first .res-rank {
  color: var(--gold);
  font-weight: 700;
}
.p-room .res-avatar {
  width: 0.72rem;
  height: 0.72rem;
  font-size: 0.3rem;
}
.p-room .res-main {
  flex: 1;
  min-width: 0;
}
.p-room .res-name {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.28rem;
  font-weight: 700;
  white-space: nowrap;
}
.p-room .res-hand {
  height: 0.36rem;
  font-size: 0.2rem;
}
.p-room .res-note {
  font-size: 0.22rem;
  color: var(--muted);
}
.p-room .res-cards {
  flex: none;
  display: flex;
}
.p-room .res-delta {
  flex: none;
  min-width: 1.1rem;
  text-align: right;
  font-size: 0.32rem;
  font-weight: 700;
  color: var(--muted);
}
.p-room .res-delta.win {
  color: var(--gold);
}

/* ============ 全员战报 ============ */
.p-room .settle {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.p-room .settle-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.16rem 0.32rem 0.32rem;
}
.p-room .settle-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.12rem;
}
.p-room .pill {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  height: 0.56rem;
  padding: 0 0.22rem;
  border-radius: 0.28rem;
  background: var(--surface);
  border: 1px solid var(--hair);
  font-size: 0.24rem;
}
.p-room .hero {
  margin-top: 0.24rem;
  padding: 0.56rem 0.28rem 0.28rem;
  border-radius: 0.28rem;
  background: linear-gradient(180deg, #14503f 0%, var(--felt) 45%, #0c2a22 100%);
  border: 1px solid var(--hair);
  text-align: center;
}
.p-room .hero-avatar {
  position: relative;
  width: 1.6rem;
  margin: 0 auto;
}
.p-room .hero-face {
  width: 1.6rem;
  height: 1.6rem;
  font-size: 0.68rem;
  border-color: var(--primary);
  background: var(--surface-low);
}
.p-room .hero-medal {
  position: absolute;
  left: 50%;
  top: -0.36rem;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.64rem;
  height: 0.64rem;
  border-radius: 50%;
  background: var(--gold);
  color: var(--on-gold);
  font-size: 0.36rem;
  z-index: 1;
}
.p-room .hero-tag {
  position: absolute;
  left: 50%;
  bottom: -0.16rem;
  transform: translateX(-50%);
  padding: 0.02rem 0.2rem;
  border-radius: 0.16rem;
  background: var(--gold);
  color: var(--on-gold);
  font-size: 0.2rem;
  font-weight: 800;
}
.p-room .hero-name {
  margin-top: 0.36rem;
  font-size: 0.34rem;
  font-weight: 700;
}
.p-room .hero-sub {
  font-size: 0.24rem;
  color: var(--on-variant);
}
.p-room .hero-net {
  margin-top: 0.12rem;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
}
.p-room .hero-pts {
  font-size: 0.26rem;
  font-weight: 600;
  color: var(--on-variant);
}
.p-room .hero-stats {
  display: flex;
  gap: 0.14rem;
  margin-top: 0.24rem;
}
.p-room .stat {
  flex: 1;
  padding: 0.18rem 0;
  border-radius: 0.18rem;
  background: rgba(11, 15, 18, 0.7);
}
.p-room .stat-label {
  font-size: 0.22rem;
  color: var(--on-variant);
}
.p-room .stat-v {
  font-size: 0.34rem;
  font-weight: 700;
}
.p-room .settle-title {
  display: flex;
  align-items: center;
  gap: 0.12rem;
  margin: 0.36rem 0 0.08rem;
  font-size: 0.34rem;
  font-weight: 700;
}
.p-room .settle-unit {
  margin-left: auto;
  font-size: 0.22rem;
  font-weight: 400;
}
.p-room .rank-no {
  flex: none;
  width: 0.48rem;
  height: 0.48rem;
  line-height: 0.48rem;
  border-radius: 50%;
  background: var(--surface-highest);
  text-align: center;
  font-size: 0.24rem;
  font-weight: 700;
}
.p-room .rank-no.top {
  background: var(--gold);
  color: var(--on-gold);
}
.p-room .rank-side {
  flex: none;
  text-align: right;
}
.p-room .rank-net {
  font-size: 0.36rem;
  font-weight: 700;
  color: var(--on-variant);
}
.p-room .rank-net.win {
  color: var(--primary);
}
.p-room .rank-net.lose {
  color: var(--muted);
}
.p-room .rank-sub {
  font-size: 0.2rem;
  color: var(--muted);
}
.p-room .settle-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  margin-top: 0.36rem;
  font-size: 0.22rem;
  color: var(--muted);
}
.p-room .settle-foot {
  flex: none;
  padding: 0.2rem 0.32rem calc(0.2rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--hair);
}

.p-room .rank-row .res-name {
  display: flex;
  align-items: center;
  gap: 0.12rem;
}
