:root {
  /*
   * 矮屏和手机不单独设计（用户 2026-11-27 定）：scale.js 按至少 1280×800 的电脑版式排版，再给 html 整体 zoom 缩小。
   * zoom 不改 vw/vh 的含义，所以样式里一律用 --vw/--vh（缩放前版式的 1%），由 scale.js 写入；没脚本时等于 1vw/1vh。
   */
  --vw: 1vw;
  --vh: 1vh;
  color-scheme: dark;
  font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  font-synthesis: none;
  --ink: #e9e2cf;
  --muted: #a7ada7;
  --gold: #d5aa60;
  --gold-soft: #ecd4a0;
  --red: #ad5448;
  --teal: #7ab5aa;
  --panel: rgba(22, 32, 34, .95);
  --line: rgba(220, 187, 125, .22);
  --shadow: 0 16px 48px rgba(0, 0, 0, .32);
}

* { box-sizing: border-box; }

html, body { margin: 0; width: 100%; height: 100%; }

body {
  overflow: hidden;
  color: var(--ink);
  background: #101719;
}

button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .42; }
button:focus-visible, input:focus-visible, .hand-card:focus-visible, .seat:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 3px;
}

/* 先写 100%（父级 html/body 已是 100%）兜底，再写缩放后版式的整屏高度（--vh 由 scale.js 按 innerHeight 算，地址栏收起时跟着变）。 */
#app { height: 100%; height: calc(100 * var(--vh)); min-height: 0; }

.app-bg {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 46%, rgba(57, 77, 69, .22), transparent 55%),
    radial-gradient(ellipse at 10% 0%, rgba(126, 77, 48, .12), transparent 40%),
    repeating-linear-gradient(95deg, transparent 0 9px, rgba(255,255,255,.012) 10px, transparent 13px),
    linear-gradient(135deg, #182224 0%, #0b1315 63%, #151d1d 100%);
}

/* 大厅背景：高清横幅画。左侧窄渐变托住题字，面板居中偏左、右侧留出人物；四周暗角收边。 */
.app-bg.is-lobby {
  background:
    linear-gradient(90deg, rgba(8, 13, 14, .8) 0%, rgba(8, 13, 14, .42) 24%, rgba(8, 13, 14, .14) 46%, rgba(8, 13, 14, .08) 74%, rgba(8, 13, 14, .32) 100%),
    radial-gradient(ellipse at 50% 50%, transparent 50%, rgba(6, 10, 11, .55) 100%),
    url('art/lobby/lobby-bg.jpg') center / cover no-repeat,
    #101719;
}
.app-bg.is-lobby::after { display: none; }
.is-lobby .lobby-container {
  width: min(1360px, 100%);
  grid-template-columns: minmax(180px, .8fr) minmax(380px, 540px) minmax(0, 1fr);
}
/* 题字：竖排行楷，大字压在画面左侧；竖排从右往左读，所以题字在右、说明在左。 */
.is-lobby .hero-panel { flex-direction: row-reverse; align-items: center; justify-content: center; gap: 22px; padding: 0; }
.is-lobby .hero-title {
  writing-mode: vertical-rl;
  margin: 0;
  font: 400 clamp(64px, calc(11 * var(--vh)), 124px)/1.05 'STXingkai', '华文行楷', 'KaiTi', '楷体', 'STKaiti', serif;
  letter-spacing: .06em;
  color: #f3e4c4;
  text-shadow: 0 3px 18px rgba(0, 0, 0, .75), 0 0 2px rgba(0, 0, 0, .6);
}
.is-lobby .hero-title em { color: #d99a6c; }
.is-lobby .hero-text {
  writing-mode: vertical-rl;
  max-width: none;
  max-height: 20em;
  margin: 0;
  color: #ddd6c6;
  font-size: 14px;
  line-height: 2;
  letter-spacing: .14em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .9);
}
/* 面板：深色半透明 + 背景模糊，画透出来。 */
.is-lobby .panel {
  background: linear-gradient(145deg, rgba(20, 30, 31, .66), rgba(10, 17, 19, .74));
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  backdrop-filter: blur(16px) saturate(1.15);
  border-color: rgba(226, 190, 128, .26);
}
.is-lobby .panel .field input { background: rgba(4, 9, 10, .55); }

.app-bg::before {
  content: '';
  pointer-events: none;
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(205, 160, 91, .16);
  border-radius: 8px;
}

.app-bg::after {
  content: '';
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: repeating-radial-gradient(circle at 52% 45%, transparent 0 2px, rgba(234, 220, 184, .017) 3px 4px);
  opacity: .55;
 
}

.topbar {
  height: 62px;
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 26px;
  background: linear-gradient(180deg, rgba(8, 13, 15, .86), rgba(8, 13, 15, .38));
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.brand-seal {
  display: grid; place-items: center;
  width: 37px; height: 37px;
  border: 1px solid #c0924d;
  border-radius: 4px;
  color: var(--gold-soft);
  background: rgba(127, 64, 42, .25);
  font-family: serif;
  font-size: 21px;
  transform: rotate(-3deg);
}
.brand-name { font-family: 'Songti SC', 'STSong', serif; font-size: 21px; letter-spacing: .2em; color: #f4dfb5; }
.brand-sub { color: var(--muted); font-size: 11px; letter-spacing: .14em; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 29px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #d8d3c3;
  background: rgba(24, 33, 35, .66);
  font-size: 11px;
  letter-spacing: .06em;
}
.chip strong { color: var(--gold-soft); font-size: 13px; }
.dot { width: 6px; height: 6px; border-radius: 100%; background: #727b78; }
.dot.online { background: #8fd3b4; box-shadow: 0 0 8px #8fd3b4; }
.dot.waiting { background: #d5aa60; }
.dot.offline { background: #b45c52; }

.ghost-btn, .text-btn {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, .035);
  color: var(--ink);
  padding: 8px 13px;
  transition: .15s ease;
}
.ghost-btn:hover, .text-btn:hover { border-color: rgba(231, 191, 115, .6); background: rgba(214, 164, 87, .12); }
.text-btn { border-color: transparent; background: transparent; }
.primary-btn, .danger-btn {
  border: 1px solid #d3aa66;
  border-radius: 4px;
  background: linear-gradient(180deg, #b58a52, #87603b);
  box-shadow: inset 0 1px rgba(255,255,255,.18), 0 6px 18px rgba(0,0,0,.2);
  color: #fff5d9;
  font-weight: 700;
  padding: 10px 22px;
  transition: filter .15s, transform .15s;
}
.primary-btn:hover:not(:disabled), .danger-btn:hover:not(:disabled) { filter: brightness(1.12); transform: translateY(-1px); }
.danger-btn { border-color: #c87862; background: linear-gradient(180deg, #a65d4e, #763d37); }
.small-btn { padding: 7px 12px; font-size: 12px; }

.lobby-scene {
  height: calc(100% - 62px);
  min-height: 0;
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 20px;
}
.lobby-container { width: min(980px, 100%); height: min(540px, 100%); display: grid; grid-template-columns: minmax(260px, 1fr) minmax(350px, 1.14fr); gap: 24px; }
.hero-panel { display: flex; flex-direction: column; justify-content: center; padding: 18px 18px 24px; }
.eyebrow { color: var(--gold); font-size: 12px; letter-spacing: .3em; }
.hero-title { font: 600 clamp(40px, calc(5 * var(--vw)), 66px)/1.14 'Songti SC','STSong',serif; letter-spacing: .12em; margin: 14px 0 16px; color: #f0dfbe; text-shadow: 0 5px 24px rgba(0,0,0,.4); }
.hero-title em { font-style: normal; color: #c78d65; }
.hero-text { color: #acb4ae; max-width: 340px; font-size: 14px; line-height: 1.9; }
.hero-rule { width: 90px; height: 1px; margin: 24px 0; background: linear-gradient(90deg, var(--gold), transparent); }
.hero-notes { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-notes span { color: #c9c2ac; font-size: 11px; border: 1px solid var(--line); padding: 5px 8px; border-radius: 2px; }

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(215, 170, 98, .3);
  border-radius: 7px;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,.025);
  background: linear-gradient(145deg, rgba(32,43,43,.97), rgba(19,29,31,.97));
}
.panel::after { content: ''; position: absolute; pointer-events: none; inset: 6px; border: 1px solid rgba(226, 186, 120, .07); border-radius: 3px; }
.entry-panel { padding: 28px 34px; display: flex; flex-direction: column; justify-content: center; }
.panel-title { margin: 0 0 5px; font: 600 25px/1.3 'Songti SC','STSong',serif; color: #ebd4ab; letter-spacing: .15em; }
.panel-desc { margin: 0 0 26px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field label { color: #c8bca3; font-size: 12px; letter-spacing: .08em; }
.field input {
  width: 100%; height: 43px; padding: 0 13px;
  border: 1px solid rgba(212, 178, 116, .26);
  border-radius: 4px;
  outline: none;
  color: #f3ebd8;
  background: rgba(6, 13, 15, .56);
  font-size: 14px;
}
.field input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(213,170,96,.09); }
.field input::placeholder { color: #78817e; }
.entry-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
.entry-actions button { min-height: 44px; }
.form-footnote { margin: 18px 0 0; color: #818f89; font-size: 11px; line-height: 1.7; }
.toast { position: absolute; z-index: 50; left: 50%; bottom: 18px; transform: translateX(-50%); max-width: min(calc(90 * var(--vw)), 650px); padding: 10px 16px; border: 1px solid rgba(214,174,104,.55); border-radius: 4px; background: rgba(17,26,28,.96); box-shadow: var(--shadow); color: #f3dfb7; font-size: 12px; text-align: center; }
.toast.error { border-color: #b86d5c; color: #f4bcaa; }

.waiting-panel { padding: 26px 30px; display: flex; flex-direction: column; }
.waiting-panel .panel-desc { margin-bottom: 0; }
.waiting-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.room-code { color: #f0d398; font-size: 24px; font-weight: 700; letter-spacing: .18em; }
.waiting-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0; min-height: 0; flex: 1 1 0; overflow-y: auto; grid-auto-rows: minmax(78px, 1fr); }
.waiting-seat { display: flex; flex-direction: column; justify-content: space-between; padding: 12px; border: 1px solid rgba(214,174,104,.2); border-radius: 4px; background: rgba(5,12,14,.35); min-width: 0; }
.waiting-seat.is-you { border-color: rgba(218,174,92,.74); background: rgba(124,80,41,.13); }
.waiting-seat.empty { opacity: .52; border-style: dashed; }
.waiting-seat-top { display: flex; justify-content: space-between; color: #a59f8a; font-size: 10px; }
.waiting-seat-name { font-size: 15px; color: #ece2cc; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.waiting-seat-status { font-size: 11px; color: #bd9a67; }
.waiting-seat-status.ready { color: #87b9a0; }
.waiting-seat-status.is-offline { color: #8d8a82; }
.waiting-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); }
.waiting-note { color: #a4ada5; font-size: 11px; line-height: 1.5; }
.waiting-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }

.opening-scene { position: relative; z-index: 2; height: calc(100% - 62px); overflow: auto; padding: 18px 22px; }
.opening-layout { display: grid; grid-template-columns: minmax(280px, .42fr) minmax(0, 1fr); gap: 18px; width: min(1500px, 100%); height: 100%; min-height: 0; margin: auto; }
.opening-table, .opening-main { min-width: 0; min-height: 0; padding: 20px; }
.opening-table { display: flex; flex-direction: column; }
.opening-table-head h2, .opening-panel-head h2 { margin: 7px 0 4px; color: #ebd4ab; font: 600 26px 'Songti SC','STSong',serif; }
.opening-table-head p, .opening-panel-head p, .opening-privacy { color: #aab2a8; font-size: 11px; line-height: 1.5; margin: 0; }
.opening-ring { position: relative; flex: 1; min-height: 285px; margin-top: 12px; border: 1px solid rgba(207,169,99,.16); border-radius: 50%; }
.opening-ring-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); display: flex; flex-direction: column; align-items: center; color: #d5b477; }
.opening-ring-center span { font: 600 24px 'Songti SC','STSong',serif; }
.opening-ring-center strong { font-size: 12px; }
.opening-seat { position: absolute; z-index: 2; width: 108px; min-height: 66px; padding: 7px; border: 1px solid rgba(201,164,102,.3); border-radius: 4px; background: rgba(12,23,24,.95); box-shadow: 0 5px 14px rgba(0,0,0,.28); }
.opening-seat.is-you { border-color: #d7aa66; background: rgba(87,56,33,.95); }
.opening-seat.is-selected { border-color: #79a994; }
.opening-seat.is-first { border-color: #e4bd73; box-shadow: 0 0 0 1px rgba(228,189,115,.5), 0 5px 14px rgba(0,0,0,.28); }
.opening-seat.is-current { border-color: #e4bd73; box-shadow: 0 0 0 1px rgba(228,189,115,.5), 0 5px 14px rgba(0,0,0,.28); }
.opening-seat.is-dying { border-color: #e89883; box-shadow: 0 0 0 2px rgba(232,152,131,.38), 0 0 18px rgba(172,62,45,.26); }
.opening-seat.is-winner { border-color: #f1cb76; background: rgba(104,72,30,.94); box-shadow: 0 0 0 2px rgba(237,195,102,.38), 0 0 18px rgba(227,183,82,.28); }
.opening-seat.is-horizontal { border-style: dashed; }
.opening-seat-top { display: flex; justify-content: space-between; color: #a9ab9e; font-size: 9px; }
.opening-seat strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #eee1c7; font-size: 12px; }
.opening-seat-state { color: #bca77d; font-size: 9px; }
.opening-seat.is-selected .opening-seat-state { color: #9ac3aa; }
.opening-chain-state { display: inline-block; margin-top: 3px; padding: 1px 4px; border: 1px solid rgba(113,190,184,.5); border-radius: 3px; background: rgba(25,90,86,.42); color: #b9e3d7; font-size: 9px; white-space: nowrap; }
.opening-seat-zones { display: block; margin-top: 3px; color: #d6bd87; font-size: 9px; white-space: nowrap; }
.opening-seat-pos-0 { left: 50%; top: 90%; transform: translate(-50%,-50%); }
/* The ring sits in a tall narrow column, so it gets its own places instead of the
   wide board's .seat-pos-*: one seat at the top and bottom, three down each side. */
.opening-ring .opening-seat { width: min(108px, 40%); transform: translate(-50%,-50%); }
.opening-ring .opening-seat-pos-0 { left: 50%; top: 92%; }
.opening-ring .seat-pos-1 { left: 78%; top: 73%; }
.opening-ring .seat-pos-2 { left: 78%; top: 50%; }
.opening-ring .seat-pos-3 { left: 78%; top: 27%; }
.opening-ring .seat-pos-4 { left: 50%; top: 8%; }
.opening-ring .seat-pos-5 { left: 22%; top: 27%; }
.opening-ring .seat-pos-6 { left: 22%; top: 50%; }
.opening-ring .seat-pos-7 { left: 22%; top: 73%; }
.opening-privacy { margin-top: 8px; }
.public-zone-drawer { margin-top: 10px; border: 1px solid rgba(207,169,99,.32); border-radius: 4px; background: rgba(7,18,20,.6); }
.public-zone-drawer > summary { display: flex; justify-content: space-between; gap: 6px; padding: 7px 9px; color: #e2cca3; font-size: 11px; cursor: pointer; }
.public-zone-drawer > summary span { color: #abb9aa; font-size: 10px; text-align: right; }
.public-zone-details { display: grid; gap: 7px; max-height: 170px; overflow-y: auto; padding: 7px 9px 9px; border-top: 1px solid rgba(207,169,99,.2); scrollbar-width: thin; }
.public-zone-row { display: grid; gap: 4px; }
.public-zone-row > strong { color: #d8bf92; font-size: 10px; }
.public-zone-row > div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: #aebcad; font-size: 9px; }
.public-zone-row > div > span:first-child:not(.public-zone-card) { min-width: 28px; }
.public-zone-card { display: inline-flex; align-items: baseline; gap: 3px; padding: 2px 4px; border: 1px solid rgba(203,181,137,.32); border-radius: 3px; background: rgba(52,62,52,.48); color: #e7dcc1; font-size: 10px; }
.public-zone-card small { color: #c6c9b1; font-size: 9px; }
.public-zone-card small.red { color: #e2a59c; }
.opening-main { display: flex; flex-direction: column; gap: 12px; }
.opening-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.opening-step { padding: 5px 9px; border: 1px solid var(--line); border-radius: 3px; color: #d9b978; white-space: nowrap; font-size: 11px; }
.opening-step.done { color: #a8cfb2; border-color: rgba(125,179,142,.45); }
.opening-pick-bar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 9px 11px; border: 1px solid var(--line); border-radius: 4px; background: rgba(8,17,18,.55); color: #b7beaf; font-size: 11px; }
.opening-pick-bar strong { color: #f0d9aa; }
.opening-pick-bar .primary-btn { margin-left: auto; }
.opening-valid { color: #a7d3ae; }.opening-invalid { color: #ddb283; }
.opening-candidates { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); align-content: start; gap: 9px; overflow-y: auto; padding: 2px 4px 4px 0; scrollbar-width: thin; scrollbar-color: #826745 transparent; }
.opening-candidate { min-width: 0; min-height: 172px; display: flex; flex-direction: column; gap: 7px; padding: 10px; border: 1px solid rgba(213,170,96,.28); border-radius: 4px; background: linear-gradient(155deg, rgba(80,65,48,.3), rgba(12,23,24,.83)); }
.opening-candidate.chosen-main { border-color: #dcb772; box-shadow: inset 0 0 0 1px rgba(220,183,114,.35); }
.opening-candidate.chosen-deputy { border-color: #81b9a8; box-shadow: inset 0 0 0 1px rgba(129,185,168,.3); }
.opening-card-head { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
.opening-card-head strong { color: #f1ddba; font: 600 17px 'Songti SC','STSong',serif; }
.opening-card-head span { color: #c2b193; font-size: 10px; white-space: nowrap; }
.opening-card-meta { display: flex; justify-content: space-between; gap: 5px; color: #a5b1a5; font-size: 10px; }
.opening-skills { flex: 1; min-height: 0; color: #d1c9b6; font-size: 10px; }
.opening-skills summary { cursor: pointer; line-height: 1.4; }
.opening-skills div { max-height: 110px; overflow: auto; padding: 4px 2px; }
.opening-skills p { margin: 3px 0; line-height: 1.5; }
.opening-skills strong { color: #ead0a0; }
.opening-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.opening-card-actions button { padding: 5px 2px; font-size: 10px; }
.opening-card-actions .active { color: #ffe2a7; border-color: #d1a15c; background: rgba(177,119,62,.24); }
.opening-ready-stats { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 10px; }
.opening-ready-stats div { display: flex; flex-direction: column; gap: 5px; padding: 13px; border: 1px solid var(--line); border-radius: 4px; background: rgba(8,17,18,.55); }
.opening-ready-stats span, .opening-hand-head span { color: #aab4a8; font-size: 11px; }
.opening-ready-stats strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #f0d9aa; font-size: 16px; }
.opening-ready-note { color: #b5bbaa; font-size: 12px; line-height: 1.6; }
.opening-hand-head { display: flex; justify-content: space-between; align-items: baseline; }
.opening-hand-head h3 { margin: 0; color: #e9d1a4; font-size: 15px; }
.opening-hand { display: flex; gap: 10px; flex-wrap: wrap; }
.opening-hand-card { display: flex; flex-direction: column; justify-content: space-between; width: 105px; height: 146px; padding: 10px; border: 1px solid #c7a66e; border-radius: 4px; background: linear-gradient(155deg, #eadfc8, #b9a985); color: #3b3226; box-shadow: 0 5px 12px rgba(0,0,0,.25); }
.opening-hand-corner { color: #303b3b; font: 700 14px Georgia,serif; }.opening-hand-corner.red { color: #ac4438; }
.opening-hand-card strong { align-self: center; font: 600 18px 'Songti SC','STSong',serif; text-align: center; }
.opening-hand-card > span:last-child { color: #776b55; font-size: 9px; }
.opening-hand-card.selectable { cursor: pointer; text-align: left; font: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.opening-hand-card.selectable:hover { transform: translateY(-3px); }
.opening-hand-card.selectable.selected { outline: 3px solid #85d1a5; outline-offset: 2px; transform: translateY(-5px); box-shadow: 0 8px 18px rgba(0,0,0,.4); }
.opening-dev-note { display: flex; flex-direction: column; gap: 5px; margin-top: auto; padding: 14px; border: 1px solid rgba(206,148,94,.45); border-radius: 4px; background: rgba(118,66,46,.17); }
.opening-dev-note strong { color: #f0c79b; }.opening-dev-note span { color: #bfc3b6; font-size: 11px; line-height: 1.6; }
.opening-dev-note.is-blocked { border-color: rgba(232,135,101,.75); background: rgba(126,46,35,.24); }
.opening-dev-note.is-blocked strong { color: #ffd0b7; }
.opening-dev-note > button { align-self: flex-start; margin-top: 5px; }
.turn-reveal-actions { justify-content: flex-start; margin-left: 0; }
.turn-reveal-actions .primary-btn { margin-left: auto; }
.phase-choice, .phase-history { border: 1px solid rgba(128,182,153,.4); border-radius: 4px; background: rgba(22,54,47,.3); padding: 12px 14px; }
.phase-choice strong, .phase-history strong { color: #cce5ca; font-size: 13px; }
.phase-choice p { margin: 5px 0 10px; color: #c1ccbe; font-size: 11px; line-height: 1.5; }
.phase-choice-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: #c1ccbe; font-size: 11px; }
.phase-order-list { display: grid; gap: 6px; margin: 8px 0; }
.phase-order-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 8px; border: 1px solid rgba(178,201,170,.2); border-radius: 3px; color: #e5d9bd; font-size: 11px; }
.phase-order-row > div { display: flex; gap: 4px; }
.phase-order-row .ghost-btn { min-width: 29px; padding: 3px; }
.phase-history ol { margin: 6px 0 0; padding-left: 20px; color: #bbc8b8; font-size: 11px; line-height: 1.6; }
.pending-card-window { display: flex; flex-direction: column; gap: 7px; padding: 14px 16px; border: 1px solid rgba(213,173,103,.65); border-radius: 4px; background: linear-gradient(130deg, rgba(87,58,38,.48), rgba(29,38,34,.72)); }
.pending-card-window > strong { color: #f0d7a7; font: 600 17px 'Songti SC','STSong',serif; }
.pending-card-window p { margin: 0; color: #d2cfb9; font-size: 11px; line-height: 1.6; }
.pending-card-window small { color: #afbaa9; font-size: 10px; line-height: 1.5; }
.judgment-window { border-color: rgba(150,177,200,.58); background: linear-gradient(130deg, rgba(37,64,78,.48), rgba(28,36,41,.75)); }
.judgment-window > button { align-self: flex-start; }
.judgment-card-list { display: flex; flex-wrap: wrap; gap: 6px; }
.military-order-options, .pending-window-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 3px; }
.military-gift-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 3px; color: #e1d3b5; font-size: 11px; }
.military-order-card { display: flex; flex: 1 1 180px; flex-direction: column; align-items: flex-start; gap: 5px; min-height: 68px; text-align: left; }
.military-order-card strong { color: #f2d6a0; font-size: 12px; }
.military-order-card span { color: #c2c5b4; font-size: 10px; line-height: 1.4; }
.dying-status { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1px solid rgba(233,139,113,.7); border-radius: 4px; background: linear-gradient(130deg, rgba(117,41,35,.42), rgba(44,24,27,.65)); }
.dying-status-label { color: #efaa8c; font-size: 10px; letter-spacing: .14em; }
.dying-status strong { color: #ffe1c3; font: 600 19px 'Songti SC','STSong',serif; }
.dying-status p, .dying-status small { margin: 0; color: #e0c8b8; font-size: 11px; line-height: 1.6; }
.dying-status small { color: #c7b2a4; }
.victory-panel { justify-content: flex-start; }
.victory-banner { display: flex; flex-direction: column; gap: 4px; padding: 24px; border: 1px solid rgba(235,194,106,.58); border-radius: 5px; background: radial-gradient(circle at 50% 20%, rgba(209,147,63,.2), transparent 70%), rgba(66,46,31,.45); text-align: center; }
.victory-banner span { color: #d6b779; font-size: 12px; }
.victory-banner strong { color: #f5dfae; font: 600 clamp(25px, calc(4 * var(--vw)), 42px) 'Songti SC','STSong',serif; }
.victory-winners h3 { margin: 2px 0 9px; color: #ead0a0; font-size: 15px; }
.victory-winners ol { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.victory-winners li { display: grid; grid-template-columns: 74px minmax(80px, 1fr) minmax(110px, 1.4fr); gap: 9px; align-items: center; padding: 9px 12px; border: 1px solid rgba(222,183,101,.26); border-radius: 4px; background: rgba(8,17,18,.5); color: #c5c9b6; font-size: 11px; }
.victory-winners li strong { color: #f0d9aa; font-size: 14px; }
.victory-note, .victory-readonly { margin: 0; color: #b9c3b5; font-size: 11px; line-height: 1.6; }
.victory-readonly { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }

.game-scene { position: relative; z-index: 2; height: calc(100% - 62px); }
.board {
  position: absolute;
  overflow: hidden;
  inset: 0 0 158px;
  background:
    radial-gradient(ellipse at center, rgba(85,109,85,.16), transparent 47%),
    repeating-linear-gradient(0deg, transparent 0 17px, rgba(221,185,112,.012) 18px 19px);
}
.board::before {
  content: '';
  position: absolute;
  left: 50%; top: 52%;
  width: min(calc(59 * var(--vw)), 660px); height: min(calc(51 * var(--vh)), 350px);
  transform: translate(-50%, -50%);
  border: 1px solid rgba(207,169,99,.16);
  border-radius: 50%;
  box-shadow: 0 0 0 30px rgba(222,181,113,.015), inset 0 0 70px rgba(0,0,0,.18);
}
.board::after {
  content: '列 · 国 · 争 · 衡';
  position: absolute; left: 50%; top: 52%; transform: translate(-50%,-50%) rotate(-11deg);
  color: rgba(210,176,104,.043);
  font: 600 clamp(32px, calc(5 * var(--vw)), 76px) 'Songti SC','STSong',serif;
  white-space: nowrap; letter-spacing: .25em;
  pointer-events: none;
}

.seat {
  position: absolute;
  z-index: 3;
  width: 136px; min-height: 92px;
  padding: 7px 8px;
  border: 1px solid rgba(201,164,102,.3);
  border-radius: 5px;
  color: #efe1bd;
  background: linear-gradient(130deg, rgba(39,45,43,.96), rgba(13,22,23,.96));
  box-shadow: 0 8px 23px rgba(0,0,0,.3);
  text-align: left;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.seat:hover { border-color: #b98d50; }
.seat.is-active { border-color: #e1b76c; box-shadow: 0 0 0 2px rgba(208,161,77,.16), 0 8px 23px rgba(0,0,0,.32); }
.seat.is-target { border-color: #ca7965; box-shadow: 0 0 0 2px rgba(202,121,101,.28), 0 8px 23px rgba(0,0,0,.3); transform: translate(-50%,-50%) scale(1.04); }
.seat.is-dead { opacity: .5; filter: grayscale(.8); }
.seat.offline::after { content: '离线'; position: absolute; right: 5px; bottom: 5px; color: #d8998a; font-size: 9px; }
.seat-pos-1 { left: 87%; top: 76%; transform: translate(-50%,-50%); }
.seat-pos-2 { left: 92%; top: 47%; transform: translate(-50%,-50%); }
.seat-pos-3 { left: 76%; top: 20%; transform: translate(-50%,-50%); }
.seat-pos-4 { left: 50%; top: 13%; transform: translate(-50%,-50%); }
.seat-pos-5 { left: 24%; top: 20%; transform: translate(-50%,-50%); }
.seat-pos-6 { left: 8%; top: 47%; transform: translate(-50%,-50%); }
.seat-pos-7 { left: 13%; top: 76%; transform: translate(-50%,-50%); }
.seat.is-target:not(.seat-pos-1):not(.seat-pos-2):not(.seat-pos-3):not(.seat-pos-4):not(.seat-pos-5):not(.seat-pos-6):not(.seat-pos-7) { transform: scale(1.04); }
.seat-head { display: flex; justify-content: space-between; gap: 5px; align-items: center; }
.seat-number { font-size: 9px; color: #9d9f91; }
.seat-name { font-size: 12px; font-weight: 700; max-width: 95px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-generals { display: flex; gap: 4px; margin: 6px 0; }
.mini-general { flex: 1; min-width: 0; padding: 3px 4px; border: 1px solid rgba(191,151,92,.28); border-radius: 2px; color: #d2c6a5; background: rgba(142,93,53,.14); font-size: 10px; text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mini-general.hidden { color: #777f7a; background: rgba(0,0,0,.2); }
.seat-foot { display: flex; justify-content: space-between; align-items: center; color: #abb1a5; font-size: 10px; }
.hp { color: #d98d78; letter-spacing: .04em; font-weight: 700; }
.faction { color: #d5b879; }
.faction.wei { color: #9bb8d3; }.faction.shu { color: #d4a496; }.faction.wu { color: #9cceb8; }.faction.qun { color: #d7c296; }

.board-center { position: absolute; z-index: 2; left: 50%; top: 51%; transform: translate(-50%, -50%); width: min(310px, calc(28 * var(--vw))); text-align: center; }
.roundel { width: 66px; height: 66px; margin: 0 auto 8px; display: grid; place-items: center; border: 1px solid rgba(224,178,100,.46); border-radius: 50%; background: radial-gradient(circle, rgba(121,79,50,.35), rgba(14,27,27,.6)); box-shadow: 0 0 0 6px rgba(208,164,93,.045), 0 0 0 14px rgba(208,164,93,.025); font: 600 30px 'Songti SC','STSong',serif; color: #d6ae70; }
.turn-label { color: #d6bd8e; letter-spacing: .12em; font-size: 12px; }
.turn-label strong { color: #f4dbab; }
.turn-sub { color: #8e9c92; font-size: 11px; margin-top: 6px; }
.event-box { margin: 11px auto 0; padding: 7px 9px; max-width: 300px; border: 1px solid rgba(212,174,101,.18); border-radius: 3px; background: rgba(7,18,20,.6); color: #aeb3a7; font-size: 10px; line-height: 1.55; text-align: left; }
.event-box p { margin: 0; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.event-box p + p { margin-top: 3px; }

.self-dock {
  position: absolute;
  z-index: 4;
  left: 0; right: 0; bottom: 0;
  height: 158px;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 192px;
  gap: 12px;
  padding: 10px 22px 14px;
  border-top: 1px solid rgba(230,188,111,.38);
  background: linear-gradient(180deg, rgba(35,44,40,.97), rgba(16,25,26,.99));
  box-shadow: 0 -10px 35px rgba(0,0,0,.35);
}
.self-portrait { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 8px 10px; border: 1px solid rgba(221,177,103,.36); border-radius: 4px; background: linear-gradient(130deg, rgba(139,86,48,.22), rgba(23,32,31,.5)); }
.self-top { display: flex; align-items: center; justify-content: space-between; }
.self-name { font-size: 15px; color: #efdab5; font-weight: 700; }
.self-general-row { display: flex; gap: 5px; }
.self-general { flex: 1; min-width: 0; padding: 5px 3px; border: 1px solid rgba(222,183,118,.25); border-radius: 2px; background: rgba(5,15,17,.25); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.self-stats { display: flex; justify-content: space-between; color: #b8bbae; font-size: 11px; }
.hand-zone { min-width: 0; display: flex; flex-direction: column; }
.hand-head { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 7px; color: #b3b7a9; font-size: 11px; }
.hand-cards { display: flex; align-items: stretch; gap: 7px; min-height: 0; flex: 1; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: #836642 transparent; padding: 1px 4px 2px; }
.hand-card { position: relative; flex: 0 0 72px; min-width: 72px; display: flex; flex-direction: column; justify-content: space-between; padding: 7px; border: 1px solid #b8965f; border-radius: 4px; background: linear-gradient(155deg, #e9dcc1, #cbbb98); box-shadow: 0 3px 7px rgba(0,0,0,.25); color: #362d25; text-align: left; transition: transform .16s, box-shadow .16s; user-select: none; }
.hand-card:hover { transform: translateY(-5px); }
.hand-card.selected { transform: translateY(-9px); box-shadow: 0 0 0 2px #e0ad61, 0 9px 14px rgba(0,0,0,.3); }
.hand-card:disabled { opacity: .65; }
.hand-card-top { font: 700 11px Georgia,serif; }
.hand-card-top.red { color: #ae3d38; }.hand-card-top.black { color: #323c3a; }
.hand-card-name { align-self: center; font: 600 22px 'Songti SC','STSong',serif; letter-spacing: .02em; }
.hand-card-type { font-size: 9px; color: #766751; }
.empty-hand { align-self: center; color: #78847f; font-size: 12px; padding: 20px; }
.action-zone { display: flex; flex-direction: column; justify-content: space-between; gap: 7px; }
.action-hint { min-height: 34px; color: #c8bda4; font-size: 11px; line-height: 1.45; text-align: right; }
.action-buttons { display: flex; align-items: end; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.action-buttons button { min-width: 73px; }
.action-reveal { display: flex; justify-content: flex-end; gap: 6px; }
.action-reveal button { font-size: 10px; padding: 4px 7px; }
.subtle { color: #8f9c94; }
.modal-backdrop { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; background: rgba(3,9,10,.72); }
.modal { width: min(440px, calc(92 * var(--vw))); padding: 22px; }
.modal h2 { margin: 0 0 9px; font: 600 23px 'Songti SC','STSong',serif; color: #ebd4ab; }
.modal p { color: #bdc3b6; font-size: 13px; line-height: 1.7; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

.catalog-modal { width: min(980px, calc(calc(100 * var(--vw)) - 28px)); height: min(650px, calc(calc(100 * var(--vh)) - 28px)); height: min(650px, calc(calc(100 * var(--vh)) - 28px)); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.catalog-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.catalog-head h2 { margin: 0 0 4px; color: #efd7a9; font: 600 27px 'Songti SC','STSong',serif; }
.catalog-head h2 span { font: 600 13px 'Microsoft YaHei',sans-serif; color: var(--gold); }
.catalog-head p { margin: 0; color: #a8b0a6; font-size: 11px; line-height: 1.5; }
.catalog-controls { display: flex; align-items: center; gap: 12px; }
.catalog-filters { display: flex; gap: 5px; flex-wrap: wrap; flex: 1; }
.catalog-filter { padding: 5px 9px; border: 1px solid var(--line); border-radius: 3px; background: rgba(255,255,255,.025); color: #b8bdad; font-size: 11px; }
.catalog-filter.active { color: #f6dfae; border-color: #c39954; background: rgba(161,105,49,.23); }
#catalog-search { width: 180px; min-width: 0; height: 30px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 3px; outline: none; color: var(--ink); background: rgba(5,12,14,.45); font-size: 11px; }
#catalog-search:focus { border-color: var(--gold); }
.catalog-list { flex: 1; min-height: 0; overflow-y: auto; padding-right: 5px; scrollbar-width: thin; scrollbar-color: #826745 transparent; }
.catalog-empty { margin: 18px 0; color: #9ca99e; font-size: 12px; }
.catalog-card { border-top: 1px solid rgba(220,187,125,.14); background: rgba(0,0,0,.09); }
.catalog-card:last-child { border-bottom: 1px solid rgba(220,187,125,.14); }
.catalog-card summary { position: relative; display: grid; grid-template-columns: minmax(90px, .8fr) minmax(120px, 1fr) minmax(150px, 1.7fr); gap: 9px; align-items: center; padding: 9px 27px 9px 11px; cursor: pointer; list-style: none; }
.catalog-card summary::-webkit-details-marker { display: none; }
.catalog-card summary::after { content: '▾'; position: absolute; right: 10px; color: #b89964; }
.catalog-card[open] summary::after { content: '▴'; }
.catalog-card summary:hover { background: rgba(210,161,82,.07); }
.catalog-name { color: #ead6ad; font-weight: 700; font-size: 13px; }
.catalog-tags { color: #a6b6a6; font-size: 10px; }
.catalog-skill-names { color: #c8c7b5; font-size: 11px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding-right: 15px; }
.catalog-detail { padding: 0 14px 10px; border-left: 2px solid rgba(206,160,83,.36); margin: 0 8px 5px; color: #bbc2b6; font-size: 11px; line-height: 1.75; }
.catalog-detail p { margin: 5px 0; }
.catalog-detail strong { color: #ead0a0; }

.orientation-hint { display: none; }




@media (orientation: portrait) and (max-width: 760px) {
  .orientation-hint { zoom: var(--unzoom, 1); display: grid; position: fixed; z-index: 100; inset: 0; place-items: center; background: #101a1c; }
  .orientation-card { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 30px; text-align: center; color: #d4c2a0; }
  .orientation-card > span:not(.orientation-mark) { max-width: 22em; color: #a5b1a8; font-size: 13px; line-height: 1.6; }
  .orientation-mark { font-size: 49px; color: var(--gold); }
  .orientation-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
  .orientation-actions button { min-height: 44px; padding: 8px 16px; border: 1px solid rgba(212,178,116,.5); border-radius: 4px; background: rgba(177,119,62,.2); color: #ffe2a7; font-size: 14px; }
  .orientation-actions .orientation-skip { background: none; color: #a5b1a8; }
  /* 浏览器锁了方向（微信等不跟着转）时可以点"仍然进入"，竖屏也放行。 */
  body.orientation-dismissed .orientation-hint { display: none; }
}

/* Lobby: room mode, leaving and host transfer. */
.field-label { color: #c8bca3; font-size: 12px; letter-spacing: .08em; }
.entry-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 4px 0 14px; border-bottom: 1px solid rgba(212,178,116,.22); }
.entry-tab { min-height: 38px; padding: 6px 10px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: #9fa79b; font-size: 13px; letter-spacing: .08em; cursor: pointer; }
.entry-tab.active { border-bottom-color: #d1a15c; color: #ffe2a7; }
.entry-actions.single { grid-template-columns: 1fr; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mode-option { min-height: 34px; padding: 6px 10px; border: 1px solid rgba(212,178,116,.26); border-radius: 4px; background: rgba(6,13,15,.4); color: #c9c2ac; font-size: 12px; }
.mode-option.active { border-color: #d1a15c; background: rgba(177,119,62,.24); color: #ffe2a7; }
.mode-hint { color: #8f9a93; font-size: 11px; line-height: 1.5; }
/* 建房页加了扩展包开关后内容会比面板高：面板内滚动，按钮不被裁掉；内容不满时仍居中。 */
.entry-panel { overflow-y: auto; justify-content: safe center; scrollbar-width: thin; scrollbar-color: rgba(214,164,87,.6) transparent; }
.expansion-field { gap: 5px; margin-bottom: 12px; }
.expansion-switch { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.expansion-option { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-height: 30px; padding: 3px 4px; line-height: 1.25; }
.expansion-option small { color: #8f9a93; font-size: 10px; }
.expansion-option.active small { color: #d8bd87; }
.expansion-option:disabled { opacity: 1; cursor: default; }
/* 对局人数：建房页三选一；等候区房主可改，其他人只看当前人数。 */
.seat-field { gap: 5px; margin-bottom: 10px; }
.seat-switch { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.waiting-seats { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.waiting-seats .seat-option { min-height: 28px; padding: 3px 12px; }
.waiting-seats .seat-option:disabled { opacity: .45; cursor: not-allowed; }
.waiting-expansions { margin-top: 12px; }
/* 等候区多了扩展包一栏：面板加高一些，座位不挤。 */
.lobby-container:has(.waiting-expansions) { height: min(640px, 100%); }
.waiting-expansions .expansion-field { margin-bottom: 0; }
.room-mode { color: #d9b978; }
.waiting-seat-host { align-self: flex-start; margin-top: 4px; padding: 2px 6px; font-size: 10px; }

/* 引擎牌桌（2026-11 重做）：围桌座位、卡面手牌、中间出牌区。玩家看图不看字。
   势力色：魏蓝、蜀红、吴绿、群黄、野心家紫。卡面在 /art/ 下（scripts/build-card-art.py）。
   悬停放大（.gz-zoom）用 position: fixed，所以 .gz-seat、.gz-card 及其祖先不能用 transform / filter。 */
.faction-wei { --camp: #3a7bdc; --camp-deep: #173a73; }
.faction-shu { --camp: #d5443a; --camp-deep: #6f1a15; }
.faction-wu { --camp: #2fa35c; --camp-deep: #12512b; }
.faction-qun { --camp: #c79c36; --camp-deep: #5f4712; }
.faction-wild { --camp: #9a56d4; --camp-deep: #47206b; }
.faction-other, .faction-none { --camp: #6c7682; --camp-deep: #2b3138; }

.opening-scene.engine-scene {
  --seat-w: clamp(84px, min(calc(11.6 * var(--vw)), calc(23 * var(--vh))), 176px);
  --seat-h: calc(var(--seat-w) * 1.2);
  --card-w: clamp(52px, min(calc(7.8 * var(--vw)), calc(15.5 * var(--vh))), 118px);
  --card-h: calc(var(--card-w) * 1.405);
  --play-w: calc(var(--card-w) * .86);
  --hp-dot: clamp(7px, calc(.85 * var(--vw)), 11px);
  --hp-col: calc(var(--hp-dot) + 6px);
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 34% 22% at 50% 50%, rgba(255,255,255,.2), transparent 72%),
    radial-gradient(ellipse 78% 58% at 50% 48%, rgba(150,172,198,.34), transparent 76%),
    repeating-linear-gradient(90deg, transparent 0 118px, rgba(255,255,255,.035) 118px 120px),
    linear-gradient(180deg, #4d5f73 0%, #74869a 36%, #6a7b8e 62%, #333d49 100%);
}
.gz-board {
  display: grid;
  width: 100%; height: 100%;
  gap: 6px 10px;
  padding: 6px 12px 8px;
  grid-template-columns: var(--seat-w) minmax(0, 1fr) var(--seat-w);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  grid-template-areas: "hud hud hud" "top top top" "left center right" "bottom bottom bottom";
}

/* 顶栏 */
.gz-hud { grid-area: hud; display: flex; align-items: center; gap: 10px; min-height: 30px; color: #eef2f6; font-size: 12px; white-space: nowrap; }
.gz-camps { display: flex; flex: 1; gap: 5px; min-width: 0; }
.gz-camp { padding: 1px 9px; border-radius: 10px; background: linear-gradient(180deg, var(--camp), var(--camp-deep)); color: #fff; font-weight: 700; text-shadow: 0 1px 1px rgba(0,0,0,.5); }
.gz-camp i { margin-left: 3px; font-size: 9px; font-style: normal; opacity: .9; }
.gz-camp.is-hidden { background: #4a525c; }
.gz-turn { display: flex; align-items: baseline; gap: 8px; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.gz-turn strong { color: #fff3d6; font-size: 14px; }
.engine-pile { padding: 1px 9px; border: 1px solid rgba(255,255,255,.28); border-radius: 10px; background: rgba(10,14,18,.5); color: #f1dfb4; }
.engine-pile.is-discard { color: #c4ccd4; }
.engine-war-badge { position: relative; align-self: center; padding: 2px 10px 2px 13px; border-radius: 3px; background: #b8392c; color: #fff; font: 800 16px/1.3 'Songti SC', 'STSong', serif; letter-spacing: .25em; box-shadow: 0 0 8px rgba(220,60,40,.6); cursor: help; animation: gz-war-badge-in .6s cubic-bezier(.3,1.8,.5,1) both; }
.gz-board:has(.gz-war-start) .engine-war-badge { animation-delay: 1.6s; }
.engine-war-badge:focus-visible { outline: 2px solid #ffb3a6; outline-offset: 2px; }
.engine-war-badge:is(:hover, :focus) > .gz-war-tip { display: block; }
/* 规则框往下弹（.gz-skill-tip 默认往上），顶栏抬到座位上面，免得被上排座位挡住。 */
.engine-war-badge > .gz-war-tip { top: calc(100% + 6px); bottom: auto; letter-spacing: normal; text-shadow: none; }
.gz-hud:has(.engine-war-badge:is(:hover, :focus)) { position: relative; z-index: 75; }
.gz-war-tip > b { color: #ff8f7c; }
@keyframes gz-war-badge-in { from { scale: 1.8; opacity: 0; } to { scale: 1; opacity: 1; } }
/* 进入鏖战的回合：全桌压暗泛红，中间盖"鏖战"印，再淡出（不挡点击）。 */
.gz-war-start { position: absolute; z-index: 90; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: radial-gradient(ellipse at center, rgba(60,6,2,.35), rgba(20,0,0,.82) 75%); pointer-events: none; animation: gz-war-dim 3.4s ease-in-out both; }
.gz-war-seal { padding: 6px 20px 6px 30px; border: 4px solid #e0412c; border-radius: 8px; color: #ff5236; font: 900 clamp(52px, calc(9 * var(--vw)), 110px)/1.1 'Kaiti SC', 'STKaiti', 'KaiTi', serif; letter-spacing: .3em; text-shadow: 0 0 18px rgba(255,60,30,.7); box-shadow: inset 0 0 18px rgba(224,65,44,.45), 0 0 26px rgba(224,65,44,.5); rotate: -6deg; animation: gz-war-stamp .5s .25s cubic-bezier(.5,0,.6,1.4) both; }
.gz-war-sub { color: #f5d9cf; font: 700 clamp(15px, calc(1.8 * var(--vw)), 22px)/1.3 'Songti SC', 'STSong', serif; letter-spacing: .1em; text-shadow: 0 1px 3px #000; animation: gz-act-in .4s .8s ease-out both; }
@keyframes gz-war-dim { 0% { opacity: 0; } 10% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@keyframes gz-war-stamp { 0% { opacity: 0; scale: 3; } 70% { opacity: 1; scale: .94; } 100% { opacity: 1; scale: 1; } }
@media (prefers-reduced-motion: reduce) {
  .engine-war-badge, .gz-war-seal, .gz-war-sub { animation: none; }
  .gz-war-start { animation: gz-war-dim 3.4s steps(1, end) both; }
}

/* 抽屉：菜单和记录 */
.gz-drawer { position: relative; }
.gz-drawer > summary { list-style: none; cursor: pointer; user-select: none; }
.gz-drawer > summary::-webkit-details-marker { display: none; }
.gz-tool { display: inline-grid; place-items: center; min-width: 46px; min-height: 30px; padding: 3px 10px; border: 1px solid rgba(232,196,120,.55); border-radius: 8px; background: linear-gradient(180deg, #3d444c, #1f2429); color: #f1dfb4; font-size: 13px; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.gz-drawer[open] > .gz-tool { border-color: #ffd76a; color: #fff; }
.gz-drawer-panel { position: absolute; z-index: 40; display: flex; flex-direction: column; gap: 10px; width: min(430px, calc(84 * var(--vw))); max-height: calc(62 * var(--vh)); padding: 12px; overflow: auto; border: 1px solid rgba(232,196,120,.5); border-radius: 8px; background: rgba(14,19,22,.97); box-shadow: var(--shadow); white-space: normal; }
.gz-menu .gz-drawer-panel { left: 0; top: calc(100% + 6px); }
.gz-log-drawer .gz-drawer-panel { left: 0; bottom: calc(100% + 6px); width: min(620px, calc(92 * var(--vw))); max-height: calc(70 * var(--vh)); }
.engine-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.engine-section-head h3 { margin: 0; color: #e9d1a4; font-size: 14px; }
.engine-section-head span { color: #8f9a93; font-size: 10px; }
.engine-empty { margin: 0; color: #8f9a93; font-size: 11px; }
.engine-log { display: flex; flex-direction: column; gap: 6px; }
.engine-log-list { max-height: calc(46 * var(--vh)); margin: 0; padding: 6px 10px; overflow-y: auto; list-style: none; border: 1px solid var(--line); border-radius: 4px; background: rgba(8,17,18,.5); color: #c5c9b6; font-size: 11px; line-height: 1.7; scrollbar-width: thin; }
.engine-log li.is-private { color: #a9d6c4; }
.engine-log .engine-log-damage, .engine-log .engine-log-death, .engine-log .engine-log-loseHealth { color: #f0b8a7; }
.engine-log .engine-log-recover, .engine-log .engine-log-dyingSaved { color: #a8d8b7; }
.engine-log .engine-log-turnStart { color: #e9d1a4; }
/* 左下角“记录”：一次操作一行，每回合开头一条分隔行。 */
.gz-log-drawer .engine-log-list { max-height: calc(60 * var(--vh)); font-size: 12px; line-height: 1.6; overscroll-behavior: contain; scrollbar-width: auto; scrollbar-color: rgba(232,196,120,.6) rgba(255,255,255,.06); }
.gz-log-drawer .engine-log-list::-webkit-scrollbar { width: 10px; }
.gz-log-drawer .engine-log-list::-webkit-scrollbar-track { background: rgba(255,255,255,.06); border-radius: 5px; }
.gz-log-drawer .engine-log-list::-webkit-scrollbar-thumb { background: rgba(232,196,120,.6); border-radius: 5px; }
.gz-log-drawer .engine-log-list li { padding: 2px 0; border-bottom: 1px solid rgba(232,196,120,.07); }
.gz-log-drawer .engine-log-list li.engine-log-turnStart { margin-top: 6px; padding: 3px 0; border-bottom-color: rgba(232,196,120,.35); font-weight: 600; text-align: center; }
.engine-game-over small { color: #d8c6a0; font-size: 12px; }
.engine-game-over .engine-countdown { margin-left: 0; }
.engine-game-over [data-action="rematch"] { align-self: center; margin-top: 8px; padding: 6px 22px; }
.engine-roster { display: flex; flex-direction: column; gap: 6px; }
.engine-roster ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.engine-roster li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 3px; color: #c9c2ac; font-size: 11px; }
.engine-roster li.is-you { border-color: rgba(218,174,92,.6); }
.engine-roster li.is-left { opacity: .65; }
.engine-roster li strong { color: #ece2cc; }
.engine-roster li em { padding: 0 5px; border: 1px solid rgba(213,170,96,.45); border-radius: 3px; color: #e8c486; font-size: 9px; font-style: normal; }
.engine-roster-status { margin-left: auto; color: #8fbfa8; }
.engine-roster li button { padding: 1px 8px; font-size: 10px; }
.engine-roster li.is-left .engine-roster-status { color: #bd9a67; }
.engine-roster-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.engine-roster-actions small { color: #afbaa9; font-size: 10px; }
/* 投降（菜单里，离开房间下面一行）。 */
.engine-roster-actions.gz-surrender { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.08); }
.engine-notes { padding: 6px 10px; border: 1px solid var(--line); border-radius: 4px; color: #c5c9b6; font-size: 11px; }
.engine-notes summary { color: #e9d1a4; cursor: pointer; }
.engine-notes h4 { margin: 8px 0 4px; color: #e9d1a4; font-size: 12px; }
.engine-notes ul { display: grid; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.engine-notes li span { margin-left: 6px; color: #8f9a93; font-size: 10px; }
.engine-notes li p { margin: 2px 0 0; line-height: 1.5; }

/* 座位 */
.gz-top { grid-area: top; display: flex; justify-content: center; align-items: flex-start; gap: clamp(8px, calc(2 * var(--vw)), 34px); min-height: var(--seat-h); }
.gz-side { display: flex; flex-direction: column; justify-content: center; gap: 10px; min-height: 0; }
.gz-side-left { grid-area: left; }
.gz-side-right { grid-area: right; }
.gz-seat {
  position: relative; display: block; flex: none;
  width: var(--seat-w); height: var(--seat-h);
  padding: 0; border: 2px solid var(--camp); border-radius: 7px;
  background: linear-gradient(180deg, #1c2228, #0d1013);
  color: #f3ecda; font: inherit; text-align: left;
  box-shadow: 0 4px 14px rgba(0,0,0,.5);
}
.gz-seat-head { position: absolute; z-index: 3; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 4px; height: 19px; padding: 0 4px; overflow: hidden; border-radius: 4px 4px 0 0; background: linear-gradient(90deg, var(--camp), var(--camp-deep)); font-size: 10px; white-space: nowrap; }
.engine-seat-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: #fff; font-size: 11px; font-weight: 600; }
.engine-team { flex: none; padding: 0 4px; border-radius: 3px; background: rgba(0,0,0,.35); }
.engine-faction, .engine-lord { flex: none; display: inline-grid; place-items: center; min-width: 15px; height: 15px; border-radius: 3px; background: rgba(0,0,0,.4); color: #fff; font: 700 11px/1 'Songti SC', 'STSong', serif; font-style: normal; }
.engine-lord { background: #f2cf7d; color: #4a2d05; }
.engine-faction.is-pending { background: var(--camp); box-shadow: 0 0 0 1px #fff; animation: gz-pending-wild 1.6s ease-in-out infinite alternate; }
@keyframes gz-pending-wild { from { opacity: 1; } to { opacity: .45; } }
.gz-generals { position: absolute; inset: 19px 0 0 var(--hp-col); display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border-radius: 0 0 4px 4px; background: #000; }
.gz-general { position: relative; min-width: 0; min-height: 0; background: linear-gradient(180deg, #252c33, #0c0f12); }
/* 立绘是浅色水墨风，深色牌桌上显得发白：统一提对比度和饱和度（2026-11-24 用户要求）。 */
.gz-portrait { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; filter: contrast(1.35) saturate(1.4) brightness(.8); }
.gz-general-name { position: absolute; top: 3px; left: 2px; max-height: 72%; padding: 3px 1px; overflow: hidden; border-radius: 2px; background: rgba(0,0,0,.55); color: #fff; font: 600 clamp(10px, calc(1.1 * var(--vw)), 14px)/1.05 'Songti SC', 'STSong', 'SimSun', serif; writing-mode: vertical-rl; letter-spacing: .06em; }
/* 按武将牌自身的势力凸显颜色（2026-11-24 用户建议）：内框、底部一层淡势力色、名字底条用势力色。
   双势力武将只用第一势力的色，第二势力不画（上下各半、下沿细边都不要，用户定）。阵亡后不上色。 */
.gz-general.has-camp::before { content: ''; position: absolute; z-index: 1; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 2px var(--camp);
  background: linear-gradient(0deg, color-mix(in srgb, var(--camp) var(--wash, 55%), transparent), transparent 42%); }
/* 蜀的红叠在偏红的立绘上太重，色带淡很多（用户定 2026-11-24）。 */
.gz-general.has-camp.faction-shu { --wash: 18%; }
/* 立绘有 filter，会单独成层：名字和角标显式排在色带之上。 */
.gz-general.has-camp .gz-general-name, .gz-general.has-camp .gz-general-badge { z-index: 2; }
.gz-general.has-camp .gz-general-name { background: linear-gradient(180deg, var(--camp-deep), color-mix(in srgb, var(--camp-deep) 70%, #000)); box-shadow: inset 0 0 0 1px var(--camp); }
.gz-seat.is-dead .gz-general.has-camp::before { display: none; }
.gz-seat.is-dead .gz-general.has-camp .gz-general-name { background: rgba(0,0,0,.55); box-shadow: none; }
.gz-general.is-down { display: grid; place-items: center; align-content: center; gap: 2px; }
.gz-unknown { color: #d2b877; font: 700 clamp(20px, calc(2.6 * var(--vw)), 34px)/1 serif; opacity: .8; }
.gz-general.is-soldier { display: grid; place-items: center; align-content: center; gap: 2px; background: linear-gradient(180deg, #3a3326, #16130d); }
.gz-general.is-soldier.is-female { background: linear-gradient(180deg, #3d2a33, #170e12); }
.gz-soldier-name { color: #e8d6a6; font: 700 clamp(11px, calc(1.2 * var(--vw)), 15px)/1.1 'Songti SC', 'STSong', 'SimSun', serif; writing-mode: vertical-rl; letter-spacing: .1em; }
.gz-general.is-soldier em { color: #8b949c; font-size: 10px; font-style: normal; }
/* 有卡面的士兵牌（AI 绘制，scripts/build-soldier-art.py）：照普通武将的立绘排；原图已是深色厚涂，不再提对比度。 */
.gz-general.is-soldier.has-art { display: block; background: #0c0f12; }
.gz-general.is-soldier.has-art .gz-portrait { filter: none; }
.gz-general.is-soldier.has-art .gz-soldier-name { font-size: clamp(10px, calc(1.1 * var(--vw)), 14px); }
/* 暗置（只有自己看得到）：压暗而不是半透明，半透明在深底上会发灰发白。 */
.gz-general.is-own-down .gz-portrait, .gz-general.is-seen .gz-portrait { filter: contrast(1.3) saturate(1.2) brightness(.58); }
.gz-general-badge { position: absolute; top: 2px; right: 2px; display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: #11161a; border: 1px solid #c9b27a; color: #e8d6a6; font-size: 9px; }
.gz-general-badge.is-seen { border-color: #7fd8c0; color: #a8ecd9; }
/* 限定技标记（武将牌右上角、角标下面，标记名即技能名）：没用过红底亮字，用过压暗、划掉。 */
.gz-limit-marks { position: absolute; z-index: 2; right: 2px; top: 20px; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; pointer-events: none; }
.gz-limit-mark { display: flex; align-items: center; gap: 2px; padding: 1px 4px; border: 1px solid #f0c9a8; border-radius: 3px; background: linear-gradient(180deg, #b3261e, #7d1510); color: #fff4e4; font: 700 clamp(10px, calc(1 * var(--vw)), 13px)/1.15 'Songti SC', 'STSong', 'SimSun', serif; white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,.6); }
.gz-limit-mark.is-spent { border-color: #5d6268; background: rgba(28,31,35,.9); color: #b4b9bf; text-decoration: line-through 2px #e0e3e6; box-shadow: none; }
.gz-seat-stats { position: absolute; z-index: 3; left: 0; bottom: 2px; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.gz-hp { display: flex; flex-direction: column-reverse; gap: 2px; width: var(--hp-col); padding: 2px 0; align-items: center; }
.gz-hp i { display: block; width: var(--hp-dot); height: var(--hp-dot); border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: #2c3137; }
.gz-hp.is-ok i.on { background: radial-gradient(circle at 35% 30%, #b8ffc4, #35c15a); border-color: #dfffe5; }
.gz-hp.is-mid i.on { background: radial-gradient(circle at 35% 30%, #fff0a8, #e5b21d); border-color: #fff6cf; }
.gz-hp.is-low i.on { background: radial-gradient(circle at 35% 30%, #ffc0b3, #e2402f); border-color: #ffe0d9; }
.gz-hp.is-number { flex-direction: row; width: auto; padding: 1px 5px; border-radius: 7px; background: rgba(0,0,0,.6); color: #ff9d8d; font-size: 11px; white-space: nowrap; }
.gz-hand-count { display: grid; place-items: center; min-width: 19px; height: 22px; padding: 0 3px; border: 1px solid #6b4f22; border-radius: 3px; background: linear-gradient(180deg, #f4e9cf, #d8c59a); color: #2a1d0c; font-size: 12px; font-weight: 800; }
.engine-chain { color: #c9d6e2; font-size: 12px; }
/* 座位底部：技能签在上、装备在下，整块贴着底边。 */
.gz-seat-foot { position: absolute; z-index: 3; left: 24px; right: 2px; bottom: 2px; display: flex; flex-direction: column; gap: 2px; pointer-events: none; }
.gz-seat-foot > * { pointer-events: auto; }
.gz-gear { display: flex; flex-direction: column; gap: 1px; }
.gz-gear-line { display: block; padding: 0 3px; overflow: hidden; border-radius: 2px; background: rgba(0,0,0,.74); color: #fbf4e2; font-size: clamp(10px, calc(1.05 * var(--vw)), 13px); font-weight: 600; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
/* 技能签：主将一列在左、副将一列在右；悬停（触屏点一下）弹出原文。 */
.gz-seat-skills { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 2px; pointer-events: none; }
.gz-skill-col { display: flex; flex-wrap: wrap; align-content: flex-end; gap: 2px; min-width: 0; }
.gz-skill-col.is-deputy { justify-content: flex-end; }
.gz-skill { position: relative; padding: 0 4px; border: 1px solid rgba(255,226,160,.75); border-radius: 3px; background: rgba(28,18,6,.86); color: #ffe7b0; font: 700 clamp(10px, calc(1.05 * var(--vw)), 13px)/1.35 'Songti SC', 'STSong', 'SimSun', serif; white-space: nowrap; cursor: help; pointer-events: auto; box-shadow: 0 1px 3px rgba(0,0,0,.6); }
.gz-skill.is-locked { border-color: rgba(150,196,255,.8); color: #dbe9ff; }
.gz-skill.is-special { border-color: #ffd36b; background: rgba(90,32,14,.9); color: #fff0c4; }
.gz-skill.is-spent { border-color: #6c7682; background: rgba(20,22,26,.85); color: #8b949c; text-decoration: line-through; }
.gz-skill:focus-visible { outline: 2px solid #ffd76a; outline-offset: 1px; }
.gz-skill-tip { display: none; position: absolute; z-index: 80; bottom: calc(100% + 6px); left: 0; width: max-content; max-width: min(300px, calc(70 * var(--vw))); padding: 7px 10px; border: 1px solid rgba(232,196,120,.7); border-radius: 6px; background: rgba(14,18,22,.97); color: #efe6d2; font: 400 13px/1.55 system-ui, sans-serif; text-decoration: none; white-space: normal; box-shadow: 0 6px 24px rgba(0,0,0,.75); pointer-events: none; }
.gz-skill-tip.is-right { left: auto; right: 0; }
.gz-skill-tip b { margin-right: 6px; color: #ffd98a; font: 700 14px/1.4 'Songti SC', 'STSong', serif; }
.gz-skill-tip em { margin-right: 6px; padding: 0 5px; border-radius: 3px; background: #5a3a12; color: #ffe2a0; font-size: 11px; font-style: normal; }
.gz-skill-tip span { display: block; margin-top: 3px; }
.gz-skill:is(:hover, :focus) > .gz-skill-tip { display: block; }
/* 弹出说明时这个座位提到最上层（不被后面的座位压住）。 */
.gz-seat:has(.gz-skill:is(:hover, :focus)) { z-index: 70; }
.gz-seat-foot:has(.gz-skill:is(:hover, :focus)) { z-index: 75; }
.gz-gear-line b { margin-right: 3px; color: #dfe5ea; font-weight: 600; }
.gz-gear-line.red b { color: #ff8b7a; }
/* 技能视为装备（八阵、庸肆）：淡色虚线框，和实体装备区别开。 */
.gz-gear-line.is-virtual { background: rgba(0,0,0,.48); border: 1px dashed rgba(241,234,216,.5); color: rgba(241,234,216,.72); font-style: italic; }
.gz-gear-line.is-virtual b { color: rgba(223,229,234,.6); font-weight: 500; font-size: .9em; }
/* 距离标注：写在装备行右端（放在牌名前面，浮到右边，牌名太长时省略的是牌名）。 */
.gz-reach { float: right; margin-left: 3px; padding: 0 3px; border-radius: 2px; font-style: normal; font-weight: 800; }
.gz-reach.is-plus { background: #2f7d46; color: #e6ffe9; }
.gz-reach.is-minus { background: #9a3a22; color: #ffe8e0; }
.gz-reach.is-range { background: #6b5a24; color: #fff3c8; }
.gz-reach-chips { display: flex; gap: 2px; }
.gz-reach-chip { padding: 0 4px; border-radius: 2px; font-size: clamp(9px, calc(.95 * var(--vw)), 11px); font-weight: 800; line-height: 1.45; }
.gz-reach-chip.is-plus { background: #2f7d46; color: #e6ffe9; }
.gz-reach-chip.is-minus { background: #9a3a22; color: #ffe8e0; }
.gz-reach-chip.is-range { background: #6b5a24; color: #fff3c8; }
/* 队列、围攻：座位标题上的小牌子，随局势重算。 */
.gz-rel { flex: none; display: inline-grid; grid-auto-flow: column; place-items: center; min-width: 15px; height: 15px; padding: 0 2px; border-radius: 3px; background: var(--camp, #555); box-shadow: 0 0 0 1px rgba(255,255,255,.85); color: #fff; font: 700 10px/1 'Songti SC', 'STSong', serif; font-style: normal; }
.gz-rel sub { font-size: 8px; vertical-align: baseline; }
.gz-rel.is-siege { box-shadow: 0 0 0 1px #ffd36b; }
.gz-rel.is-besieged { background: #c0261a; box-shadow: 0 0 0 1px #ffd0c8; animation: gz-pending-wild 1.6s ease-in-out infinite alternate; }
.gz-judgment { position: absolute; z-index: 4; top: 40%; right: 3px; display: flex; flex-direction: column; gap: 4px; }
.gz-judgment-card { display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid #5a3c0b; border-radius: 50%; background: #f0c64e; color: #3a2503; font: 700 19px/1 serif; box-shadow: 0 1px 4px rgba(0,0,0,.6); }
/* 武将牌上的牌（创、田、千幻…）和武将牌旁的武将牌（戮、魂）：立绘左上角一列小牌签。 */
.gz-piles { position: absolute; z-index: 4; top: 21px; left: calc(var(--hp-col) + 2px); right: 26px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; pointer-events: auto; }
.gz-pile { display: inline-flex; align-items: center; gap: 3px; max-width: 100%; padding: 1px 4px; overflow: hidden; border: 1px solid #c9a35a; border-radius: 3px; background: rgba(32,20,6,.86); color: #fbe9c8; font-size: 11px; line-height: 1.25; white-space: nowrap; }
.gz-pile b { color: #ffd27a; font-weight: 800; }
.gz-pile small { padding: 0 3px; border-radius: 6px; background: #7a5a24; color: #fff3d6; font-size: 10px; font-weight: 800; }
.gz-pile-faces { overflow: hidden; text-overflow: ellipsis; }
.gz-pile.is-secret { border-style: dashed; background: rgba(18,24,34,.86); }
.gz-seat-extras { position: absolute; z-index: 3; top: 21px; right: 2px; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.engine-markers { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.engine-markers { flex-direction: row; }
.engine-marker { position: relative; display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid #5a3c0b; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe9a8, #e0a92c); color: #3a2503; font: 700 10px/1 'Songti SC', 'STSong', serif; box-shadow: 0 1px 3px rgba(0,0,0,.6); }
.engine-marker.marker-yinYangFish { background: radial-gradient(circle at 35% 30%, #fff, #b9c4cf); }
.engine-marker.marker-linked { background: radial-gradient(circle at 35% 30%, #d6ffe6, #49b97c); }
.engine-marker.marker-wild { background: radial-gradient(circle at 35% 30%, #f0d6ff, #9a4fc4); color: #fff; border-color: #3e1757; }
.engine-marker svg { width: 100%; height: 100%; padding: 1px; border-radius: 50%; box-sizing: border-box; }
.engine-marker sub { position: absolute; right: -4px; bottom: -4px; min-width: 10px; padding: 0 1px; border-radius: 5px; background: #1b2126; color: #fff; font: 700 8px/10px sans-serif; text-align: center; }
.engine-seat-tags { position: absolute; z-index: 5; left: 50%; bottom: -19px; display: flex; gap: 3px; translate: -50% 0; white-space: nowrap; }
.gz-seat-self .engine-seat-tags, .gz-seat-left .engine-seat-tags, .gz-seat-right .engine-seat-tags { top: -19px; bottom: auto; }
.engine-seat-tags span { padding: 1px 7px; border-radius: 9px; background: #1b2126; border: 1px solid rgba(255,255,255,.35); color: #e8edf2; font-size: 10px; }
.engine-seat-tags .is-phase { background: #2460c4; border-color: #9cc3ff; color: #fff; font-weight: 700; }
.engine-seat-tags .is-thinking { border-color: #ffd76a; color: #ffe9a8; }
.engine-seat-tags .is-win { background: #d9a520; color: #2a1d0c; font-weight: 700; }
/* 离线、已离开：不写字，一枚灰色圆标加一道斜线（"断开"），说明在 title 里。 */
.engine-seat-tags .is-off { width: 14px; height: 14px; padding: 0; border-color: #7d868e; background: linear-gradient(135deg, transparent 43%, #aab3bb 43% 57%, transparent 57%), #2a3036; box-sizing: border-box; }
.engine-seat-pick { position: absolute; z-index: 5; left: 50%; top: 50%; max-width: 96%; padding: 2px 8px; translate: -50% -50%; border-radius: 10px; background: rgba(20,14,4,.88); border: 1px solid #ffd76a; color: #ffe9a8; font-size: 10px; text-align: center; }
.gz-dead-stamp { position: absolute; z-index: 4; left: 50%; top: 55%; padding: 2px 8px; translate: -50% -50%; rotate: -16deg; border: 3px solid #e2402f; border-radius: 6px; color: #ff5a48; background: rgba(30,6,4,.55); font: 900 clamp(15px, calc(2 * var(--vw)), 27px)/1.1 'Songti SC', 'STSong', serif; letter-spacing: .15em; white-space: nowrap; }
.gz-seat.is-dead { border-color: #4d545c; }
.gz-seat.is-dead .gz-portrait { filter: grayscale(1) brightness(.5); }
.gz-seat.is-dead .gz-seat-head { background: #3a4047; }
.gz-seat.is-you { box-shadow: 0 0 0 2px #e8c478, 0 4px 14px rgba(0,0,0,.5); }
.gz-seat.is-current { box-shadow: 0 0 0 2px #8dff9a, 0 0 20px 5px rgba(96,255,124,.7); }
.gz-seat.is-waiting:not(.is-current) { box-shadow: 0 0 0 2px #ffd76a, 0 0 14px 2px rgba(255,215,106,.55); }
/* 濒死"救我"（用户参考图定 2026-11-24）：立绘压暗加红色暗角，竖排两个红色楷体大字，水平垂直居中、不倾斜（用户定），像盖上去的印。
   按用户偏好素净：不加金框、花纹和黄底。字号按立绘区大小（容器查询单位）自适应；盖在立绘上、体力和手牌数之下。
   不挡悬停放大：pointer-events 关掉；只给自己和字加动画，不碰座位的 transform / filter。 */
.gz-seat.is-dying .gz-generals { box-shadow: inset 0 0 0 2px rgba(226,64,47,.85); }
.gz-dying { position: absolute; z-index: 2; inset: 19px 0 0 var(--hp-col); display: block; overflow: hidden; border-radius: 0 0 4px 4px; container-type: size; pointer-events: none;
  background: radial-gradient(ellipse 80% 75% at 55% 48%, rgba(0,0,0,0) 35%, rgba(60,4,2,.38) 75%, rgba(96,8,4,.62)), rgba(0,0,0,.4);
  animation: gz-dying-dim .3s ease-out both; }
.gz-dying b { position: absolute; top: 50%; left: 50%; translate: -50% -50%; writing-mode: vertical-rl; white-space: nowrap;
  color: #ff2a1a; font: 900 clamp(26px, calc(3.4 * var(--vw)), 52px)/1 'Kaiti SC', 'STKaiti', 'KaiTi', serif; font-size: min(36cqw, 30cqh); letter-spacing: .04em;
  -webkit-text-stroke: 1px #3a0402; paint-order: stroke fill;
  text-shadow: 0 0 2px #2a0201, 1px 2px 0 #3a0402, 0 0 8px rgba(255,40,20,.6), 0 0 18px rgba(255,30,10,.35);
  animation: gz-dying-stamp .42s .05s cubic-bezier(.3,1.5,.5,1) both, gz-dying-breathe 2.8s .5s ease-in-out infinite alternate; }
@keyframes gz-dying-dim { from { opacity: 0; } to { opacity: 1; } }
@keyframes gz-dying-stamp { 0% { opacity: 0; scale: 1.9; } 60% { opacity: 1; scale: .94; } 100% { opacity: 1; scale: 1; } }
@keyframes gz-dying-breathe { from { filter: brightness(1); } to { filter: brightness(1.15) drop-shadow(0 0 5px rgba(255,40,20,.45)); } }
.gz-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) { .gz-dying, .gz-dying b { animation: none; } }
.gz-seat.is-chained .gz-generals { box-shadow: inset 0 0 0 2px #b9c7d6; }
/* 连环的铁索：和立绘同一块区域，盖在上面；不挡点击和悬停放大。只用 opacity 做出现动画（transform 会让放大图错位）。 */
.gz-chain { position: absolute; z-index: 3; inset: 19px 0 0 var(--hp-col); display: block; pointer-events: none; filter: drop-shadow(0 2px 2px rgba(0,0,0,.7)); animation: gz-chain-in .35s ease-out; }
.gz-chain svg { display: block; width: 100%; height: 100%; }
@keyframes gz-chain-in { from { opacity: 0; } to { opacity: 1; } }
.gz-seat.is-left { opacity: .7; }
/* 叠置（翻面）：立绘压暗，盖一个蓝灰色印章。 */
.gz-seat.is-folded .gz-portrait { filter: grayscale(.85) brightness(.42); }
.gz-seat.is-folded .gz-generals { box-shadow: inset 0 0 0 3px #6f8fb3; }
/* 已投降（还活着，本回合结束时阵亡）：立绘压暗，盖一个灰白"投降"印。按用户偏好素净：不加金框、花纹和黄底。 */
.gz-seat.is-surrendered .gz-portrait { filter: grayscale(.75) brightness(.6); }
.gz-surrender-stamp { position: absolute; z-index: 4; left: calc(50% + var(--hp-col) / 2); top: 55%; padding: 2px 8px; translate: -50% -50%; rotate: -12deg; border: 3px solid #c3c9cf; border-radius: 6px; color: #eef1f4; background: rgba(18,22,26,.68); font: 900 clamp(15px, calc(2 * var(--vw)), 27px)/1.1 'Songti SC', 'STSong', serif; letter-spacing: .15em; white-space: nowrap; pointer-events: none; }
.engine-prompt.is-surrendered strong { color: #c9ced4; }
.gz-fold-stamp { position: absolute; z-index: 4; left: calc(50% + var(--hp-col) / 2); top: 52%; padding: 2px 8px; translate: -50% -50%; rotate: 12deg; border: 3px solid #8fb4dd; border-radius: 6px; color: #d6e8ff; background: rgba(10,22,40,.72); font: 900 clamp(14px, calc(1.8 * var(--vw)), 24px)/1.1 'Songti SC', 'STSong', serif; letter-spacing: .15em; white-space: nowrap; pointer-events: none; }
/* 酒（用户定 2026-11-29，选酒坛图标）：喝酒时武将牌正中浮起一个简笔酒坛，晃一下再淡出（约 1.8s，.gz-wine-fx）；
   醉酒期间（下一张杀还没用、本回合没结束）两张武将牌中缝顶上挂一个小酒坛（右上角让给"暗"字角标）（.gz-tipsy）。不刷底色、不加金框。不挡点击和悬停放大。 */
.gz-wine-fx svg, .gz-tipsy svg { display: block; width: 100%; height: 100%; overflow: visible; }
.gz-wine-fx .jar-body, .gz-tipsy .jar-body { fill: #6e3d22; stroke: #241008; stroke-width: 1.6; }
.gz-wine-fx .jar-neck, .gz-tipsy .jar-neck { fill: #4f2a17; stroke: #241008; stroke-width: 1.2; }
.gz-wine-fx .jar-cloth, .gz-tipsy .jar-cloth { fill: #a8302a; stroke: #4a0d09; stroke-width: 1.2; }
.gz-wine-fx .jar-tie, .gz-tipsy .jar-tie { fill: #4a0d09; }
.gz-wine-fx .jar-shine, .gz-tipsy .jar-shine { fill: rgba(255,226,190,.22); }
.gz-wine-fx .jar-label, .gz-tipsy .jar-label { fill: #c63a2c; stroke: #5e100b; stroke-width: 1; }
.gz-wine-fx text, .gz-tipsy text { fill: #fff2df; font: 900 11px/1 'KaiTi', 'STKaiti', serif; }
.gz-tipsy { position: absolute; z-index: 3; top: 22px; left: calc(50% + var(--hp-col) / 2); translate: -50% 0; width: clamp(18px, 24%, 34px); aspect-ratio: 60 / 70; pointer-events: none; filter: drop-shadow(0 1px 2px rgba(0,0,0,.85)); animation: gz-chain-in .4s ease-out; }
.gz-wine-fx { position: absolute; z-index: 7; left: calc(50% + var(--hp-col) / 2); top: calc(50% + 8px); width: clamp(40px, 42%, 84px); aspect-ratio: 60 / 70; translate: -50% -50%; transform-origin: 50% 90%; pointer-events: none; opacity: 0; filter: drop-shadow(0 3px 6px rgba(0,0,0,.8)); animation: gz-wine-jar 1.8s ease-out both; }
@keyframes gz-wine-jar { 0% { opacity: 0; translate: -50% -20%; rotate: 0deg; } 14% { opacity: 1; translate: -50% -50%; rotate: 0deg; } 26% { rotate: -12deg; } 38% { rotate: 9deg; } 50% { rotate: -5deg; } 60% { rotate: 0deg; } 80% { opacity: 1; translate: -50% -50%; } 100% { opacity: 0; translate: -50% -75%; } }
@media (prefers-reduced-motion: reduce) { .gz-wine-fx { animation-duration: .01s; } .gz-tipsy { animation: none; } }
/* 被调虎离山：两张武将牌压暗（半透明黑层淡入），上方盖朱红"被调虎"印。只遮立绘，悬停仍可看大图。 */
.gz-away { position: absolute; inset: 0; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; pointer-events: none; }
.gz-away i { display: block; background: rgba(0,0,0,.62); animation: gz-away-dim .5s ease-out both; }
@keyframes gz-away-dim { from { opacity: 0; } to { opacity: 1; } }
.gz-away b { position: absolute; left: 50%; top: 30%; padding: 3px 7px; translate: -50% -50%; rotate: -10deg; border: 3px double #ffb39c; border-radius: 6px; background: rgba(120,20,12,.86); color: #fff1e6; font: 900 clamp(13px, calc(1.6 * var(--vw)), 21px)/1.1 'Songti SC', 'STSong', serif; letter-spacing: .12em; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.6); animation: gz-away-stamp .35s .45s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes gz-away-stamp { from { opacity: 0; scale: 1.8; } to { opacity: 1; scale: 1; } }
/*
 * 君主指示物旗：插在君主座位右上角，旗杆底端落在标题栏上。出现时旗杆升起、旗面从旗杆一侧展开、
 * 脚下荡开一圈光环；之后旗面一直轻轻摆动。起作用时（.gz-flag-burst，换 data-key 重播）放两圈光波。
 */
.gz-lordflag { --flag: #c8a55a; position: absolute; z-index: 6; right: 6px; bottom: calc(100% - 26px); width: 40px; height: 64px; cursor: help; transform-origin: 15% 100%; filter: drop-shadow(0 3px 3px rgba(0,0,0,.65)); animation: gz-flag-rise .7s cubic-bezier(.2,1.5,.4,1) both; }
.gz-lordflag.is-shu { --flag: #ff5a4a; }
.gz-lordflag.is-wei { --flag: #5b9bff; }
.gz-lordflag.is-qun { --flag: #e8c26a; }
.gz-lordflag.is-wu { --flag: #45d07c; }
.gz-lordflag:focus-visible { outline: 2px solid var(--flag); outline-offset: 2px; border-radius: 4px; }
.gz-flag-art { display: block; width: 100%; height: 100%; overflow: visible; animation: gz-flag-flash 1s .55s ease-out both, gz-flag-aura 3.2s 1.6s ease-in-out infinite alternate; }
.gz-flag-cloth { transform-box: view-box; transform-origin: 6px 22px; animation: gz-flag-unfurl .55s .35s cubic-bezier(.3,1.3,.5,1) both, gz-flag-wave 2.4s 1s ease-in-out infinite alternate; }
.gz-flag-fire { animation: gz-flag-unfurl .55s .35s cubic-bezier(.3,1.3,.5,1) both, gz-flag-wave 2.4s 1s ease-in-out infinite alternate, gz-flag-flicker .5s ease-in-out infinite alternate; }
.gz-flag-ring { position: absolute; left: 15%; bottom: 0; width: 12px; height: 5px; border: 2px solid var(--flag); border-radius: 50%; translate: -50% 50%; opacity: 0; pointer-events: none; animation: gz-flag-shock .9s .45s ease-out both; }
.gz-flag-count { position: absolute; top: 4px; right: -6px; display: grid; place-items: center; min-width: 15px; height: 15px; padding: 0 2px; border: 1px solid rgba(255,255,255,.85); border-radius: 8px; background: #1b2126; color: #fff; font: 800 10px/1 system-ui, sans-serif; box-shadow: 0 0 6px var(--flag); animation: gz-flag-pop .45s cubic-bezier(.3,1.8,.5,1) both; }
.gz-flag-count.is-zero { opacity: .55; box-shadow: none; }
.gz-flag-burst { position: absolute; left: 50%; top: 40%; width: 0; height: 0; pointer-events: none; }
.gz-flag-burst i { position: absolute; left: -16px; top: -16px; width: 32px; height: 32px; border: 3px solid var(--flag); border-radius: 50%; opacity: 0; box-shadow: 0 0 10px var(--flag), inset 0 0 8px var(--flag); animation: gz-flag-wave-out .9s ease-out both; }
.gz-flag-burst i + i { animation-delay: .22s; }
.gz-flag-tip { font-style: normal; }
.gz-flag-tip > b { color: #fff; }
.gz-lordflag:is(:hover, :focus) > .gz-flag-tip { display: block; }
.gz-seat-top .gz-flag-tip { top: calc(100% + 6px); bottom: auto; }
.gz-seat-left .gz-flag-tip { left: 0; right: auto; }
.gz-seat:has(.gz-lordflag:is(:hover, :focus)) { z-index: 70; }
/* 得到指示物技能的角色：座位中间浮起一条"纛·突袭"，飘高淡出。 */
.gz-flag-gift { --flag: #c8a55a; position: absolute; z-index: 7; left: calc(50% + var(--hp-col) / 2); top: 46%; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 3px; translate: -50% -50%; border: 1px solid var(--flag); border-radius: 14px; background: rgba(10,14,20,.9); color: #fff; font: 800 clamp(11px, calc(1.2 * var(--vw)), 15px)/1.2 'Songti SC', 'STSong', serif; white-space: nowrap; box-shadow: 0 0 14px var(--flag); pointer-events: none; animation: gz-flag-gift 2.6s ease-out both; }
.gz-flag-gift small { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--flag); color: #10141a; font-size: 12px; }
.gz-flag-gift.is-shu { --flag: #ff5a4a; }
.gz-flag-gift.is-wei { --flag: #5b9bff; }
.gz-flag-gift.is-qun { --flag: #e8c26a; }
.gz-flag-gift.is-wu { --flag: #45d07c; }
@keyframes gz-flag-rise { from { opacity: 0; translate: 0 26px; scale: 1 .2; } to { opacity: 1; translate: 0 0; scale: 1 1; } }
@keyframes gz-flag-unfurl { from { scale: 0 1; } to { scale: 1 1; } }
@keyframes gz-flag-wave { from { transform: skewY(-3.5deg) scaleX(.93); } to { transform: skewY(3deg) scaleX(1); } }
@keyframes gz-flag-flicker { from { opacity: .7; } to { opacity: 1; } }
@keyframes gz-flag-flash { 0% { filter: brightness(1); } 25% { filter: brightness(2.2) drop-shadow(0 0 8px var(--flag)); } 100% { filter: brightness(1) drop-shadow(0 0 2px var(--flag)); } }
@keyframes gz-flag-aura { from { filter: drop-shadow(0 0 2px var(--flag)); } to { filter: drop-shadow(0 0 7px var(--flag)); } }
@keyframes gz-flag-shock { 0% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: 9 7; } }
@keyframes gz-flag-pop { from { scale: 1.9; } to { scale: 1; } }
@keyframes gz-flag-wave-out { 0% { opacity: 1; scale: .4; } 100% { opacity: 0; scale: 3.2; } }
@keyframes gz-flag-gift { 0% { opacity: 0; scale: .5; margin-top: 10px; } 12% { opacity: 1; scale: 1.12; margin-top: 0; } 22% { scale: 1; } 78% { opacity: 1; margin-top: -10px; } 100% { opacity: 0; margin-top: -26px; } }
@media (prefers-reduced-motion: reduce) {
  .gz-lordflag, .gz-flag-art, .gz-flag-cloth, .gz-flag-fire, .gz-flag-count { animation: none; }
  .gz-flag-ring { display: none; }
}
/* 最近一次操作："谁对谁"。出手者金框加气泡，目标红框加"目标"，响应者蓝色气泡；连线见 .gz-arrows。 */
.gz-seat.is-actor { outline: 3px solid #ffcf4a; outline-offset: 1px; }
.gz-seat.is-target { outline: 3px solid #ff5a48; outline-offset: 1px; }
.gz-act { position: absolute; z-index: 6; left: 50%; top: 22px; max-width: 132%; padding: 3px 10px; translate: -50% 0; overflow: hidden; border-radius: 12px; border: 1px solid #fff2c2; background: linear-gradient(180deg, #ffd765, #d99a1e); color: #2a1a02; font: 800 clamp(12px, calc(1.25 * var(--vw)), 15px)/1.25 'Kaiti SC', 'STKaiti', 'KaiTi', serif; text-overflow: ellipsis; white-space: nowrap; box-shadow: 0 2px 10px rgba(0,0,0,.7), 0 0 14px rgba(255,200,70,.75); pointer-events: none; animation: gz-act-in .3s ease-out, gz-act-settle .6s ease-in 4s forwards; }
.gz-act.is-reply { border-color: #d6efff; background: linear-gradient(180deg, #8fd3ff, #2f7fc4); color: #04203a; box-shadow: 0 2px 10px rgba(0,0,0,.7), 0 0 14px rgba(90,180,255,.75); }
.gz-act.is-skill { border-color: #ffe0d0; background: linear-gradient(180deg, #ffb48a, #c8562a); color: #2a0c02; font-size: clamp(13px, calc(1.45 * var(--vw)), 17px); box-shadow: 0 2px 10px rgba(0,0,0,.7), 0 0 18px rgba(255,140,80,.85); }
@keyframes gz-act-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes gz-act-settle { to { opacity: .82; box-shadow: 0 2px 6px rgba(0,0,0,.6); } }
/* 目标：红框之外只留右上角一枚小准星（红底白环），不写字。 */
.gz-aim { position: absolute; z-index: 6; right: -6px; top: -7px; width: 16px; height: 16px; border-radius: 50%; border: 1px solid #ffd0c8; background: radial-gradient(circle, #fff 0 2px, transparent 2.5px 4px, #fff 4.5px 5.5px, transparent 6px), #c0261a; box-shadow: 0 1px 6px rgba(0,0,0,.6); box-sizing: border-box; pointer-events: none; animation: gz-act-in .3s ease-out; }
.gz-board { position: relative; }
.gz-arrows { position: absolute; z-index: 30; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.gz-arrow { fill: none; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; animation: gz-arrow-draw .5s ease-out forwards, gz-arrow-gone .4s ease-in 2.5s forwards; }
.gz-arrow.is-main { stroke: #ffcf4a; filter: drop-shadow(0 0 4px rgba(255,190,60,.95)); }
.gz-arrow.is-reply { stroke: #6fc3ff; stroke-width: 4; filter: drop-shadow(0 0 4px rgba(90,180,255,.95)); }
.gz-arrow-head.is-main { fill: #ffcf4a; }
.gz-arrow-head.is-reply { fill: #6fc3ff; }
/* 发动技能指定角色的线：紫色，和用牌的金线分开（用户 2026-11-28）。 */
.gz-arrow.is-skill { stroke: #c98bff; filter: drop-shadow(0 0 4px rgba(190,120,255,.95)); }
.gz-arrow-head.is-skill { fill: #c98bff; }
@keyframes gz-arrow-draw { from { stroke-dashoffset: 100; opacity: .3; } to { stroke-dashoffset: 0; opacity: 1; } }
/* 画出 0.5 秒，全亮 2 秒，再 0.4 秒淡到看不见（用户 2026-11-29："亮 2 秒后完全消失"）。 */
@keyframes gz-arrow-gone { from { stroke-dashoffset: 0; opacity: 1; } to { stroke-dashoffset: 0; opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .gz-arrow { animation: gz-arrow-gone 0s linear 2.5s forwards; stroke-dashoffset: 0; }
  .gz-act, .gz-aim { animation: none; }
}
button.gz-seat.is-option { cursor: pointer; outline: 2px dashed #ffe08a; outline-offset: 2px; animation: gz-pulse 1.1s ease-in-out infinite alternate; }
button.gz-seat.is-selected { outline: 3px solid #ffd76a; animation: none; box-shadow: 0 0 22px 6px rgba(255,215,106,.85); }
@keyframes gz-pulse { from { outline-color: rgba(255,224,138,.35); } to { outline-color: #ffe08a; } }

/* 牌 */
.gz-card { position: relative; display: block; flex: none; width: var(--card-w); height: var(--card-h); padding: 0; border: 0; border-radius: 6.5% / 4.6%; background: #efe6cf; color: #241a10; font: inherit; box-shadow: 0 2px 8px rgba(0,0,0,.55); }
.gz-card-art { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; pointer-events: none; user-select: none; }
.gz-card-index { position: absolute; z-index: 1; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; width: calc(var(--card-w) * .23); padding: 6% 0 4%; border-radius: calc(var(--card-w) * .065) 0 6px 0; background: linear-gradient(180deg, rgba(247,240,220,.97), rgba(247,240,220,.9)); color: #17140f; font: 800 calc(var(--card-w) * .2)/1 'Georgia', 'Times New Roman', serif; pointer-events: none; transition: translate .12s; }
.gz-card-index b { font-weight: 800; letter-spacing: -.04em; }
.gz-card-index em { font-style: normal; font-size: .86em; line-height: 1.05; }
.gz-card-index.red { color: #c9281c; }
.gz-card-index i { margin-top: .25em; font: 700 .58em/1.02 'Noto Serif SC', 'Songti SC', 'SimSun', serif; font-style: normal; writing-mode: vertical-rl; letter-spacing: .02em; color: #17140f; white-space: nowrap; }
.gz-card-index.red i { color: #9d1d14; }
.gz-played .gz-card.is-past .gz-card-index i { display: none; }
.gz-played .gz-card-index { width: calc(var(--pw) * .25); font-size: calc(var(--pw) * .22); }
.gz-played .gz-card.is-past .gz-card-index { width: calc(var(--pw) * .68 * .25); font-size: calc(var(--pw) * .68 * .21); }
.gz-card:not(.has-art) { display: flex; flex-direction: column; justify-content: space-between; padding: 6px; border: 1px solid #8a6d3b; border-radius: 6px; text-align: left; }
.gz-card:not(.has-art) strong { font: 700 clamp(12px, calc(1.4 * var(--vw)), 17px)/1.15 'Songti SC', 'STSong', serif; }
.gz-card:not(.has-art).red .engine-card-corner { color: #c0392b; }
.engine-card-corner { font-size: 12px; font-weight: 700; }
.engine-card-type { color: #7a6a4e; font-size: 10px; }
.gz-zoom { display: none; position: fixed; z-index: 60; left: 50%; top: 44%; width: auto; height: min(calc(74 * var(--vh)), 600px); max-width: calc(94 * var(--vw)); translate: -50% -50%; border-radius: 14px; box-shadow: 0 0 0 2px rgba(255,255,255,.25), 0 16px 60px rgba(0,0,0,.8); pointer-events: none; }
/* 座位里带 z-index 的小区域（装备、判定、牌签、标记……）各自是一层：放大图在里面时，
   后面座位的标题栏会盖住它。悬停（触屏按住）期间把这一层和座位整个提到最上面。 */
@media (hover: hover) {
  .has-zoom:hover > .gz-zoom { display: block; animation: gz-zoom .16s .5s both; }
  .gz-seat:has(.has-zoom:hover), .gz-seat :has(> .has-zoom:hover), .gz-seat :has(> * > .has-zoom:hover) { z-index: 70; }
}
@media (hover: none) {
  .has-zoom:active > .gz-zoom { display: block; animation: gz-zoom .16s .35s both; }
  .gz-seat:has(.has-zoom:active), .gz-seat :has(> .has-zoom:active), .gz-seat :has(> * > .has-zoom:active) { z-index: 70; }
  .has-zoom { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
}
@keyframes gz-zoom { from { opacity: 0; } to { opacity: 1; } }

/* 选将：候选武将画牌面 */
.opening-candidates:has(.has-art) { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); }
.opening-candidate.has-art { display: flex; flex-direction: column; min-height: auto; height: max-content; padding: 6px; gap: 6px; border: 2px solid var(--camp); background: linear-gradient(180deg, var(--camp-deep), rgba(12,23,24,.9)); }
.opening-candidates:has(.has-art) { flex: none; overflow: visible; }
.opening-sheet { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); align-content: start; gap: 8px; padding: 2px 4px 4px 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #826745 transparent; }
.opening-sheet-item { padding: 7px 10px; border: 1px solid rgba(255,255,255,.1); border-left: 3px solid var(--camp); border-radius: 4px; background: rgba(8,17,18,.55); }
.opening-sheet-item.is-chosen { border-color: rgba(226,179,64,.6); border-left-color: var(--camp); background: rgba(60,48,24,.45); }
.opening-sheet-item h4 { display: flex; align-items: baseline; gap: 7px; margin: 0 0 4px; color: #f0d9aa; font-size: 14px; }
.opening-sheet-item h4 small { color: #8f9a93; font-size: 10px; font-weight: 400; }
.opening-sheet-role { padding: 0 6px; border-radius: 3px; background: #e2b340; color: #2a1d0c; font-size: 11px; font-style: normal; }
.opening-sheet-role.is-deputy { background: #5fc9a8; }
.opening-sheet-item p { margin: 2px 0 0; color: #c5c9b6; font-size: 11px; line-height: 1.55; }
.opening-sheet-item p strong { margin-right: 6px; color: #ffe2a7; }
.opening-art { position: relative; flex: none; }
.opening-art-img { display: block; width: 100%; height: auto; aspect-ratio: 837 / 1180; border-radius: 6px; object-fit: cover; }
.opening-art-badge { position: absolute; top: 6px; right: 6px; padding: 2px 10px; border-radius: 4px; background: #e2b340; color: #2a1d0c; font-size: 13px; font-weight: 800; box-shadow: 0 2px 8px rgba(0,0,0,.6); }
.opening-art-badge.is-deputy { background: #5fc9a8; }
.opening-candidate.has-art.chosen-main { box-shadow: 0 0 0 3px #e2b340, 0 0 18px rgba(226,179,64,.7); }
.opening-candidate.has-art.chosen-deputy { box-shadow: 0 0 0 3px #5fc9a8, 0 0 18px rgba(95,201,168,.6); }
.opening-candidate.has-art .opening-card-actions button { padding: 7px 2px; font-size: 13px; white-space: nowrap; }
/* 选将规则：一行五条，关键词金色。 */
.opening-rules { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 8px 0; padding: 0; list-style: none; }
.opening-rules li { padding: 2px 9px; border: 1px solid rgba(213,170,96,.3); border-radius: 12px; background: rgba(8,17,18,.55); color: #d7dccf; font-size: 12px; line-height: 1.5; }
.opening-rules b { margin-right: 5px; color: #f0c870; }
/* 牌上的提示：只能当主将/副将（左上），和已选那张配上后的结果（底部）。 */
.opening-role-tag { position: absolute; top: 6px; left: 6px; padding: 1px 7px; border-radius: 4px; background: rgba(10,14,18,.86); border: 1px solid rgba(240,200,112,.7); color: #f8dd9a; font-size: 12px; font-weight: 700; }
.opening-fit { position: absolute; left: 3px; right: 3px; bottom: 6px; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 5px; padding: 1px 2px; border-radius: 4px; background: rgba(20,70,40,.92); border: 1px solid #7fe39a; color: #eaffef; font-size: clamp(10px, calc(.95 * var(--vw)), 12px); font-weight: 700; line-height: 1.4; box-shadow: 0 2px 8px rgba(0,0,0,.6); }
.opening-fit i { font-style: normal; white-space: nowrap; }
.opening-fit.is-linked { background: rgba(110,70,10,.94); border-color: #ffd36b; color: #fff3cf; }
.opening-fit.is-unfit { background: rgba(30,30,34,.9); border-color: #6c7682; color: #aab3bb; font-weight: 500; }
.opening-candidate:not(.has-art) .opening-role-tag, .opening-candidate:not(.has-art) .opening-fit { position: static; align-self: flex-start; }
/* 可换君主的武将（刘备、曹操、孙权、张角）：左上角一条"君 主将可变君××"，势力色描边、慢慢呼吸发光；选为主将后变亮。 */
.opening-lord-tag { position: absolute; z-index: 2; top: 6px; left: 6px; display: inline-flex; align-items: center; gap: 4px; max-width: calc(100% - 12px); padding: 1px 7px 1px 1px; border: 1px solid var(--camp, #e8c478); border-radius: 11px; background: rgba(10,14,18,.9); color: #fff; font: 700 clamp(10px, calc(.95 * var(--vw)), 12px)/1.5 'Songti SC', 'STSong', serif; white-space: nowrap; cursor: help; animation: opening-lord-glow 2.2s ease-in-out infinite alternate; }
.opening-lord-tag b { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--camp, #e8c478); color: #fff; font-size: 11px; }
.opening-lord-tag.is-active { background: var(--camp-deep, #3a2a10); box-shadow: 0 0 10px var(--camp, #e8c478); animation: none; }
.opening-candidate:is(.chosen-main, .chosen-deputy) .opening-lord-tag { top: 34px; }
.opening-candidate:not(.has-art) .opening-lord-tag { position: static; align-self: flex-start; }
.opening-lord-note { padding: 1px 9px; border: 1px solid var(--camp, #e8c478); border-radius: 10px; background: rgba(10,14,18,.85); color: #fff; font-size: 13px; font-weight: 700; }
@keyframes opening-lord-glow { from { box-shadow: 0 0 2px var(--camp, #e8c478); } to { box-shadow: 0 0 9px var(--camp, #e8c478); } }
@media (prefers-reduced-motion: reduce) { .opening-lord-tag { animation: none; } }
.opening-candidate.is-unfit .opening-art-img { filter: grayscale(.85) brightness(.45); }
.opening-candidate.is-unfit { opacity: .78; }
.opening-candidate.is-fit { box-shadow: 0 0 0 2px rgba(127,227,154,.55); }
.opening-result { padding: 1px 9px; border-radius: 10px; background: rgba(20,70,40,.85); color: #eaffef; font-size: 13px; font-weight: 700; }
.opening-result.is-linked { background: rgba(110,70,10,.9); color: #fff3cf; }
.opening-next { color: #e8d7b0; font-size: 12px; }
/* 七张候选牌固定排成一行（换行后第二行会被裁掉）。 */
.opening-candidates:has(.has-art) { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.opening-candidate.has-art .opening-card-actions { gap: 3px; }
.opening-candidate.has-art .opening-card-actions button { min-width: 0; padding: 6px 0; font-size: clamp(11px, calc(1 * var(--vw)), 13px); }

/* 桌面中间 */
/* 桌面中间按自身高度排版（container），出牌区的牌在放得下的前提下尽量大，不再压到下面的提示条。 */
.gz-center { grid-area: center; position: relative; container-type: size; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; min-width: 0; min-height: 0; padding-top: 10px; }
.gz-banner { display: flex; flex-direction: column; align-items: center; gap: 2px; max-width: 100%; text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,.9); }
.gz-banner p { max-width: 100%; margin: 0; padding: 0 10px; overflow: hidden; border-radius: 10px; background: rgba(8,12,16,.5); color: #e6ecf2; font-size: 12.5px; line-height: 1.55; text-overflow: ellipsis; white-space: nowrap; }
.gz-banner p.is-latest { padding: 1px 16px; border-radius: 16px; background: rgba(8,12,16,.62); color: #d4ffd9; font: 600 clamp(15px, calc(1.7 * var(--vw)), 21px)/1.45 'Kaiti SC', 'STKaiti', 'KaiTi', serif; letter-spacing: .06em; white-space: normal; }
/* --pw：出牌区牌宽。高度不够时按中间区域剩下的高度缩小（减去技能条和记录行大约占的高度）。 */
.gz-played { --pw: max(44px, min(var(--play-w), calc((100cqh - 118px) / 1.405))); display: flex; justify-content: center; gap: 10px; min-height: 0; margin: auto 0; padding-bottom: 18px; }
.gz-center:not(:has(.gz-cast)) .gz-played { --pw: max(44px, min(var(--play-w), calc((100cqh - 76px) / 1.405))); }
.gz-played .gz-card { width: var(--pw); height: calc(var(--pw) * 1.405); }
.gz-played .gz-card.is-past { width: calc(var(--pw) * .68); height: calc(var(--pw) * .68 * 1.405); opacity: .6; }
/* 这次操作里最新的一张：金框发光。其余的牌照常亮着。 */
.gz-played .gz-card.is-newest { box-shadow: 0 0 0 3px #ffd36b, 0 0 18px 4px rgba(255,200,70,.7), 0 2px 8px rgba(0,0,0,.55); }
/* 牌下的名字条：谁使用、打出、弃置、判定的。 */
.gz-played-by { position: absolute; z-index: 2; left: 50%; top: calc(100% + 3px); translate: -50% 0; max-width: 140%; padding: 0 7px; overflow: hidden; border-radius: 9px; background: rgba(8,12,16,.85); color: #fff3d6; font-size: 12px; font-weight: 700; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.gz-played-by small { margin-left: 3px; color: #c9d3dc; font-size: 11px; font-weight: 500; }
.gz-played .gz-card.is-newest .gz-played-by { background: #8a5a12; color: #fff; }
.gz-played-as { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 1px 2px; border-radius: 0 0 6px 6px; background: rgba(140,30,20,.9); color: #fff; font-size: 12px; font-weight: 800; text-align: center; pointer-events: none; }
/* 变更副将亮出的武将牌：没有立绘时写武将名；成了新副将的那张金框。 */
.gz-played .gz-shown-general { position: relative; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: #2a2418; color: #f3e2b6; }
.gz-played .gz-shown-general:not(.is-chosen) { filter: brightness(.8); }
.gz-played .gz-shown-general.is-chosen { box-shadow: 0 0 0 3px #ffd36b, 0 0 18px 4px rgba(255,200,70,.7), 0 2px 8px rgba(0,0,0,.55); }
.gz-played .gz-shown-general.is-chosen .gz-played-by { background: #8a5a12; color: #fff; }
/* 牌多（展示整手牌、拼点加别的牌）时缩小一些，一行摆得下。 */
.gz-played.is-many { gap: 6px; }
.gz-played.is-many .gz-card { width: calc(var(--pw) * .78); height: calc(var(--pw) * .78 * 1.405); }
/* 拼点牌右上角的输赢。 */
.gz-played-result { position: absolute; z-index: 3; top: -6px; right: -6px; min-width: 22px; padding: 0 6px; border-radius: 10px; color: #fff; font-size: 13px; font-weight: 800; line-height: 1.6; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.5); pointer-events: none; }
.gz-played-result.is-win { background: #b8322a; }
.gz-played-result.is-lose { background: #4c5660; }
.gz-played-result.is-tie { background: #8a6a12; }
/* 没有实体牌的转化牌、视为使用的牌：写着牌名的虚线牌，角上是技能名。 */
.gz-played .gz-card.is-virtual { display: grid; place-items: center; align-content: center; gap: 4px; border: 2px dashed #c9a35a; background: linear-gradient(180deg, rgba(244,233,207,.92), rgba(220,203,161,.88)); }
.gz-card.is-virtual strong { color: #2a1d0c; font: 800 calc(var(--pw) * .3)/1 'Songti SC', 'STSong', 'SimSun', serif; }
.gz-card.is-virtual em { padding: 0 6px; border-radius: 8px; background: #7a1f1f; color: #fbe9c8; font-size: 12px; font-style: normal; font-weight: 700; }
/* 这次操作发动的技能：技能名大字，下面两行原文。 */
.gz-cast { display: flex; flex-direction: column; align-items: center; max-width: min(640px, 96%); padding: 3px 16px 4px; border: 1px solid rgba(255,180,120,.75); border-radius: 10px; background: linear-gradient(180deg, rgba(120,44,14,.92), rgba(70,24,8,.92)); box-shadow: 0 0 16px rgba(255,140,80,.45), 0 2px 8px rgba(0,0,0,.6); text-align: center; animation: gz-act-in .3s ease-out; }
.gz-cast p { margin: 0; color: #ffe9d6; font: 600 clamp(14px, calc(1.5 * var(--vw)), 18px)/1.4 'Kaiti SC', 'STKaiti', 'KaiTi', serif; }
.gz-cast p strong { margin-right: 4px; color: #fff; }
.gz-cast p b { color: #ffd36b; font-size: 1.15em; }
@container (max-height: 260px) { .gz-banner p:not(.is-latest):nth-child(n+3) { display: none; } }
@container (max-height: 190px) { .gz-banner p:not(.is-latest) { display: none; } }
/*
 * 拼点：三栏——左栏技能块（只留"谁发动【X】"）和最新一条记录，靠右；中栏两张拼点牌并排、中间写"拼点"；
 * 右栏提示。拼点牌按整个中间区域的高度定大小（以前文字占一行、牌区宽度又被文字那一行卡住，牌只有 52px 宽）。
 * 这次操作里别的牌缩小摆在旁边。放在矮屏规则后面，矮屏也这样排。
 */
.gz-center.is-pitting { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); justify-content: stretch; align-items: start; column-gap: 22px; row-gap: 4px; padding-top: 6px; }
.gz-center.is-pitting > .gz-cast { grid-column: 1; grid-row: 1; justify-self: end; padding: 2px 14px; white-space: nowrap; }
.gz-center.is-pitting > .gz-banner, .gz-center.is-pitting:not(:has(.gz-cast)) > .gz-banner { grid-column: 1; grid-row: 2; justify-self: stretch; align-items: flex-end; min-width: 0; max-width: 100%; text-align: right; }
.gz-center.is-pitting:not(:has(.gz-cast)) > .gz-banner { grid-row: 1; }
.gz-center.is-pitting .gz-banner p:not(.is-latest) { display: none; }
.gz-center.is-pitting .gz-banner p.is-latest { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gz-center.is-pitting > .gz-notes, .gz-center.is-pitting:not(:has(.gz-cast)) > .gz-notes { grid-column: 3; grid-row: 1 / -1; justify-self: start; max-width: 100%; }
.gz-center.is-pitting > .gz-played, .gz-center.is-pitting:not(:has(.gz-cast)) > .gz-played { grid-column: 2; grid-row: 1 / -1; align-self: start; align-items: center; margin: 0; padding: 6px 0 0; }
/* 牌高 = 中间区域高度 − 上边距和牌下名字条；宽不超过中间区域的一半（两张牌加中缝）。 */
/* 拼点牌宽定在出牌区上（不在 .gz-pit 上），同一次操作里摆在旁边的牌（烈刃的【杀】）按它的 0.6 倍，不至于小得看不清。 */
.gz-center.is-pitting > .gz-played.is-pitting { --pw: max(52px, min(calc(var(--play-w) * 1.7), calc((100cqh - 30px) / 1.405), calc((50cqw - 60px) / 2.3))); }
.gz-pit { display: flex; align-items: center; gap: max(14px, calc(var(--pw) * .2)); }
.gz-played.is-pitting .gz-pit .gz-card { width: var(--pw); height: calc(var(--pw) * 1.405); }
.gz-played.is-pitting > .gz-card.is-side { width: calc(var(--pw) * .6); height: calc(var(--pw) * .6 * 1.405); opacity: .85; }
.gz-pit-vs { color: #ffd36b; font: 800 clamp(16px, calc(var(--pw) * .2), 32px)/1 'Kaiti SC', 'STKaiti', 'KaiTi', serif; letter-spacing: .1em; writing-mode: vertical-rl; text-shadow: 0 0 10px rgba(255,170,60,.8), 0 2px 3px rgba(0,0,0,.9); }
/* 输赢：按牌宽放大的圆章，压在牌的右上角，白字加描边。 */
.gz-pit .gz-played-result { top: calc(var(--pw) * -.12); right: calc(var(--pw) * -.14); display: grid; place-items: center; width: max(30px, calc(var(--pw) * .4)); height: max(30px, calc(var(--pw) * .4)); min-width: 0; padding: 0; border: 3px solid #fff3d6; border-radius: 50%; font: 900 max(17px, calc(var(--pw) * .24))/1 'Kaiti SC', 'STKaiti', 'KaiTi', serif; text-shadow: 0 1px 2px rgba(0,0,0,.7); box-shadow: 0 0 0 2px rgba(0,0,0,.45), 0 3px 10px rgba(0,0,0,.6); }
.gz-pit .gz-played-result.is-win { background: radial-gradient(circle at 35% 30%, #e8483c, #9c1f18); box-shadow: 0 0 0 2px rgba(0,0,0,.45), 0 0 16px 3px rgba(255,90,60,.65); }
.gz-pit .gz-played-result.is-lose { background: radial-gradient(circle at 35% 30%, #77828d, #3a424a); }
.gz-pit .gz-played-result.is-tie { background: radial-gradient(circle at 35% 30%, #c69a2a, #7a5a0c); }
/* 点数牌：牌下部一块深底，大字写最终点数；鹰扬改过时绿（加）或红（减），下面一行写原点数和改动。 */
.gz-pit-point { position: absolute; z-index: 2; left: 23%; right: 5%; bottom: 6%; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; column-gap: 2px; padding: 2px 4px 3px; border: 2px solid #e8c77a; border-radius: 8px; background: rgba(12,14,18,.95); color: #fff; text-align: center; pointer-events: none; box-shadow: 0 2px 8px rgba(0,0,0,.6); }
.gz-pit-point b { font: 900 max(18px, calc(var(--pw) * .3))/1 Georgia, 'Times New Roman', serif; }
.gz-pit-point i { color: #e8d6a8; font-size: max(11px, calc(var(--pw) * .1)); font-style: normal; font-weight: 700; }
.gz-pit-point small { flex-basis: 100%; color: #fff; font-size: max(11px, calc(var(--pw) * .095)); font-weight: 700; line-height: 1.35; }
.gz-pit-point em { display: none; font-style: normal; font-weight: 900; }
.gz-pit-point.is-up { border-color: #5be07a; }
.gz-pit-point.is-up b { color: #8dffa6; }
.gz-pit-point.is-down { border-color: #ff7a6a; }
.gz-pit-point.is-down b { color: #ffb0a6; }
/* 乐观更新：刚打出、还在等服务器回复的牌，从下方飞入，边缘微微闪烁。 */
.gz-played .gz-card.is-sending { animation: gz-fly-in .22s ease-out, gz-sending 1s ease-in-out .22s infinite alternate; box-shadow: 0 0 0 2px rgba(232,196,120,.55); }
/* 拖到中央待弃置的牌（凑够张数才一起弃）：从下方飞入、略压暗，点一下收回。 */
.gz-played .gz-card.is-staged { padding: 0; border: 0; background: none; cursor: pointer; filter: brightness(.82); animation: gz-fly-in .22s ease-out; }
.gz-played .gz-card.is-staged:hover { filter: none; }
@keyframes gz-fly-in { from { transform: translateY(60%) scale(.8); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes gz-sending { from { box-shadow: 0 0 0 2px rgba(232,196,120,.55); } to { box-shadow: 0 0 0 2px rgba(232,196,120,.15), 0 0 14px rgba(232,196,120,.35); } }
.gz-played .gz-card:not(.has-art) { display: grid; place-items: center; padding: 4px; font-size: 11px; text-align: center; }
.gz-notes p { margin: 0; padding: 1px 10px; border-radius: 9px; background: rgba(10,14,18,.6); color: #f3dcae; font-size: 11px; text-align: center; }
/* 顶栏里的队列、围攻：一行，放不下省略（悬停看全文）。 */
.gz-relations { flex: 0 1 auto; min-width: 0; margin: 0; padding: 1px 10px; overflow: hidden; border-radius: 9px; background: rgba(10,14,18,.6); color: #d7e7ff; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.gz-hud .gz-camps { flex: 0 0 auto; }
.gz-hud .gz-turn { margin-left: auto; }
.engine-game-over { position: absolute; z-index: 6; left: 50%; top: 50%; min-width: min(480px, 90%); translate: -50% -50%; background: radial-gradient(circle at 50% 20%, rgba(209,147,63,.35), transparent 70%), rgba(28,20,12,.94); box-shadow: var(--shadow); }

/* 底部：工具、提示条、手牌、自己的座位 */
.gz-bottom { grid-area: bottom; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 10px; min-height: 0; }
.gz-tools { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.gz-phase { padding: 3px 10px; border-radius: 5px; background: #33475f; color: #d5e2f0; font-size: 12px; font-weight: 700; white-space: nowrap; }
.gz-phase.is-mine { background: linear-gradient(180deg, #4a93f0, #1f55b0); color: #fff; box-shadow: 0 0 10px rgba(74,147,240,.8); }
.gz-mid { display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-width: 0; }
.gz-self { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.gz-own-skills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; margin-bottom: 20px; max-width: calc(var(--seat-w) * 1.7); }
.engine-switches { display: contents; }
.gz-own-skill, .engine-switch { padding: 2px 8px; border: 1px solid #b08d48; border-radius: 4px; background: linear-gradient(180deg, #4a3c26, #2a2115); color: #f8dd9a; font: 600 12px/1.5 'Songti SC', 'STSong', serif; }
.gz-own-skill.is-spent { border-color: #6c7682; color: #8b949c; text-decoration: line-through; }
/* 技能开关：大按钮，绿框加勾＝开，红框加叉＝关，一眼能看出是可以点的。 */
.engine-switch { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 5px 12px 5px 8px; border: 2px solid #e2463a; border-radius: 7px; background: linear-gradient(180deg, #4a1c19, #2a100e); color: #ffd9d4; font: 700 16px/1.2 'Songti SC', 'STSong', serif; cursor: pointer; box-shadow: 0 0 0 1px rgba(0,0,0,.5), 0 2px 8px rgba(0,0,0,.5); transition: filter .15s ease, transform .1s ease; }
.engine-switch:hover:not(:disabled) { filter: brightness(1.2); }
.engine-switch:active:not(:disabled) { transform: scale(.96); }
.engine-switch-mark { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #e2463a; color: #fff; font: 900 14px/1 sans-serif; font-style: normal; }
.engine-switch.is-on { border-color: #4fe36a; background: linear-gradient(180deg, #24582f, #123019); color: #e2ffe6; box-shadow: 0 0 0 1px rgba(0,0,0,.5), 0 0 10px rgba(79,227,106,.55); }
.engine-switch.is-on .engine-switch-mark { background: #3cc457; }
/* 点下后已经按新状态画，服务端还没确认：勾叉轻轻闪。 */
.engine-switch.is-sending .engine-switch-mark { animation: gz-switch-send .5s ease-in-out infinite alternate; }
@keyframes gz-switch-send { from { opacity: 1; } to { opacity: .45; } }
/* 等作答回复时按钮不变灰（不用 disabled），只换成等待的指针。 */
.gz-board [aria-busy="true"] { cursor: progress; }
.gz-own-note { color: #d5dde4; font-size: 10px; }

.engine-prompt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.engine-prompt-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; width: 100%; min-height: 28px; padding: 2px 24px; background: linear-gradient(90deg, transparent, rgba(10,14,18,.78) 14%, rgba(10,14,18,.78) 86%, transparent); text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.engine-prompt.is-mine .engine-prompt-head { background: linear-gradient(90deg, transparent, rgba(160,38,24,.92) 14%, rgba(208,74,36,.95) 50%, rgba(160,38,24,.92) 86%, transparent); }
.engine-prompt.is-concealed .engine-prompt-head { background: none; }
.engine-prompt.is-waiting .engine-prompt-head { min-height: 36px; }
.engine-prompt.is-waiting .engine-prompt-head strong { font-size: clamp(16px, calc(1.9 * var(--vw)), 22px); color: #ffe7a8; }
/* 知己知彼的观看结果：盖在牌桌上的图（牌面或整张武将牌），点任意处关掉。 */
.gz-peek-backdrop { position: fixed; z-index: 70; inset: 0; display: grid; place-items: center; background: rgba(3,9,10,.6); cursor: pointer; }
.gz-peek { max-width: min(calc(92 * var(--vw)), 1000px); max-height: calc(90 * var(--vh)); max-height: calc(90 * var(--vh)); overflow: auto; padding: 16px 20px; cursor: default; }
.gz-peek h3 { margin: 0 0 12px; color: #ebd4ab; font: 600 20px 'Songti SC','STSong',serif; text-align: center; }
.gz-peek-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.gz-peek-card { --card-w: clamp(96px, calc(11 * var(--vw)), 150px); position: relative; display: block; width: var(--card-w); aspect-ratio: 5 / 7; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.6); }
.gz-peek-card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gz-peek-card.is-text { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: linear-gradient(180deg, #f4e9cf, #dccba1); color: #241a10; }
.gz-peek-note { margin: 12px 0 0; color: #e8dcc4; font-size: 16px; text-align: center; }
.gz-peek-general { display: block; width: clamp(200px, calc(26 * var(--vw)), 340px); border-radius: 8px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.6); }
.gz-peek-general img { display: block; width: 100%; height: auto; }
.gz-peek-general.is-text { padding: 40px 20px; background: #2a2115; color: #f8dd9a; text-align: center; font-size: 22px; }
.engine-prompt-head strong { color: #fff3d6; font-size: clamp(13px, calc(1.5 * var(--vw)), 18px); letter-spacing: .08em; }
.engine-prompt-note { color: #ffe3b0; font-size: 12px; }
.engine-countdown { padding: 1px 11px; border-radius: 12px; background: rgba(0,0,0,.6); color: #ffe9b0; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.engine-countdown.urgent { background: #fff; color: #c0281b; font-weight: 700; }
/* 读条：加粗加宽、带金边，一眼能看到（用户 2026-11-15："读条做大一些，明显一些"）。 */
.gz-timer { display: block; width: min(100%, 760px); height: 14px; margin-top: -2px; border: 1px solid rgba(240,185,58,.85); border-radius: 7px; overflow: hidden; background: rgba(0,0,0,.65); box-shadow: 0 0 8px rgba(240,185,58,.45), 0 2px 6px rgba(0,0,0,.6); appearance: none; -webkit-appearance: none; }
.gz-timer.urgent { border-color: rgba(255,110,80,.95); box-shadow: 0 0 10px rgba(226,64,47,.7), 0 2px 6px rgba(0,0,0,.6); }
.gz-timer::-webkit-progress-bar { background: rgba(0,0,0,.65); }
.gz-timer::-webkit-progress-value { background: linear-gradient(90deg, #f0b93a, #ffe08a); transition: width 1s linear; }
.gz-timer::-moz-progress-bar { background: linear-gradient(90deg, #f0b93a, #ffe08a); }
.gz-timer.urgent::-webkit-progress-value { background: linear-gradient(90deg, #e2402f, #ff8b6b); }
.gz-timer.urgent::-moz-progress-bar { background: #e2402f; }
.engine-auto { padding: 0 7px; border-radius: 10px; background: #4a525c; color: #dfe5ea; font-size: 10px; }
/* 选择面板浮在提示条上方（盖住桌面中间），不挤占手牌的位置。不能用 transform 居中：里面的牌要悬停放大。 */
.engine-options { position: absolute; z-index: 20; left: 0; right: 0; bottom: calc(100% + 6px); width: fit-content; max-width: 100%; max-height: min(calc(58 * var(--vh)), 520px); margin: 0 auto; overflow: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid rgba(232,196,120,.5); border-radius: 8px; background: rgba(12,16,20,.92); box-shadow: var(--shadow); }
.engine-option-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding: 4px; }
/* 发动技能的提示：选项里每个技能的原文。 */
.engine-skill-notes { display: flex; flex-direction: column; gap: 4px; max-width: min(620px, calc(90 * var(--vw))); padding: 2px 4px; }
.engine-skill-notes p { margin: 0; color: #efe6d2; font-size: 13px; line-height: 1.55; text-align: left; }
.engine-skill-notes b { margin-right: 4px; color: #ffd98a; font-family: 'Songti SC', 'STSong', serif; }
.engine-option-card:not(.gz-card), .engine-option-player { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 96px; min-height: 56px; padding: 8px 16px; border: 1px solid #a98845; border-radius: 6px; background: linear-gradient(180deg, #f4e9cf, #dccba1); color: #241a10; font: inherit; }
.engine-option-card:not(.gz-card) strong, .engine-option-player strong { font-size: clamp(15px, calc(1.4 * var(--vw)), 19px); }
.engine-option small { color: #6b5a3c; font-size: 12px; }
.engine-chip-suit { font-size: 11px; font-weight: 700; }
.engine-chip-suit.red { color: #c0392b; }
.engine-option-card.engine-option-back { justify-content: center; width: var(--play-w); min-width: 0; height: calc(var(--play-w) * 1.405); padding: 4px; border: 2px solid #c9a55a; border-radius: 6px; background: repeating-linear-gradient(45deg, #6d1f1a 0 7px, #58140f 7px 14px); color: #ffe9b0; }
.engine-option-back small { color: #d9b98a; }
.engine-option-player { background: linear-gradient(180deg, #3d444c, #1f2429); color: #f3ecda; border-color: rgba(232,196,120,.6); }
.engine-option-player small { color: #aab3bb; }
.engine-option-card.gz-card small:not(.engine-order) { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px; border-radius: 0 0 6px 6px; background: rgba(0,0,0,.76); color: #ffe9b0; font-size: 10px; text-align: center; }
.engine-option-card.is-recast { box-shadow: 0 0 0 2px #7fd8c0; }
.engine-option.selected { outline: 3px solid #ffd76a; outline-offset: 1px; box-shadow: 0 0 16px 3px rgba(255,215,106,.8); }
.engine-order { position: absolute; z-index: 2; top: -7px; right: -7px; padding: 1px 8px; border: 1px solid #eafff0; border-radius: 10px; background: #2fa35c; color: #fff; font-size: 12px; font-weight: 700; box-shadow: 0 2px 6px rgba(0,0,0,.6); }
.engine-option-card:not(.gz-card) .engine-order { position: static; }
.engine-option-player { position: relative; }
.engine-seat-pick.is-order { background: #2fa35c; border-color: #eafff0; color: #fff; font-size: 12px; font-weight: 700; }
/* 排列牌堆的排列板（观星、恂恂、悟心）：两行，左边竖写行名，没摆牌的格子是暗色凹槽。 */
.engine-options.is-arrange { overflow: visible; padding: 10px 18px 12px; background: rgba(16,13,10,.92); }
.engine-options.is-arrange:has(.gz-arrange-title) { padding-top: 20px; }
.gz-arrange { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.gz-arrange-title { position: absolute; top: 0; left: 50%; padding: 2px 18px; border-radius: 4px; background: rgba(16,13,10,.95); transform: translate(-50%, -55%); color: #f3e3bd; font: 700 clamp(20px, calc(2 * var(--vw)), 28px)/1.1 'Songti SC', 'STSong', 'SimSun', serif; letter-spacing: .3em; text-indent: .3em; text-shadow: 0 1px 3px #000; }
.gz-arrange-row { display: flex; align-items: center; gap: 12px; }
.gz-arrange-tag { display: flex; flex: none; flex-direction: column; align-items: center; justify-content: center; width: 30px; min-height: calc(var(--card-h) * .8); border-radius: 4px; background: linear-gradient(180deg, #d4c7a5, #b6a67f); color: #3a2a18; font: 700 17px/1.3 'Songti SC', 'STSong', 'SimSun', serif; box-shadow: inset 0 0 0 1px rgba(60,40,20,.35), 0 1px 4px rgba(0,0,0,.5); }
.gz-arrange-tag i { font-style: normal; }
.gz-arrange-row:not(.is-top) .gz-arrange-tag { background: linear-gradient(180deg, #8e877b, #6c665c); color: #1c1914; }
.gz-arrange-cells { display: flex; gap: 12px; min-height: var(--card-h); }
.gz-arrange-slot { flex: none; width: var(--card-w); height: var(--card-h); border-radius: 6.5% / 4.6%; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(255,240,210,.14), inset 0 2px 10px rgba(0,0,0,.6); }
.gz-arrange .engine-option.selected { outline: none; box-shadow: 0 2px 8px rgba(0,0,0,.55); }
/* 拖牌（app.js startArrangeDrag）：按住就拖，触屏不滚动；落点那一行描亮，插入处一条竖线。 */
.gz-arrange [data-action="engine-option"] { position: relative; cursor: grab; touch-action: none; }
.gz-arrange [data-action="engine-option"].is-drag-source { opacity: .35; }
.gz-arrange-row.is-arrange-drop .gz-arrange-cells { border-radius: 6px; box-shadow: 0 0 0 2px rgba(243,227,189,.55); }
.gz-arrange .is-insert-before::before, .gz-arrange .is-insert-after::after { content: ''; position: absolute; z-index: 3; top: -4px; bottom: -4px; width: 4px; border-radius: 2px; background: #f3e3bd; box-shadow: 0 0 6px rgba(0,0,0,.7); }
.gz-arrange .is-insert-before::before { left: -8px; }
.gz-arrange .is-insert-after::after { right: -8px; }
/* 别人排列时看到的牌背：三国杀游戏牌背面原图（米黄旧纸、"三国杀"字样；用户 2026-12-01 要求不用红色）。 */
.gz-arrange-back { width: var(--card-w); height: var(--card-h); background: #d6c69e url('art/card-back.jpg') center / cover no-repeat; }
.engine-options.is-watching { pointer-events: none; }
/* 操作栏：按钮尽量大、居中，好点。 */
.engine-prompt-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 16px; width: 100%; }
.engine-prompt-actions .small-btn, .engine-prompt-actions .engine-option-skill { min-width: 6.5em; min-height: 54px; padding: 10px 22px; border-radius: 10px; font-size: clamp(17px, calc(1.7 * var(--vw)), 23px); font-weight: 700; letter-spacing: .06em; }
.engine-options .engine-option-button.small-btn, .engine-options .engine-option-skill { min-height: 48px; padding: 8px 24px; font-size: clamp(16px, calc(1.5 * var(--vw)), 20px); }
/* 选牌名（役鬼、奇策……）：牌名多，按钮做小、排紧，少挡桌面和座位（用户 2026-11-25 嫌字太大挡武将）。 */
.engine-prompt[data-prompt-action="chooseName"] .engine-prompt-actions { gap: 6px 8px; max-width: 720px; margin: 0 auto; }
.engine-prompt[data-prompt-action="chooseName"] .engine-prompt-actions .engine-option-button.small-btn { min-width: 0; min-height: 30px; padding: 3px 10px; border-radius: 6px; font-size: 14px; letter-spacing: 0; }
.engine-option-button.is-guozhan { border-color: #8fd8c0; background: linear-gradient(180deg, #2f6d5d, #1a4338); color: #e2fff5; }
.engine-option-skill { padding: 7px 16px; border: 1px solid #8fbcf5; border-radius: 8px; background: linear-gradient(180deg, #437bc4, #214a86); color: #eef5ff; font: 600 14px/1.3 'Songti SC', 'STSong', serif; }
.engine-prompt-count { padding: 0 8px; color: #fff3d6; font-size: clamp(18px, calc(1.7 * var(--vw)), 24px); font-weight: 700; font-variant-numeric: tabular-nums; text-shadow: 0 1px 2px rgba(0,0,0,.8); }

.engine-hand-zone { position: relative; min-width: 0; }
.engine-hand { display: flex; justify-content: center; align-items: flex-end; height: calc(var(--card-h) + 18px); padding: 18px 8px 0; }
.engine-hand > .gz-card.has-art { flex: 0 1 var(--card-w); min-width: clamp(16px, calc(var(--card-w) * .27), 26px); width: auto; background: none; box-shadow: none; }
/* 牌多时：先叠得更紧（每张至少露出左上角的点数花色），再放不下就横向滚动，不会挤出界面。
   safe center：溢出时从左边对齐，最左边的牌也滚得到。 */
.engine-hand.is-crowded { justify-content: safe center; overflow-x: auto; overflow-y: hidden; height: calc(var(--card-h) + 30px); padding-top: 22px; scrollbar-width: thin; scrollbar-color: rgba(232,196,120,.6) transparent; }
.engine-hand.is-crowded::-webkit-scrollbar { height: 8px; }
.engine-hand.is-crowded::-webkit-scrollbar-thumb { border-radius: 4px; background: rgba(232,196,120,.6); }
.engine-hand > .gz-card.has-art:last-child { flex-shrink: 0; }
.engine-hand > .gz-card.has-art > .gz-card-art { width: var(--card-w); max-width: none; height: var(--card-h); border-radius: calc(var(--card-w) * .065) / calc(var(--card-h) * .046); box-shadow: -2px 2px 8px rgba(0,0,0,.6); transition: translate .18s cubic-bezier(.2,.9,.3,1.25), box-shadow .18s ease, filter .2s ease; }
/* 手牌：新摸到的牌从下方滑入；选中时上浮带一点回弹（元素由 app.js 原地更新，过渡才放得出来）。 */
.engine-hand > .gz-card { transition: flex-basis .22s ease, margin .18s ease, opacity .2s ease; animation: gz-card-in .26s ease-out; }
.engine-hand > .gz-card > .gz-card-index { transition: translate .18s cubic-bezier(.2,.9,.3,1.25), background-color .2s ease; }
@keyframes gz-card-in { from { opacity: 0; margin-bottom: -28px; } }
.engine-hand > button.gz-card:active:not(:disabled) > .gz-card-art { filter: brightness(1.12); }
/* 桌面中间新打出的牌：淡入并略微放大落位。 */
.gz-played > .gz-card { animation: gz-card-drop .28s ease-out; }
@keyframes gz-card-drop { from { opacity: 0; scale: 1.25; } to { opacity: 1; scale: 1; } }
.engine-option.gz-card, .engine-option-button, .engine-option-skill { transition: box-shadow .15s ease, outline-color .15s ease, filter .15s ease; }
.engine-hand > .gz-card:not(.has-art) { margin-right: 4px; }
.engine-hand > .gz-card.is-dim > .gz-card-art { filter: brightness(.55); }
.engine-hand > .gz-card.is-dim > .gz-card-index { background: rgba(150,146,134,.95); }
.engine-hand > .gz-card.is-dim:not(.has-art) { opacity: .55; }
.engine-hand > button.gz-card { cursor: pointer; }
/* 拖牌出牌：手牌上不让浏览器拿触摸去平移页面；拖起的牌留个淡影，跟手的是一张复制的牌面。
   能放的地方只描一圈白边（不要金框、黄色底）。 */
.engine-hand > button.gz-card.is-option { touch-action: none; -webkit-user-select: none; user-select: none; }
.engine-hand > .gz-card.is-drag-source > .gz-card-art, .engine-hand > .gz-card.is-drag-source:not(.has-art) { opacity: .3; }
.gz-drag-ghost { position: fixed; z-index: 95; margin: 0; pointer-events: none; will-change: transform; }
.gz-drag-ghost > :not(.gz-drag-hint) { display: block; width: 100%; height: 100%; margin: 0; translate: none; rotate: 4deg; scale: 1.06; border-radius: 6.5% / 4.6%; box-shadow: 0 10px 28px rgba(0,0,0,.65); }
.gz-drag-hint { position: absolute; left: 50%; bottom: 100%; translate: -50% -10px; padding: 3px 10px; border-radius: 6px; background: rgba(12,10,8,.82); color: #fff; font-size: 16px; font-weight: 700; white-space: nowrap; }
.gz-drag-hint[hidden] { display: none; }
body.is-card-dragging, body.is-card-dragging * { cursor: grabbing !important; }
body.is-card-dragging .gz-zoom { display: none !important; }
.gz-center.is-drop-ready { outline: 2px dashed rgba(255,255,255,.35); outline-offset: -4px; border-radius: 12px; }
.gz-center.is-drop-target { outline: 2px dashed rgba(255,255,255,.85); background: rgba(255,255,255,.06); }
/* 重铸区：拖能重铸的牌时牌桌正中出现的虚线正方形，放进框里才重铸。 */
.gz-recast-zone { position: fixed; z-index: 94; box-sizing: border-box; display: grid; place-items: center; border: 3px dashed rgba(255,255,255,.6); border-radius: 10px; background: rgba(0,0,0,.28); color: rgba(255,255,255,.75); font-size: 22px; font-weight: 700; letter-spacing: .2em; pointer-events: none; animation: gz-recast-in .15s ease-out; }
.gz-recast-zone.is-drop-target { border-color: #fff; background: rgba(255,255,255,.14); color: #fff; }
@keyframes gz-recast-in { from { opacity: 0; scale: .9; } }
.gz-seat.is-drop-target { box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 0 18px rgba(255,255,255,.35); }
/* 拖能指定目标的牌：能选的座位虚线框，不能选的压暗（悬停时牌上写原因，放不下去）。 */
.gz-seat.is-drop-ok { outline: 2px dashed rgba(255,255,255,.7); outline-offset: 3px; }
.gz-seat.is-drop-off { filter: brightness(.45) saturate(.6); }
.gz-seat.is-drop-off.is-drop-target { box-shadow: none; }
.engine-hand > button.gz-card:not(.has-art) { box-shadow: 0 0 0 2px rgba(255,224,138,.6), 0 2px 8px rgba(0,0,0,.55); }
@media (hover: hover) {
  .engine-hand > button.gz-card:hover:not(:disabled) > .gz-card-art,
  .engine-hand > button.gz-card:hover:not(:disabled) > .gz-card-index { translate: 0 -10px; }
}
.engine-hand > .gz-card.selected > .gz-card-index { translate: 0 -16px; }
.engine-hand > .gz-card.selected > .gz-card-art { translate: 0 -16px; box-shadow: 0 0 0 3px #ffd76a, 0 0 18px 4px rgba(255,215,106,.85); }
.engine-hand > .gz-card.selected:not(.has-art) { margin-bottom: 16px; box-shadow: 0 0 0 3px #ffd76a, 0 0 18px 4px rgba(255,215,106,.85); }
.gz-card-caption { position: absolute; z-index: 1; left: 0; top: 34%; width: var(--card-w); padding: 1px 2px; background: rgba(0,0,0,.76); color: #ffe9b0; font-size: 11px; text-align: center; pointer-events: none; }
.engine-hand > .gz-card.is-recast > .gz-card-caption { background: rgba(22,92,74,.9); color: #d9fff2; }
.gz-own-skill.is-special { border-color: #f2cf7d; }
/* 木牛流马：手牌区右上角的按钮，点开后手牌这一排换成辎。 */
.engine-hand-zone.is-ox .engine-hand { border-radius: 8px; background: repeating-linear-gradient(135deg, rgba(107,79,34,.28) 0 10px, rgba(107,79,34,.12) 10px 20px); outline: 1px dashed #b08d48; }
.gz-ox-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 3px 10px; border: 2px dashed #b08d48; border-radius: 7px; background: linear-gradient(180deg, #4a3c26, #2a2115); color: #f8dd9a; font: 700 14px/1.2 'Songti SC', 'STSong', serif; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.gz-ox-toggle b { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px; background: #efe2c2; color: #2a1d0c; font: 800 12px/1 sans-serif; }
.gz-ox-toggle:hover { filter: brightness(1.2); }
.gz-ox-toggle.is-usable { border-style: solid; border-color: #ffd36a; box-shadow: 0 0 10px rgba(255,211,106,.7), 0 2px 8px rgba(0,0,0,.5); }
.gz-ox-toggle.is-open { background: linear-gradient(180deg, #6b5532, #3d2f1b); }
.gz-hand-total { position: absolute; right: 0; bottom: 2px; padding: 0 7px; border-radius: 9px; background: rgba(10,14,18,.75); color: #fff3d6; font-size: 11px; pointer-events: none; }



/* 触屏：可点的东西至少 44px 高（不靠悬停），悬停的上浮只给有鼠标的设备。 */
@media (pointer: coarse) {
  .ghost-btn, .text-btn, .primary-btn, .danger-btn, .small-btn, button.chip, .mode-option, .entry-tab,
  .engine-option, .engine-switch, .engine-roster li button, .waiting-seat-host { min-height: 44px; min-width: 44px; }
  .engine-option-row, .engine-prompt-actions, .engine-roster-actions { gap: 10px; }
  .opening-card-actions button { min-height: 44px; }
}
@media (hover: none) {
  .primary-btn:hover:not(:disabled), .danger-btn:hover:not(:disabled) { transform: none; filter: none; }
}


/* 声音开关（菜单里）和装备确认条。 */
.gz-sound-switches { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.gz-sound-switch { padding: 4px 10px; font-size: 12px; }
.gz-sound-switch.is-on { border-color: #e0ad61; color: #ffe9b0; }
.engine-prompt.is-confirm { border-color: #e0ad61; box-shadow: 0 0 0 1px rgba(224,173,97,.5), 0 0 18px rgba(224,173,97,.35); animation: gz-confirm-in .18s ease-out; }
@keyframes gz-confirm-in { from { opacity: 0; } }

/* 木牛流马的辎（只本人可见，排在手牌之后）与诏书 */
.gz-card.is-stash { outline: 2px dashed #8a6a2c; outline-offset: -2px; }
.gz-stash-tag { position: absolute; z-index: 1; right: 0; bottom: 0; padding: 1px 4px; border-radius: 6px 0 0 0; background: #6b4f22; color: #f4e9cf; font: 800 12px/1.2 sans-serif; font-style: normal; pointer-events: none; }
/* 暂时搬进手牌区的自己装备（弃置 n 张牌这类）：左边隔开一点，左下角竖写"装备区"（叠着只露左边一条也看得到）。 */
.engine-hand > .gz-card.is-gear-guest { margin-left: 14px; }
.engine-hand > .gz-card.is-gear-guest ~ .gz-card.is-gear-guest { margin-left: 0; }
.gz-gear-tag { position: absolute; z-index: 2; left: 0; bottom: 0; padding: 4px 2px; border-radius: 0 6px 0 0; background: #2f4a5c; color: #eaf2f6; font: 800 12px/1.1 sans-serif; font-style: normal; writing-mode: vertical-rl; letter-spacing: 1px; pointer-events: none; }
.engine-hand > .gz-card.is-gear-guest.selected > .gz-gear-tag { translate: 0 -16px; }
.gz-stash-count { display: grid; place-items: center; height: 22px; padding: 0 3px; border: 1px dashed #6b4f22; border-radius: 3px; background: #efe2c2; color: #2a1d0c; font-size: 11px; font-weight: 800; }
/* 诏书在武将牌上方靠右（2026-11-29 用户：图标太小、不要压在武将牌里）。有君主旗时往左让开旗。 */
.gz-seat-edict { position: absolute; z-index: 6; right: 8px; bottom: calc(100% + 3px); display: flex; }
.gz-seat:has(> .gz-lordflag) > .gz-seat-edict { right: 54px; }
.gz-edict { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 2px solid #e8c478; border-radius: 50%; background: #7a1f1f; color: #fbe9c8; font: 800 17px/1 'Songti SC', 'STSong', serif; box-shadow: 0 2px 4px rgba(0,0,0,.6); }
.gz-edict > small { position: absolute; top: -5px; right: -7px; display: grid; place-items: center; min-width: 16px; height: 16px; padding: 0 2px; border: 1px solid rgba(255,255,255,.85); border-radius: 8px; background: #1b2126; color: #fff; font: 800 10px/1 system-ui, sans-serif; }

/* 选将（2026-11-18 用户要求）：去掉左边座位环后只剩一栏；双势力武将边框两种势力色；确认按钮加大。 */
.opening-layout.is-single, .opening-layout.is-single:not(.engine-layout):has(.opening-candidates) { grid-template-columns: minmax(0, 1fr); }
.second-wei { --camp2: #3a7bdc; } .second-shu { --camp2: #d5443a; } .second-wu { --camp2: #2fa35c; } .second-qun { --camp2: #c79c36; }
.opening-candidate.is-dual { border-color: transparent; background: linear-gradient(155deg, rgba(80,65,48,.3), rgba(12,23,24,.83)) padding-box, linear-gradient(90deg, var(--camp) 50%, var(--camp2) 50%) border-box; }
.opening-candidate.has-art.is-dual { background: linear-gradient(180deg, var(--camp-deep), rgba(12,23,24,.9)) padding-box, linear-gradient(90deg, var(--camp) 50%, var(--camp2) 50%) border-box; }
.opening-confirm { min-width: 168px; min-height: 48px; padding: 10px 30px; border-radius: 8px; font-size: 18px; font-weight: 800; letter-spacing: .12em; }
.opening-confirm:not(:disabled) { box-shadow: 0 0 0 2px rgba(255,215,106,.55), 0 0 18px rgba(255,200,80,.55); }
/* 只剩一栏后候选牌会被拉得很大，把下面的技能表挤出屏幕：牌宽封顶，并按屏幕高度收（牌面高 ≈ 宽 × 1.41）。 */
.opening-layout.is-single .opening-candidates:has(.has-art) { grid-template-columns: repeat(7, minmax(0, max(92px, min(150px, calc((calc(100 * var(--vh)) - 430px) * .709))))); justify-content: center; }

/* ---------------------------------------------------------------------------
   UI 补修（2026-11-18，试玩截图排查后统一改）
   --------------------------------------------------------------------------- */
/* 对局中顶栏收窄（标题副字、牌局名在牌桌顶栏里已有），把高度让给桌面中间的出牌区。 */
.app-bg:has(.engine-scene) > .topbar { height: 38px; padding: 0 14px; }
.app-bg:has(.engine-scene) > .topbar .brand-sub,
.app-bg:has(.engine-scene) > .topbar .chip.meta { display: none; }
.app-bg:has(.engine-scene) > .topbar .brand-seal { width: 26px; height: 26px; font-size: 15px; }
.app-bg:has(.engine-scene) > .topbar .brand-name { font-size: 16px; }
.app-bg:has(.engine-scene) > .topbar .chip { min-height: 24px; padding: 2px 9px; font-size: 12px; }
.app-bg > .opening-scene.engine-scene { height: calc(100% - 38px); }


/* 座位上的出手气泡挪到立绘中间偏下：不再压住左上角竖排的武将名；过一会儿变淡，下面的东西看得见。 */
.gz-act { top: 54%; translate: -50% -50%; max-width: calc(100% + 10px); }
@keyframes gz-act-settle { to { opacity: .55; box-shadow: 0 2px 6px rgba(0,0,0,.6); } }

/* 只有技能说明的面板（是否发动【X】）：靠右贴着按钮，不盖住桌面中间正在结算的牌。 */
.engine-options.is-notes-only { left: auto; right: 0; margin: 0; max-width: min(440px, 46%); padding: 6px 10px; background: rgba(12,16,20,.86); }
.engine-options.is-notes-only .engine-skill-notes p { font-size: 12px; line-height: 1.5; }

/* 连线压在手牌和提示条下面：从自己座位出发的线不再横穿手牌和按钮。 */
.gz-bottom { position: relative; z-index: 31; }

/* 确认条不再画一圈大框（以前整块提示区被框起来，中间空一大片）；只让标题条发金光。 */
.engine-prompt.is-confirm { border-color: transparent; box-shadow: none; }
.engine-prompt.is-confirm .engine-prompt-head strong { color: #fff; text-shadow: 0 0 10px rgba(255,215,120,.9), 0 1px 2px rgba(0,0,0,.8); }


/* 顶栏的队列、围攻：只写条数；悬停或点一下展开明细。 */
.gz-relations { position: relative; overflow: visible; cursor: help; }
.gz-relations-full { display: none; position: absolute; z-index: 45; left: 0; top: calc(100% + 4px); flex-direction: column; gap: 2px; width: max-content; max-width: min(520px, calc(80 * var(--vw))); padding: 6px 10px; border: 1px solid rgba(160,190,240,.6); border-radius: 6px; background: rgba(14,18,24,.97); color: #d7e7ff; font-size: 12px; white-space: normal; box-shadow: var(--shadow); }
.gz-relations:is(:hover, :focus) > .gz-relations-full { display: flex; }


/* 选将技能表：和候选牌一样七列，每栏正好在对应的牌下面；悬停一张牌，下面那栏亮起。 */
.opening-layout.is-single .opening-sheet { grid-template-columns: repeat(7, minmax(0, max(92px, min(150px, calc((calc(100 * var(--vh)) - 430px) * .709))))); justify-content: center; gap: 7px; }
.opening-layout.is-single .opening-sheet-item { padding: 6px 7px; }
.opening-layout.is-single .opening-sheet-item h4 { flex-wrap: wrap; gap: 2px 5px; font-size: 13px; }

.opening-sheet-item { transition: background-color .15s ease, box-shadow .15s ease; }
.opening-candidates:has(> :nth-child(1):hover) ~ .opening-sheet > :nth-child(1),
.opening-candidates:has(> :nth-child(2):hover) ~ .opening-sheet > :nth-child(2),
.opening-candidates:has(> :nth-child(3):hover) ~ .opening-sheet > :nth-child(3),
.opening-candidates:has(> :nth-child(4):hover) ~ .opening-sheet > :nth-child(4),
.opening-candidates:has(> :nth-child(5):hover) ~ .opening-sheet > :nth-child(5),
.opening-candidates:has(> :nth-child(6):hover) ~ .opening-sheet > :nth-child(6),
.opening-candidates:has(> :nth-child(7):hover) ~ .opening-sheet > :nth-child(7) { background: rgba(70,58,30,.6); box-shadow: 0 0 0 1px rgba(240,200,112,.75); }

/* 体力变化：座位上飘一个大号数字并闪一下，1.6 秒后消失（只动这两个小元素，不动座位本身，放大图不受影响）。 */
.gz-hit { position: absolute; z-index: 7; left: 50%; top: 40%; translate: -50% -50%; color: #ff4a3a; font: 900 clamp(22px, calc(2.8 * var(--vw)), 40px)/1 'Georgia', serif; text-shadow: 0 0 6px #000, 0 2px 0 #3a0703, 0 0 16px rgba(255,80,50,.9); pointer-events: none; opacity: 0; animation: gz-hit-float 1.6s ease-out; }
.gz-hit.is-fire { color: #ff9a2a; text-shadow: 0 0 6px #000, 0 0 18px rgba(255,140,30,.95); }
.gz-hit.is-thunder { color: #b9a6ff; text-shadow: 0 0 6px #000, 0 0 18px rgba(150,120,255,.95); }
.gz-hit.is-lose { color: #e0c6ff; }
.gz-hit.is-recover { color: #6dff8f; text-shadow: 0 0 6px #000, 0 0 16px rgba(80,255,120,.9); }
.gz-hit-flash { position: absolute; z-index: 6; inset: 19px 0 0 0; border-radius: 0 0 5px 5px; background: radial-gradient(ellipse at 50% 45%, rgba(255,40,20,.55), rgba(255,40,20,0) 75%); pointer-events: none; opacity: 0; animation: gz-hit-flash .7s ease-out; }
.gz-hit-flash.is-fire { background: radial-gradient(ellipse at 50% 55%, rgba(255,140,20,.6), rgba(255,80,0,0) 75%); }
.gz-hit-flash.is-thunder { background: radial-gradient(ellipse at 50% 40%, rgba(170,150,255,.65), rgba(120,100,255,0) 75%); }
.gz-hit-flash.is-lose { background: radial-gradient(ellipse at 50% 45%, rgba(170,90,220,.45), rgba(120,40,180,0) 75%); }
.gz-hit-flash.is-recover { background: radial-gradient(ellipse at 50% 45%, rgba(80,255,120,.45), rgba(40,200,80,0) 75%); }
@keyframes gz-hit-float { 0% { opacity: 0; translate: -50% -20%; scale: .6; } 15% { opacity: 1; translate: -50% -50%; scale: 1.25; } 30% { scale: 1; } 75% { opacity: 1; } 100% { opacity: 0; translate: -50% -110%; } }
@keyframes gz-hit-flash { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .gz-hit, .gz-hit-flash { animation-duration: .01s; } }
/* 免伤：伤害被防止时武将牌上盖一面盾牌，写"免伤"；素净，压暗底加浅色描边，像印章一样盖下再淡出。 */
.gz-shield { position: absolute; z-index: 7; left: calc(50% + var(--hp-col) / 2); top: calc(50% + 10px); translate: -50% -50%; width: clamp(44px, 46%, 92px); aspect-ratio: 100 / 116; pointer-events: none; opacity: 0; animation: gz-shield-stamp 1.9s ease-out both; }
.gz-shield svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.gz-shield path { fill: rgba(18,26,36,.72); stroke: #dfe8f0; stroke-width: 5; stroke-linejoin: round; filter: drop-shadow(0 0 5px rgba(0,0,0,.8)); }
.gz-shield b { position: absolute; inset: 0 0 8% 0; display: grid; place-items: center; color: #f2f6fa; font: 900 clamp(13px, calc(1.5 * var(--vw)), 22px)/1 'KaiTi', 'STKaiti', serif; letter-spacing: .05em; text-shadow: 0 0 4px #000; }
@keyframes gz-shield-stamp { 0% { opacity: 0; scale: 1.7; } 14% { opacity: 1; scale: .94; } 22% { scale: 1; } 78% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .gz-shield { animation-duration: .01s; } }
/* 受伤刀痕：盖在主副将立绘上，从右上往左下斜着划开一道两端渐尖的光刃，停一下再淡出（约 .6s）。
   外层定位和裁切，里层 span 负责斜放，::before 是辉光、::after 是刃芯。 */
.gz-hit-slash { --slash-core: #ffb48a; --slash-glow: rgba(255,62,30,.8); position: absolute; z-index: 6; inset: 19px 0 0 var(--hp-col); overflow: hidden; border-radius: 0 0 4px 4px; pointer-events: none; opacity: 0; animation: gz-slash-fade .62s ease-out both; }
.gz-hit-slash.is-fire { --slash-core: #ffd77a; --slash-glow: rgba(255,138,20,.85); }
.gz-hit-slash.is-thunder { --slash-core: #cdeaff; --slash-glow: rgba(130,110,255,.85); }
.gz-hit-slash > span { position: absolute; left: -25%; width: 150%; top: 50%; height: clamp(6px, 5%, 14px); translate: 0 -50%; rotate: -48deg; }
.gz-hit-slash > span::before, .gz-hit-slash > span::after { content: ''; position: absolute; transform-origin: 100% 50%; animation: gz-slash-cut .62s cubic-bezier(.2,.8,.3,1) both; }
.gz-hit-slash > span::before { inset: -320% 4%; background: radial-gradient(closest-side, var(--slash-glow), transparent); }
.gz-hit-slash > span::after { inset: 0 8%; clip-path: polygon(0 50%, 52% 0, 100% 50%, 52% 100%); background: linear-gradient(90deg, transparent, var(--slash-core) 22%, #fff 52%, var(--slash-core) 80%, transparent); }
@keyframes gz-slash-fade { 0% { opacity: 1; } 55% { opacity: 1; } 100% { opacity: 0; } }
@keyframes gz-slash-cut { 0% { scale: 0 1; } 26% { scale: 1 1; } 100% { scale: 1 .35; } }
@media (prefers-reduced-motion: reduce) { .gz-hit-slash { display: none; animation: none; } }

/* 牌的飞行动画（app.js playDrawFx）：摸牌、获得、交给、装备……从来处飞到去处，牌背领头那张写"+n"。飞行层挂在 body 上。 */
.gz-draw-fx { position: fixed; inset: 0; z-index: 900; pointer-events: none; overflow: hidden; }
/* 和手牌一样大（飞行层在 body 上，拿不到 --card-w，照抄同一个式子）。 */
.gz-draw-card { --fly-w: clamp(52px, min(calc(7.8 * var(--vw)), calc(15.5 * var(--vh))), 118px); position: absolute; width: var(--fly-w); height: calc(var(--fly-w) * 1.405); border-radius: 6.5% / 4.6%; border: 3px solid #e2bf62; box-shadow: 0 6px 18px rgba(0,0,0,.65), 0 0 14px rgba(255,215,106,.35); opacity: 0;
  background: repeating-linear-gradient(45deg, rgba(255,215,106,.16) 0 4px, transparent 4px 9px), linear-gradient(160deg, #7a2a1c, #3e120b);
  display: flex; align-items: center; justify-content: center; }
.gz-draw-card span { font: 800 calc(var(--fly-w) * .42)/1 system-ui, sans-serif; color: #ffe8a6; text-shadow: 0 1px 3px #000, 0 0 6px rgba(0,0,0,.8); }
/* 看得到的牌亮牌面（有图贴图，没图写花色点数和牌名）。 */
.gz-draw-card.is-face { overflow: hidden; flex-direction: column; gap: 4%; border-color: #f3e3b4; background: #f6ecd2; }
.gz-draw-card.is-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gz-draw-card.is-face em { font: 700 calc(var(--fly-w) * .2)/1 system-ui, sans-serif; font-style: normal; color: #222; }
.gz-draw-card.is-face em.is-red { color: #c0281c; }
.gz-draw-card.is-face strong { padding: 0 6%; color: #3a2410; font: 800 calc(var(--fly-w) * .22)/1.1 'Songti SC', 'STSong', 'SimSun', serif; text-align: center; }

/* 理牌开关：开着时金边。 */
.gz-sort-toggle.is-on { border-color: #ffd76a; color: #fff3cf; box-shadow: 0 0 8px rgba(255,215,106,.55); }

/* 武将牌上的牌（异、田、创…）、武将牌旁的武将牌（魂、戮）和技能计数（兴棹）：
   横贯立绘的大字条，名字在左、数在右（参考 docs/ui/marker-reference.jpg，2026-11-18 用户要求"做大做明显"）。 */
/* 字条在座位底部那一摞的最上面（.gz-seat-foot 里），不再浮在立绘中间挡武将名。 */
.gz-seat-foot > .gz-piles { position: static; align-items: stretch; gap: 1px; margin-bottom: 1px; }
.gz-pile { display: flex; align-items: center; gap: 5px; max-width: none; padding: 0 6px 0 5px; border: 0; border-top: 1px solid rgba(232,206,150,.28); border-bottom: 1px solid rgba(0,0,0,.35); border-radius: 0; background: linear-gradient(90deg, rgba(14,10,4,.78), rgba(14,10,4,.5)); color: #f3e6c8; font: 600 clamp(11px, calc(1.1 * var(--vw)), 15px)/1.45 'Songti SC', 'STSong', 'SimSun', serif; box-shadow: none; }
.gz-pile b { flex: none; color: #ecd39a; font-weight: 700; letter-spacing: .06em; }
.gz-pile-faces { min-width: 0; overflow: hidden; color: #d9ccb0; font: 500 .78em/1.2 system-ui, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.gz-pile small { flex: none; margin-left: auto; padding: 0; border-radius: 0; background: none; color: #fff7e2; font: 700 clamp(12px, calc(1.2 * var(--vw)), 16px)/1 'Georgia', serif; text-shadow: 0 1px 2px #000; }
.gz-pile.is-secret { border-top-style: dashed; background: linear-gradient(90deg, rgba(10,14,22,.78), rgba(10,14,22,.5)); }
.gz-pile.is-counter { background: linear-gradient(90deg, rgba(8,16,28,.78), rgba(8,16,28,.5)); border-top-color: rgba(150,195,245,.35); }
.gz-pile.is-counter b { color: #c4dcf5; }
.gz-pile.is-mark { background: linear-gradient(90deg, rgba(34,10,10,.8), rgba(34,10,10,.5)); border-top-color: rgba(230,140,120,.4); }
.gz-pile.is-mark b { color: #f0c4b8; }
/* 技能标记一组：占满一行，里面每条按字数定宽、居中排，放不下就折行（两列排时也独占一行）。 */
.gz-marks { display: flex; flex: 1 1 100%; flex-wrap: wrap; justify-content: center; gap: 2px 3px; min-width: 0; }
.gz-marks > .gz-pile.is-mark { flex: none; max-width: 100%; padding: 0 6px; border: 1px solid rgba(230,140,120,.4); border-radius: 2px; }
.gz-marks > .gz-pile.is-mark b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .02em; }
/* 悬停/聚焦字条弹出这一摞的牌（2026-11-27 用户要求）：看得到的画小卡面和花色点数，看不到的只写张数。 */
.gz-pile { position: relative; overflow: visible; cursor: help; }
.gz-pile:is(:hover, :focus) { z-index: 81; }
.gz-pile:is(:hover, :focus) > .gz-pile-tip { display: block; }
.gz-pile-tip { min-width: 120px; max-width: min(380px, calc(80 * var(--vw))); font-family: system-ui, sans-serif; letter-spacing: 0; }
.gz-pile-tip > span { display: block; }
/* relative 只为给透明桥定位：通用 .gz-piles 的 top/left/right（浮在立绘上那版）不能跟着生效，否则整摞右移、下移被座位裁掉。 */
.gz-seat-foot > .gz-piles { position: relative; top: auto; left: auto; right: auto; }
/* 鼠标从字条往上挪去看框里的牌时，以前会掉到底下的立绘上：框没了，半秒后反倒弹出武将牌放大图。
   现在框本身接得住鼠标（还算悬停在字条上），字条和框之间的 6px 空隙用透明桥补上；
   字条那一摞上下各多 4px 也算字条，免得擦边落到立绘上。（2026-11-28） */
.gz-pile-tip { pointer-events: auto; cursor: default; }
.gz-pile-tip::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 8px; }
.gz-seat-top .gz-edict-tip::after { top: auto; bottom: 100%; }
.gz-seat-foot > .gz-piles::before { content: ''; position: absolute; z-index: -1; inset: -4px 0; }
/* 靠右的座位（右侧、自己、顶排最右两个）框往左展开，免得出屏。 */
:is(.gz-seat-right, .gz-seat-self, .gz-top > .gz-seat:nth-last-child(-n+2)) .gz-pile-tip { left: auto; right: 0; }
.gz-skill-tip .gz-pile-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.gz-skill-tip .gz-pile-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 64px; margin: 0; }
.gz-skill-tip .gz-pile-tile img { display: block; width: 64px; height: 90px; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 1px rgba(255,255,255,.2); }
.gz-skill-tip .gz-pile-tile i { display: flex; align-items: center; justify-content: center; width: 64px; height: 90px; border: 1px solid rgba(232,196,120,.5); border-radius: 4px; background: #2a2418; color: #f3e6c8; font: 700 14px/1.2 'Songti SC', 'STSong', serif; font-style: normal; text-align: center; }
.gz-skill-tip .gz-pile-tile small { max-width: 64px; margin: 0; padding: 0; background: none; text-shadow: none; color: #e6dcc6; font: 500 11px/1.25 system-ui, sans-serif; text-align: center; word-break: break-all; }
.gz-skill-tip .gz-pile-tile.red small { color: #ff8f80; }
.gz-skill-tip .gz-pile-note { margin-top: 5px; color: #b9ae97; font-size: 12px; }
/* 诏书：悬停看其上的牌（2026-11-27）。在座位右上方，框往左展开；左侧座位往右，顶排往下。 */
.gz-edict { position: relative; cursor: help; }
.gz-edict:is(:hover, :focus) > .gz-edict-tip { display: block; }
.gz-seat:has(.gz-edict:is(:hover, :focus)) { z-index: 70; }
.gz-seat-edict:has(.gz-edict:is(:hover, :focus)) { z-index: 90; }
.gz-seat-left .gz-edict-tip { left: 0; right: auto; }
.gz-seat-top .gz-edict-tip { top: calc(100% + 6px); bottom: auto; }
.gz-flag-tip .gz-pile-grid { max-width: 280px; }

/* 满配座位（2026-11-18 用户要看"满装备、满标记、多技能"）：底部那一摞不许冲出座位。
   ① 字条三条及以上两条并一行（不写牌面）；② 装备四件及以上排两列；③ 整摞封顶在标题栏下面，
   放不下的从上面裁掉（悬停技能签时放开，免得说明框被裁）。 */
.gz-seat-foot { max-height: calc(100% - 21px); overflow: hidden; justify-content: flex-end; }
.gz-seat-foot:has(.gz-pile:is(:hover, :focus)) { z-index: 90; }
.gz-seat-foot:has(.gz-skill:is(:hover, :focus)), .gz-seat-foot:has(.has-zoom:hover), .gz-seat-foot:has(.gz-pile:is(:hover, :focus)) { overflow: visible; }
.gz-seat-foot > .gz-piles:has(> :nth-child(3)) { flex-direction: row; flex-wrap: wrap; }
.gz-seat-foot > .gz-piles:has(> :nth-child(3)) > .gz-pile { flex: 1 1 calc(50% - 1px); min-width: 0; padding: 0 4px 0 3px; gap: 3px; }
.gz-seat-foot > .gz-piles:has(> :nth-child(3)) .gz-pile-faces { display: none; }
/* 挤的时候（三条及以上，engine-view 标 is-chips）：牌签、计数、技能标记都改成按字数定宽的小签，同一组居中折行，
   不写牌面（悬停照样看）。还碰到武将名的由 app.js fitSeatStrips 把技能标记收进"+N"签（is-more）。 */
.gz-seat-foot > .gz-piles.is-chips { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 2px 3px; }
.gz-seat-foot > .gz-piles.is-chips > .gz-pile { flex: none; max-width: 100%; min-width: 0; padding: 0 5px; gap: 3px; border: 1px solid rgba(232,206,150,.3); border-radius: 2px; }
.gz-seat-foot > .gz-piles.is-chips .gz-pile-faces { display: none; }
.gz-seat-foot > .gz-piles.is-chips > .gz-pile small { margin-left: 0; }
.gz-seat-foot > .gz-piles.is-chips > .gz-marks { display: contents; }
.gz-pile.is-mark.is-more { cursor: help; }
.gz-seat-foot > .gz-piles.is-tight > .gz-pile, .gz-seat-foot > .gz-piles.is-tight .gz-marks > .gz-pile { font-size: clamp(10px, calc(.92 * var(--vw)), 13px); line-height: 1.3; padding: 0 3px; }
.gz-pile.is-mark.is-hidden { display: none !important; }

/* 座位重排（2026-11-18 用户定）：技能签在武将牌正下方（座位外面），武将牌上从上到下是
   标记字条、装备四栏（武器、防具、宝物、+1 马 | -1 马），空栏只画淡框不写字。 */
.gz-top > .gz-seat, .gz-side > .gz-seat { margin-bottom: calc(4px + var(--no-h) + var(--marks-h)); }
/* 座位号（用户定 2026-11-22）：武将牌下面、标记行之下一行大字汉字数字（"五"），不画底框。 */
.gz-seat { --no-h: 24px; }
.gz-self > .gz-seat { margin-bottom: var(--no-h); }
.gz-seat-no { align-self: center; color: #f3e6c4; font: 700 18px/20px 'Songti SC', 'STSong', 'SimSun', serif; text-shadow: 0 1px 3px rgba(0,0,0,.85); white-space: nowrap; pointer-events: none; }
.gz-seat-under { position: absolute; z-index: 5; top: calc(100% + 3px); left: 0; right: 0; display: flex; flex-direction: column; align-items: stretch; gap: 3px; pointer-events: none; }
.gz-seat-under > * { pointer-events: auto; }
.gz-seat-under .gz-seat-skills { pointer-events: none; }
.gz-seat-under .engine-seat-tags { position: static; align-self: center; translate: none; }
/* 其他角色武将牌下面一行：左边标记（先驱、阴阳鱼…），右边判定区的延时锦囊；有这一行时座位下面多留高度。 */
.gz-seat { --marks-h: 0px; }
.gz-seat:has(> .gz-seat-under > .gz-seat-marks) { --marks-h: 30px; }
.gz-seat-marks { display: flex; justify-content: space-between; align-items: center; min-height: 27px; }
.gz-marks-left, .gz-marks-right { display: flex; align-items: center; gap: 3px; }
.gz-seat-marks .engine-marker { width: 27px; height: 27px; font-size: 14px; }
.gz-seat-marks .gz-judgment { position: static; flex-direction: row; gap: 3px; }
.gz-seat-marks .gz-judgment-card { width: 27px; height: 27px; font-size: 16px; border-width: 1.5px; }
.gz-own-skills .gz-seat-skills { display: flex; gap: 4px; }
.gz-own-skills .gz-skill-col { flex-wrap: nowrap; }
/* 装备四栏 */
.gz-gear { gap: 1px; }
/* 空栏不写字，只留淡框，高度和有装备的一行一样。 */
.gz-gear-line.is-empty { box-sizing: border-box; height: 1.4em; border: 1px dashed rgba(240,230,210,.2); background: rgba(0,0,0,.22); }
.gz-gear-horses { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1px; }
.gz-gear-horses.is-dual { grid-template-columns: minmax(0, 1fr); }
.gz-gear-horses > .gz-gear-line { min-width: 0; }
.gz-gear-horses > .gz-gear-line:not(.is-empty) b { margin-right: 2px; }
.gz-seat-under .gz-skill { padding: 0 3px; font-size: clamp(10px, calc(.95 * var(--vw)), 12px); line-height: 1.3; }
/* 暗将的问号和"主将/副将"挪到上半部，不和底部的装备空栏叠字。 */
.gz-general.is-down { align-content: start; padding-top: 22%; }
/* 自己的技能区（已明置的技能签 + 暗将技能开关）：竖排在自己座位左边，带淡色底框，
   不再放在座位上方（会挨着右侧座位下面的技能签，看着像是别人的）。 */
.gz-self { flex-direction: row; align-items: flex-end; }
.gz-own-skills { flex-direction: column; flex-wrap: wrap-reverse; align-content: flex-start; align-items: stretch; gap: 4px; max-width: none; max-height: var(--seat-h); margin-bottom: 0; padding: 5px; border: 1px solid rgba(232,196,120,.28); border-radius: 6px; background: rgba(10,14,18,.45); }
.gz-own-skills .gz-seat-skills { display: flex; flex-direction: column; gap: 3px; }
.gz-own-skills .gz-skill-col { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 3px; }
.gz-own-skills .gz-skill { text-align: center; }
.gz-own-skills .gz-skill-tip { left: auto; right: 0; }
/* 上排座位有状态牌子（出牌、思考中…）时下面多留一行，免得压到桌面中间。 */
.gz-top > .gz-seat:has(> .gz-seat-under .engine-seat-tags) { margin-bottom: calc(24px + var(--no-h) + var(--marks-h)); }
/* 自己的技能框（用户定 2026-11-21）：比原来大，但不要太大；始终单列，不折成两列（多了就往上长）。 */
.gz-own-skills { flex-wrap: nowrap; max-height: none; }
.gz-own-skills .gz-skill, .gz-own-skills .engine-switch { min-width: 4.2em; min-height: 0; padding: 3px 10px; font-size: clamp(14px, calc(1.2 * var(--vw)), 17px); line-height: 1.35; border-width: 1.5px; border-radius: 5px; }
/* 明置的技能签略大一点，宽度和暗将开关差不多。 */
.gz-own-skills .gz-skill { min-width: 4.8em; padding: 4px 12px; font-size: clamp(15px, calc(1.3 * var(--vw)), 18px); letter-spacing: .1em; border-radius: 6px; }

/* 左下角标记栏：自己的四种标记（先驱、阴阳鱼、珠联璧合、野心家），2×2 圆章；没有的画暗，现在能用的发光。 */
.gz-marker-bar { display: grid; grid-template-columns: repeat(2, auto); gap: 4px 6px; margin-bottom: 4px; }
.gz-marker > .gz-marker-coin { position: relative; display: grid; justify-items: center; gap: 1px; width: 48px; padding: 2px 0; border-radius: 10px; cursor: pointer; }
.gz-marker-coin svg { width: 40px; height: 40px; padding: 2px; border: 2px solid #b8892c; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff4cf, #d9b45c 70%, #8f6a1c); box-shadow: 0 2px 6px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.35); box-sizing: border-box; }
.gz-marker.marker-yinYangFish .gz-marker-coin svg { background: radial-gradient(circle at 35% 30%, #ffffff, #c9d2da 70%, #7d8a96); border-color: #8c99a6; }
.gz-marker.marker-linked .gz-marker-coin svg { background: radial-gradient(circle at 35% 30%, #f1fff4, #a9dcb9 70%, #4c8d64); border-color: #4c8d64; }
.gz-marker.marker-wild .gz-marker-coin svg { background: radial-gradient(circle at 35% 30%, #f6e9ff, #b483d6 70%, #5d2b80); border-color: #6b3592; }
.gz-marker-count { position: absolute; top: 0; right: 2px; min-width: 16px; height: 16px; padding: 0 3px; border: 1px solid #ffd76a; border-radius: 8px; background: #7a1c14; color: #fff; font: 700 11px/14px sans-serif; text-align: center; box-sizing: border-box; }
.gz-marker.is-empty .gz-marker-coin svg { filter: grayscale(1) brightness(.55); opacity: .55; }
.gz-marker.is-ready .gz-marker-coin svg { border-color: #ffe27a; animation: gz-marker-glow 1.4s ease-in-out infinite; }
.gz-marker[open] > .gz-marker-coin { background: rgba(255,215,106,.16); }
@keyframes gz-marker-glow { 0%, 100% { box-shadow: 0 0 4px 1px rgba(255,215,106,.55), 0 2px 6px rgba(0,0,0,.55); } 50% { box-shadow: 0 0 14px 5px rgba(255,215,106,.95), 0 2px 6px rgba(0,0,0,.55); } }
.gz-marker-panel { left: 0; bottom: calc(100% + 6px); width: min(280px, calc(80 * var(--vw))); gap: 8px; }
.gz-marker.marker-yinYangFish .gz-marker-panel, .gz-marker.marker-wild .gz-marker-panel { left: -58px; }
.gz-marker-panel strong { color: #ffd76a; font-size: 14px; }
.gz-marker-panel p { margin: 0; color: #e7dcc4; font-size: 13px; line-height: 1.5; }
.gz-marker-actions { display: flex; flex-direction: column; gap: 6px; }
.gz-marker-actions .engine-option { width: 100%; white-space: normal; text-align: left; }
.gz-marker-hint { align-self: center; padding: 6px 12px; border: 1px dashed #ffd76a; border-radius: 8px; color: #ffe27a; font-size: 15px; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .gz-marker.is-ready .gz-marker-coin svg { animation: none; box-shadow: 0 0 10px 3px rgba(255,215,106,.9); } }

/* 聊天和砸鸡蛋（app.js playChatFx、engine-view.js renderChat）。 */
.gz-chat-tools { display: flex; align-items: center; gap: 6px; }
.gz-chat-drawer > summary { position: relative; }
.gz-chat-unread { position: absolute; top: -7px; right: -7px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #d23a2a; color: #fff; font-size: 10px; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px #1f2429; }
.gz-chat-drawer .gz-drawer-panel { left: 0; bottom: calc(100% + 6px); width: min(380px, calc(88 * var(--vw))); gap: 8px; overflow: visible; }
.gz-chat-list { max-height: calc(34 * var(--vh)); min-height: 60px; margin: 0; padding: 6px 10px; overflow-y: auto; list-style: none; border: 1px solid var(--line); border-radius: 4px; background: rgba(8,17,18,.5); color: #d9dccb; font-size: 12px; line-height: 1.6; overscroll-behavior: contain; scrollbar-width: thin; }
p.gz-chat-list { display: grid; place-items: center; color: #8f9a93; }
.gz-chat-list li { padding: 2px 0; word-break: break-all; }
.gz-chat-list li b { color: #f1d28a; font-weight: 600; }
.gz-chat-list li.is-mine b { color: #9fd0ff; }
.gz-chat-quick { display: flex; flex-wrap: wrap; gap: 4px; }
.gz-chat-quick .small-btn { padding: 2px 8px; font-size: 11px; }
.gz-chat-send { display: flex; gap: 6px; }
.gz-chat-send input { flex: 1 1 auto; min-width: 0; padding: 5px 8px; border: 1px solid rgba(232,196,120,.45); border-radius: 5px; background: rgba(0,0,0,.4); color: #f3ead2; font-size: 13px; }
.gz-chat-send input:focus { outline: none; border-color: #ffd76a; box-shadow: 0 0 0 2px rgba(255,215,106,.25); }
.gz-egg-tool { min-width: 38px; padding: 2px 8px; font-size: 16px; line-height: 1; cursor: pointer; }
.gz-egg-tool.is-on { border-color: #ffd76a; box-shadow: 0 0 10px rgba(255,215,106,.75); background: linear-gradient(180deg, #6b5a2a, #3a2f12); }
.gz-egg-hint { position: absolute; z-index: 60; top: 38px; left: 50%; transform: translateX(-50%); padding: 6px 14px; border: 1px solid #ffd76a; border-radius: 999px; background: rgba(30,24,8,.92); color: #ffe9a8; font-size: 13px; white-space: nowrap; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.5); }
.gz-board.is-egg-aim .gz-seat:not(.is-you) { cursor: crosshair; }
.gz-board.is-egg-aim .gz-seat:not(.is-you):hover { outline: 3px solid #ffd76a; outline-offset: 2px; }
.gz-chat-fx { position: fixed; inset: 0; z-index: 910; pointer-events: none; overflow: hidden; }
.gz-chat-bubble { position: absolute; width: max-content; max-width: 220px; padding: 6px 11px; transform: translate(-50%, -100%); border: 1px solid #e8c478; border-radius: 12px; background: #fffaf0; color: #2a2014; font-size: 13px; line-height: 1.4; word-break: break-all; box-shadow: 0 4px 14px rgba(0,0,0,.55); animation: gz-bubble 4.2s ease-out forwards; }
.gz-chat-bubble::after { content: ''; position: absolute; left: 50%; bottom: -7px; width: 12px; height: 12px; transform: translateX(-50%) rotate(45deg); border-right: 1px solid #e8c478; border-bottom: 1px solid #e8c478; background: #fffaf0; }
@keyframes gz-bubble { 0% { opacity: 0; margin-top: 8px; } 6% { opacity: 1; margin-top: 0; } 85% { opacity: 1; } 100% { opacity: 0; } }
.gz-egg { position: absolute; width: 40px; height: 50px; filter: drop-shadow(0 4px 4px rgba(0,0,0,.5)); }
.gz-egg svg, .gz-egg-splat svg { display: block; width: 100%; height: 100%; }
.gz-egg-splat { position: absolute; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
@media (prefers-reduced-motion: reduce) { .gz-chat-bubble { animation: none; } }

/* 军令翻令牌：牌桌中央一排扣着的令牌，发起者翻两枚（同一元素加 is-open，CSS 翻转），再点一枚交出。
   素净做法：背面深色底 + 红色"令"字印章，正面白纸黑字，不用金框和黄底。 */
.gz-center .gz-played[hidden] { display: none; }
.gz-order-tokens { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 6px auto; }
.gz-order-caption { margin: 0; padding: 3px 14px; border-radius: 999px; background: rgba(10,14,18,.72); color: #f3ecda; font-size: clamp(14px, calc(1.4 * var(--vw)), 18px); letter-spacing: .08em; }
.gz-order-row { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(8px, calc(1.2 * var(--vw)), 18px); perspective: 900px; }
.gz-order-token { --w: clamp(70px, calc(7.2 * var(--vw)), 112px); position: relative; width: var(--w); height: calc(var(--w) * 1.38); padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: default; transition: translate .25s cubic-bezier(.2,.9,.3,1.25), opacity .3s ease, filter .3s ease; animation: gz-token-deal .42s cubic-bezier(.2,.9,.3,1.1) calc(var(--i) * 70ms) backwards; }
.gz-order-token.is-choice { cursor: pointer; }
.gz-order-token.is-choice:hover:not(:disabled) { translate: 0 -6px; filter: brightness(1.12); }
.gz-order-token.selected, .gz-order-token.is-picked { translate: 0 -12px; }
.gz-order-token.is-dim { opacity: .38; filter: grayscale(.6); }
.gz-order-token-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3,1.4,.5,1); }
.gz-order-token.is-open .gz-order-token-inner { transform: rotateY(180deg); }
.gz-order-token-back, .gz-order-token-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 10px; backface-visibility: hidden; box-shadow: 0 6px 14px rgba(0,0,0,.55); }
.gz-order-token-back { border: 2px solid #4a5560; background: linear-gradient(160deg, #2c343c, #161b20); }
.gz-order-token-back::after { content: ''; position: absolute; inset: 6px; border: 1px solid rgba(255,255,255,.08); border-radius: 7px; }
.gz-order-token-back { color: #c8352a; font: 900 calc(var(--w) * .5)/1 'STKaiti', 'KaiTi', 'Songti SC', serif; text-shadow: 0 0 1px #7a1a12; }
.gz-order-token-face { transform: rotateY(180deg); gap: 6px; padding: 8px 7px; border: 2px solid #8a7f70; background: #f2efe8; color: #1e1a15; text-align: center; }
.gz-order-token-face b { padding: 1px 8px; border: 2px solid #b8352a; border-radius: 4px; color: #b8352a; font: 800 calc(var(--w) * .2)/1.15 'Songti SC', 'STSong', serif; }
.gz-order-token-face small { font-size: clamp(11px, calc(var(--w) * .13), 15px); line-height: 1.35; }
/* 选中（或别人看到被翻起）的令牌：底下一圈亮光。 */
.gz-order-token.selected .gz-order-token-back, .gz-order-token.selected .gz-order-token-face { box-shadow: 0 0 0 3px #ffd76a, 0 0 22px 4px rgba(255,215,106,.7); }
.gz-order-token.is-picked:not(.is-open) .gz-order-token-back { box-shadow: 0 0 0 2px #e8e2d0, 0 0 18px 3px rgba(255,255,255,.4); }
.gz-order-token.is-open.is-choice .gz-order-token-face { box-shadow: 0 0 0 2px #b8352a, 0 8px 18px rgba(0,0,0,.55); }
/* 发牌：每次打乱后令牌依次落到桌上。 */
@keyframes gz-token-deal { from { opacity: 0; translate: 0 -40px; rotate: -8deg; } }
@media (prefers-reduced-motion: reduce) { .gz-order-token { animation: none; } .gz-order-token-inner { transition: none; } }

/* 选目标时的说明（details.targetHints，用户 2026-11-21 要求）：不能选的压暗 + 原因印章；能选的上沿贴字条。
   按用户偏好素净：半透明黑层、深底白字，不加金框和黄底。 */
.gz-seat-block { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 4px; border-radius: inherit; background: rgba(0,0,0,.45); pointer-events: none; animation: gz-away-dim .25s ease-out both; }
.gz-seat-block b { max-width: 94%; padding: 3px 7px; border: 2px solid rgba(235,228,214,.75); border-radius: 5px; background: rgba(14,14,16,.85); color: #f1ead8; font: 800 clamp(12px, calc(1.25 * var(--vw)), 16px)/1.25 'Songti SC', 'STSong', serif; letter-spacing: .04em; text-align: center; white-space: normal; box-shadow: 0 2px 8px rgba(0,0,0,.6); }
.gz-seat.is-unpickable { filter: saturate(.55); }
.gz-seat-notes { position: absolute; z-index: 6; left: 50%; top: 24%; translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: 3px; max-width: 96%; pointer-events: none; }
.gz-seat-note { max-width: 100%; padding: 2px 7px 2px 6px; border-left: 4px solid #9aa0a6; border-radius: 3px; background: rgba(12,12,14,.86); color: #f1ead8; font-size: clamp(11px, calc(1.05 * var(--vw)), 14px); font-weight: 700; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 1px 5px rgba(0,0,0,.55); }
.gz-seat-note.is-nododge { border-left-color: #e5533f; color: #ffd9d0; }
.gz-seat-note.is-void { border-left-color: #8d9399; color: #d5d9dd; }
.gz-seat-note.is-more { border-left-width: 0; padding: 1px 6px; font-size: 11px; }
@media (prefers-reduced-motion: reduce) { .gz-seat-block { animation: none; } }

/* 自己的手牌上限（用户定 2026-11-24）：技能框左边一个小框，底色和技能框一致；手牌超过上限时数字变红。 */
.gz-hand-limit { display: flex; flex-direction: column; align-items: center; gap: 2px; align-self: flex-end; padding: 5px 8px; border: 1px solid rgba(232,196,120,.28); border-radius: 6px; background: rgba(10,14,18,.45); color: rgba(240,228,204,.78); font-size: clamp(11px, calc(.9 * var(--vw)), 13px); line-height: 1.2; white-space: nowrap; }
.gz-hand-limit b { color: #f0e4cc; font-size: clamp(20px, calc(1.8 * var(--vw)), 26px); font-weight: 700; line-height: 1.1; }
.gz-hand-limit.is-over b { color: #e2705a; }

/* 魂（役鬼）：提示面板和手牌区里的魂都画成整张武将牌；手牌区的魂和手牌一样大。 */
.engine-option-general.gz-card { width: var(--play-w); height: calc(var(--play-w) * 1.405); }
.gz-general-card:not(.has-art) { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: linear-gradient(180deg, #3a3226, #1e1a12); color: #f3e2b6; }
.gz-general-card-camp { display: flex; gap: 3px; }
.engine-option-general:disabled { filter: grayscale(.8) brightness(.55); cursor: not-allowed; }
.engine-card.is-soul.is-option:disabled { filter: grayscale(.8) brightness(.55); cursor: not-allowed; }
.gz-hand-total.is-souls { color: #cfd6e6; }
.gz-souls-toggle { border-color: #8f9bb3; }

/* 获得魂的特效：武将牌在牌桌中间亮出，压暗、盖"魂"字印章，再飞进座位上的魂字条（素净，不加金框）。 */
.gz-soul-fly { --fly-w: clamp(60px, min(calc(8.5 * var(--vw)), calc(17 * var(--vh))), 128px); position: absolute; width: var(--fly-w); height: calc(var(--fly-w) * 1.405); border-radius: 6.5% / 4.6%; overflow: hidden; box-shadow: 0 6px 20px rgba(0,0,0,.7); opacity: 0; background: #1e1a12; }
.gz-soul-fly.is-back { background: repeating-linear-gradient(45deg, rgba(255,215,106,.12) 0 4px, transparent 4px 9px), linear-gradient(160deg, #7a2a1c, #3e120b); }
.gz-soul-fly img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gz-soul-shade { position: absolute; inset: 0; background: rgba(6,8,14,.62); opacity: 0; }
.gz-soul-seal { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 52%; aspect-ratio: 1; border: 3px solid #c8372a; border-radius: 50%; color: #e04a3a; font: 800 calc(var(--fly-w) * .3)/1 'Songti SC', 'STSong', 'SimSun', serif; text-shadow: 0 0 2px rgba(0,0,0,.6); opacity: 0; transform: translate(-50%, -50%); }

/* ── 判定面板（2026-11-25，用户参考图）：桌面中央一条半透明横条，盖在出牌区上。
   居中只用 inset + margin，不用 transform（牌里的放大图是 position: fixed）。 */
.gz-judge { --pw: clamp(54px, calc((100cqh - 96px) / 1.405), 112px); position: absolute; z-index: 20; inset: 0; width: fit-content; max-width: 98%; height: fit-content; margin: auto; padding: 6px 18px 10px; border-block: 1px solid rgba(255,255,255,.16); border-radius: 10px; background: rgba(14,18,24,.95); box-shadow: 0 4px 24px rgba(0,0,0,.55); animation: gz-judge-in .25s ease-out; }
/* 面板在时，下面的出牌区和播报先藏起来（判定牌已经在面板里），技能块照常露在上面。 */
.gz-center:has(> .gz-judge) > .gz-played, .gz-center:has(> .gz-judge) > .gz-banner { visibility: hidden; }
.gz-judge-title { margin: 0 0 6px; text-align: center; color: #f4ead8; font: 700 clamp(17px, calc(1.9 * var(--vw)), 24px)/1.25 'Kaiti SC', 'STKaiti', 'KaiTi', serif; letter-spacing: .08em; }
.gz-judge-title small { margin-left: 8px; color: #b9b2a6; font-size: .62em; letter-spacing: .04em; }
.gz-judge-row { display: flex; align-items: center; gap: 14px; }
.gz-judge figure { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 0; }
.gz-judge figcaption { color: #e8e1d4; font-size: 13px; font-weight: 700; white-space: nowrap; }
.gz-judge .gz-card { width: var(--pw); height: calc(var(--pw) * 1.405); }
.gz-judge .gz-card-index { width: calc(var(--pw) * .25); font-size: calc(var(--pw) * .22); }
.gz-judge .gz-card.is-virtual { display: grid; place-items: center; align-content: center; justify-items: center; gap: 4px; padding: 0; text-align: center; border: 2px dashed #c9a35a; background: linear-gradient(180deg, rgba(244,233,207,.92), rgba(220,203,161,.88)); }
.gz-judge .gz-card.is-virtual strong { font-size: calc(var(--pw) * .2); text-align: center; word-break: keep-all; }
.gz-judge .gz-card.is-virtual em { font-size: 11px; white-space: nowrap; }
.gz-judge .gz-card.is-back { background: #2a2f38; border: 1px solid rgba(255,255,255,.2); }
.gz-judge-label { padding: 8px 3px; border: 1px solid rgba(255,255,255,.22); border-radius: 6px; color: #d9d0c0; font: 600 14px/1.15 'Kaiti SC', 'STKaiti', 'KaiTi', serif; writing-mode: vertical-rl; letter-spacing: .2em; }
.gz-judge-rules { display: flex; flex-direction: column; gap: 5px; min-width: 0; max-width: 300px; margin: 0; padding: 0; list-style: none; }
.gz-judge-rules li { display: flex; gap: 6px; padding: 2px 8px; border-left: 3px solid transparent; border-radius: 4px; color: #e9e2d6; font-size: 14px; line-height: 1.35; transition: opacity .3s; }
.gz-judge-rules li b { flex: none; color: #f1ece4; font-weight: 800; white-space: nowrap; }
.gz-judge-rules li b::after { content: '：'; font-weight: 400; }
.gz-judge-rules .is-red { color: #e0504a; font-style: normal; }
.gz-judge-rules li.is-off { opacity: .38; }
.gz-judge-rules li.is-match { background: rgba(255,255,255,.08); color: #fff; animation: gz-judge-rule .35s ease-out .45s both; }
.gz-judge-rules li.is-hit { border-left-color: #3cc46a; }
.gz-judge-rules li.is-miss { border-left-color: #e0504a; }
.gz-judge-rules li.is-branch { border-left-color: #d8d2c6; }
.gz-judge.is-converted .gz-judge-rules li.is-match { animation-delay: 1.3s; }

/* 转化放入的延时锦囊：先亮实体牌，再变成写着牌名的虚拟牌。 */
.gz-judge-morph { display: grid; }
.gz-judge-morph > .gz-card { grid-area: 1 / 1; }
.gz-judge-morph > .gz-judge-from { animation: gz-judge-from 1.1s ease-in-out both; }
.gz-judge-morph > .gz-judge-to { animation: gz-judge-to 1.1s ease-out both; }
@keyframes gz-judge-from { 0%, 45% { opacity: 1; scale: 1; } 80% { opacity: 0; scale: .86; } 100% { opacity: 0; scale: 1; } }
@keyframes gz-judge-to { 0%, 50% { opacity: 0; scale: .8; box-shadow: none; } 78% { opacity: 1; scale: 1.06; box-shadow: 0 0 22px 6px rgba(255,255,255,.55); } 100% { opacity: 1; scale: 1; box-shadow: 0 2px 8px rgba(0,0,0,.5); } }

/* 判中绿勾、判不中红叉：先画圈，再画勾或叉。 */
.gz-judge-mark { position: absolute; z-index: 2; inset: 0; width: calc(var(--pw) * .78); height: calc(var(--pw) * .78); margin: auto; margin-top: calc(var(--pw) * .32); pointer-events: none; animation: gz-judge-pop .3s ease-out .45s both; }
.gz-judge-mark svg { width: 100%; height: 100%; fill: rgba(10,14,20,.55); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(0,0,0,.7)); }
.gz-judge-mark.is-hit svg { stroke: #3cd46e; }
.gz-judge-mark.is-miss svg { stroke: #ef4b45; }
.gz-judge-mark circle, .gz-judge-mark path { stroke-dasharray: 140; stroke-dashoffset: 140; animation: gz-judge-draw .45s ease-out .5s forwards; }
.gz-judge-mark path { animation-delay: .8s; }
.gz-judge.is-converted .gz-judge-mark { animation-delay: 1.3s; }
.gz-judge.is-converted .gz-judge-mark circle { animation-delay: 1.35s; }
.gz-judge.is-converted .gz-judge-mark path { animation-delay: 1.65s; }
.gz-judge.is-hit .gz-judge-face { box-shadow: 0 0 0 2px rgba(60,212,110,.85), 0 2px 8px rgba(0,0,0,.5); }
.gz-judge.is-miss .gz-judge-face { box-shadow: 0 0 0 2px rgba(239,75,69,.85), 0 2px 8px rgba(0,0,0,.5); }
@keyframes gz-judge-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes gz-judge-pop { from { opacity: 0; scale: 1.4; } to { opacity: 1; scale: 1; } }
@keyframes gz-judge-draw { to { stroke-dashoffset: 0; } }
@keyframes gz-judge-rule { from { background: rgba(255,255,255,.3); } to { background: rgba(255,255,255,.08); } }
@container (max-width: 560px) {
  .gz-judge-row { flex-wrap: wrap; justify-content: center; }
  .gz-judge-rules { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .gz-judge, .gz-judge * { animation: none !important; }
  .gz-judge-morph > .gz-judge-from { opacity: 0; }
  .gz-judge-mark circle, .gz-judge-mark path { stroke-dashoffset: 0; }
}

/* 虚拟牌（转化、视为使用）用实体牌的图：角标不写花色点数和牌名，只竖写"虚拟"，字体同角标里的牌名（用户定 2026-11-25）。 */
.gz-card-index.is-virtual i { margin-top: 0; }

/* 人机与托管（2026-11-27）：人机座位、托管的真人各一枚灰色小签；托管条灰底灰字（用户偏好素净，不用金框、花纹、黄底）。 */
/* 等候区不写席位编号（用户定 2026-11-28：开局随机排座）；左边留个空 span，"房主"和按钮仍靠右，空席同高。 */
.waiting-seat-top { align-items: center; gap: 6px; min-height: 14px; }
.waiting-seat-name { flex-shrink: 0; }
.waiting-seat-top > span:first-child { flex: 1; }
.waiting-seat-top .waiting-seat-host { flex: none; align-self: auto; margin: -2px -4px -2px 0; }
.waiting-seat-status.is-bot { display: flex; }
.waiting-bot-tag { padding: 0 6px; border: 1px solid rgba(200,208,214,.5); border-radius: 3px; color: #c9d0d6; font-size: 10px; line-height: 1.5; }
.waiting-seat.is-bot { border-style: dashed; }
.waiting-seat.is-bot .waiting-seat-name { color: #c9d0d6; }
.waiting-seat-kick { color: #c9d0d6; }
.gz-bot-tag { flex: none; padding: 0 4px; border: 1px solid rgba(255,255,255,.5); border-radius: 3px; background: rgba(0,0,0,.38); color: #e3e8ec; font-size: 9px; font-weight: 600; line-height: 13px; }
.gz-bot-tag.is-pilot { border-style: dashed; color: #c9d0d6; }
.engine-roster li em.is-bot { border-color: rgba(200,208,214,.5); color: #c9d0d6; }
.engine-roster-status.is-autopilot { color: #c9d0d6; }
.engine-roster-actions.gz-autopilot-row { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.08); }
.gz-autopilot-toggle.is-on { border-color: #c3c9cf; color: #fff; }
.engine-prompt.is-autopilot .engine-prompt-head { background: linear-gradient(90deg, transparent, rgba(30,35,40,.9) 14%, rgba(30,35,40,.9) 86%, transparent); }
.engine-prompt.is-autopilot .engine-prompt-head strong { color: #e3e8ec; letter-spacing: .1em; }
.engine-prompt.is-autopilot .engine-prompt-note { color: #b9c1c8; font-size: 13px; }
.engine-prompt.is-autopilot .small-btn { padding: 3px 14px; border-color: rgba(200,208,214,.6); color: #eef1f4; }
.opening-autopilot.is-on { border-color: #c3c9cf; color: #fff; }
.opening-autopilot-note { margin: 0 0 8px; padding: 6px 12px; border: 1px solid rgba(200,208,214,.45); border-radius: 4px; background: rgba(18,22,26,.7); color: #dfe5ea; font-size: 12px; }
