/* ============================================================
   style.css —— 哈基米三国杀的皮肤
   ============================================================
   想换配色？改最下面 :root 里那几个变量就行，全局都会跟着变。
   ============================================================ */

:root {
  --cream: #fdf6ec;
  --cream-2: #fff9f0;
  --ink: #3b2f2a;
  --ink-soft: #7a6a60;
  --orange: #ff8c42;
  --orange-deep: #e2701f;
  --red: #e5484d;
  --green: #4cb782;
  --blue: #4a90d9;
  --purple: #8b5cf6;
  --line: #e8dccb;
  --shadow: 0 2px 8px rgba(80, 60, 40, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background:
    radial-gradient(circle at 15% 10%, #ffe9d2 0%, transparent 45%),
    radial-gradient(circle at 85% 90%, #ffe1e6 0%, transparent 45%),
    var(--cream);
  color: var(--ink);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   开局选猫界面
   ============================================================ */
.start-screen {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  text-align: center;
}

.start-screen h1 {
  font-size: 44px;
  letter-spacing: 4px;
  margin-bottom: 6px;
}

.subtitle {
  color: var(--ink-soft);
  letter-spacing: 2px;
  margin-bottom: 34px;
}

.start-screen h2 {
  font-size: 17px;
  color: var(--ink-soft);
  margin: 26px 0 14px;
  font-weight: 600;
}

.hero-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.hero-card {
  font-family: inherit;
  text-align: left;
  background: var(--cream-2);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  cursor: pointer;
  transition: all .18s ease;
  color: var(--ink);
}

.hero-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.hero-card.picked {
  border-color: var(--hero-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--hero-color) 18%, transparent);
}

.hero-emoji { font-size: 34px; }

/* 武将卡：左边头像（图片槽），右边名字 */
.hero-top { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }

.hero-portrait {
  width: 80px;
  height: 106px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, .05);
  border-color: rgba(0, 0, 0, .18);
}

.hero-portrait .art-hint { font-size: 30px; color: var(--ink-soft); }

.hero-info { flex: 1 1 auto; min-width: 0; }

.hero-name { font-size: 21px; font-weight: 700; }
.hero-title { font-size: 13px; color: var(--ink-soft); margin-bottom: 8px; }
.hero-hp { font-size: 12px; color: var(--orange-deep); font-weight: 700; }

.hero-skills { list-style: none; font-size: 12.5px; line-height: 1.65; color: var(--ink-soft); }
.hero-skills b { color: var(--purple); }

/* ============================================================
   右上角的声音设置
   ============================================================ */
.audio-widget {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.mute-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: rgba(255, 255, 255, .92);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .15s ease, opacity .15s ease;
  flex-shrink: 0;
}

.mute-btn:hover { transform: scale(1.08); }
.mute-btn.muted { opacity: .55; }

/* ---------- 展开后的音量面板 ---------- */
.audio-panel {
  width: 236px;
  background: var(--cream-2);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 8px 24px rgba(80, 60, 40, .18);
  animation: pop .14s ease;
}

.audio-mute {
  font-family: inherit;
  width: 100%;
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  margin-bottom: 12px;
}

.audio-mute.muted { background: #f3f0ec; color: var(--ink-soft); }
.audio-mute:hover { border-color: #cbbcac; }

.audio-row {
  display: grid;
  grid-template-columns: 56px 1fr 36px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 9px;
}

.audio-row b {
  font-size: 11.5px;
  color: var(--ink);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.audio-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: #e6ddd2;
  outline: none;
  cursor: pointer;
}

.audio-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  cursor: pointer;
}

.audio-row input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid #fff;
  cursor: pointer;
}

.audio-note {
  font-size: 11px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
  opacity: .85;
}

/* ============================================================
   选关界面
   ============================================================ */
.rule-note {
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-soft);
  background: #fff6e9;
  border: 1.5px dashed #f0cfa8;
  border-radius: 14px;
  padding: 14px 24px;
  display: inline-block;
}

.rule-note b { color: var(--orange-deep); }

/* 右下角的版本号（值来自 constants.js 的 GAME_VERSION） */
.version-note {
  margin: 26px 0 0;
  font-size: 12px;
  letter-spacing: 2px;
  color: #c4b8ab;
  font-family: Consolas, monospace;
}

.level-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.level-card {
  font-family: inherit;
  text-align: left;
  background: var(--cream-2);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  cursor: pointer;
  color: var(--ink);
  transition: all .18s ease;
}

.level-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--hero-color);
}

.level-card.done { background: #f2fbf6; border-color: #a7e0c0; }

.level-top { display: flex; align-items: center; justify-content: space-between; }

.level-no {
  font-size: 12px;
  font-weight: 800;
  color: var(--hero-color);
  letter-spacing: 1px;
}

.level-badge { font-size: 11px; color: #1f7a4d; font-weight: 700; }

/* ★ v1.5.2（隐藏关卡）："完美通关"的金色徽章（第 7 关打穿第三阶段的耄耋） */
.level-card.perfect { background: #fffbef; border-color: #e8c46a; }
.level-badge.perfect {
  color: #8a5a00;
  background: linear-gradient(90deg, #ffe6a3, #ffcf5c);
  border-radius: 999px;
  padding: 1px 9px;
  box-shadow: 0 0 0 1px rgba(184, 134, 11, .35) inset;
}

/* ★ v1.5.2（隐藏关卡）：打下吕布之后，第 7 关那张卡片上浮出**细微的提示** ——
   故意做得很淡（opacity .55 + 斜体 + 小字），一眼扫过去像句旁白，
   不剧透、也不改变卡片的正常观感。 */
.level-whisper {
  margin-top: 7px;
  font-size: 12px;
  font-style: italic;
  font-weight: 500;
  color: #8a6a3c;
  opacity: .55;
  letter-spacing: .04em;
}

.level-hero { display: flex; align-items: center; gap: 10px; margin: 10px 0 6px; min-height: 46px; }

.level-avatar {
  width: 34px;
  height: 46px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, .05);
  border-color: rgba(0, 0, 0, .16);
}

.level-avatar .art-hint { font-size: 17px; color: var(--ink-soft); }

.level-name { font-size: 20px; font-weight: 800; }

.level-desc {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  min-height: 46px;
}

.level-cta {
  margin-top: 12px;
  font-size: 11.5px;
  color: #fff;
  background: var(--hero-color);
  border-radius: 999px;
  padding: 5px 13px;
  display: inline-block;
  font-weight: 700;
}

/* ---------- 选猫页顶部的对手横幅 ---------- */
.vs-banner {
  background: #fff6e9;
  border: 2px solid var(--hero-color);
  border-left-width: 9px;
  border-radius: 14px;
  padding: 14px 24px;
  text-align: left;
  margin-bottom: 26px;
}

.vs-label { font-size: 11.5px; color: var(--ink-soft); letter-spacing: 1px; }
.vs-hero { font-size: 24px; font-weight: 800; margin: 4px 0; }
.vs-desc { font-size: 13px; color: var(--ink-soft); }

.back-btn { margin-top: 28px; }

.diff-list { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.diff-btn {
  font-family: inherit;
  background: var(--cream-2);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 10px 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--ink);
  transition: all .18s ease;
}

.diff-btn span { font-size: 11.5px; color: var(--ink-soft); }
.diff-btn.picked { border-color: var(--orange); background: #fff2e2; }

/* ============================================================
   ★ v1.5.2（玩家要求）：主界面上的「AI 出牌速度」（快 / 正常 / 慢）
   ============================================================
   和对局里那颗"点一下换下一档"的按钮不同，这里是**三颗并排、
   点哪个是哪个** —— 还没开打的时候你有空挑。
   （选关界面上用的是 compact 版：字号小一圈，不抢"难度"的戏。） */
.speed-picker {
  margin: 22px auto 0;
  max-width: 520px;
  background: var(--cream-2);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 12px 16px 14px;
  text-align: center;
}

.speed-picker-title { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 9px; }
.speed-picker-hint { font-weight: 500; font-size: 11.5px; color: var(--ink-soft); margin-left: 4px; }

.speed-pick-list { display: flex; gap: 10px; justify-content: center; }

.speed-pick {
  flex: 1;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 7px 6px;
  cursor: pointer;
  color: var(--ink);
  transition: all .18s ease;
}

.speed-pick:hover { border-color: var(--hero-color, var(--orange)); }
.speed-pick-icon { font-size: 18px; line-height: 1.1; }
.speed-pick-label { font-size: 12px; font-weight: 700; }

.speed-pick.picked {
  border-color: var(--orange);
  background: #fff2e2;
  box-shadow: 0 0 0 2px rgba(255, 140, 66, .18);
}

/* 紧凑版（选关界面）：整块收窄、字号小一圈 */
.speed-picker.compact { margin-top: 16px; max-width: 420px; padding: 9px 12px 11px; }
.speed-picker.compact .speed-picker-title { font-size: 12px; margin-bottom: 7px; }
.speed-picker.compact .speed-pick-icon { font-size: 15px; }
.speed-picker.compact .speed-pick-label { font-size: 11px; }

/* ============================================================
   联机对战（模式 2）专用
   ============================================================ */
.pvp-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--cream-2);
  position: sticky;
  top: 0;
  z-index: 20;
}
.pvp-brand { font-weight: 700; }
.pvp-room { margin-left: auto; font-size: 13px; color: var(--ink-soft); }
.pvp-room b { font-family: Consolas, monospace; font-size: 16px; color: var(--orange-deep); letter-spacing: 2px; }
.pvp-top .mute-btn { margin-left: 8px; }

.pvp-home { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 24px 0; }
.pvp-or { color: var(--ink-soft); font-size: 13px; }
.pvp-join { display: flex; gap: 10px; }
.pvp-input {
  font-family: Consolas, monospace;
  font-size: 20px;
  letter-spacing: 4px;
  text-align: center;
  text-transform: uppercase;
  width: 220px;
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}
.pvp-input:focus { outline: none; border-color: var(--orange); }

.pvp-help {
  margin: 26px auto 0;
  max-width: 620px;
  text-align: left;
  font-size: 13px;
  line-height: 2;
  color: var(--ink-soft);
  background: #fff6e9;
  border: 1.5px dashed #f0cfa8;
  border-radius: 14px;
  padding: 14px 22px;
}
.pvp-help b { color: var(--orange-deep); }

.pvp-error {
  color: #a83232;
  background: #fff0f0;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13.5px;
  margin: 12px auto;
  max-width: 620px;
}

/* ---- 大厅 ---- */
.pvp-links {
  margin: 20px auto 0;
  max-width: 720px;
  text-align: left;
  background: #f3fbf6;
  border: 2px solid #bfe6d1;
  border-radius: 16px;
  padding: 16px 20px;
}
.pvp-links-title { font-weight: 700; margin-bottom: 10px; color: #1f7a53; }
.pvp-link { display: flex; align-items: center; gap: 10px; margin: 8px 0; flex-wrap: wrap; }
.pvp-link-tag {
  font-size: 11px; font-weight: 700; border-radius: 999px;
  padding: 2px 10px; background: #d8f3e4; color: #1f7a53; white-space: nowrap;
}
.pvp-link-tag.vpn { background: #e6e0ff; color: #5b3fa8; }
.pvp-link code {
  font-size: 13.5px;
  background: #fff;
  border: 1px solid #d6eadf;
  border-radius: 8px;
  padding: 5px 10px;
  user-select: all;
  word-break: break-all;
}
.pvp-links-note { font-size: 11.5px; line-height: 1.9; color: #4d6b5b; margin-top: 10px; }

.pvp-slots { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 22px 0; }
.pvp-slot {
  min-width: 220px;
  background: var(--cream-2);
  border: 2px dashed var(--line);
  border-radius: 14px;
  padding: 12px 18px;
}
.pvp-slot.on { border-style: solid; border-color: #7bc4a0; background: #f3fbf6; }
.pvp-slot-name { font-weight: 700; }
/*  ★ v1.4.6：座位上那一行"谁是谁"（玩家自己取的名字） */
.pvp-slot-who {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 2px;
}
.pvp-slot-state { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; }
/*  名字输入框旁边那句"现在叫xxx / 还没取名字" */
.pvp-name-state { font-size: 12.5px; color: var(--ink-soft); text-align: center; }

.pvp-picked { font-size: 15px; margin: 10px 0 20px; }
.pvp-picked.waiting { color: var(--ink-soft); }

.hero-list.compact { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.hero-card.small { padding: 8px; }
.hero-card.small .hero-title { display: none; }

/* ---------- 模式选择（进游戏的第一屏） ---------- */
.mode-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 30px auto 0;
  max-width: 980px;
  text-align: left;
}

.mode-card {
  font-family: inherit;
  text-align: left;
  background: var(--cream-2);
  border: 2px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  cursor: pointer;
  color: var(--ink);
  transition: all .18s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mode-card:hover {
  border-color: var(--orange);
  background: #fff8ef;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(226, 112, 31, .14);
}

.mode-card.disabled {
  opacity: .55;
  cursor: not-allowed;
  border-style: dashed;
}
.mode-card.disabled:hover { transform: none; box-shadow: none; border-color: var(--line); background: var(--cream-2); }

.mode-top { display: flex; align-items: center; justify-content: space-between; }
.mode-icon { font-size: 30px; line-height: 1; }

.mode-tag {
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 9px;
  background: #f1ecff;
  color: #6d28d9;
}

.mode-title { font-size: 19px; font-weight: 800; letter-spacing: .5px; }
.mode-sub {
  font-size: 12px;
  font-family: Consolas, monospace;
  color: var(--orange-deep);
  letter-spacing: 1px;
}
.mode-desc { font-size: 12.5px; line-height: 1.7; color: var(--ink-soft); }

.mode-note {
  font-size: 11.5px;
  color: #a83232;
  background: #fff0f0;
  border-radius: 8px;
  padding: 6px 10px;
  margin-top: 4px;
}
.mode-note code { font-size: 11px; }

/* ---------- 猜拳（决定谁先手） ---------- */
.rps-box {
  margin: 26px auto 0;
  max-width: 560px;
  background: var(--cream-2);
  border: 2px solid var(--line);
  border-radius: 18px;
  padding: 22px 26px;
}
.rps-title { font-weight: 800; font-size: 17px; margin-bottom: 6px; }
.rps-note { font-size: 13px; line-height: 1.9; color: var(--ink-soft); margin: 0 0 16px; }

.rps-btns { display: flex; gap: 14px; justify-content: center; margin: 8px 0 14px; }
.rps-btn {
  font-family: inherit;
  font-size: 34px;
  line-height: 1;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 14px 18px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  transition: all .16s ease;
}
.rps-btn span { font-size: 13px; font-weight: 700; }
.rps-btn:hover:not(:disabled) {
  border-color: var(--orange);
  background: #fff8ef;
  transform: translateY(-4px);
}
.rps-btn:disabled { opacity: .45; cursor: default; }

.rps-state { font-size: 13px; color: var(--ink-soft); }

.rps-faces {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-size: 20px;
  font-weight: 700;
  margin: 10px 0 16px;
}
.rps-faces .rps-who { font-size: 13px; color: var(--ink-soft); display: block; }
.rps-vs { color: var(--ink-soft); font-size: 14px; }

.rps-result { font-size: 15px; font-weight: 700; line-height: 1.8; }
.rps-result.win { color: var(--green); }
.rps-result.lose { color: var(--red); }

/* 联机大厅里的猜拳块：和上面共用样式，只是外边距小一点 */
.pvp-lobby .rps-box { margin-top: 8px; }

/* ---------- 「朋友邀请你联机？」输入框 ---------- */
.join-box {
  margin: 26px auto 0;
  max-width: 720px;
  text-align: left;
  background: #f3fbf6;
  border: 2px solid #bfe6d1;
  border-radius: 16px;
  padding: 16px 22px;
}
.join-title { font-weight: 800; font-size: 16px; color: #1f7a53; margin-bottom: 8px; }
.join-note { font-size: 13px; line-height: 1.9; color: #34594a; margin: 0 0 12px; }
.join-note b { color: #1f7a53; }
.join-row { display: flex; gap: 10px; flex-wrap: wrap; }
.pvp-input.wide {
  flex: 1 1 320px;
  width: auto;
  font-size: 14px;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  padding: 10px 14px;
}
.join-hint { font-size: 12.5px; margin: 10px 0 0; min-height: 18px; color: var(--ink-soft); }
.join-tip {
  font-size: 12.5px;
  line-height: 1.8;
  margin: 8px 0 0;
  color: #8a6a2a;
  background: #fdf6e6;
  border-left: 3px solid #e8c874;
  border-radius: 6px;
  padding: 8px 12px;
}

/* 联机时"等待对方"的那条提示：安静一点，别画成一排按不了的按钮 */
.prompt.waiting {
  background: #f6f2ec;
  border-style: dashed;
}
.prompt.waiting .prompt-text { color: var(--ink-soft); font-weight: 600; }

/* ---------- 卡牌一览（选关页的折叠块） ---------- */
.card-guide {
  margin: 30px auto 0;
  max-width: 760px;
  text-align: left;
  background: var(--cream-2);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 0 18px;
}

.card-guide summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  padding: 14px 0;
  list-style: none;
}

.card-guide summary::-webkit-details-marker { display: none; }
.card-guide summary::before { content: "▸ "; color: var(--orange-deep); }
.card-guide[open] summary::before { content: "▾ "; }

.guide-group { margin-bottom: 16px; }
.guide-group h3 {
  font-size: 13px;
  margin: 0 0 8px;
  color: var(--orange-deep);
  letter-spacing: 1px;
}
.guide-group ul { list-style: none; margin: 0; padding: 0; }

.guide-group li {
  font-size: 12.5px;
  color: var(--ink-soft);
  padding: 5px 0;
  border-top: 1px dashed var(--line);
  line-height: 1.5;
}

.guide-group li b { color: var(--ink); margin-right: 6px; }

.guide-slot {
  font-size: 10.5px;
  background: #ffe6a8;
  color: #6b4300;
  border-radius: 999px;
  padding: 1px 8px;
  margin-right: 6px;
  font-weight: 600;
  white-space: nowrap;
}

/* 和卡面 / 装备区保持同一套配色 */
.guide-slot.weapon {
  background: #ffe6a8;
  color: #6b4300;
}

.guide-slot.armor {
  background: #d5eefb;
  color: #0d4b66;
}

.big-btn {
  font-family: inherit;
  margin-top: 34px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #fff;
  background: linear-gradient(180deg, var(--orange) 0%, var(--orange-deep) 100%);
  border: none;
  border-radius: 999px;
  padding: 15px 56px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(226, 112, 31, .35);
  transition: transform .15s ease;
}

.big-btn:hover { transform: translateY(-2px); }
.big-btn:active { transform: translateY(1px); }

/* ============================================================
   对局界面
   ============================================================ */
.board {
  height: 100dvh;
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---------- 座位 ---------- */
.seat {
  background: var(--cream-2);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 10px 14px;
  transition: border-color .25s ease, box-shadow .25s ease;
}

.seat.active {
  border-color: var(--hero-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--hero-color) 14%, transparent);
}

.seat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
}

.seat-hero { font-weight: 700; font-size: 16px; }

/* 谁在打（你 / 园区基米斗） */
.seat-owner {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--hero-color, var(--orange));
  border-radius: 999px;
  padding: 1px 10px;
}

.seat-title { color: var(--ink-soft); font-size: 12px; }

.turn-badge {
  font-size: 11px;
  background: var(--orange);
  color: #fff;
  border-radius: 999px;
  padding: 2px 9px;
  font-weight: 600;
}

.turn-badge.buff { background: var(--purple); }

/* v1.4.6：铁索连环（「吴基之谈」横置）—— 用铁灰色配一条虚线边框，
   和"扫尾中 / 回合中"这类红色系标签区分开。也不闪（它常驻好几个回合）。 */
.turn-badge.chained {
  background: #55606e;
  border: 1px dashed #cfd8e3;
  padding: 1px 8px;
}

.seat-hand-count {
  font-size: 12px;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* 座位头里的"弹簧"：把右边那组（扫尾中 / 回合中 / 手牌数）顶到最右边。
   有了它，"回合中"就永远紧挨在**手牌数的左边**（玩家要求的位置）。 */
.seat-pad { margin-left: auto; }

/* ---------- 「回合中」：要显眼 ----------
   玩家说「把『回合中』放在手牌剩余数的左边，并且有闪光提醒」。 */
@keyframes turn-badge-flash {
  0%, 100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--orange) 70%, transparent);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--orange) 0%, transparent);
    transform: scale(1.08);
  }
}

.turn-badge {
  animation: turn-badge-flash 1.2s ease-out infinite;
}

/* "扫尾中 / 已倒下 / 连环"是状态标签，不需要一直闪（闪多了反而看不清"回合中"） */
.turn-badge.buff,
.turn-badge.chained,
.turn-badge.dead { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .turn-badge { animation: none; }
}

/* ---------- 计数器（小海的「拉」）----------
   位置：**手牌数的正下方**（玩家反馈要求）。
   flex-basis:100% 强制换行，所以它永远在手牌数下面一行，
   不会被别的徽章挤到别处；row 自己右对齐，和"手牌 N"同一条边。 */
.seat-counter-row {
  flex-basis: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: -2px;
}

.seat-counter {
  font-size: 11.5px;
  font-weight: 700;
  color: #7a4b12;
  background: #fff3d6;
  border: 1px solid #f0d79a;
  border-radius: 999px;
  padding: 1px 10px;
  white-space: nowrap;
}

/* ---------- 轮到谁：武将卡图高亮 ----------
   需求原文：「轮到操作回合的玩家或AI武将卡图边框高亮」。
   光靠座位变个边框颜色不够醒目（座位很大，一眼扫不到），
   所以直接给**武将卡图**加一圈会呼吸的高亮，颜色就是这只猫的主题色。 */
@keyframes turn-pulse {
  0%, 100% { box-shadow: 0 0 0 2.5px var(--hero-color), 0 0 10px color-mix(in srgb, var(--hero-color) 55%, transparent); }
  50%      { box-shadow: 0 0 0 3.5px var(--hero-color), 0 0 20px color-mix(in srgb, var(--hero-color) 80%, transparent); }
}

.seat.active .seat-avatar {
  border-style: solid;
  border-color: var(--hero-color);
  animation: turn-pulse 1.5s ease-in-out infinite;
}

/* 倒下的座位不该再亮（回合已经跳过去了） */
.seat.dead.active .seat-avatar { animation: none; box-shadow: none; }

/* 晕动症：不呼吸，只留一圈静态高亮 */
@media (prefers-reduced-motion: reduce) {
  .seat.active .seat-avatar {
    animation: none;
    box-shadow: 0 0 0 3px var(--hero-color);
  }
}

/* ---------- 逃跑按钮 ---------- */
.board-bar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 6px;
}

.escape-btn {
  font-size: 12.5px;
  padding: 5px 14px;
  opacity: 0.75;
}

.escape-btn:hover { opacity: 1; }

.overlay-note {
  font-weight: 700;
  margin: 4px 0 0;
  color: var(--orange);
}

/* ---------- 挨打抖动 + 打寒颤 ----------
   只有"这一帧刚挨了打"的座位会拿到 .shake（见 src/ui/shake.js），
   所以动画正好放一次，不会一直抖。

   三个层次一起动：
     ① 整条座位：**打寒颤**（又快又碎的小幅抖动，见下面 seat-shiver）
     ② 武将卡图：转着晃，幅度最大 —— "谁挨打了"最直观
     ③ 手牌区 / 操作框：横向甩一下 + 红描边 */

/* ★ 整条座位"打寒颤" —— 玩家反馈：
   「受到伤害时，其所操控的 UI 界面能不能发生突然的抖动动画，
     就像打寒颤一样」。
   所以这里不是慢慢摇，而是**又快又碎的小幅抖动**（0.45 秒抖 9 下），
   幅度只有 ±3px —— 抖得快才像"打寒颤"，抖得大就变成"地震"了。 */
@keyframes seat-shiver {
  0%   { transform: translate(0, 0) rotate(0); }
  11%  { transform: translate(-3px, 1px) rotate(-0.5deg); }
  22%  { transform: translate(3px, -1px) rotate(0.5deg); }
  33%  { transform: translate(-3px, -1px) rotate(-0.45deg); }
  44%  { transform: translate(3px, 1px) rotate(0.45deg); }
  55%  { transform: translate(-2px, 1px) rotate(-0.35deg); }
  66%  { transform: translate(2px, -1px) rotate(0.35deg); }
  77%  { transform: translate(-2px, 0) rotate(-0.25deg); }
  88%  { transform: translate(2px, 1px) rotate(0.2deg); }
  100% { transform: translate(0, 0) rotate(0); }
}

@keyframes hp-flash {
  0%, 45% { color: var(--danger); transform: scale(1.18); }
  100%    { color: inherit; transform: scale(1); }
}

/* 武将卡图：晃得最狠（这个才是"谁挨打了"最直观的信号） */
@keyframes portrait-shake {
  0%   { transform: translate(0, 0) rotate(0) scale(1); }
  12%  { transform: translate(-4px, -3px) rotate(-4deg) scale(1.05); }
  30%  { transform: translate(4px, 2px) rotate(3.5deg) scale(1.05); }
  48%  { transform: translate(-3px, 2px) rotate(-2.5deg) scale(1.02); }
  68%  { transform: translate(3px, -2px) rotate(1.5deg) scale(1.01); }
  100% { transform: translate(0, 0) rotate(0) scale(1); }
}

/* 手牌区 / 操作框：横向甩一下 + 红描边 */
@keyframes hand-shake {
  0%   { transform: translateX(0); }
  18%  { transform: translateX(-8px); }
  38%  { transform: translateX(7px); }
  58%  { transform: translateX(-5px); }
  78%  { transform: translateX(3px); }
  100% { transform: translateX(0); }
}

.seat.shake {
  animation: seat-shiver 0.45s ease-out,
             seat-flash 0.8s ease-out;
}

/* 整圈红边闪一下：座位再大也看得见 */
@keyframes seat-flash {
  0%   { box-shadow: 0 0 0 4px var(--danger); }
  60%  { box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 35%, transparent); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.seat.shake .seat-avatar,
.seat.shake .art-slot {
  animation: portrait-shake 0.6s ease-out;
}

.seat.shake .hand {
  animation: hand-shake 0.55s ease-out;
  outline: 2px solid var(--danger);
  outline-offset: 3px;
  border-radius: 10px;
}

.seat.shake .hp-num {
  animation: hp-flash 0.6s ease-out;
  font-weight: 800;
}

/* 操作框（问你话的那个框）也甩一下 —— 玩家反馈"看不清是哪里挨打了" */
.prompt.shake {
  animation: hand-shake 0.55s ease-out;
  border-color: var(--danger);
}

/* 晕动症 / 关掉动画的人：不抖，只闪红边（信息一点都不少） */
@media (prefers-reduced-motion: reduce) {
  .seat.shake,
  .seat.shake .seat-avatar,
  .seat.shake .art-slot,
  .seat.shake .hand,
  .seat.shake .hp-num,
  .prompt.shake {
    animation: none;
  }
  .seat.shake { outline: 3px solid var(--danger); outline-offset: 2px; }
  .seat.shake .hp-num { color: var(--danger); }
}

.seat-hp { display: flex; align-items: center; gap: 12px; margin: 7px 0; flex-wrap: wrap; }

/* ---------- 气势值 ---------- */
.hp-bar { display: flex; align-items: center; gap: 4px; }

.pip {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: inline-block;
}

.pip.on {
  background: linear-gradient(180deg, #ff9d5c, var(--orange-deep));
  box-shadow: 0 1px 3px rgba(226, 112, 31, .5);
}

.pip.off { background: #e6ddd2; }

.hp-num { font-size: 12px; color: var(--ink-soft); margin-left: 4px; font-weight: 700; }

/* ---------- 判定区 ---------- */
.judge-zone { display: flex; gap: 6px; align-items: center; }
.judge-zone::before { content: "判定区"; font-size: 10.5px; color: var(--ink-soft); }

.judge-card {
  font-size: 11.5px;
  background: #f3e8ff;
  color: #6d28d9;
  border: 1px solid #d8b4fe;
  border-radius: 6px;
  padding: 2px 8px;
  font-weight: 600;
}

/* 判定区用**卡图**显示（玩家要求：「『大狗嚼（状态）』不要文字，用卡图」）。
   尺寸照着上面那个文字标签做，所以换成图之后版面一点都不动。
   ⚠️ 状态图是**长条**（比如大狗嚼是 3.4:1），所以用 contain + 左对齐，
      不能 cover（cover 会把长条裁成中间一小块）。 */
.judge-card.art {
  display: inline-block;
  width: 84px;
  height: 19px;
  padding: 0;
  border: none;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: left center;
  background-size: contain;
}

/* ---------- 多人局：四宫格（上下左右）+ 中间信息栏 ---------- */
/* 1v1 不套这个壳，保持老样子 */
.foe-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
}

/* ★ 2v2 按玩家要求重排：
 *     上：2 号（敌方）
 *   左：1 号（队友）   右：3 号（敌方）
 *     下：0 号（你自己）      中间：信息栏（日志）
 *  同队相邻、自己永远在下方 —— 方位由 render.js 的 multiPad() 算好，
 *  这里只负责把 pos-* 那几个类名摆到格子里。
 *
 *  ⚠️ gap 别调小：玩家反馈过"这四个界面 UI 靠太近了"。
 */
.board.multi {
  display: grid;
  /*  ★ v1.4.6：左右两列加宽了一点（1.35fr → 1.2fr 的中间列），
   *  玩家反馈「左右两边的界面偏小」。中间那列只要有地方放提问栏就够了。 */
  grid-template-columns: minmax(190px, 1fr) minmax(240px, 1.2fr) minmax(190px, 1fr);
  /*  ⚠️ 三行都要能**收缩**（minmax(0, …)）：窗口一矮，auto 行会死抱着
   *  自己的高度不放，把中间那行挤成 0，左右两个座位就看不见了。 */
  grid-template-rows: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
  grid-template-areas:
    'top    top  top'
    'left   mid  right'
    'bottom bottom bottom';
  gap: 16px;
  padding: 14px;
  overflow: hidden; /* 让日志去滚动，而不是整页滚 */
}

.board.multi .seat.pos-top { grid-area: top; }
.board.multi .seat.pos-left { grid-area: left; }
.board.multi .seat.pos-right { grid-area: right; }
.board.multi .seat.pos-bottom { grid-area: bottom; }

/* 中间那一列：阵营图例 + 工具行 + 日志 + 提问栏 + 提示 */
.board.multi .mid-col {
  grid-area: mid;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0; /* 不加这句，里面的日志没法滚动 */
  padding: 0 4px;
  /* ★ 盖在两边座位上面：座位手牌多时会往外溢，绝不能挡住"打出"按钮 */
  position: relative;
  z-index: 2;
}

/* ★ 中间这一列里，谁可以让步、谁必须保住：
 *   提问栏（含"打出"按钮）**不能压缩**，日志先让位。
 *   玩家报的 bug：2/4 号手牌一多，中间区域被挤小，
 *   "打出"按钮被顶出可视区 → 点不到 → 出不了牌。 */
.board.multi .mid-col .prompt { flex: 0 0 auto; }
.board.multi .mid-col .log { flex: 1 1 auto; min-height: 36px; }
.board.multi .mid-col .board-bar,
.board.multi .mid-col .team-legend { flex: 0 0 auto; }

/* ★ 两边的座位：手牌再多也**只在自己格子里滚动**，不许往外长。
 *   不然 2 号 / 4 号牌一多就把中间和下方顶开。 */
.board.multi .seat.pos-top,
.board.multi .seat.pos-left,
.board.multi .seat.pos-right {
  max-height: 100%;
  overflow: hidden;
}

/*  ★★★ v1.4.6：整张座位改成**竖向 flex**，并且"关键信息不许被裁"。
 *
 *  玩家报的 bug：「模式 4 里总有一个玩家的界面跟别人不一样，上下偏大、左右偏小，
 *  结果他**看不到上家的血量和手牌数**」。
 *
 *  根因：`.seat` 以前是普通块级盒子 + `overflow: hidden`。窗口一矮，
 *  网格的 auto 行被压到比内容还小，而上/左/右三个座位又写了 `align-self: center`
 *  —— 盒子比格子高的时候是**上下两头一起溢出**的，上面那一头会被裁掉，
 *  而"名字 / 手牌数"（`.seat-head`）和"气势值"（`.seat-hp`）正好在最上面。
 *  左右两边因为列窄、内容换行更多、盒子更高，所以看起来"偏小/被挤"。
 *
 *  现在改成：
 *    · 竖向 flex + `min-height: 0` → 自己内部就能正确分配空间
 *    · 头 / 气势值 / 装备区 `flex: 0 0 auto` → **永远不压缩、不裁掉**
 *    · 只有手牌区（`.hand`）可以让步、可以自己滚
 *    · 上家不再垂直居中（改成贴顶），这样溢出的方向只会朝下
 *    · 上家和自己的座位按视口高度**封顶**，保证中间那行永远有地方站
 */
.board.multi .seat {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.board.multi .seat .seat-head,
.board.multi .seat .seat-hp,
.board.multi .seat .equip-row,
.board.multi .seat .dist-row {
  flex: 0 0 auto;
}
.board.multi .seat .hand {
  flex: 1 1 auto;
  min-height: 0;
}
/* 上家：贴顶（不要 center —— 那样超出部分会往上冒，把名字和血量顶没） */
.board.multi .seat.pos-top {
  align-self: start;
  max-height: min(34vh, 260px);
}
/* 自己：留大一点（玩家要求"自己的界面最大"），但也要封顶 */
.board.multi .seat.pos-bottom {
  max-height: min(48vh, 430px);
}

/*  ⚠️ 矮窗口（笔记本 / 手机横屏）的兜底：真挤不下就**让整块版面可以滚**，
 *     总比"有的座位永远看不见"强。 */
@media (max-height: 720px) {
  .board.multi {
    overflow-y: auto;
    align-content: start;
  }
  .board.multi .seat.pos-top { max-height: 40vh; }
  .board.multi .seat.pos-bottom { max-height: 52vh; }
}

.board.multi .seat.pos-top .hand,
.board.multi .seat.pos-left .hand,
.board.multi .seat.pos-right .hand {
  max-height: 74px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* 自己的座位也一样：手牌超了就内部滚，别把版面撑破 */
.board.multi .seat.pos-bottom .hand {
  max-height: 190px;
  overflow-y: auto;
}

/* 左右两边的座位：贴顶排（和上家同一个道理 —— 不要垂直居中，
   免得盒子比格子高的时候往上冒、把名字和血量顶掉） */
.board.multi .seat.pos-left,
.board.multi .seat.pos-right {
  align-self: start;
}

/* ---------- 大小：自己最大，其余三个等大 ----------
   玩家反馈：「自己的界面 UI 是最大的，其余三个玩家/AI 的界面 UI
   应偏小且等大」。 */
.board.multi .seat.pos-bottom {
  padding: 12px 16px;
  border-width: 2.5px;
}
.board.multi .seat.pos-bottom .seat-hero { font-size: 18px; }
.board.multi .seat.pos-bottom .seat-avatar { width: 34px; height: 46px; }
.board.multi .seat.pos-bottom .card,
.board.multi .seat.pos-bottom .card-back { width: 62px; height: 88px; }

/* 另外三个：统一压小（同一套尺寸，所以"等大"） */
.board.multi .seat.pos-top,
.board.multi .seat.pos-left,
.board.multi .seat.pos-right {
  padding: 8px 12px;
}
.board.multi .seat.pos-top .seat-hero,
.board.multi .seat.pos-left .seat-hero,
.board.multi .seat.pos-right .seat-hero { font-size: 14.5px; }
.board.multi .seat.pos-top .seat-avatar,
.board.multi .seat.pos-left .seat-avatar,
.board.multi .seat.pos-right .seat-avatar { width: 24px; height: 32px; }
.board.multi .seat.pos-top .card,
.board.multi .seat.pos-left .card,
.board.multi .seat.pos-right .card,
.board.multi .seat.pos-top .card-back,
.board.multi .seat.pos-left .card-back,
.board.multi .seat.pos-right .card-back { width: 46px; height: 64px; }
.board.multi .seat.pos-top .card-name,
.board.multi .seat.pos-left .card-name,
.board.multi .seat.pos-right .card-name { font-size: 9.5px; }
.board.multi .seat.pos-top .hand,
.board.multi .seat.pos-left .hand,
.board.multi .seat.pos-right .hand { min-height: 68px; }

/* 名牌 / 称号：小座位就别挤了（标题太占地方，中英一起看不过来） */
.board.multi .seat.pos-top .seat-title,
.board.multi .seat.pos-left .seat-title,
.board.multi .seat.pos-right .seat-title { display: none; }
.board.multi .hand { min-height: 82px; }

/* 窄屏（手机 / 小窗口）：四宫格挤不下，退回"上下堆叠"的老样子 */
@media (max-width: 820px) {
  .board.multi {
    display: flex;
    flex-direction: column;
    overflow: visible;
    gap: 10px;
  }
  .board.multi .mid-col { min-height: 0; }
  /* 堆叠之后，左右两边的座位也要恢复成正常宽度 */
  .board.multi .seat.pos-left,
  .board.multi .seat.pos-right { align-self: stretch; }
}

/*  ⚠️ 窄 + 矮（手机）的时候，四个座位全都封顶，谁也别想独占屏幕。
 *     真要挤不下，上面那个 max-height 媒体查询会把版面变成可滚动。 */
@media (max-width: 820px) and (max-height: 720px) {
  .board.multi .seat.pos-top,
  .board.multi .seat.pos-left,
  .board.multi .seat.pos-right { max-height: none; }
  .board.multi .seat.pos-bottom { max-height: none; }
}

/* ---------- 阵营：一眼分清敌我 ----------
   玩家反馈：「为了更好区分敌我方，能不能有更好的优化方案」。
   同一套颜色用三处：左边色带 + 背景淡染 + 徽章，色弱也分得清（还有 🐾/⚔️ 图标）。 */
.board.multi .seat {
  border-left-width: 7px;
}

.board.multi .seat.mate {
  border-left-color: #2f9e6b;
  background: linear-gradient(90deg, rgba(47, 158, 107, .10), transparent 45%), var(--cream-2);
}

.board.multi .seat.foe {
  border-left-color: #cf4a4a;
  background: linear-gradient(90deg, rgba(207, 74, 74, .10), transparent 45%), var(--cream-2);
}

/* 自己那条：用自己武将的主题色，和别人区分开 */
.board.multi .seat.pos-bottom.me {
  border-left-color: var(--hero-color);
}

/* 队友的座位还可以再柔和一点（和敌人拉开） */
.board.multi .seat.mate .seat-no { background: #2f9e6b; }

/* ---------- 阵营图例（中间信息栏最上面） ---------- */
.team-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  padding: 4px 2px;
}

.legend-item {
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 700;
  border: 1.5px solid transparent;
}

.legend-item.mate { background: #d8f3e4; color: #14503a; border-color: #7bc4a0; }
.legend-item.foe { background: #fbe0e0; color: #7d2020; border-color: #e2a3a3; }
.legend-tip { color: var(--ink-soft); }

/* ---------- 座位号（2v2 才有，1~4 号位） ---------- */
.seat-no {
  flex-shrink: 0;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #3f3a36;
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* 队友 / 敌人的座位号用不同底色，一眼分得清阵营 */
.seat.mate .seat-no { background: #2f9e6b; }
.seat.foe .seat-no { background: #cf4a4a; }

.seat.dead { opacity: .5; filter: grayscale(.55); }
.seat.mate { border-color: #7bc4a0; }

/* ---------- 队伍徽章（2v2 才有） ---------- */
.team-badge {
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 8px;
}
.team-badge.t0 { background: #d8f3e4; color: #1f7a53; }
.team-badge.t1 { background: #ffe0e0; color: #a83232; }

/* ---------- 距离 / 攻击范围提示（3 人以上才有） ---------- */
.dist-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 6px; }

.dist {
  font-size: 10.5px;
  font-weight: 600;
  border-radius: 6px;
  padding: 1px 7px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.dist.self    { background: #f1ecff; color: #6d28d9; }
.dist.mate    { background: #d8f3e4; color: #1f7a53; }
.dist.can-hit { background: #ffe6a8; color: #6b4300; border-color: #e0b45c; }
.dist.far     { background: #eee9e3; color: #9b9089; }

/* 进攻坐骑 / 防御坐骑：和武器（暖金）防具（冷蓝）再区分开 */
.equip-chip.filled.horseMinus {
  background: linear-gradient(160deg, #ffd9c2, #ef8b4a);
  color: #6b2f00;
  border-color: #d97a3a;
  box-shadow: 0 1px 3px rgba(217, 122, 58, .35);
}
.equip-chip.filled.horsePlus {
  background: linear-gradient(160deg, #d6f5e6, #6cc79a);
  color: #14503a;
  border-color: #57ad83;
  box-shadow: 0 1px 3px rgba(87, 173, 131, .35);
}

/* 坐骑牌卡面的颜色（和上面一致） */
.card.equip-horseMinus { background: linear-gradient(160deg, #ffd0b0, #d2701f); }
.card.equip-horsePlus  { background: linear-gradient(160deg, #bff0d8, #2f8f63); }

/* ---------- 装备区 ---------- */
.equip-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }

.equip-chip {
  font-size: 11.5px;
  border-radius: 8px;
  padding: 3px 10px;
  font-weight: 600;
  cursor: help;
  border: 1px solid transparent;
  white-space: nowrap;
}

/* 空槽：虚线灰框，一眼看出来"这里还能穿东西" */
.equip-chip.empty {
  background: transparent;
  color: #b6aca0;
  border: 1px dashed #d8cec2;
}

/* 已经穿上的装备：和技能标签（紫色）区分开，再按武器 / 防具分两种颜色 */
.equip-chip.filled {
  background: linear-gradient(160deg, #ffe6a8, #f0b429);
  color: #6b4300;
  border-color: #d99a10;
  box-shadow: 0 1px 3px rgba(217, 154, 16, .35);
}

/* ⚔️ 武器：暖金色（和卡面一致） */
.equip-chip.filled.weapon {
  background: linear-gradient(160deg, #ffe6a8, #f0b429);
  color: #6b4300;
  border-color: #d99a10;
  box-shadow: 0 1px 3px rgba(217, 154, 16, .35);
}

/* 🛡️ 防具：冷钢蓝（和卡面一致） */
.equip-chip.filled.armor {
  background: linear-gradient(160deg, #d5eefb, #7cbcd9);
  color: #0d4b66;
  border-color: #5aa3c4;
  box-shadow: 0 1px 3px rgba(90, 163, 196, .35);
}

/* ---------- 技能标签 ---------- */
/* .skill-row 是旧版单独一行用的容器。v1.4.3 起技能挪到座位头上了
   （跟着武将名和阵营标签走），这个类留着是为了兼容老写法。 */
.skill-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }

.skill-chip {
  font-size: 11px;
  background: #f1ecff;
  color: #6d28d9;
  border-radius: 999px;
  padding: 2px 10px;
  cursor: help;
  font-weight: 600;
  white-space: nowrap;
  /* 在座位头里要能跟着一起换行，别把"手牌 N"挤下去 */
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 小座位上的技能标签再收一点（三个小座位要塞得下） */
.board.multi .seat.pos-top .skill-chip,
.board.multi .seat.pos-left .skill-chip,
.board.multi .seat.pos-right .skill-chip {
  font-size: 10px;
  padding: 1px 8px;
  max-width: 96px;
}

/* ---------- 手牌 ---------- */
.hand { display: flex; gap: 6px; flex-wrap: wrap; min-height: 114px; align-items: flex-start; }

.card {
  font-family: inherit;
  width: 78px;
  height: 108px;
  border-radius: 10px;
  border: 1.5px solid rgba(0, 0, 0, .08);
  padding: 4px;
  cursor: default;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: center;
  color: #fff;
  transition: transform .13s ease, box-shadow .13s ease, opacity .13s ease;
  flex-shrink: 0;
}

.card.basic   { background: linear-gradient(160deg, #ffb066, #e2701f); }
.card.trick   { background: linear-gradient(160deg, #6fb1e8, #2f6fae); }
.card.delayed { background: linear-gradient(160deg, #b18cf5, #6d3fd1); }

/* 装备牌分两种颜色 —— 武器暖金、防具冷钢蓝。
   光看渐变可能还不够，所以右上角还有个 ⚔️/🛡️ 小徽章兜底。 */
.card.equip         { background: linear-gradient(160deg, #ffd97a, #cf9500); } /* 兜底 */
.card.equip-weapon  { background: linear-gradient(160deg, #ffdf94, #c98a00); }
.card.equip-armor   { background: linear-gradient(160deg, #b6dcef, #3c86ad); }

/* 卡图占满上半部分（图片就放这儿） */
.card-art { flex: 1 1 auto; min-height: 0; }

.card-name {
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: .3px;
  word-break: break-all;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}

/* 左上角的花色点数，做成小徽章，压在卡图上面也看得清 */
.card-corner.red  { color: #ff5a5f; }   /* 红桃 / 方块 = 红色 */
.card-corner.black { color: #fff; }

/* 日志里的花色也要分颜色（判定牌、亮牌都靠它） */
.suit-red { color: #ff5a5f; font-weight: 700; }

.card-corner {
  position: absolute;
  top: 3px;
  left: 3px;
  z-index: 2;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.5;
  color: #fff;
  background: rgba(0, 0, 0, .45);
  border-radius: 4px;
  padding: 0 3px;
}

/* 右上角的装备槽徽章（⚔️ 武器 / 🛡️ 防具）
   颜色之外再加一层"一眼能认"的标记，色弱也分得清。 */
.card-slot {
  position: absolute;
  top: 3px;
  right: 3px;
  z-index: 2;
  font-size: 11px;
  line-height: 1.45;
  border-radius: 4px;
  padding: 0 3px;
  background: rgba(0, 0, 0, .45);
}

.card.locked { opacity: .38; filter: grayscale(.7); }
.card.selectable {
  cursor: pointer;
  box-shadow: 0 0 0 2.5px #ffd166, 0 3px 10px rgba(0, 0, 0, .18);
}

.card.selectable:hover { transform: translateY(-7px); }

.card.selected {
  transform: translateY(-12px);
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--orange), 0 10px 20px rgba(0, 0, 0, .28);
}

/* 对手的牌背 */
.card-back {
  width: 78px;
  height: 108px;
  border-radius: 10px;
  flex-shrink: 0;
  padding: 4px;
  background: repeating-linear-gradient(45deg, #ffd9b3 0 7px, #ffcaa0 7px 14px);
  border: 1.5px solid #e8b98d;
}

.card-back .card-art { height: 100%; }

/* ============================================================
   ★ 图片槽 —— 你自己放卡图 / 武将图的地方
   ============================================================
   两层结构：
     .art-slot  底层：虚线空框 + 提示文字（图片没放时看到的就是它）
     .art-img   上层：你的图片（CSS 背景图）

   图片存在 → 盖住虚线框；图片不存在 → 透明，露出虚线框。
   换图方法见 src/ui/art.js 开头的说明。
   ============================================================ */
.art-slot {
  position: relative;
  overflow: hidden;
  border-radius: 7px;
  background: rgba(255, 255, 255, .14);
  border: 1.5px dashed rgba(255, 255, 255, .55);
  display: flex;
  align-items: center;
  justify-content: center;
}

.art-hint {
  font-size: 10px;
  line-height: 1.2;
  color: rgba(255, 255, 255, .85);
  text-align: center;
  padding: 2px;
  pointer-events: none;
}

.art-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ---------- 对局界面里的武将小头像 ---------- */
.seat-avatar {
  width: 28px;
  height: 38px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, .06);
  border-color: rgba(0, 0, 0, .16);
}

.seat-avatar .art-hint { font-size: 15px; color: var(--ink-soft); }

/* ============================================================
   战斗日志
   ============================================================ */
.log {
  flex: 1 1 auto;
  min-height: 90px;
  overflow-y: auto;
  background: rgba(255, 255, 255, .62);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
}

.log-body { display: flex; flex-direction: column; gap: 2px; }

.log-line {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.log-line.turn  { font-weight: 700; color: var(--ink); margin-top: 6px; }
.log-line.phase { font-size: 11.5px; color: #a89a8e; letter-spacing: 1px; }
.log-line.damage { color: var(--red); font-weight: 700; }
.log-line.heal  { color: var(--green); }
.log-line.dodge { color: var(--blue); }
.log-line.skill { color: var(--purple); font-weight: 600; }
.log-line.use   { color: var(--orange-deep); font-weight: 600; }
.log-line.bad   { color: var(--red); font-weight: 700; }
.log-line.win   { color: var(--green); font-weight: 700; font-size: 15px; }
.log-line.taunt { color: #b07d4f; font-style: italic; }
.log-line.judge { color: #6d28d9; }
.log-line.equip { color: #b7791f; font-weight: 600; }

/* ============================================================
   提问栏
   ============================================================ */
.prompt {
  background: #fff5e6;
  border: 2px solid var(--orange);
  border-radius: 14px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  box-shadow: 0 4px 14px rgba(226, 112, 31, .18);
  animation: pop .15s ease;
}

@keyframes pop {
  from { transform: scale(.97); opacity: .6; }
  to   { transform: scale(1);   opacity: 1; }
}

.prompt-text { font-size: 14px; font-weight: 600; flex: 1 1 auto; }
.prompt-btns { display: flex; gap: 8px; }

.btn {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 9px;
  padding: 9px 20px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .15s ease;
}

.btn-main { background: var(--orange); color: #fff; }
.btn-main:hover:not(:disabled) { background: var(--orange-deep); }
.btn-main:disabled { background: #e6ddd2; color: #a89a8e; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-soft);
}

.btn-ghost:hover { background: #fff; border-color: #cbbcac; }

/* 武将主动技能按钮 */
.btn-skill {
  background: #f3e8ff;
  border-color: #d8b4fe;
  color: #6d28d9;
}

.btn-skill:hover { background: #e9d5ff; border-color: #b18cf5; }

/* ============================================================
   临时提示（吐司）
   ============================================================
   比如"你偷到了「抓挠」"。
   做成浮动的，这样它出现和消失都不会挤动版面。
   过几秒由 main.js 自动淡出。
   ============================================================ */
.notices {
  position: fixed;
  left: 50%;
  bottom: 152px;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.notice {
  background: #e8f6ee;
  border: 1.5px solid #a7e0c0;
  color: #1f7a4d;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(31, 122, 77, .18);
  /* ⚠️ 这里故意**不加**入场动画。
     界面是"整体重画"的（每次状态变化都换一遍 innerHTML），
     挂在元素上的 CSS 动画会跟着**每次都重播** ——
     看起来就像这个提示在不停地弹出来。
     去掉动画反而干净：出现就是出现，5 秒后消失。 */
}

/* ============================================================
   结算画面
   ============================================================ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(59, 47, 42, .55);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  z-index: 50;
}

.overlay-box {
  background: var(--cream-2);
  border-radius: 22px;
  padding: 40px 50px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  animation: pop .22s ease;
}

.overlay-emoji { font-size: 54px; }
.overlay-box h2 { font-size: 28px; margin: 12px 0 8px; }
.overlay-box p { color: var(--ink-soft); font-size: 14px; }
.overlay-box .seed { font-size: 11.5px; margin-top: 10px; opacity: .6; }

/* ★ v1.5.2（隐藏关卡）：结算画面上那行"★ 完美通关" */
.overlay-perfect {
  font-size: 15px !important;
  font-weight: 800;
  color: #8a5a00 !important;
  background: linear-gradient(90deg, #ffe6a3, #ffcf5c);
  border-radius: 999px;
  padding: 3px 14px;
  display: inline-block;
  margin: 2px 0 6px !important;
}
.overlay-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.overlay-btns .big-btn { display: block; width: 100%; margin-top: 0; padding: 13px 0; }
.overlay-btns .btn-ghost { margin-top: 0; }

/* ============================================================
   窄屏适配
   ============================================================ */
@media (max-width: 640px) {
  .card, .card-back { width: 62px; height: 88px; }
  .card-name { font-size: 10px; }
  .hand { min-height: 94px; }
  .board { padding: 6px; }
  .start-screen h1 { font-size: 32px; }
  .hero-portrait { width: 64px; height: 86px; }
  .hero-name { font-size: 18px; }
}

/* ============================================================
   打出的牌"亮一下"（贴在那个人的座位旁边）
   ============================================================
   需求原文：「使用卡牌时能不能有相应卡图出现的时间特效，放在使用者临近
   其界面 UI 的空余区域显示（没有如闪电命中等的花里胡哨，
   就只是为了让人看清 AI 使用了什么）」。

   所以这里**故意做得素**：淡入 → 停一下 → 淡出，没有圆环、没有旋转。
   ⚠️ 元素挂在 <body> 上（见 src/ui/fx.js）：界面每次重画都会换掉
      #app 里的内容，挂在里面的动画会被当场掐断。
   ============================================================ */
.fx-played {
  position: fixed;
  z-index: 55;
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  animation: fx-played-in-out 1.1s ease-out forwards;
}

.fx-played-card {
  width: 76px;
  height: 106px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  border: 1.5px solid rgba(255, 255, 255, .7);
}

.fx-played-name {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: rgba(40, 34, 30, .82);
  border-radius: 999px;
  padding: 1px 10px;
  white-space: nowrap;
}

@keyframes fx-played-in-out {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.86); }
  12%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  75%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(.94); }
}

/* 晕动症：不缩放，只淡入淡出 */
@keyframes fx-played-fade {
  0%   { opacity: 0; }
  12%  { opacity: 1; }
  75%  { opacity: 1; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .fx-played { animation: fx-played-fade 1.1s ease-out forwards; }
}

/* ---------- 摇骰子（2v2 定先手） ---------- */
.dice-box {
  margin: 22px auto 0;
  max-width: 520px;
}

/* 中间那颗大骰子 */
.dice-big {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 18px;
  color: var(--ink);
}

/* 还在摇的时候：跳一跳、有点糊，表示"还没定下来" */
@keyframes dice-spin {
  0%, 100% { transform: translateY(0) rotate(-10deg); }
  50%      { transform: translateY(-8px) rotate(10deg); }
}

.dice-big.spinning {
  animation: dice-spin .16s ease-in-out infinite;
  opacity: .8;
}

.dice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.dice-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--cream-2);
  border: 2px solid var(--line);
  border-left-width: 7px;
  border-radius: 12px;
  padding: 9px 16px;
  font-size: 15px;
}

.dice-row.mate { border-left-color: #2f9e6b; }
.dice-row.foe  { border-left-color: #cf4a4a; }

.dice-row.win {
  border-color: var(--orange);
  border-left-color: var(--orange);
  background: #fff5e6;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 25%, transparent);
}

.dice-no {
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #3f3a36;
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dice-who { flex: 1; text-align: left; font-weight: 600; }

.dice-tip {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.7;
}

.dice-tip.win { color: var(--orange); font-weight: 700; font-size: 16px; }

@media (prefers-reduced-motion: reduce) {
  .dice-big.spinning { animation: none; }
}

/* ============================================================
   「耄耋附体」：画面剧烈震动 + 5 秒波浪台词
   ============================================================ */
@keyframes awaken-quake {
  0%   { transform: translate(0, 0); }
  10%  { transform: translate(-7px, 4px) rotate(-.25deg); }
  20%  { transform: translate(6px, -5px) rotate(.25deg); }
  30%  { transform: translate(-8px, -3px); }
  40%  { transform: translate(7px, 5px) rotate(.2deg); }
  50%  { transform: translate(-6px, 3px); }
  60%  { transform: translate(5px, -4px) rotate(-.2deg); }
  70%  { transform: translate(-4px, 2px); }
  80%  { transform: translate(3px, -2px); }
  100% { transform: translate(0, 0); }
}

.awaken-shake { animation: awaken-quake .85s ease-out; }

/*  ★ v1.4.6（玩家要求）：**猫将受伤时的屏幕震动** ——
 *  和上面「耄耋附体」用的是**同一个动画**（awaken-quake、同样的时长），
 *  只是类名分开（想单独调其中一个的时候不用动另一个）。
 *  由 src/ui/fx.js 的 screenShake('hit-shake') 挂到 <html> 上。 */
.hit-shake { animation: awaken-quake .85s ease-out; }

/*  ⚠️ 开了"减少动态效果"的玩家：这两下震动都别抖
    （抖的是**整页**，对前庭敏感的人很不友好）。 */
@media (prefers-reduced-motion: reduce) {
  .awaken-shake,
  .hit-shake { animation: none; }
}

/* 台词：偏大、发光、逐字波浪飘动。
   ⚠️ 用 fixed + 半透明底，所以"不遮挡 UI"是靠 pointer-events:none
      和不太高的不透明度做到的（字本身要看得清，不能太淡）。 */
.fx-awaken-line {
  position: fixed;
  left: 50%;
  bottom: 16%;
  transform: translateX(-50%);
  z-index: 70;
  pointer-events: none;
  display: flex;
  gap: .06em;
  font-size: clamp(26px, 5.2vw, 54px);
  font-weight: 900;
  letter-spacing: .04em;
  /* 字色 = 耄耋（原初）的毛色（橘白），外加一层发光 */
  color: var(--awaken-color, #e8a33d);
  text-shadow:
    0 0 6px rgba(255, 214, 150, .95),
    0 0 18px rgba(232, 163, 61, .85),
    0 2px 10px rgba(0, 0, 0, .45);
  white-space: nowrap;
  animation: awaken-fade 5s ease-in-out forwards;
}

.fx-awaken-line span {
  display: inline-block;
  animation: awaken-wave 1.6s ease-in-out infinite;
}

@keyframes awaken-wave {
  0%, 100% { transform: translateY(0) rotate(0); }
  50%      { transform: translateY(-14px) rotate(-2deg); }
}

@keyframes awaken-fade {
  0%   { opacity: 0; }
  8%   { opacity: 1; }
  85%  { opacity: 1; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .awaken-shake { animation: none; }
  .fx-awaken-line span { animation: none; }
}

/* ============================================================
   ★ v1.5.2（隐藏关卡）："最终之战"
   ============================================================
   触发「你。。。看到我了？」之后，整局的视觉状态：
     · 一下**更狠的震动**（.apocalypse-shake）→ 之后**一直微震 + 摆动**（.final-quake）
     · 底下那行诗（.fx-apocalypse-line）：更大、摆动、还带抽搐
     · 背景换成视频（.final-bg）
   ============================================================ */

/* ① 触发那一刻：比「耄耋附体」更狠（幅度更大、时间更长） */
@keyframes apocalypse-quake {
  0%   { transform: translate(0, 0) rotate(0); }
  8%   { transform: translate(-16px, 9px) rotate(-.6deg); }
  16%  { transform: translate(15px, -11px) rotate(.6deg); }
  24%  { transform: translate(-18px, -8px) rotate(-.5deg); }
  32%  { transform: translate(17px, 12px) rotate(.5deg); }
  40%  { transform: translate(-14px, 9px) rotate(-.45deg); }
  48%  { transform: translate(13px, -10px) rotate(.45deg); }
  56%  { transform: translate(-11px, 7px) rotate(-.35deg); }
  64%  { transform: translate(10px, -6px) rotate(.35deg); }
  72%  { transform: translate(-8px, 5px) rotate(-.25deg); }
  80%  { transform: translate(6px, -4px) rotate(.2deg); }
  90%  { transform: translate(-4px, 2px); }
  100% { transform: translate(0, 0) rotate(0); }
}

.apocalypse-shake { animation: apocalypse-quake 1.6s ease-out; }

/* ② 之后的"一直微震动且摆动"：挂在 **#app** 上。
      ⚠️ 为什么不挂 <body>：背景视频是 body 的孩子，而"给 body 加 transform"
         会让 body 变成新的包含块 —— 里面 position:fixed 的东西（视频、
         黑屏、特效）会改成相对 body 定位，页面一长就错位。
         挂在 #app 上只抖界面，body 干干净净。 */
@keyframes final-quake {
  0%   { transform: translate(0, 0) rotate(0); }
  25%  { transform: translate(-1.6px, 1.2px) rotate(-.16deg); }
  50%  { transform: translate(1.8px, -1px) rotate(.14deg); }
  75%  { transform: translate(-1.2px, -1.4px) rotate(-.12deg); }
  100% { transform: translate(0, 0) rotate(0); }
}

#app.final-quake { animation: final-quake 2.6s ease-in-out infinite; }

/* ③ 底下那行诗：比附体那句**更大**，而且摆动 + 抽搐。
      "抽搐"靠在波浪的基础上叠一个高频小抖动（两步 keyframes，节奏很快）。 */
.fx-apocalypse-line {
  position: fixed;
  left: 50%;
  bottom: 14%;
  transform: translateX(-50%);
  z-index: 72;
  pointer-events: none;
  display: flex;
  gap: .05em;
  font-size: clamp(32px, 7vw, 76px);
  font-weight: 900;
  letter-spacing: .05em;
  color: #ffe6c2;
  text-shadow:
    0 0 8px rgba(255, 200, 130, .95),
    0 0 24px rgba(224, 138, 60, .9),
    0 0 46px rgba(150, 40, 20, .75),
    0 3px 12px rgba(0, 0, 0, .6);
  white-space: nowrap;
  animation: awaken-fade 12s ease-in-out forwards;
}

.fx-apocalypse-line span {
  display: inline-block;
  animation: apocalypse-swing 2.1s ease-in-out infinite, apocalypse-twitch .18s steps(2, end) infinite;
}

@keyframes apocalypse-swing {
  0%, 100% { transform: translateY(0) rotate(-3.5deg); }
  50%      { transform: translateY(-22px) rotate(3.5deg); }
}

@keyframes apocalypse-twitch {
  0%   { margin-left: 0; }
  50%  { margin-left: 2px; }
  100% { margin-left: -2px; }
}

/* ④ 背景视频：铺满整屏、压在 UI 底下。
      ⚠️ z-index:-1 + body 背景透明，这样"棋盘 / 座位"还在上面正常显示。
      ⚠️ object-fit:cover —— 视频是 1920x1080，窗口比例不一样时按"填满"裁切，
         不会变形。 */
.final-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -1;
  pointer-events: none;
  opacity: .85;
}

body.has-final-bg { background: #0d0a08; }

/* ============================================================
   ★ v1.5.4（3 座：「浅梦」的第二形态「浅唱大帝」）
   ------------------------------------------------------------
   玩家要求：
     · 变身特效和隐藏关卡耄耋（园区）那套**一样**（圆环 + 卡图炸开）
     · 但"中央出现的变身光环改为**渐变蓝色**"
     · 底下那行字是「这TM都能输」
     · 背景换成「浅唱」视频
   ============================================================ */

/* ① 渐变蓝的光环：把 .fx-ring 那圈"彩虹"换成蓝色渐变
      （只覆盖颜色，扩散动画照旧用 fx-ring-out） */
.fx-burst.qcdd .fx-ring {
  background: conic-gradient(
    from 0deg,
    #1e3a8a, #2563eb, #38bdf8, #60a5fa, #818cf8, #2563eb, #1e3a8a
  );
}

/* ② 光圈也偏蓝一点（border / 阴影取 --fx-color，这里再补一层内光） */
.fx-burst.qcdd .fx-halo {
  box-shadow:
    0 0 60px 14px rgba(59, 130, 246, .95),
    inset 0 0 46px rgba(147, 197, 253, .95);
}

/* ③ 「这TM都能输」：和那行诗同款（大 + 摆动 + 抽搐），但换成蓝色发光 */
.fx-qcdd-line {
  position: fixed;
  left: 50%;
  bottom: 14%;
  transform: translateX(-50%);
  z-index: 72;
  pointer-events: none;
  display: flex;
  gap: .05em;
  font-size: clamp(30px, 6.5vw, 72px);
  font-weight: 900;
  letter-spacing: .05em;
  color: #eaf3ff;
  text-shadow:
    0 0 8px rgba(147, 197, 253, .95),
    0 0 26px rgba(59, 130, 246, .9),
    0 0 48px rgba(30, 58, 138, .8),
    0 3px 12px rgba(0, 0, 0, .6);
  white-space: nowrap;
  animation: awaken-fade 6s ease-in-out forwards;
}

.fx-qcdd-line span {
  display: inline-block;
  animation: apocalypse-swing 2.1s ease-in-out infinite, apocalypse-twitch .18s steps(2, end) infinite;
}

/* ④ 「浅唱」背景视频：和 .final-bg 一套铺法，只是另一段片子 */
.qcdd-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -1;
  pointer-events: none;
  opacity: .85;
}

body.has-qcdd-bg { background: #060b16; }

@media (prefers-reduced-motion: reduce) {
  .apocalypse-shake,
  #app.final-quake { animation: none; }
  .fx-apocalypse-line span { animation: none; }
  .fx-qcdd-line span { animation: none; }
}

/* ============================================================
   ★ v1.5.2（隐藏关卡）：结局动画
   ============================================================
   黑屏 3 秒 + 一行白色静止小字 → 结局视频（原声）→ 自动回主菜单。
   两层都**盖住全屏**（pointer-events:auto），所以结局播放期间
   点不到下面的按钮 —— 不会一边放结局一边开新局。 */
.ending-blackout {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 「白色的静止小文字」—— 特意**不加动画**（玩家要求"静止"） */
.ending-line {
  color: #fff;
  font-size: clamp(14px, 1.6vw, 20px);
  letter-spacing: .12em;
  font-weight: 500;
  margin: 0;
  opacity: .92;
}

.ending-video {
  position: fixed;
  inset: 0;
  z-index: 210;
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  background: #000;
  cursor: pointer; /* 点一下可以跳过（万一卡住） */
}

/* ============================================================
   屏幕中间的大特效（大狗嚼炸中 / 哈气打断拍成功）
   ============================================================
   需求原文（大狗嚼命中）：
     · 屏幕中间出现一个**彩色圆环**扩散
     · 「闪电」的卡牌同时从中间出现
       不透明度 0 → 100（极快，和圆环同步）
       尺寸逐渐变大，但**加速度逐渐变小**（= 先快后慢）
     · 再以较快的不透明度 100 → 0，宽度逐渐缩小直到消失

   ⚠️ 元素是**直接挂到 <body> 上**的（见 src/ui/fx.js）：
     界面每次状态变化都会整块重画 innerHTML，特效挂在里面会被当场掐断。
   ============================================================ */
.fx-burst {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;   /* 纯装饰，绝不能挡住点牌 */
}

.fx-ring,
.fx-halo,
.fx-card {
  position: absolute;
  left: 50%;
  top: 50%;
}

/* ① 彩色圆环：conic-gradient 画一圈彩虹，再用 mask 把中间挖空成"环" */
.fx-ring {
  width: 300px;
  height: 300px;
  margin: -150px 0 0 -150px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #f87171, #fbbf24, #34d399, #22d3ee, #60a5fa, #a78bfa, #f472b6, #f87171
  );
  -webkit-mask: radial-gradient(closest-side, transparent 70%, #000 73%);
  mask: radial-gradient(closest-side, transparent 70%, #000 73%);
  /* 扩散：先快后慢（cubic-bezier 的"起步猛、收尾慢"） */
  animation: fx-ring-out 0.72s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ② 单色光圈：让"是什么牌"的颜色更明确，顺便当柔光 */
.fx-halo {
  width: 250px;
  height: 250px;
  margin: -125px 0 0 -125px;
  border-radius: 50%;
  border: 5px solid var(--fx-color);
  box-shadow: 0 0 55px 12px var(--fx-color), inset 0 0 40px var(--fx-glow);
  animation: fx-ring-out 0.66s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ③ 卡图：从中间冒出来 → 变大（先快后慢） → 淡出并缩回去 */
.fx-card {
  width: 190px;
  height: 265px;
  margin: -132px 0 0 -95px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(0 0 16px var(--fx-color));
  animation: fx-card-pop 0.85s linear forwards;
}

@keyframes fx-ring-out {
  0%   { transform: scale(0.10); opacity: 0; }
  8%   { opacity: 1; }          /* 亮起来极快，和卡图同步 */
  65%  { opacity: 0.8; }
  100% { transform: scale(2.15); opacity: 0; }
}

@keyframes fx-card-pop {
  /* 第一段：不透明度 0 → 100 极快，尺寸小 → 大，**减速**（先快后慢） */
  0% {
    opacity: 0;
    transform: scale(0.32);
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }
  20% {
    opacity: 1;
    transform: scale(1.16);
    /* 第二段：较快地淡出 + 缩回消失（收尾用 ease-in，缩得越来越快） */
    animation-timing-function: cubic-bezier(0.55, 0, 0.85, 0.35);
  }
  100% {
    opacity: 0;
    transform: scale(0.42);
  }
}

/* 晕动症：不放扩散和缩放，只留一下柔和的光圈（信息不丢） */
@media (prefers-reduced-motion: reduce) {
  .fx-ring,
  .fx-card { display: none; }
  .fx-halo { animation: fx-halo-soft 0.6s ease-out forwards; }
  @keyframes fx-halo-soft {
    0%   { opacity: 0.9; transform: scale(0.9); }
    100% { opacity: 0; transform: scale(1.15); }
  }
}

/* ---------- ★ v1.4.7：五人身份局的版式（倒五边形，1~5 号顺时针）----------
 *
 *  玩家要求：「五人局 UI 做成 1~5 号顺时针排列的那种，参考正版三国杀；
 *           自己的 UI 显示最全，其他玩家 / AI 的 UI 是缩略版」，
 *           接着又要求：「把玩家 / AI 位置改成**倒五边形的顶点位置**，
 *           倒五边形的中间左右两点上抬至 UI 上边缘与倒五边形的上方左右两点的
 *           下边缘接近平齐」。
 *
 *  所以五个座位这样摆（顶点朝下的五边形，1 号 = 我）：
 *
 *           3 号        4 号        ← 上面两个顶点：**往中间收**（所以叫"平顶"）
 *           2 号        5 号        ← 腰上两个顶点：贴到上家的下边缘（"上抬平齐"），往外撑
 *                1 号 = 你          ← 下面那个顶点（尖）
 *
 *  【怎么摆的】用 grid 的三行：
 *    第 1 行 = 上面两个顶点（左右各一格，往中间收一点 → 五边形的"顶"就有了斜边）
 *    第 2 行 = 腰上两个顶点（跟第 1 行**同一列**，于是上边缘天然贴着上一行的下边缘）
 *    第 3 行 = 自己（横跨整行、居中）
 *  中间那一列两行都是信息区（日志 + 提问栏 + 提示）。
 *
 *  ⚠️ "顺时针"按钟表算：从正下方（6 点）往下走是 7、8、9 点 —— **先往左**。
 *     想镜像就把 render.js 里的 FIVE_PADS 反过来写。
 * ------------------------------------------------------------------------- */
.board.multi.five {
  display: grid;
  /* ★ v1.4.7（玩家要求）：中间那两点"再往左 / 右一些" ——
     把左右两列加宽、中间那列收窄，腰上的两个座位就撑到更外面；
     上面两个顶点靠各自的 margin 往中间收，五边形的那条斜边才出得来。 */
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1.15fr);
  /* ★ v1.4.7（玩家反馈图 2：把蓝笔圈起来的那一坨"整体下移"）：
     蓝笔圈的是**四个上家 + 中间信息栏**那一整块，而它上面贴着屏幕顶、
     底下空了一大片。做法是给这一块**上下各垫一条弹性空档**（`minmax(0,1fr)`）：
     座位那两行照样按内容高（auto，所以还是贴在一起），
     于是整块会自己在"我的座位上方那块地方"里垂直居中 ——
     窗口高矮都自己平衡，不用写死像素。 */
  grid-template-rows: minmax(0, 1fr) auto auto minmax(0, 1fr) auto;
  grid-template-areas:
    ".   .    ."
    "lt  mid  rt"
    "lb  mid  rb"
    ".   .    ."
    "me  me   me";
  gap: 14px 26px;
  overflow-y: auto;
  /* 底下留一条空档：左下角那两颗按钮（速度 / 逃跑）就摆在这儿，不挡自己的手牌 */
  padding: 14px 18px 46px;
}
/* 上面两个顶点：整格往中间挪（左边那个往右偏、右边那个往左偏）→ 五边形的"平顶斜边" */
.board.multi.five .seat.pos-left-top { grid-area: lt; margin-left: 24%; margin-right: 10%; }
.board.multi.five .seat.pos-right-top { grid-area: rt; margin-left: 10%; margin-right: 24%; }
/* 腰上两个顶点：占满整格（撑到最外） */
.board.multi.five .seat.pos-left-bot { grid-area: lb; }
.board.multi.five .seat.pos-right-bot { grid-area: rb; }
/* 自己：**整行通铺**（左右宽度和模式 1/2/3/4 一样，就是整块版面那么宽），
   贴在最底下；手牌区**只留一行牌那么高**（玩家要求："适当减小自己的 UI，
   下端大小只够显示一行卡牌"）—— 牌多了就在这一行里横向滚，不会往下长。
   ⚠️ 绝不封顶、不裁切（上一版把它裁了，玩家就"看不到牌、出不了牌"）。 */
.board.multi.five .seat.pos-bottom {
  grid-area: me;
  justify-self: stretch;
  align-self: end;
  width: auto;
  margin: 8px 0 0;
  max-height: none;
  overflow: visible;
}
/* 自己的界面放大一点：牌用默认尺寸（和模式 1/2 一样大），名字 / 头像也大一号 */
.board.multi.five .seat.pos-bottom .seat-hero { font-size: 19px; }
.board.multi.five .seat.pos-bottom .seat-avatar { width: 40px; height: 54px; }
.board.multi.five .seat.pos-bottom .card,
.board.multi.five .seat.pos-bottom .card-back { width: 78px; height: 108px; }
/* 一行牌的高度（108 + 上下 padding）；不换行、横向滚 —— 手牌再多也不会把界面撑高 */
.board.multi.five .seat.pos-bottom .hand {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  height: 118px;
  min-height: 118px;
  max-height: 118px;
  padding-bottom: 4px;
}
.board.multi.five .mid-col { grid-area: mid; }
/* 圆桌里每一格都不封顶高度（外层负责滚） */
.board.multi.five .seat { max-height: none; align-self: start; }

/* 屏幕左下角那一小摞（出牌速度 + 逃跑）——
   玩家要求："把 ▶️正常 / 🏳️逃跑 放屏幕左下角"。
   版面底下留了 46px 的空档（上面 .board.multi.five 的 padding-bottom），
   所以这两颗按钮不会压在自己的手牌上。 */
.board-corner {
  position: fixed;
  left: 10px;
  bottom: 8px;
  z-index: 40;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  max-width: min(60vw, 520px);
}
.board-corner .board-bar { margin: 0; justify-content: flex-start; }

/* 缩略版座位（别人 / AI）：不画手牌、不画距离，字小一号，省地方 */
.board.multi.five .seat.compact { padding: 5px 6px; gap: 3px; }
.board.multi.five .seat.compact .seat-hero { font-size: 14px; }
/* ★ v1.5.1（玩家反馈 3）：缩略版那颗小药丸现在挂的是**猫名**（"园区老六"这种
   四个字），比原来的"电脑 4"长一点，所以单独收一下字号 / 内边距，别撑破座位。 */
.board.multi.five .seat.compact .seat-owner {
  font-size: 10.5px;
  padding: 0 7px;
  white-space: nowrap;
}
.board.multi.five .seat.compact .seat-avatar { width: 26px; height: 34px; }
.board.multi.five .seat.compact .seat-title { display: none; }
.board.multi.five .seat.compact .equip-chip { font-size: 10.5px; padding: 1px 4px; }
.board.multi.five .seat.compact .skill-chip { font-size: 10px; padding: 0 4px; }
/* 万一还有别的入口画了手牌，这里也兜一下（双保险） */
.board.multi.five .seat.compact .hand { display: none; }

/* 身份局：**不染敌我色**（绿/红也是队伍信息，染了等于报身份）。
   别人的座位走中性灰，只有主公（明牌）描一条金边。 */
.board.multi.five .seat.other {
  border-left-color: rgba(255, 255, 255, .3);
  background: var(--cream-2);
}
.board.multi.five .seat.lord-seat {
  border-left-color: #d9a520;
  background: linear-gradient(90deg, rgba(217, 165, 32, .16), transparent 45%), var(--cream-2);
}

/* 中间那一列：出牌区已经撤掉了（玩家要求），所以现在只有日志 + 提问栏 + 提示，
   整体往上靠（玩家要求："中间信息栏往上抬"）。 */
.board.multi.five .mid-col { justify-content: flex-start; }
.board.multi.five .mid-col .log { max-height: 34vh; }

/* 窗口不够大：五边形摆不开（上家和自己的手牌会撞在一起），退回"一路竖着排"，
   宁可让它滚，也不要把谁的名字 / 手牌裁掉。 */
@media (max-height: 700px), (max-width: 980px) {
  .board.multi.five {
    display: grid;
    /* 一路竖排时不需要那两条弹性空档了，所有行都按内容高 */
    grid-template-rows: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "lt"
      "rt"
      "lb"
      "rb"
      "mid"
      "me";
  }
  .board.multi.five .seat.pos-left-top,
  .board.multi.five .seat.pos-right-top { margin: 0; }
  .board.multi.five .seat.pos-bottom {
    justify-self: stretch;
    align-self: auto;
    width: auto;
    margin-top: 0;
  }
  .board.multi.five .seat.pos-bottom .hand { max-height: none; }
}

/* 手机竖屏：同上（这一条要压过窄屏 4 人局那条 .board.multi{display:flex}） */
@media (max-width: 820px) {
  .board-corner { max-width: calc(100vw - 20px); }
}

/* 身份徽章（主公/忠臣/反贼/内奸）—— 四种颜色一眼分得开 */
.turn-badge.role { border: 1px solid rgba(255, 255, 255, .55); }
.turn-badge.role.lord { background: #b8860b; }
.turn-badge.role.loyal { background: #2f7dbe; }
.turn-badge.role.rebel { background: #b03a3a; }
.turn-badge.role.spy { background: #6b4bb5; }

/* ============================================================
   ★ v1.5.6：手机竖屏适配（重点：**1.5K 屏手机 ≈ 407×904 CSS px**）
   ============================================================
   玩家反馈：「手机游玩时会出现各种 UI 叠加」，以及有的地方"太小/点不到"。

   这个尺寸下量出来的真问题（`tools/mobile-preview.html` 会现场体检）：
     · 4 个座位一路竖排 ≈ 660px，加上中间栏（图例+日志+提问栏）和手牌，
       文档高度 ~940px > 视口 904px → **自己的手牌被顶到屏幕外**（要滚动才点得到）
     · 「▶️ 速度 / 🏳️ 逃跑」是 `position: fixed` 钉在左下角 → 浮在内容上 = 叠加
     · 手牌是 `flex-wrap: wrap` → 牌一多就换行变两三行，把版面越顶越高

   所以这一段就四条规矩：
     ① 对局版面 **正好一屏高**（100dvh），只有**日志内部滚**，整页不滚
     ② 别人的座位**压扁**（不画手牌、头像小一号、不画距离）→ 一个 ≈ 76px
     ③ 自己的手牌**一行横滑**、提问栏钉在它上面 —— 拇指够得到，永远点得到
     ④ 左下角那两颗按钮改成**跟版面一起排**（不再浮着）；主按钮 ≥44px 高
   ============================================================ */
/*  ⚠️ 注意这里是个**媒体查询列表**（逗号 = 或）：
 *    · 窄屏（手机竖屏，1.5K 屏 ≈ 407×904）
 *    · 或 横屏且很矮且不宽（手机横屏 ≈ 904×407 —— 904 比早先写的 max-width:900px
 *      刚好大 4px，会漏掉，所以这里改成按"高矮 + 方向"判，不再卡死 900）
 *   两套用完全相同的规则：一屏高 + 单列堆叠 + 竖排大按钮。
 *   横屏塞不下就滚（.board 自己带 overflow-y: auto），绝不叠、绝不小于 44px。 */
@media (max-width: 520px), (orientation: landscape) and (max-height: 520px) and (max-width: 1000px) {
  /* ---------- 音量按钮：小一点，别压住上家 ---------- */
  .audio-widget { top: 6px; right: 8px; gap: 6px; }
  .mute-btn { width: 38px; height: 38px; }

  /* ---------- 左下角那两颗：从"浮在内容上"改成跟版面排 ---------- */
  .board-corner {
    position: static;
    max-width: none;
    margin: 2px 8px 0;
    flex-wrap: wrap;
  }
  .board-corner .btn { min-height: 36px; padding: 6px 10px; font-size: 12.5px; }

  /* ---------- 对局版面：一屏装下 ---------- */
  .board,
  .board.multi {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100dvh;
    padding: 46px 8px calc(8px + env(safe-area-inset-bottom, 0px));
    /*  ⚠️ 手机上必须**能滚**（兜底）：挤不下时宁可滚，也绝不能让
     *     日志 / 提问栏压到自己的座位上（那正是玩家报的"叠加"）。 */
    overflow-y: auto;
    overflow-x: hidden;
  }

  /* ---------- 别人的座位：压扁（没用的都收起来） ---------- */
  .board.multi .seat.pos-top,
  .board.multi .seat.pos-left,
  .board.multi .seat.pos-right {
    flex: 0 0 auto;
    align-self: stretch;
    max-height: none;
    padding: 5px 8px;
    gap: 3px;
  }
  /* 手牌只留"手牌 N"那个数字（牌背占地方又没信息） */
  .board.multi .seat.pos-top .hand,
  .board.multi .seat.pos-left .hand,
  .board.multi .seat.pos-right .hand { display: none; }
  /* 距离提示手机上省掉（一行 20px，而且点不着）——别人的和自己的一起收 */
  .board .dist-row { display: none; }
  /* 别人的装备行也收起来（要看装备可以长按/看日志；手机上地方不够） */
  .board.multi .seat.pos-top .equip-row,
  .board.multi .seat.pos-left .equip-row,
  .board.multi .seat.pos-right .equip-row { display: none; }
  .board.multi .seat.pos-top .seat-avatar,
  .board.multi .seat.pos-left .seat-avatar,
  .board.multi .seat.pos-right .seat-avatar { width: 34px; height: 44px; }
  .board.multi .seat-hero { font-size: 14px; }
  .board.multi .seat.pos-top .skill-chip,
  .board.multi .seat.pos-left .skill-chip,
  .board.multi .seat.pos-right .skill-chip { font-size: 10px; padding: 0 4px; }
  .board.multi .seat.pos-top .seat-title,
  .board.multi .seat.pos-left .seat-title,
  .board.multi .seat.pos-right .seat-title { display: none; }

  /* ---------- 中间那列：阵营图例在手机上删掉（徽章已经写了队名/敌我） ---------- */
  .board.multi .mid-col {
    flex: 1 1 auto;
    /*  ⚠️ 这里**不能**写 min-height: 0（原来写了，踩坑）：
     *     mid-col 被压到比内容还矮时，提问栏会从里面顶出来，
     *     把 mid-col 顶上的「▶️ 速度 / 🏳️ 逃跑」盖住 —— 玩家报的"叠加"就是这个。
     *     留 auto（内容高度兜底）→ 真挤不下就整块 .board 滚，滚也只切到最底下的
     *     自己的手牌，绝不会盖住上面的按钮。 */
    min-height: auto;
    gap: 6px;
    padding: 0;
    z-index: 3;
    /*  ⚠️ 这里**必须** overflow: visible（原来写 hidden，踩坑）：
     *     CSS 规定 flex 子项一旦 overflow 不是 visible，它的自动最小高度就等于 0，
     *     于是上面的 min-height: auto 就白写了 —— 小屏（360×640 那种）mid-col 会被
     *     压到 61px，提问栏直接顶到座位里（体检台量出来"被 .seat-hp 盖住"）。
     *     放开溢出 + 内容兜底高度：宁可整块 .board 滚，也不许任何东西叠在一起。 */
    overflow: visible;
  }
  .board.multi .team-legend,
  .board.multi.five .team-legend { display: none; }
  /*  ⚠️ 日志必须给个**上限**（10dvh ≈ 904 屏上 90px）：
   *     上面 mid-col 用了 min-height: auto，而它的"内容高度"里包含日志的**全部行**
   *     （体检台量出来日志把 mid-col 顶到 725px，手牌被推到 y=1269 屏幕外）。
   *     规范里 max-height 会夹住 min-content 贡献 → 日志最多占 10dvh，
   *     剩下的地方按 flex 分给提问栏；日志自己内部滚。 */
  .board.multi .mid-col .log { flex: 1 1 auto; min-height: 34px; max-height: 10dvh; }
  /*  ★ 提问栏在手机上**竖着排**（文字一行、按钮一行）。
   *    踩坑：横排时文字一长（列表/牌名那种），按钮会被挤成 42px 宽 —— 手机上点不到。
   *    竖排 + 按钮 flex: 1 1 auto → 永远是"整行两颗大按钮"。
   *  ⚠️ 也**不能** position: sticky：手机上 .board 是能滚的，sticky 会让提问栏
   *     浮在滚动容器底部、盖住 mid-col 顶上的速度/逃跑条（同样是"叠加"）。 */
  .board .prompt,
  .board.multi .mid-col .prompt {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    position: relative;
    z-index: 30;
    padding: 8px 10px;
    gap: 8px;
  }
  .prompt-text { font-size: 13.5px; }
  /*  按钮排成**自适应网格**（不是 flex 一长条）：
   *  挤在一条 flex 行里时，多的技能按钮会被压到 45px 宽、标签折成好几行，
   *  整行高度被最高那颗撑到 180px（体检台在 360×640 上量到过）。
   *  grid + minmax(96px, 1fr) → 每颗至少 96px 宽，放不下就自动换行，高度都 46px。 */
  .prompt-btns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 8px;
    width: 100%;
  }
  /*  ★ 打出 / 取消 是**最常点**的两颗，手机上必须够大（≥46px 高）
   *  ⚠️ 这条要写在 `.board .btn { min-height: 40px }` **后面**，
   *     不然同权重会被它盖回去（体检时量出来只有 39px 就是这么来的）。 */
  .board .prompt-btns .btn,
  .board.multi .mid-col .prompt-btns .btn {
    min-height: 46px;
    min-width: 46px; /* 兜底：任何情况下也别窄到点不着 */
    font-size: 15px;
    padding: 11px 12px;
  }

  /* ---------- 自己：座位 + 一行横滑的手牌，永远在屏幕底部 ---------- */
  .board .seat.pos-bottom,
  .board.multi .seat.pos-bottom,
  .board:not(.multi) .seat.me,
  .board:not(.multi) > .seat:last-of-type {
    flex: 0 0 auto;
    max-height: none;
    padding: 6px 8px;
    gap: 4px;
  }
  .board .seat .hand,
  .board.multi .seat.pos-bottom .hand {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    min-height: 0;
    max-height: none;
    margin: 0 -8px;
    padding: 2px 8px 6px;
    -webkit-overflow-scrolling: touch;
  }
  .board .hand .card { width: 62px; height: 88px; }
  .board .hand .card .card-name { font-size: 10.5px; }
  .board .seat-hp { gap: 8px; margin: 4px 0; flex-wrap: nowrap; }
  .board .seat-owner,
  .board .seat-title { font-size: 11px; }
  .board .equip-row { font-size: 11px; }

  /* ---------- 点得着的下限 ---------- */
  .board .btn { min-height: 40px; padding: 8px 12px; }
  .board-bar { flex-wrap: wrap; gap: 6px; }
  .board-bar .btn { min-height: 40px; padding: 8px 12px; font-size: 13px; }
  .seat { border-left-width: 5px; }

  /* ---------- 触摸手感：去掉双击缩放 / 长按选中文字 ---------- */
  .card, .btn, .seat, .skill-chip, .equip-chip, .mute-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .log-line { font-size: 12.5px; }
}

/* ============================================================
   ★ 线上版（jimidou.narayume.com）：房间列表 + 「你是谁」
   ============================================================ */
.pvp-whoami { margin: 6px auto 0; font-size: 14px; color: var(--ink-soft); }
.pvp-whoami b { color: var(--orange-deep); font-size: 16px; }
.pvp-rooms {
  margin: 26px auto 0;
  max-width: 620px;
  text-align: left;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.pvp-rooms-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pvp-rooms-head b { font-size: 15px; color: var(--ink); }
.pvp-rooms-when { margin-left: auto; font-size: 12px; color: var(--ink-soft); }
.pvp-rooms-empty { margin: 14px 0 6px; text-align: center; font-size: 13.5px; color: var(--ink-soft); }
.pvp-room-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 4px;
  border-top: 1px solid var(--line);
}
.pvp-room-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pvp-room-info b { font-size: 14.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pvp-room-info span { font-size: 12px; color: var(--ink-soft); }
.pvp-room-count { flex: none; font-size: 13px; font-weight: 700; color: var(--orange-deep); }
.pvp-room-state { flex: none; font-size: 12.5px; color: var(--ink-soft); padding: 0 6px; }
.pvp-room-item.off { opacity: .55; }
