/* FIFA World Cup 2026 — dashboard styles */

:root {
  --bg:           #f4f5f8;
  --surface:      #ffffff;
  --surface-2:    #fafbfc;
  --border:       #e6e8ee;
  --border-soft:  #eef0f4;
  --text:         #0b1220;
  --text-soft:    #4b5468;
  --text-mute:    #8b93a7;
  --sidebar-bg:   #0b1220;
  --sidebar-elev: #131b30;
  --sidebar-text: #d9dde6;
  --sidebar-mute: #7a8298;
  --sidebar-line: #1c243a;
  --accent:       #16a34a;
  --accent-soft:  rgba(22,163,74,0.12);
  --live:         #ef4444;
  --live-soft:    rgba(239,68,68,0.12);
  --warn:         #f59e0b;
  --gold:         #d4a83a;
  --shadow:       0 1px 2px rgba(11,18,32,0.04), 0 4px 16px rgba(11,18,32,0.04);
  --radius:       14px;
  --radius-sm:    10px;
  --radius-xs:    8px;
  --ease:         cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; background: var(--bg); color: var(--text); }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font-family: inherit; cursor: pointer; }
img { display: block; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d4d8e2; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #b8bfce; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  border-right: 1px solid #0a1020;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 22px 18px;
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--sidebar-line);
  color: var(--sidebar-text);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .15s var(--ease);
}
.brand:hover { background: rgba(255,255,255,0.025); }
.brand:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: 2px; }
.brand-mark {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--accent) 0%, #0ea5e9 100%);
  border-radius: 10px;
  display: grid; place-items: center;
  font-weight: 800; color: #fff;
  letter-spacing: -0.5px; font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 2px 8px rgba(22,163,74,0.25);
}
.brand-title { font-weight: 700; font-size: 14px; letter-spacing: -0.2px; color: #fff; }
.brand-sub { font-size: 11px; color: var(--sidebar-mute); margin-top: 2px; letter-spacing: 0.4px; text-transform: uppercase; }

.nav { flex: 1; overflow-y: auto; padding: 14px 12px 18px; }
.nav-section-label {
  padding: 14px 10px 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--sidebar-mute);
}
.nav-item {
  position: relative;
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border: 0; background: transparent;
  color: var(--sidebar-text);
  font-size: 13.5px; font-weight: 500;
  border-radius: 8px;
  text-align: left;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.nav-item:hover { background: var(--sidebar-elev); color: #fff; }
.nav-item .nav-ico {
  display: inline-grid; place-items: center;
  width: 18px; height: 18px;
  color: var(--sidebar-mute);
  transition: color .18s var(--ease);
}
.nav-item .nav-ico svg { width: 18px; height: 18px; display: block; }
.nav-item:hover .nav-ico { color: var(--accent); }
.nav-item.active { background: var(--sidebar-elev); color: #fff; }
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -12px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--accent);
  animation: slideIn .25s var(--ease);
}
.nav-item.active .nav-ico { color: var(--accent); }

.group-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 6px 10px 0;
}
.group-btn {
  position: relative;
  height: 40px;
  border-radius: 8px;
  background: var(--sidebar-elev);
  color: var(--sidebar-text);
  border: 1px solid transparent;
  font-weight: 700; font-size: 13px; letter-spacing: 0.4px;
  transition: transform .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.group-btn:hover { transform: translateY(-1px); background: #1a2440; color: #fff; border-color: rgba(255,255,255,0.06); }
.group-btn:disabled { opacity: 0.4; cursor: default; transform: none; }
.group-btn.active { background: var(--accent-soft); color: #fff; border-color: rgba(22,163,74,0.4); }
.group-btn .live-pip {
  position: absolute;
  top: 5px; right: 5px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 2px var(--sidebar-bg);
  animation: pulse 1.6s ease-in-out infinite;
}

.sidebar-foot {
  padding: 14px 14px 18px;
  border-top: 1px solid var(--sidebar-line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}
.rules-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,0.05);
  background: var(--sidebar-elev);
  color: var(--sidebar-text);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.rules-btn:hover, .rules-btn.active {
  background: #1a2440;
  color: #fff;
  border-color: rgba(255,255,255,0.08);
}
.rules-btn .nav-ico { color: var(--sidebar-mute); width: 18px; height: 18px; display: inline-grid; place-items: center; }
.rules-btn .nav-ico svg { width: 18px; height: 18px; }
.rules-btn:hover .nav-ico, .rules-btn.active .nav-ico { color: var(--accent); }
.stage-pill { align-self: flex-start; }
.stage-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 11px;
  background: var(--sidebar-elev);
  border-radius: 999px;
  font-size: 12px;
  color: var(--sidebar-text);
  border: 1px solid rgba(255,255,255,0.04);
}
.stage-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  animation: pulse 2s ease-in-out infinite;
}

/* ---------- Main ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  padding: 22px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky; top: 0; z-index: 5;
}
.topbar-title { font-size: 22px; font-weight: 700; letter-spacing: -0.4px; margin: 0; }
.topbar-subtitle { font-size: 12.5px; color: var(--text-mute); margin-top: 3px; letter-spacing: 0.1px; }
.topbar-meta { display: flex; gap: 10px; flex-shrink: 0; }
.meta-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-soft);
  white-space: nowrap;
}
.meta-chip-label { color: var(--text-mute); font-size: 11px; letter-spacing: 0.4px; text-transform: uppercase; }
.meta-chip-value { font-weight: 600; color: var(--text); }
.meta-chip--stage {
  background: var(--accent-soft);
  border-color: rgba(22,163,74,0.25);
  color: var(--text);
}
.meta-chip--stage .meta-chip-label { color: var(--accent); }
.meta-chip--stage .stage-pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.18);
  animation: pulse 2s ease-in-out infinite;
}

.meta-chip--live { color: var(--live); border-color: rgba(239,68,68,0.25); background: var(--live-soft); }
.meta-chip--live .live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--live);
  animation: pulse 1.5s ease-in-out infinite;
}
.meta-chip--live.is-empty { color: var(--text-mute); background: var(--surface-2); border-color: var(--border); }
.meta-chip--live.is-empty .live-dot { background: var(--text-mute); animation: none; }

.content { flex: 1; padding: 28px 32px 56px; min-width: 0; }

/* ---------- View transitions ---------- */
.view { animation: viewEnter .32s var(--ease) both; }
@keyframes viewEnter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
  from { transform: scaleY(0); opacity: 0; }
  to   { transform: scaleY(1); opacity: 1; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.92); }
}
@keyframes itemEnter {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Section header ---------- */
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin: 6px 0 14px;
  flex-wrap: wrap;
  gap: 12px;
}
.section-head h2 { font-size: 16px; font-weight: 700; margin: 0; letter-spacing: -0.2px; }
.section-head p { font-size: 12.5px; color: var(--text-mute); margin: 4px 0 0; }

/* ---------- Card primitive ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Flag chip ---------- */
.flag {
  display: inline-block;
  width: 20px; height: 15px;
  border-radius: 2.5px;
  object-fit: cover;
  vertical-align: -3px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.06);
  background: #e2e4ea;
  flex-shrink: 0;
}
.flag.lg { width: 28px; height: 21px; border-radius: 3px; vertical-align: -5px; }
.flag.sm { width: 16px; height: 12px; border-radius: 2px; vertical-align: -2px; }
.flag-fallback {
  display: inline-grid; place-items: center;
  width: 20px; height: 15px;
  background: #e2e4ea;
  color: #6b7180;
  border-radius: 2.5px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.4px;
}
.flag-fallback.lg { width: 28px; height: 21px; font-size: 10px; }

/* ---------- Group hero ---------- */
.group-hero {
  display: flex; align-items: center; justify-content: space-between;
  gap: 22px;
  padding: 22px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbf8 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 22px;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}
.group-hero-left { display: flex; align-items: center; gap: 18px; min-width: 0; }
.group-letter {
  width: 64px; height: 64px;
  background: var(--text);
  color: #fff;
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 28px; font-weight: 800;
  letter-spacing: -1px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.group-hero-title { font-size: 22px; font-weight: 700; letter-spacing: -0.4px; }
.group-hero-sub { font-size: 12.5px; color: var(--text-mute); margin-top: 4px; }
.group-hero-right {
  display: grid; grid-template-columns: repeat(3, auto); gap: 22px; text-align: right;
}
.stat-block { display: flex; flex-direction: column; gap: 2px; align-items: flex-end; }
.stat-block .v { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.stat-block .l { font-size: 11px; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.5px; }

/* ---------- Confederation strip (Table view) ---------- */
.confed-strip {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
  animation: itemEnter .3s var(--ease) both;
}
/* Faintly dim & blur the grid below when a continent is hovered, so the
   tooltip becomes the focal point and isn't masked by the group cards. */
.groups-grid {
  transition: opacity .22s var(--ease), filter .22s var(--ease);
}
.view.is-confed-active .groups-grid {
  opacity: 0.45;
  filter: blur(1.5px) saturate(85%);
}
.confed-cell {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .15s var(--ease), border-color .15s var(--ease);
  cursor: default;
}
.confed-cell:hover, .confed-cell:focus-within {
  transform: translateY(-1px);
  border-color: #c6cbd8;
  z-index: 10;
}

.confed-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  min-width: 220px;
  max-width: 280px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: saturate(180%);
  -webkit-backdrop-filter: saturate(180%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow:
    0 24px 56px rgba(11,18,32,0.22),
    0 4px 14px rgba(11,18,32,0.08),
    0 0 0 1px rgba(11,18,32,0.04);
  padding: 10px 10px 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s var(--ease), transform .18s var(--ease);
  z-index: 100;
}
.confed-tooltip::before {
  content: '';
  position: absolute;
  top: -6px; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 11px; height: 11px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
}
.confed-tooltip.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.confed-tooltip-h {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 6px 8px;
  font-weight: 700;
  font-size: 12px;
  border-bottom: 1px dashed var(--border-soft);
  letter-spacing: 0.2px;
  margin-bottom: 4px;
}
.confed-tooltip-h .confed-dot { box-shadow: none; }
.confed-tooltip-n {
  margin-left: auto;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 700;
}
.confed-tooltip ul {
  list-style: none;
  margin: 0; padding: 0;
  max-height: 240px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
}
.confed-tooltip li {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 6px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.confed-tooltip li:hover { background: var(--surface-2); color: var(--text); }
.confed-tooltip li span:not(.flag) { overflow: hidden; text-overflow: ellipsis; }
.confed-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.04);
}
.confed-meta { min-width: 0; }
.confed-code { font-weight: 700; font-size: 13px; letter-spacing: -0.1px; }
.confed-region {
  font-size: 11px; color: var(--text-mute);
  letter-spacing: 0.3px;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.confed-count {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.6px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 1080px) {
  .confed-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .confed-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .confed-count { font-size: 18px; }
}

/* ---------- Standings card / table ---------- */
.standings-card { overflow: hidden; }
.standings {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}
.standings col-team { width: auto; }
.standings th, .standings td {
  padding: 10px 10px;
  text-align: center;
  border-bottom: 1px solid var(--border-soft);
}
.standings th:first-child, .standings td:first-child {
  text-align: left; padding-left: 18px;
  width: auto;
  overflow: hidden;
}
.standings th:last-child, .standings td:last-child { padding-right: 18px; }
.standings th:not(:first-child), .standings td:not(:first-child) { width: 30px; }
.standings--compact th:first-child, .standings--compact td:first-child {
  width: 32%;
  min-width: 0;
}
.standings .team-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.standings .team-code { font-variant-numeric: tabular-nums; letter-spacing: 0.2px; }
.standings th {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-mute);
  background: var(--surface-2);
}
.standings td { color: var(--text-soft); }
.standings tr:last-child td { border-bottom: 0; }
.standings td .team-cell {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; color: var(--text);
}
.standings tr.pos-1 td { background: rgba(22,163,74,0.04); }
.standings tr.pos-2 td { background: rgba(22,163,74,0.025); }
.standings tr .rk {
  position: relative;
  display: inline-block;
  width: 18px;
  text-align: center;
  font-weight: 700;
  color: var(--text);
  margin-right: 6px;
}
.standings tr.pos-1 .rk::before, .standings tr.pos-2 .rk::before, .standings tr.pos-3 .rk::before {
  content: '';
  position: absolute;
  left: -8px; top: 4px; bottom: 4px;
  width: 3px; border-radius: 3px;
}
.standings tr.pos-1 .rk::before { background: var(--accent); }
.standings tr.pos-2 .rk::before { background: #34d399; }
.standings tr.pos-3 .rk::before { background: var(--warn); }
.standings td.pts { font-weight: 700; color: var(--text); }

/* ---------- Form card (last 5 W/D/L) ---------- */
.form-card { padding: 4px 0; overflow: hidden; }
.form-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-soft);
  animation: itemEnter .25s var(--ease) both;
}
.form-row:last-child { border-bottom: none; }
.form-name {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.form-pills { display: flex; gap: 6px; }
.form-pill {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 7px;
  font-size: 11px; font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.4px;
  box-shadow: 0 1px 2px rgba(11,18,32,0.06);
  transition: transform .15s var(--ease);
  cursor: default;
}
.form-pill:hover { transform: translateY(-1px); }
.form-pill.W { background: var(--accent); }
.form-pill.D { background: #6b7280; }
.form-pill.L { background: var(--live); }
.form-pill.na {
  background: var(--surface-2);
  color: var(--text-mute);
  box-shadow: inset 0 0 0 1px var(--border);
  font-weight: 400;
}
.form-empty {
  grid-column: 2 / -1;
  font-size: 11.5px;
  color: var(--text-mute);
  margin-top: 2px;
}

/* ---------- Rules view ---------- */
.rules-view { max-width: 1200px; margin: 0 auto; }
.rules-hero {
  text-align: center;
  margin: 8px 0 28px;
}
.rules-hero h1 {
  font-size: 28px; font-weight: 800;
  letter-spacing: -0.6px;
  margin: 0 0 10px;
}
.rules-hero p {
  font-size: 14px;
  color: var(--text-mute);
  margin: 0;
}
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.rules-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 16px;
  box-shadow: var(--shadow);
  position: relative;
  animation: itemEnter .35s var(--ease) both;
}
.rules-section.highlight {
  background: linear-gradient(180deg, #f3faf5 0%, #ffffff 100%);
  border-color: rgba(22,163,74,0.32);
}
.rules-num {
  position: absolute;
  top: 16px; right: 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--text-mute);
  background: var(--surface-2);
  padding: 3px 10px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.rules-section.highlight .rules-num {
  background: var(--accent-soft);
  color: var(--accent);
}
.rules-section h2 {
  font-size: 16px; font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -0.2px;
}
.rules-section ul { list-style: none; padding: 0; margin: 0; }
.rules-section li {
  font-size: 13.5px;
  color: var(--text-soft);
  padding: 9px 0 9px 18px;
  border-bottom: 1px dashed var(--border-soft);
  position: relative;
}
.rules-section li:last-child { border-bottom: none; }
.rules-section li::before {
  content: '';
  position: absolute;
  left: 0; top: 16px;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.rules-section li strong { color: var(--text); font-weight: 600; }

/* ---------- Match cards ---------- */
.matchlist { display: flex; flex-direction: column; gap: 12px; }
.match {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  transition: transform .2s var(--ease), border-color .2s var(--ease);
  animation: itemEnter .35s var(--ease) both;
}
.match:hover { transform: translateY(-1px); border-color: #dde0e8; }
.match-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.match-stage {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-weight: 600;
}
.match-stage::before {
  content: '';
  width: 5px; height: 5px;
  background: var(--text-mute);
  border-radius: 50%;
}
.match-state {
  font-size: 11px; font-weight: 700; letter-spacing: 0.6px;
  padding: 3px 9px; border-radius: 999px; text-transform: uppercase;
}
.state-completed { color: var(--text-mute); background: var(--surface-2); border: 1px solid var(--border); }
.state-upcoming  { color: var(--text-soft); background: var(--surface-2); border: 1px solid var(--border); }
.state-live      { color: #fff; background: var(--live); }
.state-live::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fff;
  margin-right: 6px;
  animation: pulse 1.2s ease-in-out infinite;
  vertical-align: 1px;
}

.match-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}
.team {
  display: flex; align-items: center; gap: 12px;
  min-width: 0;
}
.team.away { justify-content: flex-end; text-align: right; }
.team .nm {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.team.away .stack { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; }
.team.home .stack { display: flex; flex-direction: column; min-width: 0; }

.score {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-variant-numeric: tabular-nums;
  font-size: 24px; font-weight: 700; letter-spacing: -0.6px;
  min-width: 90px; justify-content: center;
}
.score .dash { color: var(--text-mute); font-weight: 400; }
.score-tba {
  font-size: 13px;
  color: var(--text-mute);
  font-weight: 500;
  text-align: center;
  min-width: 90px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.score-tba .time {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.4px;
}

.match-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-soft);
  font-size: 12px;
  color: var(--text-mute);
  flex-wrap: wrap;
  gap: 8px 16px;
}
.match-foot .stadium { display: inline-flex; align-items: center; gap: 7px; }
.match-foot .stadium::before { content: '◉'; color: var(--text-mute); font-size: 9px; }
.match-foot .when { display: inline-flex; align-items: center; gap: 7px; }
.match-foot .when::before { content: '◷'; color: var(--text-mute); font-size: 11px; }

/* ---------- Multi-group grid (Table / Group Stage) ---------- */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
}
.group-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
  cursor: pointer;
  animation: itemEnter .3s var(--ease) both;
}
.group-card:hover { transform: translateY(-2px); border-color: #dde0e8; }
.group-card-h {
  padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(180deg, #fbfcfd 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border-soft);
}
.group-card-h .id {
  width: 30px; height: 30px;
  background: var(--text);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  display: grid; place-items: center;
  font-size: 13px;
  flex-shrink: 0;
}
.group-card-h .meta { flex: 1; min-width: 0; }
.group-card-h .meta .ttl { font-weight: 600; font-size: 14px; }
.group-card-h .meta .sub { font-size: 11.5px; color: var(--text-mute); margin-top: 2px; }

.mini-matches { padding: 4px 0; }
.mini-match {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border-top: 1px solid var(--border-soft);
  font-size: 13px;
}
.mini-team {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.mini-team span:not(.flag) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-team.away { justify-content: flex-end; }
.mini-center { font-variant-numeric: tabular-nums; text-align: center; min-width: 92px; }
.mini-live { color: var(--live); font-weight: 700; }
.mini-final { color: var(--text); font-weight: 700; }
.mini-time { color: var(--text-mute); font-size: 11.5px; }

/* ---------- Final stage ---------- */
.final-stage {
  position: relative;
  min-height: calc(100vh - 200px);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #0b1220 0%, #131b30 100%);
  color: #fff;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 64px 32px;
  box-shadow: var(--shadow);
  isolation: isolate;
}
.final-stage::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 50% 45%, rgba(212,168,58,0.18) 0%, transparent 60%),
    radial-gradient(circle at 50% 100%, rgba(22,163,74,0.16) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.final-bg {
  position: absolute;
  left: 50%; top: 50%;
  width: 520px; height: 620px;
  transform: translate(-50%, -50%);
  color: var(--gold);
  opacity: 0.12;
  filter: drop-shadow(0 0 40px rgba(212,168,58,0.4));
  z-index: 0;
  animation: trophyEnter 1.2s var(--ease) both, trophyFloat 6s ease-in-out infinite;
}
.final-bg svg { width: 100%; height: 100%; }
@keyframes trophyEnter {
  from { opacity: 0; transform: translate(-50%, -45%) scale(0.94); }
  to   { opacity: 0.12; transform: translate(-50%, -50%) scale(1); }
}
@keyframes trophyFloat {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-50%, -52%) scale(1.02); }
}

.final-content {
  position: relative; z-index: 1;
  text-align: center;
  max-width: 640px;
}
.final-eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 22px;
}
.final-title {
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -2px;
  margin: 0 0 24px;
  line-height: 1;
  background: linear-gradient(180deg, #ffffff 0%, #d8dde9 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.final-versus {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  margin-bottom: 36px;
  font-size: 18px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
}
.final-slot {
  padding: 8px 22px;
  border: 1px dashed rgba(255,255,255,0.22);
  border-radius: 999px;
  letter-spacing: 0.4px;
}
.final-x {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.final-meta {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 16px 22px;
  text-align: left;
  min-width: 360px;
}
.final-meta-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 18px;
  font-size: 13px;
}
.final-meta-row .lab {
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.6px;
  align-self: center;
}
.final-meta-row .val {
  color: #fff;
  font-weight: 600;
}
@media (max-width: 880px) {
  .final-title { font-size: 48px; }
  .final-bg { width: 380px; height: 460px; }
  .final-meta { min-width: 0; width: 100%; }
  .final-meta-row { grid-template-columns: 80px 1fr; gap: 12px; }
}
@media (max-width: 560px) {
  .final-title { font-size: 38px; }
  .final-versus { font-size: 15px; gap: 10px; }
  .final-slot { padding: 6px 14px; }
}

/* ---------- Knockout placeholder ---------- */
.knockout-empty .bracket-placeholder {
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, 220px);
  justify-content: center;
  gap: 14px;
  width: 100%;
}
.knockout-empty .bracket-placeholder--centered {
  justify-content: center;
}
.bracket-match {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  animation: itemEnter .35s var(--ease) both;
}
.bracket-match.is-final {
  background: linear-gradient(180deg, #fffdf6 0%, #fff5dd 100%);
  border-color: #f1d68a;
}
.bracket-match .label {
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
}
.bracket-match.is-final .label { color: var(--gold); }
.bracket-match .slot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}
.bracket-match .slot + .slot { border-top: 1px dashed var(--border-soft); }
.bracket-match .slot .nm { color: var(--text-soft); font-weight: 500; }
.bracket-match .slot .nm.tbd { color: var(--text-mute); font-style: italic; font-weight: 400; }
.bracket-match .slot .sc { color: var(--text-mute); font-variant-numeric: tabular-nums; }

/* ---------- Empty / loading states ---------- */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 56px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-soft);
}
.empty-state h3 { font-size: 16px; font-weight: 700; margin: 4px 0; color: var(--text); letter-spacing: -0.2px; }
.empty-state p { margin: 4px 0 0; font-size: 13px; color: var(--text-mute); max-width: 520px; }
.empty-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 22px;
  margin-bottom: 14px;
}
.empty-icon.gold { background: rgba(212,168,58,0.16); color: var(--gold); }
.knockout-empty, .scorers-empty {
  padding-bottom: 32px;
}

.spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(22,163,74,0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .9s linear infinite;
  margin-bottom: 16px;
}

.btn-primary {
  margin-top: 14px;
  padding: 9px 16px;
  background: var(--text);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  transition: transform .15s var(--ease), background .15s var(--ease);
}
/* button-styled anchors shouldn't show the link underline */
a.btn-primary, a.btn-ghost { display: inline-block; text-decoration: none; }
.btn-primary:hover { transform: translateY(-1px); background: #1a2440; }

/* ---------- Top Scorers ---------- */
.scorers-view { display: flex; flex-direction: column; }
.scorers-list { display: grid; grid-template-columns: 1fr; gap: 10px; }

.scorers-more {
  max-height: 420px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
  padding: 6px 12px 6px 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  box-shadow: inset 0 1px 0 rgba(11,18,32,0.02);
}
.scorers-more::-webkit-scrollbar { width: 8px; }
.scorers-more::-webkit-scrollbar-thumb { background: #cdd1dc; border-radius: 8px; }
.scorers-more::-webkit-scrollbar-thumb:hover { background: #b5bcd0; }
.scorer {
  display: grid;
  grid-template-columns: 36px 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px 14px 18px;
  box-shadow: var(--shadow);
  transition: transform .2s var(--ease), border-color .2s var(--ease);
  animation: itemEnter .3s var(--ease) both;
}
.scorer:hover { transform: translateX(2px); border-color: #dde0e8; }
.scorer .rank {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}
.scorer.top-3 .rank { color: var(--accent); }

.photo-wrap {
  position: relative;
  width: 56px; height: 56px;
}
.photo {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: #e2e4ea;
  box-shadow: 0 0 0 1px rgba(11,18,32,0.06), 0 2px 6px rgba(11,18,32,0.06);
}
.photo-fallback {
  display: grid; place-items: center;
  color: var(--text-soft);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.3px;
  background: linear-gradient(135deg, #eef0f4 0%, #dde2eb 100%);
}
.photo-flag {
  position: absolute;
  right: -2px; bottom: -2px;
  display: inline-grid; place-items: center;
  width: 22px; height: 22px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.1);
  overflow: hidden;
}
.photo-flag .flag {
  width: 18px; height: 18px;
  border-radius: 50%;
  box-shadow: none;
  object-fit: cover;
  vertical-align: 0;
}

.scorer .who { display: flex; flex-direction: column; min-width: 0; }
.scorer .who .nm { font-weight: 600; font-size: 14.5px; letter-spacing: -0.1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scorer .who .sub { font-size: 12px; color: var(--text-mute); margin-top: 3px; }

.scorer .stats { display: flex; gap: 18px; }
.scorer .stats .col { display: flex; flex-direction: column; align-items: center; min-width: 42px; }
.scorer .stats .v { font-weight: 700; font-size: 16px; color: var(--text); letter-spacing: -0.2px; font-variant-numeric: tabular-nums; }
.scorer .stats .l { font-size: 10px; color: var(--text-mute); letter-spacing: 0.5px; text-transform: uppercase; margin-top: 2px; }

/* compact scorer row (positions 6+) */
.scorer.compact {
  grid-template-columns: 30px 40px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  box-shadow: none;
}
.scorer.compact:hover { transform: none; }
.scorer.compact .rank { font-size: 14px; }
.scorer.compact .photo-wrap { width: 40px; height: 40px; }
.scorer.compact .photo, .scorer.compact .photo-skel { width: 40px; height: 40px; font-size: 13px; }
.scorer.compact .photo-flag { width: 18px; height: 18px; right: -2px; bottom: -2px; }
.scorer.compact .photo-flag .flag { width: 14px; height: 14px; }
.scorer.compact .who .nm { font-size: 13.5px; }
.scorer.compact .who .sub { font-size: 11.5px; }
.scorer.compact .stats { gap: 14px; }
.scorer.compact .stats .v { font-size: 14px; }
.scorer.compact .stats .col { min-width: 28px; }

/* placeholder scorers */
.scorer.placeholder {
  background: var(--surface-2);
  border-style: dashed;
  opacity: 0.85;
}
.scorer.placeholder.compact { background: var(--surface); }
.scorer.placeholder .photo-skel {
  background: linear-gradient(90deg, #eef0f4 0%, #e2e4ea 50%, #eef0f4 100%);
  background-size: 200% 100%;
  animation: shimmer 2.4s ease-in-out infinite;
  display: block;
  border-radius: 50%;
}
.scorer.placeholder .nm-skel { display: block; width: 130px; height: 12px; background: #e2e4ea; border-radius: 4px; margin-bottom: 6px; }
.scorer.placeholder .sub-skel { display: block; width: 90px; height: 10px; background: #ebedf2; border-radius: 4px; }
.scorer.compact.placeholder .nm-skel { width: 100px; height: 10px; }
.scorer.compact.placeholder .sub-skel { width: 72px; height: 8px; }
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .topbar { padding: 18px 22px; }
  .content { padding: 22px 22px 48px; }
  .group-hero { padding: 18px; }
  .group-hero-right { gap: 16px; }
  .group-letter { width: 56px; height: 56px; font-size: 24px; }
  .group-hero-title { font-size: 20px; }
}
@media (max-width: 880px) {
  .app { grid-template-columns: 224px minmax(0, 1fr); }
  .topbar { flex-wrap: wrap; }
  .topbar-meta { width: 100%; }
  .group-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
  .group-hero-right { width: 100%; grid-template-columns: repeat(3, 1fr); text-align: left; }
  .stat-block { align-items: flex-start; }
  .match-body { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; }
  .match-foot { flex-direction: column; align-items: flex-start; }
  .scorer { grid-template-columns: 28px 56px minmax(0,1fr); padding: 12px 14px; gap: 14px; }
  .scorer .stats { grid-column: 1 / -1; border-top: 1px dashed var(--border-soft); padding-top: 10px; margin-top: 4px; }
  .photo, .photo-wrap, .scorer.placeholder .photo-skel { width: 48px; height: 48px; }
  /* Hide GF, GA, GD to keep Pts visible at narrow widths */
  .standings th:nth-child(6), .standings td:nth-child(6),
  .standings th:nth-child(7), .standings td:nth-child(7),
  .standings th:nth-child(8), .standings td:nth-child(8) { display: none; }
}
@media (max-width: 680px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .nav { padding-bottom: 12px; }
  .group-grid { grid-template-columns: repeat(6, 1fr); }
  .content { padding: 18px 16px 36px; }
  .team .nm { font-size: 14px; }
  .score { font-size: 20px; }
  /* Hide D and L too on very narrow viewports */
  .standings th:nth-child(4), .standings td:nth-child(4),
  .standings th:nth-child(5), .standings td:nth-child(5) { display: none; }
}

/* ---------- Personal signature watermark ---------- */
.signature {
  position: fixed;
  right: 22px;
  bottom: 16px;
  z-index: 2;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ffffff;
  mix-blend-mode: difference;
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}
.signature::before {
  content: '';
  display: inline-block;
  vertical-align: middle;
  width: 18px;
  height: 1px;
  background: currentColor;
  margin-right: 10px;
  opacity: 0.7;
}
@media (max-width: 560px) {
  .signature { font-size: 9.5px; right: 12px; bottom: 10px; letter-spacing: 1.4px; }
  .signature::before { width: 12px; margin-right: 7px; }
}

/* ════════════════════════════════════════════════════════════════════════════
   PREDICTIONS COMPETITION
   ════════════════════════════════════════════════════════════════════════════ */

/* shared bits */
.btn-ghost {
  padding: 8px 14px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 600;
  font-size: 12.5px;
  font-family: inherit;
  transition: transform .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}
.btn-ghost:hover { transform: translateY(-1px); border-color: #c6cbd8; }
.btn-ghost.danger { color: var(--live); border-color: rgba(239,68,68,0.3); }
.btn-ghost.danger:hover { background: var(--live-soft); }

.pred-avatar {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #0ea5e9 100%);
  color: #fff; font-weight: 800; font-size: 14px; letter-spacing: 0.3px;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
.pred-avatar.sm { width: 26px; height: 26px; font-size: 10.5px; border-radius: 7px; }

/* ── Dev / test-mode bar ── */
.pred-devbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 18px;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.pred-devbar.is-on { background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.4); border-style: solid; }
.pred-devbar-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pred-dev-tag {
  font-size: 10px; font-weight: 800; letter-spacing: 1px;
  color: #fff; background: var(--warn);
  padding: 2px 7px; border-radius: 5px; flex-shrink: 0;
}
.pred-dev-text { font-size: 12.5px; color: var(--text-soft); }
.pred-switch {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--text-soft);
  flex-shrink: 0;
}
.pred-switch-knob {
  width: 34px; height: 20px; border-radius: 999px; background: #cdd2de;
  position: relative; transition: background .2s var(--ease);
}
.pred-switch-knob::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: transform .2s var(--ease);
}
.pred-switch.is-on { color: var(--warn); border-color: rgba(245,158,11,0.4); }
.pred-switch.is-on .pred-switch-knob { background: var(--warn); }
.pred-switch.is-on .pred-switch-knob::after { transform: translateX(14px); }

/* ── Register card ── */
.pred-register { padding: 28px; }
.pred-register-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.4px; margin: 0 0 6px; }
.pred-register-head p { font-size: 13.5px; color: var(--text-mute); margin: 0 0 20px; max-width: 560px; }
.pred-register-form {
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: end;
}
.pred-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pred-field > span { font-size: 12px; font-weight: 600; color: var(--text-soft); }
.pred-field > span em { color: var(--text-mute); font-weight: 500; font-style: normal; }
.pred-field input {
  padding: 10px 12px; font-size: 14px; font-family: inherit;
  border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); color: var(--text);
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.pred-field input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.pred-register-form .btn-primary { margin-top: 0; padding: 11px 18px; }
.pred-existing { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--border-soft); }
.pred-existing-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-mute); margin-bottom: 10px; }
.pred-chiprow { display: flex; flex-wrap: wrap; gap: 8px; }
.pred-chip {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 12.5px;
  transition: transform .15s var(--ease), border-color .15s var(--ease);
}
.pred-chip:hover { transform: translateY(-1px); border-color: var(--accent); color: var(--accent); }

/* ── Active participant bar ── */
.pred-pbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  padding: 16px 20px; margin-bottom: 22px;
}
.pred-pbar-who { display: flex; align-items: center; gap: 14px; }
.pred-pbar-name { font-weight: 700; font-size: 16px; letter-spacing: -0.2px; }
.pred-pbar-sub { font-size: 12px; color: var(--text-mute); margin-top: 2px; }
.pred-pbar-right { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.pred-topscorer, .pred-switcher { display: flex; flex-direction: column; gap: 5px; }
.pred-topscorer > span, .pred-switcher > span { font-size: 11px; font-weight: 600; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.4px; }
.pred-topscorer > span em { color: var(--warn); font-style: normal; text-transform: none; letter-spacing: 0; }
.pred-topscorer input, .pred-switcher select {
  padding: 8px 11px; font-size: 13px; font-family: inherit;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text);
}
.pred-topscorer input:focus, .pred-switcher select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pred-topscorer input:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-add { align-self: flex-end; }

/* ── Stage sections + match rows ── */
.pred-stage { margin-bottom: 26px; }
.pred-stage-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 12px; }
.pred-stage-head h2 { font-size: 15px; font-weight: 700; letter-spacing: -0.2px; margin: 0; }
.pred-stage-count { font-size: 11.5px; color: var(--text-mute); }
.pred-matchlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }

.pred-match {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow);
  transition: transform .18s var(--ease), border-color .18s var(--ease);
  animation: itemEnter .3s var(--ease) both;
}
.pred-match:hover { transform: translateY(-1px); border-color: #dde0e8; }
.pred-match.is-locked { background: var(--surface-2); }
.pred-match.is-scored { border-color: rgba(22,163,74,0.3); }
.pred-match-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 12px; font-size: 11px;
}
.pred-when { color: var(--text-mute); font-weight: 600; letter-spacing: 0.2px; }
.pred-open { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.pred-lock { color: var(--text-mute); font-weight: 600; }
.pred-actual { margin-left: auto; color: var(--text); font-weight: 700; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; }
.pred-await { margin-left: auto; color: var(--text-mute); font-style: italic; }
.pred-approx { color: var(--warn); font-weight: 600; border: 1px dashed rgba(245,158,11,0.5); border-radius: 999px; padding: 1px 7px; }

.pred-match-row { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 12px; }
.pred-team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pred-team.away { justify-content: flex-end; text-align: right; }
.pred-team .nm { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pred-inputs { display: inline-flex; align-items: center; gap: 8px; }
.pred-colon { color: var(--text-mute); font-weight: 700; }
.pred-input {
  width: 44px; height: 40px; text-align: center;
  font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; font-family: inherit;
  border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); color: var(--text);
  -moz-appearance: textfield; transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.pred-input::-webkit-outer-spin-button, .pred-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pred-input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.pred-inputs.locked .pred-num {
  display: inline-grid; place-items: center; width: 44px; height: 40px;
  font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--text); background: var(--surface); border: 1px solid var(--border-soft); border-radius: 9px;
}
.pred-num.readonly { color: var(--text-soft); }
.pred-match-foot { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border-soft); display: flex; justify-content: flex-end; }

.pred-pts {
  font-size: 11px; font-weight: 800; letter-spacing: 0.3px;
  padding: 3px 10px; border-radius: 999px;
}
.pred-pts.sm { padding: 1px 8px; font-size: 10.5px; }
.pred-pts.exact   { color: #fff; background: var(--accent); }
.pred-pts.partial { color: var(--accent); background: var(--accent-soft); }
.pred-pts.zero    { color: var(--text-mute); background: var(--surface-2); border: 1px solid var(--border); }

/* ── Submit bar (sticky) ── */
.pred-submitbar {
  position: sticky; bottom: 16px; z-index: 4;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 24px; padding: 14px 20px;
  background: rgba(255,255,255,0.92); backdrop-filter: saturate(160%) blur(8px); -webkit-backdrop-filter: saturate(160%) blur(8px);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(11,18,32,0.12);
}
.pred-submitbar-info { font-size: 13px; color: var(--text-soft); }
.pred-submitbar .btn-primary { margin-top: 0; }

/* ── Podium (gold / silver / bronze) ── */
.pred-podium-wrap { margin-bottom: 8px; }
.pred-podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: end; max-width: 720px; margin: 4px auto 0; }
.podium-cell {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 20px 14px 0; border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--border); border-bottom: 0; background: var(--surface);
  box-shadow: var(--shadow); animation: itemEnter .4s var(--ease) both; overflow: hidden;
}
.podium-cell .podium-stand { width: 100%; margin-top: 16px; }
.podium-cell.gold   { background: linear-gradient(180deg, #fffdf3 0%, #fff6d8 100%); border-color: #ecd28a; }
.podium-cell.silver { background: linear-gradient(180deg, #fcfdff 0%, #eef1f6 100%); border-color: #d2d8e2; }
.podium-cell.bronze { background: linear-gradient(180deg, #fffaf4 0%, #f6e6d3 100%); border-color: #e2c19c; }
.podium-cell.gold   .podium-stand { height: 56px; background: linear-gradient(180deg, #f4d35e, #e0b73c); }
.podium-cell.silver .podium-stand { height: 36px; background: linear-gradient(180deg, #cfd6e0, #b4bccb); }
.podium-cell.bronze .podium-stand { height: 24px; background: linear-gradient(180deg, #d9a66c, #c0824a); }
.podium-medal {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: #fff; margin-bottom: 10px;
}
.podium-cell.gold   .podium-medal { background: #e0b73c; box-shadow: 0 2px 8px rgba(224,183,60,0.5); }
.podium-cell.silver .podium-medal { background: #aab2c2; }
.podium-cell.bronze .podium-medal { background: #c0824a; }
.podium-avatar {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 18px; color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, #0ea5e9 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 2px 8px rgba(11,18,32,0.12); margin-bottom: 10px;
}
.podium-cell.gold .podium-avatar { background: linear-gradient(135deg, #e0b73c 0%, #b8860b 100%); }
.podium-name { font-weight: 700; font-size: 14.5px; letter-spacing: -0.2px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-pts { font-size: 26px; font-weight: 800; letter-spacing: -1px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.podium-pts span { font-size: 12px; font-weight: 600; color: var(--text-mute); margin-left: 4px; letter-spacing: 0; }
.podium-meta { font-size: 11px; color: var(--text-mute); margin-top: 2px; }

/* ── Leaderboard table (reuses .standings) ── */
.pred-board td .pred-avatar.sm { vertical-align: middle; }
.pred-board th:not(:first-child), .pred-board td:not(:first-child) { width: 64px; }
/* The group-standings responsive rules hide nth-child columns; the leaderboard
   has different columns, so keep all of its columns visible at every width. */
.pred-board th, .pred-board td { display: table-cell !important; }
.pred-board .team-cell { gap: 8px; }

/* ── Top scorer panel ── */
.pred-topscorer-panel { padding: 18px 20px; }
.pred-ts-actual {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 14px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px dashed var(--border);
}
.pred-ts-actual.resolved { background: rgba(212,168,58,0.1); border-color: rgba(212,168,58,0.45); border-style: solid; }
.pred-ts-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--gold); }
.pred-ts-value { font-weight: 700; font-size: 15px; }
.pred-ts-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.pred-ts-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border-soft);
}
.pred-ts-row.is-winner { background: rgba(212,168,58,0.12); border-color: rgba(212,168,58,0.5); }
.pred-ts-who { font-weight: 600; font-size: 13px; }
.pred-ts-pick { margin-left: auto; font-size: 13px; color: var(--text-soft); }
.pred-ts-pick em { color: var(--text-mute); }
.pred-ts-badge { font-size: 11px; font-weight: 700; color: var(--gold); }
.pred-ts-empty { color: var(--text-mute); font-size: 13px; padding: 6px 2px; }

/* ── Shared predictions ── */
.pred-shared { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pred-shared-card { padding: 0; overflow: hidden; animation: itemEnter .3s var(--ease) both; }
.pred-shared-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  background: linear-gradient(180deg, #fbfcfd 0%, #ffffff 100%); border-bottom: 1px solid var(--border-soft);
}
.pred-shared-name { font-weight: 700; font-size: 13.5px; }
.pred-shared-pts { margin-left: auto; font-weight: 800; font-size: 13px; color: var(--accent); }
.pred-shared-list { padding: 4px 0; }
.pred-shared-row { display: flex; align-items: center; gap: 10px; padding: 7px 16px; font-size: 12.5px; border-top: 1px solid var(--border-soft); }
.pred-shared-row:first-child { border-top: 0; }
.pred-shared-row .ps-teams { color: var(--text-soft); font-weight: 600; }
.pred-shared-row .ps-pred { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; }
.pred-shared-row .ps-status { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-mute); }

/* ── Results simulator (dev) ── */
.pred-sim { margin-bottom: 20px; padding: 0; border-style: solid; }
.pred-sim > summary {
  cursor: pointer; padding: 14px 18px; font-weight: 600; font-size: 13px; color: var(--text-soft);
  display: flex; align-items: center; gap: 10px; list-style: none;
}
.pred-sim > summary::-webkit-details-marker { display: none; }
.pred-sim-body { padding: 4px 18px 18px; border-top: 1px solid var(--border-soft); }
.pred-sim-actions { display: flex; gap: 10px; margin: 14px 0; flex-wrap: wrap; }
.pred-sim-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.pred-sim-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--surface-2); border-radius: var(--radius-sm); }
.pred-sim-row .ps-teams { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pred-input.sim { width: 40px; height: 34px; font-size: 14px; }
.pred-sim-ts { margin-top: 16px; max-width: 360px; }

/* ── Modal ── */
.pred-modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(11,18,32,0.5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 20px;
  animation: viewEnter .2s var(--ease) both;
}
.pred-modal {
  background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(11,18,32,0.3); width: 100%; max-width: 420px; padding: 24px;
}
.pred-modal h3 { margin: 0 0 12px; font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }
.pred-modal-body p { margin: 0 0 10px; font-size: 13.5px; color: var(--text-soft); }
.pred-modal-note { color: var(--text-mute) !important; font-size: 12.5px !important; }
.pred-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.pred-modal-actions .btn-primary, .pred-modal-actions .btn-ghost { margin-top: 0; }

/* ── Toast ── */
.pred-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  z-index: 300; padding: 11px 20px; border-radius: 999px;
  background: var(--text); color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(11,18,32,0.28); opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.pred-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Participant bar buttons + "Show all" link ── */
.pred-pbar-btns { display: flex; gap: 8px; align-items: flex-end; }
.btn-ghost.sm { padding: 5px 10px; font-size: 11.5px; }
.pred-link {
  border: 0; background: transparent; color: var(--accent);
  font-family: inherit; font-weight: 700; font-size: 12.5px; cursor: pointer;
  padding: 4px 2px; border-radius: 6px; transition: color .15s var(--ease);
}
.pred-link:hover { color: #0f7a37; text-decoration: underline; }

/* ── Overflow cards behind "Show all" ── */
.pred-shared-card.is-overflow { display: none; }
.pred-shared.show-all .pred-shared-card.is-overflow { display: block; animation: itemEnter .25s var(--ease) both; }

/* ── Participants management modal ── */
.pred-modal-wide { max-width: 520px; }
.pred-modal-count {
  font-size: 12px; font-weight: 700; color: var(--text-mute);
  background: var(--surface-2); border-radius: 999px; padding: 2px 10px; margin-left: 6px;
}
.pred-plist { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; }
.pred-plist-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border-soft);
}
.pred-plist-row.is-active { border-color: rgba(22,163,74,0.4); background: var(--accent-soft); }
.pred-plist-name { font-weight: 600; font-size: 13.5px; }
.pred-plist-ts { margin-left: auto; font-size: 12px; color: var(--text-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.pred-plist-del {
  width: 26px; height: 26px; flex-shrink: 0;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-mute);
  border-radius: 7px; font-size: 16px; line-height: 1; cursor: pointer;
  transition: color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}
.pred-plist-del:hover { color: var(--live); border-color: rgba(239,68,68,0.4); background: var(--live-soft); }

@media (max-width: 880px) {
  .pred-register-form { grid-template-columns: 1fr; }
  .pred-pbar { flex-direction: column; align-items: stretch; }
  .pred-pbar-right { justify-content: space-between; }
  .pred-podium { max-width: none; }
}
@media (max-width: 560px) {
  .pred-podium { grid-template-columns: 1fr; align-items: stretch; }
  .podium-cell .podium-stand { display: none; }
  .pred-matchlist { grid-template-columns: 1fr; }
}

/* Admin results board (live) — flag knockouts that need a confirmed 90' score */
.adm-flag {
  margin: 8px 0;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.12);
  color: var(--warn);
  font-weight: 600;
  font-size: 13px;
}
.pred-sim-row.is-approx {
  outline: 1px solid rgba(245, 158, 11, 0.5);
  outline-offset: 1px;
}

/* Predictions: centered single-card states (sign in / join / not eligible) */
.pred-focus { max-width: 460px; margin: 7vh auto 0; display: grid; gap: 16px; }
.pred-focus .pred-register { margin: 0; }
.pred-countdown { text-align: center; font-size: 13px; color: var(--text-mute); }
.pred-countdown-num { font-size: 16px; font-weight: 800; color: var(--accent); }

/* Predictions: slim "how it works" bar above the board */
.pred-howto {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 9px 14px; margin-bottom: 14px;
}
.pred-howto-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-mute); }
.pred-howto-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12.5px; color: var(--text-soft); }
.pred-howto-facts strong { color: var(--text); font-weight: 700; }
.pred-howto-facts .dot { color: var(--border); }
.pred-howto > .pred-link { margin-left: auto; white-space: nowrap; }

/* ───────── Wall display (kiosk) — full-screen TV view ───────── */
body.kiosk-mode .sidebar,
body.kiosk-mode .topbar,
body.kiosk-mode .signature { display: none !important; }
body.kiosk-mode .app { grid-template-columns: 1fr; }
body.kiosk-mode .main { background: #0b1220; }
body.kiosk-mode .content { padding: 0; }

.kiosk { min-height: 100vh; background: #0b1220; color: #fff; padding: 26px 30px 30px; display: flex; flex-direction: column; }
.kiosk-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.kiosk-title { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; }
.kiosk-sub { font-size: 14px; color: #8b93a7; margin-top: 4px; }
.kiosk-exit { margin-left: auto; align-self: flex-start; background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; padding: 9px 16px; font-size: 13px; font-weight: 600; }
.kiosk-exit:hover { background: rgba(255,255,255,.14); }
.kiosk-grid { flex: 1; display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 18px; min-height: 0; }
.kiosk-panel { background: #131b30; border: 1px solid #1c243a; border-radius: 16px; padding: 18px 22px; display: flex; flex-direction: column; min-height: 0; }
.kiosk-panel h2 { font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: #9aa3b8; margin: 0 0 12px; font-weight: 700; }
.kiosk-lb-list, .kiosk-matches { overflow: auto; display: flex; flex-direction: column; }
.kiosk-lb-row { display: flex; align-items: center; gap: 16px; padding: 13px 4px; border-bottom: 1px solid #1c243a; }
.kiosk-lb-row:last-child { border-bottom: 0; }
.kiosk-rank { width: 36px; text-align: center; font-size: 22px; font-weight: 800; color: #6b7488; font-variant-numeric: tabular-nums; }
.kiosk-rank.rank-1 { color: #d4a83a; }
.kiosk-rank.rank-2 { color: #c0c6d4; }
.kiosk-rank.rank-3 { color: #c08a4a; }
.kiosk-lb-name { flex: 1; font-size: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kiosk-lb-pts { font-size: 24px; font-weight: 800; color: #16a34a; }
.kiosk-lb-pts small { font-size: 12px; color: #6b7488; font-weight: 600; margin-left: 3px; }
.kiosk-match { display: flex; align-items: center; gap: 8px; padding: 11px 4px; border-bottom: 1px solid #1c243a; font-size: 16px; }
.kiosk-match:last-child { border-bottom: 0; }
.kiosk-team { display: inline-flex; align-items: center; gap: 7px; flex: 1; min-width: 0; }
.kiosk-team.away { justify-content: flex-end; text-align: right; }
.kiosk-team span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kiosk-team img { width: 22px; border-radius: 3px; }
.kiosk-vs { color: #6b7488; font-size: 12px; }
.kiosk-score { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 56px; text-align: right; }
.kiosk-live { color: #ef4444; font-weight: 800; min-width: 56px; text-align: right; }
.kiosk-when { color: #8b93a7; font-size: 13px; min-width: 100px; text-align: right; }
.kiosk-empty { color: #6b7488; font-size: 15px; padding: 14px 4px; }
@media (max-width: 1100px) { .kiosk-grid { grid-template-columns: 1fr; } }

/* Predictions: per-day grouping inside each stage */
.pred-daygroup { margin-bottom: 14px; }
.pred-day-head {
  display: flex; align-items: baseline; gap: 10px;
  padding: 6px 2px; margin-top: 6px;
  border-bottom: 1px solid var(--border);
}
.pred-day-date { font-size: 13px; font-weight: 700; color: var(--text); }
.pred-day-count { font-size: 11.5px; color: var(--text-mute); }
.pred-day-head.is-past .pred-day-date { color: var(--text-mute); }

/* Predictions: autosave bar + review modal */
.pred-saved { color: #0f7a37; font-weight: 600; margin-right: 10px; }
.pred-submitbar-counts { color: var(--text-mute); font-size: 12.5px; }
.pred-review-list { display: grid; gap: 4px; max-height: 60vh; overflow: auto; }
.pred-review-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: var(--radius-sm); background: var(--surface-2);
}
.pred-review-row .ps-teams { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pred-review-pick { font-weight: 700; font-variant-numeric: tabular-nums; }
.pred-review-pick.empty { color: var(--text-mute); font-weight: 400; }
.pred-review-when { font-size: 11.5px; color: var(--text-mute); min-width: 88px; text-align: right; }
.pred-review-row.is-locked { opacity: 0.7; }

/* Topbar user / login menu */
.topbar-user { margin-left: 12px; position: relative; }
.user-signin {
  display: inline-flex; align-items: center; padding: 7px 14px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); font-size: 13px; font-weight: 600; text-decoration: none;
}
.user-signin:hover { border-color: var(--accent, #16a34a); }
.user-menu { position: relative; }
.user-menu > summary { list-style: none; cursor: pointer; }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border);
}
.user-chip:hover { border-color: var(--accent, #16a34a); }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent, #16a34a); color: #fff; font-size: 11px; font-weight: 700;
}
.user-name { font-size: 13px; font-weight: 600; color: var(--text); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 180px; z-index: 50;
  background: var(--surface, #fff); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: 0 8px 28px rgba(0,0,0,.16); padding: 6px; display: grid; gap: 2px;
}
.user-dd-item {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none;
  border-radius: 8px; font-size: 13px; color: var(--text); cursor: pointer; text-decoration: none;
}
.user-dd-item:hover { background: var(--surface-2); }

/* Predictions: correct/incorrect result coloring (subtle backdrops) */
.pred-match.res-exact   { background: rgba(22,163,74,0.09); border-color: rgba(22,163,74,0.40); }
.pred-match.res-correct { background: rgba(22,163,74,0.05); border-color: rgba(22,163,74,0.22); }
.pred-match.res-wrong   { background: rgba(239,68,68,0.05); border-color: rgba(239,68,68,0.22); }
.pred-shared-row.res-exact   { background: rgba(22,163,74,0.11); }
.pred-shared-row.res-correct { background: rgba(22,163,74,0.05); }
.pred-shared-row.res-wrong   { background: rgba(239,68,68,0.06); }
.pred-review-row.res-exact   { background: rgba(22,163,74,0.10); }
.pred-review-row.res-correct { background: rgba(22,163,74,0.05); }
.pred-review-row.res-wrong   { background: rgba(239,68,68,0.06); }

/* Golden Boot bonus pill on the leaderboard */
.ts-bonus-pill {
  margin-left: 8px; font-size: 11px; font-weight: 700;
  color: var(--gold); background: rgba(212,168,58,0.14);
  border-radius: 999px; padding: 1px 7px; white-space: nowrap;
}
