:root {
  color-scheme: light;
  --bg: #fff;
  --surface: #f6f6f6;
  --hover: #faf8f5;
  --line: #e4e4e4;
  --text: #333;
  --muted: #777;
  --subtle: #999;
  --orange: #fd9527;
  --orange-wash: #fff4e8;
  --green: #258967;
  --red: #b95c60;
  --mono: 'IBM Plex Mono', monospace;
  --sans: 'Rubik', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1e1e1e;
  --surface: #252525;
  --hover: #292622;
  --line: #363636;
  --text: #eee;
  --muted: #aaa;
  --subtle: #888;
  --orange-wash: #392a1d;
  --green: #86bb9c;
  --red: #d58b8b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body { font: 13px/1.6 var(--sans); color: var(--text); background: var(--bg); }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: wait; opacity: .5; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
[hidden] { display: none !important; }
::selection { background: #fd952744; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: fixed; top: -80px; left: 15px; padding: 12px; z-index: 100; background: var(--orange); color: #222; }
.skip-link:focus { top: 10px; }
.site-header { height: 57px; padding: 0 18px; display: flex; justify-content: space-between; align-items: center; gap: 25px; border-bottom: 1px solid var(--line); }
.brand-group, .brand, .header-actions { display: flex; align-items: center; }
.brand-group { min-width: 0; gap: 12px; }
.brand { gap: 9px; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand > svg { color: var(--orange); }
h1 { font-size: 16px; font-weight: 600; letter-spacing: -.4px; }
h1 span { font-weight: 400; }
.slash { font-size: 19px; color: #ccc; font-weight: 300; }
.brand-group > p { color: var(--subtle); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-actions { gap: 12px; flex-shrink: 0; }
.search { display: flex; align-items: center; gap: 7px; height: 32px; width: 200px; padding: 0 9px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); }
.search:focus-within { border-color: var(--orange); }
.search input { background: transparent; color: var(--text); border: 0; width: 100%; min-width: 0; font-size: 12px; outline: none; }
.search input::placeholder { color: var(--subtle); }
.search svg { flex-shrink: 0; }
kbd { font: 10px var(--mono); color: var(--subtle); white-space: nowrap; }
.search kbd { flex-shrink: 0; }
.icon-button { display: grid; place-items: center; height: 30px; width: 30px; background: none; border: 0; border-radius: 4px; }
.icon-button:hover { background: var(--surface); }
.help-button { background: var(--orange); color: #26201a; border: 0; border-radius: 4px; padding: 7px 11px; font-size: 12px; }
.help-button > span { margin-left: 8px; }
.help-button:hover { background: #ffab50; }
.workspace { height: calc(100dvh - 94px); display: flex; flex-direction: column; }
.league-bar { display: flex; align-items: center; justify-content: space-between; padding: 0 18px; gap: 20px; border-bottom: 1px solid var(--line); min-height: 57px; }
.league-tabs { display: flex; align-self: stretch; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.league-tabs::-webkit-scrollbar { display: none; }
.league-tabs > button { display: flex; align-items: center; gap: 7px; position: relative; padding: 0 13px; border: 0; white-space: nowrap; background: none; color: var(--muted); font-size: 12px; }
.league-tabs > button:first-child { padding-left: 0; padding-right: 15px; }
.league-tabs > button > span { font: 10px var(--mono); color: var(--subtle); background: var(--surface); padding: 0 4px; border-radius: 3px; }
.league-tabs > button.active { color: var(--text); font-weight: 500; }
.league-tabs > button.active::after { content: ''; position: absolute; bottom: 0; left: 12px; right: 12px; height: 2px; background: var(--orange); }
.league-tabs > button:first-child.active::after { left: 0; }
.league-tabs > button.active > span { background: var(--orange-wash); color: #b7752e; }
.league-tabs > button:hover { color: var(--text); background: var(--surface); }
.flag { display: inline-block; width: 16px; height: 11px; border-radius: 1px; box-shadow: inset 0 0 0 1px #00000012; flex-shrink: 0; vertical-align: middle; }
.flag-eng { background: linear-gradient(90deg,transparent 42%,#cf3744 42% 58%,transparent 58%),linear-gradient(transparent 38%,#cf3744 38% 63%,transparent 63%),#fff; }
.flag-es { background: linear-gradient(#bd3942 25%,#f5cc57 25% 75%,#bd3942 75%); }
.flag-it { background: linear-gradient(90deg,#348564 33%,#fff 33% 66%,#cc4853 66%); }
.flag-de { background: linear-gradient(#373737 33%,#c74541 33% 66%,#eac750 66%); }
.flag-fr { background: linear-gradient(90deg,#365495 33%,#fff 33% 66%,#cf4954 66%); }
.season { flex-shrink: 0; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); padding: 3px 9px; border-radius: 4px; font: 700 11px var(--mono); }
.season-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--orange); }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 57px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.table-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.table-title h2 { font-size: 14px; font-weight: 500; white-space: nowrap; }
.toolbar-divider { color: #ccc; }
#club-count { color: var(--muted); font: 11px var(--mono); white-space: nowrap; }
.country { font-size: 11px; color: var(--subtle); border-left: 1px solid var(--line); padding-left: 12px; }
.table-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.table-actions button { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); border: 1px solid transparent; border-radius: 4px; background: none; padding: 4px 8px; min-height: 30px; }
.table-actions button:hover { background: var(--surface); color: var(--text); }
.table-actions button[aria-pressed="true"] { color: #b2691a; background: var(--orange-wash); border-color: #fd952750; }
.table-actions button > span:first-child { font-size: 16px; line-height: 1; }
#favorite-count { font: 10px var(--mono); padding: 0 3px; color: var(--subtle); }
.action-divider { height: 16px; width: 1px; background: var(--line); margin-inline: 3px; }
.refresh-icon { display: inline-block; font-size: 19px !important; }
#refresh-button[aria-busy="true"] .refresh-icon { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.table-scroll { flex: 1; min-height: 0; overflow: auto; scrollbar-color: #ccc transparent; scrollbar-width: thin; }
table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 1110px; table-layout: fixed; }
.col-star { width: 34px; }
.col-rank { width: 47px; }
.col-club { width: 240px; }
.col-league { width: 155px; }
.col-stat { width: 59px; }
.col-ppg { width: 76px; }
.col-rate { width: 102px; }
th { position: sticky; top: 0; z-index: 3; height: 39px; padding: 0 12px; border-bottom: 1px solid var(--line); text-align: right; color: var(--muted); background: var(--surface); font-size: 11px; font-weight: 400; white-space: nowrap; }
th:nth-child(3), th:nth-child(4) { text-align: left; }
th:first-child { left: 0; z-index: 6; padding: 0; }
th:nth-child(2) { left: 34px; z-index: 6; padding: 0 9px; text-align: center; }
th:nth-child(3) { left: 81px; z-index: 6; }
th button { border: 0; color: inherit; background: none; font-size: inherit; padding: 8px 0; width: 100%; text-align: inherit; white-space: nowrap; }
th button:hover { color: var(--text); }
.sort-arrow { font-size: 9px; margin-left: 2px; }
th[aria-sort="ascending"], th[aria-sort="descending"] { color: var(--text); }
td { height: 53px; border-bottom: 1px solid var(--line); padding: 6px 12px; text-align: right; vertical-align: middle; font: 12px var(--mono); background: var(--bg); }
td:nth-child(3), td:nth-child(4) { text-align: left; }
td:first-child { position: sticky; left: 0; z-index: 2; padding: 0; text-align: center; }
td:nth-child(2) { position: sticky; left: 34px; z-index: 2; padding: 0 9px; text-align: center; color: var(--muted); }
td:nth-child(3) { position: sticky; left: 81px; z-index: 2; }
tr:hover td { background: var(--hover); }
tr.league-start td { border-top: 2px solid #c9c9c9; }
.favorite-star { border: 0; background: none; width: 30px; height: 34px; color: #b9b9b9; font-size: 17px; }
.favorite-star[aria-pressed="true"] { color: #db8a28; }
.favorite-star:hover { color: var(--orange); }
.rank-number { position: relative; }
.rank-number::before { content: ''; position: absolute; left: -9px; top: 50%; width: 2px; height: 21px; transform: translateY(-50%); background: var(--zone,transparent); border-radius: 2px; }
.club-button { display: flex; align-items: center; gap: 12px; min-width: 0; width: 100%; border: 0; background: none; text-align: left; padding: 0; }
.crest { display: inline-grid; place-items: center; width: 27px; height: 29px; flex: 0 0 27px; position: relative; }
.crest img { max-width: 27px; max-height: 29px; object-fit: contain; position: relative; }
.crest-fallback { display: none; font: 9px var(--mono); background: var(--surface); border: 1px solid var(--line); padding: 3px; border-radius: 3px; }
.crest.failed .crest-fallback, .crest.no-image .crest-fallback { display: block; }
.crest.failed img { display: none; }
.club-text { min-width: 0; display: flex; flex-direction: column; }
.club-name { font: 400 12px/1.5 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.club-button:hover .club-name { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.club-code { font: 9px/1.6 var(--mono); color: var(--subtle); letter-spacing: .25px; }
.league-cell { display: flex; align-items: center; gap: 8px; font: 11px var(--sans); color: var(--muted); }
.league-cell .flag { width: 14px; height: 10px; }
.points-col { background: var(--orange-wash); }
td.points { font-weight: 600; color: var(--text); }
.points > span { display: inline-block; min-width: 27px; padding: 2px 4px; background: var(--surface); border-radius: 3px; }
.positive { color: var(--green); }
.negative { color: var(--red); }
.neutral { color: var(--subtle); }
.rate-cell { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.rate-track { width: 25px; height: 3px; background: var(--line); flex-shrink: 0; }
.rate-track > i { display: block; height: 100%; background: var(--subtle); }
.empty-state { padding: 60px 20px; text-align: center !important; color: var(--muted); font-family: var(--sans); }
.empty-state button { display: block; border: 1px solid var(--line); background: var(--surface); border-radius: 4px; padding: 8px 15px; margin: 15px auto 0; font-size: 12px; }
.table-footnote { padding: 19px 18px 26px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.legend { display: flex; flex-wrap: wrap; gap: 15px; }
.legend > span { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted); }
.zone-dot { width: 5px; height: 5px; display: inline-block; border-radius: 1px; }
.champions { background: #86b8a2; }
.europa { background: #b2a3cf; }
.conference { background: #b8bc81; }
.relegation { background: #d39393; }
.table-footnote p { color: var(--subtle); font-size: 9px; }
.status-bar { height: 37px; border-top: 1px solid var(--line); padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--bg); font: 10px var(--mono); }
.source-status, .status-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.source-status { font-size: 10px; }
#sync-status { color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 10px; }
.connection-dot { width: 5px; height: 5px; flex-shrink: 0; border-radius: 50%; background: #cfad76; }
.connection-dot.online { background: #75a98a; }
.connection-dot.error { background: #c77a72; }
.source-status a { white-space: nowrap; font-size: 9px; color: var(--subtle); text-decoration: underline dotted; text-underline-offset: 3px; }
.status-right { flex-shrink: 0; gap: 9px; color: var(--muted); }
#next-refresh { font-size: 9px; color: var(--subtle); }
.footer-divider { margin-inline: 5px; color: var(--line); }
#clock { font-variant-numeric: tabular-nums; font-size: 11px; }
.timezone { color: var(--subtle); font-size: 9px; }
dialog { color: var(--text); background: var(--bg); border: 1px solid var(--line); padding: 28px; margin: auto; width: 540px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 40px); overflow: auto; border-radius: 7px; box-shadow: 0 20px 90px #0002; }
dialog::backdrop { background: #0005; backdrop-filter: blur(2px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.eyebrow { font: 10px var(--mono); color: var(--muted); letter-spacing: 1px; }
.close-button { border: 0; background: var(--surface); color: var(--muted); border-radius: 4px; width: 28px; height: 28px; font-size: 21px; line-height: 1; }
.close-button:hover { color: var(--text); }
dialog h2 { font-size: 24px; font-weight: 500; line-height: 1.3; margin: 0 0 12px; }
dialog p { font-size: 12px; line-height: 1.9; color: var(--muted); }
.help-list { margin: 22px 0; }
.help-list > div { padding: 12px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 115px 1fr; gap: 16px; }
.help-list dt { font-size: 11px; font-weight: 500; }
.help-list dd { font-size: 11px; color: var(--muted); line-height: 1.9; }
.stat-glossary { display: flex; flex-wrap: wrap; gap: 6px; }
.stat-glossary span { background: var(--surface); padding: 3px 6px; border-radius: 3px; color: var(--muted); font: 9px var(--mono); }
.help-credit { margin-top: 24px; padding-top: 17px; border-top: 1px solid var(--line); font-size: 10px !important; }
.help-credit a { text-decoration: underline dotted; }
.team-dialog { position: fixed; inset: 0 0 0 auto; margin: 0; width: 420px; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; padding: 27px; border-block: 0; border-right: 0; }
.detail-club { margin: 24px 0; }
.detail-club .crest { width: 65px; height: 65px; margin-bottom: 20px; }
.detail-club .crest img { max-width: 65px; max-height: 65px; }
.detail-club h2 { margin-bottom: 9px; font-size: 27px; }
.detail-league { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.detail-primary { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding-block: 24px; border-block: 1px solid var(--line); }
.detail-primary dt { font-size: 10px; color: var(--muted); }
.detail-primary dd { font: 500 40px var(--mono); margin-top: 5px; }
.detail-primary dd > small { font: 12px var(--sans); color: var(--subtle); }
.detail-stats { display: grid; grid-template-columns: repeat(3,1fr); margin: 18px 0; }
.detail-stats > div { padding: 13px 0; }
.detail-stats dt { font-size: 10px; color: var(--muted); }
.detail-stats dd { font: 18px var(--mono); margin-top: 4px; }
.detail-note { padding: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 11px; line-height: 1.8; margin: 14px 0 25px; }
.detail-links { display: flex; gap: 12px; flex-wrap: wrap; }
.detail-links a, .detail-links button { border: 1px solid var(--line); background: none; padding: 8px 12px; border-radius: 4px; font-size: 11px; }
.detail-links button.saved { border-color: #fd952766; background: var(--orange-wash); }
.detail-updated { margin-top: 22px; font-size: 10px !important; }
.noscript { padding: 20px; }
@media(min-width:1600px) { td { height: 56px; } .col-club { width: 290px; } }
@media(max-width:1150px) {
  .brand-group > p, .slash { display: none; }
  .league-tabs { gap: 0; }
  .league-tabs > button { font-size: 11px; padding-inline: 10px; gap: 5px; }
  .league-tabs > button > span { font-size: 9px; }
  .table-footnote { flex-direction: column; align-items: flex-start; gap: 12px; }
}
@media(max-width:800px) {
  .site-header { padding-inline: 14px; gap: 15px; }
  h1 { font-size: 14px; }
  .brand > svg { width: 21px; }
  .header-actions { gap: 7px; }
  .search { width: 170px; }
  .help-button { font-size: 11px; }
  .league-bar { padding-inline: 14px; gap: 10px; }
  .league-tabs > button { padding-inline: 11px; }
  .league-tabs > button > span { display: none; }
  .season { font-size: 10px; padding-inline: 7px; }
  .table-toolbar { padding-inline: 14px; }
  .country { display: none; }
  .table-actions { gap: 2px; }
  .table-actions button { padding-inline: 7px; }
  .status-bar { padding-inline: 14px; }
  #next-refresh, .footer-divider { display: none; }
}
@media(max-width:560px) {
  .site-header { height: 55px; padding-inline: 12px; gap: 10px; }
  .brand { gap: 6px; }
  .brand > svg { width: 20px; }
  h1 { font-size: 12px; letter-spacing: -.2px; }
  .header-actions { gap: 4px; }
  .search { width: 123px; height: 30px; padding-inline: 7px; }
  .search input { font-size: 10px; }
  .search kbd { display: none; }
  .icon-button { width: 26px; }
  .help-button { font-size: 0; width: 28px; height: 28px; padding: 0; }
  .help-button::before { content: '?'; font-size: 14px; }
  .help-button span { display: none; }
  .workspace { height: calc(100dvh - 92px); }
  .league-bar { min-height: 48px; padding-inline: 12px; gap: 8px; }
  .league-tabs > button { font-size: 11px; gap: 6px; padding-inline: 10px; }
  .league-tabs > button:first-child { padding-right: 13px; }
  .season { font-size: 9px; padding: 3px 5px; gap: 4px; }
  .season-dot { width: 4px; height: 4px; }
  .table-toolbar { min-height: 49px; padding: 7px 12px; gap: 8px; }
  .table-title { gap: 7px; }
  .table-title h2 { font-size: 12px; }
  #club-count { font-size: 9px; }
  .table-actions .button-label, #favorite-count, .action-divider { display: none; }
  .table-actions button { padding-inline: 7px; }
  #reset-sort { font-size: 9px; padding-inline: 3px; }
  table { min-width: 1080px; }
  .col-club { width: 198px; }
  .col-star { width: 28px; }
  .col-rank { width: 35px; }
  th:nth-child(2), td:nth-child(2) { left: 28px; padding-inline: 5px; }
  th:nth-child(3), td:nth-child(3) { left: 63px; padding-inline: 8px; }
  .club-button { gap: 8px; }
  .club-name { font-size: 11px; }
  .club-code { font-size: 8px; }
  .crest { width: 23px; flex-basis: 23px; }
  .crest img { max-width: 23px; max-height: 25px; }
  td { height: 51px; }
  .favorite-star { width: 25px; font-size: 16px; }
  .rank-number::before { left: -5px; }
  .table-footnote { padding: 17px 12px; }
  .legend { gap: 10px; }
  .legend > span { font-size: 8px; }
  .table-footnote p { font-size: 8px; }
  .status-bar { padding-inline: 12px; gap: 12px; }
  .source-status { gap: 6px; }
  #sync-status { font-size: 8px; }
  .source-status a { display: none; }
  .status-right { gap: 5px; }
  #clock { font-size: 10px; }
  .timezone { font-size: 8px; }
  dialog { padding: 22px; }
  dialog h2 { font-size: 21px; }
  .help-list > div { grid-template-columns: 1fr; gap: 6px; }
  .team-dialog { width: min(100vw,420px); }
}
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; } }

/* Season calendar: same compact controls and typography as the standings. */
.calendar-view { flex: 1; min-height: 0; overflow: auto; }
.calendar-toolbar { min-height: 88px; padding: 20px 22px; display: flex; justify-content: space-between; align-items: center; gap: 24px; border-bottom: 1px solid var(--line); }
.calendar-heading .eyebrow { font-size: 9px; letter-spacing: .6px; }
.calendar-heading h2 { font-size: 25px; font-weight: 500; line-height: 1.3; margin-top: 4px; }
.calendar-controls { display: flex; gap: 10px; align-items: center; }
.calendar-controls button, .calendar-controls select { color: var(--text); background: var(--bg); border: 1px solid var(--line); height: 32px; border-radius: 4px; padding: 0 11px; font: 11px var(--sans); }
.calendar-controls select { max-width: 160px; }
.calendar-controls button:hover { background: var(--surface); }
.month-navigation { display: flex; }
.month-navigation button { font-size: 21px; width: 33px; padding: 0; border-radius: 4px 0 0 4px; }
.month-navigation button + button { border-left: 0; border-radius: 0 4px 4px 0; }
#calendar-refresh { font-size: 20px; padding-inline: 9px; }
.calendar-layout { display: grid; grid-template-columns: minmax(0,1fr) 345px; min-height: calc(100% - 88px); }
.month-panel { padding: 20px 22px 28px; min-width: 0; }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); border: 1px solid var(--line); border-bottom: 0; background: var(--surface); }
.calendar-weekdays span { font: 9px var(--mono); color: var(--muted); padding: 11px 13px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.calendar-day { display: flex; flex-direction: column; text-align: left; min-height: 112px; background: var(--bg); border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 11px 12px; color: var(--text); position: relative; }
.calendar-day:hover { background: var(--hover); }
.calendar-day.selected { background: var(--orange-wash); box-shadow: inset 0 0 0 1px var(--orange); }
.calendar-day.outside { background: var(--surface); color: var(--subtle); cursor: default; opacity: .6; }
.day-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; width: 100%; }
.day-number { font: 12px var(--mono); }
.calendar-day.today .day-number { background: var(--orange); color: #292017; border-radius: 3px; padding: 2px 4px; margin: -2px -4px; }
.today-label { color: #b67531; font: 7px var(--mono); }
.day-match-count { margin-top: 18px; font: 12px var(--mono); }
.day-match-count small { font: 9px var(--sans); color: var(--muted); }
.day-leagues { display: flex; gap: 4px; margin-top: 9px; }
.league-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; background: #999; }
.league-dot[data-league="eng.1"] { background: #9977b5; }
.league-dot[data-league="esp.1"] { background: #d89958; }
.league-dot[data-league="ita.1"] { background: #6b9ac9; }
.league-dot[data-league="ger.1"] { background: #cb7878; }
.league-dot[data-league="fra.1"] { background: #8ea56a; }
.no-match-mark { color: var(--line); margin-top: 17px; }
.calendar-key { display: flex; flex-wrap: wrap; gap: 17px; margin-top: 19px; }
.calendar-key > span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; }
.calendar-summary { margin-top: 19px; font: 10px var(--mono); color: var(--muted); }
.calendar-explainer { color: var(--subtle); font-size: 10px; margin-top: 8px; }
.match-panel { border-left: 1px solid var(--line); min-width: 0; }
.match-panel-heading { padding: 22px 20px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); }
.match-panel-heading .eyebrow { font-size: 8px; }
.match-panel-heading h3 { font-size: 16px; font-weight: 500; margin-top: 5px; }
#match-count { font: 9px var(--mono); color: var(--muted); white-space: nowrap; }
.match-card { padding: 19px 20px; border-bottom: 1px solid var(--line); }
.match-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); font-size: 10px; }
.match-meta > span:first-child { display: flex; align-items: center; gap: 6px; }
.match-state { font: 8px var(--mono); color: var(--subtle); }
.match-state.finished { color: var(--green); }
.match-state.live { color: #c57326; }
.match-state.changed { color: var(--red); }
.match-body { display: flex; flex-direction: column; align-items: stretch; gap: 12px; margin: 16px 0; }
.match-kickoff { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.match-body time { display: flex; align-items: baseline; gap: 6px; font: 11px var(--mono); color: var(--muted); }
.match-body time small { font-size: 8px; color: var(--subtle); }
.match-teams { min-width: 0; flex: 1; }
.match-teams > div { display: grid; grid-template-columns: 29px minmax(0, 1fr) minmax(2ch, auto); align-items: center; gap: 8px; font-size: 12px; }
.match-teams > div + div { margin-top: 6px; }
.match-teams .crest { width: 23px; height: 24px; flex-basis: 23px; }
.match-teams .crest img { max-width: 23px; max-height: 23px; }
.match-teams .match-team-name { min-width: 0; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; line-height: 1.5; }
.match-teams strong { font: 500 13px var(--mono); text-align: right; white-space: nowrap; }
.match-bottom { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; color: var(--subtle); font-size: 9px; line-height: 1.5; }
.match-bottom > span { flex: 1; min-width: 0; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; }
.match-bottom a { flex-shrink: 0; white-space: nowrap; color: var(--muted); }
.match-empty { padding: 65px 20px; text-align: center; color: var(--muted); }
.match-empty > span { font: 27px var(--mono); color: var(--line); }
.match-empty p { font-size: 12px; margin-top: 20px; }
.match-empty small { display: block; color: var(--subtle); font-size: 10px; margin-top: 8px; }
@media(min-width:1600px) { .calendar-layout { grid-template-columns: minmax(0,1fr) 390px; } .calendar-day { min-height: 130px; } }
@media(max-width:1100px) { .calendar-layout { grid-template-columns: minmax(0,1fr) 310px; } .month-panel { padding: 16px; } .calendar-day { padding: 9px; min-height: 98px; } .day-match-count small { font-size: 8px; } .today-label { display: none; } }
@media(max-width:850px) { .calendar-layout { grid-template-columns: 1fr; } .match-panel { border-left: 0; border-top: 1px solid var(--line); } .match-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); } .match-card:nth-child(odd) { border-right: 1px solid var(--line); } .match-empty { grid-column: 1/-1; padding: 35px 20px; } .calendar-day { min-height: 94px; } }
@media(max-width:560px) { .calendar-toolbar { padding: 16px 12px; gap: 10px; flex-wrap: wrap; } .calendar-heading h2 { font-size: 21px; } .calendar-controls { gap: 7px; width: 100%; justify-content: flex-end; } .calendar-controls select { margin-right: auto; font-size: 10px; } .month-panel { padding: 12px; } .calendar-weekdays span { padding: 9px 6px; font-size: 8px; } .calendar-day { padding: 8px 6px; min-height: 81px; } .day-number { font-size: 11px; } .day-match-count { margin-top: 15px; font-size: 10px; } .day-match-count small { display: none; } .day-leagues { gap: 3px; margin-top: 7px; } .day-leagues .league-dot { width: 4px; height: 4px; } .calendar-key { gap: 10px; margin-top: 14px; } .calendar-key > span { font-size: 8px; } .calendar-explainer { font-size: 9px; } .calendar-summary { font-size: 9px; } .match-list { grid-template-columns: 1fr; } .match-card:nth-child(odd) { border-right: 0; } .match-panel-heading { padding: 20px; } }

/* Original team identifiers: generic home-color shirts with readable initials. */
.kit-icon { display: inline-flex; align-items: center; justify-content: center; width: 35px; height: 39px; flex: 0 0 35px; }
.kit-icon svg { display: block; width: 100%; height: 100%; overflow: visible; }
.detail-club .kit-large { width: 82px; height: 90px; margin-bottom: 18px; }
.match-teams .kit-icon { width: 29px; height: 32px; flex-basis: 29px; }
.match-teams > div > .kit-icon { overflow: visible; }
@media(max-width:560px) { .club-button { gap: 7px; } .club-button .kit-icon { width: 31px; height: 35px; flex-basis: 31px; } }
.calendar-months { display: grid; grid-template-columns: repeat(10,minmax(70px,1fr)); overflow-x: auto; border-bottom: 1px solid var(--line); }
.calendar-months button { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 12px 15px; color: var(--muted); background: var(--bg); border: 0; border-right: 1px solid var(--line); font: 11px var(--mono); position: relative; }
.calendar-months button:hover { background: var(--surface); }
.calendar-months button.active { background: var(--orange-wash); color: var(--text); }
.calendar-months button.active::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--orange); }
.calendar-months small { display: block; color: var(--subtle); font-size: 8px; margin-top: 3px; }
.month-total { color: var(--subtle); font-size: 9px; }
@media(max-width:850px) { .calendar-months button { padding: 10px; } .calendar-months .month-total { display: none; } }
