/* Tycoon: the same dark design as the other games; gold is its colour, the board stays light */
body.mono {
  --bg: #050c08;
  --accent: #fbbf24;
  --accent-soft: rgba(251, 191, 36, .15);
  --gold: #f5c542;
  --glow-a: #22c55e;
  --glow-b: #f5c542;
  --felt-a: #0f2a1d;
  --felt-b: #07140d;
  --rim: rgba(34, 197, 94, .25);
  --me: #f5c542;
}
body.mono .brand-mark.mono-mark rect:first-child { fill: var(--accent); }
body.mono .brand-mark.mono-mark .die { fill: #fff; }
body.mono .brand-mark.mono-mark circle { fill: var(--accent); }
body.mono .hero h1 em { background: linear-gradient(100deg, #fff1a8, var(--gold) 55%, #d4a017); -webkit-background-clip: text; background-clip: text; }
body.mono .room-pill .code { background: rgba(245, 197, 66, .14); color: var(--gold); }
body.mono .phase-chip::before { background: var(--accent); box-shadow: 0 0 10px var(--accent); }


/* ---------- game layout: players | board ---------- */
body.mono[data-phase="playing"] main, body.mono[data-phase="ended"] main { max-width: none; padding: 10px 16px; }
.mono-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 18px; align-items: start; }
.players-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; position: sticky; top: 66px; }
.board-area { min-width: 0; display: flex; justify-content: center; }
.mboard { position: relative; width: min(100%, calc(100dvh - 78px)); aspect-ratio: 1; container-type: size; }
.col-actions { justify-content: flex-start; }

/* ---------- the board: classic light look ---------- */
.squares {
  position: absolute; inset: 0; display: grid; gap: 0;
  grid-template-columns: 1.7fr repeat(9, 1fr) 1.7fr; grid-template-rows: 1.7fr repeat(9, 1fr) 1.7fr;
  background: #cfe6d3; border-radius: 10px; border: 3px solid #1d2b23; overflow: hidden;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .95);
}
.sq {
  position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 0; overflow: hidden;
  border: 0; border-radius: 0; background: #f6f1e3; color: #17211b; cursor: pointer; text-align: center;
  box-shadow: inset 0 0 0 .5px #3c4a41; font-size: clamp(10px, 1.5cqmin, 15px); line-height: 1.12;
  transition: background .15s;
}
.sq:hover:not(:disabled) { background: #fffaf0; border: 0; transform: none; }
.sq.corner { background: #e9f3e6; }
.sq .strip { position: absolute; background: var(--gc); display: flex; align-items: center; justify-content: center; gap: 3px; box-shadow: inset 0 0 0 .5px #3c4a41; }
.sq.bottom .strip { top: 0; left: 0; right: 0; height: 21%; }
.sq.top .strip { bottom: 0; left: 0; right: 0; height: 21%; }
.sq.left .strip { right: 0; top: 0; bottom: 0; width: 17%; flex-direction: column; }
.sq.right .strip { left: 0; top: 0; bottom: 0; width: 17%; flex-direction: column; }
.bldg { display: flex; gap: 2px; flex-direction: inherit; align-items: center; justify-content: center; }
.house { display: block; width: clamp(6px, .95cqmin, 11px); aspect-ratio: 1; background: #16a34a; border: 1px solid #0b3d1d; border-radius: 1px; }
.hotel { display: block; width: clamp(14px, 2.6cqmin, 28px); height: clamp(7px, 1.1cqmin, 12px); background: #dc2626; border: 1px solid #5c0b0b; border-radius: 1px; }
.sq.left .hotel, .sq.right .hotel { width: clamp(7px, 1.1cqmin, 12px); height: clamp(14px, 2.6cqmin, 28px); }
.sq-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 0; }
.sq.bottom .sq-body { padding: 24% 4px 22%; }
.sq.top .sq-body { padding: 22% 4px 24%; }
.sq.left .sq-body { padding: 4px 19% 22% 6%; }
.sq.right .sq-body { padding: 4px 6% 22% 19%; }
.sq.corner .sq-body { padding: 6px; }
/* side columns are short: non-street icons sit in the free bottom corner, opposite the price */
.sq.left:not(.corner):not(.t-street) .sq-icon, .sq.right:not(.corner):not(.t-street) .sq-icon { position: absolute; bottom: 4px; }
.sq.left:not(.corner):not(.t-street) .sq-icon { right: 6px; }
.sq.right:not(.corner):not(.t-street) .sq-icon { left: 6px; }
.sq.left:not(.corner):not(.t-street) .sq-svg, .sq.right:not(.corner):not(.t-street) .sq-svg { width: clamp(14px, 2.4cqmin, 24px); height: clamp(14px, 2.4cqmin, 24px); }
.sq.left:not(.t-street) .sq-body { padding-right: 6%; } .sq.right:not(.t-street) .sq-body { padding-left: 6%; }
.key-tag { display: inline-flex; align-items: center; gap: 3px; }
.key-tag svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sq-name { font-weight: 650; letter-spacing: -.01em; overflow-wrap: break-word; hyphens: auto; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-transform: uppercase; font-size: .86em; }
.sq.corner .sq-name { font-size: .95em; }
.sq-icon { color: var(--icon, #2d3b33); line-height: 0; }
.sq-svg { width: clamp(18px, 3.4cqmin, 34px); height: clamp(18px, 3.4cqmin, 34px); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sq.corner .sq-svg { width: clamp(28px, 6cqmin, 58px); height: clamp(28px, 6cqmin, 58px); }
.t-go { --icon: #c81e1e; } .t-jail { --icon: #c2410c; } .t-parking { --icon: #1d4ed8; } .t-gotojail { --icon: #1e3a8a; }
.t-chance { --icon: #ea580c; } .t-chest { --icon: #0369a1; } .t-tax { --icon: #4b5563; } .t-railway { --icon: #111827; } .t-utility { --icon: #a16207; }
.sq.t-go .sq-name { color: #c81e1e; font-size: 1.25em; font-weight: 800; }
/* price tag on the outer edge; owned: the owner's colour with the current rent */
.tag-price {
  position: absolute; font-family: var(--mono); font-weight: 700; font-size: .9em; color: #17211b;
  background: rgba(23, 33, 27, .08); padding: 1px 6px; border-radius: 6px; white-space: nowrap;
}
.tag-price.tax { color: #991b1b; }
.sq.bottom .tag-price { bottom: 5px; left: 50%; transform: translateX(-50%); }
.sq.top .tag-price { top: 5px; left: 50%; transform: translateX(-50%); }
.sq.left .tag-price { left: 5px; bottom: 4px; }
.sq.right .tag-price { right: 5px; bottom: 4px; }
.sq.owned .tag-price { background: var(--owner); color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .35); }
.sq.owned::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 3px var(--owner); pointer-events: none; }
.sq .lock { display: none; position: absolute; top: 4px; right: 4px; color: #6b7280; }
.sq .lock .sq-svg { width: clamp(12px, 1.8cqmin, 18px); height: clamp(12px, 1.8cqmin, 18px); }
.sq.mortgaged { background: #e7e2d5; }
.sq.mortgaged .lock { display: block; }
.sq.mortgaged .sq-body { opacity: .5; }
.sq.mortgaged .tag-price { background: #6b7280; }

/* ---------- drawings on the special squares ---------- */
.art { display: block; width: auto; flex: none; }
.only-art { padding: 0 !important; }
.sq.bottom .only-art, .sq.top .only-art { padding: 10% 0 22% !important; }
.sq.top .only-art { padding: 22% 0 10% !important; }
.sq.left .only-art { padding: 0 6% 18% !important; } .sq.right .only-art { padding: 0 6% 18% !important; }
.t-chance .only-art, .t-chest .only-art { padding: 6% !important; }
.art-chance { height: 74%; max-height: 78px; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .15)); }
.sq.left .art-chance, .sq.right .art-chance { height: 82%; }
.art-chest { width: 72%; max-width: 70px; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .15)); }
.sq.left .art-chest, .sq.right .art-chest { width: auto; height: 74%; }
.art-bulb, .art-tap, .art-coins, .art-ring { height: 56%; max-height: 54px; }
.sq.left .art-bulb, .sq.right .art-bulb, .sq.left .art-tap, .sq.right .art-tap,
.sq.left .art-coins, .sq.right .art-coins, .sq.left .art-ring, .sq.right .art-ring { height: 62%; }
.t-railway .sq-body { gap: 2px; }
.art-train { width: 76%; max-width: 64px; }
.sq.left .art-train, .sq.right .art-train { width: auto; height: 46%; }
/* corners */
.corner-art { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6%; padding: 8%; }
.corner-name { font-weight: 800; text-transform: uppercase; font-size: .95em; line-height: 1.05; }
.art-car { width: 78%; } .art-police { width: 62%; }
.t-parking .corner-name { color: #b91c1c; } .t-gotojail .corner-name { color: #1e3a8a; }
.go-art { transform: rotate(-45deg); gap: 2px; }
.go-word { font-weight: 900; font-size: 1.7em; color: #b91c1c; letter-spacing: .02em; line-height: 1; }
.art-arrow { width: 74%; }
.go-sal { font-family: var(--mono); font-weight: 700; font-size: .95em; color: #166534; }
/* jail: the barred cell in the inner corner, "just visiting" round the outer edges */
.jail-art { position: absolute; inset: 0; }
.jail-cell { position: absolute; top: 0; right: 0; width: 70%; height: 70%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: #fed7aa; border-left: 1.5px solid #3c4a41; border-bottom: 1.5px solid #3c4a41; }
.jail-cell .art-bars { width: 62%; }
.jail-cell b { font-weight: 900; text-transform: uppercase; font-size: .9em; color: #7c2d12; }
.visit { position: absolute; font-weight: 800; text-transform: uppercase; font-size: .78em; color: #374151; letter-spacing: .04em; white-space: nowrap; }
.visit-l { left: 0; top: 0; width: 30%; height: 70%; writing-mode: vertical-rl; transform: rotate(180deg); display: flex; align-items: center; justify-content: center; }
.visit-b { bottom: 0; left: 30%; right: 0; height: 30%; display: flex; align-items: center; justify-content: center; }
.t-chance:hover, .t-chest:hover { background: #fffaf0; }

/* trade window / deal: each side's total */
.side-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.side-value { font-family: var(--mono); font-weight: 700; color: var(--gold); background: rgba(245, 197, 66, .12); padding: 2px 9px; border-radius: 99px; font-size: .9rem; }
.side-who { display: flex; align-items: center; gap: 8px; font-size: .86rem; }
.deal-who .side-value { margin-left: auto; color: #166534; background: #dcfce7; }

/* bank and feed */
.bank-info { display: flex; gap: 14px; align-items: center; color: var(--muted); font-family: var(--mono); font-weight: 600; }
.bank-item { display: inline-flex; align-items: center; gap: 6px; }
.bank-item .house { width: 11px; height: 11px; }
.bank-item .hotel { width: 20px; height: 10px; }
.bank-item .art-car { width: 26px; }
.pdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--pc); margin-right: 7px; vertical-align: 1px; box-shadow: 0 0 0 1.5px #fff; }

/* ---------- centre of the board ---------- */
.board-center {
  position: absolute; left: 13.9%; right: 13.9%; top: 13.9%; bottom: 13.9%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 18px;
  color: #17211b;
}
.center-top { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.center-brand {
  font-family: var(--font); font-weight: 900; font-size: clamp(1.1rem, 4cqmin, 2.6rem); letter-spacing: .06em; line-height: 1;
  color: #fff; background: #d0021b; padding: .25em .7em; border-radius: 6px; transform: rotate(-12deg);
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px #d0021b, 0 10px 24px rgba(0, 0, 0, .25);
}
.turn-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; font-size: 1.05rem; font-weight: 600; }
.turn-info .pc-ring { width: 32px; height: 32px; }
.winner-line { font-weight: 800; font-size: clamp(1.4rem, 3.6cqmin, 2.4rem); color: #d0021b; }
.mini-timer { font-family: var(--mono); font-size: .8rem; color: #374151; padding: 2px 9px; border-radius: 99px; background: rgba(0, 0, 0, .08); }
.mini-timer.low { color: #b91c1c; animation: pulse 1s infinite; }
.actions { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 100%; }
.actions .row { justify-content: center; }
.actions button:not(.primary):not(.mini-deed) { background: #fff; color: #17211b; border-color: rgba(0, 0, 0, .15); }
.actions button:not(.primary):not(.mini-deed):hover:not(:disabled) { background: #f3f4f6; }
.big-roll { font-size: 1.15rem; padding: 15px 34px; border-radius: 14px; }
.mini-deed { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 210px; padding: 0 0 10px; border-radius: 10px; overflow: hidden; background: #fff; color: #17211b; border: 2px solid #17211b; box-shadow: 0 12px 30px rgba(0, 0, 0, .25); }
.mini-deed:hover:not(:disabled) { background: #fffdf5; border-color: #17211b; }
.md-strip { align-self: stretch; height: 30px; background: var(--gc); border-bottom: 2px solid #17211b; }
.mini-deed b { font-size: 1rem; padding: 0 10px; text-transform: uppercase; }
.md-price { font-family: var(--mono); font-weight: 700; }
.auction { display: flex; flex-direction: column; gap: 10px; align-items: center; padding: 14px 18px; border-radius: 14px; background: #fff; border: 2px solid #17211b; box-shadow: 0 12px 30px rgba(0, 0, 0, .2); }
.auction-title { font-weight: 750; font-size: 1.05rem; }
.auction-bid { font-family: var(--mono); font-size: 1.05rem; color: #166534; }
.bid-row input { width: 110px; padding: 7px 9px; background: #fff; color: #17211b; border-color: rgba(0, 0, 0, .2); }
.debt { display: flex; flex-direction: column; gap: 8px; align-items: center; padding: 14px 18px; border-radius: 14px; background: #fff; border: 2px solid #b91c1c; }
.debt-title { font-weight: 800; color: #b91c1c; font-size: 1.15rem; }
.debt .muted { color: #4b5563; }
.board-center .muted { color: #4b5563; }
/* the last few events */
.feed { list-style: none; margin: 0; padding: 0; width: min(100%, 460px); display: flex; flex-direction: column; gap: 3px; font-size: .86rem; text-align: left; }
.feed li { padding: 5px 10px; border-radius: 8px; background: rgba(23, 33, 27, .06); color: #2d3b33; opacity: calc(1 - var(--age) * .16); }
.feed li:last-child { background: #fff; color: #17211b; font-weight: 550; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); animation: msg-pop .35s ease; }

/* 3D dice */
.dice { display: flex; gap: 18px; perspective: 600px; }
.die3d { width: clamp(40px, 6.4cqmin, 62px); aspect-ratio: 1; position: relative; }
.cube { position: absolute; inset: 0; transform-style: preserve-3d; }
.face {
  position: absolute; inset: 0; border-radius: 18%; background: linear-gradient(145deg, #fff, #ececf1); border: 1px solid #d4d4dc;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 14%;
  backface-visibility: hidden;
}
.face i.pip { background: #111; border-radius: 50%; margin: 14%; }
.face.f1 i.pip { background: #c81e1e; }
.die3d { --h: calc(clamp(40px, 6.4cqmin, 62px) / 2); }
.f1 { transform: translateZ(var(--h)); }
.f6 { transform: rotateY(180deg) translateZ(var(--h)); }
.f2 { transform: rotateY(90deg) translateZ(var(--h)); }
.f5 { transform: rotateY(-90deg) translateZ(var(--h)); }
.f3 { transform: rotateX(90deg) translateZ(var(--h)); }
.f4 { transform: rotateX(-90deg) translateZ(var(--h)); }
.dice.bounce .die3d { animation: dice-hop .9s cubic-bezier(.3, 1.6, .5, 1); }
.dice.bounce .die3d:nth-child(2) { animation-delay: .06s; }
@keyframes dice-hop { 0% { transform: translateY(0); } 25% { transform: translateY(-34px); } 55% { transform: translateY(0); } 72% { transform: translateY(-9px); } 100% { transform: translateY(0); } }
.dice.doubles .face { box-shadow: 0 0 0 2px #f5c542; }

/* the card just drawn */
.card-show { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(320px, 82%); padding: 18px 20px; border-radius: 12px; background: #ffe7c2; color: #2b1d00; border: 2px solid #17211b; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); animation: card-pop .5s cubic-bezier(.2, 1.3, .4, 1); z-index: 2; pointer-events: none; }
.card-show.deck-chest { background: #dff3ff; color: #062033; }
.card-deck { font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; opacity: .75; margin-bottom: 6px; }
.card-text { font-size: 1.02rem; font-weight: 600; line-height: 1.35; }
@keyframes card-pop { from { transform: translate(-50%, -50%) rotateY(90deg) scale(.7); opacity: 0; } }

/* an open deal, visible to everyone at the table */
.deal-show {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, 92%); z-index: 3;
  padding: 16px 18px; border-radius: 16px; background: #fff; color: #17211b; border: 2px solid #17211b;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5); display: flex; flex-direction: column; gap: 12px;
}
.deal-show.pop { animation: deal-in .45s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes deal-in { from { transform: translate(-50%, -40%) scale(.9); opacity: 0; } }
.deal-title { font-weight: 800; font-size: 1.05rem; }
.deal-sides { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: start; }
.deal-arrow { font-size: 1.6rem; align-self: center; color: #6b7280; }
.deal-side { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.deal-who { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.deal-items { display: flex; flex-wrap: wrap; gap: 5px; }
.deal-prop { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border-radius: 6px; background: #f6f1e3; border: 1px solid #c9c3b3; font-size: .82rem; font-weight: 600; }
.deal-prop i { width: 12px; height: 18px; border-radius: 3px; background: var(--gc); }
.deal-cash { padding: 3px 9px; border-radius: 6px; background: #dcfce7; color: #166534; font-family: var(--mono); font-weight: 700; font-size: .84rem; }
.deal-show button:not(.primary) { background: #fff; color: #17211b; border-color: rgba(0, 0, 0, .2); }
.deal-show .muted { color: #4b5563; }

/* pieces: avatar in a ring of the player's colour */
.tokens { position: absolute; inset: 0; pointer-events: none; }
.token {
  position: absolute; left: 0; top: 0; width: clamp(26px, 4.4cqmin, 42px); height: clamp(26px, 4.4cqmin, 42px); border-radius: 50%;
  display: grid; place-items: center; overflow: hidden; border: 3px solid var(--pc); background: var(--pc);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .45), 0 0 0 1.5px #fff; transition: transform .14s cubic-bezier(.3, 1.4, .5, 1); z-index: 3;
}
.token .avatar { width: 100%; height: 100%; font-size: .66rem; box-shadow: none; }
.token.active { z-index: 4; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--pc), 0 6px 16px rgba(0, 0, 0, .5); }
.token.jailed { filter: grayscale(.5); }
.pc-ring { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; overflow: hidden; border: 2.5px solid var(--pc); background: var(--pc); flex: none; }
.pc-ring .avatar { width: 100%; height: 100%; font-size: .55rem; box-shadow: none; }

/* ---------- player cards (click: deal or profile) ---------- */
.player-list { display: flex; flex-direction: column; gap: 8px; }
.pcard {
  position: relative; display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; overflow: hidden; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); box-shadow: inset 4px 0 0 var(--pc);
  transition: transform .2s, background .2s, border-color .2s;
}
.pcard:hover { border-color: var(--border-strong); }
.pcard.turn { background: linear-gradient(90deg, color-mix(in srgb, var(--pc) 20%, transparent), var(--surface) 75%); border-color: color-mix(in srgb, var(--pc) 55%, transparent); transform: translateX(4px); }
.pcard.out { opacity: .45; filter: grayscale(1); }
.pc-wrap .avatar { box-shadow: 0 0 0 3px var(--pc); }
.pcard .avatar { width: 46px; height: 46px; font-size: .9rem; }
.pc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pc-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pc-top .tag { margin: 0; }
.pc-name { font-weight: 650; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pcard.me .pc-name { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.pc-cash { font-family: var(--mono); font-weight: 650; font-size: 1.25rem; color: var(--gold); }
.pc-timer { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .06); }
.pc-timer span { display: block; height: 100%; background: var(--pc); transition: width .25s linear; }
.bank-info { padding: 0 4px; }
.player-menu { width: 220px; }
.player-menu .mk { width: 100%; }

/* title deed: managing your property */
.sq-manage { margin: 4px 16px 0; padding-top: 10px; border-top: 2px solid rgba(0, 0, 0, .12); display: flex; flex-direction: column; gap: 8px; }
.sq-manage .muted { color: #4b5563; }
.sq-manage button:not(.primary) { background: #fff; color: #17211b; border-color: rgba(0, 0, 0, .2); }
.sq-warn { margin: 6px 16px 0 !important; padding: 8px 10px !important; border-radius: 8px; background: #fef3c7; color: #92400e; font-size: .82rem; font-weight: 600; }

/* trade window */
.trade-sheet { width: min(860px, 100%); }
.trade-body { display: flex; flex-direction: column; gap: 16px; }
.trade-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.trade-side { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.trade-side h4 { margin: 0; font-size: .9rem; }
.deed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.deed-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 0 8px; border-radius: 9px; overflow: hidden; background: #f6f1e3; color: #17211b; border: 2px solid transparent; font-size: .76rem; }
.deed-tile:hover:not(:disabled) { background: #fffaf0; border-color: rgba(0, 0, 0, .25); }
.deed-tile.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(251, 191, 36, .45); background: #fff; }
.deed-tile.mort { opacity: .55; }
.dt-strip { align-self: stretch; height: 14px; background: var(--gc); }
.dt-name { font-weight: 700; text-transform: uppercase; padding: 0 4px; line-height: 1.15; }
.dt-price { font-family: var(--mono); font-weight: 600; color: #4b5563; }
.tcash { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; color: var(--muted); }
.tcash input { padding: 8px 10px; }
.trade-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fair { font-size: .88rem; font-weight: 600; }
.fair.ok { color: #4ade80; }
.fair.bad { color: #f87171; }

/* lobby colour picker */
.swatch { width: 36px; height: 36px; padding: 0; border-radius: 50%; background: var(--pc); border: 3px solid rgba(255, 255, 255, .12); }
.swatch:hover:not(:disabled) { background: var(--pc); border-color: rgba(255, 255, 255, .5); transform: scale(1.08); }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 3px var(--pc), 0 0 16px var(--pc); }
.swatch:disabled { opacity: .18; }

/* trades */
.trade-panel { display: flex; flex-direction: column; gap: 10px; }
.trade-panel h3 { margin: 6px 0 0; }
.offers { display: flex; flex-direction: column; gap: 8px; }
.offer-card { padding: 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.offer-card.incoming { border-color: rgba(245, 197, 66, .45); background: rgba(245, 197, 66, .06); }
.offer-head { font-weight: 600; font-size: .85rem; }
.offer-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: .8rem; }
.offer-sides p { margin: 2px 0 0; }
.trade-form { display: flex; flex-direction: column; gap: 10px; }
.trade-form select { font: inherit; font-size: .85rem; color: var(--text); background: #1b1b24; border: 1px solid var(--border); border-radius: 9px; padding: 5px 8px; }
.trade-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trade-cols h4 { margin: 0 0 6px; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tprop { display: flex; align-items: center; gap: 6px; font-size: .78rem; padding: 3px 0; cursor: pointer; }
.tprop input { width: auto; }
.tcash { display: flex; flex-direction: column; gap: 4px; font-size: .74rem; color: var(--muted); margin-top: 6px; }
.tcash input { padding: 6px 8px; font-size: .85rem; }

/* lobby */
.mono-list li .piece-chip { width: 30px; height: 30px; }
.piece-box { margin-bottom: 14px; }
.pieces { display: flex; flex-wrap: wrap; gap: 6px; }
.piece { width: 42px; height: 42px; padding: 0; font-size: 1.3rem; border-radius: 12px; }
.piece.on { border-color: var(--gold); background: rgba(245, 197, 66, .14); box-shadow: 0 0 0 2px rgba(245, 197, 66, .3); }
.piece:disabled { opacity: .25; }

/* square details */
.sq-card { width: min(340px, 100%); border-radius: 18px; background: #fdfaf0; color: #1d1d1d; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .7); padding-bottom: 14px; display: flex; flex-direction: column; animation: pop .25s cubic-bezier(.2, 1.2, .4, 1); }
.sq-head { background: var(--gc, #2a2a2a); color: #fff; padding: 18px 16px; text-align: center; font-weight: 750; font-size: 1.1rem; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.sq-head.g-yellow, .sq-head.g-lightblue, .sq-head.g-utility { color: #1d1d1d; text-shadow: none; }
.sq-meta { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px 4px; font-size: .88rem; }
.rent-table { width: calc(100% - 32px); margin: 8px 16px; border-collapse: collapse; font-size: .86rem; }
.rent-table td { padding: 4px 0; border-bottom: 1px solid rgba(0, 0, 0, .08); }
.rent-table td:last-child { text-align: right; font-family: var(--mono); }
.rent-table tr.sep td { border-top: 2px solid rgba(0, 0, 0, .15); }
.sq-card p { padding: 0 16px; }
.big-amount { font-size: 2rem; font-weight: 700; text-align: center; }
.sq-card #sqClose { align-self: center; margin-top: 8px; color: #1d1d1d; border-color: rgba(0, 0, 0, .2); }

/* results */
.results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.results li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); animation: msg-pop .4s ease both; }
.results li.first { border-color: rgba(245, 197, 66, .5); background: linear-gradient(90deg, rgba(245, 197, 66, .14), var(--surface-2)); }
.results .avatar { width: 34px; height: 34px; }
.results-sheet { width: min(520px, 100%); }
.mono-react { position: static; }
.board-wrap, .mono-side { min-width: 0; }


@media (max-width: 1100px) {
  .mono-layout { grid-template-columns: minmax(0, 1fr); }
  .players-col { position: static; order: 2; }
  .board-area { order: 1; }
  .player-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .mboard { width: 100%; }
}
@media (max-width: 560px) {
  .sq:not(.corner) .sq-name { display: none; }
  .sq.bottom .sq-body, .sq.top .sq-body { padding-bottom: 30%; }
  .sq.left .sq-body, .sq.right .sq-body { padding-bottom: 30%; }
  .board-center { gap: 8px; padding: 6px; }
  .center-brand, .feed { display: none; }
  .pcard { padding: 9px 10px; gap: 10px; }
  .pcard .avatar { width: 34px; height: 34px; }
  .pc-cash { font-size: 1rem; }
  .trade-cols, .deal-sides { grid-template-columns: 1fr; }
  .deal-arrow { display: none; }
}
.mono-react { flex-wrap: wrap; justify-content: center; max-width: 100%; border-radius: 22px; position: static; }

/* ---------- landing feedback: the square flashes, money flies between player cards ---------- */
.sq.landed::before { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 0 0 4px var(--flash), 0 0 18px 2px var(--flash); animation: land-flash 1.3s ease-out both; }
@keyframes land-flash { 0% { opacity: 0; } 15% { opacity: 1; } 60% { opacity: .9; } 100% { opacity: 0; } }
.money-layer { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.money-chip { position: fixed; transform: translate(-50%, -50%); padding: 5px 11px; border-radius: 999px; white-space: nowrap;
  font: 700 .82rem/1 'Geist', system-ui, sans-serif; color: #fff; background: var(--pc); box-shadow: 0 6px 20px -4px rgba(0, 0, 0, .6), 0 0 0 2px rgba(255, 255, 255, .25) inset;
  animation: chip-fly 1.25s cubic-bezier(.5, 0, .3, 1) .1s both; }
@keyframes chip-fly {
  0% { transform: translate(-50%, -50%) scale(.6); opacity: 0; }
  15% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
  80% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.7); opacity: 0; }
}
.cash-pop { position: fixed; transform: translateY(-50%); font: 700 .85rem/1 'Geist Mono', monospace; white-space: nowrap; animation: cash-pop 1.6s ease-out both; }
.cash-pop.up { color: #4ade80; } .cash-pop.down { color: #f87171; }
@keyframes cash-pop { 0% { opacity: 0; transform: translateY(-20%); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(-260%); } }
.pcard.cash-up .pc-cash { animation: cash-flash-up 1s ease; } .pcard.cash-down .pc-cash { animation: cash-flash-down 1s ease; }
@keyframes cash-flash-up { 30% { color: #4ade80; transform: scale(1.08); } }
@keyframes cash-flash-down { 30% { color: #f87171; transform: scale(1.08); } }
.pc-cash { transform-origin: left center; display: inline-block; }

/* ---------- keyboard hints and auto-end ---------- */
.kb { margin-left: 8px; padding: 1px 6px; border-radius: 5px; font: 600 .7rem/1.4 'Geist Mono', monospace; background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .2); color: inherit; opacity: .75; }
@media (hover: none) { .kb { display: none; } }
.toggle-chip { align-self: flex-start; padding: 6px 12px; border-radius: 999px; font-size: .8rem; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.toggle-chip::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--border-strong); vertical-align: 1px; }
.toggle-chip.on { color: var(--text); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.toggle-chip.on::before { background: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* ---------- results: chart and highlights ---------- */
.worth-chart { width: 100%; height: auto; display: block; }
.wc-grid { stroke: var(--border); stroke-width: 1; }
.wc-label { fill: var(--muted); font: 500 12px 'Geist Mono', monospace; }
.wc-line { fill: none; stroke: var(--pc); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.wc-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: .82rem; }
.wc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.hl-text b { font-size: 1.05rem; display: inline-flex; align-items: center; gap: 3px; }
.hl-text .small-text { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.results-sheet { width: min(720px, 100%); }
.results + .player-section { margin-top: 18px; }

/* ---------- the whole game log ---------- */
.log-btn { align-self: center; display: inline-flex; align-items: center; gap: 6px; color: #475569; border-color: rgba(15, 23, 42, .15); background: rgba(255, 255, 255, .55); }
.log-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.log-sheet { width: min(620px, 100%); }
.log-list { list-style: none; margin: 0; display: flex; flex-direction: column; gap: 2px; max-height: 70vh; overflow-y: auto; }
.log-list li { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-bottom: 1px solid var(--border); font-size: .88rem; }
.log-time { font: 500 .74rem 'Geist Mono', monospace; color: var(--muted); flex: none; width: 44px; }
.pdot.blank { visibility: hidden; }
