/* ==========================================================================
   牛牛大逃杀 · 造字工坊像素夜场
   移动端优先，原生 CSS，无外部依赖
   ========================================================================== */

:root {
  --bg: #0c0806;
  --ink: #f8ecdc;
  --muted: #b49a80;
  --faint: #816a56;
  --line: rgba(255, 186, 120, .14);
  --line-strong: rgba(255, 186, 120, .3);
  --wood-950: #120b07;
  --wood-900: #1b100b;
  --wood-800: #291811;
  --wood-700: #382116;
  --wood-600: #4b2d1d;
  --accent: #ff8a3d;
  --accent-soft: #ffb46e;
  --accent-deep: #c95a1c;
  --gold: #ffd166;
  --green: #83d98a;
  --red: #ff5b4d;
  --blue: #7cc4ff;
  --nav-h: 64px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  --mono: "SFMono-Regular", "Menlo", "Roboto Mono", ui-monospace, monospace;
}

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

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.modal-open, body.chat-open { overflow: hidden; }

button, input { font-family: inherit; }
button { cursor: pointer; -webkit-user-select: none; user-select: none; }
button:focus-visible, input:focus-visible {
  outline: 2px solid rgba(255, 170, 90, .8);
  outline-offset: 2px;
}
img { display: block; max-width: 100%; }
b, strong { font-weight: 900; }
[hidden] { display: none !important; }

/* ---------- 背景 ---------- */
.app-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #0b0705;
}
.app-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.09);
  filter: blur(5px) brightness(.5) saturate(1.2);
  opacity: .85;
}
.app-bg__glow {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .012) 0 1px, transparent 1px 67px),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .13) 0 1px, transparent 1px 41px),
    radial-gradient(75% 42% at 50% -4%, rgba(255, 154, 70, .24), transparent 66%),
    radial-gradient(42% 34% at 6% 30%, rgba(255, 120, 40, .1), transparent 72%),
    linear-gradient(180deg, rgba(10, 6, 4, .38), rgba(10, 6, 4, .9) 58%, #0c0806 100%);
}

/* ---------- 框架 ---------- */
.app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
}

.view {
  position: relative;
  width: 100%;
}

.view--arena {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: calc(var(--sat) + 10px);
  padding-bottom: calc(var(--nav-h) + var(--sab) + 12px);
}

.view--page {
  padding: calc(var(--sat) + 8px) 16px calc(var(--nav-h) + var(--sab) + 22px);
  animation: pageIn .24s ease both;
}

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

/* ---------- HUD ---------- */
.hud { padding: 0 16px; }

.hud__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 44px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.brand__mark {
  position: relative;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 900;
  color: #2b1408;
  background: linear-gradient(160deg, #ffc272, #ff8a3d 55%, #e36520);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .55),
    0 3px 0 #8f3a10,
    0 6px 14px rgba(255, 120, 40, .3);
}
.brand__mark::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .24);
}
.brand__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
.brand__text strong {
  font-size: 16px;
  letter-spacing: .02em;
  color: #fff3e3;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .45);
  white-space: nowrap;
}
.brand__text small {
  font-size: 9px;
  letter-spacing: .14em;
  color: var(--muted);
  margin-top: 3px;
  white-space: nowrap;
}

.wallet {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 8px 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 170, 90, .32);
  background: linear-gradient(180deg, rgba(58, 35, 22, .95), rgba(30, 18, 12, .95));
  color: var(--gold);
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 200, 140, .12);
}
.wallet .mp-icon { width: 16px; height: 16px; color: #ff9e4f; filter: drop-shadow(0 0 5px rgba(255, 120, 40, .55)); }
.wallet b { color: #ffe5b8; font-size: 13px; font-variant-numeric: tabular-nums; }
.wallet__plus {
  width: 18px;
  height: 18px;
  margin-left: 1px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #2a1308;
}
.wallet__plus .mp-icon { width: 12px; height: 12px; color: #2a1308; filter: none; }
.wallet:active { transform: scale(.97); }

.hud__status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 44px;
  gap: 8px;
  margin-top: 8px;
}

.timer {
  position: relative;
  overflow: hidden;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 9px;
  border-radius: 14px;
  border: 1px solid rgba(255, 166, 86, .38);
  background: linear-gradient(135deg, #5a2913 0%, #3a1a0e 48%, #24110b 100%);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, .35),
    inset 0 1px 0 rgba(255, 190, 130, .2),
    inset 0 -12px 20px rgba(0, 0, 0, .22);
}
.timer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(60% 100% at 20% 0%, rgba(255, 150, 70, .28), transparent 60%);
}
.timer__icon {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid rgba(255, 170, 90, .25);
  background: rgba(255, 138, 61, .16);
  color: var(--accent);
}
.timer__icon .mp-icon { width: 18px; height: 18px; }
.timer__body { position: relative; z-index: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1; }
.timer__value { display: flex; align-items: baseline; gap: 2px; color: #fff3df; }
.timer__value b {
  font-size: 27px;
  line-height: 1;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .5);
}
.timer__value em { font-style: normal; font-size: 10px; font-weight: 700; color: var(--accent-soft); }
.timer__label {
  margin-top: 4px;
  font-size: 9px;
  letter-spacing: .03em;
  color: #d7b596;
  white-space: nowrap;
}
.timer__fast {
  position: absolute;
  right: 5px;
  bottom: 5px;
  z-index: 2;
  height: 18px;
  padding: 0 5px 0 4px;
  border: 1px solid rgba(255, 180, 110, .16);
  border-radius: 5px;
  background: rgba(0, 0, 0, .3);
  color: #ffce9c;
  display: flex;
  align-items: center;
  gap: 1px;
  font-size: 7px;
  font-weight: 700;
}
.timer__fast .mp-icon { width: 11px; height: 11px; }
.timer__fast span { line-height: 1; }
.timer__fast:active { background: rgba(255, 138, 61, .3); }
.timer__track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(0, 0, 0, .4);
}
.timer__track i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ff9f4a, #ffd166);
  box-shadow: 0 0 8px rgba(255, 150, 60, .6);
  transition: width .3s linear;
}
.timer.is-urgent { border-color: rgba(255, 80, 60, .7); animation: urgentPulse 1s infinite; }
.timer.is-urgent .timer__value b { color: #ffb0a0; }

@keyframes urgentPulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 190, 130, .2); }
  50% { box-shadow: 0 0 0 2px rgba(255, 80, 60, .35), 0 6px 22px rgba(255, 40, 20, .2), inset 0 1px 0 rgba(255, 190, 130, .2); }
}

.pool {
  position: relative;
  overflow: hidden;
  height: 60px;
  padding: 0 9px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(55, 33, 21, .9), rgba(26, 16, 11, .95));
  box-shadow: inset 0 1px 0 rgba(255, 200, 140, .08), 0 6px 16px rgba(0, 0, 0, .28);
  color: var(--ink);
  text-align: left;
}
.pool::after {
  content: "";
  position: absolute;
  right: -16px;
  bottom: -20px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 170, 80, .13), transparent 68%);
  pointer-events: none;
}
.pool__label { font-size: 8px; letter-spacing: .06em; color: var(--muted); }
.pool__value {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--gold);
  font-size: 15px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.pool__value .mp-icon { width: 12px; height: 12px; color: #ff9e4f; }
.pool__sub { font-size: 8px; color: var(--faint); white-space: nowrap; }
.pool__sub b { color: #c9ab8c; font-weight: 700; }
.pool:active { border-color: rgba(255, 150, 70, .35); }

.rank-entry {
  height: 60px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 14px;
  border: 1px solid rgba(255, 196, 110, .26);
  background: linear-gradient(180deg, #4b2c17, #2a170e);
  color: var(--gold);
  font-size: 8px;
  letter-spacing: .04em;
  box-shadow: inset 0 1px 0 rgba(255, 210, 150, .15), 0 6px 16px rgba(0, 0, 0, .3);
}
.rank-entry .mp-icon { width: 22px; height: 22px; filter: drop-shadow(0 0 8px rgba(255, 190, 90, .35)); }
.rank-entry:active { background: linear-gradient(180deg, #5a361d, #321b10); }

/* ---------- 房间 ---------- */
.arena-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 16px 5px;
}
.arena-caption__main {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
  color: #f2dcc4;
  white-space: nowrap;
}
.arena-caption__main em {
  margin-left: 2px;
  font-style: normal;
  font-size: 9px;
  font-weight: 400;
  color: var(--faint);
}
.live-dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 80, 60, .15);
  animation: liveBlink 1.6s infinite;
}
@keyframes liveBlink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.arena-caption__tools { display: flex; gap: 5px; flex: 0 0 auto; }
.mini-btn {
  height: 24px;
  padding: 0 7px;
  display: flex;
  align-items: center;
  gap: 3px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .035);
  color: #c9ae92;
  font-size: 9px;
  font-weight: 600;
}
.mini-btn .mp-icon { width: 13px; height: 13px; }
.mini-btn:active { background: rgba(255, 138, 61, .14); color: var(--accent-soft); }

.rooms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 1 1 auto;
  grid-auto-rows: minmax(116px, 1fr);
  gap: 8px;
  padding: 0 16px;
}

.room {
  position: relative;
  overflow: hidden;
  padding: 0;
  border-radius: 15px;
  border: 1px solid rgba(255, 177, 110, .18);
  background: #24150f;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 205, 150, .1);
  transition: transform .16s ease, border-color .2s ease, box-shadow .2s ease, filter .3s ease;
  isolation: isolate;
}
.room:active { transform: scale(.975); }
.room.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 138, 61, .32), 0 8px 22px rgba(255, 100, 30, .18);
}
.room.is-hit {
  border-color: rgba(255, 70, 50, .9);
  animation: roomShake .5s .08s both;
  box-shadow: 0 0 0 2px rgba(255, 60, 40, .3), 0 0 26px rgba(255, 40, 20, .3);
}
.arena.is-reveal .room:not(.is-hit) { filter: brightness(.5) saturate(.6); }

.room__scene {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 6, 4, .06), rgba(10, 6, 4, .22)),
    radial-gradient(80% 45% at 48% 14%, rgba(255, 175, 92, .23), transparent 64%),
    repeating-linear-gradient(90deg, rgba(255, 200, 140, .045) 0 1px, transparent 1px 27px),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .13) 0 1px, transparent 1px 21px),
    linear-gradient(180deg, #3d2718 0%, #2c1b12 54%, #1d120c 100%);
}
.room__scene::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .75;
  background:
    radial-gradient(120% 90% at 50% 120%, transparent 58%, rgba(0, 0, 0, .55) 100%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .1) 0 1px, transparent 1px 27px);
}
.room__scene::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .22) 0 1px, transparent 1px 17px),
    repeating-linear-gradient(90deg, rgba(255, 180, 110, .032) 0 1px, transparent 1px 37px),
    linear-gradient(180deg, rgba(92, 52, 30, .82), #1a0e08 72%);
  border-top: 2px solid rgba(20, 11, 7, .85);
  box-shadow: inset 0 12px 20px rgba(0, 0, 0, .28);
}

/* 每间房墙上的深色骷髅黑影：气氛装饰，不提前暴露杀手房 */
.room__omen {
  position: absolute;
  z-index: 1;
  top: 38%;
  right: 10%;
  width: 46px;
  height: 46px;
  background: #0b0604;
  -webkit-mask: url("images/killer-head.png") center / contain no-repeat;
  mask: url("images/killer-head.png") center / contain no-repeat;
  opacity: .42;
  filter: drop-shadow(0 0 4px rgba(255, 110, 60, .16));
  transform: rotate(-6deg);
  pointer-events: none;
}
.room:nth-child(2n) .room__omen {
  right: auto;
  left: 10%;
  top: 36%;
  width: 38px;
  height: 38px;
  transform: rotate(6deg);
  opacity: .34;
}
.room:nth-child(3n) .room__omen { opacity: .26; width: 34px; height: 34px; }

/* 墙角木箱 */
.room__crate {
  position: absolute;
  z-index: 1;
  left: 5%;
  bottom: 8%;
  width: 21px;
  height: 15px;
  border: 1px solid #1c0f08;
  border-radius: 2px;
  background:
    linear-gradient(90deg, transparent 0 46%, rgba(24, 12, 7, .8) 46% 54%, transparent 54%),
    linear-gradient(180deg, #74502e, #432a19);
  box-shadow: inset 0 1px 0 rgba(255, 205, 145, .16), 0 2px 0 #170c07;
}
.room__crate::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 2px;
  height: 1px;
  background: rgba(255, 205, 145, .18);
}
.room:nth-child(2n) .room__crate { left: auto; right: 7%; }
.room:nth-child(3n) .room__crate { left: 10%; bottom: 6%; }

.room__window {
  position: absolute;
  left: 8%;
  top: 10%;
  width: 43%;
  height: 34%;
  z-index: 1;
  border: 2px solid #1a0e08;
  border-radius: 2px;
  background:
    radial-gradient(80% 90% at 34% 18%, rgba(255, 246, 205, .95), rgba(255, 210, 140, .55) 38%, transparent 66%),
    linear-gradient(180deg, #f3ca8c, #cc8d4d 55%, #8c5328);
  box-shadow:
    inset 0 0 20px rgba(255, 230, 170, .8),
    0 0 26px rgba(255, 175, 90, .16),
    0 2px 0 rgba(0, 0, 0, .45);
  opacity: .94;
}
.room__window::before {
  content: "";
  position: absolute;
  inset: 3px;
  background:
    linear-gradient(90deg, transparent 48%, rgba(40, 20, 10, .75) 48% 52%, transparent 52%),
    linear-gradient(0deg, transparent 48%, rgba(40, 20, 10, .75) 48% 52%, transparent 52%);
  box-shadow: inset 0 0 10px rgba(255, 230, 170, .8);
}
.room__window::after {
  content: "";
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: -5px;
  height: 4px;
  border-radius: 2px;
  background: #1b0f09;
}
.room:nth-child(2n) .room__window {
  left: auto;
  right: 8%;
  width: 38%;
  height: 31%;
}
.room:nth-child(3n) .room__window { width: 34%; height: 28%; }

.room__shelf {
  position: absolute;
  right: 7%;
  top: 25%;
  width: 30%;
  height: 5px;
  z-index: 1;
  border-radius: 2px;
  background: #5c3822;
  box-shadow: 0 2px 0 #1b0e08;
}
.room__shelf::before {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 5px;
  width: 6px;
  height: 9px;
  background: #c98a45;
  box-shadow: 9px 2px 0 #7f9d6b, 17px 1px 0 #a85c3d;
}
.room:nth-child(2n) .room__shelf { left: 8%; right: auto; }

.room__lamp {
  position: absolute;
  left: 57%;
  right: auto;
  top: 25%;
  width: 2px;
  height: 12%;
  z-index: 2;
  border-radius: 1px;
  background: linear-gradient(90deg, #0d0805, #3a2415 55%, #0d0805);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .18);
}
.room__lamp::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 100%;
  width: 24px;
  height: 11px;
  clip-path: polygon(16% 0, 84% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, #2a180d 0 16%, #ffd48a 16% 64%, #c97a33 100%);
  box-shadow: 0 10px 28px 10px rgba(255, 170, 80, .26), inset 0 -2px 3px rgba(255, 240, 190, .45);
}
.room__lamp::after {
  content: "";
  position: absolute;
  left: -38px;
  top: calc(100% + 2px);
  width: 96px;
  height: 74px;
  background: radial-gradient(ellipse at 50% 0, rgba(255, 190, 100, .3), transparent 70%);
  pointer-events: none;
}
.room:nth-child(2n) .room__lamp { left: 46%; right: auto; }

.room__table {
  position: absolute;
  left: 9%;
  bottom: 19%;
  width: 38%;
  height: 5px;
  z-index: 1;
  border-radius: 2px;
  background: #603a22;
  box-shadow: 0 2px 0 #1a0e08;
}
.room__table::before, .room__table::after {
  content: "";
  position: absolute;
  top: 5px;
  width: 4px;
  height: 11px;
  background: #3b2315;
}
.room__table::before { left: 5px; }
.room__table::after { right: 5px; }
.room:nth-child(2n) .room__table { left: auto; right: 9%; }

.room__plant {
  position: absolute;
  right: 8%;
  bottom: 17%;
  width: 14px;
  height: 18px;
  z-index: 1;
}
.room__plant::before {
  content: "";
  position: absolute;
  left: 4px;
  bottom: 0;
  width: 8px;
  height: 7px;
  border-radius: 1px 1px 3px 3px;
  background: #8e4a2e;
}
.room__plant::after {
  content: "";
  position: absolute;
  left: 2px;
  bottom: 6px;
  width: 10px;
  height: 10px;
  background:
    radial-gradient(circle at 30% 40%, #7c9a58 0 3px, transparent 3px),
    radial-gradient(circle at 70% 50%, #638447 0 3px, transparent 3px),
    radial-gradient(circle at 50% 20%, #89a866 0 3px, transparent 3px);
}
.room:nth-child(3n) .room__plant { left: 8%; right: auto; }

.room__plaque {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px 3px 3px;
  border-radius: 8px;
  border: 1px solid rgba(255, 190, 120, .28);
  background: rgba(24, 14, 9, .86);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
  color: #f8e5cc;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
  transition: background .2s ease, color .2s ease;
}
.room__sigil {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  border: 1px solid rgba(255, 200, 140, .35);
  background: linear-gradient(180deg, #7c4a28, #4c2a17);
  color: #ffd9a8;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}
.room.is-selected .room__plaque {
  border-color: rgba(255, 255, 255, .35);
  background: linear-gradient(180deg, #ff9f4a, #e76a25);
  color: #2a1308;
}
.room.is-selected .room__sigil {
  border-color: rgba(42, 18, 8, .25);
  background: rgba(42, 18, 8, .16);
  color: #2a1308;
}

.room__meta {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.room__chip {
  height: 18px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  gap: 3px;
  border-radius: 6px;
  border: 1px solid rgba(255, 190, 120, .16);
  background: rgba(20, 12, 8, .82);
  color: #e7cdae;
  font-size: 9px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.room__chip .mp-icon { width: 11px; height: 11px; color: #c7a37e; }
.room__chip--pool { color: #ffd58a; }
.room__chip--pool .mp-icon { color: #ff9e4f; }

.room__people {
  position: absolute;
  z-index: 2;
  left: 6px;
  right: 6px;
  bottom: 4px;
  height: 45%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.room-person {
  position: relative;
  width: 30px;
  height: 42px;
  margin-left: -5px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .4));
  animation: bob 2.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
.room-person:first-child { margin-left: 0; }
.room-person .avatar {
  width: 28px;
  height: 35px;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.room-person .avatar svg { width: 100%; height: 100%; }
.room-person.is-me { z-index: 4; width: 36px; height: 48px; }
.room-person.is-me .avatar {
  width: 34px;
  height: 42px;
  padding: 1px;
  border-radius: 8px;
  border: 1px solid rgba(255, 160, 90, .7);
  background: rgba(255, 138, 61, .12);
  box-shadow: 0 0 0 2px rgba(255, 138, 61, .18), 0 0 12px rgba(255, 138, 61, .35);
}
.room-person.is-me::before {
  content: "自己";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  height: 12px;
  padding: 0 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, #ffa552, #ff7a2f);
  color: #2a1308;
  font-size: 7px;
  font-weight: 900;
  line-height: 12px;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}
.room__more {
  position: absolute;
  right: 5px;
  bottom: 5px;
  z-index: 4;
  height: 16px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(255, 190, 120, .18);
  background: rgba(20, 12, 8, .8);
  color: #d4b28e;
  font-size: 8px;
  font-weight: 800;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.room__check {
  position: absolute;
  z-index: 5;
  right: 7px;
  bottom: 6px;
  width: 20px;
  height: 20px;
  display: none;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #2a1308;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}
.room__check .mp-icon { width: 14px; height: 14px; }
.room.is-selected .room__check { display: grid; }

.room__killer {
  position: absolute;
  z-index: 6;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 45%, rgba(120, 10, 5, .38), rgba(20, 4, 3, .74));
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
}
.room.is-hit .room__killer { display: flex; animation: fadeIn .3s both; }
.room.is-hit .room__plaque {
  z-index: 7;
  border-color: rgba(255, 100, 76, .72);
  background: rgba(54, 12, 8, .94);
  color: #ffe4da;
  box-shadow: 0 2px 10px rgba(255, 50, 30, .28);
}
.room.is-hit .room__sigil {
  border-color: rgba(255, 130, 100, .4);
  background: linear-gradient(180deg, #572018, #2c0d09);
  color: #ffb3a3;
}
.room__killer img {
  width: 50%;
  max-width: 72px;
  height: auto;
  filter: drop-shadow(0 0 12px rgba(255, 40, 20, .8)) brightness(.92);
  -webkit-mask-image: radial-gradient(circle, #000 56%, transparent 72%);
  mask-image: radial-gradient(circle, #000 56%, transparent 72%);
  animation: killerPop .5s .1s both;
}
.room__killer span {
  margin-top: -2px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #d62f22;
  color: #fff2df;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .16em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}
@keyframes killerPop {
  0% { transform: scale(.5); opacity: 0; }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes roomShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-3px) rotate(-.5deg); }
  40% { transform: translateX(3px) rotate(.5deg); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}

.last-killer {
  min-height: 12px;
  margin: 6px 16px 4px;
  text-align: center;
  font-size: 9px;
  line-height: 1.45;
  color: #8e7158;
}
.last-killer b { color: #e4b98c; font-weight: 700; }

/* 杀手出现警报 */
.alarm {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at 50% 48%, rgba(120, 8, 4, .28), rgba(3, 2, 1, .64) 70%);
  animation: fadeIn .22s both;
}
.alarm[hidden] { display: none !important; }
.alarm__card {
  position: relative;
  overflow: hidden;
  width: min(78vw, 310px);
  padding: 14px 16px 15px;
  text-align: center;
  border: 2px solid #c8372a;
  border-radius: 16px;
  background: linear-gradient(180deg, #3c1712, #1d0c09);
  box-shadow: 0 0 0 4px rgba(200, 55, 42, .12), 0 0 36px rgba(255, 40, 20, .25), 0 18px 40px rgba(0, 0, 0, .6);
  animation: alarmIn .28s cubic-bezier(.2, 1.5, .4, 1) both;
}
.alarm__card::before, .alarm__card::after {
  content: "»";
  position: absolute;
  top: 34%;
  font-size: 24px;
  color: #ff5b4d;
  text-shadow: 0 0 10px rgba(255, 60, 40, .8);
}
.alarm__card::before { left: 9px; }
.alarm__card::after { right: 9px; content: "«"; }
.alarm__card img {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 50, 30, .7));
  -webkit-mask-image: radial-gradient(circle, #000 55%, transparent 72%);
  mask-image: radial-gradient(circle, #000 55%, transparent 72%);
}
.alarm__card b {
  display: block;
  margin-top: -2px;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: .08em;
  color: #ffe3d6;
  text-shadow: 0 0 16px rgba(255, 60, 35, .55), 0 2px 0 rgba(0, 0, 0, .45);
}
.alarm__card span {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.5;
  color: #d7a99b;
}
@keyframes alarmIn {
  from { transform: scale(.82); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ---------- 参与档位 ---------- */
.stake {
  margin: 4px 16px 0;
  padding: 9px 10px 8px;
  border-radius: 17px;
  border: 1px solid rgba(255, 180, 110, .18);
  background: linear-gradient(180deg, rgba(56, 34, 22, .96), rgba(28, 17, 12, .98));
  box-shadow: 0 -6px 22px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 210, 160, .1);
}
.stake__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.stake__head b { font-size: 11px; letter-spacing: .04em; color: #f4ddc2; }
.stake__head span { font-size: 8px; line-height: 1.3; text-align: right; color: #a98a6d; }

.tiers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 7px 0;
}
.tier {
  position: relative;
  overflow: hidden;
  height: 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border-radius: 10px;
  border: 1px solid rgba(255, 180, 110, .16);
  background: linear-gradient(180deg, #2b1911, #1b0f0a);
  color: #e7cdb0;
  box-shadow: inset 0 1px 0 rgba(255, 220, 170, .06);
  transition: transform .12s ease, border-color .2s ease, background .2s ease;
}
.tier b { font-size: 13px; line-height: 1; color: #f8e7d1; font-variant-numeric: tabular-nums; }
.tier small { font-size: 7px; letter-spacing: .05em; color: #9f8168; }
.tier .mp-icon {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 11px;
  height: 11px;
  color: #ff9e4f;
  opacity: .8;
}
.tier.is-active {
  border-color: rgba(255, 170, 90, .9);
  background: linear-gradient(180deg, #ffa552, #f1782f);
  box-shadow: 0 3px 0 #a44715, 0 6px 14px rgba(255, 120, 40, .25), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.tier.is-active b { color: #2a1308; }
.tier.is-active small { color: rgba(42, 19, 8, .7); }
.tier.is-active .mp-icon { color: #7a2f0c; }
.tier:active { transform: scale(.96); }
.tier:disabled { opacity: .5; }

.join-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffb35e, #ff7f33 58%, #f06a21);
  color: #2a1308;
  box-shadow: 0 4px 0 #a84613, 0 8px 18px rgba(255, 110, 30, .28), inset 0 1px 0 rgba(255, 255, 255, .45);
  transition: transform .1s ease, box-shadow .1s ease, filter .2s ease;
}
.join-btn::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 30%;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .32), transparent);
  animation: sheen 3.6s ease-in-out infinite;
}
.join-btn span { position: relative; z-index: 1; font-size: 15px; font-weight: 900; letter-spacing: .03em; line-height: 1.05; }
.join-btn small { position: relative; z-index: 1; font-size: 8px; font-weight: 700; letter-spacing: .04em; opacity: .66; }
.join-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #a84613, 0 4px 10px rgba(255, 110, 30, .2); }
.join-btn:disabled {
  color: #a08770;
  background: linear-gradient(180deg, #4b3525, #332318);
  box-shadow: inset 0 1px 0 rgba(255, 220, 170, .08);
  filter: saturate(.6);
}
.join-btn:disabled::after { display: none; }
.join-btn.is-joined {
  border: 1px solid rgba(255, 180, 110, .24);
  background: linear-gradient(180deg, #3d2a1c, #2a1b12);
  color: #d9b892;
  box-shadow: inset 0 1px 0 rgba(255, 220, 170, .08);
}
@keyframes sheen {
  0%, 55% { left: -40%; }
  80%, 100% { left: 130%; }
}

.stake__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 8px;
  color: #96795f;
}
.stake__foot span { display: flex; align-items: center; gap: 3px; }
.stake__foot .mp-icon { width: 10px; height: 10px; color: #ff9e4f; }
.stake__foot b { color: #e3c09d; font-size: 9px; font-variant-numeric: tabular-nums; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 6px 8px calc(6px + var(--sab));
  border-top: 1px solid rgba(255, 180, 110, .14);
  background: linear-gradient(180deg, rgba(26, 16, 11, .92), rgba(16, 10, 7, .99));
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .4);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
body.no-tabbar .tabbar { display: none; }
.tab {
  height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #8f725b;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .02em;
}
.tab__ico {
  position: relative;
  width: 34px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  transition: background .2s ease, transform .2s ease;
}
.tab__ico .mp-icon { width: 22px; height: 22px; }
.tab.is-active { color: #ffb066; }
.tab.is-active .tab__ico {
  background: rgba(255, 138, 61, .13);
  box-shadow: inset 0 0 0 1px rgba(255, 160, 90, .18);
  transform: translateY(-1px);
}
.tab.is-active .tab__ico .mp-icon { filter: drop-shadow(0 0 8px rgba(255, 140, 60, .45)); }
.tab:active .tab__ico { transform: scale(.92); }
.tab__dot {
  display: none;
  position: absolute;
  top: 3px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 2px #1a100b;
}
.tab__dot.is-on { display: block; }

/* ---------- 页头 ---------- */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0 12px;
}
.page-head__title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.title-tile {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 190, 120, .22);
  background: linear-gradient(160deg, #5b341c, #2b1810);
  color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 220, 170, .12), 0 4px 12px rgba(0, 0, 0, .3);
}
.title-tile .mp-icon { width: 21px; height: 21px; }
.title-tile--me { color: var(--gold); }
.title-tile--friends { color: var(--blue); }
.page-head h1 { margin: 0; font-size: 22px; font-weight: 900; line-height: 1.1; letter-spacing: .01em; color: #fff1de; }
.page-head p { margin: 3px 0 0; font-size: 9px; letter-spacing: .04em; color: #a98b70; }

.icon-btn {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid rgba(255, 180, 110, .16);
  background: rgba(255, 255, 255, .035);
  color: #d7b695;
}
.icon-btn .mp-icon { width: 20px; height: 20px; }
.icon-btn:active { background: rgba(255, 138, 61, .14); color: var(--accent); }

.point-note {
  padding: 14px 6px 4px;
  text-align: center;
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: .02em;
  color: #9a7f66;
}

/* ---------- 分段控件 ---------- */
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  margin-bottom: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 180, 110, .12);
  background: rgba(16, 10, 7, .65);
}
.segmented button {
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #a98b70;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
}
.segmented button.is-active {
  background: linear-gradient(180deg, #ffa552, #f1782f);
  color: #2a1308;
  box-shadow: 0 2px 8px rgba(255, 120, 40, .24), inset 0 1px 0 rgba(255, 255, 255, .3);
}

/* ---------- 荣誉榜 ---------- */
.podium {
  position: relative;
  min-height: 198px;
  display: grid;
  grid-template-columns: 1fr 1.14fr 1fr;
  align-items: end;
  gap: 7px;
  padding: 18px 2px 6px;
}
.podium::before {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  top: 18%;
  height: 58%;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 20%, rgba(255, 180, 80, .18), transparent 65%);
}
.podium__item { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.podium__item--1 { order: 2; }
.podium__item--2 { order: 1; }
.podium__item--3 { order: 3; }
.podium__crown {
  position: absolute;
  top: -17px;
  width: 24px;
  height: 24px;
  z-index: 3;
  color: var(--gold);
  filter: drop-shadow(0 0 7px rgba(255, 200, 80, .55));
}
.podium__avatar {
  position: relative;
  width: 56px;
  height: 56px;
  padding: 3px;
  border-radius: 50%;
  border: 2px solid #8f6a43;
  background: linear-gradient(180deg, rgba(255, 220, 160, .5), rgba(80, 50, 25, .6));
  box-shadow: 0 6px 14px rgba(0, 0, 0, .4);
}
.podium__item--1 .podium__avatar {
  width: 66px;
  height: 66px;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 209, 102, .16), 0 8px 18px rgba(0, 0, 0, .4), 0 0 24px rgba(255, 190, 70, .2);
}
.podium__item--2 .podium__avatar { border-color: #cfd8e3; }
.podium__item--3 .podium__avatar { border-color: #d08a55; }
.podium__avatar .avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 28%, #6b4630, #2a1911);
}
.podium__name {
  max-width: 100%;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  color: #f4dfc7;
}
.podium__pts {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  font-weight: 900;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.podium__pts .mp-icon { width: 10px; height: 10px; color: #ff9e4f; }
.podium__base {
  position: relative;
  width: 100%;
  height: 38px;
  margin-top: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px 9px 5px 5px;
  background: linear-gradient(180deg, #c9d4df, #8e9aa8);
  color: rgba(30, 15, 6, .8);
  font-size: 16px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 3px 0 #4a535e;
}
.podium__item--1 .podium__base {
  height: 50px;
  color: #3a1c06;
  background: linear-gradient(180deg, #ffd977, #f0a83d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 3px 0 #a4611b;
}
.podium__item--3 .podium__base {
  background: linear-gradient(180deg, #e0a06e, #b46b3f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 3px 0 #67351c;
}
.podium__medal {
  position: absolute;
  left: 4px;
  top: 5px;
  padding: 1px 3px;
  border-radius: 4px;
  font-size: 7px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0;
  color: #3a1c06;
  background: rgba(255, 255, 255, .55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
}
.podium__item--1 .podium__medal { color: #6b2a04; background: rgba(255, 248, 210, .85); }
.podium__item--2 .podium__medal { color: #37414c; background: rgba(240, 246, 252, .85); }
.podium__item--3 .podium__medal { color: #55240f; background: rgba(255, 230, 210, .82); }
.podium__reward {
  position: absolute;
  top: -6px;
  right: -2px;
  padding: 1px 4px;
  border-radius: 5px;
  border: 1px solid rgba(255, 200, 120, .3);
  background: #2b170e;
  color: var(--gold);
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.reward-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 8px;
  padding: 8px 9px;
  overflow-x: auto;
  scrollbar-width: none;
  border-radius: 12px;
  border: 1px solid rgba(255, 170, 90, .16);
  background: linear-gradient(90deg, rgba(255, 138, 61, .12), rgba(255, 138, 61, .02));
}
.reward-strip::-webkit-scrollbar { display: none; }
.reward-strip > b { flex: 0 0 auto; font-size: 9px; letter-spacing: .03em; color: #ffc98f; }
.reward-chip {
  flex: 0 0 auto;
  padding: 3px 5px;
  border-radius: 6px;
  border: 1px solid rgba(255, 180, 110, .13);
  background: rgba(40, 22, 13, .7);
  color: #e6c5a2;
  font-size: 8px;
  white-space: nowrap;
}
.reward-chip b { margin-left: 2px; color: var(--gold); font-size: 9px; }

.rank-list { display: flex; flex-direction: column; gap: 5px; }
.rank-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 6px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 180, 110, .09);
  background: rgba(255, 255, 255, .028);
}
.rank-row.is-me {
  border-color: rgba(255, 138, 61, .55);
  background: linear-gradient(90deg, rgba(255, 138, 61, .14), rgba(255, 138, 61, .02));
}
.rank-row.is-me::after {
  content: "我";
  position: absolute;
  top: -5px;
  right: 6px;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--accent);
  color: #2a1308;
  font-size: 7px;
  font-weight: 900;
}
.rank-row__no {
  flex: 0 0 auto;
  width: 22px;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  color: #9d8168;
  font-variant-numeric: tabular-nums;
}
.rank-row__avatar { flex: 0 0 auto; width: 34px; height: 34px; }
.rank-row__avatar .avatar { width: 100%; height: 100%; border-radius: 9px; }
.rank-row__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  color: #eed7bf;
}
.rank-row__name small { display: block; margin-top: 1px; font-size: 8px; font-weight: 400; color: #8a6e56; }
.rank-row__pts {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  font-weight: 900;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.rank-row__pts .mp-icon { width: 10px; height: 10px; color: #ff9e4f; }
.rank-row__reward {
  flex: 0 0 auto;
  margin-left: 4px;
  padding: 2px 4px;
  border-radius: 4px;
  border: 1px solid rgba(255, 150, 70, .18);
  background: rgba(255, 138, 61, .1);
  color: #ffbf79;
  font-size: 8px;
}
.rank-row--top .rank-row__no { color: var(--gold); }

.my-rank {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 7px;
  padding: 8px 10px;
  border-radius: 13px;
  border: 1px solid rgba(255, 150, 70, .35);
  background: linear-gradient(180deg, rgba(52, 31, 19, .98), rgba(29, 18, 12, .98));
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}
.my-rank__no { font-size: 11px; font-weight: 900; color: var(--accent); white-space: nowrap; }
.my-rank__name { flex: 1; min-width: 0; font-size: 10px; font-weight: 700; color: #eed7bf; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-rank__pts { display: flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; }
.my-rank__pts .mp-icon { width: 10px; height: 10px; color: #ff9e4f; }

/* ---------- 我的 ---------- */
.profile {
  position: relative;
  overflow: hidden;
  padding: 13px;
  border-radius: 18px;
  border: 1px solid rgba(255, 180, 110, .2);
  background: linear-gradient(145deg, rgba(62, 38, 24, .96), rgba(28, 17, 12, .98));
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 210, 160, .12);
}
.profile::before {
  content: "";
  position: absolute;
  right: -30px;
  top: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 150, 70, .16), transparent 65%);
  pointer-events: none;
}
.profile::after {
  content: "牛";
  position: absolute;
  right: 8px;
  bottom: -22px;
  font-size: 86px;
  font-weight: 900;
  line-height: 1;
  color: rgba(255, 190, 120, .045);
  pointer-events: none;
}
.profile__top { position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; }
.profile__avatar {
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  padding: 3px;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffb46e, #a4481a);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.profile__avatar .avatar {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 25%, #8a5a36, #2a1810);
}
.profile__main { flex: 1; min-width: 0; }
.profile__name { display: flex; align-items: center; gap: 6px; font-size: 17px; font-weight: 900; color: #fff1de; }
.profile__name .edit {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  border: 1px solid rgba(255, 180, 110, .2);
  background: rgba(255, 255, 255, .04);
  color: #d2ae89;
}
.profile__name .edit .mp-icon { width: 12px; height: 12px; }
.profile__id { display: flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 9px; color: #a98b70; }
.profile__id b {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  color: #ffcf9a;
}
.profile__id button {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 180, 110, .15);
  border-radius: 5px;
  background: rgba(255, 255, 255, .04);
  color: #c7a88a;
  padding: 0;
}
.profile__id button .mp-icon { width: 11px; height: 11px; }
.profile__balance {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 180, 110, .18);
}
.profile__balance small { display: block; font-size: 8px; letter-spacing: .08em; color: #a38468; }
.profile__balance b {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 26px;
  line-height: 1.1;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .35);
}
.profile__balance b .mp-icon { width: 16px; height: 16px; color: #ff9e4f; }
.profile__ad {
  height: 32px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 9px;
  border: 1px solid rgba(255, 180, 110, .28);
  background: linear-gradient(180deg, rgba(255, 138, 61, .22), rgba(255, 138, 61, .08));
  color: #ffc992;
  font-size: 9px;
  font-weight: 800;
}
.profile__ad .mp-icon { width: 14px; height: 14px; color: #ff9e4f; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 9px 0; }
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 9px;
  border-radius: 12px;
  border: 1px solid rgba(255, 180, 110, .12);
  background: rgba(255, 255, 255, .028);
}
.stat small { font-size: 8px; color: #96795f; }
.stat b { font-size: 15px; color: #f6dfc5; font-variant-numeric: tabular-nums; }
.stat b em { margin-left: 1px; font-style: normal; font-size: 8px; font-weight: 400; color: #a98b70; }

.menu { display: flex; flex-direction: column; gap: 6px; }
.menu__row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 9px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 180, 110, .1);
  background: linear-gradient(180deg, rgba(255, 255, 255, .032), rgba(255, 255, 255, .012));
  color: var(--ink);
  text-align: left;
}
.menu__row:active { border-color: rgba(255, 150, 70, .3); background: rgba(255, 138, 61, .08); }
.menu__icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
}
.menu__icon .mp-icon { width: 19px; height: 19px; }
.menu__icon--orange { color: #ffa35c; background: rgba(255, 138, 61, .12); }
.menu__icon--green { color: #8fdb9b; background: rgba(94, 180, 110, .12); }
.menu__icon--blue { color: #8ec4ff; background: rgba(100, 160, 255, .12); }
.menu__icon--purple { color: #c4a5ff; background: rgba(170, 130, 255, .12); }
.menu__icon--gray { color: #cdb49a; background: rgba(255, 255, 255, .07); }
.menu__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.menu__body b { font-size: 12px; font-weight: 800; color: #f2ddc5; }
.menu__body small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; color: #957961; }
.menu__chev { flex: 0 0 auto; width: 16px; height: 16px; color: #6f5845; }
.menu__badge {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 5px;
  border: 1px solid rgba(255, 150, 70, .2);
  background: rgba(255, 138, 61, .1);
  color: #ffc27d;
  font-size: 8px;
}

/* ---------- 好友 ---------- */
.add-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  margin-bottom: 9px;
  padding: 0 5px 0 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 180, 110, .13);
  background: rgba(16, 10, 7, .55);
}
.add-bar .mp-icon { flex: 0 0 auto; width: 16px; height: 16px; color: #8f725b; }
.add-bar input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: #f2ddc5;
  font-size: 12px;
  outline: 0;
}
.add-bar input::placeholder { font-size: 10px; color: #7d634f; }
.add-bar button {
  flex: 0 0 auto;
  height: 31px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffa552, #ef742d);
  color: #2a1308;
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 2px 0 #9f4312;
}
.add-bar button:active { transform: translateY(1px); box-shadow: 0 1px 0 #9f4312; }
.segmented--friends { margin-bottom: 8px; }

.friend-list { display: flex; flex-direction: column; gap: 5px; }
.friend-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 60px;
  padding: 8px 9px;
  border-radius: 13px;
  border: 1px solid rgba(255, 180, 110, .09);
  background: rgba(255, 255, 255, .025);
  color: var(--ink);
  text-align: left;
}
.friend-row:active { background: rgba(255, 138, 61, .07); }
.friend-row__avatar { position: relative; flex: 0 0 auto; width: 42px; height: 42px; }
.friend-row__avatar .avatar { width: 100%; height: 100%; border-radius: 11px; }
.friend-row__online {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #1b100b;
  background: #6fd477;
}
.friend-row__online.off { background: #726052; }
.friend-row__main { flex: 1; min-width: 0; }
.friend-row__name { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; color: #f2ddc5; }
.friend-row__name .tag {
  padding: 1px 3px;
  border-radius: 3px;
  border: 1px solid rgba(120, 180, 255, .25);
  background: rgba(100, 160, 255, .08);
  color: #8ec4ff;
  font-size: 7px;
  font-weight: 700;
}
.friend-row__msg {
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 8px;
  color: #8f735c;
}
.friend-row__time { flex: 0 0 auto; align-self: flex-start; margin-top: 2px; font-size: 8px; color: #8f735c; }
.friend-row__badge {
  flex: 0 0 auto;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
}
.friend-row--group .friend-row__avatar {
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid rgba(255, 180, 110, .18);
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 190, 110, .22), transparent 55%),
    linear-gradient(135deg, #5b3a24, #2b1a12);
  color: #ffc07a;
}
.friend-row--group .friend-row__avatar .mp-icon { width: 22px; height: 22px; }

/* ---------- 对局记录 ---------- */
.sub-head { display: flex; align-items: center; gap: 10px; padding: 8px 0 12px; }
.sub-head__title { flex: 1; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.sub-head h1 { margin: 0; font-size: 19px; font-weight: 900; color: #fff1de; }
.sub-head__title span { font-size: 9px; color: #8f725b; }

.record-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 9px; }
.record-summary .stat { padding: 9px 8px; }
.record-summary .stat b { font-size: 16px; }

.killer-stat {
  margin-bottom: 9px;
  padding: 9px;
  border-radius: 13px;
  border: 1px solid rgba(255, 180, 110, .1);
  background: rgba(255, 255, 255, .025);
}
.killer-stat__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.killer-stat__head b { font-size: 10px; color: #e8cfb4; }
.killer-stat__head span { font-size: 8px; color: #8a6e56; }
.killer-chips { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.killer-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 2px;
  border-radius: 7px;
  border: 1px solid rgba(255, 180, 110, .07);
  background: rgba(16, 10, 7, .45);
}
.killer-chip b { font-size: 12px; color: #d8b994; font-variant-numeric: tabular-nums; }
.killer-chip small { font-size: 7px; color: #806650; white-space: nowrap; }
.killer-chip.is-top { border-color: rgba(255, 90, 60, .35); background: rgba(120, 30, 20, .16); }
.killer-chip.is-top b { color: #ff8b74; }

.record-list { display: flex; flex-direction: column; gap: 6px; }
.record-card {
  position: relative;
  overflow: hidden;
  padding: 9px;
  border-radius: 13px;
  border: 1px solid rgba(255, 180, 110, .1);
  background: linear-gradient(180deg, rgba(255, 255, 255, .032), rgba(255, 255, 255, .012));
}
.record-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--green);
  opacity: .75;
}
.record-card.is-lose::before { background: var(--red); }
.record-card__top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 7px; }
.record-card__id { font-size: 11px; font-weight: 900; letter-spacing: .03em; color: #f2ddc5; }
.record-card__time { margin-left: 5px; font-size: 7px; font-weight: 400; color: #9a7f66; }
.record-card__badge {
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid rgba(90, 200, 120, .26);
  background: rgba(90, 200, 120, .12);
  color: #8fe0a0;
  font-size: 8px;
  font-weight: 900;
}
.record-card.is-lose .record-card__badge {
  border-color: rgba(255, 90, 70, .28);
  background: rgba(255, 80, 60, .12);
  color: #ff9582;
}
.record-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 8px; }
.record-cell { display: flex; align-items: baseline; gap: 5px; min-width: 0; font-size: 8px; }
.record-cell small { flex: 0 0 auto; color: #8a6e56; }
.record-cell b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 700;
  color: #d9bda0;
}
.record-cell b.earn-win { color: #8fe0a0; }
.record-cell b.earn-lose { color: #ff8b74; }
.record-card__killer {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 180, 110, .1);
  font-size: 8px;
  color: #8f735c;
}
.record-card__killer .mp-icon { width: 11px; height: 11px; color: #ff7a64; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 32px 20px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 180, 110, .16);
  background: rgba(255, 255, 255, .02);
  text-align: center;
}
.empty img {
  width: 76px;
  opacity: .9;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .5));
  -webkit-mask-image: radial-gradient(circle, #000 52%, transparent 74%);
  mask-image: radial-gradient(circle, #000 52%, transparent 74%);
}
.empty b { font-size: 12px; color: #e7ccb0; }
.empty p { margin: 0; font-size: 9px; line-height: 1.5; color: #8a6e56; }
.empty button {
  margin-top: 4px;
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(180deg, #ffa552, #ef742d);
  color: #2a1308;
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 2px 0 #9f4312;
}

/* ---------- 聊天 ---------- */
.chat {
  position: fixed;
  z-index: 80;
  left: 50%;
  top: 0;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #1b100b, #0e0906);
}
.chat-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: calc(var(--sat) + 8px) 12px 9px;
  border-bottom: 1px solid rgba(255, 180, 110, .12);
  background: rgba(22, 13, 9, .94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.chat-head__avatar { flex: 0 0 auto; width: 36px; height: 36px; }
.chat-head__avatar .avatar { width: 100%; height: 100%; border-radius: 10px; }
.chat-head__avatar .group-avatar {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 180, 110, .18);
  background: linear-gradient(135deg, #5b3a24, #2b1a12);
  color: #ffc07a;
}
.chat-head__avatar .group-avatar .mp-icon { width: 20px; height: 20px; }
.chat-head__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.chat-head__meta b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: #f2ddc5; }
.chat-head__meta small { font-size: 8px; color: #8fd497; }
.chat-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px 12px 18px;
  background: radial-gradient(ellipse at 50% 0, rgba(255, 150, 70, .06), transparent 55%);
  -webkit-overflow-scrolling: touch;
}
.chat-date {
  align-self: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  color: #6f5845;
  font-size: 8px;
}
.chat-msg { display: flex; align-items: flex-end; gap: 6px; max-width: 86%; }
.chat-msg.is-me { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg__avatar { flex: 0 0 auto; width: 26px; height: 26px; }
.chat-msg__avatar .avatar { width: 100%; height: 100%; border-radius: 7px; }
.chat-msg__col { min-width: 0; display: flex; flex-direction: column; }
.chat-msg.is-me .chat-msg__col { align-items: flex-end; }
.chat-msg__name { margin-bottom: 3px; font-size: 7px; color: #8a6e56; }
.chat-bubble {
  padding: 8px 10px;
  border-radius: 12px 12px 12px 3px;
  border: 1px solid rgba(255, 180, 110, .1);
  background: #2c1b12;
  color: #ecd6bd;
  font-size: 12px;
  line-height: 1.45;
  word-break: break-word;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .2);
}
.chat-msg.is-me .chat-bubble {
  border-color: rgba(255, 200, 140, .4);
  border-radius: 12px 12px 3px 12px;
  background: linear-gradient(180deg, #ff9f4a, #ef742d);
  color: #2a1308;
}
.chat-bubble--gift {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 150px;
  border-color: rgba(255, 180, 80, .3);
  background: linear-gradient(135deg, rgba(255, 180, 80, .16), rgba(255, 120, 40, .06));
}
.chat-msg.is-me .chat-bubble--gift { background: linear-gradient(135deg, #ffd08a, #ff9f4a); color: #3a1c06; }
.chat-gift__icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 138, 61, .18);
  color: #ffb066;
}
.chat-msg.is-me .chat-gift__icon { background: rgba(90, 40, 10, .14); color: #7a3208; }
.chat-gift__icon .mp-icon { width: 18px; height: 18px; }
.chat-gift__txt b { display: block; font-size: 11px; }
.chat-gift__txt small { font-size: 8px; opacity: .7; }
.chat-composer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px calc(8px + var(--sab));
  border-top: 1px solid rgba(255, 180, 110, .12);
  background: rgba(22, 13, 9, .97);
}
.chat-gift-btn {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 180, 110, .2);
  background: rgba(255, 138, 61, .08);
  color: #ffb066;
}
.chat-gift-btn .mp-icon { width: 19px; height: 19px; }
.chat-composer input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 180, 110, .12);
  background: rgba(16, 10, 7, .6);
  color: #f2ddc5;
  font-size: 12px;
  outline: 0;
}
.chat-composer input:focus { border-color: rgba(255, 138, 61, .45); }
.chat-send {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffa552, #ef742d);
  color: #2a1308;
  box-shadow: 0 2px 0 #9f4312;
}
.chat-send .mp-icon { width: 18px; height: 18px; }

/* ---------- 弹层 ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(5, 3, 2, .72);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  animation: fadeIn .2s both;
}
.modal-overlay--center { align-items: center; padding: 16px; }
.modal-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90dvh;
  overflow-y: auto;
  padding: 16px 16px calc(16px + var(--sab));
  border: 1px solid rgba(255, 180, 110, .2);
  border-radius: 22px 22px 0 0;
  background: linear-gradient(180deg, #2d1b12, #160d09);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .6);
  animation: slideUp .28s cubic-bezier(.22, .9, .35, 1) both;
}
.modal-overlay--center .modal-card {
  max-width: 400px;
  border-radius: 20px;
  padding: 14px 16px calc(16px + var(--sab));
  animation: popIn .25s both;
}
.modal-card__grip { width: 36px; height: 4px; margin: 0 auto 10px; border-radius: 2px; background: rgba(255, 200, 150, .2); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.modal-head h2 { margin: 0; font-size: 16px; font-weight: 900; letter-spacing: .02em; color: #fff1de; }
.modal-head p { margin: 2px 0 0; font-size: 9px; color: #997c62; }
.modal-close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid rgba(255, 180, 110, .14);
  background: rgba(255, 255, 255, .03);
  color: #c7a88a;
}
.modal-close .mp-icon { width: 16px; height: 16px; }
.modal-actions { display: flex; gap: 8px; margin-top: 12px; }

.btn {
  flex: 1;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(255, 180, 110, .18);
  border-radius: 11px;
  background: rgba(255, 255, 255, .04);
  color: #e7ccb0;
  font-size: 12px;
  font-weight: 900;
}
.btn .mp-icon { width: 16px; height: 16px; }
.btn--primary {
  border: 0;
  background: linear-gradient(180deg, #ffb35e, #ff7f33);
  color: #2a1308;
  box-shadow: 0 3px 0 #a84613, 0 6px 14px rgba(255, 110, 30, .22);
}
.btn--ghost { background: rgba(255, 255, 255, .03); }
.btn:active { transform: translateY(1px); }

/* 结果 */
.modal-card--result { padding: 0; overflow: hidden; }
.result {
  position: relative;
  overflow: hidden;
  padding: 0 16px 0;
  text-align: center;
  border-radius: 20px 20px 0 0;
  background: radial-gradient(ellipse at 50% 0, rgba(180, 30, 30, .3), transparent 62%), linear-gradient(180deg, #3a1614, #1b0f0c 70%);
}
.result__ribbon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 20px;
  border: 1px solid rgba(255, 140, 110, .4);
  border-radius: 0 0 10px 10px;
  background: linear-gradient(180deg, #8e2d22, #5c1a14);
  color: #ffe0c8;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .14em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
}
.result__ribbon::before, .result__ribbon::after {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ff9b7a);
}
.result__ribbon::after { background: linear-gradient(90deg, #ff9b7a, transparent); }
.result__art {
  position: relative;
  height: 156px;
  margin: 2px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.result__art::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 190px;
  height: 190px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 70, 45, .22), transparent 66%);
  pointer-events: none;
}
.result__portrait {
  position: relative;
  z-index: 1;
  width: 132px;
  height: 132px;
  overflow: hidden;
  border-radius: 50%;
  border: 3px solid #ff9c66;
  background: radial-gradient(circle at 50% 30%, #4a2030, #1c0d12);
  box-shadow: 0 0 0 5px rgba(255, 110, 60, .14), 0 0 0 6px rgba(255, 160, 100, .26), 0 10px 24px rgba(0, 0, 0, .55), inset 0 0 22px rgba(0, 0, 0, .45);
  animation: bob 3s ease-in-out infinite;
}
.result__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  display: block;
  filter: saturate(1.05) contrast(1.02);
}
.result__stamp {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%) rotate(-2deg);
  padding: 2px 10px;
  border-radius: 5px;
  border: 1px solid rgba(255, 190, 150, .55);
  background: linear-gradient(180deg, #a83222, #6d1b13);
  color: #ffe1c9;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .22em;
  text-indent: .22em;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.result__title { margin: 3px 0 0; font-size: 20px; font-weight: 900; letter-spacing: .02em; color: #ffe7cc; text-shadow: 0 2px 0 rgba(0, 0, 0, .4); }
.result__title.is-win { color: var(--gold); }
.result__title.is-lose { color: #ff9b82; }
.result__desc { margin: 4px 14px 0; font-size: 10px; line-height: 1.6; color: #c5a88c; }
.result__desc b { color: #ffc98f; }
.result__rooms { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 8px; }
.result__room {
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid rgba(255, 80, 60, .25);
  background: rgba(255, 60, 40, .12);
  color: #ff9e8b;
  font-size: 9px;
  font-weight: 700;
}
.result__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 11px; }
.result__stat {
  padding: 7px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 180, 110, .13);
  background: rgba(255, 255, 255, .035);
  text-align: left;
}
.result__stat small { display: block; font-size: 8px; color: #96795f; }
.result__stat b { font-size: 14px; color: #f2ddc5; font-variant-numeric: tabular-nums; }
.result__stat--win b { color: #8fe0a0; }
.result__stat--lose b { color: #ff8b74; }
.result__balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding: 7px 9px;
  border-radius: 9px;
  border: 1px solid rgba(255, 180, 110, .08);
  background: rgba(16, 10, 7, .4);
  color: #a98b70;
  font-size: 9px;
}
.result__balance b { display: flex; align-items: center; gap: 3px; color: var(--gold); font-size: 12px; }
.result__balance .mp-icon { width: 11px; height: 11px; color: #ff9e4f; }
.result__actions { display: flex; gap: 8px; margin: 12px -16px 0; padding: 12px 16px calc(14px + var(--sab)); }

/* 表单 */
.field { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.field > label { font-size: 9px; font-weight: 700; color: #a98b70; }
.field input {
  height: 42px;
  padding: 0 11px;
  border-radius: 10px;
  border: 1px solid rgba(255, 180, 110, .16);
  background: rgba(16, 10, 7, .55);
  color: #f2ddc5;
  font-size: 13px;
  outline: 0;
}
.field input:focus { border-color: rgba(255, 138, 61, .5); box-shadow: 0 0 0 2px rgba(255, 138, 61, .1); }
.field-hint { font-size: 8px; color: #9a7f66; line-height: 1.45; }

.quick-amounts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.quick-amounts button {
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid rgba(255, 180, 110, .16);
  background: rgba(255, 255, 255, .035);
  color: #d8ba9a;
  font-size: 10px;
  font-weight: 800;
}
.quick-amounts button:active { border-color: var(--accent); color: var(--accent-soft); }

.rule-list { display: flex; flex-direction: column; gap: 7px; margin-top: 8px; }
.rule-item { display: flex; align-items: flex-start; gap: 7px; font-size: 10px; line-height: 1.5; color: #c5a88c; }
.rule-item .num {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: rgba(255, 138, 61, .13);
  color: #ffb066;
  font-size: 8px;
  font-weight: 900;
}
.rule-item b { color: #ffe0bd; }

.invite-code {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 8px 0;
  padding: 12px;
  border: 1px dashed rgba(255, 180, 80, .3);
  border-radius: 12px;
  background: rgba(255, 180, 80, .06);
  color: var(--gold);
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: .16em;
}
.invite-code .copy {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid rgba(255, 180, 80, .22);
  background: rgba(20, 12, 8, .8);
  color: #d8ba9a;
  box-shadow: inset 0 1px 0 rgba(255, 210, 160, .1);
}
.invite-code .copy:active { background: rgba(255, 138, 61, .16); color: #ffcf9a; }
.invite-code .copy .mp-icon { width: 18px; height: 18px; }

.ad-stage {
  position: relative;
  overflow: hidden;
  height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 180, 110, .12);
  background: radial-gradient(circle at 50% 35%, rgba(255, 180, 80, .18), rgba(16, 10, 7, .7));
}
.ad-stage .mp-icon { width: 46px; height: 46px; color: #ffb066; }
.ad-stage b { font-size: 16px; color: #ffe5c7; }
.ad-stage small { font-size: 9px; color: #a98b70; }
.ad-progress { width: 70%; height: 6px; margin-top: 4px; overflow: hidden; border-radius: 3px; background: rgba(0, 0, 0, .4); }
.ad-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #ff9f4a, #ffd166);
  transition: width .1s linear;
}
.ad-count { font-family: var(--mono); font-size: 11px; color: #ffcf9a; }

/* 提示 */
.toast {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: calc(var(--nav-h) + var(--sab) + 16px);
  transform: translate(-50%, 12px);
  max-width: 86vw;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 180, 110, .28);
  background: rgba(30, 18, 12, .97);
  color: #f6dfc5;
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.toast .mp-icon { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; color: #ffb066; }
body.chat-open .toast { bottom: calc(64px + var(--sab)); }

/* ---------- 头像 ---------- */
.avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 9px;
  border: 1px solid rgba(255, 200, 140, .14);
  background: radial-gradient(circle at 50% 25%, #6b4630, #2a1911);
  flex: 0 0 auto;
}
.avatar svg { width: 82%; height: 82%; display: block; overflow: visible; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 28px; height: 28px; border-radius: 7px; }

.avatar-picker { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.avatar-choice {
  width: 46px;
  height: 46px;
  padding: 2px;
  border-radius: 11px;
  border: 1px solid rgba(255, 180, 110, .16);
  background: rgba(16, 10, 7, .45);
}
.avatar-choice .avatar { width: 100%; height: 100%; border: 0; background: transparent; border-radius: 8px; }
.avatar-choice.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 138, 61, .22), 0 0 12px rgba(255, 138, 61, .18);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 180, 110, .09);
}
.settings-row > span { display: flex; flex-direction: column; gap: 2px; }
.settings-row b { font-size: 11px; color: #f2ddc5; }
.settings-row small { font-size: 8px; color: #8a6e56; }
.switch {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 180, 110, .2);
  background: rgba(16, 10, 7, .6);
  transition: background .2s ease, border-color .2s ease;
}
.switch i {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #8a6e56;
  transition: transform .2s ease, background .2s ease;
}
.switch.is-on { border-color: rgba(255, 150, 70, .5); background: rgba(255, 138, 61, .25); }
.switch.is-on i { transform: translateX(20px); background: var(--accent); }

.arena.is-reveal .room.is-selected:not(.is-hit) {
  filter: brightness(1.05) saturate(1);
  box-shadow: 0 0 0 2px rgba(255, 170, 90, .35), 0 0 18px rgba(255, 140, 60, .18);
}

/* ---------- 动画 ---------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: .4; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }

/* ---------- 小屏适配 ---------- */
@media (max-width: 370px) {
  .hud__status { grid-template-columns: minmax(0, 1fr) 81px 40px; gap: 6px; }
  .timer { height: 56px; padding-left: 7px; gap: 6px; }
  .timer__icon { width: 26px; height: 26px; }
  .timer__value b { font-size: 24px; }
  .pool, .rank-entry { height: 56px; }
  .pool__value { font-size: 14px; }
  .brand__text strong { font-size: 14px; }
  .brand__text small { font-size: 8px; letter-spacing: .1em; }
  .wallet { height: 30px; font-size: 12px; }
  .rooms { grid-auto-rows: minmax(108px, 1fr); gap: 7px; padding: 0 13px; }
  .arena-caption { padding-left: 13px; padding-right: 13px; }
  .last-killer { margin-left: 13px; margin-right: 13px; }
  .stake { margin-left: 13px; margin-right: 13px; }
  .stake__head span { font-size: 7px; }
  .tier { height: 36px; }
  .join-btn { height: 44px; }
  .room__plaque { font-size: 9px; gap: 4px; }
  .room__sigil { width: 17px; height: 17px; font-size: 11px; }
  .page-head h1 { font-size: 20px; }
  .podium { min-height: 184px; }
  .podium__avatar { width: 50px; height: 50px; }
  .podium__item--1 .podium__avatar { width: 60px; height: 60px; }
}

@media (max-height: 700px) {
  .view--arena { padding-top: calc(var(--sat) + 6px); }
  .hud__top { height: 40px; }
  .brand__mark { width: 32px; height: 32px; font-size: 18px; }
  .brand__text strong { font-size: 14px; }
  .hud__status { margin-top: 6px; }
  .timer, .pool, .rank-entry { height: 54px; }
  .timer__value b { font-size: 24px; }
  .arena-caption { padding-top: 5px; padding-bottom: 3px; }
  .rooms { grid-auto-rows: minmax(92px, 1fr); gap: 7px; }
  .last-killer { display: none; }
  .stake { margin-top: 2px; padding-top: 7px; padding-bottom: 7px; }
  .stake__head { margin-top: 0; }
  .stake__head b { font-size: 10px; }
  .stake__head span { font-size: 7px; }
  .tiers { margin-top: 5px; margin-bottom: 5px; }
  .join-btn { height: 42px; }
  .join-btn small { display: none; }
  .stake__foot { margin-top: 4px; }
  .room__people { height: 42%; }
  .room-person { width: 27px; height: 38px; }
  .room-person .avatar { width: 25px; height: 32px; }
  .room-person.is-me { width: 32px; height: 42px; }
  .room-person.is-me .avatar { width: 30px; height: 38px; }
}

@media (max-height: 600px) {
  .view--arena { padding-top: calc(var(--sat) + 4px); }
  .hud__top { height: 34px; }
  .brand__mark { width: 30px; height: 30px; font-size: 17px; border-radius: 9px; }
  .brand__text strong { font-size: 13px; }
  .brand__text small { display: none; }
  .wallet { height: 28px; font-size: 11px; }
  .hud__status { margin-top: 4px; }
  .timer, .pool, .rank-entry { height: 48px; }
  .timer__icon { width: 24px; height: 24px; }
  .timer__value b { font-size: 21px; }
  .timer__label { font-size: 8px; margin-top: 3px; }
  .pool__label { font-size: 7px; }
  .pool__value { font-size: 12px; }
  .pool__sub { font-size: 7px; }
  .rank-entry { font-size: 7px; }
  .rank-entry .mp-icon { width: 18px; height: 18px; }
  .arena-caption { padding-top: 3px; padding-bottom: 2px; }
  .rooms { grid-auto-rows: minmax(74px, 1fr); gap: 5px; }
  .room__people { height: 40%; }
  .room-person { width: 25px; height: 34px; }
  .room-person .avatar { width: 23px; height: 30px; }
  .room-person.is-me { width: 29px; height: 38px; }
  .room-person.is-me .avatar { width: 27px; height: 35px; }
  .room__plaque { top: 5px; left: 5px; font-size: 8px; padding: 2px 5px 2px 2px; gap: 3px; }
  .room__sigil { width: 15px; height: 15px; font-size: 10px; }
  .room__meta { top: 5px; right: 5px; gap: 2px; }
  .room__chip { height: 15px; font-size: 8px; padding: 0 4px; }
  .room__window { height: 28%; }
  .stake { margin-top: 2px; padding: 6px 8px 6px; }
  .stake__head b { font-size: 10px; }
  .stake__head span { display: none; }
  .tiers { margin: 4px 0; gap: 5px; }
  .tier { height: 32px; }
  .tier b { font-size: 12px; }
  .tier small { font-size: 6px; }
  .join-btn { height: 36px; }
  .join-btn span { font-size: 13px; }
  .join-btn small { display: none; }
  .stake__foot { display: none; }
  .last-killer { display: none; }
}

@media (min-height: 880px) {
  .room-person { width: 34px; height: 47px; }
  .room-person .avatar { width: 32px; height: 40px; }
  .room-person.is-me { width: 40px; height: 54px; }
  .room-person.is-me .avatar { width: 38px; height: 47px; }
  .room__more { height: 18px; font-size: 9px; }
}

@media (min-width: 520px) {
  .app { box-shadow: 0 0 0 1px rgba(255, 180, 120, .08), 0 0 100px rgba(0, 0, 0, .9); }
  .tabbar { box-shadow: 0 -10px 30px rgba(0, 0, 0, .55); border-radius: 0; }
  .modal-card { border-radius: 22px; margin-bottom: 12px; }
  .modal-overlay { align-items: center; padding: 20px; }
  .modal-card--result { max-width: 400px; }
  .result { border-radius: 22px 22px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
