/* ============================================
   СУЕТАПОЛИЯ — screens: menu, rooms, lobby, game chrome
   Loaded last: it replaces the earlier neon look.
   ============================================ */

body { font-family: var(--font-main); background: var(--asphalt); color: var(--chalk); line-height: 1.4; }
.ic { width: 1.1em; height: 1.1em; flex-shrink: 0; vertical-align: -0.15em; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--marking); outline-offset: 2px; }

/* ---------- the plate: a stamped tin sign, the one button shape ---------- */
.plate {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  padding: 0.7em 1.1em; font-weight: 700; font-size: 0.95rem; letter-spacing: 0.01em; cursor: pointer;
  color: var(--chalk); background: #2c403a; border: 2px solid #0e1412; border-radius: 4px;
  box-shadow: 0 3px 0 #0e1412; transform: translateY(0);
  transition: transform 0.08s, box-shadow 0.08s, background 0.15s;
}
.plate:hover:not(:disabled) { background: #37524a; }
.plate:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 0 0 #0e1412; }
.plate:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: 0 3px 0 #0e1412; }
.plate-main { color: #1c1500; background: var(--marking); border-color: #4b3900; box-shadow: 0 3px 0 #4b3900; }
.plate-main:hover:not(:disabled) { background: #ffc61a; }
.plate-main:active:not(:disabled) { box-shadow: 0 0 0 #4b3900; }
.plate-main:disabled { color: #3a2e00; }
.plate-small { padding: 0.5em 0.85em; font-size: 0.85rem; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; cursor: pointer; color: var(--chalk);
  background: var(--stairwell); border: 2px solid #0e1412; border-radius: 4px; box-shadow: 0 2px 0 #0e1412; }
.icon-btn:hover { background: #2f463e; }

.field { display: flex; flex-direction: column; gap: 6px; width: min(100%, 340px); text-align: left; }
.field-label { font-size: 0.82rem; color: var(--concrete); }
.field input, .menu-join input, .lobby-invite-row input {
  padding: 0.75em 0.9em; font-size: 1.05rem; font-weight: 600; color: var(--chalk); background: #11171a;
  border: 2px solid var(--line); border-radius: 4px; outline: none;
}
.field input:focus, .menu-join input:focus { border-color: var(--marking); }
::placeholder { color: #5b6b65; }

/* ---------- night yard (menu / rooms / lobby) ---------- */
#yard { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: linear-gradient(#0f1513 0%, #17211e 70%, #1d2a25 100%); }
body:not(.screen-menu) #yard { display: none; }
.yard-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 9vh; background: #121917; border-top: 3px solid #0b100e; }
#yard-houses { position: absolute; left: 0; right: 0; bottom: 9vh; height: 70vh; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 2vw; gap: 1.2vw; }
.house { flex: 1 1 0; display: grid; gap: 7px; padding: 12px 9px; background: #19231f; border: 2px solid #0e1412; border-bottom: 0; }
.house:nth-child(odd) { background: #1c2824; }
.win { aspect-ratio: 3 / 4; background: #0e1412; border: 1px solid #0a0f0d; transition: background 1.4s, box-shadow 1.4s; }
.win.lit { background: #e8b84a; box-shadow: 0 0 10px rgba(232, 184, 74, 0.35); }
.win.lit.cold { background: #b9d0c8; box-shadow: 0 0 10px rgba(185, 208, 200, 0.25); }

.screen { position: fixed; inset: 0; z-index: 1; overflow-y: auto; overflow-x: hidden; }

/* ---------- main menu ---------- */
#nickname-screen { display: flex; flex-direction: column; }
.menu-top { display: flex; justify-content: flex-end; padding: 14px 18px; }
.menu-grid { margin: auto; width: min(1040px, 100%); padding: 10px 24px 40px; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; align-items: center; }
.menu-main { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.menu-logo { font-family: var(--font-logo); font-weight: 400; font-size: clamp(2rem, 6.4vw, 4.4rem); line-height: 1.05; letter-spacing: 0; color: var(--chalk);
  text-shadow: 4px 4px 0 var(--kiosk-dark); margin-bottom: 4px; }
.menu-tagline { max-width: 34ch; color: var(--concrete); font-size: 1.05rem; line-height: 1.5; margin-bottom: 6px; }
.menu-main .plate-main { width: min(100%, 340px); font-size: 1.25rem; padding: 0.8em 1.2em; }
.menu-secondary { display: flex; gap: 10px; flex-wrap: wrap; }
.menu-join { display: flex; gap: 10px; width: min(100%, 340px); }
.menu-join input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.95rem; }
.menu-colors { width: min(100%, 340px); }
.menu-colors summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--concrete); font-size: 0.88rem; list-style: none; padding: 4px 0; }
.menu-colors summary::-webkit-details-marker { display: none; }
.menu-colors summary:hover { color: var(--chalk); }
.menu-colors[open] summary .ic { transform: rotate(180deg); }
.menu-colors .token-grid { margin-top: 8px; }

/* the notice board on the wall */
.notice { position: relative; padding: 30px 26px 24px; background: #2a3b34; border: 2px solid #0e1412; box-shadow: 6px 6px 0 rgba(0,0,0,0.35); transform: rotate(1.2deg); }
.notice-pin { position: absolute; top: 10px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--kiosk); box-shadow: inset -2px -2px 0 var(--kiosk-dark), 0 2px 0 rgba(0,0,0,0.4); }
.notice h2 { font-family: var(--font-game); font-weight: 600; font-size: 1.35rem; letter-spacing: 0.02em; margin-bottom: 14px; }
.notice ul { list-style: none; display: grid; gap: 14px; }
.notice li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; }
.notice li .ic { color: var(--marking); width: 22px; height: 22px; margin-top: 2px; }
.notice li b { display: block; font-weight: 600; font-size: 0.95rem; }
.notice li span { display: block; color: var(--concrete); font-size: 0.82rem; margin-top: 1px; }

.invite-banner { width: min(100%, 340px); padding: 10px 14px; background: #2e3a1f; border: 2px solid #55702e; border-radius: 4px; font-size: 0.92rem; }
.invite-banner.error { background: #3d1f1a; border-color: var(--kiosk); }

/* ---------- sheets (rooms + lobby) ---------- */
.sheet { margin: auto; width: min(94vw, 880px); padding: 24px; background: #26372f; border: 2px solid #0e1412; box-shadow: 6px 6px 0 rgba(0,0,0,0.35); }
.rooms-card { width: min(94vw, 600px); }
.rooms-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.rooms-head h2 { flex: 1; font-family: var(--font-game); font-weight: 600; font-size: 1.5rem; }
.rooms-online { color: var(--concrete); font-size: 0.85rem; }
.rooms-list { display: flex; flex-direction: column; gap: 8px; min-height: 120px; max-height: 52vh; overflow-y: auto; }
.rooms-empty { margin: auto; text-align: center; color: var(--concrete); line-height: 1.6; padding: 28px 0; }
.room-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: #1c2824; border: 2px solid #0e1412; }
.room-main { flex: 1; min-width: 0; }
.room-host { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-meta { font-size: 0.8rem; color: var(--concrete); }
.room-count { font-family: var(--font-game); font-weight: 600; font-size: 1.2rem; color: var(--marking); }
.rooms-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }

.lobby-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.lobby-title { font-size: 0.9rem; font-weight: 500; color: var(--concrete); }
.lobby-code { display: flex; align-items: center; gap: 10px; }
.lobby-code strong { font-family: var(--font-logo); font-weight: 400; font-size: clamp(1.4rem, 4vw, 2rem); color: var(--marking); letter-spacing: 0.08em; }
.lobby-subtitle { color: var(--concrete); font-size: 0.9rem; }
.lobby-invite-row { display: flex; gap: 10px; margin-bottom: 18px; }
.lobby-invite-row input { flex: 1; min-width: 0; font-size: 0.8rem; font-family: ui-monospace, Consolas, monospace; font-weight: 400; color: var(--concrete); }
.lobby-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.lobby-col h3 { font-size: 0.95rem; font-weight: 600; margin: 18px 0 8px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
.lobby-col h3:first-child { margin-top: 0; }
.lobby-players-list { display: flex; flex-direction: column; gap: 4px; }
.lobby-foot { margin-top: 24px; padding-top: 18px; border-top: 2px solid var(--line); display: flex; align-items: center; gap: 16px; }
.lobby-foot .plate-main { font-size: 1.1rem; padding: 0.8em 1.6em; }
.lobby-wait { color: var(--concrete); font-size: 0.9rem; }

.seg { display: flex; border: 2px solid #0e1412; }
.seg .lobby-opt { flex: 1; padding: 0.55em 0.4em; font-weight: 600; font-size: 0.88rem; cursor: pointer; color: var(--chalk); background: #1c2824; border: 0; border-right: 2px solid #0e1412; }
.seg .lobby-opt:last-child { border-right: 0; }
.seg .lobby-opt:hover { background: #26362f; }
.seg .lobby-opt.active { background: var(--marking); color: #1c1500; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 0; cursor: pointer; border-bottom: 1px solid var(--line); }
.switch-row b { display: block; font-weight: 600; font-size: 0.92rem; }
.switch-row small { display: block; color: var(--concrete); font-size: 0.78rem; margin-top: 1px; line-height: 1.35; }
.toggle { position: relative; display: inline-block; width: 46px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider { position: absolute; inset: 0; background: #11171a; border: 2px solid #0e1412; transition: background 0.15s; }
.toggle-slider::before { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; background: var(--concrete); transition: transform 0.15s, background 0.15s; }
.toggle input:checked + .toggle-slider { background: #3b4f1f; }
.toggle input:checked + .toggle-slider::before { transform: translateX(22px); background: var(--marking); }
.toggle input:focus-visible + .toggle-slider { outline: 2px solid var(--marking); outline-offset: 2px; }

/* colours of the tokens */
.token-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.token-option { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; cursor: pointer; background: #1c2824; border: 2px solid #0e1412; transition: background 0.12s; }
.token-option:hover { background: #26362f; transform: none; }
.token-option.selected { background: #2f463e; border-color: var(--marking); transform: none; box-shadow: none; }
.token-option .tok-color-big { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(0,0,0,0.35); box-shadow: none; transform: none; }
.token-option.selected .tok-color-big { border-color: var(--chalk); box-shadow: none; transform: none; }
.token-option.selected .tok-color-big::before, .token-option.selected .tok-color-big::after { width: 9px; height: 11px; top: 7px; box-shadow: inset 2px -1px 0 1px #222; }
.token-option.selected .tok-color-big::before { left: 5px; } .token-option.selected .tok-color-big::after { right: 5px; }
.token-option .tok-label { font-size: 0.72rem; font-weight: 500; color: var(--concrete); }
.token-option.taken { opacity: 0.35; filter: grayscale(0.8); pointer-events: none; }

/* player rows (lobby + game) */
.player-info { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: #1c2824; border: 2px solid #0e1412; border-radius: 0; margin: 0 0 4px; }
.player-info.active { background: #3a3510; border-color: var(--marking); box-shadow: none; }
.player-color-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(0,0,0,0.4); }
.player-name { font-weight: 600; font-size: 0.92rem; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-money { font-family: var(--font-game); font-weight: 600; font-size: 1rem; color: var(--marking); display: inline-flex; align-items: center; gap: 4px; }
.player-info .tag { font-size: 0.72rem; color: var(--concrete); display: inline-flex; align-items: center; gap: 3px; }

/* ---------- game chrome ---------- */
.panel { background: var(--stairwell); border: 2px solid #0e1412; border-radius: 0; padding: 12px; box-shadow: none; }
.panel h3 { font-size: 0.85rem; font-weight: 600; color: var(--concrete); margin-bottom: 8px; text-transform: none; letter-spacing: 0; }
.btn-action { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 10px; font-weight: 600; font-size: 0.85rem; color: var(--chalk); background: #2c403a; border: 2px solid #0e1412; border-radius: 4px; box-shadow: 0 2px 0 #0e1412; cursor: pointer; transition: transform 0.08s, box-shadow 0.08s, background 0.15s; }
.btn-action:hover:not(:disabled) { background: #37524a; border-color: #0e1412; }
.btn-action:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 0 0 #0e1412; }
.btn-action:disabled { opacity: 0.4; }
.btn-danger { color: #f0a496; } .btn-danger:hover:not(:disabled) { background: #4a2620; border-color: #0e1412; }
#left-col .brand { font-family: var(--font-logo); font-weight: 400; font-size: 1.05rem; color: var(--chalk); text-shadow: 2px 2px 0 var(--kiosk-dark); padding: 4px 2px 6px; background: none; }
.share-row input { background: #11171a; border: 2px solid var(--line); border-radius: 4px; color: var(--concrete); }
.share-code b { color: var(--marking); letter-spacing: 0.12em; font-family: var(--font-game); }
#chat-messages { background: #151d1a; border: 2px solid #0e1412; border-radius: 0; font-size: 0.82rem; }
.chat-msg .sender { color: var(--marking); font-weight: 600; }
#chat-input { background: #11171a; border: 2px solid var(--line); border-radius: 4px; color: var(--chalk); }
#chat-input:focus { border-color: var(--marking); }
#chat-send { display: inline-grid; place-items: center; width: 38px; background: var(--marking); color: #1c1500; border: 2px solid #4b3900; border-radius: 4px; box-shadow: 0 2px 0 #4b3900; cursor: pointer; }
.emoji-btn { background: #1c2824; border: 2px solid #0e1412; border-radius: 4px; }
.emoji-btn:hover { transform: none; background: #2c403a; }
.props-header { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; }
.props-toggle .ic { width: 16px; height: 16px; }
.prop-item { background: #1c2824; border: 2px solid #0e1412; border-radius: 0; }
.prop-item.monopoly { border-color: var(--marking); box-shadow: none; background: #2b2a12; }
.prop-item .prop-name { font-family: var(--font-game); font-weight: 500; letter-spacing: 0.02em; }
.prop-item .prop-price { font-family: var(--font-game); color: var(--marking); }
.prop-act { background: #2c403a; border: 2px solid #0e1412; border-radius: 3px; color: var(--chalk); }
.debt-banner { background: #3d1f1a; border: 2px solid var(--kiosk); border-radius: 0; }
.debt-title { color: #f0a496; }

/* toast / modals */
.toast { background: #11171a; border: 2px solid var(--marking); border-radius: 0; box-shadow: 4px 4px 0 rgba(0,0,0,0.4); }
.toast-error { border-color: var(--kiosk); color: #f0a496; }
.buy-panel { background: rgba(10, 14, 12, 0.72); }
.buy-panel-inner { background: #26372f; border: 2px solid #0e1412; border-radius: 0; box-shadow: 6px 6px 0 rgba(0,0,0,0.4); }
.buy-title { font-family: var(--font-game); font-weight: 600; letter-spacing: 0.02em; }
.buy-price { color: var(--marking); font-family: var(--font-game); }
.buy-btn { border-radius: 4px; border: 2px solid #0e1412; box-shadow: 0 3px 0 #0e1412; font-family: var(--font-main); font-weight: 700; }
.buy-btn.buy-yes { background: var(--marking); color: #1c1500; border-color: #4b3900; box-shadow: 0 3px 0 #4b3900; }
.buy-btn.buy-yes:hover:not(:disabled) { transform: none; filter: brightness(1.08); box-shadow: 0 3px 0 #4b3900; }
.buy-btn.buy-no { background: #2c403a; color: var(--chalk); }
.buy-btn.buy-no:hover { background: #4a2620; color: #f0a496; }
.auction-bid-row .btn-action { border-radius: 4px; }

/* ---------- entrance: ONE moment, the menu (everything else stays still) ---------- */
@keyframes plateIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.menu-main > *, .notice { animation: plateIn 0.5s ease both; }
.menu-main > :nth-child(2) { animation-delay: 0.06s; } .menu-main > :nth-child(3) { animation-delay: 0.1s; }
.menu-main > :nth-child(4) { animation-delay: 0.14s; } .menu-main > :nth-child(5) { animation-delay: 0.18s; }
.menu-main > :nth-child(6) { animation-delay: 0.22s; } .menu-main > :nth-child(7) { animation-delay: 0.26s; }
.notice { animation-delay: 0.3s; }

@media (max-width: 860px) {
  .menu-grid { grid-template-columns: 1fr; gap: 28px; padding: 6px 18px 40px; }
  .notice { transform: none; }
  .lobby-cols { grid-template-columns: 1fr; gap: 6px; }
  #yard-houses { height: 48vh; }
}
@media (max-width: 600px) {
  .sheet { padding: 16px; width: 100%; }
  .screen { padding: 8px; }
  .token-grid { gap: 6px; }
  .token-option { padding: 8px 2px; }
  .lobby-invite-row { flex-direction: column; }
  .menu-top { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .menu-main > *, .notice { animation: none; }
  .win { transition: none; }
}

/* ---------- fixes after the first look ---------- */
.menu-logo { font-size: clamp(2.2rem, 5.8vw, 4.2rem); text-shadow: 4px 4px 0 var(--kiosk-dark); overflow-wrap: anywhere; }
.menu-grid { width: min(1180px, 100%); grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; }
.menu-main { gap: 18px; }
.menu-main .plate-main, .menu-main .plate-big, .menu-main .field, .menu-main .menu-join, .menu-main .menu-colors { width: min(100%, 440px); }
.menu-main .plate-main { font-size: 1.5rem; padding: 0.85em 1.2em; }
.menu-main .plate-big { font-size: 1.15rem; padding: 0.75em 1.2em; color: var(--chalk); }
.menu-main .plate-big:disabled { background: #22302b; color: #7c8b84; }
.menu-tagline { max-width: 38ch; font-size: 1.15rem; }
.lobby-players-list { background: none; border: 0; border-radius: 0; padding: 0; }
.seg .lobby-opt, .lobby-opt { border-radius: 0; box-shadow: none; transform: none; }
.lobby-opt.active { box-shadow: none; }
#yard-houses { opacity: 0.6; }
.win.lit { background: #d9ab45; box-shadow: none; }
.win.lit.cold { background: #a9c1b8; box-shadow: none; }
.plate:disabled { opacity: 0.55; }
.menu-main .plate:not(.plate-main):disabled { background: #22302b; color: #7c8b84; }
/* ================= GAME: board, dice, tokens (flat, no glow) ================= */
#board { background: #17211d; border: 3px solid #0e1412; border-radius: 0; box-shadow: 6px 6px 0 rgba(0,0,0,0.35); }
.tile { background: #20302a; border: 1px solid #0e1412; transition: background 0.12s; }
.tile:hover { background: #2b4038; transform: none; box-shadow: none; z-index: 10; }
.tile.property { background: #20302a; }
.tile.chance, .tile.chest, .tile.tax, .tile.casino_slots, .tile.casino_wheel, .tile.railroad, .tile.utility { background: #1d2a25; }
.tile.corner { background: #2a3b34; border: 1px solid #0e1412; }
.tile-color-bar { box-shadow: none; }
.tile.bottom .tile-color-bar { height: 10px; border-radius: 0; } .tile.top .tile-color-bar { height: 10px; border-radius: 0; }
.tile.left .tile-color-bar, .tile.right .tile-color-bar { width: 12px; border-radius: 0; }
.tile-name { font-family: var(--font-game); font-weight: 500; letter-spacing: 0.02em; text-shadow: none; text-transform: uppercase; color: var(--chalk); }
.tile-price { font-family: var(--font-game); font-weight: 600; color: #1c1500; background: var(--marking); border-radius: 2px; padding: 0 5px; }
.tile-icon { color: var(--marking); display: grid; place-items: center; }
.tile-icon .ic { width: 1.3em; height: 1.3em; stroke-width: 1.8; }
.tile.corner .tile-icon .ic { width: 1.7em; height: 1.7em; }
.tile.corner .tile-name { font-family: var(--font-game); font-weight: 600; }
.tile.owned { border: 2px solid var(--owner-color) !important; box-shadow: none; }
.tile-owner-dot { border: 2px solid #0e1412; }
.player-board-token { box-shadow: 0 2px 0 rgba(0,0,0,0.55); border: 2.5px solid var(--chalk); }
.tile-houses { background: #0e1412; border-radius: 0; color: var(--marking); }
.tile-mortgage-mark { color: var(--chalk); }

/* dice: bone with black pips, like backgammon */
.die-3d { filter: none; }
.dice-3d-container { filter: drop-shadow(0 6px 0 rgba(0,0,0,0.35)); }
.die-face { background: linear-gradient(145deg, #f3eedd, #d9d2bb); border: 2px solid #b9b199; border-radius: 18%; box-shadow: inset 0 -6px 10px rgba(0,0,0,0.12); }
.die-face i { background: #1b1b1b; box-shadow: none; }

/* the one main button */
.btn-roll { font-family: var(--font-main); font-weight: 800; color: #1c1500; background: var(--marking); border: 2px solid #4b3900; border-radius: 4px; box-shadow: 0 4px 0 #4b3900; letter-spacing: 0.01em; transition: transform 0.08s, box-shadow 0.08s, background 0.15s; }
.btn-roll:hover:not(:disabled) { filter: none; background: #ffc61a; box-shadow: 0 4px 0 #4b3900; }
.btn-roll:active:not(:disabled) { filter: none; transform: translateY(4px); box-shadow: 0 0 0 #4b3900; }
.btn-roll[data-kind="end"] { background: #6fb552; border-color: #264417; box-shadow: 0 4px 0 #264417; color: #0f1d09; }
.btn-roll[data-kind="end"]:hover:not(:disabled) { background: #7fc662; box-shadow: 0 4px 0 #264417; }
.btn-roll[data-kind="end"]:active:not(:disabled) { box-shadow: 0 0 0 #264417; }
.btn-roll:disabled { background: #223029; color: var(--concrete); border-color: #0e1412; box-shadow: 0 4px 0 #0e1412; opacity: 1; }
#turn-timer { font-family: var(--font-game); font-weight: 500; }
#turn-timer.warning { color: #f0a496; }
.game-log-msg { color: rgba(236,231,216,0.55); font-family: var(--font-main); }
.game-log-msg:first-child { color: var(--chalk); }
/* ---- calmer board icons ---- */
.tile-icon { color: #b9c4bd; font-size: clamp(0.75rem, 1.35vw, 1.15rem); }
.tile-icon .ic { width: 1.25em; height: 1.25em; stroke-width: 1.7; }
.tile.corner .tile-icon { color: var(--marking); font-size: clamp(1rem, 2vw, 1.6rem); }
.tile.corner .tile-icon .ic { width: 1.5em; height: 1.5em; }
.tile.chance .tile-icon, .tile.casino_slots .tile-icon, .tile.casino_wheel .tile-icon { color: var(--marking); }
.tile.tax .tile-icon { color: #e0907f; }
.tile.bottom .tile-icon { top: -0.3em; } .tile.top .tile-icon { bottom: -0.3em; }
.tile.left .tile-icon { right: -0.3em; } .tile.right .tile-icon { left: -0.3em; }
.tile.corner .tile-icon { top: auto; bottom: auto; left: auto; right: auto; }
/* ---------- buy row under the dice + flying token ---------- */
.buy-row { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.buy-caption { font-family: var(--font-game); font-weight: 600; font-size: clamp(0.95rem, 1.4vw, 1.2rem); color: var(--chalk); }
.buy-row-btns { display: flex; gap: 10px; }
.buy-row .btn-roll { width: clamp(125px, 10.5vw, 150px); }
.btn-roll[data-kind="secondary"] { background: #2c403a; color: var(--chalk); border-color: #0e1412; box-shadow: 0 4px 0 #0e1412; }
.btn-roll[data-kind="secondary"]:hover:not(:disabled) { background: #37524a; box-shadow: 0 4px 0 #0e1412; }
.btn-roll[data-kind="secondary"]:active:not(:disabled) { box-shadow: 0 0 0 #0e1412; }
.fly-token { position: fixed; z-index: 9999; width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--chalk); box-shadow: 0 10px 0 rgba(0,0,0,0.25); pointer-events: none; }
.fly-token::before, .fly-token::after { content: ''; position: absolute; width: 7px; height: 9px; background: #fff; border-radius: 50%; top: 4px; box-shadow: inset 2.5px -1px 0 1.5px #222; }
.fly-token::before { left: 3px; } .fly-token::after { right: 3px; }

/* ---------- casino: yard one-armed bandit + wheel ---------- */
.casino-inner { min-width: 0; width: min(94vw, 460px); padding: 18px 18px 20px; }
.casino-who { font-size: 0.85rem; color: var(--concrete); margin-bottom: 8px; }
.slot-machine { --slot-h: 84px; position: relative; background: #2d4a40; border: 3px solid #0e1412; box-shadow: 5px 5px 0 rgba(0,0,0,0.4); padding-bottom: 10px; }
.slot-top { background: #24352f; border-bottom: 3px solid #0e1412; padding: 8px 10px 6px; }
.slot-bulbs { display: flex; justify-content: space-between; margin-bottom: 6px; }
.slot-bulbs i { width: 9px; height: 9px; border-radius: 50%; background: #5a4a10; border: 1px solid #0e1412; }
.slot-bulbs i:nth-child(odd) { animation: bulbA 1.4s steps(1) infinite; }
.slot-bulbs i:nth-child(even) { animation: bulbB 1.4s steps(1) infinite; }
@keyframes bulbA { 0%, 100% { background: #f2b705; } 50% { background: #5a4a10; } }
@keyframes bulbB { 0%, 100% { background: #5a4a10; } 50% { background: #f2b705; } }
.slot-machine.win .slot-bulbs i { animation-duration: 0.35s; }
.slot-machine.win { animation: slotShake 0.5s 2; }
@keyframes slotShake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.slot-title { font-family: var(--font-logo); font-size: 1.15rem; text-align: center; color: var(--chalk); text-shadow: 2px 2px 0 var(--kiosk-dark); }
.slot-body { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px 12px 6px; }
.slot-window { position: relative; display: flex; gap: 6px; background: #0e1412; padding: 6px; border: 3px solid #0e1412; }
.reel { width: 86px; height: var(--slot-h); overflow: hidden; background: #ece7d8; box-shadow: inset 0 6px 8px rgba(0,0,0,0.25), inset 0 -6px 8px rgba(0,0,0,0.25); }
.reel-strip { will-change: transform; }
.reel-strip.spinning { filter: blur(1.5px); }
.reel-cell { height: var(--slot-h); display: grid; place-items: center; }
.reel-cell .ic { width: 52px; height: 52px; stroke-width: 2.2; }
.reel-cell .seven { font-family: var(--font-logo); font-size: 3rem; font-weight: 400; line-height: 1; text-shadow: 2px 2px 0 rgba(0,0,0,0.25); }
.slot-line { position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1px; background: rgba(209, 67, 47, 0.7); pointer-events: none; }
.slot-foot { display: flex; justify-content: space-between; gap: 10px; padding: 8px 14px 0; font-size: 0.85rem; color: var(--concrete); }
.slot-msg { color: var(--marking); font-weight: 700; text-align: right; }
.casino-inner .buy-buttons { margin-top: 14px; }

/* the lever: grey stick, big red ball; pulling squashes the stick and drops the ball */
.slot-lever { position: relative; width: 44px; height: 150px; background: none; border: 0; cursor: pointer; padding: 0; }
.slot-lever:disabled { cursor: default; }
.lever-base { position: absolute; left: 50%; bottom: 0; width: 34px; height: 26px; margin-left: -17px; background: #1b2723; border: 3px solid #0e1412; }
.lever-stick { position: absolute; left: 50%; bottom: 22px; width: 10px; height: 92px; margin-left: -5px; background: linear-gradient(90deg, #8d9a93, #cfd6d2, #8d9a93); border: 2px solid #0e1412; transform-origin: bottom; transition: transform 0.22s ease-in; }
.lever-ball { position: absolute; left: 50%; top: 4px; width: 38px; height: 38px; margin-left: -19px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f06a55, #d1432f 55%, #7d2619); border: 3px solid #0e1412; box-shadow: 0 4px 0 rgba(0,0,0,0.35); transition: transform 0.22s ease-in; }
.slot-lever:not(:disabled):hover .lever-ball { filter: brightness(1.12); }
.slot-lever:not(:disabled):not(.pulled) .lever-ball { animation: leverHint 1.6s ease-in-out infinite; }
@keyframes leverHint { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
.slot-lever.pulled .lever-stick { transform: scaleY(0.38); }
.slot-lever.pulled .lever-ball { transform: translateY(66px); animation: none; }
.slot-lever:not(.pulled) .lever-stick, .slot-lever:not(.pulled) .lever-ball { transition-duration: 0.35s; transition-timing-function: cubic-bezier(0.3, 1.6, 0.5, 1); }

/* wheel of fortune */
.wheel-wrap { position: relative; width: 250px; height: 250px; margin: 6px auto 0; }
.wheel { position: absolute; inset: 14px; border-radius: 50%; border: 5px solid #0e1412; box-shadow: 4px 4px 0 rgba(0,0,0,0.4); }
.wheel-label { position: absolute; left: 50%; top: 50%; width: 60px; margin-left: -30px; margin-top: -10px; text-align: center; font-family: var(--font-game); font-weight: 600; font-size: 0.95rem; color: #fff; text-shadow: 1px 1px 0 rgba(0,0,0,0.5); }
.wheel-hub { position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px; border-radius: 50%; background: #24352f; border: 4px solid #0e1412; }
.wheel-pointer { position: absolute; left: 50%; top: 0; margin-left: -12px; z-index: 2; border-left: 12px solid transparent; border-right: 12px solid transparent; border-top: 26px solid var(--marking); filter: drop-shadow(0 2px 0 #0e1412); }
@media (prefers-reduced-motion: reduce) { .slot-bulbs i, .slot-lever .lever-ball, .slot-machine.win { animation: none !important; } }

/* ---------- trades ---------- */
.trade-inner { width: min(94vw, 640px); max-height: 92vh; overflow-y: auto; text-align: left; }
.trade-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 12px 0; }
.trade-col h3 { font-size: 0.9rem; margin-bottom: 8px; padding-bottom: 4px; border-bottom: 2px solid var(--line); }
.trade-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.85rem; margin-bottom: 8px; }
.trade-row input, .trade-row select { width: 110px; padding: 5px 8px; background: #11171a; color: var(--chalk); border: 2px solid var(--line); border-radius: 4px; font: inherit; }
.trade-row select { width: auto; flex: 1; }
.trade-tiles { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; }
.trade-tile { display: flex; align-items: center; gap: 8px; padding: 5px 7px; background: #1c2824; border: 2px solid #0e1412; font-size: 0.82rem; cursor: pointer; }
.trade-tile.locked { opacity: 0.45; cursor: not-allowed; }
.trade-swatch { width: 8px; height: 22px; flex-shrink: 0; }
.trade-tname { flex: 1; }
.trade-price { font-family: var(--font-game); color: var(--marking); }
.trade-line { margin: 8px 0; text-align: left; }
.trade-pending { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.85rem; }
@media (max-width: 600px) { .trade-cols { grid-template-columns: 1fr; } }

/* ---- must stay last: narrow screens ---- */
@media (max-width: 860px) {
  .menu-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 6px 18px 40px; }
  .menu-logo { font-size: clamp(1.4rem, 7.6vw, 2.6rem); overflow-wrap: normal; }
  .notice { transform: none; }
}
@media (max-width: 600px) {
  .menu-main .plate-main, .menu-main .plate-big, .menu-main .field, .menu-main .menu-join, .menu-main .menu-colors, .field, .menu-join, .menu-colors, .invite-banner { width: 100%; }
  .menu-secondary .plate { flex: 1 1 0; } .menu-secondary .plate span { white-space: nowrap; }
}
/* the link itself is not shown: only the copy buttons */
#invite-link, #game-invite-link { display: none; }
.lobby-invite-row .plate { width: 100%; }
.share-row .btn-action { width: 100%; }

/* ---------- voice chat panel ---------- */
#left-col { justify-content: flex-start; }
#voice-panel { display: flex; flex-direction: column; gap: 8px; }
.voice-btns { display: flex; flex-direction: column; gap: 6px; }
.voice-btns .btn-action { width: 100%; }
.voice-status { font-size: 0.8rem; color: var(--concrete); }
.player-info.speaking { border-color: #6fb552; box-shadow: 0 0 0 2px #6fb552; }

/* ---------- small chat, voice list, player streets ---------- */
#chat-panel { flex: 0 0 auto; min-height: 0; }
#chat-messages { flex: none; height: 130px; overflow-y: auto; padding: 6px; margin-bottom: 6px; line-height: 1.35; overscroll-behavior: contain; }
.chat-msg { padding: 1px 0; overflow-wrap: anywhere; }
.voice-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.voice-head h3 { margin: 0; }
.voice-toggle { width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; color: var(--concrete); background: #1c2824; border: 2px solid #0e1412; border-radius: 4px; box-shadow: 0 2px 0 #0e1412; }
.voice-toggle:hover { background: #26362f; }
.voice-toggle.on { color: #0f1d09; background: #6fb552; border-color: #264417; box-shadow: 0 2px 0 #264417; }
.voice-list { display: flex; flex-direction: column; gap: 4px; }
.voice-row { display: flex; align-items: center; gap: 8px; padding: 5px 8px; background: #1c2824; border: 2px solid #0e1412; font-size: 0.85rem; color: var(--concrete); }
.voice-row .voice-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-row.on { color: var(--chalk); border-color: #3f6a35; }
.voice-row.on .voice-state { color: #6fb552; }
.voice-row.speaking { border-color: #6fb552; box-shadow: 0 0 0 2px #6fb552; }
#players-list .player-info[data-pid] { cursor: pointer; }
#players-list .player-info[data-pid]:hover { background: #26362f; }
.pp-inner { width: min(92vw, 380px); text-align: left; }
.pp-list { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow-y: auto; margin: 10px 0; }
.pp-row { display: flex; align-items: center; gap: 8px; padding: 5px 7px; background: #1c2824; border: 2px solid #0e1412; font-size: 0.85rem; }
.pp-row.mort { opacity: 0.6; }
.pp-name { flex: 1; }
.pp-note { color: var(--concrete); font-size: 0.78rem; }

/* ---- square board; chat and voice live in the right column ---- */
#board { width: min(100%, calc(100vh - 24px)); aspect-ratio: 1 / 1; max-height: calc(100vh - 24px); }
#sidebar #chat-panel { flex: 0 0 auto; }

/* ---------- live auction ---------- */
.auction-card { width: min(92vw, 400px); text-align: center; }
.auction-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.auction-label { font-size: 0.85rem; color: var(--concrete); }
.auction-secs { font-family: var(--font-logo); font-size: 1.6rem; color: var(--chalk); min-width: 2ch; text-align: right; }
.auction-secs.hot { color: var(--kiosk); }
.auction-tile { font-family: var(--font-game); font-weight: 600; font-size: 1.15rem; margin-bottom: 6px; }
.auction-price { font-family: var(--font-logo); font-size: clamp(2.2rem, 9vw, 3.2rem); color: var(--marking); text-shadow: 3px 3px 0 #4b3900; line-height: 1.1; }
.auction-price.bump { animation: priceBump 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes priceBump { 0% { transform: scale(1.35); } 100% { transform: scale(1); } }
.auction-leader { min-height: 1.4em; margin: 6px 0 10px; font-weight: 600; color: var(--concrete); }
.auction-leader.mine { color: #8fd070; }
.auction-bar { height: 12px; background: #11171a; border: 2px solid #0e1412; margin-bottom: 14px; }
.auction-bar-fill { height: 100%; width: 100%; background: var(--marking); transition: width 0.1s linear; }
.auction-bar-fill.hot { background: var(--kiosk); }
.auction-btns { display: flex; gap: 8px; justify-content: center; }
.auction-btn { flex: 1; padding: 0.7em 0.4em; font-family: var(--font-game); font-weight: 600; font-size: 1.25rem; cursor: pointer; color: #1c1500; background: var(--marking); border: 2px solid #4b3900; border-radius: 4px; box-shadow: 0 4px 0 #4b3900; transition: transform 0.08s, box-shadow 0.08s; }
.auction-btn:hover:not(:disabled) { background: #ffc61a; }
.auction-btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 0 0 #4b3900; }
.auction-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.auction-hint { margin-top: 12px; font-size: 0.82rem; color: var(--concrete); min-height: 1.2em; }

/* ---------- auction feed ---------- */
.auction-feed { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; min-height: 0; }
.feed-row { display: flex; align-items: center; gap: 8px; padding: 5px 9px; background: #1c2824; border: 2px solid #0e1412; font-size: 0.88rem; text-align: left; opacity: 0.75; }
.feed-row.new { opacity: 1; border-color: var(--marking); animation: feedIn 0.25s ease-out; }
.feed-name { flex: 1; font-weight: 700; }
.feed-add { color: var(--concrete); }
.feed-bid { font-family: var(--font-game); font-weight: 600; color: var(--marking); min-width: 4.5ch; text-align: right; }
@keyframes feedIn { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- roulette: separated sectors, lit rim ---------- */
.wheel-wrap { width: 270px; height: 270px; }
.wheel { inset: 0; border: 0; border-radius: 0; box-shadow: none; background: none; }
.wheel-svg, .wheel-rim { position: absolute; inset: 0; width: 100%; height: 100%; }
.wheel-rim { pointer-events: none; }
.wheel-txt { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 17px; fill: #fff; paint-order: stroke; stroke: rgba(0,0,0,0.45); stroke-width: 2px; }
.rim-bulb.a { animation: rimA 1.2s steps(1) infinite; }
.rim-bulb.b { animation: rimB 1.2s steps(1) infinite; }
@keyframes rimA { 0%, 100% { fill: #f2b705; } 50% { fill: #5a4a10; } }
@keyframes rimB { 0%, 100% { fill: #5a4a10; } 50% { fill: #f2b705; } }
.wheel-pointer { top: -6px; }
@media (prefers-reduced-motion: reduce) { .rim-bulb { animation: none !important; } }

/* no colour dot in the tile corner: the owner is shown by the border and the bar */
.tile-owner-dot { display: none; }
.wheel-txt { font-size: 14px; }

.wheel-txt { font-size: 13px; }

/* ---------- houses on tiles: a small "x3" badge on the colour bar, never over the name ---------- */
.tile-houses { z-index: 6; padding: 0 3px; min-width: 18px; text-align: center; font-family: var(--font-game); font-weight: 600; font-size: clamp(0.55rem, 0.8vw, 0.7rem); line-height: 1.35; letter-spacing: 0; background: #0e1412; border: 1px solid var(--marking); color: var(--marking); pointer-events: none; }
.tile-houses .ic { width: 1em; height: 1em; vertical-align: -0.12em; }
.tile.bottom .tile-houses { top: 2px; left: 50%; right: auto; bottom: auto; transform: translateX(-50%); }
.tile.top .tile-houses { bottom: 2px; top: auto; left: 50%; right: auto; transform: translateX(-50%); }
.tile.left .tile-houses { left: 1px; right: auto; top: 50%; bottom: auto; transform: translateY(-50%); padding: 0 1px; min-width: 16px; }
.tile.right .tile-houses { right: 1px; left: auto; top: 50%; bottom: auto; transform: translateY(-50%); padding: 0 1px; min-width: 16px; }

/* ---------- right column: every street visible at once ---------- */
#sidebar { height: calc(100vh - 20px); overflow: hidden; gap: 6px; }
#sidebar > .panel { flex: 0 0 auto; }
#my-props-panel { flex: 1 1 auto !important; min-height: 130px; display: flex; flex-direction: column; }
#my-props-panel .props-list { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; align-content: start; }
#my-props-panel .props-list.collapsed { max-height: 0; }
#my-props-panel .props-empty { grid-column: 1 / -1; }
.prop-item { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 4px 6px; min-width: 0; cursor: pointer; }
.prop-item .prop-color-big { width: 6px; height: 18px; border-radius: 0; box-shadow: none; }
.prop-item .prop-name { flex: 1; min-width: 0; font-size: 0.72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prop-tag { font-family: var(--font-game); font-size: 0.72rem; color: var(--marking); }
.prop-item.mortgaged .prop-tag { color: var(--concrete); }
.prop-item.open { grid-column: 1 / -1; }
.prop-more { flex-basis: 100%; display: flex; flex-direction: column; gap: 4px; font-size: 0.78rem; color: var(--concrete); }
#chat-messages { height: 76px; }
#chat-panel, #voice-panel { padding: 8px; }
#chat-panel h3, .voice-head h3 { margin-bottom: 4px; }
.voice-list { flex-direction: row; flex-wrap: wrap; gap: 4px; }
.voice-row { flex: 1 1 calc(50% - 4px); min-width: 0; padding: 3px 6px; font-size: 0.78rem; }
#voice-status { display: none; }
#players-list .player-info { padding: 5px 9px; }
@media (max-width: 1100px) { #sidebar { height: auto; overflow: visible; } }

/* ---- tighter right column so a dozen streets fit without scrolling ---- */
#chat-messages { height: 56px; margin-bottom: 4px; }
#chat-panel h3 { display: none; }
#chat-input { padding: 5px 8px; }
#chat-send { width: 32px; }
.prop-item { padding: 2px 5px; gap: 5px; }
.prop-item .prop-color-big { height: 14px; }
#my-props-panel { padding: 8px; }
#my-props-panel .props-header { margin-bottom: 4px; }
#player-panel { padding: 8px; }
#action-panel { padding: 6px; }
.btn-action { padding: 6px 8px; }

/* ---------- action row: deals + a small surrender button ---------- */
#action-panel { grid-template-columns: 1fr auto; }
#action-panel #giveup-btn { grid-column: auto; width: 40px; padding: 6px; }
#action-panel #giveup-btn .ic { width: 1.2em; height: 1.2em; }
#action-panel .prop-act.build { }
.prop-act.build { background: var(--marking); color: #1c1500; border-color: #4b3900; box-shadow: 0 2px 0 #4b3900; }
.prop-act.build:disabled { opacity: 0.45; }
#chat-messages { height: 104px; }

/* ---------- auction, RichUp-like two columns ---------- */
.auction-card { width: min(94vw, 720px); text-align: left; }
.auction-title { text-align: center; font-size: 0.9rem; color: var(--concrete); }
.auction-tile { text-align: center; font-family: var(--font-game); font-weight: 600; font-size: 1.6rem; margin: 2px 0 12px; }
.auction-cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; }
.auction-sub { font-size: 0.82rem; color: var(--concrete); margin: 8px 0 6px; }
.auction-bidline { display: flex; align-items: center; gap: 12px; }
.auction-avatar { width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--chalk); flex-shrink: 0; position: relative; box-shadow: 0 4px 0 rgba(0,0,0,0.3); }
.auction-avatar.empty { background: #2c403a !important; border-style: dashed; }
.auction-avatar:not(.empty)::before, .auction-avatar:not(.empty)::after { content: ''; position: absolute; width: 11px; height: 14px; background: #fff; border-radius: 50%; top: 11px; box-shadow: inset 3px -2px 0 2px #222; }
.auction-avatar::before { left: 6px; } .auction-avatar::after { right: 6px; }
.auction-bidline .auction-price { font-size: clamp(2rem, 6vw, 2.8rem); }
.auction-plus { font-family: var(--font-game); font-weight: 600; font-size: 1.3rem; color: #8fd070; opacity: 0; }
.auction-plus.go { animation: plusFloat 1.1s ease-out; }
@keyframes plusFloat { 0% { opacity: 1; transform: translateY(8px); } 100% { opacity: 0; transform: translateY(-14px); } }
.auction-timeline { display: flex; justify-content: flex-end; margin: 6px 0 4px; }
.auction-sold { font-size: 0.85rem; color: var(--concrete); }
.auction-sold.hot { color: var(--kiosk); font-weight: 700; }
.auction-bar { margin-bottom: 8px; }
.auction-btn { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 0.5em 0.3em; line-height: 1.15; }
.auction-btn b { font-family: var(--font-game); font-weight: 600; font-size: 1.2rem; }
.auction-btn small { font-size: 0.78rem; opacity: 0.8; }
.auction-feed { margin: 12px 0 0; }
.auction-right { display: flex; flex-direction: column; background: #1c2824; border: 2px solid #0e1412; padding: 12px 14px; }
.ac-head { font-family: var(--font-game); font-weight: 600; font-size: 1.15rem; text-align: center; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 4px solid var(--concrete); }
.ac-row { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; font-size: 0.88rem; border-bottom: 1px solid var(--line); }
.ac-row b { font-family: var(--font-game); color: var(--marking); }
.ac-foot { display: flex; justify-content: space-around; margin-top: auto; padding-top: 12px; text-align: center; }
.ac-foot small { display: block; color: var(--concrete); font-size: 0.75rem; }
.ac-foot b { font-family: var(--font-game); font-size: 1.15rem; }
@media (max-width: 640px) { .auction-cols { grid-template-columns: 1fr; } .auction-right { display: none; } }
#tile-popup .popup-build { width: calc(100% - 32px); margin: 0 16px 16px; }

/* ---------- trades panel + surrender flag + clean street list (RichUp-like) ---------- */
#player-panel { position: relative; padding-top: 34px; }
.giveup-flag { position: absolute; top: 6px; right: 6px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; font: 700 0.74rem var(--font-main); color: #fff; background: #c4553f; border: 0; border-radius: 4px; cursor: pointer; }
.giveup-flag:hover { background: #d4654f; }
.giveup-flag .ic { width: 0.95em; height: 0.95em; }
#trades-panel { padding: 8px; }
.trades-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.trades-head h3 { margin: 0; }
.btn-create { width: auto; padding: 4px 10px; background: var(--marking); color: #1c1500; border-color: #4b3900; box-shadow: 0 2px 0 #4b3900; }
.btn-create:hover:not(:disabled) { background: #ffc61a; border-color: #4b3900; }
.btn-create:disabled { background: #3a3a22; color: #8a8a60; }
.trades-list { display: flex; flex-direction: column; }
.trade-line-row { display: flex; align-items: center; gap: 7px; padding: 5px 2px; font-size: 0.82rem; border-top: 1px solid var(--line); }
.trade-line-row .ic { width: 0.95em; color: var(--concrete); }
.trades-empty { font-size: 0.78rem; color: var(--concrete); padding: 3px 2px; }
#my-props-panel .props-list { grid-template-columns: 1fr; gap: 0; }
#my-props-panel .props-list.two-cols { grid-template-columns: 1fr 1fr; gap: 3px; }
#my-props-panel .props-list:not(.two-cols) .prop-item { background: none; border: 0; border-top: 1px solid var(--line); padding: 6px 4px; }
#my-props-panel .props-list:not(.two-cols) .prop-item.monopoly { background: #2b2a12; }
#my-props-panel .props-list:not(.two-cols) .prop-item .prop-name { font-size: 0.86rem; }

/* ---------- trade windows (RichUp-like) ---------- */
.trade-inner { position: relative; text-align: center; }
.trade-x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; color: var(--chalk); background: #1c2824; border: 2px solid #0e1412; border-radius: 50%; }
.trade-x:hover { background: #4a2620; }
.trade-title { font-size: 1.05rem; font-weight: 700; color: var(--concrete); margin: 2px 0 14px; }
.trade-sub { font-weight: 600; margin-bottom: 14px; }
.trade-pick { width: min(92vw, 380px); }
.trade-player { display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 10px; padding: 12px 14px; font: 700 1.05rem var(--font-main); color: var(--chalk); background: #1c2824; border: 2px solid #0e1412; border-radius: 6px; cursor: pointer; }
.trade-player:hover { background: #2c403a; border-color: var(--marking); }
.trade-avatar { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--chalk); flex-shrink: 0; }
.trade-wide { width: min(94vw, 760px); max-height: 94vh; overflow-y: auto; }
.trade-cols { display: grid; grid-template-columns: 1fr 44px 1fr; gap: 14px; align-items: stretch; text-align: left; }
.trade-who { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 14px; font-size: 1.05rem; }
.trade-range { width: 100%; accent-color: var(--marking); }
.trade-scale { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--concrete); }
.trade-pill { width: max-content; margin: 6px auto 12px; padding: 3px 14px; font-family: var(--font-game); font-weight: 600; background: var(--marking); color: #1c1500; border-radius: 12px; }
.trade-cards { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow-y: auto; }
.trade-card { display: flex; align-items: center; gap: 9px; padding: 8px 10px; font: 600 0.9rem var(--font-main); color: var(--chalk); background: #1c2824; border: 2px solid #0e1412; border-radius: 4px; cursor: pointer; text-align: left; }
.trade-card:hover:not(:disabled) { border-color: var(--concrete); }
.trade-card.picked { border-color: var(--marking); background: #3a3510; }
.trade-card.locked { opacity: 0.4; cursor: not-allowed; }
.trade-mid { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; background: #1c2824; border-radius: 22px; color: var(--concrete); }
.trade-foot { margin-top: 16px; }
@media (max-width: 640px) { .trade-cols { grid-template-columns: 1fr; } .trade-mid { display: none; } }

/* ================= round 8 ================= */
/* smaller dice with a shadow on the board, viewed almost from above */
#board-center { --die: clamp(40px, 5.4vw, 62px); }
.die-slot { position: relative; width: var(--die); height: var(--die); }
.die-slot .dice-3d-container { position: relative; z-index: 2; }
.die-shadow { position: absolute; left: 50%; bottom: -9px; width: 90%; height: 16px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,0.95), rgba(0,0,0,0)); transform: translateX(-50%); opacity: 0.7; z-index: 1; }
.dice-3d-container { filter: none; }
#dice-3d-area { gap: clamp(20px, 4vw, 40px); }

/* surrender: small square flag again, next to "Create" */
.trades-btns { display: inline-flex; gap: 6px; align-items: center; }
.sq-btn { width: 30px; height: 30px; display: grid; place-items: center; cursor: pointer; color: #f0a496; background: #2c403a; border: 2px solid #0e1412; border-radius: 8px; box-shadow: 0 2px 0 #0e1412; }
.sq-btn:hover { background: #4a2620; }
.sq-btn .ic { width: 1.05em; height: 1.05em; }
#player-panel { padding-top: 8px; }

/* trade: big grab zone for the slider, answers row */
.trade-range { -webkit-appearance: none; appearance: none; height: 34px; background: transparent; cursor: pointer; touch-action: none; margin: 0; }
.trade-range::-webkit-slider-runnable-track { height: 8px; background: #11171a; border: 2px solid #0e1412; border-radius: 6px; }
.trade-range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -11px; border-radius: 50%; background: var(--marking); border: 3px solid #4b3900; box-shadow: 0 2px 0 rgba(0,0,0,0.4); }
.trade-range::-moz-range-track { height: 8px; background: #11171a; border: 2px solid #0e1412; border-radius: 6px; }
.trade-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--marking); border: 3px solid #4b3900; }
.trade-answers { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.trade-card.static { cursor: default; }
.trade-nothing { color: var(--concrete); text-align: center; padding: 10px; }
.trade-line-row.incoming { cursor: pointer; background: #3a3510; border-radius: 6px; padding-left: 6px; }

/* rounder everything */
.panel, .sheet, .notice, .rooms-card, .auction-right, .slot-machine, .trade-inner, .buy-panel-inner, .toast { border-radius: 14px; }
.plate, .btn-action, .btn-roll, .auction-btn, .buy-btn, .icon-btn, .prop-act, .giveup-flag, .btn-create { border-radius: 10px; }
.player-info, .prop-item, .trade-card, .trade-player, .voice-row, .feed-row, .room-row, .pp-row, .token-option, .trade-line-row { border-radius: 9px; }
.seg { border-radius: 10px; overflow: hidden; }
.field input, .menu-join input, .lobby-invite-row input, #chat-input, #chat-messages, .menu-nick { border-radius: 9px; }
.toggle-slider { border-radius: 14px; } .toggle-slider::before { border-radius: 50%; }
#board { border-radius: 22px; overflow: hidden; }
.tile { border-radius: 8px; }
.tile.corner { border-radius: 12px; }
.tile-color-bar { border-radius: 6px; }
.tile-price, .tile-houses { border-radius: 5px; }
.auction-bar, .auction-bar-fill { border-radius: 8px; }
.auction-price, .reel, .slot-window { border-radius: 6px; }

/* ---------- round 9 ---------- */
#board-center { --die: clamp(48px, 6.6vw, 74px); }
.money-float { white-space: nowrap; position: fixed; z-index: 99990; pointer-events: none; font-family: var(--font-game); font-weight: 700; font-size: 1.05rem; text-shadow: 0 2px 0 rgba(0,0,0,0.6); }
.money-float.minus { color: #ff6a55; }
.money-float.plus { color: #8fd070; }

/* ================= round 10: thick colour bar carries the houses, compact tiles ================= */
.tile.bottom .tile-color-bar, .tile.top .tile-color-bar { height: 20px; }
.tile.left .tile-color-bar, .tile.right .tile-color-bar { width: 24px; }
.tile .tile-houses { position: absolute; background: none; border: 0; padding: 0; min-width: 0; transform: none; z-index: 6; display: flex; align-items: center; justify-content: center; gap: 2px; color: #fff; font-family: var(--font-game); font-weight: 700; font-size: clamp(0.6rem, 0.85vw, 0.78rem); line-height: 1; text-shadow: 0 1px 0 rgba(0,0,0,0.7); pointer-events: none; }
.tile .tile-houses b { font-weight: 700; }
.tile .tile-houses .ic { width: 1.25em; height: 1.25em; stroke-width: 2.4; filter: drop-shadow(0 1px 0 rgba(0,0,0,0.6)); }
.tile.bottom .tile-houses { top: 0; left: 0; right: 0; bottom: auto; height: 20px; }
.tile.top .tile-houses { bottom: 0; top: auto; left: 0; right: 0; height: 20px; }
.tile.top .tile-houses .ic { transform: rotate(180deg); }
.tile.left .tile-houses { left: 0; right: auto; top: 0; bottom: 0; width: 24px; flex-direction: column; }
.tile.right .tile-houses { right: 0; left: auto; top: 0; bottom: 0; width: 24px; flex-direction: column; }
.tile.left .tile-houses .ic { transform: rotate(90deg); }
.tile.right .tile-houses .ic { transform: rotate(-90deg); }
.tile { padding: 2px; }
.tile-name { font-size: clamp(0.5rem, 0.72vw, 0.66rem); line-height: 1.1; }
.tile-price { margin-top: 0; padding: 0 4px; font-size: clamp(0.5rem, 0.8vw, 0.68rem); }
.tile.top .tile-content, .tile.bottom .tile-content { justify-content: flex-start; padding-top: 2px; gap: 3px; }
.tile.top .tile-content { padding-bottom: 20px; }
.tile.bottom .tile-content { padding-top: 22px; }

/* street list: ball in the colour of the street, at most 7 rows then scroll; chat takes the rest */
#my-props-panel { flex: 0 0 auto !important; min-height: 0; }
#my-props-panel .props-list, #my-props-panel .props-list.two-cols { display: block; max-height: 217px; overflow-y: auto; grid-template-columns: none; }
#my-props-panel .props-list.collapsed { max-height: 0; }
.prop-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px 6px; margin: 0; }
#my-props-panel .props-list .prop-item { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 4px 4px; min-height: 30px; }
#my-props-panel .props-list .prop-item:first-child { border-top: 0; }
#my-props-panel .props-list .prop-item.monopoly { background: #2b2a12; }
.prop-item .prop-color-big { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; border: 2px solid rgba(0,0,0,0.35); box-shadow: inset 0 -3px 0 rgba(0,0,0,0.18); }
#my-props-panel .props-list .prop-item .prop-name { font-size: 0.86rem; }
#chat-panel { flex: 1 1 auto !important; min-height: 120px; display: flex; flex-direction: column; }
#chat-messages { flex: 1 1 auto; height: auto; min-height: 50px; }
.tile.bottom .tile-houses, .tile.top .tile-houses, .tile.left .tile-houses, .tile.right .tile-houses { transform: none; }
.tile.top .tile-content { padding-top: 5px; }
.prop-item .prop-color-big { width: 20px; height: 20px; }

/* ---------- round 11: fixed-size street list and chat, short names ---------- */
#my-props-panel .props-list, #my-props-panel .props-list.two-cols { height: 217px; max-height: 217px; }
#my-props-panel .props-list.collapsed { height: 0; max-height: 0; }
#chat-panel { flex: 0 0 auto !important; min-height: 0; }
#chat-messages { flex: none; height: 78px; min-height: 0; }
.tile-name { font-size: clamp(0.55rem, 0.8vw, 0.72rem); letter-spacing: 0.01em; }

/* ================= round 12: horizontal names, price on a thick colour bar ================= */
.tile.left .tile-content, .tile.right .tile-content { transform: none; width: 100%; height: 100%; padding: 0; justify-content: center; }
.tile.left .tile-content { padding-left: 38px; padding-right: 4px; }
.tile.right .tile-content { padding-right: 38px; padding-left: 4px; }
.tile.top .tile-content, .tile.bottom .tile-content { justify-content: center; align-items: center; padding: 3px 3px; }
.tile.bottom .tile-content { padding-top: 28px; }
.tile.top .tile-content { padding-bottom: 28px; padding-top: 3px; }
.tile .tile-name { white-space: normal; text-align: center; word-break: normal; overflow-wrap: normal; font-size: clamp(0.58rem, 0.85vw, 0.76rem); }
.tile.left .tile-color-bar, .tile.right .tile-color-bar { width: 34px; }
.tile.bottom .tile-color-bar, .tile.top .tile-color-bar { height: 26px; }
.bar-price, .tile .tile-houses { font-family: var(--font-game); font-weight: 700; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,0.65); }
.bar-price { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: clamp(0.58rem, 0.82vw, 0.74rem); pointer-events: none; }
.tile.owned .bar-price, .tile.mortgaged .bar-price { display: none; } /* bought: the price goes away */
.tile.bottom .tile-houses, .tile.top .tile-houses { height: 26px; }
.tile.left .tile-houses, .tile.right .tile-houses { width: 34px; flex-direction: column; }
.tile.left .tile-houses .ic { transform: rotate(90deg); }
.tile.right .tile-houses .ic { transform: rotate(-90deg); }
.tile .tile-houses { font-size: clamp(0.64rem, 0.9vw, 0.8rem); }
.tile.top .tile-content { padding-top: 5px; }
/* round 12b: names must fit narrow tiles, icons must not sit on names */
.tile.top .tile-name, .tile.bottom .tile-name { font-size: clamp(0.5rem, 0.68vw, 0.64rem); letter-spacing: 0; }
.tile.top .tile-content, .tile.bottom .tile-content { padding-left: 1px; padding-right: 1px; }
.tile.left .tile-content { padding-right: 24px; }
.tile.right .tile-content { padding-left: 24px; }
.tile.left .tile-name, .tile.right .tile-name { font-size: clamp(0.56rem, 0.78vw, 0.7rem); }
.tile.left .tile-icon, .tile.right .tile-icon { font-size: clamp(0.8rem, 1.2vw, 1.05rem); }

/* ================= round 13: side tiles are rotated again; price gets a frame ================= */
.tile.left .tile-content, .tile.right .tile-content { width: calc(100% - 34px); height: 100%; padding: 2px 2px 10px 2px; justify-content: space-between; }
.tile.left .tile-content { transform: rotate(90deg); padding-left: 2px; padding-right: 2px; }
.tile.right .tile-content { transform: rotate(-90deg); padding-left: 2px; padding-right: 2px; }
.tile.left .tile-content { margin-left: 34px; }
.tile.right .tile-content { margin-right: 34px; }
.tile.left .tile-name, .tile.right .tile-name { font-size: clamp(0.5rem, 0.82vw, 0.7rem); }
/* the price chip lives in the tile on the sides and on the bar on top / bottom */
.tile.left .bar-price, .tile.right .bar-price { display: none; }
.tile.property.top .tile-price, .tile.property.bottom .tile-price { display: none; }
.tile.property.owned .tile-price { display: none; }
.tile.left.property .tile-price, .tile.right.property .tile-price { font-size: clamp(0.55rem, 0.85vw, 0.74rem); }
/* frame behind every price so it reads on any colour */
.bar-price b { font-weight: 700; padding: 0 6px; line-height: 1.35; background: rgba(0,0,0,0.45); border: 1.5px solid rgba(255,255,255,0.75); border-radius: 7px; }
/* round 13b: side icons sit in the inner corner, framed price chip on the sides too */
.tile.left .tile-icon, .tile.right .tile-icon { top: 3px; bottom: auto; transform: none; font-size: clamp(0.75rem, 1.05vw, 0.95rem); }
.tile.left .tile-icon { right: 3px; left: auto; }
.tile.right .tile-icon { left: 3px; right: auto; }
.tile.left .tile-price, .tile.right .tile-price { background: rgba(0,0,0,0.45); color: #fff; border: 1.5px solid rgba(255,255,255,0.75); border-radius: 7px; padding: 0 6px; }
.tile.left:not(.corner) .tile-icon, .tile.right:not(.corner) .tile-icon { display: none; }
.tile.left .tile-price, .tile.right .tile-price { white-space: nowrap; overflow: visible; flex-shrink: 0; }

/* ================= round 14 ================= */
.tile-color-bar { border-radius: 8px; }
/* bottom row: the colour bar (price / houses) sits on the outer edge, the name above it */
.tile.bottom .tile-color-bar { top: auto; bottom: 0; }
.tile.bottom .tile-houses { top: auto; bottom: 0; }
.tile.bottom .tile-content { padding-top: 3px; padding-bottom: 28px; }
/* side rows: the price sits on the colour bar and reads sideways like the names */
.tile.left .bar-price, .tile.right .bar-price { display: flex; }
.tile.left .bar-price b { transform: rotate(90deg); white-space: nowrap; }
.tile.right .bar-price b { transform: rotate(-90deg); white-space: nowrap; }
.tile.property.left .tile-price, .tile.property.right .tile-price { display: none; }
.tile.left .tile-content, .tile.right .tile-content { justify-content: center; }
.tile.left .tile-name, .tile.right .tile-name { font-size: clamp(0.5rem, 0.78vw, 0.68rem); }
.tile.owned.left .bar-price, .tile.owned.right .bar-price, .tile.mortgaged.left .bar-price, .tile.mortgaged.right .bar-price { display: none; }

/* ================= round 15: same thickness on all sides, truly rounded bars ================= */
.tile.bottom .tile-color-bar, .tile.top .tile-color-bar, .tile.left .tile-color-bar, .tile.right .tile-color-bar { border-radius: 10px; }
.tile.bottom .tile-color-bar { left: 3px; right: 3px; bottom: 3px; top: auto; height: 34px; width: auto; }
.tile.top .tile-color-bar { left: 3px; right: 3px; bottom: 3px; top: auto; height: 34px; width: auto; }
.tile.left .tile-color-bar { left: 3px; top: 3px; bottom: 3px; right: auto; width: 34px; height: auto; }
.tile.right .tile-color-bar { right: 3px; top: 3px; bottom: 3px; left: auto; width: 34px; height: auto; }
.tile.bottom .tile-houses, .tile.top .tile-houses { left: 3px; right: 3px; bottom: 3px; top: auto; height: 34px; width: auto; }
.tile.left .tile-houses { left: 3px; top: 3px; bottom: 3px; right: auto; width: 34px; height: auto; }
.tile.right .tile-houses { right: 3px; top: 3px; bottom: 3px; left: auto; width: 34px; height: auto; }
.tile.bottom .tile-content, .tile.top .tile-content { padding-top: 4px; padding-bottom: 40px; }
.tile.left .tile-content { margin-left: 40px; }
.tile.right .tile-content { margin-right: 40px; }
.tile.left .tile-content, .tile.right .tile-content { width: calc(100% - 40px); }

/* ================= round 16 ================= */
/* side tiles without a colour bar (stations, utilities, cards, tax, casino) show their icon in the bar's place */
.tile.left:not(.corner):not(.property) .tile-icon, .tile.right:not(.corner):not(.property) .tile-icon { display: grid; position: absolute; top: 50%; bottom: auto; width: 34px; margin: 0; transform: translateY(-50%); place-items: center; font-size: clamp(1rem, 1.5vw, 1.35rem); }
.tile.left:not(.corner):not(.property) .tile-icon { left: 3px; right: auto; }
.tile.right:not(.corner):not(.property) .tile-icon { right: 3px; left: auto; }
.tile.left:not(.corner):not(.property) .tile-icon .ic, .tile.right:not(.corner):not(.property) .tile-icon .ic { width: 1.4em; height: 1.4em; }
/* the price chip of those tiles is a little off the name */
.tile.left:not(.property) .tile-content, .tile.right:not(.property) .tile-content { justify-content: center; gap: 6px; }
/* larger lettering */
.tile.top:not(.corner) .tile-name, .tile.bottom:not(.corner) .tile-name { font-size: clamp(0.56rem, 0.78vw, 0.72rem); }
.tile.left .tile-name, .tile.right .tile-name { font-size: clamp(0.56rem, 0.84vw, 0.74rem); }
.tile-price { font-size: clamp(0.58rem, 0.86vw, 0.74rem); }
/* corners: icon a little above the centre, name below it, bigger */
.tile.corner .tile-content { padding: 6px 4px !important; margin: 0 !important; width: 100% !important; transform: none !important; justify-content: center; align-items: center; gap: 8px; }
.tile.corner .tile-icon { position: static; transform: translateY(-6px); font-size: clamp(1.5rem, 2.8vw, 2.4rem); display: grid; place-items: center; order: -1; }
.tile.corner { flex-direction: column; }
.tile.corner .tile-name { font-size: clamp(0.74rem, 1.15vw, 1rem); font-weight: 600; letter-spacing: 0.02em; margin-top: 2px; }
.tile.top:not(.corner) .tile-name, .tile.bottom:not(.corner) .tile-name { font-size: clamp(0.5rem, 0.68vw, 0.64rem); letter-spacing: -0.01em; }

/* ================= round 17 ================= */
/* icons 20% smaller */
.tile-icon { font-size: clamp(0.8rem, 1.5vw, 1.4rem); }
.tile.left:not(.corner):not(.property) .tile-icon .ic, .tile.right:not(.corner):not(.property) .tile-icon .ic { width: 1.12em; height: 1.12em; }
.tile.corner .tile-icon { font-size: clamp(1.2rem, 2.25vw, 1.9rem); }
/* corner names 15% smaller, one line */
.tile.corner .tile-name { font-size: clamp(0.63rem, 0.98vw, 0.85rem); white-space: nowrap; }
.tile.corner .tile-name br { display: none; }
/* top and bottom lettering a notch larger again (names may wrap to 3 lines) */
.tile.top:not(.corner) .tile-name, .tile.bottom:not(.corner) .tile-name { font-size: clamp(0.58rem, 0.8vw, 0.74rem); letter-spacing: 0; line-height: 1.08; }
/* stations, utilities, cards, tax, casino on the top/bottom rows: name on top, icon in the middle, price low */
.tile.top:not(.corner):not(.property) .tile-content, .tile.bottom:not(.corner):not(.property) .tile-content { justify-content: space-between; padding: 6px 1px 6px; }
.tile.top:not(.corner):not(.property) .tile-icon, .tile.bottom:not(.corner):not(.property) .tile-icon { position: absolute; top: 50%; left: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%); }
.tile.top:not(.corner):not(.property) .tile-price, .tile.bottom:not(.corner):not(.property) .tile-price { margin-top: auto; }

.tile.top:not(.corner):not(.property) .tile-icon, .tile.bottom:not(.corner):not(.property) .tile-icon { top: 60%; }
.tile.top:not(.corner) .tile-name, .tile.bottom:not(.corner) .tile-name { font-size: clamp(0.54rem, 0.74vw, 0.7rem); letter-spacing: -0.02em; }
/* corner icons a bit lower */
.tile.corner .tile-icon { transform: translateY(2px); }
.tile.corner .tile-icon { transform: translateY(7px); }

/* ================= round 18 ================= */
/* a landed die shows pips on the face turned to you only; the slivers on the sides stay clean */
/* the chat is twice as long; the column scrolls if the screen is low, the street list shows 6 rows */
#chat-messages { height: 156px; }
#my-props-panel .props-list, #my-props-panel .props-list.two-cols { height: 186px; max-height: 186px; }
#sidebar { overflow-y: auto; }

/* ---------- character panel (left column) ---------- */
#role-panel { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.role-head { display: flex; align-items: center; gap: 8px; }
.role-head .ic { width: 1.4em; height: 1.4em; color: var(--marking); }
.role-head b { font-family: var(--font-game); font-size: 1.05rem; }
.role-left { margin-left: auto; font-size: 0.8rem; color: var(--concrete); }
.role-desc { font-size: 0.82rem; color: var(--concrete); line-height: 1.4; }
.role-btn { width: 100%; justify-content: center; }
.ability-inner { width: min(92vw, 400px); text-align: center; }
.ability-inner .trade-player small { margin-left: auto; color: var(--concrete); font-weight: 500; font-size: 0.8rem; }

/* ---------- roofs and the roles window ---------- */
.tile-roof { position: absolute; top: 2px; right: 2px; z-index: 7; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #0e1412; display: grid; place-items: center; color: #fff; pointer-events: auto; }
.tile-roof .ic { width: 11px; height: 11px; }
.role-roof { font-size: 0.78rem; color: var(--marking); line-height: 1.35; }
.role-roof.bad { color: #f0a496; }
.role-all { align-self: flex-start; background: none; border: 0; padding: 0; color: var(--concrete); font: 600 0.78rem var(--font-main); text-decoration: underline; cursor: pointer; }
.role-all:hover { color: var(--chalk); }
.roles-inner { width: min(94vw, 640px); max-height: 92vh; overflow-y: auto; text-align: left; }
.roles-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.role-card { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; background: #1c2824; border: 2px solid #0e1412; border-radius: 9px; }
.role-card.mine { border-color: var(--marking); background: #3a3510; }
.role-card .ic { width: 1.4em; height: 1.4em; color: var(--marking); flex-shrink: 0; margin-top: 2px; }
.role-card b { display: block; font-size: 0.9rem; }
.role-card span { display: block; font-size: 0.78rem; color: var(--concrete); line-height: 1.35; }
@media (max-width: 640px) { .roles-grid { grid-template-columns: 1fr; } }

/* ---------- end screen, Pahan pool ---------- */
.pahan-pool { margin-top: 6px; padding: 5px 9px; font: 600 0.8rem var(--font-main); color: var(--marking); background: #2b2a12; border: 2px solid #0e1412; border-radius: 9px; }
.end-inner { width: min(94vw, 560px); text-align: center; }
.end-title { display: flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--font-game); font-weight: 700; font-size: 1.7rem; color: var(--marking); }
.end-title .ic { width: 1.3em; height: 1.3em; }
.end-sub { color: var(--concrete); font-size: 0.82rem; margin: 4px 0 14px; }
.end-table { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.end-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #1c2824; border: 2px solid #0e1412; border-radius: 9px; text-align: left; }
.end-row.first { border-color: var(--marking); background: #3a3510; }
.end-row.out { opacity: 0.55; }
.end-place { font-family: var(--font-game); font-weight: 700; width: 1.4em; color: var(--concrete); }
.end-name { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.end-info { font-size: 0.8rem; color: var(--concrete); }
.end-worth { font-family: var(--font-game); color: var(--marking); min-width: 4.5ch; text-align: right; }
.end-votes { margin-top: 10px; font-size: 0.85rem; color: var(--concrete); min-height: 1.2em; }

/* ---------- draggable lever + bet slider ---------- */
.slot-lever { touch-action: none; user-select: none; --pull: 0; }
.slot-lever .lever-stick { transform: scaleY(calc(1 - var(--pull) * 0.62)); transition: none; }
.slot-lever .lever-ball { transform: translateY(calc(var(--pull) * 66px)); transition: none; animation: none; cursor: grab; }
.slot-lever.dragging .lever-ball { cursor: grabbing; }
.slot-lever:not(.dragging):not(.pulled) .lever-stick, .slot-lever:not(.dragging):not(.pulled) .lever-ball { transition: transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1); }
.slot-lever:not(:disabled):not(.dragging):not(.pulled) .lever-ball { animation: leverHint 1.6s ease-in-out infinite; }
.slot-lever.pulled .lever-stick, .slot-lever.pulled .lever-ball { transition: transform 0.12s ease-in; }
.bet-box { padding: 10px 14px 0; }
.bet-odds { font-size: 0.76rem; color: var(--concrete); text-align: center; margin-top: -4px; }

/* ---------- 3x3 slots ---------- */
.slot-machine { --slot-h: 56px; }
.reel { width: 78px; height: calc(var(--slot-h) * 3); }
.reel-cell { height: var(--slot-h); }
.reel-cell .ic { width: 36px; height: 36px; }
.reel-cell .seven { font-size: 2.1rem; }
.reel-cell.hit { background: rgba(242, 183, 5, 0.35); box-shadow: inset 0 0 0 2px var(--marking); animation: hitPulse 0.5s ease-in-out 3; }
@keyframes hitPulse { 50% { background: rgba(242, 183, 5, 0.6); } }
.slot-lever { height: 190px; }

.slot-detail { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.slot-detail > div { display: flex; justify-content: space-between; padding: 4px 8px; font-size: 0.8rem; background: #3a3510; border: 2px solid var(--marking); border-radius: 8px; }
.slot-detail b { font-family: var(--font-game); color: var(--marking); }
.paytable { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 6px 0; }
.paytable > div { display: flex; flex-direction: column; align-items: center; padding: 4px 2px; background: #1c2824; border: 2px solid #0e1412; border-radius: 8px; font-size: 0.7rem; color: var(--concrete); }
.paytable b { font-family: var(--font-game); font-size: 0.95rem; color: var(--marking); }
.paytable i { font-style: normal; font-size: 0.8rem; letter-spacing: -1px; }
.casino-panel { align-items: flex-start; overflow-y: auto; padding: 10px 0; }
.casino-inner { margin: auto; max-height: none; }

/* ---------- fixed lever: the stick reaches from the base to the ball ---------- */
.slot-lever { height: 190px; }
.slot-lever .lever-stick { top: 34px; bottom: 20px; height: auto; transform-origin: bottom; transform: scaleY(calc(1 - var(--pull) * 0.62)); }
.slot-lever .lever-ball { transform: translateY(calc(var(--pull) * 86px)); }
.slot-lever.pulled .lever-stick { transform: scaleY(0.38); }
.slot-lever.pulled .lever-ball { transform: translateY(86px); }

/* ---------- winning lines over the reels ---------- */
.win-lines { position: absolute; left: 6px; top: 6px; width: 246px; height: 168px; pointer-events: none; z-index: 3; }
.win-line { fill: none; stroke-width: 5; stroke-linecap: round; opacity: 0; filter: drop-shadow(0 0 3px rgba(0,0,0,0.8)); animation: lineBlink 0.55s ease-in-out 6; animation-fill-mode: forwards; }
@keyframes lineBlink { 0%, 100% { opacity: 0.15; } 50% { opacity: 1; } }
.win-line { animation: lineBlink 0.55s ease-in-out 6, lineStay 0s linear 3.3s forwards; }
@keyframes lineStay { to { opacity: 0.9; } }
.slot-detail > div { border-width: 2px; }
@media (prefers-reduced-motion: reduce) { .win-line { animation: none; opacity: 1; } }

/* one line at a time */
.win-line { animation: none; opacity: 0; }
.win-line.on { opacity: 1; animation: lineIn 0.35s ease-out; stroke-width: 6; }
@keyframes lineIn { from { opacity: 0; stroke-dasharray: 400; stroke-dashoffset: 400; } to { opacity: 1; stroke-dasharray: 400; stroke-dashoffset: 0; } }
.slot-detail > div.active { background: #5a4a10; transform: scale(1.02); }
.slot-detail > div:not(.active) { opacity: 0.6; }

/* ================= PHONE: the board is small, so a street is a coloured square with its price ================= */
@media (max-width: 640px) {
  #main-layout { padding: 6px; gap: 8px; }
  #sidebar { order: 1; } #left-col { order: 2; } #left-col .brand { display: none; }
  #board { border-radius: 14px; border-width: 2px; }
  .tile { padding: 1px; border-radius: 5px; }
  .tile .tile-name { display: none; }
  .tile.corner .tile-name { display: block; font-size: 0.42rem; letter-spacing: 0; }
  .tile.corner .tile-icon { font-size: 0.9rem; transform: none; }
  .tile.corner .tile-content { padding: 1px !important; gap: 1px; }
  .tile.property .tile-content { display: none; }
  .tile.top .tile-color-bar, .tile.bottom .tile-color-bar, .tile.left .tile-color-bar, .tile.right .tile-color-bar,
  .tile.top .tile-houses, .tile.bottom .tile-houses, .tile.left .tile-houses, .tile.right .tile-houses { left: 1px; right: 1px; top: 1px; bottom: 1px; width: auto; height: auto; border-radius: 5px; }
  .tile .tile-houses { flex-direction: row; font-size: 0.6rem; }
  .tile.left .tile-houses .ic, .tile.right .tile-houses .ic, .tile.top .tile-houses .ic { transform: none; }
  .tile.left .bar-price, .tile.right .bar-price { display: flex; }
  .bar-price { font-size: 0.5rem; }
  .bar-price b, .tile.left .bar-price b, .tile.right .bar-price b { transform: none; padding: 0 2px; border-width: 1px; border-radius: 4px; line-height: 1.2; }
  .tile:not(.property):not(.corner) .tile-content { padding: 0; justify-content: flex-end; }
  .tile:not(.property):not(.corner) .tile-price { font-size: 0.45rem; padding: 0 2px; border-width: 1px; border-radius: 4px; }
  .tile.left:not(.corner):not(.property) .tile-icon, .tile.right:not(.corner):not(.property) .tile-icon { left: 50%; right: auto; width: auto; top: 40%; transform: translate(-50%, -50%); font-size: 0.8rem; }
  .tile.top:not(.corner):not(.property) .tile-icon, .tile.bottom:not(.corner):not(.property) .tile-icon { top: 38%; }
  .tile-icon .ic { width: 1.1em; height: 1.1em; }
  .tile-roof { width: 10px; height: 10px; top: 0; right: 0; } .tile-roof .ic { width: 6px; height: 6px; }
  .player-board-token { width: 15px; height: 15px; border-width: 2px; }
  .player-board-token::before, .player-board-token::after { width: 4px; height: 5px; top: 3px; box-shadow: inset 1px -0.5px 0 0.5px #222; }
  .player-board-token::before { left: 2px; } .player-board-token::after { right: 2px; }
  #board-center { --die: 38px; gap: 3px; padding: 2px; }
  #dice-3d-area { gap: 18px; }
  #game-log { display: none; }
  #turn-timer { font-size: 0.7rem; min-height: 1em; }
  .btn-roll { width: min(62%, 190px); padding: 7px 8px; font-size: 0.82rem; }
  .buy-row .btn-roll { width: auto; padding: 7px 12px; }
  .buy-caption { font-size: 0.75rem; text-align: center; }
  .buy-row-btns { gap: 6px; }
  #chat-messages { height: 120px; }
  .trade-cols { grid-template-columns: 1fr; } .trade-mid { display: none; }
}
@media (max-width: 640px) {
  #left-col { display: contents; }
  #role-panel { order: 1; } #sidebar { order: 2; } #share-panel { order: 3; } .side-tools { order: 4; }
  #sidebar { height: auto; overflow: visible; }
  #sidebar, #left-col > .panel, .side-tools { width: 100%; }
}

/* the street name lives on the colour bar; it is only shown on phones, where the tile names are hidden */
.bar-name { display: none; }
@media (max-width: 640px) {
  .tile-color-bar { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; overflow: hidden; padding: 1px; }
  .bar-name { display: block; max-width: 100%; font: 700 0.46rem/1.04 var(--font-game); color: #fff; text-align: center; text-transform: uppercase; text-shadow: 0 1px 0 rgba(0,0,0,0.75); overflow: hidden; word-break: break-word; max-height: 2.1em; }
  .bar-price { position: static; inset: auto; }
  .tile.top .tile-houses, .tile.bottom .tile-houses, .tile.left .tile-houses, .tile.right .tile-houses { left: auto; top: auto; right: 2px; bottom: 2px; width: auto; height: auto; padding: 0 3px; background: rgba(0,0,0,0.6); border-radius: 4px; }
  .tile .tile-houses { z-index: 8; }
}
@media (max-width: 640px) {
  .tile.top .bar-name, .tile.bottom .bar-name { font-size: 0.38rem; letter-spacing: -0.02em; word-break: normal; overflow-wrap: normal; }
  .tile.left .bar-name, .tile.right .bar-name { font-size: 0.46rem; word-break: normal; overflow-wrap: normal; }
}
@media (max-width: 640px) {
  .tile.top .bar-name, .tile.bottom .bar-name { writing-mode: vertical-rl; font-size: 0.5rem; letter-spacing: 0; max-height: 36px; max-width: none; line-height: 1.1; word-break: normal; overflow: hidden; }
  .tile.top .tile-color-bar, .tile.bottom .tile-color-bar { gap: 2px; }
}
@media (max-width: 640px) {
  .tile.top .bar-name, .tile.bottom .bar-name { font-size: 0.4rem; max-height: 42px; }
}

/* chat send button: a true square, arrow centred */
#chat-input-area { align-items: center; }
#chat-input { height: 38px; padding-top: 0; padding-bottom: 0; }
#chat-send { width: 38px; height: 38px; min-width: 38px; padding: 0; flex: 0 0 38px; display: grid; place-items: center; border-radius: 10px; }
#chat-send .ic { width: 1.2em; height: 1.2em; display: block; margin: 0; }

/* log tones: green = gained / good, red = lost / bad */
.game-log-msg.tone-good { color: #7fdc6a; }
.game-log-msg.tone-bad { color: #ff7a66; }
.pp-role { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; padding: 8px 10px; background: #1b2723; border: 2px solid #0e1412; border-radius: 10px; }
.pp-role svg { width: 22px; height: 22px; flex: none; color: var(--paint, #f2b705); }
.pp-role b { display: block; }
.pp-role span { display: block; font-size: 13px; opacity: 0.75; }
.pp-role .pp-roof { color: #f2b705; opacity: 1; }
.pp-role.locked { opacity: 0.6; }

/* undo buttons (Lucky, Armor) hang under the main button and never push it */
.undo-slot { position: relative; width: 100%; height: 0; z-index: 5; }
.undo-slot .buy-row { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); background: #1b2723; border: 2px solid #0e1412; border-radius: 10px; padding: 8px 12px; width: max-content; max-width: 92%; }

/* player window: same ball and font as the street list */
.pp-ball { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; border: 2px solid rgba(0,0,0,0.35); box-shadow: inset 0 -3px 0 rgba(0,0,0,0.18); }
.pp-row .pp-name { font-family: var(--font-game); font-weight: 500; letter-spacing: 0.02em; }
.pp-row .trade-price { font-family: var(--font-game); color: var(--marking); }
.undo-slot .buy-row { width: calc(100% - 16px); max-width: none; box-sizing: border-box; }
.undo-slot .buy-caption { text-align: center; font-size: clamp(0.8rem, 1.1vw, 1rem); }

/* ---- events ---- */
.event-card { position: fixed; z-index: 9000; left: 50%; top: 84px; transform: translateX(-50%); display: flex; gap: 14px; align-items: center; max-width: min(92vw, 460px); padding: 14px 18px; background: #1b2723; border: 3px solid var(--marking); border-radius: 12px; box-shadow: 0 8px 0 rgba(0,0,0,0.4); animation: eventIn 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.event-card.out { opacity: 0; transform: translateX(-50%) translateY(-14px); transition: opacity 0.45s, transform 0.45s; }
.event-card svg { width: 38px; height: 38px; flex: none; color: var(--marking); }
.event-card small { display: block; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.7rem; opacity: 0.6; }
.event-card b { display: block; font-family: var(--font-game); font-size: 1.3rem; letter-spacing: 0.02em; }
.event-card span { display: block; font-size: 0.92rem; opacity: 0.85; }
.event-card.tone-good { border-color: #6fb552; } .event-card.tone-good svg { color: #7fdc6a; }
.event-card.tone-bad { border-color: #e0634f; } .event-card.tone-bad svg { color: #ff7a66; }
@keyframes eventIn { from { opacity: 0; transform: translateX(-50%) translateY(-24px) scale(0.92); } to { opacity: 1; transform: translateX(-50%); } }
#event-banner { position: absolute; z-index: 6; top: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; max-width: 94%; padding: 5px 12px; background: #1b2723; border: 2px solid var(--marking); border-radius: 8px; font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#event-banner svg { width: 16px; height: 16px; flex: none; color: var(--marking); }
#event-banner.tone-good { border-color: #6fb552; } #event-banner.tone-bad { border-color: #e0634f; }

/* ================= board unification ================= */
/* owner: ONE monolithic outline that follows the tile's rounded corners (1.5x thicker than before); the old straight bar is gone */
.tile-owner-bar { display: none !important; }
.tile.owned { border: 1px solid var(--owner-color) !important; box-shadow: inset 0 0 0 2px var(--owner-color) !important; }

/* stations, utilities, cards, tax, casino: the same order on all four sides: name, price, and the icon on the outer strip */
.tile.top:not(.corner):not(.property) .tile-icon, .tile.bottom:not(.corner):not(.property) .tile-icon {
  position: absolute; left: 3px; right: 3px; bottom: 3px; top: auto; height: 34px; width: auto; transform: none; margin: 0; display: grid; place-items: center;
}
.tile.top:not(.corner):not(.property) .tile-content, .tile.bottom:not(.corner):not(.property) .tile-content { justify-content: flex-start; gap: 4px; padding: 6px 1px 40px; }
.tile.top:not(.corner):not(.property) .tile-price, .tile.bottom:not(.corner):not(.property) .tile-price { margin-top: 0; }
/* one price chip style everywhere (it was yellow on the top and bottom rows and dark on the sides) */
.tile:not(.property) .tile-price { background: rgba(0,0,0,0.45); color: #fff; border: 1.5px solid rgba(255,255,255,0.75); border-radius: 7px; padding: 0 6px; font-family: var(--font-game); font-weight: 700; white-space: nowrap; }
.tile.owned .tile-price, .tile.mortgaged .tile-price { display: none; }
/* long names on the side stations wrap by themselves (plain spaces) */
.tile.left:not(.corner):not(.property) .tile-name, .tile.right:not(.corner):not(.property) .tile-name { white-space: normal; text-align: center; }
.tile.left:not(.corner):not(.property) .tile-name, .tile.right:not(.corner):not(.property) .tile-name { line-height: 1.05; font-size: clamp(0.5rem, 0.7vw, 0.64rem); }
.tile.left:not(.property) .tile-content, .tile.right:not(.property) .tile-content { gap: 3px; }

/* stations: name and price as one block closer to the middle of the tile (the icon keeps the outer strip) */
.tile.left:not(.corner):not(.property) .tile-content { transform: rotate(90deg) translateY(16px); padding-bottom: 2px; }
.tile.right:not(.corner):not(.property) .tile-content { transform: rotate(-90deg) translateY(-16px); padding-bottom: 2px; }
.tile.top:not(.corner):not(.property) .tile-content, .tile.bottom:not(.corner):not(.property) .tile-content { justify-content: center; }

/* hovering a player's colour dot: the screen dims and that player's streets light up */
.hl-mode .tile:not(.hl-on), .hl-mode #board-center, .hl-mode .player-board-token, .hl-mode aside .panel:not(:has(#players-list)), .hl-mode .side-tools { filter: brightness(0.38); }
.tile, #board-center, aside .panel { transition: filter 0.18s; }
.player-color-dot { cursor: pointer; box-shadow: 0 0 0 6px transparent; }

/* side stations/cards/casino: every name sits at the same distance from the board edge (same as the street names); the price follows it */
.tile.left:not(.corner):not(.property) .tile-content, .tile.right:not(.corner):not(.property) .tile-content { justify-content: flex-start; gap: 3px; padding: var(--nm-pad, 11.5px) 2px 0; transform: rotate(90deg); }
.tile.right:not(.corner):not(.property) .tile-content { transform: rotate(-90deg); }
.tile.left:not(.corner):not(.property) .tile-name, .tile.right:not(.corner):not(.property) .tile-name { height: 22px; display: flex; align-items: center; justify-content: center; flex: none; }

/* ---- neon highlight: soft vignette over the screen, the player's streets glow in the player's colour ---- */
#hl-vignette { position: fixed; inset: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity 0.25s; background: radial-gradient(ellipse at center, rgba(5,10,8,0.35) 35%, rgba(5,10,8,0.8) 100%); }
.hl-mode #hl-vignette { opacity: 1; }
.hl-mode .tile.hl-on { z-index: 12; filter: brightness(1.2) saturate(1.2); outline: none; animation: neonPulse 1.4s ease-in-out infinite;
  box-shadow: 0 0 0 2px var(--hl), 0 0 10px 2px var(--hl), 0 0 26px 6px var(--hl), inset 0 0 14px color-mix(in srgb, var(--hl) 55%, transparent) !important; }
@keyframes neonPulse { 50% { box-shadow: 0 0 0 2px var(--hl), 0 0 16px 4px var(--hl), 0 0 40px 10px var(--hl), inset 0 0 20px color-mix(in srgb, var(--hl) 70%, transparent); } }
.player-info.hl-row { border-color: var(--hl); box-shadow: 0 0 0 2px var(--hl), 0 0 18px 2px var(--hl); position: relative; z-index: 6; }
/* event banner: at the bottom of the board centre, a little above the edge */
#event-banner { top: auto; bottom: 36px; }
/* ---- role reveal: the big show ---- */
#reveal-card { position: fixed; inset: 0; z-index: 9100; pointer-events: none; transition: opacity 0.6s; }
#reveal-card.out { opacity: 0; }
.rv-shade { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(4,8,6,0.72) 0%, rgba(4,8,6,0.93) 100%); animation: rvFade 0.5s ease-out both; }
.rv-rays { position: absolute; left: 50%; top: 50%; width: 170vmax; height: 170vmax; margin: -85vmax 0 0 -85vmax; opacity: 0;
  background: repeating-conic-gradient(from 0deg, rgba(242,183,5,0.20) 0deg 6deg, transparent 6deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 0%, transparent 55%); mask: radial-gradient(circle, #000 0%, transparent 55%);
  animation: rvRays 5.2s linear 0.6s both; }
.rv-stage { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.rv-flip { position: absolute; width: 300px; height: 400px; left: -150px; top: -200px; transform-style: preserve-3d; animation: rvFlip 2.2s linear both; }
.rv-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 22px; text-align: center; border-radius: 20px; border: 5px solid var(--marking); background: #1b2723; box-shadow: 0 12px 0 rgba(0,0,0,0.45), 0 0 60px rgba(242,183,5,0.5); }
.rv-back { background: repeating-linear-gradient(45deg, #1b2723 0 14px, #243630 14px 28px); animation: rvBack 2.2s steps(1, end) both; }
.rv-back svg { width: 84px; height: 84px; color: var(--marking); }
.rv-back span { font-family: var(--font-game); letter-spacing: 0.25em; text-transform: uppercase; opacity: 0.75; font-size: 0.85rem; }
.rv-front { transform: rotateY(180deg); opacity: 0; animation: rvFront 2.2s steps(1, end) both; box-shadow: 0 12px 0 rgba(0,0,0,0.45), 0 0 90px rgba(242,183,5,0.75); }
.rv-front svg { width: 96px; height: 96px; color: var(--marking); filter: drop-shadow(0 0 14px rgba(242,183,5,0.8)); }
.rv-front small { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; opacity: 0.7; }
.rv-front b { font-family: var(--font-game); font-size: 2.1rem; letter-spacing: 0.02em; }
.rv-front span { font-size: 1rem; opacity: 0.88; line-height: 1.3; }
.rv-ring { position: absolute; left: -40px; top: -40px; width: 80px; height: 80px; border-radius: 50%; border: 4px solid var(--marking); opacity: 0; animation: rvRing 1.3s ease-out 1.35s both; }
.rv-ring.r2 { animation-delay: 1.55s; border-color: #fff3c4; }
.rv-sparks i { position: absolute; left: -4px; top: -4px; width: 8px; height: 22px; border-radius: 4px; background: linear-gradient(var(--marking), transparent); opacity: 0; transform: rotate(var(--a)) translateY(0); animation: rvSpark 1.1s ease-out calc(1.4s + var(--t)) both; }
.rv-stamp { position: absolute; left: -230px; width: 460px; top: 232px; text-align: center; font-family: var(--font-game); font-weight: 700; font-size: 2.3rem; letter-spacing: 0.14em; color: var(--marking); text-shadow: 0 4px 0 rgba(0,0,0,0.6), 0 0 22px rgba(242,183,5,0.7); opacity: 0; animation: rvStamp 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) 1.9s both; }
@keyframes rvFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rvRays { 0% { opacity: 0; transform: rotate(0) scale(0.6); } 12% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: rotate(40deg) scale(1.05); } }
@keyframes rvFlip {
  0% { transform: translateY(380px) scale(0.35) rotateZ(-14deg) rotateY(0); opacity: 0; animation-timing-function: cubic-bezier(0.2, 0.7, 0.3, 1); }
  26% { transform: translateY(0) scale(1.1) rotateZ(0) rotateY(0); opacity: 1; animation-timing-function: linear; }
  36% { transform: translateY(0) scale(1.1) rotateY(0); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  72% { transform: translateY(-10px) scale(1.2) rotateY(180deg); animation-timing-function: ease-out; }
  100% { transform: translateY(0) scale(1.1) rotateY(180deg); opacity: 1; }
}
@keyframes rvBack { 0%, 54% { opacity: 1; } 55%, 100% { opacity: 0; } }
@keyframes rvFront { 0%, 54% { opacity: 0; } 55%, 100% { opacity: 1; } }
@keyframes rvRing { 0% { opacity: 0.9; transform: scale(0.4); } 100% { opacity: 0; transform: scale(9); } }
@keyframes rvSpark { 0% { opacity: 1; transform: rotate(var(--a)) translateY(60px); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(var(--d) * -1 - 120px)); } }
@keyframes rvStamp { 0% { opacity: 0; transform: scale(2.6) rotate(-8deg); } 100% { opacity: 1; transform: scale(1) rotate(-3deg); } }

/* main button row: the main button never moves unless an undo button joins it (then the pair is centred) */
#main-row { display: flex; gap: 10px; justify-content: center; align-items: center; }
#main-row .undo-btn { width: clamp(125px, 10.5vw, 150px); }
.undo-slot { display: none; }
.undo-btn { white-space: nowrap; font-size: 0.92em; padding-left: 10px; padding-right: 10px; width: auto !important; min-width: clamp(125px, 10.5vw, 150px); }
/* the hint wobble must not fight the pull: while dragging, the ball follows the hand and the stick reaches it */
.slot-lever.dragging .lever-ball, .slot-lever.pulled .lever-ball { animation: none !important; }
.slot-lever .lever-stick { top: calc(34px + var(--pull) * 86px); transform: none !important; }
.slot-lever.pulled .lever-stick { top: 120px; }

/* ability pick window: same ball and font as the street list */
.ability-inner .trade-player { display: flex; align-items: center; gap: 10px; }
.ability-inner .pick-name { font-family: var(--font-game); font-weight: 500; letter-spacing: 0.02em; text-transform: uppercase; flex: 1; text-align: left; }
.ability-inner .trade-player small { color: var(--concrete); }

/* houses on the side rows: the digit is horizontal; left: house above the number, right: number above the house */
.tile.left .tile-houses, .tile.right .tile-houses { flex-direction: column; gap: 1px; }
.tile.right .tile-houses { flex-direction: column-reverse; }
.tile.left .tile-houses .ic, .tile.right .tile-houses .ic { transform: none; }
.tile.left .tile-houses b, .tile.right .tile-houses b { writing-mode: horizontal-tb; transform: none; }

.kick-btn { margin-left: auto; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; border: 2px solid #0e1412; background: #2c403a; color: var(--chalk); cursor: pointer; padding: 0; }
.kick-btn:hover { background: #7a2a20; }
.kick-btn svg { width: 14px; height: 14px; }

/* phone: corners are no bigger than a normal tile, so the side tiles get the room */
@media (max-width: 640px) {
  #board { grid-template-columns: 1.15fr repeat(9, minmax(0, 1fr)) 1.15fr !important; grid-template-rows: 1.15fr repeat(9, minmax(0, 1fr)) 1.15fr !important; }
  .tile.corner .tile-name { font-size: 0.5rem !important; }
  .tile.corner .tile-icon { font-size: 1.1rem !important; }
}
@media (max-width: 640px) {
  #main-row { width: 100%; }
  #main-row #main-action { width: auto; min-width: 110px; padding: 7px 16px; white-space: nowrap; }
}
/* the corner track may shrink below its text; the text then wraps or shrinks inside the corner */
@media (max-width: 640px) {
  #board { grid-template-columns: minmax(0, 1.45fr) repeat(9, minmax(0, 1fr)) minmax(0, 1.45fr) !important; grid-template-rows: minmax(0, 1.45fr) repeat(9, minmax(0, 1fr)) minmax(0, 1.45fr) !important; }
  .tile.corner { overflow: hidden; }
  .tile.corner .tile-name { white-space: normal !important; text-align: center; line-height: 1.05; }
}

/* phone: names on stations, cards and casino tiles; chat right under the board */
@media (max-width: 640px) {
  .tile:not(.property):not(.corner) .tile-name { display: block !important; font-size: 0.4rem; line-height: 1; letter-spacing: 0; text-align: center; overflow-wrap: anywhere; max-width: 100%; transform: none; }
  .tile:not(.property):not(.corner) .tile-name br { display: none; }
  .tile:not(.property):not(.corner) .tile-content { justify-content: flex-start !important; padding-top: 2px !important; gap: 1px; }
  .tile.left:not(.corner):not(.property) .tile-content, .tile.right:not(.corner):not(.property) .tile-content { transform: none !important; width: 100% !important; margin: 0 !important; height: 100%; justify-content: center !important; }
  .tile.left:not(.corner):not(.property) .tile-icon, .tile.right:not(.corner):not(.property) .tile-icon { top: 70%; }
  .tile.top:not(.corner):not(.property) .tile-icon, .tile.bottom:not(.corner):not(.property) .tile-icon { top: 66%; }
  #sidebar { display: flex; flex-direction: column; }
  #sidebar #chat-panel { order: -1; }
  #chat-messages { height: 110px; }
}
@media (max-width: 640px) {
  .tile.top:not(.corner):not(.property) .tile-icon, .tile.bottom:not(.corner):not(.property) .tile-icon { position: static !important; transform: none !important; height: auto !important; width: auto !important; order: 2; font-size: 0.85rem; }
  .tile.top:not(.corner):not(.property) .tile-content, .tile.bottom:not(.corner):not(.property) .tile-content { display: flex; flex-direction: column; align-items: center; justify-content: center !important; padding: 1px 0 !important; gap: 2px; height: 100%; width: 100%; }
  .tile.top:not(.corner):not(.property), .tile.bottom:not(.corner):not(.property) { flex-direction: column; justify-content: center; }
  .tile.top:not(.corner):not(.property) .tile-name, .tile.bottom:not(.corner):not(.property) .tile-name { font-size: 0.36rem; }
}
/* phone: stations and utilities have a price, so name + price are enough (the icon would not fit) */
@media (max-width: 640px) {
  .tile.railroad .tile-icon, .tile.utility .tile-icon { display: none !important; }
  .tile.railroad .tile-content, .tile.utility .tile-content { justify-content: center !important; gap: 3px; }
  .tile:not(.property):not(.corner) .tile-name { overflow-wrap: normal; word-break: normal; hyphens: none; }
  .tile.top:not(.corner):not(.property) .tile-name, .tile.bottom:not(.corner):not(.property) .tile-name { font-size: 0.33rem; letter-spacing: -0.02em; }
  .tile.left.railroad .tile-name, .tile.right.railroad .tile-name, .tile.left.utility .tile-name, .tile.right.utility .tile-name { font-size: 0.46rem; max-width: 100%; }
}
@media (max-width: 640px) {
  .tile.left:not(.corner):not(.property) .tile-content, .tile.right:not(.corner):not(.property) .tile-content { padding: 0 !important; gap: 2px; }
  .tile.left:not(.corner):not(.property) .tile-name, .tile.right:not(.corner):not(.property) .tile-name { height: auto !important; display: block !important; }
  .tile.left:not(.corner):not(.property) .tile-price, .tile.right:not(.corner):not(.property) .tile-price { margin: 0; }
}
@media (max-width: 640px) {
  .tile.left:not(.corner):not(.property):not(.railroad):not(.utility) .tile-icon, .tile.right:not(.corner):not(.property):not(.railroad):not(.utility) .tile-icon { position: static !important; transform: none !important; margin: 1px auto 0; }
  .tile.left:not(.corner):not(.property):not(.railroad):not(.utility) .tile-content, .tile.right:not(.corner):not(.property):not(.railroad):not(.utility) .tile-content { height: auto !important; }
  .tile.left:not(.corner):not(.property):not(.railroad):not(.utility), .tile.right:not(.corner):not(.property):not(.railroad):not(.utility) { flex-direction: column; justify-content: center; }
}
/* phone: the buy / undo buttons fit inside the board centre; the game log shows its last lines there */
@media (max-width: 640px) {
  #buy-row { max-width: 100%; }
  #buy-row .buy-row-btns, #main-row { flex-wrap: wrap; justify-content: center; gap: 4px; max-width: 100%; }
  #buy-row .btn-roll, #main-row .undo-btn { width: auto !important; min-width: 0 !important; flex: 0 1 auto; padding: 5px 8px; font-size: 0.66rem; white-space: nowrap; }
  #buy-row .buy-caption { font-size: 0.66rem; }
  #game-log { display: block; max-height: 3.4em; overflow: hidden; font-size: 0.52rem; line-height: 1.15; text-align: center; max-width: 100%; mask-image: linear-gradient(#000 60%, transparent); -webkit-mask-image: linear-gradient(#000 60%, transparent); }
  #game-log .game-log-msg { padding: 0; }
}

/* ---- monopoly flash ---- */
.tile.mono-lit { z-index: 14; animation: monoPulse 1.5s ease-out; }
.mono-burst { position: absolute; inset: -3px; border-radius: 10px; pointer-events: none; z-index: 13; border: 3px solid var(--mc); box-shadow: 0 0 18px 6px var(--mc), inset 0 0 22px var(--mc); animation: monoBurst 1.6s ease-out both; }
@keyframes monoBurst { 0% { opacity: 0; transform: scale(0.7); } 18% { opacity: 1; transform: scale(1.05); } 100% { opacity: 0; transform: scale(2.1); } }
@keyframes monoPulse { 0%, 100% { filter: none; } 20% { filter: brightness(1.7) saturate(1.5); } }
.mono-chip { position: fixed; z-index: 9050; left: 50%; top: 18%; transform: translateX(-50%); padding: 10px 22px; text-align: center; background: #1b2723; border: 3px solid var(--mc); border-radius: 12px; box-shadow: 0 8px 0 rgba(0,0,0,0.4), 0 0 30px var(--mc); animation: eventIn 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2); transition: opacity 0.5s; pointer-events: none; }
.mono-chip small { display: block; text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.7rem; opacity: 0.7; }
.mono-chip b { font-family: var(--font-game); font-size: 1.5rem; letter-spacing: 0.04em; }
.mono-chip.out { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .mono-burst, .tile.mono-lit { animation: none; } }

/* ---- tile card: flat panel in the yard style ---- */
.tp-card { width: min(92vw, 360px); background: #1b2723; border: 3px solid #0e1412; border-radius: 14px; box-shadow: 0 10px 0 rgba(0,0,0,0.4); overflow: hidden; color: var(--chalk); }
.tp-head { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 52px 12px 16px; background: var(--c); border-bottom: 3px solid #0e1412; }
.tp-head b { font-family: var(--font-game); font-size: 1.25rem; letter-spacing: 0.03em; text-transform: uppercase; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,0.45); }
.tp-ic svg { width: 26px; height: 26px; color: #fff; filter: drop-shadow(0 2px 0 rgba(0,0,0,0.4)); }
.tp-x { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; border: 2px solid #0e1412; background: rgba(0,0,0,0.35); color: #fff; cursor: pointer; padding: 0; }
.tp-x:hover { background: #7a2a20; }
.tp-x svg { width: 16px; height: 16px; }
.tp-body { padding: 14px 16px 12px; }
.tp-body p { margin: 0 0 10px; font-size: 0.88rem; opacity: 0.85; line-height: 1.35; }
.tp-owner { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 6px 10px; background: #243630; border: 2px solid #0e1412; border-radius: 9px; font-size: 0.88rem; }
.tp-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(0,0,0,0.4); }
.tp-price { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.tp-price small { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.7rem; opacity: 0.6; }
.tp-price b { font-family: var(--font-game); font-size: 1.5rem; color: var(--marking); }
.tp-title { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.7rem; opacity: 0.6; margin: 6px 0 4px; }
.tp-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 2px; border-bottom: 1px solid #2c403a; font-size: 0.86rem; }
.tp-row b { font-family: var(--font-game); color: var(--marking); font-weight: 600; white-space: nowrap; }
.tp-houses { display: inline-flex; gap: 1px; margin-right: 8px; vertical-align: middle; }
.tp-houses svg { width: 13px; height: 13px; color: #9fc99a; }
.tp-note { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 0.85rem; opacity: 0.85; }
.tp-note svg { width: 16px; height: 16px; color: var(--marking); }
.tp-actions { display: flex; flex-direction: column; gap: 8px; padding: 0 16px 16px; }
.tp-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 10px 12px; font-family: var(--font-main); font-weight: 700; font-size: 0.92rem; color: var(--chalk); background: #2c403a; border: 2px solid #0e1412; border-radius: 10px; box-shadow: 0 4px 0 #0e1412; cursor: pointer; }
.tp-btn svg { width: 18px; height: 18px; }
.tp-btn:hover:not(:disabled) { background: #37524a; }
.tp-btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #0e1412; }
.tp-btn.main { background: var(--marking); color: #1c1500; border-color: #4b3900; box-shadow: 0 4px 0 #4b3900; }
.tp-btn.main:hover:not(:disabled) { background: #ffc61a; }
.tp-btn:disabled { opacity: 0.45; cursor: default; }
.mono-chip { top: 6%; z-index: 8990; }

/* owner outline: 1.5x thinner (3px -> 2px) */
.tile.owned { border: 1px solid var(--owner-color) !important; box-shadow: inset 0 0 0 1px var(--owner-color) !important; }

/* houses: left/right rows read horizontally, the roof points to the centre; the top row is upright like the bottom one */
.tile.left .tile-houses .ic { transform: rotate(90deg); }
.tile.right .tile-houses .ic { transform: rotate(-90deg); }
.tile.top .tile-houses .ic, .tile.bottom .tile-houses .ic { transform: none; }
.tile.left .tile-houses b, .tile.right .tile-houses b { writing-mode: horizontal-tb; transform: none; }

/* event card: who paid / got how much */
.ev-lines { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 0.92rem; }
.ev-lines li { font-family: var(--font-game); letter-spacing: 0.02em; }
.ev-lines li.bad { color: #ff7a66; } .ev-lines li.good { color: #7fdc6a; }
.event-card span + .ev-lines { margin-top: 8px; }

/* wheel: decline button in the corner */
.wheel-x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; border: 2px solid #0e1412; background: #2c403a; color: var(--chalk); cursor: pointer; padding: 0; z-index: 5; }
.wheel-x:hover { background: #7a2a20; }
.wheel-x svg { width: 16px; height: 16px; }
.casino-inner { position: relative; }

/* trade windows: same ball and font as the street list */
.trade-card .trade-tname, .trade-player { font-family: var(--font-game); font-weight: 500; letter-spacing: 0.02em; }
.trade-card .trade-tname { text-transform: uppercase; }
.trade-card .trade-price { font-family: var(--font-game); color: var(--marking); }
.trade-title { font-family: var(--font-game); letter-spacing: 0.03em; }
/* owner outline ~5px, one solid rounded frame */
.tile.owned { border: 2px solid var(--owner-color) !important; box-shadow: inset 0 0 0 3px var(--owner-color) !important; }
/* side houses: the digit turns the same way as the house, its top points at the centre of the board */
.tile.left .tile-houses b { display: inline-block; transform: rotate(90deg); }
.tile.right .tile-houses b { display: inline-block; transform: rotate(-90deg); }
@media (max-width: 640px) { .tile.left .tile-houses b, .tile.right .tile-houses b { transform: none; } }
/* owner outline 4px */
.tile.owned { border: 2px solid var(--owner-color) !important; box-shadow: inset 0 0 0 2px var(--owner-color) !important; }

/* ---- the yard: a chalk drawing on the asphalt in the middle of the board, and road marking along the edge ---- */
#board-center::before { content: ''; position: absolute; inset: 2%; z-index: -1; pointer-events: none; opacity: 0.11; background: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%20600%20600'%20fill%3D'none'%20stroke%3D'%23ece7d8'%20stroke-width%3D'5'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cg%20opacity%3D'.9'%3E%3C!--%20hopscotch%2C%20bottom%20left%20--%3E%3Cg%20transform%3D'translate(70%20330)%20rotate(-8)'%3E%3Crect%20x%3D'0'%20y%3D'200'%20width%3D'46'%20height%3D'46'%2F%3E%3Crect%20x%3D'0'%20y%3D'154'%20width%3D'46'%20height%3D'46'%2F%3E%3Crect%20x%3D'46'%20y%3D'108'%20width%3D'46'%20height%3D'46'%2F%3E%3Crect%20x%3D'0'%20y%3D'108'%20width%3D'46'%20height%3D'46'%2F%3E%3Crect%20x%3D'0'%20y%3D'62'%20width%3D'46'%20height%3D'46'%2F%3E%3Crect%20x%3D'-46'%20y%3D'16'%20width%3D'46'%20height%3D'46'%2F%3E%3Crect%20x%3D'0'%20y%3D'16'%20width%3D'46'%20height%3D'46'%2F%3E%3Cpath%20d%3D'M-8%20-38a52%2052%200%200%201%20108%200z'%2F%3E%3Ctext%20x%3D'15'%20y%3D'235'%20font-size%3D'28'%20fill%3D'%23ece7d8'%20stroke%3D'none'%3E1%3C%2Ftext%3E%3C%2Fg%3E%3C!--%20sun%2C%20top%20right%20--%3E%3Cg%20transform%3D'translate(500%2095)'%3E%3Ccircle%20r%3D'34'%2F%3E%3Cpath%20d%3D'M0-52v-22M0%2052v22M-52%200h-22M52%200h22M-37-37l-15-15M37%2037l15%2015M37-37l15-15M-37%2037l-15%2015'%2F%3E%3C%2Fg%3E%3C!--%20stars%20--%3E%3Cpath%20transform%3D'translate(105%20100)%20scale(1.3)'%20d%3D'M0-30l9%2020%2022%202-17%2014%205%2022-19-12-19%2012%205-22-17-14%2022-2z'%2F%3E%3Cpath%20transform%3D'translate(520%20480)%20scale(.9)'%20d%3D'M0-30l9%2020%2022%202-17%2014%205%2022-19-12-19%2012%205-22-17-14%2022-2z'%2F%3E%3C!--%20arrow%2C%20bottom%20right%20--%3E%3Cg%20transform%3D'translate(430%20400)%20rotate(-35)'%3E%3Cpath%20d%3D'M0%200h110M80-22l30%2022-30%2022'%2F%3E%3C%2Fg%3E%3C!--%20spiral%2C%20top%20middle%20--%3E%3Cpath%20transform%3D'translate(285%2070)'%20d%3D'M0%200c18-22%2050-12%2048%2014s-38%2034-56%2014-8-56%2022-62%2056%2018%2052%2052'%2F%3E%3C!--%20little%20house%2C%20right%20middle%20--%3E%3Cg%20transform%3D'translate(520%20250)'%3E%3Cpath%20d%3D'M-30%2030v-34l30-26%2030%2026v34zM-9%2030v-20h18v20'%2F%3E%3C%2Fg%3E%3C!--%20crossed%20tic-tac-toe%2C%20left%20middle%20--%3E%3Cg%20transform%3D'translate(40%20250)'%3E%3Cpath%20d%3D'M0%200h80M0%2030h80M25-20v80M55-20v80'%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E") center / contain no-repeat; }
#board-center::after { content: 'СУЕТАПОЛИЯ'; position: absolute; left: 64%; bottom: 2.5%; transform: translateX(-50%) rotate(-2deg); z-index: -1; pointer-events: none; white-space: nowrap; font-family: 'Stalinist One', var(--font-main); font-size: clamp(0.9rem, 2.2vw, 1.7rem); letter-spacing: 0.14em; color: var(--chalk); opacity: 0.07; }
#board { position: relative; }
#board::before { content: ''; position: absolute; z-index: 1; pointer-events: none; left: 13.4%; right: 13.4%; top: 13.4%; bottom: 13.4%; border: 3px dashed rgba(242, 183, 5, 0.32); border-radius: 18px; }
@media (max-width: 640px) { #board-center::after { display: none; } #board::before { left: 12%; right: 12%; top: 12%; bottom: 12%; border-width: 2px; } }

/* ---- photo under each cell: visible but quiet, the name and price stay readable ---- */
.tile { isolation: isolate; }
.tile[style*="--pic"]::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: linear-gradient(rgba(12, 18, 16, 0.42), rgba(12, 18, 16, 0.62)), var(--pic) center / cover no-repeat; filter: saturate(1.08); }
.tile.corner[style*="--pic"]::before { background: linear-gradient(rgba(12, 18, 16, 0.35), rgba(12, 18, 16, 0.55)), var(--pic) center / cover no-repeat; }
.tile:hover[style*="--pic"]::before { filter: saturate(1.2) brightness(1.15); }
@media (max-width: 640px) { .tile[style*="--pic"]::before { background: linear-gradient(rgba(12, 18, 16, 0.55), rgba(12, 18, 16, 0.72)), var(--pic) center / cover no-repeat; } }
.tile[style*="--pic"] .tile-name { text-shadow: 0 1px 2px #000, 0 0 5px rgba(0,0,0,0.9); }
.tile[style*="--pic"] .tile-price { text-shadow: none; }

/* ---- bots ---- */
.bots-inner { width: min(92vw, 420px); text-align: left; position: relative; }
.bots-label { margin: 14px 0 6px; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; opacity: 0.65; }
.bots-hint { margin-top: 8px; font-size: 0.86rem; opacity: 0.8; min-height: 2.6em; line-height: 1.3; }
.bots-inner .seg { display: flex; gap: 6px; }
.bots-inner .seg .lobby-opt { flex: 1; }
.bots-inner #bots-go { width: 100%; margin-top: 18px; }
.lobby-bots { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; font-size: 0.85rem; }
.lobby-bots span { opacity: 0.7; margin-right: 4px; }
.bot-tag svg { width: 14px; height: 14px; }
.player-name svg { width: 1em; height: 1em; vertical-align: -0.12em; opacity: 0.8; }
#bots-modal { z-index: 10010; }

/* lobby: the way out is always in the top corner, never below the fold */
.lobby-head { position: relative; }
.lobby-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; padding: 6px 12px; font: 700 0.85rem var(--font-main); color: var(--chalk); background: #1c2824; border: 2px solid #0e1412; border-radius: 9px; box-shadow: 0 3px 0 #0e1412; cursor: pointer; }
.lobby-back svg { width: 16px; height: 16px; }
.lobby-back:hover { background: #2c403a; }
.lobby-back:active { transform: translateY(2px); box-shadow: 0 1px 0 #0e1412; }

/* food spots (sand) and "homes" (teal) no longer look alike */
.tile.railroad { border-color: rgba(185, 166, 121, 0.55); }
.tile.utility { border-color: rgba(70, 194, 179, 0.6); }
.tile.railroad .tile-icon { color: #d6c28d; }
.tile.utility .tile-icon { color: #5fe0d2; }
.tile.utility:not(.property) .tile-price { border-color: #46c2b3; }
.tile.railroad:not(.property) .tile-price { border-color: #b9a679; }

/* lobby: the player list scrolls by itself, so the settings and the Start button never move away */
#lobby-players { max-height: 222px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; scrollbar-color: #4a5f57 transparent; }
#lobby-players::-webkit-scrollbar { width: 6px; } #lobby-players::-webkit-scrollbar-thumb { background: #4a5f57; border-radius: 3px; }

/* ---- the rent that is real right now ---- */
.tp-now { position: relative; margin: 0 0 12px; padding: 10px 14px 10px 18px; background: color-mix(in srgb, var(--c) 26%, #1b2723); border: 2px solid var(--c); border-radius: 12px; box-shadow: 0 4px 0 rgba(0,0,0,0.35), 0 0 18px color-mix(in srgb, var(--c) 45%, transparent); }
.tp-now::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 5px; border-radius: 3px; background: var(--c); }
.tp-now small { display: block; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.68rem; opacity: 0.75; }
.tp-now b { display: block; font-family: var(--font-game); font-size: 2.1rem; line-height: 1.05; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,0.4); }
.tp-now span { display: block; margin-top: 2px; font-size: 0.86rem; opacity: 0.92; }
.tp-now em { display: block; margin-top: 4px; font-style: normal; font-size: 0.78rem; opacity: 0.7; }
.tp-now em.roof { color: #f2b705; opacity: 1; }
.tp-now.free { background: #1f2d28; border-color: #3a4a44; box-shadow: none; }
.tp-now.free::before { background: #3a4a44; }
.tp-now.free b { color: #7e8f87; text-shadow: none; }
.tp-table .tp-row { position: relative; border-left: 4px solid transparent; padding-left: 8px; }
.tp-table.has-now .tp-row:not(.now) { opacity: 0.5; }
.tp-table .tp-row.now { opacity: 1; background: color-mix(in srgb, var(--c) 30%, transparent); border-left-color: var(--c); border-radius: 6px; font-weight: 700; }
.tp-table .tp-row.now b { color: #fff; font-size: 1.12rem; }
.tp-badge { font-style: normal; position: absolute; right: 68px; top: 50%; transform: translateY(-50%); padding: 1px 7px; border-radius: 6px; background: var(--c); color: #fff; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; text-shadow: 0 1px 0 rgba(0,0,0,0.5); }

/* ================= PHONE fixes: photo stays visible, the log scrolls ================= */
@media (max-width: 640px) {
  /* the colour is a thin strip on the inner edge of the street; the name and the price sit over the photo */
  .tile .tile-color-bar { background: transparent; box-shadow: none; }
  .tile .tile-color-bar::before { content: ''; position: absolute; background: var(--bar-color); z-index: -1; }
  .tile.top .tile-color-bar::before { left: 0; right: 0; bottom: 0; height: 7px; border-radius: 3px; }
  .tile.bottom .tile-color-bar::before { left: 0; right: 0; top: 0; height: 7px; border-radius: 3px; }
  .tile.left .tile-color-bar::before { top: 0; bottom: 0; right: 0; width: 7px; border-radius: 3px; }
  .tile.right .tile-color-bar::before { top: 0; bottom: 0; left: 0; width: 7px; border-radius: 3px; }
  .tile.top .tile-color-bar { padding-bottom: 8px; } .tile.bottom .tile-color-bar { padding-top: 8px; }
  .tile.left .tile-color-bar { padding-right: 8px; } .tile.right .tile-color-bar { padding-left: 8px; }
  .tile.property[style*="--pic"]::before { background: linear-gradient(rgba(12, 18, 16, 0.3), rgba(12, 18, 16, 0.5)), var(--pic) center / cover no-repeat; }
  .tile.property .bar-name { text-shadow: 0 1px 2px #000, 0 0 4px rgba(0,0,0,0.9); }

  /* the log has a fixed height of about six lines (so it never pushes the dice or the button), newest on top, older ones scroll */
  #game-log { flex: 0 0 auto; height: 7.9em; min-height: 0; max-height: none; width: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; mask-image: none; -webkit-mask-image: none; font-size: 0.6rem; line-height: 1.22; text-align: center; scrollbar-width: none; }
  #game-log::-webkit-scrollbar { display: none; }
  #game-log .game-log-msg { padding: 0; }
}

/* ================= PHONE: street names on the colour bar ================= */
@media (max-width: 640px) {
  /* top and bottom rows: the name lies flat (a tile is 31 px wide, 45 tall: flat text gets more room than vertical text) */
  .tile.top .bar-name, .tile.bottom .bar-name { writing-mode: horizontal-tb; font-size: 0.4rem; max-height: none; max-width: 100%; line-height: 1.05; letter-spacing: 0; }
  .tile.left .bar-name, .tile.right .bar-name { font-size: 0.43rem; line-height: 1.05; }
  .tile .bar-name { padding: 1.5px 1px 0; box-sizing: border-box; line-height: 1.12; } /* room above the capitals, or the breve of Й is cut off */
  /* a compound name of a station / utility on the top and bottom rows wraps (it used to be glued into one line) */
  .tile.top:not(.corner):not(.property) .tile-name br, .tile.bottom:not(.corner):not(.property) .tile-name br { display: inline; }
  /* the price: smaller and tighter, so the name gets the room */
  .bar-price { font-size: 0.42rem; line-height: 1; }
  .tile.left .tile-color-bar, .tile.right .tile-color-bar { padding-top: 0.5px; padding-bottom: 0.5px; }
  .bar-price b, .tile.left .bar-price b, .tile.right .bar-price b { padding: 0 2px; line-height: 1.12; border-width: 1px; border-radius: 3px; }
}
/* the narrowest phones (360 px): the price keeps its dark backing but loses the frame, so a two-line name on a side street still fits */
@media (max-width: 380px) {
  .tile.left .bar-price b, .tile.right .bar-price b { border-width: 0; }
}
@media (max-width: 640px) {
  .tile.left .bar-name, .tile.right .bar-name { max-height: none; } /* the old 2.1em cap (12 px) cut a two-line name short */
}
@media (max-width: 640px) {
  /* a station / utility on the side rows keeps its name on one line (fitBarNames shrinks it), so the price badge is never pushed out of the tile */
  .tile.left.railroad:not(.corner):not(.property) .tile-name, .tile.right.railroad:not(.corner):not(.property) .tile-name, .tile.left.utility:not(.corner):not(.property) .tile-name, .tile.right.utility:not(.corner):not(.property) .tile-name { white-space: nowrap; }
}

/* ================= PHONE: one fixed price row, one name font =================
   Every price badge sits in the same row of its side (top / bottom / left / right), whatever the name above it looks like.
   The names of streets, stations, utilities, taxes and cards share one bold font; fitBarNames() shrinks it where a name is long. */
@media (max-width: 640px) {
  #board .tile.top { --price-bottom: 9px; }
  #board .tile.bottom, #board .tile.left, #board .tile.right { --price-bottom: 3px; }
  #board .tile { --pb-h: 10px; --pb-room: calc(var(--price-bottom) + var(--pb-h) + 2px); }

  /* the badge: a fixed box, the digits centred in it (the little lift is the font's own lean, measured by tests/phone-names-ui.js) */
  #board .tile.property .bar-price b, #board .tile:not(.property):not(.corner) .tile-price {
    display: flex; align-items: center; justify-content: center; box-sizing: border-box; height: var(--pb-h); min-width: 0;
    padding: 0 2px !important; margin: 0 !important; line-height: 1 !important; font-size: 6.2px !important; font-weight: 700; letter-spacing: 0;
    border: 1px solid rgba(255,255,255,0.75) !important; border-radius: 3px !important; background: rgba(0,0,0,0.45) !important; color: #fff !important; white-space: nowrap;
    transform: none !important; text-indent: 0;
  }
  #board .tile.property .bar-price b > i, #board .tile:not(.property):not(.corner) .tile-price > i { font-style: normal; position: relative; top: var(--digit-lift, 0px); }
  #board .tile.utility:not(.property) .tile-price { border-color: #46c2b3 !important; }
  #board .tile.railroad:not(.property) .tile-price { border-color: #b9a679 !important; }

  /* streets: the colour bar fills the tile, the price is pinned to the fixed row, the name takes what is left above it */
  #board .tile.property .tile-color-bar { inset: 0 !important; left: 0 !important; right: 0 !important; top: 0 !important; bottom: 0 !important; width: auto !important; height: auto !important; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5px 1px var(--pb-room) !important; gap: 0; }
  #board .tile.property.bottom .tile-color-bar { padding-top: 9px !important; }
  #board .tile.property.left .tile-color-bar { padding-right: 9px !important; } #board .tile.property.right .tile-color-bar { padding-left: 9px !important; }
  #board .tile.property .bar-price { position: absolute !important; inset: auto 0 var(--price-bottom) 0 !important; display: flex !important; justify-content: center; pointer-events: none; }
  #board .tile.property.left .bar-price { right: 9px !important; } #board .tile.property.right .bar-price { left: 9px !important; }
  #board .tile.property.owned .bar-price, #board .tile.property.mortgaged .bar-price { display: none !important; }
  #board .tile.property .bar-name { flex: 0 1 auto; min-height: 0; display: block; margin: auto 0; text-align: center; width: 100%; max-width: 100% !important; max-height: none !important; padding: 0 !important; }

  /* stations, utilities: the same two-part layout */
  #board .tile.railroad .tile-content, #board .tile.utility .tile-content { position: absolute !important; inset: 0 !important; display: flex; flex-direction: column; align-items: center; justify-content: center !important; width: 100% !important; height: 100% !important; margin: 0 !important; transform: none !important; gap: 0 !important; padding: 1.5px 1px var(--pb-room) !important; }
  #board .tile.railroad .tile-price, #board .tile.utility .tile-price { position: absolute !important; left: 0; right: 0; bottom: var(--price-bottom); margin: 0 auto !important; width: max-content; }
  #board .tile.owned .tile-price, #board .tile.mortgaged .tile-price { display: none !important; }

  /* one name font everywhere on the board's tiles (not corners) */
  #board .tile:not(.corner):not(.property) .tile-name { font-family: var(--font-game); font-weight: 700 !important; font-size: 0.46rem !important; line-height: 1.12 !important; letter-spacing: 0 !important; text-transform: uppercase; display: block !important; margin: auto 0; text-align: center; flex: 0 1 auto; min-height: 0; width: 100%; white-space: normal; }
  #board .tile:not(.corner):not(.property) .tile-name br { display: inline !important; }
  #board .tile.left.railroad .tile-name, #board .tile.right.railroad .tile-name, #board .tile.left.utility .tile-name, #board .tile.right.utility .tile-name { white-space: nowrap; }
  /* tiles without a price (tax, cards, casino): the name sits at the bottom under the icon */
  #board .tile:not(.corner):not(.property):not(.railroad):not(.utility) .tile-content { position: absolute !important; inset: 0 !important; display: flex; flex-direction: column; justify-content: flex-end !important; align-items: center; padding: 0 1px 3px !important; transform: none !important; height: 100% !important; width: 100% !important; margin: 0 !important; }
  #board .tile:not(.corner):not(.property):not(.railroad):not(.utility) .tile-name { flex: 0 0 auto; }
}
@media (max-width: 640px) {
  /* stations / utilities: the badge is centred (the badge rule above zeroes margins, so the auto margins are restored here) */
  #board .tile.railroad .tile-price, #board .tile.utility .tile-price { margin-left: auto !important; margin-right: auto !important; }
  /* tiles with an icon (tax, cards, casino, wheel): icon at the top, name at the bottom, never on top of each other */
  #board .tile:not(.corner):not(.property):not(.railroad):not(.utility) .tile-icon { position: absolute !important; top: 4px !important; left: 0 !important; right: 0 !important; bottom: auto !important; width: auto !important; height: auto !important; margin: 0 auto !important; transform: none !important; font-size: 0.9rem !important; display: flex !important; justify-content: center; order: 0; }
  #board .tile.left:not(.corner):not(.property):not(.railroad):not(.utility) .tile-icon, #board .tile.right:not(.corner):not(.property):not(.railroad):not(.utility) .tile-icon { top: 2px !important; font-size: 0.78rem !important; }
}
@media (max-width: 640px) {
  /* the digits are centred by their own height (cap height), not by the font's line box, so it does not depend on the phone's font metrics */
  #board .tile.property .bar-price b > i, #board .tile:not(.property):not(.corner) .tile-price > i { display: block; line-height: 1; text-box: trim-both cap alphabetic; top: 0; }
}
@media (max-width: 640px) {
  /* a tile without a price: the icon is above, the name goes to the bottom (the common name rule centres it, here it must not) */
  #board .tile:not(.corner):not(.property):not(.railroad):not(.utility) .tile-name { margin: auto 0 0 !important; }
  #board .tile:not(.corner):not(.property):not(.railroad):not(.utility) .tile-content { padding-bottom: 3px !important; }
}
@media (max-width: 640px) {
}
@media (max-width: 380px) {
  #board .tile:not(.corner):not(.property):not(.railroad):not(.utility) .tile-icon { font-size: 0.7rem !important; }
  #board .tile.left:not(.corner):not(.property):not(.railroad):not(.utility) .tile-icon, #board .tile.right:not(.corner):not(.property):not(.railroad):not(.utility) .tile-icon { font-size: 0.62rem !important; top: 1px !important; }
}
@media (max-width: 380px) {
  /* corners on the narrowest phones: a smaller icon, so the label under it is not pushed out of the tile */
  #board .tile.corner .tile-icon { font-size: 0.8rem !important; }
  #board .tile.corner .tile-icon .ic { width: 1em; height: 1em; }
}

/* the digits live in an <i> only so they can be measured; it must never look italic (on any screen) */
.bar-price b > i, .tile-price > i { font-style: normal; }
@media (max-width: 640px) {
  /* stations and utilities: the badge is centred on the tile (left/right 0 + auto margins lost to the badge rule, so it is centred by position) */
  #board .tile.railroad:not(.property):not(.corner) .tile-price, #board .tile.utility:not(.property):not(.corner) .tile-price { left: 50% !important; right: auto !important; margin: 0 !important; transform: translateX(-50%) !important; }
}

/* ---- the card reference (ТЕМКА / ДВИЖ) and a tall tile card that must scroll on a small screen ---- */
.tp-card { max-height: 92vh; max-height: 92dvh; display: flex; flex-direction: column; }
.tp-card .tp-body { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.tp-cards { display: flex; flex-direction: column; gap: 5px; }
.tp-card-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; background: #243630; border: 2px solid #0e1412; border-left: 5px solid var(--tone, #6f8a80); border-radius: 8px; font-size: 0.86rem; line-height: 1.25; }
.tp-card-row.good { --tone: #5fbf5a; } .tp-card-row.bad { --tone: #e0604f; } .tp-card-row.move { --tone: #f2b705; }
.tp-card-ic { flex: none; display: grid; place-items: center; width: 24px; height: 24px; color: var(--tone); }
.tp-card-ic svg { width: 20px; height: 20px; }
/* the rent row that is real now: the outline and the tint are enough, no label */
.tp-table .tp-row.now { padding-right: 8px; }

/* ---- auction on a phone: the street card (rents, price, house) stays, under the buttons; the bar never leaves the window ---- */
.auction-bar { overflow: hidden; }
@media (max-width: 640px) {
  .auction-card { width: min(96vw, 420px); max-height: 94vh; max-height: 94dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px 12px 14px; }
  .auction-cols { display: flex; flex-direction: column; gap: 8px; }
  .auction-left { display: contents; }
  .auction-right { display: flex !important; order: 5; padding: 8px 10px; }
  .auction-left > * { order: 1; }
  .auction-left > #auction-hint { order: 4; margin-top: 4px; }
  .auction-left > #auction-feed { order: 6; }
  .auction-tile { font-size: 1.25rem; margin-bottom: 6px; }
  .ac-head { font-size: 1rem; padding-bottom: 4px; margin-bottom: 4px; }
  .ac-row { padding: 3px 0; font-size: 0.8rem; }
  .ac-foot { padding-top: 6px; }
  .auction-btn b { font-size: 1.05rem; }
}

/* ---- volume: a slider hangs next to the sound button (hover on a mouse, a tap on a phone) ---- */
.vol-wrap { position: relative; display: inline-block; }
.vol-panel { position: absolute; z-index: 60; display: none; align-items: center; gap: 6px; padding: 7px 8px; background: #1b2723; border: 2px solid #0e1412; border-radius: 9px; box-shadow: 0 4px 0 rgba(0,0,0,0.4); white-space: nowrap; }
.vol-wrap:hover .vol-panel, .vol-wrap:has(.vol-range:focus-visible) .vol-panel, .vol-wrap.open .vol-panel { display: flex; }
/* the menu button sits in the top right corner: the panel opens below it, flush right */
.menu-top .vol-panel { right: calc(100% + 4px); top: 50%; transform: translateY(-50%); }
.menu-top .vol-wrap::after { content: ''; position: absolute; top: -6px; bottom: -6px; right: 100%; width: 8px; } /* the mouse can cross the gap */
/* in the game it opens to the right of the button */
.side-tools .vol-panel { left: calc(100% + 4px); top: 50%; transform: translateY(-50%); }
.side-tools .vol-wrap::after { content: ''; position: absolute; top: -6px; bottom: -6px; left: 100%; width: 8px; }
.vol-range { -webkit-appearance: none; appearance: none; width: 75px; height: 6px; border-radius: 4px; outline: none; cursor: pointer; --fill: 50%;
  background: linear-gradient(to right, var(--marking) 0, var(--marking) var(--fill), #0e1412 var(--fill), #0e1412 100%); }
.vol-range::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--chalk); border: 2px solid #4b3900; box-shadow: 0 1px 0 rgba(0,0,0,0.5); }
.vol-range::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: var(--chalk); border: 2px solid #4b3900; }
@media (max-width: 640px) { .vol-range { width: 63px; } }

/* ---- the full rules ---- */
.notice-more { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 12px; padding: 8px 10px; font-family: var(--font-main); font-weight: 700; font-size: 0.9rem; color: var(--chalk); background: #1c2824; border: 2px solid #0e1412; border-radius: 10px; box-shadow: 0 3px 0 #0e1412; cursor: pointer; }
.notice-more:hover { background: #2a3c35; }
.notice-more:active { transform: translateY(2px); box-shadow: 0 1px 0 #0e1412; }
.notice-more .ic { width: 1.2em; height: 1.2em; color: var(--marking); }
.rules-inner { width: min(94vw, 680px); max-height: 92vh; max-height: 92dvh; overflow: hidden; display: flex; flex-direction: column; text-align: left; position: relative; }
.rules-body { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding-right: 6px; }
.rules-sec { margin: 0 0 16px; }
.rules-sec h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; padding-bottom: 5px; border-bottom: 3px solid #0e1412; font-family: var(--font-game); font-size: 1.05rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--marking); }
.rules-sec h3 .ic { width: 1.25em; height: 1.25em; flex: none; }
.rules-sec p { margin: 0 0 6px; font-size: 0.9rem; line-height: 1.45; color: var(--chalk); }
.rules-sec ul { margin: 0; padding-left: 1.1em; }
.rules-sec li { margin: 0 0 5px; font-size: 0.9rem; line-height: 1.4; color: var(--chalk); }
.rules-sec li b, .rules-sec p b { color: #fff; }

#rules-modal { z-index: 10050; } /* the menu screen sits at 9998 */

/* the flying token takes its size from the token on the board (--k = size / 26 px, set in animateMove) */
.fly-token { border-width: calc(2.5px * var(--k, 1)); box-shadow: 0 calc(10px * var(--k, 1)) 0 rgba(0,0,0,0.25); }
.fly-token::before, .fly-token::after { width: calc(7px * var(--k, 1)); height: calc(9px * var(--k, 1)); top: calc(4px * var(--k, 1)); box-shadow: inset calc(2.5px * var(--k, 1)) calc(-1px * var(--k, 1)) 0 calc(1.5px * var(--k, 1)) #222; }
.fly-token::before { left: calc(3px * var(--k, 1)); } .fly-token::after { right: calc(3px * var(--k, 1)); }

/* ---- tile card: the photo of the place behind the text ---- */
.tp-card.has-pic .tp-body { background: linear-gradient(rgba(14, 20, 18, 0.80), rgba(14, 20, 18, 0.90)), var(--pic) center / cover no-repeat; }
.tp-card.has-pic .tp-actions { background: rgba(14, 20, 18, 0.90); padding-top: 12px; }
.tp-card.has-pic .tp-head { background-image: linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)), var(--pic); background-size: cover; background-position: center; background-blend-mode: normal; }
.tp-card.has-pic .tp-head::before { content: ''; position: absolute; inset: 0; background: color-mix(in srgb, var(--c) 72%, transparent); pointer-events: none; }
.tp-card.has-pic .tp-head > :not(.tp-x) { position: relative; }
.tp-card.has-pic .tp-row, .tp-card.has-pic .tp-price, .tp-card.has-pic .tp-note { text-shadow: 0 1px 2px rgba(0,0,0,0.7); }
.tp-card.has-pic .tp-table .tp-row:not(.now) { background: rgba(14, 20, 18, 0.35); }
/* lobby: picking a colour or a seat changes things on the spot, no fades */
.tok-color-big, .token-option, #lobby-screen .player-info, #lobby-screen .lobby-opt { transition: none; animation: none; }

/* main menu: a strip of real street photos from the board above the rules card */
.menu-side { display: flex; flex-direction: column; gap: 22px; }
.menu-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 6px; }
.menu-photos figure { margin: 0; background: #e9e2d0; padding: 5px 5px 0; border: 2px solid #0e1412; box-shadow: 4px 4px 0 rgba(0,0,0,0.35); transform: rotate(-2deg); }
.menu-photos figure:nth-child(even) { transform: rotate(2deg) translateY(4px); }
.menu-photos img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.menu-photos figcaption { padding: 4px 0 5px; text-align: center; font-family: var(--font-game); font-weight: 600; font-size: 0.72rem; line-height: 1.1; color: #1c1500; border-bottom: 4px solid var(--c); margin: 0 -5px; }
@media (max-width: 860px) { .menu-photos { padding: 0; } .menu-photos figure:nth-child(n+5) { display: none; } .menu-photos { grid-template-columns: repeat(4, 1fr); gap: 8px; } .menu-photos figcaption { font-size: 0.6rem; } }
.menu-photos figure:nth-child(4) { display: none; }
@media (max-width: 860px) { .menu-photos figure:nth-child(4) { display: block; } }

.menu-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; padding: 10px 18px 16px; position: relative; z-index: 2; }
.menu-foot a { color: var(--concrete); font-size: 0.82rem; text-decoration: none; border-bottom: 1px dotted currentColor; }
.menu-foot a:hover { color: var(--chalk); }

/* left column ad box: sits at the bottom half of the left column (right above the sound button), shrinks if the role card grows */
.left-ad-panel { margin-top: auto; flex: 0 1 42vh; height: clamp(220px, 42vh, 420px); min-height: 140px; padding: 6px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
#left-col .side-tools { margin-top: 0; }
@media (max-width: 1100px) { .left-ad-panel { margin-top: 0; height: 100px; flex: none; min-height: 90px; } }
@media (max-width: 640px) { #left-ad-panel { order: 5; height: 90px; min-height: 70px; } }
