@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;600&display=swap');

:root {
  --bg:         #0a0a0a;
  --surface:    #111111;
  --surface2:   #161616;
  --border:     #222222;
  --border2:    #2a2a2a;

  --text:       #f0f0f0;
  --text2:      #999999;
  --text3:      #555555;

  --green:      #b0ff4e;
  --green-dim:  rgba(176,255,78,.08);
  --green-mid:  rgba(176,255,78,.18);

  --live:       #ff4040;
  --live-dim:   rgba(255,64,64,.12);
  --gold:       #f5c842;

  --cl-ql:      rgba(59,130,246,.7);
  --eu-ql:      rgba(22,163,74,.7);
  --conf-ql:    rgba(101,163,13,.55);
  --rel:        rgba(220,38,38,.65);

  --sidebar-w: 220px;
  --header-h:  56px;

  --f-display: 'DM Serif Display', Georgia, serif;
  --f-body:    'IBM Plex Sans', system-ui, sans-serif;
  --f-mono:    'IBM Plex Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--f-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img { display: block; }
button { font-family: inherit; cursor: pointer; }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border);
}

.logo-text {
  font-family: var(--f-display);
  font-size: 22px;
  color: var(--text);
  letter-spacing: -.3px;
  line-height: 1;
}

.logo-text em {
  font-style: italic;
  color: var(--green);
}

.logo-sub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text3);
  margin-top: 3px;
}

.nav-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text3);
  padding: 18px 20px 8px;
}

.nav-league {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 20px;
  background: transparent;
  border: none;
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  transition: background .15s, color .15s;
  position: relative;
}

.nav-league:hover {
  background: rgba(255,255,255,.04);
  color: var(--text);
}

.nav-league.active {
  color: var(--green);
  background: var(--green-dim);
}

.nav-league.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--green);
}

.nav-league.nav-all {
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  padding-bottom: 12px;
}

.nav-league .live-pill {
  margin-left: auto;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .5px;
  background: var(--live-dim);
  color: var(--live);
  padding: 2px 6px;
  border-radius: 3px;
  animation: blink 1.6s ease infinite;
}

@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: .4; }
}

.nav-league .fav-toggle {
  margin-left: auto;
  font-size: 13px;
  color: var(--text3);
  transition: color .15s;
  padding: 2px;
  border-radius: 3px;
}

.nav-league .fav-toggle.active { color: var(--gold); }
.nav-league .fav-toggle:hover  { color: var(--text); }

.sidebar-fill { flex: 1; }

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  font-size: 10px;
  color: var(--text3);
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.flag-img {
  display: inline-block;
  border-radius: 2px;
  vertical-align: middle;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.4);
}

.flag-lg {
  width: 24px;
  height: 18px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  height: var(--header-h);
  background: rgba(10,10,10,.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
}

.live-pill-btn {
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  background: var(--live-dim);
  border: 1px solid rgba(255,64,64,.25);
  color: var(--live);
  padding: 5px 12px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all .15s;
}

.live-pill-btn:hover,
.live-pill-btn.active {
  background: var(--live);
  border-color: var(--live);
  color: #fff;
}

.datebar-wrap {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.datebar-wrap::before,
.datebar-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 28px;
  z-index: 2;
  pointer-events: none;
}
.datebar-wrap::before { left: 0;  background: linear-gradient(to right, rgba(10,10,10,.95), transparent); }
.datebar-wrap::after  { right: 0; background: linear-gradient(to left,  rgba(10,10,10,.95), transparent); }

.datebar {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0 6px;
  scrollbar-width: none;
}
.datebar::-webkit-scrollbar { display: none; }

.day-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all .15s;
  min-width: 48px;
}

.day-chip:hover {
  background: rgba(255,255,255,.05);
  color: var(--text);
}

.day-chip.active {
  background: var(--green);
  border-color: var(--green);
  color: #000;
}

.day-chip.today .chip-day { color: var(--green); }
.day-chip.today.active .chip-day { color: #000; }

.chip-day {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
}

.chip-num {
  font-family: var(--f-mono);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}

.date-pill {
  font-size: 12px;
  font-weight: 600;
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text2);
  padding: 5px 13px;
  border-radius: 4px;
  transition: all .15s;
  white-space: nowrap;
}

.date-pill:hover {
  background: rgba(255,255,255,.05);
  color: var(--text);
}

.date-pill.active {
  background: var(--green);
  border-color: var(--green);
  color: #000;
  font-weight: 700;
}

.search-wrap {
  margin-left: auto;
  position: relative;
}

.search-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text3);
}

#teamSearch {
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 13px;
  padding: 6px 12px 6px 32px;
  border-radius: 4px;
  width: 200px;
  transition: border-color .15s, box-shadow .15s;
}

#teamSearch:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(176,255,78,.1);
}

#teamSearch::placeholder { color: var(--text3); }

.content {
  padding: 0;
}

.card {
  border-bottom: 1px solid var(--border);
  display: none;
}

.league-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px 13px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--header-h);
  z-index: 60;
}

.league-name {
  font-family: var(--f-display);
  font-size: 20px;
  letter-spacing: -.2px;
  color: var(--text);
  line-height: 1;
}

.live-badge {
  font-family: var(--f-body);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: var(--live-dim);
  color: var(--live);
  border: 1px solid rgba(255,64,64,.25);
  padding: 3px 8px;
  border-radius: 3px;
  animation: blink 1.6s ease infinite;
}

.header-spacer { flex: 1; }

.updated-time {
  font-size: 11px;
  color: var(--text3);
  font-variant-numeric: tabular-nums;
}

.standings-btn {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .3px;
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text2);
  padding: 5px 12px;
  border-radius: 4px;
  transition: all .15s;
}

.standings-btn:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-dim);
}

.day {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text3);
  background: var(--bg);
}

.day::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.match {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0;
  padding: 10px 24px;
  border-bottom: 1px solid rgba(34,34,34,.6);
  transition: background .12s;
}

.match:hover { background: rgba(255,255,255,.025); }
.match:last-child { border-bottom: none; }

.team {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  overflow: hidden;
}

.team.left {
  flex-direction: row-reverse;   
  justify-content: flex-start;   
  text-align: right;
}

.team.right {
  flex-direction: row;            
  justify-content: flex-start;   
  text-align: left;
}

.crest {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.6));
}

.name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0 16px;
  min-width: 80px;
}

.score {
  font-family: var(--f-mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  text-align: center;
  padding: 4px 12px;
  border-radius: 4px;
  min-width: 62px;
}

.score.upcoming {
  color: var(--text2);
  background: transparent;
  border: 1px solid var(--border2);
}

.score.finished {
  color: var(--text);
  background: var(--surface2);
  border: 1px solid var(--border);
}

.score.live-score {
  color: var(--green);
  background: var(--green-dim);
  border: 1px solid rgba(176,255,78,.2);
}

.score-pulse {
  animation: scorePulse .7s ease forwards;
}

@keyframes scorePulse {
  0%   { transform: scale(1);    background: var(--green-dim); }
  35%  { transform: scale(1.15); background: var(--green-mid); }
  100% { transform: scale(1);    background: var(--green-dim); }
}

.match-time {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--text3);
  letter-spacing: .5px;
}

.live-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 1px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 6px rgba(255,64,64,.8);
  animation: livePulse 1.3s ease-in-out infinite;
}

@keyframes livePulse {
  0%,100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(1.7); opacity: .4; }
}

.live-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--live);
  text-transform: uppercase;
}

.empty {
  padding: 32px 24px;
  color: var(--text3);
  font-size: 13px;
  text-align: center;
  font-style: italic;
}

.standings-wrap {
  display: none;
  padding: 0 24px 16px;
  overflow-x: auto;        
  -webkit-overflow-scrolling: touch;
}

.standings-wrap table {
  width: 100%;
  min-width: 520px;        
  border-collapse: collapse;
  font-size: 12.5px;
}

.standings-wrap thead tr {
  border-bottom: 1px solid var(--border);
}

.standings-wrap th {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text3);
  padding: 10px 8px;
  text-align: center;
  white-space: nowrap;
}

.standings-wrap th:nth-child(2) { text-align: left; min-width: 140px; }

.standings-wrap td {
  padding: 8px 8px;
  border-bottom: 1px solid rgba(34,34,34,.5);
  color: var(--text);
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
}

.standings-wrap tr:last-child td { border-bottom: none; }

.standings-wrap tbody tr:hover { background: rgba(255,255,255,.025); }

.standings-wrap td.pos {
  width: 34px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.standings-wrap td.pos span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.standings-wrap td.club {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  font-weight: 500;
  font-size: 13px;
  padding-left: 8px;
}

.standings-wrap td.club img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.5));
}

.standings-wrap td.pts {
  font-family: var(--f-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
}

.standings-wrap td.diff {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--text2);
}

.pos-chip { border-radius: 4px; }
.pos-cl   { background: rgba(59,130,246,.2);  color: #93c5fd; }
.pos-cl2  { background: rgba(59,130,246,.1);  color: #7ab8f5; border: 1px solid rgba(59,130,246,.25); }
.pos-eu   { background: rgba(22,163,74,.2);   color: #86efac; }
.pos-conf { background: rgba(101,163,13,.18); color: #bef264; }
.pos-rel  { background: rgba(220,38,38,.2);   color: #fca5a5; }
.pos-norm { background: transparent; color: var(--text2); }

.standings-legend {
  display: flex;
  gap: 16px;
  padding: 10px 0 4px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--text3);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.mobile-header {
  display: none;
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  height: 48px;
  align-items: center;
  gap: 12px;
}

.mobile-logo {
  font-family: var(--f-display);
  font-size: 20px;
  color: var(--text);
  flex: 1;
}

.mobile-logo em { color: var(--green); font-style: italic; }

.mobile-search-btn {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--text3);
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s;
  cursor: pointer;
}
.mobile-search-btn:hover { color: var(--text); }

.mobile-search-bar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 48px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  z-index: 300;
}
.mobile-search-bar.open { display: flex; }
.mobile-search-bar svg { color: var(--text3); flex-shrink: 0; }
.mobile-search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  outline: none;
}
.mobile-search-bar input::placeholder { color: var(--text3); }
.mobile-search-close {
  background: transparent;
  border: none;
  color: var(--text3);
  font-size: 18px;
  padding: 4px 8px;
  cursor: pointer;
}
#mobileSearchDropdown {
  position: fixed;
  top: 48px;
  left: 0; right: 0;
  border-radius: 0 0 10px 10px;
  max-height: 60vh;
  overflow-y: auto;
  z-index: 300;
}

.mobile-nav {
  display: none;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 48px;
  z-index: 190;
}

.mobile-nav-inner {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 12px;
  scrollbar-width: none;
}
.mobile-nav-inner::-webkit-scrollbar { display: none; }

.league-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 20px;
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--text2);
  font-family: var(--f-body);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all .15s;
  cursor: pointer;
}
.league-chip:hover { background: rgba(255,255,255,.05); color: var(--text); }
.league-chip.active {
  background: var(--green);
  border-color: var(--green);
  color: #000;
}

@media (max-width: 860px) {
  .sidebar { display: none; }
  .mobile-header { display: flex; }
  .mobile-nav { display: block; }

  
  .topbar {
    position: fixed;
    top: calc(48px + 52px); 
    left: 0;
    right: 0;
    z-index: 170;
    height: var(--header-h);
    padding: 0 14px;
    flex-wrap: nowrap;
    gap: 8px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .topbar .search-wrap { display: none; }
  .datebar-wrap { flex: 1; }

  
  .content { padding-top: var(--header-h); }

  
  .day-chip { padding: 4px 7px; min-width: 40px; }
  .chip-day { font-size: 9px; letter-spacing: .5px; }
  .chip-num { font-size: 13px; }

  .league-header {
    top: calc(48px + 52px + var(--header-h));
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .match { padding: 9px 14px; }
  .day   { padding: 9px 14px 7px; }
  .standings-wrap { padding: 0 14px 14px; }

  .center { padding: 0 10px; min-width: 68px; }
  .name   { font-size: 12.5px; }
  .score  { font-size: 13px; min-width: 54px; }
}

@media (max-width: 480px) {
  .crest { width: 20px; height: 20px; }
  .name  { font-size: 12px; }
  .score { font-size: 12px; padding: 3px 8px; min-width: 48px; }
  .standings-wrap th, .standings-wrap td { padding: 6px 5px; }
}

.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 300;
  transition: opacity .3s ease;
}

.drawer-overlay.open { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity:0 } to { opacity:1 } }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 100vw;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 400;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.drawer-back {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text3);
  font-family: var(--f-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .3px;
  padding: 4px 0;
  cursor: pointer;
  transition: color .15s;
}

.drawer-back:hover { color: var(--text); }
.drawer-back svg { flex-shrink: 0; }

.drawer-team-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(176,255,78,.04) 0%, transparent 60%);
}

.drawer-crest {
  width: 64px;
  height: 64px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.5));
}

.drawer-team-name {
  font-family: var(--f-display);
  font-size: 26px;
  line-height: 1.1;
  color: var(--text);
  letter-spacing: -.2px;
}

.drawer-team-meta {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text3);
  margin-top: 5px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 32px;
}

.drawer-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--text3);
  font-size: 13px;
  font-style: italic;
}

.drawer-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border2);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

.drawer-comp {
  margin-top: 4px;
}

.drawer-comp-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green);
}

.drawer-comp-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(176,255,78,.3), transparent);
}

.drawer-match {
  display: grid;
  grid-template-columns: 80px 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-bottom: 1px solid rgba(34,34,34,.5);
  transition: background .12s;
}

.drawer-match:last-child { border-bottom: none; }
.drawer-match:hover { background: rgba(255,255,255,.025); }

.drawer-match-date {
  flex-shrink: 0;
}

.drawer-match-day {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--text3);
  line-height: 1.3;
}

.drawer-match-time {
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  line-height: 1.3;
}

.drawer-match .team { gap: 7px; }

.drawer-match .team.left {
  flex-direction: row-reverse;
  justify-content: flex-start;
  text-align: right;
}

.drawer-match .team.right {
  flex-direction: row;
  justify-content: flex-start;
}

.drawer-match .name {
  font-size: 12.5px;
  font-weight: 500;
}

.drawer-match .name.hl {
  font-weight: 700;
  color: var(--green);
}

.drawer-match .crest {
  width: 22px;
  height: 22px;
}

.drawer-vs {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  text-align: center;
  flex-shrink: 0;
  background: var(--surface2);
  border: 1px solid var(--border2);
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: .5px;
}

.drawer-score {
  font-family: var(--f-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  flex-shrink: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 1px;
  min-width: 54px;
}

.drawer-score.win  { color: var(--green); border-color: rgba(176,255,78,.25); background: rgba(176,255,78,.06); }
.drawer-score.loss { color: #ff6b6b;      border-color: rgba(255,64,64,.25);  background: rgba(255,64,64,.06); }
.drawer-score.draw { color: var(--text2); }

.drawer-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  padding: 0 24px;
  gap: 0;
}

.drawer-tab {
  font-family: var(--f-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text3);
  padding: 12px 16px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  margin-bottom: -1px;
}

.drawer-tab:hover { color: var(--text2); }

.drawer-tab.active {
  color: var(--green);
  border-bottom-color: var(--green);
}

.drawer-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  background: rgba(255,255,255,.08);
  color: var(--text3);
  margin-left: 6px;
  vertical-align: middle;
}

.drawer-tab.active .drawer-tab-count {
  background: rgba(176,255,78,.15);
  color: var(--green);
}

.drawer-panel { display: none; }
.drawer-panel.active { display: block; }

.drawer-empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--text3);
  font-size: 13px;
  font-style: italic;
}

.name.clickable {
  cursor: pointer;
  transition: color .15s;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
}

.name.clickable:hover {
  color: var(--green);
  text-decoration-color: rgba(176,255,78,.4);
}

@media (max-width: 480px) {
  .drawer { width: 100vw; }
  .drawer-match {
    grid-template-columns: 64px 1fr auto 1fr;
    padding: 9px 14px;
    gap: 5px;
  }
  .drawer-team-hero { padding: 18px; }
  .drawer-crest { width: 50px; height: 50px; }
  .drawer-team-name { font-size: 22px; }
}

.search-wrap {
  position: relative;
}

.search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 280px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0,0,0,.5);
  z-index: 200;
  overflow: hidden;
  animation: dropDown .15s ease;
}

@keyframes dropDown {
  from { opacity:0; transform: translateY(-6px); }
  to   { opacity:1; transform: translateY(0); }
}

.search-dropdown.open { display: block; }

.search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(34,34,34,.5);
  transition: background .12s;
  outline: none;
}

.search-item:last-child { border-bottom: none; }

.search-item:hover,
.search-item:focus { background: rgba(255,255,255,.05); }

.search-item-crest {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.5));
}

.search-item-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-item-name mark {
  background: transparent;
  color: var(--green);
  font-weight: 700;
}

.search-item-arrow {
  font-size: 13px;
  color: var(--text3);
  flex-shrink: 0;
  transition: color .12s, transform .12s;
}

.search-item:hover .search-item-arrow,
.search-item:focus .search-item-arrow {
  color: var(--green);
  transform: translateX(3px);
}

.search-empty {
  padding: 16px 14px;
  font-size: 13px;
  color: var(--text3);
  font-style: italic;
  text-align: center;
}

#sidebarFavs {
  border-top: 1px solid var(--border);
  padding-top: 4px;
}

.nav-fav-item {
  background: transparent;
}

.nav-fav-item:hover {
  background: rgba(245,200,66,.05);
}

.nav-fav-item .fav-toggle {
  color: var(--gold);
}

.match-fav-btn {
  background: transparent;
  border: none;
  color: var(--text3);
  font-size: 15px;
  padding: 4px 6px;
  cursor: pointer;
  transition: color .15s, transform .2s;
  line-height: 1;
  flex-shrink: 0;
  margin-left: 4px;
}

.match-fav-btn:hover  { color: var(--gold); transform: scale(1.2); }
.match-fav-btn.active { color: var(--gold); }
.match-fav-btn.active:hover { transform: scale(1.1); }

.match {
  grid-template-columns: 1fr auto 1fr auto;
}

.settings-btn-mobile {
  margin-left: 8px;
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text2);
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
}

.settings-btn-mobile:hover { border-color: var(--green); color: var(--green); }

.settings-btn-desktop {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text2);
  width: 34px;
  height: 34px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
}

.settings-btn-desktop:hover { border-color: var(--green); color: var(--green); }

.settings-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
}
.settings-overlay.open { display: block; animation: fadeIn .2s ease; }

.settings-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 100vw;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 600;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}

.settings-panel.open { transform: translateX(0); }

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.settings-title {
  font-family: var(--f-body);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.1px;
}

.settings-close {
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text2);
  width: 30px;
  height: 30px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.settings-close:hover { border-color: var(--live); color: var(--live); }

.settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 0 32px;
}

.settings-section {
  padding: 0 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.settings-section:last-child { border-bottom: none; }

.settings-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green);
  padding: 18px 22px 10px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 22px;
  transition: background .12s;
}
.settings-row:hover { background: rgba(255,255,255,.025); }

.settings-row-info { flex: 1; min-width: 0; }

.settings-row-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.settings-row-sub {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
  line-height: 1.4;
}

.settings-perm-btn {
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  background: var(--green-dim);
  border: 1px solid rgba(176,255,78,.25);
  color: var(--green);
  padding: 6px 14px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
  flex-shrink: 0;
}
.settings-perm-btn:hover { background: var(--green); color: #000; }

.settings-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.settings-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }

.settings-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border2);
  border-radius: 24px;
  transition: background .2s;
  border: 1px solid var(--border2);
}

.settings-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--text3);
  border-radius: 50%;
  transition: transform .2s, background .2s;
}

.settings-toggle input:checked + .settings-toggle-slider {
  background: rgba(176,255,78,.25);
  border-color: rgba(176,255,78,.4);
}

.settings-toggle input:checked + .settings-toggle-slider::before {
  transform: translateX(20px) translateY(-50%);
  background: var(--green);
}

.settings-fav-match {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px;
  border-bottom: 1px solid rgba(34,34,34,.5);
  transition: background .12s;
}
.settings-fav-match:last-child { border-bottom: none; }
.settings-fav-match:hover { background: rgba(255,255,255,.025); }

.settings-fav-crests {
  display: flex;
  gap: -4px;
  flex-shrink: 0;
}
.settings-fav-crests img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.5));
}
.settings-fav-crests img:last-child { margin-left: -4px; }

.settings-fav-info { flex: 1; min-width: 0; }

.settings-fav-teams {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.settings-fav-teams span { color: var(--text3); font-weight: 400; margin: 0 4px; }

.settings-fav-date {
  font-size: 10.5px;
  color: var(--text3);
  margin-top: 2px;
  letter-spacing: .2px;
}

.settings-fav-del {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text3);
  width: 26px;
  height: 26px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
}
.settings-fav-del:hover { border-color: var(--live); color: var(--live); }

.settings-empty {
  padding: 20px 22px;
  color: var(--text3);
  font-size: 12.5px;
  font-style: italic;
  line-height: 1.6;
  text-align: center;
}
.settings-empty small { font-size: 11px; opacity: .7; }

@media (max-width: 480px) {
  .settings-panel { width: 100vw; }
  .match { grid-template-columns: 1fr auto 1fr auto; }
}

@media (max-width: 860px) {
  .settings-btn-desktop { display: none; }
}

.fav-filter-btn {
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text3);
  padding: 5px 12px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all .15s;
  cursor: pointer;
}

.fav-filter-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.fav-filter-btn.active {
  background: rgba(245,200,66,.12);
  border-color: rgba(245,200,66,.5);
  color: var(--gold);
}

.light-theme {
  --bg:         #e8e5df;
  --surface:    #eeebe4;
  --surface2:   #e0ddd6;
  --border:     #cac7bf;
  --border2:    #b8b5ad;

  --text:       #1e1c18;
  --text2:      #4a4840;
  --text3:      #888278;

  --green:      #3a8c00;
  --green-dim:  rgba(58,140,0,.08);
  --green-mid:  rgba(58,140,0,.16);

  --live:       #d92b2b;
  --live-dim:   rgba(217,43,43,.1);
  --gold:       #b8860b;
}

.light-theme ::-webkit-scrollbar-thumb { background: var(--border2); }

.light-theme .topbar { background: rgba(245,245,244,.95); }

.light-theme .sidebar { background: var(--surface); }

.light-theme .score.finished  { background: var(--surface2); }
.light-theme .score.live-score { color: var(--green); background: var(--green-dim); border-color: rgba(58,140,0,.2); }

.light-theme .live-dot   { background: var(--live); box-shadow: 0 0 6px rgba(217,43,43,.6); }
.light-theme .live-badge { background: rgba(217,43,43,.08); color: var(--live); border-color: rgba(217,43,43,.2); }
.light-theme .live-pill  { background: rgba(217,43,43,.08); color: var(--live); }

.light-theme .day-chip.active { background: var(--green); border-color: var(--green); color: #fff; }
.light-theme .day-chip.today .chip-day { color: var(--green); }
.light-theme .day-chip.today.active .chip-day { color: #fff; }

.light-theme .live-pill-btn { background: rgba(217,43,43,.08); border-color: rgba(217,43,43,.2); color: var(--live); }
.light-theme .live-pill-btn:hover,
.light-theme .live-pill-btn.active { background: var(--live); color: #fff; }

.light-theme .fav-filter-btn.active { background: rgba(184,134,11,.1); border-color: rgba(184,134,11,.4); color: var(--gold); }

.light-theme .nav-league.active { color: var(--green); background: var(--green-dim); }
.light-theme .nav-league.active::before { background: var(--green); }

.light-theme .standings-wrap td.pts { color: var(--green); }

.light-theme .drawer { background: var(--surface); border-color: var(--border); }
.light-theme .drawer-team-hero { background: linear-gradient(135deg, rgba(58,140,0,.04) 0%, transparent 60%); }
.light-theme .drawer-comp-header { color: var(--green); }
.light-theme .drawer-comp-header::after { background: linear-gradient(to right, rgba(58,140,0,.3), transparent); }
.light-theme .drawer-score.win { color: var(--green); border-color: rgba(58,140,0,.25); background: rgba(58,140,0,.06); }

.light-theme .settings-panel { background: var(--surface); border-color: var(--border); }
.light-theme .settings-section-title { color: var(--green); }

.light-theme #teamSearch { background: var(--surface2); border-color: var(--border2); color: var(--text); }
.light-theme #teamSearch:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(58,140,0,.1); }
.light-theme .search-dropdown { background: var(--surface); border-color: var(--border2); }
.light-theme .search-item:hover { background: var(--surface2); }
.light-theme .search-item-name mark { color: var(--green); }

.light-theme .mobile-header { background: var(--surface); border-color: var(--border); }
.light-theme .mobile-nav { background: var(--surface); border-color: var(--border); }
.light-theme .league-chip { border-color: var(--border2); color: var(--text2); }
.light-theme .league-chip.active { background: var(--green); border-color: var(--green); color: #fff; }

.light-theme .card { border-color: var(--border); }
.light-theme .league-header { background: var(--surface2); border-color: var(--border); }
.light-theme .match:hover { background: rgba(0,0,0,.025); }
.light-theme .match-goal-flash { animation: matchFlashLight .9s ease forwards; }

@keyframes matchFlashLight {
  0%   { background: transparent; }
  20%  { background: rgba(58,140,0,.07); }
  100% { background: transparent; }
}

.light-theme .score-pulse {
  animation: scorePulseLight 1s cubic-bezier(.2,0,.4,1) forwards;
}
@keyframes scorePulseLight {
  0%   { transform: scale(1);    background: var(--green-dim); color: var(--green); box-shadow: none; }
  15%  { transform: scale(1.28); background: var(--green);     color: #fff;         box-shadow: 0 0 0 6px rgba(58,140,0,.2), 0 0 20px rgba(58,140,0,.3); }
  45%  { transform: scale(1.12); background: var(--green-mid); color: var(--green); }
  100% { transform: scale(1);    background: var(--green-dim); color: var(--green); box-shadow: none; }
}

.settings-sim-btn {
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text2);
  padding: 7px 14px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
  flex-shrink: 0;
}

.settings-sim-btn:hover {
  border-color: var(--green);
  color: var(--green);
}

.settings-sim-btn.active {
  background: rgba(255,64,64,.1);
  border-color: rgba(255,64,64,.35);
  color: var(--live);
}

@media (max-width: 860px) {
  .settings-desktop-only { display: none; }
}

.match {
  grid-template-columns: 1fr auto 1fr auto auto;
}

.match-h2h-btn {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text3);
  font-family: var(--f-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 3px 6px;
  border-radius: 3px;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
  margin-left: 2px;
}

.match-h2h-btn:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-dim);
}

.h2h-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px 12px;
  text-align: center;
}

.h2h-team {
  flex: 1;
}

.h2h-wins {
  font-family: var(--f-mono);
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.h2h-center {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.h2h-draws {
  font-family: var(--f-mono);
  font-size: 28px;
  font-weight: 600;
  color: var(--text2);
  line-height: 1;
}

.h2h-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--text3);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

.h2h-crest {
  width: 44px;
  height: 44px;
  object-fit: contain;
  margin-top: 8px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.5));
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.h2h-total {
  font-size: 10px;
  color: var(--text3);
  margin-top: 6px;
  letter-spacing: .3px;
}

.h2h-bar {
  display: flex;
  height: 5px;
  margin: 0 24px 20px;
  border-radius: 3px;
  overflow: hidden;
  gap: 2px;
}

.h2h-bar-home {
  background: var(--green);
  border-radius: 3px 0 0 3px;
  transition: width .5s ease;
  min-width: 4px;
}

.h2h-bar-draw {
  background: var(--text3);
  transition: width .5s ease;
  min-width: 4px;
}

.h2h-bar-away {
  background: var(--live);
  border-radius: 0 3px 3px 0;
  transition: width .5s ease;
  min-width: 4px;
}

.h2h-match {
  padding: 10px 24px;
  border-bottom: 1px solid rgba(34,34,34,.5);
  transition: background .12s;
}

.h2h-match:last-child { border-bottom: none; }
.h2h-match:hover { background: rgba(255,255,255,.025); }

.h2h-match-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.h2h-match-date {
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  letter-spacing: .5px;
}

.h2h-match-comp {
  font-size: 10px;
  color: var(--text3);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 1px 7px;
  border-radius: 3px;
}

.h2h-match-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.h2h-match-team {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text2);
}

.h2h-match-team img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.4));
}

.h2h-match-team.right {
  justify-content: flex-end;
  text-align: right;
}

.h2h-match-team.left {
  justify-content: flex-start;
  text-align: left;
}

.h2h-match-team.h2h-winner {
  color: var(--text);
  font-weight: 700;
}

.h2h-match-team.h2h-loser {
  color: var(--text3);
}

.h2h-match-score {
  font-family: var(--f-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 1px;
  text-align: center;
  min-width: 54px;
  flex-shrink: 0;
}

.light-theme .h2h-match:hover { background: rgba(0,0,0,.025); }
.light-theme .h2h-match-comp { background: var(--surface2); border-color: var(--border); }

@media (max-width: 480px) {
  .match { grid-template-columns: 1fr auto 1fr auto auto; }
}

@media (max-width: 860px) {
  .match-h2h-btn {
    padding: 4px 5px;
    margin-left: 1px;
  }
  .match-h2h-btn svg {
    width: 11px;
    height: 11px;
  }
}

.h2h-venue-filter {
  display: flex;
  gap: 6px;
  padding: 14px 24px 0;
}

.h2h-venue-btn {
  flex: 1;
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text3);
  padding: 6px 0;
  border-radius: 4px;
  cursor: pointer;
  transition: all .15s;
}

.h2h-venue-btn:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-dim);
}

.h2h-venue-btn.active {
  background: var(--green);
  border-color: var(--green);
  color: #000;
}

.clickable-crest {
  cursor: pointer;
  transition: transform .15s, filter .15s;
}
.clickable-crest:hover {
  transform: scale(1.12);
  filter: drop-shadow(0 3px 10px rgba(176,255,78,.4));
}

.global-updated-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 24px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--text3);
  letter-spacing: .4px;
  position: sticky;
  top: var(--header-h);
  z-index: 59;
}

.global-updated-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text3);
  flex-shrink: 0;
  transition: background .3s;
}

.global-updated-dot.flash {
  animation: dotFlash .6s ease forwards;
}

@keyframes dotFlash {
  0%   { background: var(--green); box-shadow: 0 0 6px rgba(176,255,78,.8); transform: scale(1.4); }
  100% { background: var(--text3); box-shadow: none; transform: scale(1); }
}

@media (max-width: 860px) {
  .global-updated-bar {
    position: fixed;
    top: calc(48px + 52px + var(--header-h)); 
    left: 0;
    right: 0;
    z-index: 169; 
    padding: 4px 14px;
  }
  
  .content { padding-top: calc(var(--header-h) + 26px); }
}

.sidebar-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text3);
  width: 26px;
  height: 26px;
  border-radius: 4px;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
  padding: 0;
}

.contact-btn:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-dim);
}

.mobile-contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text2);
  width: 36px;
  height: 36px;
  border-radius: 4px;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
  padding: 0;
}

.mobile-contact-btn:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-dim);
}

.contact-page {
  min-height: 100vh;
  padding: 0 0 60px;
  animation: fadeIn .25s ease;
}

.contact-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 32px 24px;
}

.contact-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text3);
  font-family: var(--f-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 36px;
  transition: color .15s;
}

.contact-back:hover { color: var(--text); }

.contact-hero {
  margin-bottom: 36px;
}

.contact-title {
  font-family: var(--f-display);
  font-size: 36px;
  letter-spacing: -.3px;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 10px;
}

.contact-title em {
  font-style: italic;
  color: var(--green);
}

.contact-sub {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.6;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-field label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text3);
}

.contact-field input,
.contact-field select,
.contact-field textarea {
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 6px;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  width: 100%;
  resize: vertical;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(176,255,78,.1);
}

.contact-field input::placeholder,
.contact-field textarea::placeholder { color: var(--text3); }

.contact-field select option {
  background: var(--surface2);
  color: var(--text);
}

.contact-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--green);
  border: none;
  color: #000;
  font-family: var(--f-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .3px;
  padding: 13px 24px;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  margin-top: 4px;
}

.contact-submit:hover   { opacity: .88; }
.contact-submit:active  { transform: scale(.98); }
.contact-submit:disabled { opacity: .5; cursor: not-allowed; }

.contact-success {
  padding: 14px 16px;
  background: rgba(176,255,78,.08);
  border: 1px solid rgba(176,255,78,.25);
  border-radius: 6px;
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
}

.contact-error {
  padding: 14px 16px;
  background: rgba(255,64,64,.08);
  border: 1px solid rgba(255,64,64,.2);
  border-radius: 6px;
  color: #ff6b6b;
  font-size: 13px;
  font-weight: 600;
}

.contact-error a {
  color: inherit;
  text-decoration: underline;
}

.contact-direct {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text3);
  flex-wrap: wrap;
}

.contact-email-link {
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: opacity .15s;
}

.contact-email-link:hover { opacity: .75; }

@media (max-width: 860px) {
  .contact-wrap { padding: 20px 16px; }
  .contact-title { font-size: 28px; }
}

.footer-btns {
  display: flex;
  gap: 6px;
  align-items: center;
}

.footer-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text3);
  width: 26px;
  height: 26px;
  border-radius: 4px;
  cursor: pointer;
  transition: all .15s;
  padding: 0;
}

.footer-icon-btn:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-dim);
}

.search-section-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text3);
  padding: 8px 14px 4px;
}

.beta-banner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: rgba(245,200,66,.07);
  border: 1px solid rgba(245,200,66,.2);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 32px;
}

.beta-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  background: var(--gold);
  color: #000;
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
}

.beta-text {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
}

.beta-text strong { color: var(--text); }

.beta-text ul {
  margin-top: 8px;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cl-section {
  margin-bottom: 36px;
}

.cl-section-title {
  font-family: var(--f-display);
  font-size: 20px;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.status-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text3);
}

.status-dot.green  { background: #4ade80; box-shadow: 0 0 6px rgba(74,222,128,.5); }
.status-dot.orange { background: var(--gold); }
.status-dot.red    { background: var(--live); }

.status-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.status-val {
  font-size: 11px;
  color: var(--text3);
  font-family: var(--f-mono);
}

.cl-table-wrap {
  overflow-x: auto;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.cl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 480px;
}

.cl-table thead tr {
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.cl-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text3);
  white-space: nowrap;
}

.cl-table td {
  padding: 9px 14px;
  border-bottom: 1px solid rgba(34,34,34,.5);
  color: var(--text);
  vertical-align: middle;
}

.cl-table tbody tr:last-child td { border-bottom: none; }
.cl-table tbody tr:hover { background: rgba(255,255,255,.02); }

.cl-table td:first-child {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--text3);
  white-space: nowrap;
}

.cl-table td:nth-child(2) {
  font-size: 11px;
  color: var(--text3);
  white-space: nowrap;
}

.cl-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
}

.cl-tag.feat { background: rgba(176,255,78,.15); color: var(--green); }
.cl-tag.fix  { background: rgba(255,107,107,.15); color: #ff6b6b; }
.cl-tag.impr { background: rgba(59,130,246,.15);  color: #93c5fd; }

@media (max-width: 860px) {
  .beta-banner { flex-direction: column; gap: 10px; }
}

.nav-standings-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  padding: 2px 3px;
  border-radius: 3px;
  transition: color .15s, background .15s;
  flex-shrink: 0;
}

.nav-standings-btn:hover {
  color: var(--green);
  background: var(--green-dim);
}

.standings-drawer-title {
  font-family: var(--f-display);
  font-size: 17px;
  color: var(--text);
  margin-left: 12px;
}

#standingsDrawerContent .standings-wrap {
  display: block;
  padding: 0 16px 16px;
}

#standingsDrawerContent .standings-legend {
  padding: 10px 0 4px;
}

.standings-page-table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
}

.standings-page-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 13px;
}

.standings-page-table thead tr {
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.standings-page-table th {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text3);
  padding: 10px 10px;
  text-align: center;
  white-space: nowrap;
}

.standings-page-table th:nth-child(2) { text-align: left; min-width: 150px; }

.standings-page-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(34,34,34,.5);
  color: var(--text);
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
}

.standings-page-table tbody tr:last-child td { border-bottom: none; }
.standings-page-table tbody tr:hover { background: rgba(255,255,255,.025); }

.standings-page-table td.pos {
  width: 34px;
  font-family: var(--f-mono);
  text-align: center;
}

.standings-page-table td.pos span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.standings-page-table td.club {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  font-weight: 500;
  padding-left: 10px;
}

.standings-page-table td.club img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.5));
}

.standings-page-table td.pts {
  font-family: var(--f-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
}

.standings-page-table td.diff {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--text2);
}

.league-chip-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.league-chip-standings {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border2);
  border-left: none;
  color: var(--text3);
  height: 30px;
  width: 24px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
  padding: 0;
}

.league-chip-standings:hover {
  color: var(--green);
  background: var(--green-dim);
  border-color: var(--green);
}

.league-chip-wrap .league-chip {
  border-radius: 4px 0 0 4px;
}

.inner-page {
  min-height: calc(100vh - var(--header-h));
  background: var(--bg);
  animation: fadeIn .2s ease;
}

.inner-page-wrap {
  max-width: 700px;
  padding: 28px 24px 60px;
  margin: 0 auto;
}

@media (max-width: 860px) {
  .inner-page {
    padding-top: calc(var(--header-h) + 26px);
  }
  .inner-page-wrap {
    padding: 16px 14px 40px;
    margin: 0;
  }
}
