:root {
  --bg-0: #071510;
  --bg-1: #0b2019;
  --panel: #102b22;
  --panel-2: #15392e;
  --gold: #d8b45a;
  --gold-bright: #f0d183;
  --gold-dim: rgba(216, 180, 90, .28);
  --cream: #f5efdf;
  --paper: #f7f1df;
  --ink: #1e2d25;
  --muted: #8ea89a;
  --line: rgba(216, 180, 90, .16);
  --red: #b93b31;
  --green: #2f9e63;
  --board-size: min(calc(100vh - 136px), 840px);
  --board-size: min(calc(100dvh - 136px), 840px);
  --shadow: 0 24px 70px rgba(0, 0, 0, .45);
  --serif: Georgia, "Songti SC", "Sitka Text", "Times New Roman", serif;
  --sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--cream);
  font-family: var(--sans);
  background:
    radial-gradient(ellipse at 52% -12%, rgba(216, 180, 90, .18), transparent 55%),
    radial-gradient(ellipse at 6% 58%, rgba(37, 114, 86, .28), transparent 48%),
    radial-gradient(ellipse at 96% 90%, rgba(118, 80, 26, .12), transparent 50%),
    linear-gradient(155deg, #081813 0%, #0a1e17 48%, #050f0b 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .32;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .09) 0 1px, transparent 1px 5px);
  z-index: 0;
}

button, input, select { font: inherit; }
button { user-select: none; }

.page {
  position: relative;
  z-index: 1;
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 0 20px 26px;
}

/* ---------------- 顶栏 ---------------- */

.topbar {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 13px; min-width: 0; }

.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid rgba(216, 180, 90, .62);
  background:
    linear-gradient(145deg, rgba(216, 180, 90, .24), rgba(8, 24, 18, .65)),
    #0d261d;
  box-shadow: inset 0 0 0 3px rgba(8, 20, 15, .55), 0 8px 22px rgba(0, 0, 0, .3);
  transform: rotate(-3deg);
}

.brand-mark span {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--gold-bright);
  line-height: 1;
}

.brand-text h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: .05em;
  color: #f7eccb;
  line-height: 1.15;
  white-space: nowrap;
}

.brand-en {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: .32em;
  color: var(--gold);
  margin-left: 4px;
  vertical-align: 2px;
}

.brand-text p {
  margin: 3px 0 0;
  font-size: 10px;
  letter-spacing: .22em;
  color: #7e9788;
  text-transform: uppercase;
}

.top-actions { display: flex; gap: 8px; }

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .04em;
  cursor: pointer;
  transition: transform .12s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease, opacity .16s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.2;
}

.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .38; cursor: not-allowed; filter: saturate(.55); }

.btn-primary {
  color: #251a07;
  background: linear-gradient(180deg, #f0d183 0%, #d8b45a 52%, #bf9438 100%);
  border-color: #f7e3a7;
  box-shadow: 0 6px 18px rgba(216, 180, 90, .22), inset 0 1px 0 rgba(255, 255, 255, .55);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .28);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #f7df9b 0%, #e3c168 55%, #c79d42 100%);
  box-shadow: 0 9px 24px rgba(216, 180, 90, .3), inset 0 1px 0 rgba(255, 255, 255, .65);
}

.btn-ghost {
  color: #d9cba3;
  background: rgba(255, 255, 255, .025);
  border-color: rgba(216, 180, 90, .26);
}

.btn-ghost:hover:not(:disabled) { background: rgba(216, 180, 90, .1); border-color: rgba(216, 180, 90, .48); }

.btn-danger {
  color: #fff3ec;
  background: linear-gradient(180deg, #b3493d, #8e2f27);
  border-color: rgba(255, 170, 150, .35);
}

.btn-soft {
  color: #243029;
  background: #f1e7ce;
  border-color: #c9b88e;
}

.btn-soft:hover:not(:disabled) { background: #fff8e6; }

.btn-sm { padding: 6px 9px; font-size: 10px; border-radius: 7px; }
.btn-block { width: 100%; }

/* ---------------- 布局 ---------------- */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 20px;
  align-items: stretch;
}

.board-shell {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
}

.board-hint { display: none; }

/* ---------------- 棋盘 ---------------- */

.board {
  position: relative;
  width: min(100%, var(--board-size));
  aspect-ratio: 1 / 1;
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  grid-template-rows: repeat(11, 1fr);
  padding: 0;
  background: #0d2a20;
  border: 9px solid #0a1d17;
  outline: 2px solid rgba(216, 180, 90, .5);
  outline-offset: 2px;
  border-radius: 5px;
  box-shadow:
    0 35px 80px rgba(0, 0, 0, .55),
    0 0 0 1px rgba(0, 0, 0, .6),
    inset 0 0 0 2px rgba(216, 180, 90, .08);
  container-type: inline-size;
}

.board::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 4px;
  pointer-events: none;
  box-shadow: inset 0 0 26px rgba(0, 0, 0, .55);
  z-index: 30;
}

.cell {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #f4eedd;
  border: 1px solid rgba(44, 68, 55, .32);
  color: var(--ink);
  cursor: pointer;
  transition: background .18s ease, box-shadow .18s ease;
}

.cell:hover {
  z-index: 8;
  box-shadow: inset 0 0 0 2px var(--gold), inset 0 0 18px rgba(216, 180, 90, .22);
}

.cell.owned {
  background: color-mix(in srgb, var(--owner) 10%, #f4eedd);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--owner) 62%, transparent);
}

.cell.owned:hover {
  box-shadow: inset 0 0 0 2px var(--gold), inset 0 0 0 3px var(--owner);
}

.cell.mortgaged .cell-content { opacity: .55; }


.cell-band {
  position: absolute;
  background: var(--band, #777);
  z-index: 1;
}

.side-bottom .cell-band { top: 0; left: 0; right: 0; height: 14px; }
.side-top .cell-band { bottom: 0; left: 0; right: 0; height: 14px; }
.side-left .cell-band { top: 0; bottom: 0; right: 0; width: 14px; }
.side-right .cell-band { top: 0; bottom: 0; left: 0; width: 14px; }

/* 色盲辅助：同色组使用不同纹理，不只依赖颜色 */
body.colorblind .cell[data-group] .cell-band{
  background-color:var(--band);
  background-image:repeating-linear-gradient(135deg,rgba(255,255,255,.34) 0 2px,transparent 2px 7px);
}
body.colorblind .cell[data-group="lightblue"] .cell-band{background-image:radial-gradient(circle,rgba(255,255,255,.55) 0 1.5px,transparent 2px);background-size:9px 9px}
body.colorblind .cell[data-group="pink"] .cell-band{background-image:repeating-linear-gradient(0deg,rgba(255,255,255,.38) 0 2px,transparent 2px 7px)}
body.colorblind .cell[data-group="orange"] .cell-band{background-image:repeating-linear-gradient(90deg,rgba(255,255,255,.38) 0 2px,transparent 2px 7px)}
body.colorblind .cell[data-group="red"] .cell-band{background-image:repeating-linear-gradient(45deg,rgba(255,255,255,.4) 0 2px,transparent 2px 8px),repeating-linear-gradient(-45deg,rgba(255,255,255,.4) 0 2px,transparent 2px 8px)}
body.colorblind .cell[data-group="yellow"] .cell-band{background-image:repeating-linear-gradient(45deg,rgba(0,0,0,.16) 0 2px,transparent 2px 7px)}
body.colorblind .cell[data-group="green"] .cell-band{background-image:radial-gradient(circle,rgba(0,0,0,.18) 0 1.5px,transparent 2px);background-size:8px 8px}
body.colorblind .cell[data-group="darkblue"] .cell-band{background-image:repeating-linear-gradient(90deg,rgba(255,255,255,.28) 0 2px,transparent 2px 6px),repeating-linear-gradient(0deg,rgba(255,255,255,.2) 0 2px,transparent 2px 6px)}


.cell-content {
  position: relative;
  z-index: 2;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px;
  text-align: center;
}

.side-bottom .cell-content { justify-content: flex-start; padding-top: 19px; }
.side-top .cell-content { justify-content: flex-end; padding-bottom: 19px; }
.side-left .cell-content { justify-content: center; padding-right: 19px; }
.side-right .cell-content { justify-content: center; padding-left: 19px; }

.cell-name {
  font-size: clamp(6px, 1.28cqw, 10.6px);
  line-height: 1.15;
  font-weight: 750;
  letter-spacing: 0;
  word-break: break-word;
  max-width: 100%;
}

.cell-price {
  font-size: clamp(5.2px, .98cqw, 8.4px);
  color: #536253;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.special-icon {
  font-size: clamp(13px, 2.55cqw, 22px);
  line-height: 1;
  margin-bottom: 1px;
  filter: saturate(.85);
}

.special-label {
  font-size: clamp(5.8px, 1.14cqw, 9.4px);
  font-weight: 750;
  line-height: 1.15;
  word-break: break-word;
}

.cell-chance { background: #f5e8d1; }
.cell-chest { background: #e8f0ef; }
.cell-tax { background: #efe7da; }
.cell-railroad { background: #eee8d8; }
.cell-utility { background: #e9f0e6; }

.cell-chance .special-icon { color: #b66b1e; }
.cell-chest .special-icon { color: #2d7d88; }

.owner-flag {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
  z-index: 7;
}

.mortgage-tag {
  position: absolute;
  left: 2px;
  bottom: 2px;
  z-index: 7;
  padding: 1px 3px;
  border-radius: 2px;
  background: #3a3d39;
  color: #f8ead0;
  font-size: clamp(4.5px, .82cqw, 6.8px);
  line-height: 1.2;
  letter-spacing: .04em;
}

.buildings {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5px;
  pointer-events: none;
}

.side-bottom .buildings { top: 3px; left: 0; right: 0; }
.side-top .buildings { bottom: 3px; left: 0; right: 0; }
.side-left .buildings { right: 3px; top: 0; bottom: 0; flex-direction: column; }
.side-right .buildings { left: 3px; top: 0; bottom: 0; flex-direction: column; }

.house-dot {
  width: clamp(4px, .64cqw, 5.5px);
  height: clamp(4px, .64cqw, 5.5px);
  border-radius: 1px;
  background: #1e8a4e;
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: 0 0 2px rgba(0, 0, 0, .35);
}

.hotel-dot {
  width: clamp(7px, 1.15cqw, 10px);
  height: clamp(5px, .8cqw, 7px);
  border-radius: 1px;
  background: #b93b31;
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 0 3px rgba(0, 0, 0, .4);
}

/* 四角 */

.cell.corner { background: #f8f1df; }
.cell.corner .cell-content { padding: 4px; justify-content: center; }

.corner-icon {
  font-size: clamp(17px, 3.3cqw, 31px);
  line-height: 1;
  margin-bottom: clamp(2px, .4cqw, 4px);
}

.corner-title {
  font-family: var(--serif);
  font-size: clamp(7px, 1.35cqw, 11.5px);
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1.1;
}

.corner-sub {
  font-size: clamp(4.5px, .78cqw, 6.8px);
  color: #596858;
  line-height: 1.15;
  margin-top: 1px;
}

.cell-go { background: linear-gradient(135deg, #f9f2dd, #f2e3bd); }
.cell-go .corner-icon { color: #a8342d; transform: rotate(-8deg); }
.cell-jail { background: linear-gradient(135deg, #f2eee1, #e6dfcc); }
.cell-free { background: linear-gradient(135deg, #eef3e4, #e3ebd7); }
.cell-gotojail { background: linear-gradient(135deg, #f5e9dc, #efddcd); }

/* 棋盘中心 */

.board-center {
  grid-area: 2 / 2 / 11 / 11;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 250, 230, .95), rgba(243, 234, 207, .92) 42%, rgba(231, 219, 187, .97) 100%);
  border: 1px solid rgba(44, 68, 55, .25);
  z-index: 1;
}

.board-center::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .35;
  background-image:
    linear-gradient(45deg, rgba(151, 126, 69, .055) 25%, transparent 25%, transparent 75%, rgba(151, 126, 69, .055) 75%),
    linear-gradient(45deg, rgba(151, 126, 69, .055) 25%, transparent 25%, transparent 75%, rgba(151, 126, 69, .055) 75%);
  background-size: 22px 22px;
  background-position: 0 0, 11px 11px;
  pointer-events: none;
}

.center-deco {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(168, 139, 75, .18);
  pointer-events: none;
}

.center-deco-a { width: 72%; height: 72%; }
.center-deco-b { width: 54%; height: 54%; border-style: dashed; opacity: .55; }

.logo-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.logo-eyebrow {
  font-size: clamp(5px, .8cqw, 8px);
  letter-spacing: .48em;
  color: #907b4e;
  margin-bottom: clamp(1px, .4cqw, 4px);
  padding-left: .48em;
}

.logo-main {
  font-family: var(--serif);
  font-size: clamp(30px, 6.4cqw, 66px);
  font-weight: 800;
  line-height: .98;
  color: #ae342c;
  letter-spacing: .06em;
  text-shadow: 0 2px 0 #fff9e8, 0 3px 0 rgba(118, 40, 32, .15);
  white-space: nowrap;
}

.logo-en {
  font-family: var(--serif);
  font-size: clamp(7px, 1.2cqw, 12px);
  letter-spacing: .52em;
  color: #3c4c40;
  margin-top: 2px;
  padding-left: .52em;
  white-space: nowrap;
}

.logo-rule {
  width: clamp(60px, 13cqw, 130px);
  height: 1px;
  background: linear-gradient(90deg, transparent, #b3975c, transparent);
  margin: clamp(6px, 1.2cqw, 13px) 0;
}

.dice-tray {
  display: flex;
  gap: clamp(8px, 1.4cqw, 15px);
  align-items: center;
  justify-content: center;
  min-height: clamp(38px, 5.4cqw, 56px);
}

.die {
  width: clamp(36px, 5.1cqw, 54px);
  aspect-ratio: 1 / 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 11%;
  border-radius: clamp(7px, 1cqw, 11px);
  background: linear-gradient(145deg, #fffefa, #f1e8d4);
  border: 1px solid rgba(128, 107, 67, .3);
  box-shadow:
    0 5px 0 rgba(139, 116, 72, .18),
    0 8px 18px rgba(65, 48, 24, .2),
    inset 0 1px 2px rgba(255, 255, 255, .9);
}

.die .pip {
  width: 68%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #4e5a52, #1c2822 70%);
  align-self: center;
  justify-self: center;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .12);
}

.die .pip.hidden { visibility: hidden; }
.die.rolling {
  animation: dieTumble .2s cubic-bezier(.4, .1, .4, 1) infinite;
  box-shadow:
    0 10px 16px rgba(65, 48, 24, .26),
    0 3px 0 rgba(139, 116, 72, .16),
    inset 0 1px 2px rgba(255, 255, 255, .9);
}
.die.pop { animation: diePop .3s cubic-bezier(.2, .9, .3, 1.4); }

.center-status {
  margin-top: clamp(5px, .9cqw, 10px);
  padding: clamp(3px, .55cqw, 7px) clamp(8px, 1.4cqw, 15px);
  border-radius: 999px;
  font-size: clamp(6.5px, 1.08cqw, 10.5px);
  font-weight: 650;
  letter-spacing: .04em;
  color: #f6e9be;
  background: #173c30;
  border: 1px solid rgba(216, 180, 90, .4);
  box-shadow: 0 4px 12px rgba(23, 60, 48, .25);
  text-align: center;
  max-width: 94%;
}

.center-sub {
  margin-top: clamp(3px, .5cqw, 6px);
  font-size: clamp(5.5px, .88cqw, 8.5px);
  color: #5b6b59;
  letter-spacing: .05em;
  text-align: center;
}

.center-footer {
  position: absolute;
  bottom: clamp(8px, 1.5cqw, 16px);
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: clamp(4.5px, .7cqw, 6.8px);
  letter-spacing: .24em;
  color: #a19372;
  z-index: 2;
}

.center-dot { width: 3px; height: 3px; border-radius: 50%; background: #b6a175; }

/* 棋子层 */

.token-layer {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

.token {
  position: absolute;
  width: clamp(15px, 4.4cqw, 34px);
  height: clamp(15px, 4.4cqw, 34px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: clamp(10px, 2.1cqw, 18px);
  line-height: 1;
  background: var(--pc);
  border: clamp(1.5px, .22cqw, 2px) solid #fffdf6;
  box-shadow:
    0 4px 10px rgba(0, 0, 0, .55),
    0 0 0 2px rgba(0, 0, 0, .14),
    inset 0 0 0 1px rgba(0, 0, 0, .12);
  transform: translate(-50%, -50%);
  transition: left .42s cubic-bezier(.22, .8, .25, 1), top .42s cubic-bezier(.22, .8, .25, 1), opacity .25s ease, filter .25s ease;
  will-change: left, top;
  z-index: 3;
}

.token.current {
  animation: tokenPulse 1.7s ease-in-out infinite;
  z-index: 5;
}

.token.walking {
  z-index: 26;
  filter: drop-shadow(0 0 6px rgba(255, 221, 130, .8));
}

.token.walking::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(255, 226, 145, .8);
  animation: walkRing .65s ease-out infinite;
  pointer-events: none;
}

.cell.walk-focus {
  box-shadow: inset 0 0 0 2px var(--gold-bright), inset 0 0 22px rgba(240, 209, 131, .32);
}

@keyframes walkRing {
  0% { transform: scale(.8); opacity: .9; }
  100% { transform: scale(1.5); opacity: 0; }
}

.token.out { opacity: .28; filter: grayscale(1); }
.token.jailed { box-shadow: 0 0 0 2px rgba(185, 59, 49, .65), 0 3px 7px rgba(0, 0, 0, .42); }

/* ---------------- 侧栏 ---------------- */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-width: 0;
}

.panel {
  background:
    linear-gradient(155deg, rgba(20, 51, 41, .96), rgba(10, 29, 23, .97));
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .035);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.panel-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: .12em;
  font-weight: 700;
  color: #efe2bd;
}

.round-pill {
  font-size: 9px;
  letter-spacing: .08em;
  color: #d9c491;
  border: 1px solid rgba(216, 180, 90, .26);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(216, 180, 90, .06);
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 8px;
  letter-spacing: .16em;
  color: #76a58e;
}

.live-dot i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4ec38a;
  box-shadow: 0 0 7px #4ec38a;
  animation: liveBlink 2s infinite;
}

.players-panel {
  padding: 13px 13px 11px;
  flex: 0 1 auto;
  overflow-y: auto;
  max-height: 47%;
}

.players { display: flex; flex-direction: column; gap: 7px; }

.player {
  --pc: #888;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 8px 9px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, .035);
  background: rgba(255, 255, 255, .022);
  transition: background .2s ease, border-color .2s ease, opacity .2s ease;
}

.player.active {
  border-color: rgba(216, 180, 90, .42);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--pc) 16%, transparent), rgba(255, 255, 255, .02) 70%),
    rgba(255, 255, 255, .025);
  box-shadow: inset 2px 0 0 var(--pc);
}

.player.bankrupt { opacity: .38; filter: grayscale(.6); }

.pawn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--pc);
  border: 2px solid rgba(255, 253, 246, .9);
  box-shadow: 0 3px 6px rgba(0, 0, 0, .25);
  font-size: 15px;
}

.player-main { min-width: 0; }

.player-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.player-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #f2ead6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-name em {
  font-style: normal;
  font-size: 8px;
  color: #d5bd82;
  border: 1px solid rgba(216, 180, 90, .3);
  border-radius: 4px;
  padding: 0 3px;
  margin-left: 3px;
  vertical-align: 1px;
  font-weight: 500;
}

.player-money {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.player-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin-top: 2px;
  font-size: 9px;
  color: #7f9a8b;
}

.meta-tag {
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .05);
  color: #9eb2a6;
}

.meta-tag.warn { color: #e8b08a; border-color: rgba(232, 176, 138, .3); background: rgba(232, 176, 138, .08); }
.meta-tag.good { color: #83cfa8; border-color: rgba(131, 207, 168, .25); background: rgba(131, 207, 168, .07); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 5px;
  min-height: 7px;
}

.chip {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--cc);
  border: 1px solid rgba(255, 255, 255, .38);
  opacity: .95;
}

.chip.mortgaged { opacity: .3; }

.player-empty { font-size: 9px; color: #5f7669; margin-top: 4px; }

/* 行动 */

.action-panel { padding: 13px; }

.status-line {
  min-height: 33px;
  font-size: 11.5px;
  line-height: 1.45;
  color: #b2c8bb;
}

.status-line strong { color: #f2e4bd; font-weight: 700; }
.status-line .muted { color: #6f897b; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.actions .btn { flex: 1 1 auto; }
.actions .btn-roll {
  flex: 1 1 100%;
  padding: 12px 12px;
  font-size: 14px;
  letter-spacing: .16em;
}

.actions .btn-manage { flex: 1 1 0; }
.actions .btn-trade { flex: 1 1 0; }

/* 日志 */

.log-panel {
  padding: 13px;
  flex: 0 0 230px;
  height: 230px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.log {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  font-size: 10.5px;
  line-height: 1.4;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
  scrollbar-color: rgba(216, 180, 90, .34) transparent;
  overscroll-behavior: contain;
}

.log-line {
  display: flex;
  gap: 6px;
  padding: 4px 0;
  color: #a7bdb1;
  border-bottom: 1px dashed rgba(255, 255, 255, .04);
}

.log-line:last-child { border-bottom: 0; }
.log-icon { flex: 0 0 13px; opacity: .9; font-size: 9px; line-height: 1.6; text-align: center; }
.log-text { min-width: 0; word-break: break-word; }

.log-line.turn {
  margin-top: 5px;
  padding-top: 7px;
  color: #e6d29a;
  font-weight: 650;
  border-top: 1px solid rgba(216, 180, 90, .16);
  border-bottom: 0;
}

.log-line.money { color: #d9ce9f; }
.log-line.buy { color: #a9d8bd; }
.log-line.build { color: #93caae; }
.log-line.card { color: #d4c49b; }
.log-line.auction { color: #d6b982; }
.log-line.jail { color: #e2a68e; }
.log-line.danger { color: #ef9d8e; }
.log-line.success { color: #88d4a9; }
.log-line.win { color: #f4d77f; font-weight: 700; }
.log-line.trade { color: #9fd4c5; }

.log-tools{display:flex;align-items:center;gap:6px;min-width:0}
.log-tool-btn{
  display:none;align-items:center;justify-content:center;min-height:26px;
  padding:2px 7px;border-radius:7px;border:1px solid rgba(216,180,90,.24);
  background:rgba(216,180,90,.07);color:#d8c99e;font-size:9px;cursor:pointer;
}
.log-tool-btn:hover{background:rgba(216,180,90,.16)}
.log-panel.has-older .log-latest{display:inline-flex}
.log-toggle{display:none}
.log-panel.collapsed{flex:0 0 auto!important;height:auto!important;min-height:0!important}
.log-panel.collapsed .log{display:none}
.log-panel.collapsed .panel-head{margin-bottom:0}

/* 拍卖历史 / 回合倒计时 / 操作提示 */
.auction-history{margin-top:10px;border-top:1px dashed rgba(95,107,96,.25);padding-top:7px;color:#6b7268;font-size:10px}
.auction-history summary{cursor:pointer;font-weight:700;color:#596456;outline:none}
.auction-history summary:focus-visible{outline:2px solid #b28b3a;outline-offset:2px}
.auction-history-list{max-height:92px;overflow-y:auto;margin-top:5px;line-height:1.5}
.auction-history-list div{padding:2px 0;border-bottom:1px dotted rgba(95,107,96,.14)}
.turn-clock{display:inline-block;margin-left:6px;padding:1px 6px;border-radius:999px;background:rgba(216,180,90,.10);color:#f0d89a;font-size:10px;font-variant-numeric:tabular-nums}
.turn-clock.expired{background:rgba(220,110,80,.15);color:#ffc3a8}
.action-hint{display:block;margin-top:6px;font-size:10px;line-height:1.4;color:#c9a882}
.settings-auto-list{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:7px}
.settings-auto{min-height:48px!important}
@media (max-width:760px){.settings-auto-list{grid-template-columns:1fr}}


/* 棋子动画与滚动条 */

@keyframes tokenPulse {
  0%, 100% { box-shadow: 0 3px 7px rgba(0, 0, 0, .42), 0 0 0 0 rgba(255, 232, 158, .55); }
  50% { box-shadow: 0 3px 7px rgba(0, 0, 0, .42), 0 0 0 5px rgba(255, 232, 158, 0); }
}

@keyframes dieShake {
  0% { transform: rotate(0deg) translateY(0); }
  25% { transform: rotate(-7deg) translateY(-2px); }
  75% { transform: rotate(7deg) translateY(1px); }
  100% { transform: rotate(0deg) translateY(0); }
}

@keyframes diePop {
  0% { transform: scale(.86); }
  60% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

@keyframes liveBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: .25; }
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(216, 180, 90, .2); border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(216, 180, 90, .4); border: 2px solid transparent; background-clip: content-box; }

@media (min-width: 981px) and (max-height: 820px) {
  .log-panel {
    flex: 0 0 140px;
    height: 140px;
  }
}

/* ---------------- 模态框 ---------------- */

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(3, 11, 8, .74);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: fadeIn .18s ease;
}

.modal-layer.tool-layer { z-index: 1100; }
.modal-layer.hidden { display: none; }

.modal-card {
  width: min(470px, 94vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  position: relative;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, .8), transparent 45%),
    #f7f1e1;
  border: 1px solid rgba(216, 180, 90, .55);
  border-radius: 18px;
  box-shadow: 0 35px 90px rgba(0, 0, 0, .65), inset 0 0 0 1px rgba(255, 255, 255, .5);
  overflow: hidden;
  animation: popIn .24s cubic-bezier(.2, .9, .3, 1.25);
}

.modal-card.wide { width: min(760px, 94vw); }
.modal-card.medium { width: min(600px, 94vw); }
.modal-card.trade-card { width: min(880px, 95vw); }

.modal-close {
  position: absolute;
  top: 11px;
  right: 11px;
  z-index: 3;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(31, 48, 39, .18);
  background: rgba(255, 255, 255, .65);
  color: #33443a;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* 用几何线而不是字体字符“×”，避免字体墨迹的上下/左右不对称。 */
.modal-close::before,
.modal-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
  pointer-events: none;
}
.modal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.modal-close:hover { background: #fff; }

.modal-head {
  padding: 18px 22px 0;
}

.modal-eyebrow {
  font-size: 8px;
  letter-spacing: .28em;
  color: #a5874e;
  text-transform: uppercase;
  font-weight: 700;
}

.modal-title {
  margin: 3px 0 0;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.15;
  color: #26352c;
  letter-spacing: .02em;
}

.modal-en {
  margin: 2px 0 0;
  font-size: 9px;
  letter-spacing: .15em;
  color: #8d8063;
  text-transform: uppercase;
}

.modal-body {
  padding: 14px 22px 20px;
  overflow-y: auto;
}

.modal-copy {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: #5d6a5f;
}

.modal-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.modal-actions .btn { flex: 1 1 0; min-width: 120px; }
.modal-actions .btn-ghost { color: #3d4b41; border-color: #cbbc98; background: rgba(255, 255, 255, .42); }
.modal-actions .btn-ghost:hover { background: #fffaf0; }
.modal-card .btn-primary { color: #251a07; }
.modal-card .btn-ghost {
  color: #3d4b41;
  border-color: #cbbc98;
  background: rgba(255, 255, 255, .42);
}
.modal-card .btn-ghost:hover:not(:disabled) { background: #fffaf0; border-color: #b8a26f; }

.modal-note {
  margin: 10px 0 0;
  padding: 9px 11px;
  border-radius: 9px;
  background: rgba(184, 149, 77, .09);
  border: 1px dashed rgba(166, 132, 62, .3);
  font-size: 10.5px;
  line-height: 1.5;
  color: #6a624f;
}

/* 决策弹窗中的玩家资产条 */

.asset-strip {
  --pc: #d8b45a;
  margin: 10px 0 12px;
  padding: 11px 13px 10px;
  border-radius: 11px;
  background:
    linear-gradient(135deg, rgba(26, 65, 51, .98), rgba(10, 31, 24, .98));
  border: 1px solid rgba(216, 180, 90, .32);
  box-shadow: inset 3px 0 0 var(--pc), inset 0 1px 0 rgba(255, 255, 255, .05);
  color: #eef2e7;
  text-align: left;
}

.asset-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.asset-who {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.asset-pawn {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pc);
  border: 1.5px solid rgba(255, 253, 246, .9);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .3);
  font-size: 13px;
  line-height: 1;
}

.asset-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  color: #f5ecd7;
}

.asset-bot {
  flex: 0 0 auto;
  font-style: normal;
  font-size: 8px;
  letter-spacing: .05em;
  color: var(--gold-bright);
  border: 1px solid rgba(216, 180, 90, .35);
  border-radius: 4px;
  padding: 1px 4px;
}

.asset-cash {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}

.asset-cash span {
  font-size: 8px;
  letter-spacing: .12em;
  color: #88a192;
}

.asset-cash strong {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
}

.asset-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 6px;
  font-size: 9.5px;
  line-height: 1.5;
  color: #9db4a6;
}

.asset-metrics strong {
  color: #e9dcb3;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.asset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 56px;
  overflow-y: auto;
  overflow-x: hidden;
  margin-top: 7px;
  padding: 1px 1px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(216, 180, 90, .25) transparent;
}

.asset-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6.5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .065);
  border: 1px solid rgba(255, 255, 255, .08);
  color: #dce7dd;
  font-size: 9.5px;
  line-height: 1.2;
  white-space: nowrap;
}

.asset-chip i {
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: var(--ac, #888);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .28);
}

.asset-chip b {
  font-weight: 500;
  font-size: 7.5px;
  color: #92ad9e;
}

.asset-chip.mortgaged {
  opacity: .45;
  text-decoration: line-through;
}

.asset-empty {
  font-size: 9.5px;
  color: #6f8a7c;
  padding: 2px 0;
}

.asset-decision {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(216, 180, 90, .16);
  font-size: 10.5px;
  line-height: 1.5;
  color: #aebfb2;
}

.asset-decision strong {
  color: #eed48a;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.asset-decision .cash-good { color: #8bd3a8; }
.asset-decision .cash-bad { color: #f0a28f; }

.buy-card .asset-strip { margin-top: 0; }
.auction-card .asset-strip { margin: 9px 0 0; }
.draw-card .asset-strip { margin: 14px 0 0; width: 100%; }
.draw-card { overflow-y: auto; }

/* 地契 */

.deed {
  border: 1px solid #b9a471;
  border-radius: 12px;
  overflow: hidden;
  background: #fbf6e8;
  box-shadow: 0 10px 24px rgba(68, 51, 20, .1);
}

.deed-band {
  height: 30px;
  background: var(--gc, #555);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  letter-spacing: .24em;
  color: #fffdf5;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
  border-bottom: 2px solid rgba(255, 255, 255, .45);
}

.deed-head {
  padding: 12px 15px 9px;
  text-align: center;
  border-bottom: 1px solid #ded0ae;
}

.deed-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.15;
  color: #29372e;
}

.deed-en {
  margin: 2px 0 0;
  font-size: 8px;
  letter-spacing: .13em;
  color: #8e8268;
  text-transform: uppercase;
}

.deed-price {
  margin-top: 5px;
  font-size: 11px;
  color: #776c55;
}

.deed-price strong { color: #2a3a30; font-size: 15px; font-family: var(--serif); }

.deed-body { padding: 9px 15px 13px; }

.rent-table {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 12px;
  font-size: 10.5px;
  line-height: 1.5;
  color: #5b655b;
}

.rent-table .rt-label { color: #6a7164; }
.rent-table .rt-value { color: #2c3a30; font-weight: 650; font-variant-numeric: tabular-nums; }
.rent-table .rt-divider { grid-column: 1 / -1; height: 1px; background: #e2d6b9; margin: 5px 0; }

.deed-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed #d5c39d;
  font-size: 9.5px;
  color: #746a55;
}

.deed-owner {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: #5a6459;
}

.deed-owner i { width: 8px; height: 8px; border-radius: 50%; background: var(--oc); border: 1px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .18); }

.deed-mortgaged {
  margin-top: 8px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  color: #8c3b31;
  background: rgba(185, 59, 49, .08);
  border: 1px solid rgba(185, 59, 49, .22);
  border-radius: 5px;
  padding: 3px;
}

/* 购买弹窗 */

.buy-card .modal-head { padding-bottom: 0; }
.buy-deed { margin-top: 12px; }

/* 卡片弹窗 */

.card-modal {
  width: min(440px, 92vw);
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

.card-paper {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #fbf6e8;
  border: 1px solid rgba(91, 70, 30, .35);
  box-shadow: 0 35px 90px rgba(0, 0, 0, .65);
  animation: popIn .24s cubic-bezier(.2, .9, .3, 1.25);
}

.card-paper::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(120, 92, 40, .025) 0 1px, transparent 1px 4px);
}

.card-ribbon {
  padding: 9px 18px;
  text-align: center;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .3em;
  color: #fffdf5;
  text-transform: uppercase;
  background: #c47a2c;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}

.card-modal.chest .card-ribbon { background: #2f7f8c; }
.card-modal.railroad-card .card-ribbon { background: #38463d; }

.card-inner { padding: 22px 24px 20px; text-align: center; }

.card-symbol {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 8px;
  filter: drop-shadow(0 3px 3px rgba(80, 55, 15, .15));
}

.draw-card { width: min(440px, 92vw); }
.draw-card .card-ribbon { flex: 0 0 auto; }

/* 拍卖地产摘要 */

.auction-deed {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fffaf0;
  border: 1px solid #ded0ae;
}

.auction-deed-band {
  width: 7px;
  height: 38px;
  flex: 0 0 7px;
  border-radius: 3px;
  background: var(--gc, #777);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}

.auction-deed-name {
  font-family: var(--serif);
  font-size: 16px;
  color: #2c3b31;
  line-height: 1.2;
}

.auction-deed-price {
  margin-top: 2px;
  font-size: 9.5px;
  color: #8a7d64;
}

/* 游戏结束 */

.gameover-card { width: min(480px, 94vw); text-align: center; }
.gameover-card .modal-body { padding-top: 20px; }

.card-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 23px;
  color: #2b342b;
}

.card-text {
  margin: 9px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: #5e6658;
}

.card-actions { margin-top: 17px; }
.card-actions .btn { width: 100%; }

/* 拍卖 */

.auction-card { width: min(560px, 94vw); }

.auction-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: 11px;
  background: #142f26;
  color: #f1e4bd;
}

.auction-price { font-family: var(--serif); font-size: 28px; color: var(--gold-bright); line-height: 1; }
.auction-label { font-size: 8px; letter-spacing: .16em; color: #8fa79a; text-transform: uppercase; }
.auction-leader { text-align: right; font-size: 10px; color: #c6b78e; }
.auction-leader strong { color: #f4e5b7; font-size: 12px; }

.bidders {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.bidder {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px 4px 5px;
  border-radius: 999px;
  background: #fffaf0;
  border: 1px solid #ded0ae;
  font-size: 10px;
  color: #4f5b50;
}

.bidder i { width: 7px; height: 7px; border-radius: 50%; background: var(--bc); }
.bidder.turn { border-color: #b3914b; box-shadow: 0 0 0 2px rgba(216, 180, 90, .2); }
.bidder.out { opacity: .38; text-decoration: line-through; }
.bidder strong { font-size: 10px; color: #2f3d33; }
.bidder-cash {
  margin-left: 1px;
  padding-left: 5px;
  border-left: 1px solid #d8c9a6;
  color: #8d7f64;
  font-size: 8.5px;
  white-space: nowrap;
}

.auction-controls { margin-top: 12px; }
.auction-turn {
  font-size: 11px;
  color: #5f6b60;
  margin-bottom: 8px;
}
.auction-turn strong { color: #2f3d33; }

.bid-row { display: flex; gap: 7px; }
.bid-row .input { flex: 1; }
.quick-bids { display: flex; gap: 6px; margin-top: 7px; }
.quick-bids .btn { flex: 1; }

.input {
  width: 100%;
  border: 1px solid #cbbd9a;
  border-radius: 8px;
  background: #fffcf4;
  color: #26342b;
  padding: 8px 10px;
  font-size: 12px;
  outline: none;
}

.input:focus { border-color: #a78336; box-shadow: 0 0 0 3px rgba(216, 180, 90, .18); }

/* 债务 */

.debt-card { width: min(620px, 95vw); }
.debt-warning {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 13px;
  border-radius: 10px;
  background: rgba(185, 59, 49, .08);
  border: 1px solid rgba(185, 59, 49, .22);
  color: #6b3e35;
  font-size: 11.5px;
  line-height: 1.5;
}
.debt-warning .ic { font-size: 18px; line-height: 1; }
.debt-warning strong { color: #8e2f27; }

.debt-assets {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 10px;
  max-height: 270px;
  overflow-y: auto;
  border-top: 1px solid #e1d5b9;
}

.debt-asset {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 2px;
  border-bottom: 1px dashed #e1d5b9;
}

.debt-asset .swatch { width: 8px; height: 8px; border-radius: 2px; background: var(--sc); }
.debt-asset .da-name { font-size: 11px; font-weight: 650; color: #3b4a3f; }
.debt-asset .da-meta { font-size: 9px; color: #8c8068; }
.debt-asset .da-actions { display: flex; gap: 4px; }
.debt-asset .btn { padding: 4px 7px; font-size: 9px; }
.debt-empty { padding: 14px 2px; font-size: 11px; color: #8e8268; text-align: center; }

/* 管理资产 */

.manage-list { display: flex; flex-direction: column; gap: 0; margin-top: 12px; max-height: 48vh; overflow-y: auto; border-top: 1px solid #e1d5b9; }
.manage-group-head { margin: 12px 0 3px; font-size: 9px; letter-spacing: .16em; color: #9a895f; text-transform: uppercase; }
.manage-row {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 8px 2px;
  border-bottom: 1px dashed #e1d5b9;
}
.manage-row .swatch { width: 8px; height: 8px; border-radius: 2px; background: var(--sc); }
.manage-name { font-size: 12px; font-weight: 650; color: #35443a; }
.manage-meta { font-size: 9.5px; color: #8b7f67; margin-top: 1px; }
.manage-btns { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.manage-btns .btn { padding: 4px 7px; font-size: 9px; }
.manage-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 11px;
  background: rgba(184, 149, 77, .08);
  border: 1px solid rgba(166, 132, 62, .2);
  border-radius: 9px;
  font-size: 10px;
  color: #6b624f;
}
.manage-summary strong { color: #334137; }

/* 交易 */

.trade-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 12px; }
.trade-box {
  border: 1px solid #d8c9a6;
  border-radius: 11px;
  padding: 11px;
  background: rgba(255, 255, 255, .38);
  min-height: 180px;
}
.trade-box h3 {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: .08em;
  color: #3d4b41;
  display: flex;
  align-items: center;
  gap: 6px;
}
.trade-box h3 i { width: 8px; height: 8px; border-radius: 50%; background: var(--tc); }
.trade-net {
  margin: -3px 0 7px;
  font-size: 9.5px;
  color: #8b7f67;
  font-variant-numeric: tabular-nums;
}
.trade-list { max-height: 235px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.prop-check {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 4px;
  border-radius: 6px;
  font-size: 11px;
  color: #4b5a4f;
  cursor: pointer;
}
.prop-check:hover { background: rgba(184, 149, 77, .08); }
.prop-check input { accent-color: #b08c43; }
.prop-check .dot { width: 7px; height: 7px; border-radius: 2px; background: var(--dc); }
.prop-check .muted { color: #9a8e76; font-size: 9px; margin-left: auto; }
.prop-check.disabled { opacity: .45; cursor: not-allowed; }
.trade-cash { margin-top: 9px; }
.trade-cash label { display: block; font-size: 9px; color: #7c715b; margin-bottom: 4px; }
.trade-arrow { align-self: center; font-size: 20px; color: #a78c55; text-align: center; }

.trade-summary {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #fffaf0;
  border: 1px solid #ded0ae;
  font-size: 11px;
  line-height: 1.6;
  color: #546055;
}
.trade-summary strong { color: #2e3d33; }

.trade-wait { text-align: center; padding: 22px 10px; }
.trade-wait .big-icon { font-size: 36px; margin-bottom: 8px; }
.trade-wait h3 { margin: 0 0 5px; font-family: var(--serif); font-size: 18px; color: #334137; }
.trade-wait p { margin: 0; font-size: 11px; color: #7d725c; line-height: 1.5; }

/* 新游戏 / 规则 */

.setup-count { display: flex; gap: 6px; margin-top: 7px; }
.setup-count .btn { flex: 1; }
.setup-count .btn.selected { background: #173c30; color: #f5e7be; border-color: #173c30; }

.setup-players { display: flex; flex-direction: column; gap: 7px; margin-top: 14px; }
.setup-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 96px;
  gap: 8px;
  align-items: center;
  padding: 7px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .42);
  border: 1px solid #e1d5b9;
}
.setup-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--sc);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
  font-size: 13px;
}
.setup-row .input { padding: 6px 8px; font-size: 11px; }
.setup-type { display: flex; gap: 3px; }
.setup-type .btn { flex: 1; padding: 5px 4px; font-size: 9px; }
.setup-type .btn.selected { background: #173c30; color: #f5e7be; border-color: #173c30; }

.rules-body { font-size: 12px; line-height: 1.65; color: #556257; }
.rules-body h3 { margin: 17px 0 5px; font-family: var(--serif); font-size: 15px; color: #2f3d33; }
.rules-body h3:first-child { margin-top: 0; }
.rules-body p { margin: 0 0 7px; }
.rules-body ul { margin: 0 0 8px; padding-left: 19px; }
.rules-body li { margin: 2px 0; }
.rules-body strong { color: #2d3b31; }
.rules-body .rule-note {
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(184, 149, 77, .08);
  border-left: 3px solid #c3a664;
  border-radius: 4px;
  font-size: 10.5px;
  color: #6b624f;
}

/* 游戏结束 */

.gameover-card { text-align: center; }
.gameover-crown { font-size: 48px; line-height: 1; margin: 8px 0 4px; filter: drop-shadow(0 4px 5px rgba(100, 64, 12, .2)); }
.gameover-title { font-family: var(--serif); font-size: 30px; color: #2a372d; margin: 0; }
.gameover-winner { margin: 7px 0 0; font-size: 15px; color: #7a5b20; font-weight: 700; }
.ranking { margin-top: 15px; border-top: 1px solid #e1d5b9; }
.rank-row { display: flex; align-items: center; gap: 8px; padding: 7px 2px; border-bottom: 1px dashed #e1d5b9; font-size: 11px; color: #556257; }
.rank-row .idx { width: 17px; color: #a28d62; font-family: var(--serif); }
.rank-row .rp { width: 8px; height: 8px; border-radius: 50%; background: var(--rc); }
.rank-row .rname { flex: 1; text-align: left; color: #334137; font-weight: 650; }
.rank-row .rmoney { font-family: var(--serif); color: #6e5a2f; }

/* toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 16px);
  z-index: 1300;
  padding: 10px 18px;
  border-radius: 999px;
  background: #173c30;
  border: 1px solid rgba(216, 180, 90, .48);
  color: #f6e9be;
  font-size: 11.5px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .25s ease;
  max-width: min(90vw, 520px);
  text-align: center;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: rgba(232, 120, 102, .55); color: #ffd4ca; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ---------------- 响应式 ---------------- */

@media (max-width: 1180px) and (min-width: 981px) {
  .layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; }
}

@media (max-width: 980px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .board-shell { justify-content: center; }
  .board { width: min(92vw, 780px, calc(100vh - 190px)); width: min(92vw, 780px, calc(100dvh - 190px)); }
  .sidebar { display: flex; flex-direction: column; }
  .action-panel { order: -1; }
  .players-panel { max-height: none; }
  .log-panel { flex: 0 0 220px; height: 220px; min-height: 0; }
}

@media (max-width: 760px) {
  html, body {
    height: 100%;
    overflow: hidden;
  }

  .page {
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    padding: 4px 6px 6px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .topbar {
    flex: 0 0 42px;
    height: 42px;
    gap: 6px;
  }

  .brand { gap: 7px; }
  .brand-mark {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    border-radius: 8px;
  }
  .brand-mark span { font-size: 17px; }
  .brand-text h1 { font-size: 16px; letter-spacing: .03em; }
  .brand-en, .brand-text p { display: none; }

  .top-actions { gap: 4px; }
  .top-actions .btn {
    padding: 5px 7px;
    font-size: 9px;
    border-radius: 7px;
    min-height: 30px;
  }

  .layout {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .board-hint { display: none !important; }

  .board-shell {
    flex: 0 0 auto;
    width: 100%;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    justify-content: center;
  }

  .board {
    width: min(calc(100vw - 12px), calc(100dvh - 250px));
    max-width: none;
    flex: 0 0 auto;
    aspect-ratio: 1;
    border-width: 5px;
    border-radius: 4px;
    outline: none;
    box-shadow: 0 18px 38px rgba(0, 0, 0, .5), 0 0 0 1px rgba(216, 180, 90, .5);
  }

  .sidebar {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
  }

  /* 手机端玩家条：四名玩家横向排列，只保留名字和现金 */
  .players-panel {
    order: 0;
    flex: 0 0 auto;
    max-height: none;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    overflow: visible;
  }
  .players-panel .panel-head { display: none; }
  .players {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }
  .player {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 4px;
    align-items: center;
    padding: 4px 5px;
    border-radius: 8px;
    min-width: 0;
  }
  .player.active { border-color: rgba(216, 180, 90, .42); }
  .pawn {
    width: 20px;
    height: 20px;
    font-size: 9px;
    border-width: 1.5px;
  }
  .player-main { min-width: 0; }
  .player-line {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .player-name {
    font-size: 8px;
    line-height: 1.2;
    max-width: 100%;
  }
  .player-name em { display: none; }
  .player-money { font-size: 9.5px; line-height: 1.2; }
  .player-meta, .chips { display: none; }

  .action-panel {
    order: 1;
    flex: 0 0 auto;
    padding: 7px 8px;
  }
  .status-line {
    min-height: 24px;
    font-size: 9px;
    line-height: 1.35;
  }
  .actions { gap: 4px; margin-top: 5px; }
  .actions .btn {
    padding: 6px 6px;
    font-size: 9px;
    border-radius: 7px;
    min-height: 34px;
  }
  .actions .btn-roll {
    padding: 10px 8px;
    min-height: 44px;
    font-size: 12px;
    letter-spacing: .1em;
  }
  .actions .btn-manage, .actions .btn-trade { flex: 1 1 0; }

  /* 手机端日志固定高度，内部滚动，最新消息在顶部 */
  .log-panel {
    order: 2;
    flex: 0 0 clamp(112px, 16dvh, 150px);
    height: clamp(112px, 16dvh, 150px);
    min-height: 0;
    padding: 5px 8px 6px;
    overflow: hidden;
  }
  .log-panel .panel-head { margin-bottom: 3px; }
  .log-panel .panel-head h2 { font-size: 9px; letter-spacing: .08em; }
  .log-panel .live-dot { font-size: 7px; }
  .log {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: block;
    padding-right: 4px;
    font-size: 8.5px;
    line-height: 1.3;
    scrollbar-width: thin;
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .log-line { padding: 2px 0; gap: 4px; }
  .log-icon { flex: 0 0 10px; font-size: 8px; }
  .log-line.turn { margin-top: 2px; padding-top: 3px; }

  /* 手机棋盘：缩小色带、隐藏价格，让格名尽量可读 */
  .cell { border-width: 1px; }
  .cell-band { background-color: var(--band, #777); }
  .side-bottom .cell-band { height: clamp(8px, 2.2cqw, 14px); }
  .side-top .cell-band { height: clamp(8px, 2.2cqw, 14px); }
  .side-left .cell-band { width: clamp(8px, 2.2cqw, 14px); }
  .side-right .cell-band { width: clamp(8px, 2.2cqw, 14px); }
  .cell-content { gap: 0; padding: 2px; }
  .side-bottom .cell-content { padding: clamp(9px, 2.5cqw, 16px) 2px 2px; }
  .side-top .cell-content { padding: 2px 2px clamp(9px, 2.5cqw, 16px); }
  .side-left .cell-content { padding: 2px clamp(9px, 2.5cqw, 16px) 2px 2px; }
  .side-right .cell-content { padding: 2px 2px 2px clamp(9px, 2.5cqw, 16px); }
  .cell-name {
    font-size: clamp(5.8px, 1.9cqw, 9px);
    line-height: 1.05;
    font-weight: 750;
  }
  .cell-price { display: none; }
  .special-icon { font-size: clamp(11px, 3cqw, 20px); margin-bottom: 0; }
  .special-label { font-size: clamp(5px, 1.35cqw, 8px); line-height: 1.05; }
  .cell.corner .cell-content { padding: 2px; }
  .corner-icon { font-size: clamp(14px, 3.8cqw, 26px); margin-bottom: 0; }
  .corner-title { font-size: clamp(6.5px, 1.8cqw, 10px); letter-spacing: 0; }
  .corner-sub { display: none; }
  .owner-flag {
    top: clamp(1.5px, .45cqw, 3px);
    right: clamp(1.5px, .45cqw, 3px);
    width: clamp(6px, 1.6cqw, 9px);
    height: clamp(6px, 1.6cqw, 9px);
    border-width: 1px;
  }
  .mortgage-tag {
    left: 1px;
    bottom: 1px;
    padding: 0 1px;
    font-size: clamp(4px, .9cqw, 6px);
  }
  .buildings { gap: .5px; }
  .side-bottom .buildings { top: clamp(1.5px, .4cqw, 3px); }
  .side-top .buildings { bottom: clamp(1.5px, .4cqw, 3px); }
  .side-left .buildings { right: clamp(1.5px, .4cqw, 3px); }
  .side-right .buildings { left: clamp(1.5px, .4cqw, 3px); }
  .house-dot { width: clamp(3px, .7cqw, 5px); height: clamp(3px, .7cqw, 5px); border-width: .5px; }
  .hotel-dot { width: clamp(5px, 1.1cqw, 8px); height: clamp(4px, .8cqw, 6px); border-width: .5px; }

  .logo-wrap { padding: clamp(4px, 1cqw, 8px); }
  .logo-eyebrow { display: none; }
  .logo-main { font-size: clamp(26px, 6.4cqw, 50px); }
  .logo-en { font-size: clamp(6.5px, 1.2cqw, 10px); letter-spacing: .32em; }
  .logo-rule { width: clamp(50px, 13cqw, 110px); margin: clamp(4px, .8cqw, 8px) 0; }
  .dice-tray { gap: 8px; min-height: clamp(30px, 5.4cqw, 48px); }
  .die {
    width: clamp(32px, 5.1cqw, 46px);
    border-radius: 7px;
    padding: 9%;
    box-shadow: 0 3px 0 rgba(139, 116, 72, .18), 0 5px 12px rgba(65, 48, 24, .2);
  }
  .center-status {
    margin-top: clamp(5px, 1cqw, 8px);
    padding: 3px 8px;
    font-size: clamp(7px, 1.1cqw, 10px);
  }
  .center-sub { margin-top: 2px; font-size: clamp(6px, .9cqw, 8.5px); }
  .center-footer { display: none; }

  .toast {
    top: 50px;
    bottom: auto;
    font-size: 10px;
    padding: 8px 13px;
  }

  .modal-layer { padding: 8px; align-items: center; }
  .modal-card { max-height: calc(100dvh - 16px); }
  .modal-head { padding: 14px 14px 0; }
  .modal-body { padding: 10px 14px 14px; }
  .modal-title { font-size: 20px; }
  .deed-title { font-size: 18px; }
  .deed-band { height: 24px; }
  .deed-head { padding: 8px 12px 6px; }
  .deed-body { padding: 7px 12px 9px; }
  .rent-table { gap: 2px 10px; font-size: 9.5px; line-height: 1.35; }
  .deed-foot { margin-top: 6px; padding-top: 6px; font-size: 8.5px; }
  .modal-actions { margin-top: 10px; }
  .modal-actions .btn { min-width: 80px; padding: 9px; font-size: 11px; }
  .asset-strip { padding: 8px 10px 7px; margin: 8px 0; }
  .asset-metrics { font-size: 10px; gap: 4px 10px; }
  .asset-chip { font-size: 10px; }
  .asset-chip b { font-size: 8px; }
  .asset-decision { font-size: 11px; }
  .asset-cash strong { font-size: 20px; }
  .trade-grid { grid-template-columns: 1fr; }
  .trade-arrow { display: none; }
  .manage-row { grid-template-columns: 8px minmax(0, 1fr); }
  .manage-btns { grid-column: 2; justify-content: flex-start; }

  /* 弹窗内部可以滑动，但不显示滚动条 */
  .modal-body, .draw-card, .manage-list, .debt-assets, .trade-list, .rules-body {
    scrollbar-width: none;
    overscroll-behavior: contain;
  }
  .modal-body::-webkit-scrollbar,
  .draw-card::-webkit-scrollbar,
  .manage-list::-webkit-scrollbar,
  .debt-assets::-webkit-scrollbar,
  .trade-list::-webkit-scrollbar,
  .rules-body::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 760px) and (max-height: 680px) {
  /* Short phones: keep the fixed log viewport visible instead of clipping
     the bottom of the sidebar. */
  .board {
    width: min(calc(100vw - 12px), calc(100dvh - 330px));
  }
  .log-panel {
    flex: 0 0 88px;
    height: 88px;
  }
}

@media (max-width: 430px) {
  .topbar { gap: 4px; }
  .brand-mark { width: 28px; height: 28px; flex-basis: 28px; }
  .brand-text h1 { font-size: 15px; }
  .top-actions .btn { padding: 4px 5px; font-size: 8.5px; min-height: 28px; }

  .player {
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 3px;
    padding: 3px 4px;
  }
  .pawn { width: 18px; height: 18px; font-size: 8px; }
  .player-name { font-size: 7.5px; }
  .player-money { font-size: 9px; }

  .action-panel { padding: 6px; }
  .status-line { font-size: 8.5px; min-height: 22px; }
  .actions .btn { font-size: 8.5px; padding: 5px; min-height: 34px; }
  .actions .btn-roll { font-size: 11px; padding: 9px; min-height: 42px; }

  .log-panel { padding: 4px 6px 5px; }
  .log { font-size: 8px; }

  .modal-layer { padding: 6px; }
  .modal-card { max-height: calc(100dvh - 12px); }
  .modal-head { padding: 12px 12px 0; }
  .modal-body { padding: 9px 12px 12px; }
  .modal-title { font-size: 19px; }
  .deed-title { font-size: 17px; }
  .asset-cash strong { font-size: 19px; }
}

/* 横屏手机空间太窄，直接提示旋转竖屏，避免挤压和滚动 */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 520px) and (pointer: coarse) {
  html, body { overflow: hidden; }
  .page > * { display: none !important; }
  .modal-layer, .toast { display: none !important; }
  .page::before {
    content: "请将手机旋转为竖屏\A获得完整棋盘和操作区\A\A如果已锁定方向，请先关闭方向锁定";
    white-space: pre-line;
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    background:
      radial-gradient(ellipse at 50% 20%, rgba(216, 180, 90, .16), transparent 55%),
      linear-gradient(160deg, #0a1e17 0%, #06110d 100%);
    color: #f5e7be;
    font-size: 16px;
    line-height: 1.9;
    letter-spacing: .05em;
  }
}


/* ---------------- 联机大厅 ---------------- */

.setup-online-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(28, 48, 36, .12);
}

.online-server {
  margin-bottom: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(28, 48, 36, .14);
  border-radius: 8px;
  background: rgba(28, 48, 36, .04);
  font-size: 10px;
  line-height: 1.4;
  color: #655d4c;
}
.online-server.good { color: #245f43; border-color: rgba(45, 112, 76, .24); background: rgba(45, 112, 76, .07); }
.online-server.bad { color: #8c3b31; border-color: rgba(185, 59, 49, .22); background: rgba(185, 59, 49, .06); }
.online-server.checking { color: #8b7440; }

.online-resume {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 9px 11px;
  border: 1px solid rgba(178, 139, 58, .28);
  border-radius: 9px;
  background: rgba(216, 180, 90, .1);
}
.online-resume div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.online-resume strong { font: 600 12px/1.3 "Songti SC", "SimSun", serif; color: #5d4a22; }
.online-resume span { font-size: 9px; color: #8a7b5d; }

.online-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
  font-size: 9px;
  letter-spacing: .08em;
  color: #786f5c;
}

.online-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.online-box {
  padding: 12px;
  border: 1px solid rgba(28, 48, 36, .13);
  border-radius: 10px;
  background: rgba(255, 252, 243, .5);
}
.online-box h3 {
  margin: 0 0 3px;
  font: 600 15px/1.3 "Songti SC", "SimSun", serif;
  color: #25392c;
}
.online-box p { margin: 0 0 9px; font-size: 9px; line-height: 1.5; color: #837a66; }
.online-seat-choice { display: flex; gap: 5px; margin: 8px 0 10px; }
.online-seat-choice .btn { flex: 1; padding: 5px 4px; font-size: 9px; }
.online-code-input {
  width: 100%;
  margin-bottom: 9px;
  text-transform: uppercase;
  letter-spacing: .2em;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
}
.online-box .btn-block { width: 100%; }

.online-connect {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 22px 8px 12px;
  text-align: center;
  color: #756b58;
  font-size: 11px;
}
.online-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(178, 139, 58, .25);
  border-top-color: #b28b3a;
  border-radius: 50%;
  animation: online-spin 1s linear infinite;
}
@keyframes online-spin { to { transform: rotate(360deg); } }

.online-code-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(178, 139, 58, .25);
  border-radius: 10px;
  background: rgba(216, 180, 90, .08);
}
.online-code-row > div { display: flex; flex-direction: column; gap: 2px; margin-right: auto; }
.online-caption { font-size: 8px; letter-spacing: .14em; color: #8b7c5f; }
.online-code {
  font: 700 26px/1.1 "Courier New", monospace;
  letter-spacing: .22em;
  color: #4e3f1f;
}
.online-seats { display: flex; flex-direction: column; gap: 6px; }
.online-seat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px dashed rgba(28, 48, 36, .18);
  border-radius: 8px;
  color: #8c826d;
  font-size: 10px;
}
.online-seat.joined { border-style: solid; color: #2b3a2f; background: rgba(255, 252, 243, .45); }
.online-seat.mine { border-color: rgba(178, 139, 58, .38); background: rgba(216, 180, 90, .1); }
.online-seat-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #b8b0a0; }
.online-seat-dot.on { background: #4b9a6b; box-shadow: 0 0 0 2px rgba(75, 154, 107, .14); }
.online-seat-name { flex: 1 1 auto; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.online-badge {
  padding: 1px 5px;
  border: 1px solid rgba(178, 139, 58, .3);
  border-radius: 999px;
  font-size: 7px;
  letter-spacing: .08em;
  color: #7d642f;
}
.online-badge.me { color: #2d6a4a; border-color: rgba(45, 106, 74, .3); }
.online-seat-state { margin-left: auto; font-size: 8px; color: #918671; }

.online-trade-offer .trade-wait p { font-size: 12px; line-height: 1.8; }

.modal-layer.pending .btn,
.modal-layer.pending input,
.modal-layer.pending select {
  pointer-events: none;
  opacity: .55;
}

@media (max-width: 760px) {
  .online-split { grid-template-columns: 1fr; }
  .online-code-row { align-items: flex-start; }
  .online-code { font-size: 22px; }
  .online-code-row .btn { padding: 6px 8px; font-size: 9px; }
  .online-seat { padding: 7px 8px; }
  .online-box { padding: 10px; }
}

.setup-online-hint {
  font-size: 9.5px;
  line-height: 1.5;
  color: #8a7f6a;
}
.setup-online-hint strong { color: #5d4a22; }

.online-warn { color: #8c3b31; font-weight: 600; }

/* ---------------- Accessibility / settings / final polish ---------------- */

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  left: 8px;
  top: 8px;
  z-index: 2600;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f4eedd;
  color: #17352a;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform .15s ease;
}
.skip-link:focus { transform: translateY(0); outline: 2px solid #d8b45a; outline-offset: 2px; }

.log:focus-visible,
.btn:focus-visible,
.cell:focus-visible,
.modal-close:focus-visible,
.settings-option:focus-visible,
.input:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid #d8b45a;
  outline-offset: 2px;
}

.btn:disabled { opacity: .56; }

.settings-section h3 {
  margin: 0 0 4px;
  font: 600 16px/1.3 "Songti SC", "SimSun", serif;
  color: #25392c;
}
.settings-copy {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.6;
  color: #6f6654;
}
.settings-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.settings-option {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 68px;
  padding: 9px 10px;
  border: 1px solid rgba(28, 48, 36, .16);
  border-radius: 9px;
  background: rgba(255, 252, 243, .55);
  color: #3d4b41;
  text-align: left;
  cursor: pointer;
}
.settings-option strong { font-size: 12px; color: #26352c; }
.settings-option span { font-size: 9px; line-height: 1.45; color: #847a65; }
.settings-option.selected {
  border-color: rgba(178, 139, 58, .55);
  background: rgba(216, 180, 90, .16);
  box-shadow: inset 0 0 0 1px rgba(178, 139, 58, .16);
}

.rotate-hint { display: none; }

@media (max-width: 760px) {
  .top-actions { gap: 3px; }
  .top-actions .btn { padding: 5px 6px; font-size: 8.5px; }
  .modal-close { width: 34px; height: 34px; top: 9px; right: 9px; }
  .status-line { font-size: 10.5px; min-height: 28px; }
  .player-money { font-size: 10px; }
  .cell-name { font-size: clamp(6.2px, 1.9cqw, 9px); }
  .settings-options { grid-template-columns: 1fr; }
  .settings-option { min-height: 0; }
  .log {
    display: block;
    overflow-y: auto;
    scrollbar-width: thin;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .log::-webkit-scrollbar { display: block; width: 6px; }

  /* Mobile paint budget: fixed textures and backdrop blur are expensive
     on low-end devices and are not needed at phone sizes. */
  body { background-attachment: scroll; }
  body::before { opacity: .16; }
  body::after { display: none; }
  .modal-layer {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(3, 11, 8, .86);
  }
  .log::-webkit-scrollbar-thumb { background: rgba(216, 180, 90, .45); }
}

@media (max-width: 430px) {
  .top-actions .btn { padding: 4px 4.5px; font-size: 8px; min-height: 28px; }
  .status-line { font-size: 10px; min-height: 26px; }
  .player-name { font-size: 8.5px; }
  .player-money { font-size: 9.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

@media (max-width: 900px) and (orientation: landscape) and (max-height: 520px) and (pointer: coarse) {
  .page::before { content: none !important; display: none !important; }
  .rotate-hint {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    background:
      radial-gradient(ellipse at 50% 20%, rgba(216, 180, 90, .16), transparent 55%),
      linear-gradient(160deg, #0a1e17 0%, #06110d 100%);
    color: #f5e7be;
    font-size: 16px;
    line-height: 1.9;
    letter-spacing: .05em;
  }
}

.saved-game {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 12px;
  padding: 9px 11px;
  border: 1px solid rgba(178, 139, 58, .32);
  border-radius: 9px;
  background: rgba(216, 180, 90, .1);
}
.saved-game > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.saved-game strong { font: 600 12px/1.3 "Songti SC", "SimSun", serif; color: #5d4a22; }
.saved-game span { font-size: 9px; color: #827456; }
.saved-game .btn { flex: 0 0 auto; }

/* ---------------- 视觉升级：棋子、棋盘信息与实体材质 ---------------- */

.token-svg {
  width: 64%;
  height: 64%;
  display: block;
  pointer-events: none;
}

.setup-avatar .token-svg,
.asset-pawn .token-svg,
.pawn .token-svg,
.token .token-svg {
  color: #fffaf0;
}

.setup-avatar .token-svg { width: 62%; height: 62%; }
.asset-pawn .token-svg { width: 62%; height: 62%; }
.pawn .token-svg { width: 63%; height: 63%; }

.pawn,
.asset-pawn,
.setup-avatar {
  color: #fffaf0;
}

/* 棋盘格：纸质底、黄铜价格牌、组色带 */
.cell {
  background-image:
    radial-gradient(circle at 18% 8%, rgba(255, 255, 255, .42), transparent 42%),
    linear-gradient(155deg, rgba(255, 255, 255, .16), transparent 55%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .42);
}

.cell.owned {
  background-color: color-mix(in srgb, var(--owner) 13%, #f4eedd);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--owner) 72%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .32);
}

.cell.owned:hover {
  box-shadow:
    inset 0 0 0 2px var(--gold),
    inset 0 0 0 3px var(--owner),
    inset 0 8px 18px rgba(255, 255, 255, .2);
}

.cell-band {
  box-shadow:
    inset 0 -1px 0 rgba(255, 255, 255, .28),
    inset 0 1px 0 rgba(0, 0, 0, .12),
    0 1px 2px rgba(57, 43, 21, .18);
}

.cell-band::after {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(255, 255, 255, .16);
  pointer-events: none;
}

.cell-price {
  max-width: calc(100% - 4px);
  padding: 0 2px;
  border: 1px solid rgba(126, 102, 56, .24);
  border-radius: 2px;
  color: #4b3c24;
  background: linear-gradient(180deg, #f7e9c8, #e5d09c);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .65),
    0 1px 0 rgba(89, 64, 27, .16);
  font-weight: 700;
}

.cell.unowned:not(.corner) .cell-price {
  border-color: rgba(130, 100, 44, .34);
}

/* 所有权：玩家色小旗 + 首字，不再只是难以辨认的小圆点 */
.owner-flag {
  top: 1px;
  right: 1px;
  width: clamp(9px, 1.35cqw, 14px);
  height: clamp(9px, 1.35cqw, 14px);
  display: grid;
  place-items: center;
  border-radius: 2px;
  border: 1px solid rgba(255, 253, 246, .92);
  color: #fffdf4;
  font: 800 clamp(4.5px, .76cqw, 7.5px)/1 var(--sans);
  letter-spacing: -.03em;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .28);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, .34),
    inset 0 0 0 1px rgba(0, 0, 0, .1);
}

/* 抵押：斜向印章，而不是左下角一块小灰字 */
.mortgage-tag {
  left: 50%;
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%) rotate(-12deg);
  padding: 1px 3px;
  border: 1px solid rgba(151, 48, 39, .72);
  border-radius: 2px;
  color: #96382f;
  background: rgba(250, 242, 221, .88);
  font-size: clamp(4px, .68cqw, 6px);
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.2;
  box-shadow: 0 1px 2px rgba(91, 43, 29, .2);
  backdrop-filter: blur(1px);
}

/* 建筑：色带上放奶油墙、深绿房子和红屋顶酒店 */
.buildings {
  gap: 1.5px;
}

.house-dot {
  width: clamp(5px, .92cqw, 8px);
  height: clamp(6px, 1.08cqw, 9px);
  border: 0;
  border-radius: 0;
  background: #1f704b;
  clip-path: polygon(50% 0, 100% 38%, 100% 100%, 0 100%, 0 38%);
  filter: drop-shadow(0 0 1px rgba(247, 240, 221, .95)) drop-shadow(0 1px 1px rgba(0, 0, 0, .5));
}

.hotel-dot {
  width: clamp(8px, 1.34cqw, 11px);
  height: clamp(7px, 1.14cqw, 10px);
  border: 0;
  border-radius: 0;
  background: #a9352d;
  clip-path: polygon(50% 0, 100% 34%, 100% 100%, 0 100%, 0 34%);
  filter: drop-shadow(0 0 1px rgba(247, 240, 221, .95)) drop-shadow(0 1px 1px rgba(0, 0, 0, .5));
}

.card-symbol .board-icon {
  width: clamp(30px, 5.4cqw, 48px);
  height: clamp(30px, 5.4cqw, 48px);
  display: block;
}

.special-icon .board-icon {
  width: clamp(14px, 2.5cqw, 22px);
  height: clamp(14px, 2.5cqw, 22px);
  display: block;
}

.corner-icon .board-icon {
  width: clamp(17px, 3.2cqw, 30px);
  height: clamp(17px, 3.2cqw, 30px);
  display: block;
}

.cell-railroad .special-icon { color: #584b34; }
.cell-utility .special-icon { color: #2b6e58; }
.cell-tax .special-icon { color: #856d35; }

/* 棋盘中央：黄铜骰盘 + 银行/牌堆 */
.dice-tray {
  padding: clamp(4px, .7cqw, 8px);
  border: 1px solid rgba(177, 143, 73, .35);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 245, 207, .9), rgba(174, 137, 66, .18) 65%, rgba(108, 80, 34, .14));
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, .72),
    inset 0 -2px 5px rgba(117, 83, 34, .12),
    0 5px 15px rgba(81, 55, 23, .12);
}

.center-bank {
  position: absolute;
  bottom: clamp(22px, 3.6cqw, 34px);
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(7px, 1.2cqw, 13px);
  opacity: .9;
  pointer-events: none;
}

.mini-deck {
  width: clamp(24px, 4.1cqw, 40px);
  height: clamp(16px, 2.6cqw, 26px);
  display: grid;
  place-items: center;
  border: 1px solid rgba(89, 69, 34, .35);
  border-radius: 3px;
  color: #5b4728;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .42), transparent 45%),
    linear-gradient(150deg, #f5e8c9, #d9c18e);
  box-shadow:
    2px 2px 0 rgba(91, 65, 29, .16),
    0 4px 9px rgba(79, 53, 20, .16);
  font-size: clamp(4px, .68cqw, 6px);
  letter-spacing: .06em;
  transform: rotate(-5deg);
}

.mini-deck b { font-weight: 800; white-space: nowrap; }
.mini-chest { transform: rotate(5deg); background: linear-gradient(150deg, #e8f0eb, #c8d7ca); }
.bank-seal {
  width: clamp(18px, 3cqw, 29px);
  height: clamp(18px, 3cqw, 29px);
  display: grid;
  place-items: center;
  border: 1px solid rgba(177, 143, 73, .55);
  border-radius: 50%;
  color: #8c682b;
  background: radial-gradient(circle at 35% 25%, #fff8dc, #d5b66f 75%);
  box-shadow: 0 2px 6px rgba(92, 63, 24, .18), inset 0 0 0 2px rgba(255, 255, 255, .2);
  font: 800 clamp(3.5px, .6cqw, 5px)/1 var(--sans);
  letter-spacing: .08em;
}

/* 让侧栏更像桌游账本，而不是独立网页卡片 */
.panel {
  border-radius: 12px;
  border-color: rgba(216, 180, 90, .16);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, .22),
    inset 0 1px 0 rgba(216, 180, 90, .1),
    inset 0 -1px 0 rgba(0, 0, 0, .25);
}

.board {
  box-shadow:
    0 35px 80px rgba(0, 0, 0, .55),
    0 0 0 1px rgba(0, 0, 0, .6),
    0 0 0 5px rgba(216, 180, 90, .045),
    inset 0 0 0 2px rgba(216, 180, 90, .08);
}

.board-center {
  box-shadow:
    inset 0 0 52px rgba(122, 94, 42, .12),
    inset 0 0 0 1px rgba(255, 255, 255, .28);
}

@media (max-width: 760px) {
  .center-bank { display: none; }
  .token .token-svg { width: 68%; height: 68%; }
  .owner-flag {
    width: 9px;
    height: 9px;
    font-size: 5px;
    border-width: 1px;
  }
  .cell-price {
    padding: 0 1px;
    max-width: calc(100% - 2px);
  }
  .mortgage-tag {
    padding: 0 2px;
    font-size: 4.5px;
    letter-spacing: .06em;
  }
}

/* seat badge: keep outside the narrow-screen block above */
.player-seat {
  display: inline-grid;
  place-items: center;
  width: 13px;
  height: 13px;
  margin-right: 4px;
  border-radius: 3px;
  color: #2a3c30;
  background: #e6d3a1;
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
  font: 800 8px/1 var(--sans);
  vertical-align: 1px;
}
@media (max-width: 760px) {
  .player-name { font-size: 9px; line-height: 1.2; max-width: 100%; }
  .player-seat { width: 12px; height: 12px; margin-right: 3px; font-size: 7px; }
}
@media (max-width: 430px) {
  .player-name { font-size: 8.5px; }
  .player-seat { width: 12px; height: 12px; margin-right: 3px; font-size: 7px; }
}

/* ---------------- 更紧凑的中心与更大的边框格 ---------------- */
.page { width: min(1320px, 100%); }

@media (max-width: 760px) {
  .page { width: min(1320px, 100%); }
}

@media (max-width: 760px) {
  .cell-name { font-size: clamp(6.4px, 2cqw, 9.2px); }
  .cell-price { font-size: clamp(5.5px, 1.02cqw, 7.6px); }
  .special-label { font-size: clamp(5.9px, 1.14cqw, 8.4px); }
}

/* ---------------- 动效与材质增强 ---------------- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .028;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.token .token-svg {
  width: 68%;
  height: 68%;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25));
}

.token.walking .token-svg {
  animation: tokenHop .28s ease-in-out infinite;
  transform-origin: 50% 88%;
}

@keyframes tokenHop {
  0%, 100% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-14%) scale(1.04); }
}

@keyframes dieTumble {
  0% { transform: perspective(180px) rotateX(0deg) rotateY(0deg) translateY(0); }
  28% { transform: perspective(180px) rotateX(-18deg) rotateY(14deg) translateY(-4px); }
  56% { transform: perspective(180px) rotateX(17deg) rotateY(-18deg) translateY(-1px); }
  82% { transform: perspective(180px) rotateX(-9deg) rotateY(9deg) translateY(-3px); }
  100% { transform: perspective(180px) rotateX(0deg) rotateY(0deg) translateY(0); }
}

.modal-card {
  animation: paperIn .3s cubic-bezier(.2, .8, .25, 1);
}

.buy-card {
  animation: paperUnfold .42s cubic-bezier(.2, .8, .25, 1);
}

.draw-card {
  animation: cardFlipIn .55s cubic-bezier(.2, .8, .25, 1);
  transform-origin: 50% 50%;
}

@keyframes paperIn {
  0% { opacity: 0; transform: translateY(10px) scale(.975); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes paperUnfold {
  0% { opacity: 0; transform: perspective(900px) rotateX(-8deg) translateY(20px) scaleY(.86); }
  100% { opacity: 1; transform: perspective(900px) rotateX(0) translateY(0) scaleY(1); }
}

@keyframes cardFlipIn {
  0% { opacity: 0; transform: perspective(900px) rotateY(-72deg) scale(.92); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: perspective(900px) rotateY(0) scale(1); }
}

.cell.just-acquired::after {
  content: "SOLD";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 30;
  padding: 2px 5px;
  border: 1.5px solid rgba(158, 45, 37, .82);
  border-radius: 2px;
  color: rgba(158, 45, 37, .92);
  background: rgba(250, 244, 227, .82);
  box-shadow: 0 0 0 1px rgba(158, 45, 37, .12);
  font: 800 clamp(6px, 1.05cqw, 9px)/1 var(--sans);
  letter-spacing: .08em;
  transform: translate(-50%, -50%) rotate(-11deg);
  animation: stampIn .9s cubic-bezier(.2, 1.2, .4, 1) both;
  pointer-events: none;
}

@keyframes stampIn {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-11deg) scale(1.8); }
  45% { opacity: 1; transform: translate(-50%, -50%) rotate(-11deg) scale(.94); }
  70% { transform: translate(-50%, -50%) rotate(-11deg) scale(1.02); }
  100% { opacity: .92; transform: translate(-50%, -50%) rotate(-11deg) scale(1); }
}

.buildings.just-built .house-dot,
.buildings.just-built .hotel-dot {
  animation: buildingPop .6s cubic-bezier(.2, 1.15, .35, 1) both;
}

@keyframes buildingPop {
  0% { opacity: 0; transform: translateY(6px) scale(.45); }
  55% { opacity: 1; transform: translateY(-2px) scale(1.15); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.settings-section + .settings-section {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px dashed rgba(136, 111, 67, .24);
}

.settings-toggle {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(178, 139, 58, .38);
  border-radius: 8px;
  color: #4b4a3e;
  background: rgba(255, 251, 239, .68);
  text-align: left;
  cursor: pointer;
}

.settings-toggle strong { font-size: 12px; color: #26352c; }
.settings-toggle span { font-size: 9px; color: #847a65; }
.settings-toggle.selected {
  border-color: rgba(58, 112, 79, .5);
  background: rgba(222, 237, 222, .52);
  box-shadow: inset 0 0 0 1px rgba(58, 112, 79, .12);
}
.settings-toggle.selected strong { color: #2f6f4c; }

.attribution a { color: #7d5c28; text-decoration: underline; text-underline-offset: 2px; }

.confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  overflow: hidden;
  pointer-events: none;
}
.confetti-layer i {
  position: absolute;
  top: -18px;
  width: 7px;
  height: 14px;
  border-radius: 1px;
  opacity: 0;
  animation: confettiFall 2.6s ease-in forwards;
}
@keyframes confettiFall {
  0% { opacity: 0; transform: translate3d(0, -10px, 0) rotate(0deg); }
  8% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--drift), 105vh, 0) rotate(var(--spin)); }
}

@media (prefers-reduced-motion: reduce) {
  body::after { display: none; }
  .modal-card, .buy-card, .draw-card, .token.walking .token-svg,
  .buildings.just-built .house-dot, .buildings.just-built .hotel-dot { animation: none !important; }
  .cell.just-acquired::after { display: none; }
  .confetti-layer { display: none; }
}

/* 现金变化浮字 */
.player { position: relative; overflow: visible; }
.money-float {
  position: absolute;
  right: 11px;
  top: 4px;
  z-index: 8;
  padding: 1px 5px;
  border-radius: 4px;
  font: 800 10px/1.2 var(--sans);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  animation: moneyFloat 1.05s cubic-bezier(.2, .8, .25, 1) both;
}
.money-float.gain {
  color: #f3d486;
  background: rgba(33, 92, 64, .82);
  border: 1px solid rgba(216, 180, 90, .42);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.money-float.loss {
  color: #ffd5c9;
  background: rgba(126, 42, 35, .84);
  border: 1px solid rgba(255, 192, 166, .25);
}
@keyframes moneyFloat {
  0% { opacity: 0; transform: translateY(8px) scale(.92); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-18px) scale(1); }
}
@media (max-width: 430px) {
  .money-float { right: 5px; top: 2px; font-size: 8.5px; padding: 1px 3px; }
}

/* ---------------- 纸质卡面 / 地契精修 ---------------- */
.modal-card {
  background-image:
    radial-gradient(ellipse at 8% 0%, rgba(255, 255, 255, .7), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='.16'/%3E%3C/svg%3E");
  background-size: auto, 180px 180px;
  box-shadow:
    0 2px 0 rgba(255, 255, 255, .8) inset,
    0 24px 70px rgba(16, 30, 22, .38),
    0 2px 0 rgba(68, 51, 20, .18);
}

.deed {
  position: relative;
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(255, 255, 255, .85), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='190' height='190'%3E%3Cfilter id='d'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.62' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23d)' opacity='.14'/%3E%3C/svg%3E");
  background-size: auto, 190px 190px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .7),
    0 12px 28px rgba(68, 51, 20, .12);
}

.deed::before {
  content: "";
  position: absolute;
  inset: 7px;
  z-index: 0;
  border: 1px solid rgba(150, 121, 65, .24);
  border-radius: 8px;
  pointer-events: none;
}

.deed::after {
  content: "DEED";
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(96, 76, 39, .038);
  font: 800 clamp(44px, 9cqw, 82px)/1 var(--serif);
  letter-spacing: .16em;
  transform: rotate(-13deg);
  pointer-events: none;
}

.deed > * { position: relative; z-index: 1; }

.deed-band {
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .1) 0 1px, transparent 1px 8px),
    linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(0, 0, 0, .08));
  background-blend-mode: soft-light, normal;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.deed-head {
  background: linear-gradient(180deg, rgba(255, 255, 255, .36), transparent);
}

.deed-title { letter-spacing: .03em; }
.deed-price {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 3px 9px;
  border: 1px solid rgba(147, 116, 54, .3);
  border-radius: 3px;
  background: rgba(255, 250, 236, .72);
}

.deed-price strong { font-size: 17px; }

.deed-foot {
  color: #746a55;
  font-size: 9px;
  line-height: 1.45;
}

.deed-mortgaged {
  border-top: 1px dashed rgba(140, 59, 49, .35);
  padding-top: 7px;
}

.draw-card .card-symbol {
  position: relative;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
  border: 1px solid rgba(143, 109, 47, .35);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #fffdf5, #ead9b4);
  box-shadow: 0 3px 0 rgba(107, 80, 33, .12), inset 0 0 0 5px rgba(255, 255, 255, .35);
}
.draw-card .card-symbol .board-icon { width: 38px; height: 38px; }

.buy-card .modal-head { background: linear-gradient(180deg, rgba(255, 255, 255, .28), transparent); }
.buy-card .buy-deed { filter: drop-shadow(0 10px 16px rgba(67, 50, 21, .1)); }

@media (max-width: 760px) {
  .deed::after { font-size: 48px; }
  .deed-price { padding: 2px 7px; }
  .deed-price strong { font-size: 15px; }
  .draw-card .card-symbol { width: 54px; height: 54px; }
  .draw-card .card-symbol .board-icon { width: 32px; height: 32px; }
}

/* 中心银行的实体感 */
.center-bank {
  bottom: clamp(16px, 2.8cqw, 28px);
  gap: clamp(10px, 1.6cqw, 18px);
  opacity: 1;
  filter: drop-shadow(0 5px 8px rgba(72, 48, 17, .18));
}
.center-bank::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 190px;
  height: 24px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(86, 61, 26, .16), transparent 70%);
  z-index: -1;
}
.mini-deck {
  width: clamp(31px, 5cqw, 48px);
  height: clamp(21px, 3.4cqw, 33px);
  font-size: clamp(4.5px, .78cqw, 7px);
}
.bank-seal {
  width: clamp(23px, 3.8cqw, 36px);
  height: clamp(23px, 3.8cqw, 36px);
  font-size: clamp(4px, .68cqw, 5.6px);
}

/* ---------------- 回合、监狱、拍卖与抽卡 ---------------- */
.center-status.turn-pop {
  animation: turnPop .62s cubic-bezier(.2, .9, .3, 1.25);
}

@keyframes turnPop {
  0% { transform: translateY(6px) scale(.9); opacity: .35; }
  55% { transform: translateY(-2px) scale(1.04); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.jail-bars {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  justify-content: space-evenly;
  pointer-events: none;
  background: rgba(13, 26, 20, .16);
  animation: jailFade 1.25s ease both;
  overflow: hidden;
}
.jail-bars::before,
.jail-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 7px;
  background: linear-gradient(180deg, #6f7365, #29322b 45%, #151e19);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .5);
}
.jail-bars::before { top: 27%; }
.jail-bars::after { bottom: 27%; }
.jail-bars i {
  width: 9px;
  height: 112%;
  margin-top: -6%;
  background: linear-gradient(90deg, #222d26, #777b6a 42%, #333e35 70%, #171f1a);
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(0, 0, 0, .35);
  transform-origin: 50% 0;
  animation: jailDrop .45s cubic-bezier(.2, 1.1, .4, 1) both;
}
.jail-bars i:nth-child(2) { animation-delay: .03s; }
.jail-bars i:nth-child(3) { animation-delay: .06s; }
.jail-bars i:nth-child(4) { animation-delay: .09s; }
.jail-bars i:nth-child(5) { animation-delay: .12s; }
.jail-bars i:nth-child(6) { animation-delay: .15s; }
.jail-bars i:nth-child(7) { animation-delay: .18s; }

@keyframes jailDrop {
  0% { transform: translateY(-110%); opacity: .3; }
  70% { transform: translateY(4%); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes jailFade {
  0% { opacity: 0; }
  10% { opacity: 1; }
  76% { opacity: 1; }
  100% { opacity: 0; }
}

.auction-eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
}
.auction-gavel {
  display: inline-grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid rgba(143, 109, 47, .34);
  border-radius: 50%;
  color: #765a29;
  background: radial-gradient(circle at 35% 26%, #fff9df, #e2c98e);
}
.auction-gavel .board-icon {
  width: 15px;
  height: 15px;
  transform-origin: 25% 30%;
  animation: gavelTap .7s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes gavelTap {
  0% { transform: rotate(-32deg); }
  48% { transform: rotate(8deg); }
  64% { transform: rotate(-4deg); }
  100% { transform: rotate(0); }
}

.draw-card {
  position: relative;
  overflow: hidden;
  background: #fbf6e8;
  border: 1px solid rgba(91, 70, 30, .38);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6), 0 24px 60px rgba(25, 35, 25, .28);
}
.draw-card::before {
  content: "CHANCE";
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(172, 105, 35, .055);
  font: 800 clamp(58px, 12cqw, 108px)/1 var(--serif);
  letter-spacing: .08em;
  transform: rotate(-15deg);
  pointer-events: none;
}
.draw-card.chest::before { content: "FUND"; color: rgba(45, 110, 118, .055); }
.draw-card > * { position: relative; z-index: 1; }
.draw-card .card-ribbon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  color: #fffaf0;
  background: linear-gradient(180deg, #d28b3f, #b96f25);
  border-bottom: 1px solid rgba(92, 58, 19, .28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 2px 0 rgba(255, 255, 255, .16);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .26em;
  text-transform: uppercase;
}
.draw-card.chest .card-ribbon {
  background: linear-gradient(180deg, #4f929b, #2f727b);
}
.draw-card .card-symbol {
  margin-top: 3px;
}
.draw-card .card-title {
  margin-top: 4px;
  font-size: 23px;
}
.draw-card .card-text {
  max-width: 330px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
}
.draw-card .card-inner::after {
  content: "";
  display: block;
  width: 54px;
  height: 1px;
  margin: 13px auto 0;
  background: linear-gradient(90deg, transparent, #b79b62, transparent);
}

@media (max-width: 760px) {
  .jail-bars i { width: 6px; }
  .draw-card::before { font-size: 64px; }
}

/* ---------------- 账本式交易 / 资产管理 ---------------- */
.ledger-card .modal-body {
  background-image: repeating-linear-gradient(180deg, rgba(117, 92, 51, .045) 0 1px, transparent 1px 24px);
  background-position: 0 4px;
}
.ledger-card .modal-head {
  border-bottom: 2px solid rgba(154, 121, 59, .28);
  box-shadow: 0 2px 0 rgba(255, 255, 255, .52);
}
.ledger-card .modal-title::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 7px;
  background: linear-gradient(90deg, var(--gold, #b58b45), transparent);
}

.manage-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 13px;
}
.manage-summary span {
  min-width: 0;
  padding: 7px 5px;
  border: 1px solid rgba(154, 121, 59, .24);
  border-radius: 6px;
  background: rgba(255, 251, 239, .62);
  text-align: center;
  font-size: 8px;
  color: #8a7b61;
}
.manage-summary strong {
  display: block;
  margin-top: 3px;
  font: 700 12px/1.1 var(--serif);
  color: #293b30;
  font-variant-numeric: tabular-nums;
}
.manage-group-head {
  margin: 12px 0 5px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(154, 121, 59, .26);
  color: #725628;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .16em;
}
.manage-row {
  position: relative;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  margin-bottom: 5px;
  padding: 8px 8px 8px 10px;
  border: 1px solid rgba(154, 121, 59, .16);
  border-left: 3px solid var(--sc, #b9a471);
  border-radius: 6px;
  background: rgba(255, 251, 240, .46);
}
.manage-row:nth-child(even) { background: rgba(177, 142, 73, .045); }
.manage-btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.manage-btns .btn { min-height: 25px; padding: 4px 6px; font-size: 8.5px; }
.manage-list { max-height: 48vh; overflow-y: auto; padding-right: 2px; }

.trade-card .modal-body { padding-top: 12px; }
.trade-grid { position: relative; }
.trade-grid::after {
  content: "⇄";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  transform: translate(-50%, -50%) rotate(-8deg);
  border: 1px solid rgba(151, 116, 52, .38);
  border-radius: 50%;
  color: #7c5b27;
  background: radial-gradient(circle at 35% 25%, #fff9e5, #e6cc94);
  box-shadow: 0 4px 12px rgba(88, 60, 23, .18);
  font-size: 20px;
  font-weight: 800;
  pointer-events: none;
}
.trade-box {
  position: relative;
  padding: 11px;
  border: 1px solid rgba(154, 121, 59, .26);
  border-top: 3px solid var(--tc, #b9a471);
  border-radius: 7px;
  background: rgba(255, 250, 238, .48);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4);
}
.trade-box h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 2px;
  color: #34463a;
  font-size: 11px;
}
.trade-box h3 i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tc);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .7);
}
.trade-net { color: #8a7d64; font-size: 8.5px; }
.trade-list { margin: 7px 0; }
.prop-check {
  padding: 4px 5px;
  border-bottom: 1px dashed rgba(154, 121, 59, .18);
  border-radius: 3px;
}
.prop-check:hover { background: rgba(216, 180, 90, .09); }
.prop-check.disabled { opacity: .42; }
.trade-cash {
  margin-top: 7px;
  padding: 6px;
  border: 1px dashed rgba(154, 121, 59, .26);
  border-radius: 5px;
  background: rgba(255, 252, 243, .5);
}
.trade-cash label { font-size: 8.5px; color: #83745b; }
.trade-cash .input { margin-top: 3px; }

.board-medallion {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 8px;
  border: 1px solid rgba(143, 109, 47, .38);
  border-radius: 50%;
  color: #725729;
  background: radial-gradient(circle at 36% 27%, #fff9df, #e4cb93);
  box-shadow: 0 4px 0 rgba(107, 80, 33, .12), inset 0 0 0 5px rgba(255, 255, 255, .32);
}
.board-medallion .board-icon { width: 30px; height: 30px; }

.bankrupt-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 14;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 190px;
  padding: 14px 24px;
  transform: translate(-50%, -50%) rotate(-5deg);
  border: 3px double rgba(151, 44, 35, .8);
  border-radius: 4px;
  color: #8d3028;
  background: rgba(250, 239, 214, .93);
  box-shadow: 0 16px 40px rgba(20, 24, 18, .3);
  animation: bankruptStamp .55s cubic-bezier(.2, 1.3, .4, 1) both;
  pointer-events: none;
}
.bankrupt-kicker { font: 800 10px/1 var(--sans); letter-spacing: .24em; }
.bankrupt-overlay strong { font: 700 23px/1.2 var(--serif); }
.bankrupt-overlay span:last-child { font-size: 9px; letter-spacing: .18em; }
@keyframes bankruptStamp {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-5deg) scale(2.4); }
  55% { opacity: 1; transform: translate(-50%, -50%) rotate(-5deg) scale(.92); }
  100% { opacity: 1; transform: translate(-50%, -50%) rotate(-5deg) scale(1); }
}
@keyframes bankruptOut {
  to { opacity: 0; transform: translate(-50%, -50%) rotate(-5deg) scale(.96); }
}
.bankrupt-overlay.bankrupt-out { animation: bankruptOut .32s ease forwards; }

@media (max-width: 760px) {
  .manage-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .trade-grid::after { display: none; }
  .manage-list { max-height: 42vh; }
  .bankrupt-overlay { min-width: 160px; padding: 11px 18px; }
  .bankrupt-overlay strong { font-size: 19px; }
}

/* ---------------- 开局游戏盒 / 联机大厅 / 实体桌框 ---------------- */
.setup-card,
.online-lobby-card {
  overflow: hidden;
}

.setup-hero {
  position: relative;
  padding: 21px 24px 17px;
  text-align: center;
  color: #f6e8bf;
  background:
    radial-gradient(ellipse at 50% -40%, rgba(216, 180, 90, .28), transparent 62%),
    linear-gradient(145deg, #173d2f, #0a241b 70%);
  border-bottom: 2px solid rgba(196, 153, 73, .58);
  box-shadow: inset 0 -1px 0 rgba(255, 244, 210, .12), 0 8px 20px rgba(20, 35, 25, .14);
}
.setup-hero::before,
.online-hero::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(216, 180, 90, .2);
  border-radius: 10px;
  pointer-events: none;
}
.setup-box-eyebrow,
.online-hero-eyebrow {
  font: 800 8px/1 var(--sans);
  letter-spacing: .32em;
  color: #d6b978;
}
.setup-box-title {
  margin: 8px 0 0;
  color: #f7e8bd;
  font: 700 clamp(30px, 4.6vw, 42px)/1 var(--serif);
  letter-spacing: .1em;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .22);
}
.setup-box-en {
  margin-top: 5px;
  color: #c7ab72;
  font: 700 8px/1 var(--sans);
  letter-spacing: .28em;
}
.setup-box-rule {
  width: 72px;
  height: 2px;
  margin: 10px auto 8px;
  background: linear-gradient(90deg, transparent, #d8b45a, transparent);
}
.setup-box-sub { color: #e7d8b2; font-size: 10px; letter-spacing: .12em; }
.setup-box-meta {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 9px;
  color: rgba(229, 205, 151, .68);
  font: 700 7px/1 var(--sans);
  letter-spacing: .14em;
}
.setup-box-meta span + span::before { content: "·"; margin-right: 10px; }

.setup-body { padding-top: 12px; }
.setup-card .modal-close { color: #f6e8bf; border-color: rgba(246, 232, 191, .32); background: rgba(8, 28, 21, .32); }
.setup-card .modal-close:hover { color: #fffaf0; background: rgba(8, 28, 21, .58); }

.online-hero {
  position: relative;
  padding: 18px 22px 15px;
  text-align: center;
  color: #f6e8bf;
  background:
    radial-gradient(ellipse at 50% -45%, rgba(104, 168, 164, .24), transparent 64%),
    linear-gradient(145deg, #123b35, #081f1b 72%);
  border-bottom: 2px solid rgba(196, 153, 73, .58);
  box-shadow: inset 0 -1px 0 rgba(255, 244, 210, .12);
}
.online-hero-title {
  margin: 7px 0 0;
  color: #f7e8bd;
  font: 700 27px/1 var(--serif);
  letter-spacing: .08em;
}
.online-hero-sub { margin: 5px 0 0; color: #cdb37c; font-size: 9px; letter-spacing: .18em; }
.online-hero-ticket {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  padding: 5px 10px;
  border: 1px dashed rgba(216, 180, 90, .5);
  border-radius: 3px;
  background: rgba(255, 248, 226, .08);
  font-size: 8px;
  letter-spacing: .08em;
}
.online-hero-ticket span { color: #c6a66b; }
.online-hero-ticket strong { color: #f1dc9f; font-weight: 800; }
.online-lobby-card .modal-close { color: #f6e8bf; border-color: rgba(246, 232, 191, .32); background: rgba(8, 28, 21, .32); }
.online-lobby-card .modal-close:hover { color: #fffaf0; background: rgba(8, 28, 21, .58); }

@media (min-width: 981px) {
  .board {
    border-width: 11px;
    border-color: #1b120b;
    box-shadow:
      0 0 0 2px #ad8241,
      0 0 0 4px #2a1b10,
      0 0 0 15px #3a2717,
      0 0 0 16px rgba(216, 180, 90, .3),
      0 40px 90px rgba(0, 0, 0, .62),
      inset 0 0 0 2px rgba(216, 180, 90, .08);
  }
  .board::before {
    content: "";
    position: absolute;
    inset: -11px;
    z-index: 40;
    pointer-events: none;
    background:
      linear-gradient(90deg, #d8b45a, #765525) left top / 34px 3px no-repeat,
      linear-gradient(180deg, #d8b45a, #765525) left top / 3px 34px no-repeat,
      linear-gradient(270deg, #d8b45a, #765525) right top / 34px 3px no-repeat,
      linear-gradient(180deg, #d8b45a, #765525) right top / 3px 34px no-repeat,
      linear-gradient(90deg, #d8b45a, #765525) left bottom / 34px 3px no-repeat,
      linear-gradient(0deg, #d8b45a, #765525) left bottom / 3px 34px no-repeat,
      linear-gradient(270deg, #d8b45a, #765525) right bottom / 34px 3px no-repeat,
      linear-gradient(0deg, #d8b45a, #765525) right bottom / 3px 34px no-repeat;
  }
}

@media (max-width: 760px) {
  .setup-hero { padding: 16px 18px 13px; }
  .setup-box-title { font-size: 32px; }
  .setup-box-meta { gap: 6px; font-size: 6px; }
  .setup-box-meta span + span::before { margin-right: 6px; }
  .online-hero { padding: 14px 18px 12px; }
  .online-hero-title { font-size: 23px; }
}
.board { position: relative; }

/* 移动端可折叠日志、触控热区和剩余空间利用 */
@media (max-width: 760px) {
  .log-toggle { display: inline-flex; }
  .log-tools { gap: 4px; }
  .topbar { height: 50px; flex-basis: 50px; }
  .top-actions .btn { min-height: 44px; padding: 6px 8px; }
}
@media (max-width: 760px) and (min-height: 800px) {
  .log-panel:not(.collapsed) {
    flex: 1 1 auto;
    height: auto;
    min-height: 135px;
    max-height: 260px;
  }
}
@media (max-width: 760px) and (max-height: 680px) {
  body.log-collapsed .board {
    width: min(calc(100vw - 12px), calc(100dvh - 240px));
  }
}
@media (max-width: 430px) {
  .top-actions .btn { min-height: 44px; padding: 5px 6px; }
}

/* 联机聊天 / 准备状态 / 邀请 */
.online-badge.ready{background:rgba(88,177,120,.22);color:#9de0b2;border-color:rgba(88,177,120,.35)}
.online-invite{
  margin:8px 0 10px;padding:10px 12px;border-radius:9px;
  background:rgba(216,180,90,.10);border:1px dashed rgba(178,139,58,.35);
  color:#5d5138;font-size:11px;line-height:1.5;
}
.chat-card .modal-body{padding-top:10px}
.chat-list{max-height:280px;overflow-y:auto;padding:2px 2px 4px;display:flex;flex-direction:column;gap:6px;overscroll-behavior:contain}
.chat-msg{max-width:88%;align-self:flex-start;padding:7px 9px;border-radius:9px;background:rgba(22,58,46,.07);border:1px solid rgba(22,58,46,.08)}
.chat-msg.mine{align-self:flex-end;background:rgba(216,180,90,.13);border-color:rgba(178,139,58,.22)}
.chat-meta{font-size:9px;color:#8a806b;margin-bottom:2px}
.chat-text{font-size:11px;line-height:1.45;color:#354236;word-break:break-word;white-space:pre-wrap}
.chat-empty{font-size:11px;color:#8a806b;padding:14px 6px;text-align:center}
.chat-quick{display:flex;flex-wrap:wrap;gap:5px;margin-top:9px}
.chat-quick .btn{font-size:9px;padding:4px 7px;min-height:28px}
.chat-input-row{display:flex;gap:6px;margin-top:8px}
.chat-input-row .input{flex:1;min-width:0}

.actions .btn-chat { flex: 0 0 auto; min-width: 64px; }
@media (max-width: 760px) {
  .actions .btn-chat { min-width: 58px; font-size: 9px; }
}

.settings-card .modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: 9px 0 2px;
  background: linear-gradient(180deg, rgba(247,241,225,0), #f7f1e1 26%);
}

@media (max-width: 760px) {
  .actions .btn { min-height: 44px; }
}

.log-footnote{display:none;margin-top:5px;font-size:8.5px;color:#6f8b7b;text-align:center;letter-spacing:.04em}
.log-panel.collapsed .log-footnote{display:none}
@media (max-width:760px){.log-footnote{display:block}}

.rank-meta{display:block;font-size:9px;color:#8a7d64;margin-top:2px;line-height:1.35}
.online-rename{display:flex;align-items:center;gap:7px;margin:9px 0 2px;padding:8px 9px;border:1px dashed #d8c9a6;border-radius:9px;background:rgba(255,255,255,.25)}
.online-rename label{display:flex;align-items:center;gap:6px;flex:1;min-width:0;font-size:10px;color:#6b624f}
.online-rename input{flex:1;min-width:0}
.online-rename .btn{flex:0 0 auto}
.chat-typing{min-height:16px;font-size:9px;color:#8a7d64;margin-top:4px}
