/* ─── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-tap-highlight-color: transparent; }

/* ─── BODY SHELL (flex column, full viewport) ─────────── */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #fff;
  color: #111827;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  height: 100vh; /* fallback */
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; }

/* ─── TOP BAR ────────────────────────────────────────── */
.top-bar {
  flex-shrink: 0;
  height: 52px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-bottom: 1px solid #f3f4f6;
  background: #fff;
  z-index: 10;
}

.brand {
  flex: 1;
  text-align: center;
  line-height: 1.1;
}
.brand-name {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #111827;
}
.brand-sub {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #9ca3af;
  text-transform: uppercase;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #374151;
  flex-shrink: 0;
}
.icon-btn:hover { background: #f9fafb; }

.refresh-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  color: #6b7280;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  text-align: right;
  padding: 4px 6px;
  border-radius: 6px;
  flex-shrink: 0;
  max-width: 88px;
}
.refresh-btn:hover { background: #f9fafb; }

/* ─── TEAM STRIP ─────────────────────────────────────── */
.team-strip-wrap {
  flex-shrink: 0;
  height: 56px;
  border-bottom: 1px solid #f3f4f6;
  overflow: hidden;
}
.team-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  overflow-x: auto;
  scrollbar-width: none;
  height: 100%;
  -webkit-overflow-scrolling: touch;
}
.team-strip::-webkit-scrollbar { display: none; }

.team-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px 5px 5px;
  border-radius: 999px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color .15s, background .15s, color .15s;
}
.team-chip:hover { border-color: #d1d5db; background: #f9fafb; }
.team-chip.is-active {
  border-color: #16a34a;
  background: #16a34a;
  color: #fff;
}
.team-chip img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(0,0,0,0.08);
  background: #e5e7eb;
}
.team-chip.is-active img { border-color: rgba(255,255,255,0.3); }
.chip-all-icon { font-size: 15px; }

/* ─── DAY BAR ────────────────────────────────────────── */
.day-bar {
  flex-shrink: 0;
  height: 50px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-bottom: 1px solid #f3f4f6;
  background: #fff;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.day-bar::-webkit-scrollbar { display: none; }

.day-btn {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  transition: border-color .15s, background .15s, color .15s;
}
.day-btn:hover { border-color: #d1d5db; }
.day-btn.is-active {
  border-color: #16a34a;
  background: #16a34a;
  color: #fff;
}
.day-btn.is-active svg { stroke: #fff; }
.chevron-r { font-size: 13px; opacity: 0.7; }
.search-btn { flex: 0 0 36px; width: 36px; }

/* ─── MAIN SCROLL AREA ──────────────────────────────── */
#app-root {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.view { }
.is-hidden { display: none !important; }

/* ─── GROUP SECTION ──────────────────────────────────── */
.group-section {
  border-bottom: 8px solid #f9fafb;
}

.group-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  background: #fff;
  cursor: pointer;
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid #f3f4f6;
  user-select: none;
}
.group-header:hover { background: #fafafa; }

.group-chevron {
  color: #9ca3af;
  font-size: 11px;
  transition: transform .2s;
  flex-shrink: 0;
}
.group-section.is-collapsed .group-chevron { transform: rotate(-90deg); }

.group-title {
  font-size: 15px;
  font-weight: 800;
  color: #111827;
}
.group-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
}

.group-pills {
  display: flex;
  gap: 4px;
  margin-left: auto;
  flex-wrap: nowrap;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.pill-live { background: #dcfce7; color: #15803d; }
.pill-live::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #16a34a; animation: pulse 1.5s ease infinite; }
.pill-final { background: #f3f4f6; color: #6b7280; }
.pill-upcoming { background: #eff6ff; color: #2563eb; }

.group-matches {
  overflow: hidden;
}
.group-section.is-collapsed .group-matches { display: none; }

/* ─── MATCH ROW ──────────────────────────────────────── */
.match-row {
  display: grid;
  grid-template-columns: 62px 1fr 22px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #f9fafb;
  cursor: pointer;
  gap: 6px;
  background: #fff;
  transition: background .1s;
}
.match-row:hover { background: #f9fafb; }
.match-row.is-selected {
  background: #f0fdf4;
  border-left: 3px solid #16a34a;
  padding-left: 11px;
}

/* status col */
.mr-status {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 11.5px;
  font-weight: 700;
}
.s-live {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #16a34a;
}
.s-live::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #16a34a;
  flex-shrink: 0;
  animation: pulse 1.5s ease infinite;
}
.s-final {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #9ca3af;
}
.s-final::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #d1d5db;
  flex-shrink: 0;
}
.s-time { color: #374151; font-size: 13px; }
.s-sub { color: #9ca3af; font-size: 10px; font-weight: 500; }

/* teams col: home | score | away */
.mr-teams {
  display: grid;
  grid-template-columns: 1fr 58px 1fr;
  align-items: center;
  gap: 4px;
}
.mr-home {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  min-width: 0;
}
.mr-away {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  min-width: 0;
}
.mr-home span, .mr-away span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mr-score {
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  color: #111827;
  white-space: nowrap;
}
.mr-vs {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
}
.mr-arrow {
  color: #d1d5db;
  font-size: 16px;
  font-weight: 600;
  text-align: right;
}

/* circular flag used in match rows */
.flag-sm {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #e5e7eb;
  background: #f3f4f6;
  flex-shrink: 0;
}
/* fallback badge for flag-sm */
.flag-sm-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e5e7eb;
  font-size: 8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  flex-shrink: 0;
}

/* ─── MATCH DETAIL CARD ──────────────────────────────── */
.match-detail-card {
  background: #fff;
  border-top: 8px solid #f3f4f6;
}

.dc-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 6px;
  font-size: 12px;
  color: #6b7280;
  flex-wrap: wrap;
}
.dc-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 5px;
  letter-spacing: 0.04em;
}
.dc-badge.live { background: #16a34a; color: #fff; }
.dc-badge.live::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.6); animation: pulse 1.2s ease infinite; }
.dc-badge.final { background: #f3f4f6; color: #374151; }
.dc-badge.pending { background: #fef3c7; color: #92400e; }
.dc-badge.preview { background: #eff6ff; color: #2563eb; }
.dc-context { font-weight: 600; color: #374151; }
.dc-kickoff-date { font-size: 11.5px; color: #374151; font-weight: 500; }
.dc-kickoff-time { font-size: 11.5px; color: #6b7280; }
.dc-venue { font-size: 11.5px; }
.dc-venue-link {
  font-size: 11.5px;
  color: #16a34a;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.dc-venue-link:hover { text-decoration: underline; }

/* scoreboard */
.dc-scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 12px 16px 10px;
  gap: 8px;
}
.dc-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.dc-team-name {
  font-size: 15px;
  font-weight: 800;
  color: #111827;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
}
.dc-score-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.dc-goals {
  font-size: clamp(28px, 8vw, 38px);
  font-weight: 900;
  color: #111827;
  letter-spacing: -0.02em;
  line-height: 1;
}
.dc-time-label {
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* large circular flag for scoreboard */
.flag-lg {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e5e7eb;
  background: #f3f4f6;
}
.flag-lg-badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
}

/* goal events */
.dc-events {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 10px;
  justify-content: center;
}
.dc-event {
  font-size: 12px;
  color: #374151;
  background: #f9fafb;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
}

/* sections within detail card */
.dc-section {
  padding: 12px 16px;
  border-top: 1px solid #f3f4f6;
}
.dc-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.dc-section-title {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #9ca3af;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.dc-section-head .dc-section-title { margin-bottom: 0; }
.dc-view-all {
  font-size: 12px;
  font-weight: 700;
  color: #16a34a;
}

/* win probability */
.dc-prob-rows {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 4px;
}
.dc-prob-home-val { color: #16a34a; font-size: 14px; }
.dc-prob-bar {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  background: #f3f4f6;
  margin-top: 6px;
}
.dc-bar-home { background: #16a34a; height: 100%; }
.dc-bar-draw { background: #d1d5db; height: 100%; }
.dc-bar-away { background: #f97316; height: 100%; }

/* stats comparison table */
.dc-stats-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dc-stats-table tr + tr td { border-top: 1px solid #f3f4f6; }
.dc-stats-table td { padding: 6px 4px; }
.dc-stat-home { text-align: left; font-weight: 700; color: #16a34a; width: 30%; }
.dc-stat-label { text-align: center; color: #6b7280; font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; }
.dc-stat-away { text-align: right; font-weight: 700; color: #f97316; width: 30%; }

/* squad watch */
.squad-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.squad-card { background: #f9fafb; border-radius: 10px; padding: 10px; font-size: 12px; }
.squad-card-empty { display: flex; flex-direction: column; gap: 4px; }
.squad-team-name { font-weight: 800; font-size: 13px; color: #111827; margin-bottom: 6px; display: flex; align-items: center; justify-content: space-between; }
.squad-rank { font-size: 10px; font-weight: 700; color: #9ca3af; }
.squad-row { display: flex; justify-content: space-between; gap: 6px; padding: 3px 0; color: #374151; }
.squad-label { color: #9ca3af; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.03em; font-weight: 700; }
.squad-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.squad-chip { background: #fff; border: 1px solid #e5e7eb; border-radius: 999px; padding: 3px 8px; font-size: 11px; font-weight: 600; color: #374151; }
.squad-chip em { font-style: normal; color: #9ca3af; margin-left: 3px; }
.muted { color: #9ca3af; font-size: 12px; }
@media (max-width: 480px) {
  .squad-grid { grid-template-columns: 1fr; }
}

/* key insights */
.dc-insights { display: flex; flex-direction: column; gap: 8px; }

.insight-chip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.insight-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.insight-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}

.insight-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #6b7280;
  line-height: 1.2;
}

.insight-delta {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.insight-delta.up { background: #dcfce7; color: #15803d; }
.insight-delta.down { background: #fee2e2; color: #dc2626; }
.insight-delta.neutral { background: #f3f4f6; color: #6b7280; }

.insight-val {
  font-size: 16px;
  font-weight: 800;
  color: #111827;
  line-height: 1.2;
  margin-bottom: 4px;
}

.insight-text {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
}

/* source preview */
.dc-sources-list { display: flex; flex-direction: column; gap: 8px; }
.dc-source-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px;
  border: 1px solid #f3f4f6;
  border-radius: 8px;
  background: #f9fafb;
}
.source-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #6b7280;
  flex-shrink: 0;
}
.source-body { flex: 1; min-width: 0; }
.source-name { font-size: 12px; font-weight: 700; color: #111827; }
.source-snip {
  font-size: 11px;
  color: #6b7280;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.source-age { font-size: 10.5px; color: #16a34a; font-weight: 600; margin-top: 2px; }

/* match story */
.dc-story {
  font-size: 13.5px;
  line-height: 1.55;
  color: #374151;
}
.dc-story p + p { margin-top: 6px; }

/* ─── CALENDAR VIEW ──────────────────────────────────── */
.cal-day-block {
  border-bottom: 6px solid #f9fafb;
}
.cal-day-head {
  padding: 12px 14px;
  background: #f9fafb;
  font-size: 13px;
  font-weight: 800;
  color: #374151;
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid #e5e7eb;
}

/* ─── STANDINGS VIEW ─────────────────────────────────── */
.std-group-block {
  border-bottom: 8px solid #f9fafb;
}
.std-group-title {
  padding: 12px 14px 8px;
  font-size: 14px;
  font-weight: 800;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 5;
  border-bottom: 1px solid #f3f4f6;
}
.std-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.std-table th {
  padding: 6px 8px 6px 14px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid #f3f4f6;
}
.std-table th:not(:first-child) { text-align: center; width: 32px; padding-left: 0; }
.std-table td {
  padding: 9px 8px 9px 14px;
  border-bottom: 1px solid #f9fafb;
  color: #374151;
  font-weight: 500;
}
.std-table td:not(:first-child) { text-align: center; padding-left: 0; }
.std-team-cell {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  color: #111827;
}
.std-pos {
  width: 18px;
  text-align: center;
  font-size: 11px;
  color: #9ca3af;
  font-weight: 700;
}
.std-pts { font-weight: 800; color: #111827; }
.std-qualified { border-left: 3px solid #16a34a; }
.std-playoff { border-left: 3px solid #f97316; }

/* ─── STATS VIEW ─────────────────────────────────────── */
.stats-wrap { padding: 12px 14px 24px; display: flex; flex-direction: column; gap: 14px; }
.stats-card {
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 12px;
  padding: 16px;
}
.stats-card-title { font-size: 14px; font-weight: 800; color: #111827; margin-bottom: 12px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.stats-tile { background: #f9fafb; border-radius: 8px; padding: 10px 6px; text-align: center; }
.stats-val { font-size: 20px; font-weight: 800; color: #16a34a; }
.stats-lbl { font-size: 10.5px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.03em; margin-top: 2px; }
.stats-fact { font-size: 12.5px; color: #374151; line-height: 1.5; margin-top: 6px; }
.stats-fact strong { color: #111827; }
.stats-empty { font-size: 13px; color: #9ca3af; padding: 8px 0; }
.stats-rank-list { display: flex; flex-direction: column; gap: 2px; }
.stats-rank-row { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid #f9fafb; }
.stats-rank-pos { font-size: 12px; font-weight: 700; color: #9ca3af; width: 18px; text-align: center; flex-shrink: 0; }
.stats-rank-name { flex: 1; font-size: 13.5px; font-weight: 600; color: #111827; }
.stats-rank-val { font-size: 13px; font-weight: 800; color: #16a34a; }
.stats-rank-note { font-size: 11px; color: #9ca3af; margin-top: 10px; line-height: 1.4; }

/* ─── PLACEHOLDER / MORE ──────────────────────────────── */
.placeholder-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 32px;
  gap: 12px;
  color: #6b7280;
}
.placeholder-msg strong { font-size: 17px; color: #374151; }
.placeholder-msg p { font-size: 14px; line-height: 1.5; }

.more-menu { padding: 8px 0; }
.more-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid #f3f4f6;
}
.more-item:not(.more-item-info):hover { background: #f9fafb; }
.more-item-info { cursor: default; }
.more-icon { font-size: 20px; color: #374151; width: 28px; text-align: center; }
.more-text { flex: 1; }
.more-text strong { display: block; font-size: 15px; color: #111827; }
.more-text span { font-size: 12px; color: #6b7280; }
.more-arr { color: #d1d5db; font-size: 16px; font-weight: 700; }

/* ─── BOTTOM TABS ────────────────────────────────────── */
.bottom-tabs {
  flex-shrink: 0;
  height: 60px;
  display: flex;
  align-items: stretch;
  border-top: 1px solid #f3f4f6;
  background: #fff;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: none;
  background: none;
  font-size: 10px;
  font-weight: 600;
  color: #9ca3af;
  transition: color .15s;
}
.tab-btn:hover { color: #374151; }
.tab-btn.is-active { color: #16a34a; }
.tab-icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

/* ─── ANIMATION ──────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ─── LOADING STATE ──────────────────────────────────── */
.loading-msg {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  font-size: 14px;
  color: #9ca3af;
}

/* ─── STANDINGS ENHANCEMENTS ─────────────────────────── */
.std-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px 4px;
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
}
.std-qualified-key { display: flex; align-items: center; gap: 5px; }
.std-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #16a34a;
  display: inline-block;
}
.std-played { font-size: 11px; font-weight: 400; color: #9ca3af; margin-left: 4px; }
.std-gd-pos { color: #16a34a; font-weight: 700; }
.std-gd-neg { color: #ef4444; font-weight: 700; }

/* ─── STANDINGS FORM DOTS ────────────────────────────── */
.std-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.std-table { min-width: 420px; } /* allow horizontal scroll on small screens */
.std-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90px; }
.std-th-team { min-width: 140px; }

.form-strip { display: flex; gap: 3px; align-items: center; }
.form-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  font-size: 8.5px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  letter-spacing: 0;
}
.form-dot.w { background: #16a34a; box-shadow: 0 1px 3px rgba(22,163,74,0.4); }
.form-dot.d { background: #d97706; box-shadow: 0 1px 3px rgba(217,119,6,0.4); }
.form-dot.l { background: #dc2626; box-shadow: 0 1px 3px rgba(220,38,38,0.4); }
.form-empty { color: #d1d5db; }

/* ─── SEARCH OVERLAY ─────────────────────────────────── */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12px;
}
.search-modal {
  background: #fff;
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 480px;
  height: calc(100dvh - 12px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.search-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  flex-shrink: 0;
}
.search-input {
  flex: 1;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  background: #f9fafb;
}
.search-input:focus { border-color: #16a34a; background: #fff; }
.search-close {
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 14px;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.search-results {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.search-hint {
  padding: 32px 20px;
  font-size: 14px;
  color: #9ca3af;
  text-align: center;
  line-height: 1.5;
}
.search-team-block { margin-bottom: 8px; }
.search-team-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 6px;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  border-top: 1px solid #f3f4f6;
}
.search-team-head span { margin-left: auto; font-size: 11px; font-weight: 500; color: #9ca3af; }
.search-match-row { cursor: pointer; grid-template-columns: 62px 1fr auto; }
.search-stage {
  font-size: 10px;
  color: #9ca3af;
  padding: 0 16px 6px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── DESKTOP SCALING (optional, centered max-width) ──── */
@media (min-width: 600px) {
  body {
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 0 0 1px #e5e7eb, 0 4px 32px rgba(0,0,0,0.08);
  }
}
