:root {
  --table: #4a0611;
  --table-deep: #22020a;
  --tile: #aeb4bd;
  --tile-edge: #8f96a0;
  --ink: #1e1a2e;
  --gold: #ffc83d;
  --gold-dark: #b8861a;
  --teal: #19c3b1;
  --teal-dark: #0f8478;
  --rose: #ff4d6d;
  --cream-text: #fbefef;
  --muted: #d9b8bd;
  --display: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --side: 300px;
  --B: calc(min(100vh - 18px, 100vw - var(--side) - 40px) * .972);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--body);
  color: var(--cream-text);
  background:
    radial-gradient(ellipse at 30% 20%, #6d0b1c 0%, transparent 60%),
    radial-gradient(ellipse at 80% 90%, #3a0410 0%, transparent 55%),
    var(--table-deep);
  min-height: 100%;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow-x: hidden;
}
button { font: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
input, select { font: inherit; }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: .02em;
  color: var(--ink);
  background: var(--gold);
  border: 0;
  border-radius: 14px;
  padding: .7em 1.2em;
  box-shadow: 0 4px 0 var(--gold-dark);
  transition: transform .08s, box-shadow .08s;
}
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--gold-dark); }
.btn.alt { background: var(--teal); box-shadow: 0 4px 0 var(--teal-dark); color: #fff; }
.btn.alt:active:not(:disabled) { box-shadow: 0 1px 0 var(--teal-dark); }
.btn.danger { background: var(--rose); box-shadow: 0 4px 0 #a3243b; color: #fff; }
.btn.ghost { background: transparent; color: var(--cream-text); box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.btn.ghost:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 0 0 2px rgba(255,255,255,.4); }
.btn.big { font-size: 1.4rem; padding: .65em 1.4em; }
.btn.small { font-size: .85rem; padding: .45em .8em; border-radius: 10px; box-shadow: 0 3px 0 var(--gold-dark); }
.btn.small.alt { box-shadow: 0 3px 0 var(--teal-dark); }
.btn.small.ghost { box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }

/* ---------- sticker logo ---------- */
.sticker {
  font-family: var(--display);
  line-height: .9;
  color: var(--gold);
  -webkit-text-stroke: .045em var(--ink);
  paint-order: stroke fill;
  text-shadow:
    .05em .05em 0 #fff, -.05em .05em 0 #fff, .05em -.05em 0 #fff, -.05em -.05em 0 #fff,
    0 .07em 0 #fff, 0 -.07em 0 #fff, .07em 0 0 #fff, -.07em 0 0 #fff,
    .1em .14em 0 rgba(0,0,0,.35);
  transform: rotate(-7deg);
  display: inline-block;
}
.sticker .line2 { display: block; color: var(--teal); margin-left: .5em; }

/* ---------- home ---------- */
.home {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}
.home-card { width: min(440px, 100%); text-align: center; }
.home .sticker { font-size: clamp(3.4rem, 13vw, 5.6rem); margin-bottom: 1.6rem; }
.home p.lede { color: var(--muted); font-size: 1.05rem; margin: 0 0 1.8rem; line-height: 1.5; }
.field {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: .85em 1em;
  font-size: 1.05rem;
  font-weight: 800;
  background: rgba(255,255,255,.95);
  color: var(--ink);
}
.field::placeholder { color: #8b8697; font-weight: 700; }
.home .stack { display: grid; gap: .8rem; }
.or { color: var(--muted); margin: 1.2rem 0 .8rem; font-weight: 700; }
.joinrow { display: grid; grid-template-columns: 1fr auto; gap: .6rem; }
.joinrow .field { text-transform: uppercase; letter-spacing: .3em; text-align: center; font-family: var(--display); }

/* ---------- lobby ---------- */
.lobby { max-width: 980px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.lobby-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.lobby-head .sticker { font-size: 2.4rem; }
.code-box { text-align: right; }
.code-box .code { font-family: var(--display); font-size: 3.2rem; letter-spacing: .12em; color: #fff; line-height: 1; }
.code-box small { color: var(--muted); display: block; margin-bottom: .3rem; font-weight: 700; }
.seats { display: grid; grid-template-columns: repeat(6, 1fr); gap: .9rem; margin: 2rem 0; }
.seat {
  background: rgba(255,255,255,.07);
  border-radius: 18px;
  padding: 1.1rem .8rem .9rem;
  text-align: center;
  position: relative;
  min-height: 150px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem;
}
.seat.me { box-shadow: inset 0 0 0 3px var(--gold); }
.seat.empty { background: transparent; border: 2px dashed rgba(255,255,255,.2); color: var(--muted); }
.seat .tok { width: 64px; height: 64px; font-size: 34px; }
.seat .nm { font-weight: 900; font-size: 1.05rem; word-break: break-word; }
.seat .tag { font-size: .8rem; color: var(--muted); font-weight: 700; }
.seat .x { position: absolute; top: 6px; right: 8px; background: none; border: 0; color: var(--muted); font-size: 1.1rem; }
.offline { opacity: .5; }
.lobby-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.2rem; }
@media (max-width: 760px) { .lobby-grid { grid-template-columns: 1fr; } .seats { grid-template-columns: repeat(3, 1fr); } }
.panel { background: rgba(0,0,0,.25); border-radius: 18px; padding: 1.1rem 1.2rem; }
.panel h3 { font-family: var(--display); font-weight: 400; font-size: 1.3rem; margin: 0 0 .8rem; color: #fff; }
.pick { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .9rem; }
.pick button { width: 46px; height: 46px; border-radius: 50%; border: 0; font-size: 24px; background: rgba(255,255,255,.12); }
.pick button.on { box-shadow: 0 0 0 3px var(--gold); background: rgba(255,255,255,.25); }
.pick button.taken { opacity: .25; }
.pick.colors button { width: 36px; height: 36px; }
.rule { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.rule:last-child { border-bottom: 0; }
.rule span small { display: block; color: var(--muted); font-weight: 600; font-size: .82rem; }
.rule select, .rule input[type=checkbox] { accent-color: var(--teal); }
.rule select { border-radius: 10px; border: 0; padding: .35em .5em; font-weight: 800; }
.switch { width: 46px; height: 26px; border-radius: 99px; border: 0; background: rgba(255,255,255,.2); position: relative; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch.on { background: var(--teal); }
.switch.on::after { transform: translateX(20px); }
.start-row { margin-top: 1.4rem; display: flex; gap: .8rem; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.hint { color: var(--muted); font-size: .9rem; font-weight: 700; }

/* ---------- token chip ---------- */
.tok {
  display: inline-grid; place-items: center;
  border-radius: 50%;
  background: var(--pc, #888);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.2), 0 0 0 3px #fff;
  line-height: 1;
}

/* token art */
.tsvg { width: 78%; height: 78%; display: block; filter: drop-shadow(0 1px 0 rgba(0,0,0,.25)); }
.tart { position: relative; display: inline-block; line-height: 1; }
.tlabel { position: absolute; left: 50%; bottom: -.28em; transform: translateX(-50%); font: 900 .36em/1 Arial, sans-serif; color: #fff; background: #111; padding: .12em .25em; border-radius: .2em; letter-spacing: .03em; }
.pick button { display: grid; place-items: center; padding: 0; }
.pick button .tsvg { width: 78%; height: 78%; }
.actions.busy { pointer-events: none; opacity: .55; }

/* ---------- game layout ---------- */
.table {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--side);
  grid-template-rows: minmax(0, 1fr);
  gap: 16px;
  padding: 9px 12px;
  height: 100vh;
  background:
    radial-gradient(ellipse at 40% 50%, rgba(140, 20, 40, .55), transparent 65%),
    repeating-radial-gradient(circle at 40% 50%, rgba(255,255,255,.012) 0 2px, transparent 2px 5px);
}
.board-wrap {
  display: grid; place-items: center; min-width: 0; min-height: 0;
  position: relative;
  --c: calc(var(--B) / 12.2);
  perspective: calc(var(--B) * 2.2);
}
.side {
  width: calc(var(--side) / var(--sz, 1));
  zoom: var(--sz, 1);
  height: calc((100vh - 18px) / var(--sz, 1));
  display: flex; flex-direction: column; gap: 8px;
  font-size: .9rem;
  min-height: 0;
}
/* Bigger info panel on large monitors */
@media (min-width: 1900px) and (min-aspect-ratio: 5/4) { :root { --sz: 1.2; --side: 360px; } }
@media (min-width: 2300px) and (min-aspect-ratio: 5/4) { :root { --sz: 1.4; --side: 420px; } }

/* 3D tabletop view: the board tilts back, so it can be drawn larger and fill wide screens. */
@media (min-aspect-ratio: 5/4) {
  .table.tilt { --B: calc(min((100vh - 18px) * 1.2, (100vw - var(--side) - 40px) / 1.18) * .97); }
  .table.tilt .board { transform: translateY(var(--ty, -5.5%)) rotateX(38deg); transform-style: preserve-3d; }
  .table:not(.tilt) .board { transform: translateY(var(--ty, 0px)); }
  .table.tilt .pieces { transform-style: preserve-3d; }
  .table.tilt .piece { transform: translate(-50%, -96%) rotateX(-38deg); transform-origin: 50% 100%; transform-style: preserve-3d; width: calc(var(--c) * .62); height: calc(var(--c) * .62); }
  .table.tilt .pshadow { transform: rotateX(38deg); transform-origin: 50% 100%; bottom: 0; height: 55%; left: 0; right: 0; }
  .table.tilt .boardpop { rotate: x -38deg; }
  .table.tilt .boardfx .mid { margin-top: 0; }
}
.board { transition: transform .6s cubic-bezier(.3,.7,.3,1); }
@media (max-aspect-ratio: 5/4) {
  :root { --B: calc(min(100vw - 16px, 74vh) * .965); }
  .table { display: flex; flex-direction: column; align-items: center; height: auto; padding: 10px 8px; }
  .side { width: 100%; max-width: 560px; height: auto; }
  .feed { height: 240px; flex: none; }
}

/* ---------- board ---------- */
.board {
  --c: calc(var(--B) / 12.2);
  --k: calc(var(--c) * 1.6);
  width: var(--B); height: var(--B);
  display: grid;
  grid-template-columns: var(--k) repeat(9, var(--c)) var(--k);
  grid-template-rows: var(--k) repeat(9, var(--c)) var(--k);
  background: #23324a;
  gap: 1px;
  padding: 1px;
  border-radius: 6px;
  box-shadow:
    0 0 0 calc(var(--c) * .07) #8d939c,
    0 0 0 calc(var(--c) * .14) #e8b23a,
    0 0 0 calc(var(--c) * .17) #8a5a12,
    0 calc(var(--c) * .3) calc(var(--c) * .9) rgba(0,0,0,.65),
    0 0 calc(var(--c) * 2) rgba(255, 180, 80, .12);
  position: relative;
  color: var(--ink);
  user-select: none;
}
.space { background: var(--tile); position: relative; overflow: visible; }
.space.clickable { cursor: pointer; }
.inner {
  position: absolute; left: 50%; top: 50%;
  width: var(--c); height: var(--k);
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
  display: flex; flex-direction: column; align-items: stretch;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(180deg, #b9bec6 0%, #a5abb4 100%);
  transition: background .2s;
}
.space.clickable:hover .inner { background: linear-gradient(180deg, #c9cdd3, #b7bcc4); }
.space.clickable:hover { z-index: 6; box-shadow: 0 0 0 2px var(--gold); }
.space.left .inner { --rot: 90deg; }
.space.right .inner { --rot: -90deg; }
.space.top .inner { flex-direction: column-reverse; background: linear-gradient(0deg, #b9bec6 0%, #a5abb4 100%); }
.space.here { z-index: 5; }
.space.here::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 3px var(--hc), inset 0 0 calc(var(--c) * .35) color-mix(in srgb, var(--hc) 45%, transparent);
  animation: herePulse 1.6s ease-in-out infinite;
}
@keyframes herePulse { 50% { opacity: .55; } }
.band {
  height: calc(var(--k) * .23);
  flex: none;
  border-bottom: 1px solid rgba(30,26,46,.7);
  background-image: linear-gradient(180deg, rgba(255,255,255,.45) 0%, rgba(255,255,255,.08) 48%, rgba(0,0,0,.06) 52%, rgba(0,0,0,.14) 100%);
  display: flex; align-items: center; justify-content: center; gap: 1px;
}
.space.top .band { border-bottom: 0; border-top: 1px solid rgba(30,26,46,.7); }
.sbody { flex: 1; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: calc(var(--c) * .07) 2px; min-height: 0; }
.sname { font-weight: 900; font-size: max(7px, calc(var(--c) * .15)); line-height: 1.08; text-wrap: balance; letter-spacing: -.01em; }
.sprice { font-weight: 800; font-size: max(7px, calc(var(--c) * .14)); color: #1f2836; }
.sicon { font-size: calc(var(--c) * .44); line-height: 1; filter: drop-shadow(0 2px 1px rgba(0,0,0,.2)); }
.qmark { font-family: var(--display); font-size: calc(var(--c) * .64); color: var(--rose); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; line-height: 1; text-shadow: 0 3px 0 rgba(0,0,0,.15); }
.ownbar { height: calc(var(--c) * .13); flex: none; background: transparent; box-shadow: inset 0 2px 0 rgba(255,255,255,.35); }
.mortgaged .inner { background: repeating-linear-gradient(45deg, #8f939a 0 6px, #80848b 6px 12px); }
.mortgaged .sname, .mortgaged .sprice, .mortgaged .sicon { opacity: .5; }
.mlabel { position: absolute; inset: auto 0 35% 0; font-size: max(6px, calc(var(--c) * .12)); font-weight: 900; color: #fff; background: var(--rose); transform: rotate(-12deg); pointer-events: none; }
.house { width: calc(var(--c) * .18); height: calc(var(--c) * .18); background: linear-gradient(#5ff0a0, #22b862); clip-path: polygon(50% 0, 100% 42%, 100% 100%, 0 100%, 0 42%); filter: drop-shadow(0 1px 0 #0d5c30); }
.hotel { width: calc(var(--c) * .52); height: calc(var(--c) * .22); background: linear-gradient(#ff7d95, #e0304f); clip-path: polygon(15% 0, 85% 0, 100% 35%, 100% 100%, 0 100%, 0 35%); }
.flash .inner { animation: flash 1s ease-out; }
@keyframes flash { 0% { background: var(--gold); } 100% { background: var(--tile); } }

/* corners */
.corner .inner { width: var(--k); height: var(--k); transform: translate(-50%, -50%); justify-content: center; align-items: center; gap: 2px; }
.corner .cbig { font-family: var(--display); font-size: calc(var(--c) * .55); line-height: 1; }
.corner .csmall { font-weight: 900; font-size: max(7px, calc(var(--c) * .14)); }
.go .inner { background: radial-gradient(circle at 50% 45%, #c9b77e, #b39b52); }
.go .inner { display: block; }
.go-text {
  position: absolute; left: 6%; top: 6%; width: 60%;
  font-weight: 900; font-size: max(7px, calc(var(--c) * .13)); line-height: 1.1; text-align: left;
  text-transform: uppercase;
}
.go .cbig {
  position: absolute; left: 50%; top: 46%;
  transform: translate(-50%, -50%) rotate(-45deg);
  font-size: calc(var(--c) * .72); color: var(--rose);
  -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 rgba(0,0,0,.18);
}
.go .arrow { position: absolute; left: 8%; bottom: 4%; font-size: calc(var(--c) * .45); line-height: 1; color: var(--rose); }
.gojail .inner { background: radial-gradient(circle at 50% 45%, #c4a3aa, #ad8790); }
.parking .inner { background: radial-gradient(circle at 50% 45%, #a3c2bc, #87aaa3); }
.jailcorner .inner { background: linear-gradient(135deg, #c4b498, #b09c78); display: block; }
.jailcell {
  position: absolute; top: 0; right: 0;
  width: 68%; height: 68%;
  background: linear-gradient(160deg, #ffb35c, #f57f1f);
  border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.jailcell::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 17%, rgba(30,26,46,.6) 17% 21%); pointer-events: none; z-index: 2; }
.jailcell .csmall { position: absolute; top: 3px; width: 100%; z-index: 3; }
.visiting { position: absolute; left: 4px; top: 22%; font-weight: 900; font-size: max(7px, calc(var(--c) * .13)); writing-mode: vertical-rl; transform: rotate(180deg); }
.visiting2 { position: absolute; left: 0; bottom: 3px; width: 100%; text-align: center; font-weight: 900; font-size: max(7px, calc(var(--c) * .13)); }

/* ---------- pieces ---------- */
.pieces { position: absolute; inset: 0; pointer-events: none; z-index: 15; }
.piece {
  --hd: 230ms;
  position: absolute;
  width: calc(var(--c) * .62); height: calc(var(--c) * .74);
  transform: translate(-50%, -86%);
  transition: left var(--hd) cubic-bezier(.35,.1,.35,1), top var(--hd) cubic-bezier(.35,.1,.35,1);
}
.piece.fly { transition-timing-function: cubic-bezier(.5,0,.3,1); }
.pshadow {
  position: absolute; left: 0; right: -14%; bottom: -10%; height: 30%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 45% 50%, rgba(0,0,0,.55), rgba(0,0,0,0) 70%);
}
.pbody { position: absolute; inset: 0; transform-origin: 50% 100%; }
/* A 3D game piece: a glossy colored base with the figure standing on it */
.pbase {
  position: absolute; left: 4%; right: 4%; bottom: 0; height: 30%;
  border-radius: 50%;
  background: linear-gradient(90deg, color-mix(in srgb, var(--pc) 55%, #000) 0%, var(--pc) 35%, color-mix(in srgb, var(--pc) 70%, #fff) 55%, var(--pc) 75%, color-mix(in srgb, var(--pc) 50%, #000) 100%);
  box-shadow: 0 2px 2px rgba(0,0,0,.45);
}
.pbase::before {
  content: ""; position: absolute; left: 0; right: 0; top: -22%; height: 70%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 40% 35%, color-mix(in srgb, var(--pc) 45%, #fff), var(--pc) 70%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}
.pfig {
  position: absolute; left: -8%; right: -8%; bottom: 14%; height: 86%;
  display: grid; place-items: end center;
  font-size: calc(var(--c) * .48); line-height: 1;
  filter: drop-shadow(0 calc(var(--c) * .04) calc(var(--c) * .03) rgba(0,0,0,.55)) drop-shadow(0 0 1px rgba(0,0,0,.7));
}
.pfig .tsvg { width: 100%; height: 100%; filter: none; }
.pfig .tart { font-size: 1em; }
.piece.hop .pbody { animation: hop var(--hd) cubic-bezier(.3,0,.5,1); }
.piece.hop .pshadow { animation: shadowHop var(--hd) cubic-bezier(.3,0,.5,1); }
.piece.land .pbody { animation: land .42s cubic-bezier(.25,1.5,.5,1); }
.piece.fly .pbody { animation: flyHop var(--hd) ease-in-out; }
.piece.fly .pshadow { animation: shadowHop var(--hd) ease-in-out; }
.piece.now .pbase { animation: basePulse 1.5s ease-in-out infinite; }
@keyframes basePulse { 50% { box-shadow: 0 2px 2px rgba(0,0,0,.45), 0 0 0 calc(var(--c) * .06) rgba(255,200,61,.75), 0 0 calc(var(--c) * .3) rgba(255,200,61,.6); } }
@keyframes hop {
  0% { transform: scale(1.08, .9); }
  20% { transform: translateY(-30%) scale(.92, 1.1); }
  50% { transform: translateY(-62%) scale(.96, 1.05); }
  85% { transform: translateY(-5%) scale(1, 1); }
  100% { transform: scale(1.12, .88); }
}
@keyframes shadowHop { 50% { scale: .55; opacity: .45; } }
@keyframes land {
  0% { transform: scale(1.3, .7); }
  35% { transform: translateY(-28%) scale(.9, 1.12); }
  65% { transform: scale(1.08, .93); }
  100% { transform: none; }
}
@keyframes flyHop {
  0% { transform: none; }
  50% { transform: translateY(-160%) rotate(200deg) scale(1.25); }
  100% { transform: rotate(360deg); }
}
@keyframes pulse {
  0%, 100% { box-shadow: inset 0 calc(var(--c) * -.05) 0 rgba(0,0,0,.28), 0 0 0 2px #fff, 0 0 0 3px var(--gold); }
  50% { box-shadow: inset 0 calc(var(--c) * -.05) 0 rgba(0,0,0,.28), 0 0 0 2px #fff, 0 0 0 calc(var(--c) * .12) rgba(255,200,61,.45); }
}
.boardpop {
  position: absolute;
  transform: translate(-50%, -120%);
  font-family: var(--display);
  font-size: calc(var(--c) * .34);
  -webkit-text-stroke: 1.5px var(--ink);
  paint-order: stroke fill;
  white-space: nowrap;
  animation: popUp 1.6s ease-out forwards;
  z-index: 10;
}
.boardpop.plus { color: #3df08f; }
.boardpop.minus { color: #ff5d7a; }
@keyframes popUp { 0% { opacity: 0; transform: translate(-50%, -80%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -130%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -260%); } }

/* ---------- center ---------- */
.center {
  grid-area: 2 / 2 / 11 / 11;
  background:
    radial-gradient(circle at 50% 46%, rgba(255,255,255,.18), rgba(255,255,255,0) 60%),
    conic-gradient(from 45deg at 50% 50%, #9aa1ab, #a7aeb7, #9aa1ab, #a7aeb7, #9aa1ab);
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  justify-items: center;
  padding: calc(var(--c) * .35);
  overflow: hidden;
  box-shadow: inset 0 0 calc(var(--c) * .6) rgba(20, 26, 38, .35);
}
.center::before {
  content: ""; position: absolute; inset: calc(var(--c) * .22);
  border: 2px dashed rgba(20, 26, 38, .25); border-radius: calc(var(--c) * .3);
  pointer-events: none;
}
.center .sticker { font-size: calc(var(--c) * 1.25); margin-top: calc(var(--c) * .55); text-align: left; position: relative; z-index: 2; }
.decks { position: absolute; inset: 0; pointer-events: none; }
.deck {
  position: absolute;
  width: calc(var(--c) * 2); height: calc(var(--c) * 1.3);
  border-radius: calc(var(--c) * .15);
  border: 2px solid var(--ink);
  display: grid; place-items: center; align-content: center;
  font-family: var(--display);
  font-size: calc(var(--c) * .22);
  color: var(--ink);
  box-shadow: 3px 3px 0 #fff, 5px 5px 0 var(--ink), 8px 8px 0 #fff, 10px 10px 0 var(--ink);
}
.deck b { font-size: calc(var(--c) * .55); font-weight: 400; line-height: 1; }
.deck.chance { left: 9%; bottom: 9%; transform: rotate(-14deg); background: linear-gradient(160deg, #ffc6d1, #ff96ab); }
.deck.chest { right: 9%; bottom: 9%; transform: rotate(12deg); background: linear-gradient(160deg, #c4f2ff, #86def7); }
.boardfx { position: absolute; inset: 0; pointer-events: none; display: grid; place-items: center; z-index: 30; }
.boardfx .mid { display: grid; place-items: center; margin-top: calc(var(--c) * 1.6); }
.dice { display: flex; gap: calc(var(--c) * .55); perspective: 800px; }
.dice.toss { animation: toss 1.05s cubic-bezier(.3,.6,.4,1); }
@keyframes toss {
  0% { transform: translateY(0); }
  25% { transform: translateY(calc(var(--c) * -1.1)); }
  55% { transform: translateY(0); }
  70% { transform: translateY(calc(var(--c) * -.35)); }
  85% { transform: translateY(0); }
  92% { transform: translateY(calc(var(--c) * -.08)); }
  100% { transform: translateY(0); }
}
.dice-shadow { width: calc(var(--c) * 2.4); height: calc(var(--c) * .3); border-radius: 50%; background: radial-gradient(rgba(35,50,74,.35), transparent 70%); margin-top: calc(var(--c) * .12); }
.die { --d: calc(var(--c) * .95); width: var(--d); height: var(--d); position: relative; transform-style: preserve-3d; transition: transform 1.05s cubic-bezier(.2,.9,.3,1.08); }
.face {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 25%, #e4e6e9, #c9cdd2);
  border: 2px solid var(--ink);
  border-radius: 20%;
  display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  padding: 12%;
  backface-visibility: hidden;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.08);
}
.pip { width: 72%; height: 72%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #4b4560, var(--ink)); place-self: center; }
.face.f1 .pip, .face.f4 .pip { background: radial-gradient(circle at 35% 30%, #ff8aa0, var(--rose)); }
.f1 { transform: translateZ(calc(var(--d) / 2)); }
.f6 { transform: rotateY(180deg) translateZ(calc(var(--d) / 2)); }
.f2 { transform: rotateY(90deg) translateZ(calc(var(--d) / 2)); }
.f5 { transform: rotateY(-90deg) translateZ(calc(var(--d) / 2)); }
.f3 { transform: rotateX(90deg) translateZ(calc(var(--d) / 2)); }
.f4 { transform: rotateX(-90deg) translateZ(calc(var(--d) / 2)); }
.boardfx .turnpop {
  position: absolute; left: 50%; top: 50%; margin: 0;
  font-size: calc(var(--c) * 1.1);
  z-index: 25;
  pointer-events: none;
  animation: turnPop 1.7s cubic-bezier(.2,1.5,.4,1) forwards;
}
@keyframes turnPop {
  0% { transform: translate(-50%, -50%) rotate(-7deg) scale(.2); opacity: 0; }
  20% { transform: translate(-50%, -50%) rotate(-7deg) scale(1.1); opacity: 1; }
  30% { transform: translate(-50%, -50%) rotate(-7deg) scale(1); }
  80% { opacity: 1; }
  100% { transform: translate(-50%, -70%) rotate(-7deg) scale(1); opacity: 0; }
}

/* landing deed */
.boardfx { perspective: 1400px; }
.deedpop {
  position: absolute; left: 50%; top: 50%;
  width: 300px;
  transform: translate(-50%, -50%) scale(var(--ds, 1));
  z-index: 22;
  pointer-events: auto;
  cursor: pointer;
  color: var(--ink);
}
.deedpop.spin { animation: deedSpin 1s cubic-bezier(.2,.85,.3,1.08) both; }
.deedpop.out { animation: deedOut .38s ease-in forwards; }
@keyframes deedSpin {
  0% { transform: translate(-50%, -50%) scale(calc(var(--ds, 1) * .15)) rotateY(-720deg) rotateZ(-25deg); opacity: 0; }
  35% { opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(var(--ds, 1)) rotateY(0) rotateZ(0); }
}
@keyframes deedOut { to { transform: translate(-50%, -50%) scale(calc(var(--ds, 1) * .2)) rotateZ(15deg); opacity: 0; } }
.deedpop .who {
  display: flex; align-items: center; gap: .45rem;
  background: var(--ink); color: #fff;
  font-family: var(--display); font-size: 1rem;
  padding: .35rem .7rem; border-radius: 12px 12px 0 0;
  width: fit-content; margin: 0 auto;
}
.deedpop .who .tok { width: 24px; height: 24px; font-size: 14px; box-shadow: 0 0 0 2px #fff; }
.deedpop .deed { width: 100%; box-shadow: 0 18px 50px rgba(0,0,0,.55), 0 0 0 3px var(--ink); }
.deedpop .deed tr.now td { background: var(--gold); }
.dstatus { margin-top: .5rem; text-align: center; font-family: var(--display); font-size: 1.15rem; padding: .45rem .7rem; border-radius: 12px; box-shadow: 0 6px 16px rgba(0,0,0,.4); }
.dstatus.sale { background: var(--teal); color: #fff; }
.dstatus.rent { background: var(--rose); color: #fff; }
.dstatus.mine { background: var(--gold); color: var(--ink); }
.dstatus.mort { background: #6b6f76; color: #fff; }
.dbtns { display: flex; gap: .5rem; justify-content: center; margin-top: .5rem; }
.dbtns:empty { display: none; }
.dclose-row { display: flex; justify-content: center; margin-top: .5rem; }
.dclose { background: var(--ink); color: #fff; box-shadow: 0 3px 0 #000; }
.deedpop { cursor: default; }
.dbtns .btn { font-size: .95rem; padding: .55em 1em; }
.dbtns .btn.ghost { background: rgba(30,26,46,.85); }

/* big banners */
.banner {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--B) * 1.04);
  transform: translate(-50%, -50%) rotate(-4deg);
  z-index: 40;
  padding: calc(var(--c) * .35) calc(var(--c) * .5);
  text-align: center;
  font-family: var(--display);
  font-size: calc(var(--c) * .78);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: #fff;
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 5px 0 rgba(0,0,0,.35);
  box-shadow: 0 0 0 4px var(--ink), 0 20px 60px rgba(0,0,0,.6);
  animation: bannerIn 2.3s cubic-bezier(.2,.9,.3,1) forwards;
  pointer-events: none;
}
.banner.sold { background: linear-gradient(90deg, #0f8478, #19c3b1, #0f8478); }
.banner.passed { background: linear-gradient(90deg, #a3243b, #ff4d6d, #a3243b); }
.banner.nobids { background: linear-gradient(90deg, #3a3f47, #6b7280, #3a3f47); }
.banner span { display: inline-block; animation: bannerText 2.3s cubic-bezier(.2,1.4,.4,1) forwards; }
@keyframes bannerIn {
  0% { clip-path: inset(0 100% 0 0); }
  15% { clip-path: inset(0 0 0 0); }
  85% { clip-path: inset(0 0 0 0); opacity: 1; }
  100% { clip-path: inset(0 0 0 100%); opacity: 0; }
}
@keyframes bannerText { 0% { transform: scale(.4); } 18% { transform: scale(1.1); } 26% { transform: scale(1); } 100% { transform: scale(1.04); } }
.dwait { font-weight: 900; color: #fff; background: var(--ink); padding: .5rem .9rem; border-radius: 12px; }
.dbtns .btn.big { font-size: 1.1rem; }

/* big auction window */
.modal.auction { width: min(680px, 96vw); padding: 1.6rem 2rem; border: 3px solid var(--gold); }
.modal.auction h2 { font-size: 2.6rem; color: var(--gold); text-align: center; margin-bottom: .6rem; -webkit-text-stroke: 1px var(--ink); }
.auction .bidnow { font-size: 5rem; }
.auction .bidder { font-size: 1.2rem; }
.auction .timer { height: 16px; }
.auction .bidbtns .btn { font-size: 1.2rem; padding: .7em .4em; }
.auction .bidcustom input { font-size: 1.3rem; padding: .7em .9em; }
.auction .bidcustom .btn { font-size: 1.3rem; }

/* drawn card */
.drawn {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--c) * 4.6);
  min-height: calc(var(--c) * 2.8);
  transform: translate(-50%, -50%);
  border-radius: 16px;
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  padding: calc(var(--c) * .25);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4em;
  text-align: center;
  z-index: 20;
  animation: cardIn .5s cubic-bezier(.2,1.4,.4,1);
  cursor: pointer;
  pointer-events: auto;
}
.drawn.chance { background: linear-gradient(160deg, #ffc6d1, #ff96ab); }
.drawn.chest { background: linear-gradient(160deg, #c4f2ff, #86def7); }
.drawn h4 { font-family: var(--display); font-weight: 400; margin: 0; font-size: calc(var(--c) * .34); }
.drawn p { margin: 0; font-weight: 800; font-size: max(12px, calc(var(--c) * .22)); line-height: 1.3; }
.drawn small { font-weight: 700; opacity: .7; font-size: max(10px, calc(var(--c) * .15)); }
@keyframes cardIn { from { transform: translate(-50%, -50%) rotateY(90deg) scale(.6); } to { transform: translate(-50%, -50%); } }

/* ---------- side panel ---------- */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: .4rem; }
.roomtag { font-weight: 800; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.ver { font-size: .7rem; color: var(--muted); opacity: .7; margin-left: .3rem; }
.roomtag b { font-family: var(--display); font-weight: 400; color: #fff; letter-spacing: .1em; font-size: 1.05rem; }
.side .btn.small { font-size: .78rem; padding: .4em .7em; }
.turnbox { background: rgba(0,0,0,.32); border-radius: 14px; padding: .7rem .8rem; display: grid; gap: .35rem; }
.turnhead { display: flex; align-items: center; gap: .55rem; font-family: var(--display); font-size: 1.25rem; color: #fff; }
.turnhead .tok { width: 32px; height: 32px; font-size: 18px; flex: none; }
.turnsub { font-weight: 800; color: var(--gold); }
.lastroll { display: flex; align-items: center; gap: .3rem; font-weight: 700; color: var(--muted); }
.lastroll b { color: var(--gold); }
.mini-die { display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 5px; background: #fff; color: var(--ink); font-weight: 900; font-size: .85rem; }
.bankline { display: flex; flex-wrap: wrap; gap: .35rem; font-size: .78rem; font-weight: 700; color: var(--muted); }
.players { display: grid; gap: 4px; }
.pcard {
  display: grid; grid-template-columns: auto 1fr auto; gap: .55rem; align-items: center;
  background: rgba(0,0,0,.28);
  border-radius: 12px;
  padding: .35rem .55rem;
  position: relative;
  border-left: 4px solid var(--pc);
  cursor: pointer;
}
.pcard.turn { background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 2px var(--pc); }
.pcard.out { opacity: .4; filter: grayscale(1); }
.pcard .tok { width: 28px; height: 28px; font-size: 16px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.2), 0 0 0 2px #fff; }
.pname { font-weight: 900; line-height: 1.1; display: flex; gap: .35rem; align-items: baseline; flex-wrap: wrap; font-size: .88rem; }
.pname small { font-weight: 700; color: var(--muted); font-size: .7rem; }
.chips { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 3px; }
.chip { width: 8px; height: 11px; border-radius: 2px; border: 1px solid rgba(0,0,0,.4); }
.chip.m { opacity: .35; }
.pcash { font-family: var(--display); font-size: 1.1rem; color: var(--gold); }
.float { position: absolute; right: .8rem; top: -.2rem; font-family: var(--display); font-size: 1.05rem; animation: floatUp 1.6s ease-out forwards; pointer-events: none; }
.float.plus { color: #2ed47a; }
.float.minus { color: var(--rose); }
@keyframes floatUp { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-30px); } }
.hostctl { grid-column: 1 / -1; display: flex; gap: .4rem; }

.actions {
  background: rgba(0,0,0,.32);
  border-radius: 14px;
  padding: .7rem;
  display: grid; gap: .55rem;
}
.actions .btn.big { font-size: 1.15rem; padding: .55em 1.1em; }
.actions .btn { font-size: .95rem; padding: .6em 1em; }
.actions .msg { font-weight: 800; line-height: 1.35; }
.actions .msg small { display: block; color: var(--muted); font-weight: 700; }
.debtbox { background: rgba(255,77,109,.18); border-radius: 12px; padding: .6rem; box-shadow: inset 0 0 0 2px var(--rose); }
.offer { background: rgba(25,195,177,.16); border-radius: 10px; padding: .5rem .6rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-weight: 800; }

.feed { flex: 1; min-height: 120px; background: rgba(0,0,0,.28); border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; }
.feed-list { flex: 1; overflow-y: auto; padding: .6rem .7rem; display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; line-height: 1.3; }
.feed-list .lg { color: var(--muted); font-weight: 600; }
.feed-list .ch { color: #fff; font-weight: 700; }
.feed-list .ch b { color: var(--nc); }
.feed form { display: flex; gap: .4rem; padding: .45rem; border-top: 1px solid rgba(255,255,255,.08); }
.feed input { flex: 1; border: 0; border-radius: 10px; padding: .5em .7em; background: rgba(255,255,255,.92); color: var(--ink); font-weight: 700; min-width: 0; font-size: .85rem; }

/* ---------- property collection ---------- */
.piles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.6rem 1.2rem; padding: 1rem .2rem .4rem; }
.pile { cursor: pointer; display: grid; justify-items: center; gap: .55rem; outline: none; }
.pstack { position: relative; width: 150px; height: calc(190px + (var(--n) - 1) * 12px); }
.pstack .mcard {
  position: absolute; left: 0; top: 0;
  transform: translate(calc(var(--k) * 10px), calc(var(--k) * 12px)) rotate(calc((var(--k) - (var(--n) - 1) / 2) * 4deg));
  transition: transform .25s cubic-bezier(.3,1.4,.5,1);
}
.pile:hover .pstack .mcard, .pile:focus-visible .pstack .mcard {
  transform: translate(calc(var(--k) * 22px), calc(var(--k) * 6px)) rotate(calc((var(--k) - (var(--n) - 1) / 2) * 9deg));
}
.pile:focus-visible .pcap { outline: 3px solid var(--gold); }
.pcap { display: flex; align-items: center; gap: .45rem; font-weight: 900; background: rgba(0,0,0,.3); padding: .3rem .7rem; border-radius: 99px; }
.pcap i, .gtitle i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; border: 1px solid rgba(0,0,0,.4); }
.pcap span { color: var(--gold); }
.mcard {
  width: 150px; height: 190px;
  background: linear-gradient(180deg, #ffffff, #eef1f4);
  border-radius: 12px;
  box-shadow: 0 0 0 2px var(--ink), 0 6px 14px rgba(0,0,0,.45);
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
}
.mhead {
  background: var(--gc);
  background-image: linear-gradient(180deg, rgba(255,255,255,.3), rgba(0,0,0,.08));
  border-bottom: 2px solid var(--ink);
  min-height: 56px; padding: .4rem;
  display: grid; place-items: center; text-align: center;
  font-family: var(--display); font-size: 1rem; line-height: 1.05;
}
.mbody { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; padding: .4rem; text-align: center; }
.micon { font-size: 1.6rem; line-height: 1; }
.mlabel2 { font-size: .72rem; font-weight: 800; color: #5b6472; text-transform: uppercase; letter-spacing: .05em; }
.mrent { font-family: var(--display); font-size: 1.6rem; line-height: 1; }
.mbld { display: flex; gap: 3px; min-height: 18px; align-items: center; --c: 64px; }
.mbld span { font-size: .72rem; font-weight: 700; color: #8a93a0; }
.mcard.mort::after {
  content: "Mortgaged"; position: absolute; left: -10%; right: -10%; top: 46%;
  transform: rotate(-18deg); text-align: center;
  background: var(--rose); color: #fff; font-family: var(--display); font-size: 1rem; padding: .2rem 0;
  box-shadow: 0 2px 0 rgba(0,0,0,.3);
}
.mcard.mort .mbody { opacity: .5; }
.crumbs { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin: 0 2.2rem 1rem 0; }
.gtitle { display: flex; align-items: center; gap: .45rem; font-weight: 900; font-size: 1.1rem; }
.cardrow { display: flex; flex-wrap: wrap; gap: 1.1rem; justify-content: center; padding: .4rem 0 .6rem; }
.cardrow .mcard { cursor: pointer; transition: transform .15s; }
.cardrow .mcard:hover, .cardrow .mcard:focus-visible { transform: translateY(-6px) rotate(-1deg); outline: none; box-shadow: 0 0 0 3px var(--gold), 0 10px 20px rgba(0,0,0,.5); }
.cdetail .deed { width: min(340px, 100%); }
.cdetail .deed table { font-size: 1rem; }

/* notices at the top of the screen */
#notices { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 120; display: grid; gap: .5rem; width: min(560px, 94vw); pointer-events: none; }
.notice {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  padding: .85rem 1rem;
  border-radius: 16px;
  font-family: var(--display); font-size: 1.2rem; line-height: 1.25; color: #fff;
  box-shadow: 0 0 0 3px var(--ink), 0 14px 40px rgba(0,0,0,.6);
  animation: noticeIn .45s cubic-bezier(.2,1.4,.4,1);
  transition: opacity .4s, transform .4s;
}
.notice b { color: var(--gold); font-weight: 400; }
.notice.good { background: linear-gradient(90deg, #0f8478, #19c3b1); }
.notice.bad { background: linear-gradient(90deg, #a3243b, #ff4d6d); }
.notice.info { background: linear-gradient(90deg, #2a3442, #46546a); }
.notice button { background: rgba(0,0,0,.25); color: #fff; border: 0; border-radius: 50%; width: 30px; height: 30px; flex: none; font-size: 1rem; }
.notice.gone { opacity: 0; transform: translateY(-12px); }
@keyframes noticeIn { from { opacity: 0; transform: translateY(-20px) scale(.9); } }

/* who owns a property */
.ownerbar { display: flex; align-items: center; justify-content: center; gap: .55rem; margin: 0 auto .9rem; width: fit-content; max-width: 100%; padding: .55rem 1rem; border-radius: 99px; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 2px var(--pc, #888); font-weight: 800; font-size: 1.05rem; }
.ownerbar b { color: var(--gold); }
.ownerbar .tok { width: 32px; height: 32px; font-size: 18px; flex: none; }
.ownerbar.none { box-shadow: inset 0 0 0 2px var(--teal); }

/* house planner */
.pcol { display: grid; justify-items: center; gap: .5rem; }
.stepper { display: flex; align-items: center; gap: .4rem; background: rgba(0,0,0,.35); border-radius: 99px; padding: .25rem; }
.stepper button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--gold); color: var(--ink); font-family: var(--display); font-size: 1.3rem; line-height: 1; box-shadow: 0 3px 0 var(--gold-dark); }
.stepper button:disabled { background: #555; box-shadow: none; }
.stepper span { min-width: 76px; text-align: center; font-weight: 900; }
.planbar { margin-top: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; background: rgba(255,255,255,.07); border-radius: 14px; padding: .8rem 1rem; font-weight: 800; font-size: 1.05rem; }
.planbar b { color: var(--gold); }
.planbar.bad span { color: #ffb3c1; }
.aout { margin-top: .3rem; font-weight: 800; color: #ffb3c1; }

/* ---------- overlays ---------- */
.scrim { position: fixed; inset: 0; background: rgba(20,2,8,.6); display: grid; place-items: center; z-index: 50; padding: 1rem; backdrop-filter: blur(2px); }
.modal {
  background: #2b0710;
  border-radius: 22px;
  box-shadow: 0 0 0 3px rgba(255,255,255,.08), 0 30px 80px rgba(0,0,0,.6);
  width: min(560px, 100%);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 1.3rem 1.4rem;
  position: relative;
}
.modal.wide { width: min(820px, 100%); }
.modal h2 { font-family: var(--display); font-weight: 400; font-size: 1.7rem; margin: 0 0 1rem; color: #fff; }
.modal .close { position: absolute; right: .8rem; top: .7rem; background: none; border: 0; color: var(--muted); font-size: 1.6rem; line-height: 1; padding: .2rem .4rem; }

.deed { background: #fff; color: var(--ink); border-radius: 14px; overflow: hidden; width: min(300px, 100%); margin: 0 auto; box-shadow: 6px 6px 0 rgba(0,0,0,.35); }
.deed-head { padding: .8rem; text-align: center; border-bottom: 2px solid var(--ink); }
.deed-head small { display: block; font-weight: 800; font-size: .75rem; opacity: .8; }
.deed-head b { font-family: var(--display); font-weight: 400; font-size: 1.45rem; }
.deed table { width: 100%; border-collapse: collapse; font-weight: 700; font-size: .9rem; }
.deed td { padding: .25rem .9rem; }
.deed td { text-align: left; }
.deed td:last-child { text-align: right; font-weight: 900; }
.deed tr.now td { background: #fff3c4; }
.deed .foot { padding: .5rem .9rem .8rem; font-size: .82rem; font-weight: 700; border-top: 1px dashed #c6c6d0; margin-top: .3rem; }
.deed-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 1rem; }

.manage-group { margin-bottom: 1rem; }
.manage-group h4 { margin: 0 0 .4rem; display: flex; align-items: center; gap: .5rem; font-weight: 900; }
.manage-group h4 i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; border: 1px solid rgba(0,0,0,.4); }
.mrow { display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: center; padding: .45rem .6rem; border-radius: 10px; background: rgba(255,255,255,.06); margin-bottom: 4px; }
.mrow .nm { font-weight: 800; }
.mrow .nm small { color: var(--muted); font-weight: 700; margin-left: .3rem; }
.mrow .btns { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }

.tradecols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 620px) { .tradecols { grid-template-columns: 1fr; } }
.tradecol { background: rgba(255,255,255,.06); border-radius: 14px; padding: .8rem; }
.tradecol h4 { margin: 0 0 .6rem; font-weight: 900; }
.tradecol label.pi { display: flex; align-items: center; gap: .5rem; padding: .3rem .2rem; font-weight: 700; font-size: .92rem; cursor: pointer; }
.tradecol label.pi i { width: 12px; height: 14px; border-radius: 2px; flex: none; border: 1px solid rgba(0,0,0,.4); }
.tradecol label.pi input { accent-color: var(--teal); width: 18px; height: 18px; }
.tradecol .cash { display: flex; align-items: center; gap: .5rem; margin-top: .6rem; font-weight: 800; }
.tradecol .cash input { width: 110px; border: 0; border-radius: 10px; padding: .45em .6em; font-weight: 800; }
.partners { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.partners button { border: 0; border-radius: 99px; padding: .35rem .8rem .35rem .35rem; background: rgba(255,255,255,.1); color: #fff; font-weight: 800; display: flex; align-items: center; gap: .4rem; }
.partners button.on { box-shadow: inset 0 0 0 2px var(--gold); background: rgba(255,255,255,.2); }
.partners .tok { width: 28px; height: 28px; font-size: 16px; box-shadow: none; }
.tradeview { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.tradeview ul { margin: 0; padding-left: 1.1rem; font-weight: 700; line-height: 1.6; }

/* auction */
.auction { width: min(420px, 100%); text-align: center; }
.auction .bidnow { font-family: var(--display); font-size: 3rem; color: var(--gold); line-height: 1; margin: .8rem 0 .2rem; }
.auction .bidder { font-weight: 800; color: var(--muted); min-height: 1.4em; }
.timer { height: 10px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; margin: 1rem 0; }
.timer i { display: block; height: 100%; background: var(--teal); width: 100%; }
.bidbtns { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem; margin-bottom: .6rem; }
.bidcustom { display: grid; grid-template-columns: 1fr auto; gap: .5rem; }
.bidcustom input { border: 0; border-radius: 12px; padding: .6em .8em; font-weight: 900; font-size: 1.05rem; }

/* win */
.winner { text-align: center; }
.winner .tok { width: 110px; height: 110px; font-size: 64px; margin: .5rem auto 1rem; }
.winner .sticker { font-size: 3rem; margin-bottom: 1rem; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* toasts */
#toasts { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: grid; gap: .5rem; z-index: 100; width: min(440px, 92vw); }
.toast { background: var(--ink); color: #fff; border-radius: 14px; padding: .75rem 1rem; font-weight: 800; box-shadow: 0 10px 30px rgba(0,0,0,.5); border-left: 5px solid var(--rose); animation: toastIn .25s ease-out; }
.toast.ok { border-left-color: var(--teal); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

.rules-list { line-height: 1.55; color: #f3dfe2; font-weight: 600; padding-left: 1.1rem; }
.rules-list li { margin-bottom: .35rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.topbar .row { gap: .3rem; flex-wrap: nowrap; }

.quitrow { justify-content: flex-end; }
.quitrow + .quitrow { margin-top: -.3rem; }

a.btn { text-decoration: none; display: inline-block; }
