:root {
  --lamp: #3d2418;
  --felt: #1a7a4c;
  --felt-deep: #0e4f32;
  --gilt: #e6c15a;
  --lacquer: #c23a2b;
  --ink: #fff8e7;
  --mute: rgba(255, 248, 231, 0.72);
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Noto Serif SC", "Songti SC", "STSong", serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: radial-gradient(ellipse 70% 55% at 50% 45%, #2a9a62, var(--felt) 45%, var(--felt-deep));
}
body { display: flex; flex-direction: column; min-height: 100dvh; }
.top {
  display: flex; align-items: center; gap: 10px;
  height: 36px; padding: 0 12px;
  background: rgba(14, 40, 24, 0.55);
  font-size: 13px;
}
.top a { color: var(--gilt); text-decoration: none; }
.top .grow { flex: 1; }
#hud.spectate-pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#hud .spectate-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(230, 193, 90, 0.28);
  color: var(--gilt);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  animation: spectate-pulse 1.2s ease-in-out infinite;
}
@keyframes spectate-pulse {
  0%, 100% { filter: brightness(1); box-shadow: 0 0 0 0 rgba(230,193,90,0.0); }
  50% { filter: brightness(1.12); box-shadow: 0 0 0 3px rgba(230,193,90,0.18); }
}
.gem.tap-deny {
  animation: tap-deny 0.35s ease;
}
@keyframes tap-deny {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}
.gate, .table {
  flex: 1; display: flex; flex-direction: column;
  padding: 16px; gap: 12px; max-width: 960px; width: 100%; margin: 0 auto;
}
h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(28px, 6vw, 40px);
  letter-spacing: 0.06em;
}
.sub { margin: 0; color: var(--mute); font-size: 14px; }
label { display: block; font-size: 12px; color: var(--mute); margin-bottom: 4px; }
input, select {
  width: 100%; height: 44px; padding: 0 12px;
  border: 0; border-radius: 8px;
  background: #fffef8; color: #3d2418; font-size: 16px;
}
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 120px; }
.btn {
  min-height: 44px; padding: 0 16px; border: 0; border-radius: 8px;
  font: inherit; cursor: pointer; letter-spacing: 0.06em;
}
.btn-main {
  background: linear-gradient(180deg, #e85a48, var(--lacquer));
  color: #fff8e7; box-shadow: 0 3px 0 #8e2418; font-weight: 700;
}
.btn-ghost {
  background: rgba(0,0,0,0.25); color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(230,193,90,0.35);
}
.panel {
  background: rgba(14, 40, 24, 0.45);
  border-radius: 10px; padding: 12px;
  box-shadow: inset 0 0 0 1px rgba(230,193,90,0.25);
}
.muted { color: var(--mute); font-size: 13px; }
.err { color: #ffb4a8; min-height: 1.2em; font-size: 13px; }
.seats { display: flex; flex-wrap: wrap; gap: 8px; }
.seat-chip {
  padding: 8px 10px; border-radius: 8px;
  background: rgba(0,0,0,0.28); min-width: 72px; text-align: center;
}
.seat-chip.me { box-shadow: inset 0 0 0 1.5px var(--gilt); }
.seat-chip.sel { outline: 2px solid var(--lacquer); }
.seat-chip.sel-ready {
  outline: 2px solid #2a9a62;
  background: rgba(42, 154, 98, 0.22);
  animation: propose-sel-pulse 1.1s ease-in-out infinite;
}
@keyframes propose-sel-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(42, 154, 98, 0); }
  50% { box-shadow: 0 0 0 4px rgba(42, 154, 98, 0.28); }
}
.btn.propose-go {
  animation: propose-go-pulse 1.1s ease-in-out infinite;
  box-shadow: 0 0 0 2px rgba(42, 154, 98, 0.45);
}
@keyframes propose-go-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.1); }
}
.seat-chip.markable {
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(230,193,90,0.45);
}
.seat-chip.assassin-mark {
  box-shadow: inset 0 0 0 1px rgba(194, 58, 43, 0.4);
}
.seat-chip.assassin-target {
  outline: 2px solid #c23a2b;
  background: rgba(194, 58, 43, 0.28);
  animation: assassin-target-pulse 1s ease-in-out infinite;
  z-index: 2;
}
.seat-chip.assassin-target .kill-hint {
  color: #ffd0c8 !important;
  font-weight: 800;
}
@keyframes assassin-target-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(194, 58, 43, 0);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 5px rgba(194, 58, 43, 0.28);
  }
}
.seat-chip.locked {
  outline: 2px solid rgba(230, 193, 90, 0.75);
  background: rgba(80, 48, 20, 0.55);
  cursor: default;
  pointer-events: none;
}
.seat-chip.locked small { color: #ffd7a8; font-weight: 700; }
.seat-chip.grey {
  opacity: 0.38;
  filter: grayscale(0.55);
  cursor: not-allowed;
  pointer-events: none;
}
.seat-chip.grey small { color: var(--mute); font-weight: 500; }
.seat-chip.voted {
  opacity: 0.45;
  filter: grayscale(0.4);
}
.seat-chip.voted small { color: var(--mute); }
.seat-chip.on-mission {
  outline: 1.5px solid rgba(230, 193, 90, 0.55);
}
.seat-chip.mission-done small { color: #c8e6d0; }
.seat-chip.bot { opacity: 0.88; }
.seat-chip.empty { opacity: 0.45; }
.seat-chip.leader::after { content: " · 队长"; color: var(--gilt); font-size: 11px; }
.seat-chip .team-dot {
  display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  margin-right: 5px; vertical-align: middle;
}
.seat-chip .team-dot.good { background: #2a9a62; box-shadow: 0 0 0 1px rgba(200,230,208,0.4); }
.seat-chip .team-dot.evil { background: #c23a2b; box-shadow: 0 0 0 1px rgba(255,208,200,0.4); }
.seat-chip.team-good {
  box-shadow: inset 0 0 0 1px rgba(42,154,98,0.45);
}
.seat-chip.team-evil {
  box-shadow: inset 0 0 0 1px rgba(194,58,43,0.45);
}
.seat-chip.leader-pulse {
  animation: leader-pulse 1.15s ease-in-out infinite;
  box-shadow: inset 0 0 0 1.5px var(--gilt), 0 0 0 1px rgba(230, 193, 90, 0.35);
}
.seat-chip.leader-pulse small { color: #ffd7a8; font-weight: 700; }
@keyframes leader-pulse {
  0%, 100% { transform: translateY(0); filter: brightness(1); }
  50% { transform: translateY(-2px); filter: brightness(1.1); }
}
.seat-chip.leader-handoff {
  outline: 2px solid var(--gilt);
  background: rgba(230, 193, 90, 0.28);
  animation: leader-handoff-pop 0.9s ease-out;
  z-index: 2;
}
.seat-chip.leader-from {
  opacity: 0.72;
  outline: 1px dashed rgba(230, 193, 90, 0.45);
}
.seat-chip .leader-arrow {
  color: var(--gilt) !important;
  font-weight: 800;
  letter-spacing: 0.02em;
  animation: leader-arrow-nudge 0.7s ease-in-out infinite;
}
.seat-chip .leader-arrow.from {
  color: var(--mute) !important;
  animation: none;
}
@keyframes leader-handoff-pop {
  0% { transform: scale(0.92); filter: brightness(1.3); }
  100% { transform: scale(1); filter: brightness(1); }
}
@keyframes leader-arrow-nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}
.seat-chip small { display: block; font-size: 11px; color: var(--gilt); margin-top: 2px; }
.seat-chip .vote-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 1px 5px;
  border-radius: 4px;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
}
.seat-chip .vote-swatch.yes {
  background: rgba(42, 154, 98, 0.35);
  color: #c8e6d0;
}
.seat-chip .vote-swatch.no {
  background: rgba(194, 58, 43, 0.4);
  color: #ffd0c8;
}
@media (max-width: 640px) {
  .seat-chip .vote-swatch {
    min-width: 12px;
    width: 12px;
    height: 12px;
    padding: 0;
    border-radius: 3px;
  }
  .seat-chip .vote-swatch span { display: none; }
}
.roster-chip.locked {
  outline: 1px solid rgba(230, 193, 90, 0.65);
  background: rgba(80, 48, 20, 0.5);
}
.roster-chip.locked small { color: #ffd7a8; }
.phase-banner {
  margin: 8px 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(194, 58, 43, 0.28);
  color: #ffd0c8;
  font-size: 13px;
  font-weight: 600;
}
.recent {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.recent-list { display: flex; flex-wrap: wrap; gap: 6px; }
.recent-chip {
  min-height: 32px; padding: 0 10px; border: 0; border-radius: 8px;
  background: rgba(0,0,0,0.28); color: var(--gilt);
  font: inherit; font-size: 13px; letter-spacing: 0.06em; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(230,193,90,0.35);
}
.turn-timer {
  margin: 6px 0 10px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0,0,0,0.28);
  color: var(--mute);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.turn-timer.mine {
  color: var(--gilt);
  box-shadow: inset 0 0 0 1px rgba(230,193,90,0.45);
}
.turn-timer.urgent {
  color: #ffd0c8;
  background: rgba(194, 58, 43, 0.28);
  font-weight: 700;
}
.noble-card.choice {
  outline: 2px solid var(--lacquer);
  box-shadow: 0 0 0 1px rgba(230,193,90,0.5), 0 2px 0 rgba(0,0,0,0.25);
  animation: noble-pulse 1.2s ease-in-out infinite;
}
.noble-card .noble-cta {
  display: block;
  margin-top: 4px;
  color: var(--lacquer);
  font-weight: 700;
  font-size: 11px;
}
@keyframes noble-pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
body.last-round .top {
  background: rgba(120, 40, 20, 0.72);
  box-shadow: inset 0 -2px 0 var(--lacquer);
}
body.last-round #status {
  color: #ffd7a8;
  font-weight: 700;
}
button.seat-chip {
  border: 0; color: inherit; font: inherit; cursor: pointer;
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions .btn { flex: 1; }
.log {
  font-size: 12px; color: var(--mute); max-height: 88px; overflow: auto;
  white-space: pre-wrap;
}
.quest-bar {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin: 8px 0 10px;
}
.quest-pip {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  background: rgba(0,0,0,0.28); color: var(--mute);
  border: 0; padding: 0; font: inherit; font-size: 12px; font-weight: 700;
}
.quest-pip.win { background: #1f7a4a; color: #e8fff2; }
.quest-pip.lose { background: #8e2418; color: #ffe8e4; }
.quest-pip.now {
  background: rgba(230,193,90,0.25);
  color: var(--gilt);
  box-shadow: inset 0 0 0 1.5px var(--gilt);
  animation: quest-breathe 1.4s ease-in-out infinite;
}
@keyframes quest-breathe {
  0%, 100% { transform: scale(1); box-shadow: inset 0 0 0 1.5px var(--gilt), 0 0 0 0 rgba(230,193,90,0); }
  50% { transform: scale(1.08); box-shadow: inset 0 0 0 1.5px var(--gilt), 0 0 0 4px rgba(230,193,90,0.22); }
}
.quest-pip.pending { opacity: 0.55; }
.noble-card .recv-badge {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 1.4em;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--lacquer);
  color: #fff8e8;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  pointer-events: none;
}
.noble-card .recv-badge.enough {
  background: rgba(230, 193, 90, 0.92);
  color: #2a1a08;
}
.actions .win-why-tag {
  align-self: center;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(230, 193, 90, 0.22);
  color: var(--gilt);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
button.quest-pip.tap {
  cursor: pointer;
  position: relative;
  overflow: visible;
}
button.quest-pip.tap:hover { filter: brightness(1.08); }
button.quest-pip.open {
  box-shadow: 0 0 0 2px var(--gilt);
}
button.quest-pip .qh-hint {
  position: absolute;
  bottom: -11px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  color: var(--gilt);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0.9;
}
button.quest-pip.open .qh-hint { color: var(--ink); }
body.opp-turn #mine,
body.opp-turn #reserved {
  opacity: 0.42;
  filter: saturate(0.7);
  transition: opacity 0.2s ease, filter 0.2s ease;
}
body.opp-turn #mine::before {
  content: "对手回合";
  display: block;
  width: 100%;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--mute);
  letter-spacing: 0.04em;
}
.quest-hist {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0,0,0,0.28);
}
.quest-hist .hist-close {
  margin-left: auto;
  min-height: 28px; padding: 0 10px;
  border: 0; border-radius: 6px;
  background: rgba(255,255,255,0.08);
  color: var(--mute); font: inherit; font-size: 12px; cursor: pointer;
}
.reject-bar {
  display: flex; align-items: center; gap: 6px;
  margin: 0 0 10px; flex-wrap: wrap;
}
.reject-label { font-size: 12px; color: var(--mute); margin-right: 4px; }
.reject-pip {
  width: 14px; height: 14px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  box-shadow: inset 0 0 0 1px rgba(230,193,90,0.35);
}
.reject-pip.on { background: #c23a2b; box-shadow: none; }
.reject-bar.pre-full-blink {
  animation: reject-bar-pulse 0.9s ease-in-out infinite;
}
.reject-pip.next-warn {
  background: rgba(194, 58, 43, 0.35);
  box-shadow: 0 0 0 2px #c23a2b;
  animation: reject-pip-blink 0.7s ease-in-out infinite;
}
@keyframes reject-bar-pulse {
  0%, 100% { background: rgba(194, 58, 43, 0.12); }
  50% { background: rgba(194, 58, 43, 0.32); }
}
@keyframes reject-pip-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.15); }
}
.lr-gaps {
  display: inline-flex; flex-wrap: wrap; gap: 6px;
  margin-left: 4px;
  vertical-align: middle;
}
.lr-gap {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(0,0,0,0.28);
  color: var(--mute);
  font-size: 12px;
  font-weight: 700;
}
.lr-gap.ok {
  background: rgba(42, 154, 98, 0.28);
  color: #c8e6d0;
}
.lr-gap.me {
  box-shadow: inset 0 0 0 1px var(--gilt);
  color: var(--gilt);
}
.phase-banner.reject-warn {
  background: rgba(194, 58, 43, 0.22);
  color: #ffd0c8;
}
.phase-banner.reject-warn.soft {
  background: rgba(194, 58, 43, 0.14);
  color: #ffd0c8;
  font-weight: 600;
}
.phase-banner.reject-warn.critical {
  background: rgba(194, 58, 43, 0.42);
  color: #ffe8e4;
  animation: reject-flash 1.1s ease-in-out infinite;
}
.reject-bar.on-propose {
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(194, 58, 43, 0.12);
  box-shadow: inset 0 0 0 1px rgba(194, 58, 43, 0.35);
}
@keyframes reject-flash {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.12); }
}
.gem.pickable {
  cursor: pointer;
  box-shadow: inset 0 0 0 1.5px rgba(230, 193, 90, 0.65);
  animation: gem-pick 1.3s ease-in-out infinite;
}
.gem.pickable.sel {
  animation: none;
}
@keyframes gem-pick {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
body.discard-mode #mine {
  box-shadow: inset 0 0 0 1.5px rgba(230, 193, 90, 0.45);
  border-radius: 8px;
  padding: 6px;
}
.card.buyable {
  box-shadow: 0 0 0 1.5px #2a9a62, 0 2px 0 rgba(0,0,0,0.25);
}
.card.locked {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.25);
}
.actions.spectate-only {
  opacity: 0.92;
}
.actions.spectate-only .hint {
  flex: 1 1 100%;
}
.hint {
  flex: 1 1 100%;
  font-size: 13px; padding: 6px 10px; border-radius: 6px;
}
.hint.ok { background: rgba(42,154,98,0.25); color: #c8e6d0; }
.hint.short { background: rgba(194,58,43,0.28); color: #ffd0c8; }
.hint.short {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.hint .short-row {
  display: inline-flex; flex-wrap: wrap; gap: 4px;
  vertical-align: middle;
}
.short-chip {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0,0,0,0.28);
  color: #ffd0c8;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) {
  .hint.short {
    flex-direction: column;
    align-items: flex-start;
  }
  .hint .short-row {
    display: flex;
    width: 100%;
    margin-left: 0;
  }
}
.vote-meter-wait {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.role-grid {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
}
.team-legend {
  display: flex; gap: 10px; margin-top: 6px; font-size: 12px;
}
.team-legend .leg {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--mute);
}
.team-legend .leg::before {
  content: "";
  width: 10px; height: 10px; border-radius: 2px;
}
.team-legend .leg.good::before { background: #2a9a62; }
.team-legend .leg.evil::before { background: #c23a2b; }
.role-card {
  position: relative;
  min-width: 88px; padding: 8px 10px 8px 14px; border-radius: 8px;
  background: rgba(0,0,0,0.3); display: flex; flex-direction: column; gap: 2px;
  overflow: hidden;
  border: none; cursor: pointer; text-align: left; font: inherit; color: inherit;
}
button.role-card:hover { filter: brightness(1.06); }
button.role-card.open {
  box-shadow: inset 0 0 0 1.5px var(--gilt);
}
.role-tap-hint { display: block; margin-top: 8px; }
.role-summary {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(0,0,0,0.28);
  display: flex; flex-direction: column; gap: 6px;
}
.role-summary .rs-row {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.45;
}
.role-summary .rs-row .leg { margin-right: 6px; }
.discard-remain {
  color: var(--gilt);
  font-weight: 700;
  white-space: nowrap;
}
.role-card .team-stripe {
  position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
}
.role-card strong { font-size: 13px; color: var(--ink); }
.role-card span:not(.team-stripe) { font-size: 12px; color: var(--gilt); }
.role-card small { font-size: 11px; color: var(--mute); }
.role-card.good {
  box-shadow: inset 0 0 0 1px rgba(42,154,98,0.55);
  background: linear-gradient(90deg, rgba(42,154,98,0.18), rgba(0,0,0,0.3) 28%);
}
.role-card.good .team-stripe { background: #2a9a62; }
.role-card.evil {
  box-shadow: inset 0 0 0 1px rgba(194,58,43,0.55);
  background: linear-gradient(90deg, rgba(194,58,43,0.2), rgba(0,0,0,0.3) 28%);
}
.role-card.evil .team-stripe { background: #c23a2b; }
.gem.gold-bank {
  font-size: 12px;
  letter-spacing: 0.02em;
  background: rgba(230, 193, 90, 0.22);
  color: var(--gilt);
}
.gem.gold-bank .gold-char { font-size: 11px; font-weight: 600; }
.gem.gold-hand {
  font-size: 14px;
  font-weight: 700;
  background: rgba(230, 193, 90, 0.32);
  color: #ffe9a8;
}
.gem.gold-hand .gold-char { font-size: 15px; font-weight: 800; }
.gem.gold-zero .gold-char {
  opacity: 0.45;
  text-decoration: line-through;
}
.gem.gold-zero {
  opacity: 0.45;
}
.gem.locked,
.gem.gold-bank.gold-zero {
  pointer-events: auto;
  cursor: not-allowed !important;
  user-select: none;
}
.switch-wrap {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--mute);
}
.switch-wrap select {
  width: auto; min-width: 72px; height: 36px;
  padding: 0 8px; font-size: 14px;
}
.opponents {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 8px;
}
.opp {
  display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline;
  padding: 8px 10px; border-radius: 8px;
  background: rgba(0,0,0,0.28); font-size: 12px; color: var(--mute);
  min-width: 140px;
}
.opp strong { color: var(--ink); font-size: 13px; }
.opp.me { box-shadow: inset 0 0 0 1.5px var(--gilt); }
.opp.turn { outline: 1.5px solid var(--lacquer); }
.opp.turn.pulse {
  animation: opp-pulse 1.1s ease-in-out infinite;
  outline-color: var(--gilt);
  box-shadow: 0 0 0 1px rgba(230, 193, 90, 0.45);
}
.opp.turn.pulse strong { color: var(--gilt); }
@keyframes opp-pulse {
  0%, 100% { transform: translateY(0); filter: brightness(1); }
  50% { transform: translateY(-2px); filter: brightness(1.1); }
}
.opp.score-bump {
  outline: 2px solid #2a9a62;
  background: rgba(42, 154, 98, 0.18);
  position: relative;
  animation: opp-score-flash 0.85s ease-out;
}
.opp .pts-line { position: relative; }
.opp .pts-line.pts-flash {
  color: #c8e6d0;
  font-weight: 800;
  animation: pts-flash 1.4s ease-out;
}
@keyframes opp-score-flash {
  0% { filter: brightness(1.25); }
  100% { filter: brightness(1); }
}
@keyframes pts-flash {
  0% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.opp .pts-line.turn-pts {
  color: var(--gilt);
  font-weight: 800;
  text-shadow: 0 0 8px rgba(230, 193, 90, 0.35);
  animation: pts-glow 1.2s ease-in-out infinite;
}
@keyframes pts-glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.15); }
}
.score-pop {
  display: inline-block;
  margin-left: 4px;
  color: #c8e6d0;
  font-weight: 800;
  animation: score-pop 1.5s ease-out forwards;
}
@keyframes score-pop {
  0% { transform: translateY(4px); opacity: 0; }
  20% { transform: translateY(-2px); opacity: 1; }
  100% { transform: translateY(-14px); opacity: 0; }
}
.phase-banner.over-banner {
  background: rgba(42, 154, 98, 0.28);
  color: #c8e6d0;
}
.phase-banner.over-banner.reject-finale {
  background: rgba(194, 58, 43, 0.48);
  color: #ffe8e4;
  animation: reject-flash 1.1s ease-in-out infinite;
}
.phase-banner.over-banner.assassin-hit {
  background: rgba(194, 58, 43, 0.42);
  color: #ffe8e4;
}
.phase-banner.over-banner.merlin-safe {
  background: rgba(42, 154, 98, 0.38);
  color: #e8fff2;
}
.phase-banner.over-banner.quest-fail {
  background: rgba(194, 58, 43, 0.42);
  color: #ffe8e4;
}
.phase-banner.over-banner.quest-win {
  background: rgba(42, 154, 98, 0.32);
  color: #e8fff2;
}
.turn-timer.last-chance {
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(230, 193, 90, 0.65);
}
.opp.bot { opacity: 0.9; }
.opp.empty { opacity: 0.45; }
.opp.reserve-full {
  box-shadow: inset 0 0 0 1px rgba(194, 58, 43, 0.35);
}
.opp .res-line.full { color: #ffd0c8; font-weight: 700; }
.opp .res-dot {
  display: inline-block;
  width: 7px; height: 7px;
  margin-left: 4px;
  border-radius: 50%;
  background: #c23a2b;
  box-shadow: 0 0 0 1px rgba(255, 208, 200, 0.45);
  vertical-align: middle;
}
.gems { display: flex; gap: 6px; flex-wrap: wrap; }
.gem {
  padding: 6px 10px; border-radius: 6px; background: rgba(0,0,0,0.35);
  font-variant-numeric: tabular-nums; font-size: 13px;
}
.gem.empty {
  opacity: 0.35;
  text-decoration: line-through;
  cursor: not-allowed !important;
}
.gem.low {
  opacity: 0.55;
  box-shadow: inset 0 0 0 1px rgba(230,193,90,0.25);
}
.gem.sel {
  outline: 2px solid var(--gilt);
  background: rgba(230,193,90,0.28);
  color: var(--ink);
  font-weight: 700;
}
body.take3-ready #bank .gem.sel {
  outline-color: #2a9a62;
  background: rgba(42, 154, 98, 0.32);
  color: #e8fff2;
  animation: take3-gem-glow 1.1s ease-in-out infinite;
}
body.take3-ready #bank {
  box-shadow: inset 0 0 0 1.5px rgba(42, 154, 98, 0.35);
  border-radius: 10px;
  padding: 4px;
}
@keyframes take3-gem-glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.12); }
}
.gem.bonus {
  background: rgba(230,193,90,0.18);
  color: var(--gilt);
}
.spec-bar {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin: 0 0 10px;
}
.spec-chip {
  padding: 4px 8px; border-radius: 6px;
  background: rgba(0,0,0,0.28); color: var(--mute); font-size: 12px;
}
.pick-bar {
  margin: 0 0 8px; padding: 6px 10px; border-radius: 8px;
  background: rgba(230,193,90,0.16); color: var(--ink); font-size: 13px;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.pick-bar.pick-full {
  background: rgba(42, 154, 98, 0.22);
  box-shadow: inset 0 0 0 1.5px rgba(42, 154, 98, 0.55);
  animation: pick-full-pulse 1.1s ease-in-out infinite;
}
.pick-bar.pick-full .pick-tip {
  color: #c8e6d0;
  font-weight: 700;
}
.pick-bar .pick-chip.full {
  background: rgba(42, 154, 98, 0.4);
  color: #e8fff2;
  font-weight: 800;
}
@keyframes pick-full-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.08); }
}
.pick-bar strong { color: var(--gilt); }
.pick-bar .pick-label { color: var(--mute); font-size: 12px; }
.pick-bar .pick-tip { color: var(--mute); font-size: 12px; }
.pick-bar .pick-chip {
  min-height: 28px; padding: 0 8px;
  border: 0; border-radius: 6px;
  background: rgba(230, 193, 90, 0.28);
  color: var(--gilt);
  font: inherit; font-size: 12px; font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(230,193,90,0.45);
}
.pick-bar .pick-chip:hover { filter: brightness(1.08); }
.pick-bar .pick-clear {
  margin-left: auto;
  min-height: 28px; padding: 0 10px;
  border: 0; border-radius: 6px;
  background: rgba(0,0,0,0.28); color: var(--gilt);
  font: inherit; font-size: 12px; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(230,193,90,0.35);
}
.pick-bar .pick-clear:hover { filter: brightness(1.08); }
.bot-list {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin: 8px 0 0;
}
.bot-chip {
  padding: 4px 8px; border-radius: 6px;
  background: rgba(0,0,0,0.28); color: var(--mute); font-size: 12px;
  box-shadow: inset 0 0 0 1px rgba(230,193,90,0.25);
}
.roster {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin: 0 0 10px;
}
.roster-label {
  font-size: 12px; color: var(--mute); margin-right: 4px;
}
.roster-chip {
  padding: 6px 10px; border-radius: 8px;
  background: rgba(230, 193, 90, 0.18);
  color: var(--ink); font-size: 13px;
  box-shadow: inset 0 0 0 1px rgba(230,193,90,0.45);
}
.roster-chip.me {
  background: rgba(194, 58, 43, 0.28);
  box-shadow: inset 0 0 0 1.5px var(--lacquer);
}
.roster-chip.done {
  box-shadow: inset 0 0 0 1px rgba(42,154,98,0.55);
}
.roster-chip.done small { color: #c8e6d0; }
.roster-chip.wait { opacity: 0.75; }
.roster-chip small {
  display: block; font-size: 11px; margin-top: 2px; color: var(--mute);
}
.card.card-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; cursor: default;
  background: rgba(0,0,0,0.2); color: var(--mute);
  box-shadow: inset 0 0 0 1px rgba(230,193,90,0.2);
  border: 1px dashed rgba(230,193,90,0.35);
}
.card.card-empty span { font-size: 13px; letter-spacing: 0.08em; }
.card.card-empty small { color: var(--mute); }
.card.card-empty.refillable {
  border-color: rgba(42, 154, 98, 0.45);
  background: rgba(42, 154, 98, 0.08);
}
.card.card-empty.refillable small { color: #c8e6d0; }
.card.card-empty.deck-empty {
  border-color: rgba(194, 58, 43, 0.35);
  opacity: 0.7;
}
.card.card-empty.deck-empty small { color: #ffd0c8; }
.vote-prog {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin: 0 0 10px;
}
.vote-meter {
  flex: 1 1 100%;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-bottom: 4px;
}
.vote-meter-track {
  flex: 1 1 120px;
  height: 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.35);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(230,193,90,0.25);
}
.vote-meter-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #8e2418, #e6c15a);
  transition: width 0.25s ease;
}
.vote-meter-fill.mission {
  background: linear-gradient(90deg, #1f7a4a, #e6c15a);
}
.vote-meter-wait {
  font-size: 12px;
  color: var(--mute);
}
.vote-meter-wait.ok { color: #c8e6d0; font-weight: 600; }
.mission-note {
  font-size: 12px;
  font-weight: 700;
  color: var(--gilt);
  white-space: nowrap;
}
.hint.muted-note {
  background: rgba(0,0,0,0.2);
  color: var(--mute);
  font-weight: 600;
}
.take3-abbr {
  align-self: center;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(42, 154, 98, 0.22);
  color: #c8e6d0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.take3-abbr.dim {
  background: rgba(0,0,0,0.22);
  color: var(--mute);
  font-weight: 700;
}
.vote-wait-tog {
  margin-left: 2px;
  min-height: 26px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  color: var(--gilt);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.vote-wait-tog:hover { filter: brightness(1.1); }
.card.reserve-slot {
  border: 1px dashed rgba(230, 193, 90, 0.45);
  background: rgba(0,0,0,0.18);
  color: var(--mute);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 88px;
}
.card.reserve-slot span {
  font-size: 13px;
  font-weight: 700;
  color: var(--gilt);
}
.card.reserve-slot small { font-size: 11px; color: var(--mute); }
.card.reserve-slot.open {
  border-color: rgba(42, 154, 98, 0.55);
  background: rgba(42, 154, 98, 0.12);
}
.card.reserve-slot.open span { color: #c8e6d0; }
.vote-chip {
  padding: 6px 10px; border-radius: 8px;
  background: rgba(0,0,0,0.28); font-size: 13px;
  min-width: 64px; text-align: center;
}
.vote-chip small {
  display: block; font-size: 11px; margin-top: 2px; color: var(--mute);
}
.vote-chip.done {
  box-shadow: inset 0 0 0 1px rgba(42,154,98,0.55);
}
.vote-chip.done small { color: #c8e6d0; }
.vote-chip.wait {
  opacity: 0.7;
  box-shadow: inset 0 0 0 1px rgba(230,193,90,0.3);
}
.vote-chip.me { box-shadow: inset 0 0 0 1.5px var(--gilt); }
.card .pts-hot { color: #8e2418; font-weight: 700; }
.card .pts-zero { color: #6a4a30; }
.card-tip {
  display: block; margin-top: 6px; font-size: 11px; font-weight: 700;
  color: #6a4a30;
}
.card-tip.ok { color: #1a5c38; }
.card-tip.short { color: #8e2418; }
.card.reserve-card { min-height: 124px; }
.cards { display: flex; gap: 8px; flex-wrap: wrap; }
.card {
  position: relative;
  width: 92px; min-height: 110px; padding: 8px;
  border-radius: 8px; background: #fffef8; color: #3d2418;
  font-size: 11px; text-align: left; cursor: pointer;
  box-shadow: 0 2px 0 rgba(0,0,0,0.25);
}
.buy-badge {
  position: absolute;
  top: 4px; right: 4px;
  padding: 1px 5px;
  border-radius: 4px;
  background: #1f7a4a;
  color: #e8fff2;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  pointer-events: none;
}
.buy-badge.exact {
  background: #2a9a62;
  letter-spacing: 0.02em;
}
.buy-badge.reserve-buy {
  min-width: 1.4em;
  text-align: center;
  font-size: 11px;
  padding: 2px 5px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}
.card.exact.buyable {
  box-shadow: inset 0 0 0 1.5px rgba(42, 154, 98, 0.55);
}
.seat-prog {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0,0,0,0.28);
  color: var(--gilt);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.seat-prog-track {
  display: inline-block;
  width: 56px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  overflow: hidden;
  vertical-align: middle;
}
.seat-prog-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #8e2418, #e6c15a);
  transition: width 0.2s ease;
}
.card.sel {
  outline: 3px solid var(--lacquer);
  box-shadow: 0 0 0 1px rgba(194, 58, 43, 0.35), 0 3px 0 rgba(0,0,0,0.28);
  z-index: 1;
}
.seat-chip.dual-fail {
  box-shadow: inset 0 0 0 1.5px rgba(194, 58, 43, 0.55);
}
.seat-chip.dual-fail small { color: #ffd0c8; }
.card.ready { box-shadow: 0 0 0 1.5px #2a9a62, 0 2px 0 rgba(0,0,0,0.25); }
.card small { display: block; color: #6a4a30; }
.noble-card { width: 118px; min-height: 118px; }
.req-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.req-chip {
  display: inline-block; padding: 2px 5px; border-radius: 4px;
  background: #efe6d4; color: #6a4a30; font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.req-chip.ok { background: #c8e6d0; color: #1a5c38; font-weight: 700; }
.rotate {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 10px 16px;
  background: rgba(14, 40, 24, 0.92);
  color: var(--ink);
  font-size: 14px;
  box-shadow: inset 0 -1px 0 rgba(230,193,90,0.35);
  z-index: 40;
}
.rotate strong {
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0.12em;
  color: var(--gilt);
}
.rotate span { color: var(--mute); font-size: 13px; }
@media (orientation: portrait) {
  .rotate { display: flex; }
  /* 入桌后竖屏：遮罩更醒目，可滚动关不掉但可旋转解除 */
  body.at-table .rotate {
    position: sticky;
    top: 0;
    min-height: 72px;
    padding: 14px 16px;
    background: rgba(8, 24, 14, 0.96);
  }
  body.at-table .table {
    opacity: 0.45;
    pointer-events: none;
  }
}
@media (orientation: landscape) {
  body.at-table .table {
    opacity: 1;
    pointer-events: auto;
  }
}
.top .btn-invite {
  min-height: 28px; padding: 0 10px; font-size: 13px;
  background: transparent; color: var(--gilt);
  box-shadow: none; border: 0; cursor: pointer; font: inherit;
}
.invite-sheet {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.invite-backdrop {
  position: absolute; inset: 0; border: 0; padding: 0;
  background: rgba(0, 0, 0, 0.55); cursor: pointer;
}
.invite-card {
  position: relative; z-index: 1;
  width: min(320px, 100%);
  padding: 18px 16px 14px;
  border-radius: 12px;
  background: #fffef8; color: #3d2418;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  text-align: center;
}
.invite-kicker {
  margin: 0; font-size: 12px; color: #6a4a30; letter-spacing: 0.08em;
}
.invite-room {
  margin: 6px 0 4px;
  font-family: var(--display); font-size: 22px; letter-spacing: 0.08em;
}
.invite-phase {
  margin: 0 0 12px;
  font-size: 13px;
  color: #6a4a30;
}
.invite-phase strong {
  color: #8e2418;
  font-weight: 700;
}
.invite-qr {
  display: block; margin: 0 auto 10px;
  width: 200px; height: 200px; border-radius: 8px;
  background: #fff;
}
.invite-link {
  margin: 0 0 12px; font-size: 11px; color: #6a4a30;
  word-break: break-all; line-height: 1.35;
}
.invite-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.invite-actions .btn { flex: 1; min-width: 0; color: #fff8e7; }
.invite-actions .btn-ghost {
  background: #3d2418; color: #fff8e7;
  box-shadow: none;
}
.invite-actions .btn-main { color: #fff8e7; }
