/* Light theme, modern UI */
:root{
  --bg: #f7f8fa;
  --card: #ffffff;
  --text: #0d1b2a;
  --muted: #5c677d;
  --border: #e5e7eb;
  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --shadow: 0 8px 30px rgba(0,0,0,0.06);
  --page-max-width: 1600px;
  --page-gutter: 48px;
}

.hidden{
  display:none !important;
}

.visually-hidden{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

.home-zoom-shell,
.quickmatch-shell,
.dashboard-shell,
.cup-shell,
.league-shell,
.signup-shell{
  width:100%;
}

/* Home page zoom-out */
.home-zoom{
  zoom: 0.7;
}
@supports not (zoom: 1){
  .home-zoom{
    transform: scale(0.7);
    transform-origin: top center;
  }
  .home-zoom .home-zoom-shell{
    width: calc(100% / 0.7);
  }
}

/* Quick Match page zoom-out */
.quickmatch-zoom{
  zoom: 0.65;
}
@supports not (zoom: 1){
  .quickmatch-zoom{
    transform: scale(0.65);
    transform-origin: top center;
  }
  .quickmatch-zoom .quickmatch-shell{
    width: calc(100% / 0.65);
  }
}

*{ box-sizing:border-box; }
html, body{
  margin:0; padding:0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, Helvetica, sans-serif;
}

.container{
  width: min(var(--page-max-width), calc(100% - var(--page-gutter)));
  margin: 0 auto;
  padding: 0 16px;
}
.narrow{
  width: min(900px, calc(100% - var(--page-gutter)));
  margin: 0 auto;
}

.site-header{
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky; top:0; z-index: 20;
  box-shadow: 0 4px 18px rgba(15,23,42,0.05);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 2px 0;
  gap:8px;
}
.brand{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight: 700;
  font-size:1.15rem;
}
.brand-logo{
  width:80px;
  height:auto;
  object-fit:contain;
  display:block;
  transform:none;
  transform-origin: center left;
}
.logo{ font-size: 1.6rem; }
.brand-name{
  letter-spacing: .6px;
  font-size:1.1rem;
  line-height:1.1;
}

#main-logo{
  width:80px;
  height:auto;
  display:inline-block;
  vertical-align:middle;
  margin-right:10px;
  object-fit:contain;
}

.nav{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:0.95rem;
  font-weight:600;
  flex-wrap:nowrap;
}
.nav a,
.nav button{
  display:inline-flex;
  align-items:center;
  color: var(--muted);
  text-decoration: none;
  margin:0;
  font: inherit;
  background: none;
  border: none;
  padding: 4px 9px;
  border-radius: 999px;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.nav-dropdown{
  position:relative;
}
.nav-dropdown-trigger{
  padding-right:14px;
}
.nav-dropdown-menu{
  display:none;
  position:absolute;
  top:110%;
  left:0;
  min-width:170px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px;
  box-shadow:0 10px 28px rgba(0,0,0,0.12);
  padding:6px;
  flex-direction:column;
  gap:4px;
  z-index:20;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu{
  display:flex;
}
.nav-dropdown-menu a{
  padding:8px 10px;
  border-radius:8px;
  background:transparent;
}
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus-visible{
  background:rgba(37,99,235,0.08);
  color:var(--text);
}
.nav a.active,
.nav a:hover,
.nav button:hover,
.nav button:focus-visible{
  color: var(--text);
  background: rgba(37,99,235,0.08);
}
.nav [data-tooltip]{
  position:relative;
}
.nav [data-tooltip]::after{
  content: attr(data-tooltip);
  position:absolute;
  bottom:-38px;
  left:50%;
  transform:translate(-50%, -4px);
  background:#0f172a;
  color:white;
  font-size:.75rem;
  padding:6px 10px;
  border-radius:6px;
  white-space:nowrap;
  opacity:0;
  pointer-events:none;
  transition:opacity .15s ease, transform .15s ease;
  z-index:10;
}
.nav [data-tooltip]:hover::after,
.nav [data-tooltip]:focus-visible::after{
  opacity:1;
  transform:translate(-50%, 0);
}
.nav .nav-search-btn{
  border:1px solid var(--border);
  background:var(--card);
  color:var(--text);
  gap:6px;
  line-height:1.2;
  padding:6px 12px;
}
.nav .nav-search-btn:hover,
.nav .nav-search-btn:focus-visible{
  color:var(--primary);
  border-color:var(--primary);
}
.nav .lang-switch-btn{
  border:1px solid var(--border);
  background:var(--card);
  min-width:48px;
  justify-content:center;
  padding:6px 12px;
}
.nav .lang-switch-btn:hover,
.nav .lang-switch-btn:focus-visible{
  border-color:var(--primary);
}

/* Homepage SEO language switcher */
.language-switch{
  display:flex;
  flex-wrap:wrap;
  gap:0.5rem;
  margin:1.5rem 0;
}
.lang-btn{
  padding:0.4rem 0.8rem;
  border-radius:4px;
  border:1px solid #d1d5db;
  background:#f4f4f4;
  cursor:pointer;
  font-size:0.9rem;
  font-weight:500;
  transition:background .2s ease, border-color .2s ease, color .2s ease;
}
.lang-btn.active{
  border-color:#111827;
  background:#fff;
  color:#111827;
  font-weight:600;
}
.seo-home-block{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:18px;
  padding:1.5rem;
  box-shadow:var(--shadow);
  margin-bottom:1.5rem;
}
.seo-home-block h1,
.seo-home-block h2{
  margin-top:0.5rem;
}
.seo-home-block ul{
  padding-left:1.25rem;
}

/* Mobile nav toggle (hamburger) */
.nav-toggle{
  display:none;
  border:none;
  background:transparent;
  padding:4px;
  cursor:pointer;
  flex-shrink:0;
}
.nav-toggle span{
  display:block;
  width:22px;
  height:2px;
  border-radius:999px;
  background:#475569;
  transition:transform .2s ease, opacity .2s ease, background .2s ease;
}
.nav-toggle span + span{
  margin-top:5px;
}

/* Mobile behavior */
@media (max-width: 900px){
  .header-inner{
    gap:10px;
  }

  .brand-logo{
    width:64px;
    height:auto;
  }

  .brand-name{
    font-size:1rem;
    max-width:180px;
    line-height:1.2;
    white-space:normal;
  }

  .nav-toggle{
    display:inline-flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
  }

  .nav{
    position:fixed;
    inset:60px 0 auto 0;
    background:var(--card);
    border-bottom:1px solid var(--border);
    box-shadow:0 10px 30px rgba(15,23,42,0.15);
    flex-direction:column;
    align-items:flex-start;
    padding:10px 16px 14px;
    gap:4px;
    transform:translateY(-120%);
    opacity:0;
    pointer-events:none;
    transition:transform .2s ease, opacity .2s ease;
    z-index:19;
  }

  body.nav-open .nav{
    transform:translateY(0);
    opacity:1;
    pointer-events:auto;
  }

  .nav a,
  .nav button{
    width:100%;
    justify-content:flex-start;
    padding:8px 10px;
  }
  .nav-dropdown{
    width:100%;
  }
  .nav-dropdown-menu{
    position:static;
    display:none;
    box-shadow:none;
    border:1px solid var(--border);
    margin-top:6px;
  }
  .nav-dropdown.open .nav-dropdown-menu,
  .nav-dropdown:focus-within .nav-dropdown-menu{
    display:flex;
  }

  /* Animate hamburger into X when open */
  body.nav-open .nav-toggle span:nth-child(1){
    transform:translateY(7px) rotate(45deg);
  }
  body.nav-open .nav-toggle span:nth-child(2){
    opacity:0;
  }
  body.nav-open .nav-toggle span:nth-child(3){
    transform:translateY(-7px) rotate(-45deg);
  }
}

/* Extra-small tweaks */
@media (max-width: 480px){
  .brand-name{
    font-size:0.9rem;
  }
}

.account-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid var(--border);
  background:var(--card);
  color:var(--text);
  border-radius:999px;
  padding:6px 14px;
  font:inherit;
  font-weight:600;
  cursor:pointer;
  transition:border-color .15s ease, background .15s ease, color .15s ease;
  flex-shrink:0;
}
.account-chip.hidden{
  display:none;
}
.account-chip:hover,
.account-chip:focus-visible{
  border-color:var(--primary);
  color:var(--primary);
}
.account-chip-crown{
  width:20px;
  height:20px;
}
.account-chip-name{
  white-space:nowrap;
}
.account-chip-plan{
  font-size:.75rem;
  text-transform:uppercase;
  letter-spacing:.1em;
  color:var(--muted);
}
.account-chip-premium{
  border-color:rgba(217,119,6,0.6);
  background:rgba(120,53,15,0.12);
}
.account-chip-premium .account-chip-plan{
  color:#fbbf24;
}

.features-hero{
  background:linear-gradient(135deg,#0d47a1,#1976d2);
  color:#fff;
  padding:32px 16px;
  text-align:center;
  border-radius:24px;
  margin:40px auto;
  max-width:1200px;
  box-shadow:0 20px 45px rgba(13,71,161,0.25);
}
.features-hero-inner h2{
  font-size:1.7rem;
  margin:0 0 8px;
  font-weight:800;
}
.features-hero-inner p{
  font-size:1.1rem;
  margin:0;
  opacity:.9;
}
.features-pricing{
  display:flex;
  flex-wrap:wrap;
  gap:24px;
  justify-content:center;
  margin:0 auto 40px;
}
.plan-card-lite{
  background:#fff;
  border-radius:20px;
  padding:28px;
  flex:1 1 280px;
  max-width:320px;
  text-align:center;
  box-shadow:0 15px 35px rgba(15,23,42,0.12);
}
.plan-card-lite h3{
  font-size:1.75rem;
  margin:0 0 6px;
  color:#0d47a1;
  font-weight:700;
}
.plan-price{
  font-size:2rem;
  font-weight:900;
  margin:12px 0 18px;
}
.plan-card-lite ul{
  list-style:none;
  padding:0;
  margin:0;
  text-align:left;
}
.plan-card-lite li{
  font-size:1rem;
  padding:8px 0;
  display:flex;
  gap:8px;
  align-items:flex-start;
}
.plan-card-lite .check{
  color:#0d47a1;
  font-weight:bold;
}
.plan-badge{
  background:#ffc107;
  color:#000;
  padding:4px 10px;
  border-radius:999px;
  font-size:.8rem;
  margin-left:6px;
}
.plan-badge.premium{
  background:#0d47a1;
  color:#fff;
}
.features-btn{
  margin-top:18px;
  width:100%;
  border:none;
  background:#0d47a1;
  color:#fff;
  padding:14px;
  border-radius:12px;
  font-size:1rem;
  cursor:pointer;
  transition:background .2s ease;
}
.features-btn:hover{
  background:#1565c0;
}

body.club-search-lock{
  overflow:hidden;
}

.hero{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  grid-template-areas:
    "copy card"
    "quickmatch quickmatch"
    "motd motd"
    "cta cta"
    "expect expect";
  gap: 24px;
  row-gap: 12px;
  align-items: start;
  padding: 28px 0 10px;
}
.hero-text{
  grid-area: copy;
}
.hero-card{
  grid-area: card;
  align-self: start;
}
.hero-cta{
  grid-area: cta;
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
  margin-top:-4px;
}
.hero-quickmatch{
  grid-area: quickmatch;
  width:100%;
}
.home-motd{
  grid-area: motd;
}
.hero .sub{ color: var(--muted); margin-top: 6px; }
.hero .cta{ margin: 16px 0 6px; display:flex; gap: 12px; }
.hero-card .card{ margin-top: 8px; }
.hero-meta{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:12px;
}
.hero-pill{
  display:inline-flex;
  align-items:center;
  padding:6px 12px;
  border-radius:999px;
  background:#eef2ff;
  color:var(--primary);
  font-weight:600;
  font-size:.9rem;
}
.hero-expect{
  grid-area: expect;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  padding:16px;
  margin:0;
  box-shadow:var(--shadow);
}
.hero-expect-label{
  font-weight:600;
  margin:0 0 8px;
  color:var(--muted);
}
.hero-expect ul{
  list-style:none;
  padding-left:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:8px;
  color:var(--muted);
}
.hero-expect li strong{
  color:var(--text);
}

.btn{
  display:inline-block; border: 1px solid var(--border); background: var(--card);
  color: var(--text); padding: 10px 18px; border-radius: 10px; text-decoration:none; cursor:pointer;
  box-shadow: var(--shadow);
}
.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0); }
.btn-primary{ background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover{ background: var(--primary-600); }
.btn-outline{ background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover{ background: rgba(37,99,235,.08); }
.btn-compact{
  padding:6px 14px;
  font-size:0.9rem;
  min-width:0;
  align-self:flex-start;
  border-radius:8px;
}
.btn-ghost{
  background: rgba(37,99,235,.08);
  border-color: transparent;
  color: var(--primary);
  box-shadow: none;
}
.btn-ghost:hover{
  background: rgba(37,99,235,.15);
  color: var(--primary-600);
}

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.grid-3{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2{ display:grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 .card, .grid-2 .card{ height: 100%; }
.tier-plans .plan-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap:20px;
  align-items:stretch;
}
.plan-card{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.plan-card ul{
  list-style:none;
  padding-left:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:8px;
  color:var(--muted);
}
.plan-card .plan-tag{
  font-size:.85rem;
  font-weight:600;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:var(--primary);
}
.plan-card .limit-note{
  color:var(--muted);
  font-size:.9rem;
}
.plan-card .plan-badge{
  width:42px;
  height:42px;
  object-fit:contain;
  align-self:flex-start;
}

.auth-main{
  padding:60px 0;
}
.auth-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap:32px;
  align-items:center;
}
.auth-copy h1{
  margin:8px 0;
}
.auth-card form{
  display:flex;
  flex-direction:column;
  gap:16px;
}
.auth-card input,
.auth-card select{
  width:100%;
}
.auth-status{
  min-height:1.2em;
  font-size:.9rem;
  color:var(--muted);
  margin-top:6px;
}
.auth-status.error{
  color:#dc2626;
}
.auth-muted{
  margin-top:12px;
  font-size:.95rem;
  color:var(--muted);
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.auth-link{
  color:var(--primary);
  font-weight:600;
  text-decoration:none;
}
.auth-link:hover{
  color:var(--primary-600);
}
.plan-inline{
  gap:12px;
  flex-wrap:wrap;
}

.feature p{ color: var(--muted); }
.checklist{ padding-left: 18px; }
.checklist li{ margin-bottom: 6px; }

.steps li{ margin: 8px 0; }

.footer-inner{ display:flex; align-items:flex-start; justify-content: space-between; padding: 18px 0; border-top: 1px solid var(--border); margin-top: 40px; flex-wrap:wrap; gap:16px; }
.footer-links a{ color: var(--muted); margin-left: 12px; text-decoration:none; }
.footer-links a:hover{ color: var(--text); }
.footer-seo-links{
  flex: 1 1 280px;
}
.footer-seo-links-title{
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text);
}
.footer-seo-links ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.footer-seo-links a{
  color: var(--primary-600);
  text-decoration:none;
  font-weight:600;
}
.footer-seo-links a:hover{
  text-decoration:underline;
}

/* Shared page elements */
.inline{ display:flex; gap: 18px; align-items:center; }
label{ display:block; font-weight: 600; margin: 8px 0 6px; }
input, select{
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: white;
}
.muted{ color: var(--muted); }
.small{ font-size: .9rem; }
.note{ color: var(--muted); font-size: .95rem; }

/* Dashboard */
.dashboard-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:24px;
}
.dashboard-header-actions{
  display:flex;
  align-items:center;
  gap:12px;
}
.badge{ display:inline-block; padding: 6px 12px; background: #e9f0ff; color: #1d4ed8; border-radius: 999px; font-weight: 600; }
.badge.badge-premium{
  display:inline-flex;
  align-items:center;
  gap:10px;
  background:#0f172a;
  color:#fde68a;
  box-shadow:0 6px 18px rgba(15,23,42,0.25);
  border:1px solid rgba(251,191,36,0.4);
}
.badge-premium .badge-seal{
  width:28px;
  height:28px;
  object-fit:contain;
  border-radius:50%;
  box-shadow:0 0 0 2px rgba(251,191,36,0.2);
}
.badge-premium .badge-label{
  letter-spacing:.05em;
  text-transform:uppercase;
}
.stack .btn{ width: 100%; text-align:center; }
.disabled{ pointer-events:none; opacity:.45; }
.upload-locked{
  opacity:.6;
  cursor:not-allowed;
}
.fixture-list.small .fixture-round{
  background:#fff;
}

.table .row{ display:grid; grid-template-columns: 160px 1fr 100px; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.table .row.head{ font-weight: 700; border-bottom: 1px solid var(--border); }
.limit-row{ display:flex; align-items:center; justify-content: space-between; margin: 6px 0; }
.recent-summary{ margin: 6px 0; }

/* Quick match */
.quick-match-layout{
  display:grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 20px;
  align-items:flex-start;
}
.quickmatch-shell .container{
  width: min(var(--page-max-width), calc(100% - 32px));
}
@media (max-width: 768px){
  .quickmatch-shell .container{
    width:100%;
    padding:0 12px;
  }
}
@media (max-width: 480px){
  .quickmatch-shell .container{
    padding:0 10px;
  }
}
.picker-card{
  min-height: 200px;
}
.team-picker-panel-group{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:12px;
  align-items:start;
}
.tactics-preview{
  grid-column: 1 / -1;
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:12px;
  margin-bottom:8px;
}
.selected-preview{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:16px;
}
.preview-center{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
}
.preview-team{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  background:#f8fafc;
  border:1px solid var(--border);
  border-radius:999px;
  padding:24px 16px;
  font-weight:700;
  text-align:center;
  cursor:pointer;
}
.preview-name{
  font-size:1rem;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.preview-media{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:6px;
  min-width:140px;
}
.preview-logo{
  width:80px;
  height:80px;
  border-radius:6px;
  object-fit:contain;
  border:none;
  background:transparent;
}
.preview-kit{
  width:90px;
  height:90px;
  object-fit:contain;
  border:none;
  background:transparent;
}
.preview-media img.is-generic{
  display:none;
}
.preview-vs{
  font-weight:700;
  color: var(--muted);
}
.team-picker-panel{
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height: 180px;
  position: relative;
  z-index: 5;
}
.team-picker-panel .results{
  flex:1;
}
.quick-card{
  position: static;
  align-self:flex-start;
}
.two-col{ display:grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.options{ display:flex; gap: 16px; align-items:center; margin-top: 8px; flex-wrap:wrap; }
.options .hidden{ display:none; }
.stack-btn{ width: 100%; margin-top: 12px; }
.result-panel{ margin-top: 16px; background: var(--card); border:1px solid var(--border); padding: 14px; border-radius: 12px; }
.recent-results-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
}
.recent-table{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.recent-card-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.recent-search{
  min-width:220px;
}
.recent-search input{
  width:100%;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--input);
  color:inherit;
}
.recent-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:16px;
}
.recent-row{
  display:grid;
  grid-template-columns:96px 1fr 60px auto;
  gap:8px;
  align-items:center;
  font-size:.88rem;
  line-height:1.2;
}
.recent-row button.rematch-btn{
  justify-self:flex-end;
  padding:4px 12px;
  font-size:.8rem;
}
.recent-head{
  font-size:.72rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--muted);
}
.recent-row .link-btn{
  justify-self:flex-end;
}
.result-line{ font-size: 1.25rem; font-weight: 800; }
.result-sub{ color: var(--muted); margin-top: 6px; }

/* League/Cup builder layout */
.builder-layout{
  display:grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 16px;
  align-items:flex-start;
}
.builder-sidebar{
  position: sticky;
  top: 80px;
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.builder-sidebar label{ font-size:.9rem; }
.builder-sidebar input,
.builder-sidebar select{
  padding:8px 10px;
  border-radius:8px;
}
.group-settings{
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:8px;
  background:#f8fafc;
}
.builder-sidebar .full{ width: 100%; }
.builder-sidebar .chips{
  min-height: 100px;
  padding: 6px;
  background:#f8fafc;
  border-radius:10px;
}
.builder-picker{
  min-height: calc(100vh - 120px);
  display:flex;
  flex-direction:column;
  gap: 10px;
  padding:12px;
}
.builder-picker input{
  padding:10px 12px;
  border-radius:10px;
}
.builder-picker .picker-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:8px;
}
.picker-tools{
  display:flex;
  align-items:center;
  gap:10px;
}
.picker-search{
  width:220px;
}
.tactic-field{
  margin-top:8px;
  display:flex;
  flex-direction:column;
  gap:4px;
  font-weight:600;
}
.tactic-field select{
  padding:8px 10px;
  border:1px solid var(--border);
  border-radius:8px;
}
.builder-picker .results{
  flex:1;
  min-height: auto;
}
.results-stretch{
  position: relative;
  min-height: 160px;
}
.results-stretch .results-panel{
  position: static;
  width: 100%;
  height: auto;
  max-height: calc(90vh - 220px);
  margin-top: 8px;
  z-index: 10;
}
.god-mode-toggle{
  border:1px dashed var(--border);
  border-radius:12px;
  padding:10px 12px;
  background:#fdfdfd;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.god-mode-toggle label{
  display:flex;
  gap:8px;
  font-weight:600;
  cursor:pointer;
}
.god-mode-toggle label span{
  flex:1;
}
.god-mode-toggle input{
  width:auto;
}
.god-mode-mode-select{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:4px;
  font-size:.85rem;
}
.god-mode-mode-select label{
  display:flex;
  align-items:center;
  gap:4px;
  font-weight:600;
}
.god-mode-board{
  border:1px solid var(--border);
  border-radius:14px;
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:12px;
  background:#f8fafc;
}
.god-mode-board.hidden{
  display:none;
}
.god-mode-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.btn-reset{
  padding:6px 10px;
  font-size:.8rem;
}
.god-mode-pool{
  border:1px dashed var(--border);
  border-radius:12px;
  padding:10px;
  background:white;
}
.god-mode-column-head{
  font-weight:700;
  margin-bottom:6px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.god-mode-groups{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap:12px;
}
.god-mode-column{
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px;
  min-height:150px;
  background:white;
  display:flex;
  flex-direction:column;
}
.god-mode-list{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-height:40px;
}
.god-mode-card{
  border:1px solid var(--border);
  border-radius:8px;
  padding:6px 8px;
  background:#fff;
  cursor:grab;
  font-weight:600;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  user-select:none;
}
.god-mode-card span{
  font-size:.75rem;
  color:var(--muted);
  font-weight:500;
}
.god-mode-list.drag-over{
  outline:2px dashed var(--primary);
  outline-offset:2px;
}
.knockout-board{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:12px;
}
.knockout-match{
  border:1px solid var(--border);
  border-radius:10px;
  padding:10px;
  background:white;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.god-mode-slot{
  border:1px dashed var(--border);
  border-radius:10px;
  padding:8px;
  min-height:50px;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.god-mode-slot.empty{
  color:var(--muted);
  font-size:.8rem;
}
.god-mode-slot .slot-clear{
  border:none;
  background:transparent;
  font-size:1rem;
  cursor:pointer;
  color:var(--muted);
}
.god-mode-slot .slot-clear:hover{
  color:var(--text);
}
.bracket-edit-board{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.bracket-edit-row{
  border:1px solid var(--border);
  border-radius:10px;
  padding:10px;
  background:white;
}
.bracket-edit-slots{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:6px;
}
.bracket-edit-row label{
  font-size:.8rem;
  font-weight:600;
  display:flex;
  flex-direction:column;
  gap:4px;
  flex:1;
  min-width:160px;
}
.bracket-edit-row select{
  padding:6px 8px;
  border-radius:8px;
  border:1px solid var(--border);
  width:100%;
}
.team-picker-panel{
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height: 340px;
  position: relative;
  isolation: isolate;
  z-index: 5;
}
.home-panel{ z-index: 10; }
.team-picker-panel .results{
  flex:1;
}
.chips.stacked{
  flex-direction:column;
}
.chips.stacked .chip{
  width:100%;
}
.sidebar-info{
  background:#f0f4ff;
  border-radius:12px;
  padding:10px 12px;
}
.selected-label{
  font-weight:700;
  margin-top:4px;
}

.standing-header,
.standing-row{
  display:grid;
  grid-template-columns: 2fr 3fr 2fr 80px;
  align-items:center;
  padding:8px 12px;
  border-bottom:1px solid var(--border);
  font-size:.9rem;
}
.standing-header{
  font-weight:700;
  background:#f8fafc;
  border-radius:10px 10px 0 0;
}
.standing-row:last-child{
  border-bottom:none;
}
.standing-team{
  display:flex;
  align-items:center;
  gap:10px;
}
.standing-rank{
  width:28px;
  height:28px;
  border-radius:50%;
  background:#e5e7eb;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
}
.standing-rank.champion{
  background:#22c55e;
  color:white;
}
.standing-stats{
  display:grid;
  grid-template-columns: repeat(6, 1fr);
  gap:6px;
  text-align:center;
}
.standing-form{
  display:flex;
  gap:4px;
}
.form-pill{
  width:22px;
  height:22px;
  border-radius:4px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:white;
  font-weight:700;
  font-size:.75rem;
}
.form-pill.w{ background:#22c55e; }
.form-pill.d{ background:#facc15; color:#1f2937; }
.form-pill.l{ background:#ef4444; }
.standing-points{
  font-weight:700;
  font-size:1.1rem;
  text-align:right;
}

.tab-nav{
  display:flex;
  gap:8px;
  margin-bottom:16px;
  flex-wrap:wrap;
}
.tab-btn{
  border:1px solid var(--border);
  background:#f8fafc;
  color: var(--muted);
  padding:8px 14px;
  border-radius:999px;
  font-weight:600;
  cursor:pointer;
}
.tab-btn.active{
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.tab-pane{
  display:none;
}
.tab-pane.active{
  display:block;
}

@media (max-width: 640px){
  .tab-nav{
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:6px;
    margin-bottom:12px;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  .tab-nav::-webkit-scrollbar{
    display:none;
  }
  .tab-btn{
    flex:0 0 auto;
    white-space:nowrap;
  }
}

.fixture-card{
  margin-top: 24px;
}
.fixture-list{
  margin-top: 16px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.fixture-round{
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px;
  background:#f9fafb;
}
.fixture-round-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.fixture-round-head h4{
  margin:0;
}
.fixture-round h5{
  margin:0;
  font-size: .95rem;
}
.fixture-subgroups{
  margin-top: 10px;
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:10px;
}
.fixture-matches{
  margin-top:8px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.fixture-match{
  display:flex;
  flex-direction:column;
  gap:10px;
  background:white;
  border-radius:10px;
  padding:12px;
  font-weight:600;
}
.fixture-match.compact{
  padding:10px 14px;
  gap:8px;
}
.fixture-match-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.champion-popup-overlay{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,0.75);
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  z-index:9999;
}
.champion-popup-overlay.visible{
  display:flex;
}
.champion-popup-card{
  background:#fff;
  border-radius:18px;
  padding:24px;
  max-width:360px;
  width:100%;
  text-align:center;
  position:relative;
  box-shadow:0 20px 45px rgba(15,23,42,0.25);
}
.champion-popup-close{
  border:none;
  background:transparent;
  font-size:1.25rem;
  position:absolute;
  top:10px;
  right:12px;
  cursor:pointer;
  color:#475569;
}
.champion-popup-actions{
  margin-top:18px;
  display:flex;
  gap:8px;
  justify-content:center;
  flex-wrap:wrap;
}
.champion-popup-card .trophy-card{
  margin:0 auto 12px;
}
.fixture-match-row.compact{
  align-items:center;
  gap:16px;
}
.fixture-match-row.compact .team-line{
  flex:1;
}
.bye-match .fixture-vs{
  margin-top:0;
}
.fixture-bye-note{
  font-size:.9rem;
  color: var(--muted);
  font-weight:500;
}
.fixture-side{
  display:flex;
  flex-direction:column;
  gap:6px;
  width:45%;
}
.fixture-side.compact{
  width:auto;
  flex:1;
  justify-content:flex-start;
  gap:8px;
}
.fixture-side.compact.away-side{
  align-items:flex-end;
}
.fixture-side.compact.away-side .formation-field{
  align-items:flex-end;
}
.fixture-side.compact.away-side .formation-field span{
  text-align:right;
}
.fixture-team{
  font-size:1rem;
}
.fixture-vs{
  font-size:.85rem;
  color: var(--muted);
  margin-top:26px;
}
.fixture-center.compact .fixture-vs{
  margin-top:0;
  font-size:1rem;
  font-weight:700;
}
.fixture-stats-link{
  margin-top:6px;
  text-align:center;
}
.fixture-stats-link .match-stats-btn{
  font-size:.85rem;
  padding:0;
}
.fixture-center{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
}
.fixture-center.compact{
  min-width:110px;
  gap:4px;
}
.fixture-center.compact .fixture-center-actions{
  width:100%;
  display:flex;
  justify-content:center;
}
.fixture-center.compact .fixture-center-actions .sim-btn{
  margin-top:4px;
}
.fixture-center.compact .leg-score{
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  font-size:.78rem;
  text-align:center;
  margin-top:2px;
}
.sim-btn{
  border:none;
  background:#1f1f1f;
  color:white;
  padding:6px 18px;
  border-radius:999px;
  font-weight:700;
  cursor:pointer;
  font-size:.85rem;
}
.sim-btn:disabled{
  opacity:.4;
  cursor:not-allowed;
}
.sim-btn.locked{
  background:#9ca3af;
  color:#1f2937;
}
.fixture-bottom-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-top:6px;
  flex-wrap:wrap;
}
.fixture-formations{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.fixture-actions{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
}
.sim-btn:hover{
  opacity:.9;
}
.formation-field{
  display:flex;
  flex-direction:column;
  gap:4px;
  font-weight:600;
}
.formation-field select{
  padding:6px 10px;
  border:1px solid var(--border);
  border-radius:8px;
  background:white;
  min-width:180px;
}
.fixture-match.compact .formation-field{
  flex-direction:column;
  align-items:flex-start;
  gap:4px;
  font-weight:500;
  width:100%;
}
.fixture-match.compact .formation-field span{
  font-size:.75rem;
  min-width:0;
  color: var(--muted);
}
.fixture-match.compact .formation-field select{
  min-width:140px;
  padding:4px 10px;
}
.team-line{
  display:flex;
  justify-content:flex-start;
  align-items:center;
  gap:10px;
  width:100%;
  cursor:pointer;
}
.team-line-media{
  display:flex;
  align-items:center;
  gap:6px;
}
.team-line.compact{
  gap:8px;
  width:auto;
}
.team-line.compact.home{
  justify-content:flex-start;
}
.team-line.compact.away{
  justify-content:flex-end;
}
.team-line.compact.away .team-line-media{
  justify-content:flex-end;
}
.team-line.compact.away .team-name{
  text-align:right;
}
.team-line.compact .team-name{
  flex:0 0 auto;
}
.team-line.compact .team-score{
  min-width:32px;
  text-align:center;
}
.team-line:hover .team-name{
  color: var(--primary);
}
.team-name{
  font-size:1rem;
  font-weight:600;
  color:#0f172a;
  flex:1;
}
.team-score{
  font-size:1rem;
  font-weight:700;
  color:#111827;
}
.team-line-logo{
  width:32px;
  height:32px;
  border-radius:6px;
  border:none;
  object-fit:contain;
  background:transparent;
  flex-shrink:0;
}
.team-line.compact .team-line-logo{
  width:28px;
  height:28px;
}
.team-line-kit{
  width:36px;
  height:36px;
  object-fit:contain;
  flex-shrink:0;
}
.team-line.compact .team-line-kit{
  width:32px;
  height:32px;
}
.team-line-logo.is-generic,
.team-line-kit.is-generic,
.team-standings-logo.is-generic,
.team-standings-kit.is-generic,
.champion-logo.is-generic{
  display:none;
}
.custom-team-logo.is-generic,
.custom-team-kit.is-generic{
  display:none;
}
.club-search-overlay{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,0.55);
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  z-index:1500;
}
.club-search-overlay.open{
  display:flex;
}
.club-search-modal{
  background:white;
  border-radius:20px;
  width:min(620px, 92vw);
  max-height:88vh;
  box-shadow:0 20px 60px rgba(15,23,42,0.3);
  display:flex;
  flex-direction:column;
}
.club-search-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  padding:24px 24px 12px;
  border-bottom:1px solid var(--border);
}
.club-search-header h3{
  margin:0;
}
.club-search-close{
  border:none;
  background:transparent;
  font-size:1.5rem;
  cursor:pointer;
  line-height:1;
}

.share-overlay{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,0.65);
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  z-index:1700;
}
.share-overlay.open{
  display:flex;
}
.share-modal{
  background:#fff;
  border-radius:40px;
  padding:40px;
  width:min(950px, 100%);
  max-height:92vh;
  overflow:auto;
  box-shadow:0 40px 80px rgba(15,23,42,0.28);
  position:relative;
  display:flex;
  flex-direction:column;
  gap:28px;
}
.share-close{
  position:absolute;
  top:12px;
  right:12px;
  background:transparent;
  border:none;
  font-size:1.5rem;
  cursor:pointer;
  color:#475569;
}
.eyebrow{
  text-transform:uppercase;
  letter-spacing:.12em;
  font-size:.75rem;
  color:var(--muted);
  margin:0 0 4px;
}

.match-stats-overlay{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,0.65);
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  z-index:1600;
}
.match-stats-overlay.open{
  display:flex;
}
.match-stats-modal{
  background:#fff;
  border-radius:36px;
  width:min(920px, 96vw);
  max-height:90vh;
  padding:36px;
  box-shadow:0 35px 80px rgba(15,23,42,0.3);
  position:relative;
  overflow-y:auto;
}
.match-stats-close{
  position:absolute;
  top:14px;
  right:16px;
  border:none;
  background:transparent;
  font-size:1.75rem;
  cursor:pointer;
  color:#475569;
}
.match-stats-body{
  display:block;
}
.match-stats-card{
  border:1px solid var(--border);
  border-radius:34px;
  padding:40px;
  background:linear-gradient(145deg,#eef2ff,#dee7ff);
  box-shadow:0 20px 40px rgba(15,23,42,0.12);
}
.share-card .eyebrow{
  margin-bottom:8px;
}
.share-score{
  display:flex;
  align-items:center;
  justify-content:center;
  margin:32px 0;
  font-weight:700;
  color:#0f172a;
  gap:42px;
}
.share-team{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:10px;
}
.share-score .team-name{
  display:block;
  font-size:1.35rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#0f172a;
}
.share-scoreline{
  display:flex;
  align-items:center;
  gap:20px;
  background:rgba(15,23,42,0.08);
  padding:24px 36px;
  border-radius:24px;
  min-width:280px;
  justify-content:center;
}
.share-scoreline .team-score{
  font-size:4rem;
  width:90px;
  text-align:center;
}
.share-score .dash{
  font-size:2.5rem;
  color:#94a3b8;
}
.share-media{
  display:flex;
  gap:16px;
  align-items:center;
}
.share-logo,
.share-kit{
  width:96px;
  height:96px;
  border-radius:16px;
  object-fit:contain;
  border:none;
  background:transparent;
}
.share-logo.is-generic,
.share-kit.is-generic{
  display:none;
}
.share-stats{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:16px;
}
.share-stats .stat-row{
  display:grid;
  grid-template-columns:90px 1fr 90px;
  align-items:center;
  font-size:1rem;
}
.share-stats .stat-value{
  font-weight:700;
  text-align:center;
}
.share-stats .stat-label{
  display:flex;
  flex-direction:column;
  gap:4px;
  font-size:.9rem;
  text-align:center;
  color:#475569;
}
.share-stats .stat-bar{
  width:100%;
  height:6px;
  background:rgba(148,163,184,0.3);
  border-radius:999px;
  position:relative;
  overflow:hidden;
}
.share-stats .stat-bar-fill{
  position:absolute;
  top:0;
  bottom:0;
  background:#2563eb;
}
.share-stats .stat-bar-fill.away{
  background:#0ea5e9;
  left:auto;
  right:0;
}
.link-btn{
  background:none;
  border:none;
  color:var(--primary);
  font-weight:600;
  cursor:pointer;
  padding:0;
}
.link-btn:hover{
  text-decoration:underline;
}
.back-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-weight:600;
  color:var(--primary-600);
  text-decoration:none;
  margin:12px 0 16px;
}
.back-link:hover{
  text-decoration:underline;
}
.quick-match-layout > .back-link{
  grid-column:1 / -1;
  order:-1;
}

@media (max-width: 640px){
  .match-stats-modal{
    padding:20px;
    border-radius:28px;
  }
  .match-stats-card{
    padding:24px;
  }
  .share-score{
    flex-direction:column;
    gap:16px;
  }
  .share-team{
    align-items:center;
    text-align:center;
  }
  .share-scoreline{
    width:100%;
    min-width:0;
    padding:18px;
  }
  .share-scoreline .team-score{
    font-size:3rem;
    width:auto;
  }
  .share-stats .stat-row{
    grid-template-columns:1fr;
    gap:6px;
  }
  .share-actions{
    flex-direction:column;
  }
}
.club-search-body{
  padding:16px 24px 24px;
  display:flex;
  flex-direction:column;
  gap:16px;
}
.club-search-controls input{
  width:100%;
  border-radius:999px;
  border:1px solid var(--border);
  padding:10px 16px;
  font-size:1rem;
}
.club-search-list{
  max-height:55vh;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.club-search-letter{
  font-weight:700;
  color:var(--muted);
  margin-top:10px;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.club-search-row{
  border:1px solid var(--border);
  border-radius:10px;
  padding:10px 14px;
  background:white;
  text-align:left;
  font-size:.95rem;
  cursor:pointer;
  transition: border-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.club-search-row:hover{
  border-color:var(--primary);
  box-shadow:var(--shadow);
  color:var(--primary);
}
@media (max-width: 600px){
  .club-search-overlay{
    padding:0;
  }
  .club-search-modal{
    width:100%;
    height:100%;
    max-height:none;
    border-radius:0;
  }
  .club-search-body{
    padding:16px;
  }
}
.team-modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,0.55);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:2000;
}
.team-modal-overlay.open{
  display:flex;
}
.team-modal{
  background:white;
  border-radius:20px;
  width:min(680px, 94vw);
  max-height:90vh;
  overflow:auto;
  padding:24px;
  box-shadow:0 20px 60px rgba(15,23,42,0.35);
}
.team-modal header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:18px;
}
.team-modal header h3{
  margin:0;
}
.team-modal .team-modal-close{
  border:none;
  background:transparent;
  font-size:1.5rem;
  cursor:pointer;
}
.team-modal-actions{
  display:flex;
  align-items:center;
  gap:8px;
}
.team-modal-actions .favorite-btn{
  padding:0.35rem 0.85rem;
}
.team-modal-body{
  display:grid;
  grid-template-columns: 180px 1fr;
  gap:16px;
}
.team-modal-media{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
}
.team-modal-logo{
  width:120px;
  height:120px;
  border-radius:16px;
  object-fit:contain;
  background:transparent;
  border:none;
}
.team-modal-logo.is-generic,
.team-modal-jersey.is-generic{
  display:none;
}
.team-modal-section{
  margin-top:18px;
}
.team-modal-section h4{
  margin-bottom:8px;
}
.team-modal-list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.team-modal-list li{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  font-size:.95rem;
}
.recent-score{
  font-size:1rem;
}
.recent-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  border-radius:999px;
  font-size:.8rem;
  font-weight:700;
  color:white;
}
.recent-status-w{
  background:#22c55e;
}
.recent-status-d{
  background:#94a3b8;
}
.recent-status-l{
  background:#ef4444;
}
.team-modal-kits{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  margin-top:12px;
  width:100%;
}
.team-modal-jersey{
  width:120px;
  height:120px;
  border-radius:16px;
  object-fit:contain;
  border:1px solid var(--border);
  background:white;
  padding:6px;
  box-shadow:0 4px 16px rgba(15,23,42,0.08);
}
.team-modal-kits button{
  margin:0;
}
.team-modal-stats{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(120px,1fr));
  gap:12px;
  margin-top:18px;
}
.team-modal-stats .stat-card{
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px;
  text-align:center;
}

.favorites-inline{
  margin-bottom:12px;
}
.favorites-inline p{
  margin:0 0 4px;
}
.favorites-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  min-height:32px;
}
.favorites-list .favorite-chip{
  border:1px solid rgba(255,255,255,0.2);
  border-radius:999px;
  padding:4px 12px;
  font-size:.85rem;
  background:transparent;
  cursor:pointer;
  transition:background .2s ease, border-color .2s ease;
}
.favorites-list .favorite-chip:hover,
.favorites-list .favorite-chip:focus{
  background:rgba(255,255,255,0.12);
  border-color:rgba(255,255,255,0.5);
}
.favorites-list .favorites-empty{
  font-size:.8rem;
}

.onboarding-overlay{
  position:fixed;
  inset:0;
  background:rgba(6,9,24,0.85);
  backdrop-filter:blur(3px);
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  z-index:2500;
}
.onboarding-overlay.open{
  display:flex;
}
.onboarding-card{
  background:#0f172a;
  border-radius:20px;
  padding:24px;
  width:min(420px, 90vw);
  color:#f8fafc;
  box-shadow:0 20px 60px rgba(2,4,12,0.45);
}
.onboarding-card h3{
  margin:8px 0 12px;
}
.onboarding-controls{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:16px;
}
.onboarding-highlight{
  outline:2px solid #fbbf24;
  outline-offset:3px;
  border-radius:12px;
  transition:outline .2s ease;
}

.bracket-card{
  margin-top:24px;
}
.bracket-wrapper{
  overflow-x:auto;
  padding-bottom:12px;
}
.bracket-view{
  display:flex;
  gap:24px;
  min-width: min(1200px, 100%);
}
.bracket-column{
  flex:0 0 200px;
}
.bracket-column h5{
  margin-bottom:8px;
  font-size:0.9rem;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:0.08em;
}
.bracket-match{
  background:white;
  border:1px solid var(--border);
  border-radius:16px;
  padding:10px;
  margin-bottom:16px;
  box-shadow:var(--shadow-sm,0 2px 4px rgba(15,23,42,0.1));
}
.bracket-match.two-leg{
  border-color:#dbeafe;
}
.bracket-team{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-weight:600;
  font-size:0.95rem;
  padding:4px 0;
}
.bracket-leg-controls{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:6px;
  gap:8px;
}
.bracket-leg-label{
  font-size:0.8rem;
  color:var(--muted);
}
.leg-score{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:0.85rem;
  font-weight:600;
  color:#0f172a;
  margin-top:4px;
  gap:8px;
}
.leg-score span{
  display:inline-block;
}
.leg-score.pending{
  color:var(--muted);
  font-weight:500;
}
.penalty-note{
  font-size:0.75rem;
  color:var(--muted);
  margin-top:2px;
}
.bracket-leg-controls .sim-btn{
  flex:0 0 auto;
  padding:4px 10px;
  font-size:0.85rem;
}
.trophy-column{
  display:flex;
  align-items:center;
  justify-content:center;
}
.trophy-card{
  width:170px;
  min-height:240px;
  padding:18px 16px;
  border-radius:28px;
  background:linear-gradient(145deg,#fef3c7,#fde68a);
  box-shadow:0 14px 40px rgba(251,191,36,0.45);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  text-align:center;
  gap:10px;
}
.trophy-card .trophy-icon{
  font-size:2.6rem;
  line-height:1;
}
.trophy-card .champion-label{
  font-size:0.85rem;
  text-transform:uppercase;
  letter-spacing:0.12em;
  color:#92400e;
}
.trophy-card .champion-logo{
  width:88px;
  height:88px;
  object-fit:contain;
  background:transparent;
  padding:0;
  border:none;
  border-radius:12px;
  box-shadow:none;
}
.trophy-card .champion-name{
  font-size:1.05rem;
  font-weight:700;
  text-transform:none;
  color:#7c2d12;
  line-height:1.3;
}
.bracket-match .team-line{
  margin:2px 0;
}
.bracket-match .team-name{
  font-size:0.95rem;
}
.bracket-match .team-score{
  font-size:0.95rem;
}
.champion-round .champion-banner{
  border:1px solid var(--border);
  border-radius:16px;
  padding:20px;
  background:white;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:16px;
}
.champion-round .champion-banner .trophy-card{
  width:190px;
  min-height:250px;
}
.champion-panel{
  margin:16px 0;
}
.champion-panel .champion-banner{
  border:1px solid var(--border);
  border-radius:16px;
  padding:20px;
  background:var(--card);
  display:flex;
  align-items:center;
  gap:20px;
  flex-wrap:wrap;
}
.champion-panel .champion-details{
  flex:1;
  min-width:160px;
}
.champion-panel .champion-details h4{
  margin:0 0 4px;
}
.champion-panel .champion-placeholder{
  border:1px dashed var(--border);
  border-radius:12px;
  padding:16px;
  text-align:center;
  color:var(--muted);
  font-size:0.9rem;
}
.standings-card{
  margin-top:24px;
}
.standings-table{
  width:100%;
  border-collapse:collapse;
}
.standings-table th,
.standings-table td{
  padding:8px;
  text-align:left;
  border-bottom:1px solid var(--border);
  font-size:0.9rem;
}
.standings-table th{
  text-transform:uppercase;
  font-size:0.75rem;
  letter-spacing:0.08em;
  color:var(--muted);
}
.standings-scroll{
  overflow-x:auto;
}
.group-standings{
  margin-top:12px;
}
.group-table th:last-child,
.group-table td:last-child{
  text-align:center;
}
.qualifier-row{
  background:#f0fdf4;
}
.leader-row{
  background:#ecfdf5;
  font-weight:600;
}
.team-standings-cell{
  display:flex;
  align-items:flex-start;
  gap:12px;
}
.team-standings-media{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:4px;
  margin-left:auto;
  min-width:48px;
}
.team-standings-name{
  font-weight:600;
  display:block;
  line-height:1.2;
}
.team-standings-logo{
  width:36px;
  height:36px;
  object-fit:contain;
  border-radius:8px;
  border:none;
  background:transparent;
}
.team-standings-kit{
  width:40px;
  height:40px;
  object-fit:contain;
  border-radius:8px;
  border:none;
  background:transparent;
}
.form-track{
  display:flex;
  gap:4px;
  justify-content:center;
}
.form-dot{
  width:16px;
  height:16px;
  border-radius:999px;
  font-size:.65rem;
  font-weight:700;
  color:white;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.form-dot.form-win{ background:#16a34a; }
.form-dot.form-draw{ background:#94a3b8; }
.form-dot.form-loss{ background:#ef4444; }

/* Chips */
.chips{ display:flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 6px 10px;
  background:#eef2ff;
  color:#1e3a8a;
  border-radius: 999px;
  flex-wrap:nowrap;
}
.chip-media{
  display:inline-flex;
  align-items:center;
  gap:4px;
  flex-shrink:0;
}
.chip-logo,
.chip-kit{
  width:28px;
  height:28px;
  object-fit:contain;
  border-radius:6px;
  background:white;
  border:1px solid transparent;
}
.chip-kit{
  padding:2px;
  border-color: var(--border);
}
.chip-logo.is-generic,
.chip-kit.is-generic{
  display:none;
}
.chip-info{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}
.chip-info strong{
  font-size:.9rem;
  line-height:1.1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.chip-info .small{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.chip button{
  border:0;
  background:transparent;
  cursor:pointer;
  margin-left:auto;
  font-size:1rem;
}
.chip-team{
  cursor:pointer;
  border:1px solid transparent;
  padding:6px;
  border-radius:999px;
}
.chip-team.is-assigned{
  border-color:#34d399;
  background:#ecfdf5;
}
.chip-flag{
  font-size:.65rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  background:#fee2e2;
  color:#b91c1c;
  padding:1px 6px;
  border-radius:999px;
  font-weight:700;
  display:inline-flex;
  margin-top:4px;
}
.chip-flag.assigned{
  background:#dcfce7;
  color:#15803d;
}
.chip-team:hover{
  border-color: var(--primary);
}

/* Cards layout */
.cards{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  width:100%;
}

/* Home Quick Match */
.home-quickmatch{
  margin:24px 0 28px;
  padding:28px 32px;
  background:linear-gradient(135deg, #f8fbff 0%, #eef2ff 100%);
  border:1px solid var(--border);
  border-radius:22px;
  display:flex;
  gap:32px;
  align-items:stretch;
  box-shadow:0 18px 40px rgba(15,23,42,0.1);
}
.home-qm-left{
  flex:1 1 40%;
  min-width:260px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.home-qm-left h2{
  margin:0 0 8px;
  font-size:2rem;
}
.home-qm-sub{
  margin:0;
  color:var(--muted);
  max-width:540px;
  line-height:1.5;
}
.home-qm-right{
  flex:1 1 60%;
  display:flex;
  flex-direction:column;
  gap:12px;
  align-items:flex-start;
  justify-content:center;
}
.home-qm-selects{
  display:flex;
  flex-direction:column;
  gap:10px;
  width:100%;
}
.home-qm-select{
  width:min(460px, 100%);
  padding:13px 14px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  font-size:1rem;
  color:var(--text);
  box-shadow:0 6px 16px rgba(15,23,42,0.06);
}
.home-qm-select:focus{
  outline:2px solid rgba(37,99,235,0.25);
  border-color:var(--primary);
}
.home-qm-field{
  position:relative;
  width:100%;
}
.home-qm-suggestions{
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  right:0;
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px;
  box-shadow:0 18px 36px rgba(15,23,42,0.14);
  max-height:260px;
  overflow-y:auto;
  padding:6px;
  z-index:25;
  display:none;
}
.home-qm-suggestions.open{
  display:block;
}
.home-qm-suggestion{
  width:100%;
  border:0;
  background:transparent;
  text-align:left;
  padding:10px 12px;
  border-radius:10px;
  font-size:0.98rem;
  color:var(--text);
  cursor:pointer;
}
.home-qm-suggestion:hover,
.home-qm-suggestion:focus{
  background:#eef2ff;
  outline:0;
}
.home-qm-empty{
  padding:10px 12px;
  color:var(--muted);
  font-size:0.95rem;
}
.home-qm-play{
  width:min(460px, 100%);
  justify-content:center;
  font-weight:700;
}
.home-qm-link{
  color:var(--primary);
  font-weight:700;
  text-decoration:none;
}
.home-qm-link:hover{
  text-decoration:underline;
}

/* Home Match of the Day */
.home-motd{
  margin: 0;
  display:flex;
  flex-direction:column;
  gap:14px;
}
.home-motd-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}
.home-motd-header h2{
  margin:2px 0 6px;
  font-size:2.25rem;
  font-weight:800;
}
.home-motd-header .muted{
  max-width:720px;
}
.home-motd-note{
  margin:0;
}
.home-motd-actions{
  display:flex;
  align-items:flex-end;
  gap:10px;
}
.home-motd-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap:18px;
}
.home-motd-card{
  display:flex;
  flex-direction:column;
  gap:12px;
  height:100%;
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow:0 14px 32px rgba(15,23,42,0.12);
  padding:16px;
}
.home-motd-meta{
  margin:0 0 2px;
  color:var(--text);
  font-weight:700;
  font-size:1.1rem;
}
.home-motd-meta-block{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.home-motd-headline{
  display:flex;
  align-items:center;
  gap:12px;
}
.home-motd-flag{
  width:38px;
  height:38px;
}
.home-motd-teams{
  display:grid;
  grid-template-columns: auto auto auto;
  gap:8px;
  align-items:center;
  font-weight:700;
  font-size:1.05rem;
}
.home-motd-teams .muted{
  font-weight:600;
}
.home-motd-body{
  background: linear-gradient(135deg, rgba(255,252,245,0.92), rgba(240,244,252,0.95));
  border:1px dashed rgba(12,18,33,0.1);
  border-radius:14px;
  padding:14px 16px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.home-motd-row{
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:700;
  font-size:1.05rem;
}
.home-motd-team{
  color:var(--text);
}
.home-motd-body .btn{
  align-self:flex-start;
  margin-top:6px;
}
.home-motd-empty{
  margin:0;
  color:var(--muted);
}

/* Matchday shared styles */
.flag-round{
  width:38px;
  height:38px;
  border-radius:50%;
  border:1px solid #d8dce4;
  flex-shrink:0;
  display:inline-block;
  background-size:cover;
  background-position:center;
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.55),
    inset 0 -2px 4px rgba(0, 0, 0, 0.18),
    0 3px 8px rgba(0, 0, 0, 0.15);
  position:relative;
  overflow:hidden;
}
.flag-round::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(135deg, rgba(255,255,255,0.45), rgba(255,255,255,0.08) 40%, rgba(0,0,0,0.15) 65%, rgba(255,255,255,0.2));
  pointer-events:none;
  mix-blend-mode:screen;
}
.club-badge{
  width:38px;
  height:38px;
  border-radius:50%;
  background-color: var(--sub, #e5e7eb);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.08) 35%, rgba(0, 0, 0, 0.2) 65%, rgba(255, 255, 255, 0.25));
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:2px solid #0b1020;
  flex-shrink:0;
  position:relative;
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.6),
    inset 0 -2px 4px rgba(0, 0, 0, 0.32),
    0 3px 8px rgba(0, 0, 0, 0.2);
}
.club-badge::after{
  content:"";
  width:70%;
  height:70%;
  border-radius:50%;
  background-color: var(--main, #0b1020);
  background-image:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.45), transparent 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.05) 35%, rgba(0, 0, 0, 0.2) 65%, rgba(255, 255, 255, 0.2));
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  border:1px solid rgba(0, 0, 0, 0.25);
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%, -50%);
}

/* Flag palettes (shared with matchday) */
.flag-italy{ background: linear-gradient(90deg, #009246 0 33%, #ffffff 33% 66%, #ce2b37 66%); }
.flag-spain{ background: linear-gradient(#aa151b 0 25%, #f1bf00 25% 75%, #aa151b 75% 100%); }
.flag-germany{ background: linear-gradient(#000000 0 33%, #dd0000 33% 66%, #ffce00 66% 100%); }
.flag-france{ background: linear-gradient(90deg, #0055a4 0 33%, #ffffff 33% 66%, #ef4135 66%); }
.flag-portugal{ background: linear-gradient(90deg, #006600 0 40%, #c0003c 40% 100%); }
.flag-netherlands{ background: linear-gradient(#ae1c28 0 33%, #ffffff 33% 66%, #21468b 66% 100%); }
.flag-brazil{
  background:
    radial-gradient(circle at 50% 50%, #002776 0 35%, transparent 36%),
    linear-gradient(135deg, transparent 42%, #ffdf00 42% 58%, transparent 58%),
    linear-gradient(45deg, transparent 42%, #ffdf00 42% 58%, transparent 58%),
    linear-gradient(#009c3b 0 100%);
}
.flag-england{
  background:
    linear-gradient(90deg, #ffffff 0 37%, #ce1126 37% 63%, #ffffff 63% 100%),
    linear-gradient(#ffffff 0 45%, #ce1126 45% 55%, #ffffff 55% 100%);
}
.flag-mexico{ background: linear-gradient(90deg, #006341 0 33%, #ffffff 33% 66%, #ce1126 66% 100%); }
.flag-croatia{ background: linear-gradient(#ff0000 0 33%, #ffffff 33% 66%, #171796 66% 100%); }
.flag-usa{
  background:
    repeating-linear-gradient(#b22234 0 7.69%, #ffffff 7.69% 15.38%),
    linear-gradient(90deg, #3c3b6e 0 45%, transparent 45% 100%);
  background-size: 100% 100%, 100% 100%;
}
.flag-turkey{ background: #e30a17; }
.flag-belgium{ background: linear-gradient(90deg, #000000 0 33%, #fdda24 33% 66%, #ef3340 66% 100%); }
.flag-conmebol{
  background: radial-gradient(circle at 40% 40%, #f8e3a1 0 45%, transparent 46%), linear-gradient(135deg, #caa34a 0 50%, #f4d77c 50% 100%);
}

/* Responsive */
@media (max-width: 900px){
  .hero{
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "quickmatch"
      "motd"
      "cta"
      "card"
      "expect";
    align-items: start;
  }
  .two-col{ grid-template-columns: 1fr; }
  .grid-3{ grid-template-columns: 1fr; }
  .grid-2{ grid-template-columns: 1fr; }
  .quick-match-layout{ grid-template-columns: 1fr; }
  .team-picker-panel-group{ grid-template-columns: 1fr; }
  .tactics-preview{ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .builder-layout{ grid-template-columns: 1fr; }
  .builder-sidebar{ position: static; }
  .home-quickmatch{
    flex-direction:column;
    align-items:flex-start;
    padding:24px 22px;
  }
  .home-qm-right{
    width:100%;
  }
  .home-qm-select,
  .home-qm-play{
    width:100%;
  }
  .home-qm-suggestions{
    max-height:240px;
  }
  .team-picker-panel{
    min-height:auto;
  }
  .team-picker-panel .results{
    flex:0 0 auto;
  }
  .results-stretch{
    min-height:150px;
  }
}
.dashboard-shell main.container{
  max-width:none;
  margin:0;
  padding:0 24px;
}
.dashboard-layout{
  display:flex;
  gap:24px;
  align-items:flex-start;
}
.dashboard-sidebar{
  width:320px;
  flex:0 0 320px;
  display:flex;
  flex-direction:column;
  gap:16px;
}
.dashboard-sidebar .card{
  margin:0;
}
.dashboard-main{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:16px;
}
.accordion-card .accordion-header{
  width:100%;
  border:none;
  background:transparent;
  font-size:1rem;
  font-weight:600;
  padding:12px 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  cursor:pointer;
}
.accordion-card .toggle-icon{
  transition:transform .2s ease;
}
.accordion-card .accordion-header[aria-expanded="false"] .toggle-icon{
  transform:rotate(-90deg);
}
.accordion-card .accordion-panel{
  margin-top:8px;
}
.accordion-panel[hidden]{ display:none; }
.menu-showcase{
  display:flex;
  flex-wrap:wrap;
  gap:32px;
  margin:0 auto 40px;
}
.showcase-images{
  flex:1 1 560px;
}
.screenshot-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:22px;
}
.screenshot-tile{
  display:flex;
  flex-direction:column;
  border-radius:24px;
  overflow:hidden;
  box-shadow:0 15px 40px rgba(15,23,42,0.15);
  background:#fff;
  transition:transform .2s ease, box-shadow .2s ease;
}
.screenshot-gallery{
  display:flex;
  gap:0;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
  padding-bottom:8px;
}
.screenshot-gallery::-webkit-scrollbar{
  height:6px;
}
.screenshot-gallery::-webkit-scrollbar-thumb{
  background:rgba(15,23,42,0.25);
  border-radius:999px;
}
.screenshot-gallery img{
  width:100%;
  flex:0 0 100%;
  height:240px;
  object-fit:cover;
  border-radius:0;
  scroll-snap-align:center;
  background:#fff;
}
.screenshot-tile-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 16px;
}
.screenshot-tile-footer span{
  font-weight:600;
  font-size:1rem;
}
.screenshot-link{
  text-decoration:none;
  font-weight:600;
  font-size:.9rem;
  color:#0d47a1;
}
.screenshot-link:hover{
  text-decoration:underline;
}
.screenshot-tile:hover{
  transform:translateY(-4px);
  box-shadow:0 22px 50px rgba(15,23,42,0.18);
}
.screenshot-tile:hover .screenshot-link{
  color:#1565c0;
}
.showcase-copy{
  flex:1 1 320px;
  display:flex;
  flex-direction:column;
  gap:16px;
}
.showcase-copy h2{
  font-size:2.4rem;
  margin:0;
}
.showcase-copy p{
  font-size:1.05rem;
  line-height:1.6;
}
.lightbox-overlay{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,0.85);
  display:none;
  /* allows infinite horizontal scroll to feel continuous */
  align-items:center;
  justify-content:center;
  z-index:9990;
  padding:20px;
}
.lightbox-overlay.open{
  display:flex;
}
.lightbox-content{
  position:relative;
  max-width:90vw;
  max-height:90vh;
}
.lightbox-content img{
  width:100%;
  height:auto;
  max-height:90vh;
  object-fit:contain;
  border-radius:12px;
  box-shadow:0 25px 45px rgba(0,0,0,0.3);
}
.lightbox-close{
  position:absolute;
  top:-10px;
  right:-10px;
  border:none;
  background:#fff;
  border-radius:50%;
  width:38px;
  height:38px;
  font-size:1.2rem;
  cursor:pointer;
}
.ucl-page .card{
  margin-bottom:22px;
}
.ucl-top-row{
  display:grid;
  grid-template-columns:1.4fr 1fr;
  gap:16px;
  align-items:stretch;
}
.ucl-left-stack{
  display:flex;
  flex-direction:column;
  gap:16px;
}
.ucl-hero{
  display:flex;
  gap:28px;
  align-items:flex-start;
  background:linear-gradient(135deg, #f8fbff 0%, #eef2ff 100%);
  border:1px solid var(--border);
  border-radius:22px;
}
.ucl-hero-copy{
  flex:1 1 60%;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.ucl-cta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.ucl-hero-panel{
  flex:1 1 40%;
  display:grid;
  gap:12px;
}
.ucl-stat{
  padding:14px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
  box-shadow:0 10px 26px rgba(15,23,42,0.08);
}
.ucl-module{
  border:1px solid var(--border);
}
.ucl-main-row{
  display:grid;
  grid-template-columns: 1fr;
  gap:16px;
  align-items:flex-start;
}
.ucl-module-col{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.ucl-knockouts{
  margin-top:12px;
  border-top:1px solid var(--border);
  padding-top:12px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.ucl-ko-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  align-items:flex-start;
}
.ucl-ko-group{
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px;
  background:#f8fafc;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.ucl-ko-group-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.ucl-ko-round-actions{
  display:flex;
  gap:8px;
}
.ucl-ko-tie{
  border:1px solid var(--border);
  border-radius:10px;
  padding:10px;
  background:white;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.ucl-ko-title{
  margin:0;
  font-weight:700;
}
.ucl-ko-leg{
  padding:12px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#f8fafc;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.ucl-ko-card + .ucl-ko-card{
  margin-top:10px;
}
.ucl-ko-line{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
}
.ucl-ko-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  align-items:center;
}
.ucl-ko-actions.center{
  justify-content:center;
}
.ucl-ko-sep{
  display:flex;
  align-items:center;
  justify-content:center;
}
.ucl-ko-actions{
  display:flex;
  align-items:center;
  gap:8px;
}
.ucl-ko-score{
  font-weight:700;
}
.ucl-ko-pk{
  margin-left:6px;
  font-size:12px;
  color:#555;
  font-weight:700;
}
.ucl-standings-card{
  position:sticky;
  top:12px;
}
.ucl-module-head{
  display:flex;
  justify-content:space-between;
  gap:20px;
  flex-wrap:wrap;
  align-items:flex-start;
}
.ucl-controls{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:flex-end;
}
.ucl-select,
.ucl-filter{
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:0.95rem;
  color:var(--muted);
}
.ucl-select select,
.ucl-filter input{
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:10px;
  min-width:160px;
}
.ucl-day-btn[disabled]{
  opacity:0.65;
  cursor:not-allowed;
}
.ucl-meta-row{
  margin-top:8px;
  color:var(--muted);
  font-weight:600;
}
.ucl-fixture-list{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:12px;
  margin-top:14px;
}
.ucl-fixture{
  display:block;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#f8fafc;
}
.ucl-fixture-columns{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
  gap:16px;
  align-items:flex-start;
}
.ucl-fixture-column{
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
  padding:12px;
  box-shadow:0 10px 26px rgba(15,23,42,0.05);
}
.ucl-md-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:10px;
}
.ucl-fixture-columns .ucl-fixture-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:0;
}
.ucl-fixture:hover{
  box-shadow:0 8px 18px rgba(15,23,42,0.08);
}
.ucl-fixture-names{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  font-weight:700;
}
.ucl-team-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
}
.ucl-team-chip-logo{
  width:24px;
  height:24px;
  object-fit:contain;
  border-radius:6px;
  border:1px solid var(--border);
  background:#fff;
  box-shadow:0 2px 6px rgba(0,0,0,0.05);
}
.ucl-team-chip-kit{
  width:22px;
  height:22px;
  object-fit:contain;
  border-radius:5px;
  border:1px solid var(--border);
  background:#f8fafc;
}
.ucl-team-chip-swatch{
  display:inline-block;
  width:18px;
  height:18px;
  border-radius:5px;
  border:1px solid var(--border);
  background:#e5e7eb;
  box-shadow:0 1px 4px rgba(0,0,0,0.05);
}
.ucl-mask-media{
  background-color: transparent;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}
.ucl-fixture-names .vs{
  color:var(--muted);
  font-weight:600;
}
.ucl-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
}
.ucl-played-score{
  font-weight:700;
  color:var(--muted);
  text-align:left;
}
.ucl-actions .ucl-right{
  display:flex;
  align-items:center;
}
.ucl-played-footer{
  margin-top:6px;
  display:block;
}
.cl-result-row{
  padding:14px 0;
  border-bottom:1px solid #e6e6e6;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.cl-result-line{
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  align-items:center;
  gap:12px;
}
.cl-result-line .home{
  text-align:right;
}
.cl-result-line .away{
  text-align:left;
}
.cl-result-line .home,
.cl-result-line .away{
  font-weight:600;
  font-size:17px;
}
.cl-result-line .score{
  font-size:18px;
  margin:4px 0;
}
.view-stats{
  margin-top:6px;
  padding:5px 12px;
  font-size:14px;
  display:block;
}
.ucl-empty{
  color:var(--muted);
  margin:8px 0 0;
}
.ucl-last-result{
  margin-top:10px;
  padding:10px 12px;
  border:1px dashed var(--border);
  border-radius:10px;
  background:#f9fafb;
  text-align:center;
}
.ucl-last-line{
  font-weight:700;
  font-size:1.05rem;
  margin-bottom:6px;
}
@media (max-width: 1024px){
  .ucl-top-row{
    display:flex;
    flex-direction:column;
    gap:16px;
  }
  .ucl-left-stack{
    display:contents;
  }
  .ucl-hero{
    order:1;
  }
  .ucl-standings-card{
    order:2;
  }
  #uclModule{
    order:3;
  }
}
@media (max-width: 900px){
  .ucl-hero{
    flex-direction:column;
  }
  .ucl-module-head{
    flex-direction:column;
  }
  .ucl-fixture{
    flex-direction:column;
    align-items:flex-start;
  }
  .ucl-actions{
    width:100%;
  }
  .ucl-actions .btn{
    flex:1 1 48%;
  }
  .ucl-main-row{
    grid-template-columns: 1fr;
  }
  .ucl-standings-card{
    position:static;
  }
  .ucl-knockouts{
    padding-top:0;
    border-top:none;
  }
  .ucl-ko-leg{
    align-items:flex-start;
  }
  .ucl-ko-vs{
    grid-template-columns: 1fr;
    justify-items:flex-start;
  }
}

.cl-table{
  width:100%;
  border-collapse:collapse;
  font-size:14px;
}
.cl-team-cell{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:140px;
}
.cl-logo{
  width:34px;
  height:34px;
  object-fit:contain;
  border-radius:50%;
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.55),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2),
    0 4px 10px rgba(0, 0, 0, 0.12);
}
.cl-team-meta{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
}
.cl-team-name{
  font-weight:600;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.cl-kit-thumb{
  width:22px;
  height:22px;
  object-fit:contain;
  border-radius:4px;
  border:1px solid var(--border);
  background:#f8fafc;
}
.cl-table th,
.cl-table td{
  padding:4px 6px;
  border-bottom:1px solid #eee;
}
.cl-table td:nth-child(2){
  min-width:180px;
}
/* 1–8: Round of 16 (green) */
.cl-table tr.pos-r16 td{
  background:#e6f4ea;
  border-left:4px solid #34a853;
}
/* 9–16: Play-off seeded (blue) */
.cl-table tr.pos-po-seeded td{
  background:#e8f0fe;
  border-left:4px solid #4285f4;
}
/* 17–24: Play-off unseeded (yellow) */
.cl-table tr.pos-po-unseeded td{
  background:#fff7e6;
  border-left:4px solid #fbbc04;
}
/* 25–36: Eliminated (light grey) */
.cl-table tr.pos-out td{
  background:#f5f5f5;
  color:#777;
}
