/* ==========================================================================
   大富翁 Online — 界面样式
   ========================================================================== */

:root {
  --bg: #07171a;
  --bg-2: #0b2226;
  --panel: rgba(11, 33, 37, 0.88);
  --panel-solid: #0d2428;
  --panel-2: #123137;
  --line: rgba(229, 198, 133, 0.18);
  --line-strong: rgba(229, 198, 133, 0.42);
  --gold: #e8c781;
  --gold-2: #c9a35b;
  --gold-3: #9e7a38;
  --ink: #f0f5ee;
  --muted: #8fa7a1;
  --muted-2: #6d8882;
  --green: #53d6a0;
  --red: #ff7770;
  --blue: #6fb7ff;
  --board: #f4ecd9;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
  --display: "STZhongsong", "Songti SC", "STKaiti", "KaiTi", "SimSun", serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
}

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1100px 760px at 12% -10%, rgba(27, 83, 79, 0.55), transparent 62%),
    radial-gradient(900px 720px at 104% 106%, rgba(61, 70, 27, 0.28), transparent 58%),
    linear-gradient(155deg, #061315 0%, #0a2023 52%, #07191b 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.25;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.06) 0 1px, transparent 1px 4px);
  z-index: 0;
}

button, input { font-family: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
.hidden { display: none !important; }

.screen { position: relative; z-index: 1; min-height: 100dvh; }

/* ---------------------------------- 按钮 ---------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(232, 199, 129, 0.28);
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 0.12s ease, background 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); background: rgba(255, 255, 255, 0.1); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.38; filter: saturate(0.4); }
.btn.primary {
  background: linear-gradient(180deg, #f4d491 0%, #e2b964 48%, #c79a4a 100%);
  border-color: #f6dea6;
  color: #2b1d06;
  box-shadow: 0 4px 0 #8a672b, 0 9px 22px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.btn.primary:hover:not(:disabled) { background: linear-gradient(180deg, #ffe3a7, #ecc56f 50%, #d3a453); box-shadow: 0 5px 0 #8a672b, 0 11px 26px rgba(0, 0, 0, 0.4); }
.btn.gold {
  background: linear-gradient(180deg, #e6c47d, #c69d50);
  border-color: #f4dda5;
  color: #2b1d06;
  box-shadow: 0 3px 0 #7d5e28;
}
.btn.ghost { background: rgba(255, 255, 255, 0.045); border-color: rgba(232, 199, 129, 0.22); }
.btn.danger { border-color: rgba(255, 119, 112, 0.4); color: #ffb1ac; }
.btn.big { padding: 13px 20px; font-size: 15px; border-radius: 12px; }
.btn.small { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.btn.full { width: 100%; }
.btn .spinner { width: 13px; height: 13px; }

.link-btn {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 12.5px;
  padding: 2px;
  text-decoration: none;
  border-bottom: 1px dashed rgba(232, 199, 129, 0.35);
}
.link-btn:hover { color: #ffe4a9; }

.icon-btn {
  border: 1px solid rgba(232, 199, 129, 0.2);
  background: rgba(255, 255, 255, 0.045);
  color: #dbe7df;
  border-radius: 9px;
  min-width: 56px;
  height: 36px;
  padding: 0 11px;
  font-size: 12.5px;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--line-strong); }
.icon-btn.danger { color: #ffb1ac; border-color: rgba(255, 119, 112, 0.25); }
.sound-btn { min-width: 42px; font-size: 16px; }

/* ---------------------------------- 输入 ---------------------------------- */

.text-input {
  width: 100%;
  height: 46px;
  background: rgba(4, 16, 18, 0.55);
  border: 1px solid rgba(232, 199, 129, 0.24);
  border-radius: 11px;
  color: var(--ink);
  padding: 0 14px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.text-input::placeholder { color: #5f7771; }
.text-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232, 199, 129, 0.12); background: rgba(4, 16, 18, 0.8); }
.field-label { display: block; font-size: 12.5px; color: #a9bcb5; margin: 15px 0 7px; letter-spacing: 0.08em; }

/* ==========================================================================
   首页
   ========================================================================== */

.home {
  display: grid;
  place-items: center;
  padding: 34px 22px;
  overflow: hidden;
}

.home-glow { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; }
.glow-a { width: 420px; height: 420px; left: -120px; top: -140px; background: rgba(63, 163, 107, 0.18); }
.glow-b { width: 520px; height: 520px; right: -180px; bottom: -220px; background: rgba(198, 157, 80, 0.13); }

.float-card {
  position: absolute;
  width: 116px;
  height: 152px;
  border-radius: 9px;
  background: linear-gradient(165deg, #fbf4e3, #e9dcc0);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(90, 70, 40, 0.18);
  color: #3c3222;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 0;
  overflow: hidden;
  opacity: 0.82;
  animation: floaty 7s ease-in-out infinite;
  pointer-events: none;
}
.float-card .fc-band { width: 100%; height: 46px; background: var(--c); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.16); }
.float-card b { font-size: 20px; margin-top: 12px; letter-spacing: 0.08em; font-weight: 800; }
.float-card small { font-size: 12px; color: #8a7652; margin-top: 8px; }
.float-a { left: 4%; top: 18%; transform: rotate(-11deg); }
.float-b { right: 5%; top: 12%; transform: rotate(9deg); animation-delay: -2.3s; }
.float-c { left: 9%; bottom: 10%; transform: rotate(7deg); animation-delay: -4.5s; }

@keyframes floaty {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -14px; }
}

.home-shell { width: min(100%, 1060px); position: relative; z-index: 2; }

.home-head { text-align: center; margin-bottom: 30px; }
.home-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(232, 199, 129, 0.28);
  background: rgba(232, 199, 129, 0.07);
  color: #d9c396;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  margin-bottom: 20px;
}
.home-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(46px, 7vw, 82px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.06em;
  color: #f6e7c4;
  text-shadow: 0 2px 0 #5c451c, 0 18px 46px rgba(0, 0, 0, 0.55);
}
.home-title em {
  display: inline-block;
  font-family: var(--font);
  font-style: normal;
  font-size: 0.52em;
  letter-spacing: 0.04em;
  vertical-align: 0.24em;
  margin-left: 0.16em;
  color: var(--gold);
  text-shadow: 0 0 32px rgba(232, 199, 129, 0.35);
}
.home-tagline { margin: 15px 0 0; color: #a3b6ae; font-size: clamp(13px, 1.4vw, 16px); letter-spacing: 0.1em; }

.home-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 18px; align-items: stretch; }

.home-panel {
  background: linear-gradient(170deg, rgba(17, 44, 47, 0.92), rgba(8, 26, 29, 0.94));
  border: 1px solid rgba(232, 199, 129, 0.18);
  border-radius: 18px;
  padding: 24px 24px 22px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.home-panel.invite-focus {
  border-color: rgba(232, 199, 129, 0.58);
  box-shadow: 0 0 0 3px rgba(232, 199, 129, 0.09), 0 28px 70px rgba(0, 0, 0, 0.4);
}
.panel-kicker {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-bottom: 6px;
  font-weight: 700;
}
.create-panel .btn { margin-top: 10px; }
.create-panel .btn.primary { margin-top: 18px; }
.create-panel .btn.ghost { margin-top: 10px; }
.home-mode-hint { margin: 8px 0 10px; color: #8fa7a1; font-size: 12px; line-height: 1.5; }
.field-hint { margin: 6px 0 0; color: #7f958c; font-size: 11px; line-height: 1.4; }
.join-divider { display: flex; align-items: center; gap: 10px; margin: 14px 0 2px; color: #6f8580; font-size: 11px; }
.join-divider::before, .join-divider::after { content: ""; flex: 1; height: 1px; background: rgba(232, 199, 129, 0.12); }
.invite-line.lan-line { margin-top: 8px; }
#server-field { margin-bottom: 4px; }

/* 主页一键生成公网地址 */
.home-tunnel { margin: 4px 0 2px; }
.home-tunnel-row { display: flex; gap: 8px; align-items: center; }
.home-tunnel-row .text-input { flex: 1 1 0; min-width: 0; height: 40px; font-size: 12px; color: #a9bcb5; }
.home-tunnel-row .btn { height: 40px; white-space: nowrap; padding: 0 12px; font-size: 12px; }
.home-tunnel .field-hint { margin: 6px 0 0; }
@media (max-width: 640px) {
  .home-tunnel-row { flex-wrap: wrap; }
  .home-tunnel-row .text-input { flex-basis: 100%; }
}
#server-field .field-label { margin-top: 0; }
#server-field .text-input { height: 38px; font-size: 12px; }

.feature-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 9px; }
.feature-list li { color: #9db2aa; font-size: 12.5px; display: flex; gap: 9px; align-items: center; }
.feature-list li span { width: 22px; text-align: center; filter: saturate(0.9); }

.join-row { display: flex; gap: 9px; }
.code-input { text-transform: uppercase; letter-spacing: 0.24em; font-weight: 700; font-size: 16px; }
.join-row .btn { height: 46px; padding: 0 22px; flex: 0 0 auto; }
.rooms-head { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 9px; font-size: 12px; color: #8fa7a1; letter-spacing: 0.06em; }
.room-list {
  height: 174px;
  overflow: auto;
  border: 1px solid rgba(232, 199, 129, 0.12);
  background: rgba(3, 14, 16, 0.38);
  border-radius: 11px;
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.room-empty { margin: auto; color: #5e7771; font-size: 12.5px; }
.room-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px 9px 8px 12px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.room-row:hover { background: rgba(232, 199, 129, 0.07); border-color: rgba(232, 199, 129, 0.24); }
.room-code-mini { font-weight: 800; letter-spacing: 0.12em; color: var(--gold); font-size: 13px; }
.room-host { flex: 1; min-width: 0; color: #bdcbc5; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-count { color: #78908a; font-size: 11.5px; }
.room-row .btn { padding: 5px 10px; font-size: 11.5px; }
.join-note { margin: 14px 0 0; color: #67817a; font-size: 11.5px; line-height: 1.6; }

.home-foot {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 22px;
  color: #5c756e;
  font-size: 11px;
  letter-spacing: 0.08em;
}

/* ==========================================================================
   房间大厅
   ========================================================================== */

.lobby { padding: 20px 22px 40px; overflow: auto; }
.lobby-shell { width: min(100%, 920px); margin: 0 auto; }
.lobby-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.mini-brand {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #e9d6ae;
}
.mini-brand span { font-family: var(--font); font-size: 0.58em; color: var(--gold); letter-spacing: 0.18em; margin-left: 4px; }

.lobby-card {
  background: linear-gradient(170deg, rgba(17, 44, 47, 0.94), rgba(7, 24, 27, 0.96));
  border: 1px solid rgba(232, 199, 129, 0.2);
  border-radius: 22px;
  padding: 28px 30px 24px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.48);
}
.lobby-code-block { text-align: center; padding-bottom: 22px; border-bottom: 1px solid rgba(232, 199, 129, 0.12); }
.code-line { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin: 6px 0 8px; }
.code-line b {
  font-family: "Consolas", "SFMono-Regular", monospace;
  font-size: clamp(38px, 6vw, 56px);
  letter-spacing: 0.22em;
  color: #f7e3b5;
  text-shadow: 0 0 34px rgba(232, 199, 129, 0.24);
  padding-left: 0.22em;
}
.lobby-code-hint { margin: 0 0 16px; color: #8fa7a1; font-size: 12.5px; }
.invite-line { display: flex; gap: 8px; max-width: 540px; margin: 0 auto; }
.invite-line .text-input { height: 40px; font-size: 12px; color: #a9bcb5; }
.invite-line .btn { height: 40px; }
.tunnel-line { display: flex; gap: 8px; max-width: 540px; margin: 10px auto 0; align-items: center; }
.tunnel-line .text-input { flex: 1; min-width: 0; height: 40px; font-size: 12px; color: #a9bcb5; }
.tunnel-line .btn { height: 40px; white-space: nowrap; padding: 0 12px; font-size: 12px; }
.tunnel-hint { max-width: 540px; margin: 7px auto 0; color: #7f958c; font-size: 11px; }

.lobby-players-head { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 12px; gap: 10px; flex-wrap: wrap; }
.lobby-players-head h2 { margin: 0; font-size: 16px; letter-spacing: 0.1em; color: #e8dcc2; }
.lobby-players-head h2 span { color: #829b94; font-size: 12px; font-weight: 500; margin-left: 6px; letter-spacing: 0.08em; }
.lobby-hint { color: #d5b878; font-size: 12px; }

.seats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.seat {
  min-height: 104px;
  border-radius: 12px;
  border: 1px solid rgba(232, 199, 129, 0.16);
  background: rgba(255, 255, 255, 0.035);
  padding: 13px;
  display: flex;
  gap: 11px;
  align-items: flex-start;
  position: relative;
}
.seat.empty { border-style: dashed; border-color: rgba(143, 167, 161, 0.2); background: rgba(0, 0, 0, 0.12); color: #536d66; align-items: center; justify-content: center; font-size: 12px; }
.seat .avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 21px; background: var(--c); border: 2px solid rgba(255, 255, 255, 0.75); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); flex: 0 0 auto; }
.seat-main { min-width: 0; flex: 1; }
.seat-name { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.seat-sub { margin-top: 7px; color: #7f9891; font-size: 11.5px; }
.seat-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9.5px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 5px;
  border: 1px solid rgba(232, 199, 129, 0.24);
  color: #d9bd85;
  background: rgba(232, 199, 129, 0.08);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.tag.bot { color: #9fc8f2; border-color: rgba(111, 183, 255, 0.28); background: rgba(111, 183, 255, 0.08); }
.tag.host { color: #f3d490; }
.seat .kick-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  background: transparent;
  color: #6e877f;
  font-size: 13px;
  padding: 3px 5px;
  border-radius: 5px;
}
.seat .kick-btn:hover { color: #ff9b94; background: rgba(255, 119, 112, 0.1); }

.lobby-actions { display: flex; justify-content: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.lobby-note { text-align: center; color: #617a73; font-size: 11.5px; margin: 15px 0 0; }
.lobby-tips { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding: 14px 18px; border-radius: 12px; background: rgba(232, 199, 129, 0.045); border: 1px solid rgba(232, 199, 129, 0.1); flex-wrap: wrap; }
.lobby-tips div { display: flex; gap: 10px; color: #8fa7a1; font-size: 12px; align-items: baseline; }
.lobby-tips b { color: #d5b878; font-weight: 600; white-space: nowrap; flex: 0 0 auto; }

/* ==========================================================================
   游戏布局
   ========================================================================== */

.game { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }

.game-top {
  height: 54px;
  flex: 0 0 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  background: linear-gradient(180deg, rgba(6, 22, 24, 0.94), rgba(6, 22, 24, 0.7));
  border-bottom: 1px solid rgba(232, 199, 129, 0.12);
  backdrop-filter: blur(12px);
  position: relative;
  z-index: 20;
}
.top-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.room-chip {
  border: 1px solid rgba(232, 199, 129, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: #9fb3ac;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11.5px;
  letter-spacing: 0.05em;
}
.room-chip b { color: var(--gold); letter-spacing: 0.16em; font-size: 12.5px; margin-left: 4px; }
.room-chip:hover { background: rgba(232, 199, 129, 0.09); }
.turn-banner {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
  font-size: 13px;
  color: #c8d7d0;
  letter-spacing: 0.04em;
}
.turn-banner b { color: #f2d999; }
.turn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px rgba(232, 199, 129, 0.7); flex: 0 0 auto; }
.turn-banner.you .turn-dot { background: var(--green); box-shadow: 0 0 12px rgba(83, 214, 160, 0.8); animation: pulse 1.4s infinite; }
.turn-banner.you { color: #dff7ea; }
.top-actions { display: flex; align-items: center; gap: 7px; }
.conn-badge {
  color: #ffcf7a;
  font-size: 11px;
  border: 1px solid rgba(255, 207, 122, 0.3);
  background: rgba(255, 207, 122, 0.08);
  padding: 5px 9px;
  border-radius: 6px;
  animation: blink 1.4s infinite;
}

.game-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
  padding: 10px 12px 12px;
}
.game-layout.hide-sidebar { grid-template-columns: minmax(0, 1fr); }
.game-layout.hide-sidebar .sidebar { display: none; }
@media (min-width: 961px) {
  .game-layout > .sidebar { margin: 16px 0; }
}
.top-actions .icon-btn.active { background: rgba(232, 199, 129, 0.18); border-color: rgba(232, 199, 129, 0.55); color: #f6e6c4; }

.board-wrap { position: relative; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; }

/* ==========================================================================
   棋盘
   ========================================================================== */

.board {
  /* 经典棋盘（小屏/竖屏）保持原来的方形比例；桌面 C 形棋盘由 .board.spiral 覆盖为铺满 */
  width: min(100%, calc(100dvh - 76px));
  max-width: none;
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  grid-template-rows: repeat(11, minmax(0, 1fr));
  gap: clamp(2px, 0.22cqw, 4px);
  padding: clamp(6px, 0.65cqw, 12px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), transparent 42%),
    linear-gradient(145deg, #0c2b2d, #071d20);
  border: 1px solid #6d562d;
  border-radius: 14px;
  box-shadow:
    0 34px 80px rgba(0, 0, 0, 0.55),
    0 0 0 3px rgba(232, 199, 129, 0.08),
    inset 0 0 0 1px rgba(232, 199, 129, 0.32);
  container-type: size;
  container-name: board;
  user-select: none;
}
/* 桌面端「C」字形棋盘：外 C / 内 C 两层，两层之间留出 gutter；右侧 6×4 控制区，右端再拉长 2 列 */
.board.spiral {
  /* 按可用区域铺满；超高/超宽屏以 2.64:1 封顶，单格最大约 2.2:1 */
  width: auto;
  max-width: 100%;
  height: 100%;
  aspect-ratio: 2.64 / 1;
  --c-gutter: clamp(10px, 2.2cqw, 26px);
  grid-template-columns:
    1fr var(--c-gutter) 1fr repeat(4, 1fr) 1fr var(--c-gutter) 1fr 1fr 1fr;
  grid-template-rows:
    1fr var(--c-gutter) 1fr repeat(4, 1fr) 1fr var(--c-gutter) 1fr;
}
.board.spiral .board-center { grid-area: 4 / 4 / 8 / 13; }

/* 按可用屏幕比例拉伸后：宽棋盘 / 高棋盘的字号、头像与中心内容适配 */
.board-wide .tile-name { font-size: clamp(12px, 1.55cqw, 22px); }
.board-wide .tile-price { font-size: clamp(10px, 1.15cqw, 17px); }
.board-wide .tile .tile-pieces { flex-wrap: nowrap; gap: 0; }
.board-wide .piece { width: clamp(15px, 2.2cqw, 30px); height: clamp(15px, 2.2cqw, 30px); font-size: clamp(9px, 1.4cqw, 17px); }
.board-wide .center-logo { font-size: clamp(24px, 3.8cqw, 54px); }
.board-wide .dice-stage { gap: clamp(10px, 2.2cqw, 26px); }
.board-wide .center-current { margin: 0 2% 0 0; }
.board-tall .tile-name { font-size: clamp(11px, 1.7cqw, 20px); }
.board-tall .tile-price { font-size: clamp(9px, 1.1cqw, 15px); }
.board-tall .piece { width: clamp(13px, 2.3cqw, 27px); height: clamp(13px, 2.3cqw, 27px); font-size: clamp(8px, 1.35cqw, 15px); }
.board-tall .tile-pieces { flex-wrap: wrap; gap: 1px; }
.board-tall .center-logo { font-size: clamp(22px, 4.2cqw, 46px); }

/* --- 中央区域 --- */
.board-center {
  grid-area: 2 / 2 / 11 / 11;
  position: relative;
  z-index: 1;
  border-radius: 7px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2% 5% 4%;
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(44, 102, 83, 0.55), transparent 66%),
    radial-gradient(80% 80% at 50% 105%, #0b302c 0%, #071f20 60%, #051819 100%);
  border: 1px solid rgba(232, 199, 129, 0.22);
  box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(232, 199, 129, 0.15);
  color: #f3ecd9;
}
.board-center::after {
  content: "";
  position: absolute;
  width: 58%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(232, 199, 129, 0.055);
  box-shadow: 0 0 0 22px rgba(232, 199, 129, 0.018), 0 0 0 64px rgba(232, 199, 129, 0.012);
  pointer-events: none;
  z-index: 0;
}
.board-center::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(232, 199, 129, 0.09);
  border-radius: 4px;
  pointer-events: none;
}
.center-head { text-align: center; z-index: 1; margin-top: 0.5%; position: relative; }
.center-logo {
  font-family: var(--display);
  font-size: clamp(26px, 5.4cqw, 66px);
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #f4dfaf;
  text-shadow: 0 2px 0 #61491c, 0 8px 30px rgba(0, 0, 0, 0.5);
  line-height: 1.05;
  padding-left: 0.14em;
}
.center-sub {
  margin-top: 0.45em;
  font-size: clamp(8px, 0.92cqw, 14px);
  letter-spacing: 0.34em;
  color: rgba(232, 199, 129, 0.58);
  padding-left: 0.34em;
}

.dice-stage { display: flex; gap: clamp(14px, 4cqw, 38px); margin: 3% 0 2.4%; z-index: 1; position: relative; }
.die {
  width: clamp(30px, 4.9cqw, 66px);
  aspect-ratio: 1;
  border-radius: 19%;
  background: linear-gradient(145deg, #fffdf5 0%, #f4ead3 58%, #ddcfad 100%);
  box-shadow: 0 4px 0 #9e8b67, 0 10px 20px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.9);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 12%;
  position: relative;
  transition: transform 0.15s ease;
}
.die .pip { width: 74%; height: 74%; border-radius: 50%; background: #1b2d2a; place-self: center; box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4); }
.die.empty { display: grid; place-items: center; color: #9b885f; font-weight: 800; font-size: 1.6cqw; }
.die.empty::after { content: "?"; }
.die.rolling { animation: dice-roll 0.42s linear infinite; }
.die.rolling .pip { opacity: 0.75; }

@keyframes dice-roll {
  0% { transform: rotate(0deg) translateY(0) scale(1); }
  25% { transform: rotate(-14deg) translateY(-5px) scale(1.04); }
  50% { transform: rotate(10deg) translateY(1px) scale(1); }
  75% { transform: rotate(-6deg) translateY(-3px) scale(1.02); }
  100% { transform: rotate(0deg) translateY(0) scale(1); }
}

.center-current {
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1;
  position: relative;
  padding: 4px 12px 4px 5px;
  border-radius: 999px;
  background: rgba(3, 17, 18, 0.28);
  border: 1px solid rgba(232, 199, 129, 0.14);
  margin-bottom: 1.2%;
}
.cc-avatar {
  width: clamp(24px, 2.7cqw, 42px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--c, #e8c781);
  display: grid;
  place-items: center;
  font-size: clamp(12px, 1.4cqw, 22px);
  border: 1.5px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  flex: 0 0 auto;
}
.cc-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.cc-text b { font-size: clamp(11px, 1.08cqw, 17px); color: #f0e4c8; letter-spacing: 0.03em; }
.cc-text small { font-size: clamp(9px, 0.85cqw, 13px); color: #9cb5ab; margin-top: 1px; }
.center-status {
  z-index: 1;
  position: relative;
  min-height: 1.4em;
  text-align: center;
  font-size: clamp(11px, 1.35cqw, 18px);
  color: #b9d0c6;
  letter-spacing: 0.04em;
  line-height: 1.5;
}
.center-status b { color: #f0d39a; }
.center-status .hint { color: #7f9b92; font-size: 0.85em; }

.action-zone {
  z-index: 1;
  position: relative;
  flex: 0 0 auto;
  width: min(100%, 520px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  margin-top: 1.8%;
  min-height: 0;
}
.action-zone .btn { font-size: clamp(12px, 1.35cqw, 19px); padding: 0.78em 1.5em; }
.action-zone .btn.primary { min-width: 8.5em; }
.action-title { font-size: clamp(12px, 1.38cqw, 19px); font-weight: 700; color: #f0e0bd; text-align: center; letter-spacing: 0.04em; }
.action-sub { font-size: clamp(9.5px, 1.06cqw, 15px); color: #85a198; text-align: center; line-height: 1.5; }
.action-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.action-zone .btn.primary { box-shadow: 0 3px 0 #8a672b, 0 8px 18px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.action-zone .btn.primary:hover:not(:disabled) { transform: translateY(-1px); }
.action-zone.busy { opacity: 0.75; pointer-events: none; }

.waiting {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #a9c0b7;
  font-size: clamp(11px, 1.22cqw, 18px);
  justify-content: center;
  text-align: center;
  line-height: 1.5;
  flex-wrap: wrap;
}
.waiting .mini-spinner { width: 13px; height: 13px; border-width: 2px; }
.waiting b { color: #efd9a9; }

.center-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2.2%;
  z-index: 1;
  display: flex;
  gap: clamp(10px, 3cqw, 28px);
  color: rgba(232, 199, 129, 0.45);
  font-size: clamp(8px, 0.95cqw, 13px);
  letter-spacing: 0.08em;
  flex-wrap: wrap;
  justify-content: center;
}

/* 螺旋布局的右侧 6×4 中心：横向仪表盘布局，利用宽控制区 */
.board.spiral .board-center {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto;
  align-items: center;
  justify-items: center;
  align-content: center;
  gap: 1.5% 3%;
  padding: 3% 5%;
  margin: 0 2.5% 0 0;
  box-shadow: 0 0 0 1px rgba(232, 199, 129, 0.1), 0 22px 60px rgba(0, 0, 0, 0.5);
}
.board.spiral .center-head { grid-column: 1; grid-row: 1; }
.board.spiral .dice-stage { grid-column: 1; grid-row: 2; margin: 0; }
.board.spiral .center-current { grid-column: 2; grid-row: 1; margin: 0; }
.board.spiral .center-status { grid-column: 2; grid-row: 2; }
.board.spiral .action-zone { grid-column: 2; grid-row: 3; width: 100%; margin-top: 1%; position: static; }
.board.spiral .center-logo { font-size: clamp(24px, 5cqw, 58px); letter-spacing: 0.1em; }
.board.spiral .center-sub { display: none; }
.board.spiral .dice-stage { gap: clamp(10px, 3cqw, 30px); margin: 2.5% 0 2%; }
.board.spiral .die { width: clamp(34px, 6cqw, 72px); }
.board.spiral .center-current { padding: 7px 14px 7px 7px; gap: 10px; margin-bottom: 1.5%; }
.board.spiral .cc-avatar { width: clamp(28px, 3.6cqw, 48px); font-size: clamp(12px, 1.6cqw, 22px); }
.board.spiral .cc-text b { font-size: clamp(12px, 1.55cqw, 23px); }
.board.spiral .cc-text small { font-size: clamp(10px, 1.25cqw, 18px); }
.board.spiral .center-status { font-size: clamp(12px, 1.5cqw, 20px); line-height: 1.4; }
.board.spiral .action-zone { width: min(100%, 400px); gap: 8px; margin-top: 1%; position: static; }
.board.spiral .action-zone .buy-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92%, 470px);
  z-index: 6;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}
.board.spiral .action-zone .btn { font-size: clamp(13px, 1.6cqw, 22px); padding: 0.8em 1.3em; }
.board.spiral .action-title { font-size: clamp(13px, 1.55cqw, 22px); }
.board.spiral .action-sub { font-size: clamp(11px, 1.2cqw, 16px); }
.board.spiral .waiting { font-size: clamp(11px, 1.3cqw, 18px); }
.board.spiral .center-foot { display: none; }
.board.spiral .buy-card { width: min(100%, 470px); }
.board.spiral .buy-card .bc-art { aspect-ratio: 4 / 1; }
.board.spiral .buy-card .bc-body { padding: 12px 18px 8px; }
.board.spiral .buy-card .bc-title { font-size: clamp(18px, 2.2cqw, 30px); }
.board.spiral .buy-card .bc-price { font-size: clamp(15px, 1.8cqw, 24px); }
.board.spiral .buy-card .bc-meta { font-size: clamp(11px, 1.3cqw, 17px); line-height: 1.45; }
.board.spiral .buy-card .bc-actions .btn { font-size: clamp(11px, 1.35cqw, 17px); padding: 0.7em 1.2em; }
.board.spiral .buy-card .bc-cash { font-size: clamp(10px, 1.1cqw, 14px); }

/* 购买卡出现时，把中央仪表盘让给卡片，避免大卡片周围露出半截标志/玩家条 */
.board-center:has(.buy-card) .center-head,
.board-center:has(.buy-card) .dice-stage,
.board-center:has(.buy-card) .center-current,
.board-center:has(.buy-card) .center-status {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

/* --- 棋盘格 --- */
.tile {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 0 2% 2%;
  border: none;
  border-radius: 3px;
  overflow: hidden;
  background: linear-gradient(170deg, #fcf7eb 0%, #f2e8d3 100%);
  color: #3c3325;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-shadow: inset 0 0 0 1px rgba(90, 70, 40, 0.16);
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.2s ease;
  z-index: 2;
}
.tile:hover { transform: translateY(-1px) scale(1.02); z-index: 8; box-shadow: 0 5px 14px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(232, 199, 129, 0.8); }
.tile:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.tile-band { flex: 0 0 15%; width: 100%; background: var(--band, #8a5a3b); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.18); }
.tile.has-photo {
  background-color: #1b262c;
  background-position: 50% 50%;
  background-size: cover;
  background-repeat: no-repeat;
  justify-content: center;
  color: #fff;
}
.tile.has-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(72% 56% at 50% 45%, rgba(5, 9, 13, 0.38) 0%, rgba(5, 9, 13, 0.12) 62%, transparent 82%),
    linear-gradient(180deg, rgba(5, 9, 13, 0.42) 0%, rgba(5, 9, 13, 0.06) 42%, rgba(5, 9, 13, 0.38) 100%);
}
.tile.has-photo > * { position: relative; z-index: 2; }
.tile.has-photo .tile-icon { display: none; }
.tile.has-photo .tile-name {
  color: #fff;
  margin-top: 0;
  font-size: clamp(12px, 1.85cqw, 22px);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 10px rgba(0, 0, 0, 0.7);
}
.tile.has-photo .tile-price {
  color: #ffe3a8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95), 0 0 8px rgba(0, 0, 0, 0.6);
}
.tile.side-bottom.has-photo .tile-band { height: clamp(5px, 0.5cqw, 8px); }
.tile.side-top.has-photo { padding-bottom: clamp(7px, 0.7cqw, 12px); }
.tile.side-top.has-photo .tile-band { height: clamp(5px, 0.5cqw, 8px); }
.tile.side-left.has-photo { padding-right: clamp(7px, 0.7cqw, 12px); }
.tile.side-left.has-photo .tile-band { width: clamp(5px, 0.5cqw, 8px); }
.tile.side-right.has-photo { padding-left: clamp(7px, 0.7cqw, 12px); }
.tile.side-right.has-photo .tile-band { width: clamp(5px, 0.5cqw, 8px); }
.tile.has-photo .tile-band { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45); }
.tile-name {
  max-width: 100%;
  margin-top: 0;
  padding: 0 1px;
  text-align: center;
  font-size: clamp(12px, 1.85cqw, 22px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: 0;
  overflow: hidden;
  flex: 0 0 auto;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #332a1c;
}
.tile-price {
  margin-top: 0;
  font-size: clamp(10px, 1.3cqw, 17px);
  font-weight: 700;
  color: #7e6a48;
  letter-spacing: 0;
  flex: 0 0 auto;
}
.tile-icon {
  font-size: clamp(12px, 1.8cqw, 24px);
  line-height: 1;
  margin-top: 0;
  flex: 0 0 auto;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.18));
}
.tile-houses {
  position: static;
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(252, 247, 235, 0.88);
  color: #6b4a2a;
  font-size: clamp(6px, 0.9cqw, 11px);
  line-height: 1.4;
  letter-spacing: -0.06em;
  box-shadow: 0 0 0 1px rgba(120, 90, 40, 0.12);
}
.tile .tile-label {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3%;
  padding: 5% 3%;
  pointer-events: none;
  text-align: center;
}
.tile .tile-pieces {
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 1px;
  z-index: 4;
}
.tile .tile-owner-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  z-index: 5;
}
.tile .tile-label > * { flex: 0 0 auto; }
.tile.has-photo .tile-houses {
  background: rgba(6, 10, 14, 0.62);
  color: #ffe3a8;
  box-shadow: 0 0 0 1px rgba(255, 227, 168, 0.22);
}
.tile-owner-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: clamp(4.5px, 0.7cqw, 10px);
  height: clamp(4.5px, 0.7cqw, 10px);
  border-radius: 50%;
  background: var(--owner);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85), 0 0 6px var(--owner);
  display: none;
  z-index: 6;
}
.tile.owned .tile-owner-dot { display: block; }
.tile.owned { background: linear-gradient(170deg, color-mix(in srgb, var(--owner) 10%, #fcf7eb), color-mix(in srgb, var(--owner) 26%, #efe1c6)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--owner) 58%, transparent); }
.tile.has-photo.owned { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--owner) 72%, transparent), inset 0 0 18px rgba(0, 0, 0, 0.25); }
.tile.mortgaged { background: repeating-linear-gradient(135deg, #e7ddc9 0 7px, #d9cdb4 7px 14px); }
.tile.has-photo.mortgaged { filter: grayscale(0.72) brightness(0.72); }
.tile.mortgaged::after {
  content: "抵";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-16deg);
  color: #a43832;
  border: 1px solid rgba(164, 56, 50, 0.6);
  border-radius: 2px;
  padding: 0 2px;
  font-size: clamp(6px, 1.15cqw, 11px);
  font-weight: 900;
  background: rgba(255, 245, 230, 0.55);
  z-index: 4;
  pointer-events: none;
}
.tile.current-tile { box-shadow: 0 0 0 2px var(--gold), 0 0 18px rgba(232, 199, 129, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.4); }

.tile.corner { background: linear-gradient(145deg, #f2e6cb, #e6d6b4); justify-content: center; }
.tile.corner .tile-name { font-size: clamp(12px, 1.65cqw, 20px); letter-spacing: 0.05em; margin-top: 2.5%; }
.tile.corner .tile-icon { font-size: clamp(16px, 3cqw, 44px); margin-top: 0; }
.tile.corner::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(120, 92, 45, 0.16); border-radius: 2px; pointer-events: none; }

.tile.t-go { background: linear-gradient(145deg, #f7edd5, #e9d8b3); }
.tile.t-chance { background: linear-gradient(160deg, #fdf6e5, #f3e4bd); }
.tile.t-fate { background: linear-gradient(160deg, #f6f0ff, #e8dcf0); }
.tile.t-tax { background: linear-gradient(160deg, #f8ece9, #eed8d2); }
.tile.t-jail, .tile.t-gotojail { background: linear-gradient(160deg, #e9efee, #d7e0dd); }
.tile.t-parking { background: linear-gradient(160deg, #eef4e8, #dce8d5); }
.tile.t-railroad { background: linear-gradient(160deg, #f5f1e9, #e5ddcf); }
.tile.t-seaport { background: linear-gradient(160deg, #eaf5f7, #d3e6ec); }
.tile.t-airport { background: linear-gradient(160deg, #f0eef9, #ded8ef); }
.tile.t-utility { background: linear-gradient(160deg, #eef3f7, #dce6ec); }

/* 照片格：类型底色 / 业主底色 / 抵押底色只作为兜底，始终让照片铺满整格 */
.tile.has-photo,
.tile.has-photo.owned,
.tile.has-photo.mortgaged {
  background-size: cover;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  background-color: #1b262c;
}

.tile.side-top { justify-content: flex-start; padding: 1% 2% 17%; }
.tile.side-top .tile-band { position: absolute; left: 0; right: 0; bottom: 0; height: 15%; width: auto; }
.tile.side-bottom { justify-content: flex-end; padding: 17% 2% 1%; }
.tile.side-bottom .tile-band { position: absolute; left: 0; right: 0; top: 0; height: 15%; width: auto; }
.tile.side-left { padding: 1% 17% 2% 2%; }
.tile.side-left .tile-band { position: absolute; top: 0; right: 0; bottom: 0; width: 15%; height: auto; }
.tile.side-right { padding: 1% 2% 2% 17%; }
.tile.side-right .tile-band { position: absolute; top: 0; left: 0; bottom: 0; width: 15%; height: auto; }
.tile.side-top .tile-name, .tile.side-left .tile-name, .tile.side-right .tile-name { margin-top: 2%; }

.tile-pieces {
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 1px;
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  justify-content: center;
  align-items: flex-end;
  pointer-events: none;
  z-index: 7;
}
.piece {
  width: clamp(16px, 2.8cqw, 34px);
  height: clamp(16px, 2.8cqw, 34px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: clamp(10px, 1.75cqw, 21px);
  line-height: 1;
  background: var(--c);
  border: clamp(1.5px, 0.2cqw, 2.5px) solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(6, 10, 14, 0.4);
  color: #fff;
  position: relative;
  z-index: 1;
}
.piece + .piece { margin-left: clamp(-10px, -0.85cqw, -5px); }
.tile-pieces:has(.piece:nth-child(5)) .piece {
  width: clamp(13px, 2.3cqw, 28px);
  height: clamp(13px, 2.3cqw, 28px);
  font-size: clamp(9px, 1.45cqw, 17px);
}
.tile-pieces:has(.piece:nth-child(6)) .piece {
  width: clamp(11px, 1.95cqw, 23px);
  height: clamp(11px, 1.95cqw, 23px);
  font-size: clamp(8px, 1.25cqw, 15px);
}
.piece.current { z-index: 3; animation: piece-bob 1.25s ease-in-out infinite; box-shadow: 0 0 0 3px #fff, 0 0 15px rgba(255, 240, 200, 0.95), 0 3px 8px rgba(0, 0, 0, 0.6); }
.piece.moving { z-index: 4; animation: piece-hop 0.28s ease-in-out infinite; }
@keyframes piece-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes piece-hop { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-5px) scale(1.1); } }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* --- 卡牌弹层 --- */
.card-pop {
  position: absolute;
  top: 30%;
  left: 50%;
  width: min(310px, 46%);
  transform: translate(-50%, -50%) rotate(-1.5deg);
  background: linear-gradient(165deg, #fffaee 0%, #f4e7cb 55%, #e7d3ac 100%);
  color: #3d3220;
  border: 1px solid #c6a05a;
  border-radius: 13px;
  padding: 18px 20px 17px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.68), inset 0 0 0 3px rgba(255, 255, 255, 0.38);
  z-index: 40;
  cursor: pointer;
  animation: card-in 0.45s cubic-bezier(0.2, 0.9, 0.25, 1.15);
}
.card-pop::after { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(127, 95, 45, 0.24); border-radius: 8px; pointer-events: none; }
.card-pop .cp-kicker { font-size: 9.5px; letter-spacing: 0.22em; color: #9a7b43; font-weight: 700; text-transform: uppercase; }
.card-pop .cp-icon { position: absolute; top: 12px; right: 16px; font-size: 27px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.12)); }
.card-pop .cp-title { font-family: var(--display); font-size: 23px; font-weight: 800; margin: 4px 0 8px; color: #33260f; letter-spacing: 0.06em; }
.card-pop .cp-text { font-size: 13.5px; line-height: 1.65; color: #5c4b2c; }
.card-pop .cp-foot { margin-top: 11px; font-size: 10.5px; color: #9a8359; letter-spacing: 0.06em; }
@keyframes card-in {
  from { opacity: 0; transform: translate(-50%, -46%) rotate(4deg) scale(0.86); }
  to { opacity: 1; transform: translate(-50%, -50%) rotate(-1.5deg) scale(1); }
}

/* --- 买地卡 --- */
.buy-card {
  width: min(100%, 440px);
  background: linear-gradient(170deg, #fdf7e8, #efe2c6);
  color: #3c3222;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.44), inset 0 0 0 1px rgba(94, 71, 34, 0.22);
  text-align: center;
  padding-bottom: 9px;
  position: relative;
}
.buy-card .bc-band { height: 8px; background: var(--band); }
.buy-card .bc-art { width: 100%; aspect-ratio: 3 / 1; overflow: hidden; background: #d9cdb4; }
.buy-card .bc-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.buy-card.has-photo .bc-band { height: 5px; }
.buy-card .bc-body { padding: 11px 16px 8px; }
.buy-card .bc-title { font-family: var(--display); font-weight: 800; font-size: clamp(17px, 2cqw, 28px); letter-spacing: 0.08em; color: #31260f; }
.buy-card .bc-price { color: #8a6b2e; font-weight: 800; font-size: clamp(13px, 1.5cqw, 21px); margin-left: 6px; }
.buy-card .bc-meta { color: #7e6c4c; font-size: clamp(10.5px, 1.1cqw, 15px); margin-top: 3px; line-height: 1.5; }
.buy-card .bc-actions { display: flex; gap: 7px; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.buy-card .bc-actions .btn { font-size: clamp(12.5px, 1.2cqw, 15px); padding: 0.65em 1.15em; }
.buy-card .btn.ghost {
  color: #57452a;
  border-color: rgba(90, 70, 40, 0.24);
  background: rgba(255, 255, 255, 0.38);
  box-shadow: none;
}
.buy-card .btn.ghost:hover:not(:disabled) { background: rgba(90, 70, 40, 0.09); }
.buy-card .btn.primary { box-shadow: 0 2px 0 #8a672b, 0 4px 10px rgba(0, 0, 0, 0.2); }
.buy-card .bc-cash { font-size: clamp(9.5px, 1cqw, 12px); color: #98845e; margin-top: 4px; }

/* ==========================================================================
   侧栏
   ========================================================================== */

.sidebar {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  background: linear-gradient(175deg, rgba(14, 40, 43, 0.92), rgba(7, 24, 27, 0.95));
  border: 1px solid rgba(232, 199, 129, 0.15);
  border-radius: 15px;
  padding: 12px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  overflow: hidden;
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 1px 2px 0; color: #b9c9c2; font-size: 11.5px; letter-spacing: 0.1em; }
.round-info { color: #708a82; font-size: 10.5px; letter-spacing: 0.05em; }
.players { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; max-height: 43%; flex: 0 1 auto; padding-right: 2px; }

.player-row {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 8px 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.045);
  transition: background 0.16s ease, border-color 0.16s ease, opacity 0.2s ease;
  position: relative;
}
.player-row.current { background: linear-gradient(100deg, rgba(232, 199, 129, 0.13), rgba(232, 199, 129, 0.035)); border-color: rgba(232, 199, 129, 0.4); box-shadow: 0 0 18px rgba(232, 199, 129, 0.08); }
.player-row.current::before { content: ""; position: absolute; left: -1px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--gold); }
.player-row.bankrupt { opacity: 0.42; filter: grayscale(0.7); }
.player-row.left { opacity: 0.35; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--c); display: grid; place-items: center; font-size: 16px; flex: 0 0 auto; border: 1.5px solid rgba(255, 255, 255, 0.72); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); }
.player-main { flex: 1; min-width: 0; }
.player-line { display: flex; align-items: center; gap: 5px; min-width: 0; }
.player-name { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #e8f0eb; }
.player-badges { display: inline-flex; gap: 3px; flex: 0 0 auto; }
.pb { font-size: 9px; line-height: 1; opacity: 0.9; }
.player-sub { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-top: 2px; }
.player-money { font-size: 12px; font-weight: 800; color: #f0d592; letter-spacing: 0.03em; font-variant-numeric: tabular-nums; }
.player-meta { font-size: 9.5px; color: #819a92; white-space: nowrap; }
.prop-chips { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 4px; min-height: 5px; }
.prop-chip { width: 7px; height: 5px; border-radius: 1.5px; border: none; padding: 0; background: var(--c); box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.35); opacity: 0.9; }
.prop-chip:hover { outline: 1px solid #fff; transform: scale(1.25); }
.prop-more { font-size: 8px; color: #6d8880; line-height: 1; }
.turn-pip { position: absolute; right: 8px; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 1.3s infinite; }

.side-tabs { display: flex; gap: 4px; border-bottom: 1px solid rgba(232, 199, 129, 0.12); padding-bottom: 6px; flex: 0 0 auto; }
.side-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: #7f9891;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 4px;
  border-radius: 6px;
  letter-spacing: 0.08em;
  position: relative;
}
.side-tab:hover { color: #c8d8d1; background: rgba(255, 255, 255, 0.04); }
.side-tab.active { color: #f0d79f; background: rgba(232, 199, 129, 0.09); }
.badge { display: inline-grid; place-items: center; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 999px; background: #d4554d; color: #fff; font-size: 9px; font-weight: 800; vertical-align: 1px; }

.feed {
  flex: 1;
  min-height: 100px;
  overflow-y: auto;
  border-radius: 8px;
  background: rgba(2, 12, 14, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.035);
  padding: 7px;
  scrollbar-width: thin;
  scrollbar-color: rgba(232, 199, 129, 0.25) transparent;
}
.feed::-webkit-scrollbar, .players::-webkit-scrollbar, .room-list::-webkit-scrollbar, .inspector::-webkit-scrollbar { width: 5px; height: 5px; }
.feed::-webkit-scrollbar-thumb, .players::-webkit-scrollbar-thumb, .room-list::-webkit-scrollbar-thumb, .inspector::-webkit-scrollbar-thumb { background: rgba(232, 199, 129, 0.22); border-radius: 4px; }

.log-entry { display: flex; gap: 7px; padding: 3px 4px; border-radius: 4px; font-size: 11.5px; line-height: 1.5; color: #aabeb7; }
.log-entry:nth-child(odd) { background: rgba(255, 255, 255, 0.018); }
.log-time { flex: 0 0 auto; color: #516b64; font-size: 9.5px; padding-top: 1px; font-variant-numeric: tabular-nums; }
.log-text { flex: 1; word-break: break-word; }
.log-entry.t-turn .log-text { color: #efd292; font-weight: 700; }
.log-entry.t-dice .log-text { color: #c6ddd2; }
.log-entry.t-gold .log-text { color: #ffd77e; }
.log-entry.t-money .log-text { color: #7fd6a4; }
.log-entry.t-buy .log-text { color: #8fbeff; }
.log-entry.t-danger .log-text { color: #ff8d86; }
.log-entry.t-warn .log-text { color: #ffb86e; }
.log-entry.t-card .log-text { color: #d3b6ff; }
.log-entry.t-win .log-text { color: #ffe06e; font-weight: 800; }
.log-entry.t-muted .log-text { color: #758d86; }
.log-entry.t-join .log-text { color: #a9c6bb; }

.chat-feed { display: flex; flex-direction: column; padding: 0; background: rgba(2, 12, 14, 0.32); }
.chat-list { flex: 1; overflow-y: auto; padding: 9px; display: flex; flex-direction: column; gap: 9px; }
.chat-msg { font-size: 11.8px; line-height: 1.5; }
.chat-msg .cm-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.chat-msg .cm-name { font-weight: 700; font-size: 11px; }
.chat-msg .cm-time { color: #4e6760; font-size: 9px; }
.chat-msg .cm-text { color: #c2d2cb; word-break: break-word; background: rgba(255, 255, 255, 0.04); border-radius: 7px; padding: 6px 8px; }
.chat-form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid rgba(232, 199, 129, 0.1); background: rgba(0, 0, 0, 0.12); }
.chat-form input { flex: 1; min-width: 0; background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(232, 199, 129, 0.16); border-radius: 7px; color: #e4eee8; padding: 0 10px; height: 34px; font-size: 12px; outline: none; }
.chat-form input:focus { border-color: rgba(232, 199, 129, 0.55); }
.chat-form .btn { height: 34px; padding: 0 12px; }

/* ==========================================================================
   地产详情
   ========================================================================== */

.inspector {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  max-height: calc(100% - 24px);
  overflow-y: auto;
  z-index: 30;
  background: linear-gradient(170deg, #fbf5e7, #efe3ca);
  color: #3b3122;
  border-radius: 13px;
  border: 1px solid #c6a25e;
  box-shadow: 0 -16px 50px rgba(0, 0, 0, 0.55);
  padding: 0 0 13px;
  animation: inspector-in 0.22s ease;
}
@keyframes inspector-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.inspector .ins-band { height: 9px; background: var(--band, #8a5a3b); border-radius: 12px 12px 0 0; }
.inspector .ins-art { width: 100%; aspect-ratio: 3 / 1; overflow: hidden; background: #d9cdb4; }
.inspector .ins-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.inspector .ins-head { display: flex; align-items: flex-start; gap: 9px; padding: 12px 14px 8px; }
.inspector .ins-icon { font-size: 25px; line-height: 1; }
.inspector .ins-title { font-family: var(--display); font-size: 21px; font-weight: 800; letter-spacing: 0.06em; line-height: 1.1; }
.inspector .ins-sub { color: #8d7954; font-size: 10.5px; margin-top: 3px; }
.inspector .ins-close { margin-left: auto; border: none; background: rgba(60, 45, 20, 0.08); color: #80683f; width: 26px; height: 26px; border-radius: 50%; font-size: 15px; line-height: 1; flex: 0 0 auto; }
.inspector .ins-close:hover { background: rgba(60, 45, 20, 0.16); }
.inspector .ins-body { padding: 0 14px; }
.ins-owner { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #5e4c2e; margin-bottom: 8px; }
.ins-owner .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--oc, #999); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15); }
.rent-table { width: 100%; border-collapse: collapse; font-size: 10.5px; margin: 3px 0 9px; }
.rent-table td { padding: 3px 2px; border-bottom: 1px dashed rgba(110, 87, 48, 0.15); color: #6e5a39; }
.rent-table td:last-child { text-align: right; font-weight: 700; color: #3d3020; font-variant-numeric: tabular-nums; }
.rent-table tr.current td { color: #8c2f2b; font-weight: 800; }
.ins-note { font-size: 10.5px; line-height: 1.6; color: #7a6643; background: rgba(120, 90, 40, 0.06); border-radius: 6px; padding: 7px 8px; margin: 6px 0 9px; }
.ins-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ins-actions .btn { padding: 7px 10px; font-size: 11px; border-radius: 7px; border-color: rgba(60, 45, 20, 0.18); background: rgba(60, 45, 20, 0.07); color: #4a3a20; box-shadow: none; }
.ins-actions .btn:hover:not(:disabled) { background: rgba(60, 45, 20, 0.13); }
.ins-actions .btn.primary { background: linear-gradient(180deg, #e7c47b, #c99d4e); border-color: #b58a42; color: #2c1e07; box-shadow: 0 2px 0 #8a672b; }
.ins-actions .btn:disabled { opacity: 0.34; }
.ins-hint { font-size: 10px; color: #907b55; margin-top: 7px; line-height: 1.5; }
.ins-status { display: inline-block; font-size: 9.5px; padding: 2px 6px; border-radius: 4px; background: rgba(160, 60, 50, 0.12); color: #9a3d35; margin-left: 5px; vertical-align: 1px; }

/* ==========================================================================
   弹窗 / Toast
   ========================================================================== */

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 10, 11, 0.7);
  backdrop-filter: blur(7px);
  animation: fade-in 0.18s ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  width: min(100%, 560px);
  max-height: min(88dvh, 760px);
  overflow-y: auto;
  background: linear-gradient(170deg, #113033, #081e21 70%);
  border: 1px solid rgba(232, 199, 129, 0.35);
  border-radius: 19px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 26px 26px 22px;
  animation: modal-in 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: none; } }
.modal-kicker { font-size: 10px; letter-spacing: 0.24em; color: var(--gold-2); text-transform: uppercase; font-weight: 800; }
.modal-title { font-family: var(--display); font-size: 27px; font-weight: 800; letter-spacing: 0.06em; margin: 6px 0 4px; color: #f3e2bd; }
.modal-sub { color: #8fa7a1; font-size: 12.5px; line-height: 1.65; margin: 0 0 16px; }
.modal-actions { display: flex; gap: 9px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.modal-close-x { float: right; border: none; background: rgba(255, 255, 255, 0.06); color: #a9bdb5; width: 30px; height: 30px; border-radius: 50%; font-size: 16px; margin: -8px -8px 0 0; }
.modal-close-x:hover { background: rgba(255, 255, 255, 0.12); }

.modal-card h3 { color: #ead6a9; font-size: 14px; letter-spacing: 0.08em; margin: 18px 0 7px; }
.modal-card p, .modal-card li { color: #a5b9b2; font-size: 12.5px; line-height: 1.75; }
.modal-card ul { padding-left: 19px; margin: 5px 0; }
.modal-card strong { color: #ebd39f; }

.ranking { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 9px; background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.045); }
.rank-row.winner { background: linear-gradient(100deg, rgba(232, 199, 129, 0.17), rgba(232, 199, 129, 0.035)); border-color: rgba(232, 199, 129, 0.45); }
.rank-no { width: 20px; color: #7a948c; font-size: 12px; font-weight: 800; text-align: center; flex: 0 0 auto; }
.rank-row.winner .rank-no { color: var(--gold); }
.rank-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--c); display: grid; place-items: center; font-size: 15px; border: 1.5px solid rgba(255, 255, 255, 0.7); flex: 0 0 auto; }
.rank-main { flex: 1; min-width: 0; }
.rank-name { font-size: 12.5px; font-weight: 700; color: #e6efe9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-sub { font-size: 10px; color: #7e9890; margin-top: 2px; }
.rank-worth { font-size: 13px; font-weight: 800; color: #efd18f; font-variant-numeric: tabular-nums; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  z-index: 200;
  background: rgba(10, 29, 32, 0.96);
  border: 1px solid rgba(232, 199, 129, 0.4);
  color: #f2e6c9;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 12.5px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  max-width: min(90vw, 480px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: rgba(255, 119, 112, 0.5); color: #ffc1bc; }

/* --------------------------------- 加载 --------------------------------- */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(232, 199, 129, 0.25);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  vertical-align: -3px;
}
.mini-spinner { width: 12px; height: 12px; border-width: 1.5px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   响应式
   ========================================================================== */

@media (max-width: 1180px) {
  .game-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 10px; padding: 10px; }
  .board { width: min(100%, calc(100dvh - 72px)); }
  .top-left .mini-brand { display: none; }
}

@media (max-width: 960px) {
  .home-grid { grid-template-columns: 1fr; }
  .float-card { display: none; }
  .home { padding: 26px 16px 40px; }
  .home-head { margin-bottom: 22px; }

  .game { height: auto; min-height: 100dvh; overflow: auto; }
  .game-top { position: sticky; top: 0; height: auto; min-height: 56px; flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  .top-left { order: 1; }
  .top-actions { order: 2; margin-left: auto; }
  .turn-banner { order: 3; flex-basis: 100%; justify-content: flex-start; font-size: 12px; }
  .game-layout { display: flex; flex-direction: column; padding: 10px; gap: 12px; }
  .board-wrap { width: 100%; }
  .board { width: min(100%, 94vw); max-width: 900px; margin: 0 auto; }
  #btn-sidebar { display: none; }
  .sidebar { width: 100%; min-height: 360px; height: 58dvh; overflow: visible; backdrop-filter: none; }
  .players { max-height: 38%; }
  .inspector { position: fixed; left: 10px; right: 10px; bottom: 10px; max-height: 68dvh; z-index: 80; }
  .seats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .home-title { font-size: 44px; }
  .home-title em { display: block; margin: 6px 0 0; font-size: 0.44em; }
  .home-badge { font-size: 10px; letter-spacing: 0.1em; }
  .home-panel { padding: 20px 17px; }
  .home-foot { flex-direction: column; gap: 7px; align-items: center; }
  .lobby { padding: 10px 8px 30px; }
  .lobby-top { margin-bottom: 12px; }
  .lobby-top .mini-brand { font-size: 15px; }
  .lobby-top .btn.small { padding: 5px 9px; font-size: 10.5px; }
  .lobby-card { padding: 17px 12px 14px; border-radius: 16px; }
  .lobby-code-block { padding-bottom: 14px; }
  .panel-kicker { font-size: 9.5px; }
  .code-line { gap: 9px; margin: 4px 0 7px; }
  .code-line b { font-size: 31px; letter-spacing: 0.16em; }
  .code-line .btn { padding: 7px 11px; font-size: 11px; }
  .lobby-code-hint { font-size: 11px; margin-bottom: 11px; }
  .invite-line .text-input { display: none; }
  .invite-line { justify-content: center; }
  .invite-line .btn { width: 100%; height: 36px; }
  .lobby-players-head { margin: 15px 0 9px; }
  .lobby-players-head h2 { font-size: 14px; }
  .lobby-hint { font-size: 11px; }
  .seats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .seat { min-height: 82px; padding: 10px 9px; gap: 8px; border-radius: 10px; }
  .seat .avatar { width: 34px; height: 34px; font-size: 17px; }
  .seat-name { font-size: 12px; gap: 4px; }
  .seat .tag { font-size: 8.5px; padding: 2px 4px; }
  .seat-sub { font-size: 9.5px; margin-top: 4px; line-height: 1.4; }
  .seat.empty { min-height: 66px; font-size: 10.5px; }
  .seat .kick-btn { top: 4px; right: 4px; font-size: 12px; }
  .lobby-actions {
    position: sticky;
    bottom: 8px;
    z-index: 6;
    flex-direction: row;
    gap: 8px;
    margin-top: 14px;
    padding: 8px;
    background: rgba(8, 26, 29, 0.94);
    border: 1px solid rgba(232, 199, 129, 0.18);
    border-radius: 12px;
    backdrop-filter: blur(10px);
  }
  .lobby-actions .btn { width: auto; flex: 1; min-width: 0; padding: 10px 8px; font-size: 12px; }
  .lobby-actions .btn.big { font-size: 13px; }
  .lobby-note { font-size: 10px; margin-top: 10px; }
  .lobby-tips { flex-direction: column; align-items: flex-start; padding: 11px 12px; }
  .lobby-tips div { font-size: 10.5px; }
  .game-top { padding: 7px 9px; position: relative; }
  .top-actions .icon-btn { min-width: 44px; height: 33px; padding: 0 8px; font-size: 11.5px; }
  .room-chip { padding: 5px 8px; font-size: 10.5px; }
  .turn-banner { padding-bottom: 2px; }
  .board { width: 100%; gap: 1px; padding: 5px; border-radius: 10px; }
  .tile { border-radius: 2px; }
  .tile-name { font-size: 9px; line-height: 1.04; }
  .tile-price { display: none; }
  .tile-houses { font-size: 6px; }
  .tile-icon { font-size: 12px; }
  .board { gap: 2px; padding: 4px; }
  .tile.has-photo .tile-name { font-size: 9px; }
  .tile.has-photo .tile-houses { font-size: 5px; margin-top: 1px; padding: 0 1px; }
  .tile.side-bottom.has-photo .tile-band { height: 4px; }
  .tile.side-top.has-photo { padding-bottom: 6px; }
  .tile.side-top.has-photo .tile-band { height: 4px; }
  .tile.side-left.has-photo { padding-right: 6px; }
  .tile.side-left.has-photo .tile-band { width: 4px; }
  .tile.side-right.has-photo { padding-left: 6px; }
  .tile.side-right.has-photo .tile-band { width: 4px; }
  .tile.t-railroad .tile-icon, .tile.t-seaport .tile-icon, .tile.t-airport .tile-icon,
  .tile.t-utility .tile-icon, .tile.t-tax .tile-icon { display: none !important; }
  .tile.corner .tile-icon { font-size: 16px; }
  .tile.corner .tile-name { font-size: 9px; }
  .tile-pieces { gap: 0; }
  .piece { width: 13px; height: 13px; font-size: 8px; border-width: 1px; }
  .piece + .piece { margin-left: -4px; }
  .tile-pieces:has(.piece:nth-child(5)) .piece { width: 11px; height: 11px; font-size: 7px; }
  .tile-pieces:has(.piece:nth-child(6)) .piece { width: 10px; height: 10px; font-size: 6px; }
  .board-center { padding: 2% 3% 1.5%; }
  .center-sub { display: none; }
  .center-logo { font-size: 27px; }
  .dice-stage { margin: 1.5% 0; gap: 12px; }
  .die { width: 28px; }
  .center-foot { display: none; }
  .action-zone { width: 100%; gap: 4px; }
  .action-title { font-size: 11px; }
  .action-sub { font-size: 9px; }
  .action-zone .btn { font-size: 11px; padding: 0.55em 0.9em; }
  .buy-card { width: 96%; }
  .buy-card .bc-body { padding: 6px 8px 4px; }
  .buy-card .bc-title { font-size: 14px; }
  .buy-card .bc-meta { font-size: 9px; }
  .card-pop { width: 72%; padding: 14px; top: 27%; }
  .card-pop .cp-title { font-size: 19px; }
  .card-pop .cp-text { font-size: 11.5px; }
  .sidebar { height: auto; min-height: 430px; }
  .players { max-height: 245px; }
  .feed { min-height: 160px; }
  .modal-card { padding: 20px 17px; }
  .modal-title { font-size: 23px; }
}

@media (max-height: 700px) and (min-width: 961px) {
  .board { width: min(100%, calc(100dvh - 68px)); }
  .center-logo { font-size: 3.8cqw; }
  .dice-stage { margin: 1.2% 0; }
  .center-status { font-size: 10px; }
  .action-zone { margin-top: 0.8%; }
  .action-zone .btn { font-size: 11px; padding: 0.55em 1em; }
  .buy-card .bc-meta { display: none; }
}

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

/* ===== 手机横屏选项：CSS 旋转游戏层，棋盘切 C 形铺满 ===== */
.orient-btn { display: none; }
@media (max-width: 960px), (pointer: coarse) {
  .orient-btn { display: inline-flex; }
}
body.force-landscape { overflow: hidden; }
body.force-landscape #screen-game {
  position: fixed;
  top: 0;
  left: 100%;
  width: 100dvh;
  height: 100vw;
  min-height: 0;
  transform: rotate(90deg);
  transform-origin: top left;
  overflow: hidden;
  z-index: 40;
}
body.force-landscape .game-top {
  position: static;
  flex: 0 0 52px;
  height: 52px;
  min-height: 52px;
  flex-wrap: nowrap;
  padding: 5px 10px;
  gap: 8px;
}
body.force-landscape .game-top .turn-banner {
  order: 2;
  flex: 1;
  justify-content: center;
  padding: 0 8px;
  overflow: hidden;
  white-space: nowrap;
}
body.force-landscape .game-top .top-actions { order: 3; }
body.force-landscape .game-layout {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-height: 0;
  padding: 6px;
  gap: 8px;
}
body.force-landscape .board-wrap { flex: 1; width: auto; height: 100%; }
body.force-landscape .board.spiral { width: auto; max-width: 100%; height: 100%; }
body.force-landscape .game-layout > .sidebar { display: none; }
body.force-landscape #modal-layer,
body.force-landscape #card-pop,
body.force-landscape #toast {
  position: fixed;
  top: 0;
  left: 100%;
  width: 100dvh;
  height: 100vw;
  transform: rotate(90deg);
  transform-origin: top left;
  z-index: 70;
}
/* 横屏下购买卡改为紧凑横向，避免中心区高度不足时溢出成竖条 */
body.force-landscape .board.spiral .action-zone .buy-card {
  width: min(94%, 620px);
  max-height: 92%;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}
body.force-landscape .board.spiral .buy-card .bc-art { flex: 0 0 34%; width: 34%; aspect-ratio: auto; height: auto; }
body.force-landscape .board.spiral .buy-card .bc-art img { width: 100%; height: 100%; object-fit: cover; }
body.force-landscape .board.spiral .buy-card .bc-band { display: none; }
body.force-landscape .board.spiral .buy-card .bc-body { flex: 1; min-width: 0; padding: 6px 12px; display: flex; flex-direction: column; justify-content: center; }
body.force-landscape .board.spiral .buy-card .bc-title { font-size: clamp(14px, 1.7cqw, 24px); }
body.force-landscape .board.spiral .buy-card .bc-price { font-size: clamp(12px, 1.4cqw, 20px); }
body.force-landscape .board.spiral .buy-card .bc-meta { font-size: clamp(9px, 1.05cqw, 14px); line-height: 1.35; margin-top: 2px; }
body.force-landscape .board.spiral .buy-card .bc-actions { margin-top: 4px; gap: 4px; }
body.force-landscape .board.spiral .buy-card .bc-actions .btn { font-size: clamp(10px, 1.2cqw, 15px); padding: 0.4em 0.9em; }
body.force-landscape .board.spiral .buy-card .bc-cash { font-size: clamp(8px, 1cqw, 13px); margin-top: 3px; }
/* 横屏下点地块查看详情/卖房时，侧栏以浮层出现 */
body.force-landscape .game-layout > .sidebar:has(.inspector:not(.hidden)) {
  display: flex;
  position: fixed;
  top: 52px;
  right: 0;
  bottom: 0;
  width: min(340px, 44%);
  z-index: 55;
  margin: 0;
  border-radius: 10px 0 0 10px;
  box-shadow: -18px 0 50px rgba(0, 0, 0, 0.5);
}

/* ===== 玩家间交易 ===== */
.trade-box {
  position: fixed;
  right: 18px;
  top: 70px;
  z-index: 95;
  width: min(360px, 88vw);
  background: linear-gradient(170deg, #153b3d, #0a2426);
  border: 1px solid rgba(232, 199, 129, 0.55);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  padding: 12px 14px;
  color: #e8dcc2;
}
.trade-box.hidden { display: none; }
.tb-kicker { font-size: 10.5px; letter-spacing: 0.14em; color: #e8c781; margin-bottom: 4px; }
.tb-body { font-size: 12.5px; line-height: 1.55; color: #c8d7d1; }
.tb-actions { display: flex; gap: 7px; margin-top: 9px; }
.tb-actions .btn { font-size: 12px; padding: 0.5em 1em; }
.trade-dialog h3 { margin: 2px 0 4px; font-size: 18px; color: #f3e6c8; }
.trade-dialog .td-sub { margin: 0 0 6px; color: #9fb3ac; font-size: 12px; line-height: 1.5; }
.trade-dialog .field-label { display: block; margin-top: 10px; }
.trade-dialog .text-input { width: 100%; box-sizing: border-box; height: 38px; }
.td-actions { display: flex; gap: 8px; margin-top: 14px; }
@media (max-width: 960px) {
  .trade-box { left: 10px; right: 10px; top: auto; bottom: 14px; width: auto; }
  body.force-landscape .trade-box { left: auto; right: 16px; top: 64px; bottom: auto; width: min(360px, 62vw); }
}
