/* =====================================================================
   无间风云 · 多人联机（BFireworks）
   ---------------------------------------------------------------------
   所有选择器均以 .wj-app 作用域开头，变量统一 --wj-*，
   不触碰全局 body / html / 其它页面元素。
   ===================================================================== */

.wj-app {
  --wj-bg: #07090e;
  --wj-bg2: #0c1017;
  --wj-panel: #11151d;
  --wj-panel2: #171c26;
  --wj-line: #232b39;
  --wj-line2: #2f394a;
  --wj-gold: #c9a86a;
  --wj-gold-bright: #e8d5ae;
  --wj-blue: #4a86c8;
  --wj-blue2: #8fbbea;
  --wj-red: #c0453e;
  --wj-red2: #e2726a;
  --wj-text: #d6d9e0;
  --wj-dim: #8a90a0;
  --wj-faint: #5c6373;
  --wj-serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --wj-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --wj-side-w: 330px;

  position: relative;
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--topbar-h, 56px) - 58px);
  height: calc(100dvh - var(--topbar-h, 56px) - 58px);
  min-height: 560px;
  overflow: hidden;
  border: 1px solid #1b2230;
  border-radius: 16px;
  background:
    radial-gradient(1200px 520px at 50% -12%, rgba(74, 134, 200, 0.12), transparent 62%),
    radial-gradient(1000px 460px at 50% 118%, rgba(192, 69, 62, 0.10), transparent 60%),
    linear-gradient(180deg, #0b0f16 0%, #07090e 55%, #05070b 100%);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  color: var(--wj-text);
  font-family: var(--wj-serif);
  -webkit-font-smoothing: antialiased;
}

.wj-app *,
.wj-app *::before,
.wj-app *::after { box-sizing: border-box; }

.wj-app [hidden] { display: none !important; }

.wj-app ::-webkit-scrollbar { width: 6px; height: 6px; }
.wj-app ::-webkit-scrollbar-track { background: transparent; }
.wj-app ::-webkit-scrollbar-thumb { background: #2b3444; border-radius: 6px; }
.wj-app ::-webkit-scrollbar-thumb:hover { background: #3c485c; }

.wj-app button:focus-visible,
.wj-app input:focus-visible { outline: 1px solid rgba(201, 168, 106, 0.8); outline-offset: 2px; }

/* ---------- 胶片颗粒 + 暗角 ---------- */
.wj-app .wj-grain {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 260px 260px;
  mix-blend-mode: screen;
}
.wj-app .wj-vignette {
  position: absolute;
  inset: 0;
  z-index: 25;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 42%, rgba(0, 0, 0, 0.55) 100%);
}

/* ---------- 按钮 ---------- */
.wj-app .wj-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: var(--wj-sans);
  font-size: 13px;
  letter-spacing: 0.08em;
  line-height: 1.2;
  padding: 8px 16px;
  border: 1px solid var(--wj-line2);
  border-radius: 5px;
  background: linear-gradient(180deg, #1b2130, #11151d);
  color: #cdd3dd;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.18s, color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.wj-app .wj-btn:hover:not(:disabled) {
  border-color: rgba(201, 168, 106, 0.75);
  color: var(--wj-gold-bright);
  box-shadow: 0 0 14px rgba(201, 168, 106, 0.16);
  transform: translateY(-1px);
}
.wj-app .wj-btn:active:not(:disabled) { transform: translateY(0) scale(0.98); }
.wj-app .wj-btn:disabled { opacity: 0.34; cursor: not-allowed; }
.wj-app .wj-btn-gold {
  border-color: rgba(201, 168, 106, 0.6);
  color: var(--wj-gold-bright);
  background: linear-gradient(180deg, rgba(201, 168, 106, 0.18), rgba(201, 168, 106, 0.04));
  box-shadow: 0 0 18px rgba(201, 168, 106, 0.08);
}
.wj-app .wj-btn-danger { border-color: rgba(192, 69, 62, 0.5); color: #e6918a; }
.wj-app .wj-btn-danger:hover:not(:disabled) {
  border-color: var(--wj-red2);
  color: #ffd9d5;
  box-shadow: 0 0 14px rgba(192, 69, 62, 0.25);
}
.wj-app .wj-btn-small { padding: 5px 10px; font-size: 11.5px; letter-spacing: 0.06em; }
.wj-app .wj-btn-block { width: 100%; }
.wj-app .wj-btn-sub { font-size: 10px; opacity: 0.65; margin-left: 3px; }
.wj-app .wj-btn-equip {
  border-color: rgba(201, 168, 106, 0.52);
  color: #ecd9ac;
  background: linear-gradient(180deg, rgba(201, 168, 106, 0.17), rgba(201, 168, 106, 0.03));
  box-shadow: 0 0 16px rgba(201, 168, 106, 0.08);
}
.wj-app .wj-btn-equip:hover:not(:disabled) {
  border-color: var(--wj-gold);
  color: #fff3d4;
  box-shadow: 0 0 18px rgba(201, 168, 106, 0.22);
}

.wj-app .wj-linkbtn {
  border: 0;
  background: none;
  color: rgba(201, 168, 106, 0.85);
  font-family: var(--wj-sans);
  font-size: 11px;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 2px;
}
.wj-app .wj-linkbtn:hover { color: var(--wj-gold-bright); }

/* ---------- 输入 ---------- */
.wj-app .wj-input {
  width: 100%;
  margin: 0 0 10px;
  padding: 9px 11px;
  border: 1px solid #262f3f;
  border-radius: 5px;
  background: rgba(6, 9, 14, 0.88);
  color: var(--wj-text);
  font-family: var(--wj-sans);
  font-size: 13px;
  letter-spacing: 0.08em;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.wj-app .wj-input::placeholder { color: #555d6d; letter-spacing: 0.03em; }
.wj-app .wj-input:focus {
  border-color: rgba(201, 168, 106, 0.6);
  box-shadow: 0 0 0 3px rgba(201, 168, 106, 0.10);
}

/* ---------- 顶栏 ---------- */
.wj-app .wj-top {
  position: relative;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(20, 25, 35, 0.92), rgba(10, 13, 19, 0.8));
  flex: 0 0 auto;
}
.wj-app .wj-brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.wj-app .wj-brand-cn {
  font-size: 19px;
  letter-spacing: 0.16em;
  color: var(--wj-gold-bright);
  font-weight: 700;
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(201, 168, 106, 0.25);
}
.wj-app .wj-brand-cn b {
  color: #d4574f;
  font-weight: 700;
  text-shadow: 0 0 18px rgba(192, 69, 62, 0.45);
}
.wj-app .wj-brand-en {
  font-family: var(--wj-sans);
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--wj-faint);
  white-space: nowrap;
}
.wj-app .wj-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: #3c4250;
  box-shadow: 0 0 0 3px rgba(60, 66, 80, 0.15);
  transition: background 0.25s, box-shadow 0.25s;
}
.wj-app .wj-live.is-live { background: #63c08a; box-shadow: 0 0 10px rgba(99, 192, 138, 0.8), 0 0 0 3px rgba(99, 192, 138, 0.12); }
.wj-app .wj-live.is-wait { background: var(--wj-gold); animation: wjBlink 1.1s steps(2) infinite; }
.wj-app .wj-live.is-off { background: var(--wj-red); box-shadow: 0 0 8px rgba(192, 69, 62, 0.7); }

.wj-app .wj-topstats {
  display: flex;
  align-items: center;
  margin-left: auto;
  order: 2;
  min-width: 0;
}
.wj-app .wj-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 0 13px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}
.wj-app .wj-stat:first-child { border-left: 0; }
.wj-app .wj-stat-k {
  font-family: var(--wj-sans);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--wj-faint);
  white-space: nowrap;
}
.wj-app .wj-stat-v {
  display: block;
  max-width: 124px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--wj-sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--wj-gold-bright);
  font-variant-numeric: tabular-nums;
}
.wj-app .wj-topbtns { display: flex; align-items: center; gap: 8px; order: 3; }
.wj-app .wj-roomchip {
  padding: 4px 9px;
  border: 1px solid rgba(201, 168, 106, 0.32);
  border-radius: 4px;
  background: rgba(201, 168, 106, 0.07);
  color: var(--wj-gold);
  font-family: var(--wj-sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

/* ---------- 连接提示 ---------- */
.wj-app .wj-conn {
  position: relative;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-bottom: 1px solid rgba(192, 69, 62, 0.35);
  background: rgba(192, 69, 62, 0.13);
  color: #f0b0aa;
  font-family: var(--wj-sans);
  font-size: 12px;
  letter-spacing: 0.03em;
  flex: 0 0 auto;
}
.wj-app .wj-conn.is-info {
  border-bottom-color: rgba(74, 134, 200, 0.32);
  background: rgba(74, 134, 200, 0.11);
  color: #a9c8ea;
}
.wj-app .wj-conn.is-denied { background: rgba(192, 69, 62, 0.18); color: #f3b9b4; }
.wj-app .wj-conn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: wjBlink 1.4s steps(2) infinite;
}
.wj-app .wj-conn-text { flex: 1; min-width: 0; line-height: 1.6; }

/* ---------- 主体 ---------- */
.wj-app .wj-body { flex: 1; display: flex; min-height: 0; position: relative; z-index: 5; }
.wj-app .wj-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px 18px;
}
.wj-app .wj-view { display: flex; flex-direction: column; flex: 1; min-height: 0; }

/* ---------- 开始界面 ---------- */
.wj-app .wj-setup {
  position: relative;
  overflow: auto;
  align-items: center;
  justify-content: flex-start;
  padding: 30px 10px 22px;
}
.wj-app .wj-skyline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 200px;
  pointer-events: none;
  opacity: 0.6;
  background: repeating-linear-gradient(90deg,
    #0c1119 0 46px, #0f1520 46px 68px, #0b0f17 68px 112px,
    #121a27 112px 130px, #0b0f17 130px 190px);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 60%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 60%);
  clip-path: polygon(0 62%, 6% 62%, 6% 40%, 9% 40%, 9% 55%, 14% 55%, 14% 30%, 17% 30%, 17% 52%,
    23% 52%, 23% 20%, 26% 20%, 26% 48%, 33% 48%, 33% 35%, 37% 35%, 37% 60%, 44% 60%, 44% 25%,
    47% 25%, 47% 50%, 54% 50%, 54% 15%, 57% 15%, 57% 45%, 63% 45%, 63% 32%, 67% 32%, 67% 58%,
    74% 58%, 74% 38%, 78% 38%, 78% 55%, 85% 55%, 85% 28%, 88% 28%, 88% 50%, 95% 50%, 95% 60%,
    100% 60%, 100% 100%, 0 100%);
}
.wj-app .wj-hero {
  position: relative;
  flex: 0 0 auto;
  margin-top: auto;
  text-align: center;
  padding: 8px 0 4px;
}
.wj-app .wj-hero-glow {
  position: absolute;
  left: 50%;
  top: -26px;
  width: min(480px, 92%);
  height: 200px;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(ellipse, rgba(192, 69, 62, 0.28), rgba(201, 168, 106, 0.10) 45%, transparent 72%);
  filter: blur(2px);
}
.wj-app .wj-kicker {
  position: relative;
  font-family: var(--wj-sans);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--wj-faint);
}
.wj-app .wj-title {
  position: relative;
  margin: 8px 0 4px;
  padding-left: 0.22em;
  font-size: clamp(38px, 6vw, 58px);
  letter-spacing: 0.22em;
  color: var(--wj-gold-bright);
  text-shadow: 0 0 26px rgba(201, 168, 106, 0.35), 0 3px 0 #000;
}
.wj-app .wj-title span { color: #d4574f; text-shadow: 0 0 26px rgba(192, 69, 62, 0.5), 0 3px 0 #000; }
.wj-app .wj-sub {
  font-family: var(--wj-sans);
  font-size: 10px;
  letter-spacing: 0.4em;
  color: #7a8090;
}
.wj-app .wj-tagline {
  margin-top: 10px;
  font-size: 14px;
  letter-spacing: 0.22em;
  color: #8b92a2;
}
.wj-app .wj-tagline b { color: #d4574f; font-weight: 400; }

.wj-app .wj-setupgrid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 720px;
  margin-top: 22px;
}
.wj-app .wj-box {
  position: relative;
  padding: 18px 18px 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(21, 26, 36, 0.94), rgba(12, 15, 22, 0.94));
  text-align: left;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}
.wj-app .wj-box::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 168, 106, 0.55), transparent);
}
.wj-app .wj-box-kicker {
  font-family: var(--wj-sans);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--wj-faint);
}
.wj-app .wj-box h3 {
  margin: 5px 0 8px;
  font-size: 17px;
  letter-spacing: 0.14em;
  color: var(--wj-gold-bright);
}
.wj-app .wj-box p {
  margin: 0 0 14px;
  font-size: 12.5px;
  line-height: 1.8;
  color: #9299a8;
}
.wj-app .wj-hint {
  margin-top: 9px;
  font-family: var(--wj-sans);
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--wj-faint);
}
.wj-app .wj-setupfoot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  margin-top: 20px;
  margin-bottom: auto;
  font-family: var(--wj-sans);
  font-size: 11px;
  color: var(--wj-faint);
  text-align: center;
}

/* ---------- 大厅 ---------- */
.wj-app .wj-lobby { gap: 14px; overflow: auto; padding-right: 2px; }
.wj-app .wj-lobbyhead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.wj-app .wj-lobby-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wj-app .wj-code {
  font-family: var(--wj-sans);
  font-size: clamp(22px, 3.4vw, 32px);
  font-weight: 700;
  letter-spacing: 0.32em;
  color: var(--wj-gold-bright);
  text-shadow: 0 0 24px rgba(201, 168, 106, 0.3);
  padding-left: 0.1em;
}
.wj-app .wj-copywrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.wj-app .wj-lobby-count { font-family: var(--wj-sans); font-size: 11.5px; color: var(--wj-dim); }
.wj-app .wj-lobby-count b { color: var(--wj-gold); font-size: 14px; }
.wj-app .wj-seats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.wj-app .wj-seat {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px 11px;
  border: 1px solid var(--wj-line);
  border-radius: 8px;
  background: linear-gradient(180deg, #141924, #0e1219);
  transition: border-color 0.2s, opacity 0.2s;
}
.wj-app .wj-seat.is-host { border-color: rgba(201, 168, 106, 0.45); box-shadow: inset 0 0 22px rgba(201, 168, 106, 0.05); }
.wj-app .wj-seat.is-me { border-color: rgba(74, 134, 200, 0.4); }
.wj-app .wj-seat.is-empty { border-style: dashed; background: rgba(255, 255, 255, 0.012); opacity: 0.72; }
.wj-app .wj-seat.is-offline { opacity: 0.55; }
.wj-app .wj-seat-av {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: linear-gradient(145deg,
    hsl(var(--wj-av-h, 40), 30%, 28%),
    hsl(var(--wj-av-h, 40), 32%, 15%));
  color: #d9e2f0;
  font-size: 14px;
}
.wj-app .wj-seat.is-empty .wj-seat-av {
  border-style: dashed;
  border-color: #333c4d;
  background: transparent;
  color: #4a5262;
  font-size: 16px;
}
.wj-app .wj-seat-info { min-width: 0; flex: 1; }
.wj-app .wj-seat-name {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  font-size: 13.5px;
  letter-spacing: 0.05em;
  color: #dfe3ea;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.wj-app .wj-seat-sub {
  margin-top: 3px;
  font-family: var(--wj-sans);
  font-size: 10px;
  color: var(--wj-faint);
  white-space: nowrap;
}
.wj-app .wj-dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: #4a5262; }
.wj-app .wj-dot.is-on { background: #63c08a; box-shadow: 0 0 6px rgba(99, 192, 138, 0.8); }
.wj-app .wj-dot.is-off { background: var(--wj-red); box-shadow: 0 0 6px rgba(192, 69, 62, 0.7); }
.wj-app .wj-lobbyfoot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.wj-app .wj-lobbyhint {
  flex: 1;
  min-width: 180px;
  font-family: var(--wj-sans);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--wj-dim);
}
.wj-app .wj-lobbybtns { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- 对局 ---------- */
.wj-app .wj-game { overflow: hidden; }
.wj-app .wj-tablewrap {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.wj-app .wj-tablescroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 2px 3px 2px 2px;
}
.wj-app .wj-table {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 11px;
  align-content: start;
}

.wj-app .wj-player {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 168px;
  padding: 11px 12px 10px;
  border: 1px solid #222a38;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(180deg, #151b26, #0e121a);
  transition: border-color 0.25s, box-shadow 0.3s, opacity 0.3s, filter 0.3s;
}
.wj-app .wj-player::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.09), transparent);
}
.wj-app .wj-player.is-me { box-shadow: inset 2px 0 0 rgba(74, 134, 200, 0.55); border-color: rgba(74, 134, 200, 0.32); }
.wj-app .wj-player.is-current {
  border-color: rgba(201, 168, 106, 0.55);
  animation: wjBreathe 2.8s ease-in-out infinite;
}
.wj-app .wj-player.is-current::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -42%;
  height: 40%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(232, 213, 174, 0.10), transparent);
  animation: wjScan 3.2s linear infinite;
}
.wj-app .wj-player.is-current .wj-pname-t { color: var(--wj-gold-bright); }
.wj-app .wj-player.is-current .wj-avatar { box-shadow: 0 0 0 1px rgba(201, 168, 106, 0.6), 0 0 16px rgba(201, 168, 106, 0.28); }
.wj-app .wj-player.is-wounded { background: linear-gradient(180deg, #1a1418, #0f1219); }
.wj-app .wj-player.is-wounded .wj-avatar { box-shadow: 0 0 0 1px rgba(192, 69, 62, 0.6), 0 0 14px rgba(192, 69, 62, 0.3); }
.wj-app .wj-player.is-offline { opacity: 0.58; }
.wj-app .wj-player.is-dead { opacity: 0.64; filter: grayscale(0.5); }
.wj-app .wj-player.is-dead .wj-cards { opacity: 0.85; }
.wj-app .wj-player.is-aimed { border-color: rgba(192, 69, 62, 0.45); }
.wj-app .wj-player.is-hit { animation: wjHit 0.5s ease-out; }
.wj-app .wj-player.is-turnpop { animation: wjTurnPop 0.8s ease-out; }

.wj-app .wj-reticle {
  position: absolute;
  right: 12px;
  top: 52px;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(192, 69, 62, 0.7);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 2;
}
.wj-app .wj-reticle::before,
.wj-app .wj-reticle::after {
  content: "";
  position: absolute;
  background: rgba(192, 69, 62, 0.7);
}
.wj-app .wj-reticle::before { left: 50%; top: -4px; bottom: -4px; width: 1px; transform: translateX(-50%); }
.wj-app .wj-reticle::after { top: 50%; left: -4px; right: -4px; height: 1px; transform: translateY(-50%); }
.wj-app .wj-player.is-aimed .wj-reticle { opacity: 1; animation: wjReticle 1.6s ease-in-out infinite; }

.wj-app .wj-phead { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; }
.wj-app .wj-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: linear-gradient(145deg,
    hsl(var(--wj-av-h, 40), 30%, 28%),
    hsl(var(--wj-av-h, 40), 32%, 15%));
  color: #dde5f1;
  font-size: 15px;
  transition: box-shadow 0.25s;
}
.wj-app .wj-pid { flex: 1; min-width: 0; }
.wj-app .wj-pname { display: flex; align-items: center; gap: 5px; min-width: 0; }
.wj-app .wj-pname-t {
  overflow: hidden;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: #dfe3ea;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.wj-app .wj-pbadges { display: flex; flex: 0 0 auto; gap: 3px; }
.wj-app .wj-badge {
  font-family: var(--wj-sans);
  font-size: 9px;
  font-style: normal;
  line-height: 1;
  letter-spacing: 0.05em;
  padding: 2px 4px;
  border: 1px solid transparent;
  border-radius: 3px;
  white-space: nowrap;
}
.wj-app .wj-badge-host { color: #0c0f16; background: var(--wj-gold); border-color: var(--wj-gold); }
.wj-app .wj-badge-me { color: #a9c8ea; border-color: rgba(74, 134, 200, 0.5); background: rgba(74, 134, 200, 0.12); }
.wj-app .wj-pmeta {
  margin-top: 3px;
  overflow: hidden;
  font-family: var(--wj-sans);
  font-size: 10px;
  color: var(--wj-faint);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.wj-app .wj-pdot { width: 6px; height: 6px; flex: 0 0 auto; margin-top: 5px; align-self: flex-start; border-radius: 50%; background: #4a5262; }
.wj-app .wj-pdot.is-on { background: #63c08a; box-shadow: 0 0 6px rgba(99, 192, 138, 0.8); }
.wj-app .wj-pdot.is-off { background: var(--wj-red); box-shadow: 0 0 6px rgba(192, 69, 62, 0.7); }

/* ---------- 底细牌（3D 翻面） ---------- */
.wj-app .wj-cards {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 7px;
  margin: 11px 0 9px;
}
.wj-app .wj-card {
  position: relative;
  width: 52px;
  height: 74px;
  flex: 0 0 auto;
  perspective: 600px;
}
.wj-app .wj-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.62s cubic-bezier(0.2, 0.75, 0.25, 1);
}
.wj-app .wj-card.is-up .wj-card-inner { transform: rotateY(180deg); }
.wj-app .wj-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #05070a;
  border-radius: 6px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.wj-app .wj-back {
  background: repeating-linear-gradient(45deg, #1a2231 0 5px, #111823 5px 10px);
  border-color: #2b3549;
  color: #43506a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 3px 8px rgba(0, 0, 0, 0.45);
}
.wj-app .wj-back span { font-size: 18px; opacity: 0.8; }
.wj-app .wj-front {
  flex-direction: column;
  gap: 1px;
  transform: rotateY(180deg);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
}
.wj-app .wj-card-label { font-size: 13px; letter-spacing: 0.06em; line-height: 1; }
.wj-app .wj-card-star { display: none; font-style: normal; font-size: 9px; line-height: 1; opacity: 0.9; }
.wj-app .wj-card.f-loyal .wj-front {
  background: linear-gradient(180deg, #2a4f79, #1b3454);
  border-color: #3d6ea8;
  color: #c6dcf3;
}
.wj-app .wj-card.f-traitor .wj-front {
  background: linear-gradient(180deg, #7e2f2a, #571c19);
  border-color: #a8443e;
  color: #f4cbc7;
}
.wj-app .wj-card.f-chief .wj-front {
  background: linear-gradient(180deg, #2f639e, #17395f);
  border-color: #6397cc;
  color: #f2f8ff;
  box-shadow: 0 0 14px rgba(74, 134, 200, 0.55), 0 3px 10px rgba(0, 0, 0, 0.45);
}
.wj-app .wj-card.f-boss .wj-front {
  background: linear-gradient(180deg, #962f2a, #5c1a17);
  border-color: #c05048;
  color: #fff;
  box-shadow: 0 0 14px rgba(192, 69, 62, 0.55), 0 3px 10px rgba(0, 0, 0, 0.45);
}
.wj-app .wj-card.is-known .wj-front { filter: saturate(0.55) brightness(0.92); }
.wj-app .wj-card.is-known .wj-front::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(201, 168, 106, 0.55);
  border-radius: 5px;
}
.wj-app .wj-card.is-own .wj-front { outline: 1px dashed rgba(201, 168, 106, 0.65); outline-offset: 2px; }
.wj-app .wj-card-tag {
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 3;
  display: none;
  padding: 2px 3px;
  border-radius: 3px;
  background: var(--wj-gold);
  color: #0a0d13;
  font-family: var(--wj-sans);
  font-size: 9px;
  font-style: normal;
  line-height: 1;
}
.wj-app .wj-card.is-known .wj-card-tag,
.wj-app .wj-card.is-own .wj-card-tag { display: block; }

/* ---------- 状态标签 ---------- */
.wj-app .wj-chips { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 4px; }
.wj-app .wj-chip {
  padding: 3px 6px;
  border: 1px solid var(--wj-line);
  border-radius: 3px;
  font-family: var(--wj-sans);
  font-size: 10.5px;
  line-height: 1.2;
  color: var(--wj-dim);
  white-space: nowrap;
}
.wj-app .wj-chip-gun { border-color: #3d5578; color: #9db4d8; background: rgba(74, 134, 200, 0.08); }
.wj-app .wj-chip-wound { border-color: rgba(192, 69, 62, 0.55); color: #e6918a; background: rgba(192, 69, 62, 0.1); }
.wj-app .wj-chip-aim { border-color: rgba(201, 168, 106, 0.5); color: var(--wj-gold); background: rgba(201, 168, 106, 0.08); }
.wj-app .wj-chip-eq { border-style: dashed; color: var(--wj-faint); }
.wj-app .wj-chip-eq-own { border-style: solid; border-color: rgba(201, 168, 106, 0.35); color: #d9c69c; }
.wj-app .wj-chip-leader {
  border-color: rgba(201, 168, 106, 0.6);
  color: #f0dfb8;
  background: linear-gradient(90deg, rgba(201, 168, 106, 0.18), transparent);
}
.wj-app .wj-chip-dead { border-color: rgba(192, 69, 62, 0.7); color: #f0a9a3; background: rgba(192, 69, 62, 0.16); }
.wj-app .wj-chip-off { border-color: #3a3f4a; color: #6b7280; }
/* 装备效果徽章（effects） */
.wj-app .wj-chip-fx { border-style: solid; letter-spacing: 0.02em; }
.wj-app .wj-chip-fx-shield {
  border-color: rgba(96, 150, 205, 0.6);
  color: #a9c9ea;
  background: linear-gradient(180deg, rgba(74, 134, 200, 0.16), rgba(74, 134, 200, 0.05));
}
.wj-app .wj-chip-fx-buff {
  border-color: rgba(201, 168, 106, 0.5);
  color: #e0cfa6;
  background: linear-gradient(180deg, rgba(201, 168, 106, 0.14), rgba(201, 168, 106, 0.03));
}
.wj-app .wj-chip-fx-warn {
  border-color: rgba(201, 168, 106, 0.65);
  color: #f0c981;
  background: rgba(201, 168, 106, 0.1);
}
.wj-app .wj-chip-fx-bad {
  border-color: rgba(192, 69, 62, 0.6);
  color: #eea29b;
  background: rgba(192, 69, 62, 0.13);
}
.wj-app .wj-chip-fx-misc { border-color: #3a3f4a; color: #8b94a3; }

/* ---------- 出局印章 ---------- */
.wj-app .wj-stamp {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(6, 8, 12, 0.1), rgba(6, 8, 12, 0.28));
}
.wj-app .wj-stamp.is-shown { display: flex; }
.wj-app .wj-stamp span {
  padding: 3px 10px 3px 14px;
  border: 2px solid rgba(192, 69, 62, 0.75);
  border-radius: 4px;
  background: rgba(6, 8, 12, 0.55);
  color: #e6918a;
  font-size: 19px;
  letter-spacing: 0.3em;
  white-space: nowrap;
  text-shadow: 0 0 14px rgba(192, 69, 62, 0.6);
  transform: rotate(-12deg);
  animation: wjStampIn 0.5s cubic-bezier(0.2, 1.5, 0.35, 1);
}

/* ---------- 行动栏 ---------- */
.wj-app .wj-action {
  position: relative;
  z-index: 6;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #232b39;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(23, 29, 40, 0.95), rgba(12, 16, 23, 0.95));
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
}
.wj-app .wj-selfline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-family: var(--wj-sans);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: var(--wj-faint);
}
.wj-app .wj-selfline b { color: #c3cad6; font-weight: 500; }
.wj-app .wj-action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wj-app .wj-action-who { font-size: 13px; letter-spacing: 0.12em; color: var(--wj-gold); }
.wj-app .wj-wait {
  font-family: var(--wj-sans);
  font-size: 12px;
  line-height: 1.7;
  color: var(--wj-dim);
}
.wj-app .wj-wait b { color: var(--wj-gold-bright); font-weight: 500; }
.wj-app .wj-wait-inline { white-space: nowrap; }

/* ---------- 右侧双栏 ---------- */
.wj-app .wj-side {
  width: var(--wj-side-w);
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(14, 18, 26, 0.78), rgba(8, 11, 16, 0.92));
}
.wj-app .wj-panel { display: flex; flex-direction: column; flex: 1 1 50%; min-height: 0; }
.wj-app .wj-panel.is-collapsed { flex: 0 0 auto; }
.wj-app .wj-panel + .wj-panel { border-top: 1px solid rgba(255, 255, 255, 0.06); }
.wj-app .wj-panel-head {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.015);
  cursor: pointer;
  user-select: none;
}
.wj-app .wj-panel-title {
  padding-left: 0.28em;
  font-family: var(--wj-sans);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  color: #9aa1b0;
}
.wj-app .wj-panel-caret {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  margin-right: 2px;
  border-right: 1px solid #6b7280;
  border-bottom: 1px solid #6b7280;
  transform: rotate(45deg);
  transition: transform 0.2s;
}
.wj-app .wj-panel.is-collapsed .wj-panel-caret { transform: rotate(-45deg); }
.wj-app .wj-panel.is-collapsed .wj-panel-body { display: none; }
.wj-app .wj-panel-body { display: flex; flex: 1; flex-direction: column; min-height: 0; overflow: hidden; }
.wj-app .wj-panel-chat { flex: 0 0 44%; min-height: 190px; }
.wj-app .wj-panel-log.is-collapsed + .wj-panel-chat { flex: 1 1 auto; }
.wj-app .wj-side-chatonly .wj-panel-chat { flex: 1 1 auto; }
.wj-app .wj-log {
  flex: 1;
  overflow: auto;
  padding: 9px 14px 12px;
  font-family: var(--wj-sans);
  font-size: 11.5px;
  line-height: 1.75;
}
.wj-app .wj-logline {
  margin: 0 0 6px;
  padding-left: 8px;
  border-left: 2px solid transparent;
  color: #9aa1b0;
  word-break: break-word;
}
.wj-app .wj-log-hl { color: #d5d9e0; border-left-color: rgba(201, 168, 106, 0.7); }
.wj-app .wj-log-bad { color: #e0918a; border-left-color: rgba(192, 69, 62, 0.8); }
.wj-app .wj-log-good { color: #9dbedf; border-left-color: rgba(74, 134, 200, 0.8); }
.wj-app .wj-log-sys { color: #666e7e; font-size: 10.5px; }

.wj-app .wj-chat { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 8px; padding: 8px 12px; }
.wj-app .wj-chatmsg { display: flex; align-items: flex-start; gap: 7px; }
.wj-app .wj-chat-av {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg,
    hsl(var(--wj-av-h, 40), 30%, 28%),
    hsl(var(--wj-av-h, 40), 32%, 15%));
  color: #d5deea;
  font-size: 10px;
}
.wj-app .wj-chat-main { flex: 1; min-width: 0; }
.wj-app .wj-chat-head { display: flex; align-items: baseline; gap: 6px; }
.wj-app .wj-chat-name {
  overflow: hidden;
  font-family: var(--wj-sans);
  font-size: 10.5px;
  color: #b9c0cd;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.wj-app .wj-chat-time { flex: 0 0 auto; font-family: var(--wj-sans); font-size: 9px; color: #565e6d; }
.wj-app .wj-chat-text {
  font-family: var(--wj-sans);
  font-size: 12px;
  line-height: 1.6;
  color: #dfe3ea;
  white-space: pre-wrap;
  word-break: break-word;
}
.wj-app .wj-chatmsg.is-mine .wj-chat-name { color: var(--wj-gold); }
.wj-app .wj-empty {
  padding: 16px 8px;
  font-family: var(--wj-sans);
  font-size: 11px;
  line-height: 1.8;
  color: #5b6272;
  text-align: center;
}
.wj-app .wj-chatform {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  padding: 8px 10px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.wj-app .wj-chatinput { flex: 1; min-width: 0; margin: 0; padding: 7px 9px; font-size: 12px; }

/* ---------- 悬浮提示 ---------- */
.wj-app .wj-banner {
  position: absolute;
  left: 50%;
  top: 70px;
  z-index: 60;
  max-width: 86%;
  padding: 9px 20px;
  border: 1px solid rgba(201, 168, 106, 0.45);
  border-radius: 4px;
  background: rgba(8, 10, 15, 0.92);
  color: var(--wj-gold-bright);
  font-size: 13.5px;
  letter-spacing: 0.12em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -12px);
  transition: opacity 0.28s, transform 0.28s;
}
.wj-app .wj-banner.show { opacity: 1; transform: translate(-50%, 0); }
.wj-app .wj-banner.is-bad { border-color: rgba(192, 69, 62, 0.6); color: #f0b3ae; }
.wj-app .wj-banner.is-good { border-color: rgba(74, 134, 200, 0.6); color: #b7d3f2; }

/* ---------- 枪口闪光 / 震屏 ---------- */
.wj-app .wj-tablewrap.wj-shaking { animation: wjShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
.wj-app .wj-muzzle {
  position: absolute;
  z-index: 15;
  width: 130px;
  height: 130px;
  margin: -65px 0 0 -65px;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(circle,
    rgba(255, 246, 220, 0.95) 0%,
    rgba(255, 196, 96, 0.6) 28%,
    rgba(255, 120, 40, 0.22) 52%,
    transparent 70%);
  animation: wjMuzzle 0.46s ease-out forwards;
}
.wj-app .wj-flash {
  position: absolute;
  inset: 0;
  z-index: 14;
  pointer-events: none;
  background: radial-gradient(circle at var(--wj-fx, 50%) var(--wj-fy, 50%),
    rgba(255, 236, 200, 0.30), transparent 46%);
  animation: wjFlash 0.4s ease-out forwards;
}

/* ---------- 结算层 ---------- */
.wj-app .wj-over {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
  padding: 16px;
  background: radial-gradient(ellipse at 50% 35%, rgba(10, 13, 19, 0.84), rgba(3, 5, 8, 0.94));
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.wj-app .wj-over-box {
  margin: auto;
  width: 100%;
  max-width: 570px;
  padding: 24px 24px 20px;
  border: 1px solid rgba(201, 168, 106, 0.28);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(20, 25, 35, 0.97), rgba(8, 11, 16, 0.97));
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
  animation: wjOverIn 0.5s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.wj-app .wj-over-police {
  border-color: rgba(74, 134, 200, 0.38);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65), 0 0 50px rgba(74, 134, 200, 0.14);
}
.wj-app .wj-over-gang {
  border-color: rgba(192, 69, 62, 0.4);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65), 0 0 50px rgba(192, 69, 62, 0.14);
}
.wj-app .wj-over-kicker {
  font-family: var(--wj-sans);
  font-size: 10px;
  letter-spacing: 0.34em;
  color: #7d8494;
}
.wj-app .wj-win {
  margin: 8px 0 6px;
  padding-left: 0.26em;
  font-size: clamp(28px, 4.4vw, 42px);
  font-weight: 700;
  letter-spacing: 0.26em;
}
.wj-app .wj-win-police {
  color: #8fbbea;
  text-shadow: 0 0 22px rgba(74, 134, 200, 0.7), 0 0 60px rgba(74, 134, 200, 0.35);
  animation: wjWinGlowBlue 2.6s ease-in-out infinite;
}
.wj-app .wj-win-gang {
  color: #e2726a;
  text-shadow: 0 0 22px rgba(192, 69, 62, 0.7), 0 0 60px rgba(192, 69, 62, 0.35);
  animation: wjWinGlowRed 2.6s ease-in-out infinite;
}
.wj-app .wj-over-quote { margin: 4px 0 16px; font-size: 13px; letter-spacing: 0.16em; color: #9aa1b0; }
.wj-app .wj-factions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; text-align: left; }
.wj-app .wj-faction {
  padding: 9px 11px;
  border: 1px solid #242c3a;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.015);
}
.wj-app .wj-faction h4 {
  margin: 0 0 6px;
  font-family: var(--wj-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
}
.wj-app .wj-faction-police h4 { color: #7fb0e8; }
.wj-app .wj-faction-gang h4 { color: #e08a84; }
.wj-app .wj-faction-list { display: flex; flex-wrap: wrap; gap: 4px; }
.wj-app .wj-fname {
  padding: 2px 6px;
  border: 1px solid #2a3342;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--wj-sans);
  font-size: 11px;
  color: #c0c7d4;
}
.wj-app .wj-fname.is-leader { border-color: rgba(201, 168, 106, 0.55); color: var(--wj-gold); }
.wj-app .wj-over-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }

/* ---------- 弹窗 ---------- */
.wj-app .wj-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(3, 5, 8, 0.78);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
.wj-app .wj-modal {
  position: relative;
  width: min(660px, 94vw);
  max-height: 88vh;
  overflow: auto;
  padding: 22px 24px 20px;
  border: 1px solid rgba(201, 168, 106, 0.42);
  border-radius: 12px;
  background: linear-gradient(180deg, #161b25, #0c1017 70%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.75), 0 0 40px rgba(201, 168, 106, 0.07);
  color: var(--wj-text);
  font-family: var(--wj-serif);
  animation: wjModalIn 0.26s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.wj-app .wj-modal::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 168, 106, 0.7), transparent);
}
.wj-app .wj-modal h2 {
  margin: 2px 0 8px;
  font-size: 22px;
  letter-spacing: 0.16em;
  color: var(--wj-gold-bright);
  text-align: center;
}
.wj-app .wj-modal-kicker {
  margin-bottom: 2px;
  font-family: var(--wj-sans);
  font-size: 9px;
  letter-spacing: 0.34em;
  color: var(--wj-faint);
  text-align: center;
}
.wj-app .wj-priv {
  margin-bottom: 2px;
  font-family: var(--wj-sans);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--wj-gold);
  text-align: center;
}
.wj-app .wj-modal-sub {
  max-width: 520px;
  margin: 0 auto 16px;
  font-family: var(--wj-sans);
  font-size: 12.5px;
  line-height: 1.85;
  color: #a3aab8;
  text-align: center;
}
.wj-app .wj-modal-sub b { color: #f0c9c5; }
.wj-app .wj-modal-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; }
.wj-app .wj-picklist { display: flex; flex-direction: column; gap: 7px; margin-top: 14px; max-height: 46vh; overflow: auto; padding-right: 2px; }
.wj-app .wj-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #2a3342;
  border-radius: 7px;
  background: linear-gradient(180deg, #161c27, #10151e);
  color: #d7dbe3;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.wj-app .wj-pick:hover { border-color: rgba(201, 168, 106, 0.6); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.wj-app .wj-pick-av {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  background: linear-gradient(145deg,
    hsl(var(--wj-av-h, 40), 30%, 28%),
    hsl(var(--wj-av-h, 40), 32%, 15%));
  color: #dde5f1;
  font-size: 12px;
}
.wj-app .wj-pick-name { flex: 1; min-width: 0; overflow: hidden; font-size: 13.5px; letter-spacing: 0.05em; white-space: nowrap; text-overflow: ellipsis; }
.wj-app .wj-pick-meta { flex: 0 0 auto; font-family: var(--wj-sans); font-size: 10px; color: #77808f; }

.wj-app .wj-slotrow { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 6px 0 4px; }
.wj-app .wj-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 4px;
  border: 0;
  border-radius: 8px;
  background: none;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.18s, background 0.18s;
}
.wj-app .wj-slot:hover { transform: translateY(-4px); background: rgba(201, 168, 106, 0.06); }
.wj-app .wj-mini {
  width: 58px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #000;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  font-size: 13px;
  letter-spacing: 0.06em;
}
.wj-app .wj-mini-back {
  background: repeating-linear-gradient(45deg, #1a2231 0 5px, #111823 5px 10px);
  border-color: #2b3549;
  color: #43506a;
  font-size: 19px;
}
.wj-app .wj-mini.f-loyal { background: linear-gradient(180deg, #2a4f79, #1b3454); border-color: #3d6ea8; color: #c6dcf3; }
.wj-app .wj-mini.f-traitor { background: linear-gradient(180deg, #7e2f2a, #571c19); border-color: #a8443e; color: #f4cbc7; }
.wj-app .wj-mini.f-chief { background: linear-gradient(180deg, #2f639e, #17395f); border-color: #6397cc; color: #f2f8ff; box-shadow: 0 0 14px rgba(74, 134, 200, 0.5); }
.wj-app .wj-mini.f-boss { background: linear-gradient(180deg, #962f2a, #5c1a17); border-color: #c05048; color: #fff; box-shadow: 0 0 14px rgba(192, 69, 62, 0.5); }
.wj-app .wj-mini.is-own { outline: 1px dashed rgba(201, 168, 106, 0.7); outline-offset: 2px; }
.wj-app .wj-slot-label { font-family: var(--wj-sans); font-size: 10px; letter-spacing: 0.08em; color: #7c8494; }

.wj-app .wj-revealrow { display: flex; flex-wrap: wrap; justify-content: center; margin: 4px 0; }
.wj-app .wj-bigcard {
  width: 104px;
  height: 146px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 6px;
  border: 1px solid #000;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
}
.wj-app .wj-bigcard.f-loyal { background: linear-gradient(180deg, #2a4f79, #1b3454); border-color: #3d6ea8; color: #c6dcf3; }
.wj-app .wj-bigcard.f-traitor { background: linear-gradient(180deg, #7e2f2a, #571c19); border-color: #a8443e; color: #f4cbc7; }
.wj-app .wj-bigcard.f-chief { background: linear-gradient(180deg, #2f639e, #17395f); border-color: #6397cc; color: #f2f8ff; box-shadow: 0 0 24px rgba(74, 134, 200, 0.5), 0 8px 22px rgba(0, 0, 0, 0.5); }
.wj-app .wj-bigcard.f-boss { background: linear-gradient(180deg, #962f2a, #5c1a17); border-color: #c05048; color: #fff; box-shadow: 0 0 24px rgba(192, 69, 62, 0.5), 0 8px 22px rgba(0, 0, 0, 0.5); }
.wj-app .wj-bigcard-label { font-size: 22px; letter-spacing: 0.08em; }
.wj-app .wj-bigcard-star { font-size: 11px; line-height: 1; opacity: 0.9; }
.wj-app .wj-bigcard-sub { font-family: var(--wj-sans); font-size: 9px; letter-spacing: 0.2em; opacity: 0.65; }

.wj-app .wj-equiprow { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }
.wj-app .wj-equip {
  width: 200px;
  padding: 11px 13px;
  border: 1px solid #2a3342;
  border-radius: 9px;
  background: linear-gradient(180deg, #161c27, #0f141d);
  color: #d6dae2;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s, transform 0.18s;
}
.wj-app .wj-equip:hover { border-color: rgba(201, 168, 106, 0.6); transform: translateY(-2px); }
.wj-app .wj-equip-tag { font-family: var(--wj-sans); font-size: 9px; letter-spacing: 0.22em; color: var(--wj-faint); }
.wj-app .wj-equip-name { display: block; margin: 3px 0 5px; font-size: 16px; letter-spacing: 0.1em; color: var(--wj-gold-bright); }
.wj-app .wj-equip-desc { font-family: var(--wj-sans); font-size: 10.5px; line-height: 1.7; color: #8e95a4; }

.wj-app .wj-waitdots { display: flex; justify-content: center; gap: 6px; margin: 18px 0 4px; }
.wj-app .wj-waitdots i { width: 6px; height: 6px; border-radius: 50%; background: var(--wj-gold); animation: wjDots 1s ease-in-out infinite; }
.wj-app .wj-waitdots i:nth-child(2) { animation-delay: 0.15s; }
.wj-app .wj-waitdots i:nth-child(3) { animation-delay: 0.3s; }

.wj-app .wj-rules { text-align: left; font-size: 13px; line-height: 1.95; color: #b9c0cd; }
.wj-app .wj-rules h4 { margin: 12px 0 4px; font-size: 13.5px; letter-spacing: 0.14em; color: var(--wj-gold); }
.wj-app .wj-rules p { margin: 0; color: #9ba3b2; }

/* ---------- 动画 ---------- */
@keyframes wjBlink { 50% { opacity: 0.25; } }

@keyframes wjBreathe {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(201, 168, 106, 0.10), 0 0 22px rgba(201, 168, 106, 0.08),
      inset 0 0 30px rgba(201, 168, 106, 0.03);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(201, 168, 106, 0.30), 0 0 34px rgba(201, 168, 106, 0.18),
      inset 0 0 40px rgba(201, 168, 106, 0.06);
  }
}
@keyframes wjScan {
  0% { transform: translateY(0); opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { transform: translateY(360%); opacity: 0; }
}
@keyframes wjReticle {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50% { transform: scale(1.14); opacity: 1; }
}
@keyframes wjStampIn {
  from { opacity: 0; transform: rotate(-12deg) scale(1.7); }
  to { opacity: 1; transform: rotate(-12deg) scale(1); }
}
@keyframes wjTurnPop {
  0% { box-shadow: 0 0 0 0 rgba(201, 168, 106, 0.55); }
  100% { box-shadow: 0 0 0 24px rgba(201, 168, 106, 0); }
}
@keyframes wjHit {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-5px, 2px); }
  35% { transform: translate(5px, -2px); }
  55% { transform: translate(-4px, -1px); }
  75% { transform: translate(3px, 1px); }
}
@keyframes wjShake {
  10%, 90% { transform: translate(-2px, 1px); }
  20%, 80% { transform: translate(3px, -2px); }
  30%, 50%, 70% { transform: translate(-4px, 2px); }
  40%, 60% { transform: translate(4px, -1px); }
}
@keyframes wjMuzzle {
  0% { opacity: 0; transform: scale(0.18) rotate(var(--wj-rot, 0deg)); }
  14% { opacity: 1; transform: scale(1.06) rotate(var(--wj-rot, 0deg)); }
  100% { opacity: 0; transform: scale(1.55) rotate(var(--wj-rot, 0deg)); }
}
@keyframes wjFlash {
  0% { opacity: 0; }
  18% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes wjModalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
@keyframes wjOverIn {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
@keyframes wjDots {
  0%, 100% { opacity: 0.25; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}
@keyframes wjWinGlowBlue {
  0%, 100% { text-shadow: 0 0 18px rgba(74, 134, 200, 0.55), 0 0 46px rgba(74, 134, 200, 0.25); }
  50% { text-shadow: 0 0 30px rgba(74, 134, 200, 0.9), 0 0 80px rgba(74, 134, 200, 0.45); }
}
@keyframes wjWinGlowRed {
  0%, 100% { text-shadow: 0 0 18px rgba(192, 69, 62, 0.55), 0 0 46px rgba(192, 69, 62, 0.25); }
  50% { text-shadow: 0 0 30px rgba(192, 69, 62, 0.9), 0 0 80px rgba(192, 69, 62, 0.45); }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1280px) {
  .wj-app { --wj-side-w: 300px; }
}

@media (max-width: 1024px) {
  .wj-app .wj-body { flex-direction: column; }
  .wj-app .wj-side {
    width: 100%;
    height: 262px;
    flex: 0 0 auto;
    flex-direction: row;
    max-height: 262px;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }
  .wj-app .wj-panel { flex: 1 1 50%; min-width: 0; min-height: 0; }
  .wj-app .wj-panel + .wj-panel { border-top: 0; border-left: 1px solid rgba(255, 255, 255, 0.06); }
  .wj-app .wj-panel-chat { flex: 1 1 50%; min-height: 0; }
  .wj-app .wj-topstats {
    order: 3;
    width: 100%;
    margin-left: 0;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: auto;
  }
  .wj-app .wj-stat { padding: 0 12px; }
  .wj-app .wj-main { padding: 12px; }
  .wj-app .wj-brand-en { display: none; }
}

@media (max-width: 900px) {
  .wj-app .wj-table { grid-template-columns: repeat(auto-fill, minmax(186px, 1fr)); }
  .wj-app .wj-card { width: 46px; height: 66px; }
  .wj-app .wj-card-label { font-size: 12px; }
  .wj-app .wj-player { min-height: 158px; }
}

@media (max-width: 768px) {
  .wj-app {
    height: calc(100vh - 96px);
    height: calc(100dvh - 96px);
    min-height: 520px;
    border-radius: 12px;
  }
  .wj-app .wj-top { gap: 8px; padding: 9px 11px; }
  .wj-app .wj-brand-cn { font-size: 16px; }
  .wj-app .wj-topbtns { gap: 6px; }
  .wj-app .wj-btn { padding: 7px 11px; font-size: 12px; }
  .wj-app .wj-btn-small { padding: 5px 8px; font-size: 11px; }
  .wj-app .wj-topstats { padding-top: 7px; }
  .wj-app .wj-stat { padding: 0 10px; }
  .wj-app .wj-stat-k { font-size: 8px; letter-spacing: 0.1em; }
  .wj-app .wj-stat-v { max-width: 84px; font-size: 13px; }
  .wj-app .wj-roomchip { font-size: 10px; padding: 3px 6px; }
  .wj-app .wj-main { padding: 10px; }
  .wj-app .wj-setup { padding: 16px 2px 14px; }
  .wj-app .wj-title { font-size: 34px; }
  .wj-app .wj-tagline { font-size: 12px; letter-spacing: 0.14em; }
  .wj-app .wj-setupgrid { grid-template-columns: 1fr; gap: 10px; margin-top: 14px; }
  .wj-app .wj-box { padding: 14px; }
  .wj-app .wj-skyline { height: 130px; }
  .wj-app .wj-lobbyhead { align-items: flex-start; }
  .wj-app .wj-code { font-size: 24px; letter-spacing: 0.22em; }
  .wj-app .wj-seats { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  .wj-app .wj-seat { min-height: 56px; padding: 8px 9px; gap: 8px; }
  .wj-app .wj-seat-av { width: 30px; height: 30px; font-size: 12px; }
  .wj-app .wj-lobbyfoot { align-items: flex-start; }
  .wj-app .wj-lobbybtns { width: 100%; justify-content: space-between; }
  .wj-app .wj-table { grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 8px; }
  .wj-app .wj-player { min-height: 132px; padding: 8px 9px 7px; }
  .wj-app .wj-avatar { width: 27px; height: 27px; font-size: 12px; }
  .wj-app .wj-pname-t { font-size: 12px; }
  .wj-app .wj-pmeta { font-size: 8.5px; }
  .wj-app .wj-cards { gap: 4px; margin: 7px 0 6px; }
  .wj-app .wj-card { width: 37px; height: 54px; }
  .wj-app .wj-card-label { font-size: 10px; }
  .wj-app .wj-card-star { font-size: 7px; }
  .wj-app .wj-card-tag { top: -5px; right: -5px; font-size: 8px; padding: 1px 3px; }
  .wj-app .wj-chip { font-size: 8.5px; padding: 2px 4px; }
  .wj-app .wj-reticle { width: 18px; height: 18px; top: 42px; right: 8px; }
  .wj-app .wj-selfline { gap: 3px 9px; font-size: 9.5px; }
  .wj-app .wj-action { gap: 6px; padding: 8px 9px; margin-top: 8px; }
  .wj-app .wj-action-row { gap: 5px; }
  .wj-app .wj-action .wj-btn { padding: 6px 9px; font-size: 11.5px; }
  .wj-app .wj-action .wj-btn-sub { display: none; }
  .wj-app .wj-action-hint { display: none; }
  .wj-app .wj-wait { font-size: 11px; }
  .wj-app .wj-side {
    flex-direction: column;
    height: 178px;
    max-height: 38vh;
    overflow: hidden;
  }
  .wj-app .wj-panel { flex: 1 1 0; min-height: 0; }
  .wj-app .wj-panel.is-collapsed { flex: 0 0 auto; }
  .wj-app .wj-panel + .wj-panel { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
  .wj-app .wj-panel-body { height: auto; max-height: none; flex: 1 1 auto; }
  .wj-app .wj-panel-chat { flex: 1 1 0; min-height: 0; }
  .wj-app .wj-side-chatonly .wj-panel-chat { flex: 1 1 auto; }
  .wj-app .wj-log { font-size: 11px; }
  .wj-app .wj-banner { top: 112px; font-size: 12px; padding: 7px 14px; letter-spacing: 0.06em; }
  .wj-app .wj-modal { padding: 18px 16px 16px; width: 96vw; }
  .wj-app .wj-modal h2 { font-size: 19px; }
  .wj-app .wj-modal-sub { font-size: 12px; }
  .wj-app .wj-mini { width: 48px; height: 68px; font-size: 12px; }
  .wj-app .wj-bigcard { width: 86px; height: 120px; }
  .wj-app .wj-bigcard-label { font-size: 18px; }
  .wj-app .wj-equip { width: 100%; max-width: 260px; }
  .wj-app .wj-over { padding: 10px; }
  .wj-app .wj-over-box { padding: 18px 16px 16px; }
  .wj-app .wj-win { font-size: 28px; }
  .wj-app .wj-factions { grid-template-columns: 1fr; }
  .wj-app .wj-pick { padding: 8px 10px; gap: 8px; }
  .wj-app .wj-pick-name { font-size: 12.5px; }
  .wj-app .wj-pick-meta { font-size: 9px; }
}

@media (max-width: 420px) {
  .wj-app .wj-chips { gap: 3px; }
  .wj-app .wj-chip { padding: 2px 3px; font-size: 8px; }
  .wj-app .wj-chip-fx { letter-spacing: 0; }
  .wj-app .wj-action-wait .wj-btn-equip { flex: 1 1 100%; margin-top: 2px; }
}

@media (max-height: 640px) and (min-width: 769px) {
  .wj-app { min-height: 480px; }
  .wj-app .wj-player { min-height: 150px; }
  .wj-app .wj-setup { padding-top: 16px; }
  .wj-app .wj-title { font-size: 40px; }
}

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

/* ===== 移动端：案情/聊天改为底部抽屉，把高度让给牌桌 ===== */
.wj-app .wj-mobilebar,
.wj-app .wj-side-close {
  display: none;
}

@media (max-width: 768px) {
  .wj-app {
    overflow-x: hidden;
  }
  .wj-app.wj-phase-game .wj-main {
    padding: 8px 9px 6px;
  }
  .wj-app.wj-phase-game .wj-mobilebar {
    display: flex;
    gap: 8px;
    padding: 6px 2px 0;
    flex: 0 0 auto;
  }
  .wj-app.wj-phase-game .wj-mobilebar .wj-btn {
    flex: 1 1 0;
    padding: 6px 10px;
    font-size: 11.5px;
    letter-spacing: 0.08em;
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--wj-dim);
  }
  .wj-app.wj-phase-game .wj-mobilebar .wj-btn:active {
    color: var(--wj-gold-bright);
    border-color: rgba(201, 168, 106, 0.45);
  }
  .wj-app.wj-phase-game .wj-tablescroll {
    padding-bottom: 0;
  }
  .wj-app.wj-phase-game .wj-side {
    position: absolute;
    left: 9px;
    right: 9px;
    bottom: 9px;
    height: min(52vh, 430px);
    max-height: 52vh;
    z-index: 40;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(201, 168, 106, 0.32);
    border-radius: 12px;
    background: linear-gradient(180deg, #171c26 0%, #0d1118 100%);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.72);
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(100% + 24px));
    transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease;
  }
  .wj-app.wj-phase-game.wj-side-open .wj-side {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .wj-app.wj-phase-game .wj-side-close {
    display: block;
    flex: 0 0 auto;
    align-self: flex-end;
    margin: 6px 8px 0 0;
    padding: 3px 9px;
    font-family: inherit;
    font-size: 10.5px;
    letter-spacing: 0.08em;
    color: var(--wj-dim);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    cursor: pointer;
  }
  .wj-app.wj-phase-game .wj-side .wj-panel {
    flex: 1 1 50%;
    min-height: 0;
  }
  .wj-app.wj-phase-game .wj-side .wj-panel.is-collapsed {
    flex: 0 0 auto;
  }
  .wj-app.wj-phase-game .wj-side .wj-panel-body {
    max-height: none;
  }
  .wj-app.wj-phase-game .wj-side .wj-chatinput,
  .wj-app.wj-phase-game .wj-side .wj-input {
    font-size: 16px;
  }
  .wj-app.wj-phase-game .wj-side .wj-chatform {
    padding-bottom: max(4px, env(safe-area-inset-bottom));
  }
  /* 只有 4 人时把牌桌略微放大，减少空旷感 */
  .wj-app.wj-phase-game .wj-player {
    min-height: 146px;
  }
}
