/* ═════════════════════════════════════════════════════════════
   NORULESPVP · TORNEIO · Premium design (gold/red style)
   ═════════════════════════════════════════════════════════════ */
:root {
  --trn-gold: #FFC93C;
  --trn-gold-soft: rgba(255,201,60,0.15);
  --trn-gold-glow: rgba(255,201,60,0.4);
  --trn-red: #FD1227;
  --trn-green: #5be584;
  --trn-blue: #60D4FF;
  --trn-line: rgba(255,255,255,0.08);
  --trn-line-strong: rgba(255,255,255,0.14);
  --trn-card: rgba(13,20,23,0.7);
  --trn-card-2: rgba(13,20,23,0.5);
  --trn-muted: #98a8b3;
  --trn-dim: #5a6772;
}

.trn-page { min-height: 100vh; position: relative; }
body.trn-page::before {
  content: ''; position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(255,201,60,0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 100%, rgba(253,18,39,0.08), transparent 60%);
  z-index: 0;
}
body.trn-page::after {
  content: ''; position: fixed; inset: 0; pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(circle at center, black, transparent 90%);
          mask-image: radial-gradient(circle at center, black, transparent 90%);
  z-index: 0;
}

.trn-main {
  max-width: 1480px;
  margin: 0 auto;
  padding: 28px 24px 80px;
  position: relative; z-index: 1;
}

.trn-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--trn-muted); text-decoration: none; font-size: 12px;
  margin-bottom: 16px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700;
}
.trn-back:hover { color: var(--trn-gold); }

/* Loading state */
.trn-loading {
  text-align: center; padding: 80px 20px;
  color: var(--trn-muted); font-size: 13px; letter-spacing: 0.15em;
  background: var(--trn-card);
  border: 1px solid var(--trn-line);
  border-radius: 14px;
}

/* ─── Intro (list page) ─── */
.trn-intro { text-align: center; margin-bottom: 36px; }
.trn-kicker {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255,201,60,0.10);
  border: 1px solid rgba(255,201,60,0.4);
  border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.18em;
  color: #FFD66B; text-transform: uppercase; margin-bottom: 14px;
}
.trn-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800; letter-spacing: 0.02em; line-height: 1; margin-bottom: 14px;
  background: linear-gradient(180deg, #fff 0%, #fff 55%, #ffe9a8 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.trn-title em {
  font-style: normal;
  background: linear-gradient(180deg, #FFE08A 0%, #FFC93C 60%, #D9A51E 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.trn-sub { color: var(--trn-muted); max-width: 620px; margin: 0 auto; font-size: 14px; line-height: 1.6; }

/* ─── List view ─── */
.trn-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  max-width: 1200px; margin: 0 auto;
}
.trn-card {
  display: flex; flex-direction: column;
  background: linear-gradient(135deg, rgba(13,20,23,0.85), rgba(13,20,23,0.6));
  border: 1px solid var(--trn-line);
  border-radius: 14px;
  padding: 20px 22px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  position: relative; overflow: hidden;
}
.trn-card::before {
  content: ''; position: absolute; top: 0; right: 0; width: 200px; height: 200px;
  background: radial-gradient(circle at top right, rgba(255,201,60,0.10), transparent 60%);
  pointer-events: none;
}
.trn-card:hover {
  border-color: rgba(255,201,60,0.45);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -10px rgba(255,201,60,0.25);
}
.trn-card-top { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; position: relative; z-index: 1; }
.trn-card-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.15em;
  text-transform: uppercase; border: 1px solid;
}
.trn-card-status.live, .trn-card-status.active { color: var(--trn-green); border-color: rgba(91,229,132,0.45); background: rgba(91,229,132,0.08); }
.trn-card-status.registration { color: var(--trn-blue); border-color: rgba(96,212,255,0.45); background: rgba(96,212,255,0.08); }
.trn-card-status.finished { color: var(--trn-gold); border-color: rgba(255,201,60,0.45); background: rgba(255,201,60,0.08); }
.trn-card-source {
  font-size: 9px; font-weight: 800; letter-spacing: 0.2em;
  padding: 4px 10px; border-radius: 999px;
  color: #ffcc66; border: 1px solid rgba(255,204,102,0.35);
  background: rgba(255,204,102,0.06);
}
.trn-card-name {
  font-size: 19px; font-weight: 800; color: #fff;
  margin-bottom: 8px; position: relative; z-index: 1;
}
.trn-card-prize {
  display: inline-block;
  padding: 5px 11px;
  background: rgba(255,201,60,0.08);
  border: 1px solid rgba(255,201,60,0.3);
  border-radius: 8px;
  color: var(--trn-gold);
  font-size: 12px; font-weight: 700;
  margin: 8px 0 0;
}
.trn-card-meta {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-top: auto; padding-top: 12px;
  border-top: 1px dashed rgba(255,255,255,0.07);
  font-size: 11.5px; color: var(--trn-muted);
}
.trn-card-meta-item { display: inline-flex; align-items: center; gap: 5px; }
.trn-card-meta-ico { opacity: 0.7; }
.trn-card-meta b { color: #fff; }

/* ─── Cinematic ticker (top) ─── */
.trn-ticker {
  background: linear-gradient(90deg, rgba(253,18,39,0.18), rgba(13,20,23,0.7) 50%, rgba(255,201,60,0.10));
  border: 1px solid var(--trn-line);
  border-radius: 999px;
  padding: 8px 18px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 14px;
  overflow: hidden;
}
.trn-ticker-live {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.18em;
  flex-shrink: 0;
}
.trn-ticker-live.live { background: var(--trn-red); color: #fff; animation: trn-tk-pulse 1.4s infinite; }
.trn-ticker-live.registration { background: var(--trn-blue); color: #06170c; }
.trn-ticker-live.finished { background: var(--trn-gold); color: #2c1c00; }
@keyframes trn-tk-pulse { 0%,100% { opacity: 1 } 50% { opacity: 0.6 } }
.trn-ticker-text {
  flex: 1; font-size: 12.5px; color: #fff; letter-spacing: 0.04em;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.trn-ticker-text b { color: var(--trn-gold); font-family: 'Bebas Neue', monospace; font-size: 14px; padding: 0 4px; }
.trn-ticker-text .dot { color: var(--trn-dim); margin: 0 10px; }

/* ─── Cinematic Hero ─── */
.trn-hero-cine {
  position: relative;
  border: 1px solid var(--trn-line);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 14px;
  min-height: 240px;
  background: linear-gradient(135deg, #2a1208, #06070a);
}
.trn-hero-cine::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 120% 90% at 90% 10%, rgba(255,201,60,0.18), transparent 60%),
    radial-gradient(ellipse 80% 80% at 10% 100%, rgba(253,18,39,0.18), transparent 60%);
}
.trn-hero-cine::after {
  content: '';
  position: absolute;
  right: -173px; top: 50%; transform: translateY(-50%);
  width: 420px; height: 420px;
  background-image: url('/NoRuleslogo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.18;
  pointer-events: none;
  filter: drop-shadow(0 0 40px rgba(253,18,39,0.5));
}
.trn-hero-cine-grid {
  position: relative; z-index: 1;
  padding: 32px 36px;
  display: grid; grid-template-columns: 1.4fr auto;
  gap: 28px; align-items: end;
  min-height: 240px;
}
.trn-hero-cine-eye {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10.5px; letter-spacing: 0.3em; color: var(--trn-gold);
  font-weight: 800; text-transform: uppercase;
  margin-bottom: 10px;
}
.trn-hero-cine-eye::before { content: ''; width: 24px; height: 1px; background: var(--trn-gold); }
.trn-hero-cine-title {
  font-family: 'Bebas Neue', 'Chakra Petch', sans-serif;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.92;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
  background: linear-gradient(180deg, #fff 0%, #fff 60%, #ffe9a8 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.trn-hero-cine-sub { font-size: 13px; color: var(--trn-muted); letter-spacing: 0.04em; margin-bottom: 14px; }
.trn-hero-prize {
  display: flex; flex-direction: column; align-items: center;
  padding: 22px 26px;
  background: linear-gradient(180deg, rgba(255,201,60,0.18), rgba(253,18,39,0.08));
  border: 1px solid var(--trn-gold);
  border-radius: 14px;
  text-align: center;
}
.trn-hero-prize-icon { font-size: 50px; margin-bottom: 4px; }
.trn-hero-prize-l { font-size: 10px; color: var(--trn-gold); letter-spacing: 0.3em; font-weight: 800; }
.trn-hero-prize-v {
  font-family: 'Bebas Neue';
  font-size: 26px; line-height: 1; margin-top: 4px;
  background: linear-gradient(180deg, #FFE08A, #FFC93C);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* ─── Balance card (right column) ─── */
.trn-balance-card {
  background: linear-gradient(135deg, rgba(255,201,60,0.18), rgba(253,18,39,0.06));
  border: 1px solid rgba(255,201,60,0.4);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 12px;
  text-align: center;
}
.trn-balance-l { font-size: 10px; letter-spacing: 0.3em; color: var(--trn-gold); font-weight: 800; text-transform: uppercase; }
.trn-balance-v {
  font-family: 'Bebas Neue';
  font-size: 36px; line-height: 1; margin-top: 4px;
  background: linear-gradient(180deg, #FFE08A, #FFC93C);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.trn-balance-sub { font-size: 10.5px; color: var(--trn-muted); margin-top: 6px; letter-spacing: 0.1em; font-weight: 700; }

/* ─── Bets card ─── */
.trn-bets-card {
  background: var(--trn-card);
  border: 1px solid var(--trn-line);
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
}
.trn-bet-row {
  display: grid; grid-template-columns: 1fr auto;
  gap: 8px; align-items: center;
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--trn-line);
  border-radius: 8px;
  margin-bottom: 5px;
  font-size: 12px;
}
.trn-bet-row:last-child { margin-bottom: 0; }
.trn-bet-on { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trn-bet-on b { color: var(--trn-blue); }
.trn-bet-amount { font-family: Consolas, monospace; font-weight: 800; font-size: 13px; }
.trn-bet-row.won { background: rgba(91,229,132,0.06); border-color: rgba(91,229,132,0.3); }
.trn-bet-row.won .trn-bet-amount { color: var(--trn-green); }
.trn-bet-row.lost { background: rgba(255,138,138,0.05); border-color: rgba(255,138,138,0.25); opacity: 0.65; }
.trn-bet-row.lost .trn-bet-amount { color: #ff8a8a; }

/* ─── Detail · Live bar ─── */
.trn-livebar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 10px 18px;
  background: rgba(0,0,0,0.4);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid var(--trn-line);
  border-radius: 999px;
  margin-bottom: 18px;
  font-size: 12px;
}
.trn-livebar-left { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.trn-pulse-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px; border-radius: 999px;
  font-weight: 800; letter-spacing: 0.2em; font-size: 10.5px;
  border: 1px solid;
}
.trn-pulse-pill.live { color: var(--trn-green); background: rgba(91,229,132,0.10); border-color: rgba(91,229,132,0.4); }
.trn-pulse-pill.registration { color: var(--trn-blue); background: rgba(96,212,255,0.10); border-color: rgba(96,212,255,0.4); }
.trn-pulse-pill.finished { color: var(--trn-gold); background: rgba(255,201,60,0.10); border-color: rgba(255,201,60,0.4); }
.trn-pulse-pill::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; box-shadow: 0 0 10px currentColor;
  animation: trn-pulse 1.4s infinite;
}
.trn-pulse-pill.finished::before { animation: none; }
@keyframes trn-pulse { 0%,100% { opacity: 1 } 50% { opacity: 0.35 } }
.trn-source-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  color: var(--trn-gold); border: 1px solid rgba(255,201,60,0.4);
  background: rgba(255,201,60,0.05);
  font-weight: 700; letter-spacing: 0.18em; font-size: 10.5px;
}
.trn-livebar-event { color: var(--trn-muted); letter-spacing: 0.15em; text-transform: uppercase; font-weight: 600; font-size: 11px; }
.trn-livebar-clock { color: var(--trn-gold); font-weight: 700; letter-spacing: 0.08em; font-size: 11.5px; }

/* ─── Hero ─── */
.trn-hero {
  position: relative;
  background: linear-gradient(135deg, rgba(13,20,23,0.85), rgba(13,20,23,0.5));
  border: 1px solid var(--trn-line);
  border-radius: 18px;
  padding: 32px 36px 28px;
  overflow: hidden;
  margin-bottom: 18px;
}
.trn-hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 90% 10%, rgba(255,201,60,0.18), transparent 50%),
    radial-gradient(circle at 10% 110%, rgba(253,18,39,0.12), transparent 60%);
  pointer-events: none;
}
.trn-hero::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--trn-gold), var(--trn-red));
}
.trn-hero-grid {
  display: grid;
  grid-template-columns: 1.6fr auto;
  gap: 24px;
  align-items: end;
  position: relative; z-index: 1;
}
.trn-chips { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.trn-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 8px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px solid var(--trn-line);
  background: rgba(255,255,255,0.03);
  color: var(--trn-muted);
}
.trn-chip-mode   { color: var(--trn-gold); border-color: rgba(255,201,60,0.4); background: rgba(255,201,60,0.06); }
.trn-chip-map    { color: var(--trn-blue); border-color: rgba(96,212,255,0.4); background: rgba(96,212,255,0.06); }
.trn-chip-weapon { color: var(--trn-red); border-color: rgba(253,18,39,0.4); background: rgba(253,18,39,0.06); }
.trn-chip-rounds { color: #c891ff; border-color: rgba(200,145,255,0.4); background: rgba(200,145,255,0.06); }

.trn-hero-title {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 800; letter-spacing: -0.01em; line-height: 1.0;
  background: linear-gradient(180deg, #fff 0%, #ffe9a8 110%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}
.trn-hero-sub { color: var(--trn-muted); font-size: 14px; letter-spacing: 0.04em; }
.trn-prize {
  text-align: right;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(255,201,60,0.18), rgba(253,18,39,0.06));
  border: 1px solid rgba(255,201,60,0.4);
  border-radius: 12px;
  min-width: 200px;
}
.trn-prize-l { font-size: 10.5px; color: var(--trn-gold); letter-spacing: 0.25em; font-weight: 800; }
.trn-prize-v {
  font-size: 22px; font-weight: 800; margin-top: 4px;
  background: linear-gradient(180deg, #FFE08A, #FFC93C);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* ─── Stats strip ─── */
.trn-stats-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--trn-line);
  border: 1px solid var(--trn-line);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 20px;
}
.trn-ss-cell {
  background: var(--trn-card);
  padding: 18px 22px;
  display: flex; align-items: center; gap: 14px;
  transition: background 0.15s;
}
.trn-ss-cell:hover { background: var(--trn-card-2); }
.trn-ss-icon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  font-size: 18px;
  background: rgba(255,201,60,0.12);
  border: 1px solid rgba(255,201,60,0.3);
}
.trn-ss-icon.red    { background: rgba(253,18,39,0.10); border-color: rgba(253,18,39,0.3); }
.trn-ss-icon.blue   { background: rgba(96,212,255,0.10); border-color: rgba(96,212,255,0.3); }
.trn-ss-icon.green  { background: rgba(91,229,132,0.10); border-color: rgba(91,229,132,0.3); }
.trn-ss-text { display: flex; flex-direction: column; min-width: 0; }
.trn-ss-l { font-size: 10.5px; color: var(--trn-muted); font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.trn-ss-v { font-size: 22px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.trn-ss-v.small { font-size: 14px; font-weight: 700; }
.trn-ss-v .dim { color: var(--trn-muted); font-size: 14px; font-weight: 500; }

/* ─── 2-col main (participants left, predictions right) ─── */
.trn-main-2col {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  gap: 18px;
  margin-bottom: 22px;
  align-items: start;
}

/* ─── 3-col cinematic main: roster | bracket | balance/bets/oracles ─── */
.trn-main-3col {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 2.4fr) minmax(280px, 1fr);
  gap: 16px;
  margin-bottom: 22px;
  align-items: start;
}
.trn-3col-left, .trn-3col-right { display: flex; flex-direction: column; gap: 12px; }
.trn-3col-center { min-width: 0; }
.trn-3col-center .trn-bracket-wrap { width: 100%; }
.trn-3col-center .trn-bracket { gap: 28px; min-height: 600px; padding: 8px 4px; }
.trn-3col-center .trn-round { min-width: 200px; }

@media (max-width: 1280px) {
  .trn-main-3col { grid-template-columns: 1fr; }
}
.trn-panel {
  background: var(--trn-card);
  border: 1px solid var(--trn-line);
  border-radius: 14px;
  overflow: hidden;
}
.trn-panel-h {
  padding: 14px 18px;
  border-bottom: 1px solid var(--trn-line);
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px;
}
.trn-panel-h h2 {
  font-size: 12px; letter-spacing: 0.2em; color: var(--trn-muted);
  font-weight: 800; text-transform: uppercase;
}
.trn-panel-h h2 b { color: #fff; margin-right: 6px; }
.trn-panel-count {
  background: var(--trn-gold-soft); border: 1px solid var(--trn-gold-glow);
  color: var(--trn-gold);
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.trn-panel-link {
  color: var(--trn-blue);
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.15em;
  text-decoration: none;
  text-transform: uppercase;
}
.trn-panel-link:hover { color: #fff; }

/* Participants */
.trn-roster { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; max-height: 480px; overflow-y: auto; }
.trn-player-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center; gap: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid transparent;
  border-radius: 10px;
  transition: all 0.15s;
}
.trn-player-row:hover { border-color: var(--trn-line-strong); transform: translateX(2px); background: rgba(255,255,255,0.04); }
.trn-player-num {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: rgba(255,201,60,0.10);
  color: var(--trn-gold);
  font-weight: 800; font-size: 12px;
  border: 1px solid rgba(255,201,60,0.25);
  font-family: Consolas, monospace;
}
.trn-player-name { font-size: 13.5px; font-weight: 700; color: #fff; letter-spacing: 0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Predictions panel */
.trn-pred { padding: 16px 18px; }
.trn-pred-banner {
  background: linear-gradient(135deg, rgba(96,212,255,0.10), rgba(255,201,60,0.05));
  border: 1px solid rgba(96,212,255,0.3);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.trn-pred-icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: rgba(96,212,255,0.15);
  border: 1px solid rgba(96,212,255,0.4);
  font-size: 22px;
  flex-shrink: 0;
}
.trn-pred-banner h3 { font-size: 13px; letter-spacing: 0.18em; color: var(--trn-blue); font-weight: 800; text-transform: uppercase; }
.trn-pred-banner p { font-size: 12.5px; color: var(--trn-muted); margin-top: 2px; line-height: 1.4; }

.trn-pred-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.trn-pred-cell {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--trn-line);
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
}
.trn-pred-cell .l { font-size: 10px; letter-spacing: 0.18em; color: var(--trn-muted); font-weight: 700; text-transform: uppercase; }
.trn-pred-cell .v { font-size: 26px; font-weight: 800; line-height: 1.1; margin-top: 4px; font-variant-numeric: tabular-nums; }
.trn-pred-cell.win .v { color: var(--trn-green); }
.trn-pred-cell.miss .v { color: #ff8a8a; }
.trn-pred-cell.acc .v { color: var(--trn-gold); }

.trn-pred-login {
  display: inline-flex; align-items: center; gap: 8px;
  background: #5865F2; color: #fff;
  padding: 10px 16px; border-radius: 10px;
  font-size: 13px; font-weight: 700; text-decoration: none;
  letter-spacing: 0.04em;
  width: 100%; justify-content: center;
  transition: filter 0.15s;
}
.trn-pred-login:hover { filter: brightness(1.1); }

.trn-oracles { border-top: 1px dashed var(--trn-line); padding-top: 12px; }
.trn-oracles-h {
  font-size: 11px; letter-spacing: 0.2em; color: var(--trn-gold);
  font-weight: 800; text-transform: uppercase; margin-bottom: 8px;
}
.trn-oracle-row {
  display: grid; grid-template-columns: 28px 1fr auto;
  gap: 10px; align-items: center;
  padding: 8px 12px;
  background: rgba(255,201,60,0.04);
  border: 1px solid rgba(255,201,60,0.18);
  border-radius: 8px;
  margin-bottom: 4px;
}
.trn-oracle-rank {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 8px;
  font-weight: 800; font-size: 14px;
  background: rgba(255,201,60,0.18);
  color: var(--trn-gold);
}
.trn-oracle-rank.gold { background: linear-gradient(135deg, #FFE08A, #FFC93C); color: #2c1c00; }
.trn-oracle-rank.silver { background: linear-gradient(135deg, #d8d8e0, #a4a8b1); color: #1c1f24; }
.trn-oracle-rank.bronze { background: linear-gradient(135deg, #E1B07E, #B47236); color: #2b1804; }
.trn-oracle-name { font-size: 13.5px; font-weight: 700; color: #fff; }
.trn-oracle-correct { font-size: 12px; color: var(--trn-gold); font-weight: 700; font-family: Consolas, monospace; }

/* ─── Champion banner ─── */
.trn-champion {
  background: linear-gradient(135deg, rgba(255,201,60,0.20), rgba(253,18,39,0.10));
  border: 2px solid var(--trn-gold);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  margin-bottom: 22px;
  box-shadow: 0 0 40px rgba(255,201,60,0.25);
}
.trn-champion-icon { font-size: 52px; margin-bottom: 8px; }
.trn-champion-label { font-size: 11px; letter-spacing: 0.3em; color: #FFD66B; font-weight: 800; }
.trn-champion-name {
  font-size: clamp(28px, 4vw, 40px); font-weight: 900;
  background: linear-gradient(180deg, #FFE08A, #FFC93C);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: 0.04em; margin-top: 4px;
}

/* ─── Bracket ─── */
.trn-bracket-wrap {
  background: var(--trn-card);
  border: 1px solid var(--trn-line);
  border-radius: 14px;
  padding: 22px 24px 26px;
  overflow: hidden;
}
.trn-bracket-h {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--trn-line);
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.trn-bracket-h h2 { font-size: 13px; letter-spacing: 0.22em; color: #fff; font-weight: 800; text-transform: uppercase; display: inline-flex; align-items: center; gap: 10px; }
.trn-bracket-size {
  display: inline-flex; align-items: center;
  font-family: Consolas, monospace;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--trn-gold);
  background: rgba(255,201,60,0.1);
  border: 1px solid rgba(255,201,60,0.3);
  padding: 3px 8px; border-radius: 999px;
  text-transform: uppercase;
}
.trn-bracket-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.trn-bracket-search {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(13,20,23,0.7);
  border: 1px solid var(--trn-line);
  border-radius: 8px;
  padding: 6px 10px;
  min-width: 240px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.trn-bracket-search:focus-within { border-color: var(--trn-gold); box-shadow: 0 0 0 3px rgba(255,201,60,0.12); }
.trn-search-ico { font-size: 12px; opacity: 0.6; }
.trn-bracket-search input {
  flex: 1;
  background: transparent;
  border: 0;
  color: #fff;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 13px;
  outline: none;
  padding: 2px 0;
  min-width: 0;
}
.trn-bracket-search input::placeholder { color: var(--trn-muted); letter-spacing: 0.04em; }
.trn-search-clear {
  background: transparent;
  border: 0;
  color: var(--trn-muted);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
}
.trn-search-clear:hover { color: var(--trn-red); background: rgba(253,18,39,0.08); }
.trn-bracket-progress { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--trn-muted); letter-spacing: 0.05em; }
.trn-progress-bar {
  width: 140px; height: 4px;
  background: rgba(255,255,255,0.06); border-radius: 999px; overflow: hidden;
}
.trn-progress-bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--trn-gold), var(--trn-red));
  transition: width 0.4s ease;
}

/* ─── Bracket v2 — full-width, bigger ─── */
.trn-bracket-wrap { padding: 28px 28px 32px !important; }
/* ────────────────────────────────────────────────────────────────────
   BRACKET — two view modes selectable via toggle:
     .bracket-mode-tree  → classic tree with connector lines (default)
     .bracket-mode-cards → wide card grid, one section per round
   ──────────────────────────────────────────────────────────────────── */

.trn-bracket {
  display: flex; gap: 60px;
  align-items: stretch;
  overflow-x: auto;
  padding: 38px 12px 18px;
  min-height: 0;
}
/* TREE MODE uses CSS Grid so each round column has the same number of rows
   as round 1, but each match in round R spans 2^R rows — making the match
   centers in round R+1 land exactly on the midpoint of pairs in round R. */
.bracket-mode-tree .trn-round {
  display: grid;
  grid-template-rows: repeat(var(--trn-rows, 32), var(--trn-row-h, 78px));
  grid-auto-flow: row;
  min-width: 240px; max-width: 280px;
  flex: 0 0 auto;
  position: relative;
}
.bracket-mode-tree .trn-round > .trn-round-label {
  position: absolute;
  top: -32px; left: 0; right: 0;
  margin: 0;
  text-align: center;
  justify-content: center;
  z-index: 2;
}
.bracket-mode-tree .trn-round > .trn-match {
  grid-row: span var(--trn-row-span, 1);
  align-self: center;
  position: relative;
  width: 100%;
}
/* Cards mode falls back to flat flex columns (no grid) */
.bracket-mode-cards .trn-round {
  display: flex; flex-direction: column;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 240px; max-width: 280px;
  position: relative;
}
.bracket-mode-cards .trn-round > .trn-round-label {
  position: static;
  margin-bottom: 12px;
}

/* ── TREE MODE: connector lines between matches ──
   The grid places each match centered in a row of height var(--trn-row-h).
   Round R matches span 2^R rows. So:
   - Two matches in round R that pair up have centers row_h apart.
   - The match in round R+1 is centered between them.
   Connector layout:
   - Every match (non-final) draws a horizontal line going right out of its right-center.
   - The "top" match of a pair (.trn-match at even DOM position = match[0], match[2], …)
     extends the line vertically DOWN by row_h/2 to reach the pair midpoint.
   - The "bottom" match of a pair (odd DOM position) extends UP by row_h/2.
   - Each non-first round match draws an incoming horizontal line from the left.
*/
.bracket-mode-tree .trn-round:not(:last-child) > .trn-match {
  --conn-color: rgba(255,201,60,0.45);
  /* Distance from match center to pair midpoint = (rows-spanned × row-height) / 2.
     Round 0 spans 1 row, round 1 spans 2, round 2 spans 4, etc. */
  --conn-half: calc(var(--trn-row-span, 1) * var(--trn-row-h, 88px) / 2);
}
/* Incoming horizontal line on the left of each non-first-round match */
.bracket-mode-tree .trn-round:not(:first-child) > .trn-match::before {
  content: '';
  position: absolute;
  left: -30px; top: 50%;
  width: 30px;
  border-top: 1px solid rgba(255,201,60,0.45);
  pointer-events: none;
}
/* Outgoing horizontal line + vertical fork going DOWN (top of pair).
   !important is required because the predict-prompt::after rule (lower
   specificity) can leak `top: 6px` and other props when not explicitly reset. */
.bracket-mode-tree .trn-round:not(:last-child) > .trn-match:nth-child(even)::after {
  content: '' !important;
  position: absolute !important;
  right: -30px !important;
  left: auto !important;
  top: 50% !important;
  bottom: auto !important;
  width: 30px !important;
  height: var(--conn-half) !important;
  border: 0 !important;
  border-top: 1px solid var(--conn-color) !important;
  border-right: 1px solid var(--conn-color) !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 0 !important;
  color: transparent !important;
  pointer-events: none;
  z-index: 1;
}
/* Outgoing horizontal line + vertical fork going UP (bottom of pair) */
.bracket-mode-tree .trn-round:not(:last-child) > .trn-match:nth-child(odd)::after {
  content: '' !important;
  position: absolute !important;
  right: -30px !important;
  left: auto !important;
  top: auto !important;
  bottom: 50% !important;
  width: 30px !important;
  height: var(--conn-half) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--conn-color) !important;
  border-right: 1px solid var(--conn-color) !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 0 !important;
  color: transparent !important;
  pointer-events: none;
  z-index: 1;
}

/* ── CARDS MODE: stacked sections, one per round, with grid of wide cards ── */
.bracket-mode-cards .trn-bracket {
  display: flex !important;
  flex-direction: column;
  gap: 28px;
  overflow: visible;
  padding: 12px 0;
}
.bracket-mode-cards .trn-round {
  flex: none;
  min-width: 0; max-width: 100%;
  width: 100%;
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
}
.bracket-mode-cards .trn-round > .trn-round-label {
  position: static;
  display: inline-flex;
  margin: 0 0 14px;
  padding: 8px 18px;
  background: rgba(255,201,60,0.06);
  border: 1px solid rgba(255,201,60,0.25);
  border-radius: 999px;
  text-align: left;
  justify-content: flex-start;
  font-size: 13px;
}
.bracket-mode-cards .trn-round {
  position: relative;
}
.bracket-mode-cards .trn-round::after {
  content: '';
  display: grid;
}
.bracket-mode-cards .trn-round > .trn-match {
  display: inline-block;
  vertical-align: top;
  width: calc(33.333% - 12px);
  margin: 0 12px 12px 0;
  min-width: 320px;
}
@media (max-width: 1100px) {
  .bracket-mode-cards .trn-round > .trn-match { width: calc(50% - 12px); }
}
@media (max-width: 700px) {
  .bracket-mode-cards .trn-round > .trn-match { width: 100%; margin-right: 0; min-width: 0; }
}
.bracket-mode-cards .trn-round > .trn-match::before,
.bracket-mode-cards .trn-round > .trn-match::after { display: none !important; }
/* Hide stray connectors when in cards mode */
.bracket-mode-cards .trn-final::before { display: none !important; }

/* ── View toggle buttons ── */
.trn-view-toggle {
  display: inline-flex;
  background: rgba(13,20,23,0.7);
  border: 1px solid var(--trn-line);
  border-radius: 8px;
  padding: 3px;
}
.trn-view-btn {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em;
  padding: 6px 12px;
  background: transparent;
  border: 0;
  color: var(--trn-muted);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s;
  text-transform: uppercase;
}
.trn-view-btn:hover { color: #fff; }
.trn-view-btn.active {
  background: linear-gradient(135deg, var(--trn-gold), #e0a814);
  color: #1a0d00;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(255,201,60,0.25);
}
.trn-round-label {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  font-size: 11px; letter-spacing: 0.2em; font-weight: 800; text-transform: uppercase;
  color: var(--trn-gold);
  border: 1px solid rgba(255,201,60,0.3);
  background: rgba(255,201,60,0.06);
}
.trn-round.trn-final .trn-round-label {
  color: var(--trn-red);
  border-color: rgba(253,18,39,0.4);
  background: rgba(253,18,39,0.08);
}

.trn-match {
  background: linear-gradient(180deg, rgba(20,28,32,0.92), rgba(10,14,18,0.92));
  border: 1px solid var(--trn-line-strong);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  transition: all 0.18s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.trn-match:hover {
  border-color: rgba(255,201,60,0.5);
  box-shadow: 0 10px 30px -8px rgba(255,201,60,0.28);
  transform: translateY(-1px);
}

/* Lobby ID badge — top-right of each match card */
.trn-match-lobby {
  position: absolute;
  top: 6px; right: 8px;
  z-index: 2;
  font-family: Consolas, monospace;
  font-size: 9.5px; font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--trn-muted);
  background: rgba(0,0,0,0.45);
  border: 1px solid var(--trn-line);
  padding: 2px 7px;
  border-radius: 999px;
  pointer-events: none;
  user-select: text;
}
.trn-match:hover .trn-match-lobby { color: var(--trn-gold); border-color: rgba(255,201,60,0.4); }

/* Search state: dim non-matches, highlight hits */
.trn-bracket-wrap.searching .trn-match { transition: opacity 0.18s, box-shadow 0.18s, border-color 0.18s; }
.trn-match.search-dim { opacity: 0.18; }
.trn-match.search-hit {
  border-color: var(--trn-gold) !important;
  box-shadow: 0 0 0 2px rgba(255,201,60,0.4), 0 12px 32px rgba(255,201,60,0.3) !important;
  animation: trnHitPulse 1.6s ease-in-out infinite;
}
@keyframes trnHitPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(255,201,60,0.4), 0 8px 22px rgba(255,201,60,0.25); }
  50%      { box-shadow: 0 0 0 3px rgba(255,201,60,0.65), 0 14px 36px rgba(255,201,60,0.45); }
}

/* ─── ALL MATCHES TABLE ─── */
.trn-matches-table-section {
  margin-top: 28px;
  background: var(--trn-card);
  border: 1px solid var(--trn-line);
  border-radius: 14px;
  padding: 24px 24px 28px;
}
.trn-matches-h { padding-bottom: 14px; border-bottom: 1px solid var(--trn-line); margin-bottom: 18px; }
.trn-matches-h h2 {
  font-size: 14px; letter-spacing: 0.22em; color: #fff; font-weight: 800;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 12px;
  margin-bottom: 4px;
}
.trn-matches-h p { font-size: 12px; color: var(--trn-muted); letter-spacing: 0.04em; }
.trn-tbl-round { margin-top: 22px; }
.trn-tbl-round:first-child { margin-top: 0; }
.trn-tbl-round-h {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(255,201,60,0.06);
  border: 1px solid rgba(255,201,60,0.2);
  border-radius: 8px 8px 0 0;
  border-bottom: 0;
}
.trn-tbl-round-icon { font-size: 16px; }
.trn-tbl-round-name {
  font-family: 'Bebas Neue', 'Chakra Petch', sans-serif;
  font-size: 18px; font-weight: 800; letter-spacing: 0.16em;
  color: var(--trn-gold); text-transform: uppercase;
}
.trn-tbl-round-count {
  font-family: Consolas, monospace;
  font-size: 10px; font-weight: 700; letter-spacing: 0.16em;
  color: var(--trn-muted);
  background: rgba(0,0,0,0.3);
  padding: 3px 8px; border-radius: 999px;
  margin-left: auto;
  text-transform: uppercase;
}
.trn-tbl-wrap {
  overflow-x: auto;
  border: 1px solid var(--trn-line);
  border-radius: 0 0 8px 8px;
}
.trn-tbl {
  width: 100%;
  border-collapse: collapse;
  background: rgba(13,20,23,0.4);
  font-family: 'Chakra Petch', sans-serif;
  min-width: 720px;
}
.trn-tbl thead th {
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--trn-muted);
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--trn-line);
  background: rgba(0,0,0,0.25);
  text-transform: uppercase;
  white-space: nowrap;
}
.trn-tbl tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.12s, opacity 0.18s;
}
.trn-tbl tbody tr:hover { background: rgba(255,201,60,0.04); }
.trn-tbl tbody tr:last-child { border-bottom: 0; }
.trn-tbl td {
  padding: 11px 14px;
  font-size: 13px;
  color: #e4e9ec;
  vertical-align: middle;
}
.trn-tbl-lobby {
  font-family: Consolas, monospace;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--trn-muted);
  white-space: nowrap;
  width: 80px;
}
.trn-tbl-player {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  max-width: 220px;
}
.trn-tbl-player.winner { color: var(--trn-gold); font-weight: 800; }
.trn-tbl-player.loser  { color: var(--trn-muted); text-decoration: line-through; opacity: 0.6; }
.trn-tbl-tbd { color: rgba(255,255,255,0.22); font-style: italic; }
.trn-tbl-score {
  font-family: Consolas, monospace;
  font-weight: 800; font-size: 13px;
  text-align: center;
  color: var(--trn-gold);
  width: 70px; white-space: nowrap;
}
.trn-tbl-status { width: 130px; }
.trn-tbl-badge {
  display: inline-flex; align-items: center;
  font-family: Consolas, monospace;
  font-size: 9.5px; font-weight: 800;
  letter-spacing: 0.14em;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  white-space: nowrap;
}
.trn-tbl-badge.pending   { background: rgba(255,255,255,0.04); color: var(--trn-muted); border: 1px solid var(--trn-line); }
.trn-tbl-badge.ready     { background: rgba(96,212,255,0.12); color: #60D4FF; border: 1px solid rgba(96,212,255,0.3); }
.trn-tbl-badge.scheduled { background: rgba(255,140,40,0.12); color: #ffb070; border: 1px solid rgba(255,140,40,0.3); }
.trn-tbl-badge.live      { background: rgba(253,18,39,0.18); color: #ff6273; border: 1px solid rgba(253,18,39,0.4); animation: trnLivePulse 1.2s ease-in-out infinite; }
.trn-tbl-badge.decided   { background: rgba(76,217,123,0.12); color: #4cd97b; border: 1px solid rgba(76,217,123,0.3); }
.trn-tbl-badge.bye       { background: rgba(255,255,255,0.04); color: var(--trn-muted); border: 1px solid var(--trn-line); }
@keyframes trnLivePulse {
  0%, 100% { box-shadow: 0 0 0 rgba(253,18,39,0); }
  50%      { box-shadow: 0 0 14px rgba(253,18,39,0.5); }
}
.trn-tbl-sched {
  font-family: Consolas, monospace;
  font-size: 11.5px;
  color: var(--trn-muted);
  white-space: nowrap;
  width: 130px;
}

/* Search filter on the table */
.trn-matches-table-section.searching tr.search-dim { opacity: 0.18; }
.trn-matches-table-section.searching tr.search-hit { background: rgba(255,201,60,0.08); box-shadow: inset 3px 0 0 var(--trn-gold); }

/* Large bracket (32+ matches in round 1) — tighter spacing so all 64 fit nicely */
/* Large bracket variant — only meaningful in tree mode (cards mode is already responsive) */
.bracket-mode-tree .trn-bracket.trn-bracket-large { gap: 57px; }
.bracket-mode-tree .trn-bracket.trn-bracket-large .trn-round { min-width: 220px; max-width: 250px; }
.bracket-mode-tree .trn-bracket.trn-bracket-large .trn-match { font-size: 12px; }
.bracket-mode-tree .trn-bracket.trn-bracket-large .trn-match-lobby { font-size: 8.5px; padding: 1px 5px; }
.bracket-mode-tree .trn-bracket.trn-bracket-large .trn-slot-stats { display: none; }

/* ─────────────────────────────────────────────────────────────────
   TREE MODE — compact match cards (matches Design 2 preview).
   Hide the heavy elements (wager footer, prediction bars, tally,
   percentages, stats line). The HTML keeps:
     .trn-match-lobby (absolute, top right)
     .trn-match-slot ▸ .trn-slot-row ▸ .trn-slot-name + .trn-slot-meta(score)
   ───────────────────────────────────────────────────────────────── */
.bracket-mode-tree .trn-match {
  padding: 0;
  background: linear-gradient(180deg, rgba(20,28,32,0.94), rgba(10,14,18,0.94));
  border: 1px solid var(--trn-line-strong);
  border-radius: 6px;
  overflow: visible;
  /* Uniform height so connector midpoints align across rounds */
  min-height: 64px;
}
.bracket-mode-tree .trn-match-slot {
  padding: 8px 12px !important;
  min-height: 0 !important;
  background: transparent !important;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 13px;
  position: relative;
  overflow: hidden;
}
.bracket-mode-tree .trn-match-slot:last-of-type { border-bottom: 0; }
.bracket-mode-tree .trn-slot-fill { display: none !important; }
.bracket-mode-tree .trn-slot-stats { display: none !important; }
.bracket-mode-tree .trn-slot-pct { display: none !important; }
.bracket-mode-tree .trn-match-tally { display: none !important; }
.bracket-mode-tree .trn-match-wager { display: none !important; }
.bracket-mode-tree .trn-match-sched { display: none !important; }
.bracket-mode-tree .trn-fav-pill,
.bracket-mode-tree .trn-dog-pill { display: none !important; }
.bracket-mode-tree .trn-pred-mine-ic { display: none !important; }
/* Strip all the predict-prompt::after styling that would otherwise leak
   through into our connector (background, border-radius, full border, etc). */
.bracket-mode-tree .trn-match.predict-prompt {
  border-color: var(--trn-line-strong) !important;
}
.bracket-mode-tree .trn-match.predict-prompt::after {
  background: transparent !important;
  color: transparent !important;
  font-size: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  z-index: 1 !important;
}

.bracket-mode-tree .trn-match-slot.winner {
  color: var(--trn-gold);
  font-weight: 800;
  background: rgba(255,201,60,0.05) !important;
}
.bracket-mode-tree .trn-match-slot.winner .trn-slot-name::before {
  content: '▶';
  display: inline-block;
  margin-right: 6px;
  color: var(--trn-gold);
  font-size: 10px;
  vertical-align: middle;
}
.bracket-mode-tree .trn-match-slot.loser {
  opacity: 0.55;
  color: var(--trn-dim);
}
.bracket-mode-tree .trn-match-slot.tbd,
.bracket-mode-tree .trn-match-slot.bye {
  padding: 8px 12px !important;
}
.bracket-mode-tree .trn-slot-name {
  font-size: 13px !important;
  font-weight: inherit !important;
}
.bracket-mode-tree .trn-match-score {
  font-family: Consolas, monospace;
  font-size: 11px; font-weight: 800;
  color: inherit;
  background: rgba(255,201,60,0.1);
  padding: 1px 7px; border-radius: 4px;
  min-width: 22px; text-align: right;
}
.bracket-mode-tree .trn-match-slot.loser .trn-match-score {
  background: transparent;
  color: var(--trn-dim);
}
/* Lobby ID — small pill sticking out top-right of the card */
.bracket-mode-tree .trn-match-lobby {
  position: absolute !important;
  top: -10px !important;
  right: 8px !important;
  background: linear-gradient(135deg, #1c2730, #0d1417) !important;
  border: 1px solid rgba(255,201,60,0.35) !important;
  color: var(--trn-gold) !important;
  font-family: Consolas, monospace;
  font-size: 11px !important;
  font-weight: 800;
  padding: 3px 10px !important;
  letter-spacing: 0.14em;
  border-radius: 999px;
  z-index: 3;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.12s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  user-select: text;
}
.bracket-mode-tree .trn-match-lobby:hover {
  background: linear-gradient(135deg, var(--trn-gold), #e0a814) !important;
  color: #1a0d00 !important;
  border-color: var(--trn-gold) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255,201,60,0.4);
}
.bracket-mode-tree .trn-match-lobby.copied {
  background: linear-gradient(135deg, #4cd97b, #2fa653) !important;
  color: #001a08 !important;
  border-color: #4cd97b !important;
}
.bracket-mode-tree .trn-match-lobby.copied::after {
  content: ' ✓';
  font-weight: 900;
}

/* "AO VIVO" badge — top-left of match card while in progress */
.trn-match-aovivo {
  position: absolute;
  top: -10px; left: 8px;
  z-index: 4;
  display: inline-flex; align-items: center; gap: 5px;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 9.5px; font-weight: 800;
  letter-spacing: 0.18em;
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FD1227, #9d0d1b);
  color: #fff;
  text-transform: uppercase;
  box-shadow: 0 2px 10px rgba(253,18,39,0.5), 0 0 0 1px rgba(253,18,39,0.3);
  animation: trnAoVivoPulse 1.4s ease-in-out infinite;
}
.trn-aovivo-dot {
  width: 6px; height: 6px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 6px #fff;
}
@keyframes trnAoVivoPulse {
  0%, 100% { box-shadow: 0 2px 10px rgba(253,18,39,0.5), 0 0 0 1px rgba(253,18,39,0.3); }
  50%      { box-shadow: 0 2px 16px rgba(253,18,39,0.85), 0 0 0 3px rgba(253,18,39,0.4); }
}
.trn-match.is-live {
  border-color: rgba(253,18,39,0.55) !important;
  box-shadow: 0 0 0 1px rgba(253,18,39,0.25), 0 6px 20px rgba(253,18,39,0.18);
}

/* Live in-progress score (FX-side roundStatus) */
.trn-match-live {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border-top: 1px dashed rgba(253,18,39,0.25);
  background: rgba(253,18,39,0.06);
  font-family: Consolas, monospace;
  font-size: 11px;
}
.trn-live-dot {
  width: 8px; height: 8px;
  background: var(--trn-red);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(253,18,39,0.6);
  animation: trnLiveDot 1.2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes trnLiveDot {
  0%, 100% { opacity: 1; box-shadow: 0 0 10px rgba(253,18,39,0.6); }
  50%      { opacity: 0.5; box-shadow: 0 0 4px rgba(253,18,39,0.3); }
}
.trn-live-score {
  font-weight: 800; font-size: 13px;
  color: var(--trn-gold);
  letter-spacing: 0.06em;
}
.trn-live-score small { color: var(--trn-muted); margin: 0 4px; font-size: 10px; }
.trn-live-meta {
  margin-left: auto;
  font-size: 9.5px; color: var(--trn-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Match ready check-in (auto-forfeit feature) */
.trn-match-ready {
  display: flex; flex-wrap: wrap; gap: 4px;
  align-items: center;
  padding: 6px 10px;
  border-top: 1px dashed rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.18);
  font-size: 10.5px;
}
.trn-ready-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-family: Consolas, monospace;
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.trn-ready-pill.ok      { background: rgba(76,217,123,0.12);  color: #4cd97b; border: 1px solid rgba(76,217,123,0.4); }
.trn-ready-pill.pending { background: rgba(255,255,255,0.04); color: var(--trn-muted); border: 1px solid var(--trn-line); }
.trn-ready-pill.late    { background: rgba(253,18,39,0.15);   color: #ff6273; border: 1px solid rgba(253,18,39,0.4); animation: trnLatePulse 1.4s ease-in-out infinite; }
@keyframes trnLatePulse {
  0%, 100% { box-shadow: 0 0 0 rgba(253,18,39,0); }
  50%      { box-shadow: 0 0 10px rgba(253,18,39,0.5); }
}
.trn-ready-btn {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4cd97b 0%, #2fa653 100%);
  color: #001a08;
  border: 0;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 9.5px; font-weight: 800;
  letter-spacing: 0.14em;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(76,217,123,0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}
.trn-ready-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(76,217,123,0.5); }
.trn-ready-btn:disabled { opacity: 0.6; cursor: not-allowed; }
/* In tree mode (compact) hide the ready row entirely — it's available in cards mode + table */
.bracket-mode-tree .trn-match-ready { display: none !important; }

/* BYE matches in round 1 — subtle so they don't compete with real play-ins */
.bracket-mode-tree .trn-match.is-bye-advance {
  opacity: 0.65;
  border-style: dashed;
  border-color: var(--trn-line);
  background: rgba(13,20,23,0.5);
}
.bracket-mode-tree .trn-match.is-bye-advance .trn-match-slot.bye {
  font-size: 10.5px !important;
  color: var(--trn-dim) !important;
  font-style: italic;
  letter-spacing: 0.16em;
  background: transparent !important;
}
.bracket-mode-tree .trn-match.is-bye-advance .trn-match-slot.winner {
  background: transparent !important;
  color: #c4ccd2;
  font-weight: 600;
}
.bracket-mode-tree .trn-match.is-bye-advance .trn-match-slot.winner .trn-slot-name::before {
  content: '✓';
  color: var(--trn-muted);
  font-size: 9px;
}
.bracket-mode-tree .trn-match.is-bye-advance .trn-match-score { display: none !important; }

/* ─────────────────────────────────────────────────────────────────
   CARDS MODE — wide VS card per match (matches Design 3 preview).
   Uses CSS grid to lay out each .trn-match as [P1 | VS+score | P2].
   ───────────────────────────────────────────────────────────────── */
.bracket-mode-cards .trn-match {
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(20,28,32,0.94), rgba(10,14,18,0.94));
  border: 1px solid var(--trn-line-strong);
  border-radius: 10px;
  transition: all 0.2s;
  position: relative;
}
.bracket-mode-cards .trn-match:hover {
  border-color: var(--trn-gold);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -10px rgba(255,201,60,0.25);
}
.bracket-mode-cards .trn-match-lobby {
  top: 8px !important;
  right: 12px !important;
  font-size: 9.5px !important;
  padding: 2px 7px !important;
  letter-spacing: 0.12em !important;
}
.bracket-mode-cards .trn-match-slot {
  padding: 10px 14px !important;
  background: rgba(255,255,255,0.025) !important;
  border-radius: 6px;
  border: 1px solid transparent;
  margin-top: 24px; /* space below lobby badge */
}
.bracket-mode-cards .trn-match-slot:nth-of-type(2) { margin-top: 8px; }
.bracket-mode-cards .trn-match-slot.winner {
  border-color: var(--trn-gold);
  background: rgba(255,201,60,0.08) !important;
  color: var(--trn-gold);
  font-weight: 800;
}
.bracket-mode-cards .trn-match-slot.loser {
  opacity: 0.45;
}
.bracket-mode-cards .trn-slot-fill {
  border-radius: 6px;
}
.bracket-mode-cards .trn-slot-row {
  font-size: 14px;
}
.bracket-mode-cards .trn-match-tally {
  margin-top: 8px;
  font-size: 10px; color: var(--trn-muted);
  letter-spacing: 0.08em;
  text-align: center;
}
.bracket-mode-cards .trn-match-wager {
  margin-top: 8px;
  padding: 8px 10px;
  font-size: 11px;
}
.bracket-mode-cards .trn-match-sched {
  margin-top: 8px;
  font-size: 10.5px;
}
/* Final round: champion banner ABOVE the match (separate element) */
.trn-round.trn-final {
  position: relative;
}
/* CHAMPIONSHIP banner — rendered as a real element inside the final match
   (see renderMatch in torneio.js) so it sits directly above the card. */
.trn-champion-banner {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%; transform: translateX(-50%);
  background: linear-gradient(180deg, #FFE08A, #FFC93C);
  color: #2c1c00;
  font-family: 'Bebas Neue', 'Chakra Petch', sans-serif;
  font-size: 12px; font-weight: 800; letter-spacing: 0.2em;
  padding: 4px 18px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(255,201,60,0.4);
  z-index: 4;
  pointer-events: none;
}
.trn-round.trn-final .trn-round-label { display: none; }
.trn-round.trn-final .trn-match {
  border: 2px solid var(--trn-gold);
  box-shadow: 0 0 30px rgba(255,201,60,0.30);
  background: linear-gradient(180deg, rgba(40,30,10,0.92), rgba(15,10,5,0.92));
}
.trn-match.predict-prompt { border-color: rgba(96,212,255,0.4); }
.trn-match.predict-prompt::after {
  content: 'CLICA PARA PREVER';
  position: absolute; right: 6px; top: 6px;
  font-size: 8.5px; font-weight: 800; letter-spacing: 0.15em;
  color: var(--trn-blue);
  background: rgba(96,212,255,0.12);
  border: 1px solid rgba(96,212,255,0.3);
  padding: 2px 6px; border-radius: 999px;
  pointer-events: none; z-index: 2;
}

.trn-match-tally {
  text-align: center;
  font-size: 10px; letter-spacing: 0.16em;
  color: var(--trn-dim);
  padding: 6px 0;
  background: rgba(0,0,0,0.25);
  border-top: 1px solid var(--trn-line);
  text-transform: uppercase;
}

.trn-match-sched {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  background: linear-gradient(90deg, rgba(96,212,255,0.12), transparent 80%);
  border-bottom: 1px solid rgba(96,212,255,0.25);
  font-size: 10.5px; font-weight: 700;
  color: var(--trn-blue);
  letter-spacing: 0.05em;
}
.trn-match-sched.live {
  background: linear-gradient(90deg, rgba(91,229,132,0.15), transparent 80%);
  border-bottom-color: rgba(91,229,132,0.4);
  color: var(--trn-green);
  animation: trn-sched-pulse 2s infinite;
}
@keyframes trn-sched-pulse { 0%,100% { opacity: 1 } 50% { opacity: 0.7 } }
.trn-sched-ico { font-size: 11px; }
.trn-sched-countdown { color: #fff; font-family: Consolas, monospace; }

.trn-match-wager {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 12px;
  background: rgba(255,201,60,0.04);
  border-top: 1px solid rgba(255,201,60,0.18);
  font-size: 10.5px; letter-spacing: 0.04em;
  color: var(--trn-muted);
  flex-wrap: wrap;
}
.trn-match-wager.won { background: rgba(91,229,132,0.06); border-top-color: rgba(91,229,132,0.3); }
.trn-match-wager.lost { background: rgba(255,138,138,0.05); border-top-color: rgba(255,138,138,0.25); }
.trn-wager-pool b { color: var(--trn-gold); font-family: Consolas, monospace; }
.trn-wager-mine { color: var(--trn-blue); }
.trn-wager-mine b { color: #fff; font-family: Consolas, monospace; }
.trn-wager-result { font-family: Consolas, monospace; font-weight: 800; }
.trn-match-wager.won .trn-wager-result { color: var(--trn-green); }
.trn-match-wager.lost .trn-wager-result { color: #ff8a8a; }
.trn-wager-btn {
  background: linear-gradient(180deg, rgba(255,201,60,0.18), rgba(255,201,60,0.10));
  border: 1px solid rgba(255,201,60,0.4);
  color: var(--trn-gold);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.1em;
  cursor: pointer;
  font-family: inherit;
}
.trn-wager-btn:hover { background: var(--trn-gold); color: #2c1c00; }

/* ─── Wager modal ─── */
.wg-modal {
  position: fixed; inset: 0;
  display: none;
  z-index: 1000;
  align-items: center; justify-content: center;
}
.wg-modal.open { display: flex; }
.wg-overlay {
  position: absolute; inset: 0;
  background: rgba(6,7,10,0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.wg-panel {
  position: relative;
  background: linear-gradient(135deg, #14151a, #08090c);
  border: 1px solid rgba(255,201,60,0.4);
  border-radius: 18px;
  padding: 0;
  width: min(620px, 92vw);
  max-height: 92vh;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(255,201,60,0.18);
  display: flex; flex-direction: column;
}
.wg-panel::before {
  content: '';
  position: absolute; left: 0; top: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--trn-gold), var(--trn-red));
}
.wg-head {
  padding: 22px 26px 16px;
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.wg-pre { font-size: 10.5px; letter-spacing: 0.25em; color: var(--trn-gold); font-weight: 800; margin-bottom: 4px; }
.wg-head h2 {
  font-family: 'Bebas Neue', 'Chakra Petch', sans-serif;
  font-size: 28px; line-height: 1; letter-spacing: 0.04em;
  color: #fff;
}
.wg-close {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  width: 32px; height: 32px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}
.wg-close:hover { background: rgba(253,18,39,0.2); border-color: var(--trn-red); }

.wg-body { padding: 22px 26px 24px; overflow-y: auto; }

.wg-balance {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px;
  background: rgba(255,201,60,0.06);
  border: 1px solid rgba(255,201,60,0.3);
  border-radius: 10px;
  margin-bottom: 16px;
}
.wg-balance-l { font-size: 10.5px; letter-spacing: 0.2em; color: var(--trn-muted); font-weight: 700; }
.wg-balance-v { font-family: 'Bebas Neue', 'Consolas', monospace; font-size: 24px; color: var(--trn-gold); }

.wg-options {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 18px;
}
.wg-opt {
  background: rgba(13,20,23,0.6);
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.15s;
}
.wg-opt:hover { border-color: rgba(255,201,60,0.4); }
.wg-opt.selected {
  border-color: var(--trn-gold);
  background: linear-gradient(135deg, rgba(255,201,60,0.12), rgba(13,20,23,0.6));
  box-shadow: 0 0 24px -8px rgba(255,201,60,0.4);
}
.wg-opt-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.wg-opt-name { font-family: 'Bebas Neue', sans-serif; font-size: 22px; line-height: 1; letter-spacing: 0.04em; }
.wg-opt-pool {
  font-family: Consolas, monospace; font-size: 11px;
  color: var(--trn-blue);
  background: rgba(96,212,255,0.12); border: 1px solid rgba(96,212,255,0.3);
  padding: 2px 8px; border-radius: 999px;
  font-weight: 700;
}
.wg-opt-stats { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11.5px; color: var(--trn-muted); margin-bottom: 6px; }
.wg-stat { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); padding: 3px 9px; border-radius: 6px; }
.wg-stat b { color: #fff; font-family: Consolas, monospace; }
.trn-join-btn {
  display: block; width: 100%;
  padding: 12px 16px;
  background: linear-gradient(180deg, #5be584, #2dac4f);
  color: #06170c;
  border: 1px solid #5be584;
  border-radius: 10px;
  font-family: 'Bebas Neue', 'Chakra Petch', sans-serif;
  font-size: 16px; letter-spacing: 0.18em; font-weight: 800;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: filter 0.15s, transform 0.1s;
}
.trn-join-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.trn-join-btn.leave {
  background: rgba(253,18,39,0.12);
  border-color: rgba(253,18,39,0.5);
  color: var(--trn-red);
}
.trn-join-btn.leave:hover { background: var(--trn-red); color: #fff; }
.trn-join-btn.full {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.15);
  color: var(--trn-dim);
  cursor: not-allowed;
}
.trn-join-btn.login {
  background: #5865F2;
  color: #fff;
  border-color: #5865F2;
}
.trn-join-btn.login:hover { filter: brightness(1.1); }

.wg-stat.wg-stat-points {
  background: linear-gradient(90deg, rgba(255,201,60,0.20), rgba(255,201,60,0.06));
  border-color: rgba(255,201,60,0.5);
  color: var(--trn-gold);
  font-weight: 700;
}
.wg-stat.wg-stat-points b { color: var(--trn-gold); font-size: 13px; }
.wg-stat.wg-stat-rank {
  background: rgba(96,212,255,0.12);
  border-color: rgba(96,212,255,0.35);
  color: var(--trn-blue);
}
.wg-stat.wg-stat-rank b { color: var(--trn-blue); }
.wg-stats-empty { color: var(--trn-dim); font-style: italic; font-size: 11px; }
.wg-opt-payout {
  font-family: Consolas, monospace; font-size: 11px;
  color: var(--trn-gold); font-weight: 700;
  text-align: right;
}
.wg-vs {
  align-self: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  color: var(--trn-red);
  letter-spacing: 0.05em;
}

.wg-amount-row { margin-bottom: 14px; }
.wg-amount-l { display: block; font-size: 10.5px; letter-spacing: 0.2em; color: var(--trn-muted); font-weight: 700; margin-bottom: 6px; text-transform: uppercase; }
.wg-amount-input {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.wg-amt-pill {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  padding: 6px 12px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
}
.wg-amt-pill:hover { background: rgba(255,201,60,0.12); border-color: var(--trn-gold); color: var(--trn-gold); }
.wg-amount-input input[type="number"] {
  flex: 1; min-width: 100px;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  padding: 9px 12px;
  border-radius: 8px;
  font-family: 'Consolas', monospace;
  font-size: 18px;
  font-weight: 700;
  outline: none;
  -moz-appearance: textfield;
}
.wg-amount-input input[type="number"]::-webkit-outer-spin-button,
.wg-amount-input input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.wg-amount-input input:focus { border-color: var(--trn-gold); }
.wg-amt-unit { font-family: Consolas, monospace; color: var(--trn-gold); font-weight: 800; }

.wg-summary {
  display: flex; gap: 10px; align-items: baseline;
  padding: 10px 14px;
  background: linear-gradient(90deg, rgba(91,229,132,0.08), transparent);
  border: 1px solid rgba(91,229,132,0.2);
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 13px;
}
.wg-sum-l { color: var(--trn-muted); }
.wg-sum-v { color: #fff; font-family: 'Bebas Neue', monospace; font-size: 22px; }
.wg-sum-roi { font-family: Consolas, monospace; font-size: 12px; font-weight: 700; }

.wg-actions { display: flex; justify-content: flex-end; gap: 8px; }
.wg-btn {
  padding: 10px 18px;
  border-radius: 8px;
  font-family: 'Bebas Neue', 'Chakra Petch', sans-serif;
  font-size: 14px;
  letter-spacing: 0.15em;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.15s;
}
.wg-btn-ghost { background: transparent; border-color: rgba(255,255,255,0.15); color: var(--trn-muted); }
.wg-btn-ghost:hover { color: #fff; border-color: rgba(255,255,255,0.3); }
.wg-btn-primary {
  background: linear-gradient(180deg, var(--trn-gold), #d9a51e);
  border-color: var(--trn-gold);
  color: #2c1c00;
  font-weight: 800;
}
.wg-btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.wg-btn-primary:disabled {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
  color: var(--trn-dim);
  cursor: not-allowed;
  filter: none;
  transform: none;
}

@media (max-width: 600px) {
  .wg-options { grid-template-columns: 1fr; }
  .wg-vs { text-align: center; }
}

.trn-match-slot {
  position: relative;
  padding: 12px 14px;
  overflow: hidden;
  border-bottom: 1px solid var(--trn-line);
}
.trn-match-slot:last-of-type, .trn-match-slot:nth-last-of-type(1):not(:has(~ .trn-match-tally)) { border-bottom: none; }
.trn-match-slot.tbd, .trn-match-slot.bye {
  color: var(--trn-dim); font-style: italic; font-weight: 400;
  text-align: center;
  padding: 16px 14px;
  border-bottom: 1px solid var(--trn-line);
}

.trn-slot-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, rgba(96,212,255,0.10), rgba(96,212,255,0.02));
  transition: width 0.4s ease;
  z-index: 0;
}
.trn-slot-row {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.trn-slot-name {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 15px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.trn-match-slot { padding: 14px 16px; }
.trn-slot-link {
  color: inherit; text-decoration: none;
  border-bottom: 1px dotted rgba(255,255,255,0.2);
  transition: color 0.15s, border-color 0.15s;
}
.trn-slot-link:hover { color: var(--trn-blue); border-bottom-color: var(--trn-blue); }
.trn-match-slot.winner .trn-slot-link:hover { color: #fff; border-bottom-color: var(--trn-gold); }
.trn-slot-meta { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.trn-slot-pct {
  font-family: Consolas, monospace;
  font-size: 11px; font-weight: 700;
  color: var(--trn-blue);
  background: rgba(96,212,255,0.10);
  border: 1px solid rgba(96,212,255,0.3);
  padding: 3px 9px; border-radius: 999px;
}
.trn-slot-pct small { color: var(--trn-muted); font-weight: 500; margin-left: 2px; }
.trn-match-score {
  font-family: Consolas, monospace; font-size: 11px; font-weight: 700;
  color: var(--trn-gold);
  background: rgba(0,0,0,0.4);
  padding: 3px 9px; border-radius: 999px;
  border: 1px solid rgba(255,201,60,0.3);
}
.trn-slot-stats {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-top: 6px;
}
.trn-stat-pill {
  display: inline-flex; align-items: center; gap: 3px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--trn-muted);
  letter-spacing: 0.02em;
}
.trn-stat-pill b {
  color: #fff;
  font-family: Consolas, monospace;
  font-weight: 700;
  font-size: 10px;
}
.trn-stat-pill small {
  color: var(--trn-muted);
  font-weight: 600;
  margin-left: 1px;
  font-size: 9px;
}
.trn-stat-pill.points {
  background: linear-gradient(90deg, rgba(255,201,60,0.18), rgba(255,201,60,0.06));
  border-color: rgba(255,201,60,0.5);
  color: var(--trn-gold);
}
.trn-stat-pill.points b { color: var(--trn-gold); font-size: 11px; }
.trn-stat-pill.rank {
  background: rgba(96,212,255,0.10);
  border-color: rgba(96,212,255,0.35);
  color: var(--trn-blue);
}
.trn-stat-pill.rank b { color: var(--trn-blue); }
.trn-stat-ico { font-size: 9px; opacity: 0.85; }
.trn-match-slot.winner .trn-stat-pill.points { background: rgba(255,201,60,0.28); border-color: var(--trn-gold); }
.trn-match-slot.winner .trn-stat-pill { background: rgba(255,201,60,0.08); border-color: rgba(255,201,60,0.25); }
.trn-match-slot.winner .trn-stat-pill b { color: var(--trn-gold); }
.trn-match-slot.loser .trn-slot-stats { display: none; }

.trn-match-slot.winner {
  background: linear-gradient(90deg, rgba(255,201,60,0.18), transparent 80%);
  color: var(--trn-gold);
}
.trn-match-slot.winner .trn-slot-fill {
  background: linear-gradient(90deg, rgba(255,201,60,0.20), rgba(255,201,60,0.04));
}
.trn-match-slot.winner .trn-slot-name::before { content: '🏆'; }
.trn-match-slot.loser { opacity: 0.42; }

.trn-pred-mine-ic {
  display: inline-grid; place-items: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  font-size: 10px; font-weight: 800;
  background: rgba(96,212,255,0.18);
  border: 1px solid rgba(96,212,255,0.5);
  color: var(--trn-blue);
  flex-shrink: 0;
}
.trn-pred-mine-ic.correct { background: rgba(91,229,132,0.18); border-color: rgba(91,229,132,0.55); color: var(--trn-green); }
.trn-pred-mine-ic.wrong   { background: rgba(255,138,138,0.15); border-color: rgba(255,138,138,0.5); color: #ff8a8a; }

.trn-match-slot.mine {
  background: linear-gradient(90deg, rgba(96,212,255,0.08), transparent);
  box-shadow: inset 3px 0 0 var(--trn-blue);
}
.trn-match-slot.mine.correct { box-shadow: inset 3px 0 0 var(--trn-green); }
.trn-match-slot.mine.wrong   { box-shadow: inset 3px 0 0 #ff8a8a; }

.pred-clickable { cursor: pointer; transition: background 0.15s; }
.pred-clickable:hover { background: rgba(96,212,255,0.06); }
.pred-clickable:hover .trn-slot-fill { background: linear-gradient(90deg, rgba(96,212,255,0.18), rgba(96,212,255,0.05)); }
.pred-clickable:active { transform: scale(0.99); }
.pred-loading { opacity: 0.6; pointer-events: none; }

/* Favorite / Underdog pills */
.trn-fav-pill, .trn-dog-pill {
  display: inline-flex; align-items: center; gap: 3px;
  font-family: Consolas, monospace;
  font-size: 9.5px; font-weight: 800;
  letter-spacing: 0.14em;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.trn-fav-pill {
  background: linear-gradient(135deg, rgba(255,140,40,0.25), rgba(255,80,30,0.18));
  color: #ffb070;
  border: 1px solid rgba(255,140,40,0.4);
  text-shadow: 0 0 8px rgba(255,140,40,0.5);
}
.trn-dog-pill {
  background: rgba(96,212,255,0.10);
  color: #7fc8e0;
  border: 1px solid rgba(96,212,255,0.28);
}
.trn-match-slot.is-fav .trn-slot-fill {
  background: linear-gradient(90deg, rgba(255,140,40,0.16), rgba(255,140,40,0.04));
}
.trn-match-slot.winner .trn-fav-pill,
.trn-match-slot.winner .trn-dog-pill { display: none; }

/* Upset badge: user beat the crowd */
.trn-crowd-badge.upset {
  display: inline-flex; align-items: center; gap: 3px;
  font-family: Consolas, monospace;
  font-size: 9.5px; font-weight: 800;
  letter-spacing: 0.14em;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 8px;
  background: linear-gradient(135deg, rgba(255,201,60,0.30), rgba(255,140,40,0.22));
  color: #ffd96b;
  border: 1px solid rgba(255,201,60,0.55);
  text-shadow: 0 0 10px rgba(255,201,60,0.55);
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
  flex-shrink: 0;
  animation: upsetPulse 2s ease-in-out infinite;
}
@keyframes upsetPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(255,201,60,0); }
  50%      { box-shadow: 0 0 14px rgba(255,201,60,0.4); }
}

/* Locked wager (match in-progress) */
.trn-match-wager.locked {
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,201,60,0.18);
  color: var(--trn-muted);
}
.trn-match-wager.locked .trn-wager-pool { color: #ffb070; }

/* Empty state */
.trn-empty-bracket {
  text-align: center;
  padding: 60px 20px;
  color: var(--trn-muted);
  font-size: 14px;
  letter-spacing: 0.05em;
  background: rgba(13,20,23,0.4);
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: 14px;
}

/* ─── Mobile ─── */
@media (max-width: 900px) {
  .trn-hero-grid { grid-template-columns: 1fr; }
  .trn-stats-strip { grid-template-columns: repeat(2, 1fr); }
  .trn-main-2col { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .trn-round { min-width: 220px; }
  .trn-livebar { border-radius: 16px; }
}

/* ─── Team Builder ─── */
.trn-tm-body { padding: 16px 18px; }
.trn-tm-empty-state { text-align: center; padding: 28px 16px; color: var(--trn-muted); }
.trn-tm-ico { font-size: 48px; opacity: 0.35; margin-bottom: 8px; }
.trn-tm-empty-state p { font-size: 13px; max-width: 280px; margin: 0 auto; line-height: 1.5; }

.trn-tm-form { display: flex; gap: 8px; margin-top: 14px; }
.trn-tm-form input {
  flex: 1;
  background: var(--trn-card-2);
  border: 1px solid var(--trn-line);
  color: #fff;
  padding: 11px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
}
.trn-tm-form input:focus { border-color: var(--trn-red); }

.trn-btn {
  padding: 10px 18px;
  background: var(--trn-red);
  color: #fff; border: none;
  border-radius: 8px;
  font-family: 'Bebas Neue', 'Chakra Petch', sans-serif;
  font-size: 14px; letter-spacing: 0.15em;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
}
.trn-btn:hover { filter: brightness(1.1); }
.trn-btn:active { transform: scale(0.98); }
.trn-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.trn-btn-success { background: rgba(91,229,132,0.12); color: var(--trn-green); border: 1px solid rgba(91,229,132,0.4); }
.trn-btn-success:hover { background: var(--trn-green); color: #06170c; filter: none; }
.trn-btn-danger { background: rgba(253,18,39,0.10); color: var(--trn-red); border: 1px solid rgba(253,18,39,0.4); }
.trn-btn-danger:hover { background: var(--trn-red); color: #fff; filter: none; }

.trn-tm-note {
  margin-top: 10px;
  font-size: 11px; color: var(--trn-dim);
  text-align: center; font-style: italic;
}
.trn-tm-note code {
  background: rgba(255,201,60,0.08);
  border: 1px solid rgba(255,201,60,0.25);
  color: var(--trn-gold);
  padding: 1px 6px; border-radius: 4px;
  font-family: Consolas, monospace; font-size: 11px;
}

.trn-tm-card {
  background: var(--trn-card-2);
  border: 1px solid var(--trn-line);
  border-radius: 12px;
  padding: 16px 18px;
}
.trn-tm-card.mine { border-color: rgba(91,229,132,0.5); background: linear-gradient(135deg, rgba(91,229,132,0.06), var(--trn-card-2)); }

.trn-tm-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.trn-tm-name-big { font-family: 'Bebas Neue', sans-serif; font-size: 24px; line-height: 1; letter-spacing: 0.04em; }
.trn-tm-meta { font-size: 11.5px; color: var(--trn-muted); margin-top: 4px; }
.trn-tm-progress {
  background: rgba(255,255,255,0.04); border: 1px solid var(--trn-line);
  color: var(--trn-muted);
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  font-family: Consolas, monospace;
  flex-shrink: 0;
}
.trn-tm-progress.full { color: var(--trn-gold); border-color: rgba(255,201,60,0.4); background: rgba(255,201,60,0.08); }

.trn-tm-members { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.trn-tm-member {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--trn-line);
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
}
.trn-tm-avatar {
  width: 28px; height: 28px;
  background: #252830; border: 1px solid var(--trn-line); border-radius: 6px; flex-shrink: 0;
}
.trn-tm-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trn-tm-name .crew { color: var(--trn-red); font-style: italic; margin-right: 4px; font-weight: 700; }
.trn-tm-role {
  font-size: 9.5px; padding: 3px 8px;
  border-radius: 4px; letter-spacing: 0.15em; font-weight: 800;
}
.trn-tm-role.leader { background: rgba(255,201,60,0.12); color: var(--trn-gold); border: 1px solid rgba(255,201,60,0.3); }
.trn-tm-role.member { background: rgba(255,255,255,0.05); color: var(--trn-muted); border: 1px solid var(--trn-line); }
.trn-tm-empty {
  background: rgba(255,255,255,0.02);
  border: 1px dashed rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.3);
  text-align: center;
  padding: 12px;
  font-style: italic;
  font-size: 12.5px;
  border-radius: 8px;
}

.trn-tm-actions { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 10px; border-top: 1px dashed var(--trn-line); }
.trn-tm-actions .trn-btn { font-size: 11.5px; padding: 7px 14px; letter-spacing: 0.1em; }

.trn-tm-invite-h {
  font-size: 11px; letter-spacing: 0.18em; color: var(--trn-blue);
  font-weight: 800; text-transform: uppercase; margin-top: 14px; margin-bottom: 6px;
}
.trn-tm-invite-list { display: flex; flex-direction: column; gap: 4px; max-height: 240px; overflow-y: auto; }
.trn-tm-invite-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--trn-line); border-radius: 8px;
  font-size: 12.5px;
}
.trn-tm-invite-btn {
  background: rgba(96,212,255,0.10);
  border: 1px solid rgba(96,212,255,0.4);
  color: var(--trn-blue);
  padding: 4px 10px; border-radius: 4px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.1em;
  cursor: pointer; flex-shrink: 0;
  font-family: 'Bebas Neue', sans-serif;
}
.trn-tm-invite-btn:hover { background: var(--trn-blue); color: #06170c; }

.trn-tm-invite-card {
  background: linear-gradient(90deg, rgba(255,201,60,0.10), transparent);
  border: 1px solid rgba(255,201,60,0.4);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
}
.trn-tm-invite-info { font-size: 13px; margin-bottom: 8px; }
.trn-tm-invite-info b { color: var(--trn-gold); }
.trn-tm-invite-info .from { color: var(--trn-muted); margin-left: 6px; font-size: 11.5px; }
.trn-tm-invite-actions { display: flex; gap: 6px; }
.trn-tm-invite-actions .trn-btn { font-size: 11px; padding: 6px 12px; }

.trn-tm-list { padding: 14px 18px; max-height: 480px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.trn-tm-card-mini {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--trn-line);
  border-radius: 8px;
  padding: 10px 12px;
}
.trn-tm-card-mini.full { border-color: rgba(255,201,60,0.4); background: rgba(255,201,60,0.04); }
.trn-tm-card-mini.mine { border-color: rgba(91,229,132,0.4); background: rgba(91,229,132,0.04); }
.trn-tm-mini-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.trn-tm-mini-name { font-weight: 800; font-size: 13.5px; }
.trn-tm-mini-tag {
  background: var(--trn-green); color: #06170c;
  padding: 1px 6px; border-radius: 4px;
  font-size: 9px; letter-spacing: 0.15em; font-weight: 800; margin-left: 4px;
}
.trn-tm-mini-members { display: flex; gap: 6px; flex-wrap: wrap; font-size: 11.5px; color: var(--trn-muted); }
.trn-tm-mini-member { background: rgba(255,255,255,0.04); padding: 2px 8px; border-radius: 999px; }
.trn-tm-mini-empty { color: var(--trn-dim); font-style: italic; padding: 2px 8px; }

.trn-tm-free-h {
  font-size: 11px; letter-spacing: 0.18em; color: var(--trn-muted);
  font-weight: 800; text-transform: uppercase; margin: 12px 0 6px;
  padding-top: 10px; border-top: 1px dashed var(--trn-line);
}
.trn-tm-free-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 4px; }
.trn-tm-free-row {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--trn-line);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px; font-weight: 600;
}
.trn-tm-free-row .crew { color: var(--trn-red); font-style: italic; margin-right: 4px; }
