/* Магнат — вечерний клуб: сукно, латунь, кремовая бумага поля. */

:root {
  --bg: #0F1C17;
  --surface: #17251F;
  --surface2: #1D2E27;
  --paper: #F2EADB;
  --paper2: #EADFC9;
  --brass: #C8A15A;
  --brass2: #E2C285;
  --accent: #E0573F;
  --text: #F3EEE4;
  --muted: #A3B2AA;
  --line: #2B3B34;
  --line2: #34473F;
  --ink: #1F1A14;
  --ink2: #5B5145;
  --good: #9BE3B0;
  --warn: #F0B35B;
  --font-d: 'Unbounded', 'Segoe UI', system-ui, sans-serif;
  --font: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 500 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 70% at 55% 45%, #1A352B 0%, #12241D 45%, #0B1511 100%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[hidden] { display: none !important; }
button { font-family: inherit; }
::selection { background: rgba(200, 161, 90, .35); }
* { scrollbar-width: thin; scrollbar-color: #34473F transparent; }

/* ───────── кнопки и поля ───────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--line2);
  background: var(--surface2);
  color: var(--text);
  font: 700 14px/1 var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: transform .12s, background .15s, border-color .15s, box-shadow .15s, opacity .15s;
}
.btn:hover { background: #24382F; border-color: #41584D; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .38; cursor: not-allowed; transform: none; }
.btn:focus-visible, .sw:focus-visible, .seg button:focus-visible, .tog:focus-visible { outline: 2px solid var(--brass2); outline-offset: 2px; }
.btn .ic { width: 18px; height: 18px; flex: none; }
.btn.primary {
  background: linear-gradient(180deg, #E96B51, var(--accent));
  border-color: #B9442F;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 22px -8px rgba(224, 87, 63, .7);
}
.btn.primary:hover { background: linear-gradient(180deg, #F27A60, #E5614A); }
.btn.big { height: 52px; padding: 0 26px; font-size: 16px; border-radius: 12px; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.sm .ic { width: 15px; height: 15px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.btn.wide { width: 100%; }
.btn.danger { background: #3A1E19; border-color: #6B2E24; color: #FFC2B5; }
.btn.danger:hover { background: #4A231C; }
.btn.link { background: none; border: none; height: auto; padding: 4px 6px; color: var(--muted); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.btn.link.danger { color: #E8907E; }

input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line2);
  background: #0C1713;
  color: var(--text);
  font: 700 16px var(--font);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus { border-color: var(--brass); box-shadow: 0 0 0 3px rgba(200, 161, 90, .18); }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button { opacity: .4; }

.fld { display: grid; gap: 8px; }
.fld > span { font: 800 11px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--brass2); }

.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.sw {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, .45);
  background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .6), transparent 46%), var(--pc);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .45);
  cursor: pointer;
  transition: transform .12s;
}
.sw:hover { transform: scale(1.1); }
.sw.on { outline: 2px solid var(--paper); outline-offset: 3px; }
.sw:disabled { opacity: .18; cursor: not-allowed; transform: none; }

.chip {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 800 15px/1 var(--font-d);
  color: rgba(20, 16, 12, .86);
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .65), rgba(255, 255, 255, 0) 44%), var(--pc);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2), 0 0 0 2px rgba(0, 0, 0, .35), 0 4px 10px rgba(0, 0, 0, .4);
}

.pn { color: var(--pc); font-weight: 800; }
.cn {
  display: inline-block;
  padding: 0 6px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--cc) 22%, transparent);
  box-shadow: inset 2px 0 0 var(--cc);
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}

.mini-logo { font: 800 18px/1 var(--font-d); text-transform: uppercase; letter-spacing: .02em; color: var(--paper); }

/* ───────── главная ───────── */

.home {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(380px, 500px) 1fr;
  overflow: hidden;
}
.home-left {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 64px 40px 40px 64px;
}
.logo {
  margin: 0;
  font: 800 clamp(52px, 6.4vw, 92px)/.92 var(--font-d);
  letter-spacing: -.03em;
  text-transform: uppercase;
  color: var(--paper);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .25);
}
.logo::after {
  content: '';
  display: block;
  width: 64px;
  height: 4px;
  margin-top: 22px;
  border-radius: 2px;
  background: var(--accent);
}
.lead { margin: -6px 0 0; max-width: 34ch; font-size: 17px; color: var(--muted); }
.pass {
  position: relative;
  display: grid;
  gap: 20px;
  padding: 26px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, #1B2D26, #131F1A);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.pass::before {
  content: '';
  position: absolute;
  inset: 0 26px auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brass), transparent);
}
.join { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; padding-top: 4px; border-top: 1px solid rgba(255, 255, 255, .05); padding-top: 18px; }
.join .btn { height: 46px; }
#codeIn { font-family: var(--font-d); letter-spacing: .3em; text-transform: uppercase; }

.tables h3 { margin: 0 0 10px; font: 800 11px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.trow {
  width: 100%;
  display: grid;
  grid-template-columns: 70px 1fr auto auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 6px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, .03);
  color: var(--text);
  font: 700 14px var(--font);
  text-align: left;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.trow:hover { background: rgba(255, 255, 255, .06); border-color: var(--line2); }
.trow-code { font: 700 15px var(--font-d); letter-spacing: .14em; color: var(--brass2); }
.trow-host { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow-seats { display: flex; gap: 4px; }
.trow-seats i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.trow-seats i.on { background: var(--brass); }
.trow em { font-style: normal; font-weight: 800; font-size: 13px; color: var(--accent); }
.empty { margin: 0; color: var(--muted); font-size: 14px; }

.home-right { position: relative; min-height: 100vh; }
.deco-wrap {
  position: absolute;
  top: 50%;
  left: 2%;
  width: min(1060px, 112vh);
  aspect-ratio: 1;
  transform: translateY(-46%) perspective(2000px) rotateX(50deg) rotateZ(-30deg);
  transform-origin: 45% 50%;
  animation: settle 1.4s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes settle {
  from { opacity: 0; transform: translateY(-40%) perspective(2000px) rotateX(56deg) rotateZ(-36deg) scale(.94); }
}
#decoBoard { width: 100%; height: 100%; pointer-events: none; }
.rules-btn { position: absolute; top: 20px; right: 24px; z-index: 3; }

/* ───────── поле: классическая печатная доска ───────── */

.board {
  --line: #141414;
  --cellbg: #FDFCF6;
  --mint: #D3E8D5;
  container: board / inline-size;
  position: relative;
  display: grid;
  grid-template-columns: 1.6fr repeat(9, 1.3fr) 1.6fr;
  grid-template-rows: 1.6fr repeat(9, 1fr) 1.6fr;
  gap: 1px;
  padding: 2px;
  aspect-ratio: 14.9 / 12.2;
  border-radius: 2px;
  background: var(--line);
  box-shadow:
    0 0 0 10px #F3F0E4,
    0 0 0 11px #C9C1AA,
    0 9px 0 11px #A99F86,
    0 11px 0 12px #5F5743,
    0 30px 60px -12px rgba(0, 0, 0, .75),
    0 70px 140px -30px rgba(0, 0, 0, .6);
}
.cell {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--cellbg);
  color: var(--line);
  cursor: pointer;
  transition: background .15s;
}
.cell:hover { background: #FFF6DE; z-index: 1; }
.cell .body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: .25cqi;
  padding: .55cqi .25cqi .5cqi;
  text-align: center;
}
.s-t .body { flex-direction: column-reverse; }
.s-l .body, .s-r .body { justify-content: space-between; gap: .12cqi; padding: .3cqi .35cqi; }
/* боковые клетки с иконкой — столбиком, как города; название по ширине клетки */
.s-l:is(.prop, .tax) .nm, .s-r:is(.prop, .tax) .nm { font-size: clamp(6px, min(1.3cqi, calc(7.4cqi / (var(--nl, 8) * .66))), 16px); }
/* боковые клетки низкие: флаг и иконки поменьше, полоса уже */
.s-l .flag, .s-r .flag { width: 3cqi; height: 2cqi; }
.s-l .cic, .s-r .cic { width: 2.6cqi; height: 2.6cqi; }
.s-l .q, .s-r .q { font-size: 4.2cqi; }
.s-l .pr, .s-r .pr { padding: 0 .45cqi; }
.s-b { flex-direction: column; }
.s-t { flex-direction: column-reverse; }
.s-l { flex-direction: row-reverse; }
.s-r { flex-direction: row; }

.nm {
  font: 800 clamp(7px, min(1.45cqi, calc(8.4cqi / (var(--nl, 8) * .62))), 17px)/1.1 var(--font);
  letter-spacing: -.01em;
}
.pr {
  padding: .15cqi .45cqi;
  border-radius: 99px;
  font: 800 clamp(6px, 1.3cqi, 17px)/1.1 var(--font);
  color: var(--line);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: background .25s, color .25s;
}
.flag { flex: none; width: 3.6cqi; height: 2.4cqi; border-radius: 1px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
.cic { flex: none; width: 4.6cqi; height: 4.6cqi; color: var(--line); }

.band { flex: none; display: flex; align-items: center; justify-content: center; background: var(--cc); }
.s-b .band, .s-t .band { height: 21%; }
.s-l .band, .s-r .band { width: 16%; }
.s-b .band { border-bottom: 1px solid var(--line); }
.s-t .band { border-top: 1px solid var(--line); }
.s-l .band { border-left: 1px solid var(--line); }
.s-r .band { border-right: 1px solid var(--line); }

/* дома и отели на цветной полосе */
.hs { display: flex; gap: .28cqi; filter: drop-shadow(0 0 .07cqi #000) drop-shadow(0 .12cqi 0 rgba(0, 0, 0, .35)); }
.s-l .hs, .s-r .hs { flex-direction: column; }
.hs i {
  width: 1.8cqi;
  height: 1.75cqi;
  background: #2F9E4E;
  clip-path: polygon(50% 0, 100% 42%, 100% 100%, 0 100%, 0 42%);
  animation: pop .3s;
}
.hs i.hotel { width: 4cqi; height: 2.1cqi; background: #D8342B; clip-path: polygon(0 34%, 50% 0, 100% 34%, 100% 100%, 0 100%); }

.own { display: none; } /* полосу хозяина убрали: клетка и так целиком в его цвете */
.cell.owned { background: color-mix(in srgb, var(--oc) 36%, var(--cellbg)); }
.cell.owned:hover { background: color-mix(in srgb, var(--oc) 50%, var(--cellbg)); }
.owned .pr { background: none; color: var(--line); box-shadow: none; font-weight: 800; }

.owned.mort .pr { background: none; color: #6B6458; }
.mort .body { opacity: .5; }
.mort::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(135deg, rgba(20, 20, 20, .1) 0 3px, transparent 3px 8px);
}

.chance .q { font: 800 5.6cqi/1 var(--font-d); color: #EE7F1A; -webkit-text-stroke: .1cqi var(--line); }
.chest .cic { color: #2C86B5; }
.tax .cic { color: var(--line); }

/* углы: подписи по диагонали, как на печатной доске */
.corner { display: block; background: var(--cellbg); }
.cdiag {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4cqi;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}
.cname { font: 800 2cqi/1 var(--font-d); text-transform: uppercase; letter-spacing: .03em; }
.csub { font: 800 1.2cqi/1.1 var(--font); letter-spacing: .06em; text-transform: uppercase; }
.cbig { width: 5.6cqi; height: 5.6cqi; }
.go .cdiag { top: 42%; }
.go .cname { font-size: 2.1cqi; letter-spacing: .02em; }
.go .csub { color: #D8342B; }
.go-arrow { position: absolute; left: 12%; bottom: 7%; width: 76%; height: 3.4cqi; color: #D8342B; stroke-width: 3; }
.parking .cbig { color: #2C86B5; }
.gotojail .cbig { color: #2C4FA0; }
.parking .pot { color: #1C7C8C; }
.jail-box {
  position: absolute;
  top: 0;
  right: 0;
  width: 68%;
  height: 68%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .35cqi;
  background: #F08A24;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.jail-box .cmid { width: 3.4cqi; height: 3.4cqi; stroke-width: 2.2; }
.jail-box .cname { font-size: 1.05cqi; }
.visit { position: absolute; font: 800 1cqi/1 var(--font); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.visit-l { left: 16%; top: 34%; transform: translate(-50%, -50%) rotate(-90deg); }
.visit-b { left: 66%; bottom: 9%; transform: translateX(-50%); }
.cell.flash { animation: flash .9s ease-out; }
@keyframes flash { 0% { box-shadow: inset 0 0 0 .5cqi #F2B233; } 100% { box-shadow: inset 0 0 0 0 transparent; } }

/* центр поля: мятная бумага, лента логотипа, места для колод */
.center {
  grid-area: 2 / 2 / 11 / 11;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .35), transparent 70%),
    var(--mint);
}
.logo-banner {
  position: absolute;
  left: 50%;
  top: 13%;
  padding: 1.1cqi 3.4cqi;
  border: .35cqi solid #0E1A3A;
  background: #22397A;
  outline: .22cqi solid #F2E3BC;
  outline-offset: -.95cqi;
  box-shadow: .6cqi .6cqi 0 rgba(14, 26, 58, .28);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.logo-banner span {
  display: block;
  font: 800 4.4cqi/1 var(--font-d);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #FFF8E8;
  text-shadow: .25cqi .25cqi 0 #0E1A3A;
}
.deck {
  position: absolute;
  width: 8.6cqi;
  height: 12cqi;
  padding: .7cqi;
  border: .28cqi dashed rgba(20, 40, 30, .45);
  border-radius: .8cqi;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.deck-card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .6cqi;
  border: .2cqi solid var(--line);
  border-radius: .6cqi;
  transform: translate(-.45cqi, -.45cqi); /* стопка уходит вправо-вниз — сдвигаем, чтобы вся колода легла в рамку */
  box-shadow: .35cqi .35cqi 0 -.05cqi #FDFCF6, .4cqi .4cqi 0 .1cqi var(--line), .8cqi .8cqi 0 -.05cqi #FDFCF6, .85cqi .85cqi 0 .1cqi var(--line);
}
.deck-card b { font: 800 1.05cqi/1 var(--font); letter-spacing: .14em; text-transform: uppercase; }
.d-chance { left: 9%; top: 57%; }
.d-chance .deck-card { background: #F39A2B; color: var(--line); }
.d-chance .q { font: 800 5cqi/1 var(--font-d); color: #FFF8E8; -webkit-text-stroke: .15cqi var(--line); }
.d-chest { left: 91%; top: 57%; }
.d-chest .deck-card { background: #8FD0E8; color: var(--line); }
.d-chest .ic { width: 4.2cqi; height: 4.2cqi; stroke-width: 1.6; }
.center.deco .logo-banner { left: 50%; top: 50%; padding: 1.8cqi 5cqi; }
.center.deco .logo-banner span { font-size: 7.6cqi; }
.center.deco .d-chest { left: 20%; top: 22%; }
.center.deco .d-chance { left: 80%; top: 78%; }

/* лоток с кубиками и действиями — лежит на поле, правее ленты логотипа */
.tray {
  position: absolute;
  left: 18%;
  right: 18%;
  top: 57%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6cqi;
  padding: 2.4cqi 2.4cqi 2.6cqi;
  border-radius: 1.6cqi;
  color: var(--text);
  background: radial-gradient(ellipse at 50% 25%, #214237, #132A21 70%);
  box-shadow:
    0 0 0 .45cqi #7A4E27,
    0 0 0 .65cqi #3A2312,
    inset 0 .7cqi 1.8cqi rgba(0, 0, 0, .55),
    .9cqi 1.4cqi 2.2cqi -.6cqi rgba(0, 0, 0, .45);
}
.dice { display: flex; gap: 2.6cqi; perspective: 60cqi; }
.die { width: 6cqi; height: 6cqi; }
.cube { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.face {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  padding: .85cqi;
  border-radius: 1.05cqi;
  background: linear-gradient(145deg, #FFFDF8, #E9E0CF);
  box-shadow: inset 0 0 .5cqi rgba(0, 0, 0, .18);
}
.face i { place-self: center; width: 1.1cqi; height: 1.1cqi; border-radius: 50%; background: var(--ink); }
.face.f1 i { width: 1.6cqi; height: 1.6cqi; background: var(--accent); }
.f1 { transform: translateZ(3cqi); }
.f6 { transform: rotateY(180deg) translateZ(3cqi); }
.f2 { transform: rotateY(90deg) translateZ(3cqi); }
.f5 { transform: rotateY(-90deg) translateZ(3cqi); }
.f3 { transform: rotateX(90deg) translateZ(3cqi); }
.f4 { transform: rotateX(-90deg) translateZ(3cqi); }
.dice.toss .die { animation: toss .95s cubic-bezier(.2, .7, .3, 1); }
.dice.toss .die + .die { animation-delay: .04s; }
@keyframes toss {
  0% { transform: translate(-7cqi, -4cqi) scale(.9); }
  55% { transform: translate(.8cqi, .5cqi); }
  75% { transform: translate(-.3cqi, -.4cqi); }
  100% { transform: none; }
}

.stage {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.3cqi;
  text-align: center;
  transition: opacity .2s;
}
.stage.busy { opacity: .5; pointer-events: none; }
.st-h { margin: 0; font: 700 clamp(14px, 2.15cqi, 27px)/1.25 var(--font-d); color: var(--paper); }
.st-p { margin: 0; font-size: clamp(12px, 1.5cqi, 18px); color: var(--muted); }
.st-p.good { color: var(--good); font-weight: 700; }
.st-warn { margin: 0; font-size: clamp(11px, 1.2cqi, 14px); font-weight: 700; color: #FFB4A6; }
.st-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 1cqi; }
.stage .btn { height: clamp(34px, 4.6cqi, 56px); padding: 0 clamp(10px, 1.7cqi, 22px); font-size: clamp(13px, 1.6cqi, 19px); }
.stage .btn.big { height: clamp(42px, 5.8cqi, 68px); padding: 0 3cqi; font-size: clamp(15px, 2cqi, 23px); }
.stage .btn.link { height: auto; padding: 2px 6px; font-size: clamp(11px, 1.15cqi, 14px); }
.stage .btn .ic { width: clamp(14px, 1.7cqi, 19px); height: clamp(14px, 1.7cqi, 19px); }
.stage .pn { color: var(--pc); }

.mini {
  width: 27cqi;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1cqi;
  background: var(--paper);
  color: var(--ink);
  text-align: center;
  box-shadow: 0 1.2cqi 2.4cqi -.6cqi rgba(0, 0, 0, .65);
  animation: deal .35s cubic-bezier(.2, .8, .3, 1.2);
}
@keyframes deal { from { transform: translateY(-1.5cqi); opacity: 0; } }
.mini-band {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8cqi;
  padding: .95cqi;
  background: var(--cc);
  color: var(--ct, #fff);
  font: 800 clamp(9px, 1.05cqi, 13px)/1 var(--font);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.mini-band .flag { width: 2.6cqi; height: 1.73cqi; }
.mini-band .ic { width: 2cqi; height: 2cqi; }
.mini-name { padding: 1.3cqi 1cqi .4cqi; font: 800 clamp(14px, 2.3cqi, 28px)/1.1 var(--font-d); }
.mini-rent { padding: 0 1cqi 1.3cqi; font-size: clamp(10px, 1.1cqi, 13px); font-weight: 600; color: var(--ink2); }

.wait { display: flex; align-items: center; gap: 1.4cqi; text-align: left; }
.wait .chip { width: 5cqi; height: 5cqi; font-size: 2cqi; }
.wait b { display: block; font: 700 clamp(14px, 2.1cqi, 25px)/1.2 var(--font-d); color: var(--paper); }
.wait span { font-size: clamp(12px, 1.55cqi, 18px); color: var(--muted); }

.auc { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 1.1cqi; }
.auc-head { display: flex; align-items: center; gap: .6cqi; font: 800 clamp(10px, 1.2cqi, 14px)/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--brass2); }
.auc-head .ic { width: 2cqi; height: 2cqi; }
.auc-bid { display: flex; align-items: baseline; gap: 1cqi; }
.auc-bid span { font: 800 clamp(16px, 3cqi, 34px)/1 var(--font-d); color: var(--paper); font-variant-numeric: tabular-nums; }
.auc-bid .pn { font-size: clamp(12px, 1.4cqi, 16px); }
.auc-timer { width: 70%; height: max(4px, .45cqi); overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .1); }
.auc-timer i { display: block; height: 100%; background: var(--brass); transform-origin: left; animation: shrink linear forwards; }
@keyframes shrink { from { transform: scaleX(1); } to { transform: scaleX(0); } }

.win { display: flex; flex-direction: column; align-items: center; gap: 1.2cqi; }
.win-ic { width: 6cqi; height: 6cqi; color: var(--brass2); animation: pop .6s cubic-bezier(.2, .8, .3, 1.4); }

.cardshow {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background: rgba(31, 26, 20, .2);
  opacity: 0;
  cursor: pointer;
  transition: opacity .25s;
}
.cardshow.in { opacity: 1; }
.card-x {
  width: 42cqi;
  min-height: 24cqi;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5cqi;
  padding: 2.6cqi;
  border-radius: 1.4cqi;
  background: #FFFBF2;
  text-align: center;
  box-shadow: 0 2.4cqi 5cqi -1cqi rgba(0, 0, 0, .65);
}
.cardshow.in .card-x { animation: flip .55s cubic-bezier(.2, .8, .3, 1.15) both; }
@keyframes flip {
  from { transform: perspective(80cqi) rotateY(-100deg) scale(.8); opacity: 0; }
  to { transform: perspective(80cqi) rotateY(0); opacity: 1; }
}
.card-x.chance { border-top: 1.1cqi solid var(--accent); }
.card-x.chest { border-top: 1.1cqi solid #2FA3B5; }
.card-deck { display: flex; align-items: center; gap: .8cqi; font: 800 clamp(11px, 1.5cqi, 18px)/1 var(--font-d); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.card-deck .q { font: 800 3cqi/1 var(--font-d); color: var(--accent); }
.card-deck .ic { width: 3cqi; height: 3cqi; color: #2FA3B5; }
.card-x p { margin: 0; font: 700 clamp(12px, 1.8cqi, 21px)/1.35 var(--font); color: var(--ink); }
.card-who .pn { color: color-mix(in srgb, var(--pc) 55%, #1F1A14); font-size: clamp(11px, 1.3cqi, 15px); }

/* фишки: пешка — тень, тело и голова с буквой */
.tokens { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.token {
  position: absolute;
  width: 2.7cqi;
  height: 3.5cqi;
  margin: -1.75cqi 0 0 -1.35cqi;
  transform-origin: 50% 92%;
  transition: left .45s cubic-bezier(.3, .7, .3, 1), top .45s cubic-bezier(.3, .7, .3, 1), scale .25s, opacity .25s, transform .5s;
}
.t-shadow { position: absolute; left: 6%; right: 6%; bottom: 0; height: 1.2cqi; border-radius: 50%; background: rgba(0, 0, 0, .38); filter: blur(.2cqi); }
.t-body {
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: .3cqi;
  height: 1.95cqi;
  border: .2cqi solid rgba(20, 16, 12, .8);
  border-radius: 46% 46% 20% 20% / 75% 75% 25% 25%;
  background: radial-gradient(circle at 35% 25%, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 55%), var(--pc);
}
.token span {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2cqi;
  height: 2cqi;
  margin-left: -1cqi;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .75), rgba(255, 255, 255, 0) 46%), var(--pc);
  box-shadow: 0 0 0 .2cqi rgba(20, 16, 12, .82), 0 .3cqi .5cqi rgba(0, 0, 0, .3);
  font: 800 1cqi/1 var(--font-d);
  color: rgba(20, 16, 12, .86);
}
.token.turn::after {
  content: '';
  position: absolute;
  left: -14%;
  right: -14%;
  bottom: -.5cqi;
  height: 2cqi;
  border-radius: 50%;
  border: .28cqi solid var(--pc);
  animation: pulse 1.5s ease-out infinite;
}
@keyframes pulse { from { transform: scale(.8); opacity: .95; } to { transform: scale(1.35); opacity: 0; } }
.token.moving { z-index: 3; }
.token.hop { animation: hop .3s ease-out; }
@keyframes hop { 50% { translate: 0 -1.8cqi; } }
.token.vanish { scale: 0; opacity: 0; }

@container board (max-width: 620px) {
  .nm, .csub, .visit, .logo-banner, .deck, .go-arrow, .jail-box .cname { display: none; }
  .cname { font-size: 1.7cqi; }
  .go .cname { font-size: 2.4cqi; }
  .jail-box .cmid { width: 5cqi; height: 5cqi; }
  .pr { padding: 0 .3cqi; font-size: 1.45cqi; }
  .flag { width: 3.2cqi; height: 2.13cqi; }
  .cic { width: 4.4cqi; height: 4.4cqi; }
  .tray { left: 2%; right: 2%; top: 50%; padding: 3cqi 2.4cqi; transform: translateY(-50%); }
  .mini { width: 44cqi; }
  .card-x { width: 66cqi; }
}

/* ───────── экран партии ───────── */

#game { height: 100vh; display: flex; flex-direction: column; }
.g-top {
  flex: none;
  height: 50px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.g-code, .g-round { color: var(--muted); font-weight: 600; }
.g-code b { margin-left: 4px; font-family: var(--font-d); letter-spacing: .14em; color: var(--brass2); }
.g-top-act, .r-top-act { margin-left: auto; display: flex; gap: 6px; }
.g-main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 250px 1fr 300px;
  gap: 10px;
  padding: 6px 12px 12px;
}
.g-table { min-width: 0; min-height: 0; display: grid; place-items: center; container-type: size; }
.board-wrap { width: min(100cqw, 122.13cqh); aspect-ratio: 14.9 / 12.2; padding: 12px 12px 20px; }
#board { width: 100%; height: 100%; }

.g-players { min-height: 0; display: flex; flex-direction: column; gap: 14px; overflow: auto; padding: 2px; }
.pl-list { display: flex; flex-direction: column; gap: 8px; }
.pl {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "chip main" "chip cash" "own own";
  gap: 8px 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(23, 37, 31, .88);
  cursor: pointer;
  transition: border-color .2s, background .2s, box-shadow .2s, opacity .3s;
}
.pl:hover { border-color: #41584D; }
.pl .chip { grid-area: chip; }
.pl-main { grid-area: main; min-width: 0; }
.pl-name { overflow: hidden; font-size: 16px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.pl-name em { margin-left: 4px; font-style: normal; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--brass2); }
.pl-tags { display: flex; flex-wrap: wrap; gap: 8px; min-height: 4px; }
.tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.tag .ic { width: 12px; height: 12px; }
.tag.warn { color: var(--warn); }
.pl-cash { grid-area: cash; font: 700 17px/1 var(--font-d); color: var(--paper); font-variant-numeric: tabular-nums; }
.pl-own { grid-area: own; display: flex; flex-wrap: wrap; gap: 5px; }
.og { display: flex; gap: 2px; }
.og i { width: 7px; height: 7px; border-radius: 2px; background: rgba(255, 255, 255, .08); transition: background .3s; }
.og i.on { background: var(--gc); }
.og i.m { opacity: .4; }
.pl.turn {
  border-color: var(--pc);
  background: linear-gradient(100deg, color-mix(in srgb, var(--pc) 15%, #17251F), #17251F 70%);
  box-shadow: 0 0 0 1px var(--pc), 0 12px 30px -14px color-mix(in srgb, var(--pc) 70%, transparent);
}
.pl.out { opacity: .42; filter: grayscale(.8); }
.pl.winner { border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass); }
.float {
  position: absolute;
  right: 14px;
  top: 6px;
  font: 800 14px var(--font-d);
  pointer-events: none;
  animation: floatUp 1.8s ease-out forwards;
}
.float.up { color: #8FE3A6; }
.float.down { color: #FF8F7A; }
@keyframes floatUp {
  0% { opacity: 0; transform: translateY(8px); }
  15% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-28px); }
}
.g-tools { display: grid; gap: 8px; }
.btn.tool { width: 100%; height: 42px; justify-content: flex-start; }
.btn.tool.quiet { background: transparent; color: var(--muted); }
.btn.tool.hot { border-color: var(--brass); color: var(--brass2); animation: glow 1.8s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 4px rgba(200, 161, 90, .18); } }
.spect { margin: 0; color: var(--muted); font-weight: 600; }

.g-side {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(23, 37, 31, .72);
}
.tabs { flex: none; display: flex; border-bottom: 1px solid var(--line); }
.tabs button {
  position: relative;
  flex: 1;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: none;
  background: none;
  color: var(--muted);
  font: 700 14px var(--font);
  cursor: pointer;
}
.tabs button.on { color: var(--text); box-shadow: inset 0 -2px 0 var(--brass); }
.tabs .ic { width: 16px; height: 16px; }
.tabs .dot { position: absolute; top: 13px; right: calc(50% - 44px); width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.feed {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.5;
}
.ln { color: #CAD5CF; animation: fade .3s; }
.ln + .ln { padding-top: 8px; border-top: 1px dashed rgba(255, 255, 255, .06); }
.msg { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: baseline; animation: fade .2s; }
.msg span { word-break: break-word; }
.msg time { font-size: 11px; color: #71827A; }
.chat-form { flex: none; display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form input { height: 38px; font-size: 14px; font-weight: 600; }
.chat-form .btn { height: 38px; }

/* ───────── стол-лобби ───────── */

.room { min-height: 100vh; display: flex; flex-direction: column; }
.r-top { flex: none; height: 64px; display: flex; align-items: center; padding: 0 26px; }
.r-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 380px; gap: 28px; padding: 8px 28px 28px; }
.r-table { position: relative; min-height: 520px; display: grid; place-items: center; }
.t-area { position: relative; width: min(100%, 940px); aspect-ratio: 1.7; }
.oval {
  position: absolute;
  inset: 19% 17%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 38%, #24493C, #15322A 58%, #0E211A);
  box-shadow:
    0 0 0 10px #3B2A1B,
    0 0 0 12px var(--brass),
    0 0 0 24px #241910,
    0 40px 90px -20px rgba(0, 0, 0, .85),
    inset 0 14px 40px rgba(0, 0, 0, .5);
}
.oval-in { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.oval-label { font: 800 11px/1 var(--font); letter-spacing: .26em; text-transform: uppercase; color: var(--brass2); }
.oval-code { font: 800 clamp(36px, 5vw, 60px)/1 var(--font-d); letter-spacing: .14em; color: var(--paper); }
.oval-note { color: var(--muted); font-weight: 600; }
.seats { position: absolute; inset: 0; pointer-events: none; }
.seat {
  position: absolute;
  width: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  animation: fade .3s;
}
.seat .chip { width: 64px; height: 64px; font-size: 26px; }
.seat b { max-width: 100%; overflow: hidden; font: 700 15px/1.2 var(--font-d); white-space: nowrap; text-overflow: ellipsis; }
.seat-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.st { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; color: var(--muted); }
.st .ic { width: 13px; height: 13px; }
.st.crown { color: var(--brass2); }
.st.you { color: var(--accent); }
.st.warn { color: var(--warn); }
.seat-x {
  position: absolute;
  top: -4px;
  right: 40px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: #2A3A33;
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
}
.seat:hover .seat-x, .seat-x:focus-visible { opacity: 1; }
.seat-x .ic { width: 12px; height: 12px; }
.seat.empty {
  height: 104px;
  justify-content: center;
  border: 2px dashed rgba(255, 255, 255, .12);
  border-radius: 18px;
  color: var(--muted);
  font-weight: 700;
}
.r-side { min-height: 0; display: flex; flex-direction: column; gap: 14px; }
.panel { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(23, 37, 31, .82); }
.panel h3 { margin: 0 0 14px; font: 800 11px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--brass2); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; }
.set-row + .set-row { border-top: 1px solid rgba(255, 255, 255, .05); }
.set-row > span { font-size: 14px; font-weight: 700; }
.seg { display: flex; gap: 2px; padding: 3px; border-radius: 9px; background: #0C1713; }
.seg button {
  min-width: 34px;
  height: 30px;
  padding: 0 8px;
  border: none;
  border-radius: 7px;
  background: none;
  color: var(--muted);
  font: 700 13px var(--font);
  cursor: pointer;
}
.seg button.on { background: var(--surface2); color: var(--text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 2px 6px rgba(0, 0, 0, .3); }
.seg button:disabled { cursor: default; }
.seg button:disabled:not(.on) { opacity: .45; }
.tog { position: relative; flex: none; width: 46px; height: 26px; border: none; border-radius: 99px; background: #0C1713; box-shadow: inset 0 0 0 1px var(--line2); cursor: pointer; }
.tog i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #5B6B64; transition: left .2s, background .2s; }
.tog.on { background: color-mix(in srgb, var(--brass) 34%, #0C1713); }
.tog.on i { left: 23px; background: var(--brass2); }
.tog:disabled { cursor: default; opacity: .7; }
.chat-panel { flex: 1; min-height: 240px; display: flex; flex-direction: column; padding-bottom: 0; }
.chat-panel .feed { padding: 0 0 10px; }
.chat-panel .chat-form { margin: 0 -18px; padding: 10px 12px; }

/* ───────── модальные окна ───────── */

.modal-back {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(5, 10, 8, .62);
  backdrop-filter: blur(4px);
  animation: fade .18s;
}
.modal {
  position: relative;
  width: min(430px, 100%);
  max-height: min(88vh, 860px);
  overflow: auto;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #17261F;
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .85);
  animation: pop .22s cubic-bezier(.2, .8, .3, 1.2);
}
.modal.wide { width: min(780px, 100%); }
.x {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 10px;
  background: rgba(0, 0, 0, .22);
  color: var(--text);
  cursor: pointer;
}
.x:hover { background: rgba(0, 0, 0, .35); }
.x .ic { width: 18px; height: 18px; }
.m-title { margin: 0 0 18px; padding-right: 40px; font: 700 22px/1.2 var(--font-d); }
.m-foot { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.pc-band {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -26px -26px 20px;
  padding: 20px 26px;
  background: var(--cc);
  color: var(--ct, #fff);
  font: 800 13px/1 var(--font);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.pc-band .flag { width: 30px; height: 20px; }
.pc-band .ic { width: 22px; height: 22px; }
.pc-band.plain { background: #23362E; color: var(--text); }
.pc-name { margin: 0 0 8px; padding-right: 30px; font: 800 30px/1.1 var(--font-d); }
.pc-owner { margin-bottom: 16px; font-weight: 700; color: var(--muted); }
.pc-owner.free { color: var(--good); }
.pc-rent { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.pc-rent td { padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.pc-rent td:last-child { text-align: right; font-weight: 800; }
.pc-rent tr.on td { color: var(--brass2); }
.pc-rent tr.on td:first-child::before { content: '▸ '; }
.pc-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pc-meta span { padding: 6px 10px; border-radius: 8px; background: rgba(255, 255, 255, .05); font-size: 13px; font-weight: 700; }
.pc-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pc-text { margin: 0; color: #C8D2CC; }
.pc .pc-name:first-child { margin-top: 4px; }
.mort-tag { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--warn); }

.as-sum { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 18px; color: var(--muted); font-weight: 600; }
.as-sum b { margin-left: 4px; font-family: var(--font-d); color: var(--text); }
.as-g { margin-bottom: 16px; padding-left: 14px; border-left: 3px solid var(--cc); }
.as-g h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font: 800 12px var(--font); letter-spacing: .1em; text-transform: uppercase; }
.as-g h4 .flag { width: 21px; height: 14px; }
.as-g h4 .ic { width: 16px; height: 16px; }
.as-g h4 em { margin-left: 4px; font-style: normal; font-size: 11px; color: var(--brass2); }
.as-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.as-row.m .as-name { opacity: .6; }
.as-name { padding: 0; border: none; background: none; color: var(--text); font: 700 15px var(--font); text-align: left; cursor: pointer; }
.as-name:hover { color: var(--brass2); }
.as-h { display: flex; align-items: center; gap: 3px; }
.as-h .ic { width: 15px; height: 15px; color: var(--good); }
.as-act { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }

.tr-with { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pchip {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px 0 5px;
  border: 1px solid var(--line2);
  border-radius: 99px;
  background: transparent;
  color: var(--text);
  font: 700 14px var(--font);
  cursor: pointer;
}
.pchip .chip { width: 30px; height: 30px; font-size: 13px; }
.pchip.on { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 16%, transparent); }
.tr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tr-cols section { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .03); }
.tr-cols h4 { margin: 0 0 12px; font: 800 11px var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--brass2); }
.tchips, .tlist { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tchip {
  height: 32px;
  padding: 0 12px 0 11px;
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: rgba(255, 255, 255, .03);
  color: var(--text);
  font: 700 13px var(--font);
  cursor: pointer;
  box-shadow: inset 3px 0 0 var(--cc);
  transition: background .12s, border-color .12s;
}
.tchip.on { border-color: var(--cc); background: color-mix(in srgb, var(--cc) 32%, transparent); }
.tchip.m { font-style: italic; opacity: .75; }
.tchip:disabled { opacity: .3; cursor: not-allowed; }
.tnum { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.tnum input { height: 36px; font-size: 14px; }
.tnum span { font-size: 12px; }
.tlist .cn { padding: 4px 8px; }
.tlist .cash { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: var(--good); }
.tlist .cash .ic { width: 14px; height: 14px; }
.none { font-size: 13px; color: var(--muted); }
.tr-pending {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 14px;
  border: 1px solid rgba(200, 161, 90, .3);
  border-radius: 12px;
  background: rgba(200, 161, 90, .1);
  font-weight: 600;
}
.tr-from { margin: 0 0 14px; font-weight: 600; }

.rules-body { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 30px; }
.rules-body h4 { margin: 0 0 6px; font: 700 14px var(--font-d); color: var(--brass2); }
.rules-body p { margin: 0; font-size: 14px; line-height: 1.6; color: #C8D2CC; }

#toasts { position: fixed; left: 50%; bottom: 24px; z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; transform: translateX(-50%); pointer-events: none; }
.toast {
  max-width: min(90vw, 480px);
  padding: 12px 18px;
  border: 1px solid #6B2E24;
  border-radius: 12px;
  background: #2A1A16;
  color: #FFD1C7;
  font-weight: 700;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .6);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .25s, transform .25s;
}
.toast.in { opacity: 1; transform: none; }
.toast.ok { border-color: #2E6B47; background: #16291F; color: #C9F2D7; }
.offline-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  padding: 8px;
  background: #6B2E24;
  color: #fff;
  font-weight: 700;
  text-align: center;
  transform: translateY(-100%);
  transition: transform .25s;
}
body.offline .offline-bar { transform: none; }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ───────── адаптив ───────── */

@media (max-width: 1360px) {
  .g-main { grid-template-columns: 220px 1fr 260px; gap: 8px; padding: 6px 8px 8px; }
}
@media (max-width: 1100px) {
  #game { height: auto; min-height: 100vh; }
  .g-main { grid-template-columns: minmax(0, 1fr); }
  .g-main > * { min-width: 0; }
  .g-players { overflow: visible; }
  .pl-list { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .pl { min-width: 230px; }
  .g-tools { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .g-table { container-type: inline-size; }
  .board-wrap { width: min(100cqw, 88vh); }
  .g-side { height: 440px; }
  .r-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .home { grid-template-columns: 1fr; }
  .home-left { padding: 56px 20px 32px; max-width: 560px; }
  .home-right { position: absolute; inset: 0; z-index: 0; min-height: 0; opacity: .3; pointer-events: none; }
  .deco-wrap { left: 30%; width: 900px; }
}
@media (max-width: 640px) {
  .g-top { gap: 12px; padding: 0 12px; }
  .g-top .btn span, .r-top .btn span, .g-round { display: none; }
  .g-main { padding: 10px; gap: 12px; }
  .board-wrap { padding: 4px; }
  .r-top { padding: 0 12px; }
  .r-main { padding: 0 12px 16px; }
  .r-table { min-height: 0; }
  .t-area { aspect-ratio: 1; }
  .oval { inset: 24% 20%; }
  .oval-code { font-size: 30px; }
  .oval-in .btn.big { height: 44px; padding: 0 16px; font-size: 14px; }
  .seat { width: 110px; }
  .seat .chip { width: 46px; height: 46px; font-size: 19px; }
  .seat.empty { height: 80px; }
  .seat .btn span { display: none; }
  .tr-cols, .rules-body { grid-template-columns: 1fr; }
  .modal { padding: 20px; }
  .pc-band { margin: -20px -20px 18px; padding: 18px 20px; }
  .trow { grid-template-columns: 60px 1fr auto; }
  .trow-seats { display: none; }
}

/* плашки событий по центру стола */
.g-table { position: relative; }
.g-notes {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 1.4cqi);
  z-index: 20;
  width: 124%;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: .7cqi;
  transform: translateX(-50%);
  pointer-events: none;
}
.note {
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 22px;
  border: 1px solid #3A5046;
  border-radius: 14px;
  background: rgba(14, 24, 19, .94);
  color: var(--text);
  font: 700 clamp(13px, 1.55cqi, 19px)/1.35 var(--font);
  box-shadow: 0 18px 44px -12px rgba(0, 0, 0, .75);
  animation: noteIn .35s cubic-bezier(.2, .8, .3, 1.2);
  transition: opacity .35s, transform .35s;
}
.note .ic { flex: none; width: 24px; height: 24px; color: var(--brass2); }
.note .cn { padding: 1px 8px; }
.note.k-pay .ic, .note.k-debt .ic, .note.k-jail .ic, .note.k-bankrupt .ic { color: #FF8F7A; }
.note.k-buy .ic, .note.k-salary .ic { color: var(--good); }
.note.mine { border-color: var(--brass); }
.note.k-monopoly {
  padding: 18px 26px;
  border-color: var(--brass);
  background: linear-gradient(120deg, rgba(58, 44, 18, .96), rgba(14, 24, 19, .96));
  font-size: 20px;
}
.note.k-monopoly .ic { width: 30px; height: 30px; }
.note.out { opacity: 0; transform: translateY(-10px); }
@keyframes noteIn { from { opacity: 0; transform: translateY(12px) scale(.95); } }

.cn .flag, .tchip .flag { width: 1.35em; height: .9em; margin-right: .4em; vertical-align: -.1em; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
.tchip { display: inline-flex; align-items: center; }
.tchip .ic { width: 15px; height: 15px; margin-right: 6px; }

/* таймер хода в углу лотка */
.turn-timer {
  position: absolute;
  top: 1.3cqi;
  right: 1.5cqi;
  width: 5cqi;
  height: 5cqi;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--brass2) calc(var(--p, 1) * 360deg), rgba(255, 255, 255, .12) 0);
}
.turn-timer::before { content: ''; position: absolute; inset: .45cqi; border-radius: 50%; background: #13281F; }
.turn-timer b { position: relative; font: 800 1.9cqi/1 var(--font-d); color: var(--paper); font-variant-numeric: tabular-nums; }
.turn-timer.hot { background: conic-gradient(#FF6F57 calc(var(--p, 1) * 360deg), rgba(255, 255, 255, .12) 0); animation: tpulse 1s ease-in-out infinite; }
.turn-timer.hot b { color: #FFB4A6; }
@keyframes tpulse { 50% { scale: 1.08; } }

.btn.build-btn { border-color: var(--brass); color: var(--brass2); }
.btn.build-btn .flag { width: 1.4em; height: .93em; }
.view-lbl { font: 800 12px/1 var(--font-d); letter-spacing: .04em; }

/* суммы в журнале и уведомлениях: пришло — зелёным, ушло — красным */
.sum { font-weight: 800; white-space: nowrap; }
.sum.up { color: #7FE0A0; }
.sum.down { color: #FF8F7A; }

/* рулетка «кто ходит первым» */
.intro {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(5, 10, 8, .72);
  backdrop-filter: blur(5px);
  animation: fade .3s;
  transition: opacity .45s;
}
.intro.out { opacity: 0; }
.intro-card {
  width: min(760px, 100%);
  padding: 30px 28px 32px;
  border: 1px solid var(--line2);
  border-radius: 22px;
  background: linear-gradient(160deg, #1B2D26, #111D18);
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .85), inset 0 1px 0 rgba(255, 255, 255, .05);
  text-align: center;
  animation: pop .35s cubic-bezier(.2, .8, .3, 1.2);
}
.intro-h { margin: 0 0 22px; font: 800 clamp(22px, 3vw, 32px)/1.1 var(--font-d); text-transform: uppercase; color: var(--paper); }
.reel {
  position: relative;
  height: 132px;
  overflow: hidden;
  border-radius: 16px;
  background: #0B1511;
  box-shadow: inset 0 0 0 2px #7A4E27, inset 0 10px 30px rgba(0, 0, 0, .6);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}
.reel-strip { position: absolute; left: 0; top: 0; height: 100%; display: flex; will-change: transform; }
.reel-item { flex: none; width: 132px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.reel-item .chip { width: 58px; height: 58px; font-size: 24px; }
.reel-item b { max-width: 120px; overflow: hidden; font: 700 15px/1.1 var(--font); text-overflow: ellipsis; white-space: nowrap; }
.reel-item.win .chip { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--pc), 0 0 28px var(--pc); animation: pop .4s; }
.reel-mark { position: absolute; left: 50%; top: 6px; bottom: 6px; width: 132px; margin-left: -66px; border: 2px solid var(--brass2); border-radius: 14px; pointer-events: none; }
.reel-mark::before { content: ''; position: absolute; left: 50%; top: -8px; border: 9px solid transparent; border-top-color: var(--brass2); transform: translateX(-50%); }
.intro-res { min-height: 96px; }
.intro-first { margin: 22px 0 14px; font: 700 22px/1.2 var(--font-d); animation: noteIn .4s; }
.intro-order { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin: 0; padding: 0; list-style: none; counter-reset: ord; animation: noteIn .5s; }
.intro-order li { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--muted); counter-increment: ord; }
.intro-order li::before { content: counter(ord); font: 800 13px/1 var(--font-d); color: var(--brass2); }
.intro-order .chip { width: 28px; height: 28px; font-size: 12px; }

/* в низких боковых клетках пешка чуть меньше, чтобы не задевать название и цену */
.token[data-side=l], .token[data-side=r] { transform: scale(.76); }

/* размеры иконок по типу клетки — после общих правил, чтобы перекрывать их */
.s-b .cic, .s-t .cic { width: 2.9cqi; height: 2.9cqi; }
.s-l .cic, .s-r .cic { width: 2.6cqi; height: 2.6cqi; }
.s-l.chance .q, .s-r.chance .q { font-size: 3.4cqi; }
.s-b.prop .body, .s-t.prop .body, .s-b.tax .body, .s-t.tax .body { padding-top: .3cqi; padding-bottom: .3cqi; }

/* остаток домов и отелей в банке — в шапке стола */
.g-bank { display: flex; align-items: center; gap: 12px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(23, 37, 31, .8); color: var(--muted); font-weight: 600; font-size: 14px; }
.g-bank .bk { display: inline-flex; align-items: center; gap: 5px; font: 800 15px/1 var(--font-d); color: var(--text); font-variant-numeric: tabular-nums; }
.g-bank .bk .ic { width: 17px; height: 17px; color: #2F9E4E; }
.g-bank .bk + .bk .ic { color: #D8342B; }
.g-bank .bk.low { color: #FF8F7A; }
@media (max-width: 640px) { .g-bank > span { display: none; } }
