/* =====================================================================
 * 吞食天下 · 三国大富翁  ——  样式
 * 视觉：宣纸底 + 墨线 + 朱红印章，全部由 CSS 渐变/边框绘制，无任何图片资源。
 * 布局：100dvh 三段式（玩家条 / 棋盘 / 隐藏决策面板），棋盘取 min(宽,高) 正方形，
 *      保证 360×640 ~ 430×932 竖屏不溢出，横屏亦能居中显示。
 * ===================================================================== */

:root {
  --paper: #f6eddb;
  --paper-2: #eee1c6;
  --paper-3: #e2d2b1;
  --ink: #2a2720;
  --ink-soft: #5f5847;
  --ink-faint: #8d8574;
  --line: rgba(42, 39, 32, .22);
  --red: #a8342a;
  --red-2: #c2453a;
  --red-dark: #7f231b;
  --green: #245840;
  --gold: #a8792c;
}

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

/* 所有可点元素统一吃掉老 iOS 的 300ms 点击延迟 */
button { touch-action: manipulation; font-family: inherit; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 0%, #fffaf0 0%, rgba(255, 250, 240, 0) 58%),
    radial-gradient(circle at 84% 100%, #eddfc0 0%, rgba(237, 223, 192, 0) 55%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  user-select: none;
  -webkit-user-select: none;
}

/* 宣纸纤维纹理（纯 CSS，无图片） */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(120, 100, 60, .035) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(0deg, rgba(120, 100, 60, .025) 0 1px, transparent 1px 5px);
}

/* ---------------------------------------------------------------- 骨架 */
.app {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) 8px 0;
  overflow: hidden;
}

.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 28px;
  padding: 0 2px;
}

.brand {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--ink);
}
.brand em {
  font-style: normal;
  font-weight: 500;
  font-size: 9.5px;
  letter-spacing: .1em;
  color: var(--ink-faint);
  margin-left: 5px;
}

.top-actions { display: flex; gap: 6px; }

.mini {
  font-family: inherit;
  font-size: 11px;
  color: var(--ink-soft);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 246, .7);
  transition: background .12s;
}
.mini:active { background: var(--paper-3); }

/* ------------------------------------------------------------ 玩家条 */
.players {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 3px 1px 5px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.players::-webkit-scrollbar { display: none; }

.pcard {
  position: relative;
  flex: 1 1 0;
  min-width: 74px;
  max-width: 150px;
  padding: 4px 6px 4px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: linear-gradient(180deg, #fffdf6, #f2e7cf);
  overflow: hidden;
  transition: box-shadow .18s, background .18s, opacity .3s;
}
.pcard::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--c, #888);
}
.pcard.active {
  box-shadow: 0 0 0 2px var(--c, #888), 0 2px 9px rgba(60, 40, 10, .18);
  background: linear-gradient(180deg, #fffefa, #f8edd7);
}
.pcard.dead { opacity: .35; filter: grayscale(.75); }

.pc-top { display: flex; align-items: center; gap: 3px; }
.pc-char {
  flex: 0 0 auto;
  width: 15px; height: 15px;
  border-radius: 3px;
  background: var(--c, #888);
  color: #fff8e8;
  font-size: 10px;
  line-height: 15px;
  text-align: center;
  font-weight: 700;
}
.pc-name {
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-shield {
  margin-left: auto;
  font-size: 8.5px;
  line-height: 12px;
  padding: 0 3px;
  border-radius: 3px;
  background: var(--gold);
  color: #fffdf5;
  font-weight: 700;
  flex: 0 0 auto;
}
.pc-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 1px;
}
.pc-gold {
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.pc-city { font-size: 9px; color: var(--ink-faint); }

/* -------------------------------------------------------------- 棋盘 */
/* 高度由 JS 精确分配：棋盘区（居中正方形）+ 战报条（吸收剩余高度） */
.board-stage {
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 0 0;
  overflow: hidden;
}

.board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(7, 1fr);
  width: 320px;
  height: 320px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background:
    linear-gradient(158deg, rgba(255, 255, 255, .65), rgba(255, 255, 255, 0) 52%),
    var(--paper-2);
  box-shadow: 0 3px 16px rgba(70, 50, 20, .2), inset 0 0 0 3px rgba(255, 255, 255, .55);
  overflow: hidden;
  touch-action: manipulation;
}

/* ---- 格子 ---- */
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* 城名靠上、数值靠下，中间留出棋子站位，避免棋子压住文字 */
  justify-content: space-between;
  padding: 2px 1px 3px;
  overflow: hidden;
  text-align: center;
  border: 1px solid rgba(42, 39, 32, .14);
  background: linear-gradient(180deg, #fffdf5, #f1e5cd);
}
.tile.ty-start  { background: linear-gradient(180deg, #fdf0cc, #e9d7a4); }
.tile.ty-jail   { background: linear-gradient(180deg, #e9e4d8, #d5cebc); }
.tile.ty-chance { background: linear-gradient(180deg, #eef4e6, #dbe7c9); }
.tile.ty-event  { background: linear-gradient(180deg, #fbe7dd, #f1d2c4); }
.tile.ty-camp   { background: linear-gradient(180deg, #e7eef1, #d0dce2); }
.tile.corner    { border-width: 1.5px; }
/* 四个角落做成「大格」：双线框 + 更大字号，在统一网格里做出规格感 */
.tile.corner    { box-shadow: inset 0 0 0 2px rgba(42, 39, 32, .12); }
.tile.corner .t-name { letter-spacing: .02em; }

.t-name,
.t-sub { position: relative; z-index: 2; }

.t-name {
  font-size: calc(var(--cell, 46px) * .225);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.02em;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.tile.corner .t-name { font-size: calc(var(--cell, 46px) * .26); }

.t-sub {
  margin-top: 1px;
  font-size: calc(var(--cell, 46px) * .175);
  line-height: 1.05;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 归属表现：淡色底 + 右上角旗角 + 底部色条 */
.tile.owned::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--own, transparent);
  opacity: .11;
  z-index: 0;
  pointer-events: none;
}
.tile.owned::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 0; height: 0;
  border-top: calc(var(--cell, 46px) * .3) solid var(--own, transparent);
  border-left: calc(var(--cell, 46px) * .3) solid transparent;
  z-index: 3;
  pointer-events: none;
}
.tile.owned > .t-sub { color: var(--own, var(--ink-soft)); font-weight: 800; }

/* 当前落点闪光 */
.tile.hit { animation: hit .5s ease-out; }
@keyframes hit {
  0%   { box-shadow: inset 0 0 0 2px var(--red-2); }
  100% { box-shadow: inset 0 0 0 2px rgba(194, 69, 58, 0); }
}

/* ---- 棋子层 ---- */
.pieces {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}
.piece {
  position: absolute;
  left: 0; top: 0;
  width: var(--psize, 18px);
  height: var(--psize, 18px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(var(--psize, 18px) * .6);
  font-weight: 800;
  color: #fff8e8;
  background: #888;
  box-shadow: 0 0 0 1.5px rgba(255, 250, 235, .92), 0 1px 4px rgba(0, 0, 0, .35);
  transition: transform .12s linear;
  will-change: transform;
}
.piece.no-tr { transition: none; }
.piece.jump  { transition: transform .26s cubic-bezier(.3, .9, .3, 1); }

/* ---- 中央控制台 ---- */
.hub {
  grid-area: 2 / 2 / 7 / 7;
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--cell, 46px) * .17);
  padding: calc(var(--cell, 46px) * .16) calc(var(--cell, 46px) * .2);
  overflow: hidden;
  border: 1px solid rgba(42, 39, 32, .16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 34%, #fffdf6 0%, #f4e9d3 68%, #e8dcc0 100%);
  box-shadow: inset 0 0 22px rgba(150, 120, 70, .16);
}
.hub::before {
  content: '漢';
  position: absolute;
  font-size: calc(var(--cell, 46px) * 2.7);
  font-weight: 800;
  line-height: 1;
  color: rgba(168, 52, 42, .055);
  pointer-events: none;
  z-index: 0;
}
.hub > * { position: relative; z-index: 1; }

.hub-turn {
  font-size: calc(var(--cell, 46px) * .2);
  line-height: 1.25;
  color: var(--ink-soft);
  text-align: center;
  letter-spacing: .01em;
}
.hub-turn b { color: var(--c, var(--ink)); font-weight: 800; }
.hub-turn span { color: var(--ink-faint); }

/* 骰子 */
.dice {
  width: calc(var(--cell, 46px) * 1.32);
  height: calc(var(--cell, 46px) * 1.32);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
  padding: calc(var(--cell, 46px) * .14);
  border: 1.5px solid var(--ink);
  border-radius: calc(var(--cell, 46px) * .18);
  background: linear-gradient(158deg, #fffdf8, #efe2c8);
  box-shadow: 0 2px 0 rgba(42, 39, 32, .22), inset 0 1px 0 #fff;
}
.dice i { border-radius: 50%; background: transparent; }
.dice i.on { background: var(--ink); box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .22); }
.dice.blank i.on { background: var(--ink-faint); opacity: .35; }
.dice.rolling { animation: shake .26s linear infinite; }
.dice.settle  { animation: pop .24s ease-out; }
@keyframes shake {
  0%   { transform: rotate(-7deg) scale(1); }
  50%  { transform: rotate(7deg) scale(1.07); }
  100% { transform: rotate(-7deg) scale(1); }
}
@keyframes pop {
  0%   { transform: scale(1.16); }
  100% { transform: scale(1); }
}

/* 掷骰按钮（拇指可达，最小 54px） */
.roll-btn {
  width: 100%;
  max-width: calc(var(--cell, 46px) * 3.2);
  min-height: 54px;
  font-family: inherit;
  font-size: calc(var(--cell, 46px) * .38);
  font-weight: 800;
  letter-spacing: .18em;
  text-indent: .18em;
  color: #fff6e2;
  border: none;
  border-radius: calc(var(--cell, 46px) * .2);
  background: linear-gradient(180deg, var(--red-2), var(--red));
  box-shadow: 0 3px 0 var(--red-dark), 0 5px 14px rgba(120, 40, 30, .28);
  transition: transform .07s, box-shadow .07s, opacity .16s, background .16s;
}
.roll-btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--red-dark), 0 2px 6px rgba(120, 40, 30, .28);
}
.roll-btn:disabled {
  opacity: .42;
  background: linear-gradient(180deg, #9d9687, #7d776a);
  box-shadow: 0 3px 0 #5e594f;
}

/* ---------------------------------------------------- 战报（竹简条） */
.logbar {
  flex: 0 0 auto;
  min-height: 56px;
  max-height: 300px;
  display: flex;
  gap: 7px;
  margin-top: 4px;
  padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
  border: 1px solid var(--line);
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, rgba(255, 253, 246, .9), rgba(240, 228, 203, .95));
  overflow: hidden;
}

/* 决策面板滑出时淡出战报，避免露出被面板遮住的半截文字 */
body.sheet-open .logbar { opacity: 0; }
.logbar { transition: opacity .2s; }

.lb-tag {
  flex: 0 0 auto;
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: .22em;
  font-size: 10px;
  font-weight: 800;
  color: var(--gold);
  border-right: 1px solid var(--line);
  padding-right: 6px;
}

.lb-lines {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1px;
  overflow: hidden;
  font-size: 11.5px;
  line-height: 1.38;
  color: var(--ink-soft);
}
.lb-lines .lg {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 8px;
  position: relative;
}
.lb-lines .lg::before {
  content: '';
  position: absolute;
  left: 1px;
  top: .52em;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: .55;
}
.lb-lines .lg:last-child { animation: fadeIn .22s ease-out; }
.lb-lines .gold { color: var(--gold); }
.lb-lines .warn { color: #8a5a1a; }
.lb-lines .bad  { color: var(--red); }
.lb-lines .card { color: var(--green); }
.lb-lines .event{ color: #96502c; }
.lb-lines .turn { color: var(--ink); font-weight: 700; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------- 底部决策面板 */
.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  padding: 0 8px;
  transform: translateY(108%);
  transition: transform .26s cubic-bezier(.2, .9, .25, 1);
  pointer-events: none;
}
.sheet.open { transform: translateY(0); pointer-events: auto; }

.sheet-card {
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(180deg, #fffdf6, #f4e8d0);
  box-shadow: 0 -6px 26px rgba(70, 50, 20, .24);
}
.sh-title { font-size: 15px; font-weight: 800; letter-spacing: .01em; }
.sh-desc {
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.sh-desc b { color: var(--ink); font-variant-numeric: tabular-nums; }
.tag-hot { color: var(--red); font-weight: 700; }

.sh-actions { display: flex; gap: 8px; margin-top: 10px; }

.btn {
  flex: 1;
  min-height: 50px;
  padding: 0 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fffdf6;
  transition: transform .07s, box-shadow .07s, opacity .16s;
}
.btn.primary {
  color: #fff6e2;
  border-color: var(--red-dark);
  background: linear-gradient(180deg, var(--red-2), var(--red));
  box-shadow: 0 3px 0 var(--red-dark);
}
.btn.primary:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 0 0 var(--red-dark); }
.btn.ghost {
  color: var(--ink-soft);
  background: linear-gradient(180deg, #fbf6e9, #efe2c8);
  box-shadow: 0 3px 0 #d5c6a6;
}
.btn.ghost:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 0 0 #d5c6a6; }
.btn:disabled { opacity: .42; }
.btn.wide { width: 100%; margin-top: 14px; flex: none; }

/* --------------------------------------------------- 飘字 / 锦囊横幅 */
.floats {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  overflow: hidden;
}
.float {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 #fffdf5, 0 0 9px rgba(255, 253, 245, .95);
  animation: floatUp .95s cubic-bezier(.2, .8, .3, 1) forwards;
}
.float.up   { color: var(--green); }
.float.down { color: var(--red); }
@keyframes floatUp {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.72); }
  22%  { opacity: 1; transform: translate(-50%, -122%) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -250%) scale(1); }
}

.banner {
  position: fixed;
  left: 50%;
  top: 36%;
  min-width: 176px;
  max-width: 78vw;
  padding: 12px 18px;
  text-align: center;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: linear-gradient(180deg, #fffdf6, #f2e4c8);
  box-shadow: 0 10px 30px rgba(50, 35, 10, .3);
  opacity: 0;
  transform: translate(-50%, -50%) scale(.86);
  transition: opacity .2s ease-out, transform .2s ease-out;
}
.banner.in { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.bn-kind {
  font-size: 9px;
  letter-spacing: .32em;
  text-indent: .32em;
  color: var(--gold);
  font-weight: 700;
}
.bn-title { font-size: 18px; font-weight: 800; margin: 2px 0 4px; letter-spacing: .02em; }
.bn-text { font-size: 11px; line-height: 1.42; color: var(--ink-soft); }

/* ------------------------------------------------------------ 遮罩层 */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 250, 235, .98), rgba(236, 223, 195, .99));
}
.overlay.hidden { display: none; }

.ov-card {
  width: 100%;
  max-width: 400px;
  margin: auto;
  padding: 18px 16px 16px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: linear-gradient(180deg, #fffdf7, #f5e9d1);
  box-shadow: 0 12px 42px rgba(60, 40, 10, .26);
}
.ov-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: .16em;
  text-indent: .16em;
  text-align: center;
  color: var(--ink);
}
.ov-sub {
  margin-top: 4px;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: .06em;
  color: var(--ink-faint);
}
.ov-foot {
  margin-top: 10px;
  text-align: center;
  font-size: 9.5px;
  color: var(--ink-faint);
  letter-spacing: .04em;
}

.field { margin-top: 14px; }
.f-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--ink-faint);
  margin-bottom: 5px;
}

.seg { display: flex; gap: 6px; }
.seg button {
  flex: 1;
  min-height: 44px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #fffdf6, #f1e5cb);
  transition: background .14s, color .14s, box-shadow .14s;
}
.seg button.on {
  color: #fff8e8;
  border-color: var(--ink);
  background: linear-gradient(180deg, #40513f, var(--green));
  box-shadow: 0 2px 0 rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .18);
}

.herogrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.hero {
  display: grid;
  grid-template-columns: 26px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 7px;
  min-height: 46px;
  padding: 5px 7px;
  text-align: left;
  font-family: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #fffdf6, #f1e5cb);
  transition: box-shadow .14s, background .14s;
}
.hero .hc {
  grid-row: 1 / 3;
  width: 26px; height: 26px;
  border-radius: 5px;
  background: linear-gradient(180deg, #6a5f4a, #3f3a2c);
  color: #fff8e8;
  font-size: 14px;
  font-weight: 800;
  line-height: 26px;
  text-align: center;
}
.hero .hn { font-size: 12.5px; font-weight: 800; color: var(--ink); }
.hero .hp { font-size: 9px; color: var(--ink-faint); letter-spacing: -.01em; }
.hero.on {
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(168, 52, 42, .28), 0 2px 8px rgba(120, 40, 30, .16);
  background: linear-gradient(180deg, #fffaf0, #f6e6cd);
}
.hero.on .hc { background: linear-gradient(180deg, var(--red-2), var(--red)); }

/* 结算排名 */
.rank {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  counter-reset: rk;
}
.rank .rk {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  margin-bottom: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #fffdf6, #f2e8d2);
}
.rank .rk.first {
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(168, 52, 42, .2);
  background: linear-gradient(180deg, #fffaf0, #f7e8cf);
}
.rk-i {
  width: 20px; height: 20px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ink);
  color: #fff8e8;
  font-size: 11px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
}
.rk.first .rk-i { background: var(--red); }
.rk-n {
  flex: 1 1 auto;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.rk-n em {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 500;
  color: var(--ink-faint);
}
.rk-v {
  font-size: 14px;
  font-weight: 800;
  color: var(--c, var(--ink));
  font-variant-numeric: tabular-nums;
}

/* 规则正文 */
.ov-card h4 {
  margin: 14px 0 4px;
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--red);
}
.ov-card p {
  margin: 0 0 6px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.ov-card p b { color: var(--ink); }

/* --------------------------------------------------------- 响应式兜底 */
@media (max-height: 560px) {
  .topbar { height: 22px; }
  .brand { font-size: 11px; }
  .pcard { min-width: 66px; padding: 3px 5px 3px 7px; }
  .pc-gold { font-size: 11px; }
  .ov-title { font-size: 22px; }
}

@media (orientation: landscape) {
  .players { flex-wrap: wrap; overflow-x: hidden; }
  .pcard { max-width: none; flex: 1 1 68px; }
  .brand em { display: none; }
}

/* 横屏矮屏：决策面板改成一条紧凑横条，别把棋盘挤没了 */
@media (orientation: landscape) and (max-height: 520px) {
  .sheet-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  }
  .sheet-card > .sh-title { flex: 0 0 auto; font-size: 13px; }
  .sheet-card > .sh-desc { flex: 1 1 auto; margin-top: 0; font-size: 10.5px; line-height: 1.35; }
  .sh-actions { flex: 0 0 48%; margin-top: 0; }
  .btn { min-height: 42px; font-size: 13px; }
}

/* 减少动效偏好：关掉非必要动画 */
@media (prefers-reduced-motion: reduce) {
  .dice.rolling, .float, .hub-log .lg, .tile.hit { animation: none; }
  .sheet, .board-stage, .banner { transition-duration: .01s; }
}
