/* 政变疑云 · 移动端样式 */
:root {
  --bg: #0a0b10;
  --bg-2: #11131b;
  --panel: #171a24;
  --panel-2: #1e2230;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(227, 180, 95, 0.35);
  --gold: #e3b45f;
  --gold-2: #f6d99b;
  --red: #e0596b;
  --green: #5cc9a7;
  --text: #f4f0e8;
  --muted: #969cad;
  --radius: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  overscroll-behavior: none;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(227, 180, 95, 0.16), transparent 60%),
    radial-gradient(90% 50% at 100% 100%, rgba(90, 60, 120, 0.18), transparent 65%),
    linear-gradient(180deg, #0e1018 0%, #090a0e 100%);
  background-attachment: fixed;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

#app {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
}

.screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  animation: screen-in 0.28s ease both;
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ———— 通用控件 ———— */
.input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(8, 9, 14, 0.65);
  color: var(--text);
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: #6a7082; }
.input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(227, 180, 95, 0.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 13px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  transition: transform 0.08s, opacity 0.15s, background 0.15s;
  user-select: none;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.38; }

.btn-primary {
  background: linear-gradient(160deg, #f0cd88, #d6a24b);
  color: #22190a;
  box-shadow: 0 8px 22px rgba(214, 162, 75, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--line);
  color: var(--text);
}
.btn-lg { min-height: 52px; font-size: 16px; width: 100%; }

.icon-btn {
  min-width: 44px;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}
.icon-btn:active { background: rgba(255, 255, 255, 0.06); }
.icon-btn:hover { color: var(--text); }

.field-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 8px 2px;
  text-transform: uppercase;
}

.panel {
  background: linear-gradient(180deg, rgba(30, 34, 48, 0.92), rgba(20, 23, 32, 0.94));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hint { color: var(--muted); font-size: 12.5px; text-align: center; margin: 14px 0 0; }

/* ———— 首页 ———— */
.home {
  justify-content: center;
  padding: calc(28px + var(--safe-t)) 20px calc(24px + var(--safe-b));
}
.home-inner { width: 100%; max-width: 420px; margin: 0 auto; }

.brand { text-align: center; margin-bottom: 26px; }
.brand-mark {
  width: 74px;
  height: 74px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  font-size: 42px;
  color: var(--gold-2);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(227, 180, 95, 0.22), rgba(227, 180, 95, 0.04));
  border: 1px solid rgba(227, 180, 95, 0.42);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  text-shadow: 0 2px 10px rgba(227, 180, 95, 0.45);
}
.brand h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  font-weight: 700;
  background: linear-gradient(180deg, #fdf3dd, #e3b45f 65%, #b9862f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-sub {
  margin: 8px 0 0;
  font-size: 11.5px;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  color: #8b8fa0;
  text-transform: uppercase;
}
.home-panel { display: flex; flex-direction: column; gap: 12px; }
.home-panel .field-label { margin-bottom: -4px; }

.or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #6d7284;
  font-size: 12px;
  margin: 4px 0;
}
.or::before, .or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.join-row { display: flex; gap: 10px; }
.join-row .input { flex: 1 1 auto; width: auto; min-width: 0; }
.join-row .btn { flex: 0 0 auto; min-width: 88px; }
.code-input {
  text-transform: uppercase;
  letter-spacing: 0.32em;
  text-align: center;
  font-weight: 700;
  font-size: 18px;
  padding-left: 8px;
}

/* ———— 玩法选择 ———— */
.mode-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 8px;
}
.mode-card {
  width: 100%;
  text-align: center;
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(32, 36, 50, 0.7), rgba(19, 22, 31, 0.7));
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mode-card:active { transform: scale(0.99); }
.mode-card.picked {
  border-color: rgba(227, 180, 95, 0.65);
  background: linear-gradient(180deg, rgba(58, 48, 27, 0.62), rgba(27, 25, 27, 0.8));
  box-shadow: 0 0 0 2px rgba(227, 180, 95, 0.12);
}
.mode-card:disabled { opacity: 0.72; }
.mc-name { font-weight: 700; font-size: 12.5px; line-height: 1.35; }
.mc-foot { font-size: 10px; color: #6f7486; }
.mode-desc {
  margin: 0 2px 18px;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--muted);
  min-height: 35px;
}

.mode-tag {
  margin-left: 7px;
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid rgba(227, 180, 95, 0.28);
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0;
  vertical-align: 1px;
  white-space: nowrap;
}
.home-foot {
  text-align: center;
  color: #6f7486;
  font-size: 12px;
  line-height: 1.7;
  margin: 22px 0 0;
}

/* ———— 顶栏 ———— */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: calc(8px + var(--safe-t)) 12px 8px;
  min-height: 54px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  background: rgba(10, 11, 16, 0.72);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.bar-title { font-size: 15px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.code-text { color: var(--gold); font-weight: 700; letter-spacing: 0.2em; font-size: 17px; }
.bar-actions { display: flex; gap: 2px; }
.room-pill {
  font-size: 13px;
  color: var(--muted);
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}
.room-pill b { color: var(--gold); letter-spacing: 0.16em; margin-left: 4px; }

/* ———— 房间等待 ———— */
.lobby-main {
  flex: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 18px calc(28px + var(--safe-b));
  display: flex;
  flex-direction: column;
}
.share-box {
  text-align: center;
  padding: 20px 16px 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(30, 34, 48, 0.9), rgba(18, 21, 29, 0.9));
  margin-bottom: 22px;
}
.share-label { color: var(--muted); font-size: 12.5px; }
.share-code {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  color: var(--gold-2);
  margin: 10px 0 16px;
  text-shadow: 0 4px 24px rgba(227, 180, 95, 0.32);
  font-variant-numeric: tabular-nums;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 2px 10px;
}
.section-head h2 { font-size: 13px; letter-spacing: 0.14em; color: var(--muted); font-weight: 600; margin: 0; }
.section-head .muted { font-size: 12px; }

.lobby-list { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lobby-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  animation: screen-in 0.25s ease both;
}
.lobby-avatar {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 17px;
  background: linear-gradient(160deg, #2a2f40, #1b1f2b);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.lobby-item.is-me .lobby-avatar { border-color: var(--line-strong); color: var(--gold); }
.lobby-name { flex: 1; font-weight: 600; font-size: 14.5px; }
.kick-btn {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(224, 89, 107, 0.28);
  color: #e08a96;
  background: rgba(224, 89, 107, 0.07);
  font-size: 12px;
  line-height: 1;
}
.kick-btn:active { background: rgba(224, 89, 107, 0.18); }
.mini-tag {
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 500;
}
.mini-tag.host { color: #22190a; background: var(--gold); border-color: transparent; font-weight: 700; }
.mini-tag.bot { color: #9ec7ff; border-color: rgba(120, 170, 255, 0.3); }
.mini-tag.off { color: #ffb1b1; border-color: rgba(255, 120, 120, 0.3); }
.mini-tag.shield { color: #a6e8c8; border-color: rgba(120, 220, 170, 0.35); }

.faction-tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid var(--line);
  font-weight: 600;
  line-height: 1.5;
}
.team-tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #c7ccda;
  white-space: nowrap;
  line-height: 1.5;
}
.team-tag.team-0 { color: #ff9e8a; border-color: rgba(255, 126, 100, 0.35); background: rgba(255, 126, 100, 0.08); }
.team-tag.team-1 { color: #9cc8ff; border-color: rgba(110, 170, 255, 0.35); background: rgba(110, 170, 255, 0.08); }
.team-tag.team-2 { color: #ffd27a; border-color: rgba(255, 200, 90, 0.35); background: rgba(255, 200, 90, 0.08); }
.team-tag.team-3 { color: #b8e6cc; border-color: rgba(120, 220, 170, 0.32); background: rgba(120, 220, 170, 0.07); }
.team-tag.solo { color: #d8b9ff; border-color: rgba(190, 140, 255, 0.38); background: rgba(190, 140, 255, 0.08); }
.dock-note { display: flex; align-items: center; justify-content: center; font-size: 11.5px; color: #d9a48d; padding: 10px 6px; line-height: 1.4; }
.winner-team { margin-left: 5px; vertical-align: 1px; }
.faction-tag.loyal {
  color: #f0cf87;
  border-color: rgba(227, 180, 95, 0.42);
  background: rgba(227, 180, 95, 0.1);
}
.faction-tag.reform {
  color: #9cbfff;
  border-color: rgba(120, 170, 255, 0.42);
  background: rgba(90, 130, 255, 0.1);
}

.table-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 2px 0; }
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #d6c08a;
  background: rgba(227, 180, 95, 0.08);
  border: 1px solid rgba(227, 180, 95, 0.18);
  padding: 3px 9px;
  border-radius: 999px;
}
.meta-chip.faction-tag { border-radius: 999px; }

.lobby-actions { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 16px; }

/* ———— 牌桌 ———— */
.game-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#screen-game {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.table-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px 4px;
  -webkit-overflow-scrolling: touch;
}

.players { display: flex; flex-direction: column; gap: 8px; }

.player-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(28, 32, 45, 0.72), rgba(18, 21, 29, 0.72));
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  position: relative;
}
.player-card.is-turn {
  border-color: rgba(227, 180, 95, 0.55);
  background: linear-gradient(180deg, rgba(48, 40, 24, 0.62), rgba(24, 23, 26, 0.8));
  box-shadow: 0 0 0 1px rgba(227, 180, 95, 0.12), 0 8px 24px rgba(0, 0, 0, 0.35);
}
.player-card.is-turn::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
}
.player-card.is-out { opacity: 0.45; filter: grayscale(0.6); }

.pc-main { flex: 1; min-width: 0; }
.pc-name-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pc-name {
  font-weight: 650;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-badges { display: flex; gap: 4px; flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; }
.pc-sub { display: flex; align-items: center; gap: 8px; margin-top: 3px; font-size: 12px; color: var(--muted); }
.pc-coins {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--gold-2);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pc-coins .coin { font-size: 12px; }
.pc-influence { display: flex; gap: 4px; }

.mini-card {
  width: 34px;
  height: 48px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-size: 9px;
  line-height: 1.1;
  color: var(--muted);
  background: repeating-linear-gradient(45deg, #272133, #272133 3px, #211c2b 3px, #211c2b 6px);
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
}
.mini-card.back::after { content: "♜"; font-size: 13px; color: rgba(227, 180, 95, 0.55); }
.mini-card.revealed {
  background: linear-gradient(160deg, #262b3a, #191d27);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text);
}
.mini-card.revealed .mi { font-size: 15px; }
.mini-card.revealed .mn { font-size: 8px; color: var(--muted); }
.mini-card.team-known {
  background: linear-gradient(160deg, rgba(111, 183, 255, 0.22), rgba(24, 32, 48, 0.96));
  border-color: rgba(111, 183, 255, 0.42);
  color: #d6eaff;
}
.mini-card.team-known .mi { font-size: 15px; }
.mini-card.team-known .mn { font-size: 8px; color: #9ec8ee; }

.timeline {
  margin: 10px 2px 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.22);
  min-height: 58px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: flex-end;
}

.table-center {
  min-height: 96px;
  margin: 12px 0 2px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(227, 180, 95, 0.06), transparent 70%),
    rgba(255, 255, 255, 0.012);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tc-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 20px;
  border-radius: 15px;
  border: 1px solid var(--rc, var(--line));
  background: linear-gradient(155deg, rgba(38, 43, 58, 0.9), rgba(23, 27, 38, 0.92));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: screen-in 0.25s ease both;
}
.tc-icon { font-size: 30px; line-height: 1; }
.tc-text { display: flex; flex-direction: column; }
.tc-name { font-size: 17px; font-weight: 700; color: var(--rc, var(--text)); }
.tc-claim { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.tc-card.treasury {
  border-color: rgba(227, 180, 95, 0.55);
  background: linear-gradient(155deg, rgba(58, 48, 27, 0.9), rgba(28, 25, 22, 0.94));
}
.tc-card.treasury .tc-name { color: var(--gold-2); }
.tc-idle { text-align: center; color: #5f6577; }
.tc-rook { display: block; font-size: 28px; line-height: 1.1; color: rgba(227, 180, 95, 0.22); margin-bottom: 2px; }
.tc-idle small { font-size: 11px; letter-spacing: 0.08em; }
.log-line {
  font-size: 12px;
  color: #a9aebd;
  line-height: 1.45;
  animation: line-in 0.25s ease both;
}
.log-line:nth-last-child(n + 4) { display: none; }
.log-line.kind-action { color: #d9d3c4; }
.log-line.kind-challenge { color: #ff9f8f; }
.log-line.kind-block { color: #8fc6ff; }
.log-line.kind-reveal { color: #e7c483; }
.log-line.kind-win { color: var(--gold-2); font-weight: 700; }
.log-line.kind-turn { color: #7d8396; }
.log-line.kind-muted { color: #767c8e; font-style: italic; }
@keyframes line-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}

/* 底部区域 */
.bottom-area {
  flex: 0 0 auto;
  padding: 0 12px calc(10px + var(--safe-b));
  background: linear-gradient(180deg, rgba(9, 10, 15, 0.2), rgba(9, 10, 15, 0.92) 26%);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
}

.turn-banner {
  padding: 9px 4px 6px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
}
.turn-banner b { color: var(--text); font-weight: 650; }
.turn-banner .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
  flex: 0 0 auto;
}
.turn-banner.my-turn { color: var(--gold-2); font-weight: 650; }
.turn-banner .countdown { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }

.timer-bar {
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
  margin: 0 2px 8px;
}
#timer-fill {
  height: 100%;
  width: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #d6a24b, #f6d99b);
  transition: width 0.2s linear;
}
.timer-bar.warn #timer-fill { background: linear-gradient(90deg, #c94b5c, #ff8d7a); }

/* 我的面板 */
.my-panel {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 8px 0 10px;
}
.my-identity {
  width: 72px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 0 2px;
}
.my-identity .me-name { font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-identity .me-coins { font-size: 13px; color: var(--gold-2); font-weight: 700; }
.my-identity .me-tags { display: flex; flex-wrap: wrap; gap: 3px; }
.my-identity .me-tags .faction-tag,
.my-identity .me-tags .mini-tag { font-size: 8.5px; padding: 0 4px; line-height: 1.4; }
.my-cards { flex: 1; display: flex; gap: 8px; }
.role-card {
  flex: 1;
  min-width: 0;
  padding: 8px 9px 7px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(155deg, #252a38, #181c26);
  position: relative;
  overflow: hidden;
  transition: transform 0.12s, border-color 0.2s, box-shadow 0.2s;
}
.role-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 12% 0%, var(--rc-soft, rgba(255, 255, 255, 0.08)), transparent 62%);
  pointer-events: none;
}
.role-card .rc-top { display: flex; align-items: center; gap: 6px; position: relative; }
.role-card .rc-icon { font-size: 18px; line-height: 1; }
.role-card .rc-name { font-size: 13.5px; font-weight: 700; letter-spacing: 0.02em; }
.role-card .rc-desc { margin-top: 3px; font-size: 10.5px; color: #a7acbb; position: relative; }
.role-card.revealed { opacity: 0.4; filter: grayscale(0.8); }
.role-card.selectable {
  cursor: pointer;
  border-color: rgba(224, 89, 107, 0.8);
  box-shadow: 0 0 0 2px rgba(224, 89, 107, 0.18), 0 0 24px rgba(224, 89, 107, 0.22);
  animation: card-glow 1.6s ease-in-out infinite;
}
@keyframes card-glow {
  0%, 100% { box-shadow: 0 0 0 2px rgba(224, 89, 107, 0.16), 0 0 16px rgba(224, 89, 107, 0.16); }
  50% { box-shadow: 0 0 0 3px rgba(224, 89, 107, 0.3), 0 0 30px rgba(224, 89, 107, 0.3); }
}
.role-card.selectable:active { transform: scale(0.98); }

.role-duke { --rc: #e3b45f; --rc-soft: rgba(227, 180, 95, 0.18); }
.role-assassin { --rc: #e0596b; --rc-soft: rgba(224, 89, 107, 0.18); }
.role-captain { --rc: #5aa9e6; --rc-soft: rgba(90, 169, 230, 0.18); }
.role-ambassador { --rc: #b58ce0; --rc-soft: rgba(181, 140, 224, 0.18); }
.role-contessa { --rc: #e58fb1; --rc-soft: rgba(229, 143, 177, 0.18); }
.role-inquisitor { --rc: #8fd3c7; --rc-soft: rgba(143, 211, 199, 0.18); }
.role-banker { --rc: #e3b45f; --rc-soft: rgba(227, 180, 95, 0.18); }
.role-politician { --rc: #c9a0ff; --rc-soft: rgba(201, 160, 255, 0.18); }
.role-guerrilla { --rc: #e0596b; --rc-soft: rgba(224, 89, 107, 0.2); }
.role-director { --rc: #5aa9e6; --rc-soft: rgba(90, 169, 230, 0.18); }
.role-peacekeeper { --rc: #8fe3b0; --rc-soft: rgba(143, 227, 176, 0.18); }
.role-quartermaster { --rc: #e3b45f; --rc-soft: rgba(227, 180, 95, 0.18); }
.role-card .rc-name { color: var(--rc, var(--text)); }

/* 操作区 */
.dock { min-height: 96px; padding-bottom: 2px; }
.dock-prompt {
  font-size: 13px;
  color: #c4c8d4;
  margin: 2px 2px 8px;
  line-height: 1.5;
}
.dock-prompt b { color: var(--gold-2); }
.dock-prompt .warn { color: #ff9f8f; }

.action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.action-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.act-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-height: 48px;
  padding: 5px 6px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(40, 45, 61, 0.85), rgba(25, 29, 40, 0.85));
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: transform 0.08s, border-color 0.15s, opacity 0.15s;
}
.act-btn:active { transform: scale(0.98); }
.act-btn .cost { font-size: 9.5px; color: var(--muted); font-weight: 500; line-height: 1.2; }
.act-btn:disabled { opacity: 0.35; }
.act-btn[data-action="coup"] { border-color: rgba(224, 89, 107, 0.36); }
.act-btn[data-action="coup"] .cost { color: #ff9f8f; }
.act-btn.challenge { border-color: rgba(224, 89, 107, 0.5); background: linear-gradient(180deg, rgba(74, 34, 41, 0.85), rgba(40, 22, 28, 0.9)); }
.act-btn.block { border-color: rgba(90, 169, 230, 0.42); }
.act-btn.pass { color: var(--muted); }
.act-btn.wide { grid-column: 1 / -1; flex-direction: row; gap: 8px; justify-content: center; }

.target-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.target-btn {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  padding: 10px 12px;
  min-height: 54px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
}
.target-btn .t-name { font-weight: 650; font-size: 14px; }
.target-btn .t-sub { font-size: 11px; color: var(--muted); }
.target-btn:active { border-color: var(--line-strong); }

.waiting {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  color: var(--muted);
  font-size: 13px;
  justify-content: center;
}
.waiting .spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ———— 弹层 ———— */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
  padding: 0;
  animation: fade-in 0.2s ease both;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal-sheet {
  width: 100%;
  max-width: 640px;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #1c202c, #12141c);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
  animation: sheet-up 0.28s cubic-bezier(0.2, 0.9, 0.3, 1) both;
  padding-bottom: var(--safe-b);
}
@keyframes sheet-up {
  from { transform: translateY(40px); opacity: 0.6; }
  to { transform: none; opacity: 1; }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 10px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 { margin: 0; font-size: 17px; letter-spacing: 0.04em; }
.modal-body { padding: 16px 18px 22px; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.rules-body h3 {
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin: 20px 0 6px;
}
.rules-body h3:first-child { margin-top: 0; }
.rules-body p { margin: 0 0 8px; font-size: 13.5px; color: #c3c7d2; line-height: 1.65; }
.rules-body ul { margin: 0 0 8px; padding-left: 18px; color: #c3c7d2; font-size: 13.5px; line-height: 1.7; }
.rules-body b { color: var(--text); }
.rules-roles { display: flex; flex-direction: column; gap: 7px; margin: 8px 0 4px; }
.rules-roles > div {
  display: grid;
  grid-template-columns: 26px 76px 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  font-size: 12.5px;
}
.rules-roles b { font-size: 13px; }
.rules-roles em { font-style: normal; color: var(--muted); }

/* 换牌 */
.exchange-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0 18px; }
.peek-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 14px 0 18px;
  padding: 22px 16px;
  border-radius: 16px;
  border: 1px solid rgba(227, 180, 95, 0.4);
  background: radial-gradient(120% 100% at 50% 0%, rgba(227, 180, 95, 0.2), rgba(20, 22, 30, 0.96));
}
.peek-card .peek-icon { font-size: 44px; line-height: 1; }
.peek-card .peek-name { font-size: 20px; font-weight: 800; color: var(--gold-2); }
.peek-card .peek-role { font-size: 11px; color: var(--muted); }
.inspect-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0 8px; }
.inspect-card {
  min-height: 112px;
  border-radius: 14px;
  border: 1px solid rgba(181, 140, 224, 0.4);
  background:
    linear-gradient(135deg, rgba(181, 140, 224, 0.16), rgba(20, 22, 30, 0.95)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0 6px, transparent 6px 12px);
  color: #d8c7ff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
}
.inspect-card .ic-back { font-size: 25px; }
.inspect-card:active { border-color: var(--gold); }
.choice-card {
  padding: 14px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(130% 90% at 8% 0%, var(--rc-soft, transparent), transparent 62%),
    linear-gradient(160deg, #252a38, #181c26);
  text-align: left;
  position: relative;
  min-height: 104px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.choice-card .cc-icon { font-size: 24px; }
.choice-card .cc-name { font-weight: 700; font-size: 14.5px; margin-top: 4px; color: var(--rc, var(--text)); }
.choice-card .cc-desc { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.choice-card.picked {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(227, 180, 95, 0.2), 0 8px 24px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}
.choice-card.picked::after {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold);
  color: #22190a;
  font-size: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
}

/* 结算 */
.gameover-sheet { align-self: center; border-radius: 24px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); max-width: 440px; margin: 0 16px; }
.gameover-sheet .modal-body { padding: 26px 22px 26px; text-align: center; }
.winner-crown {
  font-size: 46px;
  color: var(--gold-2);
  text-shadow: 0 0 30px rgba(227, 180, 95, 0.55);
  animation: crown-pop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
@keyframes crown-pop {
  from { transform: scale(0.4) rotate(-12deg); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.gameover-sheet h2 { margin: 6px 0 4px; font-size: 22px; color: var(--gold-2); }
.winner-list { display: flex; flex-direction: column; gap: 6px; margin: 16px 0 20px; text-align: left; }
.winner-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 12.5px;
}
.winner-row .wr-name { flex: 1; font-weight: 600; }
.winner-row .wr-cards { display: flex; gap: 4px; }
.winner-role { font-size: 10.5px; color: var(--muted); padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; }
.gameover-sheet .btn { margin-top: 8px; }

/* toast */
.toast {
  position: fixed;
  left: 50%;
  top: calc(18px + var(--safe-t));
  transform: translate(-50%, -16px);
  z-index: 200;
  max-width: 90vw;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(30, 34, 46, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  font-size: 13px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ———— 声音 ———— */
.sound-fab {
  position: absolute;
  top: calc(14px + var(--safe-t));
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 19px;
  color: var(--gold);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(227, 180, 95, 0.24);
  z-index: 30;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.sound-fab:active { background: rgba(227, 180, 95, 0.15); }
.icon-btn.sound-muted,
.sound-fab.sound-muted { color: #626878; border-color: var(--line); }
.sound-fab.sound-muted::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 1.5px;
  background: #8a8f9f;
  transform: rotate(-45deg);
  border-radius: 2px;
}
#screen-home { position: relative; }

.audio-sheet .modal-body { padding-top: 8px; }
.sound-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 8px;
}
.sound-name { font-weight: 650; font-size: 14px; }
.sound-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.sound-range {
  width: 100%;
  height: 30px;
  margin: 0 0 12px;
  accent-color: var(--gold);
  background: transparent;
}
.sound-hint { font-size: 11px; color: #767c8e; margin: 12px 0 0; line-height: 1.6; }

.switch {
  position: relative;
  width: 46px;
  height: 26px;
  flex: 0 0 auto;
  display: block;
}
.switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  z-index: 2;
  cursor: pointer;
}
.switch-track {
  display: block;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
  position: relative;
  transition: background 0.18s, border-color 0.18s;
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #c9ccd6;
  transition: transform 0.18s, background 0.18s;
}
.switch input:checked + .switch-track {
  background: rgba(227, 180, 95, 0.5);
  border-color: rgba(227, 180, 95, 0.6);
}
.switch input:checked + .switch-track::after {
  transform: translateX(20px);
  background: #22190a;
}

/* 记录弹层 */
.log-entry { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); font-size: 12.5px; color: #b8bdc9; }
.log-entry .le-time { color: #666c7d; font-variant-numeric: tabular-nums; flex: 0 0 auto; font-size: 11px; padding-top: 1px; }
.log-entry.kind-challenge { color: #ffb0a1; }
.log-entry.kind-block { color: #9ccdff; }
.log-entry.kind-reveal { color: #e7c483; }
.log-entry.kind-win { color: var(--gold-2); font-weight: 700; }

@media (min-width: 520px) {
  .action-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .modal { align-items: center; }
  .modal-sheet { border-radius: 22px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); max-height: 82dvh; }
  .gameover-sheet { margin: 0; }
}

@media (max-width: 370px) {
  .mode-tag { display: none; }
}

@media (max-height: 700px) {
  .table-center { display: none; }
  .my-panel { padding: 3px 0 6px; }
  .role-card { padding: 6px 8px; }
  .role-card .rc-desc { display: none; }
  .dock { min-height: 76px; }
  .table-scroll { padding-top: 8px; }
  .turn-banner { min-height: 30px; padding: 6px 4px 4px; }
}

@media (max-height: 620px) {
  .act-btn { min-height: 44px; font-size: 13.5px; }
  .action-grid { gap: 6px; }
  .timeline { min-height: 50px; padding: 8px 10px; }
}

/* ———— 行动特写 ———— */
.cinema {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(24px + var(--safe-t)) 18px calc(24px + var(--safe-b));
  pointer-events: none;
}
.cinema.hidden { display: none !important; }
.cinema-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 46%, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.72) 72%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent 22%, transparent 78%, rgba(0, 0, 0, 0.42));
  opacity: 0;
  animation: cinema-backdrop-in 0.35s ease forwards;
}
.cinema-card {
  position: relative;
  width: min(86vw, 350px);
  padding: 21px 20px 18px;
  border-radius: 21px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(130% 100% at 50% -10%, var(--cine-glow, rgba(227, 180, 95, 0.2)), transparent 58%),
    linear-gradient(160deg, rgba(28, 31, 42, 0.98), rgba(11, 12, 17, 0.99));
  border: 1px solid var(--cine, var(--gold));
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.75),
    0 0 70px var(--cine-glow, rgba(227, 180, 95, 0.2)),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: cinema-card-in 0.34s cubic-bezier(0.18, 1.45, 0.35, 1) both;
}
.cinema-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.09) 48%, transparent 64%);
  transform: translateX(-120%);
  animation: cinema-sheen 0.7s 0.12s ease-out both;
  pointer-events: none;
}
.cinema.impact .cinema-card {
  box-shadow:
    0 34px 100px rgba(0, 0, 0, 0.8),
    0 0 90px var(--cine-glow, rgba(255, 80, 90, 0.32)),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.cinema.impact .cinema-card::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 52%;
  width: 180%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--cine-glow, rgba(255, 80, 90, 0.3)), transparent 58%);
  opacity: 0;
  animation: cinema-impact-glow 0.6s 0.16s ease-out both;
  pointer-events: none;
}
.cinema-kicker {
  position: relative;
  font-size: 10px;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: var(--cine, var(--gold));
  font-weight: 700;
}
.cinema-icon {
  position: relative;
  font-size: 46px;
  line-height: 1.08;
  margin: 8px 0 2px;
  filter: drop-shadow(0 0 18px var(--cine-glow, rgba(227, 180, 95, 0.28)));
  animation: cinema-icon-pop 0.42s 0.05s cubic-bezier(0.18, 1.6, 0.35, 1) both;
}
.cinema-title {
  position: relative;
  font-size: 20px;
  line-height: 1.28;
  font-weight: 800;
  letter-spacing: 0.015em;
  color: #f7f1e4;
  word-break: break-word;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.55);
}
.cinema-title .arrow {
  display: inline-block;
  margin: 0 7px;
  color: var(--cine);
  font-weight: 500;
  animation: cinema-arrow 0.7s ease-in-out infinite alternate;
}
.cinema-sub {
  position: relative;
  margin-top: 5px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #a7acbb;
}
.cinema-quote {
  position: relative;
  margin: 11px auto 0;
  max-width: 92%;
  font-size: 11.5px;
  line-height: 1.55;
  color: #d9d2c1;
  font-style: italic;
  opacity: 0.92;
}
.cinema-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-top: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--cine);
  color: var(--cine);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: rgba(0, 0, 0, 0.2);
}
.cinema-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cine), transparent);
  transform-origin: left;
  animation: cinema-progress 1.2s linear forwards;
}
.cinema.leaving .cinema-card {
  animation: cinema-card-out 0.26s ease forwards;
}
.cinema.leaving .cinema-backdrop {
  animation: cinema-backdrop-out 0.26s ease forwards;
}
.cinema.tone-red { --cine: #ff6b6b; --cine-glow: rgba(255, 80, 90, 0.32); }
.cinema.tone-gold { --cine: #e3b45f; --cine-glow: rgba(227, 180, 95, 0.28); }
.cinema.tone-blue { --cine: #6fb7ff; --cine-glow: rgba(90, 160, 255, 0.28); }
.cinema.tone-purple { --cine: #c9a0ff; --cine-glow: rgba(170, 120, 255, 0.28); }
.cinema.tone-green { --cine: #8fe3b0; --cine-glow: rgba(120, 230, 165, 0.26); }
.cinema.tone-dark { --cine: #aab0c0; --cine-glow: rgba(160, 170, 190, 0.18); }
.cinema.result-success .cinema-card {
  border-width: 2px;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.75),
    0 0 80px var(--cine-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.cinema.result-success .cinema-kicker::after { content: " ✓"; }
.cinema.result-success .cinema-card::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%) rotate(-12deg);
  border-radius: 50%;
  border: 2px solid var(--cine);
  box-shadow: 0 0 32px var(--cine-glow), inset 0 0 28px var(--cine-glow);
  opacity: 0.16;
  pointer-events: none;
}
.cinema.result-fail .cinema-card {
  border-width: 2px;
  animation: cinema-card-in 0.34s cubic-bezier(0.18, 1.45, 0.35, 1) both, cinema-result-shake 0.4s 0.2s ease;
}
.cinema.result-fail .cinema-kicker::after { content: " ✕"; }
.cinema.result-fail .cinema-icon {
  filter: grayscale(0.35) drop-shadow(0 0 18px var(--cine-glow));
}
@keyframes cinema-result-shake {
  0%, 100% { transform: translateX(0); }
  18% { transform: translateX(-5px) rotate(-0.4deg); }
  38% { transform: translateX(4px) rotate(0.35deg); }
  58% { transform: translateX(-3px); }
  78% { transform: translateX(2px); }
}
.cinema.result-fail.leaving .cinema-card { animation: cinema-card-out 0.26s ease forwards; }
@keyframes cinema-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes cinema-backdrop-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes cinema-card-in {
  from { opacity: 0; transform: scale(0.74) translateY(18px); filter: blur(7px); }
  to { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}
@keyframes cinema-card-out {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(1.05) translateY(-6px); }
}
@keyframes cinema-icon-pop {
  from { opacity: 0; transform: scale(0.45) rotate(-10deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes cinema-sheen {
  from { transform: translateX(-120%); }
  to { transform: translateX(120%); }
}
@keyframes cinema-arrow {
  from { transform: translateX(-2px); opacity: 0.6; }
  to { transform: translateX(2px); opacity: 1; }
}
@keyframes cinema-impact-glow {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  35% { opacity: 0.9; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); }
}
@keyframes cinema-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .cinema-card, .cinema-card::before, .cinema-icon, .cinema-title .arrow {
    animation: none !important;
  }
  .cinema-backdrop { opacity: 1; }
  .cinema-bar { animation: none !important; transform: scaleX(1); opacity: 0.6; }
}

.cinema, .cinema * { pointer-events: none !important; }

/* ———— 服务器设置 ———— */
.server-fab {
  position: absolute;
  top: calc(14px + var(--safe-t));
  right: 68px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 17px;
  color: #aab0c0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 30;
}
.server-fab:active { color: var(--gold); border-color: rgba(227, 180, 95, 0.4); }
.server-input {
  width: 100%;
  margin: 10px 0 6px;
  padding: 12px 13px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.server-input:focus { border-color: rgba(227, 180, 95, 0.5); }
.server-hint { font-size: 11.5px; line-height: 1.55; min-height: 18px; word-break: break-all; }
.server-hint.ok { color: #8fe3b0; }
.server-hint.bad { color: #ff8f8f; }
.server-actions { display: grid; gap: 9px; margin-top: 12px; }

/* ———— 网络状态 ———— */
.net-banner {
  position: fixed;
  top: calc(8px + var(--safe-t));
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 32px);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  color: #ffd9a0;
  background: rgba(28, 20, 10, 0.94);
  border: 1px solid rgba(227, 180, 95, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.net-banner.hidden { display: none; }
.net-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffb347;
  animation: net-pulse 1.1s ease-in-out infinite;
}
@keyframes net-pulse { 0%,100% { opacity: 0.35; } 50% { opacity: 1; } }
