/* ═══════════════════════════════════════════════════════════════════
   BGF · Table page — internal page for a single table
   Includes hero, tabs, overview, scoreboard (the centrepiece),
   activity, right rail. Designed for the bitup-soft skin.
   ═══════════════════════════════════════════════════════════════════ */

/* ─── LAYOUT ───────────────────────────────────────────────────────── */
.cab-shell.t-shell {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  padding: 24px 20px;
  max-width: 1360px;
  margin: 0 auto;
}
@media (max-width: 1100px) {
  .cab-shell.t-shell { grid-template-columns: 1fr; }
}
.t-main { min-width: 0; }

/* ═══════════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════════ */
.table-hero {
  background: var(--surface);
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: 280px 1fr;
  overflow: hidden;
}
@media (max-width: 880px) {
  .table-hero { grid-template-columns: 1fr; }
}

.th-cover {
  position: relative;
  min-height: 360px;
  border-right: 2px solid var(--ink);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 20px;
  color: #fff;
  overflow: hidden;
}
.th-cover-overlay {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,0.10) 0 8px,
      transparent 8px 18px),
    repeating-linear-gradient(45deg,
      rgba(0,0,0,0.05) 0 12px,
      transparent 12px 30px);
  pointer-events: none;
}
.th-cover-id {
  position: absolute; top: 14px; left: 14px;
  font-family: var(--font-pixel); font-size: 10px; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.92);
  padding: 4px 8px;
  border: 1.5px solid rgba(255,255,255,0.4);
  background: rgba(0,0,0,0.2);
}
.th-status {
  position: absolute; top: 14px; right: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.1em;
  padding: 5px 9px;
  background: var(--ink); color: #fff;
  border: 1.5px solid #fff;
}
.th-status-dot {
  width: 8px; height: 8px;
  display: inline-block;
  animation: th-pulse 1.4s ease-in-out infinite;
}
@keyframes th-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.th-status-finished .th-status-dot { animation: none; opacity: 0.7; }

.th-cover-mark {
  font-family: var(--font-pixel); font-size: 88px; line-height: 1;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 4px 4px 0 var(--ink);
  margin-bottom: 14px;
  position: relative;
}
.th-cover-tag {
  position: absolute; bottom: 18px; left: 0; right: 0;
  text-align: center;
  font-family: var(--font-pixel); font-size: 11px; letter-spacing: 0.16em;
  color: rgba(255,255,255,0.78);
}

/* ─── HERO BODY ──────────────────────────────────────────────────── */
.th-body { padding: 22px 24px 20px; min-width: 0; }
.th-crumb {
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.1em;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.th-title {
  margin: 0 0 16px;
  font-family: var(--font-pixel); font-size: 28px; letter-spacing: 0.02em;
  color: var(--ink);
  line-height: 1.15;
}
.th-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 7px 16px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1.5px dashed var(--border-subtle, #d8d4c1);
}
@media (max-width: 720px) { .th-meta { grid-template-columns: 1fr; } }
.th-meta-row {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: 13px; color: var(--ink-2);
  min-width: 0;
}
.th-meta-row i { width: 14px; height: 14px; color: var(--ink-3); flex: 0 0 auto; }
.th-meta-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-meta-row b { color: var(--ink); }

/* countdown block inside hero (for soon) */
.th-countdown {
  display: inline-block;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--ink); color: #fff;
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
}
.thc-lbl {
  font-family: var(--font-pixel); font-size: 8px; letter-spacing: 0.12em;
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
}
.thc-digits {
  display: inline-flex; gap: 4px; align-items: center;
  font-family: var(--font-pixel); font-size: 28px; line-height: 1;
}
.thc-seg {
  background: #fff; color: var(--ink);
  padding: 6px 10px;
  border: 2px solid #fff;
  min-width: 56px; text-align: center;
}
.thc-colon { color: rgba(255,255,255,0.7); padding: 0 2px; }
.thc-units {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 6px;
  font-family: var(--font-pixel); font-size: 8px; letter-spacing: 0.12em;
  color: rgba(255,255,255,0.55);
  text-align: center;
}

/* live block (in hero) */
.th-live {
  position: relative;
  display: inline-flex; align-items: center; gap: 14px;
  margin-bottom: 16px;
  padding: 14px 18px;
  background: var(--red-500); color: #fff;
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
}
.thl-pulse {
  width: 12px; height: 12px;
  background: #fff;
  animation: th-pulse 0.9s ease-in-out infinite;
  flex: 0 0 12px;
}
.thl-lbl {
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.85);
  margin-bottom: 2px;
}
.thl-time {
  font-family: var(--font-pixel); font-size: 26px; line-height: 1;
}
.thl-colon { color: rgba(255,255,255,0.5); margin: 0 2px; }
.thl-meta {
  font-family: var(--font-body); font-size: 11px; line-height: 1.35;
  color: rgba(255,255,255,0.85);
  border-left: 1.5px solid rgba(255,255,255,0.35);
  padding-left: 12px;
}

/* finished block */
.th-finished {
  display: inline-flex; gap: 12px; align-items: center;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--yellow-500); color: var(--ink);
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
}
.thf-lbl {
  font-family: var(--font-pixel); font-size: 10px; letter-spacing: 0.08em;
}
.thf-sub {
  font-family: var(--font-body); font-size: 12px; color: var(--ink-2);
  margin-top: 3px;
}

/* hero actions */
.th-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.th-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px;
  background: var(--ink); color: #fff;
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--font-pixel); font-size: 10px; letter-spacing: 0.05em;
  cursor: pointer; text-decoration: none;
  transition: transform 90ms steps(2), box-shadow 90ms steps(2);
}
.th-cta:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); }
.th-cta:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }
.th-cta.secondary { background: var(--surface); color: var(--ink); }

/* demo state toggle */
.state-demo {
  margin-top: 14px;
  padding: 10px 12px;
  background: var(--bg-2, #fff5d2);
  border: 1.5px dashed var(--ink);
}
.sd-lbl {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-pixel); font-size: 8px; letter-spacing: 0.1em;
  color: var(--ink-3); margin-bottom: 8px;
}
.sd-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.sd-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  background: var(--surface); color: var(--ink-2);
  border: 1.5px solid var(--ink);
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 90ms steps(2), box-shadow 90ms steps(2), background 90ms;
}
.sd-pill:hover { background: var(--surface-2, #FFF5D2); }
.sd-pill.on {
  background: var(--ink); color: #fff;
  box-shadow: 2px 2px 0 var(--accent, var(--purple-500));
}
.sd-step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px;
  background: var(--bg-2, #f5c966); color: var(--ink);
  font-family: var(--font-pixel); font-size: 8px;
}
.sd-pill.on .sd-step { background: var(--accent, var(--purple-500)); color: #fff; }

/* ═══════════════════════════════════════════════════════════════════
   TABS
   ═══════════════════════════════════════════════════════════════════ */
.t-tabs {
  display: flex;
  background: var(--surface);
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  margin-bottom: 18px;
  overflow-x: auto;
}
.t-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px;
  background: var(--surface);
  border: 0; border-right: 2px solid var(--ink);
  font-family: var(--font-pixel); font-size: 10px; letter-spacing: 0.06em;
  color: var(--ink-2);
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}
.t-tab:last-child { border-right: 0; }
.t-tab i { width: 14px; height: 14px; }
.t-tab.on { background: var(--accent, var(--purple-500)); color: #fff; }
.t-tab:hover:not(.on) { background: var(--bg-2, #fff5d2); color: var(--ink); }
.t-tab-badge {
  background: var(--red-500); color: #fff;
  font-family: var(--font-pixel); font-size: 7px; letter-spacing: 0.04em;
  padding: 2px 5px;
  margin-left: 4px;
  animation: th-pulse 1.4s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════════════
   PANES (shared)
   ═══════════════════════════════════════════════════════════════════ */
.t-pane {
  background: var(--surface);
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  padding: 22px;
}
.t-section { margin-bottom: 28px; }
.t-section:last-child { margin-bottom: 0; }
.t-section-h {
  display: flex; align-items: baseline; gap: 10px;
  margin: 0 0 14px;
  font-family: var(--font-pixel); font-size: 11px; letter-spacing: 0.06em;
  color: var(--ink);
}
.t-section-sub {
  font-family: var(--font-mono); font-size: 13px; color: var(--ink-3);
  font-weight: normal;
}

/* ─── PARTICIPANTS ─────────────────────────────────────────────── */
.t-participants {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.t-p-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 12px;
  background: var(--bg-2, #fff5d2);
  border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
  position: relative;
}
.t-p-card.host { background: var(--purple-100); }
.t-p-card.co-host { background: var(--red-100); }
.t-p-card.you { background: var(--green-100); }
.t-p-card.empty {
  background: transparent;
  border-style: dashed;
  box-shadow: none;
  color: var(--ink-3);
}
/* Empty seat as an invite trigger (host/co-host only). Resets the <button>
   defaults and adds a subtle hover/press so it reads as actionable. */
.t-p-card--invite {
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease, transform 90ms steps(2, end);
}
.t-p-card--invite:hover {
  border-color: var(--accent, var(--green-500));
  color: var(--accent, var(--green-500));
}
.t-p-card--invite:hover .t-p-role { color: var(--accent, var(--green-500)); }
.t-p-card--invite:active { transform: translate(1px, 1px); }
.t-p-av {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--purple-500); color: #fff;
  font-family: var(--font-pixel); font-size: 11px;
  border: 1.5px solid var(--ink);
}
.t-p-av.empty {
  background: transparent; color: var(--ink-3);
  border-style: dashed;
}
.t-p-name {
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  color: var(--ink);
}
.t-p-role {
  font-family: var(--font-pixel); font-size: 8px; letter-spacing: 0.06em;
  color: var(--ink-2);
}
/* Чипы «что участник берёт на себя» (коробка / ведущий / дополнения). */
.t-p-commits {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-top: 2px;
}
.t-p-commit {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 6px;
  background: var(--yellow-200, #ffe89a);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  box-shadow: 1.5px 1.5px 0 var(--ink);
  font-family: var(--font-pixel); font-size: 7px; letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.4;
}
.t-p-commit svg { display: block; }

/* ─── VENUE ─────────────────────────────────────────────────────── */
.t-venue {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  border: 2px solid var(--ink);
  background: var(--bg-2, #fff5d2);
}
@media (max-width: 720px) { .t-venue { grid-template-columns: 1fr; } }
.t-venue-map {
  position: relative;
  aspect-ratio: 1;
  background: var(--green-100);
  border-right: 2px solid var(--ink);
  overflow: hidden;
}
.t-venue-grid {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 1px;
  background: var(--ink);
}
.t-venue-grid span { background: var(--green-100); }
.t-venue-grid span:nth-child(odd) { background: var(--bg-2, #fff5d2); }
.t-venue-grid span:nth-child(7n) { background: var(--green-300); }
.t-venue-pin {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -100%);
  width: 36px; height: 36px;
  background: var(--red-500);
  border: 2px solid var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 2px 2px 0 var(--ink);
  animation: pin-bounce 1.6s ease-in-out infinite;
}
.t-venue-pin i { width: 16px; height: 16px; }
@keyframes pin-bounce {
  0%, 100% { transform: translate(-50%, -100%); }
  50% { transform: translate(-50%, -120%); }
}
.t-venue-street {
  position: absolute; bottom: 8px; right: 8px;
  font-family: var(--font-pixel); font-size: 8px; letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--surface); padding: 3px 6px;
  border: 1.5px solid var(--ink);
}
.t-venue-info { padding: 16px; }
.t-venue-name {
  font-family: var(--font-pixel); font-size: 14px;
  color: var(--ink); margin-bottom: 6px;
}
.t-venue-addr {
  font-family: var(--font-body); font-size: 13px; color: var(--ink-2);
  margin-bottom: 12px;
}
.t-venue-meta { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.t-venue-meta div {
  display: inline-flex; gap: 8px; align-items: center;
  font-family: var(--font-mono); font-size: 13px; color: var(--ink-2);
}
.t-venue-meta i { width: 13px; height: 13px; color: var(--ink-3); }
.t-venue-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.t-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: var(--ink); color: #fff;
  border: 1.5px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.05em;
  cursor: pointer;
  transition: transform 90ms steps(2), box-shadow 90ms steps(2);
}
.t-btn:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.t-btn:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }
.t-btn.ghost { background: var(--surface); color: var(--ink); }
.t-btn i { width: 12px; height: 12px; }

/* ─── RULES ─────────────────────────────────────────────────────── */
.t-rules {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.t-rule {
  display: flex; gap: 10px;
  padding: 12px;
  background: var(--bg-2, #fff5d2);
  border: 1.5px solid var(--ink);
}
.t-rule i { width: 18px; height: 18px; color: var(--ink-2); flex: 0 0 18px; margin-top: 1px; }
.t-rule b {
  display: block;
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.05em;
  color: var(--ink); margin-bottom: 3px;
}
.t-rule span {
  font-family: var(--font-body); font-size: 12px; color: var(--ink-2);
}

/* ═══════════════════════════════════════════════════════════════════
   RESULT — LOCKED (status = soon)
   ═══════════════════════════════════════════════════════════════════ */
.r-locked {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  align-items: center;
}
@media (max-width: 720px) { .r-locked { grid-template-columns: 1fr; } }

.r-locked-art {
  aspect-ratio: 1;
  background: var(--purple-100);
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.r-pixel-lock {
  display: flex; flex-direction: column; align-items: center; gap: 0;
}
.r-pixel-bow {
  width: 40px; height: 26px;
  border: 6px solid var(--ink);
  border-bottom: 0;
  background: transparent;
}
.r-pixel-body {
  width: 64px; height: 50px;
  background: var(--yellow-500);
  border: 4px solid var(--ink);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center; justify-items: center;
  padding: 6px;
  gap: 4px;
  position: relative;
}
.r-pixel-body::before {
  content: ""; position: absolute; top: 14px; left: 50%;
  transform: translateX(-50%);
  width: 10px; height: 10px;
  background: var(--ink);
}
.r-pixel-body::after {
  content: ""; position: absolute; top: 22px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 12px;
  background: var(--ink);
}

.r-locked-text { min-width: 0; }
.r-eyebrow {
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.1em;
  color: var(--ink-3); margin-bottom: 8px;
}
.r-locked-text h2 {
  margin: 0 0 8px;
  font-family: var(--font-pixel); font-size: 20px; letter-spacing: 0.02em;
  color: var(--ink);
}
.r-locked-text p {
  margin: 0 0 18px;
  font-family: var(--font-body); font-size: 14px; line-height: 1.55;
  color: var(--ink-2);
  max-width: 520px;
}
.r-locked-steps { display: flex; flex-direction: column; gap: 6px; }
.r-step {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  background: var(--bg-2, #fff5d2);
  border: 1.5px solid var(--ink);
  font-family: var(--font-body); font-size: 13px; color: var(--ink-2);
}
.r-step.done { background: var(--green-100); color: var(--ink); text-decoration: line-through; text-decoration-color: var(--ink-3); }
.r-step.now {
  background: var(--accent, var(--purple-500)); color: #fff;
  box-shadow: 2px 2px 0 var(--ink);
}
.r-step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  background: var(--ink); color: #fff;
  font-family: var(--font-pixel); font-size: 8px;
}
.r-step.done .r-step-n { background: var(--green-500); }
.r-step.now .r-step-n { background: #fff; color: var(--accent, var(--purple-500)); }

/* ═══════════════════════════════════════════════════════════════════
   RESULT — LIVE
   ═══════════════════════════════════════════════════════════════════ */
.r-live { display: flex; flex-direction: column; align-items: flex-start; }
.r-live-head { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.r-live-dot {
  width: 10px; height: 10px;
  background: var(--red-500);
  animation: th-pulse 0.8s ease-in-out infinite;
}
.r-live-lbl {
  font-family: var(--font-pixel); font-size: 10px; letter-spacing: 0.1em;
  color: var(--red-500);
}
.r-live-title {
  margin: 0 0 8px;
  font-family: var(--font-pixel); font-size: 22px; letter-spacing: 0.02em;
}
.r-live-desc {
  margin: 0 0 18px;
  font-family: var(--font-body); font-size: 14px; line-height: 1.5;
  color: var(--ink-2);
  max-width: 540px;
}
.r-live-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  width: 100%; max-width: 560px;
  margin-bottom: 18px;
}
@media (max-width: 720px) { .r-live-grid { grid-template-columns: 1fr; } }
.r-live-card {
  padding: 14px;
  background: var(--bg-2, #fff5d2);
  border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
}
.r-live-card i { width: 18px; height: 18px; color: var(--ink-2); margin-bottom: 8px; }
.r-live-card-h {
  font-family: var(--font-pixel); font-size: 8px; letter-spacing: 0.08em;
  color: var(--ink-3); margin-bottom: 6px;
}
.r-live-card-v {
  font-family: var(--font-pixel); font-size: 22px; letter-spacing: 0.02em;
  color: var(--ink);
}
.r-finish-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 20px;
  background: var(--red-500); color: #fff;
  border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--font-pixel); font-size: 11px; letter-spacing: 0.05em;
  cursor: pointer;
  transition: transform 90ms steps(2), box-shadow 90ms steps(2);
}
.r-finish-btn:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); }
.r-finish-btn:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }
.r-finish-note {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-3);
  margin-top: 8px;
}

/* ═══════════════════════════════════════════════════════════════════
   SCOREBOARD — THE CENTREPIECE
   ═══════════════════════════════════════════════════════════════════ */
.sb { position: relative; }
.sb-head { margin-bottom: 20px; }
.sb-eyebrow {
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.1em;
  color: var(--ink-3); margin-bottom: 8px;
}
.sb-title {
  margin: 0 0 8px;
  font-family: var(--font-pixel); font-size: 24px; letter-spacing: 0.02em;
  color: var(--ink);
}
.sb-desc {
  margin: 0;
  font-family: var(--font-body); font-size: 14px; line-height: 1.55;
  color: var(--ink-2);
  max-width: 620px;
}

/* ─── MODE SELECTOR ─────────────────────────────────────────────── */
.sb-mode {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 0 4px;
}
@media (max-width: 720px) { .sb-mode { grid-template-columns: 1fr; } }
.sb-mode-pill {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  background: var(--surface);
  border: 1.5px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 90ms steps(2), box-shadow 90ms steps(2), background 120ms;
}
.sb-mode-pill:hover:not(:disabled) { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); background: var(--bg-2, #fff5d2); }
.sb-mode-pill:disabled { opacity: 0.5; cursor: not-allowed; }
.sb-mode-pill i { width: 16px; height: 16px; color: var(--ink-2); margin-top: 1px; }
.sb-mode-pill.on {
  background: var(--ink); color: #fff;
  box-shadow: 2px 2px 0 var(--accent, var(--purple-500));
}
.sb-mode-pill.on i { color: #fff; }
.sb-mode-lbl {
  font-family: var(--font-pixel); font-size: 10px; letter-spacing: 0.06em;
  color: var(--ink);
  margin-bottom: 3px;
}
.sb-mode-pill.on .sb-mode-lbl { color: #fff; }
.sb-mode-desc {
  font-family: var(--font-body); font-size: 11px; line-height: 1.35;
  color: var(--ink-3);
}
.sb-mode-pill.on .sb-mode-desc { color: rgba(255,255,255,0.7); }

/* ─── PODIUM ─────────────────────────────────────────────────────── */
.podium {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items: end;
  gap: 14px;
  margin: 24px 0 24px;
  padding: 20px 14px 0;
  border-bottom: 2px solid var(--ink);
  background:
    linear-gradient(to bottom,
      transparent 0%,
      transparent 70%,
      rgba(0,0,0,0.03) 70%,
      rgba(0,0,0,0.03) 100%);
}
.podium-slot {
  display: flex; flex-direction: column; align-items: center; gap: 0;
  transition: transform 240ms cubic-bezier(.2,.7,.3,1.2);
}
.podium-figure {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  margin-bottom: 10px;
}
.podium-av {
  width: 50px; height: 50px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--purple-500); color: #fff;
  font-family: var(--font-pixel); font-size: 13px;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}
.podium-place-1 .podium-av {
  width: 64px; height: 64px;
  font-size: 16px;
  box-shadow: 3px 3px 0 var(--ink);
}
.podium-av.empty {
  background: var(--bg-2, #fff5d2);
  color: var(--ink-3);
  border-style: dashed;
  box-shadow: none;
}
.podium-name {
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.04em;
  color: var(--ink);
  text-align: center;
  max-width: 100px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.podium-place-1 .podium-name { font-size: 10px; }
.podium-score {
  font-family: var(--font-pixel); font-size: 14px;
  color: var(--ink);
  background: var(--yellow-500);
  padding: 3px 8px;
  border: 1.5px solid var(--ink);
}
.podium-place-1 .podium-score { font-size: 18px; padding: 4px 10px; }
.podium-block {
  width: 100%;
  border: 2px solid var(--ink);
  border-bottom: 0;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  box-shadow: inset 0 0 0 4px rgba(0,0,0,0.05);
  transition: height 240ms steps(8, end), background 200ms;
}
.podium-place {
  font-family: var(--font-pixel); font-size: 28px;
  color: var(--ink);
  text-shadow: 2px 2px 0 rgba(255,255,255,0.5);
}
.podium-place-1 .podium-place { font-size: 36px; }
.podium-slot.empty .podium-block { opacity: 0.35; }

.podium.celebrate .podium-place-1 .podium-av {
  animation: pod-pop 600ms steps(6, end);
}
@keyframes pod-pop {
  0%   { transform: translateY(0)    scale(1); }
  30%  { transform: translateY(-12px) scale(1.1); }
  60%  { transform: translateY(-4px) scale(1.05); }
  100% { transform: translateY(0)    scale(1); }
}

/* ─── SCORE GRID ─────────────────────────────────────────────────── */
.sb-grid {
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  background: var(--surface);
  margin-bottom: 18px;
  overflow: hidden;
}
.sb-grid-head {
  display: grid;
  grid-template-columns: 80px 1fr 170px;
  gap: 10px;
  padding: 10px 14px;
  background: var(--ink); color: #fff;
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.08em;
}
.sb-grid-head.mode-place { grid-template-columns: 80px 1fr 100px; }
.sb-h-score { text-align: right; }

.sb-row {
  display: grid;
  grid-template-columns: 80px 1fr 170px;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1.5px solid var(--border-subtle, #d8d4c1);
  align-items: center;
  background: var(--surface);
  transition: background 200ms, transform 200ms cubic-bezier(.2,.7,.3,1.2);
}
.sb-row.mode-place { grid-template-columns: 80px 1fr 100px; }
.sb-row:hover:not(.locked) { background: var(--surface-2, #FFF5D2); }
.sb-row.is-you { background: var(--purple-100); }
.sb-row.is-you:hover:not(.locked) { background: var(--purple-100); }
.sb-row.sb-place-1.locked {
  background: linear-gradient(90deg, var(--yellow-300) 0%, transparent 60%);
}

.sb-pos {
  display: inline-flex; align-items: center; gap: 6px;
}
.sb-pos-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  background: var(--bg-2, #fff5d2); color: var(--ink);
  border: 1.5px solid var(--ink);
  font-family: var(--font-pixel); font-size: 13px;
}
.sb-pos-num.gold { background: var(--yellow-500); }
.sb-place-2 .sb-pos-num { background: #d6d6d6; }
.sb-place-3 .sb-pos-num { background: #d99360; color: #fff; }
.sb-pos-mark {
  font-family: var(--font-pixel); font-size: 10px;
  color: var(--ink-3);
}
.sb-pos-dash {
  font-family: var(--font-pixel); font-size: 16px;
  color: var(--ink-3);
}

.sb-name { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.sb-av {
  width: 36px; height: 36px; flex: 0 0 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--purple-500); color: #fff;
  font-family: var(--font-pixel); font-size: 10px;
  border: 1.5px solid var(--ink);
}
.sb-av.small { width: 26px; height: 26px; font-size: 9px; flex: 0 0 26px; }
.sb-pname {
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  color: var(--ink);
}
.sb-prole {
  font-family: var(--font-pixel); font-size: 8px; letter-spacing: 0.05em;
  color: var(--ink-3);
  margin-top: 2px;
}

.sb-score-wrap { display: inline-flex; gap: 4px; align-items: center; justify-content: flex-end; }
.sb-place-wrap {
  display: inline-flex; gap: 4px; align-items: center; justify-content: flex-end;
}
.sb-place-wrap .sb-step {
  width: 38px;
}
.sb-step {
  width: 32px; height: 36px;
  background: var(--bg-2, #fff5d2);
  border: 1.5px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
  font-family: var(--font-pixel); font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  transition: transform 90ms steps(2), box-shadow 90ms steps(2);
}
.sb-step:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.sb-step:active { transform: translate(1px,1px); box-shadow: 1px 1px 0 var(--ink); }
.sb-step:disabled { opacity: 0.4; cursor: not-allowed; }
.sb-score {
  width: 70px; height: 36px;
  text-align: center;
  background: var(--surface);
  border: 1.5px solid var(--ink); box-shadow: inset 2px 2px 0 rgba(0,0,0,0.06);
  font-family: var(--font-pixel); font-size: 16px;
  color: var(--ink);
}
.sb-score:focus { outline: 2px solid var(--accent, var(--purple-500)); outline-offset: 0; }
.sb-score:disabled { background: var(--surface-2, #FFF5D2); }

/* ─── COOP BANNER ─────────────────────────────────────────────────── */
.coop {
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  gap: 16px;
  margin: 18px 0;
  padding: 18px;
  background: var(--bg-2, #fff5d2);
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  align-items: stretch;
  position: relative;
  transition: background 200ms;
}
@media (max-width: 880px) { .coop { grid-template-columns: 1fr; } }
.coop.won { background: var(--green-100); }
.coop.lost { background: var(--red-100); }

.coop-team {
  display: flex; flex-direction: column; justify-content: center;
  padding-right: 12px;
  border-right: 1.5px dashed var(--ink);
}
@media (max-width: 880px) { .coop-team { border-right: 0; padding-right: 0; padding-bottom: 12px; border-bottom: 1.5px dashed var(--ink); } }
.coop-team-lbl {
  font-family: var(--font-pixel); font-size: 8px; letter-spacing: 0.08em;
  color: var(--ink-3); margin-bottom: 10px;
}
.coop-team-stack {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px;
}
.coop-av {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--purple-500); color: #fff;
  font-family: var(--font-pixel); font-size: 9px;
  border: 1.5px solid var(--ink);
  margin-left: -6px;
}
.coop-av:first-child { margin-left: 0; }
.coop-vs {
  font-family: var(--font-pixel); font-size: 10px; letter-spacing: 0.08em;
  color: var(--ink-3);
  padding: 0 8px;
}
.coop-foe {
  display: inline-flex; align-items: center;
  height: 32px;
  padding: 0 10px;
  background: var(--ink); color: #fff;
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.08em;
  border: 1.5px solid var(--ink);
}

/* big pick buttons */
.coop-pick {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.coop-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  padding: 14px 8px;
  background: var(--surface); color: var(--ink);
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  position: relative;
  transition: transform 90ms steps(2), box-shadow 90ms steps(2), background 120ms;
}
.coop-btn:hover:not(:disabled) { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.coop-btn:active:not(:disabled) { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }
.coop-btn:disabled { cursor: not-allowed; opacity: 0.5; }
.coop-btn.won.on  { background: var(--green-500); color: #fff; animation: coop-glow-w 1.6s ease-in-out infinite; }
.coop-btn.lost.on { background: var(--red-500);   color: #fff; }
@keyframes coop-glow-w {
  0%, 100% { box-shadow: 3px 3px 0 var(--ink); }
  50%      { box-shadow: 3px 3px 0 var(--ink), 0 0 0 4px var(--green-100); }
}
.coop-btn-glyph {
  font-family: var(--font-pixel); font-size: 26px; line-height: 1;
}
.coop-btn-lbl {
  font-family: var(--font-pixel); font-size: 12px; letter-spacing: 0.06em;
  margin-top: 4px;
}
.coop-btn-sub {
  font-family: var(--font-body); font-size: 11px;
  color: var(--ink-3);
}
.coop-btn.on .coop-btn-sub { color: rgba(255,255,255,0.85); }

/* final score (optional) */
.coop-final {
  display: flex; flex-direction: column;
  padding-left: 12px;
  border-left: 1.5px dashed var(--ink);
}
@media (max-width: 880px) { .coop-final { border-left: 0; padding-left: 0; padding-top: 12px; border-top: 1.5px dashed var(--ink); } }
.coop-final-lbl {
  font-family: var(--font-pixel); font-size: 8px; letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.coop-final-input {
  width: 100%;
  height: 44px;
  text-align: center;
  background: var(--surface);
  border: 1.5px solid var(--ink); box-shadow: inset 2px 2px 0 rgba(0,0,0,0.06);
  font-family: var(--font-pixel); font-size: 20px;
  color: var(--ink);
  margin-bottom: 6px;
}
.coop-final-input:focus { outline: 2px solid var(--accent, var(--purple-500)); }
.coop-final-hint {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
  line-height: 1.35;
}

.coop.locked .coop-pick, .coop.locked .coop-final-input { opacity: 0.85; }

/* ─── NOTES ──────────────────────────────────────────────────────── */
.sb-notes { margin-bottom: 18px; }
.sb-notes-lbl {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.06em;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.sb-notes-lbl i { width: 12px; height: 12px; }
.sb-notes-input {
  width: 100%;
  min-height: 70px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1.5px solid var(--ink); box-shadow: inset 2px 2px 0 rgba(0,0,0,0.06);
  font-family: var(--font-body); font-size: 13px;
  color: var(--ink);
  resize: vertical;
}
.sb-notes-input:focus { outline: 2px solid var(--accent, var(--purple-500)); }

/* ─── FOOTER + SUBMIT ─────────────────────────────────────────── */
.sb-foot {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  position: relative;
  padding-top: 14px;
  border-top: 1.5px dashed var(--border-subtle, #d8d4c1);
}
.sb-foot-info {
  flex: 1; min-width: 220px;
  font-family: var(--font-body); font-size: 13px; color: var(--ink-2);
}
.sb-foot-info b { color: var(--ink); }
.sb-foot-info.success {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--green-700);
}
.sb-foot-info.success i { width: 16px; height: 16px; }
.sb-submit {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px;
  background: var(--ink); color: #fff;
  border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--font-pixel); font-size: 11px; letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 90ms steps(2), box-shadow 90ms steps(2), background 120ms;
}
.sb-submit:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: 2px 2px 0 var(--ink); }
.sb-submit.ready {
  background: var(--green-500);
  animation: sb-ready-pulse 1.6s ease-in-out infinite;
}
@keyframes sb-ready-pulse {
  0%, 100% { box-shadow: 4px 4px 0 var(--ink); }
  50%      { box-shadow: 4px 4px 0 var(--ink), 0 0 0 4px var(--green-100); }
}
.sb-submit:not(:disabled):hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); }
.sb-submit:not(:disabled):active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }
.sb-submit.ghost { background: var(--surface); color: var(--ink); animation: none; }

/* ─── CONFIRMATIONS ───────────────────────────────────────────────── */
.sb-confirm {
  margin-top: 18px;
  padding: 16px;
  background: var(--bg-2, #fff5d2);
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
}
.sb-confirm-head {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-pixel); font-size: 10px; letter-spacing: 0.06em;
  color: var(--ink); margin-bottom: 12px;
}
.sb-confirm-head i { width: 14px; height: 14px; }
.sb-confirm-count {
  font-family: var(--font-mono); font-size: 13px; color: var(--ink-3); font-weight: normal;
}
.sb-confirm-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.sb-confirm-row {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1.5px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
  cursor: pointer;
  text-align: left;
  transition: background 120ms, transform 90ms steps(2), box-shadow 90ms steps(2);
}
.sb-confirm-row:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.sb-confirm-row.ok { background: var(--green-100); }
.sb-confirm-row.is-you { background: var(--purple-100); cursor: default; }
.sb-confirm-row.is-you.ok { background: var(--green-100); }
.sb-confirm-name {
  flex: 1; min-width: 0;
  font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sb-confirm-status {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.06em;
  color: var(--green-700);
}
.sb-confirm-status i { width: 12px; height: 12px; }
.sb-confirm-pending {
  color: var(--ink-3);
  font-family: var(--font-pixel); font-size: 9px;
}
.sb-confirm-foot {
  margin-top: 12px;
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-3);
}

/* ─── CONFETTI ────────────────────────────────────────────────────── */
.confetti {
  position: absolute;
  pointer-events: none;
  left: 50%; bottom: 30px;
  width: 0; height: 0;
  z-index: 5;
}
.confetti-piece {
  position: absolute;
  left: 0; top: 0;
  display: block;
  animation: confetti-fly 1100ms cubic-bezier(.2,.7,.3,1) forwards;
  transform: translate(0, 0) rotate(0deg);
}
@keyframes confetti-fly {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  60%  { opacity: 1; }
  100% { transform: translate(var(--dx), calc(var(--dy) + 220px)) rotate(var(--rot)); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════════
   ACTIVITY TAB
   ═══════════════════════════════════════════════════════════════════ */
.t-act-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.t-act-head h3 {
  margin: 0;
  font-family: var(--font-pixel); font-size: 11px; letter-spacing: 0.06em;
}
.t-act-sub { font-family: var(--font-mono); font-size: 13px; color: var(--ink-3); }
.t-act-list { display: flex; flex-direction: column; }
.t-act-row {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1.5px solid var(--border-subtle, #d8d4c1);
}
.t-act-row:last-child { border-bottom: 0; }
.t-act-icon {
  width: 32px; height: 32px;
  background: var(--bg-2, #fff5d2);
  border: 1.5px solid var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
}
.t-act-icon i { width: 14px; height: 14px; color: var(--ink-2); }
.t-act-text { font-family: var(--font-body); font-size: 14px; color: var(--ink); }
.t-act-text b { color: var(--ink); }
.t-act-when {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════════
   RIGHT RAIL
   ═══════════════════════════════════════════════════════════════════ */
.t-rail { display: flex; flex-direction: column; gap: 16px; }
.t-rail-card {
  background: var(--surface);
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  padding: 16px;
}
.t-rail-card h4 {
  margin: 0 0 12px;
  font-family: var(--font-pixel); font-size: 10px; letter-spacing: 0.06em;
  color: var(--ink);
}

/* rail countdown */
.t-rail-cd { background: var(--ink); color: #fff; text-align: center; }
.trc-lbl {
  font-family: var(--font-pixel); font-size: 8px; letter-spacing: 0.12em;
  color: rgba(255,255,255,0.6); margin-bottom: 10px;
}
.trc-digits {
  display: inline-flex; gap: 3px; align-items: center;
  font-family: var(--font-pixel); font-size: 20px;
}
.trc-seg {
  background: #fff; color: var(--ink);
  padding: 4px 7px;
  min-width: 36px; text-align: center;
}
.trc-colon { color: rgba(255,255,255,0.5); padding: 0 1px; }
.trc-when {
  font-family: var(--font-mono); font-size: 13px;
  color: rgba(255,255,255,0.85);
  margin-top: 8px;
}

/* rail live */
.t-rail-live {
  background: var(--red-500); color: #fff; text-align: center;
  position: relative;
}
.trl-pulse {
  position: absolute; top: 10px; right: 10px;
  width: 10px; height: 10px; background: #fff;
  animation: th-pulse 0.9s ease-in-out infinite;
}
.trl-lbl {
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.85);
  margin-bottom: 8px;
}
.trl-time {
  font-family: var(--font-pixel); font-size: 28px; line-height: 1;
}

/* rail done */
.t-rail-done {
  background: var(--yellow-500); text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.t-rail-done i { color: var(--ink); }
.trd-lbl {
  font-family: var(--font-pixel); font-size: 10px; letter-spacing: 0.06em;
}
.trd-sub {
  font-family: var(--font-body); font-size: 13px; color: var(--ink-2);
}

/* rail actions */
.t-rail-actions { padding: 14px; }
.tra-row {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px 8px;
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--border-subtle, #d8d4c1);
  font-family: var(--font-body); font-size: 13px; color: var(--ink);
  cursor: pointer; text-align: left;
  text-decoration: none;
  transition: background 120ms;
}
.tra-row:last-child { border-bottom: 0; }
.tra-row:hover { background: var(--bg-2, #fff5d2); }
.tra-row i { width: 16px; height: 16px; color: var(--ink-2); }
.tra-row.danger { color: var(--red-700); }
.tra-row.danger i { color: var(--red-500); }
.tra-pip {
  background: var(--red-500); color: #fff;
  font-family: var(--font-pixel); font-size: 8px;
  padding: 2px 6px;
  min-width: 18px; text-align: center;
}

/* rail host */
.trh-card {
  display: grid;
  grid-template-columns: 38px 1fr 14px;
  gap: 10px;
  align-items: center;
  padding: 8px;
  background: var(--bg-2, #fff5d2);
  border: 1.5px solid var(--ink);
  text-decoration: none;
}
.trh-av {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--purple-500); color: #fff;
  font-family: var(--font-pixel); font-size: 11px;
  border: 1.5px solid var(--ink);
}
.trh-name {
  font-family: var(--font-body); font-size: 14px; font-weight: 600; color: var(--ink);
}
.trh-meta {
  font-family: var(--font-pixel); font-size: 8px; letter-spacing: 0.05em;
  color: var(--ink-3); margin-top: 3px;
}
.trh-arrow { width: 14px; height: 14px; color: var(--ink-2); }

/* XP reward card — preview / pending-others / finalized */
.xp-reward {
  border: 2px solid var(--ink);
  background: var(--bg-2, #fff5d2);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 12px;
  margin-top: 16px;
  display: grid;
  gap: 10px;
  transition: background 200ms, box-shadow 200ms;
}
.xp-reward--pending-others {
  background: var(--green-100, #e6f8d8);
  box-shadow: 4px 4px 0 var(--green-700, #2e7d32);
  animation: xp-reward-pulse 1.6s ease-in-out infinite;
}
.xp-reward--finalized {
  background: var(--yellow-100, #fff0c2);
  box-shadow: 5px 5px 0 var(--yellow-700, #b48a00);
}
@keyframes xp-reward-pulse {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-1px, -1px); }
}
.xp-reward__head {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-pixel); font-size: 10px; letter-spacing: 0.06em;
  color: var(--ink);
}
.xp-reward__title { flex: 1; }
.xp-reward__total {
  font-family: var(--font-pixel); font-size: 14px;
  color: var(--ink); background: #fff;
  border: 1.5px solid var(--ink);
  padding: 2px 8px;
}
.xp-reward__bar {
  height: 10px;
  background: #fff;
  border: 1.5px solid var(--ink);
  position: relative;
  overflow: hidden;
}
.xp-reward__bar-fill {
  height: 100%;
  background: var(--green-500, #79c558);
  width: 0%;
}
.xp-reward--preview .xp-reward__bar-fill { width: 12%; opacity: 0.5; }
.xp-reward--pending-others .xp-reward__bar-fill {
  animation: xp-reward-fill 900ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.xp-reward--finalized .xp-reward__bar-fill {
  background: var(--yellow-500, #f4b934);
  animation: xp-reward-fill 1200ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes xp-reward-fill {
  from { width: 0%; }
  to { width: 100%; }
}
.xp-reward__list {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 4px;
  font-family: var(--font-body); font-size: 13px; color: var(--ink-2);
}
.xp-reward__row {
  display: flex; justify-content: space-between;
}
.xp-reward__amount {
  font-family: var(--font-pixel); font-size: 10px;
  color: var(--ink);
}
.xp-reward__foot {
  font-family: var(--font-body); font-size: 12px; color: var(--ink-3);
  border-top: 1.5px dashed var(--ink-3); padding-top: 6px;
}
.xp-reward--finalized .xp-reward__foot { color: var(--ink); font-weight: 600; }

/* dispute marker in confirmations list */
.sb-confirm-row.is-dispute {
  background: var(--red-100, #fbe1e1);
}


/* ═══════════════════════════════════════════════════════════════════
   TABLE SETTINGS — mirrors Create-Table choices on the table page
   level · privacy · requirements · expansions · cost/arrive
   ═══════════════════════════════════════════════════════════════════ */
.ts-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-auto-rows: auto;
  gap: 12px;
}
@media (max-width: 720px) { .ts-grid { grid-template-columns: 1fr; } }

.ts-card {
  background: var(--bg-2, #fff5d2);
  border: 1.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  padding: 14px 14px 13px;
  position: relative;
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Eyebrow header used in every settings card */
.ts-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 11px;
  font-family: var(--font-pixel);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-transform: uppercase;
}
.ts-eyebrow > i { width: 12px; height: 12px; color: var(--ink-2); flex-shrink: 0; }
.ts-eyebrow-tag {
  margin-left: auto;
  padding: 2px 6px;
  background: var(--surface);
  border: 1px solid var(--ink);
  font-family: var(--font-pixel);
  font-size: 7px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}

/* ─── LEVEL — 3-step pixel stepper ──────────────────────────────── */
.ts-level { grid-column: span 1; }
.ts-level-track {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 11px;
}
.ts-level-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px 8px;
  background: var(--surface);
  border: 1.5px solid var(--border-strong, var(--ink));
  border-radius: 2px;
  opacity: 0.55;
  position: relative;
  transition: opacity 120ms ease, transform 90ms steps(2, end), box-shadow 90ms steps(2, end);
}
.ts-level-step.on {
  opacity: 1;
  background: var(--purple-100);
  border: 1.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--purple-700, #4A3BAA);
  transform: translate(-1px, -1px);
}
.ts-level-pips {
  display: flex;
  gap: 3px;
}
.ts-level-pip {
  width: 8px;
  height: 8px;
  background: var(--surface);
  border: 1.5px solid var(--ink);
}
.ts-level-step.on .ts-level-pip { background: var(--surface); }
.ts-level-pip.on { background: var(--ink); }
.ts-level-step.on .ts-level-pip.on { background: var(--purple-700, #4A3BAA); }
.ts-level-lbl {
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-align: center;
}
.ts-level-step:not(.on) .ts-level-lbl { color: var(--ink-3); }
.ts-level-desc {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  padding: 9px 10px;
  background: var(--surface);
  border: 1.5px dashed var(--border-strong, rgba(26,24,32,0.25));
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-2);
}
.ts-level-desc > i {
  width: 13px; height: 13px;
  color: var(--purple-700, #4A3BAA);
  margin-top: 2px;
  flex-shrink: 0;
}

/* ─── PRIVACY ──────────────────────────────────────────────────── */
.ts-privacy { grid-column: span 1; }
.ts-pri-body {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 11px;
}
.ts-pri-icon {
  width: 48px; height: 48px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--green-300, #7BC489);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}
.ts-privacy.private .ts-pri-icon {
  background: var(--purple-300, #A89BE8);
}
.ts-pri-icon > i { width: 22px; height: 22px; }
.ts-pri-text { min-width: 0; }
.ts-pri-lbl {
  font-family: var(--font-pixel);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 4px;
}
.ts-pri-sub {
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--ink-2);
}
.ts-pri-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
}
.ts-pri-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px 3px 5px;
  background: var(--surface);
  border: 1px solid var(--ink);
  font-family: var(--font-pixel);
  font-size: 7.5px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}
.ts-pri-tag > i { width: 10px; height: 10px; color: var(--ink-3); flex-shrink: 0; }

/* ─── REQUIREMENTS ─────────────────────────────────────────────── */
.ts-needs { grid-column: span 2; }
@media (max-width: 720px) { .ts-needs { grid-column: span 1; } }

.ts-needs-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
}
.ts-need {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-left: 4px solid var(--yellow-500, #E8B23C);
  border-radius: 2px;
  min-width: 0;
}
.ts-need.ok { border-left-color: var(--green-500, #4FA266); }
.ts-need-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-2);
  border: 1.5px solid var(--ink);
}
.ts-need.ok .ts-need-icon {
  background: var(--success-tint, rgba(79,162,102,0.16));
}
.ts-need-icon > i { width: 16px; height: 16px; color: var(--ink-2); }
.ts-need.ok .ts-need-icon > i { color: var(--green-700, #347A4D); }
.ts-need-body { min-width: 0; }
.ts-need-lbl {
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 0.05em;
  color: var(--ink);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ts-need-sub {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.3;
}
.ts-need-status { display: flex; align-items: center; flex-shrink: 0; }
.ts-need-by {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.ts-need-av {
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 0.02em;
  color: #fff;
  border: 1.5px solid var(--ink);
  box-shadow: 1.5px 1.5px 0 var(--ink);
}
.ts-need-check {
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center; justify-content: center;
  background: var(--green-500, #4FA266);
  border: 1.5px solid var(--ink);
  color: #fff;
  box-shadow: 1.5px 1.5px 0 var(--ink);
}
.ts-need-check > i { width: 14px; height: 14px; }
.ts-need-open {
  padding: 4px 7px;
  background: var(--warning-tint, rgba(232,178,60,0.20));
  color: var(--yellow-700, #B3801F);
  border: 1.5px solid var(--yellow-500, #E8B23C);
  font-family: var(--font-pixel);
  font-size: 7.5px;
  letter-spacing: 0.06em;
}
.ts-need-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--success-tint, rgba(79,162,102,0.10));
  border: 1.5px dashed var(--green-500, #4FA266);
}
.ts-need-empty > i {
  width: 20px; height: 20px;
  color: var(--green-700, #347A4D);
  flex-shrink: 0;
}
.ts-need-empty b {
  display: block;
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 0.05em;
  color: var(--ink);
  margin-bottom: 2px;
}
.ts-need-empty span {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--ink-2);
}

/* ─── EXPANSIONS ───────────────────────────────────────────────── */
.ts-expansions { grid-column: span 1; }
.ts-exp-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ts-exp-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px 7px 7px;
  background: var(--surface);
  border: 1.5px solid var(--ink);
}
.ts-exp-cover {
  position: relative;
  width: 32px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 1.5px solid var(--ink);
  box-shadow: 1.5px 1.5px 0 var(--ink);
}
.ts-exp-short {
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 0.02em;
}
.ts-exp-mark {
  position: absolute;
  top: -6px; right: -6px;
  width: 16px; height: 16px;
  display: inline-flex;
  align-items: center; justify-content: center;
  background: var(--purple-500, #6F5BD9);
  border: 1.5px solid var(--ink);
  font-family: var(--font-pixel);
  font-size: 6px;
  letter-spacing: 0.02em;
  color: #fff;
}
.ts-exp-text { min-width: 0; }
.ts-exp-name {
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 3px;
}
.ts-exp-meta {
  font-family: var(--font-body);
  font-size: 11.5px;
  color: var(--ink-3);
}

/* ─── MISC: cost + arrive ──────────────────────────────────────── */
.ts-misc { grid-column: span 1; }
.ts-misc-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 0;
}
.ts-misc-icon {
  width: 36px; height: 36px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1.5px solid var(--ink);
  box-shadow: 1.5px 1.5px 0 var(--ink);
}
.ts-misc-icon > i { width: 16px; height: 16px; color: var(--ink); }
.ts-misc-lbl {
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-bottom: 3px;
}
.ts-misc-val {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink);
}
.ts-misc-val b {
  font-family: var(--font-pixel);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-right: 4px;
}
.ts-misc-divider {
  height: 1px;
  margin: 6px 0;
  background-image: linear-gradient(to right, var(--ink) 50%, transparent 50%);
  background-size: 4px 1px;
  opacity: 0.4;
}
