:root {
  --wood-dark: #150c07;
  --wood: #241309;
  --wood-light: #3a2114;
  --brass: #d9a441;
  --brass-bright: #f0cd7d;
  --brass-dim: #8a6420;
  --cream: #f3e6c8;
  --ink: #221207;
  --red: #b3322b;
  --green: #2f6b4f;
  --muted: #b9a685;
  --panel: rgba(28, 15, 8, .86);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--wood-dark);
  color: var(--cream);
  font-family: Georgia, "Songti SC", "Noto Serif SC", "STSong", serif;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

html { scrollbar-width: thin; scrollbar-color: rgba(217,164,65,.42) #120b05; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #120b05; }
::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(217,164,65,.55), rgba(140,96,32,.38));
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(240,196,105,.75), rgba(178,126,48,.55)); }

/* ---------- 背景 ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: #0d0704;
  overflow: hidden;
}
/* 双背景层：酒馆外景（主菜单）↔ 酒馆内景（对局），开局交叉淡入 */
.bg-photo {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity .6s ease;
}
.bg-photo--menu {
  background-image: url('assets/bg/menu-bg.jpg?v=20261205d');
  opacity: 1;
}
.bg-photo--board {
  background-image: url('assets/bg/board-bg.jpg?v=20261205f');
}
body.in-game .bg-photo--menu { opacity: 0; }
body.in-game .bg-photo--board { opacity: 1; }
.bg::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.28) 0 2px, transparent 2px 74px),
    repeating-linear-gradient(0deg, rgba(255,190,110,.025) 0 1px, transparent 1px 46px),
    linear-gradient(180deg, rgba(8,4,2,.62), rgba(8,4,2,.22) 38%, rgba(6,3,1,.72));
}
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(ellipse at 50% 40%, transparent 35%, rgba(0,0,0,.72) 100%);
  pointer-events: none;
}
.lantern {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(30px);
  opacity: .55;
  animation: flicker 5s ease-in-out infinite;
}
.lantern.l1 { top: -120px; left: -60px; background: radial-gradient(circle, rgba(255,170,60,.55), transparent 65%); }
.lantern.l2 { top: -140px; right: -40px; background: radial-gradient(circle, rgba(255,140,50,.4), transparent 65%); animation-delay: 1.7s; }
.grain {
  position: absolute; inset: 0; opacity: .05; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.6) .5px, transparent .6px);
  background-size: 4px 4px;
}
@keyframes flicker {
  0%, 100% { opacity: .5; }
  45% { opacity: .62; }
  55% { opacity: .42; }
  70% { opacity: .58; }
}

/* ---------- 布局 ---------- */
.app {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 20px 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  grid-template-areas: "top top" "board log";
  gap: 14px;
}

.topbar {
  grid-area: top;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 4px 10px;
  border-bottom: 1px solid rgba(217,164,65,.22);
}
.brand h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: .28em;
  color: var(--brass-bright);
  text-shadow: 0 2px 0 #4a2c10, 0 0 22px rgba(217,164,65,.3);
}
.brand p {
  margin: 3px 0 0;
  font-size: 10px;
  letter-spacing: .22em;
  color: var(--muted);
  text-transform: uppercase;
}
.meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chip {
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 20px;
  border: 1px solid rgba(217,164,65,.4);
  color: var(--brass-bright);
  background: rgba(217,164,65,.08);
  letter-spacing: .06em;
  white-space: nowrap;
}
.icon-btn {
  font-family: inherit;
  font-size: 12px;
  color: var(--cream);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(217,164,65,.28);
  border-radius: 8px;
  padding: 6px 11px;
  cursor: pointer;
  transition: .15s;
}
.icon-btn:hover { border-color: var(--brass); color: var(--brass-bright); }

.board {
  grid-area: board;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.zone {
  position: relative;
  border: 1px solid rgba(217,164,65,.26);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(70,40,22,.55), rgba(24,13,7,.82)),
    var(--panel);
  box-shadow: inset 0 1px 0 rgba(255,220,160,.08), 0 10px 26px rgba(0,0,0,.35);
  padding: 12px 14px;
}
.zone::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(217,164,65,.1);
  border-radius: 10px;
  pointer-events: none;
}

.ai-zone { padding-top: 10px; }
.player-zone { padding-bottom: 10px; }

/* ---------- 人物 ---------- */
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(217,164,65,.5);
  background: radial-gradient(circle at 50% 30%, #4a2a14, #1b0e07);
  flex: 0 0 auto;
  transition: filter .5s, transform .6s;
}
.avatar svg { width: 100%; height: 100%; display: block; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .3s; }
.avatar.down { filter: grayscale(1) brightness(.55); transform: rotate(-14deg) translateY(6px); }
.who-info { min-width: 0; }
.who .name { font-size: 15px; color: var(--brass-bright); letter-spacing: .08em; }
.who .tag {
  font-size: 10px;
  color: var(--muted);
  border: 1px solid rgba(217,164,65,.3);
  border-radius: 10px;
  padding: 1px 6px;
  margin-left: 4px;
  vertical-align: 2px;
}
.status { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; min-height: 18px; }
.fx-chip {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 9px;
  background: rgba(0,0,0,.35);
  border: 1px solid currentColor;
  letter-spacing: .04em;
}

/* ---------- 手牌 ---------- */
.hand {
  display: flex;
  gap: 7px;
  justify-content: center;
  align-items: flex-end;
  padding: 16px 2px 4px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.hand::-webkit-scrollbar { height: 5px; }
.hand::-webkit-scrollbar-thumb { background: rgba(217,164,65,.35); border-radius: 4px; }

.card {
  position: relative;
  width: 70px;
  height: 100px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: linear-gradient(155deg, #fdf7e6 0%, #f0e2bd 60%, #dcc493 100%);
  color: #241409;
  box-shadow: 0 4px 9px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.65);
  transition: transform .16s ease, box-shadow .16s ease, opacity .2s;
  user-select: none;
}
.card.clickable { cursor: pointer; }
.card.clickable:hover { transform: translateY(-6px); }
.card.selected {
  transform: translateY(-14px);
  box-shadow: 0 0 0 2px var(--brass-bright), 0 0 20px rgba(240,205,125,.55), 0 14px 22px rgba(0,0,0,.5);
}
.card.dim { opacity: .4; }
.card .rk { position: absolute; top: 5px; left: 7px; font-size: 17px; font-weight: 700; line-height: 1; }
.card .sm { font-size: 13px; margin-left: 1px; }
.card .big {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; opacity: .92;
}
.card .br { position: absolute; right: 7px; bottom: 5px; transform: rotate(180deg); font-size: 17px; font-weight: 700; }
.card.has-badge .br { display: none; }
.card.red { color: #a52a2a; }
.card .badge {
  position: absolute;
  left: 4px; right: 4px; bottom: 4px;
  font-size: 9px;
  line-height: 1.25;
  text-align: center;
  padding: 1px 0 2px;
  border-radius: 4px;
  background: #241409;
  color: #f5e6bf;
  letter-spacing: .02em;
  overflow: hidden;
  white-space: nowrap;
}
.card .badge.wild { background: #6b4c1c; }
.card.back {
  background:
    repeating-linear-gradient(45deg, #3b2011 0 6px, #2a150b 6px 12px);
  border: 2px solid rgba(217,164,65,.42);
}
.card.back::after {
  content: "★";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(217,164,65,.5);
  font-size: 22px;
}

/* ---------- 桌面 ---------- */
.table-zone {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(50,88,62,.35), transparent 62%),
    linear-gradient(180deg, rgba(60,34,18,.55), rgba(20,11,6,.88));
}

.chamber-strip { display: flex; gap: 7px; }
.chamber {
  position: relative;
  width: 42px;
  height: 30px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.35);
  color: #9c8c72;
}
.chamber em {
  position: absolute; right: 3px; bottom: 1px;
  font-style: normal; font-size: 8px; opacity: .55;
}
.chamber.current { border-color: var(--brass); box-shadow: 0 0 12px rgba(217,164,65,.5); color: var(--brass-bright); }
.chamber.real { background: rgba(150,40,32,.4); border-color: #c65a4a; color: #ffd6c9; }
.chamber.fake { background: rgba(60,70,70,.4); border-color: #6f8a8a; color: #bfe0e0; }
.chamber.spent { opacity: .3; }

.announce {
  font-size: 17px;
  letter-spacing: .06em;
  color: var(--cream);
  text-align: center;
  line-height: 1.6;
  text-shadow: 0 1px 0 #000;
  min-height: 26px;
}
.announce .hi { color: var(--brass-bright); }

.showdown { display: none; width: 100%; gap: 14px; flex-direction: column; }
.showdown.show { display: flex; }
.hand-row { display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hand-row .lbl {
  font-size: 12px; color: var(--muted); letter-spacing: .08em;
  min-width: 92px; text-align: right;
}
.hand-row .mini-hand { display: flex; gap: 4px; }
.card.mini { width: 42px; height: 60px; border-radius: 6px; }
.card.mini .rk { font-size: 11px; top: 3px; left: 4px; }
.card.mini .sm { font-size: 9px; }
.card.mini .big { font-size: 19px; }
.card.mini .br { font-size: 11px; right: 4px; bottom: 3px; }
.card.mini .badge { display: none; }
.hand-name {
  font-size: 12px; color: var(--brass-bright);
  border: 1px solid rgba(217,164,65,.35);
  border-radius: 12px; padding: 3px 9px;
  background: rgba(0,0,0,.3);
}

/* ---------- 左轮 ---------- */
.revolver-wrap {
  display: none;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.revolver-wrap.show { display: flex; }
.revolver-info { font-size: 13px; color: var(--muted); letter-spacing: .06em; }
.revolver-stage { position: relative; width: min(520px, 96%); }
#revolver { width: 100%; display: block; filter: drop-shadow(0 10px 18px rgba(0,0,0,.6)); }
#cylinder { transform-box: fill-box; transform-origin: center; }
#cylinder.spin { animation: cyl 1.18s cubic-bezier(.16,.78,.24,1) forwards; }
@keyframes cyl {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(720deg); }
}
.muzzle {
  position: absolute;
  top: 27%;
  right: -2%;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,246,200,.95) 0%, rgba(255,180,60,.75) 28%, rgba(255,120,20,.25) 52%, transparent 70%);
  opacity: 0;
  transform: scale(.3);
  pointer-events: none;
  mix-blend-mode: screen;
}
.muzzle.fire { animation: flash .5s ease-out; }
@keyframes flash {
  0% { opacity: 0; transform: scale(.3); }
  18% { opacity: 1; transform: scale(1.15); }
  100% { opacity: 0; transform: scale(1.5); }
}
.shot-msg {
  font-size: 20px;
  letter-spacing: .18em;
  color: var(--brass-bright);
  min-height: 28px;
  text-shadow: 0 0 18px rgba(217,164,65,.5), 0 2px 0 #000;
}
.shot-msg.bad { color: #e0785f; }
.shot-msg.good { color: #86c79a; }

.info-lines {
  display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center;
  font-size: 12px; color: #cbb894; min-height: 0;
}
.info-lines .i { padding: 2px 8px; border-left: 2px solid rgba(217,164,65,.4); }

/* ---------- 操作 ---------- */
.actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; min-height: 42px; align-items: center; }
.btn, .actions button, .prompt-bar button, .over-btns button, #startBtn, .ghost, .primary {
  font-family: inherit;
  font-size: 14px;
  letter-spacing: .08em;
  border-radius: 9px;
  padding: 10px 20px;
  cursor: pointer;
  border: 1px solid var(--brass-dim);
  transition: .15s;
}
.primary {
  color: #1c1006;
  background: linear-gradient(180deg, var(--brass-bright), var(--brass));
  box-shadow: 0 3px 0 #6d4a12, 0 8px 18px rgba(0,0,0,.45);
  font-weight: 700;
}
.primary:hover { filter: brightness(1.08); }
.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 #6d4a12; }
.primary.big { width: 100%; padding: 13px; font-size: 16px; }
.primary:disabled { opacity: .4; cursor: not-allowed; filter: grayscale(.4); }
.ghost {
  color: var(--cream);
  background: rgba(255,255,255,.04);
}
.ghost:hover { border-color: var(--brass); color: var(--brass-bright); }
.danger {
  color: #ffd9cd;
  background: linear-gradient(180deg, #7d2c22, #4c1712);
  border-color: #a34232;
  box-shadow: 0 3px 0 #2c0d09;
}
.danger:hover { filter: brightness(1.12); }
.wait { font-size: 13px; color: var(--muted); letter-spacing: .1em; }

.player-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 4px; }
.select-info { font-size: 13px; color: var(--muted); letter-spacing: .06em; }

.item-slots { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; min-height: 30px; align-items: center; }
.ai-slots { opacity: .9; }
.item-chip {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 52px; height: 30px; padding: 2px 7px;
  border-radius: 7px;
  font-size: 10px; line-height: 1.1;
  border: 1px solid currentColor;
  background: rgba(0,0,0,.35);
  color: var(--muted);
  letter-spacing: .03em;
}
.item-chip.usable { cursor: pointer; }
.item-chip.usable:hover { filter: brightness(1.3); transform: translateY(-1px); }
.item-chip .dot { font-size: 8px; opacity: .75; }
.item-empty { font-size: 11px; color: rgba(185,166,133,.5); letter-spacing: .08em; }

.prompt-bar {
  display: none;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(217,164,65,.1);
  border: 1px dashed rgba(217,164,65,.45);
  font-size: 13px;
  color: var(--brass-bright);
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.prompt-bar.show { display: flex; }
.prompt-bar .txt { flex: 1; min-width: 180px; line-height: 1.5; }
.prompt-bar button { padding: 6px 14px; font-size: 12px; }

/* ---------- 日志 ---------- */
.log-panel {
  grid-area: log;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(217,164,65,.24);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(48,27,14,.8), rgba(16,9,5,.9));
  padding: 12px;
  min-height: 0;
}
.log-panel h2 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--brass);
  letter-spacing: .2em;
  font-weight: 400;
  border-bottom: 1px solid rgba(217,164,65,.2);
  padding-bottom: 8px;
}
.log { flex: 1; overflow-y: auto; font-size: 12px; line-height: 1.7; color: #c8b795; }
.log .ln { padding: 3px 0; border-bottom: 1px dotted rgba(255,255,255,.06); }
.log .ln.hl { color: var(--brass-bright); }
.log .ln.bad { color: #e0785f; }
.log .ln.good { color: #8fc79f; }
.log::-webkit-scrollbar { width: 4px; }
.log::-webkit-scrollbar-thumb { background: rgba(217,164,65,.3); border-radius: 3px; }

/* ---------- 弹层 ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 4, 2, .78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.overlay.hidden { display: none; }
/* 主菜单：酒馆外景作为最底层背景（模糊+压暗），开局后随 startOverlay 一起移除 */
#startOverlay {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#startOverlay::before {
  content: "";
  position: absolute;
  inset: -30px;
  z-index: -1;
  background: url('assets/bg/menu-bg.jpg?v=20261205d') center/cover no-repeat;
  filter: blur(4px) saturate(.95) brightness(.95);
  pointer-events: none;
}
#startOverlay::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(8,4,2,.5), rgba(8,4,2,.14) 40%, rgba(6,3,1,.72)),
    radial-gradient(ellipse at 50% 45%, transparent 32%, rgba(0,0,0,.55) 100%);
  pointer-events: none;
}
.panel {
  position: relative;
  width: min(520px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: 26px 26px 22px;
  border-radius: 16px;
  border: 1px solid rgba(217,164,65,.45);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(217,164,65,.12), transparent 55%),
    linear-gradient(180deg, #2c180d, #160c06);
  box-shadow: 0 30px 80px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,220,160,.14);
  text-align: center;
  animation: panelIn .28s ease-out;
  scrollbar-width: thin;
  scrollbar-color: rgba(217,164,65,.42) transparent;
}
.panel::-webkit-scrollbar { width: 6px; }
.panel::-webkit-scrollbar-track { background: rgba(0,0,0,.22); border-radius: 999px; margin: 14px 0; }
.panel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(217,164,65,.62), rgba(150,104,36,.42));
  box-shadow: inset 0 0 0 1px rgba(255,220,160,.16);
}
.panel::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(240,196,105,.8), rgba(178,126,48,.6)); }
.panel::-webkit-scrollbar-corner { background: transparent; }
@keyframes panelIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.panel h2 {
  margin: 0 0 10px;
  font-size: 26px;
  letter-spacing: .2em;
  color: var(--brass-bright);
  text-shadow: 0 2px 0 #4a2c10;
}
.panel .sub { margin: 0 0 14px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.result-overlay { z-index: 82; }
.result-panel { width: min(440px, 92vw); }
.result-panel .star { font-size: 24px; color: var(--brass); letter-spacing: .4em; margin-bottom: 4px; }
.result-line { margin: 0 0 10px; font-size: 13px; letter-spacing: .14em; color: var(--brass-bright); }
.result-panel .sub { font-size: 15px; line-height: 1.85; color: #ecdcb8; margin: 0 0 22px; }
.start-panel .star { font-size: 26px; color: var(--brass); letter-spacing: .4em; margin-bottom: 6px; }
.brief { text-align: left; font-size: 13px; line-height: 1.9; color: #d8c7a5; margin: 0 0 18px; padding-left: 20px; }
.brief li { margin: 2px 0; }
.diff-select { display: flex; gap: 8px; justify-content: center; margin: 6px 0 8px; }
.diff-select button {
  font-family: inherit; font-size: 13px; letter-spacing: .1em;
  padding: 8px 20px; border-radius: 8px; cursor: pointer;
  color: var(--cream); background: rgba(255,255,255,.04);
  border: 1px solid rgba(217,164,65,.3);
}
.diff-select button.active {
  color: #1c1006; background: linear-gradient(180deg, var(--brass-bright), var(--brass));
  border-color: var(--brass); font-weight: 700;
}
.diff-desc { font-size: 11px; color: var(--muted); min-height: 18px; margin: 0 0 10px; }
.opp-preview { text-align: center; margin: 2px 0 16px; }
.opp-portrait {
  width: 104px; height: 104px; margin: 0 auto 8px;
  border-radius: 50%; overflow: hidden;
  border: 2px solid rgba(217,164,65,.6);
  background: radial-gradient(circle at 50% 30%, #4a2a14, #1b0e07);
  box-shadow: 0 0 26px rgba(217,164,65,.32), inset 0 0 0 1px rgba(0,0,0,.4);
}
.opp-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .35s; }
.opp-cap { font-size: 12px; letter-spacing: .16em; color: var(--muted); }
.opp-cap span { color: var(--brass-bright); }
.hint { font-size: 10px; color: rgba(185,166,133,.6); letter-spacing: .12em; margin: 12px 0 0; }

.rules-panel { text-align: left; }
.rules-body { font-size: 13px; line-height: 1.8; color: #d6c5a4; }
.rules-body h3 { font-size: 13px; color: var(--brass); letter-spacing: .14em; margin: 16px 0 6px; font-weight: 400; }
.rules-body p { margin: 0 0 8px; }
.rules-body .fx-list { font-size: 12px; color: #c6b492; line-height: 1.9; }
.rules-panel .ghost { width: 100%; margin-top: 18px; }

.item-panel { text-align: center; }
.item-choices { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.item-choice {
  width: 130px;
  padding: 14px 10px;
  border-radius: 12px;
  border: 1px solid rgba(217,164,65,.5);
  background: linear-gradient(180deg, rgba(217,164,65,.14), rgba(0,0,0,.3));
  cursor: pointer;
  transition: .15s;
}
.item-choice:hover { transform: translateY(-4px); border-color: var(--brass-bright); box-shadow: 0 10px 24px rgba(0,0,0,.5); }
.item-choice .iname { font-size: 14px; color: var(--brass-bright); letter-spacing: .06em; margin-bottom: 6px; }
.item-choice .idesc { font-size: 10px; color: var(--muted); line-height: 1.6; }
.item-choice .isuit { font-size: 26px; display: block; margin-bottom: 2px; }

.over-panel .stamp {
  display: inline-block;
  font-size: 22px;
  letter-spacing: .3em;
  color: #d05a4a;
  border: 3px double #d05a4a;
  padding: 4px 16px;
  transform: rotate(-7deg);
  margin-bottom: 14px;
  opacity: .9;
}
.over-stats { font-size: 12px; color: var(--muted); line-height: 1.9; margin: 10px 0 18px; }
.over-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(20px);
  z-index: 80;
  padding: 10px 20px;
  border-radius: 20px;
  background: rgba(24,13,7,.95);
  border: 1px solid rgba(217,164,65,.5);
  color: var(--brass-bright);
  font-size: 13px;
  letter-spacing: .06em;
  opacity: 0;
  pointer-events: none;
  transition: .25s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 响应式 ---------- */
@media (max-width: 1040px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-areas: "top" "board" "log";
  }
  .log-panel { max-height: 180px; }
}
@media (max-width: 640px) {
  .app { padding: 10px 10px 26px; }
  .brand h1 { font-size: 22px; letter-spacing: .2em; }
  .brand p { font-size: 8px; letter-spacing: .12em; }
  .topbar { align-items: flex-start; flex-wrap: wrap; row-gap: 6px; }
  .meta { gap: 5px; width: 100%; justify-content: flex-start; }
  .icon-btn { padding: 5px 8px; font-size: 11px; }
  .chip { font-size: 11px; padding: 4px 8px; }
  .zone { padding: 10px; }
  .card { width: 44px; height: 64px; border-radius: 7px; }
  .card .rk { font-size: 11px; top: 3px; left: 4px; }
  .card .sm { font-size: 8px; }
  .card .big { font-size: 21px; }
  .card .br { font-size: 11px; right: 4px; bottom: 3px; }
  .card .badge { font-size: 7px; left: 2px; right: 2px; bottom: 2px; padding: 0 0 1px; }
  .card.mini { width: 34px; height: 48px; }
  .card.mini .big { font-size: 15px; }
  .hand { gap: 3px; padding-top: 14px; }
  .avatar { width: 42px; height: 42px; }
  .opp-portrait { width: 80px; height: 80px; }
  .who .name { font-size: 13px; }
  .announce { font-size: 14px; }
  .shot-msg { font-size: 17px; }
  .chamber { width: 34px; height: 26px; font-size: 11px; }
  .item-slots { margin-left: 0; width: 100%; }
  .player-bar { gap: 8px; }
  .select-info { font-size: 12px; }
  .hand-row .lbl { min-width: 60px; font-size: 11px; }
  .panel { padding: 20px 16px; }
  .panel h2 { font-size: 21px; }
  .item-choice { width: 100px; }
  .actions button, .primary, .ghost { padding: 9px 16px; font-size: 13px; }
}

/* ==================== 升级：排序 / 提示 / 特效 / 手册 / 演出 ==================== */

/* 浮尘 */
.dust {
  position: absolute;
  width: 3px; height: 3px; border-radius: 50%;
  background: rgba(255, 214, 150, .55);
  box-shadow: 0 0 7px rgba(255, 190, 90, .6);
  animation: dustFloat linear infinite;
  pointer-events: none;
}
.d1 { left: 10%; top: 82%; animation-duration: 19s; animation-delay: -3s; }
.d2 { left: 28%; top: 92%; animation-duration: 24s; animation-delay: -11s; }
.d3 { left: 46%; top: 78%; animation-duration: 21s; animation-delay: -6s; }
.d4 { left: 63%; top: 95%; animation-duration: 26s; animation-delay: -15s; }
.d5 { left: 78%; top: 84%; animation-duration: 18s; animation-delay: -8s; }
.d6 { left: 91%; top: 90%; animation-duration: 23s; animation-delay: -1s; }
@keyframes dustFloat {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  12% { opacity: .65; }
  85% { opacity: .18; }
  100% { transform: translateY(-72vh) translateX(36px); opacity: 0; }
}

/* 手牌工具栏 */
.hand-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; padding: 0 2px 4px;
}
.sel-readout { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hand-now {
  font-size: 13px; color: var(--brass-bright);
  border: 1px solid rgba(217,164,65,.35);
  background: rgba(217,164,65,.08);
  border-radius: 12px; padding: 3px 10px;
  opacity: 0; transform: translateY(3px); transition: .2s;
  letter-spacing: .04em;
}
.hand-now.show { opacity: 1; transform: none; }
.hand-now.best {
  color: #1c1006;
  background: linear-gradient(180deg, var(--brass-bright), var(--brass));
  border-color: var(--brass); font-weight: 700;
}
.sort-toggle { display: flex; align-items: center; gap: 6px; }
.sort-label { font-size: 11px; color: rgba(185,166,133,.65); letter-spacing: .1em; }
.sort-toggle button {
  font-family: inherit; font-size: 11px; color: var(--muted);
  background: rgba(0,0,0,.25); border: 1px solid rgba(217,164,65,.25);
  border-radius: 7px; padding: 4px 10px; cursor: pointer; transition: .15s;
}
.sort-toggle button:hover { border-color: var(--brass); color: var(--brass-bright); }
.sort-toggle button.active {
  color: #1c1006; background: linear-gradient(180deg, var(--brass-bright), var(--brass));
  border-color: var(--brass); font-weight: 700;
}

/* 特效提示条 */
.fx-banner {
  display: none; width: 100%; gap: 8px 14px;
  align-items: center; justify-content: center; flex-wrap: wrap;
  padding: 7px 10px; border-radius: 10px;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(217,164,65,.18);
  font-size: 12px;
}
.fx-banner.show { display: flex; }
.fxb-side { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fxb-who { font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.fxb-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 12px;
  border: 1px solid currentColor; background: rgba(0,0,0,.32);
  font-size: 11px; letter-spacing: .05em;
  box-shadow: 0 0 10px rgba(0,0,0,.2);
}
.fxb-chip::before { content: "◆"; font-size: 8px; opacity: .85; }
.fxb-none { font-size: 11px; color: rgba(185,166,133,.45); }
.fxb-vs { color: rgba(185,166,133,.4); font-size: 10px; letter-spacing: .12em; }
.fxb-warn { width: 100%; text-align: center; font-size: 11px; color: #e0b477; letter-spacing: .04em; }

/* 特效牌更醒目 */
.card { --fx: #d9a441; }
.card.has-effect::after {
  content: ""; position: absolute; inset: -3px; border-radius: 11px;
  border: 1px solid var(--fx);
  box-shadow: 0 0 16px var(--fx);
  opacity: .5; pointer-events: none;
  animation: fxPulse 2.1s ease-in-out infinite;
}
@keyframes fxPulse {
  0%, 100% { opacity: .32; transform: scale(1); }
  50% { opacity: .78; transform: scale(1.012); }
}
.card .badge {
  background: var(--fx);
  color: #181005;
  font-weight: 700;
  text-shadow: none;
  box-shadow: 0 0 10px var(--fx);
}
.card .badge.wild {
  background: linear-gradient(180deg, #f0cd7d, #b9892f);
  color: #1c1006;
}
.card.mini.has-effect::after { display: none; }

/* 发牌与翻牌动画 */
.card.deal { animation: dealIn .46s cubic-bezier(.2,.8,.3,1) both; }
@keyframes dealIn {
  from { opacity: 0; transform: translateY(-48px) rotate(-8deg) scale(.9); }
  to { opacity: 1; transform: none; }
}
.card.mini.flip { animation: flipIn .42s ease both; }
@keyframes flipIn {
  from { opacity: 0; transform: rotateY(88deg) translateY(8px); }
  to { opacity: 1; transform: none; }
}
.hand-row.winner .card.mini {
  box-shadow: 0 0 0 1px var(--brass-bright), 0 0 20px rgba(217,164,65,.55), 0 4px 9px rgba(0,0,0,.45);
}
.hand-row.winner .hand-name {
  color: #1c1006 !important;
  background: linear-gradient(180deg, var(--brass-bright), var(--brass));
  border-color: var(--brass); font-weight: 700;
  animation: nameGlow 1.4s ease-in-out infinite;
}
@keyframes nameGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(217,164,65,0); }
  50% { box-shadow: 0 0 18px rgba(217,164,65,.55); }
}

/* 开始界面规则按钮 */
.start-rules-btn { width: 100%; margin-top: 10px; }

/* 规则手册 */
.manual-panel {
  width: min(880px, 100%);
  max-height: 90vh;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: left;
}
.manual-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 12px;
  border-bottom: 1px solid rgba(217,164,65,.18);
  flex: 0 0 auto;
}
.manual-head h2 { margin: 0; font-size: 22px; letter-spacing: .16em; }
.manual-close {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(217,164,65,.4);
  background: rgba(255,255,255,.04);
  color: var(--cream); font-size: 20px; line-height: 1;
  cursor: pointer;
}
.manual-close:hover { border-color: var(--brass); color: var(--brass-bright); }
.manual-tabs {
  display: flex; gap: 6px; padding: 10px 20px;
  border-bottom: 1px solid rgba(217,164,65,.14);
  overflow-x: auto; flex: 0 0 auto;
}
.manual-tabs button {
  font-family: inherit; font-size: 12px;
  color: var(--muted); background: rgba(255,255,255,.03);
  border: 1px solid rgba(217,164,65,.22);
  border-radius: 8px; padding: 6px 14px;
  cursor: pointer; white-space: nowrap;
}
.manual-tabs button.active {
  color: #1c1006; background: linear-gradient(180deg, var(--brass-bright), var(--brass));
  border-color: var(--brass); font-weight: 700;
}
.manual-body {
  padding: 16px 24px 28px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.85;
  color: #d6c5a4;
  scrollbar-width: thin;
  scrollbar-color: rgba(217,164,65,.42) transparent;
}
.manual-body::-webkit-scrollbar { width: 6px; }
.manual-body::-webkit-scrollbar-track { background: rgba(0,0,0,.22); border-radius: 999px; }
.manual-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(217,164,65,.62), rgba(150,104,36,.42));
  box-shadow: inset 0 0 0 1px rgba(255,220,160,.16);
}
.manual-body::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(240,196,105,.8), rgba(178,126,48,.6)); }
.manual-body h3 {
  font-size: 13px; color: var(--brass);
  letter-spacing: .14em; margin: 18px 0 6px; font-weight: 400;
}
.manual-body h3:first-child { margin-top: 0; }
.manual-body p { margin: 0 0 8px; }
.manual-body ul { margin: 0 0 10px; padding-left: 20px; }
.manual-body li { margin: 3px 0; }
.manual-note { color: var(--muted); font-size: 12px; }
.hand-example {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0; border-bottom: 1px dashed rgba(255,255,255,.07);
  flex-wrap: wrap;
}
.hand-example .he-name {
  width: 92px; flex: 0 0 auto;
  font-size: 13px; color: var(--brass-bright); letter-spacing: .04em;
}
.hand-example .he-cards { display: flex; gap: 4px; }
.hand-example .he-note { font-size: 11px; color: var(--muted); flex: 1; min-width: 170px; }

/* 开枪演出 */
.cinema {
  position: fixed; inset: 0; z-index: 70;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse 62% 48% at 50% 38%, rgba(255,176,80,.16) 0%, transparent 62%),
    radial-gradient(ellipse at 50% 42%, #3a2010 0%, #160c06 55%, #050302 100%);
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
  overflow: hidden;
}
.cinema::before {
  content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: radial-gradient(ellipse at 50% 44%, transparent 32%, rgba(0,0,0,.52) 74%, rgba(0,0,0,.88) 100%);
}
.cinema.tense::after {
  content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  box-shadow: inset 0 0 170px rgba(150,18,6,.55);
  animation: dangerPulse 1.05s ease-in-out infinite;
}
@keyframes dangerPulse {
  0%, 100% { box-shadow: inset 0 0 120px rgba(150,18,6,.28); }
  50% { box-shadow: inset 0 0 210px rgba(180,26,8,.62); }
}
.cinema.hidden { display: none; }
.cinema.show { opacity: 1; pointer-events: auto; }
.cine-letterbox { position: absolute; left: 0; right: 0; height: 10vh; background: #000; z-index: 5; }
.cine-letterbox.top { top: 0; }
.cine-letterbox.bottom { bottom: 0; }
.cine-head {
  position: absolute; top: 11.5vh; left: 0; right: 0; text-align: center;
  font-size: 13px; letter-spacing: .52em; color: rgba(240,205,125,.85); z-index: 6;
  text-shadow: 0 0 18px rgba(217,164,65,.4);
}
.cine-head::before, .cine-head::after {
  content: ""; display: inline-block; vertical-align: middle;
  width: clamp(28px, 7vw, 90px); height: 1px; margin: 0 14px;
  background: linear-gradient(90deg, transparent, rgba(217,164,65,.55));
}
.cine-head::after { transform: scaleX(-1); }
.cine-motes { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.cine-motes i {
  position: absolute; bottom: 14%; width: 3px; height: 3px; border-radius: 50%;
  background: rgba(255,214,150,.6); box-shadow: 0 0 8px rgba(255,190,90,.7);
  opacity: 0; animation: cineMote 8s linear infinite;
}
.cine-motes i:nth-child(1) { left: 9%;  animation-delay: -1s;  animation-duration: 9s; }
.cine-motes i:nth-child(2) { left: 22%; animation-delay: -4s;  animation-duration: 7.5s; }
.cine-motes i:nth-child(3) { left: 34%; animation-delay: -6.5s; animation-duration: 10s; }
.cine-motes i:nth-child(4) { left: 46%; animation-delay: -2.5s; animation-duration: 8.6s; }
.cine-motes i:nth-child(5) { left: 58%; animation-delay: -5s;  animation-duration: 7.8s; }
.cine-motes i:nth-child(6) { left: 68%; animation-delay: -7.5s; animation-duration: 9.4s; }
.cine-motes i:nth-child(7) { left: 79%; animation-delay: -3.2s; animation-duration: 8.2s; }
.cine-motes i:nth-child(8) { left: 90%; animation-delay: -6s;  animation-duration: 10.4s; }
@keyframes cineMote {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  15% { opacity: .7; }
  80% { opacity: .2; }
  100% { transform: translateY(-62vh) translateX(26px); opacity: 0; }
}
.cine-scene {
  position: relative; display: flex; align-items: center; justify-content: center;
  gap: clamp(14px, 3.4vw, 58px);
  width: min(1120px, 95%); height: min(540px, 60vh);
  transition: transform 2.8s cubic-bezier(.2,.7,.3,1);
  transform: scale(.94);
}
.cinema.tense .cine-scene { transform: scale(1.1); }
.cine-actor {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: filter .7s, transform .8s, opacity .4s;
  z-index: 2; flex: 0 0 auto;
}
.cine-silhouette {
  width: clamp(140px, 18vw, 240px);
  height: clamp(168px, 21.6vw, 288px);
  filter: drop-shadow(0 18px 22px rgba(0,0,0,.7));
  animation: breathe 3.2s ease-in-out infinite;
}
.cine-silhouette svg { width: 100%; height: 100%; display: block; }
/* 开枪演员位：玩家剪影 vs 黑杰克剪影切换 */
.cine-silhouette .fig-bj { display: none; }
.cine-actor.is-bj .fig-player { display: none; }
.cine-actor.is-bj .fig-bj { display: block; }
/* 黑杰克眼睛：默认隐藏；.tense（镜头拉近的 2.8s 缩放）触发——先随镜头渐出，之后眼睛本体保持亮起，
   像「跳过按钮」那样持续发出一圈光晕、光晕在脉动闪烁（眼睛本身不闪，只有光晕的半径/强度在变） */
.cine-silhouette .bj-eyes {
  opacity: 0;
  --bj-glow-dim: rgba(255,205,95,.36);    /* easy：金色光晕（暗） */
  --bj-glow-bright: rgba(255,214,120,.85); /* easy：金色光晕（亮） */
}
.cine-silhouette .bj-eyes circle { fill: #ffd27a; }                 /* easy：金色眼睛（默认） */
/* normal / hard：红色眼睛 + 红色光晕 */
.cinema.diff-normal .bj-eyes,
.cinema.diff-hard .bj-eyes {
  --bj-glow-dim: rgba(255,58,48,.38);
  --bj-glow-bright: rgba(255,72,55,.88);
}
.cinema.diff-normal .bj-eyes circle,
.cinema.diff-hard .bj-eyes circle { fill: #ff3b30; }
.cinema.tense .cine-actor.is-bj .bj-eyes {
  animation:
    bj-eyes-in 1.4s ease-out forwards,
    bj-eyes-glow 1.7s ease-in-out 1.4s infinite;
}
@keyframes bj-eyes-in {
  from { opacity: 0; filter: drop-shadow(0 0 0 transparent); }
  to   { opacity: 1; filter: drop-shadow(0 0 30px var(--bj-glow-bright)); }
}
@keyframes bj-eyes-glow {
  /* 眼睛本体始终 opacity:1 不闪；仅光晕在亮↔暗之间脉动，模拟跳过按钮的发光闪烁 */
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 30px var(--bj-glow-bright)); }
  50%      { opacity: 1; filter: drop-shadow(0 0 12px var(--bj-glow-dim)); }
}
/* hard：笑嘴——进场即显示为一条很细的黑色水平薄缝；红眼出现（.tense）时慢慢咧成一条两头细、中间粗的黑色笑嘴线，
   动画只播一遍后停住。用填充月牙形实现可变线宽（两条二次曲线在两端汇合→厚度 0，中间分离最远→最粗）。
   两段路径命令结构一致：M + 2×Q + Z，可平滑插值。最粗处 ≈2.5（只比最初红色嘴 stroke 2.4 粗一点），弧度下探 5px（底中点 y75，比上一版更弯），全部在脸内（脸底 y79）。 */
.cine-silhouette .bj-mouth { opacity: 0; }
.cinema.diff-hard .cine-actor.is-bj .bj-mouth { opacity: 1; }
.cinema.diff-hard.tense .cine-actor.is-bj .bj-mouth-path {
  animation: bj-mouth-open 1.3s ease-out forwards;
}
@keyframes bj-mouth-open {
  from { d: path("M41 70 Q50 70 59 70 Q50 70.3 41 70 Z"); }   /* 很细的水平薄缝（直线）：中间厚 ~0.15 */
  to   { d: path("M41 70 Q50 75 59 70 Q50 80 41 70 Z"); }    /* 两头细中间粗的笑嘴：顶中点 y72.5 / 底中点 y75 → 最厚 ~2.5，弧度下探 5px，脸内（脸底 y79） */
}
@keyframes breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}
.cine-label { font-size: 13px; letter-spacing: .16em; color: var(--brass-bright); }
.cine-gun {
  position: relative; width: clamp(300px, 39vw, 560px); z-index: 3; flex: 0 0 auto;
  filter: drop-shadow(0 26px 34px rgba(0,0,0,.75));
  animation: aimWobble 2.6s ease-in-out infinite;
  transform-origin: 60% 55%;
}
.cine-gun svg { width: 100%; display: block; overflow: visible; }
@keyframes aimWobble {
  0%, 100% { transform: translateY(0) rotate(-.5deg); }
  50% { transform: translateY(2px) rotate(.5deg); }
}
.cine-scene.aim-self .cine-actor.target { display: none; }
.cine-scene.aim-self .cine-actor.shooter { order: 1; transform: translateX(4.5vw); }
.cine-scene.aim-self .cine-gun {
  order: 2; transform: scaleX(-1);
  animation: aimWobbleSelf 2.6s ease-in-out infinite;
}
.cine-scene.aim-self #cineArm { display: none; }
@keyframes aimWobbleSelf {
  0%, 100% { transform: scaleX(-1) translateX(14vw) translateY(2.2vw) rotate(.5deg); }
  50% { transform: scaleX(-1) translateX(14vw) translateY(calc(2.2vw + 2px)) rotate(-.5deg); }
}
.cine-actor.hit {
  filter: grayscale(1) brightness(.5);
  transform: rotate(-10deg) translateY(26px) translateX(-10px);
  opacity: .75;
}
.cine-actor.hit .cine-label { color: #d05a4a; }
.cine-flash {
  position: absolute; left: 96.6%; top: 24.7%;
  width: clamp(180px, 22vw, 300px); height: clamp(180px, 22vw, 300px); border-radius: 50%;
  background: radial-gradient(circle, rgba(255,246,200,.98) 0%, rgba(255,190,70,.85) 24%, rgba(255,90,20,.38) 50%, transparent 70%);
  opacity: 0; mix-blend-mode: screen; pointer-events: none;
  transform: translate(-50%,-50%);
}
.cine-flash.fire { animation: cineFlashFire .55s ease-out; }
@keyframes cineFlashFire {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(.25); }
  18% { opacity: 1; transform: translate(-50%,-50%) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.6); }
}
.cine-casing {
  position: absolute; left: 44%; top: 34%;
  width: 10px; height: 20px; border-radius: 2px;
  background: linear-gradient(180deg, #ffe9a8, #8a6420);
  opacity: 0;
}
.cine-casing.eject { animation: eject .85s ease-out; }
@keyframes eject {
  0% { opacity: 1; transform: translate(0,0) rotate(0); }
  100% { opacity: 0; transform: translate(-70px,-96px) rotate(240deg); }
}
/* ---------- 分层枪械素材 ---------- */
.art-img { display: none; }
body.gun-art-ready .art-img { display: inline; }
body.gun-art-ready .art-fallback { display: none; }
#cineSpinCyl, #spinFallbackCyl { transform-box: fill-box; transform-origin: center; }

/* 阶段一：从枪尾看去，弹巢旋转 */
.cine-spin {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 42%, #1c1309 0%, #0a0603 58%, #040201 100%);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .4s ease;
}
.cine-spin.show { opacity: 1; visibility: visible; }
.cine-spin.out { opacity: 0; }
.cine-spin svg { width: min(70vh, 56vw); display: block; filter: drop-shadow(0 26px 46px rgba(0,0,0,.85)); }

.cine-hud {
  position: absolute; bottom: calc(10vh + 14px); left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center; gap: 7px; z-index: 6;
}
.cine-cyl { width: clamp(118px, 14vw, 186px); filter: drop-shadow(0 0 22px rgba(217,164,65,.45)); }
.cine-cyl svg { width: 100%; display: block; }
.cine-caption {
  font-size: clamp(16px, 2.1vw, 22px); letter-spacing: .18em;
  color: var(--brass-bright); text-shadow: 0 0 20px rgba(217,164,65,.55);
  min-height: 28px; text-align: center;
}
.cine-sub { font-size: 12px; letter-spacing: .12em; color: var(--muted); min-height: 18px; text-align: center; }
.cine-meter { width: clamp(180px, 26vw, 300px); height: 3px; border-radius: 2px; background: rgba(255,255,255,.1); overflow: hidden; }
.cine-meter i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--brass-dim), var(--brass-bright));
  transition: width 2.2s cubic-bezier(.1,.8,.2,1);
}
.cine-shield {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(.6);
  padding: 12px 26px; border: 2px solid #6f9fd8; border-radius: 16px;
  color: #bfe0ff; font-size: 18px; letter-spacing: .16em;
  opacity: 0; pointer-events: none; z-index: 8;
  box-shadow: 0 0 40px rgba(111,159,216,.5);
  background: rgba(20,40,70,.3);
}
.cine-shield.show { animation: shieldPop 1.3s ease-out; }
@keyframes shieldPop {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(.5); }
  25% { opacity: 1; transform: translate(-50%,-50%) scale(1.08); }
  70% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.2); }
}
.cine-dust {
  position: absolute; bottom: 18%; left: 50%;
  width: 60px; height: 60px; border-radius: 50%;
  background: radial-gradient(circle, rgba(200,170,120,.5), transparent 70%);
  opacity: 0; transform: translateX(-50%); pointer-events: none; z-index: 4;
}
.cine-dust.puff { animation: puff 1s ease-out; }
@keyframes puff {
  0% { opacity: .8; transform: translateX(-50%) scale(.5); }
  100% { opacity: 0; transform: translateX(-50%) scale(2.4); }
}
.cinema.shake { animation: cineShake .45s; }
@keyframes cineShake {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-8px,4px); }
  40% { transform: translate(7px,-5px); }
  60% { transform: translate(-5px,3px); }
  80% { transform: translate(4px,-2px); }
}

@media (max-width: 640px) {
  .hand-toolbar { gap: 6px; }
  .sort-toggle button { padding: 3px 8px; font-size: 10px; }
  .manual-panel { max-height: 92vh; }
  .manual-head { padding: 16px 16px 10px; }
  .manual-body { padding: 12px 14px 22px; }
  .hand-example .he-name { width: auto; min-width: 70px; }
  .cine-scene { height: 50vh; gap: 8px; }
  .cine-gun { width: 68vw; }
  .cine-spin svg { width: min(62vh, 92vw); }
  .cine-silhouette { width: 25vw; height: 30vw; }
  .cine-hud { bottom: calc(10vh + 8px); gap: 5px; }
  .cine-caption { font-size: 14px; }
  .cine-label { font-size: 11px; }
  .cine-head { font-size: 11px; letter-spacing: .34em; }
  .cine-head::before, .cine-head::after { width: 20px; margin: 0 8px; }
  .cine-letterbox { height: 7vh; }
  .cine-head { top: 9vh; }
}

.cine-actor.revive {
  filter: drop-shadow(0 0 32px rgba(240,205,125,.85));
  transform: none;
  opacity: 1;
}
.cine-actor.revive .cine-label { color: #f0cd7d; }

/* 开枪目标选择：特效与警告 */
.shoot-fx {
  flex-basis: 100%; display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap; font-size: 11px;
}
.shoot-fx .sfx-who { color: var(--muted); letter-spacing: .08em; }
.shoot-warn {
  flex-basis: 100%; text-align: center; font-size: 11.5px;
  color: #ffcf8a; line-height: 1.75; letter-spacing: .03em;
  animation: warnBlink 1.8s ease-in-out infinite;
}
@keyframes warnBlink {
  0%, 100% { opacity: .72; }
  50% { opacity: 1; }
}

/* 演出舞台光 */
.cine-scene::before {
  content: ""; position: absolute; left: 50%; top: -8%;
  width: 76%; height: 116%; transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 44%, rgba(255,178,74,.14), rgba(255,150,60,.05) 46%, transparent 70%);
  filter: blur(18px); z-index: 0; pointer-events: none;
}

/* ---------- 特效名称悬停说明 ---------- */
.fx-chip[data-tip], .fxb-chip[data-tip], .sd-fx[data-tip] { position: relative; cursor: help; }
.fx-chip[data-tip]:hover::after, .fxb-chip[data-tip]:hover::after, .sd-fx[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  background: #1a0f08; color: #f0e0b8; border: 1px solid rgba(217,164,65,.55);
  padding: 6px 10px; border-radius: 7px; font-size: 11px; line-height: 1.5;
  white-space: nowrap; z-index: 60; box-shadow: 0 8px 24px rgba(0,0,0,.6);
  pointer-events: none;
}
.sd-fx {
  display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px;
  font-size: 10px; letter-spacing: .05em; border: 1px solid currentColor;
  background: rgba(0,0,0,.25); vertical-align: middle;
}

/* ---------- 比牌阶段特效渐显提示 ---------- */
.effect-feed {
  position: fixed; left: 50%; top: 30%; transform: translateX(-50%);
  width: min(920px, 94%); z-index: 36;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  pointer-events: none;
}
.ef-line {
  opacity: 0; text-align: center; font-size: clamp(16px, 2.2vw, 24px);
  font-weight: 700; letter-spacing: .06em; line-height: 1.55;
  text-shadow: 0 2px 14px rgba(0,0,0,.85), 0 0 24px currentColor;
  animation: efIn 2.9s ease forwards;
}
.ef-line.foe { opacity: .92; font-weight: 600; }
@keyframes efIn {
  0% { opacity: 0; transform: translateY(14px) scale(.96); }
  14% { opacity: 1; transform: translateY(0) scale(1); }
  76% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-10px) scale(1); }
}

/* ---------- 黑杰克选择结果 ---------- */
.choice-flash {
  position: fixed; inset: 0; z-index: 73; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .35s;
  background: radial-gradient(ellipse at center, rgba(8,4,2,.7), rgba(3,1,1,.93));
}
.choice-flash.show { opacity: 1; }
.choice-text {
  text-align: center; font-size: clamp(34px, 6.6vw, 76px); font-weight: 800;
  letter-spacing: .14em; line-height: 1.3; transform: scale(.9);
  transition: transform .42s cubic-bezier(.2,.8,.3,1);
  text-shadow: 0 0 34px currentColor, 0 8px 28px rgba(0,0,0,.85);
}
.choice-flash.show .choice-text { transform: scale(1); }

/* ---------- 设定面板 ---------- */
.settings-panel { width: min(540px, 94vw); }
.set-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 2px;
  border-bottom: 1px solid rgba(217,164,65,.12);
}
.set-name { width: 84px; flex: 0 0 auto; font-size: 13px; letter-spacing: .08em; color: var(--brass-bright); }
.set-row input[type="range"] { flex: 1 1 120px; accent-color: #c9a04a; height: 4px; }
.set-val { width: 42px; text-align: right; font-size: 12px; color: var(--muted); }
.set-tip { flex: 1 1 160px; font-size: 11px; line-height: 1.6; color: var(--muted); }
.set-note { margin: 14px 2px 0; font-size: 11px; color: var(--muted); }
.toggle {
  min-width: 58px; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(217,164,65,.4); background: rgba(255,255,255,.04);
  color: var(--brass-bright); font-size: 12px; letter-spacing: .08em;
}
.toggle.off { color: #9a8a72; border-color: rgba(255,255,255,.16); }

/* ---------- 互动新手教程 ---------- */
.tut-guide {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  z-index: 65; width: min(900px, calc(100vw - 28px)); box-sizing: border-box;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 14px 16px 14px 20px; border: 1px solid rgba(232,199,119,.72);
  border-radius: 14px; background: linear-gradient(135deg, rgba(40,24,12,.97), rgba(18,10,6,.98));
  box-shadow: 0 12px 44px rgba(0,0,0,.65), 0 0 24px rgba(217,164,65,.13);
  backdrop-filter: blur(10px);
}
.tut-guide.hidden { display: none; }
.tg-text { flex: 1; color: var(--text); font-size: 13px; line-height: 1.75; }
.tg-text b { color: var(--brass-bright); font-size: 14px; letter-spacing: .04em; }
.tg-btns { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 0 0 auto; }
.tg-btn { white-space: nowrap; padding: 8px 13px; font-size: 12px; }
.tutorial-active .app { padding-bottom: 92px; }
.tut-focus {
  position: relative; z-index: 4;
  animation: tutPulse 1.25s ease-in-out infinite;
}
.card.tut-focus { box-shadow: 0 0 0 3px #f2cf79, 0 0 24px rgba(242,207,121,.85); }
.item-choice.tut-focus { box-shadow: 0 0 0 2px #f2cf79, 0 0 24px rgba(242,207,121,.65); }
button.tut-focus { box-shadow: 0 0 0 2px #f2cf79, 0 0 20px rgba(242,207,121,.72); }
@keyframes tutPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.32); }
}
.actions button:disabled { opacity: .36; cursor: not-allowed; filter: grayscale(.45); }

/* ---------- 演出跳过 ---------- */
.cine-skip {
  position: absolute; right: clamp(16px, 3vw, 44px); bottom: calc(10vh + 26px);
  z-index: 9; padding: 11px 24px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid rgba(242,207,121,.72);
  background: linear-gradient(180deg, rgba(58,36,18,.94), rgba(28,16,8,.94));
  color: #ffe2a8; font-size: 15px; letter-spacing: .2em; font-weight: 600;
  box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.5), 0 0 22px rgba(242,207,121,.38);
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s, background .2s;
  animation: cineSkipPulse 1.8s ease-in-out infinite;
}
.cine-skip.show { opacity: 1; pointer-events: auto; }
.cine-skip:hover {
  background: linear-gradient(180deg, rgba(80,52,28,.97), rgba(42,26,14,.97));
  transform: translateY(-1px);
}
@keyframes cineSkipPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.5), 0 0 14px rgba(242,207,121,.28); }
  50% { box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.5), 0 0 32px rgba(242,207,121,.6); }
}
.cine-exit {
  position: absolute; top: calc(10vh + 14px); right: clamp(14px, 3vw, 40px); z-index: 8;
  padding: 7px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(217,164,65,.32); background: rgba(20,12,6,.55);
  color: #c7b591; font-size: 11px; letter-spacing: .1em;
}
.cine-exit:hover { color: var(--brass-bright); border-color: var(--brass); }

/* ---------- 弹巢实弹数量 ---------- */
.chamber-count {
  margin-left: 10px; font-size: 11px; letter-spacing: .1em; color: #d8b06a;
  align-self: center; white-space: nowrap;
}

@media (max-width: 760px) {
  .choice-text { font-size: clamp(26px, 9vw, 44px); }
  .effect-feed { top: 27%; }
  .ef-line { font-size: 15px; }
  .set-row { flex-wrap: wrap; row-gap: 6px; }
  .set-name { width: 76px; }
  .set-tip { flex-basis: 100%; padding-left: 76px; }
  .tut-guide { bottom: 8px; flex-direction: column; align-items: stretch; gap: 9px; padding: 11px 13px; }
  .tg-text { font-size: 12px; line-height: 1.6; }
  .tg-text b { font-size: 13px; }
  .tg-btns { justify-content: center; flex-wrap: wrap; }
  .tutorial-active .app { padding-bottom: 148px; }
  .cine-skip { right: 12px; bottom: calc(10vh + 54px); padding: 9px 18px; font-size: 13px; }
}
