/* BGF Cabinet — desktop dashboard styles
 * --------------------------------------------------------------
 * 12-col layout: sidebar 280 / main flex / rail 280
 * Heavy on 8-bit interactions: hover-lift, JOIN animation, ticker.
 */

:root {
  --cab-sidebar: 280px;
  --cab-rail:    280px;
  --cab-gutter:  20px;
  --accent:      var(--green-500);
  --accent-deep: var(--green-700);
  --accent-tint: var(--green-100);
}

html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); }
* { box-sizing: border-box; }
a { color: inherit; text-decoration: none; }
img.pix, .pix-img { image-rendering: pixelated; image-rendering: crisp-edges; }
button { font-family: inherit; -webkit-tap-highlight-color: transparent; }

/* ─────────────────────  TOP BAR  ───────────────────── */
.cab-top {
  position: sticky; top: 0; z-index: 50;
  /* Fixed height so the bar is the same on every page (no per-page jump).
   * Just height + min-height: tall children are vertically centered, never
   * stretch the bar. No max-height/flex-basis here — those broke the
   * horizontal flex layout on mobile and pushed top-actions out of the bar. */
  height: 64px;
  min-height: 64px;
  box-sizing: border-box;
  background: var(--bg);
  border-bottom: 2px solid var(--ink);
  display: flex; align-items: center; padding: 0 24px;
  gap: 24px;
}
.cab-top .brand { display: flex; align-items: center; gap: 12px; }
.cab-top .brand .mark {
  width: 36px; height: 36px; background: var(--accent);
  border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
}
.cab-top .brand .mark img { height: 22px; }
/* Full BGF wordmark logo (cropped from design/logo.jpg, white bg removed).
 * Height is tied to the top-bar height (not a fixed px) so the logo renders
 * at a consistent size across every page/breakpoint — see cabinet-shell.css. */
.cab-top .brand { align-self: stretch; }
.cab-top .brand .word {
  height: auto;
  max-height: calc(100% - 20px);
  width: auto;
  image-rendering: pixelated;
}
.cab-top .crumb {
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  display: inline-flex; gap: 8px; align-items: center;
}
.cab-top .crumb .sep { color: var(--ink-3); }
.cab-top .crumb b { color: var(--ink); font-weight: 400; }
.cab-top .spacer { flex: 1; }
.cab-top .search {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
  padding: 8px 12px;
  width: 280px;
}
.cab-top .search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: -2px; right: -2px;
  z-index: 30;
  background: var(--surface);
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  max-height: 360px;
  overflow-y: auto;
  font-family: var(--font-body);
}
.cab-top .search-dropdown .sd-section {
  padding: 6px 12px 2px;
  font-family: var(--font-pixel); font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-transform: uppercase;
  border-top: 1px solid var(--ink-3);
}
.cab-top .search-dropdown .sd-section:first-child { border-top: 0; }
.cab-top .search-dropdown .sd-row {
  display: block;
  padding: 8px 12px;
  cursor: pointer;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  color: var(--ink);
  font-family: inherit;
}
.cab-top .search-dropdown .sd-row:hover { background: var(--bg-2); }
.cab-top .search-dropdown .sd-row .sd-title { font-size: 14px; }
.cab-top .search-dropdown .sd-row .sd-meta {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-3);
  margin-top: 2px;
}
.cab-top .search-dropdown .sd-empty {
  padding: 12px; color: var(--ink-3); font-size: 13px;
}
.cab-top .search input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-family: var(--font-body); font-size: 14px;
  color: var(--ink);
}
.cab-top .search input::placeholder { color: var(--ink-3); }
.cab-top .search kbd {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-3);
  background: var(--bg-2); padding: 2px 6px; border: 1.5px solid var(--ink-3);
}
.cab-top .top-actions { display: inline-flex; gap: 10px; align-items: center; }
.cab-top .theme-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
  cursor: pointer;
  font-family: var(--font-pixel); font-size: 8px; letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 90ms steps(2), box-shadow 90ms steps(2);
}
.cab-top .theme-toggle:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.cab-top .theme-toggle:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }
.cab-top .theme-toggle__dot {
  display: inline-block; width: 8px; height: 8px;
  background: var(--green-500); border: 1px solid var(--ink);
}
.cab-top .icon-btn {
  position: relative;
  width: 40px; height: 40px;
  background: var(--surface);
  border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 90ms steps(2), box-shadow 90ms steps(2);
}
.cab-top .icon-btn:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.cab-top .icon-btn .pip {
  position: absolute; top: -4px; right: -4px;
  background: var(--red-500); color: #fff;
  font-family: var(--font-pixel); font-size: 7px;
  padding: 3px 4px; min-width: 14px; text-align: center;
  border: 1.5px solid var(--ink);
  letter-spacing: 0.04em;
}
.cab-top .me {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 4px 10px 4px 4px;
  background: var(--surface);
  border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
  cursor: pointer;
}
.cab-top .me .av {
  width: 32px; height: 32px; background: var(--purple-500);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-pixel); font-size: 10px;
  border: 1.5px solid var(--ink);
}
.cab-top .me .n { font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.04em; }
.cab-top .me .c { font-family: var(--font-mono); font-size: 13px; color: var(--ink-3); }

/* ─────────────────────  GRID  ───────────────────── */
.cab-shell {
  display: grid;
  grid-template-columns: var(--cab-sidebar) 1fr var(--cab-rail);
  gap: var(--cab-gutter);
  padding: var(--cab-gutter);
  min-height: calc(100vh - 64px);
  min-height: calc(100dvh - 64px);
  max-width: 1600px;
  margin: 0 auto;
}
@media (max-width: 1280px) {
  .cab-shell { grid-template-columns: var(--cab-sidebar) 1fr; }
  .cab-rail { display: none; }
}
@media (max-width: 880px) {
  .cab-shell { grid-template-columns: 1fr; }
  .cab-sidebar { display: none; }
}

/* ─────────────────────  PANELS  ───────────────────── */
.panel {
  background: var(--surface);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.panel + .panel { margin-top: var(--cab-gutter); }
.panel-head {
  padding: 14px 16px;
  border-bottom: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  background: var(--bg-2);
}
.panel-head h3 {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: 10px; letter-spacing: 0.08em; color: var(--ink);
}
.panel-head .sub {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-3);
}
.panel-body { padding: 16px; }
.panel-body.tight { padding: 12px; }

/* ─────────────────────  SIDEBAR  ───────────────────── */
.profile-card {
  display: flex; flex-direction: column; gap: 14px;
}
.profile-id {
  display: flex; align-items: center; gap: 12px;
}
.profile-id .big-av {
  width: 56px; height: 56px;
  background: var(--purple-500);
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 16px;
  flex-shrink: 0;
}
.profile-id .who .name {
  font-family: var(--font-pixel); font-size: 12px; color: var(--ink); margin-bottom: 4px;
}
.profile-id .who .meta {
  font-family: var(--font-mono); font-size: 14px; color: var(--ink-2);
}
.profile-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px;
}
.stat-tile {
  background: var(--bg-2);
  border: 2px solid var(--ink);
  padding: 10px;
  text-align: center;
}
.stat-tile.heat { background: var(--accent-tint); }
.stat-tile .n {
  font-family: var(--font-pixel); font-size: 18px;
  color: var(--accent-deep); line-height: 1;
  display: block; margin-bottom: 6px;
}
.stat-tile .l {
  font-family: var(--font-pixel);
  font-size: 7px; letter-spacing: 0.08em; color: var(--ink-2);
  line-height: 1.3;
}

.rep-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px;
  background: var(--bg-2); border: 2px solid var(--ink);
}
.rep-row + .rep-row { margin-top: 6px; }
.rep-row .ln { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body); font-size: 13px; color: var(--ink); }
.rep-row .ln i { width: 14px; height: 14px; }
.rep-row .num { font-family: var(--font-pixel); font-size: 11px; color: var(--ink); }
.rep-row.good .num { color: var(--green-700); }
.rep-row.warn .num { color: var(--yellow-700); }
.rep-row.bad  .num { color: var(--red-700); }

.fav-game {
  display: flex; align-items: center; gap: 10px;
  padding: 8px;
  background: var(--bg-2); border: 2px solid var(--ink);
}
.fav-game + .fav-game { margin-top: 6px; }
.fav-game .cv {
  width: 28px; height: 28px; flex-shrink: 0;
  border: 2px solid var(--ink); display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-pixel); font-size: 9px;
}
.fav-game .name { font-family: var(--font-body); font-size: 13px; color: var(--ink); font-weight: 600; }
.fav-game .meta { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }

/* ─────────────────────  MAIN: FEED  ───────────────────── */
.feed-header {
  margin-bottom: 16px;
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.feed-header h1 {
  font-family: var(--font-pixel);
  font-size: 24px;
  letter-spacing: 0.02em;
  margin: 0 0 6px;
  color: var(--ink);
}
.feed-header .sub {
  font-family: var(--font-body); font-size: 14px; color: var(--ink-2);
  margin: 0;
}
.feed-header .cta-row {
  display: inline-flex; gap: 10px;
}

/* CREATE-CTA — substantial "СОЗДАТЬ СТОЛ" pill in the feed header.
   v3 (bitup-soft) overrides this with a richer split-pill look. */
.create-cta {
  display: inline-flex; align-items: stretch;
  background: var(--accent); color: #fff;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  text-decoration: none;
  font-family: var(--font-pixel, 'Press Start 2P', monospace);
  overflow: hidden;
  cursor: pointer;
  transition: transform 90ms steps(2, end), box-shadow 90ms steps(2, end);
}
.create-cta:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.create-cta:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.create-cta .cc-plus {
  display: flex; align-items: center; justify-content: center;
  width: 40px; background: var(--ink); color: #fff;
}
.create-cta .cc-text {
  display: flex; flex-direction: column; justify-content: center; gap: 3px;
  padding: 8px 14px 8px 10px; line-height: 1;
}
/* line-height > 1 so the pixel label doesn't collapse line-to-line when it
 * wraps to two lines on narrow (mobile) widths. */
.create-cta .cc-lbl { font-size: 10px; letter-spacing: 0.10em; line-height: 1.4; color: #fff; }
.create-cta .cc-sub {
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 10px; font-weight: 500; color: rgba(255,255,255,0.78);
  text-transform: lowercase;
}

.filter-bar {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 12px; background: var(--surface);
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  margin-bottom: 18px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px;
  background: var(--surface);
  border: 2px solid var(--ink);
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.04em;
  color: var(--ink);
  cursor: pointer;
  transition: transform 90ms steps(2), box-shadow 90ms steps(2), background 90ms steps(2);
  text-transform: uppercase;
}
.chip:hover { background: var(--bg-2); }
.chip.on {
  background: var(--accent); color: #fff;
  box-shadow: 2px 2px 0 var(--ink);
  transform: translate(-1px, -1px);
}
.chip .n {
  background: rgba(0,0,0,0.18);
  padding: 1px 4px;
  font-size: 8px;
}
.chip.on .n { background: rgba(255,255,255,0.22); }

/* ── Filter dropdown (mobile only, v3) — ported 1:1 from design v3
 * (cabinet-styles.css .filter-dd). A custom dropdown that replaces the chip
 * row ≤880px so it never overflows the narrow layout. Scoped to [data-skin]
 * so the v1 feed (default skin, no .filter-dd markup) keeps its chip row. */
.filter-dd { display: none; position: relative; margin-bottom: 18px; }
.filter-dd-trigger {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; gap: 10px;
  padding: 13px 14px;
  background: var(--surface);
  border: 2px solid var(--ink);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.filter-dd-trigger .fdd-lead { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.filter-dd-trigger .fdd-kicker {
  font-family: var(--font-pixel); font-size: 8px; letter-spacing: 0.08em;
  color: var(--ink-3, rgba(0,0,0,0.45)); text-transform: uppercase;
}
.filter-dd-trigger .fdd-label {
  font-family: var(--font-pixel); font-size: 11px; letter-spacing: 0.04em;
  text-transform: uppercase; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.filter-dd-trigger .fdd-tail { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.filter-dd-trigger .n {
  background: rgba(0,0,0,0.18); padding: 1px 5px; font-size: 8px;
  font-family: var(--font-pixel);
}
.filter-dd-trigger .fdd-caret { transition: transform 140ms ease; }
.filter-dd.open .filter-dd-trigger .fdd-caret { transform: rotate(180deg); }

.filter-dd-scrim {
  position: fixed; inset: 0; z-index: 40;
}
.filter-dd-menu {
  position: absolute; z-index: 41;
  top: calc(100% + 6px); left: 0; right: 0;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  overflow: hidden;
}
.fdd-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 13px 14px;
  background: var(--surface);
  border: none; border-bottom: 1.5px solid rgba(0,0,0,0.10);
  color: var(--ink); cursor: pointer; text-align: left;
}
.fdd-item:last-child { border-bottom: none; }
.fdd-item .fdd-item-icon { flex: 0 0 auto; color: var(--ink-2, currentColor); }
.fdd-item .fdd-item-label {
  flex: 1 1 auto;
  font-family: var(--font-pixel); font-size: 10px; letter-spacing: 0.04em;
  text-transform: uppercase;
}
.fdd-item .n {
  background: rgba(0,0,0,0.16); padding: 1px 5px; font-size: 8px;
  font-family: var(--font-pixel); flex: 0 0 auto;
}
.fdd-item .fdd-item-check { flex: 0 0 auto; color: var(--accent); }
.fdd-item:active { background: var(--bg-2); }
.fdd-item.on { background: var(--accent); color: #fff; }
.fdd-item.on .fdd-item-icon,
.fdd-item.on .fdd-item-check { color: #fff; }
.fdd-item.on .n { background: rgba(255,255,255,0.24); }

/* mobile: dropdown replaces the chip row (v3 skins only) */
@media (max-width: 880px) {
  [data-skin] .filter-bar { display: none; }
  [data-skin] .filter-dd  { display: block; }
}

/* ─────────────────────  TABLE CARDS  ───────────────────── */
.feed {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 1100px) { .feed { grid-template-columns: 1fr; } }

.t-card {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 18px;
  cursor: pointer;
  transition: transform 120ms steps(3), box-shadow 120ms steps(3), background 200ms steps(4);
  overflow: hidden;
}
.t-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--ink);
}
.t-card.yours { background: var(--purple-100); }
.t-card.full  { background: var(--bg-2); }
.t-card.full:hover { transform: none; box-shadow: 3px 3px 0 var(--ink); cursor: default; }

.t-card .row1 {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; gap: 10px;
}
.t-card .row1 .l {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.t-card .row1 .id {
  font-family: var(--font-mono); font-size: 14px; color: var(--ink-3);
}
.t-card h2 {
  font-family: var(--font-pixel);
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin: 0 0 6px;
  text-transform: uppercase;
  line-height: 1.3;
}
.t-card .hosted {
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  margin-bottom: 14px;
}
.t-card .meta {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.t-card .meta .m {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-body); font-size: 13px; color: var(--ink-2);
}
.t-card .meta .m i { width: 14px; height: 14px; }

.t-card .row3 {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.t-card .avs { display: flex; align-items: center; }
/* Host slot: separate labeled box before the .avs row. Works across all
 * skins (BGF v3 / bitup / bitup-soft). */
.t-card .host-slot {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 4px 4px;
  background: var(--yellow-300);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  flex-shrink: 0;
}
.t-card .host-slot__label {
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: 0.10em;
  color: var(--yellow-700);
  white-space: nowrap;
  font-weight: bold;
}
.t-card .host-slot .av {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  font-family: var(--font-pixel);
  font-size: 13px;
  color: #fff;
  border: 2px solid var(--ink);
  flex-shrink: 0;
}
.t-card .row3 .seats {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.t-card .avs {
  display: flex; align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.t-card .avs .av {
  width: 44px; height: 44px;
  border: 2px solid var(--ink); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-pixel); font-size: 12px;
  color: #fff;
  transition: transform 220ms cubic-bezier(.2,.7,.2,1);
  position: static;
}
.t-card .avs .av + .av { margin-left: 0; }
/* Uploaded photo inside an .av — fills the square, clipped to border. */
.t-card .host-slot .av,
.t-card .avs .av { overflow: hidden; position: relative; }
.t-card .host-slot .av .av-photo,
.t-card .avs .av .av-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* "You" — accent ring + inset highlight so it's obviously the current user. */
.t-card .avs .av--me,
.t-card .host-slot .av--me {
  box-shadow:
    0 0 0 2px var(--surface, #fff),
    0 0 0 4px var(--purple-500);
  position: relative;
}
/* Empty seat — quiet diagonal stripes, no "+" glyph. */
.t-card .avs .av.empty {
  color: transparent;
  font-size: 0;
}
.t-card .avs .av.empty {
  background: repeating-linear-gradient(45deg, var(--bg-2) 0 4px, var(--surface) 4px 8px);
  color: var(--ink-3);
}
.t-card .avs .av.new {
  animation: avPop 320ms steps(4);
}
@keyframes avPop {
  0%   { transform: translateX(20px) scale(0.5); opacity: 0; }
  50%  { transform: translateX(10px) scale(1.2); opacity: 1; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}

/* Action button — right side of row3 */
.t-card .action { display: inline-flex; gap: 8px; align-items: center; }
.t-card .join-btn {
  font-family: var(--font-pixel);
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 12px 18px;
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  transition: transform 90ms steps(2), box-shadow 90ms steps(2), background 200ms steps(3);
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 8px;
}
.t-card .join-btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.t-card .join-btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.t-card .join-btn.joined { background: var(--purple-500); }
.t-card .join-btn.full { background: var(--bg-2); color: var(--ink-3); cursor: not-allowed; }
.t-card .join-btn.full:hover { transform: none; box-shadow: 4px 4px 0 var(--ink); }

/* Seat counter — animated */
.seat-block {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 12px;
  background: var(--green-100); border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  min-width: 78px;
  transition: background 200ms steps(3);
}
.seat-block.last  { background: var(--yellow-300); }
.seat-block.full  { background: var(--red-100); }
.seat-block.yours { background: var(--purple-500); color: #fff; }
.seat-block .n {
  font-family: var(--font-pixel);
  font-size: 22px;
  line-height: 1;
  color: var(--green-700);
  letter-spacing: 0.02em;
  display: inline-flex; align-items: baseline;
}
.seat-block.last .n  { color: var(--yellow-700); }
.seat-block.full .n  { color: var(--red-700); }
.seat-block.yours .n { color: #fff; }
.seat-block .l {
  font-family: var(--font-pixel);
  font-size: 7px;
  letter-spacing: 0.08em;
  color: var(--green-700);
  opacity: 0.85;
}
.seat-block.last .l  { color: var(--yellow-700); }
.seat-block.full .l  { color: var(--red-700); }
.seat-block.yours .l { color: #fff; }

/* Number digit flip animation — runs when filled count increments */
.digit-flip { display: inline-block; animation: digitFlip 320ms steps(4); }
@keyframes digitFlip {
  0%   { transform: translateY(-100%); opacity: 0; }
  60%  { transform: translateY(8%); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Status badge */
.t-badge {
  display: inline-flex; align-items: center;
  padding: 5px 8px;
  background: var(--green-100); color: var(--green-700);
  border: 2px solid var(--ink);
  font-family: var(--font-pixel); font-size: 8px; letter-spacing: 0.04em;
  line-height: 1;
}
.t-badge.filling { background: var(--yellow-300); color: var(--yellow-700); }
.t-badge.full    { background: var(--red-100);    color: var(--red-700); }
.t-badge.yours   { background: var(--purple-500); color: #fff; }
.t-badge.live::before {
  content: ""; display: inline-block;
  width: 7px; height: 7px;
  background: currentColor;
  margin-right: 5px;
  animation: pix-pulse 1.2s steps(2) infinite;
}
@keyframes pix-pulse {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0.35; }
}

/* "Just joined" celebrate flash */
.t-card.celebrate {
  animation: celebrate 600ms steps(6);
}
@keyframes celebrate {
  0%, 100% { background: var(--purple-100); }
  16%      { background: var(--yellow-300); }
  33%      { background: var(--green-100); }
  50%      { background: var(--purple-100); }
  66%      { background: var(--purple-300); }
  83%      { background: var(--purple-100); }
}

/* Confetti dot — drawn over card on join */
.confetti {
  position: absolute;
  width: 6px; height: 6px;
  background: var(--coin, #FFD24A);
  border: 1.5px solid var(--ink);
  pointer-events: none;
  animation: confettiFly 700ms steps(7) forwards;
}
@keyframes confettiFly {
  0%   { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--cx, 60px), var(--cy, -80px)) rotate(180deg); opacity: 0; }
}

/* Empty state */
.empty-state {
  background: var(--surface);
  border: 2px dashed var(--ink);
  padding: 48px 24px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.empty-state img { width: 160px; image-rendering: pixelated; }
.empty-state h3 { font-family: var(--font-pixel); font-size: 14px; margin: 0; }
.empty-state p { font-family: var(--font-body); font-size: 14px; color: var(--ink-2); max-width: 340px; margin: 0; line-height: 1.5; }

/* ─────────────────────  RAIL  ───────────────────── */
.cab-rail .panel-body.activity { padding: 0; max-height: 360px; overflow: hidden; position: relative; }
.activity-list { padding: 12px; display: flex; flex-direction: column; gap: 8px; }

.act-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 10px;
  background: var(--bg-2);
  border: 2px solid var(--ink);
  animation: actSlide 320ms steps(4);
}
@keyframes actSlide {
  0%   { transform: translateX(40px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
.act-item .ai-av {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border: 2px solid var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  font-family: var(--font-pixel); font-size: 9px;
}
.act-item .txt {
  flex: 1; min-width: 0;
  font-family: var(--font-body); font-size: 13px; color: var(--ink); line-height: 1.35;
}
.act-item .txt b { font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.04em; }
.act-item .t {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); margin-top: 2px; display: block;
}

/* ─── Kirov map ─── */
.kirov-map-card .panel-body { padding: 14px; }
.kirov-map {
  position: relative;
  width: 100%; aspect-ratio: 1 / 1;
  background: var(--bg-2);
  border: 2px solid var(--ink);
  image-rendering: pixelated;
}
.kirov-map .legend {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px;
  font-family: var(--font-pixel); font-size: 7px; color: var(--ink-2); letter-spacing: 0.06em;
}
.kirov-map .legend .sw {
  display: inline-block; width: 10px; height: 10px; border: 1.5px solid var(--ink); margin-right: 3px; vertical-align: middle;
}
.kirov-map svg .pin { transition: transform 200ms steps(3); cursor: pointer; transform-origin: center; }
.kirov-map svg .pin:hover { transform: scale(1.15); }
.kirov-map svg .pin .dot {
  animation: pin-blink 1.6s steps(2) infinite;
}
.kirov-map svg .pin.heat-1 .dot { animation-duration: 2.6s; }
.kirov-map svg .pin.heat-3 .dot { animation-duration: 0.9s; }
@keyframes pin-blink {
  0%, 60% { opacity: 1; }
  70%, 100% { opacity: 0.45; }
}
.kirov-map svg .pin-tip {
  font-family: var(--font-pixel); font-size: 4px;
  fill: var(--ink); letter-spacing: 0.04em;
}

/* ════════════════════════════════════════════════════════════════════
 * CREATE TABLE — form page styles
 * ════════════════════════════════════════════════════════════════════ */

.cab-shell.create {
  grid-template-columns: 1fr 380px;
}
@media (max-width: 1100px) {
  .cab-shell.create { grid-template-columns: 1fr; }
  .create-rail { order: -1; }
}

.create-main { display: flex; flex-direction: column; gap: 18px; }

.create-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.create-header .back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.06em;
  color: var(--ink-2); cursor: pointer;
  margin-bottom: 8px;
}
.create-header .back:hover { color: var(--ink); }
.create-header h1 {
  font-family: var(--font-pixel); font-size: 22px; margin: 0 0 6px;
}
.create-header p {
  font-family: var(--font-body); font-size: 14px; color: var(--ink-2); margin: 0;
}

/* form sections */
.form-section { background: var(--surface); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.form-section .head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; border-bottom: 2px solid var(--ink);
  background: var(--bg-2);
}
.form-section .head .left { display: inline-flex; align-items: center; gap: 12px; }
.form-section .head .step {
  width: 28px; height: 28px;
  background: var(--accent); color: #fff;
  border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-pixel); font-size: 10px;
}
.form-section .head h2 {
  margin: 0; font-family: var(--font-pixel); font-size: 11px; letter-spacing: 0.06em; color: var(--ink);
}
.form-section .head .hint {
  font-family: var(--font-mono); font-size: 13px; color: var(--ink-3);
}
.form-section .body {
  padding: 20px;
  display: flex; flex-direction: column; gap: 16px;
}
.form-section.optional .head .step { background: var(--bg-2); color: var(--ink-2); }

/* form atoms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) { .field-row { grid-template-columns: 1fr; } }
.field-label {
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.06em;
  color: var(--ink); display: flex; align-items: center; gap: 6px;
}
.field-label .req { color: var(--red-500); }
.field-hint {
  font-family: var(--font-body); font-size: 12px; color: var(--ink-3); margin-top: 2px;
}
.field-hint.private {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--purple-700); font-weight: 600;
}

.pix-input, .pix-textarea {
  width: 100%;
  background: var(--bg-2);
  border: 2px solid var(--ink); box-shadow: inset 2px 2px 0 rgba(0,0,0,0.06);
  padding: 10px 12px;
  font-family: var(--font-body); font-size: 15px; color: var(--ink);
  outline: 0;
  border-radius: 0;
}
.pix-input:focus, .pix-textarea:focus { background: var(--surface); box-shadow: inset 2px 2px 0 var(--accent-tint); }
.pix-input::placeholder, .pix-textarea::placeholder { color: var(--ink-3); }
.pix-textarea { min-height: 80px; font-family: var(--font-body); line-height: 1.5; resize: vertical; }

/* chip picker (selectable from a group) */
.chip-group { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-pick {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: var(--bg-2);
  border: 2px solid var(--ink);
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.04em;
  color: var(--ink); cursor: pointer; text-transform: uppercase;
  transition: transform 90ms steps(2), box-shadow 90ms steps(2);
}
.chip-pick i { width: 12px; height: 12px; }
.chip-pick:hover { background: var(--surface); }
.chip-pick.on {
  background: var(--accent); color: #fff;
  box-shadow: 3px 3px 0 var(--ink);
  transform: translate(-1px, -1px);
}
.chip-pick.purple.on { background: var(--purple-500); }
.chip-pick.yellow.on { background: var(--yellow-500); color: var(--ink); }
.chip-pick.red.on    { background: var(--red-500); }

/* segmented (privacy / level) */
.segmented {
  display: grid; grid-template-columns: 1fr 1fr;
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  background: var(--bg-2);
}
.segmented.three { grid-template-columns: 1fr 1fr 1fr; }
.segmented .seg {
  padding: 14px 12px;
  background: var(--bg-2);
  cursor: pointer;
  text-align: center;
  border-right: 2px solid var(--ink);
  transition: background 120ms steps(2);
}
.segmented .seg:last-child { border-right: 0; }
.segmented .seg .t {
  font-family: var(--font-pixel); font-size: 10px; letter-spacing: 0.04em; color: var(--ink); margin-bottom: 4px;
}
.segmented .seg .d {
  font-family: var(--font-body); font-size: 12px; color: var(--ink-2);
}
.segmented .seg.on {
  background: var(--accent); color: #fff;
}
.segmented .seg.on .t,
.segmented .seg.on .d { color: #fff; }
.segmented .seg.on.purple { background: var(--purple-500); }

/* stepper for player count */
.stepper {
  display: inline-flex; align-items: stretch;
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  background: var(--surface);
}
.stepper button {
  width: 40px; height: 40px; border: 0; background: var(--bg-2);
  cursor: pointer; font-family: var(--font-pixel); font-size: 14px;
  color: var(--ink); border-right: 2px solid var(--ink);
  transition: background 90ms steps(2);
}
.stepper button:last-child { border-right: 0; border-left: 2px solid var(--ink); }
.stepper button:hover { background: var(--accent-tint); }
.stepper button:disabled { opacity: 0.4; cursor: not-allowed; }
.stepper .val {
  min-width: 80px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface);
  font-family: var(--font-pixel); font-size: 18px; color: var(--accent-deep);
}

/* day strip / time strip */
.day-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.day-strip::-webkit-scrollbar { height: 0; }
.day-chip {
  flex: 0 0 auto;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 2px solid var(--ink);
  cursor: pointer;
  text-align: center;
  min-width: 76px;
  transition: transform 90ms steps(2), box-shadow 90ms steps(2);
}
.day-chip .dow {
  font-family: var(--font-pixel); font-size: 8px; letter-spacing: 0.06em; color: var(--ink-3);
}
.day-chip .num {
  font-family: var(--font-pixel); font-size: 20px; color: var(--ink); margin: 4px 0;
}
.day-chip .mo {
  font-family: var(--font-pixel); font-size: 7px; letter-spacing: 0.08em; color: var(--ink-3);
}
.day-chip:hover { background: var(--surface); }
.day-chip.on {
  background: var(--accent); box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px,-1px);
}
.day-chip.on .dow,
.day-chip.on .num,
.day-chip.on .mo { color: #fff; }

.time-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.time-chip {
  padding: 10px 14px;
  background: var(--bg-2);
  border: 2px solid var(--ink);
  font-family: var(--font-pixel); font-size: 11px; color: var(--ink);
  cursor: pointer;
  transition: transform 90ms steps(2), box-shadow 90ms steps(2);
}
.time-chip:hover { background: var(--surface); }
.time-chip.on {
  background: var(--accent); color: #fff; box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px,-1px);
}

/* custom-time chip: holds a masked HH:MM text input inline */
.time-chip--custom {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-2);
}
.time-chip--custom .time-chip__input {
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
  margin: 0;
  font-family: var(--font-pixel);
  font-size: 11px;
  line-height: 1.4;
  color: var(--ink);
  width: 64px;
  text-align: center;
  letter-spacing: 0.04em;
  cursor: text;
}
.time-chip--custom .time-chip__input::placeholder {
  color: var(--ink);
  opacity: 0.45;
}
.time-chip--custom.on,
.time-chip--custom.on .time-chip__input { color: #fff; }
.time-chip--custom.on .time-chip__input::placeholder { color: #fff; opacity: 0.7; }

/* toggles for requirements */
.req-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 16px;
  background: var(--bg-2);
  border: 2px solid var(--ink);
  cursor: pointer;
  transition: background 90ms steps(2);
}
.req-toggle:hover { background: var(--surface); }
.req-toggle.on { background: var(--accent-tint); }
.req-toggle .lbl { display: inline-flex; gap: 10px; align-items: center; }
.req-toggle .lbl i { width: 18px; height: 18px; color: var(--ink); }
.req-toggle .lbl .t {
  font-family: var(--font-pixel); font-size: 10px; letter-spacing: 0.04em; color: var(--ink); margin-bottom: 2px;
}
.req-toggle .lbl .d { font-family: var(--font-body); font-size: 12px; color: var(--ink-2); }
.req-toggle .knob {
  width: 36px; height: 22px;
  background: var(--surface);
  border: 2px solid var(--ink);
  position: relative; flex-shrink: 0;
  transition: background 120ms steps(2);
}
.req-toggle .knob::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: var(--ink);
  transition: left 120ms steps(2), background 120ms steps(2);
}
.req-toggle.on .knob { background: var(--accent); }
.req-toggle.on .knob::after { left: 16px; background: #fff; }

/* game picker — square tiles with full-bleed cover and a dark name strip
 * pinned at the bottom (mirrors .mg-card layout). */
.game-pick-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.game-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg-2);
  border: 2px solid var(--ink);
  padding: 0;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 90ms steps(2), box-shadow 90ms steps(2);
}
.game-tile:hover { box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px,-1px); }
.game-tile.on { box-shadow: 4px 4px 0 var(--ink); transform: translate(-2px,-2px); }
.game-tile.on { outline: 3px solid var(--accent); outline-offset: -5px; }
.game-tile .cov {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  margin: 0;
  display: flex; align-items: center; justify-content: center;
  border: 0;
  overflow: hidden;
  position: relative;
  color: #fff;
  font-family: var(--font-pixel); font-size: 28px;
  letter-spacing: 0.04em;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.32);
}
.game-tile .cov img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.game-tile .nm {
  position: relative;
  z-index: 1;
}
.game-tile .nm {
  flex: 0 0 auto;
  padding: 8px 10px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.15;
  text-transform: uppercase;
  text-wrap: balance;
  border-top: 2px solid var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.game-tile.on .nm { background: var(--accent); }

.game-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-2);
  border: 2px solid var(--ink);
  padding: 10px 14px;
  margin-bottom: 14px;
}
.game-search input {
  flex: 1; border: 0; background: transparent; outline: 0;
  font-family: var(--font-body); font-size: 14px; color: var(--ink);
}

/* preview rail */
.create-rail .preview-card { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 14px; }
.preview-label {
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.08em; color: var(--ink-2);
  display: flex; align-items: center; justify-content: space-between;
}
.preview-label .live {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-pixel); font-size: 8px; color: var(--accent-deep);
}
.preview-label .live::before {
  content: ""; display: inline-block; width: 8px; height: 8px;
  background: var(--accent); border: 1.5px solid var(--ink);
  animation: pix-pulse 1.4s steps(2) infinite;
}

/* publish bar */
.publish-bar {
  background: var(--surface);
  border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink);
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.publish-bar .row {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 13px; color: var(--ink-2);
}
.publish-bar .row b {
  font-family: var(--font-pixel); font-size: 9px; color: var(--ink); letter-spacing: 0.04em;
}
.publish-bar .row.ok    b { color: var(--green-700); }
.publish-bar .row.warn  b { color: var(--yellow-700); }
.publish-bar .row.bad   b { color: var(--red-700); }
.publish-bar .publish-btn {
  width: 100%;
  padding: 16px;
  background: var(--accent); color: #fff;
  border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--font-pixel); font-size: 13px; letter-spacing: 0.06em;
  cursor: pointer; text-transform: uppercase;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform 90ms steps(2), box-shadow 90ms steps(2);
}
.publish-bar .publish-btn:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); }
.publish-bar .publish-btn:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }
.publish-bar .publish-btn:disabled { background: var(--bg-2); color: var(--ink-3); cursor: not-allowed; }
.publish-bar .publish-btn:disabled:hover { transform: none; box-shadow: 4px 4px 0 var(--ink); }
.publish-bar .secondary-btn {
  background: var(--surface); color: var(--ink); border: 2px solid var(--ink);
  padding: 10px 14px;
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.06em;
  cursor: pointer; text-transform: uppercase;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
}

.invite-link {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 12px;
  background: var(--purple-100);
  border: 2px solid var(--ink);
  font-family: var(--font-mono); font-size: 13px; color: var(--purple-700);
}
.invite-link i { color: var(--purple-700); }
.invite-link .url { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invite-link button {
  background: var(--purple-500); color: #fff;
  border: 2px solid var(--ink); padding: 4px 8px;
  font-family: var(--font-pixel); font-size: 7px; letter-spacing: 0.04em;
  cursor: pointer;
}

/* ════════════════════════════════════════════════════════════════════
 * VISUAL TABLE — top-down board with meeples seated around
 * ════════════════════════════════════════════════════════════════════ */

.view-toggle {
  display: inline-flex;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  background: var(--surface);
}
.view-toggle button {
  background: var(--surface); border: 0; padding: 8px 14px;
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.06em;
  color: var(--ink-2); cursor: pointer;
  border-right: 2px solid var(--ink);
  display: inline-flex; align-items: center; gap: 6px;
}
.view-toggle button:last-child { border-right: 0; }
.view-toggle button.on { background: var(--accent); color: #fff; }

.feed.floor {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 1100px) { .feed.floor { grid-template-columns: 1fr; } }

/* the visual table card */
.vtable {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 16px;
  cursor: pointer;
  transition: transform 120ms steps(3), box-shadow 120ms steps(3), background 200ms steps(3);
  overflow: hidden;
}
.vtable:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--ink);
}
.vtable.yours { background: var(--purple-100); }
.vtable.full  { background: var(--bg-2); }
.vtable.full:hover { transform: none; box-shadow: 3px 3px 0 var(--ink); cursor: default; }

.vtable-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  margin-bottom: 6px;
}
.vtable-head .l {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.vtable-head .id {
  font-family: var(--font-mono); font-size: 14px; color: var(--ink-3);
}
.vtable h3 {
  font-family: var(--font-pixel); font-size: 16px;
  letter-spacing: 0.02em; margin: 0 0 6px; color: var(--ink);
  text-transform: uppercase; line-height: 1.3;
}
.vtable .meta {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 4px;
}
.vtable .meta .m {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-body); font-size: 12px; color: var(--ink-2);
}
.vtable .meta .m i { width: 12px; height: 12px; }

/* the board area where seats sit around a felt */
.vboard {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 4;
  margin: 28px 0 8px;
}

/* The felt — the table itself */
.felt-wrap {
  position: absolute;
  left: 22%; right: 22%; top: 26%; bottom: 26%;
}
.felt {
  position: absolute; inset: 0;
  background: var(--green-700);
  border: 3px solid var(--brick);
  box-shadow:
    inset 0 0 0 2px var(--green-900),
    inset 0 0 0 5px var(--green-700),
    4px 4px 0 var(--ink);
}
.felt::before {
  /* ink border around the wood */
  content: ""; position: absolute; inset: -5px;
  border: 2px solid var(--ink);
  pointer-events: none;
}
/* subtle felt texture — checker dots */
.felt::after {
  content: ""; position: absolute; inset: 6px;
  background-image:
    radial-gradient(var(--green-900) 1px, transparent 1px);
  background-size: 8px 8px;
  opacity: 0.45;
  pointer-events: none;
}

/* the game box cover in the center of the felt */
.felt-game-box {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-3deg);
  width: 86px; height: 110px;
  background: var(--game-color, var(--accent));
  border: 2px solid var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff;
  font-family: var(--font-pixel);
  text-decoration: none;
  cursor: pointer;
  z-index: 3;
  box-shadow: 5px 5px 0 var(--ink);
  /* smooth & quick — matches the user's brief, slight ease-out */
  transition:
    transform 180ms cubic-bezier(.2, .7, .2, 1),
    box-shadow 180ms cubic-bezier(.2, .7, .2, 1);
  text-align: center;
  padding: 8px 6px;
  overflow: visible;
}
/* With a real cover image — strip the inner frame and short/name text so
 * the artwork shows clean. */
.felt-game-box.has-cover {
  padding: 0;
  overflow: hidden;
}
.felt-game-box.has-cover::before { content: none; }
/* inner white border ring — the "frame" of the box cover */
.felt-game-box::before {
  content: "";
  position: absolute; inset: 5px;
  border: 2px solid rgba(255,255,255,0.55);
  pointer-events: none;
}
/* tiny ink corner notch (top-right) — sells the "physical box" look */
.felt-game-box::after {
  content: "";
  position: absolute; top: -2px; right: -2px;
  width: 8px; height: 8px;
  background: var(--ink);
  z-index: 1;
}
.felt-game-box .short {
  font-size: 22px;
  letter-spacing: 0.02em;
  line-height: 1;
  margin-bottom: 6px;
  z-index: 2;
}
.felt-game-box .name {
  font-size: 7px;
  letter-spacing: 0.06em;
  opacity: 0.95;
  line-height: 1.3;
  max-width: 70px;
  text-transform: uppercase;
  z-index: 2;
}
.felt-game-box .year {
  font-family: var(--font-mono);
  font-size: 13px;
  opacity: 0.85;
  letter-spacing: 0.04em;
  margin-top: 4px;
  z-index: 2;
}
.felt-game-box .exp-pip {
  position: absolute;
  bottom: -6px; left: 50%;
  transform: translateX(-50%);
  padding: 3px 6px;
  background: var(--purple-500); color: #fff;
  border: 2px solid var(--ink);
  font-family: var(--font-pixel); font-size: 7px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  z-index: 4;
}
.felt-game-box:hover {
  transform: translate(-50%, -50%) rotate(0deg) scale(1.7);
  box-shadow: 9px 9px 0 var(--ink);
  z-index: 20;
}
.felt-game .cv {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--accent);
  margin-right: 6px;
  vertical-align: middle;
  border: 1.5px solid var(--ink);
}

/* tiny dice scattered on felt for flavor */
.felt-dice {
  position: absolute; width: 10px; height: 10px;
  background: var(--surface);
  border: 1.5px solid var(--ink);
}
.felt-dice::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 2px; height: 2px; background: var(--ink);
}
.felt-dice.d1 { top: 22%; left: 20%; transform: rotate(8deg); }
.felt-dice.d2 { bottom: 18%; right: 22%; transform: rotate(-12deg); }

/* seat positioned absolutely around the board */
.seat {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  z-index: 3;
  pointer-events: auto;
}
.seat .meeple-wrap {
  position: relative;
  width: 36px; height: 42px;
  display: flex; align-items: center; justify-content: center;
}
.seat .meeple-wrap svg { display: block; }
.seat .star {
  position: absolute;
  top: -4px; right: -6px;
  width: 14px; height: 14px;
  background: var(--yellow-500);
  border: 1.5px solid var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; line-height: 1;
  color: var(--ink);
  z-index: 4;
}
.seat .nameplate {
  background: var(--surface);
  border: 1.5px solid var(--ink);
  padding: 1px 4px;
  font-family: var(--font-pixel);
  font-size: 6.5px;
  letter-spacing: 0.06em;
  color: var(--ink);
  max-width: 80px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.seat.empty .meeple-wrap { opacity: 0.35; }
.seat.empty .nameplate {
  background: transparent;
  border: 1.5px dashed var(--ink-3);
  color: var(--ink-3);
}
.seat.you .nameplate {
  background: var(--purple-500); color: #fff; border-color: var(--ink);
}
.seat.host .nameplate {
  background: var(--yellow-500); color: var(--ink);
}

/* sit-down animation */
.seat .meeple-wrap.arrive {
  animation: meepleSit 600ms steps(7);
}
@keyframes meepleSit {
  0%   { transform: translate(0, -80px) scale(0.5) rotate(-15deg); opacity: 0; }
  40%  { transform: translate(0, -10px) scale(1.2) rotate(8deg);   opacity: 1; }
  70%  { transform: translate(0, 4px)   scale(0.95) rotate(-3deg); opacity: 1; }
  100% { transform: translate(0, 0)     scale(1)    rotate(0);     opacity: 1; }
}

/* slight idle wiggle on seated meeples */
@keyframes meepleIdle {
  0%, 100% { transform: rotate(-1deg); }
  50%      { transform: rotate(1deg); }
}
.seat:not(.empty) .meeple-wrap:not(.arrive) {
  animation: meepleIdle 3.5s steps(4) infinite;
  animation-delay: var(--idle-delay, 0s);
}

/* foot of visual table — JOIN button + count */
.vtable-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 10px;
  padding-top: 10px;
  border-top: 2px dashed var(--border-subtle);
}
.vtable-foot .stats {
  display: inline-flex; gap: 8px; align-items: center;
}
.vtable-foot .stats .seat-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  background: var(--green-100);
  border: 2px solid var(--ink);
  font-family: var(--font-pixel); font-size: 10px;
  color: var(--green-700); letter-spacing: 0.04em;
}
.vtable.full  .vtable-foot .stats .seat-pill { background: var(--red-100); color: var(--red-700); }
.vtable.yours .vtable-foot .stats .seat-pill { background: var(--purple-500); color: #fff; }
.vtable-foot .stats .seat-pill.last { background: var(--yellow-300); color: var(--yellow-700); }
.vtable-foot .stats .seat-pill .num {
  font-family: var(--font-pixel); font-size: 14px;
}

.vtable-foot .join-btn {
  padding: 10px 16px;
  background: var(--accent); color: #fff;
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--font-pixel); font-size: 11px; letter-spacing: 0.05em;
  cursor: pointer; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform 90ms steps(2), box-shadow 90ms steps(2), background 200ms steps(3);
}
.vtable-foot .join-btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.vtable-foot .join-btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.vtable-foot .join-btn.joined { background: var(--purple-500); }
.vtable-foot .join-btn.full {
  background: var(--bg-2); color: var(--ink-3); cursor: not-allowed;
}

/* celebration flash when joining */
.vtable.celebrate { animation: vtableCelebrate 700ms steps(7); }
@keyframes vtableCelebrate {
  0%, 100% { background: var(--purple-100); }
  20%      { background: var(--yellow-300); }
  40%      { background: var(--green-100); }
  60%      { background: var(--purple-100); }
  80%      { background: var(--purple-300); }
}

/* ─── Footer note ─── */
.kicker {
  text-align: center; padding: 24px;
  font-family: var(--font-mono); font-size: 14px; color: var(--ink-3);
}
.kicker span { color: var(--ink); }
