:root {
  --bg: #0b0f17;
  --bg-2: #111726;
  --card: #161d2e;
  --card-hover: #1b2438;
  --border: #232c41;
  --text: #e8edf6;
  --muted: #8b97ad;
  --faint: #5d6883;
  --accent: #00e08a;          /* electric green */
  --accent-2: #3b82f6;        /* blue */
  --live: #ff3b5c;
  --soon: #ffb02e;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(59, 130, 246, 0.10), transparent 60%),
    radial-gradient(1000px 500px at 0% 0%, rgba(0, 224, 138, 0.08), transparent 55%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Pull to refresh ---------- */
.ptr {
  position: fixed; top: -48px; left: 0; right: 0; height: 48px; z-index: 50;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--muted); font-size: 13px; font-weight: 600; pointer-events: none;
  transition: transform 0.2s ease;
}
.ptr-spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--accent); opacity: 0.5;
}
.ptr.ready .ptr-spinner { opacity: 1; }
.ptr.loading .ptr-spinner { animation: ptr-spin 0.7s linear infinite; opacity: 1; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }

/* ---------- Header ---------- */
.site-header {
  padding: 20px 0 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; }
.brand-logo { margin: 0; line-height: 0; }
/* White stroke + soft glow so the dark logo stands out on the dark header. */
.brand-logo img {
  height: 42px; width: auto; max-width: 100%; display: block;
  filter:
    drop-shadow(1px 1px 0 #fff) drop-shadow(-1px 1px 0 #fff)
    drop-shadow(1px -1px 0 #fff) drop-shadow(-1px -1px 0 #fff)
    drop-shadow(0 0 4px rgba(255, 255, 255, 0.45));
}

.header-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.stat {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 7px 16px; min-width: 72px; text-align: center;
}
.stat .num { font-size: 20px; font-weight: 800; line-height: 1; color: var(--text); }
.stat .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }
.stat.live .num { color: var(--live); }
.stat.wc .num { color: #ffd23f; }
.stat.wc { border-color: rgba(255, 215, 0, 0.35); }

/* ---------- Controls ---------- */
.controls {
  position: sticky; top: 0; z-index: 30;
  background: rgba(11, 15, 23, 0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); padding: 14px 0;
}
.date-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 14px; scrollbar-width: none; -ms-overflow-style: none; }
.date-strip::-webkit-scrollbar { display: none; }
.date-chip {
  flex: 0 0 auto; border: 1px solid var(--border); background: var(--bg-2); color: var(--text);
  font-family: inherit; font-size: 13px; font-weight: 700; white-space: nowrap;
  padding: 8px 15px; border-radius: 11px; cursor: pointer; transition: all 0.15s;
}
.date-chip:hover { background: var(--card-hover); border-color: #2f3a55; }
.date-chip.is-active { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
/* Custom date sheet (our own picker — the native one misbehaved on iOS). */
.dp { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 20px; }
.dp__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); }
.dp__sheet {
  position: relative; z-index: 1; width: 100%; max-width: 340px; max-height: 70vh; overflow-y: auto;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; box-shadow: var(--shadow);
}
.dp__nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.dp__title { text-align: center; font-size: 14px; font-weight: 800; color: var(--text); }
.dp__arrow {
  width: 34px; height: 34px; border-radius: 9px; font-size: 18px; line-height: 1; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text); font-family: inherit;
}
.dp__arrow:disabled { opacity: 0.3; cursor: default; }
.dp__dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 6px; }
.dp__dow span { text-align: center; font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--faint); }
.dp__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dp-cell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 9px; font-family: inherit; font-size: 13.5px; font-weight: 700;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text); cursor: pointer;
}
.dp-cell.dp-blank { background: none; border: none; }
.dp-cell:disabled { opacity: 0.25; cursor: default; background: none; }
.dp-cell:not(:disabled):hover { background: var(--card-hover); }
.dp-cell.is-today { border-color: var(--accent); }
.dp-cell.is-active { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }

.controls-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.search { position: relative; flex: 1 1 280px; min-width: 220px; }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; opacity: 0.7; }
#search {
  width: 100%; padding: 11px 14px 11px 40px; border-radius: 11px;
  border: 1px solid var(--border); background: var(--bg-2); color: var(--text);
  font-size: 14px; font-family: inherit;
}
#search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 224, 138, 0.15); }

.status-tabs { display: flex; gap: 4px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 11px; padding: 4px; }
.tab {
  border: 0; background: transparent; color: var(--muted); font-family: inherit;
  font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; gap: 6px; transition: background 0.15s, color 0.15s;
}
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--card-hover); color: var(--text); }
.tab .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(255, 59, 92, 0.6); animation: pulse 1.8s infinite; }

#competitionSelect {
  padding: 11px 36px 11px 14px; border-radius: 11px; border: 1px solid var(--border);
  background-color: var(--bg-2); color: var(--text);
  font-size: 13px; font-family: inherit; font-weight: 600; cursor: pointer;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b97ad' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
#competitionSelect:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 224, 138, 0.15); }
#competitionSelect option { background: var(--bg-2); color: var(--text); }

.sport-chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 2px 2px; scrollbar-width: none; -ms-overflow-style: none; }
.sport-chips::-webkit-scrollbar { display: none; }

/* Arrow buttons for the horizontally-scrolling rows. */
.strip-wrap { position: relative; }
.strip-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 6;
  width: 30px; height: 30px; padding: 0; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg-2); color: var(--text);
  font-size: 20px; line-height: 1; cursor: pointer; display: none;
  align-items: center; justify-content: center; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}
.strip-arrow:hover { background: var(--card-hover); border-color: #2f3a55; }
.strip-arrow--left { left: -6px; }
.strip-arrow--right { right: -6px; }
.strip-wrap.has-left .strip-arrow--left { display: flex; }
.strip-wrap.has-right .strip-arrow--right { display: flex; }
.chip {
  flex: 0 0 auto; border: 1px solid var(--border); background: var(--bg-2); color: var(--text);
  font-family: inherit; font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 999px;
  cursor: pointer; display: flex; align-items: center; gap: 7px; white-space: nowrap; transition: all 0.15s;
}
.chip:hover { background: var(--card-hover); border-color: #2f3a55; }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #04150d; }
.chip .chip-count { font-size: 11px; opacity: 0.7; font-weight: 700; }
.chip.is-active .chip-count { opacity: 0.85; }

/* ---------- Main / sections ---------- */
#main { padding: 38px 20px 60px; }
.loading, .empty { text-align: center; color: var(--muted); padding: 80px 20px; font-size: 15px; }

.section { margin-bottom: 38px; scroll-margin-top: 130px; }
.section-head { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.section-emoji {
  font-size: 22px; width: 42px; height: 42px; display: grid; place-items: center;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 11px;
}
.section-title { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.section-count { color: var(--faint); font-size: 13px; font-weight: 600; }
.section-rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }

.section.live-section .section-emoji { background: rgba(255, 59, 92, 0.12); border-color: rgba(255, 59, 92, 0.4); }
.section.live-section .section-title { color: var(--live); }

.section.wc-section .section-emoji { background: rgba(255, 215, 0, 0.14); border-color: rgba(255, 215, 0, 0.45); }
.section.wc-section .section-title { color: #ffd23f; }

.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}

/* ---------- Card ---------- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 16px; display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.15s, border-color 0.15s, background 0.15s; position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-2px); border-color: #2f3a55; background: var(--card-hover); }
.card.is-live { border-color: rgba(255, 59, 92, 0.45); }
.card.is-live::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--live);
}

.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-sport { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 600; min-width: 0; }
.card-sport .emoji { font-size: 15px; }
.card-sport .comp { color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.badge { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.badge.live { background: var(--live); color: #fff; display: flex; align-items: center; gap: 5px; }
.badge.live .dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.8s infinite; }
.badge.soon { background: rgba(255, 176, 46, 0.15); color: var(--soon); border: 1px solid rgba(255, 176, 46, 0.35); }
.badge.ft { background: var(--bg-2); color: var(--muted); border: 1px solid var(--border); }
/* Finished fixtures — dimmed so live/upcoming stay dominant. */
.card.is-finished { opacity: 0.72; }
.card.is-finished:hover { opacity: 1; }
.card.is-finished .card-score-lbl { color: var(--muted); }
.results-section { margin-top: 6px; }
.results-section .section-title { color: var(--muted); }

.card-title { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }

.card-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 2px; }
.card-platform { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.platform-name { font-size: 12.5px; font-weight: 600; color: var(--text); }
.channel-name { font-size: 11.5px; color: var(--faint); }
.card-channels { display: flex; flex-wrap: wrap; gap: 5px; align-content: flex-start; min-width: 0; }
.chan-pill {
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; white-space: nowrap;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text); line-height: 1.3;
}
.chan-pill.ch-bbc { background: #d10a11; border-color: #d10a11; color: #fff; }
.chan-pill.ch-itv { background: #f8c300; border-color: #f8c300; color: #111; }
.chan-pill.ch-sky { background: #0072c9; border-color: #0072c9; color: #fff; }
.chan-pill.ch-tnt { background: #1a1a2e; border-color: #ffd230; color: #ffd230; }
.chan-pill.ch-premier { background: #00a94f; border-color: #00a94f; color: #fff; }
.chan-pill.ch-s4c { background: #e2231a; border-color: #e2231a; color: #fff; }

.card-time { text-align: right; flex: 0 0 auto; }
.time-uk { font-size: 14px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.time-et { font-size: 11.5px; color: var(--faint); white-space: nowrap; margin-top: 1px; }
.time-rel { font-size: 11px; color: var(--soon); font-weight: 600; margin-top: 2px; }

/* ---------- Match detail modal ---------- */
.card.card--match { cursor: pointer; }
.card-score { font-size: 24px; font-weight: 800; color: var(--text); line-height: 1; letter-spacing: 0.03em; white-space: nowrap; animation: scoreGlow 2.4s ease-in-out infinite; }
.card-score-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--live); margin-top: 4px; display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.card-score-lbl .ldot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: pulse 1.6s infinite; }
@keyframes scoreGlow { 0%, 100% { text-shadow: none; } 50% { text-shadow: 0 0 11px rgba(255, 59, 92, 0.45); } }
.card.card--match:hover { border-color: var(--accent); }
.card-hint { font-size: 10.5px; color: var(--faint); font-weight: 600; margin-top: 2px; }

.mm { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.mm[hidden] { display: none; }
.mm__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); }
.mm__panel {
  position: relative; z-index: 1; width: 100%; max-width: 460px; max-height: 88vh; overflow-y: auto;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 22px; box-shadow: var(--shadow);
}
.mm__close {
  position: absolute; top: 10px; right: 12px; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer;
}
.mm__close:hover { background: var(--card-hover); }
.mm-comp { color: var(--muted); font-size: 12.5px; font-weight: 600; text-align: center; margin-bottom: 4px; }
.mm-score { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 10px 0 6px; }
.mm-team { flex: 1; text-align: center; font-size: 15px; font-weight: 700; }
.mm-team.home { text-align: right; }
.mm-team.away { text-align: left; }
.mm-nums { font-size: 34px; font-weight: 800; letter-spacing: 0.02em; white-space: nowrap; }
.mm-status { text-align: center; font-size: 12.5px; font-weight: 700; margin-bottom: 14px; }
.mm-status.live { color: var(--live); }
.mm-status.live::before { content: "● "; }
.mm-meta { text-align: center; color: var(--faint); font-size: 12px; margin-bottom: 3px; }
.mm-channels { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 14px; }
.mm-section-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; margin: 14px 0 8px; }
/* Goalscorers under the scoreline */
.mm-goals { display: flex; align-items: flex-start; gap: 10px; margin: 2px 0 10px; }
.mm-goals-side { flex: 1; min-width: 0; }
.mm-goals-side.home { text-align: right; }
.mm-goals-side.away { text-align: left; }
.mm-goals-ball { flex: 0 0 auto; font-size: 12px; opacity: 0.7; padding-top: 1px; }
.mm-goal { font-size: 11.5px; color: var(--muted); padding: 1px 0; }
/* Missed penalty in open play — ball with a red cross */
.mm-ballx { position: relative; display: inline-block; }
.mm-ballx::after {
  content: "✗"; position: absolute; left: -1px; right: -1px; top: -3px; text-align: center;
  color: #ff3b5c; font-weight: 900; font-size: 1.25em; text-shadow: 0 0 2px #000;
}
.mm-missrow { color: var(--faint); }
.mm-misstag { color: #ff3b5c; font-weight: 700; }
/* VAR decisions */
.mm-vars { display: flex; flex-direction: column; gap: 4px; }
.mm-var-row { font-size: 12px; color: var(--muted); }
.mm-var-badge { display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: 0.06em; color: #fff; background: #7c3aed; border-radius: 4px; padding: 1px 5px; vertical-align: 1px; }
/* Penalty shoot-out */
.mm-shootout { display: flex; gap: 16px; margin: 2px 0 6px; }
.mm-so-side { flex: 1; min-width: 0; }
.mm-so-side.home { text-align: right; }
.mm-so-side.away { text-align: left; }
.mm-pen { font-size: 12.5px; font-weight: 600; padding: 1px 0; }
.pen-scored { color: var(--live); }
.pen-missed { color: #ff3b5c; opacity: 0.85; }
/* Full-XI line-ups (API-Football) */
.mm-xi-head { font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.mm-form { color: var(--faint); font-weight: 600; font-size: 11px; }
.mm-num { display: inline-block; min-width: 20px; color: var(--faint); font-size: 11px; }
.mm-subs { color: var(--faint); font-size: 11px; margin-top: 6px; line-height: 1.45; }
.mm-sub-in { color: var(--text); font-weight: 600; }
.mm-sub-out { color: var(--faint); }
/* Match stats rows */
.mm-stats { display: flex; flex-direction: column; gap: 3px; }
.mm-stat { display: flex; align-items: center; font-size: 12.5px; padding: 3px 0; border-bottom: 1px solid var(--border); }
.mm-stat:last-child { border-bottom: none; }
.mm-stat .v { flex: 1; font-weight: 700; }
.mm-stat .v:last-child { text-align: right; }
.mm-stat .lbl { flex: 1.4; text-align: center; color: var(--muted); font-size: 11.5px; }
.mm-lineups { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mm-lineup li { list-style: none; font-size: 12.5px; padding: 3px 0; color: var(--text); }
.mm-lineup ul { padding: 0; margin: 0; }
.mm-pos { color: var(--faint); font-size: 11px; }
.mm-note { color: var(--faint); font-size: 12px; text-align: center; padding: 8px 0; }
.mm-loading { text-align: center; color: var(--muted); padding: 20px; }
.mm-thumb { width: 100%; max-height: 160px; object-fit: cover; border-radius: 12px; margin: 6px 0 12px; }
.mm-event { text-align: center; font-size: 19px; font-weight: 800; line-height: 1.3; margin: 8px 0 4px; }
.mm-emoji { margin-right: 8px; }
/* Racecards — one collapsible <details> per race. */
.mm-races { margin-top: 6px; }
.rc-race { border-top: 1px solid var(--border); }
.rc-race:first-child { border-top: none; }
.rc-sum {
  display: flex; align-items: center; gap: 10px; padding: 14px 2px;
  font-size: 15px; font-weight: 700; cursor: pointer; list-style: none; user-select: none;
}
.rc-sum::-webkit-details-marker { display: none; }
.rc-sum::after { content: "▸"; color: var(--faint); font-size: 12px; flex: 0 0 auto; transition: transform 0.15s; }
.rc-race[open] .rc-sum::after { transform: rotate(90deg); }
.rc-sum:hover { color: #fff; }
.rc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-winner { color: var(--live); font-size: 13px; font-weight: 700; white-space: nowrap; max-width: 44%; overflow: hidden; text-overflow: ellipsis; }
.rc-win-sp { color: var(--muted); font-weight: 700; }
/* Runner layout: silk (drawn on white, framed in a white chip) as a left
   column beside the name + connections — lets it be properly sized. */
.rc-runner { display: flex; align-items: flex-start; gap: 10px; }
.rc-runner-info { min-width: 0; }
.rc-silk {
  flex: 0 0 auto; width: 40px; height: 34px; object-fit: contain; margin-top: 2px;
  background: #fff; border-radius: 7px; padding: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,0.15);
}
.rc-silk-ph, .rc-silk-err { background: var(--bg-2); box-shadow: 0 0 0 1px var(--border); }
/* Team badges on the modal scoreline */
.mm-team { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.mm-badge { width: 40px; height: 40px; object-fit: contain; }
/* Darts order of play + results */
.dm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 6px; }
.dm { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 10px; }
.dm-live { border-color: rgba(255, 59, 92, 0.4); }
.dm-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; padding: 1px 0; }
.dm-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-score { font-weight: 800; font-size: 15px; flex: 0 0 auto; color: var(--muted); }
.dm-win .dm-name { color: var(--live); }
.dm-win .dm-score { color: var(--live); }
.dm-meta { margin-top: 5px; display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; color: var(--faint); }
.dm-board { color: var(--faint); }
.dm-liveword { display: inline-flex; align-items: center; gap: 4px; color: var(--live); font-weight: 700; }
@media (max-width: 560px) { .dm-grid { grid-template-columns: 1fr; } }
.mm-assist { display: block; color: var(--faint); font-size: 10.5px; padding-left: 14px; }
.rc-form { display: inline-block; margin-left: 8px; color: var(--faint); font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; }
.mm-hl {
  display: block; text-align: center; margin: 14px auto 2px; padding: 10px 16px; max-width: 280px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 11px;
  color: var(--text); font-size: 13px; font-weight: 700; text-decoration: none;
}
.mm-hl:hover { background: var(--card-hover); }
/* Team calendar subscribe links */
.mm-cal { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.mm-cal-link {
  padding: 7px 12px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 999px;
  color: var(--muted); font-size: 11.5px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.mm-cal-link:hover { color: var(--text); background: var(--card-hover); }
/* Lucky Tiger odds block (demo until the real feed is wired) */
.mm-odds {
  margin-top: 14px; padding: 12px; border-radius: 12px;
  background: linear-gradient(160deg, rgba(247, 148, 29, 0.10), rgba(247, 148, 29, 0.03));
  border: 1px solid rgba(247, 148, 29, 0.35);
}
.mm-odds-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: #f7941d; }
.mm-odds-head img { height: 30px; width: 38px; object-fit: contain; }
.mm-odds-brand { font-size: 13px; }
/* Racing: Lucky Tiger price chips + brand strip on upcoming racecards */
.rc-odds-brand-cell { padding: 0 0 6px !important; border-top: none !important; }
.rc-odds-brand { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; color: #f7941d; text-transform: uppercase; letter-spacing: 0.05em; }
.rc-odds-brand img { height: 22px; width: 28px; object-fit: contain; }
.rc-sp-chip {
  display: inline-block; padding: 3px 8px; border-radius: 8px; cursor: pointer;
  background: rgba(247, 148, 29, 0.08); border: 1px solid rgba(247, 148, 29, 0.4);
  color: #f7941d; font-weight: 800; font-size: 12px; white-space: nowrap;
}
.mm-odds-demo { margin-left: auto; font-size: 9.5px; font-weight: 700; color: var(--faint); border: 1px solid var(--border); border-radius: 999px; padding: 2px 7px; text-transform: none; letter-spacing: 0; }
.mm-odds-row { display: flex; gap: 8px; }
.mm-odd {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 6px; border-radius: 10px; cursor: pointer; font-family: inherit;
  background: var(--bg-2); border: 1px solid var(--border); transition: border-color 0.15s, background 0.15s;
}
.mm-odd:hover { border-color: #f7941d; background: rgba(247, 148, 29, 0.08); }
.mm-odd-lbl { font-size: 10.5px; color: var(--muted); font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-odd-val { font-size: 15px; font-weight: 800; color: #f7941d; }
.mm-odds-legal { margin-top: 9px; text-align: center; font-size: 10px; color: var(--faint); }
.rc-count { color: var(--faint); font-size: 13px; font-weight: 600; white-space: nowrap; }
.rc-flagchip { color: var(--soon); font-size: 13px; font-weight: 700; white-space: nowrap; }
.rc-body { padding: 0 2px 14px; }
.rc-time { display: inline-block; min-width: 58px; color: var(--accent, #46a); font-weight: 800; flex: 0 0 auto; }
.rc-meta { color: var(--faint); font-size: 13px; margin: 0 0 8px; }
.rc-flag { color: var(--faint); font-size: 13px; font-style: italic; padding: 2px 0 4px; }
.rc-verdict {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; margin-top: 10px; font-size: 13px; line-height: 1.55; color: var(--muted);
}
.rc-verdict strong { color: var(--text); }
.rc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rc-table td { padding: 5px 2px; vertical-align: top; border-top: 1px solid var(--border); }
.rc-table tr:first-child td { border-top: none; }
.rc-num { width: 36px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.rc-pos { width: 40px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.rc-draw { color: var(--faint); font-weight: 400; font-size: 11px; margin-left: 2px; }
.rc-horse { font-weight: 600; }
.rc-sub { display: block; color: var(--faint); font-weight: 400; font-size: 12.5px; }
.rc-sp { text-align: right; white-space: nowrap; color: var(--muted); font-weight: 700; }
.rc-win td { color: var(--live); }
.rc-win .rc-horse { font-weight: 800; }
.rc-foot { color: var(--faint); font-size: 12.5px; margin: 4px 0 2px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 30px 0 40px; margin-top: 20px; }
.footer-inner { color: var(--muted); font-size: 13px; }
.footer-meta { margin: 0 0 8px; color: var(--text); font-weight: 600; }
.footer-note { margin: 0 0 10px; max-width: 640px; }
.footer-credit { margin: 0; color: var(--faint); }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 59, 92, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(255, 59, 92, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 92, 0); }
}

@media (max-width: 620px) {
  /* Slimmer header — less vertical space on small screens. */
  .site-header { padding: 12px 0; }
  .header-inner { gap: 10px; }
  .brand-logo img { height: 30px; }
  /* Stats sit beside the logo, compact. */
  .header-stats { gap: 7px; }
  .stat { padding: 5px 11px; min-width: 0; }
  .stat .num { font-size: 16px; }
  .stat .lbl { font-size: 9.5px; }

  /* Don't keep the tall filter bar stuck to the top on mobile — let it scroll away. */
  .controls { position: static; padding: 10px 0; }
  .date-strip { padding-bottom: 10px; }

  .controls-row { gap: 8px; }
  .search { order: 1; flex: 1 1 100%; }
  .platform-filter { order: 2; flex: 1 1 100%; }
  #competitionSelect { width: 100%; }
  .status-tabs { order: 3; width: 100%; justify-content: space-between; }

  .wrap { padding: 0 14px; }
  #main { padding: 28px 14px 48px; }
  .grid { grid-template-columns: 1fr; gap: 10px; }
  /* Phone cards: tighter box, bigger text — less air, more info. */
  .card { padding: 12px 14px; gap: 7px; }
  .card-title { font-size: 17px; }
  .card-sport { font-size: 12.5px; }
  .time-uk { font-size: 16px; }
  .time-et { font-size: 12px; }
  .chan-pill { font-size: 11.5px; }
}

/* Safety: never let a stray wide element force the whole page to zoom out. */
body { overflow-x: hidden; }
.card-title { overflow-wrap: anywhere; }
/* The sport name never wraps mid-word — the competition truncates instead. */
.card-sport > span:not(.comp) { white-space: nowrap; flex-shrink: 0; }
