:root{
  --round:16px; --header-h:0px; --bnav-h:0px; --base:14px; --tight:0.2px;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%}
body{
  font-family:var(--font-sans,'Barlow Semi Condensed',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif);
  background:var(--page); color:var(--ink); font-size:var(--base);
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
  letter-spacing:var(--tight); line-height:1.55; font-weight:400;
}

main{
  width:100%;
  max-width:var(--shell-max, 1200px);
  margin:0 auto;
  padding:calc(var(--page-chrome-height, 70px) + env(safe-area-inset-top) + 12px) var(--shell-pad, 16px) calc(130px + env(safe-area-inset-bottom));
}
.main-layout{min-height:100%;display:block;gap:20px}
.main-content{
  width:100%;
  display:flex;
  flex-direction:column;
  gap:20px;
}
@media(min-width:1080px){
  .main-layout{
    display:flex;
    gap:24px;
    align-items:flex-start;
  }
  .main-content{
    flex:1;
    min-width:0;
  }
}
/* Hero */
.hero{
  border-radius:var(--round);
  border:1px solid var(--line);
  background:var(--surface);
  padding:18px;
  display:grid;
  gap:16px;
}
.hero--profile{padding:20px}
.hero-profile{
  display:flex;
  flex-wrap:wrap;
  gap:18px;
  align-items:center;
}
.hero-logo{
  width:72px;
  height:72px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.2);
  background:var(--surface-2);
  padding:12px;
  object-fit:contain;
}
.hero-identity{display:flex;flex-direction:column;gap:10px;flex:1;min-width:260px}
.hero-identity h1{margin:0;font-size:30px;font-weight:600}
.hero-tags--info{display:flex;flex-wrap:wrap;gap:10px}
.info-chip{
  display:flex;
  align-items:center;
  gap:8px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.12);
  border-radius:999px;
  padding:6px 12px;
  font-weight:600;
  font-size:14px;
}
.info-chip--flag{padding:4px 10px}
.country-flag{
  width:18px;
  height:12px;
  object-fit:cover;
  border-radius:2px;
  border:1px solid rgba(255,255,255,.2);
}
.info-label{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.12em;
  color:rgba(255,255,255,.72);
}
.hero-meta-row{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  color:var(--muted);
  font-weight:500;
}
.hero-meta-row span{display:flex;align-items:center;gap:6px;font-size:13px}
.hero-controls{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.hero__intro{
  grid-column:1 / -1;
}
.hero-meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  color:var(--ink);
}
.hub-controls{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:space-between;
  align-items:flex-start;
}
.hub-controls .hero-meta{
  margin-left:auto;
}
.page-chrome__brand--stacked{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:2px;
  min-width:0;
}
.page-chrome__brand--stacked .page-chrome__subtitle{
  width:100%;
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  color:rgba(247,249,255,0.72);
}
.page-chrome__brand--stacked .page-chrome__subtitle nav{
  flex:1;
  min-width:0;
}
.hero--matches{grid-template-columns:minmax(0,1fr)}
.hero--matches .hero-matches{
  grid-column:1 / -1;
  width:100%;
  justify-self:stretch;
}
.badge{border:1px solid var(--line);background:rgba(91,192,235,.10);color:var(--ink);padding:6px 10px;border-radius:12px;font-weight:600}
.badge-ghost{background:rgba(255,255,255,.04);border:1px dashed rgba(255,255,255,.2);color:var(--muted)}
.badge-select{display:flex;align-items:center;gap:8px}
.badge-select select{
  appearance:none;
  background:var(--surface-2);
  border:1px solid rgba(255,255,255,.18);
  color:var(--ink);
  border-radius:10px;
  padding:6px 32px 6px 10px;
  font-size:13px;
  font-family:inherit;
  cursor:pointer;
  min-width:140px;
  background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='9' height='5' viewBox='0 0 9 5'%3e%3cpath fill='%23E6F2FF' d='M0 0h9L4.5 5z'/%3e%3c/svg%3e");
  background-repeat:no-repeat;
  background-position:right 8px center;
  background-size:9px 5px;
}
#teamSeasonSelect{
  min-width:auto;
  width:auto;
}
.badge-select select:disabled{opacity:.5;cursor:not-allowed}
.badge-select select option{color:var(--bg);background:var(--ink)}

.hero-body{
  display:grid;
  gap:16px;
}
.hero-details{
  margin:0;
  padding:0;
  list-style:none;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
  gap:12px;
}
.hero-details dt{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.12em;
  color:rgba(255,255,255,.6);
}
.hero-details dd{
  margin:4px 0 0;
  font-size:16px;
  font-weight:600;
}
.hero-matches{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:14px;
}
.hero-match-card{
  border:1px solid rgba(255,255,255,.18);
  border-radius:16px;
  padding:16px;
  background:var(--surface-2);
  display:grid;
  gap:10px;
}
.hero-match-card__label{
  margin:0;
  font-size:12px;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--accent1);
}
.hero-match-card__clubs{display:flex;align-items:center;gap:10px;justify-content:space-between;font-weight:600}
.hero-match-card__clubs .club{display:flex;align-items:center;gap:8px;min-width:0;flex:1}
.hero-match-card__clubs img{width:34px;height:34px;object-fit:contain}
.hero-match-card__clubs span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hero-match-card__score{font-size:18px;font-weight:700}
.hero-match-card__meta{display:flex;flex-direction:column;gap:4px;font-size:13px;color:var(--muted)}
.hero-match-card__meta a{align-self:flex-start;font-weight:600;color:var(--accent1);text-transform:uppercase;letter-spacing:.12em;text-decoration:none}
.hero-match-card--next{
  border-color:rgba(245,255,107,.35);
  background:linear-gradient(160deg,rgba(245,255,107,.12),rgba(91,192,235,.10));
  box-shadow:0 18px 36px rgba(0,0,0,.32);
}
.hero-match-card__meta-row{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;min-width:0}
.hero-match-card__time{font-size:14px;font-weight:700;color:#eaf2ff}
.meta-chip{
  font-size:10px;
  letter-spacing:.12em;
  text-transform:uppercase;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.18);
  border-radius:999px;
  padding:4px 8px;
  color:#dfe7f5;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:100%;
}
.fixture-link--hero{
  margin-top:4px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid rgba(91,192,235,.45);
  background:rgba(91,192,235,.18);
  color:#e6f7ff;
  text-decoration:none;
  letter-spacing:.14em;
  font-size:11px;
  text-transform:uppercase;
}
.fixture-link--hero:hover{background:rgba(91,192,235,.28)}

/* Sections */
.sec{display:flex;flex-direction:column;gap:14px}
.sec h2{margin:0;font-size:14px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.grid-two{display:grid;gap:14px}
@media(min-width:900px){
  .grid-two{grid-template-columns:repeat(2,minmax(0,1fr))}
}
.block{
  border:1px solid rgba(255,255,255,.10);
  border-radius:16px;
  overflow:hidden;
  background:rgba(15,24,46,.9);
  box-shadow:var(--shadow-soft);
}
.block h3{
  margin:0;
  padding:12px 14px;
  font-size:13px;
  color:#e9eef7;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:rgba(91,192,235,.10);
  font-weight:600;
  letter-spacing:.04em;
}
.pad{
  padding:12px 14px;
}
.subtle{font-size:13px;color:var(--muted)}
.error-banner{
  border-radius:12px;
  border:1px solid rgba(239,68,68,.35);
  background:rgba(239,68,68,.12);
  padding:12px;
  font-weight:600;
  color:#ffe1e1;
}

/* Stat cards */
.stat-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  gap:12px;
}
.stat-card{
  border:1px solid rgba(255,255,255,.12);
  border-radius:14px;
  padding:12px;
  background:var(--surface-2);
}
.stat-card span{
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--muted);
}
.stat-card strong{
  display:block;
  margin-top:6px;
  font-size:24px;
}

.form-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.form-chip{
  width:32px;
  height:32px;
  border-radius:8px;
  display:grid;
  place-items:center;
  font-weight:700;
  font-size:14px;
  letter-spacing:.08em;
  border:1px solid rgba(255,255,255,.2);
}
.form-chip.win{background:rgba(66,207,140,.18);color:#74ffce}
.form-chip.draw{background:rgba(255,255,255,.08);color:#fff}
.form-chip.lose{background:rgba(239,68,68,.18);color:#ffb4b4}

.bars{display:grid;gap:12px}
.bar-row{display:grid;gap:6px}
.bar-row span{display:flex;justify-content:space-between;font-size:13px;color:var(--muted)}
.bar-track{
  height:8px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
}
.bar-fill{height:100%;background:var(--accent1)}

/* Matches list (shared with home) */
/* Matches list */
.match-list,
.matches-timeline{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
}

.match-row{
  position:relative;
  display:grid;
  grid-template-columns:72px minmax(0,1fr) max-content;
  gap:10px;
  min-height:var(--row-h,56px);
  height:var(--row-h,56px);
  padding:7px 10px;
  background:var(--surface);
  border-top:1px solid var(--line);
  align-items:center;
  width:100%;
  max-width:100%;
  overflow:hidden;
}

.match-row>*{min-width:0;}

@media (max-width:600px){
  .match-row{
    grid-template-columns:60px minmax(0,1fr) max-content;
    gap:8px;
    padding:6px 8px;
  }
}

.match-row:nth-child(even){background:var(--surface-2);}
.match-row.live .sc{color:var(--danger);}
.match-row.finished .sc{color:inherit;}
.match-row.finished .sc.lose{color:#8a99b5;}
.match-row[role="link"]{cursor:pointer;}
.match-row[role="link"]:focus-visible{outline:2px solid var(--hover);outline-offset:2px;}

.timecol{
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:8px;
  font-size:12px;
  color:#9fb0c8;
  white-space:nowrap;
  min-width:0;
}

.time-line{
  display:flex;
  flex-direction:column;
  gap:2px;
  font-weight:600;
  color:#e9eeff;
}

.time-line .time-main{font-size:14px;font-weight:600;}
.time-line .time-date{
  font-size:11px;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:#9fb0c8;
}
.time-line .time-sub{
  font-size:11px;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:#9fb0c8;
}

.league-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:4px 8px;
  border-radius:10px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  color:#e6eef7;
  min-width:0;
}
.league-btn--static{cursor:default;}
.league-btn .league-meta{display:flex;flex-direction:column;gap:2px;min-width:0;}
.league-btn strong{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.league-btn .league-country{font-size:11px;color:#9fb0c8;letter-spacing:.04em;text-transform:uppercase;}
.llogo-h{width:18px;height:18px;object-fit:contain;}

.teamstack{
  display:grid;
  grid-template-rows:1fr 1fr;
  align-items:center;
  min-width:0;
  border-right:1px solid var(--line);
  padding-right:8px;
}
@media (max-width:600px){
  .teamstack{border-right:1px solid var(--line);padding-right:6px;}
}
.team-row{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:8px;align-items:center;min-width:0;}
@media (max-width:600px){.team-row{grid-template-columns:20px minmax(0,1fr);}}
.crest{width:20px;height:20px;object-fit:contain;display:block;border-radius:4px;background:rgba(255,255,255,.04);}
.tname{font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;line-height:1.15;display:flex;align-items:center;min-height:20px;font-size:14px;}
.tname.is-self{color:var(--accent1);}
.tname.win,.sc.win{color:var(--ink);font-weight:400;}
.tname.lose,.sc.lose{color:#8a99b5;font-weight:400;}
.tname.draw,.sc.draw{color:var(--muted);font-weight:400;}

.scorecol{
  display:grid;
  grid-template-rows:1fr 1fr;
  align-items:center;
  justify-items:end;
  font-weight:500;
  font-variant-numeric:tabular-nums;
  min-width:44px;
  font-size:15px;
}

.sc{font-weight:500;}

.match-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-weight:700;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.06);
  color:#e9eeff;
}
.match-pill--ghost{background:rgba(255,255,255,.06);}
.match-pill--win{background:rgba(66,207,140,.16);color:#74ffce;border-color:rgba(66,207,140,.4);}
.match-pill--draw{background:rgba(255,255,255,.08);color:#fff;}
.match-pill--lose{background:rgba(239,68,68,.18);color:#ffb4b4;border-color:rgba(239,68,68,.4);}

/* Leaders */
.leaders-grid{
  display:grid;
  gap:12px;
}
@media(min-width:720px){
  .leaders-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
.leaders-grid h3{
  margin:0 0 8px;
  font-size:13px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--accent1);
}
.leaders-list{
  display:grid;
  gap:10px;
}
.leader{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:var(--surface-2);
}
.leader img{
  width:42px;
  height:42px;
  border-radius:50%;
  object-fit:cover;
  border:1px solid rgba(0,0,0,.25);
}
.leader-info{flex:1;min-width:0}
.leader-info strong{display:block;font-size:16px}
.leader-info span{font-size:13px;color:var(--muted)}
.leader-metric{font-size:20px;font-weight:700}

/* Squad */
.squad-grid{
  display:grid;
  gap:12px;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
}
.squad-block{
  border:1px solid rgba(255,255,255,.12);
  border-radius:12px;
  padding:12px;
  background:var(--surface-2);
}
.squad-block h3{
  margin:0 0 8px;
  font-size:13px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--muted);
}
.squad-block ul{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:6px;
}
.squad-block li{
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:14px;
}
.squad-block li span{color:var(--muted)}
.player-link{text-decoration:none;color:inherit;font-weight:600}
.player-link:hover{text-decoration:underline}

.table-wrap{border:1px solid rgba(255,255,255,.12);border-radius:12px;overflow:auto}
.table-mini{width:100%;border-collapse:collapse;font-size:13px}
.table-mini th,.table-mini td{padding:8px 10px;text-align:left;border-bottom:1px solid rgba(255,255,255,.08)}
.table-mini th{
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:12px;
  color:var(--muted);
}
.table-mini tr:last-child td{border-bottom:none}

.table{
  width:100%;
  border-collapse:collapse;
}
.table th,.table td{
  padding:8px;
  border-top:1px solid var(--line);
  font-size:13px;
  text-align:center;
}
.table thead th{
  position:sticky;
  top:0;
  background:#13274a;
  color:#e6eef7;
  border-bottom:1px solid var(--line);
}
.table td.team{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  text-align:left;
}
.table tr.ucl{background:rgba(91,192,235,.08);box-shadow:inset 4px 0 0 rgba(91,192,235,.8)}
.table tr.uel{background:rgba(245,158,11,.08);box-shadow:inset 4px 0 0 rgba(245,158,11,.75)}
.table tr.uecl{background:rgba(45,212,191,.08);box-shadow:inset 4px 0 0 rgba(45,212,191,.75)}
.table tr.playoff{background:rgba(248,113,113,.08);box-shadow:inset 4px 0 0 rgba(248,113,113,.75)}
.table tr.relegation{background:rgba(239,68,68,.12);box-shadow:inset 4px 0 0 rgba(239,68,68,.85)}

.empty-state{
  padding:18px;
  border:1px dashed rgba(255,255,255,.18);
  border-radius:14px;
  text-align:center;
  color:var(--muted);
  font-size:14px;
}
.hub-tabs{
  display:flex;
  gap:10px;
  border-bottom:1px solid rgba(255,255,255,.1);
  padding-bottom:6px;
}
.hub-tab{
  border:none;
  background:rgba(255,255,255,.06);
  color:#e6eef7;
  font-weight:600;
  font-size:14px;
  padding:6px 12px;
  cursor:pointer;
  border-radius:12px;
  position:relative;
  flex:0 0 auto;
  white-space:nowrap;
}
.hub-tab.active{
  background:var(--accent1);
  color:#0b1426;
}
.hub{
  border:1px solid var(--line);
  border-radius:var(--round);
  background:var(--surface);
  box-shadow:0 8px 20px rgba(0,0,0,.22);
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.hub-nav{
  display:flex;
  gap:10px;
  flex-wrap:nowrap;
  padding:2px 0 10px;
  border-bottom:1px solid rgba(255,255,255,.06);
  overflow-x:auto;
  white-space:nowrap;
}
.hub-nav--sticky{
  position:sticky;
  top:calc(var(--page-chrome-height, 70px) + env(safe-area-inset-top, 0px));
  z-index:20;
  background:rgba(11,20,38,.94);
  padding:10px var(--shell-pad, 16px) 8px;
  margin:0 calc(var(--shell-pad, 16px) * -1);
}
.hub-nav--sticky{
  position:sticky;
  top:calc(var(--page-chrome-height, 70px) + env(safe-area-inset-top, 0px));
  z-index:20;
  background:rgba(11,20,38,.94);
  padding:10px var(--shell-pad, 16px) 8px;
  margin:8px calc(var(--shell-pad, 16px) * -1) 0;
}
.hub-panel{
  margin-top:12px;
}
.panel-row{
  display:grid;
  gap:12px;
  margin-top:16px;
}
@media(min-width:720px){
  .panel-row{grid-template-columns:repeat(2,minmax(0,1fr))}
}
.panel-row article{
  border:1px solid rgba(255,255,255,.12);
  border-radius:12px;
  padding:12px;
  background:var(--surface-2);
}
.panel-row h3{
  margin:0 0 6px;
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.12em;
  color:var(--muted);
}
.hero-league{
  margin:0;
  font-size:12px;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--muted);
}
