/* ============================================================
   骗子酒馆 · 谎言之夜 — 节奏打击音游风格皮肤
   仅视觉层重写：所有 id/class/JS 绑定保持不变，游戏逻辑不受影响
   ============================================================ */

:root {
  --neon-cyan: #7ef2ff;
  --neon-gold: #ffd700;
  --neon-pink: #ff9ad5;
  --neon-blue: #2196f3;
  --neon-amber: #ffb300;
  --ink: #eaf6ff;
  --muted: rgba(234, 246, 255, .62);
  --faint: rgba(234, 246, 255, .38);
  --dark: #0a0a1a;
  --glass: rgba(255, 255, 255, .07);
  --glass-strong: rgba(255, 255, 255, .12);
  --glass-border: rgba(255, 255, 255, .13);
  --glass-border-hi: rgba(255, 255, 255, .28);
  --bg-gradient: linear-gradient(180deg, #1a0a3a 0%, #0a0a1a 60%, #001a2a 100%);
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-num: "Bahnschrift", "Segoe UI", "PingFang SC", "Microsoft YaHei", monospace;
  --scene-brightness: 1;
  --scene-contrast: 1;
  --particle-opacity: .3;
  --card-scale: 1;
  --duration-card: .48s;
  --duration-action: .24s;
  --duration-lamp: 4s;
  --duration-flip: .45s;
  --duration-panel: .34s;
  --duration-dust: 14s;
  --duration-turn: 1.8s;
  --duration-tutorial: 2.8s;
  --duration-glint: 4.8s;
  --duration-impact: 1.2s;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--bg-gradient) fixed;
  background-color: #0a0a1a;
  color: var(--ink);
  color-scheme: dark;
}
body {
  font-family: var(--font);
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; }
button { color: inherit; touch-action: manipulation; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 3px;
  box-shadow: 0 0 14px rgba(126, 242, 255, .5);
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link {
  position: fixed; z-index: 200; left: 12px; top: 10px;
  padding: 8px 12px;
  background: rgba(126, 242, 255, .12);
  border: 1px solid rgba(126, 242, 255, .5);
  border-radius: 12px;
  color: var(--neon-cyan);
  backdrop-filter: blur(8px);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ui-icon { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* 渐变标题通用 */
.grad-text,
.game-shell .brand,
.start-content h1,
.panel-card h2,
.turn-banner.your-turn b,
.history-title,
.target-plaque strong,
.profile-identity strong,
.end-card h2,
.profile-stats strong {
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------------- 主舞台 ---------------- */
.game-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 600px;
  overflow: hidden;
  background: var(--bg-gradient) fixed;
}
/* 霓虹浮尘颗粒层（可被“桌面光影”关闭） */
.game-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  filter: brightness(var(--scene-brightness)) contrast(var(--scene-contrast));
  opacity: var(--particle-opacity);
  background:
    radial-gradient(circle at 12% 26%, rgba(126, 242, 255, .9) 0 1px, transparent 2px),
    radial-gradient(circle at 68% 12%, rgba(255, 215, 0, .8) 0 1px, transparent 2px),
    radial-gradient(circle at 42% 62%, rgba(255, 154, 213, .7) 0 1px, transparent 2px),
    radial-gradient(circle at 89% 72%, rgba(33, 150, 243, .9) 0 1px, transparent 2px),
    radial-gradient(circle at 24% 84%, rgba(126, 242, 255, .7) 0 1px, transparent 2px),
    radial-gradient(circle at 76% 44%, rgba(255, 215, 0, .65) 0 1px, transparent 2px);
  background-size: 170px 140px, 230px 180px, 190px 210px, 260px 170px, 210px 190px, 240px 200px;
  animation: dust-drift var(--duration-dust) linear infinite;
}
/* 暗角与氛围微光 */
.game-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 52%, transparent 12%, rgba(0, 0, 0, .12) 56%, rgba(0, 0, 0, .62) 100%);
}
/* 细扫描线噪点 */
.noise {
  position: fixed;
  z-index: 90;
  inset: 0;
  opacity: .05;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: relative;
  z-index: 15;
  height: calc(70px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(126, 242, 255, .16);
  background: linear-gradient(rgba(10, 10, 26, .82), rgba(10, 10, 26, .35));
  backdrop-filter: blur(8px);
}
.brand {
  font-family: var(--font);
  letter-spacing: 3px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  line-height: .95;
  text-shadow: 0 0 16px rgba(126, 242, 255, .35);
}
.brand b {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 6px;
  margin-top: 6px;
  color: var(--neon-gold);
  text-shadow: 0 0 12px rgba(255, 215, 0, .4);
}
.icon-btn {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  color: var(--ink);
  cursor: pointer;
  transition: .2s;
  backdrop-filter: blur(6px);
}
.icon-btn:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 18px rgba(33, 150, 243, .35), 0 0 12px rgba(126, 242, 255, .25);
  transform: scale(1.05);
}
.mode-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 20px;
  background: rgba(255, 255, 255, .06);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1px;
  backdrop-filter: blur(6px);
}
.mode-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6d7a8f;
}
.mode-badge.online i {
  background: var(--neon-cyan);
  box-shadow: 0 0 9px var(--neon-cyan);
  animation: dot-pulse var(--duration-turn) ease-in-out infinite;
}
.mode-badge.solo i { background: var(--neon-gold); box-shadow: 0 0 9px var(--neon-gold); }
.round-info {
  margin-left: auto;
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1px;
}
.round-info b { color: var(--ink); font-family: var(--font-num); }
.round-info i { width: 3px; height: 3px; border-radius: 50%; background: var(--neon-cyan); box-shadow: 0 0 6px var(--neon-cyan); }
@keyframes dot-pulse { 50% { opacity: .45; } }

/* ---------------- 牌桌 ---------------- */
.table-stage {
  position: relative;
  z-index: 5;
  height: calc(100% - 70px - env(safe-area-inset-top));
  max-width: 1500px;
  margin: auto;
  filter: brightness(var(--scene-brightness)) contrast(var(--scene-contrast));
}
.ambient-glow {
  position: absolute;
  left: 50%;
  top: 38%;
  width: 560px;
  height: 360px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(33, 150, 243, .16);
  filter: blur(80px);
  animation: lamp var(--duration-lamp) ease-in-out infinite alternate;
}
@keyframes lamp { to { opacity: .6; transform: translate(-50%, -50%) scale(.96); } }

.players { position: absolute; z-index: 5; inset: 0; }
.opponent {
  position: absolute;
  width: 176px;
  text-align: center;
  transition: opacity .35s, filter .35s;
}
.opponent[data-total="1"] { left: 50%; top: 4%; transform: translateX(-50%); }
.opponent[data-total="2"][data-seat="1"] { left: 10%; top: 26%; }
.opponent[data-total="2"][data-seat="2"] { right: 10%; top: 26%; }
.opponent[data-total="3"][data-seat="1"] { left: 8%; top: 31%; }
.opponent[data-total="3"][data-seat="2"] { left: 50%; top: 3%; transform: translateX(-50%); }
.opponent[data-total="3"][data-seat="3"] { right: 8%; top: 31%; }
.opponent.dead { opacity: .32; filter: grayscale(1) brightness(.75); }
.opponent.active .avatar-ring {
  box-shadow: 0 0 0 2px var(--neon-cyan), 0 0 26px rgba(126, 242, 255, .55), inset 0 0 14px rgba(126, 242, 255, .25);
  animation: turn-pulse var(--duration-turn) ease-in-out infinite;
}
.opponent.active .name { color: var(--neon-cyan); text-shadow: 0 0 12px rgba(126, 242, 255, .6); }
.avatar-ring {
  position: relative;
  width: 78px;
  height: 78px;
  margin: 0 auto 8px;
  border: 2px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
  padding: 4px;
  background: rgba(10, 10, 26, .75);
  box-shadow: 0 0 14px rgba(33, 150, 243, .18), inset 0 0 12px rgba(126, 242, 255, .12);
  transition: .25s;
}
.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 35%, rgba(33, 150, 243, .4), rgba(26, 10, 58, .9) 65%);
  color: var(--neon-cyan);
  font-size: 32px;
  text-shadow: 0 0 12px rgba(126, 242, 255, .7);
}
.turn-dot {
  position: absolute;
  right: 0;
  bottom: 4px;
  width: 17px;
  height: 17px;
  border: 3px solid #0a0a1a;
  border-radius: 50%;
  background: #54607a;
}
.active .turn-dot { background: var(--neon-gold); box-shadow: 0 0 12px var(--neon-gold); }
.opponent .name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(0, 0, 0, .8);
}
.opponent .status { color: var(--muted); font-size: 10px; min-height: 18px; margin-top: 3px; }
.mini-cards, .chambers { display: flex; justify-content: center; gap: 3px; margin-top: 5px; }
.mini-card {
  width: 12px;
  height: 18px;
  border-radius: 3px;
  border: 1px solid rgba(126, 242, 255, .5);
  background: linear-gradient(135deg, rgba(126, 242, 255, .28), rgba(33, 150, 243, .12));
  box-shadow: 0 0 6px rgba(126, 242, 255, .2);
}
.chambers span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35);
  background: #141a2e;
}
.chambers span.used {
  background: var(--neon-pink);
  border-color: var(--neon-pink);
  box-shadow: 0 0 8px rgba(255, 154, 213, .8);
}

/* ---------------- 中央牌桌 ---------------- */
.center-table {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 44%;
  width: 480px;
  height: 290px;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* 玻璃舞台底托 */
.center-table::before {
  content: "";
  position: absolute;
  inset: -26px -46px;
  z-index: -1;
  border-radius: 28px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(126, 242, 255, .14);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 60px rgba(33, 150, 243, .18), inset 0 0 40px rgba(126, 242, 255, .06), 0 18px 40px rgba(0, 0, 0, .45);
}
.target-plaque {
  width: 78px;
  height: 108px;
  padding: 8px 0 3px;
  text-align: center;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 215, 0, .55);
  border-radius: 14px;
  color: var(--ink);
  box-shadow: 0 0 26px rgba(255, 215, 0, .22), inset 0 0 18px rgba(255, 215, 0, .08);
  transform: rotate(-3deg);
  backdrop-filter: blur(6px);
}
.target-plaque span { display: block; font-size: 8px; letter-spacing: 1px; color: var(--muted); }
.target-plaque strong { display: block; font-family: var(--font-num); font-size: 50px; line-height: 58px; filter: drop-shadow(0 0 10px rgba(126, 242, 255, .55)); }
.target-plaque small { display: block; font-weight: 700; font-size: 10px; color: var(--neon-gold); }
.wildcard-hint {
  margin: 6px 0 -3px;
  color: var(--neon-gold);
  font-size: 8px;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(255, 215, 0, .5);
}
.played-pile {
  position: relative;
  width: 170px;
  height: 76px;
  margin-top: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.empty-pile {
  color: rgba(126, 242, 255, .55);
  border: 1px dashed rgba(126, 242, 255, .4);
  border-radius: 10px;
  padding: 12px 23px;
  font-size: 11px;
  letter-spacing: 2px;
}
.pile-card {
  --x: 0px;
  --r: 0deg;
  position: absolute;
  width: 48px;
  height: 68px;
  border: 1px solid rgba(126, 242, 255, .6);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(126, 242, 255, .3), rgba(33, 150, 243, .14));
  box-shadow: 0 5px 14px rgba(0, 0, 0, .5), 0 0 10px rgba(126, 242, 255, .22);
  transform: translateX(var(--x)) rotate(var(--r));
}
.pile-card.arriving { animation: card-arrive var(--duration-card) cubic-bezier(.16,.84,.2,1) var(--arrival-delay) both; }
.pile-card.from-opponent { --arrival-y: -90px; }
.pile-card.from-you { --arrival-y: 90px; }
.pile-play-badge {
  position: absolute;
  z-index: 2;
  right: -8px;
  bottom: 1px;
  max-width: 205px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 215, 0, .55);
  border-radius: 12px;
  background: rgba(10, 10, 26, .82);
  color: var(--neon-gold);
  letter-spacing: 1px;
  box-shadow: 0 0 14px rgba(255, 215, 0, .25);
  backdrop-filter: blur(6px);
  animation: pile-badge-in var(--duration-action) ease both;
}
.pile-play-actor { min-width: 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.pile-play-count {
  flex: none;
  color: var(--neon-gold);
  font-size: 15px;
  line-height: 1;
  font-family: var(--font-num);
  white-space: nowrap;
  text-shadow: 0 0 9px rgba(255, 215, 0, .7);
}
.last-claim {
  min-height: 20px;
  margin-top: 5px;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 1px;
  transition: color .2s;
}
.last-claim.active {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  color: var(--ink);
}
.last-claim.active > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.last-claim-count {
  flex: none;
  color: var(--neon-cyan);
  font-size: 14px;
  font-family: var(--font-num);
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(126, 242, 255, .6);
}
.turn-banner {
  min-width: 150px;
  margin-top: 7px;
  padding: 6px 18px;
  text-align: center;
  border-radius: 12px;
  background: rgba(10, 10, 26, .72);
  border: 1px solid rgba(255, 255, 255, .2);
  border-left: 2px solid var(--neon-cyan);
  border-right: 2px solid var(--neon-cyan);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(126, 242, 255, .4);
  backdrop-filter: blur(6px);
  transition: .2s;
}
.turn-banner.your-turn {
  background: rgba(33, 150, 243, .16);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 22px rgba(33, 150, 243, .4);
  animation: turn-banner-pulse var(--duration-turn) ease-in-out infinite;
}
@keyframes turn-banner-pulse { 50% { box-shadow: 0 0 34px rgba(126, 242, 255, .55); } }

/* ---------------- 耳语记录 ---------------- */
.history-panel {
  position: absolute;
  z-index: 6;
  top: 18px;
  right: 24px;
  width: 235px;
  max-height: 154px;
  overflow: hidden;
  background: linear-gradient(90deg, transparent, rgba(10, 10, 26, .72) 18%);
  border: 1px solid rgba(126, 242, 255, .12);
  border-radius: 14px;
  padding: 9px 12px 9px 20px;
  text-align: right;
  backdrop-filter: blur(8px);
}
.history-title {
  font-size: 10px;
  letter-spacing: 4px;
  margin-bottom: 5px;
  color: var(--neon-cyan);
  filter: drop-shadow(0 0 8px rgba(126, 242, 255, .5));
}
.history-list { display: flex; flex-direction: column; gap: 3px; font-size: 10px; color: var(--muted); }
.history-item:first-child { color: var(--neon-cyan); }

/* ---------------- 玩家区 ---------------- */
.player-area {
  position: absolute;
  z-index: 10;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(740px, 96%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* 判定线装饰 */
.judge-line {
  position: absolute;
  bottom: -8px;
  left: 50%;
  width: min(560px, 80%);
  height: 2px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), var(--neon-gold), var(--neon-cyan), transparent);
  box-shadow: 0 0 16px rgba(126, 242, 255, .7), 0 0 32px rgba(255, 215, 0, .35);
  opacity: .5;
  pointer-events: none;
}
.you-row {
  width: min(390px, 92%);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 2px;
}
.you-row > span, .you-row small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.you-row small { max-width: 58%; color: var(--faint); letter-spacing: 0; }
.hand {
  height: 135px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 20px;
  transform: scale(var(--card-scale));
  transform-origin: 50% 100%;
}
.card {
  --rot: 0deg;
  position: relative;
  width: 82px;
  height: 118px;
  margin-left: -11px;
  border: 1px solid rgba(126, 242, 255, .55);
  border-radius: 10px;
  color: var(--neon-cyan);
  background: linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04));
  box-shadow: 0 7px 14px rgba(0, 0, 0, .5), 0 0 12px rgba(126, 242, 255, .14), inset 0 0 14px rgba(126, 242, 255, .08);
  cursor: pointer;
  transform: rotate(var(--rot));
  transform-origin: 50% 130%;
  transition: .18s ease;
  backdrop-filter: blur(4px);
}
.card:first-child { margin-left: 0; }
.card:hover {
  transform: translateY(-13px) rotate(var(--rot));
  box-shadow: 0 0 0 1px var(--neon-cyan), 0 0 24px rgba(126, 242, 255, .5), 0 15px 24px rgba(0, 0, 0, .55);
}
.card.selected {
  transform: translateY(-25px) rotate(var(--rot));
  box-shadow: 0 0 0 3px var(--neon-cyan), 0 0 30px rgba(126, 242, 255, .7), 0 17px 24px rgba(0, 0, 0, .6);
}
.card:disabled { cursor: default; filter: brightness(.6); }
.card:disabled:hover { transform: rotate(var(--rot)); box-shadow: 0 7px 14px rgba(0, 0, 0, .5), 0 0 12px rgba(126, 242, 255, .14), inset 0 0 14px rgba(126, 242, 255, .08); }
.card.dealing { animation: card-deal var(--duration-card) cubic-bezier(.18,.82,.22,1) var(--delay) both; }
.card .corner { position: absolute; left: 7px; top: 5px; font: bold 20px/19px var(--font-num); text-shadow: 0 0 8px currentColor; }
.card .suit { position: absolute; left: 8px; top: 25px; font-size: 15px; }
.card .face {
  position: absolute;
  inset: 32px 10px 15px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(126, 242, 255, .28);
  border-radius: 8px;
  font: bold 42px var(--font-num);
  text-shadow: 0 0 14px rgba(126, 242, 255, .55);
}
.card.red { color: var(--neon-pink); border-color: rgba(255, 154, 213, .6); }
.card.red .face { border-color: rgba(255, 154, 213, .3); text-shadow: 0 0 14px rgba(255, 154, 213, .55); }
.card.joker {
  color: var(--neon-gold);
  border-color: rgba(255, 215, 0, .65);
  background: linear-gradient(145deg, rgba(255, 215, 0, .18), rgba(255, 154, 213, .08));
}
.card.joker .face { border-color: rgba(255, 215, 0, .35); text-shadow: 0 0 14px rgba(255, 215, 0, .6); font-size: 31px; }
.card .wild-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5px;
  color: var(--neon-gold);
  font: 700 7px var(--font);
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(255, 215, 0, .7);
}
.selection-hint { height: 19px; margin-top: 4px; color: var(--muted); font-size: 11px; letter-spacing: 1px; }
.actions { display: flex; gap: 10px; margin-top: 6px; }
.action-btn {
  height: 54px;
  min-width: 178px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 12px;
  background: rgba(255, 255, 255, .07);
  color: var(--ink);
  cursor: pointer;
  transition: .18s;
  box-shadow: 0 5px 16px rgba(0, 0, 0, .4);
  backdrop-filter: blur(8px);
}
.action-btn b { display: block; font-size: 14px; letter-spacing: 2px; }
.action-btn small {
  display: block;
  max-width: 145px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 1px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#challengeText { display: flex; align-items: baseline; gap: 4px; }
.challenge-player { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.challenge-card-count { flex: none; color: var(--neon-pink); font-size: 12px; font-style: normal; font-weight: 700; text-shadow: 0 0 8px rgba(255, 154, 213, .6); }
.action-btn em { font-style: normal; color: var(--neon-gold); font-family: var(--font-num); }
.action-btn .action-icon { width: 30px; height: 30px; display: grid; place-items: center; color: currentColor; }
.action-btn .action-icon .ui-icon { width: 24px; height: 24px; }
.action-btn.challenge {
  background: linear-gradient(135deg, rgba(255, 154, 213, .22), rgba(255, 154, 213, .06));
  border-color: rgba(255, 154, 213, .55);
  color: #fff;
}
.action-btn.challenge:not(:disabled):hover {
  border-color: var(--neon-pink);
  box-shadow: 0 0 18px rgba(255, 154, 213, .5), 0 6px 18px rgba(0, 0, 0, .45);
}
.action-btn.play {
  background: linear-gradient(90deg, #2196f3, #ffb300);
  border-color: rgba(255, 255, 255, .55);
  color: #081020;
}
.action-btn.play small { color: rgba(8, 16, 32, .75); }
.action-btn.play:not(:disabled):hover {
  box-shadow: 0 0 18px rgba(33, 150, 243, .6), 0 0 26px rgba(255, 215, 0, .35), 0 6px 18px rgba(0, 0, 0, .4);
}
.action-btn:not(:disabled):hover { transform: translateY(-2px); }
.action-btn:not(:disabled):active, .mode-card:active, .primary-btn:not(:disabled):active, .secondary-btn:active, .danger-btn:active { transform: translateY(1px) scale(.99); }
.action-btn:disabled { opacity: .38; cursor: not-allowed; filter: grayscale(.45); }

/* ---------------- 覆盖层 ---------------- */
.overlay {
  position: fixed;
  z-index: 50;
  inset: 0;
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  display: grid;
  place-items: center;
  overflow: auto;
  overscroll-behavior: contain;
  background: rgba(8, 6, 22, .78);
  backdrop-filter: blur(9px);
}
.start-screen {
  background: linear-gradient(180deg, rgba(26, 10, 58, .82) 0%, rgba(10, 10, 26, .72) 55%, rgba(0, 26, 42, .82) 100%);
}
.start-vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 240px 70px rgba(0, 0, 0, .8);
  pointer-events: none;
}
.start-content { position: relative; width: min(760px, 96%); text-align: center; animation: reveal .7s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(15px); } }
.eyebrow {
  margin: 0 0 5px;
  color: var(--neon-gold);
  font-size: 10px;
  letter-spacing: 6px;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(255, 215, 0, .45);
}
.start-content h1 {
  margin: 10px 0 -4px;
  font-size: clamp(54px, 8vw, 100px);
  line-height: 1;
  letter-spacing: -5px;
  filter: drop-shadow(0 0 28px rgba(126, 242, 255, .35));
}
.start-content h1 span {
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 20px rgba(255, 154, 213, .45));
}
.subtitle {
  color: var(--muted);
  font-size: 15px;
  letter-spacing: 10px;
  margin-left: 10px;
  text-shadow: 0 0 14px rgba(126, 242, 255, .4);
}
/* 均衡器装饰条 */
.beat-eq {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
  height: 26px;
  margin: 18px auto 2px;
}
.beat-eq i {
  width: 4px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--neon-cyan), var(--neon-gold));
  box-shadow: 0 0 10px rgba(126, 242, 255, .6);
  animation: eq-bounce calc(var(--duration-turn)) ease-in-out infinite;
}
.beat-eq i:nth-child(1) { height: 10px; animation-delay: 0s; }
.beat-eq i:nth-child(2) { height: 20px; animation-delay: .18s; }
.beat-eq i:nth-child(3) { height: 26px; animation-delay: .36s; }
.beat-eq i:nth-child(4) { height: 18px; animation-delay: .54s; }
.beat-eq i:nth-child(5) { height: 12px; animation-delay: .72s; }
@keyframes eq-bounce { 50% { transform: scaleY(.45); opacity: .55; } }
.mode-chooser {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 250px));
  justify-content: center;
  gap: 14px;
  margin: 24px auto 22px;
}
.mode-card {
  min-height: 128px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 16px;
  background: rgba(255, 255, 255, .07);
  color: var(--ink);
  cursor: pointer;
  transition: .2s;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.mode-card.primary {
  border-color: rgba(126, 242, 255, .55);
  background: linear-gradient(145deg, rgba(33, 150, 243, .2), rgba(255, 255, 255, .06));
  box-shadow: 0 0 24px rgba(33, 150, 243, .25), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.mode-card:hover {
  transform: translateY(-4px);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 18px rgba(33, 150, 243, .4), 0 14px 30px rgba(0, 0, 0, .4);
}
.mode-card b, .mode-card small { display: block; }
.mode-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin: auto;
  border: 1px solid rgba(255, 215, 0, .55);
  border-radius: 50%;
  background: rgba(10, 10, 26, .5);
  color: var(--neon-gold);
  box-shadow: 0 0 16px rgba(255, 215, 0, .22), inset 0 0 14px rgba(255, 215, 0, .12);
}
.mode-icon .ui-icon { width: 24px; height: 24px; }
.mode-card.primary .mode-icon {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 18px rgba(126, 242, 255, .35), inset 0 0 14px rgba(126, 242, 255, .18);
}
.mode-card b { margin-top: 8px; font-size: 17px; letter-spacing: 3px; }
.mode-card small { margin-top: 7px; color: var(--muted); font-size: 10px; }
.tip { margin: 16px 0 9px; color: var(--muted); font-size: 10px; letter-spacing: 2px; }
.version-btn, .text-btn {
  min-height: 40px;
  padding: 8px;
  border: 0;
  background: none;
  color: var(--neon-cyan);
  font-size: 10px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(126, 242, 255, .45);
}
.version-btn:hover, .text-btn:hover { color: var(--neon-gold); text-shadow: 0 0 10px rgba(255, 215, 0, .5); }
.text-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.text-btn .ui-icon { width: 15px; height: 15px; }

/* ---------------- 局域网面板 ---------------- */
.lan-panel {
  width: min(580px, 100%);
  margin: 20px auto 15px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 16px;
  background: rgba(255, 255, 255, .06);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5), 0 0 30px rgba(33, 150, 243, .12);
  backdrop-filter: blur(10px);
}
.field { text-align: left; }
.field label { display: block; margin-bottom: 7px; color: var(--neon-cyan); font-size: 11px; letter-spacing: 2px; }
input {
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 12px;
  background: rgba(10, 10, 26, .6);
  color: var(--ink);
  padding: 0 13px;
  user-select: text;
  transition: .2s;
}
input:focus { border-color: var(--neon-cyan); box-shadow: 0 0 14px rgba(126, 242, 255, .3); }
input::placeholder { color: rgba(234, 246, 255, .35); }
input:disabled { opacity: .62; cursor: not-allowed; }
#playerName { width: 100%; }
.lan-actions { display: flex; align-items: center; justify-content: center; gap: 13px; margin-top: 15px; color: var(--muted); font-size: 10px; }
.join-row { display: flex; gap: 7px; }
.code-input {
  width: 105px;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 3px;
  font-family: var(--font-num);
  color: var(--neon-gold);
  text-shadow: 0 0 8px rgba(255, 215, 0, .35);
}
.lan-panel .text-btn { margin-top: 17px; }

/* ---------------- 玻璃卡片 ---------------- */
.panel-card {
  position: relative;
  width: min(600px, 94vw);
  padding: 32px 36px;
  text-align: center;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, .07);
  box-shadow: 0 25px 90px rgba(0, 0, 0, .5), 0 0 40px rgba(33, 150, 243, .1), inset 0 1px 0 rgba(255, 255, 255, .12);
  backdrop-filter: blur(10px);
  animation: reveal .3s ease both;
}
.panel-card::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(126, 242, 255, .12);
  border-radius: 12px;
  pointer-events: none;
}
.panel-card h2 { margin: 6px 0 12px; font-size: 30px; filter: drop-shadow(0 0 16px rgba(126, 242, 255, .3)); }
.primary-btn, .secondary-btn {
  min-width: 210px;
  height: 60px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 12px;
  cursor: pointer;
  transition: .2s;
  font-weight: 700;
  letter-spacing: 2px;
}
.primary-btn {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 255, 255, .55);
  background: linear-gradient(90deg, #2196f3, #ffb300);
  color: #081020;
  box-shadow: 0 6px 22px rgba(33, 150, 243, .35), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.primary-btn::after {
  content: "";
  position: absolute;
  inset: -50% auto -50% -55%;
  width: 35%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-18deg);
  animation: button-glint var(--duration-glint) ease-in-out infinite;
}
.secondary-btn {
  border-color: rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .07);
  color: var(--ink);
  backdrop-filter: blur(8px);
}
.primary-btn span, .primary-btn b { display: block; font-size: 17px; font-weight: 800; letter-spacing: 6px; }
.primary-btn small { display: block; color: rgba(8, 16, 32, .72); font-size: 9px; letter-spacing: 2px; margin-top: 3px; }
.primary-btn:hover:not(:disabled), .secondary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(33, 150, 243, .45), 0 0 28px rgba(255, 215, 0, .22);
  filter: brightness(1.08);
}
.secondary-btn:hover { box-shadow: 0 0 18px rgba(33, 150, 243, .35); }
.primary-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.primary-btn.compact, .secondary-btn.compact { min-width: 135px; height: 44px; letter-spacing: 2px; }
.danger-btn {
  min-width: 135px;
  height: 44px;
  border: 1px solid rgba(255, 154, 213, .55);
  border-radius: 12px;
  background: rgba(255, 154, 213, .1);
  color: var(--neon-pink);
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  transition: .2s;
  backdrop-filter: blur(8px);
}
.danger-btn:hover {
  border-color: var(--neon-pink);
  background: rgba(255, 154, 213, .18);
  color: #fff;
  box-shadow: 0 0 18px rgba(255, 154, 213, .45);
  transform: translateY(-2px);
}
.danger-btn[data-confirming="true"] {
  border-color: var(--neon-pink);
  background: linear-gradient(90deg, rgba(255, 154, 213, .35), rgba(255, 154, 213, .12));
  color: #fff;
  box-shadow: 0 0 26px rgba(255, 154, 213, .6);
}
.panel-actions { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
.close-btn {
  position: absolute;
  z-index: 2;
  right: 14px;
  top: 10px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--muted);
  background: none;
  border: 0;
  cursor: pointer;
  transition: .2s;
  border-radius: 50%;
}
.close-btn:hover { color: var(--neon-pink); text-shadow: 0 0 12px var(--neon-pink); transform: rotate(8deg); }

/* ---------------- 房间等待 ---------------- */
.lobby-card { width: min(560px, 94vw); }
.room-code {
  margin: 10px 0;
  padding: 7px 20px;
  border: 1px dashed rgba(126, 242, 255, .6);
  border-radius: 12px;
  background: rgba(10, 10, 26, .65);
  color: var(--neon-cyan);
  font: bold 34px var(--font-num);
  letter-spacing: 10px;
  cursor: pointer;
  text-shadow: 0 0 14px rgba(126, 242, 255, .7);
  box-shadow: 0 0 22px rgba(126, 242, 255, .15);
  transition: .2s;
}
.room-code:hover { box-shadow: 0 0 30px rgba(126, 242, 255, .4); }
.room-help { color: var(--muted); font-size: 11px; }
.lobby-players { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 20px 0 12px; }
.lobby-player {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  text-align: left;
  backdrop-filter: blur(6px);
}
.lobby-player i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(33, 150, 243, .25);
  color: var(--neon-cyan);
  font-style: normal;
  box-shadow: 0 0 10px rgba(126, 242, 255, .3);
}
.lobby-player span { font-size: 12px; }
.lobby-player small { margin-left: auto; color: var(--neon-gold); font-size: 9px; text-shadow: 0 0 8px rgba(255, 215, 0, .5); }
.lobby-slot { opacity: .55; border-style: dashed; }
.lobby-status { min-height: 18px; color: var(--muted); font-size: 11px; }

/* ---------------- 质疑与左轮 ---------------- */
.revealed-cards { min-height: 105px; display: flex; justify-content: center; align-items: center; gap: 8px; margin: 18px 0; }
.reveal-card > p:not(.eyebrow, .auto-continue) { color: var(--muted); font-size: 13px; }
.reveal-mini {
  position: relative;
  width: 65px;
  height: 93px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .05));
  color: var(--neon-cyan);
  border: 1px solid rgba(126, 242, 255, .6);
  box-shadow: 0 0 16px rgba(126, 242, 255, .25), 0 5px 12px rgba(0, 0, 0, .5);
  font: bold 35px var(--font-num);
  text-shadow: 0 0 12px rgba(126, 242, 255, .6);
  animation: flip var(--duration-flip) ease both;
}
.reveal-mini small {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7px;
  font: 700 8px var(--font);
  letter-spacing: 1px;
  text-align: center;
  color: var(--neon-gold);
  text-shadow: 0 0 8px rgba(255, 215, 0, .6);
}
.reveal-mini.lie {
  border-color: var(--neon-pink);
  color: var(--neon-pink);
  box-shadow: 0 0 0 3px rgba(255, 154, 213, .55), 0 0 26px rgba(255, 154, 213, .5), 0 6px 20px rgba(0, 0, 0, .5);
  text-shadow: 0 0 12px rgba(255, 154, 213, .7);
}
@keyframes flip { from { transform: rotateY(90deg) translateY(-10px); opacity: 0; } }
.roulette { margin-top: 18px; }
.roulette p { color: var(--muted); font-size: 11px; letter-spacing: 2px; }
.revolver {
  width: 93px;
  height: 93px;
  display: grid;
  place-items: center;
  margin: auto;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, rgba(126, 242, 255, .18), rgba(10, 10, 26, .9) 70%);
  border: 3px solid rgba(126, 242, 255, .55);
  box-shadow: 0 0 22px rgba(126, 242, 255, .3), 0 7px 15px rgba(0, 0, 0, .5);
}
.chamber {
  position: relative;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(10, 10, 26, .85);
  transition: transform 1.2s cubic-bezier(.2,.7,.1,1);
}
.chamber span {
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #0a0a1a;
  border: 1px solid rgba(126, 242, 255, .6);
  box-shadow: inset 0 0 6px rgba(126, 242, 255, .4);
  left: 29px;
  top: 5px;
  transform-origin: 8px 32px;
}
.chamber span:nth-child(2){transform:rotate(60deg)} .chamber span:nth-child(3){transform:rotate(120deg)} .chamber span:nth-child(4){transform:rotate(180deg)} .chamber span:nth-child(5){transform:rotate(240deg)} .chamber span:nth-child(6){transform:rotate(300deg)}
.roulette.firing .chamber { transform: rotate(900deg); }
.roulette.bang .revolver {
  animation: bang .25s linear 2;
  box-shadow: 0 0 60px var(--neon-pink);
}
@keyframes bang { 50% { transform: translate(8px,-4px) rotate(5deg); } }
.auto-continue { color: var(--neon-cyan); font-size: 10px; letter-spacing: 2px; text-shadow: 0 0 8px rgba(126, 242, 255, .5); }
.elimination-impact {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 154, 213, .35) 0, rgba(8, 6, 22, .9) 62%, rgba(0, 0, 0, .95));
  opacity: 0;
  animation: elimination-impact var(--duration-impact) cubic-bezier(.18,.8,.24,1) both;
}
.elimination-impact::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30vmin;
  height: 30vmin;
  border: 4px solid rgba(255, 154, 213, .7);
  border-radius: 50%;
  box-shadow: 0 0 80px var(--neon-pink), inset 0 0 70px rgba(255, 154, 213, .5);
  animation: impact-shock var(--duration-impact) ease-out both;
}
.elimination-impact i {
  width: clamp(86px, 18vw, 150px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 154, 213, .7);
  border-radius: 50%;
  background: rgba(10, 10, 26, .9);
  color: var(--neon-pink);
  font-size: clamp(58px, 12vw, 104px);
  font-style: normal;
  line-height: 1;
  box-shadow: 0 0 45px rgba(255, 154, 213, .6);
  text-shadow: 0 0 35px var(--neon-pink);
}
.elimination-impact strong {
  max-width: 90vw;
  margin-top: 10px;
  padding: 8px 24px;
  overflow: hidden;
  border-block: 1px solid rgba(255, 154, 213, .6);
  border-radius: 12px;
  background: rgba(10, 10, 26, .9);
  color: #fff;
  font-size: clamp(30px, 7vw, 68px);
  letter-spacing: 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 0 40px rgba(255, 154, 213, .45);
  text-shadow: 0 0 26px var(--neon-pink);
}
.elimination-impact span { margin-top: 8px; color: var(--neon-gold); font: 700 11px var(--font); letter-spacing: 8px; text-shadow: 0 0 10px rgba(255, 215, 0, .6); }
@keyframes elimination-impact { 0% { opacity: 0; filter: brightness(2); transform: scale(1.22); } 12%,72% { opacity: 1; transform: scale(1); } 100% { opacity: 0; filter: brightness(.8); } }
@keyframes impact-shock { from { opacity: 1; transform: translate(-50%,-50%) scale(.15); } to { opacity: 0; transform: translate(-50%,-50%) scale(4.6); } }

/* ---------------- 结算 ---------------- */
.end-card { padding: 48px; }
.end-card h2 { font-size: 40px; filter: drop-shadow(0 0 20px rgba(255, 215, 0, .35)); }
.end-card > p:not(.eyebrow) { color: var(--muted); }
.end-profile-summary { color: var(--neon-gold) !important; font-size: 11px; letter-spacing: 3px; text-shadow: 0 0 10px rgba(255, 215, 0, .45); }
.profile-card { width: min(610px, 94vw); overflow: hidden; }
.profile-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .2;
  background: repeating-linear-gradient(168deg, transparent 0 18px, rgba(126, 242, 255, .06) 19px 20px);
}
.profile-card > :not(.close-btn) { position: relative; z-index: 1; }
.profile-identity { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 18px 0 9px; }
.profile-identity > div { text-align: left; }
.profile-identity small { display: block; color: var(--muted); font-size: 9px; letter-spacing: 3px; }
.profile-identity strong { display: block; margin-top: 4px; font-size: 24px; letter-spacing: 5px; filter: drop-shadow(0 0 12px rgba(126, 242, 255, .4)); }
.profile-seal {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 2px solid var(--neon-pink);
  border-radius: 50%;
  color: var(--neon-pink);
  transform: rotate(-7deg);
  box-shadow: 0 0 18px rgba(255, 154, 213, .35), inset 0 0 0 4px rgba(255, 154, 213, .12);
}
.profile-seal .ui-icon { width: 30px; height: 30px; }
.profile-quote { min-height: 22px; margin: 0 auto 18px; color: var(--muted); font-size: 12px; letter-spacing: 1px; }
.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
}
.profile-stats > div { padding: 14px 8px; border-left: 1px solid rgba(255, 255, 255, .1); }
.profile-stats > div:first-child { border-left: 0; }
.profile-stats strong, .profile-stats span { display: block; }
.profile-stats strong { font: bold 26px var(--font-num); filter: drop-shadow(0 0 10px rgba(126, 242, 255, .4)); }
.profile-stats span { margin-top: 4px; color: var(--muted); font-size: 9px; letter-spacing: 2px; }
.profile-reputation { margin: 17px 0 20px; }
.profile-reputation > div:first-child { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--faint); font-size: 9px; letter-spacing: 2px; }
.profile-reputation b { color: var(--neon-cyan); font-weight: 400; letter-spacing: 4px; }
.profile-meter {
  --guile: 50%;
  position: relative;
  height: 8px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(33, 150, 243, .5), rgba(126, 242, 255, .35) 50%, rgba(255, 154, 213, .5));
  box-shadow: inset 0 0 8px rgba(0, 0, 0, .5);
}
.profile-meter::after { content: ""; position: absolute; left: 50%; top: -4px; width: 1px; height: 14px; background: rgba(255, 255, 255, .35); }
.profile-meter i {
  position: absolute;
  left: var(--guile);
  top: 50%;
  width: 15px;
  height: 15px;
  border: 2px solid #0a0a1a;
  border-radius: 50%;
  background: var(--neon-gold);
  box-shadow: 0 0 14px var(--neon-gold);
  transform: translate(-50%, -50%);
  transition: left .35s ease;
}
.profile-card .primary-btn { display: block; margin: 0 auto; }

/* ---------------- 设置 ---------------- */
.settings-card {
  width: min(860px, 100%);
  max-height: min(780px, 94vh);
  padding: 28px 32px 24px;
  overflow: auto;
  text-align: left;
  animation: settings-panel-in var(--duration-panel) cubic-bezier(.2,.8,.2,1) both;
}
.settings-heading { padding: 0 6px 16px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.settings-heading h2 { margin-bottom: 0; }
.settings-layout { display: grid; grid-template-columns: 150px minmax(0, 1fr); min-height: 390px; }
.settings-tabs { display: flex; flex-direction: column; gap: 6px; padding: 18px 14px 18px 0; border-right: 1px solid rgba(255, 255, 255, .1); }
.settings-tabs button {
  min-height: 45px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: .2s;
}
.settings-tabs button:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.settings-tabs button[aria-selected="true"] {
  border-color: rgba(126, 242, 255, .4);
  background: linear-gradient(90deg, rgba(33, 150, 243, .22), rgba(255, 255, 255, .05));
  color: var(--neon-cyan);
  box-shadow: inset 3px 0 var(--neon-cyan), 0 0 14px rgba(33, 150, 243, .2);
  text-shadow: 0 0 10px rgba(126, 242, 255, .5);
}
.settings-content { min-width: 0; max-height: 465px; padding: 20px 8px 8px 24px; overflow: auto; scrollbar-color: rgba(126, 242, 255, .35) rgba(10, 10, 26, .6); }
.settings-panel { animation: settings-panel-in var(--duration-action) ease both; }
.settings-panel h3 { margin: 0 0 14px; font-size: 18px; letter-spacing: 3px; color: var(--neon-gold); text-shadow: 0 0 10px rgba(255, 215, 0, .35); }
.settings-panel > p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.setting-row, .setting-action {
  width: 100%;
  min-height: 65px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
  color: var(--ink);
  text-align: left;
  backdrop-filter: blur(6px);
}
.setting-row + .setting-row, .volume-row + .setting-row, .setting-row + .volume-row, .setting-action { margin-top: 8px; }
.setting-row > span, .setting-action > span { min-width: 0; }
.setting-row b, .setting-row small, .setting-action b, .setting-action small { display: block; }
.setting-row b, .setting-action b { color: var(--ink); font-size: 13px; letter-spacing: 1px; }
.setting-row small, .setting-action small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.setting-row input[type="checkbox"] {
  appearance: none;
  flex: 0 0 auto;
  position: relative;
  width: 46px;
  height: 25px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 20px;
  background: rgba(10, 10, 26, .7);
  cursor: pointer;
  transition: .22s;
}
.setting-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #8ea2b8;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .5);
  transition: .22s;
}
.setting-row input[type="checkbox"]:checked { border-color: var(--neon-cyan); background: rgba(33, 150, 243, .4); box-shadow: 0 0 15px rgba(126, 242, 255, .4); }
.setting-row input[type="checkbox"]:checked::after { left: 24px; background: var(--neon-cyan); box-shadow: 0 0 8px var(--neon-cyan); }
.volume-row { display: block; padding: 8px 14px 11px; color: var(--muted); font-size: 10px; }
.volume-row > span { display: flex; justify-content: space-between; margin-bottom: 3px; }
.volume-row output { color: var(--neon-gold); font-family: var(--font-num); text-shadow: 0 0 8px rgba(255, 215, 0, .4); }
input[type="range"] { appearance: none; width: 100%; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, #2196f3, #7ef2ff); box-shadow: 0 0 8px rgba(126, 242, 255, .35); }
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 17px;
  height: 17px;
  margin-top: -6px;
  border: 2px solid #0a0a1a;
  border-radius: 50%;
  background: var(--neon-gold);
  box-shadow: 0 0 10px var(--neon-gold);
}
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, #2196f3, #7ef2ff); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border: 2px solid #0a0a1a; border-radius: 50%; background: var(--neon-gold); box-shadow: 0 0 10px var(--neon-gold); }
input[type="range"]:disabled { opacity: .35; cursor: not-allowed; }
.setting-action { border-color: rgba(126, 242, 255, .25); cursor: pointer; transition: .2s; }
.setting-action:hover {
  border-color: var(--neon-cyan);
  background: rgba(33, 150, 243, .12);
  box-shadow: 0 0 16px rgba(33, 150, 243, .3);
  transform: translateX(2px);
}
.setting-action > i { color: var(--neon-cyan); font-size: 19px; font-style: normal; text-shadow: 0 0 8px rgba(126, 242, 255, .6); }
.language-picker {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 260px);
  align-items: center;
  gap: 18px;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
  color: var(--ink);
}
.language-picker select {
  width: 100%;
  height: 44px;
  padding: 0 36px 0 12px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 12px;
  background: rgba(10, 10, 26, .7);
  color: var(--ink);
  cursor: pointer;
}
.settings-release {
  padding: 18px;
  border: 1px solid rgba(126, 242, 255, .22);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(33, 150, 243, .14), rgba(255, 255, 255, .04));
}
.settings-release small, .settings-release b { display: block; }
.settings-release small { color: var(--muted); font-size: 9px; }
.settings-release b { margin-top: 6px; font-size: 16px; color: var(--neon-gold); text-shadow: 0 0 10px rgba(255, 215, 0, .35); }
.settings-release p { margin-bottom: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.about-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.about-links a {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
  color: var(--ink);
  font-size: 11px;
  text-decoration: none;
  transition: .2s;
}
.about-links a:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); box-shadow: 0 0 14px rgba(33, 150, 243, .3); transform: translateY(-2px); }
.about-links i { color: var(--neon-gold); font-style: normal; }
.settings-footer { display: flex; justify-content: center; gap: 10px; margin: 14px auto 0; }

/* ---------------- 教程 ---------------- */
.tutorial-card { width: min(570px, 100%); overflow: hidden; padding: 34px 42px 30px; }
.tutorial-progress { position: absolute; right: 48px; top: 20px; margin: 0; color: var(--muted); font-size: 10px; letter-spacing: 2px; }
.tutorial-visual {
  position: relative;
  width: 240px;
  height: 145px;
  margin: 17px auto 20px;
  border: 1px solid rgba(126, 242, 255, .35);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(33, 150, 243, .18), transparent 68%);
  box-shadow: inset 0 0 40px rgba(33, 150, 243, .1);
}
.tutorial-visual i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 62px;
  height: 88px;
  border: 1px solid rgba(126, 242, 255, .6);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .05));
  box-shadow: 0 0 14px rgba(126, 242, 255, .3), 0 12px 22px rgba(0, 0, 0, .5);
  transform: translate(-50%, -50%);
  transition: .4s cubic-bezier(.2,.8,.2,1);
  animation: tutorial-float var(--duration-tutorial) ease-in-out infinite;
}
.tutorial-visual i::before {
  content: "K";
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--neon-cyan);
  font: bold 31px var(--font-num);
  text-shadow: 0 0 12px rgba(126, 242, 255, .7);
}
.tutorial-visual i:nth-child(1) { margin-left: -56px; transform: translate(-50%,-50%) rotate(-12deg); animation-delay: -.5s; }
.tutorial-visual i:nth-child(3) { margin-left: 56px; transform: translate(-50%,-50%) rotate(12deg); animation-delay: -1s; }
.tutorial-visual[data-step="1"] i {
  top: 58%;
  background: repeating-linear-gradient(45deg, rgba(126, 242, 255, .22), rgba(126, 242, 255, .22) 4px, rgba(33, 150, 243, .12) 4px, rgba(33, 150, 243, .12) 7px);
  border-color: rgba(126, 242, 255, .55);
}
.tutorial-visual[data-step="1"] i::before { content: ""; }
.tutorial-visual[data-step="2"] i:nth-child(1), .tutorial-visual[data-step="2"] i:nth-child(3) { opacity: .3; transform: translate(-50%,-50%) scale(.75); }
.tutorial-visual[data-step="2"] i:nth-child(2) {
  border-color: var(--neon-pink);
  box-shadow: 0 0 0 3px rgba(255, 154, 213, .5), 0 0 26px rgba(255, 154, 213, .45), 0 15px 28px rgba(0, 0, 0, .5);
}
.tutorial-visual[data-step="2"] i:nth-child(2)::before { content: "?"; color: var(--neon-pink); text-shadow: 0 0 12px rgba(255, 154, 213, .8); }
.tutorial-visual[data-step="3"] i {
  width: 44px;
  height: 44px;
  border: 2px solid var(--neon-gold);
  border-radius: 50%;
  background: rgba(10, 10, 26, .8);
  box-shadow: 0 0 18px rgba(255, 215, 0, .4);
}
.tutorial-visual[data-step="3"] i::before { content: "\2022"; color: var(--neon-gold); font-size: 36px; text-shadow: 0 0 14px var(--neon-gold); }
.tutorial-card h2 { margin-bottom: 10px; filter: drop-shadow(0 0 14px rgba(126, 242, 255, .3)); }
.tutorial-card > p:not(.eyebrow, .tutorial-progress) { min-height: 45px; margin: 0 auto; color: var(--muted); font-size: 13px; line-height: 1.75; }
.tutorial-dots { display: flex; justify-content: center; gap: 7px; margin: 18px 0; }
.tutorial-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .22); transition: .2s; }
.tutorial-dots i.active {
  width: 22px;
  border-radius: 4px;
  background: var(--neon-cyan);
  box-shadow: 0 0 10px var(--neon-cyan);
}
.tutorial-actions { display: flex; justify-content: center; gap: 10px; }

/* ---------------- 规则 / 公告 ---------------- */
.menu-card { text-align: left; padding: 38px 46px; }
.menu-card h2 { margin-bottom: 20px; }
.menu-card ol { margin: 0; padding: 0; list-style: none; }
.menu-card li { display: grid; grid-template-columns: 60px 1fr; gap: 13px; padding: 11px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.menu-card li b { color: var(--neon-gold); text-shadow: 0 0 8px rgba(255, 215, 0, .5); }
.menu-card li span { color: var(--muted); font-size: 13px; line-height: 1.65; }
.menu-card .primary-btn, .announcement-card .primary-btn { display: block; }
.announcement-card .primary-btn { margin: 22px auto 0; }
.menu-actions { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.exit-game-hint { min-height: 18px; margin: 9px 0 -10px; color: var(--neon-pink); font-size: 10px; line-height: 1.5; text-align: center; }
.announcement-card { text-align: left; max-height: min(680px, 90vh); overflow: auto; }
.announcement-card h2 { margin-bottom: 2px; }
.release-date { margin-top: 0; color: var(--muted); font-size: 10px; }
.announcement-card ul { padding-left: 20px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.announcement-card details { margin-top: 18px; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 15px; }
.announcement-card summary { color: var(--neon-cyan); cursor: pointer; }
.announcement-card article {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
  font-size: 11px;
}
.announcement-card article time { float: right; color: var(--faint); }
.announcement-card article p { margin-bottom: 0; }

/* ---------------- 提示 ---------------- */
.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  top: max(84px, calc(env(safe-area-inset-top) + 70px));
  max-width: min(90vw, 520px);
  padding: 9px 18px;
  border: 1px solid rgba(126, 242, 255, .5);
  border-radius: 12px;
  background: rgba(10, 10, 26, .88);
  color: var(--neon-cyan);
  transform: translate(-50%, -20px);
  opacity: 0;
  pointer-events: none;
  transition: .25s;
  font-size: 12px;
  letter-spacing: 1px;
  text-align: center;
  box-shadow: 0 0 22px rgba(126, 242, 255, .25);
  backdrop-filter: blur(8px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(10, 10, 26, .6); }
::-webkit-scrollbar-thumb { background: rgba(126, 242, 255, .3); border-radius: 8px; border: 2px solid rgba(10, 10, 26, .6); }
::-webkit-scrollbar-thumb:hover { background: rgba(126, 242, 255, .5); }

/* ---------------- 偏好开关钩子（JS 依赖） ---------------- */
.visual-effects-off .noise, .visual-effects-off .ambient-glow, .visual-effects-off .table-stage::before, .visual-effects-off .elimination-impact::before { display: none; }
.history-hidden .history-panel { display: none; }
.turn-effects-off .opponent.active .avatar-ring { animation: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .3); }
.turn-effects-off .turn-banner.your-turn { animation: none; box-shadow: none; background: rgba(255, 255, 255, .08); }
.calm-motion *, .calm-motion *::before, .calm-motion *::after { animation: none !important; transition-duration: .01ms !important; }
.calm-motion .elimination-impact { opacity: 1; }

/* 动画 */
@keyframes card-deal { from { opacity: 0; transform: translateY(85px) scale(.72) rotate(0); filter: blur(3px); } to { opacity: 1; transform: rotate(var(--rot)); filter: none; } }
@keyframes card-arrive { from { opacity: 0; transform: translate(var(--x), var(--arrival-y)) scale(.7) rotate(calc(var(--r) - 22deg)); filter: brightness(1.8) blur(2px); } }
@keyframes pile-badge-in { from { opacity: 0; transform: translateY(5px); } }
@keyframes dust-drift { to { background-position: 170px -140px, -230px 180px, 190px -210px, -260px 170px, 210px -190px, 240px -200px; } }
@keyframes settings-panel-in { from { opacity: 0; transform: translateY(14px) scale(.975); } }
@keyframes turn-pulse { 50% { box-shadow: 0 0 0 3px var(--neon-cyan), 0 0 34px rgba(126, 242, 255, .65); } }
@keyframes tutorial-float { 50% { margin-top: -5px; } }
@keyframes button-glint { 0%,72% { left: -55%; } 88%,100% { left: 135%; } }

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  .history-panel { display: none; }
  .opponent[data-total="2"][data-seat="1"], .opponent[data-total="3"][data-seat="1"] { left: 1%; }
  .opponent[data-total="2"][data-seat="2"], .opponent[data-total="3"][data-seat="3"] { right: 1%; }
  .opponent { width: 125px; }
  .avatar-ring { width: 62px; height: 62px; }
  .center-table { top: 41%; transform: translate(-50%, -50%) scale(.88); }
}

@media (max-width: 620px), (max-height: 740px) {
  .game-shell { min-height: 560px; }
  .topbar { height: calc(58px + env(safe-area-inset-top)); padding-left: 10px; padding-right: 10px; gap: 8px; }
  .icon-btn { width: 42px; height: 42px; }
  .brand { font-size: 12px; letter-spacing: 2px; }
  .brand b { font-size: 8px; letter-spacing: 4px; }
  .mode-badge { position: absolute; left: 50%; bottom: -28px; transform: translateX(-50%); white-space: nowrap; }
  .round-info { font-size: 9px; gap: 7px; }
  .table-stage { height: calc(100% - 58px - env(safe-area-inset-top)); }
  .history-panel { display: none; }
  .opponent[data-total="1"] { top: 8%; }
  .opponent[data-total="2"], .opponent[data-total="3"][data-seat="1"], .opponent[data-total="3"][data-seat="3"] { top: 27%; }
  .opponent[data-total="3"][data-seat="2"] { top: 8%; }
  .opponent { width: 96px; }
  .avatar-ring { width: 48px; height: 48px; }
  .avatar { font-size: 22px; }
  .opponent .name { font-size: 10px; }
  .opponent .status { font-size: 10px; }
  .opponent .name, .opponent .status { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mini-cards, .chambers { margin-top: 2px; gap: 2px; }
  .mini-card { width: 8px; height: 13px; }
  .center-table { top: 39%; transform: translate(-50%, -50%) scale(.7); }
  .player-area { bottom: max(6px, env(safe-area-inset-bottom)); }
  .hand { height: 100px; }
  .card { width: 64px; height: 92px; margin-left: -15px; }
  .card .face { font-size: 30px; }
  .you-row { padding: 0 5px; }
  .selection-hint { font-size: 10px; }
  .actions { width: 100%; justify-content: center; gap: 6px; }
  .action-btn { min-width: min(46vw, 155px); height: 48px; gap: 7px; }
  .action-btn b { font-size: 12px; }
  .action-btn small { max-width: 112px; font-size: 9px; }
  .mode-chooser { grid-template-columns: 1fr; max-width: 310px; margin-top: 18px; }
  .mode-card { min-height: 92px; padding: 12px; }
  .mode-card b { margin-top: 3px; }
  .lan-actions, .panel-actions { flex-direction: column; }
  .lan-actions > span { display: none; }
  .join-row { width: 100%; justify-content: center; }
  .panel-card { padding: 28px 20px; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
  .profile-stats > div:nth-child(3) { border-left: 0; }
  .profile-stats > div:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .1); }
  .lobby-players { grid-template-columns: 1fr; }
  .menu-card { padding: 34px 24px; }
  .menu-card li { grid-template-columns: 48px 1fr; }
  .menu-actions { flex-direction: column; align-items: stretch; }
  .menu-actions > button { width: 100%; }
  .start-content h1 { letter-spacing: -3px; }
  .settings-card { padding: 24px 16px 18px; }
  .settings-heading { padding-left: 4px; }
  .settings-layout { grid-template-columns: 1fr; min-height: 0; }
  .settings-tabs { flex-direction: row; gap: 4px; padding: 10px 0; overflow-x: auto; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .1); scrollbar-width: none; }
  .settings-tabs::-webkit-scrollbar { display: none; }
  .settings-tabs button { flex: 1 0 auto; min-height: 40px; padding: 0 13px; text-align: center; }
  .settings-tabs button[aria-selected="true"] { box-shadow: inset 0 -3px var(--neon-cyan); }
  .settings-content { max-height: 55vh; padding: 15px 0 4px; }
  .setting-row, .setting-action { min-height: 59px; padding: 10px 12px; }
  .about-links { grid-template-columns: 1fr; }
  .language-picker { grid-template-columns: 1fr; gap: 9px; }
  .tutorial-card { padding: 30px 20px 24px; }
  .tutorial-visual { width: 210px; height: 125px; margin: 12px auto 15px; }
  .tutorial-visual i { width: 52px; height: 76px; }
  .tutorial-progress { right: 48px; top: 17px; }
}

@media (max-height: 620px) {
  body { overflow: auto; }
  .game-shell { min-height: 560px; }
}

@media (max-height: 620px) and (orientation: landscape) {
  body { overflow: hidden; }
  .game-shell { min-height: 100dvh; }
  .topbar { height: 52px; }
  .table-stage { height: calc(100% - 52px - env(safe-area-inset-top)); }
  .mode-badge { position: static; transform: none; }
  .opponent[data-total="3"][data-seat="2"] { top: 2%; }
  .opponent[data-total="3"][data-seat="2"] .mini-cards, .opponent[data-total="3"][data-seat="2"] .chambers { display: none; }
  .avatar-ring { width: 40px; height: 40px; margin-bottom: 3px; }
  .avatar { font-size: 18px; }
  .center-table { top: 46%; transform: translate(-50%, -50%) scale(.45); }
  .pile-play-actor { font-size: 14px; }
  .pile-play-count { font-size: 20px; }
  .last-claim { font-size: 14px; }
  .last-claim-count { font-size: 18px; }
  .player-area { bottom: 2px; width: min(760px, 95%); display: grid; grid-template-columns: minmax(0, 1fr) 330px; grid-template-rows: 14px 76px 17px; column-gap: 14px; }
  .you-row { grid-column: 1; grid-row: 1; width: 100%; }
  .hand { grid-column: 1; grid-row: 2; height: 76px; padding: 0 12px; }
  .selection-hint { grid-column: 1; grid-row: 3; margin: 0; text-align: center; }
  .actions { grid-column: 2; grid-row: 1 / 4; align-self: end; width: 330px; margin: 0 0 4px; }
  .card { width: 54px; height: 76px; margin-left: -12px; }
  .card .corner { left: 6px; top: 4px; font-size: 14px; line-height: 14px; }
  .card .suit { left: 6px; top: 19px; font-size: 11px; }
  .card .face { inset: 25px 7px 10px; font-size: 24px; }
  .card.joker .face { font-size: 20px; }
  .card.selected { transform: translateY(-10px) rotate(var(--rot)); }
  .start-screen { align-items: center; }
  .start-content { margin: 0 auto; }
  .start-content h1 { margin-top: 4px; font-size: 46px; }
  .subtitle { margin: 7px 0 0 10px; font-size: 12px; letter-spacing: 7px; }
  .eyebrow { font-size: 9px; }
  .beat-eq { height: 18px; margin: 10px auto 0; gap: 4px; }
  .beat-eq i:nth-child(1) { height: 7px; }
  .beat-eq i:nth-child(2) { height: 14px; }
  .beat-eq i:nth-child(3) { height: 18px; }
  .beat-eq i:nth-child(4) { height: 12px; }
  .beat-eq i:nth-child(5) { height: 8px; }
  .mode-chooser { grid-template-columns: repeat(2, minmax(0, 220px)); max-width: none; margin: 12px auto 9px; }
  .mode-card { min-height: 82px; padding: 9px; }
  .mode-icon { width: 34px; height: 34px; }
  .mode-icon .ui-icon { width: 19px; height: 19px; }
  .mode-card b { margin-top: 3px; font-size: 14px; }
  .mode-card small { margin-top: 2px; }
  .tip { margin: 7px 0 2px; }
  .lan-panel { width: min(680px, 100%); margin: 10px auto 2px; padding: 13px 18px 8px; display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: end; gap: 8px 18px; }
  .lan-actions { flex-direction: row; margin: 0; }
  .lan-actions > span { display: inline; }
  .lan-panel .text-btn { grid-column: 1 / -1; margin: -2px auto 0; min-height: 30px; padding: 4px 8px; }
  .panel-card { padding: 16px 24px; }
  .panel-card h2 { margin: 3px 0 7px; font-size: 25px; }
  .lobby-players { grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 10px 0 7px; }
  .lobby-player { min-height: 42px; padding: 5px 9px; }
  .lobby-player i { width: 27px; height: 27px; }
  .panel-actions { flex-direction: row; margin-top: 10px; }
  .lobby-card .primary-btn, .lobby-card .secondary-btn { min-width: 150px; height: 44px; }
  .room-code { margin: 4px 0; padding: 4px 18px; font-size: 29px; }
  .lobby-status { margin: 4px 0; }
  .toast { top: max(4px, env(safe-area-inset-top)); padding: 6px 14px; font-size: 10px; transform: translate(-50%, -8px); }
  .profile-card { width: min(720px, 94vw); display: grid; grid-template-columns: .9fr 1.2fr; grid-template-areas: "eyebrow eyebrow" "heading heading" "identity stats" "quote stats" "reputation reputation" "action action"; align-items: center; gap: 5px 22px; }
  .profile-card > .eyebrow { grid-area: eyebrow; }
  .profile-card > h2 { grid-area: heading; }
  .profile-identity { grid-area: identity; margin: 3px 0; }
  .profile-quote { grid-area: quote; margin: 0; font-size: 10px; }
  .profile-stats { grid-area: stats; grid-template-columns: repeat(4, 1fr); }
  .profile-stats > div { min-width: 0; padding: 10px 4px; border-top: 0 !important; border-left: 1px solid rgba(255, 255, 255, .1) !important; }
  .profile-stats > div:first-child { border-left: 0 !important; }
  .profile-stats strong { font-size: 21px; }
  .profile-stats span { letter-spacing: 0; }
  .profile-reputation { grid-area: reputation; margin: 5px 0 7px; }
  .profile-card .primary-btn { grid-area: action; }
  .settings-card { width: min(860px, 96vw); max-height: 96vh; padding: 16px 24px; }
  .settings-heading { padding-bottom: 7px; }
  .settings-heading h2 { font-size: 24px; }
  .settings-layout { grid-template-columns: 135px minmax(0, 1fr); min-height: 220px; }
  .settings-tabs { flex-direction: column; gap: 2px; padding: 9px 10px 9px 0; border-right: 1px solid rgba(255, 255, 255, .1); border-bottom: 0; overflow: visible; }
  .settings-tabs button { min-height: 30px; text-align: left; }
  .settings-tabs button[aria-selected="true"] { box-shadow: inset 3px 0 var(--neon-cyan); }
  .settings-content { max-height: 220px; padding: 10px 0 3px 16px; }
  .settings-panel h3 { margin-bottom: 7px; }
  .setting-row, .setting-action { min-height: 47px; padding: 6px 11px; }
  .setting-row small, .setting-action small { margin-top: 2px; }
  .volume-row { padding: 3px 11px 4px; }
  .about-links { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 8px; }
  .about-links a { min-height: 38px; }
  .settings-footer { margin-top: 7px; }
  .settings-footer .primary-btn, .settings-footer .secondary-btn { height: 38px; }
  .tutorial-card { width: min(700px, 94vw); display: grid; grid-template-columns: 220px 1fr; grid-template-areas: "eyebrow progress" "visual heading" "visual copy" "visual dots" "visual actions"; gap: 4px 24px; align-items: center; padding: 20px 30px; text-align: left; }
  .tutorial-card > .eyebrow { grid-area: eyebrow; }
  .tutorial-progress { position: static; grid-area: progress; text-align: right; }
  .tutorial-visual { grid-area: visual; width: 210px; height: 120px; margin: 0; }
  .tutorial-card h2 { grid-area: heading; margin: 0; }
  .tutorial-card > p:not(.eyebrow, .tutorial-progress) { grid-area: copy; min-height: 0; }
  .tutorial-dots { grid-area: dots; justify-content: flex-start; margin: 5px 0; }
  .tutorial-actions { grid-area: actions; justify-content: flex-start; }
}

@media (max-width: 360px) {
  .topbar { gap: 6px; }
  .brand { display: none; }
  .round-info { margin-left: auto; gap: 6px; }
  .card { width: 56px; height: 84px; margin-left: -15px; }
  .settings-footer { gap: 6px; }
  .settings-footer .primary-btn, .settings-footer .secondary-btn { min-width: 118px; }
}

@media (max-width: 360px) and (max-height: 620px) and (orientation: portrait) {
  .opponent[data-total="3"][data-seat="2"] { top: 2%; }
  .opponent[data-total="3"][data-seat="2"] .mini-cards, .opponent[data-total="3"][data-seat="2"] .chambers { display: none; }
  .center-table { top: 43%; transform: translate(-50%, -50%) scale(.6); }
  .you-row { transform: translateY(-14px); }
}

@media (hover: none) {
  .icon-btn:hover, .mode-card:hover, .primary-btn:hover, .secondary-btn:hover, .danger-btn:hover, .action-btn:not(:disabled):hover { transform: none; filter: none; }
  .card:hover { transform: rotate(var(--rot)); box-shadow: 0 7px 14px rgba(0, 0, 0, .5), 0 0 12px rgba(126, 242, 255, .14), inset 0 0 14px rgba(126, 242, 255, .08); }
  .card.selected:hover { transform: translateY(-25px) rotate(var(--rot)); box-shadow: 0 0 0 3px var(--neon-cyan), 0 0 30px rgba(126, 242, 255, .7), 0 17px 24px rgba(0, 0, 0, .6); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .elimination-impact { animation: none !important; opacity: 1; }
  .elimination-impact::before { animation: none !important; opacity: 0; }
}
