/* 环马大富翁 · 深热带夜色 × 金黄（竖屏优先） */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; background: #071A26; color: #EAF3F7;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  overscroll-behavior: none; user-select: none; }
button { font-family: inherit; cursor: pointer; border: none; }

.screen { min-height: 100dvh; display: flex; flex-direction: column; }

/* ---------- 开局菜单 ---------- */
#startScreen, #roomScreen { align-items: center; justify-content: center; padding: 20px;
  background:
    radial-gradient(1000px 500px at 50% -10%, #10405A 0%, transparent 60%),
    radial-gradient(600px 300px at 90% 110%, #0E3B33 0%, transparent 70%),
    #071A26; }
.start-card { width: min(420px, 100%); background: #0C2B3D; border: 1px solid #1D4A63;
  border-radius: 20px; padding: 26px 22px; text-align: center; box-shadow: 0 18px 50px #0009; }
.start-logo { font-size: 52px; }
.start-card h1 { margin: 6px 0 2px; font-size: 30px; letter-spacing: 2px; color: #FFD34D; }
.start-card h2 { margin: 4px 0 14px; color: #FFD34D; }
.start-card .sub { margin: 0 0 20px; color: #8FB6C7; font-size: 14px; }
.opt-row { text-align: left; margin: 14px 0; }
.opt-row label { display: block; font-size: 13px; color: #8FB6C7; margin-bottom: 7px; }
.chips { display: flex; gap: 8px; }
.chip { flex: 1; padding: 10px 0; border-radius: 10px; background: #123A50;
  color: #CFE6EF; font-size: 14px; border: 1px solid transparent; }
.chip.on { background: #FFD34D; color: #12232E; font-weight: 700; border-color: #FFE79A; }
[hidden] { display: none !important; }
.btn-primary { width: 100%; margin-top: 16px; padding: 15px 0; font-size: 17px; font-weight: 700;
  border-radius: 14px; background: linear-gradient(180deg, #FFDD6B, #F5B93B); color: #3A2A00;
  box-shadow: 0 6px 18px #F5B93B44; }
.btn-ghost { width: 100%; margin-top: 10px; padding: 13px 0; font-size: 15px; border-radius: 14px;
  background: transparent; color: #9FD0E3; border: 1px solid #2C5C74; }
.hint { font-size: 12px; color: #6D93A5; margin: 12px 0 0; }
.room-input { width: 100%; padding: 12px; font-size: 22px; text-align: center; letter-spacing: 8px;
  text-transform: uppercase; border-radius: 10px; border: 1px solid #2C5C74; background: #08222F; color: #FFD34D; }
.room-code-big { font-size: 46px; font-weight: 800; letter-spacing: 10px; color: #FFD34D;
  background: #08222F; border: 2px dashed #2C6C8C; border-radius: 14px; padding: 12px 6px; margin: 6px 0 14px; }
.room-list { list-style: none; padding: 0; margin: 0 0 14px; text-align: left; }
.room-list li { background: #0E3145; border: 1px solid #1B4A63; border-radius: 9px;
  padding: 9px 12px; margin-bottom: 6px; font-size: 14px; }
#nickName { width: 100%; padding: 11px 12px; font-size: 15px; border-radius: 10px;
  border: 1px solid #2C5C74; background: #08222F; color: #EAF3F7; }
#nickName:focus, .room-input:focus { outline: none; border-color: #FFD34D; }

/* ---------- 顶栏 / 玩家条 ---------- */
#top { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px;
  background: #0A2434; border-bottom: 1px solid #17415A; font-size: 14px; }
.t-left { font-weight: 800; color: #FFD34D; letter-spacing: 1px; }
.t-mid { color: #9FC6D6; font-size: 13px; }
.t-btn { background: none; font-size: 17px; padding: 2px 7px; color: #9FC6D6; }

#players { display: flex; gap: 6px; padding: 8px 10px; overflow-x: auto; background: #08202E; }
.pcard { flex: 1; min-width: 74px; padding: 6px 7px; border-radius: 10px; background: #0E2E42;
  border: 1px solid #1B4A63; position: relative; transition: .2s; }
.pcard.on { border-color: #FFD34D; background: #16405A; box-shadow: 0 0 0 1px #FFD34D66; }
.pcard.dead { opacity: .38; filter: grayscale(1); }
.pcard .pn { font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .pc { font-size: 12px; color: #FFD34D; font-weight: 700; }
.pcard .pl { font-size: 10px; color: #7FA9BC; }
.pcard .pemoji { position: absolute; right: 5px; top: 4px; font-size: 15px; }

/* ---------- 工具条 ---------- */
#toolbar { display: flex; gap: 6px; padding: 6px 10px; background: #08202E; }
#toolbar button { flex: 1; padding: 7px 0; font-size: 12px; border-radius: 8px;
  background: #0E3145; color: #A9D2E2; border: 1px solid #1B4A63; }
#toolbar button:active { background: #16455F; }

/* ---------- 棋盘 ---------- */
#boardWrap { flex: 1; position: relative; overflow: auto; background:
  radial-gradient(700px 420px at 30% 20%, #0E3145 0%, transparent 70%),
  radial-gradient(500px 400px at 85% 90%, #0D3A31 0%, transparent 70%), #071A26;
  display: flex; align-items: flex-start; justify-content: flex-start;
  -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; }
/* 大地图画布：固定 1500px，每格约 198px，文字清晰；靠容器滚动看局部、按钮缩放 */
#board { display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr);
  width: 1500px; aspect-ratio: 1; gap: 3px; padding: 3px; flex: none; }

.cell { position: relative; background: #FFFDF6; border-radius: 7px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 13px; line-height: 1.2; text-align: center; padding: 8px 5px 12px;
  border: 1px solid #E4DBC8; min-width: 0; }
.cell .ci { font-size: 26px; filter: drop-shadow(0 2px 2px #0003); }
.cell .cn { font-weight: 700; margin-top: 5px; color: #16303E; word-break: break-all; font-size: 13px; }
.cell .cp { color: #A8620A; font-size: 11.5px; font-weight: 800; margin-top: 3px; }
.cell .band { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; }
.cell.owned0 .band { height: 8px; }
.cell .house { position: absolute; top: 4px; right: 6px; font-size: 16px; }
.cell.type-start { background: #DFF5E4; border-color: #2F9E63; }
.cell.type-fortune, .cell.type-chance { background: #EFE8FB; border-color: #8A5CD1; }
.cell.type-tax, .cell.type-sst { background: #FDEBDC; border-color: #E07B2E; }
.cell.type-rest { background: #E1F0FA; border-color: #2E7DD1; }
.cell.hi { box-shadow: inset 0 0 0 2px #FFD34D; z-index: 2; }
.cell.buyable { animation: pulse 1s infinite; }
@keyframes pulse { 50% { box-shadow: inset 0 0 0 3px #2F9E63; } }

.token { position: absolute; width: 42%; height: 42%; left: 30%; top: 5%;
  display: flex; align-items: center; justify-content: center; font-size: 26px;
  background: #0C2B3DEE; border: 2px solid #EAF3F7; border-radius: 50%;
  filter: drop-shadow(0 3px 3px #000B); transition: all .12s linear; z-index: 3; }
.token.t2 { left: 54%; top: 5%; }
.token.t3 { left: 4%; top: 44%; }
.token.t4 { left: 54%; top: 44%; }
.token.bust { filter: grayscale(1) opacity(.5); }

/* 中央地图区 */
#board .center { grid-column: 2 / 8; grid-row: 2 / 8; border-radius: 10px; position: relative;
  background: linear-gradient(160deg, #F5F1E4, #E9F2E7); border: 1px solid #D8CDB4;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden; padding: 8px; }
.center .map { font-size: clamp(60px, 30vw, 170px); opacity: .9; text-align: center; line-height: 1.15; }
.center .map small { display: block; font-size: 15px; color: #6E7F72; letter-spacing: 5px; }
.center .banner { margin-top: 14px; font-size: 17px; color: #A8620A; text-align: center; font-weight: 700; }

#minimap { position: fixed; left: 8px; top: 150px; width: 88px; height: 88px; z-index: 6;
  background: #061520EE; border: 1px solid #2C5C74; border-radius: 8px; padding: 4px; }
#minimap::after { content: "金点是我"; position: absolute; left: 0; right: 0; bottom: -15px;
  text-align: center; font-size: 9px; color: #8FB6C7; }
#minimap .mm-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 1px; width: 100%; height: 100%; }
#minimap i { background: #1B4A63; border-radius: 1px; font-style: normal; }
#minimap i.me { background: #FFD34D; }

/* 亮色棋盘上的可读性补充 */
.cell.owned0 { box-shadow: inset 0 0 0 2px #16303E; }
.cell .bi-s { color: #5A6E78; }

/* ---------- 底部 HUD ---------- */
#hud { display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: #0A2434; border-top: 1px solid #17415A; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
.hud-turn { font-size: 13px; font-weight: 700; color: #9FC6D6; flex: 1; }
.hud-turn.my { color: #7CFF9E; }
.dice-box { display: flex; gap: 5px; }
.die { width: 34px; height: 34px; background: #F4F7F9; color: #12232E; border-radius: 7px;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  box-shadow: inset 0 -3px 0 #C7D2D8; }
.btn-roll { padding: 13px 18px; font-size: 16px; font-weight: 800; border-radius: 12px;
  background: linear-gradient(180deg, #FFDD6B, #F5B93B); color: #3A2A00; box-shadow: 0 5px 14px #F5B93B44; }
.btn-roll:disabled { filter: grayscale(.8) brightness(.7); box-shadow: none; }
.hud-money { font-size: 11px; color: #8FB6C7; text-align: right; line-height: 1.5; min-width: 92px; }
.hud-money b { color: #FFD34D; font-size: 13px; }
.loan-row { display: flex; gap: 5px; align-items: center; justify-content: flex-end; }
.mini { font-size: 10px; padding: 2px 7px; border-radius: 6px; background: #123A50; color: #A9D2E2; border: 1px solid #2C5C74; }

#feed { max-height: 74px; overflow-y: auto; background: #061520; font-size: 11.5px;
  color: #89AEc0; padding: 6px 12px; line-height: 1.55; }
#feed .ev-good { color: #7CFF9E; }
#feed .ev-bad { color: #FF9C8F; }
#feed .ev-sys { color: #FFD34D; }

/* ---------- 弹窗 ---------- */
.modal { position: fixed; inset: 0; background: #000A; display: flex; align-items: center;
  justify-content: center; z-index: 50; padding: 20px; }
.modal-card { width: min(400px, 100%); background: #0C2B3D; border: 1px solid #2C6C8C;
  border-radius: 18px; padding: 22px; text-align: center; animation: pop .18s ease-out; }
@keyframes pop { from { transform: scale(.92); opacity: 0; } }
.modal-card .m-emoji { font-size: 44px; }
.modal-card h3 { margin: 8px 0 4px; font-size: 20px; color: #FFD34D; }
.modal-card .m-desc { color: #9FC6D6; font-size: 14px; margin: 4px 0 14px; line-height: 1.6; }
.modal-card .m-price { font-size: 30px; font-weight: 800; color: #7CFF9E; margin: 6px 0; }
.modal-card .m-amt { font-size: 26px; font-weight: 800; margin: 6px 0; }
.modal-card .m-amt.good { color: #7CFF9E; }
.modal-card .m-amt.bad { color: #FF9C8F; }
.m-row { display: flex; gap: 10px; margin-top: 14px; }
.m-btn { flex: 1; padding: 13px 0; border-radius: 12px; font-size: 15px; font-weight: 700; }
.m-btn.yes { background: linear-gradient(180deg, #FFDD6B, #F5B93B); color: #3A2A00; }
.m-btn.no { background: #123A50; color: #A9D2E2; border: 1px solid #2C5C74; }
.m-btn.ok { background: linear-gradient(180deg, #FFDD6B, #F5B93B); color: #3A2A00; width: 100%; }
.m-flow { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 10px 0; }
.m-flow .mf { text-align: center; font-size: 13px; }
.m-flow .mf b { display: block; font-size: 22px; color: #FFD34D; }
.m-flow .arrow { color: #FF9C8F; font-size: 20px; }
.m-scroll { max-height: 58vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  text-align: left; margin: 0 -4px; padding: 0 4px; }

/* 结算表 */
.rank-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
.rank-table td { padding: 7px 5px; border-bottom: 1px solid #1D4E68; text-align: left; color: #CFE6EF; }
.rank-table td:last-child { text-align: right; color: #FFD34D; font-weight: 800; }
.rank-table .r1 td:first-child::before { content: "👑 "; }

/* 银行面板 */
.bank-sec { text-align: left; margin-top: 10px; }
.bank-sec h4 { margin: 10px 0 6px; font-size: 13px; color: #8FB6C7; }
.bank-item { display: flex; justify-content: space-between; align-items: center;
  background: #0E3145; border: 1px solid #1B4A63; border-radius: 9px; padding: 8px 10px; margin-bottom: 6px; font-size: 13px; }
.bank-item .bi-n { color: #E7F2F7; }
.bank-item .bi-s { color: #7FA9BC; font-size: 11px; }
.bank-item button { padding: 7px 12px; border-radius: 8px; font-size: 12px; font-weight: 700;
  background: #FFD34D; color: #3A2A00; }
.bank-item button:disabled { background: #24485D; color: #6D93A5; }

/* 大方格（横屏/桌面） */
@media (min-width: 760px) {
  #game { max-width: 720px; margin: 0 auto; }
}
