/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* iOS dark mode system backgrounds */
  --bg-primary:    #000000;
  --bg-secondary:  #1c1c1e;
  --bg-card:       #1c1c1e;
  --bg-card-hover: #2c2c2e;
  --bg-elevated:   #2c2c2e;
  --border:        rgba(84, 84, 88, 0.55);
  --border-subtle: rgba(84, 84, 88, 0.28);

  /* iOS system colors */
  --red:           #ff3b30;
  --red-dim:       #c0302a;
  --red-glow:      rgba(255, 59, 48, 0.15);
  --red-soft:      rgba(255, 59, 48, 0.12);

  /* iOS label hierarchy */
  --text-primary:   #ffffff;
  --text-secondary: rgba(235, 235, 245, 0.6);
  --text-muted:     rgba(235, 235, 245, 0.3);

  /* iOS semantic colors */
  --green:         #30d158;
  --yellow:        #ff9500;
  --blue:          #0a84ff;
  --orange:        #D05020;
  --orange-soft:   rgba(208, 80, 32, 0.12);
  --orange-glow:   rgba(208, 80, 32, 0.15);

  /* iOS corner radii */
  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     16px;
  --radius-xl:     22px;

  /* SF Pro — native system font on iOS/macOS */
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
  --transition: 0.18s ease;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { border: none; background: none; cursor: pointer; font-family: var(--font); }
img { display: block; }

/* ─── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ─── Typography ────────────────────────────────────────────── */
.text-xs   { font-size: 0.7rem; }
.text-sm   { font-size: 0.8rem; }
.text-base { font-size: 0.9rem; }
.text-lg   { font-size: 1.05rem; }
.text-xl   { font-size: 1.2rem; }
.text-2xl  { font-size: 1.5rem; }

.font-bold   { font-weight: 700; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }

.text-red       { color: var(--red); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-green     { color: var(--green); }
.text-yellow    { color: var(--yellow); }

/* ─── Layout ────────────────────────────────────────────────── */
.app-wrapper {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.main-content {
  flex: 1;
  padding: 0 0 155px;
}

/* ─── Live Match Widget ──────────────────────────────────────── */
.live-widget {
  position: fixed;
  bottom: calc(65px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  padding: 0 12px;
  z-index: 490;
  pointer-events: auto;
}

.lw-inner {
  display: block;
  background: rgba(22, 22, 24, 0.97);
  border: 1px solid rgba(255, 140, 0, 0.28);
  border-radius: 14px;
  padding: 10px 14px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,140,0,0.08);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}

.lw-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.lw-live-dot {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #FF6B35;
  flex-shrink: 0;
  position: relative;
}

.lw-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FF6B35;
  display: inline-block;
  flex-shrink: 0;
  animation: lw-pulse-ring 1.6s ease-out infinite;
}

@keyframes lw-pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(255,107,53,0.7); }
  70%  { box-shadow: 0 0 0 5px rgba(255,107,53,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,107,53,0); }
}

.lw-teams {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  color: rgba(235,235,245,0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

.lw-minute {
  font-size: 11px;
  font-weight: 600;
  color: rgba(235,235,245,0.45);
  flex-shrink: 0;
}

.lw-bottom-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lw-score-block {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.lw-score-home,
.lw-score-away {
  font-size: 18px;
  font-weight: 800;
  color: rgba(235,235,245,0.95);
  line-height: 1;
  letter-spacing: -0.5px;
}

.lw-score-sep {
  font-size: 13px;
  color: rgba(235,235,245,0.3);
  font-weight: 400;
}

.lw-divider {
  width: 1px;
  height: 22px;
  background: rgba(84,84,88,0.35);
  flex-shrink: 0;
}

.lw-stat-block {
  display: flex;
  align-items: center;
  gap: 4px;
  color: rgba(235,235,245,0.45);
  flex: 1;
  min-width: 0;
}

.lw-stat-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: rgba(235,235,245,0.35);
  text-transform: uppercase;
}

.lw-stat-val {
  font-size: 15px;
  font-weight: 800;
  color: rgba(235,235,245,0.9);
  letter-spacing: -0.3px;
  line-height: 1;
}

.lw-stat-split {
  font-size: 10px;
  font-weight: 500;
  color: rgba(235,235,245,0.35);
}

.lw-card-icon {
  font-size: 11px;
  color: #F5C518;
}

/* ─── Navbar ────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(84, 84, 88, 0.3);
  padding: 0 16px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  cursor: default;
}

.navbar-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.navbar-brand-name {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.4px;
}

.navbar-brand-sub {
  font-size: 9px;
  font-weight: 500;
  color: #F97316;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-top: 2px;
}

@keyframes flaskBubble {
  0%   { transform: translateY(0);      opacity: 0.85; }
  100% { transform: translateY(-10px);  opacity: 0; }
}
.navbar-logo .flask-b {
  animation: flaskBubble 2s ease-in infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.navbar-logo .flask-b2 { animation-delay: 0.7s; }
.navbar-logo .flask-b3 { animation-delay: 1.4s; }

.navbar-actions { display: flex; gap: 6px; align-items: center; }

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(58, 58, 60, 0.90);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.icon-btn:hover { background: rgba(72, 72, 74, 1); color: #fff; }

.notif-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--bg-primary);
}

/* ─── Tab Bar ───────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  padding: 12px 16px 0;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }

.tab {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.tab.active {
  background: var(--red-soft);
  color: var(--red);
  border-color: rgba(230, 57, 70, 0.25);
}

.tab:hover:not(.active) {
  color: var(--text-secondary);
  background: var(--bg-card);
}

/* ─── Section ───────────────────────────────────────────────── */
.section { padding: 20px 16px 0; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: -0.1px;
  color: var(--text-secondary);
}

.section-title svg { color: var(--red); }

.section-link {
  font-size: 0.75rem;
  color: var(--red);
  font-weight: 600;
  opacity: 0.85;
  transition: opacity var(--transition);
}
.section-link:hover { opacity: 1; }

/* ─── Live Badge ────────────────────────────────────────────── */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.live-badge--ht {
  background: var(--yellow, #f4a01c);
  color: #000;
}

.live-badge--ft {
  background: var(--text-muted, #666);
  color: #fff;
}

.live-badge--paused {
  background: var(--text-muted, #888);
  color: #fff;
}

.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  animation: pulse-dot 1.2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

/* ─── Match Card ────────────────────────────────────────────── */
.match-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  animation: slideUp 0.3s ease both;
}

.match-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border);
  transform: translateY(-1px);
}

.match-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.match-league {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.match-league-flag {
  font-size: 13px;
  line-height: 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.match-body {
  display: flex;
  align-items: center;
  gap: 8px;
}

.match-team {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.team-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  overflow: hidden;
}

.team-badge img { width: 100%; height: 100%; object-fit: contain; }

.team-name {
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-primary);
  max-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 70px;
}

.match-score {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* Score stays white in all states — red is reserved for danger/alerts only */
.match-score.live { color: var(--text-primary); }

.match-time {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--red);
  background: var(--red-soft);
  padding: 2px 8px;
  border-radius: 4px;
  min-width: 3.5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.match-time.upcoming {
  color: var(--text-muted);
  background: transparent;
  font-weight: 500;
}

.match-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.match-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.match-stat svg { flex-shrink: 0; }

.foul-count {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--yellow);
  background: rgba(244, 160, 28, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
}

/* ─── Horizontal Scroll Row ─────────────────────────────────── */
.scroll-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.scroll-row::-webkit-scrollbar { display: none; }

/* ─── Player Card ───────────────────────────────────────────── */
.player-card {
  flex-shrink: 0;
  width: 120px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  animation: slideUp 0.3s ease both;
}

.player-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(230, 57, 70, 0.3);
}

.player-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--border) 100%);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-secondary);
  position: relative;
}

.player-avatar.at-risk { border-color: var(--yellow); }
.player-avatar.suspended { border-color: var(--red); }

.player-avatar-status {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-avatar-status.yellow { background: var(--yellow); }
.player-avatar-status.red    { background: var(--red); }

.player-name {
  font-size: 0.73rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
  line-height: 1.2;
}

.player-team {
  font-size: 0.66rem;
  color: var(--text-muted);
  text-align: center;
}

.player-fouls {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  font-weight: 700;
}

.foul-pip {
  width: 10px;
  height: 14px;
  border-radius: 2px;
}

.foul-pip.filled.yellow { background: var(--yellow); }
.foul-pip.filled.red    { background: var(--red); }
.foul-pip.empty         { background: var(--border); }

/* ─── Foul Alert Card ───────────────────────────────────────── */
.alert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  animation: slideUp 0.3s ease both;
  position: relative;
  overflow: hidden;
}

.alert-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
}

.alert-card.red-card::before   { background: var(--red); }
.alert-card.yellow-card::before { background: var(--yellow); }

.alert-card:hover { background: var(--bg-card-hover); }

.alert-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.alert-icon.red-card    { background: var(--red-soft); }
.alert-icon.yellow-card { background: rgba(244, 160, 28, 0.1); }

.alert-body { flex: 1; min-width: 0; }

.alert-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alert-subtitle {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.alert-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.alert-time {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
}

.alert-min {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--red);
  background: var(--red-soft);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ─── Stats Bar ─────────────────────────────────────────────── */
.stats-banner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 16px;
}

.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  text-align: center;
  animation: slideUp 0.3s ease both;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--red);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.66rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

/* ─── Clickable stat cards ──────────────────────────────────── */
.stat-item--risk,
.stat-item--alerts {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}

.stat-item--risk:active,
.stat-item--alerts:active {
  transform: scale(0.95);
}

/* HIGH RISK — default subtle state */
.stat-item--risk {
  border-color: rgba(230, 57, 70, 0.18);
}
.stat-item--risk:hover {
  background: rgba(230, 57, 70, 0.04);
  border-color: rgba(230, 57, 70, 0.35);
}

/* HIGH RISK — active state (count > 0) */
.stat-item--risk.has-risk {
  border-color: rgba(208, 80, 32, 0.40);
  background: rgba(208, 80, 32, 0.05);
  animation: slideUp 0.3s ease both, riskGlow 2.8s ease-in-out infinite;
}
.stat-item--risk.has-risk .stat-value { color: var(--orange); }

@keyframes riskGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(208,80,32,0); }
  50%       { box-shadow: 0 0 0 4px rgba(208,80,32,0.12); }
}

/* Pulse dot shown when has-risk */
.stat-risk-pulse {
  display: none;
  position: absolute;
  top: 7px; right: 7px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--orange);
  animation: riskDotPulse 1.6s ease-in-out infinite;
}

@keyframes riskDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(0.6); }
}

/* ALERTS card */
.stat-item--alerts:hover {
  background: var(--bg-elevated);
  border-color: var(--border);
}

/* ─── Bottom Nav — iOS tab bar ──────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: rgba(28, 28, 30, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(84, 84, 88, 0.3);
  display: flex;
  padding: 8px 0 env(safe-area-inset-bottom, 16px);
  z-index: 500;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 2px 0;
  color: rgba(235, 235, 245, 0.4);
  transition: color 0.15s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-item.active { color: var(--red); }
.nav-item:hover:not(.active) { color: rgba(235, 235, 245, 0.65); }

.nav-icon { font-size: 1.2rem; line-height: 1; }

.nav-icon--badge {
  position: relative;
  display: inline-flex;
}

.nav-badge-dot {
  position: absolute;
  top: -1px;
  right: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  border: 1.5px solid rgba(28, 28, 30, 0.92);
  animation: badgePop 0.25s cubic-bezier(0.34,1.56,0.64,1) both,
             badgePulse 2.2s ease-in-out 0.3s infinite;
}

@keyframes badgePop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.nav-live-dot {
  position: absolute;
  top: -1px;
  right: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e53e3e;
  border: 1.5px solid rgba(28, 28, 30, 0.92);
  animation: liveDotPulse 1.6s ease-in-out infinite;
}

@keyframes liveDotPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .6; transform: scale(1.25); }
}

.live-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 10px 2px 6px;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,59,48,0); }
  50%       { box-shadow: 0 0 0 3px rgba(255,59,48,0.22); }
}

.nav-label {
  font-size: 10px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

/* ─── Empty State ───────────────────────────────────────────── */
.empty-state {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ─── Skeleton Loader ───────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    var(--bg-card) 25%,
    var(--bg-elevated) 50%,
    var(--bg-card) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* ─── Animations ────────────────────────────────────────────── */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.match-card:nth-child(1) { animation-delay: 0.04s; }
.match-card:nth-child(2) { animation-delay: 0.08s; }
.match-card:nth-child(3) { animation-delay: 0.12s; }
.match-card:nth-child(4) { animation-delay: 0.16s; }

.alert-card:nth-child(1) { animation-delay: 0.04s; }
.alert-card:nth-child(2) { animation-delay: 0.08s; }
.alert-card:nth-child(3) { animation-delay: 0.12s; }

.player-card:nth-child(1) { animation-delay: 0.03s; }
.player-card:nth-child(2) { animation-delay: 0.06s; }
.player-card:nth-child(3) { animation-delay: 0.09s; }
.player-card:nth-child(4) { animation-delay: 0.12s; }
.player-card:nth-child(5) { animation-delay: 0.15s; }

.stat-item:nth-child(1) { animation-delay: 0.02s; }
.stat-item:nth-child(2) { animation-delay: 0.05s; }
.stat-item:nth-child(3) { animation-delay: 0.08s; }

/* ─── Follow Button (teams, referees, competitions) ─────────── */
.follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.follow-btn:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(255,59,48,.07);
}
.follow-btn.following {
  border-color: rgba(48,209,88,.4);
  color: var(--green);
  background: rgba(48,209,88,.08);
}
.follow-btn.following:hover {
  border-color: rgba(48,209,88,.7);
  background: rgba(48,209,88,.15);
}
@keyframes follow-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.follow-pop { animation: follow-pop 0.32s ease; }

/* ─── Track Button ──────────────────────────────────────────── */
.track-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.track-btn:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-soft);
}
.track-btn.tracking {
  border-color: rgba(45, 198, 83, 0.4);
  color: var(--green);
  background: rgba(45, 198, 83, 0.08);
}
.track-btn.tracking:hover {
  border-color: rgba(45, 198, 83, 0.7);
  background: rgba(45, 198, 83, 0.15);
}
.track-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Back button — shared across all pages ─────────────────── */
.back-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(58, 58, 60, 0.88);
  backdrop-filter: blur(10px) saturate(1.4);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  border: 1px solid rgba(255,255,255,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.back-btn:hover  { background: rgba(80, 80, 82, 0.96); }
.back-btn:active { transform: scale(0.92); }

/* Track button inside player cards (homepage) */
.track-btn-card {
  margin-top: 6px;
  width: 100%;
  justify-content: center;
}

/* Track button inside player rows (match detail) — icon-only compact */
.track-btn-row {
  width: 26px;
  height: 26px;
  min-width: 26px;
  padding: 0;
  border-radius: 50%;
  flex-shrink: 0;
  justify-content: center;
  font-size: 0;        /* hide JS-set text */
  margin-left: 0;
}
.track-btn-row::before {
  content: '+';
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-muted);
  line-height: 1;
}
.track-btn-row.tracking::before {
  content: '✓';
  color: var(--green);
}
.track-btn-row:hover::before {
  color: var(--red);
}

/* ─── Intensity Badges (on match cards) ─────────────────────── */
.match-card-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.intensity-badge {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}

.intensity-badge--physical {
  color: var(--blue);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.intensity-badge--heated {
  color: var(--yellow);
  background: rgba(244, 160, 28, 0.12);
  border: 1px solid rgba(244, 160, 28, 0.3);
}

.intensity-badge--explosive {
  color: var(--red);
  background: rgba(230, 57, 70, 0.12);
  border: 1px solid rgba(230, 57, 70, 0.3);
  animation: intensity-flicker 2.8s ease-in-out infinite;
}

@keyframes intensity-flicker {
  0%, 100% { opacity: 1;    }
  50%       { opacity: 0.7; }
}

/* ─── Match Card Pin button ──────────────────────────────────── */
.match-card-pin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 6px;
  color: var(--text-muted);
  transition: color .15s, background .15s;
  flex-shrink: 0;
  padding: 0;
}
.match-card-pin-btn:hover { background: var(--bg-tertiary); color: var(--text-secondary); }
.match-card-pin-btn:active { background: var(--bg-tertiary); }
.match-card-pin-btn--pinned { color: var(--orange, #f97316); }
.match-card-pin-btn--pinned:hover { color: var(--orange, #f97316); }

.match-card--pinned {
  border-left: 2px solid var(--orange, #f97316);
}

/* ─── Hero Card Pin button ───────────────────────────────────── */
.hero-pin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 7px;
  color: var(--text-muted);
  transition: color .15s, background .15s;
  flex-shrink: 0;
  padding: 0;
}
.hero-pin-btn:hover { background: rgba(255,255,255,0.07); color: var(--text-secondary); }
.hero-pin-btn:active { background: rgba(255,255,255,0.10); }
.hero-pin-btn--pinned { color: var(--orange, #f97316); }
.hero-pin-btn--pinned:hover { color: var(--orange, #f97316); }

/* ─── Match Card Highlight (High Risk section) ───────────────── */
.match-card--highlight {
  border-left: 3px solid var(--card-accent, var(--red));
  background: linear-gradient(
    135deg,
    rgba(230, 57, 70, 0.04) 0%,
    var(--bg-card) 55%
  );
}

.match-card--highlight:hover {
  border-left-color: var(--card-accent, var(--red));
}

/* ─── Match Card Insight line ────────────────────────────────── */
.match-card-insight {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px 10px;
  font-size: 0.67rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.4;
  border-top: 1px solid var(--border-subtle);
}

.match-card-insight-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ─── High Risk Section Header ───────────────────────────────── */
.section--high-risk .section-title {
  color: var(--red);
}

.section-title--danger {
  color: var(--red) !important;
}

.section-title--danger svg {
  stroke: var(--red);
}

/* ─── Provider Status Pill ──────────────────────────────────── */
.provider-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 16px 12px;
  min-height: 28px;
  transition: opacity 0.3s ease;
}

.provider-status:empty { min-height: 0; padding-bottom: 0; }

.provider-status--live   { color: var(--green); }
.provider-status--mock   { color: var(--yellow); }
.provider-status--replay { color: #FF6B00; }

/* ── Ask AI Button ───────────────────────────────────────────── */
#ai-analysis-section {
  padding: 0 16px;
  margin-bottom: 4px;
}

/* ── Context Signals card ────────────────────────────────────── */
.context-signals-card {
  background: #0c0c0c;
  border: 1px solid #1e1e1e;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.context-signals-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 10px;
}
.context-signals-header svg { flex-shrink: 0; }
.context-signal-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px 0;
  border-bottom: 1px solid #161616;
}
.context-signal-item:last-child { border-bottom: none; padding-bottom: 0; }
.context-signal-item:first-child { padding-top: 0; }
.context-signal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.context-signal-dot--confirmed { background: #e67e22; }
.context-signal-dot--trusted   { background: #e67e22; opacity: 0.7; }
.context-signal-dot--developing { background: #7f8c8d; }
.context-signal-body { flex: 1; min-width: 0; }
.context-signal-tag {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 2px;
}
.context-signal-text {
  font-size: 0.8rem;
  color: #ccc;
  line-height: 1.45;
}
.context-signal-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.context-signal-trust {
  font-size: 0.63rem;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.trust--official  { background: rgba(46,204,113,0.12); color: #2ecc71; }
.trust--trusted   { background: rgba(230,126,34,0.12); color: #e67e22; }
.trust--insider   { background: rgba(241,196,15,0.12); color: #f1c40f; }
.trust--gossip    { background: rgba(150,150,150,0.08); color: #666; }
.context-signal-conf {
  font-size: 0.63rem;
  color: #555;
  text-transform: capitalize;
}

.ask-ai-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #D05020 0%, #FF6B35 100%);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: -0.1px;
  border: none;
  cursor: pointer;
  transition: opacity 0.18s ease, transform 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  margin-top: 12px;
  text-align: left;
}
.ask-ai-btn-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.ask-ai-btn-hint {
  font-size: 0.69rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.82;
}

.ask-ai-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.ask-ai-btn:active { opacity: 0.8; transform: translateY(0); }

.ask-ai-btn:disabled,
.ask-ai-btn--loading {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ── AI Result Card ──────────────────────────────────────────── */
.ai-card {
  background: var(--bg-card);
  border: 1px solid rgba(208, 80, 32, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-top: 10px;
}

.ai-card--error {
  border-color: rgba(255, 59, 48, 0.25);
}

.ai-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(208, 80, 32, 0.15);
  color: #FF6B35;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}

.ai-badge--error {
  background: rgba(255, 59, 48, 0.12);
  color: var(--red);
}

.ai-card-minute {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.ai-card-text {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.ai-card-footer {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.ai-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ai-card-model {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(208, 80, 32, 0.7);
  text-transform: uppercase;
}

.ai-card-ts {
  font-size: 0.62rem;
  color: var(--text-muted);
  white-space: nowrap;
  text-align: right;
  flex-shrink: 0;
}

/* ── Structured AI Prediction Card ──────────────────────────── */
.ai-card--structured {
  padding: 14px 16px 12px;
}

.ai-conf-pill {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.ai-headline {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px;
  line-height: 1.3;
}

.ai-narrative {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 10px;
}

.ai-signals {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-signal-item {
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: 4px 8px;
  background: rgba(255,255,255,0.04);
  border-left: 2px solid rgba(208,80,32,0.5);
  border-radius: 0 4px 4px 0;
  line-height: 1.4;
}

/* Expectations grid */
.ai-exp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.ai-exp-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: rgba(255,255,255,0.03);
  border-radius: 7px;
  padding: 7px 9px;
  border: 1px solid rgba(255,255,255,0.05);
}

.ai-exp-cell--wide {
  grid-column: span 2;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.ai-exp-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ai-exp {
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 4px;
  padding: 2px 7px;
  display: inline-block;
}
.ai-exp--high  { color: #C44747; background: rgba(196,71,71,0.12); }
.ai-exp--elev  { color: #E05A28; background: rgba(224,90,40,0.12); }
.ai-exp--mod   { color: #F4A01C; background: rgba(244,160,28,0.12); }
.ai-exp--low   { color: var(--text-muted); background: rgba(255,255,255,0.05); }
.ai-exp--unknown { color: var(--text-muted); }

/* Sub-blocks (player risk, referee impact) */
.ai-sub-block {
  margin-bottom: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.03);
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.05);
}

.ai-sub-label {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 3px;
}

.ai-sub-text {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-secondary);
  margin: 0;
}

/* Confidence note — hidden; detail lives on /ai-transparency.html */
.ai-conf-note { display: none; }

/* How AI works link in card footer */
.ai-how-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.64rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s ease;
}
.ai-how-link:hover { color: var(--text-secondary); }
.ai-how-link svg { opacity: 0.7; }

/* ── Outcome tendency bar ────────────────────────────────────── */
.ai-section-label {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}

.ai-outcome {
  margin-bottom: 12px;
}

.ai-outcome--empty {
  margin-bottom: 10px;
}

.ai-outcome-bar {
  display: flex;
  height: 16px;
  border-radius: 5px;
  overflow: hidden;
  gap: 2px;
}

.ai-outcome-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  transition: width 0.3s ease;
}

.ai-outcome-seg--home { background: rgba(180,85,45,0.38); }
.ai-outcome-seg--draw { background: rgba(255,255,255,0.09); }
.ai-outcome-seg--away { background: rgba(80,120,195,0.32); }

.ai-outcome-pct {
  font-size: 0.6rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
}

.ai-outcome-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}

.ai-outcome-labels span {
  font-size: 0.6rem;
  color: var(--text-muted);
}

.ai-outcome-note {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 6px 0 0;
}

/* ── Stat rows (goals / fouls / yellows) ─────────────────────── */
.ai-stats-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}

.ai-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: rgba(255,255,255,0.03);
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.05);
  min-height: 38px;
}

.ai-stat-row--rc {
  margin-top: 4px;
  background: rgba(255,255,255,0.02);
}

.ai-stat-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ai-stat-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.ai-stat-source {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-align: right;
  max-width: 55%;
  line-height: 1.3;
}

.ai-stat-insufficient {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
}

.ai-stat-calibrating {
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ── WHY section wrapper ─────────────────────────────────────── */
.ai-why-section {
  margin-bottom: 12px;
}
.ai-why-section .ai-section-label {
  margin-bottom: 6px;
}

/* ── Red card pressure text ──────────────────────────────────── */
.ai-rc-text {
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: right;
  flex-shrink: 0;
  max-width: 65%;
  line-height: 1.3;
}
.ai-rc-text--high     { color: #c44747; }
.ai-rc-text--elevated { color: #e05a28; }
.ai-rc-text--moderate { color: #f4a01c; }
.ai-rc-text--low      { color: var(--text-muted); }

/* ── Availability summary line (collapsed generic items) ──────── */
.ai-avail-summary {
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 4px 2px;
  list-style: none;
  font-style: italic;
}

/* ── AI Loading Skeleton ─────────────────────────────────────── */
.ai-skeleton {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0;
}

.ai-skeleton-bar {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--bg-elevated) 25%, rgba(255,255,255,0.06) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: ai-shimmer 1.4s ease-in-out infinite;
}

.ai-skeleton-bar--full  { width: 100%; }
.ai-skeleton-bar--wide  { width: 85%; }
.ai-skeleton-bar--mid   { width: 65%; }

@keyframes ai-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── AI Analysis History ─────────────────────────────────────── */
.ai-history {
  padding: 0 16px;
  margin-top: 4px;
}

.ai-history-toggle {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  padding: 5px 10px;
  width: 100%;
  text-align: left;
  transition: border-color 0.15s, color 0.15s;
}
.ai-history-toggle:hover {
  border-color: rgba(255,255,255,0.2);
  color: var(--text-secondary);
}

.ai-history-list {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-history-entry {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 10px 12px;
}

.ai-history-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.ai-history-minute {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}

.ai-history-ts {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.ai-history-text {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

.provider-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.provider-status--live .provider-dot {
  box-shadow: 0 0 0 3px rgba(45, 198, 83, 0.2);
  animation: provider-pulse 2.4s ease-in-out infinite;
}

@keyframes provider-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ─── Connection Status Indicator ──────────────────────────── */
.conn-status {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 2px 0 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.025em;
  transition: opacity 0.6s ease;
}

.conn-status.is-visible {
  display: flex;
}

/* Dot */
.conn-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background-color 0.7s ease, box-shadow 0.7s ease;
}

/* Label */
.conn-label {
  transition: opacity 0.5s ease, color 0.6s ease;
}

/* ── State: connecting ─────────────────────────────────────── */
.conn-status[data-state="connecting"] .conn-dot {
  background: #c94c4c;
  animation: conn-breathe 2.2s ease-in-out infinite;
}
.conn-status[data-state="connecting"] .conn-label {
  color: rgba(255, 255, 255, 0.38);
}

@keyframes conn-breathe {
  0%, 100% { opacity: 0.65; transform: scale(1);    box-shadow: 0 0 0 0 rgba(201, 76, 76, 0); }
  50%       { opacity: 1;    transform: scale(1.18); box-shadow: 0 0 5px 2px rgba(201, 76, 76, 0.18); }
}

/* ── State: connected ──────────────────────────────────────── */
.conn-status[data-state="connected"] .conn-dot {
  background: #34d399;
  box-shadow: 0 0 5px rgba(52, 211, 153, 0.3);
  animation: none;
  opacity: 1;
  transform: scale(1);
}
.conn-status[data-state="connected"] .conn-label {
  color: rgba(255, 255, 255, 0.48);
}

/* ── State: reconnecting ───────────────────────────────────── */
.conn-status[data-state="reconnecting"] .conn-dot {
  background: #d97706;
  animation: conn-breathe-slow 3s ease-in-out infinite;
}
.conn-status[data-state="reconnecting"] .conn-label {
  color: rgba(255, 255, 255, 0.35);
}

@keyframes conn-breathe-slow {
  0%, 100% { opacity: 0.55; }
  50%       { opacity: 1; }
}

/* ─── Live Matches Empty State ──────────────────────────────── */
.matches-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 44px;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.matches-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.matches-empty-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.matches-empty-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.55;
}

/* ─── Zero-state stat card modifier ─────────────────────────── */
.stat-zero .stat-value {
  color: var(--text-secondary);
  font-size: 1.35rem;
}

.stat-zero .stat-label {
  color: var(--text-muted);
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (min-width: 480px) {
  .app-wrapper { border-left: 1px solid var(--border-subtle); border-right: 1px solid var(--border-subtle); }
}

@media (max-width: 360px) {
  .match-score  { font-size: 1.25rem; }
  .player-card  { width: 108px; }
}

/* ═══════════════════════════════════════════════════════════════
   COMMAND CENTER — HERO MATCH
═══════════════════════════════════════════════════════════════ */
.section-hero { padding: 16px 16px 0; }

.hero-match-wrapper { min-height: 192px; }

/* Skeleton shown before first data arrives */
.hero-skeleton {
  height: 192px;
  border-radius: 18px;
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  border: 1px solid var(--border-subtle);
}

/* Base hero card */
.hero-match {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 18px 0;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
  animation: slideUp 0.4s ease both;
}

/* Live state — breathing border color driven by --glow-r/g/b (set by JS risk gradient) */
.hero-match--live {
  border-color: rgba(
    var(--glow-r, 160), var(--glow-g, 32), var(--glow-b, 24),
    calc(0.14 + var(--glow, 0) * 0.22)
  );
  animation: slideUp 0.4s ease both, heroGlow 5s ease-in-out 0.8s infinite;
}

@keyframes heroGlow {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(var(--glow-r,160),var(--glow-g,32),var(--glow-b,24),calc(0.04 + var(--glow,0)*0.05)),
                0 4px 20px rgba(var(--glow-r,160),var(--glow-g,32),var(--glow-b,24),calc(0.02 + var(--glow,0)*0.04));
  }
  50% {
    box-shadow: 0 0 0 1px rgba(var(--glow-r,160),var(--glow-g,32),var(--glow-b,24),calc(0.08 + var(--glow,0)*0.09)),
                0 6px 28px rgba(var(--glow-r,160),var(--glow-g,32),var(--glow-b,24),calc(0.03 + var(--glow,0)*0.06));
  }
}

.hero-match--pre {
  border-color: rgba(244, 160, 28, 0.18);
}

.hero-match--ft {
  border-color: var(--border-subtle);
  opacity: 0.85;
}

/* Top row: league + status badge */
.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.hero-league {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: none;
  letter-spacing: 0;
}

.hero-league-flag {
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.hero-status {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 3px 9px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
  text-transform: uppercase;
}

.hero-status--live { background: var(--red); color: #fff; }
.hero-status--ht   {
  background: rgba(255,255,255,0.07);
  color: var(--text-secondary);
  border: 1px solid rgba(255,255,255,0.12);
}
.hero-status--pre  {
  background: rgba(244,160,28,0.1);
  color: var(--yellow);
  border: 1px solid rgba(244,160,28,0.22);
}
.hero-status--prelive {
  background: rgba(74,222,128,0.09);
  color: #4ade80;
  border: 1px solid rgba(74,222,128,0.25);
  display: flex;
  align-items: center;
  gap: 5px;
}
.hero-status--ft   {
  background: var(--bg-elevated);
  color: var(--text-muted);
}

.hero-live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  animation: pulse-dot 1.2s ease-in-out infinite;
}
.hero-prelive-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4ade80;
  animation: pulse-dot 2.4s ease-in-out infinite;
}

/* Teams + score row */
.hero-body {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.hero-team {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}

.hero-badge {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.66rem;
  font-weight: 900;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  overflow: hidden;
}
.hero-badge img { width: 100%; height: 100%; object-fit: contain; display: block; }

.hero-team-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.25;
  max-width: 80px;
}

.hero-center {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-width: 88px;
}

.hero-score {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hero-score-dash {
  color: var(--text-muted);
  font-weight: 300;
  font-size: 2rem;
}

.hero-minute {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--red);
  background: var(--red-soft);
  padding: 2px 10px;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

.hero-minute--ft {
  color: var(--text-muted);
  background: var(--bg-elevated);
}

.hero-minute--ht {
  color: var(--yellow);
  background: rgba(244, 160, 28, 0.12);
}

.hero-vs {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-muted);
  letter-spacing: -0.02em;
}

.hero-kickoff {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--yellow);
  background: rgba(244,160,28,0.08);
  padding: 3px 12px;
  border-radius: 5px;
}
.hero-countdown {
  font-size: 0.67rem;
  font-weight: 700;
  color: #4ade80;
  letter-spacing: 0.04em;
  margin-top: 4px;
  opacity: 0.9;
}
.hero-prelive-badge {
  font-size: 0.62rem;
  font-weight: 600;
  color: #4ade80;
  background: rgba(74,222,128,0.08);
  border: 1px solid rgba(74,222,128,0.22);
  border-radius: 100px;
  padding: 2px 8px;
  letter-spacing: 0.02em;
}

/* Match progress bar (live only) */
.hero-progress-wrap {
  height: 2px;
  background: var(--border-subtle);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 -18px;
}

.hero-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--red-dim), var(--red));
  border-radius: 2px;
  transition: width 1.2s ease;
  min-width: 4px;
}

/* Footer row */
.hero-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 14px;
}

.hero-footer--pre {
  justify-content: space-between;
  gap: 10px;
}

.hero-fstat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 44px;
}

.hero-fstat-n {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.hero-fstat-l {
  font-size: 10px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(249,115,22,0.08);
  border: 1px solid rgba(249,115,22,0.22);
  color: #F97316;
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.hero-cta:hover {
  background: rgba(249,115,22,0.13);
  border-color: rgba(249,115,22,0.36);
}

/* Empty / loading state */
.hero-empty {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: 18px;
  padding: 36px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  animation: fadeIn 0.4s ease both;
}

.hero-empty-icon { color: var(--text-muted); }

.hero-empty-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.hero-empty-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   COMPACT CONTEXT / ALERT BAR
═══════════════════════════════════════════════════════════════ */
.stats-compact {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 16px 4px;
}

.stats-compact-alerts {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
  cursor: pointer;
  padding: 4px 0;
}

.stats-compact-alerts:hover { color: var(--red); }

/* ═══════════════════════════════════════════════════════════════
   MATCH INTELLIGENCE STRIP
═══════════════════════════════════════════════════════════════ */
/* ── FouLab Intelligence Grid ─────────────────────────────── */
.fi-section { padding-top: 10px; margin-top: 2px; }
.fi-section-header { margin-bottom: 12px; }

.foulab-intel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s ease;
  animation: slideUp 0.35s ease both;
}

.fi-card:hover { border-color: rgba(255,255,255,0.14); }

/* Tiny status activity dot in the top-right corner */
.fi-card-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4FAF7B;
  opacity: 0.7;
}
.fi-card-dot--active {
  background: #F97316;
  animation: dotPulse 2.2s ease-in-out infinite;
}
.fi-card-dot--warn {
  background: #F4A01C;
  animation: dotPulse 2.8s ease-in-out infinite;
}
.fi-card-dot--muted {
  background: rgba(255,255,255,0.18);
  opacity: 0.5;
}
@keyframes dotPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.35); }
}

/* Subtle bottom scanning line on pre-match cards */
.fi-card-scan {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 1px;
  width: 30%;
  background: linear-gradient(90deg, transparent, rgba(249,115,22,0.4), transparent);
  animation: scanLine 3s ease-in-out infinite;
}
@keyframes scanLine {
  0% { left: -30%; }
  100% { left: 110%; }
}

.fi-card-header {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 2px;
}

.fi-card-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.fi-card-title {
  font-size: 0.57rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  line-height: 1.2;
}

.fi-card-value {
  font-size: 1.62rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  min-height: 1.62rem;
}

.fi-val--string {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.fi-card-status {
  font-size: 0.61rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}

.fi-bar {
  height: 2px;
  background: rgba(255,255,255,0.07);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}

.fi-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Legacy horizontal strip (kept for compatibility) ─────── */
.intel-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.intel-strip::-webkit-scrollbar { display: none; }

.intel-card {
  flex-shrink: 0;
  width: 110px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 13px 12px 11px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  animation: slideUp 0.38s ease both;
  transition: border-color 0.2s;
}

.intel-card:hover { border-color: rgba(230,57,70,0.2); }

.intel-icon {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  margin-bottom: 1px;
}

.intel-value {
  font-size: 1.08rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
  min-height: 1.2rem;
}

.intel-na {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.95rem;
}

.intel-bar {
  height: 2px;
  background: var(--border-subtle);
  border-radius: 2px;
  overflow: hidden;
  margin: 1px 0;
}

.intel-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.9s ease;
  min-width: 0;
}

.intel-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}

/* Intel card stagger */
.intel-card:nth-child(1) { animation-delay: 0.06s; }
.intel-card:nth-child(2) { animation-delay: 0.10s; }
.intel-card:nth-child(3) { animation-delay: 0.14s; }
.intel-card:nth-child(4) { animation-delay: 0.18s; }
.intel-card:nth-child(5) { animation-delay: 0.22s; }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 360px) {
  .hero-score     { font-size: 2rem; }
  .hero-badge     { width: 44px; height: 44px; }
  .intel-card     { width: 98px; }
}

/* ═══════════════════════════════════════════════════════════════
   HOMEPAGE LIVE INTELLIGENCE — at-risk pills, event feed,
   hero intensity glows, referee tag badge
═══════════════════════════════════════════════════════════════ */

/* ── Hero intensity glow states ─────────────────────────────── */
.hero-match--building  { border-color: rgba(141,187,87,0.28) !important; }
.hero-match--physical  { border-color: rgba(214,168,74,0.32) !important; }
.hero-match--heated    { border-color: rgba(217,106,59,0.38) !important; box-shadow: 0 0 0 1px rgba(217,106,59,0.12), 0 4px 20px rgba(217,106,59,0.08); }
.hero-match--explosive { border-color: rgba(208,80,32,0.42) !important;  box-shadow: 0 0 0 1px rgba(208,80,32,0.16), 0 4px 28px rgba(208,80,32,0.10); animation: hero-meltdown-pulse 3.0s ease-in-out infinite; }

@keyframes hero-meltdown-pulse {
  0%,100% { box-shadow: 0 0 0 1px rgba(208,80,32,0.16), 0 4px 28px rgba(208,80,32,0.10); }
  50%      { box-shadow: 0 0 0 2px rgba(208,80,32,0.26), 0 4px 36px rgba(208,80,32,0.18); }
}

/* ── Referee tag in hero top row ────────────────────────────── */
.hero-ref-tag {
  font-size: 0.55rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 10px;
  white-space: nowrap;
}

/* ── Section live dot ───────────────────────────────────────── */
.section-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  margin-right: 4px;
  animation: live-dot-blink 1.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes live-dot-blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

/* ── Live Event Feed ─────────────────────────────────────────── */
.event-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.feed-event {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
  position: relative;
}

.feed-event:last-child {
  border-bottom: none;
}

.feed-event::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  transition: background 0.3s ease;
}

.feed-event--card::before  { background: var(--feed-color, var(--yellow)); }
.feed-event--foul::before  { background: rgba(152,152,168,0.2); }

.feed-minute {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  width: 24px;
  flex-shrink: 0;
  text-align: right;
}

.feed-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  flex-shrink: 0;
}

.feed-info {
  flex: 1;
  min-width: 0;
}

.feed-player {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.feed-meta {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 1px;
}

.feed-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: feed-dot-pulse 1.6s ease-in-out infinite;
}

@keyframes feed-dot-pulse {
  0%,100% { opacity: 0.8; transform: scale(1); }
  50%      { opacity: 0.3; transform: scale(0.7); }
}

/* ── At-Risk Player Pills (Danger Watch) ────────────────────── */
.scroll-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 4px 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.scroll-row::-webkit-scrollbar { display: none; }

.arp-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 10px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-width: 68px;
  max-width: 80px;
  flex-shrink: 0;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  transition: border-color 0.18s ease, transform 0.15s ease;
}

.arp-pill:hover {
  border-color: rgba(208,80,32,0.28);
  transform: translateY(-1px);
}

.arp-pill:active { transform: scale(0.97); }

.arp-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: -0.02em;
}

.arp-avatar--extreme {
  border-color: rgba(208,80,32,0.55);
  background: rgba(208,80,32,0.14);
  color: var(--orange);
  animation: arp-extreme-glow 2s ease-in-out infinite;
}

.arp-avatar--high {
  border-color: rgba(208,80,32,0.32);
  background: rgba(208,80,32,0.08);
  color: var(--orange);
}

.arp-avatar--elevated {
  border-color: rgba(244,160,28,0.35);
  background: rgba(244,160,28,0.08);
  color: var(--yellow);
}

@keyframes arp-extreme-glow {
  0%,100% { box-shadow: 0 0 0 2px rgba(208,80,32,0.12); }
  50%      { box-shadow: 0 0 0 3px rgba(208,80,32,0.24); }
}

.arp-name {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 64px;
}

.arp-detail {
  font-size: 0.55rem;
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 1px;
}

.arp-y {
  color: #f4a01c;
  font-weight: 800;
}

.arp-score {
  font-size: 0.7rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.arp-aggr-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.arp-empty {
  padding: 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.arp-fouls {
  font-size: 0.7rem;
  font-weight: 900;
  color: var(--orange);
  text-align: center;
}

/* ── Live Foul Offenders (players on 2+ fouls) ─────────────── */
.lfo-sub {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: -2px 0 10px;
}
.lfo-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lfo-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.18s ease;
}
.lfo-row:active { transform: scale(0.99); }
.lfo-row--warn { border-left-color: var(--yellow, #f4a01c); }
.lfo-row--high {
  border-left-color: var(--orange, #d05020);
  background: linear-gradient(90deg, rgba(208,80,32,0.07), var(--bg-card) 60%);
}
.lfo-avatar {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
}
.lfo-avatar--warn {
  border-color: rgba(244,160,28,0.45);
  background: rgba(244,160,28,0.10);
  color: var(--yellow, #f4a01c);
}
.lfo-avatar--high {
  border-color: rgba(208,80,32,0.45);
  background: rgba(208,80,32,0.10);
  color: var(--orange, #d05020);
}
.lfo-avatar--extreme {
  border-color: rgba(208,80,32,0.6);
  background: rgba(208,80,32,0.16);
  color: var(--orange, #d05020);
  animation: arp-extreme-glow 2s ease-in-out infinite;
}
.lfo-main { flex: 1; min-width: 0; }
.lfo-top {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 2px;
}
.lfo-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 45%;
}
.lfo-team {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lfo-yc {
  flex-shrink: 0;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #1a1a1a;
  background: var(--yellow, #f4a01c);
  border-radius: 3px;
  padding: 1px 4px;
}
.lfo-copy {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary, #b9c0cc);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lfo-row--high .lfo-copy { color: var(--orange, #d05020); }
.lfo-meta {
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}
.lfo-foulcount {
  flex-shrink: 0;
  font-size: 1.05rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--orange, #d05020);
  line-height: 1;
}
.lfo-row--warn .lfo-foulcount { color: var(--yellow, #f4a01c); }
.lfo-danger-badge {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary, #b9c0cc);
  background: rgba(160, 32, 24, 0.12);
  border-radius: 8px;
  padding: 2px 6px;
  margin-right: 6px;
  cursor: help;
}
.lfo-foulcount-u {
  font-size: 0.6rem;
  font-weight: 700;
  margin-left: 1px;
  opacity: 0.7;
}

.arp-match {
  font-size: 0.52rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 64px;
}

/* ── Danger Watch live badge ─────────────────────────────── */
.dw-live-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
  margin-right: 4px;
  vertical-align: middle;
  animation: dw-dot-pulse 1.4s ease-in-out infinite;
}

@keyframes dw-dot-pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

.dw-live-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--red);
  background: rgba(196, 71, 71, 0.12);
  border: 1px solid rgba(196, 71, 71, 0.3);
  border-radius: 20px;
  padding: 2px 8px;
  line-height: 1.6;
}

/* ── Momentum card value — text fits better than arrows ─────── */
.intel-value span {
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
}

/* ── Intel card projected / state value text ────────────────── */
.intel-proj {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
}

.intel-state {
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* ── Booked-player row glow states ──────────────────────────── */
.player-foul-row--booked {
  background: rgba(244,160,28,0.06);
  animation: booked-pulse 2.6s ease-in-out infinite;
}

.player-foul-row--extreme {
  background: rgba(208,80,32,0.07);
  animation: extreme-pulse 1.8s ease-in-out infinite;
}

@keyframes booked-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244,160,28,0.00); }
  50%       { box-shadow: 0 0 8px 2px rgba(244,160,28,0.18); }
}

@keyframes extreme-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(208,80,32,0.00); }
  50%       { box-shadow: 0 0 10px 3px rgba(208,80,32,0.20); }
}

/* ── Avatar glow for booked players ─────────────────────────── */
.player-foul-avatar--booked {
  background: rgba(244,160,28,0.18);
  color: var(--yellow);
  border: 1.5px solid rgba(244,160,28,0.45);
}

/* ── Second yellow / red card risk badge ────────────────────── */
.second-yellow-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--yellow);
  background: rgba(244,160,28,0.14);
  border: 1px solid rgba(244,160,28,0.30);
  white-space: nowrap;
  flex-shrink: 0;
}

.second-yellow-badge--extreme {
  color: var(--orange);
  background: rgba(208,80,32,0.12);
  border-color: rgba(208,80,32,0.32);
  animation: extreme-pulse 1.8s ease-in-out infinite;
}

/* ══════════════════════════════════════════════════════════════
   PREMIUM DISCIPLINE STAT BLOCKS — overview tab
   Format: LABEL / N TOTAL / home — away with aggression bars
══════════════════════════════════════════════════════════════ */

.dstat-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
}

.dstat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 9px;
}

.dstat-label {
  font-size: 0.60rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.dstat-total {
  font-size: 0.60rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.dstat-total--alert {
  color: var(--yellow);
  font-weight: 800;
}

.dstat-split {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dstat-val {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  min-width: 22px;
  line-height: 1;
}

.dstat-val--home {
  text-align: left;
  color: var(--red);
}

.dstat-val--away {
  text-align: right;
  color: var(--text-secondary);
}

.dstat-val--heavy {
  color: var(--yellow) !important;
  text-shadow: 0 0 14px rgba(244,160,28,0.45);
}

.dstat-agg-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dstat-agg-team-labels {
  display: flex;
  justify-content: space-between;
}

.dstat-team-abbr {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.dstat-team-abbr--away {
  color: var(--text-muted);
}

.dstat-agg-bars {
  height: 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  display: flex;
  overflow: hidden;
}

.dstat-agg-home {
  height: 100%;
  background: rgba(208,80,32,0.55);
  transition: width 0.7s cubic-bezier(0.34,1.2,0.64,1);
}

.dstat-agg-home--heavy {
  background: var(--yellow);
  box-shadow: 0 0 6px rgba(244,160,28,0.5);
}

.dstat-agg-away {
  height: 100%;
  background: rgba(180,180,200,0.35);
  transition: width 0.7s cubic-bezier(0.34,1.2,0.64,1);
}

.dstat-agg-away--heavy {
  background: var(--yellow);
  opacity: 0.75;
  box-shadow: 0 0 6px rgba(244,160,28,0.4);
}

/* ══════════════════════════════════════════════════════════════
   HERO CARD FOOTER — split stat (total + home–away split)
══════════════════════════════════════════════════════════════ */

.hero-fstat--split {
  gap: 2px;
}

.hero-fstat--split .hero-fstat-n {
  font-size: 1.15rem;
}

.hero-fstat-n--alert {
  color: var(--yellow) !important;
}

.hero-fstat-sub {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

.hfs-heavy {
  color: var(--yellow);
  font-weight: 800;
}


/* ══════════════════════════════════════════════════════════════
   EUROPEAN FOOTBALL HUB — tabbed widget
══════════════════════════════════════════════════════════════ */

.ehub-section {
  padding: 0 0 2px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

/* ── Tab bar ─────────────────────────────────────────────────── */
.ehub-tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  gap: 4px;
  padding: 14px 16px 0;
  border-bottom: 1px solid var(--border);
}
.ehub-tabs::-webkit-scrollbar { display: none; }

.ehub-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 16px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  border-radius: 8px 8px 0 0;
  transition: background 0.15s ease;
}

.ehub-tab::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
  border-radius: 2px 2px 0 0;
  transition: background 0.2s ease;
}

.ehub-tab--active::after {
  background: var(--accent, var(--red));
}

.ehub-tab-logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.ehub-tab--active .ehub-tab-logo,
.ehub-tab:hover .ehub-tab-logo {
  opacity: 1;
}

.ehub-tab-name {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.15s ease;
  white-space: nowrap;
}

.ehub-tab--active .ehub-tab-name {
  color: var(--accent, var(--red));
}

.ehub-tab:hover .ehub-tab-name {
  color: var(--text-secondary);
}

/* ── Team panel ──────────────────────────────────────────────── */
.ehub-panel {
  padding: 8px 0 4px;
  overflow: hidden;
  max-height: 2000px;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.ehub-panel--collapsed {
  max-height: 0;
  padding: 0;
}

.ehub-teams {
  display: flex;
  flex-direction: column;
}

/* ── Team row ────────────────────────────────────────────────── */
.ehub-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}

.ehub-row:last-child {
  border-bottom: none;
}

.ehub-row:hover {
  background: rgba(255,255,255,0.04);
}

.ehub-row-num {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 16px;
  text-align: right;
  flex-shrink: 0;
  opacity: 0.5;
}

.ehub-row-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.ehub-row-logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.55));
}

.ehub-row-ini {
  display: none;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  font-weight: 800;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.07);
  border-radius: 6px;
}

.ehub-row-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.01em;
  flex: 1;
}

.ehub-row--link {
  cursor: pointer;
  transition: background var(--transition);
}
.ehub-row--link:hover,
.ehub-row--link:active { background: var(--bg-card-hover); }

.ehub-row-archetype {
  font-size: 0.46rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex-shrink: 0;
  text-align: right;
  white-space: nowrap;
  line-height: 1;
  opacity: 0.9;
}
.ehub-row-archetype--pending {
  display: inline-block;
  width: 60px;
  height: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
}

.ehub-row-chevron {
  color: var(--text-muted);
  flex-shrink: 0;
  opacity: .5;
}


/* ══════════════════════════════════════════════════════════════
   LIVE MATCH PULSE WIDGET
══════════════════════════════════════════════════════════════ */

/* ── Keyframes ───────────────────────────────────────────────── */
@keyframes pulse-dot-1 {
  0%,100% { opacity:.5; transform:scale(1); }
  50%      { opacity:.7; transform:scale(1.05); }
}
@keyframes pulse-dot-2 {
  0%,100% { opacity:.6; transform:scale(1); box-shadow:0 0 0 rgba(var(--tr),var(--tg),var(--tb),0); }
  50%      { opacity:.9; transform:scale(1.1); box-shadow:0 0 6px rgba(var(--tr),var(--tg),var(--tb),.35); }
}
@keyframes pulse-dot-3 {
  0%,100% { transform:scale(1);    box-shadow:0 0 0   rgba(var(--tr),var(--tg),var(--tb),0); }
  50%      { transform:scale(1.15); box-shadow:0 0 10px rgba(var(--tr),var(--tg),var(--tb),.5); }
}
@keyframes pulse-dot-4 {
  0%,100% { transform:scale(1);    box-shadow:0 0 4px  rgba(var(--tr),var(--tg),var(--tb),.3); }
  50%      { transform:scale(1.2);  box-shadow:0 0 14px rgba(var(--tr),var(--tg),var(--tb),.65); }
}
@keyframes pulse-dot-5 {
  0%,100% { transform:scale(1);    box-shadow:0 0 6px  rgba(var(--tr),var(--tg),var(--tb),.4); }
  50%      { transform:scale(1.25); box-shadow:0 0 20px rgba(var(--tr),var(--tg),var(--tb),.8); }
}
@keyframes pulse-bar-2 {
  0%,100% { opacity:.75; }
  50%      { opacity:1; }
}
@keyframes pulse-bar-3 {
  0%,100% { opacity:.7;  filter:brightness(1); }
  50%      { opacity:1;   filter:brightness(1.15); }
}
@keyframes pulse-bar-4 {
  0%,100% { opacity:.65; filter:brightness(1); }
  50%      { opacity:1;   filter:brightness(1.25); }
}
@keyframes pulse-bar-5 {
  0%,100% { opacity:.6;  filter:brightness(1);   transform:scaleY(1); }
  50%      { opacity:1;   filter:brightness(1.35); transform:scaleY(1.12); }
}
@keyframes pulse-row-5 {
  0%,100% { background:rgba(var(--rr),var(--rg),var(--rb),.03); }
  50%      { background:rgba(var(--rr),var(--rg),var(--rb),.07); }
}

/* ── Widget shell ────────────────────────────────────────────── */
.pulse-widget {
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid rgba(var(--tr),var(--tg),var(--tb),.22);
  overflow: hidden;
  box-shadow: 0 0 24px rgba(var(--tr),var(--tg),var(--tb),.07);
}

/* ── Header ──────────────────────────────────────────────────── */
.pulse-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
}

.pulse-hdr-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-hdr-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  will-change: transform, box-shadow;
}
.pulse-hdr-dot--1 { animation: pulse-dot-1 4.0s ease-in-out infinite; }
.pulse-hdr-dot--2 { animation: pulse-dot-2 3.2s ease-in-out infinite; }
.pulse-hdr-dot--3 { animation: pulse-dot-3 2.4s ease-in-out infinite; }
.pulse-hdr-dot--4 { animation: pulse-dot-4 1.8s ease-in-out infinite; }
.pulse-hdr-dot--5 { animation: pulse-dot-5 1.2s ease-in-out infinite; }

.pulse-hdr-title {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.pulse-hdr-count {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255,255,255,.05);
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

/* ── Row ─────────────────────────────────────────────────────── */
.pulse-rows {
  display: flex;
  flex-direction: column;
}

.pulse-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background .15s ease;
  cursor: pointer;
}
.pulse-row:last-child { border-bottom: none; }
.pulse-row:hover { background: rgba(var(--rr),var(--rg),var(--rb),.05); }
.pulse-row--5 { animation: pulse-row-5 1.8s ease-in-out infinite; }

.pulse-rank {
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--text-muted);
  opacity: .45;
  width: 12px;
  text-align: center;
  flex-shrink: 0;
}

.pulse-teams {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.pulse-team {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 64px;
}

.pulse-vs {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .03em;
  flex-shrink: 0;
}

.pulse-min {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .02em;
  flex-shrink: 0;
  min-width: 24px;
  text-align: center;
}
.pulse-min--countdown {
  color: #4ade80;
  opacity: 0.85;
}

/* ── Right side ──────────────────────────────────────────────── */
.pulse-right {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.pulse-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  min-width: 72px;
  text-align: right;
}

.pulse-bar-track {
  width: 56px;
  height: 3px;
  background: rgba(255,255,255,.08);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}

.pulse-bar {
  height: 100%;
  border-radius: 2px;
  transform-origin: left center;
  will-change: opacity, filter;
}
.pulse-bar--1 { opacity: .55; }
.pulse-bar--2 { animation: pulse-bar-2 3.2s ease-in-out infinite; }
.pulse-bar--3 { animation: pulse-bar-3 2.4s ease-in-out infinite; }
.pulse-bar--4 { animation: pulse-bar-4 1.8s ease-in-out infinite; }
.pulse-bar--5 { animation: pulse-bar-5 1.2s ease-in-out infinite; }

.pulse-num {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: .01em;
  min-width: 24px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Derby badge & icon ──────────────────────────────────────── */
.derby-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(160,32,24,.14);
  border: 1px solid rgba(160,32,24,.38);
  color: var(--red);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 6px 2px 5px;
  border-radius: 4px;
  line-height: 1;
  flex-shrink: 0;
}
.derby-badge svg { opacity: .82; }

.pulse-derby {
  display: flex;
  align-items: center;
  color: var(--red);
  opacity: .72;
  flex-shrink: 0;
}

/* ── Final match badge on pulse rows ───────────────────────── */
.pulse-final-badge {
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
  opacity: .85;
}
.pulse-row--final {
  border-left: 2px solid rgba(255,107,0,.35);
}

/* ── Watch Bar toggle button on pulse rows ──────────────────── */
.pulse-watch-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color .2s, color .2s, background .2s;
  margin-left: 2px;
  padding: 0;
}
.pulse-watch-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: rgba(255,100,20,.07);
}
.pulse-watch-btn--active {
  border-color: var(--orange);
  color: var(--orange);
  background: rgba(255,100,20,.12);
}

/* ═══════════════════════════════════════════════════════════════
   Intelligence Panel — Apple-style centered card overlay
   ═══════════════════════════════════════════════════════════════ */

/* Cards become tappable */
.fi-card[data-intel-type] {
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.18s ease, transform 0.12s ease, background 0.14s ease;
}
.fi-card[data-intel-type]:hover {
  border-color: rgba(249,115,22,0.30);
  background: rgba(255,255,255,0.022);
}
.fi-card[data-intel-type]:active {
  transform: scale(0.962);
  background: rgba(249,115,22,0.07);
}

/* ═══════════════════════════════════════════════════════
   Intelligence Panel — Apple-style centered card overlay
   Scale + fade from widget context. No bottom-sheet feel.
═══════════════════════════════════════════════════════ */

/* Backdrop — soft blur, darker than before */
.ip-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.48);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.ip-backdrop.ip-visible {
  opacity: 1;
  pointer-events: all;
}

/* Overlay card — centered in app frame, all-corner rounded */
.ip-sheet {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(92%, 440px);
  max-height: 78vh;
  min-height: 0;
  z-index: 1101;
  background: #18191d;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Closed: slightly scaled down + invisible */
  transform: translate(-50%, -50%) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.22s cubic-bezier(0.25,0.46,0.45,0.94),
    opacity   0.20s ease;
  will-change: transform, opacity;
  box-shadow:
    0 28px 64px rgba(0,0,0,0.60),
    0 6px  20px rgba(0,0,0,0.35),
    0 0    0 0.5px rgba(255,255,255,0.06) inset;
}
.ip-sheet.ip-open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: all;
}
/* Compact mode — short content, no live data */
.ip-sheet.ip-compact {
  max-height: 300px;
}

/* Accent bar at top of card */
.ip-sheet::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(249,115,22,0.5) 40%, rgba(249,115,22,0.5) 60%, transparent);
  flex-shrink: 0;
}

/* Header */
.ip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.ip-header-text { flex: 1; min-width: 0; }
.ip-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.ip-subtitle {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.3;
}

/* Close button — circular, top-right */
.ip-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.09);
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 12px;
  padding: 0;
  transition: background .15s, color .15s, transform .1s;
}
.ip-close:active {
  background: rgba(255,255,255,0.16);
  color: var(--text-primary);
  transform: scale(0.92);
}

/* Scrollable list */
.ip-list {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  padding: 4px 0 2px;
  overscroll-behavior: contain;
}
.ip-list::-webkit-scrollbar { display: none; }

/* Match row */
.ip-match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.045);
  cursor: pointer;
  transition: background 0.1s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.ip-match-row:last-child { border-bottom: none; }
.ip-match-row:active { background: rgba(249,115,22,0.08); }
.ip-match-row.ip-row--hot {
  border-left: 2px solid rgba(249,115,22,0.60);
  padding-left: 14px;
}

.ip-row-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.ip-row-matchup {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ip-row-meta {
  font-size: 0.63rem;
  color: var(--text-muted);
  line-height: 1.2;
}
.ip-row-right { flex-shrink: 0; }

/* Badge */
.ip-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
  line-height: 1.4;
}

/* Empty state — centered, premium feel */
.ip-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 28px 24px 30px;
  color: var(--text-muted);
}
.ip-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  flex-shrink: 0;
}
.ip-empty-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.ip-empty-sub {
  font-size: 0.70rem;
  line-height: 1.5;
  max-width: 220px;
}

/* Foul Pressure — explanation banner inside overlay */
.ip-explain {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 10px 16px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  flex-shrink: 0;
}

/* Foul Pressure — overall score summary block */
.ip-fp-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 16px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.ip-fp-score {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}
.ip-fp-state {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* High Risk — inline signal lines beneath matchup */
.ip-row-signals {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 3px;
}
.ip-row-signal {
  font-size: 0.60rem;
  color: rgba(249,115,22,0.80);
  line-height: 1.3;
  font-weight: 500;
}

/* Player Watch — individual player rows */
.ip-player-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.045);
  cursor: pointer;
  transition: background 0.1s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.ip-player-row:last-child { border-bottom: none; }
.ip-player-row:active { background: rgba(249,115,22,0.08); }

.ip-player-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.ip-player-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.ip-player-name {
  font-size: 0.80rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.ip-player-meta {
  font-size: 0.62rem;
  color: var(--text-muted);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ip-player-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.ip-pstats {
  display: flex;
  gap: 3px;
  align-items: center;
}
.ip-pstat {
  font-size: 0.58rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}
.ip-pstat--yc {
  background: rgba(244,160,28,0.18);
  color: #F4A01C;
}
.ip-pstat--rc {
  background: rgba(230,57,70,0.18);
  color: #E63946;
}
.ip-pstat--sub {
  background: rgba(79,175,123,0.18);
  color: #4FAF7B;
}

/* Footer tip / stat */
.ip-tip {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-align: center;
  padding: 9px 16px 11px;
  opacity: 0.60;
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.ip-footer-stat {
  font-size: 0.66rem;
  color: var(--text-muted);
  text-align: center;
  padding: 9px 16px 11px;
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* ── Outcome Tendency — probability row (H / D / A) ────────── */
.ip-prob-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.ip-prob-cell {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  transition: color 0.15s;
}
.ip-prob-cell.ip-prob--active {
  font-weight: 800;
}
.ip-prob-sep {
  font-size: 0.60rem;
  color: rgba(255,255,255,0.20);
  line-height: 1;
}

/* ── World Cup 2026 — overview stats block ───────────────────── */
.ip-wc-overview {
  padding: 12px 16px 4px;
  flex-shrink: 0;
}
.ip-wc-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
  justify-content: space-between;
}
.ip-wc-stat {
  flex: 1;
  text-align: center;
  padding: 4px 2px 8px;
}
.ip-wc-stat + .ip-wc-stat {
  border-left: 1px solid rgba(255,255,255,0.07);
}
.ip-wc-stat-val {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 3px;
}
.ip-wc-stat-lbl {
  font-size: 0.60rem;
  color: var(--text-muted);
  line-height: 1.3;
  font-weight: 500;
}

/* ── World Cup 2026 — readiness checklist ───────────────────── */
.ip-wc-checklist {
  display: flex;
  flex-direction: column;
  padding: 6px 16px 4px;
  gap: 2px;
  flex-shrink: 0;
}
.ip-wc-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.ip-wc-check:last-child { border-bottom: none; }
.ip-wc-check-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.ip-wc-check-label {
  font-size: 0.72rem;
  color: var(--text-primary);
  font-weight: 500;
  flex: 1;
}
.ip-wc-check-note {
  font-size: 0.65rem;
  font-weight: 600;
}

/* ── Availability Impact — AI prediction card ──────────────── */
.ai-avail-block {
  margin: 10px 0 4px;
}
.ai-avail-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ai-avail-item {
  padding: 7px 10px;
  background: rgba(255, 102, 0, 0.05);
  border: 1px solid rgba(255, 102, 0, 0.12);
  border-radius: 7px;
}
.ai-avail-item--named {
  background: rgba(255, 102, 0, 0.06);
}

/* Header row: name · side · confidence */
.ai-avail-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ai-avail-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}
.ai-avail-side {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
}
.ai-avail-side--home {
  background: rgba(208, 80, 32, 0.15);
  color: rgba(208, 80, 32, 0.9);
}
.ai-avail-side--away {
  background: rgba(80, 120, 195, 0.15);
  color: rgba(100, 140, 210, 0.9);
}
.ai-avail-conf {
  font-size: 0.60rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-left: auto;
}

/* Effect text — the impact consequence */
.ai-avail-effect {
  display: block;
  margin-top: 3px;
  font-size: 0.71rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Fallback text for non-named items */
.ai-avail-text-inline {
  flex: 1;
  font-size: 0.71rem;
  color: var(--text-secondary);
}

/* Legacy selector — keep for backward compat */
.ai-avail-text {
  flex: 1;
  font-size: 0.71rem;
  color: var(--text-secondary);
}
.ai-avail-icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--orange, #FF6600);
  opacity: 0.85;
}

/* ── Homepage AI digest chip on pulse rows ─────────────────── */
.pulse-ai-digest {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  color: var(--text-muted);
  padding: 2px 0 0;
  line-height: 1.4;
  overflow: hidden;
  max-width: 100%;
}
.pulse-ai-digest-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pulse-ai-digest-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

/* ══════════════════════════════════════════════════════════════
   World Cup 2026 Banner Widget
══════════════════════════════════════════════════════════════ */
#wc-banner-container {
  padding: 0 12px 4px;
}

.wc-banner-link {
  display: block;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
.wc-banner-link:active .wc-banner { transform: scale(0.985); }

.wc-banner {
  display: flex;
  align-items: center;
  gap: 0;
  background: linear-gradient(135deg, rgba(255,215,0,0.06) 0%, rgba(255,255,255,0.03) 100%);
  border: 1px solid rgba(255,215,0,0.18);
  border-radius: 16px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.04);
  transition: transform 0.12s ease;
}

.wc-banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.wc-banner-cta svg { margin-top: 0.5px; }

.wc-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 10% 50%, rgba(255,215,0,0.07) 0%, transparent 65%);
  pointer-events: none;
}

.wc-banner-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  flex-shrink: 0;
}

.wc-banner-count {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}

.wc-banner-count-lbl {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.04em;
  margin-top: 3px;
  white-space: nowrap;
}

.wc-banner-sep {
  width: 1px;
  height: 54px;
  background: rgba(255,255,255,0.1);
  margin: 0 16px;
  flex-shrink: 0;
}

.wc-banner-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wc-banner-heading {
  display: flex;
  align-items: center;
  gap: 7px;
}

.wc-banner-trophy {
  color: var(--wc-accent, #FFD700);
  flex-shrink: 0;
  opacity: 0.85;
}

.wc-banner-title {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  letter-spacing: -0.01em;
}

.wc-live-pill {
  background: #FF6B00;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  padding: 1px 6px;
  border-radius: 4px;
  line-height: 16px;
}

.wc-banner-hosts {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.wc-banner-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wc-bar-track {
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.wc-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.8s ease;
  min-width: 2px;
}

/* ══════════════════════════════════════════════════════════════
   DATA CONFIDENCE DOT (T002 previous session — pulse row badge)
══════════════════════════════════════════════════════════════ */
.pulse-conf-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-left: 5px;
  vertical-align: middle;
  flex-shrink: 0;
}

.pulse-conf-dot--live {
  background: #22c55e;
  box-shadow: 0 0 4px rgba(34,197,94,0.6);
}

.pulse-conf-dot--est {
  background: #f59e0b;
  box-shadow: 0 0 4px rgba(245,158,11,0.5);
}

/* ══════════════════════════════════════════════════════════════
   BOOKINGS HEAT MAP (T004 previous session)
══════════════════════════════════════════════════════════════ */
.bhm-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.bhm-row:hover { background: rgba(255,255,255,0.04); }

.bhm-rank {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.bhm-teams {
  flex: 1;
  min-width: 0;
}

.bhm-team {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.bhm-min {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.bhm-cards {
  display: flex;
  gap: 2px;
  align-items: center;
  flex-shrink: 0;
}

.bhm-pip {
  width: 7px;
  height: 10px;
  border-radius: 1px;
  background: #f59e0b;
  display: inline-block;
}

.bhm-pip--red {
  background: #ef4444;
}

.bhm-cards-none {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.bhm-frate {
  font-size: 0.7rem;
  color: var(--text-muted);
  min-width: 40px;
  text-align: right;
  flex-shrink: 0;
}

.bhm-heat-wrap {
  min-width: 50px;
  flex-shrink: 0;
}

.bhm-heat-bar {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  transition: width 0.5s ease;
  min-width: 2px;
}

.bhm-heat-num {
  font-size: 0.67rem;
  color: var(--text-muted);
  margin-top: 2px;
  text-align: right;
}

/* ── Pin-ended toast (shared by home + live pages) ────────────── */
.pin-ended-toast { position:fixed; bottom:calc(64px + 12px); left:50%; transform:translateX(-50%) translateY(12px); background:var(--bg-secondary, #1e1e1e); border:1px solid var(--border, #333); border-left:3px solid var(--orange, #f97316); color:var(--text-primary, #f0f0f0); font-size:13px; font-weight:600; padding:10px 16px; border-radius:10px; white-space:nowrap; opacity:0; transition:opacity .25s, transform .25s; z-index:500; pointer-events:none; display:flex; align-items:center; gap:12px; }
.pin-ended-toast.visible { opacity:1; transform:translateX(-50%) translateY(0); pointer-events:auto; }
.pin-ended-toast__link { color:var(--orange, #f97316); font-size:12px; font-weight:700; text-decoration:none; border-left:1px solid var(--border, #444); padding-left:12px; white-space:nowrap; }
.pin-ended-toast__link:hover { text-decoration:underline; }

/* ── My Custom Widget — Coming Soon ──────────────────────────── */
.my-widget-section { padding: 12px 16px 0; }

.my-widget-card {
  position: relative;
  border-radius: var(--radius-md);
  padding: 1px;
  background: var(--border);
  overflow: hidden;
}

/* Rotating conic-gradient creates the thin KITT scanner light
   travelling around the card perimeter.  The 1px padding gap on
   .my-widget-card is the only region where the ::before is
   visible — everything else is covered by .my-widget-card__inner. */
.my-widget-card::before {
  content: '';
  position: absolute;
  inset: -100%;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    transparent 80%,
    rgba(249, 115, 22, 0.12) 87%,
    rgba(249, 115, 22, 0.60) 93%,
    rgba(249, 115, 22, 0.12) 97%,
    transparent 100%
  );
  animation: my-widget-scan 4.5s linear infinite;
}

@keyframes my-widget-scan {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.my-widget-card__inner {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border-radius: calc(var(--radius-md) - 1px);
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.my-widget-card__eyebrow {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.57rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
}

.my-widget-card__headline {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(249, 115, 22, 0.75);
}

.my-widget-card__copy {
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Reduced-motion: replace spinning animation with a static corner glow */
@media (prefers-reduced-motion: reduce) {
  .my-widget-card::before {
    animation: none;
    background: conic-gradient(
      from 45deg,
      transparent 70%,
      rgba(249, 115, 22, 0.28) 100%
    );
  }
}
