/* PC 聊天室：结构对齐参考图，配色跟随社区主题变量；宽度与顶部主内容对齐 */
.plaza-main.pr-layout {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  grid-template-columns: none;
}

.pr-layout {
  width: 100%;
  --pr-gold: var(--accent, #2563eb);
  --pr-gold-ink: var(--accent-ink, #fff);
  --pr-gold-soft: var(--accent-soft, rgba(37, 99, 235, .12));
  --pr-gold-lite: var(--brand-lite, var(--accent-deep, var(--accent, #1d4ed8)));
  --pr-danger: var(--danger, #dc2626);
  --pr-ball: var(--accent, #2563eb);
  --pr-bg: var(--surface, #fff);
  --pr-bg-2: var(--bg, #f6f9fe);
  --pr-panel: var(--chip, #e9effd);
  --pr-bubble: var(--chip, #f1f5f9);
  --pr-border: var(--line, rgba(15, 23, 42, .08));
  --pr-text: var(--text, #0f172a);
  --pr-muted: var(--muted, #64748b);
  --pr-input: var(--bg, #f8fafc);
}

.pr-room {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: min(78vh, 860px);
  max-height: calc(100vh - 140px);
  border-radius: var(--radius-sm, 12px) var(--radius-sm, 12px) 0 0;
  overflow: hidden;
  background: var(--pr-bg);
  color: var(--pr-text);
  border: 1px solid var(--pr-border);
  border-bottom: 0;
  box-shadow: none;
  position: relative;
  font-family: var(--font, system-ui, sans-serif);
}

.pr-head {
  flex: 0 0 auto;
  padding: 12px 14px 10px;
  background: linear-gradient(180deg, var(--accent-soft, rgba(37,99,235,.08)), var(--pr-bg));
  border-bottom: 1px solid var(--pr-border);
}

.pr-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pr-issue-line {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
}

.pr-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 12px;
}

.pr-countdown {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--pr-text);
  display: flex;
  align-items: center;
}

.pr-wallet {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  line-height: 1;
}

.pr-gold-label {
  font-size: 12px;
  color: var(--pr-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  line-height: 1;
}

.pr-refresh {
  border: 0;
  background: transparent;
  color: var(--pr-gold);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  font-size: 14px;
}

.pr-gold-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.pr-balance,
#pr-balance {
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--pr-text);
}

.pr-wallet-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--pr-gold);
  color: var(--pr-gold-ink);
  font-size: 12px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  text-decoration: none !important;
  white-space: nowrap;
  line-height: 1;
}

.pr-last {
  width: 100%;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--pr-border);
  background: var(--pr-panel);
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.pr-last-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}

.pr-last-label {
  font-size: 12px;
  color: var(--pr-muted);
  white-space: nowrap;
}

.pr-balls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pr-ball {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.18);
}

.pr-ball.is-n {
  background: linear-gradient(160deg, color-mix(in srgb, var(--pr-ball) 75%, #fff), var(--pr-ball));
}

.pr-ball.is-sum {
  background: linear-gradient(160deg, color-mix(in srgb, var(--pr-danger) 70%, #fff), var(--pr-danger));
}

.pr-eq {
  color: var(--pr-muted);
  font-weight: 600;
}

.pr-tags {
  color: var(--pr-gold-lite);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
}

.pr-last-arrow {
  color: var(--pr-muted);
  font-size: 18px;
  flex: 0 0 auto;
  transition: transform .2s ease;
}

.pr-last.is-open .pr-last-arrow {
  transform: rotate(180deg);
}

.pr-recent-drop,
.pr-stake-drop {
  margin-top: 8px;
  border-radius: 10px;
  border: 1px solid var(--pr-border);
  background: var(--pr-bg-2);
  max-height: 180px;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--pr-gold) 45%, #94a3b8) var(--chip, #eef2f7);
}

.pr-recent-drop ul,
.pr-stake-drop ul {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}

.pr-recent-drop li,
.pr-stake-drop li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 12px;
  font-size: 12px;
  color: var(--pr-muted);
  border-bottom: 1px dashed var(--pr-border);
}

.pr-recent-drop li:last-child,
.pr-stake-drop li:last-child {
  border-bottom: 0;
}

.pr-recent-drop strong,
.pr-stake-drop strong {
  color: var(--pr-text);
  font-weight: 600;
}

.pr-stake-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 10px auto 0;
  min-width: 148px;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--pr-border);
  background: var(--pr-bg);
  color: var(--pr-text);
  font-size: 13px;
  cursor: pointer;
}

.pr-stake-pill b {
  color: var(--pr-gold);
  font-variant-numeric: tabular-nums;
}

.pr-feed-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.pr-chat {
  flex: 1 1 auto;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  /* 滚动区独立成一片：内部消息重排重绘不波及卡片外部，滚动更稳 */
  contain: layout paint;
  padding: 12px 14px 56px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* 勿用 smooth：轮询贴底会与手指滚动打架，表现为上拉下滑卡住 */
  scroll-behavior: auto;
  background: var(--pr-bg-2);
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--pr-gold) 45%, #94a3b8) var(--chip, #eef2f7);
}

.pr-chat::-webkit-scrollbar,
.pr-recent-drop::-webkit-scrollbar,
.pr-stake-drop::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.pr-chat::-webkit-scrollbar-track,
.pr-recent-drop::-webkit-scrollbar-track,
.pr-stake-drop::-webkit-scrollbar-track {
  background: var(--chip, #eef2f7);
  border-radius: 999px;
  margin: 6px 0;
}

.pr-chat::-webkit-scrollbar-thumb,
.pr-recent-drop::-webkit-scrollbar-thumb,
.pr-stake-drop::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--pr-gold) 70%, #fff),
    var(--pr-gold)
  );
  border-radius: 999px;
  border: 2px solid var(--chip, #eef2f7);
  background-clip: padding-box;
}

.pr-chat::-webkit-scrollbar-thumb:hover,
.pr-recent-drop::-webkit-scrollbar-thumb:hover,
.pr-stake-drop::-webkit-scrollbar-thumb:hover {
  background: var(--pr-gold);
  border-color: var(--chip, #eef2f7);
}

.pr-chat::-webkit-scrollbar-corner,
.pr-recent-drop::-webkit-scrollbar-corner,
.pr-stake-drop::-webkit-scrollbar-corner {
  background: transparent;
}

.pr-msg {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 5px 10px;
  align-items: start;
}

.pr-avatar-wrap {
  grid-column: 1;
  grid-row: 1 / span 3;
  width: 40px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 1px;
  overflow: visible;
}

.pr-avatar-wrap .pr-uc-avatar,
.pr-avatar-wrap .uc-avatar {
  display: block;
  line-height: 0;
}

.pr-avatar-wrap .uc-avatar-img {
  width: 36px;
  height: 36px;
  border-width: 2px;
}

.pr-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--pr-gold) 70%, #fff), var(--pr-gold));
  color: var(--pr-gold-ink);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--pr-gold) 35%, transparent);
}

.pr-avatar.is-letter {
  flex: 0 0 auto;
}

.pr-msg-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  line-height: 1.15;
  grid-column: 2;
  margin: 0;
  padding: 0;
}

.pr-msg-name {
  color: var(--pr-gold);
  font-size: 12px;
  font-weight: 700;
}

.pr-msg-time {
  grid-column: 2;
  color: var(--pr-muted);
  font-size: 11px;
  line-height: 1.2;
  margin: 0;
  padding: 0;
}

.pr-bubble {
  grid-column: 2;
  justify-self: start;
  max-width: min(100%, 640px);
  margin: 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--pr-bg);
  border: 1px solid var(--pr-border);
  color: var(--pr-text);
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.pr-msg.is-user .pr-bubble {
  background: var(--accent-soft, rgba(37,99,235,.1));
  border-color: color-mix(in srgb, var(--pr-gold) 28%, transparent);
}

/* 当前登录用户自己的消息 / 下注靠右 */
.pr-msg.is-me {
  grid-template-columns: minmax(0, 1fr) 40px;
}

.pr-msg.is-me .pr-avatar-wrap {
  grid-column: 2;
  grid-row: 1 / span 3;
}

.pr-msg.is-me .pr-msg-meta {
  grid-column: 1;
  justify-content: flex-end;
  text-align: right;
}

.pr-msg.is-me .pr-bubble {
  grid-column: 1;
  justify-self: end;
  background: color-mix(in srgb, var(--pr-gold) 16%, #fff);
  border-color: color-mix(in srgb, var(--pr-gold) 35%, transparent);
}

.pr-msg.is-me .pr-msg-time {
  grid-column: 1;
  text-align: right;
}

.pr-msg.is-draw .pr-bubble {
  border-color: color-mix(in srgb, var(--pr-gold) 40%, transparent);
  background: color-mix(in srgb, var(--pr-gold) 8%, #fff);
}

.pr-float,
.pr-float-btn {
  display: none !important;
}

.pr-to-bottom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--pr-border);
  background: var(--pr-bg);
  color: var(--pr-text-soft, var(--pr-muted));
  font-size: 12px;
  cursor: pointer;
  box-shadow: var(--card-shadow, 0 2px 8px rgba(15,23,42,.08));
}

.pr-to-bottom[hidden] {
  display: none !important;
}

.pr-compose {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0;
  padding: 10px 12px 12px;
  border-radius: 0 0 var(--radius-sm, 12px) var(--radius-sm, 12px);
  border: 1px solid var(--pr-border, var(--line, rgba(15, 23, 42, .08)));
  border-top: 1px solid var(--pr-border, var(--line, rgba(15, 23, 42, .08)));
  background: var(--pr-bg, var(--surface, #fff));
  box-shadow: var(--card-shadow, 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.05));
  box-sizing: border-box;
}

/* 未登录：整条指令输入区（输入框 + 发送）不显示 */
.pr-compose[hidden] {
  display: none !important;
}

/* 输入区隐藏后，房间卡片补齐下边框与圆角 */
.pr-room.is-no-compose {
  border-bottom: 1px solid var(--pr-border) !important;
  border-radius: var(--radius-sm, 12px) !important;
}

.pr-input {
  flex: 1;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--stroke-strong, var(--pr-border));
  background: var(--pr-input);
  color: var(--pr-text);
  padding: 0 16px;
  outline: none;
}

.pr-input::placeholder {
  color: var(--pr-muted);
}

.pr-input:focus {
  border-color: var(--pr-gold);
  box-shadow: 0 0 0 3px var(--pr-gold-soft);
}

.pr-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--pr-gold);
  color: var(--pr-gold-ink);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  flex: 0 0 auto;
  box-shadow: 0 6px 16px var(--pr-gold-soft);
  box-sizing: border-box;
}

.pr-send[hidden] {
  display: none !important;
}

.pr-send:active {
  transform: scale(.96);
}

.pr-modal {
  position: fixed;
  inset: 0;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  background: var(--overlay, rgba(15,23,42,.45));
  display: grid;
  place-items: center;
  z-index: 230;
  padding: 16px;
  margin: 0;
  overflow: auto;
}

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

.pr-modal-card {
  width: min(440px, 100%);
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  background: var(--surface, #fff);
  color: var(--text, #0f172a);
  border-radius: 14px;
  border: 1px solid var(--line, rgba(15, 23, 42, .08));
  padding: 16px 18px 18px;
  box-shadow: var(--card-shadow-hover, 0 8px 28px rgba(15,23,42,.12));
  overflow: hidden;
}

.pr-modal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.pr-modal-card h3 {
  margin: 0;
  color: var(--accent, #2563eb);
  font-size: 16px;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}

.pr-modal-x {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--chip, #eef2f7);
  color: var(--muted, #64748b);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.pr-modal-card pre {
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: anywhere;
  font-family: inherit;
  color: var(--muted, #64748b);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
  max-height: 50vh;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.pr-modal-card pre::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.pr-modal-card > button {
  border: 0;
  background: var(--accent, #2563eb);
  color: var(--accent-ink, #fff);
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 14px;
}

/* 开奖校验 */
.pr-verify-modal {
  place-items: end center;
  padding: 0;
  align-content: end;
}

.pr-verify-panel {
  width: min(560px, 100%);
  max-width: 100vw;
  max-height: 50vh;
  height: 50vh;
  box-sizing: border-box;
  background: var(--surface, #fff);
  color: var(--text, #0f172a);
  border-radius: 16px 16px 0 0;
  border: 1px solid var(--line, rgba(15,23,42,.08));
  border-bottom: 0;
  box-shadow: 0 -12px 40px rgba(15, 23, 42, .18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0 auto;
}

.pr-verify-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line, rgba(0,0,0,.07));
  flex: 0 0 auto;
}

.pr-verify-hd-text {
  min-width: 0;
  flex: 1;
}

.pr-verify-hd h3 {
  margin: 0 0 6px;
  font-size: 17px;
  color: var(--text, #0f172a);
}

.pr-verify-algo {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted, #64748b);
}

.pr-verify-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px 14px calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.pr-verify-list::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.pr-verify-card {
  border: 1px solid var(--line, rgba(0,0,0,.08));
  background: var(--bg, #f8fafc);
  border-radius: 12px;
  padding: 12px;
}

.pr-verify-card-hd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.pr-verify-issue {
  font-weight: 700;
  font-size: 14px;
  color: var(--text, #0f172a);
}

.pr-verify-balls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.pr-verify-ball {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  background: var(--accent, #2563eb);
  color: var(--accent-ink, #fff);
}

.pr-verify-ball.is-sum {
  background: var(--danger, #dc2626);
}

.pr-verify-op {
  color: var(--muted, #64748b);
  font-size: 12px;
  font-weight: 600;
}

.pr-verify-tags {
  font-size: 12px;
  font-weight: 650;
  color: var(--accent, #2563eb);
}

.pr-verify-groups {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-soft, #334155);
}

.pr-verify-meta {
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted, #64748b);
  word-break: break-all;
}

/* 推荐玩法 */
.pr-rec-modal {
  place-items: center;
  padding: 16px;
  background: var(--overlay, rgba(15, 23, 42, .45));
}

.pr-rec-panel {
  width: min(520px, 100%);
  max-width: calc(100vw - 32px);
  height: 50vh;
  max-height: 50vh;
  box-sizing: border-box;
  background: var(--surface, #fff);
  color: var(--text, #0f172a);
  border-radius: 16px;
  border: 1px solid var(--line, rgba(15, 23, 42, .08));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0 auto;
  box-shadow: var(--card-shadow-hover, 0 8px 28px rgba(15, 23, 42, .12));
}

.pr-rec-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  flex: 0 0 auto;
  border-bottom: 1px solid var(--line, rgba(0, 0, 0, .07));
  background: var(--surface, #fff);
}

.pr-rec-hd h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text, #0f172a);
}

.pr-rec-x {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--chip, #eef2f7);
  color: var(--muted, #64748b);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.pr-rec-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
  background: var(--bg, #f6f9fe);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.pr-rec-grid::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.pr-rec-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line, rgba(0, 0, 0, .08));
  background: var(--surface, #fff);
  color: var(--text, #0f172a);
  text-decoration: none !important;
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.pr-rec-card:hover {
  border-color: color-mix(in srgb, var(--accent, #2563eb) 35%, transparent);
  box-shadow: 0 4px 12px rgba(15, 23, 42, .06);
}

.pr-rec-ico {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
  background: var(--chip, #eef2f7);
}

.pr-rec-ico.is-rent {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #f87171, #dc2626);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
}

.pr-rec-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pr-rec-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #0f172a);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pr-rec-sub {
  font-size: 12px;
  color: var(--accent, #2563eb);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pr-rec-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted, #64748b);
  font-size: 13px;
  padding: 28px 12px;
}

/* 预测 */
.pr-predict-modal {
  place-items: center;
  padding: 16px;
}

.pr-predict-panel {
  width: min(420px, 100%);
  max-width: calc(100vw - 32px);
  max-height: min(72vh, 560px);
  box-sizing: border-box;
  background: var(--surface, #fff);
  color: var(--text, #0f172a);
  border-radius: 14px;
  border: 1px solid var(--line, rgba(15, 23, 42, .08));
  box-shadow: var(--card-shadow-hover, 0 8px 28px rgba(15, 23, 42, .12));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pr-predict-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  flex: 0 0 auto;
  border-bottom: 1px solid var(--line, rgba(0, 0, 0, .07));
}

.pr-predict-hd-text {
  min-width: 0;
  flex: 1;
}

.pr-predict-hd h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--accent, #2563eb);
}

.pr-predict-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted, #64748b);
  line-height: 1.3;
}

.pr-predict-x {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--chip, #eef2f7);
  color: var(--muted, #64748b);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.pr-predict-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px 16px 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.pr-predict-body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.pr-predict-empty {
  margin: 0;
  text-align: center;
  color: var(--muted, #64748b);
  font-size: 13px;
  padding: 28px 8px;
}

.pr-predict-tip {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted, #64748b);
  line-height: 1.45;
}

.pr-predict-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.pr-predict-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 8px 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg, #f8fafc);
  border: 1px solid var(--line, rgba(15, 23, 42, .06));
}

.pr-predict-name {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted, #64748b);
}

.pr-predict-pick {
  font-size: 16px;
  font-weight: 800;
  color: var(--text, #0f172a);
  line-height: 1.2;
  word-break: break-word;
}

.pr-predict-rate {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent, #2563eb);
  white-space: nowrap;
}

.pr-predict-note {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--text-soft, #64748b);
  line-height: 1.35;
}

.pr-predict-sec {
  margin-top: 4px;
}

.pr-predict-sec-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #0f172a);
}

.pr-predict-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pr-predict-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--chip, #eef2f7);
  color: var(--text-soft, #334155);
  font-size: 12px;
  font-weight: 650;
}

.pr-predict-tag b {
  color: var(--accent, #2563eb);
  font-weight: 800;
}

.pr-predict-tag.is-cold b {
  color: #0284c7;
}

/* 排行榜 */
.pr-rank-modal {
  place-items: center;
  padding: 16px;
}

.pr-rank-panel {
  width: min(420px, 100%);
  max-width: calc(100vw - 32px);
  max-height: min(78vh, 620px);
  box-sizing: border-box;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent, #2563eb) 10%, #fff) 0, var(--surface, #fff) 88px),
    var(--surface, #fff);
  color: var(--text, #0f172a);
  border-radius: 16px;
  border: 1px solid var(--line, rgba(15, 23, 42, .08));
  box-shadow: var(--card-shadow-hover, 0 12px 32px rgba(15, 23, 42, .14));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pr-rank-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 16px 12px;
  flex: 0 0 auto;
}

.pr-rank-hd-text {
  min-width: 0;
  flex: 1;
}

.pr-rank-hd h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text, #0f172a);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pr-rank-hd h3 i {
  color: var(--accent, #2563eb);
  font-size: 18px;
}

.pr-rank-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted, #64748b);
  line-height: 1.35;
}

.pr-rank-badge {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--accent-soft, rgba(37, 99, 235, .12));
  color: var(--accent, #2563eb);
  white-space: nowrap;
}

.pr-rank-badge.is-done {
  background: var(--success-soft, rgba(22, 163, 74, .1));
  color: var(--success, #16a34a);
}

.pr-rank-x {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .72);
  color: var(--muted, #64748b);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}

.pr-rank-filters {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 16px 4px;
  flex: 0 0 auto;
}

/* 与签到排行同结构，圆角 8px，配色走主题变量 */
.pr-rank-tabs {
  display: flex;
  gap: 0;
  margin: 0 0 12px;
  padding: 3px;
  border-radius: 8px;
  background: var(--chip, #e9effd);
}

.pr-rank-tab {
  flex: 1;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  cursor: pointer;
  height: 36px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted, #64748b);
  background: transparent;
  box-shadow: none;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.pr-rank-tab.is-on {
  color: var(--accent-ink, #fff);
  background: var(--accent, #2563eb);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent, #2563eb) 22%, transparent);
}

.pr-rank-tab.is-on::after {
  display: none;
}

.pr-rank-sort {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0;
  width: fit-content;
  margin: 0 0 10px auto;
  padding: 2px;
  border-radius: 8px;
  background: var(--chip, #e9effd);
}

.pr-rank-board {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  cursor: pointer;
  height: 28px;
  padding: 0 12px;
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted, #64748b);
  background: transparent;
  box-shadow: none;
  white-space: nowrap;
}

.pr-rank-board.is-on,
.pr-rank-board.is-on[data-rank-board="profit"],
.pr-rank-board.is-on[data-rank-board="loss"] {
  color: var(--accent, #2563eb);
  background: var(--surface, #fff);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--accent, #2563eb) 12%, transparent);
  border-color: transparent;
}

.pr-rank-me {
  margin: 0 16px 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent, #2563eb) 10%, #fff), var(--bg, #f8fafc));
  border: 1px solid color-mix(in srgb, var(--accent, #2563eb) 18%, transparent);
  font-size: 12px;
  color: var(--text-soft, #334155);
  line-height: 1.45;
  flex: 0 0 auto;
}

.pr-rank-me-title {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted, #64748b);
  letter-spacing: .02em;
}

.pr-rank-me-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pr-rank-me-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pr-rank-me-profit {
  font-size: 22px;
  font-weight: 800;
  color: #16a34a;
  line-height: 1.1;
  letter-spacing: -.01em;
}

.pr-rank-me-profit.is-neg {
  color: #dc2626;
}

.pr-rank-me-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
  min-width: 0;
}

.pr-rank-me-stat {
  min-width: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .75);
  border: 1px solid color-mix(in srgb, var(--accent, #2563eb) 12%, transparent);
}

.pr-rank-me-stat em {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted, #64748b);
  line-height: 1.2;
  white-space: nowrap;
}

.pr-rank-me-stat b {
  font-size: 14px;
  font-weight: 800;
  color: var(--text, #0f172a);
  line-height: 1.2;
  white-space: nowrap;
}

.pr-rank-me-stat.is-profit b {
  color: #16a34a;
}

.pr-rank-me-stat.is-loss b {
  color: #dc2626;
}

.pr-rank-me-stat.is-empty b {
  font-weight: 700;
  color: var(--muted, #64748b);
}

@media (max-width: 420px) {
  .pr-rank-me-main {
    align-items: flex-start;
    gap: 8px;
  }

  .pr-rank-me-stats {
    gap: 6px;
  }

  .pr-rank-me-stat {
    min-width: 0;
    padding: 6px;
  }

  .pr-rank-me-stat b {
    font-size: 13px;
  }
}

.pr-rank-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0 16px 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--bg, #f8fafc) 55%, transparent) 24px);
}

.pr-rank-body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.pr-rank-empty {
  margin: 18px 0 8px;
  text-align: center;
  color: var(--muted, #64748b);
  font-size: 13px;
  padding: 36px 12px;
  border-radius: 12px;
  background: var(--bg, #f8fafc);
  border: 1px dashed var(--line, rgba(15, 23, 42, .12));
}

/* 群聊列表弹层 */
.pr-groups-modal {
  z-index: 240;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--overlay, rgba(15, 23, 42, .45));
}
.pr-groups-modal[hidden] {
  display: none !important;
}
.pr-groups-panel {
  width: min(420px, 100%);
  max-height: min(78vh, 560px);
  overflow: auto;
  background: var(--surface, #fff);
  color: var(--text, #0f172a);
  border-radius: 16px;
  border: 1px solid var(--line, rgba(0,0,0,.08));
  box-shadow: 0 18px 48px rgba(15, 23, 42, .22);
  padding: 16px 16px 18px;
  box-sizing: border-box;
}
.pr-groups-hd {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}
.pr-groups-hd-text {
  flex: 1;
  min-width: 0;
}
.pr-groups-hd h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pr-groups-hd h3 i {
  color: #16a34a;
}
.pr-groups-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted, #64748b);
}
.pr-groups-x {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted, #64748b);
  padding: 0 2px;
}
.pr-groups-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pr-groups-empty {
  margin: 8px 0;
  text-align: center;
  color: var(--muted, #64748b);
  font-size: 13px;
  padding: 28px 12px;
  border-radius: 12px;
  background: var(--bg, #f8fafc);
  border: 1px dashed var(--line, rgba(15, 23, 42, .12));
}
.pr-groups-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line, rgba(15, 23, 42, .08));
  background: var(--bg, #f8fafc);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, background .15s ease;
}
.pr-groups-item:hover {
  border-color: color-mix(in srgb, #16a34a 35%, var(--line, #e2e8f0));
  background: #f0fdf4;
}
.pr-groups-item-ico {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #86efac, #16a34a);
  color: #fff;
  font-size: 18px;
  flex: 0 0 auto;
}
.pr-groups-item-name {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text, #0f172a);
}
.pr-groups-item-go {
  font-size: 12px;
  font-weight: 650;
  color: #16a34a;
  white-space: nowrap;
}

.pr-rank-tip {
  margin: 0 0 10px;
  font-size: 11px;
  color: var(--muted, #64748b);
  line-height: 1.45;
  padding: 0 2px;
}

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

.pr-rank-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--surface, #fff);
  border: 1px solid var(--line, rgba(15, 23, 42, .07));
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}

.pr-rank-row.is-top1 {
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent, #2563eb) 8%, #fff), #fff);
  border-color: color-mix(in srgb, var(--accent, #2563eb) 28%, transparent);
}

.pr-rank-row.is-top2 {
  background: linear-gradient(90deg, #f8fafc, #fff);
}

.pr-rank-row.is-top3 {
  background: linear-gradient(90deg, #fff7ed, #fff);
}

.pr-rank-no {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  background: var(--chip, #eef2f7);
  color: var(--muted, #64748b);
}

.pr-rank-row.is-top1 .pr-rank-no { background: color-mix(in srgb, var(--accent, #2563eb) 22%, #fff); color: var(--accent-deep, var(--accent, #1d4ed8)); }
.pr-rank-row.is-top2 .pr-rank-no { background: var(--chip, #e9effd); color: var(--text-soft, #334155); }
.pr-rank-row.is-top3 .pr-rank-no { background: color-mix(in srgb, var(--accent, #2563eb) 12%, #fff); color: var(--accent, #2563eb); }
.pr-rank-user {
  min-width: 0;
}

.pr-rank-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #0f172a);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pr-rank-meta {
  font-size: 11px;
  color: var(--muted, #64748b);
  margin-top: 2px;
}

.pr-rank-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.pr-rank-val {
  font-size: 15px;
  font-weight: 800;
  color: #16a34a;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pr-rank-val.is-neg {
  color: #dc2626;
}

.pr-rank-reward {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 8px;
  background: var(--accent-soft, rgba(37, 99, 235, .12));
  color: var(--accent, #2563eb);
  white-space: nowrap;
}

.pr-rank-reward.is-paid {
  background: var(--success-soft, rgba(22, 163, 74, .1));
  color: var(--success, #16a34a);
}

/* 追号 */
.pr-chase-modal {
  place-items: center;
  padding: 16px;
}

.pr-chase-panel {
  width: min(400px, 100%);
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  background: var(--surface, #fff);
  color: var(--text, #0f172a);
  border-radius: 14px;
  border: 1px solid var(--line, rgba(15, 23, 42, .08));
  box-shadow: var(--card-shadow-hover, 0 8px 28px rgba(15, 23, 42, .12));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pr-chase-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  flex: 0 0 auto;
  box-sizing: border-box;
}

.pr-chase-hd h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--accent, #2563eb);
  flex: 1;
  min-width: 0;
}

.pr-chase-x {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--chip, #eef2f7);
  color: var(--muted, #64748b);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.pr-chase-body {
  padding: 4px 16px 16px;
}

.pr-chase-summary {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg, #f8fafc);
  color: var(--text-soft, #334155);
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
  max-height: 120px;
  overflow: auto;
}

.pr-chase-label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  color: var(--text, #0f172a);
  margin-bottom: 8px;
}

.pr-chase-periods {
  margin-bottom: 12px;
}

.pr-chase-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-soft, #334155);
  margin-bottom: 10px;
  cursor: pointer;
  user-select: none;
}

.pr-chase-check input {
  width: 16px;
  height: 16px;
}

.pr-chase-total {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted, #64748b);
}

.pr-chase-total b {
  color: var(--accent, #2563eb);
  font-weight: 700;
}

.pr-chase-body .pr-sheet-btn {
  width: 100%;
}

.pr-cancel {
  border: 1px solid var(--pr-border);
  background: transparent;
  color: var(--pr-gold);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  cursor: pointer;
}

/* 上方入口：移动端一行；PC 双排矩形见下方 media */
.pr-entries {
  display: flex;
  position: relative;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
  margin: 0;
  padding: 8px 6px 4px;
  border-radius: var(--radius-sm, 12px);
  background: var(--surface, #fff);
  border: 1px solid var(--line, rgba(0,0,0,.07));
  box-shadow: var(--card-shadow, 0 1px 2px rgba(0,0,0,.03), 0 8px 24px rgba(0,0,0,.05));
  box-sizing: border-box;
}

.pr-entries-m {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px 4px;
  justify-items: center;
  align-items: start;
}

.pr-entries-m .pr-entry {
  width: 100%;
  max-width: 72px;
}

.pr-entries-m .pr-entry[hidden] {
  display: none !important;
}

.pr-entries-m:has(.js-pr-recommend[hidden]) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pr-entries-pc {
  display: none;
}

.pr-entries.is-guest {
  margin-bottom: 0;
}

.pr-entry {
  appearance: none;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  cursor: pointer;
  color: var(--text-soft, #334155);
  min-width: 0;
}

.pr-entry-ico {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 20px;
  box-shadow: 0 6px 14px rgba(15, 23, 42, .12);
}

.pr-entry-ico.is-credit { background: linear-gradient(145deg, #34d399, #059669); }
.pr-entry-ico.is-table { background: linear-gradient(145deg, #fb923c, #ea580c); }
.pr-entry-ico.is-quick { background: linear-gradient(145deg, #f87171, #e11d48); }
.pr-entry-ico.is-recommend { background: linear-gradient(145deg, #fbbf24, #d97706); }
.pr-entry-ico.is-more { background: linear-gradient(145deg, #94a3b8, #64748b); }
.pr-entry-ico.is-predict { background: linear-gradient(145deg, #38bdf8, #0284c7); }
.pr-entry-ico.is-rank { background: linear-gradient(145deg, var(--brand-lite, #719af2), var(--accent, #2563eb)); }
.pr-entry-ico.is-recharge { background: linear-gradient(145deg, #facc15, #ca8a04); }
.pr-entry-ico.is-bets { background: linear-gradient(145deg, #a78bfa, #7c3aed); }
.pr-entry-ico.is-verify { background: linear-gradient(145deg, #2dd4bf, #0f766e); }
.pr-entry-ico.is-rules { background: linear-gradient(145deg, #67e8f9, #0891b2); }
.pr-entry-ico.is-groups { background: linear-gradient(145deg, #86efac, #16a34a); }
.pr-entry-txt {
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #0f172a);
  line-height: 1.2;
}
.pr-entry-desc {
  display: none;
}

.pr-entry:active .pr-entry-ico {
  transform: scale(.96);
}

/* 更多：底部滑出，每行两个矩形（留白宽松） */
.pr-sheet-more {
  max-height: min(78vh, 560px);
}
.pr-sheet-more .pr-sheet-bd.pr-more-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px)) !important;
}
.pr-sheet-more .pr-more-item {
  appearance: none;
  border: 1px solid var(--line, rgba(0,0,0,.08));
  background: var(--bg, #f5f5f5);
  border-radius: 14px;
  padding: 16px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  color: inherit;
  min-width: 0;
  min-height: 72px;
  box-sizing: border-box;
}
.pr-sheet-more .pr-more-item:active {
  transform: scale(.98);
}
.pr-sheet-more .pr-more-item .pr-entry-ico {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 20px;
  box-shadow: none;
}
.pr-sheet-more .pr-more-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.pr-sheet-more .pr-more-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text, #0f172a);
  line-height: 1.25;
}
.pr-sheet-more .pr-more-desc {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted, #64748b);
  line-height: 1.35;
}
.pr-sheet-more .pr-more-item:has(.is-predict) { background: color-mix(in srgb, #0284c7 10%, var(--bg, #f5f5f5)); }
.pr-sheet-more .pr-more-item:has(.is-rank) { background: color-mix(in srgb, var(--accent, #2563eb) 10%, var(--bg, #f5f5f5)); }
.pr-sheet-more .pr-more-item:has(.is-groups) { background: color-mix(in srgb, #16a34a 10%, var(--bg, #f5f5f5)); }
.pr-sheet-more .pr-more-item:has(.is-bets) { background: color-mix(in srgb, #7c3aed 10%, var(--bg, #f5f5f5)); }
.pr-sheet-more .pr-more-item:has(.is-verify) { background: color-mix(in srgb, #0f766e 10%, var(--bg, #f5f5f5)); }
.pr-sheet-more .pr-more-item:has(.is-rules) { background: color-mix(in srgb, #0891b2 10%, var(--bg, #f5f5f5)); }

.pr-sheet-more.is-enter {
  animation: prSheetUp .28s ease both;
}
@keyframes prSheetUp {
  from { transform: translateX(-50%) translateY(110%); }
  to { transform: translateX(-50%) translateY(0); }
}
@media (max-width: 720px) {
  @keyframes prSheetUp {
    from { transform: translateY(110%); }
    to { transform: translateY(0); }
  }
}

/* PC：双排矩形卡片（恢复原样式）；隐藏移动端一行与「更多」 */
@media (min-width: 901px) {
  .pr-entries {
    gap: 5px;
    margin: 0 0 16px;
    padding: 14px 12px 12px;
  }
  .pr-entries-m {
    display: none !important;
  }
  .pr-entries-pc {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  .pr-entries-pc-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }
  .pr-entries-pc .pr-entry {
    max-width: none;
    width: 100%;
    min-height: 88px;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid var(--line, rgba(0,0,0,.08));
    background: var(--bg, #f5f5f5);
    box-shadow: none;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 4px;
    align-items: center;
    text-align: left;
  }
  .pr-entries-pc .pr-entry[hidden] {
    display: none !important;
  }
  .pr-entries-pc-row:has(.js-pr-recommend[hidden]) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .pr-entries-pc .pr-entry:hover {
    border-color: color-mix(in srgb, var(--accent, #2563eb) 28%, var(--line, #e2e8f0));
    background: color-mix(in srgb, var(--accent, #2563eb) 6%, var(--bg, #f5f5f5));
  }
  .pr-entries-pc .pr-entry-ico {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 36px;
    height: 36px;
    font-size: 18px;
    border-radius: 10px;
    box-shadow: none;
  }
  .pr-entries-pc .pr-entry-txt {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .02em;
  }
  .pr-entries-pc .pr-entry-desc {
    display: block;
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--muted, #64748b);
  }
  .pr-entries-pc .pr-entry:has(.is-credit) { background: color-mix(in srgb, #059669 12%, var(--bg, #f5f5f5)); }
  .pr-entries-pc .pr-entry:has(.is-table) { background: color-mix(in srgb, #ea580c 12%, var(--bg, #f5f5f5)); }
  .pr-entries-pc .pr-entry:has(.is-quick) { background: color-mix(in srgb, #e11d48 12%, var(--bg, #f5f5f5)); }
  .pr-entries-pc .pr-entry:has(.is-predict) { background: color-mix(in srgb, #0284c7 12%, var(--bg, #f5f5f5)); }
  .pr-entries-pc .pr-entry:has(.is-recommend) { background: color-mix(in srgb, #d97706 12%, var(--bg, #f5f5f5)); }
  .pr-entries-pc .pr-entry:has(.is-rank) { background: color-mix(in srgb, var(--accent, #2563eb) 12%, var(--bg, #f5f5f5)); }
  .pr-entries-pc .pr-entry:has(.is-recharge) { background: color-mix(in srgb, #ca8a04 12%, var(--bg, #f5f5f5)); }
  .pr-entries-pc .pr-entry:has(.is-bets) { background: color-mix(in srgb, #7c3aed 12%, var(--bg, #f5f5f5)); }
  .pr-entries-pc .pr-entry:has(.is-verify) { background: color-mix(in srgb, #0f766e 12%, var(--bg, #f5f5f5)); }
  .pr-entries-pc .pr-entry:has(.is-rules) { background: color-mix(in srgb, #0891b2 12%, var(--bg, #f5f5f5)); }
  .pr-entries.is-guest {
    margin-bottom: 16px;
  }

  /* PC：聊天+输入仍为一体卡片，不跟移动端拆板 */
  .pr-room {
    border-radius: var(--radius-sm, 12px) var(--radius-sm, 12px) 0 0 !important;
    border: 1px solid var(--pr-border) !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }
  .pr-compose {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    margin-left: 0 !important;
    padding: 10px 12px 12px !important;
    border-radius: 0 0 var(--radius-sm, 12px) var(--radius-sm, 12px) !important;
    border: 1px solid var(--pr-border) !important;
    border-top: 1px solid var(--pr-border) !important;
    box-shadow: var(--card-shadow, 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.05)) !important;
    background: var(--pr-bg) !important;
  }
  .pr-input {
    height: 44px;
    border: 1px solid var(--stroke-strong, var(--pr-border));
    background: var(--pr-input);
    box-shadow: none;
  }
  .pr-input:focus {
    border-color: var(--pr-gold);
    box-shadow: 0 0 0 3px var(--pr-gold-soft);
  }
  .pr-send {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    font-size: 13px;
    box-shadow: 0 6px 16px var(--pr-gold-soft);
  }
}

/* 底部功能面板 */
.pr-sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: var(--overlay, rgba(15,23,42,.45));
}

.pr-sheet-mask[hidden] {
  display: none !important;
}

.pr-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(720px, 100%);
  max-height: min(88vh, 760px);
  z-index: 221;
  display: flex;
  flex-direction: column;
  background: var(--surface, #fff);
  color: var(--text, #0f172a);
  border-radius: 16px 16px 0 0;
  border: 1px solid var(--line, rgba(0,0,0,.08));
  box-shadow: 0 -12px 40px rgba(15, 23, 42, .18);
  overflow: hidden;
  /* 宽度/位置由 JS 对齐 .pr-room，避免被社区侧栏遮挡错位 */
}

.pr-sheet[hidden] {
  display: none !important;
}
body.pr-sheet-open {
  overflow: hidden !important;
}

.pr-sheet-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line, rgba(0,0,0,.07));
  font-size: 15px;
  flex: 0 0 auto;
}

.pr-link-btn {
  border: 0;
  background: transparent;
  color: var(--muted, #64748b);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 6px;
  white-space: nowrap;
  border-radius: 6px;
}

.pr-link-btn.is-on {
  color: var(--accent, #2563eb);
  background: var(--accent-soft, rgba(37,99,235,.12));
  font-weight: 700;
}

.pr-hd-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.pr-sheet-close {
  border: 0;
  background: var(--chip, #ececec);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: var(--muted, #64748b);
  flex: 0 0 auto;
}

.pr-sheet-bd {
  flex: 1 1 auto;
  overflow: auto;
  padding: 12px 14px;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--accent, #2563eb) 45%, #94a3b8) var(--chip, #eef2f7);
}

.pr-sheet-ft {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line, rgba(0,0,0,.07));
  background: var(--surface, #fff);
  flex: 0 0 auto;
}

.pr-amt-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-soft, #334155);
}

.pr-amt-row input {
  width: 88px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--stroke-strong, rgba(0,0,0,.14));
  background: var(--bg, #f8fafc);
  padding: 0 10px;
}

.pr-chip {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line, rgba(0,0,0,.08));
  background: var(--chip, #f1f5f9);
  color: var(--text-soft, #334155);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.pr-chip.is-on {
  background: var(--accent, #2563eb);
  color: var(--accent-ink, #fff);
  border-color: transparent;
}

.pr-sheet-btn {
  flex: 1;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: var(--accent, #2563eb);
  color: var(--accent-ink, #fff);
  font-weight: 700;
  cursor: pointer;
  padding: 0 12px;
}

.pr-sheet-btn.is-ghost {
  flex: 0 0 auto;
  background: var(--chip, #eef2f7);
  color: var(--text-soft, #334155);
}

/* 信用 */
.pr-credit-hd strong {
  flex: 1;
  text-align: center;
}

.pr-credit-body {
  display: grid;
  grid-template-columns: 72px 1fr;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.pr-credit-side {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line, rgba(0,0,0,.07));
  background: var(--bg, #f8fafc);
  overflow: auto;
}

.pr-credit-side button {
  border: 0;
  background: transparent;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  color: var(--muted, #64748b);
  font-size: 13px;
  font-weight: 600;
  position: relative;
}

.pr-credit-side button.is-on {
  color: var(--accent, #2563eb);
  background: var(--surface, #fff);
}

.pr-credit-side button.is-on::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent, #2563eb);
}

.pr-credit-main {
  overflow: auto;
  padding: 10px;
  min-height: 0;
}

.pr-bet-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.pr-bet-card {
  border: 1px solid var(--line, rgba(0,0,0,.08));
  background: var(--bg, #f8fafc);
  border-radius: 10px;
  min-height: 58px;
  padding: 8px 6px;
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text, #0f172a);
  font-weight: 700;
  font-size: 14px;
}

.pr-bet-card small {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted, #64748b);
}

.pr-bet-card .pr-meta {
  font-size: 10px;
  color: var(--accent, #2563eb);
  font-weight: 600;
}

.pr-bet-card.is-on {
  border-color: var(--accent, #2563eb);
  background: var(--accent-soft, rgba(37,99,235,.12));
  color: var(--accent-deep, var(--accent, #2563eb));
}

.pr-credit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pr-credit-actions .pr-sheet-btn {
  flex: 1 1 calc(33.33% - 8px);
  min-width: 96px;
}

.pr-credit-actions #pr-credit-submit {
  flex: 1 1 100%;
}

/* 桌投 */
.pr-table-hd {
  gap: 10px;
}

.pr-tabs {
  display: inline-flex;
  gap: 6px;
  background: var(--chip, #eef2f7);
  padding: 3px;
  border-radius: 999px;
}

.pr-tab {
  border: 0;
  background: transparent;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted, #64748b);
}

.pr-tab.is-on {
  background: var(--accent, #2563eb);
  color: var(--accent-ink, #fff);
}

.pr-table-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pr-table-grid.is-num {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pr-table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pr-table-stat {
  flex: 1;
  border: 0;
  background: var(--chip, #eef2f7);
  border-radius: 10px;
  height: 40px;
  text-align: left;
  padding: 0 12px;
  cursor: pointer;
  color: var(--text-soft, #334155);
  font-size: 13px;
}

.pr-table-actions .pr-sheet-btn {
  flex: 0 0 auto;
  min-width: 88px;
}

.pr-table-actions #pr-table-submit {
  min-width: 120px;
}

/* 快投 */
.pr-sheet-quick {
  padding: 12px;
  gap: 10px;
  background: var(--bg, #f5f7fb);
}

.pr-quick-top {
  display: block;
}

.pr-quick-field {
  position: relative;
  display: block;
}

.pr-quick-input {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line, rgba(0,0,0,.08));
  background: var(--surface, #fff);
  padding: 0 40px 0 14px;
  color: var(--text, #0f172a);
  box-sizing: border-box;
}

.pr-quick-x {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted, #94a3b8);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 1;
}

.pr-quick-x:hover {
  color: var(--text-soft, #334155);
  background: var(--chip, #eef2f7);
}

.pr-quick-nums {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.pr-quick-num {
  flex: 0 0 auto;
  width: 52px;
  height: 48px;
  border-radius: 10px;
  border: 1px solid var(--line, rgba(0,0,0,.08));
  background: var(--surface, #fff);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
}

.pr-quick-num small {
  font-size: 10px;
  color: var(--muted, #64748b);
  font-weight: 500;
}

.pr-quick-pad {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  flex: 1 1 auto;
  overflow: auto;
}

.pr-qk {
  border: 1px solid var(--line, rgba(0,0,0,.08));
  background: var(--surface, #fff);
  border-radius: 10px;
  min-height: 48px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-weight: 700;
  color: var(--text, #0f172a);
  font-size: 13px;
}

.pr-qk small { font-size: 10px; color: var(--muted, #64748b); font-weight: 500; }
.pr-qk.is-util { background: var(--chip, #eef2f7); color: var(--text-soft, #334155); }
.pr-qk.is-num { color: var(--accent, #2563eb); font-size: 16px; }
.pr-qk.is-ok {
  background: var(--accent, #2563eb);
  color: var(--accent-ink, #fff);
  border-color: transparent;
}

.pr-qk.is-ok small { color: rgba(255,255,255,.85); }
@media (max-width: 720px) {
  .pr-bet-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pr-table-grid.is-num { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pr-credit-actions .pr-sheet-btn { flex: 1 1 calc(50% - 8px); min-width: 0; }
  .pr-sheet {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
    max-height: min(92vh, 860px);
    border-radius: 14px 14px 0 0;
    border-left: 0;
    border-right: 0;
  }
  .pr-table-actions { flex-wrap: wrap; }
  .pr-table-actions #pr-table-submit { flex: 1 1 100%; }
  .pr-credit-hd .pr-hd-actions .pr-link-btn i { display: none; }
  .pr-sheet-hd { padding: 10px 12px; gap: 4px; }
  .pr-sheet-ft { padding-left: 12px; padding-right: 12px; }
}

.pr-more-list {
  display: grid;
  gap: 8px;
}

.pr-more-list .pr-more-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line, rgba(0,0,0,.07));
  background: var(--bg, #f8fafc);
  color: var(--text, #0f172a) !important;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: left;
  appearance: none;
}

.pr-more-list .pr-more-item i {
  color: var(--accent, #2563eb);
  font-size: 18px;
}

.pr-more-item[hidden] {
  display: none !important;
}

/* PC 玩法 FAB 已改为顶部入口条，整组隐藏 */
.pr-fab-rail {
  display: none !important;
}

.pr-fab-rail > * {
  pointer-events: auto;
}

.pr-fab-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.pr-fab-actions[hidden] {
  display: none !important;
}

.pr-fab,
.pr-fab-mini {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
  flex: 0 0 auto;
}

.pr-fab {
  overflow: hidden;
  background: var(--accent, #2563eb);
  color: var(--accent-ink, #fff);
  box-shadow: 0 8px 28px rgba(15,23,42,.14), inset 0 1px 0 rgba(255,255,255,.35);
  border: 1px solid color-mix(in srgb, var(--accent, #2563eb) 65%, #fff);
}

.pr-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(15,23,42,.18);
}

.pr-fab-glyph {
  position: relative;
  width: 22px;
  height: 22px;
  display: block;
}

.pr-fab-glyph i {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}

.pr-fab-glyph i:nth-child(1) { left: 6px; top: 0; }
.pr-fab-glyph i:nth-child(2) { left: 6px; bottom: 0; }
.pr-fab-glyph i:nth-child(3) { left: 0; top: 6px; }
.pr-fab-glyph i:nth-child(4) { right: 0; top: 6px; }
.pr-fab-mini {
  background: rgba(255,255,255,.96);
  color: var(--text, #0f172a);
  box-shadow: 0 8px 28px rgba(15,23,42,.12), inset 0 1px 0 rgba(255,255,255,.65);
  border: 1px solid rgba(255,255,255,.75);
  position: relative;
}

.pr-fab-mini i {
  font-size: 20px;
  line-height: 1;
  color: var(--accent, #2563eb);
}

.pr-fab-mini.is-credit i { color: #059669; }
.pr-fab-mini.is-table i { color: #ea580c; }
.pr-fab-mini.is-quick i { color: #e11d48; }
.pr-fab-mini.is-recommend i { color: #d97706; }
.pr-fab-mini.is-predict i { color: #0284c7; }
.pr-fab-mini.is-rank i { color: var(--accent, #2563eb); }
.pr-fab-mini.is-recharge i { color: #ca8a04; }
.pr-fab-mini.is-bets i { color: #7c3aed; }
.pr-fab-mini.is-verify i { color: #0f766e; }
.pr-fab-mini.is-rules i { color: #0891b2; }

/* 右侧栏间距统一为 5px；展开时展平 actions，避免「容器外再加一层 gap」 */
body:has(.pr-room) .site-float {
  gap: 5px !important;
}
body:has(.pr-room) .site-float-actions {
  gap: 5px !important;
  margin: 0 !important;
  padding: 0 !important;
}
body:has(.pr-room) .site-float:not(.is-collapsed) > .site-float-actions {
  display: contents;
}
body:has(.pr-room) .site-float.is-collapsed > .site-float-actions {
  display: none !important;
}
body:has(.pr-room) .site-float > .pr-groups-float,
body:has(.pr-room) .site-float > .site-float-btn,
body:has(.pr-room) .site-float > .back-top,
body:has(.pr-room) .site-float > .site-qr-hit {
  margin: 0 !important;
}

/* 群聊：复用 .site-float-btn 尺寸；仅保留主题色与挂载态 */
.pr-groups-float {
  color: #16a34a;
  flex: 0 0 auto;
  position: relative;
  right: auto;
  bottom: auto;
  pointer-events: auto;
}
.pr-groups-float[hidden] {
  display: none !important;
}
.pr-groups-float i {
  color: #16a34a;
}
.pr-groups-float span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
body:has(.pr-room) .pr-groups-float:not(.is-mounted) {
  position: fixed;
  right: 20px;
  bottom: 160px;
  z-index: 72;
}

/* 自适应：隐藏右侧悬浮栏（含收起按钮）；群聊改到「更多」 */
@media (max-width: 900px) {
  body:has(.pr-room) .site-float,
  body:has(.pr-room) .pr-groups-float {
    display: none !important;
  }
}

.pr-fab-mini span {
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  background: rgba(15,23,42,.78);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
}

.pr-fab-mini:hover {
  transform: translateY(-2px);
}

.pr-fab-mini:hover span {
  opacity: 1;
}

@media (max-width: 720px) {
  /* 入口 + 房间一屏完整显示；底栏在 .app 外，勿对 body 做 overflow 裁切 */
  html:has(.pr-room) {
    height: 100%;
    overflow: hidden;
  }
  body:has(.pr-room) {
    height: 100%;
    max-height: 100%;
    box-sizing: border-box;
    overflow: visible;
    /* 高度已在 .app 扣除底栏，避免再垫一层 padding 形成空白 */
    padding-bottom: 0 !important;
  }
  body:has(.pr-room) .site-tabbar {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    z-index: 90;
  }
  body:has(.pr-room) .app {
    height: calc(100dvh - var(--site-tabbar-h, 66px) - env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - var(--site-tabbar-h, 66px) - env(safe-area-inset-bottom, 0px));
    min-height: 0;
    overflow: hidden;
  }
  body:has(.pr-room) .main {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  body:has(.pr-room) .main-scroll {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 8px 0 0 !important;
  }
  body:has(.pr-room) .main-scroll > .content {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 16px !important;
    box-sizing: border-box;
  }
  body:has(.pr-room) .plaza-main.pr-layout {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    padding: 0;
    margin: 0;
    gap: 10px;
  }
  body:has(.pr-room) .site-foot {
    display: none !important;
  }

  /* 入口 + 聊天房间保留左右间距 */
  .pr-entries {
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 6px 6px 2px !important;
  }

  .pr-room {
    flex: 1 1 auto;
    min-height: 0 !important;
    max-height: none !important;
    height: auto;
    width: 100%;
    margin: 0;
    border-radius: 12px !important;
    border: 1px solid var(--pr-border) !important;
    box-shadow: var(--card-shadow, 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.05)) !important;
    overflow: hidden;
  }
  /* 未登录：指令条不显示，房间卡片与底栏之间保留间距，避免贴底 */
  .pr-room.is-no-compose {
    margin-bottom: 16px;
  }
  /* 头部信息区收紧 */
  .pr-head {
    padding: 8px 10px 8px;
  }
  .pr-issue-line {
    font-size: 13px;
    line-height: 1.2;
  }
  .pr-status-row {
    margin: 6px 0 8px;
    gap: 8px;
    align-items: flex-end;
  }
  .pr-countdown {
    font-size: 28px;
    letter-spacing: .02em;
  }
  .pr-wallet {
    gap: 3px;
  }
  .pr-gold-label {
    font-size: 11px;
  }
  .pr-refresh {
    font-size: 12px;
  }
  .pr-gold-row {
    gap: 6px;
  }
  .pr-balance,
  #pr-balance {
    font-size: 20px;
  }
  .pr-wallet-btn {
    height: 24px;
    padding: 0 10px;
    font-size: 11px;
  }
  .pr-last {
    margin-top: 6px;
    padding: 5px 8px;
    border-radius: 8px;
    gap: 6px;
  }
  .pr-last-main {
    gap: 4px 6px;
  }
  .pr-last-label {
    font-size: 11px;
  }
  .pr-balls {
    gap: 4px;
  }
  .pr-ball {
    width: 22px;
    height: 22px;
    font-size: 11px;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.16);
  }
  .pr-eq {
    font-size: 12px;
  }
  .pr-tags {
    font-size: 11px;
    letter-spacing: .02em;
  }
  .pr-last-arrow {
    font-size: 15px;
  }
  .pr-stake-pill {
    margin-top: 6px;
    min-width: 0;
    height: 26px;
    padding: 0 10px;
    font-size: 12px;
    gap: 4px;
  }
  .pr-recent-drop,
  .pr-stake-drop {
    margin-top: 6px;
    max-height: 120px;
  }
  /* 对话框收紧：少占高度，滚动在聊天区内 */
  .pr-chat {
    padding: 8px 10px 16px;
    gap: 8px;
  }
  /* 下注条：独立板块，通栏贴底栏 */
  .pr-compose {
    flex: 0 0 auto;
    position: relative;
    z-index: 5;
    width: 100vw;
    max-width: 100vw;
    margin: 8px 0 0;
    margin-left: calc(50% - 50vw);
    box-sizing: border-box;
    padding: 10px 14px;
    gap: 10px;
    border: 0;
    border-top: 1px solid var(--line, rgba(15, 23, 42, .06));
    border-radius: 0;
    box-shadow: none;
    background: var(--surface, #fff);
  }
  .pr-input {
    height: 42px;
    padding: 0 16px;
    font-size: 14px;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent, #2563eb) 7%, #f1f5f9);
    box-shadow: none;
  }
  .pr-input:focus {
    border: 0;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #2563eb) 22%, transparent);
    background: color-mix(in srgb, var(--accent, #2563eb) 9%, #fff);
  }
  .pr-input::placeholder {
    color: #94a3b8;
  }
  .pr-send {
    width: auto;
    min-width: 72px;
    height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .02em;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--accent, #2563eb) 35%, transparent);
  }
  .pr-to-bottom {
    left: 50%;
    right: auto;
    bottom: 12px;
    transform: translateX(-50%);
  }
  /* 右侧悬浮抬高，避开下注条 */
  body:has(.pr-room) .site-float {
    bottom: calc(var(--site-tabbar-h, 66px) + env(safe-area-inset-bottom, 0px) + 78px) !important;
  }
  .pr-entry-ico {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  .pr-play-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .pr-room {
    --pr-panel: #eef2f7;
    --pr-bubble: #f8fafc;
    --pr-border: rgba(15, 23, 42, .08);
    --pr-muted: #64748b;
  }
  .pr-msg.is-user .pr-bubble {
    background: #e8eefc;
  }
  .pr-msg.is-draw .pr-bubble {
    background: #f5f8ff;
  }
}

/* ========== 自适应：玩法入口下移为底部导航，并隐藏站点底部导航 ========== */
@media (max-width: 900px) {
  /* 隐藏原本的站点底部导航（首页/功能/发布/消息/我的） */
  body:has(.pr-room) .site-tabbar {
    display: none !important;
  }

  /* 玩法入口整体：固定贴底，观感对齐底部导航 */
  body:has(.pr-room) .pr-entries {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    width: 100%;
    height: calc(var(--site-tabbar-h, 66px) + env(safe-area-inset-bottom, 0px));
    margin: 0 !important;
    padding: 0 4px env(safe-area-inset-bottom, 0px) !important;
    border: 0;
    border-radius: 0;
    /* 不用 backdrop-filter：固定底栏实时模糊背后内容会长期占用 GPU，
       低端机滚动明显掉帧。底色略加实来补偿观感，肉眼几乎无差。 */
    background: rgba(255, 255, 255, .985);
    box-shadow: 0 -4px 18px rgba(15, 23, 42, .06);
    box-sizing: border-box;
  }

  /* PC 双排入口在移动端不参与 */
  body:has(.pr-room) .pr-entries-pc {
    display: none !important;
  }

  /* 单排入口 → 底部导航条目 */
  body:has(.pr-room) .pr-entries-m {
    display: flex;
    grid-template-columns: none;
    align-items: stretch;
    justify-content: space-between;
    justify-items: stretch;
    gap: 0;
    width: 100%;
    height: 100%;
  }

  body:has(.pr-room) .pr-entries-m .pr-entry {
    flex: 1 1 0;
    width: auto;
    max-width: none;
    height: 100%;
    padding: 0;
    justify-content: center;
    gap: 2px;
    border-radius: 0;
    background: transparent;
    color: #9ca3af;
    transition: background .15s ease, color .15s ease;
  }

  body:has(.pr-room) .pr-entries-m .pr-entry:active {
    background: rgba(15, 23, 42, .045);
  }

  /* 图标：浅色圆底 + 品牌色，贴近底部导航观感 */
  body:has(.pr-room) .pr-entries-m .pr-entry-ico {
    width: 30px;
    height: 30px;
    font-size: 17px;
    box-shadow: none;
  }

  body:has(.pr-room) .pr-entries-m .pr-entry-ico.is-credit { background: rgba(5, 150, 105, .12); color: #059669; }
  body:has(.pr-room) .pr-entries-m .pr-entry-ico.is-table { background: rgba(234, 88, 12, .12); color: #ea580c; }
  body:has(.pr-room) .pr-entries-m .pr-entry-ico.is-quick { background: rgba(225, 29, 72, .12); color: #e11d48; }
  body:has(.pr-room) .pr-entries-m .pr-entry-ico.is-recommend { background: rgba(217, 119, 6, .14); color: #d97706; }
  body:has(.pr-room) .pr-entries-m .pr-entry-ico.is-more { background: rgba(100, 116, 139, .14); color: #475569; }
  body:has(.pr-room) .pr-entries-m .pr-entry-ico.is-predict { background: rgba(2, 132, 199, .12); color: #0284c7; }
  body:has(.pr-room) .pr-entries-m .pr-entry-ico.is-rank { background: rgba(37, 99, 235, .12); color: #2563eb; }
  body:has(.pr-room) .pr-entries-m .pr-entry-ico.is-recharge { background: rgba(202, 138, 4, .14); color: #ca8a04; }
  body:has(.pr-room) .pr-entries-m .pr-entry-ico.is-bets { background: rgba(124, 58, 237, .12); color: #7c3aed; }
  body:has(.pr-room) .pr-entries-m .pr-entry-ico.is-verify { background: rgba(15, 118, 110, .12); color: #0f766e; }
  body:has(.pr-room) .pr-entries-m .pr-entry-ico.is-rules { background: rgba(8, 145, 178, .12); color: #0891b2; }
  body:has(.pr-room) .pr-entries-m .pr-entry-ico.is-groups { background: rgba(22, 163, 74, .12); color: #16a34a; }

  body:has(.pr-room) .pr-entries-m .pr-entry-txt {
    font-size: 10px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: .02em;
    color: inherit;
  }

  body:has(.pr-room) .pr-entries-m .pr-entry:active .pr-entry-ico {
    transform: none;
  }
}

/* ---------- 轻提示（下注 / 中奖 / 未中奖）：自带 DOM 与样式，不依赖社区 UI 库 ---------- */
/* 屏幕正中显示：用 flex 居中而非 transform，避免与外层动画/定位相互干扰；
   多条约提示以中线为基准上下堆叠。容器本身不吃点击。 */
.pr-toast-root {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 4vw;
  box-sizing: border-box;
  pointer-events: none;
}

.pr-toast {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 160px;
  max-width: min(420px, 92vw);
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid var(--line, rgba(15, 23, 42, .08));
  background: var(--surface, #fff);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .16);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
  box-sizing: border-box;
  animation: pr-toast-in .22s ease;
}

.pr-toast > i {
  flex: 0 0 auto;
  font-size: 16px;
  line-height: 1;
}

.pr-toast > span {
  min-width: 0;
  word-break: break-word;
}

/* 颜色与图标成对出现：成功=绿，失败/未中=红，提醒=橙，说明=品牌色 */
.pr-toast-success {
  color: var(--success, #16a34a);
}

.pr-toast-error {
  color: var(--danger, #dc2626);
}

.pr-toast-warn {
  color: var(--warning, #d97706);
}

.pr-toast-info {
  color: var(--accent, #2563eb);
}

.pr-toast.is-out {
  opacity: 0;
  transform: scale(.96);
  transition: opacity .2s ease, transform .2s ease;
}

@keyframes pr-toast-in {
  from {
    opacity: 0;
    transform: scale(.94);
  }

  to {
    opacity: 1;
    transform: none;
  }
}
