:root, [data-theme="dark"] {
  --bg: #0a0a0b;
  --bg-elev: #131316;
  --bg-elev-2: #1c1c20;
  --border: #26262c;
  --text: #f4f4f5;
  --text-dim: #9c9ca3;
  --text-muted: #65656d;
  --red: #e11d2e;
  --red-dim: #b8131f;
  --red-glow: rgba(225, 29, 46, 0.18);
  --green: #22c55e;
  --gold: #facc15;
  --nav-bg: rgba(10, 10, 11, 0.85);
  --radius: 6px;
  --radius-lg: 10px;
}

[data-theme="light"] {
  --bg: #f7f7f8;
  --bg-elev: #ffffff;
  --bg-elev-2: #f1f1f3;
  --border: #e4e4e7;
  --text: #18181b;
  --text-dim: #52525b;
  --text-muted: #8a8a92;
  --red: #dc1428;
  --red-dim: #a30f1f;
  --red-glow: rgba(220, 20, 40, 0.10);
  --green: #16a34a;
  --gold: #ca8a04;
  --nav-bg: rgba(255, 255, 255, 0.85);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* ========== PAGE INTRO ANIMATIONS ========== */
@keyframes jhl-fade-up {
  0%   { opacity: 0; transform: translateY(28px) scale(0.985); filter: blur(8px); }
  60%  { filter: blur(0); }
  100% { opacity: 1; transform: translateY(0)    scale(1);     filter: blur(0); }
}
@keyframes jhl-nav-down {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes jhl-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.nav {
  animation: jhl-nav-down 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* CSS fallback (in case JS hasn't run yet — JS in partials.js drives the real cascade) */
.container > * {
  animation: jhl-fade-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--idx, 0) * 75ms + 60ms);
}
.container > *:nth-child(1)  { --idx: 0; }
.container > *:nth-child(2)  { --idx: 1; }
.container > *:nth-child(3)  { --idx: 2; }
.container > *:nth-child(4)  { --idx: 3; }
.container > *:nth-child(5)  { --idx: 4; }
.container > *:nth-child(6)  { --idx: 5; }
.container > *:nth-child(7)  { --idx: 6; }
.container > *:nth-child(8)  { --idx: 7; }
.container > *:nth-child(9)  { --idx: 8; }
.container > *:nth-child(10) { --idx: 9; }
.container > *:nth-child(n+11) { --idx: 10; }

/* Footer drifts up at the very end */
.footer {
  animation: jhl-fade-in 0.6s ease-out 0.6s both;
}

/* Re-trigger fade for content injected after initial paint */
.fade-in {
  animation: jhl-fade-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .nav, .container > *, .footer, .fade-in { animation: none !important; }
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

/* ========== NAV ========== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  height: 64px;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px var(--red-glow));
}

.footer .brand-logo { width: 32px; height: 32px; }

.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text small { font-weight: 500; color: var(--text-muted); font-size: 10px; letter-spacing: 0.15em; margin-top: 3px; }

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin-left: auto;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 13px;
  color: var(--text-dim);
  transition: all 0.15s;
}

.nav-links a:hover { background: var(--bg-elev); color: var(--text); }
.nav-links a.active { background: var(--red); color: white; }

.theme-toggle {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-dim);
  transition: all 0.15s;
  margin-left: 8px;
  font-family: inherit;
}

.theme-toggle:hover { color: var(--text); border-color: var(--text-muted); }
.theme-toggle svg { width: 16px; height: 16px; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon,
:root:not([data-theme]) .theme-toggle .icon-moon { display: none; }

/* ========== PLAYER CELL (head + name) ========== */
.player-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  transition: color 0.12s;
}
.player-cell:hover { color: var(--red); }
.player-cell img {
  border-radius: 3px;
  image-rendering: pixelated;
  flex-shrink: 0;
  background: var(--bg-elev-2);
}
.player-cell .name { font-weight: 600; }
a.player-cell:hover .name { color: var(--red); }

/* leader-row also gets a head */
.leader-row .leader-avatar {
  width: 28px; height: 28px;
  border-radius: 4px;
  image-rendering: pixelated;
  margin-right: 2px;
  background: var(--bg-elev-2);
}

/* ========== GAME TYPE TOGGLE ========== */
.gt-toggle {
  display: inline-flex;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
  gap: 2px;
}
.gt-toggle button {
  padding: 7px 14px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s;
}
.gt-toggle button:hover { color: var(--text); }
.gt-toggle button.active { background: var(--red); color: white; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 13px;
}
.empty-state .icon {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.4;
}

/* ========== USER MENU ========== */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  margin-left: 8px;
  transition: all 0.15s;
}
.user-chip:hover { border-color: var(--text-muted); }

.user-avatar {
  width: 26px; height: 26px;
  border-radius: 4px;
  background: var(--bg-elev-2);
  image-rendering: pixelated;
  object-fit: cover;
}

.user-chip .balance {
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.user-chip .name {
  font-size: 12px;
  font-weight: 600;
}

.user-menu {
  position: absolute;
  top: 56px;
  right: 24px;
  min-width: 240px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
  padding: 8px;
  z-index: 200;
  display: none;
}

.user-menu.open { display: block; }

.user-menu .header {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.user-menu .header .name { font-weight: 700; font-size: 14px; }
.user-menu .header .meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.user-menu .balance-display {
  padding: 14px 12px;
  background: var(--bg-elev-2);
  border-radius: var(--radius);
  margin: 6px 0;
  text-align: center;
}

.user-menu .balance-display .label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted); font-weight: 700; margin-bottom: 4px;
}

.user-menu .balance-display .value {
  font-size: 22px; font-weight: 800; color: var(--green);
  font-variant-numeric: tabular-nums;
}

.user-menu .menu-item {
  display: block;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--text-dim);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  border: none;
  background: none;
  width: 100%;
  font-family: inherit;
}
.user-menu .menu-item:hover { background: var(--bg-elev-2); color: var(--text); }
.user-menu .menu-item.danger:hover { color: var(--red); }

.btn-login {
  background: var(--red);
  color: white;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 12px;
  margin-left: 8px;
}

[data-theme="light"] .card,
[data-theme="light"] .game-card,
[data-theme="light"] .table-wrap,
[data-theme="light"] .team-banner,
[data-theme="light"] .week-bar,
[data-theme="light"] .bet-slip {
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.03);
}

/* ========== LAYOUT ========== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.page-header {
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 16px;
}

.page-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-sub {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

.section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: '';
  width: 3px;
  height: 12px;
  background: var(--red);
  border-radius: 2px;
}

/* ========== HERO ========== */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--bg-elev) 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  margin-bottom: 40px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--red-glow) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content { position: relative; max-width: 640px; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--red-glow);
  color: var(--red);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-eyebrow .pulse {
  width: 6px; height: 6px; background: var(--red); border-radius: 50%;
  box-shadow: 0 0 0 0 var(--red);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--red); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero h1 {
  font-size: 48px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 16px;
}

.hero h1 .accent { color: var(--red); }

.hero p {
  color: var(--text-dim);
  font-size: 16px;
  margin-bottom: 28px;
}

.hero-actions { display: flex; gap: 12px; }

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 13px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.btn-primary { background: var(--red); color: white; }
.btn-primary:hover { background: var(--red-dim); transform: translateY(-1px); }
.btn-ghost { background: var(--bg-elev-2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--border); }

/* ========== CARDS / GRID ========== */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.15s;
}

.card-hover:hover {
  border-color: var(--red);
  transform: translateY(-2px);
}

.stat-card .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.stat-card .value {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stat-card .delta {
  font-size: 12px;
  color: var(--green);
  margin-top: 4px;
  font-weight: 600;
}

.stat-card .delta.down { color: var(--red); }

/* ========== TABLES ========== */
.table-wrap {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 16px;
  text-align: center;
  font-size: 13px;
}

/* Slight column dividers between every cell */
th + th, td + td {
  border-left: 1px solid var(--border);
}

th {
  background: var(--bg-elev-2);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

/* Sortable column headers (auto-applied to tables inside .table-wrap) */
.table-wrap th,
table.sortable th {
  cursor: pointer;
  user-select: none;
  transition: color 0.12s, background 0.12s;
  position: relative;
}
.table-wrap th:hover,
table.sortable th:hover {
  color: var(--text);
  background: var(--border);
}
.table-wrap th[data-no-sort],
table.sortable th[data-no-sort] {
  cursor: default;
}
.table-wrap th[data-no-sort]:hover,
table.sortable th[data-no-sort]:hover {
  color: var(--text-muted);
  background: var(--bg-elev-2);
}
.table-wrap th[data-sort-active],
table.sortable th[data-sort-active] {
  color: var(--red);
  background: var(--border);
}
.table-wrap th[data-sort-active]::after,
table.sortable th[data-sort-active]::after {
  content: ' ▾';
  font-size: 8px;
  margin-left: 2px;
  vertical-align: 1px;
}
.table-wrap th[data-sort-active="asc"]::after,
table.sortable th[data-sort-active="asc"]::after {
  content: ' ▴';
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-elev-2); }

td.num { font-variant-numeric: tabular-nums; font-weight: 600; }
td.dim { color: var(--text-dim); }
td.rank { color: var(--text-muted); font-weight: 700; width: 40px; }

/* ========== TEAM PILL ========== */
.team-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.team-mark {
  width: 22px; height: 22px;
  border-radius: 4px;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 800;
  color: white;
}
.team-mark.has-logo {
  background-color: transparent !important;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 0;
  color: transparent;
  text-shadow: none;
}

/* ========== GAME CARDS ========== */
.game-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.15s;
}

.game-card:hover { border-color: var(--red); }

.game-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.game-status.live {
  color: var(--red);
  display: flex; align-items: center; gap: 6px;
}
.game-status.live::before {
  content: ''; width: 6px; height: 6px;
  background: var(--red); border-radius: 50%;
  animation: pulse 1.5s infinite;
}
.game-status.final { color: var(--text-dim); }

.game-teams {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}

.game-team .name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.game-team .score {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.game-team.winner .score { color: var(--red); }
.game-team.loser .score { color: var(--text-muted); }

/* ========== TABS ========== */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}

.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--red); }

/* ========== BADGES ========== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-red { background: var(--red-glow); color: var(--red); }
.badge-green { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.badge-gold { background: rgba(250, 204, 21, 0.15); color: var(--gold); }
.badge-dim { background: var(--bg-elev-2); color: var(--text-dim); }

/* ========== ROSTER ========== */
.team-banner {
  background: linear-gradient(135deg, var(--bg-elev) 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
  overflow: hidden;
}

.team-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 60%, var(--red-glow) 100%);
  pointer-events: none;
}

.team-banner-mark {
  width: 80px; height: 80px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 28px; font-weight: 900;
  color: white;
  flex-shrink: 0;
}

.team-banner-info h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.team-banner-info .meta {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 4px;
}

.team-record {
  display: flex; gap: 24px;
  margin-left: auto;
  position: relative;
  z-index: 1;
}

.team-record .stat {
  text-align: center;
}

.team-record .stat .v { font-size: 24px; font-weight: 800; }
.team-record .stat .l { font-size: 10px; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.1em; font-weight: 700; }

/* ───── Contract cells ───── */
.contract-col {
  width: 44px;
  text-align: center;
}
.contract-cell {
  text-align: center;
}
.contract-pill {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.contract-pill.signed {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
}
.contract-pill.expiring {
  background: rgba(250, 204, 21, 0.18);
  color: var(--gold);
}
.contract-pill.empty {
  background: var(--bg-elev-2);
  color: var(--text-muted);
  opacity: 0.4;
}
.contract-status {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* ───── Player tier badge ───── */
.tier-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tier-badge.franchise { background: rgba(225,29,46,0.18);  color: var(--red); }
.tier-badge.elite     { background: rgba(250,204,21,0.18); color: var(--gold); }
.tier-badge.top       { background: rgba(34,211,238,0.15); color: #22d3ee; }
.tier-badge.mid       { background: rgba(167,139,250,0.15); color: #a78bfa; }
.tier-badge.depth     { background: var(--bg-elev-2); color: var(--text-muted); }

/* ───── Cap progress bar ───── */
.cap-progress {
  height: 6px;
  background: var(--bg-elev-2);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}
.cap-progress .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--gold));
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.cap-progress .fill.over { background: var(--red); }
.cap-progress .fill.near { background: var(--gold); }

.salary-num {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

/* ───── Season-by-season contract cells ───── */
.season-col {
  text-align: center;
  min-width: 120px;
  border-left: 1px solid var(--border);
}
th.season-col {
  border-left: 1px solid var(--border);
  background: var(--bg-elev-2);
}
.season-salary {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.season-salary .gp {
  font-size: 10px;
  margin-left: 3px;
  opacity: 0.8;
  letter-spacing: 0.05em;
}
.season-ufa {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 3px;
  background: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.season-empty {
  color: var(--text-muted);
  opacity: 0.4;
  font-weight: 700;
}

.role-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 9px;
  letter-spacing: 0.08em;
  font-weight: 800;
  text-transform: uppercase;
  margin-left: 6px;
  background: var(--red-glow);
  color: var(--red);
  vertical-align: 2px;
}
.role-badge.captain { background: rgba(250, 204, 21, 0.18); color: var(--gold); }
.role-badge.gm      { background: rgba(34, 197, 94, 0.15);  color: var(--green); }
.role-badge.unsigned { background: var(--bg-elev-2); color: var(--text-muted); }

.banner-gm {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: var(--radius);
  margin-top: 10px;
}
.banner-gm img {
  width: 22px; height: 22px;
  border-radius: 3px;
  image-rendering: pixelated;
}
.banner-gm .label {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-muted); font-weight: 700;
}
.banner-gm .name { font-size: 12px; font-weight: 700; }
.banner-gm.undecided .name { color: var(--text-muted); font-style: italic; }

/* ========== TEAM SELECTOR ========== */
.team-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.team-chip {
  padding: 10px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
}

.team-chip:hover { border-color: var(--text-muted); }
.team-chip.active { background: var(--red); border-color: var(--red); color: white; }

/* ========== ODDS / GAMBLING ========== */
.odds-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
}

.odds-row:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.odds-row:last-child { border-radius: 0 0 var(--radius-lg) var(--radius-lg); border-bottom: none; }

.odds-matchup .meta { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; font-weight: 600; }
.odds-matchup .teams { font-weight: 700; font-size: 14px; }

.odds-btn {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: inherit;
  color: var(--text);
}

.odds-btn:hover { border-color: var(--red); background: var(--red-glow); }
.odds-btn .label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }
.odds-btn .value { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.odds-btn .value.pos { color: var(--green); }

.bet-slip {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: sticky;
  top: 88px;
}

.bet-slip h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between;
}

.bet-slip .empty {
  text-align: center;
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.bet-item {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 8px;
}

.bet-item .matchup { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.bet-item .pick { font-weight: 700; font-size: 13px; }
.bet-item .odds { color: var(--red); font-weight: 700; font-size: 13px; }
.bet-item .remove {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 16px; padding: 0; margin-left: 4px;
}
.bet-item .remove:hover { color: var(--red); }

/* ── BytePuck lineup comparison (NHL game card style) ── */
.bp-lineup {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 18px;
}
.bp-lineup-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--text-muted); font-weight: 800;
  text-align: center;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.bp-team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.bp-team-col {
  display: flex; flex-direction: column;
  gap: 10px;
}
.bp-team-col .team-head {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 4px;
}
.bp-team-col .team-head .swatch {
  width: 32px; height: 32px;
  border-radius: 6px;
  display: grid; place-items: center;
  color: white; font-size: 11px; font-weight: 800;
  flex-shrink: 0;
}
.bp-team-col .team-head .nm {
  font-weight: 800; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.bp-pos-label {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--text-muted); font-weight: 800;
  padding: 0 2px;
}

/* Player card — modeled on the NHL game's lineup tile */
.bp-player {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 14px 18px;
  position: relative;
  transition: border-color 0.15s;
  text-align: center;
}
.bp-player::before {
  content: '';
  position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--team-accent, var(--border));
}
.bp-player .nm {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.bp-player .pos-tag {
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 12px;
}
.bp-player .stats {
  display: flex;
  gap: 18px;
  justify-content: center;
}

/* Stat diamonds — color-coded by stat slot to mirror NHL X-factor badges */
.bp-stat {
  width: 30px; height: 30px;
  transform: rotate(45deg);
  display: grid; place-items: center;
  position: relative;
  border-radius: 4px;
}
.bp-stat .v {
  transform: rotate(-45deg);
  font-size: 11px;
  font-weight: 900;
  color: white;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.bp-stat.s1 { background: #2563eb; }  /* blue   — Speed / Reflexes */
.bp-stat.s2 { background: #dc2626; }  /* red    — Shot / Save */
.bp-stat.s3 { background: #b45309; }  /* amber  — Defensive IQ / Positioning */
.bp-stat.dim { opacity: 0.45; }

.bp-stat-legend {
  display: flex; justify-content: center; gap: 18px;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 10px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700;
}
.bp-stat-legend .item { display: flex; align-items: center; gap: 6px; }
.bp-stat-legend .dot {
  width: 10px; height: 10px;
  transform: rotate(45deg);
  border-radius: 2px;
}

@media (max-width: 700px) {
  .bp-team-grid { grid-template-columns: 1fr; }
}

/* ── BytePuck compact game row (back to original sportsbook layout) ── */
/* Wrapping card so the matchup + toggle buttons + panels feel like one card */
.bp-game-wrap {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
}
.bp-game-wrap > .bp-row {
  background: transparent;
  border: none;
  border-radius: 0;
  margin-bottom: 0;
  padding: 16px;
}
.bp-game-wrap > .props-toggle {
  background: transparent;
  border: none;
  border-top: 1px solid var(--border);
  border-radius: 0;
  margin-bottom: 0;
  padding: 12px 16px;
}
.bp-game-wrap > .props-toggle:hover {
  background: var(--bg-elev-2);
}
.bp-game-wrap > .props-panel {
  border-top: 1px solid transparent;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-top-color 0.2s;
}
.bp-game-wrap > .props-panel.open {
  border-top-color: var(--border);
  padding: 14px 16px 8px;
}
/* Inside the wrap, the inner lineup card / market sections lose their own borders */
.bp-game-wrap .bp-lineup {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}
.bp-game-wrap .market-section:last-child { margin-bottom: 0; }

.bp-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 12px;
  align-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
}
.bp-row .match-info { display: flex; flex-direction: column; gap: 4px; }
.bp-row .match-info .meta {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-muted); font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.bp-row .match-info .meta.live { color: var(--red); }
.bp-row .match-info .meta.live::before {
  content: ''; width: 6px; height: 6px;
  background: var(--red); border-radius: 50%;
  animation: pulse 1.4s infinite;
}
.bp-row .match-info .teams { font-weight: 800; font-size: 15px; }
.bp-row .match-info .teams .away { color: var(--text); }
.bp-row .match-info .teams .at { color: var(--text-muted); margin: 0 6px; font-weight: 600; }
.bp-row .match-col {
  display: flex; flex-direction: column; gap: 6px;
}
.bp-row .market-mini-label {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-muted); font-weight: 800; text-align: center;
}

/* Expandable player-props panel */
.props-toggle {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 16px;
  transition: all 0.15s;
}
.props-toggle:hover { color: var(--text); border-color: var(--text-muted); }
.props-toggle .chev { transition: transform 0.2s; }
.props-toggle.open .chev { transform: rotate(180deg); }
.props-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.props-panel.open { max-height: 3000px; }

/* ── Fullscreen result modal ── */
.bp-result-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.bp-result-overlay.open { display: flex; }
.bp-result-card {
  max-width: 520px; width: 100%;
  background: linear-gradient(135deg, var(--bg-elev) 0%, var(--bg) 100%);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 40px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: bp-result-pop 0.5s cubic-bezier(0.16, 1.4, 0.3, 1);
}
@keyframes bp-result-pop {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}
.bp-result-card.won {
  border-color: var(--green);
  background: radial-gradient(ellipse at top, rgba(34,197,94,0.15) 0%, var(--bg-elev) 60%);
}
.bp-result-card.lost {
  border-color: var(--red);
  background: radial-gradient(ellipse at top, rgba(225,29,46,0.15) 0%, var(--bg-elev) 60%);
}
.bp-result-card .emoji {
  font-size: 64px; line-height: 1;
  margin-bottom: 18px;
}
.bp-result-card h2 {
  font-size: 32px; font-weight: 900;
  letter-spacing: -0.02em; margin-bottom: 8px;
}
.bp-result-card.won h2 { color: var(--green); }
.bp-result-card.lost h2 { color: var(--red); }
.bp-result-card .subtext {
  color: var(--text-dim); font-size: 14px;
  margin-bottom: 24px;
}
.bp-result-card .payout-display {
  background: var(--bg-elev-2);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 24px;
}
.bp-result-card .payout-display .label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-muted); font-weight: 700; margin-bottom: 4px;
}
.bp-result-card .payout-display .amt {
  font-size: 36px; font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.bp-result-card.won .payout-display .amt { color: var(--green); }
.bp-result-card.lost .payout-display .amt { color: var(--red); }
.bp-result-card .legs-list {
  text-align: left;
  background: var(--bg-elev-2);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 22px;
  font-size: 12px;
}
.bp-result-card .legs-list .leg {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.bp-result-card .legs-list .leg:last-child { border-bottom: none; }
.bp-result-card .legs-list .leg .nm { font-weight: 600; }
.bp-result-card .legs-list .leg .v { font-weight: 800; font-size: 14px; }
.bp-result-card .legs-list .leg.hit .v   { color: var(--green); }
.bp-result-card .legs-list .leg.miss .v  { color: var(--red); }
.bp-result-card .close-btn {
  background: var(--red);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 12px 32px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}
.bp-result-card .close-btn:hover { background: var(--red-dim); }

/* ── BytePuck live lock banner ── */
.bp-live-banner {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dim) 100%);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px;
  color: white;
  font-weight: 700;
  box-shadow: 0 6px 30px rgba(225, 29, 46, 0.3);
}
.bp-live-banner .live-dot {
  width: 10px; height: 10px;
  background: white; border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(255,255,255,0.7);
  animation: pulse-white 1.4s infinite;
}
@keyframes pulse-white {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,0.7); }
  70%  { box-shadow: 0 0 0 12px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.bp-live-banner .text { flex: 1; font-size: 13px; }
.bp-live-banner .text .h { font-size: 14px; font-weight: 800; }
.bp-live-banner .text .s { font-weight: 500; opacity: 0.85; font-size: 12px; }

.bet-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── BytePuck game header ── */
.bp-game-card {
  background: linear-gradient(135deg, var(--bg-elev) 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.bp-game-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, var(--red-glow), transparent 60%);
  pointer-events: none;
}
.bp-status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--red-glow);
  color: var(--red);
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.12em;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.bp-status-pill .dot {
  width: 6px; height: 6px; background: var(--red);
  border-radius: 50%;
  animation: pulse 1.6s infinite;
}
.bp-status-pill.settled { background: var(--bg-elev-2); color: var(--text-muted); }
.bp-status-pill.settled .dot { background: var(--text-muted); animation: none; }

.bp-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  position: relative; z-index: 1;
}
.bp-teams .side { text-align: center; }
.bp-teams .nm { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.bp-teams .label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); font-weight: 700; margin-bottom: 4px; }
.bp-teams .vs { font-size: 13px; font-weight: 800; color: var(--text-muted); letter-spacing: 0.2em; }

/* ── BytePuck market sections ── */
.market-section { margin-bottom: 22px; }
.market-section .title {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--text-muted); font-weight: 800;
  padding-bottom: 8px; margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.market-section .title .line {
  margin-left: auto;
  color: var(--text-dim); font-weight: 700;
  letter-spacing: 0.05em;
}

.market-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.bet-btn {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  font-family: inherit;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
  transition: all 0.15s;
  color: var(--text);
  text-align: left;
}
.bet-btn:hover { border-color: var(--red); background: var(--red-glow); }
.bet-btn.selected {
  background: var(--red);
  color: white;
  border-color: var(--red);
}
.bet-btn.selected .odds-val { color: white; }
.bet-btn .pick {
  font-size: 13px; font-weight: 700;
}
.bet-btn .sub {
  font-size: 10px; opacity: 0.7; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-top: 2px;
}
.bet-btn .odds-val {
  font-size: 15px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--red);
  white-space: nowrap;
}

/* Player prop cards (named player + 2-side O/U lines) */
.prop-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 8px;
}
.prop-card .head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.prop-card .head img {
  width: 32px; height: 32px; border-radius: 4px;
  image-rendering: pixelated;
  background: var(--bg-elev-2);
}
.prop-card .head .nm { font-weight: 700; font-size: 13px; }
.prop-card .head .meta { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.prop-card .prop-row { margin-bottom: 8px; }
.prop-card .prop-row:last-child { margin-bottom: 0; }
.prop-card .prop-row .label {
  font-size: 11px; color: var(--text-dim); margin-bottom: 6px;
  display: flex; justify-content: space-between;
}
.prop-card .prop-row .line { color: var(--text-muted); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Settled result row */
.result-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.result-row:last-child { border-bottom: none; }
.result-row .score {
  background: var(--bg-elev-2);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}
.result-row .info { font-size: 13px; }
.result-row .info .matchup { font-weight: 700; }
.result-row .info .stamp { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.result-row .badges { display: flex; gap: 4px; flex-wrap: wrap; }
.result-row .badge { font-size: 9px; padding: 2px 6px; }

.input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  margin-top: 8px;
}

.input:focus { outline: none; border-color: var(--red); }

/* ========== LEADERBOARD ROW ========== */
.leader-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.leader-row:last-child { border-bottom: none; }

.leader-rank {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800;
  background: var(--bg-elev-2);
  border-radius: 4px;
  color: var(--text-muted);
}

.leader-rank.top { background: var(--red); color: white; }

.leader-info { flex: 1; }
.leader-info .name { font-weight: 600; font-size: 13px; }
.leader-info .team { font-size: 11px; color: var(--text-muted); }

.leader-value {
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ========== SCHEDULE WEEK SELECTOR ========== */
.week-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px;
  overflow-x: auto;
}

.week-chip {
  padding: 8px 14px;
  border-radius: var(--radius);
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: all 0.15s;
}

.week-chip:hover { color: var(--text); background: var(--bg-elev-2); }
.week-chip.active { background: var(--red); color: white; }

/* ========== FOOTER ========== */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

.footer .brand { justify-content: center; margin-bottom: 8px; }

/* ========== RANKED PAGE ========== */
.tier-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.tier-pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
}

/* ─── 3D Podium Stage ─── */
.podium-stage {
  position: relative;
  background: linear-gradient(180deg, var(--bg-elev) 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 0 0;
  margin-bottom: 32px;
  overflow: hidden;
  isolation: isolate;
}
.podium-stage::before {
  /* spotlight from top */
  content: '';
  position: absolute;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse at center, rgba(225,29,46,0.18), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.podium-stage::after {
  /* perspective floor grid */
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 280px;
  background-image:
    linear-gradient(rgba(225,29,46,0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(225,29,46,0.10) 1px, transparent 1px);
  background-size: 40px 40px;
  transform: perspective(500px) rotateX(60deg);
  transform-origin: bottom;
  mask-image: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  pointer-events: none;
  z-index: 0;
}
.podium-stage canvas {
  pointer-events: none;
  display: block;
}

.podium-row {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  align-items: end;
  gap: 0;
}

.podium-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s;
  position: relative;
}
.podium-slot:hover { transform: translateY(-4px); }

.podium-model {
  display: grid;
  place-items: end center;
  margin-bottom: -8px; /* overlap top of block slightly for "standing on" effect */
}
.podium-slot.s1 .podium-model { height: 380px; }
.podium-slot.s2 .podium-model { height: 320px; }
.podium-slot.s3 .podium-model { height: 290px; }

.podium-block {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(180deg, var(--bg-elev) 0%, var(--bg-elev-2) 100%);
  border-top: 3px solid var(--border);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.podium-block::before {
  /* glowing under-edge */
  content: '';
  position: absolute;
  top: -3px; left: 0; right: 0;
  height: 3px;
  background: inherit;
  filter: blur(8px);
}
.podium-slot.s1 .podium-block {
  height: 120px;
  border-top-color: var(--red);
  background: linear-gradient(180deg, rgba(225,29,46,0.15), rgba(225,29,46,0.04) 60%, var(--bg-elev-2));
  box-shadow: 0 -20px 60px rgba(225,29,46,0.2);
}
.podium-slot.s2 .podium-block {
  height: 80px;
  border-top-color: #94a3b8;
  background: linear-gradient(180deg, rgba(148,163,184,0.18), rgba(148,163,184,0.04) 60%, var(--bg-elev-2));
}
.podium-slot.s3 .podium-block {
  height: 60px;
  border-top-color: #b45309;
  background: linear-gradient(180deg, rgba(180,83,9,0.18), rgba(180,83,9,0.04) 60%, var(--bg-elev-2));
}

.podium-num {
  font-size: 56px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 24px rgba(0,0,0,0.5);
}
.podium-slot.s1 .podium-num { color: var(--red); font-size: 80px; }
.podium-slot.s2 .podium-num { color: #94a3b8; font-size: 56px; }
.podium-slot.s3 .podium-num { color: #b45309; font-size: 48px; }

.podium-info {
  width: 100%;
  text-align: center;
  padding: 18px 14px 22px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-top: none;
  transition: background 0.2s;
}
.podium-slot:hover .podium-info { background: var(--bg-elev-2); }

.podium-slot.s1 .podium-info {
  border-color: var(--red);
  background: linear-gradient(180deg, rgba(225,29,46,0.06), var(--bg-elev));
}
.podium-slot.s1:hover .podium-info { background: linear-gradient(180deg, rgba(225,29,46,0.10), var(--bg-elev-2)); }

.podium-info .nm {
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 6px;
  word-break: break-word;
}
.podium-slot.s1 .podium-info .nm { font-size: 19px; }
.podium-info .meta { margin-bottom: 10px; font-size: 11px; color: var(--text-muted); display: flex; gap: 6px; justify-content: center; align-items: center; flex-wrap: wrap; }
.podium-info .rating {
  font-size: 22px; font-weight: 900;
  color: var(--text); font-variant-numeric: tabular-nums;
  line-height: 1;
}
.podium-slot.s1 .podium-info .rating { font-size: 32px; color: var(--red); }
.podium-info .rating .lbl {
  font-size: 9px; color: var(--text-muted); display: block; margin-top: 4px;
  text-transform: uppercase; letter-spacing: 0.15em; font-weight: 700;
}
.podium-info .wl { font-size: 11px; color: var(--text-dim); margin-top: 10px; }
.podium-info .goals {
  font-size: 11px; color: var(--red); font-weight: 800;
  margin-top: 4px;
  letter-spacing: 0.05em;
}

@media (max-width: 800px) {
  .podium-row { grid-template-columns: 1fr; }
  .podium-slot .podium-model { height: 280px !important; }
  .podium-slot .podium-block { height: 50px !important; }
}

/* legacy podium grid (kept for any other usage) */
.podium {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 14px;
  align-items: end;
  margin-bottom: 28px;
}
.podium-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 18px 20px;
  text-align: center;
  position: relative;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: all 0.15s;
}
.podium-card:hover { transform: translateY(-3px); border-color: var(--red); }
.podium-card.p1 {
  background: linear-gradient(180deg, rgba(225,29,46,0.15) 0%, var(--bg-elev) 60%);
  border-color: var(--red);
  padding-top: 32px;
  padding-bottom: 30px;
}
.podium-card .pos {
  position: absolute;
  top: 10px; right: 12px;
  font-size: 36px;
  font-weight: 900;
  color: var(--bg-elev-2);
  line-height: 1;
}
.podium-card.p1 .pos { color: var(--red); font-size: 44px; }
.podium-card.p2 .pos { color: rgba(225,29,46,0.45); font-size: 38px; }
.podium-card.p3 .pos { color: rgba(225,29,46,0.25); }
.podium-card .head {
  width: 80px; height: 80px;
  margin: 0 auto 12px;
  border-radius: 8px;
  image-rendering: pixelated;
  background: var(--bg-elev-2);
}
.podium-card.p1 .head { width: 96px; height: 96px; }
.podium-card .nm { font-weight: 800; font-size: 15px; margin-bottom: 4px; word-break: break-word; }
.podium-card .meta { font-size: 11px; color: var(--text-muted); margin-bottom: 10px; }
.podium-card .rating {
  font-size: 26px; font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.podium-card.p1 .rating { font-size: 34px; color: var(--red); }
.podium-card .rating .lbl { font-size: 10px; color: var(--text-muted); display: block; margin-top: 2px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; }
.podium-card .wl { font-size: 11px; color: var(--text-dim); margin-top: 6px; }

.tier-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 28px;
}
.tier-cell {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: center;
}
.tier-cell .top {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em;
  font-weight: 800;
  margin-bottom: 6px;
}
.tier-cell .num {
  font-size: 22px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.tier-cell .sub {
  font-size: 10px; color: var(--text-muted);
  margin-top: 2px;
}

.win-bar {
  display: flex;
  width: 80px;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--bg-elev-2);
}
.win-bar .w { background: var(--green); }
.win-bar .l { background: var(--red); }

/* ========== GAME SHEET ========== */
.sheet-hero {
  position: relative;
  background: linear-gradient(135deg, var(--bg-elev) 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  margin-bottom: 24px;
  overflow: hidden;
}
.sheet-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, var(--red-glow), transparent 60%);
  pointer-events: none;
}
.sheet-meta {
  position: relative; z-index: 1;
  text-align: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 22px;
}
.sheet-meta .sep { color: var(--border); margin: 0 10px; }
.sheet-score {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}
.sheet-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.sheet-side.away { align-items: center; }
.sheet-side .mark {
  width: 88px; height: 88px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-weight: 900; font-size: 28px;
  color: white;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}
.sheet-side .mark.has-logo {
  background-color: transparent !important;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: none;
  border-radius: 0;
  width: 140px; height: 140px;   /* bigger than the 88px colored badge */
}
.sheet-side .name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.sheet-side .shots {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-weight: 700;
}
.sheet-side .num-score {
  font-size: 72px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  margin-top: 6px;
  transition: color 0.15s;
}
.sheet-side.winner .num-score { color: var(--red); }
.sheet-side.loser  .num-score { color: var(--text-muted); }
.sheet-vs {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.2em;
}

/* ── Three Stars ── */
.three-stars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.star-card {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  text-decoration: none;
  color: inherit;
  display: flex; align-items: center; gap: 14px;
  transition: all 0.15s;
}
.star-card:hover { border-color: var(--red); transform: translateY(-2px); }
.star-card .star-num {
  position: absolute;
  top: 10px; right: 12px;
  font-size: 32px;
  font-weight: 900;
  color: var(--bg-elev-2);
  line-height: 1;
}
.star-card.first .star-num  { color: var(--red); }
.star-card.second .star-num { color: rgba(225, 29, 46, 0.5); }
.star-card.third .star-num  { color: rgba(225, 29, 46, 0.25); }
.star-card .head {
  width: 56px; height: 56px;
  border-radius: 6px;
  image-rendering: pixelated;
  background: var(--bg-elev-2);
  flex-shrink: 0;
}
.star-card .info { min-width: 0; flex: 1; }
.star-card .info .nm { font-weight: 700; font-size: 14px; }
.star-card .info .tm { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.star-card .info .ln { font-size: 11px; color: var(--text-dim); margin-top: 6px; }

/* ── Scoring summary (goals by period) ── */
.scoring-period { margin-bottom: 20px; }
.period-header {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-weight: 800;
  margin: 18px 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.goal-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 8px;
  transition: all 0.15s;
}
.goal-card:hover { border-color: var(--red); transform: translateX(2px); }
.goal-head {
  width: 48px; height: 48px;
  border-radius: 6px;
  image-rendering: pixelated;
  background: var(--bg-elev-2);
  display: block;
}
.goal-info { min-width: 0; }
.goal-info .scorer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.goal-info .scorer a { color: inherit; text-decoration: none; }
.goal-info .scorer a:hover { color: var(--red); }
.goal-info .goal-num {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13px;
}
.goal-info .assists {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
  flex-wrap: wrap;
}
.goal-info .assists a {
  color: var(--text-dim);
  text-decoration: none;
}
.goal-info .assists a:hover { color: var(--red); }
.goal-info .assists .small-mark {
  width: 18px; height: 18px;
  border-radius: 3px;
  display: grid; place-items: center;
  font-size: 8px; font-weight: 800;
  color: white;
  letter-spacing: 0;
}
.goal-stats {
  display: flex;
  gap: 8px;
}
.goal-stat-box {
  background: var(--bg-elev-2);
  border-radius: var(--radius);
  padding: 10px 14px;
  text-align: center;
  min-width: 78px;
}
.goal-stat-box .v {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
}
.goal-stat-box .l {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 3px;
}

@media (max-width: 700px) {
  .goal-card {
    grid-template-columns: auto 1fr;
  }
  .goal-stats {
    grid-column: 1 / -1;
    flex-wrap: wrap;
  }
}

/* ── Head-to-head game stats comparison ── */
.vs-stats {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
}
.vs-stats-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.vs-stats-header .team-mark { width: 32px; height: 32px; font-size: 11px; }
.vs-stats-header .away { justify-self: start; display: flex; align-items: center; gap: 10px; }
.vs-stats-header .home { justify-self: end; display: flex; align-items: center; gap: 10px; flex-direction: row-reverse; }
.vs-stats-header .title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: uppercase;
}

.vs-row { padding: 14px 0; }
.vs-row + .vs-row { border-top: 1px solid var(--border); }

.vs-numbers {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 8px;
}
.vs-numbers .away { text-align: left; }
.vs-numbers .home { text-align: right; }
.vs-numbers .num {
  font-size: 30px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}
.vs-numbers .label {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

.vs-bar {
  display: flex;
  align-items: center;
  height: 6px;
  gap: 2px;
}
.vs-bar .away-fill,
.vs-bar .home-fill {
  height: 100%;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
/* Chevron-style edges where the bars meet */
.vs-bar .away-fill {
  clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  border-radius: 2px 0 0 2px;
}
.vs-bar .home-fill {
  clip-path: polygon(6px 0, 100% 0, 100% 100%, 0 100%);
  border-radius: 0 2px 2px 0;
}

.vs-sub {
  display: grid;
  grid-template-columns: 1fr 1fr;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 600;
}
.vs-sub .away { text-align: left; }
.vs-sub .home { text-align: right; }

@media (max-width: 600px) {
  .vs-numbers .num { font-size: 22px; }
  .vs-stats { padding: 18px; }
}

/* ── Side-by-side team rosters ── */
.boxscore {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
.team-box {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.team-box .head {
  padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev-2);
}
.team-box .head .badge-team {
  width: 32px; height: 32px;
  border-radius: 6px;
  display: grid; place-items: center;
  font-weight: 900; font-size: 11px;
  color: white;
}
.team-box .head .badge-team.has-logo {
  background-color: transparent !important;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 0;
  width: 48px; height: 48px;     /* bigger than the 32px colored badge */
  color: transparent;
}
.team-box .head .nm { font-weight: 700; font-size: 14px; }
.team-box .head .score-pill {
  margin-left: auto;
  font-size: 18px; font-weight: 800;
  color: var(--red);
}
.team-box table { font-size: 12px; }
.team-box th, .team-box td { padding: 8px 10px; }
.team-box .player-cell img { width: 20px; height: 20px; }
.team-box .player-cell .name { font-size: 12px; }

@media (max-width: 800px) {
  .boxscore { grid-template-columns: 1fr; }
  .three-stars { grid-template-columns: 1fr; }
  .sheet-side .num-score { font-size: 52px; }
  .sheet-side .mark { width: 64px; height: 64px; font-size: 22px; }
}

/* ========== NHL PLAYER COMPARISON ========== */
.nhl-compare {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 18px;
}
.nhl-compare .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.nhl-compare .head .title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-weight: 800;
}
.nhl-compare .head .sub {
  font-size: 11px;
  color: var(--text-muted);
}

.nhl-search-wrap {
  position: relative;
}
.nhl-search-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 11px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.nhl-search-input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}
.nhl-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 32px rgba(0,0,0,0.4);
  max-height: 320px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}
.nhl-results.open { display: block; }
.nhl-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.nhl-result:last-child { border-bottom: none; }
.nhl-result:hover, .nhl-result.active { background: var(--bg-elev-2); }
.nhl-result img {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-elev-2);
  flex-shrink: 0;
}
.nhl-result .info { flex: 1; min-width: 0; }
.nhl-result .nm { font-weight: 700; font-size: 13px; }
.nhl-result .meta { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.nhl-result .pos {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 3px;
  background: var(--red-glow);
  color: var(--red);
}

.nhl-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

/* Selected NHL player card */
.nhl-card {
  display: grid;
  grid-template-columns: 132px 1fr auto;
  gap: 22px;
  align-items: center;
  background: linear-gradient(135deg, var(--bg-elev) 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.nhl-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at left, var(--red-glow), transparent 50%);
  pointer-events: none;
}
.nhl-card .mug {
  width: 132px; height: 132px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-elev-2);
  border: 3px solid var(--border);
  position: relative;
  z-index: 1;
}
.nhl-card .info { position: relative; z-index: 1; min-width: 0; }
.nhl-card .info .name {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 6px;
}
.nhl-card .info .meta {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.nhl-card .info .meta strong { color: var(--text); font-weight: 700; }
.nhl-card .stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 12px;
}
.nhl-card .stat-grid .qs .v {
  font-size: 18px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.nhl-card .stat-grid .qs .l {
  font-size: 9px; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--text-muted);
  font-weight: 700;
}
.nhl-card .clear-btn {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  position: relative; z-index: 1;
}
.nhl-card .clear-btn:hover { color: var(--red); border-color: var(--red); }

@media (max-width: 700px) {
  .nhl-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .nhl-card .mug { margin: 0 auto; }
  .nhl-card .stat-grid { justify-items: center; }
}

/* ========== PLAYER PROFILE EDITOR ========== */
.profile-editor {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 18px;
}
.profile-editor .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.profile-editor label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 700;
}
.profile-editor select,
.profile-editor input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}
.profile-editor select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M3 4l3 4 3-4' stroke='%239c9ca3' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 32px;
}
.profile-editor select:focus,
.profile-editor input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}
.profile-editor .number-display {
  display: flex;
  align-items: center;
  gap: 8px;
}
.profile-editor .number-display .hash {
  color: var(--text-muted);
  font-size: 18px;
  font-weight: 800;
}
.profile-editor .flag-preview {
  display: inline-block;
  font-size: 20px;
  vertical-align: middle;
}

@media (max-width: 700px) {
  .profile-editor { grid-template-columns: 1fr; }
}

/* ========== PROFILE PAGE ========== */
.profile-hero {
  position: relative;
  background: linear-gradient(135deg, var(--bg-elev) 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 32px;
  align-items: center;
}
.profile-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at left, rgba(225,29,46,0.10), transparent 50%);
  pointer-events: none;
}
.profile-model {
  width: 220px; height: 280px;
  display: grid; place-items: center;
  position: relative;
  z-index: 1;
}
.profile-meta {
  position: relative; z-index: 1;
  min-width: 0;
}
.profile-meta .badges { display:flex; gap:8px; margin-bottom: 12px; flex-wrap: wrap; }
.profile-meta h1 {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 8px;
  word-break: break-word;
}
.profile-meta .sub {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 18px;
}
.profile-comp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 14px 4px 4px;
  margin: -8px 0 16px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
  max-width: 100%;
}
.profile-comp:hover {
  border-color: var(--red);
  transform: translateY(-1px);
}
.profile-comp img {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg);
  flex-shrink: 0;
}
.profile-comp .body {
  display: flex; flex-direction: column; gap: 1px; min-width: 0;
}
.profile-comp .label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 700;
  line-height: 1;
}
.profile-comp .nm {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
}
.profile-comp .nm .pos {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  margin-left: 6px;
}

.profile-quickstats {
  display: grid;
  grid-template-columns: repeat(5, minmax(60px, 90px));
  gap: 14px;
}
.profile-quickstats .qs .v {
  font-size: 24px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.profile-quickstats .qs .l {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 2px;
}
.profile-side {
  position: relative; z-index: 1;
  text-align: right;
}
.profile-side .gp-balance {
  display: inline-flex;
  align-items: center; gap: 6px;
  padding: 8px 12px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 800;
  color: var(--green);
}
.profile-side .gp-balance .label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted); font-weight: 700;
  margin-right: 4px;
}

/* X-factor display (read-only mini version of the hex slots) */
.xf-display {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.xf-display .slot {
  position: relative;
  width: 80px; height: 80px;
  display: grid; place-items: center;
  flex: 0 0 80px;
}
.xf-display .slot .hex {
  position: absolute; inset: 0;
  background: var(--bg-elev-2);
  border: 2px solid var(--border);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.xf-display .slot.filled .hex {
  background: linear-gradient(135deg, var(--red-glow), var(--bg-elev));
  border-color: var(--red);
  box-shadow: 0 0 20px var(--red-glow);
}
.xf-display .slot img {
  position: relative; z-index: 1;
  width: 46px; height: 46px; object-fit: contain;
}
.xf-display .slot .ph {
  position: relative; z-index: 1;
  color: var(--text-muted);
  font-size: 22px;
  font-weight: 300;
}
.xf-display .slot .lbl {
  position: absolute; bottom: -22px; left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
  font-weight: 700;
  color: var(--text-muted);
}
.xf-display .slot.filled .lbl { color: var(--text); }

@media (max-width: 800px) {
  .profile-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .profile-model { margin: 0 auto; width: 180px; height: 220px; }
  .profile-meta h1 { font-size: 30px; }
  .profile-quickstats { justify-content: center; }
  .profile-side { text-align: center; }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 40px 24px; }
  .hero h1 { font-size: 32px; }
  .nav-links { display: none; }
  .odds-row { grid-template-columns: 1fr; }
  .team-banner { flex-direction: column; text-align: center; align-items: center; }
  .team-record { margin-left: 0; }
}
