/* ==========================================================================
   大富翁
   --------------------------------------------------------------------------
   依赖全局变量与共享组件（.mode-tabs / .btn / .panel / .room-* / .pc-field 等），
   只补充本游戏自己的部分。前缀 mnp-
   ========================================================================== */

.mnp-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.mnp {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(100vw, 1200px);
  max-width: 100%;
}

.mnp-slot:empty { display: none; }

/* 模式页签与内容同宽（公共组件，只在本游戏内铺满） */
.mnp-app .mode-tabs {
  width: min(100vw, 1200px);
  max-width: 100%;
}
.mnp-app .mode-tab { padding: 12px 18px; }
.mnp-app .mode-tab b { font-size: 15px; }

/* ------------------------------ 座位配色 -------------------------------- */

.mnp-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--text-mute);
}
.mnp-dot.is-s0, .mnp-chip.is-s0 .mnp-dot { background: #8b5cf6; }
.mnp-dot.is-s1, .mnp-chip.is-s1 .mnp-dot { background: #22d3ee; }
.mnp-dot.is-s2, .mnp-chip.is-s2 .mnp-dot { background: #fb7185; }
.mnp-dot.is-s3, .mnp-chip.is-s3 .mnp-dot { background: #34d399; }
.mnp-dot.is-s4, .mnp-chip.is-s4 .mnp-dot { background: #fbbf24; }
.mnp-dot.is-s5, .mnp-chip.is-s5 .mnp-dot { background: #60a5fa; }

/* ------------------------------ 色组 ------------------------------------ */

.is-g-brown { background: #955436; }
.is-g-lightblue { background: #aae0fa; }
.is-g-pink { background: #d93a96; }
.is-g-orange { background: #f7941d; }
.is-g-red { background: #ed1b24; }
.is-g-yellow { background: #fef200; }
.is-g-green { background: #1fb25a; }
.is-g-darkblue { background: #0072bb; }
.is-g-railroad { background: #5b6472; }
.is-g-utility { background: #9aa4b8; }

/* ------------------------------ 状态栏 ---------------------------------- */

.mnp-status {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: var(--surface);
}
.mnp-status-line { font-size: 13px; color: var(--text-dim); letter-spacing: .02em; }

.mnp-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.mnp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  font-size: 12.5px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.035);
  transition: border-color .2s, background .2s;
}
.mnp-chip b { font-weight: 600; color: var(--text); }
.mnp-chip em {
  font-style: normal;
  font-weight: 700;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.mnp-chip small { font-size: 11px; color: var(--text-mute); }
.mnp-chip.is-turn {
  border-color: rgba(139, 92, 246, 0.55);
  background: rgba(139, 92, 246, 0.14);
}
.mnp-chip.is-out { opacity: .5; }
.mnp-chip.is-out b { text-decoration: line-through; }
.mnp-chip.is-win {
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(52, 211, 153, 0.12);
}

/* ------------------------------ 结果横幅 -------------------------------- */

.mnp-banner {
  padding: 14px 16px;
  text-align: center;
  border-radius: var(--radius);
  border: 1px solid rgba(139, 92, 246, 0.4);
  background: linear-gradient(120deg, rgba(139, 92, 246, 0.18), rgba(34, 211, 238, 0.1));
  animation: mnp-banner-in .28s cubic-bezier(.2, .8, .3, 1);
}
.mnp-banner[hidden] { display: none; }
.mnp-banner-title { font-size: 17px; font-weight: 700; }
.mnp-banner-detail { margin-top: 5px; font-size: 12.5px; line-height: 1.6; color: var(--text-dim); }
.mnp-banner-detail:empty { display: none; }
.mnp-banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}
.mnp-banner-actions:empty { display: none; margin-top: 0; }

@keyframes mnp-banner-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

.mnp-score-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 10px;
  margin: 6px 0 2px;
}
.mnp-score-row {
  padding: 3px 10px;
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.04);
  font-variant-numeric: tabular-nums;
}
.mnp-score-row b { margin-right: 5px; color: var(--text); font-weight: 600; }
.mnp-score-row.is-win {
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.5);
  background: rgba(52, 211, 153, 0.12);
}

/* ------------------------------- 棋盘 ----------------------------------- */

.mnp-main {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-start;
}

.mnp-board {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  grid-template-rows: repeat(11, 1fr);
  flex: 1 1 640px;
  width: min(96vw, 780px);
  aspect-ratio: 1 / 1;
  padding: 6px;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
}

.mnp-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 3px 2px 4px;
  font-size: 10px;
  line-height: 1.15;
  text-align: center;
  color: var(--text-dim);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow .16s, border-color .16s, background .16s;
}
.mnp-cell:hover { border-color: rgba(139, 92, 246, 0.6); }

.mnp-cell-bar {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 5px;
}

/* 格子编号：右上角，方便对照查找 */
.mnp-cell-no {
  position: absolute;
  right: 3px;
  top: 7px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  color: var(--text-mute);
  font-variant-numeric: tabular-nums;
}

.mnp-cell-name {
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mnp-cell-price {
  font-size: 9.5px;
  color: var(--text-mute);
  font-variant-numeric: tabular-nums;
}
.mnp-cell-build {
  font-size: 10px;
  letter-spacing: -.5px;
}
.mnp-cell-build.is-hotel { font-size: 12px; }

.mnp-cell.is-owned { box-shadow: inset 0 -3px 0 0 currentColor; }
.mnp-cell.is-owned.is-s0 { color: #8b5cf6; }
.mnp-cell.is-owned.is-s1 { color: #22d3ee; }
.mnp-cell.is-owned.is-s2 { color: #fb7185; }
.mnp-cell.is-owned.is-s3 { color: #34d399; }
.mnp-cell.is-owned.is-s4 { color: #fbbf24; }
.mnp-cell.is-owned.is-s5 { color: #60a5fa; }
.mnp-cell.is-owned .mnp-cell-name { color: var(--text); }

.mnp-cell.is-mortgaged { opacity: .55; }
.mnp-cell.is-mortgaged .mnp-cell-price { color: #fda4af; }

.mnp-cell.is-sel {
  border-color: rgba(251, 191, 36, 0.9);
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.6);
}
.mnp-cell.is-pending {
  border-color: rgba(34, 211, 238, 0.9);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.55);
}

.mnp-cell.is-go, .mnp-cell.is-gotojail {
  background: linear-gradient(150deg, rgba(139, 92, 246, 0.22), rgba(139, 92, 246, 0.06));
}
.mnp-cell.is-jail { background: rgba(251, 113, 133, 0.14); }
.mnp-cell.is-park { background: rgba(52, 211, 153, 0.14); }
.mnp-cell.is-tax { background: rgba(251, 191, 36, 0.16); }
.mnp-cell.is-chance { background: rgba(34, 211, 238, 0.14); }
.mnp-cell.is-chest { background: rgba(96, 165, 250, 0.16); }

/* 棋子 */
.mnp-cell-pawns {
  position: absolute;
  left: 2px;
  top: 7px;
  display: flex;
  gap: 2px;
}
.mnp-pawn {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.35);
}
.mnp-pawn.is-s0 { background: #8b5cf6; }
.mnp-pawn.is-s1 { background: #22d3ee; }
.mnp-pawn.is-s2 { background: #fb7185; }
.mnp-pawn.is-s3 { background: #34d399; }
.mnp-pawn.is-s4 { background: #fbbf24; }
.mnp-pawn.is-s5 { background: #60a5fa; }

/* 棋盘中央 */
.mnp-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  text-align: center;
}
.mnp-dice { display: flex; gap: 12px; }
.mnp-die {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.25));
  font-variant-numeric: tabular-nums;
}
.mnp-center-line { font-size: 13px; color: var(--text-dim); }

/* 动作反馈：显示在骰子上方（如「买下了这块地」） */
.mnp-center-flash {
  margin-bottom: 4px;
  padding: 5px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #6ee7b7;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.5);
  background: rgba(52, 211, 153, 0.12);
  animation: mnp-flash-in .2s ease-out;
}
@keyframes mnp-flash-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
.mnp-center-wait { margin: 0; font-size: 12px; color: var(--text-mute); }
.mnp-center-tip { margin: 2px 0 0; font-size: 12px; color: var(--text-dim); }
.mnp-center .mnp-action-btns { margin-top: 8px; }
.mnp-card-note {
  max-width: 260px;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(139, 92, 246, 0.5);
  background: rgba(139, 92, 246, 0.1);
}
.mnp-card-note b {
  display: block;
  margin-bottom: 2px;
  color: #c4b5fd;
  font-size: 11.5px;
}

/* ------------------------------- 侧栏 ----------------------------------- */

.mnp-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 0 0 292px;
  width: 292px;
  min-width: 0;
}

.mnp-side-title {
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: .06em;
  margin-bottom: 6px;
}

.mnp-players,
.mnp-mine {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: var(--surface);
}

.mnp-pcard {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
}
.mnp-pcard.is-turn { border-color: rgba(139, 92, 246, 0.55); background: rgba(139, 92, 246, 0.12); }
.mnp-pcard.is-me { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.mnp-pcard.is-out { opacity: .5; }
.mnp-pcard-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mnp-pcard-top b { font-size: 13px; color: var(--text); }
.mnp-pcard-cash {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.mnp-pcard-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 11.5px;
  color: var(--text-mute);
}
.mnp-pcard-meta .is-jail { color: #fda4af; }
.mnp-pcard-meta .is-out-tag { color: #fda4af; }

/* 我的地产 */
.mnp-tcard {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  margin-bottom: 6px;
  font-family: inherit;
  text-align: left;
  color: var(--text);
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color .14s, background .14s;
}
.mnp-tcard:hover { border-color: rgba(139, 92, 246, 0.6); background: rgba(139, 92, 246, 0.08); }
.mnp-tcard.is-sel {
  border-color: rgba(251, 191, 36, 0.9);
  background: rgba(251, 191, 36, 0.1);
}
.mnp-tcard.is-mortgaged { opacity: .6; }
.mnp-tcard-bar {
  width: 5px;
  align-self: stretch;
  border-radius: 3px;
  flex: 0 0 auto;
}
.mnp-tcard-no {
  margin-right: 4px;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-mute);
  font-variant-numeric: tabular-nums;
}

.mnp-sel-note {
  margin: 2px 0 6px;
  font-size: 11.5px;
  color: var(--text-mute);
}

.mnp-tcard-main { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.mnp-tcard-main b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mnp-tcard-main small { font-size: 11px; color: var(--text-mute); }
.mnp-tcard-side { display: flex; flex-direction: column; align-items: flex-end; flex: 0 0 auto; }
.mnp-tcard-side em { font-style: normal; font-size: 12px; font-weight: 600; }
.mnp-tcard-side small { font-size: 11px; color: var(--text-mute); font-variant-numeric: tabular-nums; }

.mnp-tcard-ops { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.mnp-empty { margin: 0; font-size: 12px; color: var(--text-mute); }

/* ------------------------------ 操作与提示 ------------------------------ */

.mnp-notice {
  padding: 10px 16px;
  font-size: 12.5px;
  text-align: center;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  border: 1px solid var(--border-soft);
  background: var(--surface);
}
.mnp-notice[hidden] { display: none; }
.mnp-notice.is-error {
  color: #fda4af;
  border-color: rgba(251, 113, 133, 0.4);
  background: rgba(251, 113, 133, 0.12);
}

.mnp-action-tip { margin: 0; font-size: 12.5px; color: var(--text-dim); text-align: center; }
.mnp-action-tip.is-hot { color: #fcd34d; font-weight: 600; }
.mnp-action-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.mnp-controls { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.mnp-controls:empty { display: none; }

/* ------------------------------- 战报 ----------------------------------- */

.mnp-log {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: var(--surface);
}
.mnp-log-title {
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: .06em;
  margin-bottom: 2px;
}
.mnp-log-row { font-size: 12.5px; line-height: 1.6; color: var(--text-dim); }
.mnp-log-row b { color: var(--text); font-weight: 600; }
.mnp-log-row.is-s0 b { color: #c4b5fd; }
.mnp-log-row.is-s1 b { color: #67e8f9; }
.mnp-log-row.is-s2 b { color: #fda4af; }
.mnp-log-row.is-s3 b { color: #6ee7b7; }
.mnp-log-row.is-s4 b { color: #fcd34d; }
.mnp-log-row.is-s5 b { color: #93c5fd; }
.mnp-log-row.is-empty { color: var(--text-mute); }

/* ------------------------------ 单机顶部 -------------------------------- */

.mnp-local-top { display: flex; flex-direction: column; gap: 8px; }

/* 说明块：底色与「游戏规则」面板一致 */
.mnp-local-hint {
  margin: 0;
  padding: 12px 16px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-dim);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
}

/* 人数按钮与「重新开始」同一行，按钮靠右 */
.mnp-local-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.mnp-local-bar .pc-field { margin-bottom: 0; }
.mnp-local-bar .btn { margin-left: auto; padding: 9px 18px; }

.mnp-rules { width: 100%; }

/* ------------------------------ 房间座位 -------------------------------- */

.mnp-lobby { width: min(94vw, 620px); }

.room-seat.is-s0 .room-seat-mark { color: #8b5cf6; background: rgba(139, 92, 246, 0.16); }
.room-seat.is-s1 .room-seat-mark { color: #22d3ee; background: rgba(34, 211, 238, 0.16); }
.room-seat.is-s2 .room-seat-mark { color: #fb7185; background: rgba(251, 113, 133, 0.16); }
.room-seat.is-s3 .room-seat-mark { color: #34d399; background: rgba(52, 211, 153, 0.16); }
.room-seat.is-s4 .room-seat-mark { color: #fbbf24; background: rgba(251, 191, 36, 0.16); }
.room-seat.is-s5 .room-seat-mark { color: #60a5fa; background: rgba(96, 165, 250, 0.16); }
.room-seat.is-offline { opacity: .55; }

/* ------------------------------ 亮色主题 -------------------------------- */

body.theme-light .mnp-score-row.is-win {
  color: #047857;
  border-color: rgba(4, 120, 87, 0.45);
  background: rgba(16, 185, 129, 0.12);
}
body.theme-light .mnp-action-tip.is-hot { color: #b45309; }
body.theme-light .mnp-pcard-meta .is-jail,
body.theme-light .mnp-pcard-meta .is-out-tag { color: #b91c1c; }
body.theme-light .mnp-cell.is-mortgaged .mnp-cell-price { color: #b91c1c; }

/* ------------------------------ 响应式 ---------------------------------- */

@media (max-width: 900px) {
  .mnp-main { flex-direction: column; align-items: center; }
  .mnp-side { width: min(96vw, 780px); flex: 1 1 auto; }
}

@media (max-width: 640px) {
  .mnp { gap: 10px; }
  .mnp-status { padding: 10px 12px; }
  .mnp-board { width: min(98vw, 500px); }
  .mnp-cell { font-size: 8.5px; }
  .mnp-cell-name { font-size: 8.5px; }
  .mnp-cell-price { font-size: 8px; }
  .mnp-cell-no { font-size: 8px; }
  .mnp-die { width: 42px; height: 42px; font-size: 18px; }
  .mnp-action { padding: 10px 12px; }
}
