:root {
  --bg: #12110e;
  --surface: #1a1915;
  --surface2: #23211c;
  --line: #312e27;
  --text: #ece6d8;
  --muted: #8d8677;
  --accent: #c23b2e;
  --accent-hi: #d4493b;
  --brass: #b7975a;
  --paper: #f1ebdd;
  --paper2: #e7dfcc;
  --paper3: #ddd3bd;
  --ink: #1b1a17;
  --ink-soft: #5b5649;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Onest', system-ui, sans-serif;
  --mono: 'Onest', system-ui, sans-serif;
  --wide: 1.2; /* поле чуть шире, чем высота */
  --bs: min(calc(100vh - 32px), calc((100vw - 420px) / var(--wide)));
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
button, input { font: inherit; color: inherit; }

.kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brass);
}
.wordmark {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1;
  margin: 0;
}

/* ---------- кнопки и поля */
.btn {
  border: 1px solid var(--line);
  background: transparent;
  padding: 11px 18px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: background .15s, border-color .15s, opacity .15s;
}
.btn:hover { border-color: #4a463c; background: var(--surface2); }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn.ghost { border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: transparent; }
.btn.danger:hover { color: #e0786e; }
.btn.sm { padding: 6px 10px; font-size: 11px; }
.btn.wide { width: 100%; }

input {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 0;
  outline: none;
  width: 100%;
  font-size: 16px;
}
input:focus { border-bottom-color: var(--brass); }
input::placeholder { color: #5f594d; }

/* ---------- главный экран и лобби */
.screen { min-height: 100%; }
#home, #lobby { display: flex; align-items: center; justify-content: center; padding: 48px 16px; }
.intro { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; }
.intro .wordmark { font-size: 92px; color: var(--paper); }
.lead { color: var(--muted); line-height: 1.6; margin: 0 0 12px; font-size: 15px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.field span { display: block; color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.row { display: flex; gap: 12px; align-items: flex-end; }
.code-input { text-transform: uppercase; letter-spacing: .4em; font-family: var(--mono); }
.rules { color: var(--muted); font-size: 13px; line-height: 1.6; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 8px; }
.rules summary { cursor: pointer; color: var(--text); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; list-style: none; }
.rules summary::after { content: ' +'; color: var(--brass); }
.rules[open] summary::after { content: ' −'; }
.rules ol { padding-left: 20px; margin: 14px 0 0; display: grid; gap: 8px; }
.rules li::marker { font-family: var(--mono); color: var(--brass); font-size: 11px; }

.room-code { font-family: var(--mono); font-size: 64px; font-weight: 700; letter-spacing: .25em; color: var(--paper); margin: -6px 0 6px; }
.lobby-players { list-style: none; padding: 0; margin: 8px 0 0; border-top: 1px solid var(--line); }
.lobby-players li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.lobby-players .nm { flex: 1; font-weight: 600; }
.lobby-players .meta { color: var(--muted); font-size: 12px; }
.hint { color: var(--muted); font-size: 13px; }

.av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: 19px;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}

/* ---------- игровое поле */
#game { display: flex; gap: 24px; padding: 16px; align-items: flex-start; justify-content: center; }
#boardWrap { flex: none; padding: calc(var(--bs) / 90); background: var(--paper); border-radius: 4px; box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 30px 80px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .4); }
#board {
  --b: calc(var(--bs) - var(--bs) / 45);
  position: relative;
  width: calc(var(--b) * var(--wide));
  height: var(--b);
  display: grid;
  grid-template-columns: 1.55fr repeat(9, 1fr) 1.55fr;
  grid-template-rows: 1.55fr repeat(9, 1fr) 1.55fr;
  gap: 1px;
  background: var(--ink);
  border: 1.5px solid var(--ink);
  font-size: calc(var(--bs) / 88);
  color: var(--ink);
}

.cell {
  position: relative;
  background: var(--paper);
  display: flex;
  align-items: stretch;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
}
.cell:hover { background: #f7f2e7; }
.cell.bottom { flex-direction: column; }
.cell.top { flex-direction: column-reverse; }
.cell.left { flex-direction: row-reverse; }
.cell.right { flex-direction: row; }
.cell .stripe { flex: none; background: var(--g); }
.cell.bottom .stripe, .cell.top .stripe { height: 19%; }
.cell.left .stripe, .cell.right .stripe { width: 19%; }
.cell.bottom .stripe { border-bottom: 1px solid var(--ink); }
.cell.top .stripe { border-top: 1px solid var(--ink); }
.cell.left .stripe { border-left: 1px solid var(--ink); }
.cell.right .stripe { border-right: 1px solid var(--ink); }
.cell .body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35em; padding: .3em; min-width: 0; min-height: 0; }
.cell .nm { font-weight: 600; font-size: .86em; line-height: 1.12; text-transform: uppercase; letter-spacing: .02em; word-break: break-word; hyphens: auto; }
.cell .kick { font-size: .62em; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; }
.cell .glyph { width: 2.1em; height: 2.1em; stroke: currentColor; fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.cell .pr { flex: none; font-family: var(--mono); font-weight: 500; font-size: .86em; padding: .35em 0; }
.cell.bottom .pr { border-top: 1px solid rgba(27, 26, 23, .15); }
.cell.top .pr { border-bottom: 1px solid rgba(27, 26, 23, .15); }
.cell.left .pr, .cell.right .pr { display: flex; align-items: center; justify-content: center; padding: 0 .3em; writing-mode: vertical-rl; transform: rotate(180deg); }
.cell.left .pr { border-left: 1px solid rgba(27, 26, 23, .15); }
.cell.right .pr { border-right: 1px solid rgba(27, 26, 23, .15); }
.cell.owned .pr { background: var(--owner); color: #fff; font-weight: 700; border-color: transparent; }
.cell.mortgaged .body { opacity: .3; }
.cell.mortgaged .pr { background: var(--paper3); color: var(--ink-soft); font-weight: 500; }
.cell.frozen::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(135deg, rgba(60, 100, 150, .16) 0 3px, transparent 3px 7px); }
.cell .houses { position: absolute; display: flex; gap: 2px; }
.cell.bottom .houses { top: 3%; left: 50%; transform: translateX(-50%); }
.cell.top .houses { bottom: 3%; left: 50%; transform: translateX(-50%); }
.cell.left .houses { right: 3%; top: 50%; transform: translateY(-50%); flex-direction: column; }
.cell.right .houses { left: 3%; top: 50%; transform: translateY(-50%); flex-direction: column; }
.cell .houses i { width: .6em; height: .6em; background: var(--paper); box-shadow: 0 0 0 1px var(--ink); display: block; }
.cell .houses i.hold { width: 1.4em; background: var(--ink); }
.cell.bottom .houses i.hold, .cell.top .houses i.hold { width: 1.4em; }
.cell.left .houses i.hold, .cell.right .houses i.hold { width: .6em; height: 1.4em; }

.cell.corner { flex-direction: column; justify-content: center; align-items: center; gap: .4em; background: var(--paper2); }
.cell.corner .glyph { width: 3em; height: 3em; }
.cell.corner .nm { font-family: var(--serif); font-style: italic; text-transform: none; font-size: 1.6em; letter-spacing: 0; font-weight: 700; line-height: 1; }
.cell.corner .kick { max-width: 90%; }
.cell.gojail .glyph, .cell.start .glyph { color: var(--accent); }
.cell.chance .q { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 3.4em; line-height: .8; color: var(--accent); }
.cell.team .glyph { width: 1.8em; height: 1.8em; }
.cell.tax .amt { font-family: var(--mono); font-size: .86em; }
.cell.landing { box-shadow: inset 0 0 0 2px var(--accent); }

/* ---------- центр */
#center {
  grid-row: 2 / 11;
  grid-column: 2 / 11;
  position: relative;
  background: radial-gradient(ellipse at 50% 45%, #f6f1e6 0%, var(--paper) 55%, var(--paper2) 100%);
  overflow: hidden;
}
.rink { position: absolute; inset: 7%; border: 1px solid rgba(27, 26, 23, .12); border-radius: 18% / 26%; pointer-events: none; }
.rink .cl { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(194, 59, 46, .22); }
.rink .fo { position: absolute; left: 50%; top: 50%; width: 34%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 1px solid rgba(27, 26, 23, .1); border-radius: 50%; }
.center-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--bs) / 48);
  padding: 10%;
  font-size: calc(var(--bs) / 62);
}
.emblem { text-align: center; }
.emblem .kicker { color: var(--ink-soft); font-size: .72em; margin-bottom: .5em; }
.emblem .wordmark { font-size: calc(var(--bs) / 9); color: var(--ink); }
.pot { font-family: var(--mono); font-size: .85em; color: var(--ink-soft); min-height: 1.2em; }
.turn-info { font-size: .95em; min-height: 1.4em; display: flex; align-items: center; gap: .6em; }
.turn-info .dot { width: .7em; height: .7em; border-radius: 50%; }
.turn-info b { font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 92%; }
.actions .btn { font-size: .78em; padding: 1em 1.6em; background: var(--ink); border-color: var(--ink); color: var(--paper); }
.actions .btn:hover { background: #33312b; }
.actions .btn.primary { background: var(--accent); border-color: var(--accent); }
.actions .btn.primary:hover { background: var(--accent-hi); }
.actions .btn.outline { background: transparent; color: var(--ink); border-color: rgba(27, 26, 23, .35); }
.actions .btn.outline:hover { background: rgba(27, 26, 23, .06); }
.actions .btn:disabled { opacity: .3; }
.actions .note { width: 100%; text-align: center; color: var(--accent); font-weight: 600; font-size: .9em; }

.dice { display: flex; gap: calc(var(--bs) / 60); }
.die {
  width: calc(var(--bs) / 15);
  height: calc(var(--bs) / 15);
  background: #fbf8f1;
  border-radius: 14%;
  box-shadow: 0 0 0 1px rgba(27, 26, 23, .18), 0 6px 14px rgba(27, 26, 23, .14);
  display: grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  padding: 15%;
}
.die span { border-radius: 50%; margin: 16%; }
.die span.on { background: var(--ink); }
.die.roll { animation: roll .55s cubic-bezier(.2, .8, .2, 1); }
@keyframes roll {
  0% { transform: rotate(-160deg) translateY(-30%); opacity: .3; }
  100% { transform: rotate(0) translateY(0); opacity: 1; }
}

.auction { border: 1px solid rgba(27, 26, 23, .25); background: rgba(255, 255, 255, .5); padding: 1.1em 1.4em; text-align: center; display: grid; gap: .6em; min-width: 62%; }
.auction .kicker { color: var(--ink-soft); font-size: .7em; }
.auction .lot { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 1.85em; line-height: 1.1; }
.auction .bid { font-family: var(--mono); font-size: 1.6em; font-weight: 700; color: var(--accent); }
.auction .who { color: var(--ink-soft); font-size: .9em; }
.auction .timer { height: 2px; background: rgba(27, 26, 23, .12); }
.auction .timer i { display: block; height: 100%; background: var(--accent); transition: width .25s linear; }
.auction .bids { display: flex; gap: 6px; justify-content: center; }

.card-banner {
  position: absolute;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%);
  width: 70%;
  background: var(--ink);
  color: var(--paper);
  padding: 1.1em 1.4em;
  font-size: calc(var(--bs) / 62);
  line-height: 1.5;
  box-shadow: 0 18px 40px rgba(27, 26, 23, .35);
  animation: rise .35s ease-out;
  display: flex;
  gap: 1em;
  align-items: flex-start;
}
.card-banner .q { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 3em; line-height: .8; color: var(--accent); }
.card-banner .kicker { font-size: .72em; margin-bottom: .3em; }
@keyframes rise { from { transform: translate(-50%, 14px); opacity: 0; } }

#tokens { position: absolute; inset: 0; pointer-events: none; }
.token {
  position: absolute;
  width: calc(var(--bs) / 32);
  height: calc(var(--bs) / 32);
  margin: calc(var(--bs) / -64) 0 0 calc(var(--bs) / -64);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: calc(var(--bs) / 46);
  color: #fff;
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px rgba(27, 26, 23, .5), 0 4px 10px rgba(27, 26, 23, .35);
  transition: left .13s linear, top .13s linear;
  z-index: 5;
}
.token.cur { z-index: 6; box-shadow: 0 0 0 1px rgba(27, 26, 23, .5), 0 0 0 5px rgba(194, 59, 46, .25), 0 4px 10px rgba(27, 26, 23, .35); }

/* ---------- боковая колонка */
#side { width: 360px; height: calc(100vh - 32px); display: flex; flex-direction: column; gap: 22px; }
.sec-title { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--brass); padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.room-tag { font-family: var(--mono); color: var(--muted); letter-spacing: .2em; }
.sec.grow { flex: 1; display: flex; flex-direction: column; min-height: 180px; }

.pl { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); position: relative; }
.pl.cur::before { content: ''; position: absolute; left: -12px; top: 50%; width: 3px; height: 60%; transform: translateY(-50%); background: var(--accent); }
.pl.out { opacity: .35; }
.pl .info { flex: 1; min-width: 0; }
.pl .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl .nm small { color: var(--muted); font-weight: 400; }
.pl .tags { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pl .tags .flag { color: var(--brass); }
.pl .money { font-family: var(--mono); font-weight: 500; font-size: 14px; }
.pl .money.neg { color: #e0786e; }
.pl .acts { display: flex; gap: 2px; }

.trade { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; display: grid; gap: 8px; }
.trade .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.trade .cols div { color: var(--text); line-height: 1.45; }
.trade .cols b { color: var(--muted); display: block; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; margin-bottom: 2px; }
.trade .btns { display: flex; gap: 6px; }

#log { flex: 1; overflow-y: auto; font-size: 12.5px; display: flex; flex-direction: column; gap: 6px; padding: 10px 4px 0 0; min-height: 0; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
#log .l { color: var(--muted); line-height: 1.45; }
#log .l.chat { color: var(--text); padding-left: 10px; border-left: 2px solid var(--brass); }
#chatForm { display: flex; gap: 10px; align-items: flex-end; margin-top: 10px; }
#chatForm input { font-size: 14px; padding: 8px 0; }

/* ---------- модальные окна: карточка как бумажный документ */
.modal { position: fixed; inset: 0; background: rgba(10, 9, 7, .72); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal-box { background: var(--paper); color: var(--ink); width: 100%; max-width: 360px; max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 40px 90px rgba(0, 0, 0, .6); border-radius: 3px; }
.modal-box.wide { max-width: 620px; }
.deed { margin: 14px; border: 1px solid var(--ink); }
.deed-head { background: var(--g); color: #fff; text-align: center; padding: 16px 14px 14px; border-bottom: 1px solid var(--ink); }
.deed-head.plain { background: var(--paper2); color: var(--ink); }
.deed-head .kicker { color: inherit; opacity: .8; font-size: 10px; }
.deed-head .t { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 32px; line-height: 1.05; margin-top: 4px; }
.mbody { padding: 14px 16px 16px; display: grid; gap: 12px; }
.rent-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rent-table td { padding: 5px 0; border-bottom: 1px dotted rgba(27, 26, 23, .3); }
.rent-table td:last-child { text-align: right; font-family: var(--mono); }
.rent-table tr.now td { font-weight: 700; color: var(--accent); }
.rent-table tr.sep td { border-bottom: 0; padding-top: 10px; }
.status { font-size: 13px; color: var(--ink-soft); text-align: center; }
.status b { color: var(--ink); }
.mbtns { display: flex; flex-wrap: wrap; gap: 6px; }
.modal-box .btn { border-color: rgba(27, 26, 23, .3); color: var(--ink); flex: 1; }
.modal-box .btn:hover { background: rgba(27, 26, 23, .06); }
.modal-box .btn.dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.modal-box .btn.dark:hover { background: #33312b; }
.modal-box .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.modal-box .btn.ghost { border-color: transparent; color: var(--ink-soft); }
.modal-box .close { width: 100%; }

.trade-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.trade-col h4 { margin: 0 0 8px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; display: flex; justify-content: space-between; }
.trade-col h4 span { font-family: var(--mono); letter-spacing: 0; }
.trade-col label { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dotted rgba(27, 26, 23, .2); cursor: pointer; font-size: 13px; }
.trade-col label.dis { opacity: .35; cursor: not-allowed; }
.trade-col input[type=checkbox] { width: auto; accent-color: var(--accent); }
.trade-col .sw { width: 10px; height: 10px; flex: none; box-shadow: 0 0 0 1px rgba(27, 26, 23, .3); }
.trade-col input[type=number] { margin-top: 10px; border-bottom-color: rgba(27, 26, 23, .3); font-family: var(--mono); font-size: 14px; }
.trade-col .list { max-height: 260px; overflow-y: auto; }
.empty { color: var(--muted); font-size: 13px; padding: 8px 0; }
.modal-box .empty { color: var(--ink-soft); }

.winner { text-align: center; padding: 36px 26px 26px; display: grid; gap: 14px; }
.winner .wordmark { font-size: 48px; }
.winner .kicker { color: var(--ink-soft); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--paper); color: var(--ink); padding: 12px 18px; border-left: 3px solid var(--accent); z-index: 60; font-weight: 500; font-size: 13px; max-width: calc(100vw - 32px); box-shadow: 0 16px 40px rgba(0, 0, 0, .45); }

/* ---------- узкие экраны */
@media (max-width: 900px) {
  :root { --wide: 1; --bs: calc(100vw - 16px); }
  #game { flex-direction: column; padding: 8px; align-items: center; gap: 20px; }
  #side { width: 100%; height: auto; padding: 0 8px 16px; }
  .sec.grow { height: 320px; flex: none; }
  .cell .nm { font-size: .72em; letter-spacing: 0; }
  .cell .kick { display: none; }
  .intro .wordmark { font-size: 72px; }
  .trade-grid { grid-template-columns: 1fr; }
  .card-banner { width: 86%; }
}

/* ---------- логотипы компаний */
.cell .logo {
  width: 2.5em;
  height: 2.5em;
  object-fit: contain;
  border-radius: 22%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(27, 26, 23, .12), 0 1px 2px rgba(27, 26, 23, .12);
  flex: none;
}
.cell .body { gap: .3em; }
.cell.mortgaged .logo { filter: grayscale(1); }
.logo-sm, .logo-xs, .logo-lg { object-fit: contain; background: #fff; border-radius: 22%; vertical-align: middle; }
.logo-sm { width: 1.1em; height: 1.1em; margin-right: .35em; box-shadow: 0 0 0 1px rgba(27, 26, 23, .15); }
.logo-xs { width: 18px; height: 18px; flex: none; box-shadow: 0 0 0 1px rgba(27, 26, 23, .15); }
.logo-lg { display: block; width: 56px; height: 56px; margin: 0 auto 10px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 6px 16px rgba(0, 0, 0, .25); }
@media (max-width: 900px) {
  .cell .logo { width: 2.3em; height: 2.3em; }
  .cell .nm { display: none; }
  .cell.corner .nm, .cell.tax .nm { display: block; }
}

/* ---------- занятые клетки: вся клетка в цвете владельца */
.cell.owned { background: color-mix(in srgb, var(--owner) 26%, var(--paper)); }
.cell.owned:hover { background: color-mix(in srgb, var(--owner) 36%, var(--paper)); }
.cell.owned::before { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 2px var(--owner); pointer-events: none; z-index: 1; }
.cell.owned .nm { color: color-mix(in srgb, var(--owner) 45%, var(--ink)); }
.cell.owned .kick { color: color-mix(in srgb, var(--owner) 55%, var(--ink-soft)); }
.cell.owned .pr { font-weight: 700; }
.cell.owned.mortgaged { background: color-mix(in srgb, var(--owner) 10%, var(--paper2)); }
.cell.owned.mortgaged::before { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--owner) 45%, transparent); }
.cell.landing::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; box-shadow: inset 0 0 0 3px var(--accent); }

/* ---------- кнопка звука */
.title-right { display: flex; align-items: center; gap: 10px; }
.sound-btn { background: none; border: 0; padding: 2px; cursor: pointer; color: var(--muted); display: flex; }
.sound-btn:hover { color: var(--text); }
.sound-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sound-btn .x { display: none; }
.sound-btn.off .on { display: none; }
.sound-btn.off .x { display: inline; }
.sound-btn.off { color: #6a6457; }

/* ---------- таймер хода */
.turn-info .tl { color: var(--ink-soft); font-size: .82em; margin-left: .4em; }
.turn-info .tl:empty { display: none; }
.turn-info .tl::before { content: '· '; }
.turn-info .tl.hot { color: var(--accent); font-weight: 600; }

/* ---------- сделки: компактное окно и всплывашка входящего предложения */
.modal-box.trade { max-width: 440px; }
.trade-box { padding: 16px; display: grid; gap: 14px; }
.tp-head { display: flex; align-items: center; gap: 10px; }
.tp-head .kicker { color: var(--ink-soft); font-size: 10px; }
.tp-name { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 22px; line-height: 1.1; }
.tb-x { margin-left: auto; background: none; border: 0; font-size: 22px; line-height: 1; color: var(--ink-soft); cursor: pointer; padding: 0 4px; }
.tb-x:hover { color: var(--ink); }
.trade-box .trade-grid { gap: 14px; }
.trade-box .trade-col .list { max-height: 190px; }
.trade-box .trade-col label { padding: 5px 0; font-size: 12.5px; }
.trade-box .trade-col input[type=number] { font-size: 13px; padding: 6px 0; }
.trade-col label span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ti { display: flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 3px 0; }
.ti span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ti.money { font-weight: 600; }
.ti.none { color: var(--muted); }

.trade-pop {
  position: fixed;
  right: 400px;
  bottom: 24px;
  width: 340px;
  background: var(--paper);
  color: var(--ink);
  padding: 14px 16px;
  border-radius: 3px;
  border-top: 3px solid var(--accent);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  display: grid;
  gap: 12px;
  z-index: 40;
  animation: popIn .25s ease-out;
}
@keyframes popIn { from { transform: translateY(16px); opacity: 0; } }
.trade-pop .tp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.trade-pop .tp-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; margin-bottom: 4px; }
.trade-pop .ti.none { color: var(--ink-soft); }
.trade-pop .tp-btns { display: flex; gap: 8px; }
.trade-pop .btn { flex: 1; border-color: rgba(27, 26, 23, .3); color: var(--ink); }
.trade-pop .btn.primary { color: #fff; }
@media (max-width: 900px) {
  .trade-pop { right: 8px; left: 8px; width: auto; bottom: 8px; }
}

/* ---------- фишки-силуэты */
.av svg { width: 62%; height: 62%; fill: #fff; }
.token { overflow: visible; }
.token .tk { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.token .tk svg { width: 66%; height: 66%; fill: #fff; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35)); }
.token .tk.hop { animation: hop .14s ease-out; }
@keyframes hop {
  0% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-55%) scale(1.15); }
  100% { transform: translateY(0) scale(1); }
}
.token.cur .tk svg { animation: idle 1.8s ease-in-out infinite; }
@keyframes idle {
  0%, 100% { transform: translateY(0) rotate(0); }
  25% { transform: translateY(-8%) rotate(-6deg); }
  75% { transform: translateY(-4%) rotate(6deg); }
}

/* выбор фишки в лобби */
.token-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: -8px; }
.tk-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; background: transparent; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; color: var(--muted); font-size: 11px; transition: border-color .15s, color .15s; }
.tk-opt svg { width: 28px; height: 28px; fill: currentColor; transition: transform .2s; }
.tk-opt:hover:not(:disabled) { color: var(--text); border-color: #4a463c; }
.tk-opt:hover:not(:disabled) svg { transform: translateY(-3px) rotate(-6deg); }
.tk-opt.sel { color: #fff; border-color: var(--c); background: color-mix(in srgb, var(--c) 30%, transparent); }
.tk-opt:disabled { opacity: .25; cursor: not-allowed; }

/* ---------- лента событий под кубиками */
.feed { display: grid; gap: .25em; text-align: center; font-size: .82em; color: var(--ink-soft); min-height: 1.2em; max-width: 80%; }
.feed .fd { opacity: .55; line-height: 1.35; }
.feed .fd.last { opacity: 1; color: var(--ink); font-weight: 600; }
.feed .fd.fresh { animation: feedIn .5s ease-out; }
@keyframes feedIn { from { transform: translateY(6px); opacity: 0; } }

/* ---------- сделка в центре поля */
.center-inner.busy .emblem .wordmark { font-size: calc(var(--bs) / 16); }
.center-inner.busy .emblem .kicker { display: none; }
.trade-c .tc-cols { display: grid; grid-template-columns: 1fr auto 1fr; gap: .8em; text-align: left; align-items: start; }
.trade-c .tc-label { font-size: .7em; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; margin-bottom: .3em; }
.trade-c .tc-arrow { font-size: 1.4em; color: var(--accent); align-self: center; }
.trade-c .ti { font-size: .9em; }
.trade-c .ti.none { color: var(--ink-soft); }
.trade-c .who { color: var(--ink-soft); }

/* карточка «Шанс» сверху, чтобы не закрывать кнопки покупки */
.card-banner { bottom: auto; top: 6%; animation-name: drop; }
@keyframes drop { from { transform: translate(-50%, -14px); opacity: 0; } }

/* цена на клетках жирнее */
.cell .pr { font-weight: 700; }
.cell.owned .pr { font-weight: 800; }
.cell.tax .amt { font-weight: 700; }

/* аукцион: кто отказался */
.auction .bids { flex-wrap: wrap; }
.auction .who.passed { font-size: .8em; }

/* ---------- клетки: крупный логотип и плашка цены по внешнему краю */
.cell .logo.big {
  width: 5.6em;
  height: 5.6em;
  max-width: 82%;
  max-height: 82%;
  border-radius: 20%;
  box-shadow: 0 0 0 1px rgba(27, 26, 23, .1), 0 2px 6px rgba(27, 26, 23, .12);
  transition: transform .15s;
}
.cell:hover .logo.big { transform: scale(1.06); }
.cell.prop .body, .cell.team .body, .cell.util .body { padding: .5em; }
.cell .pr {
  background: var(--ink);
  color: var(--paper);
  font-size: 1.05em;
  font-weight: 700;
  letter-spacing: .01em;
  padding: .45em 0;
  border: 0 !important;
}
.cell.left .pr, .cell.right .pr { padding: 0 .45em; }
.cell.owned .pr { background: var(--owner); color: #fff; }
.cell.mortgaged .pr { background: var(--paper3); color: var(--ink-soft); }
.cell.frozen .pr { background: #3c6496; color: #fff; }
@media (max-width: 900px) {
  .cell .logo.big { width: 3.2em; height: 3.2em; }
  .cell .pr { font-size: .8em; }
}

/* ---------- секретная точка и панель */
.secret-dot { align-self: center; width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: #1f1d19; cursor: default; margin-top: -10px; }
.secret-dot:hover { background: #26241f; }
.admin { padding: 18px; display: grid; gap: 12px; }
.admin .kicker { color: var(--ink-soft); }
.admin input { border-bottom-color: rgba(27, 26, 23, .3); color: var(--ink); }
.ad-row { display: grid; grid-template-columns: 1.1fr 1fr; gap: 6px 12px; padding: 10px 0; border-bottom: 1px dotted rgba(27, 26, 23, .25); align-items: center; }
.ad-who { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ad-who .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.ad-who small { color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-next { font-size: 12.5px; color: var(--ink-soft); text-align: right; }
.ad-next b { color: var(--ink); }
.ad-dice { font-size: 20px; color: var(--ink); vertical-align: -2px; }
.ad-ctrl { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; }
.ad-ctrl select { font: inherit; padding: 4px 6px; border: 1px solid rgba(27, 26, 23, .3); background: #fff; border-radius: 3px; }
.ad-ctrl .btn { flex: none; }
.ad-card { font-size: 13px; background: rgba(27, 26, 23, .05); padding: 10px 12px; border-left: 3px solid var(--accent); }
