:root {
  --ink:#142743; --muted:#526680; --line:#d2dbe6; --orange-wash:#fff0e4;
  --content:min(100% - 32px,1120px); --bottom-height:68px;
  --tone:#526680; --tone-bg:#e1e7ef;
}
html {min-height:100%;scroll-padding-top:125px}
body {min-height:100vh;min-height:100dvh}
[hidden]{display:none!important}
svg {width:20px;height:20px;flex:none;vertical-align:middle}
.app-header {position:sticky;top:0;z-index:5;background:var(--navy);color:white;border-bottom:3px solid var(--orange);padding-top:env(safe-area-inset-top)}
.header-inner {width:var(--content);margin:auto;padding-bottom:8px}
.header-toolbar,.header-page {display:flex;align-items:center;gap:8px}
.header-toolbar {min-height:44px}
#search-toggle {margin-inline-start:auto}
.header-page {min-height:44px}
.app-header:not(.has-back) .header-inner {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;padding-block:6px}
.app-header:not(.has-back) .header-page {grid-column:1;grid-row:1}
.app-header:not(.has-back) .header-toolbar {grid-column:2;grid-row:1}
.header-logo {width:44px;height:44px;display:grid;place-items:center;flex:none}
.header-logo img {width:40px;height:40px;object-fit:contain}
.header-title {min-width:0}
.header-title h1 {color:white;font-size:clamp(1.18rem,4.6vw,1.5rem);font-weight:800;letter-spacing:-.025em;line-height:1.12;margin:0;overflow-wrap:anywhere}
#header-team-details {color:#c4d0e0;font-size:.78rem;line-height:1.35;margin:4px 0 0;overflow-wrap:anywhere}
.icon-button {display:inline-grid;place-items:center;width:44px;height:44px;flex:none;border:0;border-radius:10px;background:#e5ebf3;color:var(--navy);padding:0;cursor:pointer}
.icon-button:disabled {opacity:.38;cursor:default}
.app-header .icon-button {background:transparent;color:white;border:0}
.app-header .icon-button svg {width:21px;height:21px}
.app-header .icon-button:focus-visible,.header-logo:focus-visible {outline:2px solid #ffb176;outline-offset:-3px}
#header-favorite[aria-pressed=true] {color:#e87824}
#header-favorite[aria-pressed=true] svg {fill:currentColor}
#search {width:var(--content);margin:0 auto;padding:0 0 10px}
#search input {display:block;width:100%;min-height:44px;border:1px solid #76869c;border-radius:9px;background:white;padding:8px 12px;color:var(--navy)}
#app {width:var(--content);max-width:none;margin:0 auto;padding:16px 0 calc(var(--bottom-height) + env(safe-area-inset-bottom) + 24px);min-height:calc(100dvh - 76px)}
.bottom-nav {position:fixed;z-index:8;inset:auto 0 0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;padding:6px max(8px,calc((100% - 660px)/2)) calc(6px + env(safe-area-inset-bottom));background:var(--navy);box-shadow:0 -2px 12px #14274319}
.bottom-nav a {display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;min-height:55px;padding:5px 4px;border-radius:8px;color:#e8eef7;font-size:.72rem;font-weight:750;text-decoration:none}
.bottom-nav a span {font-size:inherit}
.bottom-nav a[aria-current] {background:var(--secondary);box-shadow:inset 0 3px var(--orange);color:white}
.bottom-nav svg {width:21px;height:21px}
.tabs {border-bottom:0;gap:4px}
.schedule-controls .tabs,.segmented .tabs,.tabs.segmented {display:flex;flex-wrap:nowrap;align-items:center;padding:4px;gap:4px;background:var(--navy);border:0;border-radius:11px;margin-bottom:12px}
.schedule-controls .tabs button,.segmented .tabs button,.tabs.segmented button {flex:1;color:white;background:none;border:0;border-radius:8px;white-space:nowrap;font-size:.88rem;font-weight:750;min-height:44px;padding:6px}
.schedule-controls .tabs button[aria-pressed=true],.segmented .tabs button[aria-pressed=true],.tabs.segmented button[aria-pressed=true] {color:var(--navy);background:white;border-radius:8px}
.tabs.league-tabs {overflow:auto;scrollbar-width:thin}
.tabs.league-tabs button{flex:1 0 auto;padding-inline:14px}
.filters,.schedule-controls .filters {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:10px}
.filters>label,.filters>div{min-width:0;font-size:.74rem}
.filters label select,.competition-picker summary{width:100%;height:44px;margin:0;font-size:.78rem}
.competition-picker summary{padding:5px 7px;line-height:1.1}
.competition-options{z-index:4}
.schedule-panel{color:#0e2941;background:white;border:1px solid #d3dce5;border-radius:13px;box-shadow:0 2px 7px #1427430d;margin-bottom:12px}
.date-bar{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;padding:2px 6px}
.date-bar .icon-button{color:inherit;background:none;border:0;width:44px;min-height:44px}
.date-bar .icon-button:disabled{opacity:.35}
.date-picker svg,.schedule-actions svg{width:19px;height:19px;flex:none}
.date-picker svg{color:#e87824}
.schedule-actions{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid #d3dce5}
.schedule-actions button{position:relative;display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:4px;color:inherit;background:none;border:0;font-size:.84rem;font-weight:750}
.schedule-actions button + button::before{content:'';position:absolute;left:0;top:9px;bottom:9px;border-left:1px solid #d3dce5}
.schedule-actions button[aria-pressed=true]{color:#8b3b0b;background:#fff0e4;border-radius:0 0 12px 0;box-shadow:inset 0 -2px #e87824}
.schedule-actions button[aria-expanded=true]{background:#edf0f5}
.schedule-filter-count{display:grid;place-items:center;min-width:19px;height:19px;padding:0 3px;background:#e87824;color:#0e2941;border-radius:20px;font-size:.72rem}
#schedule-filters{border-top:1px solid #d3dce5;padding:10px}
#schedule-filters .filters{align-items:start}
#schedule-filters .competition-options{position:static;width:100%;min-width:0;margin-top:4px}
#schedule-filters .competition-actions{flex-wrap:wrap}
.schedule-filter-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px}
.schedule-filter-actions button{min-height:44px}
.schedule-filter-actions .schedule-apply{background:#0e2941;color:white;border-color:#0e2941}
@media(max-width:510px){#schedule-filters .filters{grid-template-columns:1fr 1fr}#schedule-filters .filters>div{grid-column:1/-1}}
.date-picker{position:relative;min-width:0;display:flex;min-height:44px;justify-content:center;align-items:center;gap:5px;font-weight:800;font-size:.84rem;text-align:center;cursor:pointer}
.date-picker input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.date-picker input::-webkit-calendar-picker-indicator{position:absolute;inset:0;width:100%;height:100%;cursor:pointer}
.date-picker:has(input:focus-visible){outline:2px solid var(--orange);border-radius:5px}
.tone-mls{--tone:#21664c;--tone-bg:#d9eee2}
.tone-ga{--tone:#a14c15;--tone-bg:#fce7d6}
.tone-uysa{--tone:#526680;--tone-bg:#e1e7ef}
.tone-cup{--tone:#23568c;--tone-bg:#dce9fb}
.tone-dpl{--tone:#65449b;--tone-bg:#eee5fa}
.tone-dal{--tone:#23568c;--tone-bg:#dce9fb}
.badge{background:var(--tone-bg);color:var(--tone);padding:4px 7px;border-radius:5px;font-size:.73rem;line-height:1.2}
.match-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,275px),1fr));gap:10px}
.match{border-radius:12px;padding:11px 12px;border-top:3px solid var(--tone);box-shadow:0 1px 2px #1427430b}
.match-meta{gap:6px;font-size:.74rem;margin-bottom:5px}
.match-meta strong a{display:inline-flex;min-height:28px;align-items:center}
.side{min-height:34px;font-size:.94rem;gap:9px}
.side a{display:inline-flex;min-height:32px;align-items:center;overflow-wrap:anywhere}
.side b{font-size:1.08rem}
.match-foot{font-size:.82rem;min-height:28px;padding-top:4px;gap:4px}
.venue-label{display:flex;align-items:center;gap:5px}
.venue-label svg{width:15px;height:15px}
.match + .more,.match-grid + .more{margin-top:12px}
.team-list{border:0;background:transparent;display:grid;gap:8px}
.team-row,.team-row+.team-row{border:1px solid var(--line);border-left:3px solid var(--tone);background:white;border-radius:11px;padding:8px 8px 8px 10px}
.team-row a{gap:8px}
.team-row strong{font-size:.94rem;line-height:1.22}
.team-row small{font-size:.76rem;margin-top:2px}
.chevron,.league-chevron{color:var(--muted)}
.chevron svg,.league-chevron svg{width:17px}
.star{display:inline-grid;place-items:center;background:var(--orange-wash);border:1px solid var(--orange);border-radius:9px;color:#a44810;width:44px;height:44px;padding:0;flex:none}
.star[aria-pressed=true] svg{fill:var(--orange);stroke:#a44810}
.favorite-empty{text-align:center;display:grid;justify-items:center;gap:10px;padding:25px}
.favorite-empty>svg{width:30px;height:30px;color:#a44810}
.favorite-empty .more{display:flex;align-items:center;background:var(--navy);color:white}
.league-list{display:grid;gap:9px;grid-template-columns:repeat(auto-fill,minmax(min(100%,255px),1fr))}
.league-card{display:flex;align-items:center;gap:12px;padding:12px;background:white;border:1px solid var(--line);border-left:3px solid var(--tone);border-radius:11px;min-height:65px}
.league-symbol{width:38px;height:38px;border-radius:9px;background:var(--tone-bg);color:var(--tone);display:grid;place-items:center;flex:none}
.league-chevron{margin-left:auto}
.league-summary{display:flex;align-items:center;gap:10px;padding:10px 12px;margin-bottom:10px;border:1px solid var(--line);background:white;border-radius:11px}
.league-summary{border-left:3px solid var(--tone)}
.league-summary p{font-size:.82rem}
.dashboard-panel{padding:0;overflow:hidden;margin-bottom:12px;border-radius:12px}
.panel-title{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:46px;padding:0 12px;background:var(--navy);color:#fff}
.panel-title h2{margin:0;font-size:.94rem}
.text-action{border:0;background:transparent;color:white;text-decoration:underline;font-size:.78rem;font-weight:700;min-height:44px}
.panel-body{padding:11px}
.panel-body .date-group:last-child,.panel-body .metrics:last-child,.panel-body .table-wrap:last-child{margin-bottom:0}
.panel-body .empty{border:0;background:#f3f6fa;padding:11px}
.team-forms>div{padding:7px 0;border-bottom:1px solid var(--line)}
.team-forms a{display:block;font-weight:700;margin-bottom:3px}
.hero-metrics,.metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-bottom:10px}
.stat-hero,.metrics>div{border:1px solid var(--line);border-radius:10px;background:#fff;padding:9px;min-width:0}
.stat-hero{display:grid;align-content:start;gap:4px}
.stat-hero.best{background:#fff0e4}.stat-hero.win{background:#e6f4eb}
.stat-hero>svg{width:18px;height:18px;color:var(--navy)}
.stat-hero strong,.metrics strong{font-size:clamp(1.2rem,5vw,1.7rem);font-weight:850;letter-spacing:-.03em;overflow-wrap:anywhere}
.stat-hero span,.stat-hero small,.metrics span{font-size:.73rem;color:var(--muted)}
.stat-hero a{font-size:.8rem;font-weight:750;text-decoration:underline}
.stat-hero .chart{margin:2px 0 0;height:7px}
.metrics>div:nth-child(4n+2){background:#eaf2fb}.metrics>div:nth-child(4n+3){background:#e9f6ee}
.tight-note{font-size:.76rem;margin:0 0 10px}
.league-table .city-row,.league-table .focused{background:#fff0e4}
.table-wrap{max-width:100%}
td,th{font-size:.79rem;padding:8px}
tbody th{min-width:112px}
.interactive-form{display:flex;gap:5px;flex-wrap:wrap}
.interactive-form button{min-height:44px;min-width:44px;border:0;border-radius:7px;font-weight:850}
.form-detail{margin-top:8px}
.w{background:#d8eee2;color:#12693c}.d{background:#e4e8ef;color:#435570}.l{background:#fbe3e3;color:#a52424}
.performance-legend{display:flex;gap:12px;font-size:.75rem;margin-bottom:6px}
.performance-legend span:before{display:inline-block;content:'';width:8px;height:8px;margin-right:4px;border-radius:2px;background:#23568c}
.performance-legend span+span:before{background:#a14c15}
.performance-row{display:grid;grid-template-columns:65px minmax(0,1fr) 48px;align-items:center;gap:8px;font-size:.75rem;padding:5px 0}
.bar{height:5px;border-radius:4px;background:#23568c}
.bar.conceded{margin-top:3px;background:#a14c15}
.loading{display:grid;gap:10px;color:var(--muted)}
.skeleton{display:block;height:44px;border-radius:10px;background:#dce4ef}.skeleton+.skeleton{height:100px}
@media(max-width:430px){
  :root{--content:calc(100% - 24px)}
  .team-row a{grid-template-columns:auto minmax(0,1fr) auto;gap:4px 7px}
  .team-row .club-logo{grid-row:span 2}
  .team-row .badge{grid-column:2;justify-self:start}
  .team-row .chevron{grid-column:3;grid-row:1 / span 2}
  .date-picker svg{width:15px;height:15px}
  .date-picker{font-size:.76rem}
  .filters select{padding:4px;font-size:.75rem}
  .match-grid,.league-list{grid-template-columns:1fr}
  .metrics>div{padding:7px}
}
@media(min-width:768px){.schedule-controls{max-width:680px}.team-list{grid-template-columns:repeat(2,minmax(0,1fr))}.league-tabs{max-width:780px}}

.team-count {margin:0 0 10px;color:var(--muted);font-size:.85rem}
.league-more {margin-top:12px}
.league-more summary {width:fit-content;cursor:pointer}
.league-more[open] summary {margin-bottom:12px}

.league-symbol img{display:block;width:100%;height:100%;object-fit:contain;padding:2px}

.match[data-match-card]{cursor:pointer}
.match-details{max-width:790px;margin:auto}
.detail-scoreboard{background:#142743;color:white;border-radius:14px;padding:14px 10px;text-align:center;margin-bottom:12px}
.detail-competition,.detail-score-grid,.detail-duo{display:grid;align-items:center;gap:8px}
.detail-competition{display:flex;justify-content:center;flex-wrap:wrap;color:#a3b1c5;font-size:.85rem}
.detail-score-grid{grid-template-columns:minmax(0,1fr) minmax(66px,auto) minmax(0,1fr);margin:12px 0}
.detail-team{display:grid;justify-items:center;align-content:center;gap:4px;min-width:0;min-height:44px;color:inherit;text-align:center;overflow-wrap:anywhere}
.detail-team strong{font-size:.87rem;line-height:1.2}
.detail-team .club-logo,.detail-team .crest{width:54px;height:54px;object-fit:contain}
.detail-scoreboard small,.detail-scoreboard p{color:#a3b1c5}
.detail-scoreboard p,.detail-weather p{margin:0}
.detail-score strong{display:block;font-size:clamp(1.1rem,5vw,2rem);line-height:1.15}
.detail-score small{display:block;color:#ffad70;font-weight:750;text-transform:uppercase;max-width:100px;margin:3px auto}
.detail-card,.detail-weather{border:1px solid #d2dbe6;background:white;border-radius:12px;margin:0 0 12px;overflow:hidden}
.detail-card h2{background:#344963;color:white;font-size:1rem;margin:0;padding:10px 13px}
.detail-body,.detail-weather{padding:12px}
.detail-body p{margin:0 0 8px}
.detail-info{margin:0}
.detail-info>div,.detail-stat>div:first-child{display:grid;grid-template-columns:minmax(105px,1fr) minmax(0,1.7fr);gap:8px;padding:7px 0;border-bottom:1px solid #d2dbe6}
.detail-info dt,.detail-actions a,.detail-actions button{display:flex;align-items:center;gap:6px}
.detail-info dd{margin:0;overflow-wrap:anywhere}
.detail-info svg,.detail-actions svg{width:18px;height:18px;flex:none;color:#b95010}
.detail-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.detail-actions a,.detail-actions button{min-height:44px;padding:6px 9px;background:#fff0e4;border:1px solid #e87824;border-radius:8px;color:#142743;font-weight:700}
.detail-weather{background:#e2edf9}
.detail-weather h2{font-size:1rem;margin:0 0 4px}
.detail-form-row+.detail-form-row{margin-top:10px}
.detail-form{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
.detail-form a{display:grid;place-items:center;width:44px;min-height:44px;color:white;font-weight:800;border-radius:8px}
.detail-form .w{background:#16834b}.detail-form .d{background:#61718a}.detail-form .l{background:#d83b3b}
.detail-position{display:flex;align-items:center;gap:10px;padding:6px 8px;margin-bottom:4px;border-radius:7px}
.detail-position a{display:flex;align-items:center;min-height:44px}
.detail-position-city{background:#fff0e4}
.detail-duo{grid-template-columns:1fr 1fr;margin-bottom:10px}
.detail-note{font-size:.82rem;color:#526680}
.detail-stat{padding:6px 0}
.detail-stat>div:first-child{grid-template-columns:1fr 2fr 1fr;text-align:center;border:0}
.detail-bar{display:flex;gap:3px;height:5px;border-radius:5px;overflow:hidden}
.detail-city{background:#e87824}.detail-opponent{background:#a3b1c5}.detail-draw{background:#d2dbe6}
.detail-h2h-record{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;text-align:center;margin:10px 0}
.detail-h2h-record div{display:grid;background:#edf0f5;border-radius:8px;padding:8px;overflow-wrap:anywhere}
/* A squad that plays in several competitions shows one badge per competition. */
.team-badges{display:flex;flex-wrap:wrap;gap:4px;justify-content:flex-end}
.squad-competitions{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 10px}
@media(max-width:460px){.team-row .team-badges{grid-column:2;justify-content:flex-start}}

/* Team Matches timeline: results above the "Today" line, upcoming games below. */
.timeline-now{display:flex;align-items:center;gap:10px;margin:6px 0 14px;color:var(--orange);font-weight:800;font-size:.82rem;letter-spacing:.02em;scroll-margin-top:80px}
.timeline-now::before,.timeline-now::after{content:"";flex:1;height:2px;background:var(--orange);opacity:.55;border-radius:2px}
.match-timeline .date-group:last-child{margin-bottom:0}
/* Team page tabs stay visible while scrolling (under the sticky header). */
.segmented.profile-tabs{position:sticky;top:var(--header-h,0px);z-index:4;background:var(--paper);padding:8px 0 4px;margin-top:-8px}
.segmented.profile-tabs .tabs{margin-bottom:8px}
/* Compact cards in the team Matches timeline: no location line; W/D/L beside the result. */
.match.compact .match-meta{margin-bottom:6px}
.match.compact .result-mark{margin-left:auto}
.match.compact .result-mark + b{margin-left:8px}
.match.compact .result-mark .form span{min-width:22px;height:22px}
.timeline-now{scroll-margin-top:calc(var(--header-h,0px) + 60px)}
/* Favorite team games on the schedule: listed first each day, marked with a star. */
.match.is-favorite{box-shadow:inset 0 0 0 2px var(--orange)}
.fav-mark{display:inline-grid;place-items:center;color:var(--orange)}
.fav-mark svg{width:16px;height:16px;fill:currentColor}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* Schedule tools in the top bar, next to search. */
#header-filter:not([hidden]){margin-inline-start:auto;position:relative}
#header-filter:not([hidden]) ~ #search-toggle{margin-inline-start:0}
.app-header #header-filter,.app-header #header-dates{color:white}
.app-header #header-filter[aria-expanded=true],.app-header #header-dates[aria-pressed=true]{background:var(--orange);color:white}
#header-filter svg,#header-dates svg{width:21px;height:21px}
.header-count{position:absolute;top:3px;right:3px;display:grid;place-items:center;min-width:17px;height:17px;padding:0 3px;border-radius:9px;background:var(--orange);color:white;font-size:.66rem;font-weight:800;box-shadow:0 0 0 2px var(--navy)}
#header-filter[aria-expanded=true] .header-count{background:var(--navy)}
/* League sections on the Schedule page: one card per league. Collapsed it is just the header
   row; expanded, the games sit inside the same card under a divider. */
.league-section{margin:0 0 12px;background:white;border:1px solid var(--line);border-radius:14px;overflow:hidden;box-shadow:0 1px 2px #1427430d}
.league-section-head{display:flex;align-items:center;gap:10px;width:100%;min-height:54px;padding:8px 14px 8px 12px;border:0;border-left:4px solid var(--tone);background:white;color:var(--navy);font:inherit;cursor:pointer;text-align:left}
.league-section-head:hover{background:#f6f8fb}
.league-section-head:focus-visible{outline:2px solid var(--orange);outline-offset:-2px}
.league-section-head .league-symbol{width:32px;height:32px}
.league-section-head strong{flex:1;font-size:.98rem}
.league-count{min-width:26px;padding:2px 8px;border-radius:12px;background:var(--tone-bg);color:var(--tone);font-size:.78rem;font-weight:800;text-align:center}
.league-section-head .league-chevron{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#eef2f7;color:var(--navy)}
.league-section-head .league-chevron svg{width:16px;height:16px;transform:rotate(90deg);transition:transform .15s}
.league-section-head[aria-expanded=true] .league-chevron svg{transform:rotate(-90deg)}
.league-section-body{padding:12px;border-top:1px solid var(--line);border-left:4px solid var(--tone);background:#f6f8fb}
.league-section-body .match{box-shadow:none}
.league-section-body .date-group h3{padding-top:0}
.tone-favorites{--tone:var(--orange);--tone-bg:var(--orange-wash)}
.fav-symbol{display:grid;place-items:center;color:var(--orange)}
.fav-symbol svg{width:22px;height:22px;fill:currentColor}
.league-toggle-all{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 12px 0}
.league-toggle-all span{flex:1;font-weight:750;font-size:.86rem}
@media (prefers-reduced-motion:reduce){.league-chevron svg{transition:none}}
/* League logos beside the team name on team pages. */
.title-row{display:flex;align-items:center;gap:8px;min-width:0}
.title-row h1{min-width:0}
#header-leagues{display:inline-flex;align-items:center;gap:5px;flex:none}
#header-leagues[hidden]{display:none}
#header-leagues img{width:26px;height:26px;object-fit:contain;border-radius:6px;background:white;padding:2px}
.header-league-text{padding:2px 6px;border-radius:6px;background:#ffffff26;color:white;font-size:.66rem;font-weight:800;white-space:nowrap}
.team-filter-panel{display:grid;gap:12px;padding:12px}
.team-filter-panel .filters{margin:0}
/* Team pages: no club logo, larger team name. League pages: league logo + summary line. */
.header-logo[hidden]{display:none}
.team-header .header-title h1{font-size:clamp(1.4rem,6vw,1.85rem);line-height:1.1}
.league-header .header-logo img{width:40px;height:40px;object-fit:contain;background:white;border-radius:9px;padding:3px}
.league-header .header-logo svg{width:26px;height:26px;color:white}
.team-header .header-title h1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal}
.team-header .title-row{flex-wrap:nowrap}
/* Thinner navy card headers */
.panel-title{min-height:26px;padding:3px 12px}
.panel-title h2{font-size:.84rem;line-height:1.25}
.panel-title .text-action{min-height:24px;font-size:.8rem}
/* Swipe preview: the tab (or day arrow) that will open fills in as you drag; its name peeks in from the edge */
.swipe-body{will-change:transform}

/* Schedule: press and hold a league header to reorder */
.league-section-head{-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}
.league-section-head.holding{transform:scale(.985);transition:transform .5s ease-out;filter:brightness(.97)}
.league-reorder{background:white;border:1px solid var(--line);border-radius:14px;padding:12px;display:grid;gap:10px}
.league-reorder-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.league-reorder-head strong{font-size:1rem;color:var(--navy)}
.league-reorder-head p{margin:2px 0 0;color:var(--muted);font-size:.82rem}
.league-reorder-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.league-reorder-row{display:flex;align-items:center;gap:10px;padding:6px 6px 6px 10px;border:1px solid var(--line);border-radius:12px;background:white;touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.league-reorder-row strong{flex:1;min-width:0;color:var(--navy)}
.league-reorder-row.dragging{box-shadow:0 8px 22px rgba(20,39,67,.22);border-color:var(--orange);cursor:grabbing;position:relative;z-index:2}
.drag-handle{display:grid;gap:3px;width:16px;flex:none}
.drag-handle i{display:block;height:2px;border-radius:2px;background:#9aa9bc}
.reorder-move{width:36px;height:36px}
.reorder-move.up svg{transform:rotate(90deg)}
.reorder-move.down svg{transform:rotate(90deg)}
.reorder-move[disabled]{opacity:.35}
.league-reorder .text-action{justify-self:start}
/* Section tabs in the top bar on team and league pages */
.header-tabs{display:block;width:var(--content);margin:0 auto}
.header-tabs[hidden]{display:none}
#header-tabs .header-tab-strip{display:flex;width:100%;flex-wrap:nowrap;gap:4px;overflow-x:auto;scrollbar-width:none;margin:2px 0 0;padding:0;background:none;border:0;border-radius:0}
#header-tabs .header-tab-strip::-webkit-scrollbar{display:none}
#header-tabs .header-tab-strip button{flex:1 0 auto;border-radius:0;position:relative;min-height:40px;padding:6px 12px 10px;border:0;background:none;color:#9fb0c6;font-size:.92rem;font-weight:750;white-space:nowrap;cursor:pointer}
#header-tabs .header-tab-strip button[aria-pressed=true]{color:white}
#header-tabs .header-tab-strip button:focus-visible{outline:2px solid #ffb176;outline-offset:-3px;border-radius:6px}
#header-tabs .header-tab-strip{position:relative}
#header-tabs .tab-indicator{position:absolute;left:0;bottom:0;height:3px;width:0;border-radius:3px 3px 0 0;background:var(--orange);pointer-events:none;will-change:transform,width}
#header-tabs .header-tab-strip button{transition:color .2s}
.app-header.has-tabs{border-bottom-width:0;box-shadow:inset 0 -1px 0 rgba(255,255,255,.12)}
/* Swipe: the next page is drawn beside the current one and slides in with it */
#app{position:relative}
html.swiping,html.swiping body{overflow-x:clip}
.swipe-ghost{position:absolute;pointer-events:none;will-change:transform;contain:paint}
.team-header #header-favorite{margin-left:auto}
/* Team page: "★ Favorite" pill in the top bar */
.app-header #header-favorite{width:auto;height:36px;gap:6px;display:inline-flex;align-items:center;padding:0 12px 0 10px;border:1.5px solid rgba(255,255,255,.55);border-radius:999px;font-weight:800;font-size:.86rem;color:white}
.app-header #header-favorite[hidden]{display:none}
.app-header #header-favorite svg{width:17px;height:17px}
.app-header #header-favorite[aria-pressed=true]{border-color:var(--orange);background:rgba(232,120,36,.16);color:#ffb176}
.app-header #header-favorite[aria-pressed=true] svg{fill:var(--orange);color:var(--orange)}
/* Recent form: each team's form sits on its own card */
.team-forms{display:grid;gap:8px}
.team-forms>div{padding:10px 12px;border:1px solid var(--line);border-bottom:1px solid var(--line);border-radius:12px;background:#f2f5f9}
.panel-body>.interactive-form{padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:#f2f5f9}
/* Compact recent form: team name and results on one line, smaller result tiles */
.team-forms{gap:6px}
.team-forms>div{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 8px 6px 12px;border-radius:10px}
.team-forms>div>a{margin:0;min-width:0;font-size:.9rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.team-forms .interactive-form{flex:none;flex-wrap:nowrap}
.team-forms .form-detail{flex-basis:100%}
.team-forms>div:has(.form-detail:not([hidden])){flex-wrap:wrap}
.team-forms .empty{margin:0;padding:4px 0;font-size:.82rem}
.panel-body>.interactive-form{padding:6px 8px;border-radius:10px}
.interactive-form{gap:4px}
.interactive-form button{min-height:34px;min-width:34px;border-radius:6px;font-size:.85rem}
.team-forms>div>:first-child{flex:1 1 0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}
.team-forms .interactive-form button{min-height:28px;min-width:28px;font-size:.78rem}
.team-forms .interactive-form{gap:3px}
.team-forms{grid-template-columns:minmax(0,1fr)}
.team-forms>div{min-width:0}
/* Team page recent form: score chip with the opponent's crest underneath */
.panel-body>.interactive-form.form-logos{display:flex;justify-content:space-between;gap:6px;padding:10px 8px}
.form-logos .form-chip{flex:1 1 0;max-width:72px;display:grid;justify-items:center;gap:6px;min-height:0;min-width:0;padding:0;border:0;background:none;cursor:pointer}
.form-logos .form-score{display:block;width:100%;padding:4px 0;border-radius:8px;font-weight:850;font-size:.86rem;white-space:nowrap;color:white;text-align:center}
.form-logos .form-score.w{background:#16834b}.form-logos .form-score.d{background:#7a8799}.form-logos .form-score.l{background:#d83b3b}
.form-logos .club-logo,.form-logos .crest{width:26px;height:26px;object-fit:contain;font-size:.62rem}
.form-logos .form-chip[aria-expanded=true] .form-score,.form-logos .form-chip.active .form-score{box-shadow:0 0 0 2px white,0 0 0 4px var(--navy)}
/* Match page: navy card headers like the rest of the app, smaller action buttons */
.detail-card h2{background:var(--navy);font-size:.84rem;line-height:1.25;padding:5px 12px}
.detail-muted{margin:0;color:var(--muted)}
.detail-actions a,.detail-actions button{min-height:34px;padding:4px 10px;font-size:.84rem;border-radius:8px}
.detail-actions svg{width:16px;height:16px}
/* Club-reported scores */
.match-when{-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}
.match-meta strong.reported a{display:inline-flex;align-items:center;gap:5px;padding:2px 8px;border-radius:999px;text-decoration:none;font-size:.78rem}
.match-meta strong.reported.live a{background:#fde8e8;color:#b42323}
.match-meta strong.reported.final a{background:#e4e8ef;color:#435570}
.live-dot{width:7px;height:7px;border-radius:50%;background:#d83b3b;animation:live-pulse 1.4s ease-in-out infinite}
@keyframes live-pulse{50%{opacity:.35}}
@media (prefers-reduced-motion: reduce){.live-dot{animation:none}}
.side b.reported-score{color:#b42323}
.match-meta .match-when.holding,.match-when.holding{opacity:.6}
.score-dialog{border:0;border-radius:16px;padding:0;width:min(92vw,380px);box-shadow:0 18px 48px rgba(20,39,67,.35)}
.score-dialog::backdrop{background:rgba(20,39,67,.55)}
.score-dialog form{display:grid;gap:12px;padding:18px}
.score-dialog h2{margin:0;color:var(--navy);font-size:1.15rem}
.score-sub{margin:-8px 0 0;color:var(--muted);font-size:.84rem}
.score-row{display:grid;grid-template-columns:28px 1fr auto;align-items:center;gap:10px}
.score-row .club-logo,.score-row .crest{width:28px;height:28px;object-fit:contain;font-size:.62rem}
.score-row strong{font-size:.92rem;color:var(--navy);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.stepper{display:flex;align-items:center;gap:6px}
.stepper button{width:40px;height:40px;border-radius:10px;border:1px solid var(--line);background:#eef2f7;color:var(--navy);font-size:1.3rem;font-weight:800;cursor:pointer}
.stepper output{min-width:34px;text-align:center;font-size:1.5rem;font-weight:850;color:var(--navy)}
.score-final{display:flex;align-items:center;gap:8px;font-weight:700;color:var(--navy);font-size:.9rem}
.score-final input{width:20px;height:20px;accent-color:var(--orange)}
.score-code{display:grid;gap:4px;font-weight:700;color:var(--navy);font-size:.9rem}
.score-code[hidden]{display:none}
.score-code input{min-height:44px;border:1px solid #aab7c8;border-radius:10px;padding:8px 12px;font:inherit}
.score-error{margin:0;padding:8px 10px;border-radius:8px;background:#fbe3e3;color:#a52424;font-size:.86rem}
.score-error[hidden]{display:none}
.score-note{margin:0;color:var(--muted);font-size:.78rem}
.score-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px}
.score-actions .text-action{margin-right:auto;color:#a52424}
.toast{position:fixed;left:50%;bottom:calc(var(--bottom-height,64px) + env(safe-area-inset-bottom) + 14px);translate:-50% 0;z-index:30;background:var(--navy);color:white;padding:10px 16px;border-radius:999px;font-weight:700;font-size:.88rem;box-shadow:0 6px 18px rgba(20,39,67,.3)}
.detail-score small.detail-reported{display:inline-block;max-width:none;margin-top:4px;padding:1px 7px;border-radius:999px;font-size:.62rem;letter-spacing:.02em;white-space:nowrap}
.detail-score small.detail-reported.live{background:rgba(216,59,59,.22);color:#ffb3b3}
.detail-score small.detail-reported.final{background:rgba(255,255,255,.14);color:#c9d3e0}
/* Header pills (Favorite on team pages, Add/Update score on match pages): same size, outline and type */
.app-header #header-favorite,.app-header #header-score{width:auto;height:36px;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0 14px 0 12px;border:1.5px solid rgba(255,255,255,.55);border-radius:999px;background:transparent;color:white;font-weight:800;font-size:.86rem;line-height:1;white-space:nowrap}
.app-header #header-favorite svg,.app-header #header-score svg{width:16px;height:16px;flex:none}
.app-header #header-favorite span,.app-header #header-score span{display:block;line-height:1}
.app-header #header-score[hidden],.app-header #header-favorite[hidden]{display:none}
/* Same width for "Add score" and "Update score", so the button doesn't jump after saving */
.app-header #header-score{min-width:142px}
/* Active states use the club orange */
.app-header #header-favorite[aria-pressed=true],.app-header #header-score.has-score{border-color:var(--orange);background:rgba(232,120,36,.16);color:#ffb176}
.app-header #header-favorite[aria-pressed=true] svg{fill:var(--orange);color:var(--orange)}
.match-header #header-score{margin-left:auto}
/* Team Matches tab: clean one-line fixtures (date on top, names · crests · score/time) */
.fx-card{background:white;border:1px solid var(--line);border-radius:16px;padding:4px 14px;margin:0 0 12px}
.fx-title{margin:14px 0 2px;font-size:1.02rem;color:var(--navy);font-weight:850}
.fx-upcoming .fx-title::before,.fx-upcoming .fx-title::after{display:none}
.fx-upcoming .fx-title{display:block;color:var(--navy);letter-spacing:0}
.fx{display:block;padding:10px 0 12px;color:inherit;text-decoration:none;border-bottom:1px solid var(--line)}
.fx:last-child{border-bottom:0}
.fx-top{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:22px}
.fx-date{color:var(--muted);font-size:.82rem;font-weight:650}
.fx-top .badge{font-size:.66rem;padding:2px 7px}
.fx-line{display:grid;grid-template-columns:minmax(0,1fr) 24px auto 24px minmax(0,1fr);align-items:center;gap:8px;margin-top:6px}
.fx-team{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:750;font-size:.9rem;color:var(--navy)}
.fx-home{text-align:right}
.fx-line .club-logo,.fx-line .crest{width:24px;height:24px;object-fit:contain;font-size:.56rem}
.fx-mid{display:grid;justify-items:center;min-width:62px}
.fx-score{display:inline-block;min-width:56px;padding:4px 8px;border-radius:7px;color:white;font-weight:850;font-size:.92rem;text-align:center;white-space:nowrap}
.fx-score.w{background:#16834b}.fx-score.l{background:#d83b3b}.fx-score.d{background:#7a8799}
.fx-score.reported{background:white;color:#b42323;border:1.5px solid #d83b3b;padding:3px 7px}
.fx-score.reported.final{color:#435570;border-color:#7a8799}
.fx-note{font-size:.62rem;font-weight:800;color:#b42323;text-transform:uppercase;margin-top:2px}
.fx-time{font-weight:800;font-size:.95rem;color:var(--navy);white-space:nowrap}
.fx-time small{font-size:.7rem;color:var(--muted)}
.fx-status{font-size:.72rem;font-weight:750;color:var(--muted);text-align:center;line-height:1.2}
.fx-empty{margin:6px 0 12px;color:var(--muted)}
.fx:focus-visible{outline:2px solid var(--orange);outline-offset:2px;border-radius:8px}
/* Match page ⋮ menu */
.app-header #header-more{width:40px}
.app-header #header-more[hidden]{display:none}
.match-header #header-score[hidden] + #header-favorite + #header-more,.match-header #header-score[hidden] ~ #header-more{margin-left:auto}
.header-menu{position:fixed;z-index:40;min-width:230px;padding:6px;background:white;border-radius:14px;box-shadow:0 14px 40px rgba(20,39,67,.28);display:grid}
.header-menu button{display:flex;align-items:center;gap:10px;min-height:44px;padding:8px 12px;border:0;border-radius:10px;background:none;color:var(--navy);font-weight:700;font-size:.92rem;text-align:left;cursor:pointer}
.header-menu button:hover,.header-menu button:focus-visible{background:#eef2f7;outline:none}
.header-menu svg{width:18px;height:18px;color:var(--orange);flex:none}
/* Match page weather row */
.detail-weather-row{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:4px 12px;background:white;border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin:0 0 12px}
.detail-weather-row>strong{color:var(--navy);font-size:.95rem}
.weather-value{display:flex;align-items:center;justify-content:flex-end;gap:8px;color:var(--navy);font-size:.95rem}
.weather-value.muted{color:var(--muted);font-size:.86rem}
.weather-value b{font-size:1.1rem}
.weather-icon{display:inline-grid;place-items:center}
.weather-icon svg{width:24px;height:24px;color:#e8a824}
.weather-sep{width:1px;height:20px;background:var(--line)}
.weather-place{grid-column:1/-1;justify-self:end;color:var(--muted);font-size:.74rem}
.fx-card{padding:2px 12px}
.fx-line{grid-template-columns:minmax(0,1fr) 22px auto 22px minmax(0,1fr);gap:6px}
.fx-team{font-size:.82rem;letter-spacing:-.01em}
.fx-line .club-logo,.fx-line .crest{width:22px;height:22px}
.fx-mid{min-width:54px}
.fx-score{min-width:50px;padding:3px 6px;font-size:.88rem}
.fx-team{font-size:.78rem}
.fx-line{gap:5px}
/* Footer: desktop only */
.site-footer{display:none}
@media (min-width: 900px){
  #app{padding-bottom:32px}
  .site-footer{display:block;width:var(--content);margin:0 auto;padding:18px 0 calc(var(--bottom-height,64px) + env(safe-area-inset-bottom) + 24px);border-top:1px solid var(--line);color:var(--muted);font-size:.82rem;text-align:center}
  .site-footer nav{display:flex;justify-content:center;gap:22px;margin-bottom:8px}
  .site-footer a{color:var(--navy);font-weight:750;text-decoration:none}
  .site-footer a:hover{text-decoration:underline}
  .site-footer p{margin:4px 0}
  .site-credit strong{color:var(--navy)}
}
/* About / Privacy / Cookies pages */
.legal-page{background:white;border:1px solid var(--line);border-radius:16px;padding:20px 22px;max-width:760px;margin:0 auto;color:var(--ink);line-height:1.6}
.legal-head h1{margin:0;color:var(--navy);font-size:1.5rem}
.legal-updated{margin:4px 0 0;color:var(--muted);font-size:.82rem}
.legal-intro{margin:12px 0 4px;font-size:1rem}
.legal-page section{border-top:1px solid var(--line);margin-top:16px;padding-top:14px}
.legal-page h2{margin:0 0 6px;color:var(--navy);font-size:1.02rem}
.legal-page p{margin:0 0 8px}
.legal-page ul{margin:0 0 8px;padding-left:1.2em}
.legal-page li{margin:3px 0}
.legal-page a{color:var(--navy);font-weight:700}
.legal-view .bottom-nav{display:none}
.legal-view #app{padding-bottom:32px}
@media (min-width: 900px){.legal-view .site-footer{padding-bottom:28px}}
