/* FOUROPOLY — the 40-tile board, side panels and in-match modals. */

.table {
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr) minmax(290px, 370px);
  gap: clamp(10px, 1.3vw, 20px);
  padding: clamp(10px, 1.6vw, 22px);
  max-width: 1760px; margin: 0 auto;
  align-items: start;
}
.table__chat { min-width: 0; }

/* ── table chat ── */
.panel--chat { display: flex; flex-direction: column; height: clamp(320px, 62vh, 640px); }
.chatfeed {
  list-style: none; margin: 0; padding: 0; flex: 1; min-height: 0;
  overflow-y: auto; display: flex; flex-direction: column; gap: 6px;
  font-size: 12.5px;
}
.chatfeed li { display: grid; grid-template-columns: auto 1fr; gap: 6px; align-items: baseline; }
.chatfeed .who { font-weight: 600; color: var(--c, var(--brass)); white-space: nowrap; }
.chatfeed .msg { color: rgba(242,234,216,.85); word-break: break-word; }
.chatfeed li.is-you .msg { color: var(--felt); }
.chatbox { display: flex; gap: 6px; margin-top: 8px; }
.chatbox .input { flex: 1; background: rgba(0,0,0,.3); color: var(--felt); border-color: rgba(242,234,216,.2); }
.chatbox .input:focus { border-color: var(--brass); }

/* ── your-turn banner ── */
.turn-banner {
  position: sticky; top: 62px; z-index: 25;
  width: max-content; margin: 8px auto 0;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 18px; border-radius: 999px;
  background: linear-gradient(180deg, #e0bb3d, var(--brass));
  color: #221c07; font-weight: 600; font-size: 13px; letter-spacing: .06em;
  box-shadow: 0 6px 20px rgba(201,162,39,.4);
  animation: turnPop .35s var(--ease);
}
.turn-banner__dot {
  width: 9px; height: 9px; border-radius: 50%; background: #221c07;
  animation: turnBlink 1.1s ease-in-out infinite;
}
.turn-banner__time { font-variant-numeric: tabular-nums; }
.turn-banner.is-urgent { background: linear-gradient(180deg, #e06a5c, var(--down)); color: #fff; }
.turn-banner.is-urgent .turn-banner__dot { background: #fff; }
@keyframes turnPop { from { opacity: 0; transform: translateY(-8px) scale(.94); } }
@keyframes turnBlink { 50% { opacity: .25; } }
.table__board { display: grid; place-items: center; min-width: 0; }

/* ─────────── board grid ─────────── */

.board {
  width: min(100%, 92vh, 1080px);
  aspect-ratio: 1;
  display: grid;
  /* corners are wider, like a real board */
  grid-template-columns: 1.45fr repeat(9, 1fr) 1.45fr;
  grid-template-rows: 1.45fr repeat(9, 1fr) 1.45fr;
  gap: 2px;
  padding: 8px;
  background: linear-gradient(145deg, #1b4437, #0f2a21);
  border: 2px solid var(--brass);
  border-radius: 3px;
  box-shadow: 0 40px 90px rgba(0,0,0,.6), inset 0 0 70px rgba(0,0,0,.45);
  position: relative;
}

.board__center {
  grid-column: 2 / 11; grid-row: 2 / 11;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: clamp(8px, 1.4vw, 22px) clamp(8px, 1.4vw, 20px);
  gap: 8px; min-width: 0; overflow: hidden;
}
.board__logo { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.board__logo-mascot { width: clamp(34px, 4vw, 56px); height: auto; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
.board__logo-h {
  font-size: clamp(15px, 2.6vw, 34px);
  transform: rotate(-3deg);
}
.board__logo-sub {
  display: block; margin-top: 2px;
  font-size: clamp(7px, .85vw, 10px); letter-spacing: .2em; text-transform: uppercase;
  color: var(--brass);
}
.tape--center { width: 100%; height: 26px; border-radius: 2px; }
.tape--center .tape__item { font-size: 10.5px; }
.tape--center::before { background: linear-gradient(90deg, #143529, transparent); }
.tape--center::after { background: linear-gradient(270deg, #143529, transparent); }

/* drawn card */
.card-slot {
  width: min(100%, 340px); text-align: center;
  padding: 10px 14px; border-radius: 2px;
  background: linear-gradient(180deg, #fbf6ea, var(--felt));
  color: var(--ink);
  box-shadow: 0 10px 26px rgba(0,0,0,.45);
  animation: cardIn .35s var(--ease);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(-8px) rotate(-2deg); } }
.card-slot__deck { display: block; font-size: 9.5px; letter-spacing: .22em; color: var(--brass-dim); }
.card-slot__text { display: block; font-size: 12.5px; margin-top: 3px; }

/* dice — real pip faces with a 3D tumble on roll */
.dice-zone { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dice { display: flex; gap: 10px; perspective: 500px; }
.die {
  width: clamp(36px, 4.6vw, 54px); height: clamp(36px, 4.6vw, 54px);
  display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  padding: 15%; gap: 0;
  background: linear-gradient(150deg, #fefdf8, #e2d8c2);
  border-radius: 22%;
  box-shadow: 0 5px 0 #b3a88f, 0 12px 22px rgba(0,0,0,.45), inset 0 2px 3px rgba(255,255,255,.7);
  transform-style: preserve-3d;
}
.die i { display: grid; place-items: center; }
.die i::before {
  content: ""; width: 62%; height: 62%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3a352b, #16130f);
  transform: scale(0); transition: transform .1s var(--ease);
}
.die i.on::before { transform: scale(1); }
.die.is-rolling { animation: dieTumble .6s cubic-bezier(.3,.7,.3,1); }
@keyframes dieTumble {
  0%   { transform: rotateX(0) rotateY(0) scale(1); }
  25%  { transform: rotateX(220deg) rotateY(140deg) scale(1.18); }
  55%  { transform: rotateX(400deg) rotateY(300deg) scale(1.1); }
  100% { transform: rotateX(720deg) rotateY(360deg) scale(1); }
}
.dice-actions { display: flex; gap: 8px; align-items: center; }
.btn--roll { padding: 10px 24px; }
.dice-hint {
  margin: 0; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(242,234,216,.5); text-align: center;
}

/* ─────────── tiles ─────────── */

.tile {
  position: relative;
  background: linear-gradient(180deg, #fbf6ea, var(--felt));
  color: var(--ink);
  display: flex; overflow: visible;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
  transition: transform .14s var(--ease), box-shadow .14s var(--ease);
  min-width: 0; min-height: 0;
}
.tile:hover, .tile:focus-visible { transform: scale(1.04); z-index: 20; box-shadow: 0 8px 20px rgba(0,0,0,.5); outline: none; }
.tile:focus-visible { box-shadow: 0 0 0 2px var(--brass), 0 8px 20px rgba(0,0,0,.5); }
.tile.is-here { box-shadow: 0 0 0 2px var(--brass), 0 8px 22px rgba(201,162,39,.45); z-index: 10; }
.tile.is-target { animation: targetPulse 1.2s ease-in-out infinite; z-index: 12; }
@keyframes targetPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(201,162,39,.5); }
  50% { box-shadow: 0 0 0 5px rgba(201,162,39,.18); }
}
.tile.is-mortgaged { filter: grayscale(.75) brightness(.9); }
.tile.is-mortgaged::before {
  content: "MORTGAGED";
  position: absolute; inset: auto 0 40% 0; z-index: 6;
  font-size: 6px; letter-spacing: .1em; text-align: center;
  color: var(--down); transform: rotate(-12deg);
}

/* the colour bar sits on the inner edge, so it always faces the centre */
.tile__bar { background: var(--c); flex: none; position: relative; }
.tile--bottom { flex-direction: column; }
.tile--bottom .tile__bar { height: 18%; order: -1; }
.tile--top { flex-direction: column-reverse; }
.tile--top .tile__bar { height: 18%; }
.tile--left { flex-direction: row-reverse; }
.tile--left .tile__bar { width: 18%; }
.tile--right { flex-direction: row; }
.tile--right .tile__bar { width: 18%; }

.tile__body {
  flex: 1; min-width: 0; min-height: 0;
  padding: 3px 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; text-align: center; overflow: hidden;
}
.tile__ticker {
  font-family: Anton, "Arial Narrow", sans-serif;
  font-size: clamp(6px, .82vw, 11px); letter-spacing: .02em; line-height: 1;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tile__name {
  font-size: clamp(4.5px, .58vw, 8px); line-height: 1.05;
  color: rgba(22,19,15,.62);
  max-width: 100%; overflow: hidden;
}
.tile__price { font-size: clamp(5px, .62vw, 8.5px); font-weight: 600; }
.tile__note { font-size: clamp(4.5px, .55vw, 7.5px); color: rgba(22,19,15,.55); }

/* SVG icon per tile, tinted with the tile colour */
.tile__icon { color: var(--c); line-height: 0; margin-bottom: 1px; }
.tile__icon svg { width: clamp(13px, 1.9vw, 26px); height: clamp(13px, 1.9vw, 26px); display: block; }
.tile__icon--infra { color: #47606a; }
.tile__icon--special { color: var(--ink); opacity: .82; }
.tile__body--special .tile__name {
  font-family: Anton, sans-serif; font-size: clamp(6px, .85vw, 12px);
  color: var(--ink); letter-spacing: .02em;
}

/* corners get more room */
.tile--corner .tile__icon svg { width: clamp(20px, 2.8vw, 38px); height: clamp(20px, 2.8vw, 38px); }
.tile--corner .tile__name { font-size: clamp(7px, 1vw, 14px); }
.tile--go .tile__icon--special { color: var(--up); opacity: 1; }
.tile--jail .tile__icon--special, .tile--go-to-jail .tile__icon--special { color: var(--down); opacity: 1; }
.tile--go { background: linear-gradient(150deg, #d8cba8, var(--felt)); }
.tile--jail { background: linear-gradient(150deg, #e6bdb6, var(--felt)); }
.tile--go-to-jail { background: linear-gradient(150deg, #e0b0a8, var(--felt)); }
.tile--free-parking { background: linear-gradient(150deg, #c9cfc4, var(--felt)); }
.tile--chance, .tile--community-chest { background: linear-gradient(150deg, #e8dcc0, var(--felt)); }

/* ownership flag */
.tile__flag {
  position: absolute; top: 0; right: 0; width: 7px; height: 7px; z-index: 5;
  transition: background .2s;
}
.tile--left .tile__flag, .tile--top .tile__flag { top: auto; bottom: 0; }

/* houses and hotels */
.tile__pips {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; gap: 2px;
}
.pip {
  width: clamp(3px, .42vw, 6px); height: clamp(3px, .42vw, 6px);
  background: #2f8f52; border: .5px solid rgba(0,0,0,.4); border-radius: 1px;
}
.pip--hotel {
  width: clamp(7px, .9vw, 13px); height: clamp(4px, .5vw, 7px);
  background: #c2382b; border-radius: 1px;
}

/* ── animated token layer ── */
.token-layer { position: absolute; inset: 0; pointer-events: none; z-index: 15; }
/* Pieces sit on top of the tile art, so hovering one fades it out and lets
   you read the property you are about to buy. */
.ptoken { pointer-events: auto; cursor: help; }
.ptoken:hover { opacity: .18; }
.ptoken:hover .ptoken__disc { animation: none; }
.ptoken {
  position: absolute; top: 0; left: 0;
  width: clamp(20px, 2.6vw, 34px); height: clamp(20px, 2.6vw, 34px);
  margin: calc(clamp(20px, 2.6vw, 34px) / -2) 0 0 calc(clamp(20px, 2.6vw, 34px) / -2);
  transition: transform .55s cubic-bezier(.34, 1.28, .5, 1);
  will-change: transform;
}
.ptoken__disc {
  display: grid; place-items: center; width: 100%; height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 32%, color-mix(in srgb, var(--c) 55%, #fff) 0%, var(--c) 70%);
  border: 2px solid #10160a;
  box-shadow: 0 3px 6px rgba(0,0,0,.5), 0 0 0 2px rgba(255,255,255,.25) inset;
}
.ptoken__disc img { width: 78%; height: 78%; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0,0,0,.4)); }
.ptoken__disc svg { width: 66%; height: 66%; color: #10160a; }
.ptoken.is-turn { z-index: 18; }
.ptoken.is-turn .ptoken__disc {
  box-shadow: 0 3px 8px rgba(0,0,0,.5), 0 0 0 2px rgba(255,255,255,.3) inset, 0 0 0 3px var(--c);
  animation: tokenPulse 1.4s ease-in-out infinite;
}
@keyframes tokenPulse {
  0%, 100% { box-shadow: 0 3px 8px rgba(0,0,0,.5), 0 0 0 2px rgba(255,255,255,.3) inset, 0 0 0 3px var(--c); }
  50% { box-shadow: 0 3px 8px rgba(0,0,0,.5), 0 0 0 2px rgba(255,255,255,.3) inset, 0 0 0 6px color-mix(in srgb, var(--c) 30%, transparent); }
}
.ptoken.is-hop .ptoken__disc { animation: tokenHop .55s var(--ease); }
@keyframes tokenHop {
  0% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-9px) scale(1.12); }
  100% { transform: translateY(0) scale(1); }
}

/* hover card */
.tile__tip {
  position: absolute; z-index: 40; left: 50%; bottom: 105%;
  transform: translateX(-50%) scale(.96);
  width: max-content; max-width: 210px;
  padding: 8px 10px; font-size: 10.5px; line-height: 1.45;
  background: var(--ink); color: var(--felt);
  border-left: 3px solid var(--c);
  box-shadow: 0 12px 30px rgba(0,0,0,.55);
  opacity: 0; pointer-events: none; transition: .15s var(--ease);
}
.tile:hover .tile__tip, .tile:focus-visible .tile__tip { opacity: 1; transform: translateX(-50%) scale(1); }
.tile--top .tile__tip { bottom: auto; top: 105%; }
.tile--left .tile__tip { left: 105%; bottom: auto; top: 50%; transform: translateY(-50%) scale(.96); }
.tile--left:hover .tile__tip { transform: translateY(-50%) scale(1); }
.tile--right .tile__tip { left: auto; right: 105%; bottom: auto; top: 50%; transform: translateY(-50%) scale(.96); }
.tile--right:hover .tile__tip { transform: translateY(-50%) scale(1); }
.tile__tip b { color: var(--brass); }

/* ─────────── side panels ─────────── */

.table__side { display: grid; gap: 10px; min-width: 0; }
.panel {
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(242,234,216,.14);
  border-radius: 3px;
  padding: 11px 12px;
}
.panel__title {
  font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(242,234,216,.5); margin-bottom: 8px;
}

.pcard {
  display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center;
  padding: 8px 9px; border-radius: 2px; margin-bottom: 5px;
  background: rgba(242,234,216,.05);
  border-left: 3px solid var(--c, var(--brass));
  transition: .2s var(--ease);
}
.pcard:last-child { margin-bottom: 0; }
.pcard.is-turn { background: rgba(201,162,39,.16); box-shadow: 0 0 0 1px rgba(201,162,39,.4); }
.pcard.is-out { opacity: .4; filter: grayscale(1); }
.pcard__ava {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 32%, color-mix(in srgb, var(--c) 45%, #fff), var(--c));
  border: 1.5px solid #10160a;
  box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.pcard__ava svg { width: 66%; height: 66%; color: #10160a; }

/* inline avatar glyph (auctions, results, profile) */
.ava { display: inline-flex; width: 1.2em; height: 1.2em; vertical-align: -.24em; }
.ava svg { width: 100%; height: 100%; }
.ava--lg { width: 1.5em; height: 1.5em; vertical-align: -.3em; }
.bico { width: 11px; height: 11px; vertical-align: -1px; margin-left: 1px; }
.bico--house { color: #2f8f52; }
.bico--hotel { color: #c2382b; }
.fair__die { width: 13px; height: 13px; vertical-align: -2px; margin-right: 2px; }
.pcard__name { font-size: 12.5px; font-weight: 500; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pcard__name .tag {
  font-size: 8px; letter-spacing: .08em; padding: 1px 3px;
  border: 1px solid currentColor; color: rgba(242,234,216,.45);
}
.pcard__name .tag--jail { color: #f0a79e; }
.pcard__sets { display: flex; gap: 2px; margin-top: 3px; flex-wrap: wrap; }
.pcard__set { width: 12px; height: 5px; border-radius: 1px; background: var(--c); }
.pcard__meta { font-size: 9.5px; color: rgba(242,234,216,.45); margin-top: 2px; }
.pcard__money { text-align: right; }
.pcard__cash { font-size: 14px; font-weight: 600; color: var(--brass); }
.pcard__nw { font-size: 9px; color: rgba(242,234,216,.45); }

/* portfolio / manage */
.manage-list { display: grid; gap: 4px; max-height: 26vh; overflow-y: auto; }
.mrow {
  display: grid; grid-template-columns: 4px 1fr auto; gap: 7px; align-items: center;
  padding: 5px 7px; background: rgba(242,234,216,.05); border-radius: 2px;
  font-size: 11.5px;
}
.mrow__bar { align-self: stretch; background: var(--c); border-radius: 1px; }
.mrow__t { font-weight: 500; }
.mrow__sub { font-size: 9px; color: rgba(242,234,216,.45); }
.mrow__acts { display: flex; gap: 3px; }
.mini {
  font-family: inherit; font-size: 9.5px; padding: 3px 6px; cursor: pointer;
  background: transparent; color: var(--felt); border-radius: 2px;
  border: 1px solid rgba(242,234,216,.3);
}
.mini:hover:not(:disabled) { background: rgba(242,234,216,.12); }
.mini:disabled { opacity: .3; cursor: not-allowed; }
.mini--build { border-color: #2f8f52; color: #8fe0b0; }
.mini--sell { border-color: var(--down); color: #f0a79e; }
.btn--wide { width: 100%; margin-top: 7px; }
.empty--sm { padding: 12px 8px; font-size: 11px; }

.logfeed {
  list-style: none; margin: 0; padding: 0; max-height: 26vh; overflow-y: auto;
  font-size: 11.5px; display: flex; flex-direction: column-reverse;
}
.logfeed li { padding: 4px 0; border-bottom: 1px solid rgba(242,234,216,.07); color: rgba(242,234,216,.72); }
.logfeed li.k-roll { color: var(--felt); }
.logfeed li.k-rent { color: #f0a79e; }
.logfeed li.k-buy { color: #7ed6a8; }
.logfeed li.k-build { color: #8fe0b0; }
.logfeed li.k-go { color: var(--brass); }
.logfeed li.k-jail { color: #f0a79e; }
.logfeed li.k-card { color: #e6d08a; }
.logfeed li.k-auction { color: #b9c7ff; }
.logfeed li.k-trade { color: #d9b3ff; }
.logfeed li.k-bust { color: var(--down); font-weight: 600; }
.logfeed li.k-end { color: var(--brass); font-weight: 600; }
.logfeed li.k-mortgage { color: #cbb68a; }
.logfeed li.k-system, .logfeed li.k-timeout, .logfeed li.k-info { color: rgba(242,234,216,.38); font-size: 10.5px; }

.turnbar { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.turnbar__label { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: rgba(242,234,216,.45); }
.turnbar__who { font-family: var(--display); font-size: 15px; letter-spacing: .03em; }
.turnbar__round { font-size: 11px; color: rgba(242,234,216,.5); }
.turnbar__timer { font-size: 11.5px; color: var(--brass); }
.turnbar.is-you .turnbar__who { color: var(--brass); }
.fair { font-size: 10px; color: rgba(242,234,216,.45); }
.fair .mono { color: rgba(242,234,216,.7); }

/* ─────────── modals ─────────── */

.modal {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; padding: 16px;
  background: rgba(6,18,14,.75); backdrop-filter: blur(3px);
  animation: screenIn .2s var(--ease);
}
.modal__card {
  width: min(430px, 100%);
  background: linear-gradient(180deg, #fbf6ea, var(--felt));
  color: var(--ink);
  border-radius: 3px; overflow: hidden;
  box-shadow: var(--paper-shadow);
  position: relative;
}
.modal__card--wide { width: min(640px, 100%); }
.modal__stripe {
  background: var(--c, var(--brass)); color: #fff;
  padding: 7px 14px; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase;
}
.modal__stripe--auction { background: #2B4C7E; }
.modal__stripe--trade { background: #6B4C9A; }
.modal__stripe--jail { background: #C2382B; }
.modal__name { font-size: 30px; padding: 14px 18px 0; line-height: 1; }
.modal__units { padding: 5px 18px 0; font-size: 12px; color: rgba(22,19,15,.6); }
.modal__rows { padding: 12px 18px 4px; }
.modal__row {
  display: flex; justify-content: space-between; gap: 12px; padding: 5px 0;
  font-size: 12.5px; border-bottom: 1px solid rgba(22,19,15,.1);
}
.modal__row b { font-size: 14px; }
.modal__row--calc { border-bottom: 0; font-size: 11px; color: rgba(22,19,15,.5); display: block; padding-top: 7px; }
.modal__actions { display: flex; gap: 9px; padding: 12px 18px 16px; }
.modal__actions .btn { flex: 1; }
.modal__timer { height: 3px; background: rgba(22,19,15,.12); }
.modal__timer div { height: 100%; background: var(--brass); width: 100%; }

/* auction */
.auction-state { padding: 12px 18px 0; }
.auction-state__bid { display: flex; align-items: baseline; gap: 9px; }
.auction-state__bid b { font-size: 26px; }
.auction-state__bid .muted { color: rgba(22,19,15,.5); font-size: 11px; }
.auction-state__bid .mono { font-size: 11px; color: rgba(22,19,15,.6); }
.auction-bidders { display: flex; gap: 5px; margin-top: 9px; flex-wrap: wrap; }
.abidder {
  font-size: 10.5px; padding: 3px 7px; border-radius: 2px;
  border: 1px solid rgba(22,19,15,.25); color: rgba(22,19,15,.7);
}
.abidder.is-turn { border-color: var(--brass-dim); background: rgba(201,162,39,.2); font-weight: 600; }
.abidder.is-out { opacity: .35; text-decoration: line-through; }
.auction-controls { display: flex; gap: 7px; padding: 12px 18px 14px; }
.auction-controls .input { flex: 1; }
.input--sm { padding: 8px 10px; font-size: 13px; background: rgba(22,19,15,.06); color: var(--ink); border-color: rgba(22,19,15,.25); }
.input--sm:focus { border-color: var(--brass-dim); }

/* trade */
.trade-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px 18px 0; }
.trade-h { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: rgba(22,19,15,.55); margin-bottom: 6px; }
.trade-list { display: grid; gap: 3px; max-height: 210px; overflow-y: auto; }
.trade-item {
  display: flex; align-items: center; gap: 6px; padding: 4px 6px;
  font-size: 11.5px; border: 1px solid rgba(22,19,15,.15); border-radius: 2px; cursor: pointer;
}
.trade-item input { accent-color: var(--brass-dim); }
.trade-item.is-on { background: rgba(201,162,39,.2); border-color: var(--brass-dim); }
.trade-item i { width: 4px; height: 14px; background: var(--c); border-radius: 1px; }
.trade-partner {
  display: grid; grid-template-columns: auto 1fr auto 110px; gap: 8px;
  align-items: center; padding: 12px 18px 0; font-size: 11.5px;
}
.trade-partner .muted { color: rgba(22,19,15,.55); }

/* ─────────── responsive ─────────── */

@media (max-width: 1400px) {
  .table { grid-template-columns: minmax(0, 1fr) minmax(280px, 350px); }
  .table__chat { grid-column: 1 / -1; order: 3; }
  .panel--chat { height: 260px; }
}
@media (max-width: 1180px) {
  .table { grid-template-columns: 1fr; }
  .board { width: min(100%, 94vw, 760px); }
  .table__side { grid-template-columns: 1fr 1fr; display: grid; }
  .panel--log { grid-column: 1 / -1; }
  .logfeed, .manage-list { max-height: 200px; }
}
@media (max-width: 760px) {
  .table__side { grid-template-columns: 1fr; }
  .board { padding: 5px; gap: 1px; }
  .board__logo-h { font-size: 19px; }
  .tape--center, .tile__name, .tile__price { display: none; }
  .turnbar { display: none; }
  .trade-grid { grid-template-columns: 1fr; }
  .trade-partner { grid-template-columns: 1fr 1fr; }
}

/* ── board skins ────────────────────────────────────────────────────────
   Purely local: each player sees their own table. The felt, the tile paper
   and the ink move together, so a skin reads as one surface rather than a
   recoloured overlay. */
.board[data-skin="paper"] {
  background: linear-gradient(145deg, #d9cdae, #c6b894);
  border-color: #8a6f2e;
}
.board[data-skin="paper"] .tile { background: #fbf6e8; }
.board[data-skin="paper"] .tile--corner { background: linear-gradient(150deg, #efe4c6, #fbf6e8); }

.board[data-skin="midnight"] {
  background: linear-gradient(150deg, #161b2e, #0a0d18);
  border-color: #4b5db8;
}
.board[data-skin="midnight"] .tile { background: #e6e8f2; }
.board[data-skin="midnight"] .tile--corner { background: linear-gradient(150deg, #c9cee6, #e6e8f2); }

.board[data-skin="terminal"] {
  background: linear-gradient(150deg, #071009, #030703);
  border-color: #2fdc6a;
}
.board[data-skin="terminal"] .tile { background: #0c1a10; }
.board[data-skin="terminal"] .tile--corner { background: linear-gradient(150deg, #123020, #0c1a10); }
.board[data-skin="terminal"] .tile__ticker,
.board[data-skin="terminal"] .tile__price,
.board[data-skin="terminal"] .tile__name,
.board[data-skin="terminal"] .tile__note { color: #46f08a; }
.board[data-skin="terminal"] .tile__icon { color: #46f08a; }
.board[data-skin="terminal"] .tile__icon--special { color: #46f08a; opacity: .9; }

/* the piece finishes, shared with the skins preview */
.ptoken__disc.fin-metal {
  background: linear-gradient(145deg, #fff 0%, var(--c) 45%, rgba(0,0,0,.45) 100%);
  box-shadow: inset 0 1px 2px rgba(255,255,255,.7), 0 3px 0 rgba(0,0,0,.4);
}
.ptoken__disc.fin-neon {
  background: #10160a; border-color: var(--c);
  box-shadow: 0 0 10px var(--c), inset 0 0 8px var(--c);
}
.ptoken__disc.fin-neon svg { color: var(--c); }
.ptoken__disc.fin-glass {
  background: color-mix(in srgb, var(--c) 45%, transparent);
  border-color: color-mix(in srgb, var(--c) 75%, white 25%);
  box-shadow: inset 0 2px 6px rgba(255,255,255,.45), 0 3px 0 rgba(0,0,0,.3);
}

.board[data-skin="rosewood"] {
  background: linear-gradient(150deg, #4a2418, #2a130c);
  border-color: #c98b3f;
}
.board[data-skin="rosewood"] .tile { background: #f6ead6; }
.board[data-skin="rosewood"] .tile--corner { background: linear-gradient(150deg, #e6d2b0, #f6ead6); }

.board[data-skin="ice"] {
  background: linear-gradient(150deg, #1b3a4b, #0d1f2a);
  border-color: #7fd8f0;
}
.board[data-skin="ice"] .tile { background: #eef7fb; }
.board[data-skin="ice"] .tile--corner { background: linear-gradient(150deg, #cfe8f2, #eef7fb); }

.board[data-skin="sand"] {
  background: linear-gradient(150deg, #6b5a34, #3d3320);
  border-color: #e3c46a;
}
.board[data-skin="sand"] .tile { background: #fdf6e0; }
.board[data-skin="sand"] .tile--corner { background: linear-gradient(150deg, #f0e2ba, #fdf6e0); }

.board[data-skin="vapor"] {
  background: linear-gradient(150deg, #2a1240, #120720);
  border-color: #ff6ec7;
}
.board[data-skin="vapor"] .tile { background: #f4e9ff; }
.board[data-skin="vapor"] .tile--corner { background: linear-gradient(150deg, #dcc4f2, #f4e9ff); }
.board[data-skin="vapor"] .tile__ticker { color: #6c2b8f; }
