/* ============================================================
   雾隐大亨 — 样式
   配色：夜雾深蓝 + 灯塔金 · 地产用四套色系   ============================================================ */
:root {
  --bg0: #05080f;
  --bg1: #0b1226;
  --bg2: #131e3a;
  --panel: rgba(255, 255, 255, 0.05);
  --panel-2: rgba(255, 255, 255, 0.085);
  --panel-3: rgba(255, 255, 255, 0.13);
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.18);
  --text: #eaf0fd;
  --muted: #8fa1c4;
  --dim: #64748f;
  --accent: #f3b73f;
  --accent-deep: #d99a1c;
  --accent-2: #5cc9ea;
  --good: #5fd39b;
  --bad: #f4787c;
  --warn: #f3c96b;
  --weird: #bd93f5;
  --board-bg: #16203a;
  --tile-bg: #f8f3e7;
  --tile-ink: #2e2a22;
  --tile-meta: #5f5540;
  /* 画图插件生成的冷青水墨底纹：--tex-a = 底纹可见度（1 原样 / 0 看不见） */
  --tex-a: 0.55;
  --tex-paper: 248, 243, 231;
  --r-sm: 9px;
  --r-md: 13px;
  --r-lg: 18px;
  --r-xl: 24px;
  --shadow-1: 0 2px 6px rgba(0, 0, 0, 0.25);
  --shadow-2: 0 14px 34px rgba(0, 0, 0, 0.38);
  --shadow-3: 0 30px 80px rgba(0, 0, 0, 0.55);
  --ease: cubic-bezier(0.22, 0.8, 0.3, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
  background: #05080f;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 620px at 12% -12%, #1b3164 0%, transparent 62%),
    radial-gradient(760px 520px at 92% 4%, #12344a 0%, transparent 60%),
    radial-gradient(1100px 900px at 50% 120%, #0e1a33 0%, transparent 70%),
    linear-gradient(180deg, #070c18, #05080f 60%);
}

/* 细雾颗粒 + 暗角，让画面不那么干 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 65%, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px);
  background-size: 3px 3px, 5px 5px;
  box-shadow: inset 0 0 220px rgba(0, 0, 0, 0.75);
  opacity: 0.9;
}

button {
  font: inherit;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 16px;
  cursor: pointer;
  transition: transform 0.1s var(--ease), background 0.16s, border-color 0.16s, box-shadow 0.16s, opacity 0.16s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
button:hover:not(:disabled) { background: var(--panel-3); border-color: var(--line-2); }
button:active:not(:disabled) { transform: translateY(1px) scale(0.985); }
button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
button:disabled { opacity: 0.35; cursor: not-allowed; }

button.primary {
  background: linear-gradient(180deg, #ffd267 0%, #f3b73f 45%, #dda01f 100%);
  border-color: rgba(255, 226, 150, 0.75);
  color: #2b2003;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 8px 20px rgba(240, 180, 41, 0.24);
}
button.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #ffdd82 0%, #fbc44a 45%, #e6a922 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 10px 26px rgba(240, 180, 41, 0.34);
}
button.big { width: 100%; padding: 15px; font-size: 1.02rem; }
button.ghost {
  background: transparent; border-color: var(--line); color: var(--muted);
  padding: 6px 11px; font-size: 0.78rem;
}
button.ghost:hover:not(:disabled) { color: var(--text); background: var(--panel); }
/* 角色觉醒技（反照）在响应窗里的按钮：淡紫，和普通「认了」区分开 */
button.ghost.char-awake { color: #d7c4ff; border-color: rgba(189, 147, 245, 0.5); }
button.ghost.char-awake:hover:not(:disabled) { color: #efe6ff; background: rgba(189, 147, 245, 0.16); }
button.danger { background: rgba(244, 120, 124, 0.14); border-color: rgba(244, 120, 124, 0.45); color: #ffb9bb; }

.screen { height: 100dvh; }
[hidden] { display: none !important; }

/* ---------------- 大厅 ---------------- */
#lobby {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
}

.lobby-card {
  position: relative;
  width: min(430px, 100%);
  padding: 34px 30px 30px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line-2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 55%),
    linear-gradient(180deg, #16213c, #0c1425);
  box-shadow: var(--shadow-3), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  text-align: center;
  overflow: hidden;
}
.lobby-card::before {
  content: "";
  position: absolute;
  top: -60%;
  left: -20%;
  width: 70%;
  height: 140%;
  background: radial-gradient(closest-side, rgba(92, 201, 234, 0.16), transparent);
  pointer-events: none;
}

.logo {
  font-size: 42px;
  line-height: 1;
  filter: drop-shadow(0 8px 18px rgba(92, 201, 234, 0.35));
}
.lobby-card h1 {
  margin: 12px 0 4px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 20px rgba(92, 201, 234, 0.25);
}
.lobby-card h1 span {
  background: linear-gradient(180deg, #ffd774, #e9a92c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sub { color: var(--muted); font-size: 0.84rem; margin: 0 0 24px; letter-spacing: 0.02em; }
.lobby-card label { display: block; text-align: left; font-size: 0.75rem; color: var(--muted); margin-bottom: 7px; letter-spacing: 0.04em; }

input {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}
input::placeholder { color: var(--dim); }
input:focus {
  border-color: rgba(243, 183, 63, 0.7);
  background: rgba(0, 0, 0, 0.42);
  box-shadow: 0 0 0 3px rgba(243, 183, 63, 0.14);
}
#nameInput { margin-bottom: 16px; }
#codeInput {
  text-transform: uppercase;
  letter-spacing: 0.34em;
  text-align: center;
  font-weight: 800;
  font-size: 1.05rem;
}

.divider { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 0.75rem; margin: 24px 0 14px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); }
.join-row { display: flex; gap: 9px; }
.join-row input { flex: 1; }
.join-row button { flex: 0 0 auto; }
.msg { min-height: 1.3em; color: var(--bad); font-size: 0.8rem; margin: 14px 0 0; }
.footnote { color: rgba(143, 161, 196, 0.5); font-size: 0.74rem; margin: 0; letter-spacing: 0.03em; }
.footnote-icp { margin-top: 0.25rem; }
.footnote-icp a { color: inherit; text-decoration: none; }
.footnote-icp a:hover { text-decoration: underline; }

/* ---------------- 游戏布局 ---------------- */
#game { display: flex; flex-direction: row; gap: 4px; }

.board-wrap {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

#board {
  position: relative;
  width: min(100%, calc(100dvh - 28px));
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  grid-template-rows: repeat(11, 1fr);
  gap: 4px;
  font-size: min(2.02vmin, 17px);
  padding: 8px;
  border-radius: var(--r-xl);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.07), transparent 40%),
    linear-gradient(160deg, #24314f, #121a2d 70%);
  box-shadow:
    var(--shadow-3),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

/* ---------------- 格子 ---------------- */
.tile {
  position: relative;
  border-radius: 8px;
  background: linear-gradient(180deg, #fdfaf2, var(--tile-bg));
  color: var(--tile-ink);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28), 0 3px 8px rgba(0, 0, 0, 0.18);
  transition: transform 0.14s var(--ease), box-shadow 0.16s, border-color 0.16s;
  min-width: 0;
}
.tile .bar {
  height: 21%;
  min-height: 7px;
  flex: 0 0 auto;
  background: #b9b2a0;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.16);
  position: relative;
  z-index: 2;
}
/* 同色系成套（同一人持有该色系 ≥2 块 → 踩任意一块都按整组收租）：色条发光 + 角上一个「套」 */
.tile.has-set .bar {
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.16),
    0 0 7px 2px rgba(255, 232, 160, 0.85);
}
.tile.has-set::after {
  content: '套';
  position: absolute;
  top: 3px;
  right: 3px;
  z-index: 6;
  min-width: 1.35em;
  height: 1.35em;
  padding: 0 0.18em;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58em;
  font-weight: 900;
  line-height: 1;
  color: #2b1d05;
  background: linear-gradient(180deg, #ffe9a8, #f3b73f);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45), 0 1px 4px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
/* 地块插画：铺满、贴底、压在文字下面*/
.tile .tile-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  opacity: 0.96;
  filter: saturate(1.18) contrast(1.06);
  transform: scale(1.02);
  transform-origin: 50% 100%;
}
/* 事件 / 税 / 宝箱 / 传送门：全幅插画，压低一点让字更清楚 */
.tile.k-chance .tile-art,
.tile.k-tax .tile-art,
.tile.k-fortune .tile-art,
.tile.k-teleport .tile-art { opacity: 0.8; }
.tile .body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 1px 2px 2px;
  text-align: center;
  min-height: 0;
  position: relative;
  z-index: 1;
}
.tile .tname {
  font-size: 0.72em;
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.02em;
  max-width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-all;
  text-shadow: 0 1px 0 rgba(255, 252, 244, 0.7);
}
.tile .tmeta {
  font-size: 0.6em;
  color: var(--tile-meta);
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 rgba(255, 252, 244, 0.7);
}
/* 地产 / 驿站：插画占上半条横带，文字落在下半部浅色贴纸上 */
.tile.k-property .tile-art,
.tile.k-station .tile-art {
  inset: 21% 0 auto 0;
  height: 46%;
  object-position: 50% 100%;
}
.tile.k-property .body,
.tile.k-station .body { justify-content: flex-end; padding-bottom: 3px; }
.tile.k-property .body::before,
.tile.k-station .body::before {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: -4px;
  height: 46%;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(253, 250, 242, 0.99) 62%, rgba(253, 250, 242, 0.92) 84%, rgba(253, 250, 242, 0) 100%);
}
.tile .ticon { font-size: 1.22em; line-height: 1.05; }

/* 四个角*/
.tile.k-start, .tile.k-jail, .tile.k-freepark, .tile.k-gotojail {
  border-radius: 13px;
  background: linear-gradient(160deg, #32456e, #1b2744);
  color: #dbe7ff;
  justify-content: center;
  align-items: center;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.tile.k-start { border-color: rgba(95, 211, 155, 0.55); box-shadow: 0 2px 14px rgba(95, 211, 155, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.tile.k-gotojail { border-color: rgba(244, 120, 124, 0.5); }
.tile.k-freepark { border-color: rgba(243, 183, 63, 0.5); }
.tile.k-jail { border-color: rgba(140, 160, 200, 0.4); }
.tile.corner .body { gap: 2px; }
.tile.corner .tname { font-size: 0.76em; }
.tile.corner .ticon { font-size: 1.5em; }
.tile.corner .tile-art { opacity: 0.72; }
.tile.corner .tname,
.tile.corner .tmeta { text-shadow: 0 1px 6px rgba(2, 6, 16, 0.65), 0 0 2px rgba(2, 6, 16, 0.5); }

.tile.k-chance { background: linear-gradient(180deg, #f4ecfd, #e9dcf9); }
.tile.k-chance .bar { background: linear-gradient(180deg, #bb9be8, #a882df); }
.tile.k-tax { background: linear-gradient(180deg, #fcefed, #f6ddd9); }
.tile.k-tax .bar { background: linear-gradient(180deg, #ea9a9a, #df8282); }
.tile.k-fortune { background: linear-gradient(180deg, #fdf5e2, #f7ead0); }
.tile.k-fortune .bar { background: linear-gradient(180deg, #eecb6e, #e0b74f); }
.tile.k-teleport { background: linear-gradient(180deg, #e9f8f5, #d8f1ec); }
.tile.k-teleport .bar { background: linear-gradient(180deg, #6fd0c3, #4dbbad); }
.tile.k-station { background: linear-gradient(180deg, #fbfcfd, #eef2f6); }
.tile.k-station .bar { background: linear-gradient(180deg, #a8b4c4, #8d9bac); }
/* 无事发生：低饱和的青灰，一眼看出「这格不咬人」*/
.tile.k-idle { background: linear-gradient(180deg, #eef4f1, #dee9e3); }
.tile.k-idle .tile-art { opacity: 0.74; }
.tile.k-idle .ticon { opacity: 0.78; filter: saturate(0.55); }

/* 底纹：只当「纸」用 —— 铺在整格最底层，上面的矢量插画 / 色条 / 文字一个像素都不动。
   --tex 由 app.js 按色系写进行内样式（public/tex/*.webp），没有 --tex 的格子完全不受影响。*/
.tile.has-tex {
  background-image:
    linear-gradient(rgba(var(--tex-paper), calc(1 - var(--tex-a))), rgba(var(--tex-paper), calc(1 - var(--tex-a)))),
    var(--tex);
  background-size: cover;
  background-position: 50% 50%;
  background-repeat: no-repeat;
}

/* 有主：整格铺一层业主色 + 加粗外圈，远看就知道归谁 */
.tile.owned { border-color: var(--ow); }
.tile.owned::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--ow) 30%, transparent), color-mix(in srgb, var(--ow) 54%, transparent));
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: multiply;
  opacity: 0.85;
}
.tile.owned .body { z-index: 2; }
.tile.owned .tile-art { opacity: 0.82; }
/* 我自己的地：徽章加金圈，格子里再描一道白线，跟别人的一眼分开 */
.tile.mine-own { border-color: #ffe9a8; }
.tile.mine-own .owner-badge {
  border-color: #ffe9a8;
  box-shadow: 0 0 0 1.5px rgba(243, 183, 63, 0.95), 0 1px 5px rgba(0, 0, 0, 0.55);
}
/* 产权徽章：业主全名，颜色即业主*/
.tile .owner-badge {
  position: absolute;
  top: 3px;
  left: 3px;
  max-width: calc(100% - 6px);
  height: 1.75em;
  padding: 0 0.42em;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6em;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.28);
  z-index: 5;
}
/* 无主：灰底白字，一眼分清「还没人买」和「是谁的」*/
.tile .unowned-tag {
  position: absolute;
  top: 3px;
  left: 3px;
  height: 1.6em;
  padding: 0 0.4em;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5em;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  color: #e6ecf5;
  background: rgba(46, 58, 78, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.4);
  z-index: 5;
}

/* 自己站的那格：白框 + 「你」小旗，扫一眼就能定位*/
.tile.my-tile {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 0 18px 2px rgba(255, 230, 160, 0.5), 0 8px 22px rgba(0, 0, 0, 0.45);
}
.tile .you-flag {
  position: absolute;
  top: -0.1em;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 0.34em;
  height: 1.5em;
  border-radius: 0 0 99px 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.14em;
  font-size: 0.56em;
  font-weight: 900;
  line-height: 1;
  color: #221704;
  background: linear-gradient(180deg, #ffe9a8, #f3b73f);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  z-index: 6;
  letter-spacing: -0.02em;
}
.tile .you-flag::before { content: "▼"; font-size: 0.8em; opacity: 0.75; }

/* 鼠标停在玩家条上时，棋盘上对应的格子闪一下*/
.tile.peek {
  animation: peekGlow 0.9s ease-in-out infinite;
  z-index: 4;
}
@keyframes peekGlow {
  0%, 100% { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45), 0 8px 22px rgba(0, 0, 0, 0.4); }
  50% { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.95), 0 0 20px 4px rgba(255, 240, 200, 0.55); }
}

/* 正在拍卖的地：右上角小锤子 + 呼吸光圈 */
.tile .auction-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 1.9em;
  height: 1.9em;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6em;
  line-height: 1;
  background: rgba(18, 22, 34, 0.86);
  border: 1px solid rgba(255, 215, 116, 0.85);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.55);
  z-index: 6;
  animation: hammerPulse 1.1s ease-in-out infinite;
}
.tile.on-auction {
  box-shadow: 0 0 0 2px #ffd774, 0 0 18px rgba(255, 215, 116, 0.45);
}
@keyframes hammerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.14) rotate(-8deg); }
}

.tile.here {
  transform: translateY(-4px);
  box-shadow: 0 0 0 3px var(--here, var(--accent)), 0 10px 26px rgba(0, 0, 0, 0.42);
  z-index: 4;
  animation: herePulse 1.9s ease-in-out infinite;
}
@keyframes herePulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--here, var(--accent)), 0 10px 26px rgba(0, 0, 0, 0.42); }
  50% { box-shadow: 0 0 0 4px var(--here, var(--accent)), 0 0 20px 5px rgba(255, 255, 255, 0.22); }
}
/* 业主底色条：地块最下面一条业主色，远看就知道是谁的*/
.tile.owned .body::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: -2px;
  height: 3px;
  background: var(--ow);
  border-radius: 0 0 6px 6px;
  z-index: 3;
  pointer-events: none;
}

/* 等级小房子*/
.tile .pips {
  position: absolute;
  top: 3px;
  right: 4px;
  display: flex;
  gap: 2px;
  align-items: flex-end;
  z-index: 2;
}
.tile .pips i {
  width: 0.34em;
  height: 0.34em;
  border-radius: 2px;
  background: linear-gradient(180deg, #c97a35, #9c5620);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  display: block;
}
.tile .pips i.tower {
  width: 0.46em;
  height: 0.62em;
  background: linear-gradient(180deg, #ffe08a, #e0a52a);
  box-shadow: 0 0 6px rgba(243, 183, 63, 0.55), 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 棋子 */
.tokens {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 2px;
  padding: 0 1px;
  pointer-events: none;
  z-index: 3;
  font-size: 0.78em;
}
.tkw {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}
.tk {
  width: 2.15em;
  height: 2.15em;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0b0e15;
  font-weight: 900;
  font-size: 1em;
  line-height: 1;
  transition: transform 0.14s var(--ease);
  animation: tkIn 0.2s var(--ease);
}
.tk-name {
  max-width: 5.4em;
  padding: 0 0.3em;
  border-radius: 99px;
  font-size: 0.56em;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  background: rgba(12, 18, 30, 0.82);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  letter-spacing: 0.02em;
}
.tkw.me .tk {
  width: 2.6em;
  height: 2.6em;
  outline: 2.5px solid #fff;
  outline-offset: 1px;
  box-shadow: 0 0 0 4px rgba(10, 16, 30, 0.55), 0 2px 10px rgba(0, 0, 0, 0.6);
  animation: meBob 2.4s ease-in-out infinite;
}
.tkw.me .tk-name {
  background: #fff;
  color: #12182a;
  text-shadow: none;
}
@keyframes meBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1.5px); }
}
.tokens .tkw:not(:first-child) { margin-left: -0.25em; }
@keyframes tkIn {
  from { transform: scale(0.3); opacity: 0.15; }
  to { transform: scale(1); opacity: 1; }
}

/* ---------------- 棋盘中心 ---------------- */
#center {
  grid-area: 2 / 2 / 11 / 11;
  border-radius: var(--r-md);
  background:
    radial-gradient(120% 110% at 50% 0%, #2a3c66 0%, #141d33 58%, #0c1324 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75em;
  padding: 1.5em;
  font-size: min(1.9vmin, 17px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
#center::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(92, 201, 234, 0.07) 70deg, transparent 140deg);
  animation: spin 30s linear infinite;
  pointer-events: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
#center > * { position: relative; }

.isle-title {
  font-size: 1.45em;
  font-weight: 900;
  letter-spacing: 0.16em;
  color: #d8e6ff;
  text-shadow: 0 2px 24px rgba(92, 201, 234, 0.35);
}
.isle-title small {
  display: block;
  font-size: 0.42em;
  letter-spacing: 0.46em;
  color: var(--accent);
  margin-top: 0.7em;
  font-weight: 800;
  opacity: 0.9;
}

/* 骰子 */
.dice-row { display: flex; gap: 0.65em; align-items: center; }
.die {
  width: 2.7em;
  height: 2.7em;
  border-radius: 0.62em;
  background: linear-gradient(158deg, #fffdf8 0%, #efe7d5 55%, #dcd2bd 100%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 0.32em;
  gap: 0.06em;
  box-shadow:
    0 0.16em 0 #a99f88,
    0 0.42em 0.7em rgba(0, 0, 0, 0.45),
    inset 0 0.1em 0.14em rgba(255, 255, 255, 0.9);
}
.die i {
  display: block;
  border-radius: 50%;
  background: #232a3a;
  opacity: 0;
  transform: scale(0.55);
  transition: opacity 0.12s, transform 0.12s;
  align-self: center;
  justify-self: center;
  width: 72%;
  height: 72%;
  box-shadow: inset 0 -1px 1px rgba(255, 255, 255, 0.25);
}
.die i.on { opacity: 1; transform: scale(1); }
.die.rolling { animation: shake 0.32s ease-in-out infinite; }
@keyframes shake {
  0%, 100% { transform: translateY(0) rotate(0); }
  25% { transform: translateY(-5px) rotate(-7deg); }
  75% { transform: translateY(-1px) rotate(6deg); }
}
.dice-sum {
  font-size: 1.15em;
  color: var(--muted);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding-left: 0.2em;
}
.dice-sum b { color: var(--accent); }

.turn-line { font-size: 0.92em; color: var(--muted); line-height: 1.55; }
.turn-line b { color: var(--text); }

/* 圈数进度 */
.round-bar {
  width: min(78%, 22em);
  height: 0.34em;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}
.round-bar span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #5cc9ea, #f3b73f);
  box-shadow: 0 0 10px rgba(243, 183, 63, 0.5);
  transition: width 0.5s var(--ease);
}
.round-note {
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  color: var(--dim);
  opacity: 0.85;
}

.pot-line { font-size: 0.74em; color: var(--muted); }
.pot-line b { color: var(--accent); font-variant-numeric: tabular-nums; }

.my-turn {
  font-size: 0.78em;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #2b2003;
  background: linear-gradient(180deg, #ffd774, #f0b235);
  padding: 0.28em 0.9em;
  border-radius: 99px;
  box-shadow: 0 0 0 0 rgba(243, 183, 63, 0.6);
  animation: pulse 1.9s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(243, 183, 63, 0.55); }
  70% { box-shadow: 0 0 0 0.75em rgba(243, 183, 63, 0); }
  100% { box-shadow: 0 0 0 0 rgba(243, 183, 63, 0); }
}

.mini-players { display: flex; flex-wrap: wrap; gap: 0.34em; justify-content: center; max-width: 100%; }
.mini-p {
  display: flex;
  align-items: center;
  gap: 0.32em;
  font-size: 0.68em;
  padding: 0.28em 0.6em 0.28em 0.3em;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid transparent;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.mini-p .av {
  width: 1.55em; height: 1.55em; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82em; font-weight: 900; color: #0b0e15;
}
.mini-p b { font-weight: 700; }
.mini-p.active {
  border-color: rgba(243, 183, 63, 0.7);
  background: rgba(243, 183, 63, 0.14);
  box-shadow: 0 0 14px rgba(243, 183, 63, 0.18);
}
.mini-p.out { opacity: 0.42; }

.lobby-box { display: flex; flex-direction: column; align-items: center; gap: 0.6em; }
.code-big {
  font-size: 2.5em;
  font-weight: 900;
  letter-spacing: 0.3em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 34px rgba(243, 183, 63, 0.4);
  padding-left: 0.3em;
}
.lobby-hint { font-size: 0.72em; color: var(--muted); }
.lobby-avatars { display: flex; gap: 0.4em; flex-wrap: wrap; justify-content: center; }

/* ---------------- 侧栏 ---------------- */
.side {
  flex: 0 0 352px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px 14px 0 4px;
  min-height: 0;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

/* 底部常驻操作条：主按钮 + 手牌钉在下方，其余内容从它下面滚过去 */
.ops {
  position: sticky;
  bottom: 0;
  z-index: 30;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 0 12px;
  background: linear-gradient(180deg, rgba(5, 8, 15, 0) 0, #070c18 22%, #05080f 100%);
}
.ops.mine .actions > button.primary,
.ops.mine .actions .row > button.primary {
  box-shadow: 0 0 0 2px rgba(243, 183, 63, 0.4), 0 10px 26px rgba(243, 183, 63, 0.22);
}
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px; }
.side-head .room { font-size: 0.78rem; color: var(--muted); display: flex; align-items: center; gap: 7px; white-space: nowrap; flex: 0 0 auto; }
.side-head .room b {
  color: var(--accent);
  letter-spacing: 0.2em;
  font-size: 1.02rem;
  font-weight: 900;
  padding: 2px 8px 2px 10px;
  border-radius: 7px;
  background: rgba(243, 183, 63, 0.1);
  border: 1px solid rgba(243, 183, 63, 0.22);
}

/* 邀请链接（只在大厅显示）*/

.share {
  margin: 8px 2px 2px;
  padding: 8px 10px 7px;
  border-radius: 12px;
  background: rgba(120, 170, 255, 0.07);
  border: 1px solid rgba(120, 170, 255, 0.16);
}
.share-row { display: flex; align-items: center; gap: 7px; }
.share-tag {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  color: #cfe0ff;
  background: rgba(120, 170, 255, 0.18);
  border: 1px solid rgba(120, 170, 255, 0.28);
}
.share-tag.ok {
  color: #0d2a1c;
  background: linear-gradient(180deg, #7ee0aa, #45b57f);
  border-color: transparent;
}
.share code {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.72rem;
  color: #dfe8ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: all;
}
.share button { flex: 0 0 auto; padding: 4px 10px; font-size: 0.74rem; }
.share-note {
  margin: 6px 0 0;
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--muted);
}

/* 玩家条*/
.players {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(40vh, 330px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.prow {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border-radius: var(--r-md);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
  transition: background 0.16s, border-color 0.16s, box-shadow 0.16s, transform 0.16s;
  overflow: hidden;
}
.prow.active {
  background: linear-gradient(90deg, rgba(243, 183, 63, 0.16), rgba(243, 183, 63, 0.05));
  border-color: rgba(243, 183, 63, 0.55);
  box-shadow: 0 0 18px rgba(243, 183, 63, 0.12);
}
.prow.active::before {
  content: "";
  position: absolute;
  left: 0; top: 12%; bottom: 12%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #ffd774, #e0a52a);
}
.prow.out { opacity: 0.4; }
.prow.out .nm { text-decoration: line-through; }

/* 观战的人：一行小字，不占玩家位*/
.spect-foot {
  align-self: flex-start;
  margin-top: 2px;
  font-size: 0.72em;
  color: var(--muted);
  opacity: 0.85;
  cursor: help;
}
.spect-self {
  align-self: flex-start;
  margin-top: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72em;
  color: #ffd774;
  background: rgba(255, 215, 116, 0.1);
  border: 1px solid rgba(255, 215, 116, 0.32);
}

.prow .avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 900; color: #0b0e15;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.25), 0 1px 4px rgba(0, 0, 0, 0.3);
}
.prow .nm { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.prow .nm-top {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}
.prow .nm-where {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76em;
  color: var(--muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prow.active .nm-where { color: var(--muted); }
.prow .nm-where .pin {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.prow .nm .tag {
  font-size: 0.66em; font-weight: 700; color: var(--muted);
  margin-left: 5px; padding: 1px 5px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  vertical-align: 1px;
}
.prow .nm .tag.host { color: #2b2003; background: rgba(243, 183, 63, 0.8); }
.prow .cash {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: var(--good);
  font-size: 0.95rem;
  transition: color 0.3s;
}
.prow .cash.low { color: var(--bad); }
.prow .cash.flash-up { animation: cashUp 0.9s ease; }
.prow .cash.flash-down { animation: cashDown 0.9s ease; }
@keyframes cashUp {
  0% { color: var(--good); transform: scale(1); }
  30% { color: #a9ffcf; transform: scale(1.14); }
  100% { transform: scale(1); }
}
@keyframes cashDown {
  0% { color: var(--bad); transform: scale(1); }
  30% { color: #ffb7b9; transform: scale(1.14); }
  100% { transform: scale(1); }
}
.prow .badges { display: flex; gap: 3px; font-size: 0.68rem; line-height: 1; }

/* 操作区*/
.actions { display: flex; flex-direction: column; gap: 7px; flex: 0 0 auto; }
/* 回合步骤提示：当前该做什么，一眼能看见 */
.turn-guide {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}
.tg-steps { display: flex; gap: 4px; flex: 0 0 auto; }
.tg-step {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid transparent;
}
.tg-step.done { color: #0d1420; background: rgba(243, 183, 63, 0.38); }
.tg-step.on {
  color: #2b2003;
  background: linear-gradient(180deg, #ffd774, #f0b235);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 2px rgba(243, 183, 63, 0.16);
}
.tg-text { flex: 1 1 auto; min-width: 0; }
.actions .hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 13px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.035);
  border: 1px dashed rgba(255, 255, 255, 0.13);
}
.actions .hint b { color: var(--text); }
.actions .row { display: flex; gap: 7px; }
.actions .row > button { flex: 1; }
.actions > button { padding: 12px 16px; font-size: 0.92rem; }
.actions .row > button.primary { font-size: 1rem; padding: 13px; }

/* 我的地产 */
.mylist {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 0 1 auto;
  min-height: 0;
  max-height: 32dvh;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}
.mylist:empty { display: none; }
.list-title {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--dim);
  padding: 3px 4px 1px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.list-title b { color: var(--muted); font-weight: 700; }

.land {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: var(--r-sm);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.77rem;
  transition: background 0.14s, border-color 0.14s;
  cursor: pointer;
}
.land:hover { background: var(--panel-2); }
.land:focus-visible { outline: 2px solid rgba(243, 183, 63, 0.65); outline-offset: 1px; }
.land .swatch {
  width: 5px; height: 26px; border-radius: 3px; flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.land .info { flex: 1 1 auto; min-width: 0; }
.land .info b { font-weight: 700; display: block; line-height: 1.25; }
.land .info span { color: var(--muted); font-size: 0.86em; font-variant-numeric: tabular-nums; }
.land .info .up { color: var(--accent); font-weight: 700; }
.land button {
  padding: 5px 9px;
  font-size: 0.7rem;
  border-radius: 7px;
  flex: 0 0 auto;
}
.land .maxed { font-size: 0.68rem; color: var(--accent); font-weight: 700; }
.land .here-tag {
  font-size: 0.66rem;
  font-weight: 800;
  color: #2b2003;
  background: linear-gradient(180deg, #ffd774, #f0b235);
  padding: 2px 7px;
  border-radius: 5px;
  flex: 0 0 auto;
}
.land .next-lv {
  font-size: 0.66rem;
  color: var(--dim);
  flex: 0 0 auto;
}
.land .land-open {
  flex: 0 0 auto;
  color: var(--dim);
  font-size: 1.05rem;
  line-height: 1;
  opacity: 0.65;
}

/* 变卖按钮：低调一点，别跟升级按钮抢眼 */
.land .sell-btn {
  padding: 4px 8px;
  font-size: 0.66rem;
  border-radius: 6px;
  flex: 0 0 auto;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
}
.land .sell-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.22); }

/* 变卖 / 拍卖 弹层 */
.sell-note {
  font-size: 0.82rem;
  line-height: 1.75;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  margin-bottom: 12px;
}
.sell-note b { color: var(--accent); }

.bid-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.bid-price b {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.bid-price b.has { color: #ffd774; }

/* 拍卖里的提示是说明文字，不是报错，别用红的*/
#auction .msg { color: var(--muted); }
#auction .msg b { color: #ffd774; }

/* 拍卖：右下角浮动卡片，棋盘一直露着（点格子看详情照样能用） */
#auction {
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0;
  background: none;
  backdrop-filter: none;
  pointer-events: none;
}
#auction .overlay-card {
  width: 344px;
  max-width: calc(100vw - 20px);
  margin: 0 16px 16px 0;
  padding: 13px 16px 12px;
  pointer-events: auto;
  border-color: rgba(255, 200, 100, 0.26);
  box-shadow: var(--shadow-3), 0 0 0 1px rgba(255, 200, 100, 0.1), 0 0 34px rgba(255, 190, 90, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: dockIn 0.24s var(--ease);
}
@keyframes dockIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
#auction .overlay-card h2 { font-size: 0.92rem; margin-bottom: 5px; }
#auction .ov-sub { font-size: 0.78rem; line-height: 1.5; margin-bottom: 8px; }
#auction .timer { margin-bottom: 3px; }
#auction .bid-price { justify-content: flex-start; gap: 9px; margin: 2px 0 0; }
#auction .bid-price b { font-size: 1.45rem; }
#auction .msg { font-size: 0.74rem; min-height: 0; margin: 3px 0 8px; }
#auction .overlay-actions { flex-direction: column; gap: 6px; margin-top: 0; }
#auction .overlay-actions > button { padding: 9px 12px; font-size: 0.84rem; }
@media (max-width: 620px) {
  #auction .overlay-card { width: calc(100vw - 20px); max-width: none; margin: 0 10px 10px; }
}

/* ---------------- 破产自救：同样右下角浮动，换成告警色 ---------------- */
#rescue {
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0;
  background: none;
  backdrop-filter: none;
  pointer-events: none;
  z-index: 62;
}
#rescue .overlay-card {
  width: 352px;
  max-width: calc(100vw - 20px);
  margin: 0 16px 16px 0;
  padding: 13px 16px 12px;
  pointer-events: auto;
  border-color: rgba(255, 120, 120, 0.32);
  box-shadow: var(--shadow-3), 0 0 0 1px rgba(255, 110, 110, 0.12), 0 0 34px rgba(255, 90, 90, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: dockIn 0.24s var(--ease);
}
#rescue .overlay-card h2 { font-size: 0.95rem; margin-bottom: 5px; color: #ffb4b4; }
#rescue .ov-sub { font-size: 0.78rem; line-height: 1.55; margin-bottom: 8px; }
#rescue .ov-sub b { color: #ffd774; }
#rescue .timer { margin-bottom: 5px; }
#rescue .msg { font-size: 0.74rem; min-height: 0; color: var(--muted); margin: 4px 0 8px; }
#rescue .overlay-actions { margin-top: 0; }
#rescue .overlay-actions > button { padding: 9px 12px; font-size: 0.84rem; }
.rescue-list { display: flex; flex-direction: column; gap: 6px; max-height: 38dvh; overflow-y: auto; }
.rescue-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.78rem;
}
.rescue-row .swatch { width: 7px; height: 26px; border-radius: 4px; flex: 0 0 auto; }
.rescue-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rescue-row .nm i { font-style: normal; color: var(--dim); font-size: 0.72rem; }
.rescue-row button { padding: 4px 8px; font-size: 0.72rem; }
@media (max-width: 620px) {
  #rescue .overlay-card { width: calc(100vw - 20px); max-width: none; margin: 0 10px 10px; }
}

/* ---------------- 结算投票 ---------------- */
#vote {
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0;
  background: none;
  backdrop-filter: none;
  pointer-events: none;
  z-index: 63;
}
#vote .overlay-card {
  width: 352px;
  max-width: calc(100vw - 20px);
  margin: 0 16px 16px 0;
  padding: 13px 16px 12px;
  pointer-events: auto;
  border-color: rgba(150, 180, 255, 0.32);
  box-shadow: var(--shadow-3), 0 0 0 1px rgba(120, 160, 255, 0.12), 0 0 34px rgba(90, 130, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: dockIn 0.24s var(--ease);
}
#vote .overlay-card h2 { font-size: 0.95rem; margin-bottom: 5px; color: #bcd0ff; }
#vote .ov-sub { font-size: 0.78rem; line-height: 1.55; margin-bottom: 8px; }
#vote .ov-sub b { color: #ffd774; }
#vote .timer { margin-bottom: 5px; }
#vote .msg { font-size: 0.74rem; min-height: 0; color: var(--muted); margin: 4px 0 8px; }
#vote .overlay-actions { margin-top: 0; }
#vote .overlay-actions > button { padding: 9px 12px; font-size: 0.84rem; }
#vote .overlay-actions > button:disabled { opacity: 0.45; }
.vote-list { display: flex; flex-direction: column; gap: 6px; max-height: 34dvh; overflow-y: auto; }
.vote-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.78rem;
}
.vote-row .swatch { width: 7px; height: 22px; border-radius: 4px; flex: 0 0 auto; }
.vote-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vote-row .tick { flex: 0 0 auto; font-size: 0.76rem; color: var(--dim); }
.vote-row.yes { border-color: rgba(120, 220, 150, 0.28); }
.vote-row.yes .tick { color: #8fe3a0; }
.vote-row.no { border-color: rgba(255, 140, 140, 0.26); }
.vote-row.no .tick { color: #ff9a9a; }
@media (max-width: 620px) {
  #vote .overlay-card { width: calc(100vw - 20px); max-width: none; margin: 0 10px 10px; }
}

/* ---------------- 快捷喊话 ---------------- */
.shout { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 0 2px 8px; }
.shout button {
  padding: 4px 9px;
  font-size: 0.71rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.14s, border-color 0.14s, background 0.14s;
}
.shout button:hover:not(:disabled) { color: var(--text); border-color: rgba(255, 255, 255, 0.26); background: rgba(255, 255, 255, 0.1); }
.shout button:disabled { opacity: 0.32; cursor: default; }
.shout button.emo { font-size: 0.92rem; padding: 2px 8px; line-height: 1.5; }
.shout button.used { opacity: 0.32; }

/* 喊话飘字（浮在棋盘右下，2 秒淡出） */
.shout-fly {
  position: fixed;
  right: 22px;
  bottom: 118px;
  z-index: 58;
  max-width: min(46vw, 340px);
  padding: 8px 13px;
  border-radius: 14px 14px 4px 14px;
  background: linear-gradient(160deg, rgba(42, 57, 90, 0.97), rgba(20, 28, 46, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-3);
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.45;
  animation: shoutIn 0.2s var(--ease);
  pointer-events: none;
}
.shout-fly b { color: #ffd774; margin-right: 3px; }
.shout-fly.out { animation: shoutOut 0.3s var(--ease) forwards; }
@keyframes shoutIn { from { opacity: 0; transform: translateY(8px) scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes shoutOut { to { opacity: 0; transform: translateY(-10px) scale(0.96); } }

/* ---------------- 日志：外框 + 只看我 ---------------- */
.log-wrap { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; }
.log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px 5px;
  font-size: 0.7rem;
  color: var(--dim);
  letter-spacing: 0.05em;
}
.log-filter { padding: 2px 9px; font-size: 0.68rem; border-radius: 999px; letter-spacing: 0.02em; }
.log-filter[aria-pressed="true"] {
  color: #ffd774;
  border-color: rgba(255, 200, 100, 0.45);
  background: rgba(255, 200, 100, 0.12);
}
.log .l.mine { background: rgba(255, 210, 120, 0.07); border-left-color: rgba(255, 210, 120, 0.5); }
.log .l.shout { color: #cfe4ff; border-left-color: rgba(140, 190, 255, 0.45); }
.log-empty { color: var(--dim); font-size: 0.75rem; padding: 6px 2px; }

/* 动工按钮：绿色，和「结束回合」区分开 */
.actions button.build-btn {
  background: linear-gradient(180deg, #7ee0aa, #45b57f);
  border-color: rgba(180, 255, 214, 0.8);
  color: #052318;
  font-weight: 800;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 8px 20px rgba(69, 181, 127, 0.28);
}
.actions button.build-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #93eab9, #4ec48a);
}
.actions button.build-btn.done,
.actions button.build-btn.done:disabled {
  opacity: 1;
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
  color: var(--muted);
  box-shadow: none;
  font-weight: 600;
}

/* 日志 */
.log {
  flex: 1 1 0;
  min-height: 96px;
  overflow-y: auto;
  font-size: 0.75rem;
  line-height: 1.62;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: rgba(0, 0, 0, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--muted);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}
.log .l { margin-bottom: 2px; padding-left: 7px; border-left: 2px solid transparent; }
.log .l.good { color: #8fe8b6; border-left-color: rgba(95, 211, 155, 0.5); }
.log .l.bad { color: #ffa3a6; border-left-color: rgba(244, 120, 124, 0.5); }
.log .l.warn { color: #f6d18a; border-left-color: rgba(243, 201, 107, 0.45); }
.log .l.rent { color: #ffb9b0; border-left-color: rgba(244, 140, 130, 0.4); }
.log .l.buy { color: #a8d6ff; border-left-color: rgba(92, 201, 234, 0.4); }
.log .l.build { color: #dfc0ff; border-left-color: rgba(189, 147, 245, 0.4); }
.log .l.roll { color: #d3e2ff; }
.log .l.card { color: #ffdb92; font-style: italic; }
.log .l.win { color: var(--accent); font-weight: 800; }
.log .l.turn { color: #8fb4ec; border-left-color: rgba(143, 180, 236, 0.35); }
.log .l.system { color: var(--accent); font-weight: 700; }
.log .l.sell { color: #ffd2a0; border-left-color: rgba(243, 180, 107, 0.45); }
.log .l.auction { color: #ffcf6b; border-left-color: rgba(255, 196, 86, 0.5); }
.log .l.join { color: #9fd8c4; }
.log .l.leave { color: var(--dim); }

/* ---------------- 事件卡弹出 ---------------- */
.card-pop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: 20px;
}
.card-pop-inner {
  position: relative;
  width: min(400px, 88vw);
  background:
    radial-gradient(120% 80% at 50% 0%, #fffdf4, #f3e6c8 65%, #e8d6ac 100%);
  color: #33291a;
  border-radius: var(--r-lg);
  padding: 26px 26px 24px;
  text-align: center;
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.7),
    0 0 0 2px rgba(255, 255, 255, 0.55) inset,
    0 0 0 3px rgba(243, 183, 63, 0.55);
  animation: pop 0.34s var(--ease);
  overflow: hidden;
}
.card-pop-inner::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, transparent, var(--tone, var(--accent)), transparent);
}
@keyframes pop {
  from { transform: scale(0.84) translateY(16px) rotate(-1deg); opacity: 0; }
  to { transform: scale(1) translateY(0) rotate(0); opacity: 1; }
}
.card-pop-inner.tone-good { --tone: #3fae74; }
.card-pop-inner.tone-bad { --tone: #cf5a5e; }
.card-pop-inner.tone-weird { --tone: #8d63d6; }
.card-pop-icon { font-size: 2.5rem; line-height: 1; margin-bottom: 6px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.18)); }
.card-pop-head {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  font-weight: 800;
  color: #fff;
  background: var(--tone, #9b7b3b);
  padding: 3px 12px 3px 14px;
  border-radius: 99px;
  margin-bottom: 10px;
}
.card-pop-who { font-size: 0.92rem; font-weight: 800; margin-bottom: 9px; }
.card-pop-text { font-size: 1.02rem; line-height: 1.65; font-weight: 500; }

/* ---------------- 弹窗 ---------------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 14, 0.74);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 20px;
  animation: fade 0.18s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  width: min(430px, 100%);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 40%),
    linear-gradient(180deg, #1c2a4a, #101a2e);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  padding: 28px 26px 24px;
  text-align: center;
  box-shadow: var(--shadow-3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: pop 0.3s var(--ease);
}
.modal-card h2 { margin: 0 0 14px; font-size: 1.3rem; letter-spacing: 0.02em; }
.modal-actions { display: flex; gap: 9px; margin-top: 18px; }
.modal-actions > button { flex: 1; }
.modal-body { color: var(--muted); font-size: 0.9rem; line-height: 1.7; }
.modal-body b { color: var(--accent); }
.modal-body .end-why { font-size: 0.78rem; margin-bottom: 14px; }
.modal-body .muted { opacity: 0.6; }

.final-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.final-table th {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--dim);
  padding: 0 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.final-table td { padding: 9px 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); color: var(--text); }
.final-table tr:last-child td { border-bottom: none; }
.final-table tr.win td { background: rgba(243, 183, 63, 0.08); }
.final-table tr.win td:first-child { border-radius: 8px 0 0 8px; }
.final-table tr.win td:last-child { border-radius: 0 8px 8px 0; }
.final-table .rank { color: var(--dim); width: 1.8em; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.final-table .rank.m1 { color: #ffd774; }
.final-table .rank.m2 { color: #d6e0f0; }
.final-table .rank.m3 { color: #e0a878; }
.final-table .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.final-table .who { display: flex; align-items: center; gap: 7px; }
.final-table .av {
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.62rem; font-weight: 900; color: #0b0e15;
}

/* 结算页的四张「奖状」*/
.awards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.award {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    'ico lab'
    'ico who'
    'ico val';
  align-items: center;
  column-gap: 8px;
  padding: 8px 10px;
  border-radius: 11px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.07);
  animation: awardIn 0.4s var(--ease) both;
}
.award .a-ico { grid-area: ico; font-size: 1.25rem; line-height: 1; }
.award .a-lab { grid-area: lab; font-size: 0.68rem; color: var(--muted); letter-spacing: 0.02em; }
.award .a-who { grid-area: who; font-size: 0.84rem; font-weight: 800; }
.award .a-val { grid-area: val; font-size: 0.7rem; color: var(--dim); }
@keyframes awardIn {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 620px) {
  .awards { grid-template-columns: 1fr; }
}

/* 动作区里的挂机倒计时*/
.hint.idle-note {
  margin-top: 2px;
  font-size: 0.74rem;
  color: #ffd774;
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}

/* ---------------- 提示条 ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  background: rgba(30, 40, 62, 0.96);
  border: 1px solid var(--line-2);
  color: var(--text);
  padding: 11px 20px;
  border-radius: 99px;
  font-size: 0.84rem;
  box-shadow: var(--shadow-2);
  z-index: 80;
  animation: pop 0.24s var(--ease);
  max-width: 86vw;
  text-align: center;
}
.toast.err { background: rgba(244, 120, 124, 0.95); border-color: rgba(255, 180, 180, 0.6); color: #2a0b0c; font-weight: 700; }
.toast.ok { background: rgba(243, 183, 63, 0.95); border-color: rgba(255, 226, 150, 0.7); color: #2b2003; font-weight: 700; }

/* ---------------- 动效 ---------------- */
.head-actions { display: flex; gap: 6px; }
#soundBtn { padding: 5px 10px; font-size: 0.95rem; line-height: 1; min-width: 34px; }
#soundBtn.off { color: var(--dim); border-color: rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.02); }

/* 金钱浮动 */
.players { position: relative; }
.fx-float {
  position: absolute;
  right: 12px;
  transform: translateY(-50%);
  font-size: 0.82rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  z-index: 8;
  animation: floatUp 1.45s var(--ease) both;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}
.fx-float.up { color: #6fe3a8; }
.fx-float.down { color: #ff9a9d; }
@keyframes floatUp {
  0% { opacity: 0; transform: translateY(10%) scale(0.92); }
  16% { opacity: 1; transform: translateY(-18%) scale(1); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-118%) scale(1); }
}

/* 买地：盖章 + 光圈 */
.tile.bought { animation: stampIn 0.5s var(--ease); }
@keyframes stampIn {
  0% { transform: scale(1); }
  35% { transform: scale(1.14); }
  62% { transform: scale(0.97); }
  100% { transform: scale(1); }
}
.stamp-ring {
  position: absolute;
  inset: -1px;
  border: 2px solid var(--accent);
  border-radius: inherit;
  pointer-events: none;
  animation: ringOut 0.85s ease-out forwards;
}
@keyframes ringOut {
  0% { opacity: 0.95; transform: scale(0.92); }
  100% { opacity: 0; transform: scale(1.6); }
}

/* 升级：小房子蹦出来*/
.tile.built .pips i { animation: pipPop 0.42s var(--ease) both; animation-delay: calc(var(--j, 0) * 55ms); }
@keyframes pipPop {
  0% { transform: translateY(-8px) scale(0.4); opacity: 0; }
  60% { transform: translateY(1px) scale(1.12); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* 棋子落地的小跳*/
.tile.hop .tokens { animation: hop 0.26s var(--ease); }
@keyframes hop {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-7px) scale(1.08); }
  70% { transform: translateY(1px) scale(0.96); }
  100% { transform: translateY(0) scale(1); }
}

/* 骰子落定 */
.dice-row.settle .die { animation: diceSettle 0.34s var(--ease); }
@keyframes diceSettle {
  0% { transform: translateY(-10px) scale(1.06); }
  55% { transform: translateY(2px) scale(0.97); }
  80% { transform: translateY(-1px) scale(1.01); }
  100% { transform: translateY(0) scale(1); }
}

/* 日志新行滑入 */
.log .l.new { animation: logIn 0.3s var(--ease) both; }
@keyframes logIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: none; }
}

/* 事件卡翻面*/
.card-pop-inner.reveal { animation: cardFlip 0.46s var(--ease); }
@keyframes cardFlip {
  from { opacity: 0; transform: perspective(900px) rotateY(-16deg) scale(0.88) translateY(14px); }
  to { opacity: 1; transform: perspective(900px) rotateY(0) scale(1) translateY(0); }
}

/* 结算：名次依次落位 + 赢家呼吸 + 彩纸 */
.final-table tbody tr { animation: rowIn 0.34s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes rowIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.final-table tr.win { animation: rowIn 0.34s var(--ease) both, winGlow 1.8s ease-in-out 0.5s infinite; }
@keyframes winGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(243, 183, 63, 0); }
  50% { box-shadow: 0 0 18px rgba(243, 183, 63, 0.28); }
}

.modal-card { position: relative; overflow: hidden; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i {
  position: absolute;
  top: -14px;
  left: var(--x);
  width: 7px;
  height: 11px;
  border-radius: 2px;
  opacity: 0.92;
  transform: rotate(var(--r, 0deg)) scale(var(--s, 1));
  animation: fall 2.6s linear var(--d, 0s) forwards;
}
@keyframes fall {
  0% { transform: translateY(-10px) rotate(var(--r, 0deg)) scale(var(--s, 1)); opacity: 1; }
  100% { transform: translateY(380px) rotate(calc(var(--r, 0deg) + 220deg)) scale(var(--s, 1)); opacity: 0; }
}

/* ================================================================ 技能卡 */
/* ---------------- 手牌 ---------------- */
.hand {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 0 0 auto;
  /* 手牌永远钉在操作条最下面：手机上条内要滚动时，牌也滑不出去*/
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding-bottom: 2px;
  background: linear-gradient(180deg, rgba(5, 8, 15, 0) 0, #05080f 40%);
}
.hand:empty { display: none; }
.hand-title {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--dim);
  padding: 3px 4px 1px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.hand-title b { color: var(--muted); font-weight: 700; }
.hand-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 3px 2px 7px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}
.hcard {
  position: relative;
  flex: 0 0 auto;
  width: 79px;
  border-radius: 9px;
  overflow: hidden;
  border: 2px solid transparent;
  background: #0b1220;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  transition: transform 0.16s var(--ease), box-shadow 0.16s, border-color 0.16s, opacity 0.16s;
}
.hcard img { display: block; width: 100%; height: auto; pointer-events: none; }
/* 卡名常驻：触屏没有 hover，不能只把名字放在 title 里 */
.hcard::after, .ccard::after {
  content: attr(data-name);
  display: block;
  padding: 3px 5px 4px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  color: #ffe9a8;
  background: rgba(5, 8, 15, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hcard:hover:not(.off) { transform: translateY(-5px); box-shadow: 0 12px 22px rgba(0, 0, 0, 0.45); }
.hcard.sel {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(243, 183, 63, 0.3), 0 10px 22px rgba(0, 0, 0, 0.5);
  transform: translateY(-5px);
}
.hcard.off { opacity: 0.4; cursor: not-allowed; filter: grayscale(0.55); }
.hcard.tip { font-size: 0.62rem; color: var(--dim); padding: 2px 4px 0; }
.hand-empty { font-size: 0.78rem; color: var(--dim); padding: 2px 4px 4px; line-height: 1.6; }

/* ---------------- 弹层（商店 / 响应） ---------------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(4, 8, 18, 0.74);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.18s var(--ease);
}
.overlay[hidden] { display: none; }
.overlay-card {
  width: min(760px, 100%);
  max-height: 92dvh;
  overflow-y: auto;
  border-radius: var(--r-lg);
  padding: 20px 20px 16px;
  background: linear-gradient(170deg, #1d2742, #101726 72%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: popIn 0.22s var(--ease);
}
.overlay-card h2 { margin: 0 0 7px; font-size: 1.16rem; letter-spacing: 0.02em; }
.ov-sub { margin: 0 0 13px; font-size: 0.85rem; color: var(--muted); line-height: 1.65; }
.ov-sub b { color: var(--text); }
.overlay-actions { display: flex; gap: 9px; margin-top: 6px; }
.overlay-actions > button { flex: 1; padding: 13px; font-size: 0.95rem; }
.overlay .msg { min-height: 1.1em; font-size: 0.8rem; color: #ffb0b0; margin: 6px 0 8px; }

.card-row { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.ccard {
  flex: 0 0 auto;
  width: 134px;
  border-radius: 11px;
  overflow: hidden;
  border: 2px solid transparent;
  background: #0b1220;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.16s var(--ease), border-color 0.16s, box-shadow 0.16s, opacity 0.16s;
}
.ccard img { display: block; width: 100%; height: auto; pointer-events: none; }
.ccard:hover:not(.off) { transform: translateY(-5px) scale(1.02); }
.ccard.sel {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(243, 183, 63, 0.35), 0 14px 28px rgba(0, 0, 0, 0.5);
  transform: translateY(-5px);
}
.ccard.off { opacity: 0.38; cursor: not-allowed; }
.ccard .chead {
  padding: 5px 7px 6px;
  line-height: 1.4;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}
.ccard .chead .cprice {
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  color: #ffe9a8;
  font-variant-numeric: tabular-nums;
}
.ccard .chead .cdesc {
  display: block;
  margin-top: 2px;
  font-size: 0.64rem;
  line-height: 1.35;
  color: var(--muted);
  max-height: 3.1em;
  overflow: hidden;
}

.target-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.target-row[hidden] { display: none; }
.target-row button { padding: 9px 14px; font-size: 0.86rem; border-radius: var(--r-md); }
.target-row .hint { width: 100%; }

.timer {
  position: relative;
  height: 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 0 24px;
}
.timer span {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #ffd774, #e0a52a);
  transition: width 0.22s linear, background 0.3s;
}
.timer span.hot { background: linear-gradient(90deg, #ff9a8b, #e0565d); }
.timer b {
  position: absolute;
  right: 0;
  top: 11px;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ---------------- 技能卡施放动画 ---------------- */
.skill-fx {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
}
.skill-fx[hidden] { display: none; }
.skill-fx img {
  width: min(232px, 46vw);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(255, 255, 255, 0.12);
  animation: skillCast 1.2s var(--ease) forwards;
}
.skill-fx .label {
  font-size: 0.98rem;
  font-weight: 800;
  color: #ffe6a8;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
  animation: skillLabel 1.2s var(--ease) forwards;
}
@keyframes skillCast {
  0% { opacity: 0; transform: translateY(70px) scale(0.6) rotate(-9deg); }
  22% { opacity: 1; transform: translateY(0) scale(1.07) rotate(0deg); }
  70% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translateY(-46px) scale(0.94) rotate(0deg); }
}
@keyframes skillLabel {
  0%, 18% { opacity: 0; transform: translateY(12px); }
  36%, 78% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-8px); }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------------- 技能卡全屏演出 ---------------- */
.skill-cine {
  position: fixed;
  inset: 0;
  z-index: 90; /* 盖过响应窗和 toast，点击可跳过 */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  --sc: #f3b73f;
  --sc2: #f3b73f;
}
.skill-cine[hidden] { display: none; }
.skill-cine.out { animation: scOut 0.18s ease-out both; }
@keyframes scOut { from { opacity: 1; } to { opacity: 0; } }

.sc-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 46%, rgba(0, 0, 0, 0) 16%, rgba(3, 7, 18, 0.62) 62%, rgba(3, 7, 18, 0.93) 100%),
    radial-gradient(ellipse at 50% 46%, rgba(255, 255, 255, 0.07) 0%, transparent 60%);
  animation: fadeIn 0.3s ease-out both;
}
.cine-rage .sc-vignette {
  background: radial-gradient(ellipse at 50% 46%, rgba(64, 10, 8, 0.2) 12%, rgba(30, 4, 4, 0.74) 60%, rgba(12, 2, 2, 0.96) 100%);
}
.cine-sneak .sc-vignette {
  background: radial-gradient(ellipse at 50% 46%, rgba(0, 0, 0, 0.1) 20%, rgba(2, 4, 10, 0.82) 58%, rgba(1, 2, 6, 0.97) 100%);
}
.cine-night .sc-vignette {
  background: radial-gradient(ellipse at 50% 40%, rgba(12, 16, 44, 0.22) 16%, rgba(4, 6, 24, 0.8) 58%, rgba(1, 2, 10, 0.97) 100%);
}

.sc-rays {
  position: absolute;
  inset: -42%;
  background: repeating-conic-gradient(from 0deg, transparent 0deg 20deg, rgba(255, 255, 255, 0.05) 20deg 24deg);
  -webkit-mask: radial-gradient(circle, transparent 32%, #000 48%, transparent 74%);
  mask: radial-gradient(circle, transparent 32%, #000 48%, transparent 74%);
  opacity: 0;
  animation: scRays var(--sc-dur, 2.6s) ease-out both;
}
@keyframes scRays {
  0% { opacity: 0; transform: rotate(0deg) scale(0.72); }
  12% { opacity: 0.9; }
  80% { opacity: 0.35; }
  100% { opacity: 0; transform: rotate(26deg) scale(1.16); }
}

.sc-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.18) 34%, transparent 62%);
  mix-blend-mode: screen;
  opacity: 0;
  animation: scFlash 0.55s 0.22s ease-out both;
}
@keyframes scFlash { 0% { opacity: 0; } 18% { opacity: 0.95; } 100% { opacity: 0; } }

.sc-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: scStage var(--sc-dur, 2.6s) var(--ease) both;
}
@keyframes scStage {
  0% { opacity: 0; transform: translateY(26px) scale(0.94); }
  10% { opacity: 1; transform: none; }
  84% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-18px) scale(0.98); }
}
.cine-rage .sc-stage { animation: scStage var(--sc-dur, 2.6s) var(--ease) both, scShake 0.6s 0.28s ease-out; }
@keyframes scShake {
  0%, 100% { translate: 0 0; }
  10% { translate: -10px 4px; }
  25% { translate: 9px -5px; }
  40% { translate: -7px -3px; }
  55% { translate: 5px 3px; }
  70% { translate: -3px 1px; }
  85% { translate: 2px -1px; }
}

.sc-who {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85);
  animation: scUp 0.5s 0.12s var(--ease) both;
}
.sc-who .dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 12px rgba(255, 255, 255, 0.4); }

.sc-card-wrap { perspective: 900px; }
.sc-card-wrap img {
  display: block;
  width: min(300px, 62vw, 46dvh);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 0 90px color-mix(in srgb, var(--sc) 60%, transparent);
  animation: scCard var(--sc-dur, 2.6s) var(--ease) both;
}
@keyframes scCard {
  0% { opacity: 0; transform: translateY(90px) scale(1.9) rotateX(24deg) rotate(7deg); filter: blur(8px) brightness(2); }
  13% { opacity: 1; transform: translateY(0) scale(1) rotateX(0deg) rotate(0deg); filter: blur(0) brightness(1); }
  19% { transform: scale(1.045); }
  24% { transform: scale(1); }
  82% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: translateY(-34px) scale(0.93) rotate(-2deg); }
}

.sc-name {
  font-size: clamp(1.5rem, 4.6vw, 2.3rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0 0 26px color-mix(in srgb, var(--sc) 85%, transparent), 0 3px 16px rgba(0, 0, 0, 0.85);
  animation: scName 0.55s 0.2s var(--ease) both;
}
@keyframes scName {
  0% { opacity: 0; transform: scale(1.35); filter: blur(4px); }
  60% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: scale(1); }
}

.sc-sub {
  max-width: min(430px, 82vw);
  text-align: center;
  font-size: 0.92rem;
  color: #cdd6ea;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  animation: scUp 0.5s 0.3s var(--ease) both;
}
@keyframes scUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.sc-skip {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(10, 16, 32, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.16);
  animation: scUp 0.4s 0.5s ease-out both;
}

/* 粒子：默认从卡面附近向上飘*/
.sc-parts { position: absolute; inset: 0; overflow: hidden; }
.sc-parts span {
  position: absolute;
  top: 58%;
  left: var(--x, 50%);
  font-size: calc(15px * var(--s, 1));
  color: #fff;
  opacity: 0;
  animation: scPart 1.9s var(--d, 0s) ease-out both;
}
@keyframes scPart {
  0% { opacity: 0; transform: translate(-50%, 0) rotate(0deg) scale(0.6); }
  12% { opacity: 0.95; }
  100% { opacity: 0; transform: translate(-50%, -46vh) rotate(var(--r, 180deg)) scale(1.15); }
}
.cine-slow .sc-parts span { animation-duration: 3.4s; }
.cine-rage .sc-parts span, .cine-gold .sc-parts span {
  top: -6%;
  animation-name: scPartFall;
  animation-duration: 1.5s;
}
@keyframes scPartFall {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.8); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 88vh) rotate(var(--r, 200deg)) scale(1.1); }
}

/* —— 怪兽卡：红眼 + 裂缝 ——*/
.sc-eye {
  position: absolute;
  top: 15%;
  width: 76px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%, #ffd9d0 0 16%, #ff5540 30%, rgba(226, 112, 92, 0) 72%);
  filter: blur(1px);
  animation: scEye 2.6s ease-out both;
}
@keyframes scEye {
  0% { opacity: 0; transform: scaleY(0.2); }
  16% { opacity: 1; transform: scaleY(1); }
  30% { transform: scaleY(0.86); }
  44% { transform: scaleY(1); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}
.sc-crack {
  position: absolute;
  width: 2px;
  height: 92px;
  background: linear-gradient(rgba(255, 120, 100, 0), #ff8873, rgba(255, 120, 100, 0));
  transform: rotate(var(--a, 0deg));
  opacity: 0;
  animation: scCrack 2.4s 0.35s ease-out both;
}
@keyframes scCrack {
  0% { opacity: 0; transform: rotate(var(--a, 0deg)) scaleY(0.2); }
  12% { opacity: 0.9; transform: rotate(var(--a, 0deg)) scaleY(1); }
  80% { opacity: 0.5; }
  100% { opacity: 0; }
}

/* —— 冬眠卡：月亮 + 星星 + Zzz ——*/
.sc-moon {
  position: absolute;
  top: 9%;
  right: 11%;
  font-size: 84px;
  filter: drop-shadow(0 0 30px rgba(142, 166, 255, 0.8));
  animation: scMoon 2.6s ease-out both;
}
@keyframes scMoon {
  0% { opacity: 0; transform: translateX(40px) scale(0.7) rotate(18deg); }
  18% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-20px); }
}
.sc-star {
  position: absolute;
  color: #dfe6ff;
  opacity: 0;
  text-shadow: 0 0 10px rgba(190, 205, 255, 0.9);
  animation: scTwinkle 1.8s var(--d, 0s) ease-in-out infinite;
}
@keyframes scTwinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.15); }
}
.sc-zzz {
  position: absolute;
  bottom: 17%;
  left: 15%;
  font-size: 30px;
  font-weight: 900;
  color: #aebaff;
  text-shadow: 0 0 16px rgba(142, 166, 255, 0.8);
  opacity: 0;
  animation: scZzz 2.4s 0.5s ease-out both;
}
@keyframes scZzz {
  0% { opacity: 0; transform: translate(0, 0) scale(0.8); }
  20% { opacity: 0.9; }
  100% { opacity: 0; transform: translate(60px, -70px) scale(1.25) rotate(8deg); }
}

/* —— 乌龟卡：大乌龟慢慢爬过屏幕下方 ——*/
.sc-turtle {
  position: absolute;
  bottom: 6%;
  left: -140px;
  font-size: 74px;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.5));
  animation: scCrawl 2.9s linear both;
}
@keyframes scCrawl {
  from { transform: translateX(0) rotate(-4deg); }
  30% { transform: translateX(38vw) rotate(3deg); }
  60% { transform: translateX(72vw) rotate(-3deg); }
  to { transform: translateX(112vw) rotate(2deg); }
}

/* —— 保护罩：三层护罩扩散 ——*/
.sc-ring {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 240px;
  height: 240px;
  margin: -120px 0 0 -120px;
  border: 2px solid rgba(154, 212, 255, 0.75);
  border-radius: 38%;
  box-shadow: 0 0 40px rgba(154, 212, 255, 0.35), inset 0 0 40px rgba(154, 212, 255, 0.25);
  opacity: 0;
  animation: scRing 2.6s calc(var(--i, 0) * 0.28s) ease-out both;
}
@keyframes scRing {
  0% { opacity: 0; transform: rotate(30deg) scale(0.3); }
  25% { opacity: 0.9; }
  100% { opacity: 0; transform: rotate(150deg) scale(2.4); }
}

/* —— 遥控骰子：两颗骰子翻滚坠落 ——*/
.sc-die {
  position: absolute;
  left: 50%;
  top: 44%;
  font-size: 64px;
  color: #eaf6ff;
  text-shadow: 0 0 24px rgba(92, 201, 234, 0.9);
  animation: scDie 1.6s 0.15s ease-out both;
}
@keyframes scDie {
  0% { opacity: 0; transform: translate(0, 0) scale(1.6) rotate(0deg); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 0), 160px) scale(0.7) rotate(var(--rt, 360deg)); }
}

/* —— 嫁祸卡：分叉箭头 + 晃动的账单 ——*/
.sc-arrow {
  position: absolute;
  left: 50%;
  top: 46%;
  font-size: 54px;
  color: #ffd9a0;
  text-shadow: 0 0 20px rgba(201, 138, 60, 0.9);
  animation: scArrow 1.8s 0.2s ease-out both;
}
@keyframes scArrow {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px))) scale(1.3); }
}
.sc-bill {
  position: absolute;
  left: 50%;
  top: 28%;
  font-size: 44px;
  font-weight: 900;
  color: #ffe6b0;
  text-shadow: 0 0 18px rgba(201, 138, 60, 0.8);
  animation: scBill 2.2s 0.35s ease-in-out both;
}
@keyframes scBill {
  0%, 100% { opacity: 0; }
  20%, 70% { opacity: 1; }
  25% { transform: translate(-50%, 0) rotate(-8deg); }
  45% { transform: translate(-70%, 26px) rotate(6deg); }
  65% { transform: translate(-30%, -12px) rotate(-4deg); }
}

/* —— 谈判专家：金币雨 ——*/
.sc-coin {
  position: absolute;
  top: -60px;
  font-size: 30px;
  animation: scCoin 2.2s var(--d, 0s) linear both;
}
@keyframes scCoin {
  0% { opacity: 0; transform: translateY(0) rotate(0deg); }
  10% { opacity: 1; }
  100% { opacity: 0; transform: translateY(86vh) rotate(540deg); }
}

/* —— 顺手牵羊：一张卡贴着屏幕斜滑过 ——*/
.sc-swipe {
  position: absolute;
  left: -120px;
  top: 40%;
  font-size: 66px;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.6));
  animation: scSwipe 1.5s 0.25s ease-in-out both;
}
@keyframes scSwipe {
  0% { opacity: 0; transform: translate(0, 30vh) rotate(38deg) scale(0.8); }
  18% { opacity: 1; }
  82% { opacity: 1; }
  100% { opacity: 0; transform: translate(105vw, -26vh) rotate(-14deg) scale(1.05); }
}

/* —— 免罪卡：铁窗 + 一道白光劈下 ——*/
.sc-bar {
  position: absolute;
  top: 24%;
  width: 10px;
  height: 0;
  border-radius: 4px;
  background: linear-gradient(rgba(188, 212, 255, 0), rgba(188, 212, 255, 0.85), rgba(188, 212, 255, 0));
  animation: scBar 2.4s 0.2s ease-out both;
}
@keyframes scBar {
  0% { height: 0; opacity: 0; }
  25% { height: 200px; opacity: 0.9; }
  80% { opacity: 0.6; height: 200px; }
  100% { opacity: 0; height: 200px; }
}
.sc-slash {
  position: absolute;
  left: 32%;
  top: 19%;
  width: 6px;
  height: 260px;
  border-radius: 4px;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff 30%, #ffd9d9 70%, rgba(255, 255, 255, 0));
  transform-origin: top center;
  animation: scSlash 0.5s 0.55s cubic-bezier(0.2, 0.9, 0.3, 1) both, scFade2 2.6s 0.6s ease-out both;
}
@keyframes scSlash { from { transform: rotate(24deg) scaleY(0); } to { transform: rotate(24deg) scaleY(1); } }
@keyframes scFade2 { 0% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }

/* —— 免费卡：一个盖章式的 ¥0 ——*/
.sc-billzero {
  position: absolute;
  left: 50%;
  top: 22%;
  font-size: 60px;
  font-weight: 900;
  color: #b7f4d4;
  text-shadow: 0 0 26px rgba(95, 211, 155, 0.9);
  animation: scZero 2.2s 0.3s ease-out both;
}
@keyframes scZero {
  0% { opacity: 0; transform: translateX(-50%) scale(2.4); }
  25% { opacity: 1; transform: translateX(-50%) scale(1); }
  80% { opacity: 0.9; }
  100% { opacity: 0; transform: translateX(-50%) scale(0.9); }
}

/* —— 远程动工：透视图纸 + 三角尺 ——*/
.sc-plan {
  position: absolute; inset: 8% 6%; opacity: 0;
  background-image: linear-gradient(rgba(92,201,234,.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92,201,234,.25) 1px, transparent 1px);
  background-size: 46px 46px;
  transform: perspective(600px) rotateX(58deg) scale(1.4);
  transform-origin: 50% 70%;
  animation: scPlan 2.4s .1s ease-out both;
}
@keyframes scPlan {
  0% { opacity: 0; transform: perspective(600px) rotateX(58deg) scale(1.6) translateY(40px); }
  20%, 78% { opacity: .9; transform: perspective(600px) rotateX(58deg) scale(1); }
  100% { opacity: 0; transform: perspective(600px) rotateX(58deg) scale(1.04); }
}
.sc-compass {
  position: absolute; left: 50%; top: 30%; font-size: 86px;
  filter: drop-shadow(0 0 26px rgba(92,201,234,.8));
  animation: scCompass 2.2s .25s cubic-bezier(.2,.9,.3,1) both;
}
@keyframes scCompass {
  0% { opacity: 0; transform: translate(-50%,-40px) rotate(-30deg) scale(.5); }
  25% { opacity: 1; transform: translate(-50%,0) rotate(0) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%,18px) rotate(18deg) scale(1.1); }
}

/* —— 加急令：转动的钟 + 速度线 ——*/
.sc-clock {
  position: absolute; left: 50%; top: 28%; font-size: 92px;
  filter: drop-shadow(0 0 28px rgba(226,112,92,.85));
  animation: scClock 2.2s .15s ease-out both;
}
@keyframes scClock {
  0% { opacity: 0; transform: translate(-50%,-20px) rotate(-90deg) scale(.6); }
  30% { opacity: 1; transform: translate(-50%,0) rotate(0) scale(1); }
  100% { opacity: 0; transform: translate(-50%,0) rotate(220deg) scale(1.08); }
}
.sc-speed {
  position: absolute; left: -30%; width: 46%; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, transparent, rgba(255,209,168,.9), transparent);
  animation: scSpeed 1.3s .2s ease-in both;
}
@keyframes scSpeed {
  0% { opacity: 0; transform: translateX(0) scaleX(.4); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateX(230%) scaleX(1.3); }
}

/* —— 征收令：收据 + 红章 ——*/
.sc-receipt {
  position: absolute; left: 50%; top: 22%; width: 150px; height: 180px;
  margin-left: -75px; border-radius: 6px; background: rgba(244,230,198,.92);
  color: #8a5a18; font-size: 40px; text-align: center; line-height: 180px;
  box-shadow: 0 18px 36px rgba(0,0,0,.4);
  animation: scReceipt 2.4s .1s ease-out both;
}
@keyframes scReceipt {
  0% { opacity: 0; transform: translateY(-40px) rotate(-8deg) scale(.8); }
  20% { opacity: 1; transform: none; }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-12px) rotate(3deg); }
}
.sc-stamp {
  position: absolute; left: 50%; top: 40%; width: 78px; height: 78px; margin: -39px 0 0 -39px;
  border: 5px solid rgba(214,64,48,.92); border-radius: 50%;
  color: rgba(214,64,48,.95); font-size: 38px; font-weight: 900; line-height: 68px; text-align: center;
  transform: rotate(-18deg); opacity: 0;
  animation: scStamp .55s .55s cubic-bezier(.2,1.6,.4,1) both, scFade2 2.2s .7s ease-out both;
}
@keyframes scStamp {
  0% { opacity: 0; transform: rotate(-18deg) scale(2.6); }
  70% { opacity: 1; transform: rotate(-18deg) scale(.94); }
  100% { opacity: 1; transform: rotate(-18deg) scale(1); }
}

/* —— 空投：降落伞 + 箱子 ——*/
.sc-chute {
  position: absolute; left: 50%; top: -20%; font-size: 82px;
  filter: drop-shadow(0 0 24px rgba(143,111,214,.8));
  animation: scChute 2.3s .1s cubic-bezier(.3,.9,.4,1) both;
}
@keyframes scChute {
  0% { opacity: 0; transform: translate(-50%,-20vh) rotate(-8deg); }
  25% { opacity: 1; }
  70% { opacity: 1; transform: translate(-50%,48vh) rotate(2deg); }
  100% { opacity: 0; transform: translate(-50%,54vh) rotate(0); }
}
.sc-crate {
  position: absolute; left: 50%; bottom: 12%; font-size: 66px;
  opacity: 0; animation: scCrate .5s 1.05s cubic-bezier(.2,1.5,.4,1) both;
}
@keyframes scCrate {
  0% { opacity: 0; transform: translate(-50%,-40px) scale(.7); }
  70% { opacity: 1; transform: translate(-50%,0) scale(1.06); }
  100% { opacity: 1; transform: translate(-50%,0) scale(1); }
}

/* —— 分红：账本 + 金币上升 ——*/
.sc-ledger {
  position: absolute; left: 50%; top: 25%; width: 140px; height: 150px; margin-left: -70px;
  border-radius: 8px; background: rgba(244,230,198,.94); color: #7a4c10;
  font-size: 46px; font-weight: 700; text-align: center; line-height: 150px;
  box-shadow: 0 18px 40px rgba(0,0,0,.38);
  animation: scLedger 2.3s .1s ease-out both;
}
@keyframes scLedger {
  0% { opacity: 0; transform: translateY(30px) rotate(6deg) scale(.85); }
  20%, 80% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-16px) rotate(-2deg); }
}
.sc-gold {
  position: absolute; bottom: -40px; font-size: 30px;
  animation: scGold 2.1s var(--d,0s) ease-out both;
}
@keyframes scGold {
  0% { opacity: 0; transform: translateY(0) rotate(0); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-88vh) rotate(300deg); }
}

/* —— 雾锁：滚动的雾 + 锁 ——*/
.sc-fog {
  position: absolute; left: -20%; width: 140%; height: 120px;
  background: radial-gradient(ellipse at 30% 50%, rgba(214,228,240,.5), transparent 65%),
    radial-gradient(ellipse at 70% 60%, rgba(180,200,216,.42), transparent 62%);
  filter: blur(10px); opacity: 0;
  animation: scFog 2.6s var(--d,0s) ease-in-out both;
}
@keyframes scFog {
  0% { opacity: 0; transform: translateX(-10%) scaleX(.8); }
  20%, 80% { opacity: .9; }
  100% { opacity: 0; transform: translateX(12%) scaleX(1.15); }
}
.sc-lock {
  position: absolute; left: 50%; top: 44%; font-size: 72px;
  filter: drop-shadow(0 0 28px rgba(154,176,200,.9));
  animation: scLock 2.2s .35s cubic-bezier(.2,1.4,.4,1) both;
}
@keyframes scLock {
  0% { opacity: 0; transform: translate(-50%,-30px) scale(1.8); }
  25% { opacity: 1; transform: translate(-50%,0) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%,0) scale(1.05); }
}

/* —— 冰封：冰晶落下 + 大雪花 ——*/
.sc-ice {
  position: absolute; color: #d7f4ff; font-size: 26px; opacity: 0;
  text-shadow: 0 0 16px rgba(142,202,230,.95);
  animation: scIce 2s var(--d,0s) linear both;
}
@keyframes scIce {
  0% { opacity: 0; transform: translateY(-30px) rotate(0); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translateY(64vh) rotate(240deg); }
}
.sc-frozen {
  position: absolute; left: 50%; top: 34%; font-size: 150px; color: rgba(215,244,255,.92);
  text-shadow: 0 0 50px rgba(142,202,230,.9);
  animation: scFrozen 2.3s .15s ease-out both;
}
@keyframes scFrozen {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(2.4) rotate(-40deg); }
  30% { opacity: 1; transform: translate(-50%,-50%) scale(1) rotate(0); }
  80% { opacity: .9; }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.08) rotate(16deg); }
}

/* —— 拆迁令：摆动的铁球 + 尘土 ——*/
.sc-wreck {
  position: absolute; left: 18%; top: 20%; font-size: 90px;
  transform-origin: 80% 0; opacity: 0;
  filter: drop-shadow(0 0 24px rgba(226,112,92,.85));
  animation: scWreck 1.4s .1s cubic-bezier(.4,0,.6,1) both, scFade2 2.3s .8s ease-out both;
}
@keyframes scWreck {
  0% { opacity: 0; transform: rotate(-50deg); }
  20% { opacity: 1; }
  45% { transform: rotate(24deg); }
  70% { transform: rotate(6deg); }
  100% { opacity: 1; transform: rotate(10deg); }
}
.sc-dust {
  position: absolute; bottom: 12%; width: 120px; height: 70px; margin-left: -60px;
  border-radius: 50%; background: radial-gradient(rgba(214,190,170,.55), transparent 68%);
  filter: blur(6px); opacity: 0;
  animation: scDust .9s var(--d,0s) .55s ease-out both;
}
@keyframes scDust {
  0% { opacity: 0; transform: scale(.4) translateY(10px); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.7) translateY(-18px); }
}

@media (max-width: 620px) {
  .sc-card-wrap img { width: min(240px, 58vw, 38dvh); }
  .sc-eye { width: 52px; height: 30px; }
  .sc-moon { font-size: 62px; }
  .sc-turtle { font-size: 54px; }
}

/* ---------------- 地块详情（点格子） ---------------- */

.tile { cursor: pointer; }
.tile:active { transform: scale(0.98); }

.td-hint {
  font-size: 0.68em;
  color: var(--muted);
  opacity: 0.75;
  letter-spacing: 0.3px;
}

.tile-detail {
  position: absolute;
  inset: 14px 14px 14px 4px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 14px 15px 16px;
  border-radius: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  background:
    linear-gradient(180deg, rgba(30, 42, 68, 0.97), rgba(17, 25, 43, 0.99)),
    var(--panel, #16203a);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.55);
  animation: tdIn 0.22s ease-out;
}
.tile-detail[hidden] { display: none; }
@keyframes tdIn {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: none; }
}

.td-head { display: flex; align-items: center; gap: 11px; }
.td-art {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: 12px;
  object-fit: cover;
  object-position: 50% 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.td-title { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.td-title b { font-size: 1.06rem; letter-spacing: 0.3px; }
.td-kind {
  font-size: 0.72rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.td-kind .chip {
  width: 8px; height: 8px; border-radius: 3px;
  background: var(--k, #8a93a6);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.td-close { flex: 0 0 auto; width: 30px; height: 30px; padding: 0; font-size: 0.9rem; }

.td-body { display: flex; flex-direction: column; gap: 11px; font-size: 0.84rem; }

.td-owner {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
}
.td-owner .dot {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  flex: 0 0 auto;
}
.td-owner .who { font-weight: 700; }
.td-owner .lv { color: var(--accent); font-weight: 700; }
.td-owner.none { color: var(--muted); }
.td-owner.sealed {
  color: #cfe0ee;
  border-color: rgba(150, 180, 200, 0.4);
  background: linear-gradient(180deg, rgba(150, 180, 200, 0.16), rgba(120, 150, 180, 0.06));
}
.td-owner.sealed .fog { font-size: 1.05em; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5)); }

.td-sec { display: flex; flex-direction: column; gap: 6px; }
.td-sec h4 {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
}

.td-rows { display: flex; flex-direction: column; gap: 1px; }
.td-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.038);
}
.td-row span { color: var(--muted); }
.td-row b { font-variant-numeric: tabular-nums; }
.td-row.now { background: rgba(243, 183, 63, 0.16); }
.td-row.now b { color: var(--accent); }
.td-row.total { background: rgba(255, 255, 255, 0.09); }
.td-row.total b { color: var(--good, #5fd39b); font-size: 1rem; }

.td-note {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #c8d2e6;
}
.td-note b { color: var(--accent); }
.td-warn {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(244, 120, 124, 0.13);
  border: 1px solid rgba(244, 120, 124, 0.3);
  color: #ffd9da;
  font-size: 0.78rem;
  line-height: 1.55;
}
.td-tokens { display: flex; flex-wrap: wrap; gap: 6px; }
.td-tokens i {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
.td-empty { color: var(--muted); font-size: 0.78rem; }

/* ---------------- 角色系统：选人阶段 ---------------- */
#draft { z-index: 72; }
.draft-card { width: min(900px, 100%); max-height: 94vh; overflow-y: auto; }
.draft-order {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.dorder {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.78rem;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.dorder .idx {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
  font-size: 0.66rem;
  font-variant-numeric: tabular-nums;
}
.dorder .dd { color: var(--accent); font-weight: 800; font-variant-numeric: tabular-nums; }
.dorder .dc { color: var(--muted); }
.dorder.now {
  border-color: rgba(243, 183, 63, 0.65);
  background: rgba(243, 183, 63, 0.13);
  box-shadow: 0 0 0 2px rgba(243, 183, 63, 0.16);
}
.dorder.me .dn { color: var(--accent-2); font-weight: 700; }

.char-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; overflow: visible; padding: 4px 2px 10px; }
.char-card {
  position: relative;
  flex: 0 0 auto;
  width: 150px;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #17203a, #0b1220);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.18s var(--ease), border-color 0.18s, box-shadow 0.18s, opacity 0.18s, filter 0.18s;
}
.char-card img { display: block; width: 100%; height: 192px; object-fit: cover; object-position: top center; pointer-events: none; }
.char-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(6, 10, 22, 0.5) 66%, rgba(6, 10, 22, 0.95) 100%);
  pointer-events: none;
}
.char-card .cc-plate { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 8px 10px 10px; text-align: center; }
.char-card .cc-plate b { display: block; font-size: 0.98rem; color: var(--cc, #fff); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8); }
.char-card .cc-plate span { font-size: 0.68rem; color: var(--muted); }
.char-card:hover:not(.taken) { transform: translateY(-5px); border-color: var(--cc); }
.char-card.sel {
  border-color: var(--cc);
  transform: translateY(-7px) scale(1.02);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2), 0 18px 32px rgba(0, 0, 0, 0.55);
}
.char-card.dim { opacity: 0.62; }
.char-card.taken { filter: grayscale(0.85) brightness(0.55); cursor: not-allowed; }
.char-card .cc-taken {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 0 10px;
  text-align: center;
  font-size: 0.78rem;
  color: #ffd7d7;
  background: rgba(8, 12, 24, 0.5);
}

.char-detail {
  margin: 0 0 12px;
  padding: 12px 15px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}
.cd-tag { margin: 0 0 10px; font-size: 0.78rem; color: var(--muted); line-height: 1.7; }
.cd-skill + .cd-skill { margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(255, 255, 255, 0.11); }
.cd-skill b { font-size: 0.9rem; }
.cd-kind {
  margin-left: 7px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid rgba(243, 183, 63, 0.45);
  font-size: 0.66rem;
  color: var(--accent);
}
.cd-skill p { margin: 6px 0 0; font-size: 0.78rem; color: var(--muted); line-height: 1.7; }

/* ---------------- 角色系统：探路私有卡面 ---------------- */
.peek-card { width: min(440px, 100%); text-align: center; }
.peek-inner { display: grid; place-items: center; margin: 8px 0 16px; }
/* 看雾 / 定骰：里面会有好几个可点的块，排成一行*/
.peek-inner:has(.pickable), .peek-inner:has(.die-face) { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.peek-card-face.pickable { cursor: pointer; transition: transform 0.14s var(--ease), border-color 0.14s; }
.peek-card-face.pickable:hover, .peek-card-face.pickable:focus-visible {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(120, 190, 255, 0.18), 0 20px 34px rgba(0, 0, 0, 0.55);
}
.die-face { min-width: 46px; height: 46px; font-size: 1.1rem; font-weight: 700; }
.peek-card-face {
  width: 216px;
  padding: 22px 16px 20px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(170deg, #1b2540, #0d1424);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: popIn 0.24s var(--ease);
}
.peek-card-face.tone-good { border-color: rgba(95, 211, 155, 0.6); box-shadow: 0 0 0 3px rgba(95, 211, 155, 0.14), 0 16px 32px rgba(0, 0, 0, 0.5); }
.peek-card-face.tone-bad { border-color: rgba(244, 120, 124, 0.6); box-shadow: 0 0 0 3px rgba(244, 120, 124, 0.14), 0 16px 32px rgba(0, 0, 0, 0.5); }
.peek-card-face.tone-weird { border-color: rgba(189, 147, 245, 0.6); box-shadow: 0 0 0 3px rgba(189, 147, 245, 0.14), 0 16px 32px rgba(0, 0, 0, 0.5); }
.pc-icon { font-size: 44px; line-height: 1.1; }
.pc-text { margin-top: 12px; font-size: 0.86rem; line-height: 1.7; }

/* ---------------- 角色系统：二选一 ---------------- */
.choice-row { display: flex; flex-wrap: wrap; gap: 13px; justify-content: center; }
.choice-opt {
  flex: 1 1 240px;
  max-width: 340px;
  cursor: pointer;
  padding: 15px 16px 13px;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
  transition: transform 0.16s var(--ease), border-color 0.16s, box-shadow 0.16s;
}
.choice-opt:hover { transform: translateY(-4px); border-color: rgba(243, 183, 63, 0.7); box-shadow: 0 0 0 3px rgba(243, 183, 63, 0.16), 0 16px 28px rgba(0, 0, 0, 0.5); }
.co-dice { display: flex; justify-content: center; gap: 14px; font-size: 1.3rem; }
.co-sum { margin-top: 12px; text-align: center; font-size: 1.02rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.co-to { margin-top: 5px; text-align: center; font-size: 0.83rem; color: var(--muted); }
.co-to b { color: var(--text); }
.co-tag { margin-top: 9px; text-align: center; font-size: 0.77rem; color: var(--accent); }

/* ---------------- 角色系统：棋盘上的封印与选目标 ---------------- */
.tile.sealed { filter: saturate(0.42) brightness(0.84); }
.tile .seal-fog {
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 32%, rgba(168, 196, 216, 0.5), rgba(104, 130, 162, 0.42) 58%, rgba(62, 84, 116, 0.34)),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.07) 0 5px, transparent 5px 11px);
  backdrop-filter: blur(1.4px);
  animation: sealDrift 6s ease-in-out infinite;
}
@keyframes sealDrift { 0%, 100% { opacity: 0.92; } 50% { opacity: 1; } }
.tile .seal-fog::after {
  content: "🌫";
  position: absolute;
  right: 2px;
  top: 2px;
  font-size: 0.95em;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}
.tile.pick-target {
  cursor: crosshair;
  outline: 2px dashed var(--accent-2);
  outline-offset: -2px;
  animation: pickPulse 1.15s ease-in-out infinite;
}
@keyframes pickPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(92, 201, 234, 0); }
  50% { box-shadow: 0 0 0 5px rgba(92, 201, 234, 0.22); }
}

/* ---------------- 角色系统：动作区的角色技 ---------------- */
.char-bar-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 6px;
  font-size: 0.78rem;
  color: var(--muted);
}
.cb-chip { padding: 2px 9px; border-radius: 999px; border: 1px solid; font-size: 0.76rem; font-weight: 700; }
.cb-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-title .aw { color: var(--accent); }
/* 手机上整块角色技默认收起；桌面保持展开，不影响原有布局 */
.char-bar-body { display: contents; }
.cb-toggle { display: none; }
button.char-btn {
  padding: 10px 13px;
  font-size: 0.86rem;
  color: #dcd1ff;
  border-color: rgba(189, 147, 245, 0.45);
  background: linear-gradient(180deg, rgba(189, 147, 245, 0.19), rgba(189, 147, 245, 0.06));
}
button.char-btn:hover:not(:disabled) {
  color: #efe8ff;
  border-color: rgba(189, 147, 245, 0.72);
  background: linear-gradient(180deg, rgba(189, 147, 245, 0.32), rgba(189, 147, 245, 0.12));
}
button.char-btn.off { opacity: 0.5; }
button.tiny { flex: 0 0 auto; padding: 4px 10px; font-size: 0.74rem; }
/* 等候室里房主把电脑请出去*/
.prow .nm-top .kick {
  margin-left: 6px; padding: 1px 7px; font-size: 0.68rem; line-height: 1.6;
  color: #9aa7c2; border: 1px solid rgba(154, 167, 194, 0.28);
  border-radius: 999px; background: transparent; cursor: pointer;
}
.prow .nm-top .kick:hover { color: #ff9b9b; border-color: rgba(255, 155, 155, 0.5); }
.hint.char-lock, .hint.char-aw { font-size: 0.73rem; line-height: 1.5; }
.hint.char-lock b, .hint.char-aw b { color: #cfc0ff; }
.hint.pick-note { display: flex; align-items: center; gap: 9px; color: var(--accent-2); }

/* ---------------- 角色系统：玩家条头像 ---------------- */
.avatar.char { overflow: hidden; padding: 0; }
.avatar.char img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.avatar.awake { box-shadow: 0 0 0 2px var(--accent), 0 0 13px rgba(243, 183, 63, 0.55); }
.tag.char-tag { border-color: currentColor; }
.tag.aw { color: var(--accent); border-color: rgba(243, 183, 63, 0.5); }
.tag.acted { color: var(--muted); }
.players .prow.pick-me { cursor: pointer; outline: 2px dashed var(--accent-2); outline-offset: -2px; }

/* ---------------- 角色系统：觉醒演出（复用全屏管线） ---------------- */
.sc-stage { z-index: 2; }
.skill-cine.cine-char { --sc: #f3b73f; --sc2: #5cc9ea; }
.char-portrait {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.char-portrait img {
  height: min(76vh, 660px);
  max-width: 94vw;
  object-fit: contain;
  filter: drop-shadow(0 26px 52px rgba(0, 0, 0, 0.65));
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 13%, #000 85%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 13%, #000 85%, transparent 100%);
  animation: scCharIn 0.6s var(--ease) both;
}
@keyframes scCharIn {
  from { opacity: 0; transform: translateY(28px) scale(0.94); }
  to { opacity: 1; transform: none; }
}
.char-glyph {
  position: absolute;
  right: 5%;
  bottom: 7%;
  font-size: 9vmin;
  font-weight: 900;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.13);
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}
.char-tip {
  position: absolute;
  left: 50%;
  bottom: 15%;
  transform: translateX(-50%);
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(8, 12, 24, 0.55);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
}

/* ---------------- 响应弹 ---------------- */
@media (max-width: 980px), (orientation: portrait) {
  #game { flex-direction: column; }
  .board-wrap { flex: 0 0 auto; padding: 10px; }
  #board { width: min(100%, 74dvh); font-size: min(2.05vmin, 13px); padding: 7px; gap: 4px; }
  .side { flex: 1 1 auto; padding: 0 12px 0; overflow-y: auto; gap: 8px; }
  /* 窄屏：操作条最多占 58% 屏高，超出就在条内滚，别把棋盘挤没了 */
  .ops { max-height: 58dvh; overflow-y: auto; overscroll-behavior: contain; }
  .players { max-height: 26dvh; }
  .mylist { flex: 0 0 auto; max-height: none; overflow: visible; }
  .log { flex: 0 0 auto; max-height: 22dvh; }
  .side-head .room b { font-size: 1rem; }
  .actions > button, .actions .row > button { padding: 14px 16px; }
  .players { flex-direction: row; flex-wrap: wrap; }
  .players .prow { flex: 1 1 calc(50% - 4px); min-width: 150px; }
  .hand { flex: 0 0 auto; }
  .overlay-card { padding: 16px 14px 12px; }
  /* 角色系统：窄屏把选人条与角色卡压缩*/
  .draft-order { gap: 6px; }
  .dorder { padding: 4px 9px; font-size: 0.74rem; }
  .char-card { width: 132px; }
  .char-card img { height: 176px; }
  .draft-card .overlay-actions { flex-wrap: wrap; }
  /* 竖屏 / 窄屏时侧栏在棋盘下方，详情卡改成贴底浮层，免得要往下滚才看得到 */
  .tile-detail {
    position: fixed;
    inset: auto 10px 10px 10px;
    max-height: 68dvh;
    border-radius: 16px;
    z-index: 40;
    animation: tdUp 0.22s ease-out;
  }
}

@keyframes tdUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 620px) {
  .players .prow { flex: 1 1 100%; }
  /* 手机上格子太小会看不清字：盘面保底 520px，多出来的部分横向滑 */
  .board-wrap { padding: 8px; overflow-x: auto; justify-content: flex-start; }
  #board { width: max(min(100%, 62dvh), 520px); flex: 0 0 auto; font-size: 11px; }
  /* 手机：操作条改成固定底栏，永远贴在屏幕最下面（侧栏内容从它后面滚过去）*/
  .side { padding-bottom: calc(var(--ops-h, 240px) + 12px); }
  /* 战况抽屉：手机上把玩家条/喊话/日志临时铺满屏幕，操作条仍钉在底部 */
  html.side-open .side {
    position: fixed;
    inset: 0;
    z-index: 26;
    gap: 10px;
    padding: max(10px, env(safe-area-inset-top)) 12px calc(var(--ops-h, 240px) + 14px);
    overflow-y: auto;
    background: linear-gradient(180deg, #08101c 0%, #05080f 100%);
  }
  html.side-open .ops { border-radius: 16px 16px 0 0; }
  .ops {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 62dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, #0b1226 0%, #05080f 100%);
    box-shadow: 0 -12px 34px rgba(0, 0, 0, 0.55);
  }
  .ops.mine { border-top-color: rgba(243, 183, 63, 0.55); }
  .isle-title { font-size: 1.2em; }
  .card-pop-inner { padding: 22px 18px; }
  .card-pop-text { font-size: 0.96rem; }
  .lobby-card { padding: 28px 22px; }
  .lobby-card h1 { font-size: 1.7rem; }
  .tokens { font-size: 0.72em; }
  .tile .owner-badge { font-size: 0.68em; }
  .ccard { width: clamp(92px, 24vw, 106px); }
  .hcard { width: 72px; }
  .char-card { width: 120px; }
  .char-card img { height: 160px; }
  .char-card .cc-plate b { font-size: 0.86rem; }
  .peek-card-face { width: 186px; }
  .choice-opt { flex: 1 1 100%; max-width: none; }
  .char-portrait img { height: min(60vh, 440px); }
  .char-glyph { display: none; }
  .overlay-actions { flex-direction: column; }
}

/* 矮屏（横屏手机）时压缩留白*/
@media (max-height: 520px) {
  .board-wrap { padding: 6px; }
  #board { width: min(100%, calc(100dvh - 12px)); }
  .side { padding: 8px 10px 8px 0; gap: 6px; }
  .log { min-height: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ================================================================
   显示优化（2026-10-22）：折叠 / 轮到你发光 / 字号 / 手机一屏   ================================================================ */

/* ---- 侧栏别再被压扁：整体滚动，而不是把玩家条挤成一条线 ---- */
.side > * { flex-shrink: 0; }
.players .prow { flex: 0 0 auto; }
.log-wrap { flex: 1 1 auto; }

/* ---- 显示设置条 ---- */
.ui-row { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 2px; }
.ui-row[hidden] { display: none; }
.ui-opt { flex: 1 1 auto; padding: 5px 8px; font-size: 0.72rem; border-radius: 9px; white-space: nowrap; }

/* ---- 折叠：日志 / 我的地产 ---- */
.log-tools { display: flex; gap: 6px; align-items: center; }
.log-wrap.collapsed { flex: 0 0 auto; }
.log-wrap.collapsed #log { display: none; }
.log-wrap.collapsed .log-title { opacity: 0.65; }
.mylist.collapsed { max-height: none; overflow: visible; }
.mylist.collapsed > *:not(.list-title) { display: none; }
.list-title { align-items: center; }
.list-title .fold-btn { padding: 1px 9px; font-size: 0.66rem; border-radius: 999px; }

/* ---- 结算投票：缩成一行，规则按需展开 ---- */
.actions .row.mini-row { gap: 6px; align-items: center; }
.actions .row.mini-row > button { flex: 0 0 auto; }
.actions button.mini-btn { padding: 6px 11px; font-size: 0.74rem; border-radius: 10px; }

/* ---- 轮到你：整屏金边呼吸，不用找小徽章 ---- */
body.turn-mine #game::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 3px rgba(243, 183, 63, 0.6),
    inset 0 0 34px rgba(243, 183, 63, 0.16);
  animation: turnEdge 2.4s ease-in-out infinite;
}
@keyframes turnEdge {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ---- 棋盘中心：信息放大 + 挂机大倒计时 ---- */
.turn-line { font-size: 1.08em; }
.mini-p { font-size: 0.76em; }
.pot-line { font-size: 0.84em; }
.idle-big {
  font-size: 2.1em;
  font-weight: 900;
  line-height: 1;
  color: #ffd774;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 26px rgba(243, 183, 63, 0.55);
}

/* ---- 事件卡弹窗：宽屏挪到右栏，不再盖住棋盘 ---- */
@media (min-width: 981px) and (orientation: landscape) {
  .card-pop { justify-content: flex-end; align-items: center; padding-right: 16px; }
  .card-pop-inner { width: min(320px, 28vw); padding: 22px 20px; }
  .card-pop-icon { font-size: 2rem; }
  .card-pop-text { font-size: 0.94rem; }
}
@media (max-width: 980px), (orientation: portrait) {
  .card-pop { align-items: flex-end; padding-bottom: calc(var(--ops-h, 0px) + 14px); }
  .card-pop-inner { width: min(400px, 92vw); }
}

/* ---- 字号三档：跟着根字号走 ---- */
html.fs-0 { font-size: 14.5px; }
html.fs-1 { font-size: 16px; }
html.fs-2 { font-size: 18.5px; }

/* ---- 关动画：只关装饰性的，掷骰 抽卡的结果反馈留着 ---- */
html.calm #center::before,
html.calm .my-turn,
html.calm .ops.mine::after,
html.calm body.turn-mine #game::after,
html.calm .round-bar span { animation: none !important; }
html.calm .sc-rays,
html.calm .sc-parts { display: none; }

/* ---- 色弱：涨用蓝、跌用橙 ---- */
html.cb .up { color: #7fc4ff !important; }
html.cb .down,
html.cb .bad { color: #ffb15c !important; }

/* ---- 手机：棋盘缩到一屏内，不再横向滑 ---- */
@media (max-width: 620px) {
  .board-wrap { padding: 6px; overflow-x: hidden; justify-content: center; }
  #board { width: min(100%, 62dvh); flex: 0 1 auto; gap: 2px; padding: 4px; font-size: 11px; }
  .tile .tname { font-size: 0.68em; -webkit-line-clamp: 2; }
  .tile .tmeta { font-size: 0.56em; }
  .tile-detail { inset: auto 8px calc(var(--ops-h, 200px) + 8px) 8px; max-height: 46dvh; }
  .ops { max-height: 56dvh; }

  /* 主按钮常驻底部：操作区内部滚动，掷骰子永远看得见 */
  #actions { flex: 1 1 auto; overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
  #actions > .row:last-child {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin-top: 2px;
    padding: 8px 0 4px;
    background: linear-gradient(180deg, rgba(9, 14, 28, 0.72) 0%, rgb(5, 8, 15) 45%);
  }
  #actions > .row:last-child button.primary { width: 100%; }
  .char-lock,
  .char-aw { font-size: 0.74em; line-height: 1.5; }
}

/* ================================================================
   手机棋盘可读性：一屏模式 = 干净地图；放大模式 = 560px 可拖动大图
   ================================================================ */
#game { position: relative; }
.board-zoom-btn { display: none; }
.buy-preview { line-height: 1.55; }
.buy-preview b { color: #ffe9a8; }
button.char-btn.off { cursor: help; }
button.char-btn.off:hover {
  color: #dcd1ff;
  border-color: rgba(189, 147, 245, 0.45);
  background: linear-gradient(180deg, rgba(189, 147, 245, 0.19), rgba(189, 147, 245, 0.06));
}

/* 常驻技说明默认折成一行，点一下展开（桌面也不让它占掉半个操作区） */
.char-lock {
  flex: 0 0 auto;
  max-height: 1.5em;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  padding-right: 42px;
}
.char-lock.open { max-height: none; }
.char-lock::after {
  content: '展开';
  position: absolute;
  right: 2px;
  top: 0;
  font-size: 0.66rem;
  color: #ffe9a8;
  opacity: 0.9;
}
.char-lock.open::after { content: '收起'; }

@media (max-width: 620px) {
  /* 缩放按钮不压格子：把按钮放进棋盘上方留白 */
  .board-wrap { padding-top: 42px; }
  .board-zoom-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 45;
    padding: 5px 11px;
    font-size: 0.72rem;
    font-weight: 800;
    border-radius: 999px;
    color: #ffe9a8;
    border-color: rgba(255, 233, 168, 0.4);
    background: rgba(8, 12, 24, 0.78);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
  }

  /* 底栏瘦身：别让操作区吃掉半个屏幕 */
  .ops { max-height: 48dvh; }

  /* 一屏模式：地产/驿站插画让位给文字；业主只留一个色点，无主不再挂字 */
  html:not(.board-zoom) .tile.k-property .tile-art,
  html:not(.board-zoom) .tile.k-station .tile-art { display: none; }
  html:not(.board-zoom) .tile.k-property .body::before,
  html:not(.board-zoom) .tile.k-station .body::before { display: none; }
  html:not(.board-zoom) .tile.k-property .body,
  html:not(.board-zoom) .tile.k-station .body {
    justify-content: center;
    padding: 1px 2px 2px;
  }
  html:not(.board-zoom) .tile .owner-badge {
    top: 2px;
    left: 2px;
    width: 7px;
    height: 7px;
    min-width: 7px;
    max-width: 7px;
    padding: 0;
    border-radius: 50%;
    font-size: 0;
    letter-spacing: 0;
    color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.92);
  }
  html:not(.board-zoom) .tile .unowned-tag { display: none; }

  .tile .tname { font-size: 0.86em; line-height: 1.0; }
  .tile .tmeta { font-size: 0.66em; line-height: 1.0; }
  .tile.corner .tname { font-size: 0.82em; }

  /* 放大模式：固定 560px，盘面在底栏上方双向平移 */
  html.board-zoom .board-wrap {
    overflow: auto;
    justify-content: flex-start;
    align-items: flex-start;
    max-height: calc(100dvh - var(--ops-h, 240px) - 14px);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  html.board-zoom #board {
    width: 560px;
    flex: 0 0 auto;
  }
  html.board-zoom .tile .owner-badge { font-size: 0.58em; }
  html.board-zoom .tile .unowned-tag { font-size: 0.48em; }
}

/* ---------------- 规则 / 帮助 ---------------- */
.help-link { width: 100%; margin-top: 10px; font-size: 0.8rem; }
.help-card { width: min(700px, 100%); }
.help-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.help-head h2 { margin: 0; }
.help-close { padding: 3px 10px; border-radius: 8px; font-size: 0.9rem; }
.help-body { margin-top: 4px; }
.help-body h3 {
  margin: 16px 0 5px;
  font-size: 0.94rem;
  letter-spacing: 0.02em;
  color: #ffe9a8;
}
.help-body ul { margin: 0; padding-left: 1.15em; }
.help-body li {
  margin: 4px 0;
  font-size: 0.85rem;
  line-height: 1.65;
  color: #c9d2e6;
}
.help-body b { color: #ffe9a8; font-weight: 800; }
.help-note {
  margin: 16px 0 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.74rem;
  color: var(--dim);
}

@media (max-width: 620px) {
  .help-card { padding: 14px 14px 10px; }
  .help-body li { font-size: 0.9rem; line-height: 1.7; }
  .help-body h3 { margin-top: 14px; font-size: 1rem; }
  .help-close { padding: 5px 12px; }
}

/* ---------------- 连接状态条 ---------------- */
.net-bar {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  max-width: min(92vw, 560px);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.35;
  text-align: center;
  pointer-events: none;
  animation: netIn 0.18s var(--ease) both;
}
.net-bar[hidden] { display: none; }
.net-bar.down {
  color: #ffd9d9;
  background: rgba(74, 20, 24, 0.94);
  border: 1px solid rgba(244, 120, 124, 0.62);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.net-bar.ok {
  color: #d2ffe9;
  background: rgba(16, 58, 44, 0.94);
  border: 1px solid rgba(95, 211, 155, 0.62);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.42);
}
@keyframes netIn {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ================================================================
   地图重制：海 / 岛 / 环岛航线 + 玻璃路标格子
   目标：棋盘先是一张地图，再是 40 个可点的格子。
   ================================================================ */
.board-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0 0 10px;
}

.board-hud {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 5px 11px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(20, 31, 50, 0.88), rgba(9, 16, 29, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.board-hud[hidden] { display: none; }
.hud-round { color: #c9d6ea; white-space: nowrap; }
.hud-round b { color: #ffe9a8; font-size: 1.08em; }
.hud-turn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-turn b { font-weight: 800; }
.hud-turn.mine { color: #ffe9a8; }
.hud-dice { display: flex; align-items: center; gap: 0.24em; margin-left: auto; }
.hud-dice .die {
  width: 1.55em;
  height: 1.55em;
  border-radius: 0.34em;
  padding: 0.16em;
  box-shadow: 0 0.1em 0 #a99f88, 0 0.22em 0.4em rgba(0, 0, 0, 0.4), inset 0 0.08em 0.1em rgba(255, 255, 255, 0.85);
}
.hud-dice .dice-sum { font-size: 0.86em; padding-left: 0.12em; }
.hud-note {
  color: var(--dim);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

#board {
  width: min(100%, calc(100dvh - 86px));
  background: #081524;
  overflow: hidden;
}

.map-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}
.map-svg { width: 100%; height: 100%; display: block; }
.map-fog { animation: mapFog 28s ease-in-out infinite alternate; }
.map-route-line { animation: routeFlow 20s linear infinite; }
@keyframes mapFog {
  from { transform: translate3d(-1.6%, 0.8%, 0); }
  to { transform: translate3d(1.8%, -1.2%, 0); }
}
@keyframes routeFlow { to { stroke-dashoffset: -140; } }
html.calm .map-fog,
html.calm .map-route-line { animation: none !important; }

/* 玻璃路标：不再是一张不透明的纸卡，底下的航线和岛色能透出来 */
.tile {
  z-index: 2;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(22, 35, 54, 0.72), rgba(9, 17, 30, 0.86));
  color: #eef3fb;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(1.5px);
}
.tile .bar { height: 17%; min-height: 6px; }
.tile .bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.22), transparent 70%);
  pointer-events: none;
}
.tile.k-chance { background: linear-gradient(180deg, rgba(54, 39, 80, 0.74), rgba(25, 17, 42, 0.9)); }
.tile.k-tax { background: linear-gradient(180deg, rgba(78, 38, 42, 0.74), rgba(37, 17, 23, 0.9)); }
.tile.k-fortune { background: linear-gradient(180deg, rgba(76, 59, 30, 0.74), rgba(35, 26, 15, 0.9)); }
.tile.k-teleport { background: linear-gradient(180deg, rgba(24, 62, 64, 0.74), rgba(12, 30, 33, 0.9)); }
.tile.k-station { background: linear-gradient(180deg, rgba(39, 50, 64, 0.76), rgba(17, 25, 36, 0.9)); }
.tile.k-idle { background: linear-gradient(180deg, rgba(30, 46, 44, 0.7), rgba(14, 25, 26, 0.88)); }
.tile.k-start,
.tile.k-jail,
.tile.k-freepark,
.tile.k-gotojail {
  background: linear-gradient(160deg, rgba(34, 57, 74, 0.9), rgba(12, 24, 39, 0.94));
}
.tile.k-start { border-color: rgba(95, 211, 155, 0.55); }
.tile.k-gotojail { border-color: rgba(244, 120, 124, 0.5); }
.tile.k-freepark { border-color: rgba(243, 183, 63, 0.5); }
.tile.k-jail { border-color: rgba(160, 184, 214, 0.42); }

.tile .tile-art {
  opacity: 0.13;
  filter: saturate(0.9) contrast(0.92);
  transform: none;
  mix-blend-mode: screen;
}
.tile.k-property .tile-art,
.tile.k-station .tile-art {
  inset: 0;
  height: 100%;
  object-position: 50% 50%;
}
.tile.k-property .body,
.tile.k-station .body { justify-content: center; padding: 1px 2px 3px; }
.tile.k-property .body::before,
.tile.k-station .body::before { display: none; }
.tile.owned .tile-art { opacity: 0.16; }

.tile .tname {
  color: #f2f6ff;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(2, 7, 16, 0.9), 0 0 1px rgba(2, 7, 16, 0.9);
}
.tile .tmeta {
  color: #ffd98d;
  text-shadow: 0 1px 2px rgba(2, 7, 16, 0.9);
}
.tile.corner .tname,
.tile.corner .tmeta { text-shadow: 0 1px 4px rgba(2, 7, 16, 0.85); }
.tile .ticon { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6)); }

/* 有主：用业主色描边 + 左下角小色点，不再整格蒙一层颜色 */
.tile.owned { border-color: var(--ow); }
.tile.owned::after { content: none; display: none; }
.tile.owned .body::after { display: none; }
.tile.mine-own { border-color: #ffe9a8; box-shadow: 0 0 0 1px rgba(243, 183, 63, 0.55), 0 2px 10px rgba(0, 0, 0, 0.38); }
.tile .owner-badge {
  top: 3px;
  left: 3px;
  width: 9px;
  height: 9px;
  min-width: 9px;
  max-width: 9px;
  padding: 0;
  border-radius: 50%;
  font-size: 0;
  color: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 1px 4px rgba(0, 0, 0, 0.4);
}
.tile.mine-own .owner-badge { box-shadow: 0 0 0 1.5px #ffe9a8, 0 1px 5px rgba(0, 0, 0, 0.45); }
.tile .unowned-tag { display: none; }

/* 成套：把「套」挂到色条上，避免和业主蒙层抢同一个 ::after */
.tile.has-set::after { content: none; display: none; }
.tile.has-set .bar::after {
  content: '套';
  position: absolute;
  top: 0;
  right: 2px;
  z-index: 4;
  min-width: 1.25em;
  height: 1.3em;
  padding: 0 0.16em;
  border-radius: 0 0 4px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5em;
  font-weight: 900;
  line-height: 1;
  color: #2b1d05;
  background: linear-gradient(180deg, #ffe9a8, #f3b73f);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* 建筑等级：一个数字，取代四栋小房子 */
.tile .pips { display: none; }
.tile .lvl {
  position: absolute;
  top: 3px;
  right: 3px;
  z-index: 4;
  padding: 0 0.34em;
  border-radius: 5px;
  font-size: 0.52em;
  font-weight: 900;
  line-height: 1.5;
  color: #ffe9a8;
  background: rgba(5, 11, 20, 0.82);
  border: 1px solid rgba(255, 233, 168, 0.45);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  letter-spacing: 0.02em;
  pointer-events: none;
}
.tile .lvl.max { color: #2b1d05; background: linear-gradient(180deg, #ffe9a8, #f3b73f); border-color: #fff3c8; }

/* 棋子：只留头像，名字交给右侧玩家条 */
.tokens { font-size: 0.7em; bottom: 2px; gap: 1px; }
.tk { width: 1.95em; height: 1.95em; border-width: 1.5px; }
.tkw.me .tk { width: 2.25em; height: 2.25em; outline-width: 2px; }
.tk-name { display: none; }
.tile .you-flag { font-size: 0.5em; }
.tile.here { transform: none; }

/* 中心：从仪表盘改成岛屿中心 */
#center {
  z-index: 1;
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
  gap: 0.55em;
  overflow: visible;
}
#center::before { content: none; display: none; }
.isle-title {
  font-size: 1.08em;
  letter-spacing: 0.2em;
  color: #eaf7f3;
  text-shadow: 0 2px 18px rgba(2, 9, 14, 0.78);
  opacity: 0.92;
}
.isle-title small { font-size: 0.38em; letter-spacing: 0.42em; color: #8bd8dd; margin-top: 0.5em; }
.map-compass {
  position: relative;
  width: 3.9em;
  height: 3.9em;
  border-radius: 50%;
  border: 1px solid rgba(205, 238, 235, 0.24);
  background: radial-gradient(circle at 50% 46%, rgba(9, 23, 27, 0.62), rgba(9, 23, 27, 0.12) 70%);
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.32), 0 0 24px rgba(92, 201, 234, 0.08);
}
.map-compass span {
  position: absolute;
  font-size: 0.42em;
  font-weight: 800;
  color: #b8ddd9;
  opacity: 0.72;
  letter-spacing: 0.1em;
}
.map-compass .cp-n { top: 0.16em; left: 50%; transform: translateX(-50%); color: #ffe9a8; }
.map-compass .cp-e { right: 0.22em; top: 50%; transform: translateY(-50%); }
.map-compass .cp-s { bottom: 0.1em; left: 50%; transform: translateX(-50%); }
.map-compass .cp-w { left: 0.22em; top: 50%; transform: translateY(-50%); }
.map-compass .cp-needle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.16em;
  height: 1.55em;
  margin: -0.775em 0 0 -0.08em;
  border-radius: 99px;
  
background: linear-gradient(180deg, #ffe9a8 0 50%, #7fd0d8 50% 100%);
  box-shadow: 0 0 6px rgba(255, 233, 168, 0.4);
  transform-origin: 50% 50%;
  transition: transform 0.7s var(--ease);
}
.map-compass .cp-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.46em;
  height: 0.46em;
  margin: -0.23em 0 0 -0.23em;
  border-radius: 50%;
  background: #0c1b23;
  border: 1px solid rgba(255, 233, 168, 0.7);
}
.map-where {
  padding: 0.24em 0.78em;
  border-radius: 99px;
  font-size: 0.74em;
  color: #d7e7e5;
  background: rgba(5, 15, 20, 0.52);
  border: 1px solid rgba(205, 238, 235, 0.13);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.map-where b { color: #ffe9a8; }
.map-where.me { border-color: rgba(243, 183, 63, 0.4); }
#center .turn-line { color: #d7e7e5; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
#center .pot-line {
  font-size: 0.66em;
  color: #b9cfd4;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}
#center .my-turn { box-shadow: 0 0 18px rgba(243, 183, 63, 0.22); }

/* 平板 / 窄屏：棋盘在侧栏上方，HUD 跟着收窄 */
@media (max-width: 980px), (orientation: portrait) {
  .board-main { padding: 0; gap: 4px; }
  .board-hud { font-size: 0.72rem; padding: 4px 9px; min-height: 30px; gap: 7px; }
  .hud-note { display: none; }
  #board { width: min(100%, 66dvh); }
}

@media (max-width: 620px) {
  .board-main { padding: 0; }
  .board-hud {
    position: relative;
    z-index: 46;
    padding: 4px 76px 4px 8px;
    min-height: 28px;
    gap: 6px;
    font-size: 0.66rem;
    border-radius: 10px;
  }
  .hud-round b { font-size: 1em; }
  .hud-turn { max-width: 8.4em; }
  .hud-dice { gap: 0.16em; }
  .hud-dice .die { width: 1.55em; height: 1.55em; padding: 0.14em; border-radius: 0.3em; }
  .hud-dice .dice-sum { font-size: 0.84em; }
  .board-wrap { padding: 0 0 4px; justify-content: center; }
  #board { width: min(100%, 58dvh, calc(100dvh - var(--ops-h, 240px) - 40px)); padding: 3px; gap: 1px; }
  .tile .bar { height: 4px; }
  .tile .body { padding: 1px 1px 1px; }
  .board-zoom-btn { top: 3px; right: 6px; padding: 4px 9px; font-size: 0.66rem; }
  .isle-title { font-size: 1em; letter-spacing: 0.1em; }
  .isle-title small { font-size: 0.4em; letter-spacing: 0.26em; }
  .map-compass { width: 4.2em; height: 4.2em; }
  .map-where { font-size: 0.72em; padding: 2px 7px; }
  #center .pot-line { font-size: 0.64em; }
  /* 一屏格子里只放两字路标：全名留给详情卡和桌面，别在 34px 里硬折行 */
  .tile .tname {
    font-size: 0;
    display: block;
    line-height: 1.1;
    white-space: nowrap;
    word-break: normal;
    -webkit-line-clamp: unset;
  }
  .tile .tname::after {
    content: attr(data-short);
    font-size: clamp(10px, 2.9vw, 14px);
    letter-spacing: 0;
  }
  /* 手机上 34px 宽的格子放不下「◆1,500」「🚉1,500」：去掉符号，只留数字 */
  .tile .tmeta {
    font-size: 0;
    line-height: 1.05;
    letter-spacing: 0;
  }
  .tile .tmeta::after {
    content: attr(data-meta);
    font-size: clamp(8px, 2.15vw, 10px);
    letter-spacing: -0.03em;
  }
  .tile.corner .tname { font-size: 0; }
  .tile .lvl { top: 1px; right: 1px; font-size: 0; padding: 0 2px; }
  .tile .lvl::after { content: attr(data-lv); font-size: 8px; line-height: 1.3; }
  .tile .owner-badge { top: 2px; left: 2px; width: 8px; height: 8px; min-width: 8px; max-width: 8px; }
  /* 底栏密度：提示行别用桌面的大内边距，挂机/常驻/觉醒都收成一行 */
  .actions { gap: 5px; }
  .actions .hint { padding: 8px 10px; }
  .char-bar-head { margin-bottom: 0; cursor: pointer; }
  .char-bar-head .cb-toggle {
    display: inline-block;
    margin-left: auto;
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(243, 183, 63, 0.12);
  }
  .char-bar-body:not(.open) { display: none; }
  .char-bar-body.open { display: flex; flex-direction: column; gap: 5px; }
  .hint.idle-note { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hint.char-lock { max-height: 1.7em; }
  .hint.char-aw {
    max-height: 2em;
    padding: 5px 8px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .hand.empty .hand-empty { display: none; }
  .hand.empty .hand-title { padding-bottom: 2px; }
  /* 手牌上限 5 张：一张屏宽刚好放完，不让人再横向找第五张 */
  .hand-row { gap: 4px; padding-right: 0; }
  .hcard { width: calc((100% - 16px) / 5); min-width: 56px; }
  /* 变卖是低频但危险的操作：触控目标别只有 24px 高 */
  .land .sell-btn { min-width: 44px; min-height: 36px; padding: 7px 10px; font-size: 0.7rem; }
  /* 手机上同格最多露三个头像，剩下的收进「+N」，别把 34px 格铺满 */
  .tokens { font-size: 0.5em; bottom: 1px; gap: 1px; }
  .tk { width: 1.9em; height: 1.9em; border-width: 1.2px; }
  .tkw.me .tk { width: 2.1em; height: 2.1em; outline-width: 1.5px; }
  .tokens.many .tkw:nth-child(n + 4) { display: none; }
  .tokens.many::after {
    content: attr(data-more);
    position: absolute;
    right: 0;
    bottom: 0;
    padding: 0 2px;
    border-radius: 4px;
    background: rgba(2, 8, 14, 0.82);
    color: #ffe9a8;
    font-size: 7px;
    line-height: 1.35;
    font-weight: 800;
  }
  .tile .tile-art { opacity: 0.1; }
  html.board-zoom .board-wrap {
    max-height: calc(100dvh - var(--ops-h, 240px) - 44px);
  }
  html.board-zoom #board { width: 560px; }
  /* 放大模式格子够宽，恢复全名和完整数字，别让「放大」只放大格子不放大信息 */
  html.board-zoom .tile .tname {
    font-size: 11px;
    white-space: normal;
    word-break: break-all;
    -webkit-line-clamp: 2;
    line-height: 1.05;
  }
  html.board-zoom .tile .tname::after { content: none; }
  html.board-zoom .tile .tmeta { font-size: 9px; letter-spacing: 0; }
  html.board-zoom .tile .tmeta::after { content: none; }
  html.board-zoom .tile .lvl { font-size: 9px; }
  html.board-zoom .tile .lvl::after { content: none; }
  html.board-zoom .tile .owner-badge { width: 9px; height: 9px; min-width: 9px; max-width: 9px; }
}
/* 地产格：保留一点点纸纹，但压到深色玻璃下面，别让棋盘又变回一排纸卡 */
.tile.k-property.has-tex {
  background-image:
    linear-gradient(180deg, rgba(22, 35, 54, 0.86), rgba(9, 17, 30, 0.94)),
    var(--tex);
  background-size: cover;
  background-position: 50% 50%;
}

/* 岛心罗盘：缓慢自转的航海玫瑰，只做底纹，不抢操作 */
.map-rose {
  transform-box: view-box;
  transform-origin: 500px 500px;
  animation: mapRose 150s linear infinite;
}
@keyframes mapRose { to { transform: rotate(360deg); } }
html.calm .map-rose { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .map-rose, .map-fog, .map-route-line { animation: none !important; }
}

@media (max-width: 620px) {
  #center { font-size: 0.92em; }
}
/* ================================================================ 特效分层
   普通操作 → 格子就地反馈；普通技能卡 → 顶部紧凑提示；只有大牌才全屏。 */
.fx-layer {
  position: fixed;
  inset: 0;
  z-index: 78;
  pointer-events: none;
  overflow: hidden;
}
.fx-coin {
  position: fixed;
  transform: translate(-50%, -50%);
  color: #ffd56a;
  font-size: 13px;
  font-weight: 900;
  text-shadow: 0 0 10px rgba(255, 190, 70, .85), 0 1px 2px rgba(0, 0, 0, .7);
  pointer-events: none;
  will-change: transform;
}
.fx-tile-float {
  position: fixed;
  z-index: 12;
  transform: translate(-50%, -50%);
  padding: 3px 7px;
  border-radius: 7px;
  background: rgba(6, 12, 22, .82);
  border: 1px solid rgba(255, 213, 106, .5);
  color: #ffd56a;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .9);
  animation: fxTileFloat 1.35s var(--ease) both;
}
.fx-tile-float.down { color: #ff9a9d; border-color: rgba(255, 154, 157, .5); }
@keyframes fxTileFloat {
  0% { opacity: 0; transform: translate(-50%, -20%) scale(.82); }
  18% { opacity: 1; transform: translate(-50%, -58%) scale(1); }
  72% { opacity: 1; transform: translate(-50%, -92%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -130%) scale(.98); }
}

/* 收租落点：格子被金币砸中，金色一圈 */
.tile.rent-hit {
  z-index: 7;
  animation: rentHit .72s var(--ease);
}
@keyframes rentHit {
  0% { transform: scale(1); }
  22% { transform: scale(1.12); box-shadow: 0 0 0 2px rgba(255, 213, 106, .9), 0 0 26px rgba(255, 190, 70, .55); }
  48% { transform: scale(.98); }
  72% { transform: scale(1.04); box-shadow: 0 0 0 1px rgba(255, 213, 106, .45), 0 0 14px rgba(255, 190, 70, .3); }
  100% { transform: scale(1); box-shadow: none; }
}

/* 升级：等级徽章从格子里长出来（地图版没有小房子了，别再对着 .pips 做动画） */
.tile.built .lvl { animation: lvlPop .55s var(--ease) both; }
@keyframes lvlPop {
  0% { transform: translateY(7px) scale(.35); opacity: 0; }
  55% { transform: translateY(-1px) scale(1.18); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* 拆迁：目标格晃一下，尘屑从底下掉 */
.tile.wreck-hit {
  z-index: 7;
  animation: wreckHit .68s var(--ease);
}
@keyframes wreckHit {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  15% { transform: translate(-2px, 1px) rotate(-.8deg); }
  32% { transform: translate(2px, -1px) rotate(.7deg); }
  50% { transform: translate(-1px, 1px) rotate(-.4deg); }
  70% { transform: translate(1px, 0) rotate(.2deg); }
}

/* 雾锁落在目标格：雾一下压下来，锁边亮起 */
.tile.seal-hit {
  z-index: 7;
  animation: sealHit .85s var(--ease);
}
@keyframes sealHit {
  0% { box-shadow: 0 0 0 0 rgba(176, 198, 220, 0); filter: brightness(1); }
  25% { box-shadow: 0 0 0 3px rgba(176, 198, 220, .65), 0 0 30px rgba(150, 180, 210, .5); filter: brightness(.82); }
  100% { box-shadow: 0 0 0 1px rgba(176, 198, 220, .2); filter: brightness(1); }
}
.tile.seal-off { animation: sealOff .7s var(--ease); }
@keyframes sealOff {
  0% { filter: brightness(.8); }
  40% { filter: brightness(1.35); box-shadow: 0 0 24px rgba(180, 220, 200, .55); }
  100% { filter: brightness(1); }
}

/* 紧凑技能提示：卡图 + 一句谁做了什么，钉在棋盘上沿，不拦点击 */
.skill-banner {
  position: fixed;
  top: 6px;
  left: 50%;
  translate: -50% 0;
  z-index: 86;
  display: flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  max-width: min(520px, calc(100vw - 24px));
  padding: 5px 12px 5px 6px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(24, 38, 58, .96), rgba(8, 16, 28, .97));
  border: 1px solid rgba(255, 213, 106, .38);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .05) inset;
  pointer-events: none;
  animation: sbIn .28s var(--ease) both;
}
.skill-banner[hidden] { display: none; }
.skill-banner img {
  flex: 0 0 auto;
  width: 34px;
  height: 48px;
  border-radius: 5px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .5);
}
.skill-banner .sb-text { min-width: 0; }
.skill-banner .sb-text b {
  display: block;
  font-size: .86rem;
  line-height: 1.2;
  color: #ffe9a8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.skill-banner .sb-text span {
  display: block;
  margin-top: 1px;
  font-size: .7rem;
  line-height: 1.25;
  color: #c7d3e6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@keyframes sbIn {
  0% { opacity: 0; transform: translateY(-10px) scale(.96); }
  100% { opacity: 1; transform: none; }
}

@media (max-width: 620px) {
  .skill-banner {
    top: 0;
    height: 30px;
    gap: 6px;
    padding: 1px 8px 1px 2px;
    border-radius: 0 0 10px 10px;
    max-width: calc(100vw - 8px);
  }
  .skill-banner img { width: 20px; height: 28px; }
  .skill-banner .sb-text {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
  }
  .skill-banner .sb-text b,
  .skill-banner .sb-text span {
    display: inline;
    margin: 0;
    font-size: .62rem;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .skill-banner .sb-text b { flex: 0 0 auto; }
  .skill-banner .sb-text span { min-width: 0; }
  .fx-tile-float { font-size: 11px; padding: 2px 5px; }
}
html.calm .skill-banner, html.calm .fx-tile-float { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .skill-banner, .fx-tile-float { animation: none; }
  .tile.rent-hit, .tile.wreck-hit, .tile.seal-hit, .tile.seal-off, .tile.built .lvl { animation: none; }
}/* ===== 手机增强（2026-11-17）：横屏 / 抽屉把手 / 滚动锁 / 低端降级 ===== */
.td-grip { display: none; }
body.modal-open { overflow: hidden; overscroll-behavior: none; }
html.lite .tile { backdrop-filter: none !important; }
html.lite .map-fog,
html.lite .map-route-line,
html.lite .map-rose { animation: none !important; }

@media (max-width: 980px), (max-height: 560px) {
  .td-grip {
    display: flex; align-items: center; justify-content: center;
    height: 18px; margin: -4px 0 2px; touch-action: none; cursor: grab;
  }
  .td-grip i { display: block; width: 42px; height: 4px; border-radius: 99px; background: rgba(220, 235, 255, .38); }
  .tile-detail { overscroll-behavior: contain; touch-action: pan-y; }
  .tile-detail.dragging { transition: none !important; }
}

@media (max-width: 620px) {
  .tile-detail { max-height: 42dvh; }
}

/* 横屏手机：棋盘在左、侧栏在右，不再把棋盘压到 250px */
@media (orientation: landscape) and (max-height: 560px) {
  #game { flex-direction: row; height: 100dvh; gap: 0; }
  .board-main { flex: 0 0 auto; width: min(calc(100dvh - 2px), 48vw); padding: 1px; gap: 2px; }
  .board-hud { min-height: 26px; padding: 2px 78px 2px 8px; font-size: .6rem; gap: 5px; border-radius: 8px; }
  .hud-note { display: none; }
  .board-wrap { flex: 1 1 auto; padding: 0 0 2px; overflow: hidden; justify-content: center; }
  #board { width: min(100%, calc(100dvh - 30px)); padding: 3px; gap: 1px; font-size: 12px; }
  .board-zoom-btn {
    display: inline-flex; right: auto; top: 4px; bottom: auto;
    left: calc(min(calc(100dvh - 2px), 48vw) - 78px);
    padding: 3px 8px; font-size: .62rem;
  }
  .side { flex: 1 1 auto; min-width: 0; padding: 2px 6px 2px 0; gap: 5px; overflow-y: auto; }
  .ops { position: relative; left: auto; right: auto; bottom: auto; max-height: none; overflow: visible; padding: 6px; border-radius: 12px; }
  .players { flex-direction: column; max-height: none; }
  .players .prow { flex: 1 1 auto; min-width: 0; }
  .mylist, .log-wrap { max-height: none; }
  .tile-detail {
    inset: 6px 6px 6px auto; width: min(390px, 48vw);
    max-height: calc(100dvh - 12px); z-index: 70;
    border-radius: 14px; overflow: auto;
  }
  .tile .bar { height: 4px; }
  .tile .body { padding: 1px; }
  .tile .tname { font-size: 0; display: block; line-height: 1; white-space: nowrap; }
  .tile .tname::after { content: attr(data-short); font-size: clamp(9px, 2.1vh, 12px); letter-spacing: 0; }
  .tile .tmeta { font-size: 0; line-height: 1; }
  .tile .tmeta::after { content: attr(data-meta); font-size: clamp(7px, 1.7vh, 9px); letter-spacing: -.03em; }
  .tile.corner .tname { font-size: 0; }
  .tile .lvl { top: 1px; right: 1px; font-size: 0; padding: 0 2px; }
  .tile .lvl::after { content: attr(data-lv); font-size: 7px; line-height: 1.3; }
  .tile .owner-badge { top: 2px; left: 2px; width: 7px; height: 7px; min-width: 7px; max-width: 7px; }
  html.board-zoom .board-wrap { overflow: auto; justify-content: flex-start; align-items: flex-start; max-height: calc(100dvh - 4px); }
  html.board-zoom #board { width: 500px; flex: 0 0 auto; }
  .skill-banner { top: 0; }
}
/* 横屏收口：动作条优先露出，缩放按钮让位给长按 */
@media (orientation: landscape) and (max-height: 560px) {
  .board-hud { padding-right: 8px; }
  .board-zoom-btn { display: none !important; }
  .side { display: flex; flex-direction: column; overflow: hidden; }
  .ops { order: -1; max-height: 64dvh; overflow-y: auto; }
  .players { order: 1; max-height: none; }
  .mylist { order: 2; }
  .log-wrap { order: 3; }
}
@media (orientation: landscape) and (max-height: 560px) {
  .side-head { order: -2; flex: 0 0 auto; }
  .side-head .head-actions { flex-wrap: wrap; }
  .ui-row { order: -1; }
}

/* ===== 第二轮手机优化：横屏出口 / 右栏 / 安全区 / 触控 / 详情联动 ===== */
.board-main { position: relative; }
.install-tip {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(243, 183, 63, .28);
  border-radius: 12px;
  background: rgba(243, 183, 63, .07);
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.6;
  text-align: left;
}
.install-tip b { color: #ffe9a8; }
.install-tip button { margin-top: 7px; width: 100%; }
.install-tip .ios-share { color: #ffe9a8; font-weight: 700; }

@media (max-width: 620px) {
  .tile-detail { max-height: 36dvh; }
  .td-close { min-width: 44px; min-height: 44px; padding: 0; font-size: 1.05rem; }
  .board-zoom-btn { height: 26px; max-height: 26px; line-height: 1; }
  html.detail-open #board {
    transform: translateY(calc(-1 * var(--detail-shift, 0px)));
    transition: transform .22s ease;
  }
  html.calm.detail-open #board { transition: none; }
}

@media (pointer: coarse) {
  .head-actions .ghost { min-width: 40px; min-height: 40px; padding: 0 7px; }
  .mini-btn { min-height: 36px; }
  .land .sell-btn { min-height: 40px; }
}

@media (orientation: landscape) and (max-height: 560px) {
  #game {
    box-sizing: border-box;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .board-main { width: min(calc(100dvh - 2px), 48vw); }
  .board-hud { padding-right: 82px; }
  /* 横屏也保留出口：放大后能点回一屏 */
  .board-zoom-btn {
    display: inline-flex !important;
    left: auto; right: 5px; top: 2px;
    height: 24px; min-height: 24px; max-height: 24px;
    padding: 2px 8px; font-size: .6rem; line-height: 1;
    z-index: 60;
  }
  .side {
    overflow-y: auto;
    padding-right: max(4px, env(safe-area-inset-right));
  }
  .side-head { order: -3; }
  .players {
    order: -1;
    flex-direction: row;
    flex-wrap: wrap;
    max-height: 74px;
    overflow-y: auto;
  }
  .players .prow { flex: 1 1 calc(50% - 3px); min-width: 0; }
  .ops {
    order: 0;
    max-height: calc(100dvh - 120px);
    overflow-y: auto;
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
  }
  .mylist { order: 2; }
  .log-wrap { order: 3; }
  .head-actions .ghost { min-width: 36px; min-height: 36px; }
  .td-close { min-width: 44px; min-height: 44px; }
}

/* 修正：button.ghost 的 padding/字号优先级比单类高，横屏缩放按钮要显式压过它 */
@media (orientation: landscape) and (max-height: 560px) {
  button.board-zoom-btn {
    position: absolute;
    display: inline-flex !important;
    left: auto; right: 5px; top: 2px;
    width: auto; height: 24px; min-height: 24px; max-height: 24px;
    padding: 2px 8px; font-size: .6rem; line-height: 1;
    white-space: nowrap;
  }
  #board { width: min(100%, calc(100dvh - 44px)); }
}
html.detail-measure #board { transition: none !important; }

@media (orientation: landscape) and (max-height: 560px) {
  /* 喊话条排到动作区之后，别把操作按钮顶出屏幕 */
  .shout { order: 1; }
}

/* 触屏目标：顶栏/小按钮尽量到 44×44 */
@media (pointer: coarse) {
  .head-actions .ghost { min-width: 44px; min-height: 44px; padding: 0 6px; }
  .mini-btn { min-height: 40px; }
}
@media (orientation: landscape) and (max-height: 560px) {
  .head-actions .ghost { min-width: 44px; min-height: 44px; padding: 0 6px; }
  .mini-btn { min-height: 40px; }
}

@media (max-width: 620px) {
  .head-actions .ghost { min-width: 44px; min-height: 44px; padding: 0 6px; }
  .mini-btn { min-height: 40px; }
}

@media (max-width: 620px) {
  #ops { max-height: var(--ops-max, 48dvh); overflow-y: auto; -webkit-overflow-scrolling: touch; }
}

/* 竖屏玩家条：压成一行横向可滑，别被固定操作条整块盖住 */
@media (max-width: 620px) {
  .players {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 5px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .players::-webkit-scrollbar { display: none; }
  .players .prow {
    flex: 0 0 auto;
    min-width: 118px;
    max-width: 152px;
    padding: 5px 8px;
    gap: 7px;
    font-size: .78rem;
  }
  .players .prow .avatar { width: 24px; height: 24px; font-size: .7rem; }
  .players .prow .nm-where { display: none; }
  .players .prow .cash { font-size: .8rem; }
  .mini-btn, .land .sell-btn { min-height: 44px; }
  .help-link { min-height: 44px; }
}

/* 横屏 6 人：玩家条保持单行，可横向滑，不把动作区顶下去 */
@media (orientation: landscape) and (max-height: 560px) {
  .players {
    flex-wrap: nowrap;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .players .prow { flex: 0 0 auto; min-width: 145px; }
  .mini-btn, .land .sell-btn { min-height: 44px; }
}

/* 棋盘键盘导航：Tab 进入后方向键按顺时针挪，Enter/空格看详情 */
#board .tile:focus-visible {
  outline: 2px solid #f3b73f;
  outline-offset: -2px;
  z-index: 3;
}

/* 手机软键盘：大厅底部给键盘让位 */
@media (max-width: 620px) {
  html.kb-open #lobby { padding-bottom: calc(24px + var(--kb, 0px)); }
}

/* 手机详情抽屉：先露一条，点「展开」或往上拖再看完整内容 */
.td-expand {
  display: none;
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 9px;
  border-radius: 9px;
  font-size: .72rem;
  align-items: center;
  justify-content: center;
}
@media (max-width: 620px) and (orientation: portrait) {
  .td-expand { display: inline-flex; min-height: 44px; }
  .tile-detail.peek {
    max-height: 118px;
    overflow: hidden;
  }
  .tile-detail.peek .td-body { display: none; }
  .tile-detail.peek .td-art { width: 42px; height: 42px; }
}

/* iPhone 装到主屏幕（standalone + black-translucent）时，内容会顶到状态栏下面；
   给大厅和游戏留出顶部安全区，手机棋盘宽度也同步扣掉这块，避免把底栏顶出去。 */
#lobby { padding-top: calc(24px + env(safe-area-inset-top, 0px)); }
#game { padding-top: env(safe-area-inset-top, 0px); }
@media (max-width: 620px) {
  #board {
    width: min(100%, 58dvh, calc(100dvh - var(--ops-h, 240px) - 40px - env(safe-area-inset-top, 0px)));
  }
}

/* 详情卡的拖拽把手视觉仍是一条细线，但把可触摸热区扩到约 44px。 */
@media (max-width: 980px), (max-height: 560px) {
  .td-grip {
    position: relative;
    height: 28px;
    margin: -4px 0 2px;
  }
  .td-grip::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -8px;
    bottom: -8px;
  }
}

/* 等候室准备状态 + 邀请二维码 */
.tag.ready { color: #8fe3b0; border-color: rgba(102, 210, 150, .45); background: rgba(102, 210, 150, .12); }
.tag.not-ready { color: #e9c27a; border-color: rgba(233, 194, 122, .35); background: rgba(233, 194, 122, .08); }
.qr-ov {
  position: fixed; inset: 0; z-index: 96; display: flex; align-items: center; justify-content: center;
  padding: 18px; background: rgba(3, 8, 15, .72); backdrop-filter: blur(4px);
}
.qr-card {
  width: min(86vw, 342px); padding: 16px; border-radius: 18px;
  background: linear-gradient(170deg, #17243a, #0a1322); border: 1px solid rgba(243, 183, 63, .28);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55); text-align: center;
}
.qr-card h3 { margin: 0 0 4px; font-size: 1rem; color: #ffe9a8; }
.qr-card p { margin: 0 0 10px; font-size: .72rem; color: #9fb0c8; line-height: 1.5; }
.qr-card img { display: block; width: min(72vw, 260px); height: auto; margin: 0 auto 10px; border-radius: 10px; background: #f8f3e7; }
.qr-card .qr-url { font-size: .64rem; color: #8fa4c0; word-break: break-all; margin-bottom: 10px; }
.qr-card button { min-height: 42px; padding: 0 18px; border-radius: 10px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: #e8eef8; font: inherit; }
.qr-card button:active { transform: translateY(1px); }

/* ---------------- 规则搜索 ---------------- */
.help-tools { position: sticky; top: -14px; z-index: 2; margin: 0 -4px 10px; padding: 8px 4px 9px; background: linear-gradient(180deg, rgba(20,30,50,.98), rgba(20,30,50,.9)); }
.help-tools input { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); background: rgba(0,0,0,.2); color: var(--text); font: inherit; font-size: .86rem; }
.help-tools input:focus { outline: 2px solid rgba(243,183,63,.5); outline-offset: 1px; }
.help-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.help-chips button { border: 1px solid rgba(243,183,63,.22); background: rgba(243,183,63,.08); color: #e9d8a8; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: .68rem; cursor: pointer; }
.help-chips button:active { transform: translateY(1px); }
.help-empty { margin: 8px 0 0; color: var(--muted); font-size: .78rem; }
.help-sec[hidden] { display: none; }

/* ---------------- 结算复盘 / 分享 ---------------- */
.modal-card { max-height: calc(100dvh - 32px); overflow-y: auto; }
.modal-actions { flex-wrap: wrap; }
.modal-actions > button { min-width: 0; }
.recap { margin-top: 12px; text-align: left; border-top: 1px solid rgba(255,255,255,.08); padding-top: 10px; }
.recap summary { cursor: pointer; color: var(--dim); font-size: .76rem; padding: 4px 0; }
.recap-table { width: 100%; border-collapse: collapse; font-size: .68rem; margin-top: 4px; }
.recap-table th { color: var(--dim); font-weight: 600; padding: 4px 3px; border-bottom: 1px solid rgba(255,255,255,.1); white-space: nowrap; }
.recap-table td { padding: 5px 3px; border-bottom: 1px solid rgba(255,255,255,.05); color: var(--text); white-space: nowrap; }
.recap-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.recap-note { margin: 7px 0 0; color: var(--dim); font-size: .66rem; line-height: 1.5; }
@media (max-width: 620px) {
  .modal { padding: 10px; align-items: flex-start; }
  .modal-card { padding: 22px 16px 18px; }
  .modal-actions { gap: 7px; }
  .modal-actions > button { flex: 1 1 40%; font-size: .8rem; min-height: 42px; }
  .recap-table { font-size: .62rem; }
}

/* ===== 技能卡棋盘选目标：只亮合法格，点格即出牌 ===== */
body.card-aiming #board .tile { cursor: crosshair; }
body.card-aiming #board .tile:not(.card-aim) { filter: brightness(.72) saturate(.62); }
#board .tile.card-aim {
  outline: 3px solid #f3b73f;
  outline-offset: -3px;
  z-index: 5;
  box-shadow: 0 0 0 3px rgba(243, 183, 63, .28), 0 0 24px rgba(243, 183, 63, .42);
  animation: cardAimPulse 1.15s ease-in-out infinite;
}
#board .tile.card-aim .tname { color: #ffe8a8; }
@keyframes cardAimPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(243, 183, 63, .24), 0 0 16px rgba(243, 183, 63, .28); }
  50% { box-shadow: 0 0 0 3px rgba(243, 183, 63, .45), 0 0 30px rgba(243, 183, 63, .55); }
}
html.calm #board .tile.card-aim { animation: none; }
@media (prefers-reduced-motion: reduce) {
  #board .tile.card-aim { animation: none; }
}

/* 手牌选中后的固定操作条 */
.hand-picked {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 7px 0 3px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.hand-picked .picked-text { flex: 1 1 100%; font-size: .74rem; color: var(--muted); }
.hand-picked .picked-text b { color: var(--gold); }
.hand-picked button { min-height: 40px; }
@media (max-width: 620px) {
  .hand-picked button { min-height: 44px; }
}

/* 操作条滚起来后，右下角浮出“当前主操作”，不用翻回去找 */
.quick-action {
  position: fixed;
  right: 12px;
  bottom: calc(var(--ops-h, 240px) + 10px);
  z-index: 33;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}
.quick-action[hidden] { display: none; }
.quick-action button {
  pointer-events: auto;
  min-height: 44px;
  padding: 0 17px;
  border-radius: 22px;
  border: 1px solid rgba(243, 183, 63, .6);
  background: linear-gradient(180deg, #2a2418, #17130b);
  color: #ffe8a8;
  font-size: .82rem;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .45), 0 0 0 2px rgba(243, 183, 63, .12);
}
@media (min-width: 981px) and (min-height: 561px) {
  .quick-action { display: none !important; }
}

/* 响应窗里可用的“推荐”牌 */
.ccard.rec {
  outline: 2px solid rgba(243, 183, 63, .72);
  outline-offset: 2px;
  box-shadow: 0 0 22px rgba(243, 183, 63, .18);
}

/* 拍卖：最小加价做成主按钮，其他档位退成小按钮 */
#auction .bid-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.18;
  padding: 10px 12px;
}
#auction .bid-main small {
  font-size: .69rem;
  font-weight: 400;
  opacity: .78;
}
#auction .bid-alt {
  padding: 6px 10px;
  font-size: .76rem;
  min-height: 34px;
}

/* 自救：一键凑够固定在按钮区顶部 */
#rescue .rescue-actions { flex-direction: column; }
#rescue #rescueQuick {
  width: 100%;
  min-height: 46px;
  font-size: .88rem;
}
#rescue #rescueQuick[hidden] { display: none; }

/* 商店：卡面区单独滚，结算条始终留在卡片底部 */
#shop .overlay-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#shop .card-row {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
#shop .overlay-actions {
  flex: 0 0 auto;
  margin-top: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(16, 23, 38, 0), rgba(16, 23, 38, .92) 30%);
}

/* ============================================================
   视觉样板：统一令牌 + 航海制图细节 + 卡牌/按钮/弹层质感
   ============================================================ */
:root {
  --font-display: "Songti SC", "STSong", "KaiTi", "STKaiti", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --font-ui: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --gold-1: #ffe8a8;
  --gold-2: #f3c45b;
  --gold-3: #c88f21;
  --ink-soft: #eaf7f3;
  --chart-line: rgba(205, 238, 235, .18);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

/* 标题用衬线，正文继续无衬线；数字统一等宽对齐 */
.isle-title,
.map-labels,
.map-chart-meta,
.overlay-card h2,
.modal-card h2 {
  font-family: var(--font-display);
}
.isle-title {
  letter-spacing: .24em;
  color: #f2fbf7;
  text-shadow: 0 2px 22px rgba(2, 9, 14, .8), 0 0 40px rgba(139, 216, 221, .08);
}
.isle-title small {
  font-family: var(--font-ui);
  letter-spacing: .5em;
  color: rgba(255, 232, 168, .82);
}
.map-labels,
.map-places,
.map-label-en,
.map-elev,
.map-landmark-labels {
  font-family: var(--font-display);
}
.map-labels {
  font-weight: 600;
  letter-spacing: 12px;
}
.map-places { text-shadow: 0 1px 4px rgba(255, 245, 218, .55); }
.map-labels text,
.map-places text,
.map-label-en text,
.map-landmark-labels text {
  paint-order: stroke;
  stroke: rgba(238, 224, 188, .82);
  stroke-width: 4px;
  stroke-linejoin: round;
}
.map-land { filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .38)); }
.map-waves { animation: mapWaves 24s ease-in-out infinite alternate; }
@keyframes mapWaves { from { transform: translate3d(-1%, 0, 0); } to { transform: translate3d(1%, 0, 0); } }
.map-rose { transform-box: view-box; transform-origin: 500px 500px; animation: mapRose 150s linear infinite; }
html.calm .map-waves, html.calm .map-rose { animation: none !important; }
.map-chart-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  margin-top: .1em;
  font-size: .54em;
  letter-spacing: .18em;
  color: rgba(185, 207, 212, .62);
  pointer-events: none;
}
.map-chart-meta i {
  width: .22em;
  height: .22em;
  border-radius: 50%;
  background: rgba(255, 232, 168, .5);
  display: inline-block;
}

/* 罗盘外圈刻度：不抢指针，只在边缘加一圈“仪器感” */
.map-compass::before {
  content: "";
  position: absolute;
  inset: -.38em;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(205, 238, 235, .55) 0 .7deg, transparent .7deg 15deg);
  -webkit-mask: radial-gradient(circle, transparent 0 58%, #000 59% 62%, transparent 63%);
  mask: radial-gradient(circle, transparent 0 58%, #000 59% 62%, transparent 63%);
  opacity: .55;
  pointer-events: none;
}

/* 主按钮：压一层内高光，金色往暖铜收，避免“塑料黄” */
button.primary {
  background: linear-gradient(180deg, var(--gold-1) 0%, var(--gold-2) 44%, var(--gold-3) 100%);
  border-color: rgba(255, 240, 190, .8);
  color: #2a1d04;
  letter-spacing: .03em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .65),
    inset 0 -1px 0 rgba(74, 44, 0, .28),
    0 7px 18px rgba(0, 0, 0, .34);
}
button.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #fff0bd 0%, #f8cf6c 44%, #d49a2b 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .75),
    inset 0 -1px 0 rgba(74, 44, 0, .24),
    0 9px 24px rgba(0, 0, 0, .4);
}
button.ghost {
  color: #aab9cf;
  border-color: rgba(205, 238, 235, .14);
}
button.ghost:hover:not(:disabled) {
  color: var(--ink-soft);
  background: rgba(205, 238, 235, .055);
  border-color: rgba(205, 238, 235, .25);
}

/* 弹层：顶部一条极细金线，像装订好的航海日志 */
.overlay-card,
.modal-card {
  position: relative;
  background: linear-gradient(168deg, #1b2840 0%, #101a2c 52%, #0b1320 100%);
  border: 1px solid rgba(205, 238, 235, .14);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, .58),
    inset 0 1px 0 rgba(255, 255, 255, .08);
}
.overlay-card::before,
.modal-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 13%;
  right: 13%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 232, 168, .58), transparent);
  pointer-events: none;
}

/* 手牌/商店卡：统一细金内框，不改变原有选中/禁用逻辑 */
.hcard,
.ccard {
  position: relative;
  border-color: rgba(255, 232, 168, .14);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, .44),
    inset 0 0 0 1px rgba(255, 255, 255, .035);
}
.hcard::before,
.ccard::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 232, 168, .16);
  pointer-events: none;
}
.hcard.sel,
.ccard.sel {
  border-color: rgba(255, 232, 168, .92);
}
.hcard.off,
.ccard.off {
  border-color: rgba(255, 255, 255, .07);
}

/* 金额与倒计时：等宽数字，侧栏/账本/拍卖对齐更稳 */
.cash,
.cprice,
.pot-line b,
.tmeta,
.recap-table .num,
.hud-round b,
#auction .bid-main,
#auction .bid-main small {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 620px) {
  .map-chart-meta { display: none; }
  .isle-title { letter-spacing: .18em; }
}
html.calm .map-compass::before { opacity: .35; }

/* 羊皮地图上的中心信息改为墨色，避免浅底白字发虚 */
#center .isle-title {
  color: #3a2d1d;
  text-shadow: 0 1px 0 rgba(255, 249, 230, .6);
}
#center .isle-title small {
  color: #6b5434;
  text-shadow: 0 1px 0 rgba(255, 249, 230, .5);
}
#center .map-compass {
  border-color: rgba(72, 55, 33, .42);
  background: radial-gradient(circle at 50% 46%, rgba(244, 230, 196, .82), rgba(222, 203, 163, .34) 70%);
  box-shadow: inset 0 0 16px rgba(90, 69, 39, .18), 0 2px 12px rgba(60, 44, 24, .12);
}
#center .map-compass span { color: #5b4628; }
#center .map-compass .cp-n { color: #7a3d26; }
#center .map-compass .cp-needle {
  background: linear-gradient(180deg, #7a3d26 0 50%, #2b5960 50% 100%);
  box-shadow: 0 0 6px rgba(60, 44, 24, .22);
}
#center .map-compass .cp-hub {
  background: #efe0b8;
  border-color: rgba(90, 70, 40, .7);
}
#center .map-where {
  color: #3a2d1d;
  background: rgba(239, 225, 190, .8);
  border-color: rgba(90, 70, 40, .35);
  text-shadow: none;
}
#center .map-where b { color: #7a3d26; }
#center .turn-line { color: #3a2d1d; text-shadow: none; }
#center .pot-line { color: #5b4a30; text-shadow: none; }
#center .isle-title { font-size: 1.64em; letter-spacing: .26em; }
#center .isle-title small { font-size: .32em; letter-spacing: .52em; }
#center .map-compass { width: 4.5em; height: 4.5em; }
#center .map-where { font-size: .8em; }
.map-forest { fill: #4c6741; }
.map-mountains { filter: drop-shadow(0 3px 2px rgba(52, 37, 20, .2)); }
.map-land { stroke: #6f5836; }
@media (max-width: 620px) {
  #center .isle-title { font-size: 1.1em; letter-spacing: .2em; }
  #center .map-compass { width: 3.8em; height: 3.8em; }
}

/* 完整卡面：卡图本身就是一张卡，不再裁成插画缩略图；
   也不在卡下面重复卡名/价格，避免一张卡出现两套字。 */
.hcard img,
.ccard img {
  aspect-ratio: 300 / 420;
  height: auto;
  object-fit: fill;
  object-position: 50% 50%;
  border-radius: 10px;
  filter: brightness(1.17) saturate(1.12) contrast(1.05);
}
.hcard::after,
.ccard::after {
  content: none;
  display: none;
}
.ccard .chead {
  display: none;
}
.hcard,
.ccard {
  border: 1px solid rgba(255, 232, 168, .22);
  border-radius: 12px;
  background: #080d17;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .1),
    0 14px 28px rgba(0, 0, 0, .52),
    0 2px 6px rgba(0, 0, 0, .5);
}
.hcard { width: 84px; }
.ccard { width: 136px; }
.hcard::before,
.ccard::before {
  background:
    linear-gradient(135deg, rgba(255, 232, 168, .5) 0 1px, transparent 1px) 5px 5px / 16px 16px no-repeat,
    linear-gradient(225deg, rgba(255, 232, 168, .5) 0 1px, transparent 1px) calc(100% - 5px) 5px / 16px 16px no-repeat,
    linear-gradient(45deg, rgba(255, 232, 168, .38) 0 1px, transparent 1px) 5px calc(100% - 5px) / 16px 16px no-repeat,
    linear-gradient(315deg, rgba(255, 232, 168, .38) 0 1px, transparent 1px) calc(100% - 5px) calc(100% - 5px) / 16px 16px no-repeat,
    linear-gradient(115deg, rgba(255, 255, 255, .12) 0%, transparent 26%, transparent 72%, rgba(255, 255, 255, .05) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 232, 168, .3),
    inset 0 -12px 22px rgba(0, 0, 0, .18);
}
.hcard::after,
.ccard::after {
  content: "";
  display: block;
  position: absolute;
  inset: 4px;
  z-index: 2;
  border: 1px solid rgba(255, 232, 168, .22);
  border-radius: 8px;
  background: none;
  pointer-events: none;
}
.hcard.sel::after,
.ccard.sel::after {
  border-color: rgba(255, 240, 190, .5);
}
.hcard.sel,
.ccard.sel {
  border-color: rgba(255, 232, 168, .95);
  box-shadow:
    0 0 0 3px rgba(243, 183, 63, .3),
    0 0 30px rgba(243, 183, 63, .16),
    0 16px 30px rgba(0, 0, 0, .55);
}

/* —— 手牌实体卡：小尺寸下补一条可读卡名，不遮插画主体 —— */
.hcard { position: relative; }
.hcard .hname {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  z-index: 2;
  padding: 3px 1px 2px;
  border-top: 1px solid rgba(243, 183, 63, .48);
  background: linear-gradient(180deg, rgba(8, 14, 24, .18), rgba(7, 12, 21, .94) 40%);
  color: #f6e7c2;
  font-family: var(--font-display);
  font-size: 9px;
  line-height: 1.1;
  letter-spacing: .1em;
  text-align: center;
  text-shadow: 0 1px 2px #000;
  pointer-events: none;
}
.hcard.sel .hname { color: #ffe9a8; border-top-color: rgba(255, 222, 150, .9); }
.hcard.off .hname { color: #9aa7b8; }

/* —— 手牌/商店卡：米色卡框，让深色插画变成实体卡 —— */
.hcard {
  padding: 3px;
  border: 1px solid #b78a4c;
  background: linear-gradient(180deg, #f4e7c9, #d9c29b);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, .5),
    inset 0 0 0 1px rgba(255, 248, 220, .55);
}
.hcard img {
  border-radius: 5px;
  filter: brightness(1.3) saturate(1.14) contrast(1.03);
}
.ccard img {
  border-radius: 5px;
  filter: brightness(1.42) saturate(1.25) contrast(1.04);
}
.hcard .hname {
  left: 3px;
  right: 3px;
  bottom: 3px;
  font-size: 8.5px;
}
/* ================= 纸币 / 地契 ================= */
.money-ov {
  z-index: 92;
  background: rgba(3, 8, 14, .78);
  backdrop-filter: blur(4px);
}
.money-card {
  width: min(94vw, 520px);
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(243, 183, 63, .12), transparent 55%),
    linear-gradient(165deg, #172236, #0b1018 72%);
  border-color: rgba(243, 183, 63, .35);
}
.money-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.money-kind {
  font-size: .78rem;
  letter-spacing: .12em;
  color: #d8c9a4;
}
.money-kind.receive { color: #9fe0b0; }
.money-amount {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold-1, #f3b73f);
  font-variant-numeric: tabular-nums;
}
.money-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-height: 90px;
  max-height: 42dvh;
  overflow-y: auto;
  padding: 2px;
  overscroll-behavior: contain;
}
.banknote {
  position: relative;
  min-height: 72px;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid rgba(17, 22, 28, .32);
  color: #1b2226;
  text-align: left;
  font-family: var(--font-display);
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .28), inset 0 0 0 1px rgba(255, 255, 255, .3);
  transition: transform .12s, box-shadow .12s;
}
button.banknote { appearance: none; }
.banknote b { display: block; font-size: 1.15rem; line-height: 1.15; }
.banknote span { display: block; margin-top: 3px; font-size: .66rem; letter-spacing: .16em; opacity: .72; }
.banknote small {
  position: absolute;
  right: 8px;
  bottom: 6px;
  font-family: system-ui, sans-serif;
  font-size: .66rem;
  opacity: .75;
}
.banknote.picked {
  outline: 2px solid #f3b73f;
  outline-offset: 2px;
  transform: translateY(-2px);
  box-shadow: 0 7px 18px rgba(0, 0, 0, .4), 0 0 0 1px rgba(243, 183, 63, .5);
}
.note-5000 { background: linear-gradient(145deg, #f0d9a0, #d8b56a); }
.note-2000 { background: linear-gradient(145deg, #d7e2c8, #adc79a); }
.note-1000 { background: linear-gradient(145deg, #d9e4ee, #a9c3d6); }
.note-500 { background: linear-gradient(145deg, #ead5dc, #cfa7b3); }
.note-200 { background: linear-gradient(145deg, #efe2c4, #d1b98c); }
.note-100 { background: linear-gradient(145deg, #dfe5e6, #b8c6c9); }
.note-50 { background: linear-gradient(145deg, #e7dcef, #c2b0d2); }
.money-total {
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid rgba(243, 183, 63, .18);
  background: rgba(243, 183, 63, .06);
  color: #cfd6df;
  font-size: .82rem;
  text-align: center;
}
.money-total b { color: var(--gold-1, #f3b73f); font-variant-numeric: tabular-nums; }
.money-actions { flex-wrap: wrap; }

.deed-ov {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(3, 8, 14, .8);
  backdrop-filter: blur(5px);
}
.deed-paper {
  width: min(92vw, 360px);
  max-height: 88dvh;
  overflow-y: auto;
  position: relative;
  padding: 24px 22px 18px;
  color: #25302b;
  background:
    radial-gradient(100% 80% at 50% 0%, rgba(255, 255, 255, .35), transparent 58%),
    repeating-linear-gradient(0deg, rgba(90, 66, 30, .035) 0 1px, transparent 1px 4px),
    #efe3c8;
  border: 1px solid #b89a5e;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55), inset 0 0 0 4px rgba(184, 154, 94, .18);
  transform: rotate(-.5deg);
  font-family: var(--font-display);
}
.deed-paper::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(104, 80, 42, .4);
  pointer-events: none;
}
.deed-kicker {
  font-size: .62rem;
  letter-spacing: .24em;
  color: #7d6846;
  text-align: center;
}
.deed-title {
  margin-top: 8px;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: .08em;
  color: #22352c;
  text-align: center;
}
.deed-sub {
  margin-top: 3px;
  font-size: .7rem;
  letter-spacing: .14em;
  color: #7d6846;
  text-align: center;
}
.deed-rule {
  height: 1px;
  margin: 14px 0 12px;
  background: linear-gradient(90deg, transparent, #a98c56 18%, #a98c56 82%, transparent);
}
.deed-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 12px;
  font-size: .78rem;
}
.deed-grid span { display: block; color: #8a7350; font-size: .62rem; letter-spacing: .1em; }
.deed-grid b { display: block; margin-top: 2px; font-size: .9rem; color: #2b3a31; }
.deed-stamp {
  position: absolute;
  right: 20px;
  top: 72px;
  padding: 7px 9px;
  border: 2px solid rgba(155, 58, 48, .55);
  border-radius: 4px;
  color: rgba(155, 58, 48, .7);
  font-family: system-ui, sans-serif;
  font-size: .58rem;
  line-height: 1.25;
  letter-spacing: .1em;
  text-align: center;
  transform: rotate(-11deg);
  opacity: .9;
}
.deed-foot {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px dashed rgba(125, 104, 70, .45);
  color: #8a7350;
  font-size: .58rem;
  line-height: 1.5;
  text-align: center;
}
.deed-close {
  position: relative;
  z-index: 2;
  width: 100%;
  margin-top: 14px;
  min-height: 40px;
  color: #17130b !important;
}
@media (max-width: 620px) {
  .money-card { gap: 8px; }
  .money-notes { max-height: 36dvh; }
  .banknote { min-height: 62px; padding: 7px 9px; }
  .banknote b { font-size: .98rem; }
  .deed-paper { width: min(94vw, 340px); padding: 20px 18px 14px; }
  .deed-title { font-size: 1.4rem; }
  .deed-stamp { right: 14px; top: 65px; }
}
html.calm .banknote,
html.calm .deed-paper {
  transition: none;
  transform: none;
}
.cash.hidden-cash {
  opacity: .62;
  letter-spacing: .04em;
  font-family: var(--font-display);
}

/* —— 雾潮短局（40 圈） —— */
.fog-panel{display:flex;flex-direction:column;gap:6px;padding:8px 10px;border:1px solid rgba(243,183,63,.22);border-radius:12px;background:linear-gradient(180deg,rgba(12,30,38,.86),rgba(8,20,28,.9));color:#dce9e3;font-size:.72rem}
.fog-head{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#a9e3cc}
.fog-head b{font-family:var(--font-display,serif);color:#f3d38a;font-size:.86rem}
.fog-head span{font-size:.64rem;opacity:.82}
.fog-mine{color:#f3d38a}
.fog-tasks{display:flex;flex-direction:column;gap:4px}
.fog-task{padding:5px 6px;border-radius:8px;background:rgba(255,255,255,.045)}
.fog-task b{display:block;color:#f0e4c6;font-size:.7rem}
.fog-task small{display:block;opacity:.72;line-height:1.35;font-size:.62rem}
.fog-secret{display:flex;flex-direction:column;gap:4px;padding:5px 6px;border-radius:8px;background:rgba(243,183,63,.08)}
.fog-secret b{color:#f3d38a;font-size:.68rem}
.fog-secret small{opacity:.75;line-height:1.35;font-size:.62rem}
.fog-secret-btn{text-align:left;font-size:.64rem!important;min-height:34px!important;white-space:normal!important}
.fog-secret.done{background:rgba(120,200,150,.08)}
.fog-dikes{display:flex;flex-direction:column;gap:4px}
.fog-dikes b{color:#9fd7ec;font-size:.68rem}
.fog-dikes small{opacity:.68;font-size:.61rem}
.fog-dikes .ghost{min-height:34px!important;font-size:.64rem!important}
.tile.flooded{filter:saturate(.55) brightness(.82)}
.tile.flooded::after{content:'🌊';position:absolute;right:3px;bottom:2px;font-size:11px;z-index:4;opacity:.9;pointer-events:none}
.tile.dike::before{content:'🧱';position:absolute;left:3px;bottom:2px;font-size:9px;z-index:4;pointer-events:none}
.tag.fog-anchor{background:rgba(80,180,150,.18);color:#a9e3cc;border-color:rgba(120,220,190,.35)}
html.calm .fog-panel{background:rgba(10,22,30,.95)}
@media(max-width:620px){
  .fog-panel{padding:6px 8px;gap:5px;max-height:132px;overflow-y:auto}
  .fog-secret-btn{min-height:38px!important}
}

/* —— 地契夹 —— */
.deed-box-ov{position:fixed;inset:0;z-index:96;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(3,8,14,.82);backdrop-filter:blur(6px)}
.deed-box{width:min(94vw,760px);max-height:88dvh;display:flex;flex-direction:column;gap:12px;padding:16px;border:1px solid rgba(243,183,63,.3);border-radius:16px;background:linear-gradient(180deg,#1a1710,#0d0c09);box-shadow:0 24px 60px rgba(0,0,0,.6)}
.deed-box-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.deed-box-head h2{margin:0;font-family:var(--font-display);font-size:1.18rem;color:#f3d38a}
.deed-box-head h2 small{font-family:system-ui,sans-serif;font-size:.7rem;color:#b9ad91;font-weight:400;margin-left:6px}
.deed-box-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;overflow-y:auto;padding:2px;overscroll-behavior:contain}
.deed-box-empty{grid-column:1/-1;padding:28px 10px;text-align:center;color:#9aa6b5}
.deed-mini{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:12px 13px 11px;border:1px solid color-mix(in srgb,var(--deed-color,#c9a35b) 55%,#5a4a2d);border-radius:10px;background:linear-gradient(145deg,rgba(243,232,203,.95),rgba(218,201,164,.9));color:#2a2117;text-align:left;cursor:pointer;box-shadow:0 5px 12px rgba(0,0,0,.3),inset 0 0 0 3px rgba(255,250,230,.35);transition:transform .14s,box-shadow .14s}
.deed-mini::before{content:'';position:absolute;left:8px;right:8px;top:5px;height:2px;background:var(--deed-color,#c9a35b);opacity:.7}
.deed-mini:hover{transform:translateY(-2px);box-shadow:0 9px 18px rgba(0,0,0,.4),inset 0 0 0 3px rgba(255,250,230,.45)}
.deed-mini-kicker{font-size:.52rem;letter-spacing:.2em;color:#6f5b3d}
.deed-mini b{font-family:var(--font-display);font-size:1.04rem;line-height:1.1}
.deed-mini span{font-size:.64rem;color:#6f5b3d}
.deed-mini em{font-style:normal;font-size:.64rem;color:#4a3a26}
.deed-mini small{font-size:.58rem;color:#7b6748}
@media(max-width:620px){
  .deed-box{padding:12px;max-height:86dvh}
  .deed-box-grid{grid-template-columns:1fr 1fr;gap:8px}
  .deed-mini{padding:10px 10px 9px}
  .deed-mini b{font-size:.92rem}
  .deed-mini span,.deed-mini em{font-size:.58rem}
  .deed-open-btn{min-width:44px;min-height:32px}
}

/* ———————————————— 地契契约 / 岛民会议 */
.trade-card { width: min(540px, 94vw); }
.trade-body { display: flex; flex-direction: column; gap: 10px; }
.trade-offer { display: flex; flex-direction: column; gap: 6px; }
.trade-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 9px; border-radius: 9px; background: rgba(255,255,255,.045); }
.trade-line span { color: var(--muted, #9fb0c4); }
.trade-line b { color: #f3d99a; font-weight: 600; }
.trade-form { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 12px; }
.trade-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.trade-field > span { font-size: .72rem; color: var(--muted, #9fb0c4); }
.trade-field select, .trade-field input { width: 100%; min-height: 38px; border-radius: 8px; border: 1px solid rgba(255,255,255,.14); background: #101b2a; color: #f4ead2; padding: 0 8px; }
.trade-actions { justify-content: flex-end; }
.council-card { width: min(560px, 94vw); }
.council-left { color: #f3b73f; font-variant-numeric: tabular-nums; }
.council-body { display: flex; flex-direction: column; gap: 12px; }
.council-issue { border: 1px solid rgba(243,183,63,.22); border-radius: 12px; padding: 10px 12px; background: rgba(255,255,255,.035); }
.council-issue b { color: #f3d99a; }
.council-issue p { margin: 5px 0 9px; font-size: .8rem; color: #c8d4e2; line-height: 1.45; }
.council-actions { justify-content: flex-end; }
@media (max-width: 620px) {
  .trade-form { grid-template-columns: 1fr; }
  .trade-card, .council-card { width: calc(100vw - 24px); max-height: 82dvh; overflow-y: auto; }
  .trade-field select, .trade-field input { min-height: 44px; }
  .council-actions .btn { min-height: 44px; }
}

/* —— 纸币票面与地契配图 —— */
.banknote { overflow: hidden; isolation: isolate; }
.banknote b, .banknote span { position: relative; z-index: 1; }
.banknote b { max-width: 64%; }
.banknote small { z-index: 1; }
.note-art {
  position: absolute;
  right: -10px;
  top: 50%;
  width: 66%;
  height: 128%;
  transform: translateY(-50%);
  object-fit: contain;
  z-index: 0;
  opacity: .96;
  mix-blend-mode: multiply;
  pointer-events: none;
  user-select: none;
}
.deed-paper {
  background:
    url('/art/deed-paper.svg') center / 100% 100% no-repeat,
    radial-gradient(100% 80% at 50% 0%, rgba(255, 255, 255, .35), transparent 58%),
    repeating-linear-gradient(0deg, rgba(90, 66, 30, .035) 0 1px, transparent 1px 4px),
    #efe3c8;
}
.deed-crest {
  display: block;
  width: 92px;
  height: auto;
  margin: -2px auto 4px;
  opacity: .92;
  mix-blend-mode: multiply;
  pointer-events: none;
}
@media (max-width: 620px) {
  .note-art { right: -14px; width: 72%; height: 136%; }
  .deed-crest { width: 74px; }
}
.banknote small {
  background: rgba(255, 250, 236, .72);
  padding: 1px 4px;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(90, 66, 30, .08);
}
