/* ==========================================================
   MedalScores – all colours live here. Change one line,
   the whole site follows. Two themes: dark (default) and light.
   Default in config/sports.json ("theme": auto | light | dark), preview with ?theme=light / ?theme=dark / ?theme=auto
   ========================================================== */
:root {
  --header:      #0E1A3A;  /* header bar (same in both themes) */
  --header-line: #1A2752;
  --header-text: #FFFFFF;
  --header-muted:#A9B4CC;
  --gold:        #F2C14E;  /* brand accent */
  --live:        #CF3A3F;
  --pos-1:       #D4A63A;
  --pos-2:       #C3CBD6;
  --pos-3:       #C98B5B;
  --radius:      12px;
  --font:        Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-title:  "Space Grotesk", var(--font);
}
/* Light theme (also the default for 'auto' on a light device) */
:root, html[data-theme="light"] {
  --bg:          #EEF1F6;
  --card:        #FFFFFF;
  --card-head:   #F6F8FB;
  --line:        #E4E8EF;
  --text:        #0B1530;
  --muted:       #5A6478;
  --accent-text: #0B1530;
  --link:        #2447A8;
  --hover:       #F4F7FC;
  --chip:        #E6EBF3;
  --live-text:   #C62F35;
}
/* Dark theme */
html[data-theme="dark"] {
  --bg:          #0B1530;
  --card:        #12204A;
  --card-head:   #16264F;
  --line:        #1F2E5C;
  --text:        #EEF1F8;
  --muted:       #A9B4CC;
  --accent-text: #F2C14E;  /* accent used for text (sport titles, links) */
  --link:        #F2C14E;
  --hover:       rgba(255,255,255,.04);
  --chip:        #1C2C63;
  --live-text:   #FF8F92;
}
/* 'auto': follow the phone / computer setting */
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --bg:          #0B1530;
    --card:        #12204A;
    --card-head:   #16264F;
    --line:        #1F2E5C;
    --text:        #EEF1F8;
    --muted:       #A9B4CC;
    --accent-text: #F2C14E;  /* accent used for text (sport titles, links) */
    --link:        #F2C14E;
    --hover:       rgba(255,255,255,.04);
    --chip:        #1C2C63;
    --live-text:   #FF8F92;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: clip; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
h1 { font-family: var(--font-title); font-size: 24px; letter-spacing: -0.02em; margin: 0; display: flex; align-items: center; gap: 10px; }
/* Title + star + LIVE side by side; the star stays outside the <h1> so Google doesn't read "star" in the title */
.page-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.page-title .fav-btn { margin-left: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 600; color: var(--text); }
.num { font-variant-numeric: tabular-nums; }
.pad { padding: 0 16px 16px; margin: 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }

.icon { font-size: 20px; line-height: 1; vertical-align: middle; display: inline-block; width: 1em; overflow: hidden; white-space: nowrap; flex-shrink: 0; }
.icon-svg { display: inline-flex; align-items: center; justify-content: center; height: 1em; overflow: visible; }
.icon-svg svg { width: 1.1em; height: 1.1em; display: block; }
.flag { display: inline-block; flex: 0 0 auto; width: 20px; height: 14px; border-radius: 2px; background-size: cover; background-position: center; box-shadow: 0 0 0 1px rgba(127,127,127,.25); margin-right: 8px; vertical-align: -2px; }
.flag--none { background: #8A93A8; }

/* ---------- Header: one line ---------- */
.site-header { background: var(--header); border-bottom: 1px solid var(--header-line); color: var(--header-text); }
.header-bar { display: flex; align-items: center; gap: 12px; height: 60px; }
.logo { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; text-decoration: none !important; }
.logo-text { font-family: var(--font-title); font-weight: 700; font-size: 21px; letter-spacing: -0.03em; color: #fff; }
.logo-gold { color: var(--gold); }

.sport-tabs { flex: 1; min-width: 0; height: 100%; display: flex; align-items: stretch; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.sport-tabs::-webkit-scrollbar { display: none; }
.sport-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--header-muted); font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none !important; }
.sport-tab .icon { font-size: 19px; }
.sport-tab:hover { color: #fff; }
.sport-tab.is-active { color: #fff; border-bottom-color: var(--gold); }
.all-sports[aria-expanded="true"] { color: #fff; }
.all-sports[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.header-tools { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.tool-btn { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.tool-btn:hover, .tool-btn[aria-expanded="true"] { background: rgba(255,255,255,.1); }
.live-btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--live); color: #fff !important; font-weight: 700; font-size: 13px; text-decoration: none !important; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; }

.search-bar { padding-top: 12px; padding-bottom: 12px; }
.search { max-width: 520px; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 999px; background: #fff; color: #5A6478; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: #0B1530; font: inherit; outline: none; }

.all-sports-menu { padding-bottom: 14px; }
.menu-panel { background: #fff; color: #0B1530; border-radius: 14px; padding: 18px; display: flex; flex-wrap: wrap; gap: 28px; }
.menu-col { flex: 1 1 260px; display: flex; flex-direction: column; gap: 6px; }
.menu-title { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #5A6478; padding: 0 8px 4px; }
.menu-title .icon { font-size: 16px; }
.menu-grid { columns: 2; column-gap: 12px; }
.menu-grid .menu-item { break-inside: avoid; }
.menu-item { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 8px; border-radius: 8px; color: #0B1530; font-weight: 600; text-decoration: none !important; }
.menu-item .icon { font-size: 19px; color: #2447A8; }
a.menu-item:hover { background: #EEF2FA; }
.menu-item.is-soon { color: #7A8294; font-weight: 400; }
.menu-item.is-soon .icon { color: #A3AABA; }
.menu-item small { margin-left: auto; font-size: 11px; color: #7A8294; }

/* ---------- Settings menu (☰) ---------- */
.settings-wrap { display: flex; justify-content: flex-end; padding-bottom: 14px; }
.settings-panel { width: 100%; max-width: 360px; background: #fff; color: #0B1530; border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.settings-group { display: flex; flex-direction: column; gap: 8px; }
.settings-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; }
.settings-title .icon { font-size: 18px; color: #2447A8; }
.segmented { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: #EEF2FA; }
.segmented button, .segmented a { flex: 1; display: inline-flex; align-items: center; justify-content: center; height: 36px; border: 0; border-radius: 999px; background: transparent; color: #3A4458; font-weight: 600; font-size: 13px; text-decoration: none !important; }
.segmented [aria-pressed="true"] { background: #0B1530; color: #fff; }

/* ---------- Add to calendar ---------- */
.cal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; background: var(--card); border-radius: var(--radius); }
.cal-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; margin-right: 4px; }
.cal-label .icon { color: var(--accent-text); }
.cal-hint { flex-basis: 100%; }
.btn { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--chip); color: var(--text) !important; font-weight: 600; font-size: 13px; text-decoration: none !important; }
.btn:hover { filter: brightness(1.08); }

/* ---------- Favourites ---------- */
.fav-btn { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-left: 6px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.fav-btn .icon { font-size: 20px; }
.fav-btn:hover { background: var(--hover); color: var(--text); }
.fav-btn[aria-pressed="true"] { color: #E0A800; }
.fav-btn[aria-pressed="true"] .icon { font-variation-settings: 'FILL' 1; }
.fav-btn--lg { width: 40px; height: 40px; } .fav-btn--lg .icon { font-size: 26px; }
.sport-head { display: flex; align-items: center; }
.comp-head { padding-right: 8px !important; }
.comp-head .fav-btn { margin-right: 0; }
.fav-count { font-size: 12px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: rgba(255,255,255,.14); display: inline-flex; align-items: center; justify-content: center; }
.stab--fav .icon { font-size: 18px; }
.stab--fav.is-active { background: #E0A800; color: #0B1530; }
.stab--fav.is-active .icon { font-variation-settings: 'FILL' 1; }

/* ---------- Layout: results + one side column ---------- */
.columns { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; padding-top: 20px; padding-bottom: 40px; }
.col-main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.col-side { flex: 1 1 280px; max-width: 320px; display: flex; flex-direction: column; gap: 16px; }
/* Today page: the side block starts level with the first results card, not with the date bar */
.columns:has(.toolbar) .col-side { margin-top: 56px; }

.card { background: var(--card); border-radius: var(--radius); overflow: hidden; }
.card-title { margin: 0; padding: 14px 16px 10px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.upcoming { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 8px 14px; border-top: 1px solid var(--line); color: var(--text); }
.upcoming-when { font-size: 11px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.upcoming-when time { display: inline; }
.upcoming:hover { background: var(--hover); text-decoration: none; }
.upcoming-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 13px; line-height: 1.3; }
.upcoming-body .strong { font-size: 13px; }
.upcoming-venue { font-size: 11px; }
.upcoming-venue .flag { width: 16px; height: 11px; margin-right: 6px; }
.upcoming-sport { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-text); opacity: .75; }
.upcoming-venue { display: inline-flex; align-items: center; }
.date-chip { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 44px; height: 46px; border-radius: 10px; background: var(--chip); color: var(--text); font-size: 11px; line-height: 1.15; }
.date-chip strong { font-size: 17px; }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.day-nav { display: flex; align-items: center; background: var(--card); border-radius: 999px; }
.day-nav a { width: 42px; height: 40px; display: flex; align-items: center; justify-content: center; color: var(--text); border-radius: 999px; }
.day-nav a:hover { background: var(--hover); text-decoration: none; }
.day-nav { position: relative; }
.day-label { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--text); font-weight: 600; min-width: 150px; text-align: center; }
.day-label:hover, .day-label[aria-expanded="true"] { background: var(--hover); }
.day-cal-icon { font-size: 18px; color: var(--muted); }
.day-picker { position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; width: 300px; max-width: calc(100vw - 24px); padding: 12px; border-radius: 14px; background: var(--card); color: var(--text); box-shadow: 0 10px 30px rgba(0,0,0,.22); }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dp-title { font-weight: 700; }
.dp-nav { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--text); font-size: 22px; line-height: 1; }
.dp-nav:hover { background: var(--hover); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.dp-wd { font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 0; text-transform: uppercase; }
.dp-day { position: relative; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 14px; }
.dp-day:hover { background: var(--hover); }
.dp-day.has-ev { color: var(--text); font-weight: 700; }
.dp-day.has-ev::after { content: ''; position: absolute; left: 50%; bottom: 5px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--gold); }
.dp-day.is-today { box-shadow: inset 0 0 0 1.5px var(--muted); }
.dp-day.is-cur { background: #0B1530; color: #fff; }
html[data-theme="dark"] .dp-day.is-cur { background: var(--gold); color: #0B1530; }
.dp-today { width: 100%; height: 36px; margin-top: 8px; border: 0; border-radius: 999px; background: var(--chip); color: var(--text); font-weight: 600; }
.status-tabs, .sub-tabs { display: flex; gap: 4px; }
.stab { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 600; white-space: nowrap; text-decoration: none !important; }
.stab span { font-size: 12px; opacity: .8; }
.stab .stab-label { font-size: inherit; opacity: 1; }
.stab:hover { color: var(--text); }
.stab.is-active { background: var(--card); color: var(--text); }
.stab--live { color: var(--live-text); }
.stab--live.is-active { background: var(--live); color: #fff; }

/* Favourites mode: the day's list makes way for the followed events */
body.fav-mode .col-main .sport-block, body.fav-mode #day-empty, body.fav-mode #filter-empty, body.fav-mode .day-nav { display: none !important; }
.fav-list { display: flex; flex-direction: column; gap: 18px; }
.fav-section { display: flex; flex-direction: column; gap: 10px; }
.fav-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fav-chip { display: inline-flex; align-items: center; max-width: 100%; padding: 2px 2px 2px 12px; border-radius: 999px; background: var(--card); font-size: 13px; font-weight: 600; }
.fav-chip > span:not(.flag) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav-chip .fav-btn { margin-left: 2px; }
.fav-title { margin: 4px 0 0; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.sub-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sub-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.comp-filter { min-width: 0; }
.cal-wrap { position: relative; }
.cal-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--text); font-size: 13px; font-weight: 600; }
.cal-btn .icon { font-size: 17px; color: var(--muted); }
.cal-btn[aria-expanded="true"] { background: var(--hover); }
.cal-wrap .day-picker--right { left: auto; right: 0; transform: none; }
.event-row.is-picked { background: rgba(242, 193, 78, .14); box-shadow: inset 3px 0 0 var(--gold); }
.comp-filter select { max-width: 200px; height: 32px; padding: 0 26px 0 12px; border: 1px solid var(--line); border-radius: 999px; background-color: var(--card); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; text-overflow: ellipsis; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) 14px, calc(100% - 11px) 14px; background-size: 4px 4px; background-repeat: no-repeat; }
.note { margin: 0; padding: 10px 14px; background: var(--card); border-radius: var(--radius); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); background: var(--card); border-radius: var(--radius); display: flex; flex-direction: column; gap: 8px; align-items: center; margin: 0; }
.empty p, .empty h1 { margin: 0; }

/* ---------- Sport blocks (what should stand out) ---------- */
.sport-block { display: flex; flex-direction: column; gap: 10px; }
.sport-head { margin: 6px 0 0; font-family: var(--font-title); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.sport-head a { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-text); text-decoration: none; }
.sport-head .icon { font-size: 24px; }
.sport-head a:hover { text-decoration: underline; }

.comp { background: var(--card); border-radius: var(--radius); overflow: hidden; scroll-margin-top: 16px; }
.comp-head { display: flex; align-items: center; padding: 10px 16px; background: var(--card-head); font-size: 13px; }
.comp-name { flex: 1; font-weight: 600; color: var(--text); text-decoration: none; }
a.comp-name:hover { text-decoration: underline; }
.comp-dates { color: var(--muted); font-size: 12px; }

.event-row { display: flex; align-items: center; border-top: 1px solid var(--line); padding-right: 8px; }
.event-row:hover { background: var(--hover); }
.ev-link { flex: 1; min-width: 0; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; min-height: 52px; padding: 8px 4px 8px 16px; color: var(--text); }
.ev-link:hover { text-decoration: none; }
.event-row > .fav-btn { margin-left: 2px; }
.ev-time { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text); }
.event-row.is-finished .ev-time { color: var(--muted); }
.ev-date { font-size: 11px; color: var(--muted); white-space: nowrap; }
.ev-link.has-date { grid-template-columns: 80px minmax(0, 1fr) auto; }
.ev-name { font-weight: 600; min-width: 0; }
.ev-detail { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.ev-result { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; text-align: right; font-size: 13px; }
.ev-winner { display: inline-flex; align-items: center; font-weight: 600; }
.ev-value { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ev-tbc { font-size: 12px; color: var(--muted); }
.ev-cancel { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.event-row.is-cancelled .ev-name, .event-row.is-postponed .ev-name { color: var(--muted); text-decoration: line-through; }
.live-tag { display: inline-block; padding: 2px 6px; border-radius: 4px; background: var(--live); color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; width: max-content; }

/* ---------- Sport & event pages ---------- */
.page-head { display: flex; flex-direction: column; gap: 4px; }
.page-head h1 .icon { font-size: 28px; color: var(--accent-text); }
.page-head p { margin: 0; }
.sport-about { margin-top: 24px; padding: 0 4px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.sport-about h2 { font-size: 14px; margin: 0 0 4px; }
.sport-about p { margin: 0; max-width: 720px; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.breadcrumb .icon { font-size: 16px; }
.pos { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--chip); color: var(--text); font-size: 12px; font-weight: 700; }
.pos--1 { background: var(--pos-1); color: #0B1530; }
.pos--2 { background: var(--pos-2); color: #0B1530; }
.pos--3 { background: var(--pos-3); color: #0B1530; }
table.results { width: 100%; border-collapse: collapse; }
.results th { white-space: nowrap; text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 16px; }
.results td { padding: 11px 16px; border-top: 1px solid var(--line); }
.results .num { text-align: right; }
.results .num, .results .col-note { white-space: nowrap; }
.results .col-note { padding-left: 20px; }
/* Athlete cell: flag | name | nation | star, always in the same columns */
.td-athlete { width: 100%; }
.athlete { display: flex; align-items: center; gap: 0; }
.athlete .flag { flex: 0 0 auto; }
.athlete-name { flex: 1 1 auto; min-width: 0; }
.athlete-nat { flex: 0 0 40px; text-align: left; margin-left: 10px; }
.athlete .fav-btn { flex: 0 0 auto; margin-left: 0; }
.table-scroll { overflow-x: auto; }
.res-note { display: none; }

.site-footer { border-top: 1px solid var(--line); padding: 18px 0 28px; font-size: 13px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.footer-lang { margin-left: auto; display: flex; gap: 10px; }
.footer-lang a { color: var(--muted); font-weight: 600; }
.footer-lang a[aria-current] { color: var(--text); }

/* ---------- Ads (space reserved so the page doesn't jump) ---------- */
.ad-row { padding-top: 16px; }
.ad { display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: var(--radius); }
.ad--top { min-height: 90px; }
.ad--infeed { min-height: 120px; }
.ad--sidebar { min-height: 250px; }
.ad--event { min-height: 250px; }
.ad-preview { width: 100%; min-height: inherit; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--muted); border-radius: var(--radius); color: var(--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- Cookie consent ---------- */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 560px; margin: 0 auto; padding: 16px; border-radius: var(--radius); background: #FFFFFF; color: #0B1530; box-shadow: 0 8px 30px rgba(0,0,0,.25); display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 13px; }
.consent p { flex: 1 1 260px; margin: 0; }
.consent-actions { display: flex; gap: 8px; }
.consent-btn { height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid #C9D0DC; background: #fff; color: #0B1530; font-weight: 600; }
.consent-btn--yes { background: #0B1530; border-color: #0B1530; color: #fff; }

/* ==========================================================
   Phones (most visitors) – below 760 px
   ========================================================== */
@media (max-width: 760px) {
  .wrap { padding-left: 12px; padding-right: 12px; }
  .header-bar { flex-wrap: wrap; height: auto; gap: 0; }
  .logo { order: 1; flex: 1; height: 54px; }
  .logo-text { font-size: 19px; }
  .header-tools { order: 2; gap: 4px; }
  .tool-btn { width: 38px; height: 38px; }
  .upcoming:nth-of-type(n+4) { display: none; }
  .live-btn { padding: 0 10px; }
  .sport-tabs { order: 3; flex: 1 1 100%; height: 46px; margin: 0 -12px; padding: 0 4px; border-top: 1px solid var(--header-line); }
  .sport-tab { padding: 0 10px; font-size: 13px; }
  .search { max-width: none; }
  .settings-panel { max-width: none; }
  .menu-panel { padding: 12px; gap: 14px; }
  .menu-grid { column-gap: 4px; }
  .menu-item { gap: 8px; padding: 0 4px; font-size: 13px; }

  .columns { gap: 16px; padding-top: 14px; }
  .col-main, .col-side { flex: 1 1 100%; max-width: none; }
  .columns:has(.toolbar) .col-side { margin-top: 0; }

  .columns, .col-main, .col-side, .col-main > * { min-width: 0; max-width: 100%; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 8px; width: 100%; }
  .day-nav { justify-content: space-between; width: 100%; min-width: 0; }
  .day-label { min-width: 0; flex: 1; }
  .comp-filter select { max-width: 130px; }
  .cal-btn .cal-txt { display: none; }
  .cal-btn .icon { font-size: 19px; color: var(--text); }
  .cal-btn { padding: 0 9px; }
  .cal-wrap .day-picker--right { left: auto; right: 0; transform: none; }
  .day-picker { left: 50%; transform: translateX(-50%); }
  .status-tabs { width: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; gap: 2px; }
  .status-tabs::-webkit-scrollbar { display: none; }
  .stab { flex: 0 0 auto; padding: 0 10px; height: 34px; font-size: 13px; gap: 4px; }
  .stab--fav { margin-left: auto; padding: 0 9px; }
  .stab--fav .stab-label { display: none; }
  .consent { left: 10px; right: 10px; bottom: 10px; max-width: calc(100% - 20px); padding: 14px; }
  .consent p { flex-basis: 100%; }
  .consent-actions { width: 100%; }
  .consent-btn { flex: 1; }

  .sport-head { font-size: 17px; }
  .comp-head { padding: 9px 12px; }
  .ev-link { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; padding: 8px 2px 8px 12px; min-height: 56px; }
  .ev-link.has-date { grid-template-columns: 68px minmax(0, 1fr) auto; }
  .ev-date { font-size: 10.5px; }
  .event-row { padding-right: 4px; }
  .event-row > .fav-btn { width: 36px; height: 36px; margin-left: 0; }
  .ev-name { font-size: 14px; }
  .ev-winner-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .results th, .results td { padding: 10px 12px; }
  .results .col-note { display: none; }
  .athlete-nat { display: none; }
  .results th, .results td { padding-left: 8px; padding-right: 8px; }
  .results th:first-child, .results td:first-child { padding-left: 12px; }
  .results th:last-child, .results td:last-child { padding-right: 12px; }
  .res-note { display: block; font-size: 11px; font-weight: 400; color: var(--muted); white-space: nowrap; }
  .ev-cancel { font-size: 12px; }
  h1 { font-size: 21px; }

  .ad--top { min-height: 100px; }
  .ad--sidebar { display: none; }
}

/* Very small phones (iPhone SE 1st gen…) */
@media (max-width: 359px) {
  .stab { padding: 0 7px; font-size: 12px; }
  .stab span { font-size: 11px; }
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .dp-day.is-cur { background: var(--gold); color: #0B1530; }
}

/* Legal page */
.legal { padding: 4px 20px 16px; line-height: 1.6; }
.legal h2 { font-size: 15px; margin: 18px 0 4px; }
.legal p { margin: 0 0 8px; color: var(--text); }
.footer-link { color: var(--muted); }

/* Competition page */
.section-title { font-size: 15px; margin: 24px 4px 8px; }
.podiums { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.podium { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: var(--card); border-radius: 14px; text-decoration: none; color: var(--text); }
.podium:hover { outline: 1px solid var(--accent-text); }
.podium-ev { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.podium-row { display: flex; align-items: center; gap: 6px; font-size: 13px; min-width: 0; }
.podium-rank { width: 14px; color: var(--muted); font-weight: 600; }
.podium-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-res { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.other-comps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.other-comps a { color: var(--text); font-weight: 600; text-decoration: none; }
.other-comps a:hover { text-decoration: underline; }
.comp-link { color: var(--accent-text); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 2px; }
.comp-link .icon { font-size: 16px; }

/* Mobile: denser lists, closer to LiveScore / Sofascore */
@media (max-width: 760px) {
  body { font-size: 13.5px; }
  .logo { height: 48px; }
  .logo-text { font-size: 18px; }
  .tool-btn { width: 34px; height: 34px; }
  .live-btn { height: 32px; font-size: 13px; }
  .sport-tabs { height: 40px; }
  .sport-tab { font-size: 12.5px; padding: 0 9px; }
  .sport-tab .icon { font-size: 17px; }
  .columns { padding-top: 10px; gap: 12px; }
  .toolbar { gap: 6px; }
  .day-nav a { height: 34px; width: 38px; }
  .stab { height: 30px; font-size: 12.5px; padding: 0 9px; }
  .sport-block { gap: 6px; }
  .sport-head { font-size: 15px; margin-top: 4px; }
  .sport-head .icon { font-size: 19px; }
  .sport-head .fav-btn { width: 30px; height: 30px; }
  .comp-head { padding: 6px 10px; font-size: 12.5px; }
  .comp-head { padding-right: 4px !important; }
  .comp-head .fav-btn { width: 32px; height: 32px; margin-left: 2px; }
  .ev-link { min-height: 42px; padding: 5px 2px 5px 10px; gap: 8px; grid-template-columns: 42px minmax(0, 1fr) auto; }
  .ev-link.has-date { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .ev-time { font-size: 12.5px; }
  .ev-name { font-size: 13.5px; font-weight: 500; }
  .event-row > .fav-btn { width: 32px; height: 32px; }
  .fav-btn .icon { font-size: 18px; }
  .page-head h1, h1 { font-size: 19px; }
  .upcoming-body { font-size: 12.5px; }
}

@media (max-width: 760px) {
  /* "Coming up" repeats the list above on phones: only shown on pages without events */
  .columns:has(.col-main .event-row) .upcoming-card { display: none; }
  .col-main { gap: 10px; }
  .sport-head { margin-top: 2px; }
  .ev-name { font-size: 13px; }
  .comp-head .comp-name { font-size: 12.5px; }
}

/* Footer always at the bottom of the screen, even on short pages */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > .wrap { width: 100%; }
.site-footer { margin-top: auto; }
@media (max-width: 760px) { .site-footer { padding: 14px 0 18px; } }

/* Search: suggestions under the search bar + results page */
.search-bar { position: relative; }
.search-suggest { position: absolute; left: 16px; right: 16px; max-width: 560px; top: calc(100% - 6px); z-index: 60; background: var(--card); color: var(--text); border-radius: 14px; box-shadow: 0 10px 30px rgba(11, 21, 48, .25); max-height: 70vh; overflow: auto; padding: 6px 0; }
.search-suggest .sr-sec + .sr-sec { border-top: 1px solid var(--line); }
.search-suggest .sr-title { margin: 8px 14px 2px; }
.sg-all { display: block; padding: 10px 14px; border-top: 1px solid var(--line); font-weight: 600; color: var(--accent-text); text-decoration: none; font-size: 13px; }
.sg-empty { padding: 14px; color: var(--muted); font-size: 13px; } .sg-empty p { margin: 0; }
.sr-sec { margin-bottom: 14px; }
.col-main .sr-sec { background: var(--card); border-radius: 14px; overflow: hidden; }
.sr-title { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 12px 14px 4px; }
.sr-list { display: flex; flex-direction: column; }
.sr-item { display: flex; align-items: center; gap: 10px; padding: 8px 14px; color: var(--text); text-decoration: none; min-width: 0; }
a.sr-item:hover { background: var(--hover); text-decoration: none; }
.sr-item--sub { padding-left: 46px; padding-top: 3px; padding-bottom: 3px; }
.sr-item.is-soon { opacity: .6; }
.sr-main { display: flex; flex-direction: column; min-width: 0; font-size: 14px; line-height: 1.3; }
.sr-main strong { font-weight: 600; }
.sr-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) { .search-suggest { left: 12px; right: 12px; max-width: none; } }

/* Athlete page */
.ath-head h1 .flag-lg { width: 30px; height: 22px; border-radius: 3px; }
.ath-stats { display: flex; gap: 18px; margin: 6px 0 2px !important; font-size: 13px; color: var(--muted); }
.ath-stats strong { font-size: 18px; color: var(--text); margin-right: 3px; }
.ath-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 14px; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; }
.ath-row:first-child { border-top: 0; }
.ath-row:hover { background: var(--hover); text-decoration: none; }
.ath-rank { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; background: var(--chip); }
.ath-rank.is-p1 { background: #F2C14E; color: #3b2a00; } .ath-rank.is-p2 { background: #C9D1DC; color: #1d2633; } .ath-rank.is-p3 { background: #D9A37A; color: #3a1f0b; }
.ath-ev { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.ath-ev strong { font-weight: 600; font-size: 14px; }
.ath-ev .muted { display: flex; align-items: center; gap: 6px; }
.ath-res { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
a.athlete-name { color: inherit; text-decoration: none; } a.athlete-name:hover { text-decoration: underline; }
.sr-item--ath { padding-right: 6px; }
.sr-item--ath .sr-link { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--text); text-decoration: none; }
.sr-item--ath:hover { background: var(--hover); }

.fav-chip-link { color: inherit; text-decoration: none; } .fav-chip-link:hover { text-decoration: underline; }

/* ---------- Team sports (NHL): game rows, badges, score, standings ---------- */
.team-badge { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; font-size: 7.5px; font-weight: 800; letter-spacing: .02em; line-height: 1; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.team-badge--lg { width: 52px; height: 52px; font-size: 14px; }
.team-logo { flex: 0 0 auto; width: 24px; height: 24px; object-fit: contain; }
.team-logo.team-badge--lg { width: 52px; height: 52px; }
.match-row .ev-link { min-height: 58px; grid-template-columns: 64px minmax(0, 1fr) auto; }
.match-row .ev-time { white-space: nowrap; }
.linescore .athlete, .standings .athlete { gap: 8px; }
.m-teams { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.m-team { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 500; }
.m-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-team.is-win, .m-scores .is-win { font-weight: 700; }
.match-row.is-finished .m-team:not(.is-win) { color: var(--muted); }
.m-scores { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; font-variant-numeric: tabular-nums; font-size: 15px; line-height: 24px; min-width: 18px; }
.match-row.is-live .m-scores { color: var(--live-text); font-weight: 700; }
.m-final { font-size: 12px; color: var(--muted); }
.match-row .live-tag { font-size: 10.5px; padding: 2px 5px; }

.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 22px 16px; margin-bottom: 16px; }
.sb-team { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-width: 0; }
.sb-name { font-weight: 700; font-size: 16px; }
.sb-mid { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sb-score { font-family: var(--font-title); font-size: 40px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.sb-dash { margin: 0 10px; color: var(--muted); }
.sb-time { font-family: var(--font-title); font-size: 30px; font-weight: 700; }
.sb-state { font-size: 13px; font-weight: 600; }
.scoreboard.is-live .sb-score { color: var(--live-text); }
.linescore td, .linescore th { white-space: nowrap; }
.goal-period { margin: 6px 0 0; padding: 8px 16px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--card-head); }
.goals { list-style: none; margin: 0; padding: 0; }
.goal { display: grid; grid-template-columns: 48px 24px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); }
.goal-time { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); }
.goal-who { min-width: 0; }
.goal-assists { display: block; margin-top: 2px; }
.goal-tag { display: inline-block; margin-left: 6px; padding: 1px 5px; border-radius: 4px; background: var(--chip); font-size: 10.5px; font-weight: 700; vertical-align: 1px; }
.goal-score { font-variant-numeric: tabular-nums; font-weight: 700; }
.goals-none { padding: 0 16px 14px; }
.standings .pos { min-width: 22px; }
.trademark-note { margin-top: 18px; }
@media (max-width: 760px) {
  .team-badge { width: 22px; height: 22px; font-size: 7px; }
  .match-row .ev-link { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .match-row .ev-time { font-size: 12px; }
  .m-teams, .m-scores { gap: 4px; }
  .m-scores { line-height: 22px; font-size: 14px; }
  .sb-score { font-size: 32px; }
  .sb-name { font-size: 14px; }
  .team-badge--lg { width: 44px; height: 44px; font-size: 12px; }
  .goal { grid-template-columns: 40px 22px minmax(0, 1fr) auto; gap: 8px; padding: 9px 12px; }
}
