/* FBL24 final QA fixes: layout stability, unified light detail pages, and safer overflow. */
html, body { max-width: 100%; overflow-x: clip; }
.fbl24-theme *, .fbl24-theme *::before, .fbl24-theme *::after { box-sizing: border-box; }
img, svg, video, canvas { max-width: 100%; }

/* Header spacing: prevent nav words from touching or wrapping into each other. */
.fbl24-primary-nav { min-width: 0; gap: clamp(16px, 1.35vw, 30px); white-space: nowrap; }
.fbl24-nav-link { padding-inline: 2px; }
.fbl24-header-inner { gap: clamp(14px, 1.4vw, 28px); }
.fbl24-header-search { min-width: 260px; }
@media (max-width: 1280px) {
  .fbl24-primary-nav { gap: 16px; }
  .fbl24-header-search { max-width: 360px; }
}
@media (max-width: 1120px) {
  .fbl24-primary-nav, .fbl24-header-search { display: none; }
}

/* Competitions: the right rail should never overlap the table/cards. */
.fbl24-comp-page { overflow-x: clip; }
.fbl24-comp-layout {
  width: min(100%, 1480px) !important;
  max-width: 100%;
  grid-template-columns: minmax(220px, 250px) minmax(0, 1fr) minmax(260px, 290px) !important;
  gap: clamp(16px, 1.4vw, 24px) !important;
  align-items: start;
  overflow: visible;
}
.fbl24-comp-left,
.fbl24-comp-main,
.fbl24-comp-right,
.fbl24-comp-card,
.fbl24-comp-table-card,
.fbl24-comp-table-wrap,
.fbl24-comp-popular { min-width: 0; max-width: 100%; }
.fbl24-comp-main { overflow: hidden; }
.fbl24-comp-right { z-index: 1; }
.fbl24-comp-popular {
  grid-auto-columns: minmax(118px, 150px) !important;
  contain: inline-size;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}
.fbl24-comp-popular-card { min-width: 118px !important; }
.fbl24-comp-table-wrap { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
@media (max-width: 1520px) {
  .fbl24-comp-layout { grid-template-columns: minmax(220px, 250px) minmax(0, 1fr) !important; }
  .fbl24-comp-right {
    position: static !important;
    grid-column: 1 / -1;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1050px) {
  .fbl24-comp-layout { grid-template-columns: 1fr !important; padding-inline: 14px !important; }
  .fbl24-comp-left,
  .fbl24-comp-right { position: static !important; grid-column: auto; }
  .fbl24-comp-right { grid-template-columns: 1fr !important; }
}

/* Shared light pages: players/team/league/country should feel like one FBL24 system. */
.fbl24-clean-page,
.fbl24-player-profile-page,
.fbl24-league-profile-page,
.fbl24-country-page,
.fblp-page,
.tp-shell {
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%) !important;
  color: #07111f !important;
}
.fbl24-simple-shell,
.fbl24-player-profile,
.fbl24-league-profile,
.fblp-shell,
.tp-shell {
  max-width: 1440px;
  width: 100%;
  margin-inline: auto;
  padding-inline: clamp(12px, 2vw, 28px);
  overflow-x: clip;
}
.fbl24-simple-card,
.fbl24-info-card,
.fbl24-player-hero-card,
.fbl24-player-card,
.fbl24-league-hero-card,
.fbl24-league-card,
.fblp-toolbar,
.fblp-side-card,
.fblp-status,
.fblp-card,
.tp-hero,
.tp-panels,
.tp-card {
  border: 1px solid #dbe5f1 !important;
  background: #fff !important;
  color: #07111f !important;
  box-shadow: 0 18px 44px rgba(9, 30, 66, .08) !important;
}
.fblp-page,
.fblp-page *:not(i),
.tp-shell,
.tp-shell *:not(i) { color-scheme: light; }
.fblp-hero,
.fblp-search-box,
.fblp-side-btn,
.fblp-statline div,
.tp-stat,
.tp-card-head,
.tp-panel,
.tp-tab.active,
.tp-match,
.tp-player,
.tp-trophy,
.tp-logo-wrap {
  background: #fff !important;
  border-color: #dbe5f1 !important;
  color: #07111f !important;
}
.fblp-hero h1,
.fblp-hero-card strong,
.fblp-name strong,
.fblp-statline strong,
.fblp-status h2,
.fblp-side-title,
.tp-team-name,
.tp-card-head h3,
.tp-stat b,
.tp-match-score,
.tp-player-name,
.tp-trophy-name,
.tp-empty h4 {
  color: #07111f !important;
}
.fblp-hero p,
.fblp-muted,
.fblp-select-grid span,
.fblp-name span,
.fblp-statline span,
.fblp-status p,
.tp-badge,
.tp-stat span,
.tp-match-meta,
.tp-player-pos,
.tp-stat-label,
.tp-empty,
.tp-trophy-count { color: #66758d !important; }
.fblp-search-box input,
.fblp-select-grid select {
  background: #fff !important;
  color: #07111f !important;
  border-color: #dbe5f1 !important;
}
.fblp-pill.is-active,
.fblp-search-box button,
.fblp-load-more,
.tp-tab.active::after,
.fbl24-green-btn {
  background: #07943f !important;
  border-color: #07943f !important;
  color: #fff !important;
}
.fblp-pill,
.fblp-quick button,
.tp-action,
.fbl24-outline-btn {
  background: #fff !important;
  border-color: #dbe5f1 !important;
  color: #07111f !important;
}
.fblp-card::before,
.tp-shell::before,
.tp-hero::before { opacity: .25 !important; }
.tp-tabs { border-top-color: #dbe5f1 !important; }
.tp-panels { border-top: 1px solid #dbe5f1 !important; border-radius: 18px !important; }
.tp-panel { background: #fff !important; }
.tp-match:hover,
.tp-player:hover,
.fblp-card:hover,
.fblp-side-btn:hover { transform: translateY(-1px); border-color: #a8dcb8 !important; }

/* Detail-page empty/search states. */
.fbl24-missing-id-panel {
  max-width: 940px;
  margin: 38px auto 96px;
  border: 1px solid #dbe5f1;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(9, 30, 66, .08);
  padding: clamp(22px, 4vw, 42px);
  text-align: center;
}
.fbl24-missing-id-panel h1 { margin: 0 0 8px; color: #07111f; font-size: clamp(28px, 4vw, 44px); line-height: 1; }
.fbl24-missing-id-panel p { margin: 0 auto 22px; max-width: 660px; color: #66758d; font-weight: 650; line-height: 1.6; }
.fbl24-missing-id-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.fbl24-missing-id-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 12px; padding: 0 18px; text-decoration: none; font-weight: 900; }
.fbl24-missing-id-actions a:first-child { background: #07943f; color: #fff; }
.fbl24-missing-id-actions a:last-child { background: #fff; border: 1px solid #dbe5f1; color: #07111f; }

@media (max-width: 780px) {
  .fbl24-player-hero-card,
  .fbl24-league-hero-card,
  .fblp-hero,
  .tp-hero { border-radius: 18px !important; }
  .fblp-layout { grid-template-columns: 1fr !important; }
  .fblp-hero-card, .tp-hero-top { min-width: 0 !important; }
}
.flag-chip.is-image { background: #fff !important; color: transparent !important; overflow: hidden; padding: 0; }
.flag-chip.is-image img { width: 100%; height: 100%; object-fit: contain; display: block; }
.wc-provider-notice .empty-card button,
.empty-card [data-wc-retry] { margin-top: 12px; min-height: 36px; border: 0; border-radius: 10px; background: #07943f; color: #fff; padding: 0 16px; font: inherit; font-weight: 900; cursor: pointer; }
.wc-match-row { color: inherit; text-decoration: none; }
@media (max-width: 1440px) {
  .worldcup-dashboard { grid-template-columns: 226px minmax(0, 1fr) !important; }
  .worldcup-right { grid-column: 2; }
}
@media (max-width: 1080px) {
  .worldcup-dashboard { grid-template-columns: 1fr !important; }
  .worldcup-left, .worldcup-right { grid-column: auto; }
  .worldcup-left { order: 2; }
  .worldcup-main { order: 1; }
  .worldcup-right { order: 3; }
}


/* --------------------------------------------------------------------------
   FBL24 v1.0.3 compact layout + header-offset polish
   Fixes oversized legacy detail pages and makes all kept pages start after
   the shared sticky header with the same Home/Live visual scale.
   -------------------------------------------------------------------------- */
:root {
  --fbl24-header-height: var(--fbl24-header-h, 120px);
  --fbl24-detail-max: 1280px;
  --fbl24-detail-gutter: clamp(14px, 2.1vw, 24px);
  --fbl24-detail-top: clamp(14px, 1.6vw, 22px);
}

body.fbl24-clean-ui {
  overflow-x: clip !important;
}

body.fbl24-clean-ui main,
body.fbl24-clean-ui .fbl24-comp-page,
body.fbl24-clean-ui .fbl24-league-profile-page,
body.fbl24-clean-ui .fbl24-player-profile-page,
body.fbl24-clean-ui .fbl24-clean-page,
body.fbl24-clean-ui .fblp-page {
  position: relative !important;
  z-index: 0 !important;
  overflow-x: clip !important;
}

/* A single content rhythm below the shared header. Home/Live SPA keeps its own
   shell padding; all old PHP/detail pages are normalized here. */
body.fbl24-clean-ui:not(.fbl24-spa-page) .fbl24-comp-page,
body.fbl24-clean-ui:not(.fbl24-spa-page) .fbl24-league-profile-page,
body.fbl24-clean-ui:not(.fbl24-spa-page) .fbl24-player-profile-page,
body.fbl24-clean-ui:not(.fbl24-spa-page) .fbl24-clean-page,
body.fbl24-clean-ui:not(.fbl24-spa-page) .fblp-page {
  padding-top: var(--fbl24-detail-top) !important;
}

body.fbl24-clean-ui .fbl24-comp-layout,
body.fbl24-clean-ui .fbl24-simple-shell,
body.fbl24-clean-ui .fbl24-simple-shell--narrow,
body.fbl24-clean-ui .fbl24-league-profile,
body.fbl24-clean-ui .fbl24-player-profile,
body.fbl24-clean-ui .fblp-shell,
body.fbl24-clean-ui .tp-shell,
body.fbl24-clean-ui .fbl-standings-page {
  width: min(var(--fbl24-detail-max), calc(100% - (var(--fbl24-detail-gutter) * 2))) !important;
  max-width: var(--fbl24-detail-max) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
}

/* Competitions: compact Home-sized browser with no sidebar collision. */
body.fbl24-clean-ui .fbl24-comp-layout {
  grid-template-columns: minmax(205px, 230px) minmax(0, 1fr) minmax(230px, 260px) !important;
  gap: 16px !important;
  padding-top: 0 !important;
  padding-bottom: 70px !important;
}
body.fbl24-clean-ui .fbl24-comp-left,
body.fbl24-clean-ui .fbl24-comp-right {
  top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--fbl24-header-h, 120px) + 14px) !important;
}
body.fbl24-clean-ui .fbl24-comp-title h1 {
  font-size: clamp(28px, 2.4vw, 36px) !important;
}
body.fbl24-clean-ui .fbl24-comp-card,
body.fbl24-clean-ui .fbl24-comp-filter-card {
  border-radius: 15px !important;
  padding: 16px !important;
}
body.fbl24-clean-ui .fbl24-comp-popular {
  grid-auto-columns: minmax(108px, 132px) !important;
  max-width: 100% !important;
  overflow-x: auto !important;
}
body.fbl24-clean-ui .fbl24-comp-popular-card {
  min-width: 108px !important;
  min-height: 128px !important;
  padding: 12px 8px !important;
}
body.fbl24-clean-ui .fbl24-comp-popular-card img {
  width: 46px !important;
  height: 46px !important;
}
body.fbl24-clean-ui .fbl24-comp-table th,
body.fbl24-clean-ui .fbl24-comp-table td {
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}
@media (max-width: 1380px) {
  body.fbl24-clean-ui .fbl24-comp-layout {
    grid-template-columns: minmax(200px, 225px) minmax(0, 1fr) !important;
  }
  body.fbl24-clean-ui .fbl24-comp-right {
    position: static !important;
    grid-column: 1 / -1 !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 980px) {
  body.fbl24-clean-ui .fbl24-comp-layout {
    grid-template-columns: 1fr !important;
    width: min(100% - 20px, var(--fbl24-detail-max)) !important;
    padding-bottom: 86px !important;
  }
  body.fbl24-clean-ui .fbl24-comp-left,
  body.fbl24-clean-ui .fbl24-comp-right {
    position: static !important;
    grid-column: auto !important;
  }
  body.fbl24-clean-ui .fbl24-comp-right {
    grid-template-columns: 1fr !important;
  }
}

/* League detail: same visual scale as Home/Live, not full-browser width. */
body.fbl24-clean-ui .fbl24-league-profile-page {
  padding-bottom: 70px !important;
}
body.fbl24-clean-ui .fbl24-league-breadcrumbs,
body.fbl24-clean-ui .fbl24-player-breadcrumbs {
  margin-bottom: 12px !important;
  font-size: 12px !important;
}
body.fbl24-clean-ui .fbl24-league-hero-card {
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 16px !important;
  min-height: 0 !important;
  padding: clamp(16px, 2vw, 22px) !important;
  border-radius: 20px !important;
}
body.fbl24-clean-ui .fbl24-league-hero-media {
  inset: 0 0 0 52% !important;
  opacity: .82 !important;
}
body.fbl24-clean-ui .fbl24-league-identity {
  gap: 16px !important;
  max-width: 680px !important;
}
body.fbl24-clean-ui .fbl24-league-logo-wrap {
  width: clamp(76px, 7vw, 104px) !important;
  height: clamp(76px, 7vw, 104px) !important;
  border-radius: 18px !important;
  padding: 12px !important;
}
body.fbl24-clean-ui .fbl24-league-title-block h1 {
  margin: 8px 0 7px !important;
  font-size: clamp(34px, 3.7vw, 52px) !important;
  line-height: .98 !important;
}
body.fbl24-clean-ui .fbl24-league-kicker,
body.fbl24-clean-ui .fbl24-player-kicker {
  padding: 6px 10px !important;
  font-size: 11px !important;
}
body.fbl24-clean-ui .fbl24-league-tags {
  gap: 8px !important;
  margin-top: 10px !important;
}
body.fbl24-clean-ui .fbl24-league-tags span,
body.fbl24-clean-ui .fbl24-player-clubline a,
body.fbl24-clean-ui .fbl24-player-clubline span {
  min-height: 32px !important;
  padding: 5px 10px !important;
  font-size: 12px !important;
}
body.fbl24-clean-ui .fbl24-league-btn,
body.fbl24-clean-ui .fbl24-player-btn {
  min-height: 40px !important;
  padding-inline: 13px !important;
  border-radius: 12px !important;
}
body.fbl24-clean-ui .fbl24-league-icon-btn,
body.fbl24-clean-ui .fbl24-player-icon-btn {
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
}
body.fbl24-clean-ui .fbl24-league-stat-strip {
  gap: 10px !important;
  margin-top: 14px !important;
  max-width: 720px !important;
}
body.fbl24-clean-ui .fbl24-league-stat-strip article {
  min-height: 68px !important;
  padding: 12px 14px !important;
  border-radius: 14px !important;
}
body.fbl24-clean-ui .fbl24-league-stat-strip strong {
  font-size: clamp(22px, 2.1vw, 30px) !important;
}
body.fbl24-clean-ui .fbl24-league-tabs,
body.fbl24-clean-ui .fbl24-player-tabs {
  margin: 14px 0 !important;
  border-radius: 16px !important;
  padding: 6px !important;
}
body.fbl24-clean-ui .fbl24-league-tabs button,
body.fbl24-clean-ui .fbl24-player-tabs button {
  min-height: 38px !important;
  padding-inline: 13px !important;
  font-size: 12px !important;
}
body.fbl24-clean-ui .fbl24-league-overview-grid,
body.fbl24-clean-ui .fbl24-player-overview-grid {
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, .85fr) !important;
  gap: 14px !important;
}
body.fbl24-clean-ui .fbl24-league-panel,
body.fbl24-clean-ui .fbl24-league-card,
body.fbl24-clean-ui .fbl24-player-panel,
body.fbl24-clean-ui .fbl24-player-card {
  border-radius: 16px !important;
}

/* Player detail compact scale. */
body.fbl24-clean-ui .fbl24-player-profile-page {
  padding-bottom: 70px !important;
}
body.fbl24-clean-ui .fbl24-player-hero-card {
  grid-template-columns: minmax(150px, 205px) minmax(0, 1fr) auto !important;
  gap: clamp(14px, 2vw, 24px) !important;
  align-items: center !important;
  min-height: 0 !important;
  padding: clamp(16px, 2vw, 22px) !important;
  border-radius: 20px 20px 0 0 !important;
}
body.fbl24-clean-ui .fbl24-player-hero-media {
  inset: 0 0 0 55% !important;
  opacity: .78 !important;
}
body.fbl24-clean-ui .fbl24-player-photo-panel {
  min-height: 190px !important;
  border-radius: 18px 18px 0 0 !important;
}
body.fbl24-clean-ui .fbl24-player-photo-panel img {
  max-height: 210px !important;
  padding: 12px 14px 0 !important;
}
body.fbl24-clean-ui .fbl24-player-photo-panel:not(.has-real-photo) img {
  max-width: 100px !important;
  max-height: 100px !important;
}
body.fbl24-clean-ui .fbl24-player-hero-content h1 {
  margin: 8px 0 6px !important;
  font-size: clamp(34px, 3.6vw, 52px) !important;
  line-height: .98 !important;
}
body.fbl24-clean-ui .fbl24-player-clubline {
  margin-top: 12px !important;
}
body.fbl24-clean-ui .fbl24-player-detail-row {
  gap: 14px !important;
  margin-top: 16px !important;
  padding-top: 14px !important;
}
body.fbl24-clean-ui .fbl24-player-detail-row article {
  min-width: 112px !important;
  padding-right: 14px !important;
}
body.fbl24-clean-ui .fbl24-player-stat-strip article {
  min-height: 74px !important;
  padding: 12px !important;
}
body.fbl24-clean-ui .fbl24-player-stat-strip i {
  width: 36px !important;
  height: 36px !important;
}
body.fbl24-clean-ui .fbl24-player-stat-strip strong {
  font-size: clamp(20px, 2vw, 28px) !important;
}

/* Country/Favorites/simple pages: compact Home-like shell. */
body.fbl24-clean-ui .fbl24-clean-page {
  padding-bottom: 70px !important;
}
body.fbl24-clean-ui .fbl24-page-hero {
  margin-bottom: 16px !important;
  padding: clamp(18px, 2.4vw, 24px) !important;
  border-radius: 20px !important;
}
body.fbl24-clean-ui .fbl24-page-hero--compact h1,
body.fbl24-clean-ui .fbl24-page-hero h1 {
  font-size: clamp(34px, 3.8vw, 52px) !important;
  line-height: 1 !important;
}
body.fbl24-clean-ui .fbl24-simple-card {
  border-radius: 16px !important;
  padding: 16px !important;
}
body.fbl24-clean-ui .fbl24-card-grid,
body.fbl24-clean-ui .fbl24-summary-grid {
  gap: 14px !important;
}
body.fbl24-clean-ui .fbl24-team-card,
body.fbl24-clean-ui .fbl24-data-row,
body.fbl24-clean-ui .fbl24-favorite-card {
  min-height: 92px !important;
}

/* Players directory: the inline dark CSS stays functional but this final pass
   keeps it compact and visually aligned with the FBL24 light system. */
body.fbl24-clean-ui .fblp-page {
  padding-bottom: 70px !important;
}
body.fbl24-clean-ui .fblp-hero {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px) !important;
  gap: 18px !important;
  padding: clamp(18px, 2vw, 24px) !important;
  border-radius: 20px !important;
}
body.fbl24-clean-ui .fblp-hero h1 {
  margin: 10px 0 8px !important;
  font-size: clamp(42px, 5vw, 70px) !important;
  line-height: .92 !important;
}
body.fbl24-clean-ui .fblp-hero p {
  max-width: 700px !important;
  line-height: 1.55 !important;
}
body.fbl24-clean-ui .fblp-kicker {
  padding: 6px 10px !important;
  font-size: 10.5px !important;
}
body.fbl24-clean-ui .fblp-hero-card {
  min-width: 0 !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
body.fbl24-clean-ui .fblp-hero-card div {
  padding: 13px !important;
  border-radius: 14px !important;
}
body.fbl24-clean-ui .fblp-hero-card strong {
  font-size: 30px !important;
}
body.fbl24-clean-ui .fblp-toolbar {
  margin: 14px 0 !important;
  padding: 12px !important;
  border-radius: 18px !important;
}
body.fbl24-clean-ui .fblp-search-box input,
body.fbl24-clean-ui .fblp-search-box button,
body.fbl24-clean-ui .fblp-select-grid select {
  height: 42px !important;
}
body.fbl24-clean-ui .fblp-layout {
  grid-template-columns: 260px minmax(0, 1fr) !important;
  gap: 14px !important;
}
body.fbl24-clean-ui .fblp-sidebar {
  top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--fbl24-header-h, 120px) + 14px) !important;
}
body.fbl24-clean-ui .fblp-side-card {
  border-radius: 16px !important;
  padding: 14px !important;
}
body.fbl24-clean-ui .fblp-side-title {
  font-size: 22px !important;
}
body.fbl24-clean-ui .fblp-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  gap: 12px !important;
}
body.fbl24-clean-ui .fblp-card {
  border-radius: 16px !important;
  padding: 14px !important;
}
body.fbl24-clean-ui .fblp-photo {
  width: 78px !important;
  height: 78px !important;
}

/* Team profile: normalize the old inline dark template to Home-sized light UI. */
body.fbl24-clean-ui .tp-shell {
  padding-top: var(--fbl24-detail-top) !important;
  padding-bottom: 70px !important;
  overflow-x: clip !important;
}
body.fbl24-clean-ui .tp-back {
  margin-bottom: 14px !important;
  background: #fff !important;
  color: #64748b !important;
  border-color: #dbe5f1 !important;
}
body.fbl24-clean-ui .tp-hero {
  margin-bottom: 16px !important;
  padding: clamp(18px, 2vw, 24px) clamp(18px, 2vw, 24px) 0 !important;
  border-radius: 20px !important;
  min-height: 0 !important;
}
body.fbl24-clean-ui .tp-hero-top {
  gap: 18px !important;
}
body.fbl24-clean-ui .tp-logo-wrap {
  width: clamp(72px, 7vw, 90px) !important;
  height: clamp(72px, 7vw, 90px) !important;
  border-radius: 16px !important;
  box-shadow: 0 12px 24px rgba(9, 30, 66, .10) !important;
}
body.fbl24-clean-ui .tp-team-name {
  font-family: Outfit, system-ui, sans-serif !important;
  font-size: clamp(32px, 3.6vw, 48px) !important;
  line-height: .98 !important;
  letter-spacing: -.02em !important;
}
body.fbl24-clean-ui .tp-stat-row {
  gap: 8px !important;
}
body.fbl24-clean-ui .tp-stat {
  min-width: 62px !important;
  padding: 8px 14px !important;
  border-radius: 12px !important;
}
body.fbl24-clean-ui .tp-stat b {
  font-family: Outfit, system-ui, sans-serif !important;
  font-size: 22px !important;
}
body.fbl24-clean-ui .tp-tabs {
  margin-top: 16px !important;
  padding-top: 12px !important;
}
body.fbl24-clean-ui .tp-tab {
  min-height: 38px !important;
  padding: 8px 12px !important;
  border-radius: 11px 11px 0 0 !important;
  font-size: 10.5px !important;
}
body.fbl24-clean-ui .tp-panel {
  padding: 18px !important;
}
body.fbl24-clean-ui .tp-card {
  border-radius: 14px !important;
}
body.fbl24-clean-ui .tp-card-head {
  padding: 11px 14px !important;
}
body.fbl24-clean-ui .tp-card-head h3 {
  font-family: Outfit, system-ui, sans-serif !important;
  font-size: 15px !important;
}
body.fbl24-clean-ui #overview-grid {
  gap: 14px !important;
}

/* Standings and other retained table pages: same max width and light rhythm. */
body.fbl24-clean-ui .fbl-standings-page {
  padding-top: var(--fbl24-detail-top) !important;
  padding-bottom: 70px !important;
}
body.fbl24-clean-ui .fbl-standings-head h1 {
  color: #07111f !important;
  font-family: Outfit, system-ui, sans-serif !important;
  font-size: clamp(34px, 4vw, 52px) !important;
  line-height: 1 !important;
}

/* Responsive: collapse detail layouts early to prevent giant cards/overflow. */
@media (max-width: 1180px) {
  :root { --fbl24-detail-max: 1120px; }
  body.fbl24-clean-ui .fbl24-league-overview-grid,
  body.fbl24-clean-ui .fbl24-player-overview-grid {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 980px) {
  body.fbl24-clean-ui .fbl24-league-hero-card,
  body.fbl24-clean-ui .fbl24-player-hero-card,
  body.fbl24-clean-ui .fblp-hero {
    grid-template-columns: 1fr !important;
  }
  body.fbl24-clean-ui .fbl24-league-hero-media,
  body.fbl24-clean-ui .fbl24-player-hero-media {
    inset: 42% 0 0 0 !important;
    opacity: .32 !important;
  }
  body.fbl24-clean-ui .fbl24-league-actions,
  body.fbl24-clean-ui .fbl24-player-actions {
    justify-content: flex-start !important;
  }
  body.fbl24-clean-ui .fbl24-league-stat-strip,
  body.fbl24-clean-ui .fbl24-player-stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  body.fbl24-clean-ui .fbl24-player-stat-strip article:nth-child(2n) {
    border-right: 0 !important;
  }
  body.fbl24-clean-ui .fblp-layout {
    grid-template-columns: 1fr !important;
  }
  body.fbl24-clean-ui .fblp-sidebar {
    position: static !important;
  }
  body.fbl24-clean-ui #overview-grid {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 680px) {
  :root { --fbl24-detail-gutter: 10px; }
  body.fbl24-clean-ui .fbl24-league-identity {
    grid-template-columns: 1fr !important;
    justify-items: start !important;
  }
  body.fbl24-clean-ui .fbl24-player-hero-card {
    grid-template-columns: 1fr !important;
  }
  body.fbl24-clean-ui .fbl24-player-photo-panel {
    min-height: 150px !important;
  }
  body.fbl24-clean-ui .fbl24-player-stat-strip,
  body.fbl24-clean-ui .fbl24-league-stat-strip,
  body.fbl24-clean-ui .fblp-hero-card {
    grid-template-columns: 1fr !important;
  }
  body.fbl24-clean-ui .fbl24-page-hero {
    align-items: flex-start !important;
    flex-direction: column !important;
  }
  body.fbl24-clean-ui .fblp-search-box {
    grid-template-columns: auto minmax(0,1fr) !important;
  }
  body.fbl24-clean-ui .fblp-search-box button {
    grid-column: 1 / -1 !important;
    width: 100% !important;
  }
  body.fbl24-clean-ui .tp-hero-top {
    align-items: flex-start !important;
    text-align: left !important;
  }
}

/* --------------------------------------------------------------------------
   FBL24 v1.0.3 unified website width + drawer settings/language polish
   Every public page now shares one Home/Live-sized container so League,
   Player, Country, Team, Competitions and World Cup pages no longer jump
   between different widths.
   -------------------------------------------------------------------------- */
:root {
  --fbl24-site-max: 1440px;
  --fbl24-site-gutter: clamp(16px, 2.2vw, 32px);
  --fbl24-site-gutter-total: clamp(32px, 4.4vw, 64px);
  --fbl24-detail-max: var(--fbl24-site-max);
  --fbl24-detail-gutter: var(--fbl24-site-gutter);
  --site-max-width: var(--fbl24-site-max);
  --container: var(--fbl24-site-max);
}

body.fbl24-clean-ui .fbl24-topbar-inner,
body.fbl24-clean-ui .fbl24-header-inner,
body.fbl24-clean-ui .footer-feature-strip,
body.fbl24-clean-ui .footer-main-inner,
body.fbl24-clean-ui .footer-bottom-inner,
body.fbl24-clean-ui .app-shell,
body.fbl24-clean-ui.fbl24-spa-page .app-shell,
body.fbl24-clean-ui .fbl24-comp-layout,
body.fbl24-clean-ui .fbl24-simple-shell,
body.fbl24-clean-ui .fbl24-simple-shell--narrow,
body.fbl24-clean-ui .fbl24-league-profile,
body.fbl24-clean-ui .fbl24-player-profile,
body.fbl24-clean-ui .fblp-shell,
body.fbl24-clean-ui .tp-shell,
body.fbl24-clean-ui .fbl-standings-page,
body.fbl24-clean-ui .fbl24-settings-shell,
body.fbl24-clean-ui .fbl24-my-feed {
  width: min(var(--fbl24-site-max), calc(100% - var(--fbl24-site-gutter-total))) !important;
  max-width: var(--fbl24-site-max) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* The old app CSS made Home/Live wider than other pages. Keep all dashboards
   on the same width while retaining their own internal card grids. */
body.fbl24-clean-ui.fbl24-home-page .app-shell,
body.fbl24-clean-ui.fbl24-live-page .app-shell,
body.fbl24-clean-ui.fbl24-world-cup-page .app-shell,
body.fbl24-clean-ui.fbl24-news-page .app-shell {
  width: min(var(--fbl24-site-max), calc(100% - var(--fbl24-site-gutter-total))) !important;
  max-width: var(--fbl24-site-max) !important;
  padding-top: 14px !important;
}

/* Shared PHP/detail pages must not add another hidden side gutter inside the
   global container. */
body.fbl24-clean-ui .fbl24-simple-shell,
body.fbl24-clean-ui .fbl24-simple-shell--narrow,
body.fbl24-clean-ui .fbl24-league-profile,
body.fbl24-clean-ui .fbl24-player-profile,
body.fbl24-clean-ui .fblp-shell,
body.fbl24-clean-ui .tp-shell,
body.fbl24-clean-ui .fbl-standings-page,
body.fbl24-clean-ui .fbl24-settings-shell,
body.fbl24-clean-ui .fbl24-my-feed {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Competitions and detail pages use the same container width; only the inner
   columns change at breakpoints. */
body.fbl24-clean-ui .fbl24-comp-layout {
  grid-template-columns: minmax(220px, 250px) minmax(0, 1fr) minmax(260px, 290px) !important;
  gap: clamp(16px, 1.6vw, 22px) !important;
}
@media (max-width: 1420px) {
  body.fbl24-clean-ui .fbl24-comp-layout {
    grid-template-columns: minmax(220px, 250px) minmax(0, 1fr) !important;
  }
  body.fbl24-clean-ui .fbl24-comp-right {
    position: static !important;
    grid-column: 1 / -1 !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* World Cup dashboard should live inside the same app-shell width without
   forcing a wider visual footprint. */
body.fbl24-clean-ui .worldcup-dashboard {
  grid-template-columns: 240px minmax(0, 1fr) 320px !important;
  gap: clamp(16px, 1.6vw, 22px) !important;
}
@media (max-width: 1320px) {
  body.fbl24-clean-ui .worldcup-dashboard {
    grid-template-columns: 230px minmax(0, 1fr) !important;
  }
  body.fbl24-clean-ui .worldcup-right { grid-column: 2 !important; }
}
@media (max-width: 1080px) {
  body.fbl24-clean-ui .worldcup-dashboard { grid-template-columns: 1fr !important; }
  body.fbl24-clean-ui .worldcup-left,
  body.fbl24-clean-ui .worldcup-main,
  body.fbl24-clean-ui .worldcup-right { grid-column: auto !important; }
}

/* Make League/Player cards match the same page rhythm rather than feeling like
   a separate template. */
body.fbl24-clean-ui .fbl24-league-hero-card,
body.fbl24-clean-ui .fbl24-player-hero-card,
body.fbl24-clean-ui .tp-hero,
body.fbl24-clean-ui .fbl24-page-hero,
body.fbl24-clean-ui .fblp-hero {
  border-radius: 20px !important;
}
body.fbl24-clean-ui .fbl24-league-overview-grid,
body.fbl24-clean-ui .fbl24-player-overview-grid {
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, .95fr) !important;
}

/* Header and drawer controls: every visible control is a real link/action. */
body.fbl24-clean-ui .fbl24-topbar-social a,
body.fbl24-clean-ui .fbl24-drawer-social a {
  text-decoration: none !important;
}
body.fbl24-clean-ui .fbl24-drawer-body {
  gap: 14px !important;
  padding: 18px !important;
}
body.fbl24-clean-ui .fbl24-drawer-settings {
  background: linear-gradient(180deg, #ffffff 0%, #f7fcf9 100%) !important;
}
body.fbl24-clean-ui .fbl24-drawer-language-grid {
  display: grid;
  gap: 8px;
}
body.fbl24-clean-ui .fbl24-drawer-language[data-fbl24-language] {
  justify-content: flex-start;
  width: 100%;
  cursor: pointer;
}
body.fbl24-clean-ui .fbl24-drawer-language[data-fbl24-language].is-active {
  border-color: #9edfb7 !important;
  background: #eaf8ef !important;
  color: #057a35 !important;
  box-shadow: inset 0 0 0 1px rgba(7, 148, 63, .12) !important;
}
body.fbl24-clean-ui .fbl24-drawer-language[data-fbl24-language].is-active::after {
  content: "✓";
  margin-left: auto;
  font-weight: 900;
  color: #07943f;
}
body.fbl24-clean-ui .fbl24-topbar-language {
  min-width: 56px;
  justify-content: center;
}

@media (max-width: 760px) {
  :root { --fbl24-site-gutter: 12px; --fbl24-site-gutter-total: 24px; }
  body.fbl24-clean-ui .fbl24-topbar-inner,
  body.fbl24-clean-ui .fbl24-header-inner,
  body.fbl24-clean-ui .footer-feature-strip,
  body.fbl24-clean-ui .footer-main-inner,
  body.fbl24-clean-ui .footer-bottom-inner,
  body.fbl24-clean-ui .app-shell,
  body.fbl24-clean-ui.fbl24-spa-page .app-shell,
  body.fbl24-clean-ui .fbl24-comp-layout,
  body.fbl24-clean-ui .fbl24-simple-shell,
  body.fbl24-clean-ui .fbl24-simple-shell--narrow,
  body.fbl24-clean-ui .fbl24-league-profile,
  body.fbl24-clean-ui .fbl24-player-profile,
  body.fbl24-clean-ui .fblp-shell,
  body.fbl24-clean-ui .tp-shell,
  body.fbl24-clean-ui .fbl-standings-page,
  body.fbl24-clean-ui .fbl24-settings-shell,
  body.fbl24-clean-ui .fbl24-my-feed {
    width: calc(100% - var(--fbl24-site-gutter-total)) !important;
  }
  body.fbl24-clean-ui .fbl24-drawer-account { grid-template-columns: 1fr !important; }
}


/* v1.0.3 correction: match existing drawer language attributes. */
body.fbl24-clean-ui .fbl24-drawer-language-grid [data-fbl24-language] {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  gap: 12px;
  border: 1px solid #e4eaf1;
  border-radius: 12px;
  background: #fff;
  color: #071326;
  padding: 0 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
body.fbl24-clean-ui .fbl24-drawer-language-grid [data-fbl24-language].is-active {
  border-color: #07943f !important;
  background: #eaf8ef !important;
  color: #057a35 !important;
}
body.fbl24-clean-ui .fbl24-drawer-language-grid [data-fbl24-language].is-active::after {
  content: "✓";
  margin-left: auto;
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #07943f;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

/* Footer links converted from placeholder buttons: keep the same button look. */
body.fbl24-clean-ui .footer-social a {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 9px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
}
body.fbl24-clean-ui .footer-social a:hover,
body.fbl24-clean-ui .footer-social a:focus-visible {
  background: #07943f;
  color: #fff;
}
body.fbl24-clean-ui .fbl24-footer-language {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
body.fbl24-clean-ui .fbl24-footer-settings-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(221, 231, 244, .22);
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
  color: #fff;
  padding: 0 14px;
  font-weight: 800;
  text-decoration: none;
}
body.fbl24-clean-ui .fbl24-footer-language-options {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
body.fbl24-clean-ui .fbl24-footer-language-options button {
  min-width: 38px;
  min-height: 36px;
  border: 1px solid rgba(221, 231, 244, .22);
  border-radius: 9px;
  background: rgba(255, 255, 255, .04);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}
body.fbl24-clean-ui .fbl24-footer-language-options button.is-active {
  border-color: #07943f;
  background: #07943f;
  color: #fff;
}


/* v1.0.3 final correction: include every remaining PHP page shell in the same
   1440px site width so Search/Auth/Account/Settings/My Feed/About pages match
   Home, Live, Competitions, League, Player, Country and Team. */
body.fbl24-clean-ui .sr-app,
body.fbl24-clean-ui .fbl-auth-shell,
body.fbl24-clean-ui .ac-shell,
body.fbl24-clean-ui .ip-shell,
body.fbl24-clean-ui .fbl24-settings-shell,
body.fbl24-clean-ui .fbl24-my-feed {
  width: min(var(--fbl24-site-max), calc(100% - var(--fbl24-site-gutter-total))) !important;
  max-width: var(--fbl24-site-max) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
}
body.fbl24-clean-ui .fbl24-topbar-inner,
body.fbl24-clean-ui .fbl24-header-inner {
  width: min(var(--fbl24-site-max), calc(100% - var(--fbl24-site-gutter-total))) !important;
  max-width: var(--fbl24-site-max) !important;
}
body.fbl24-clean-ui .fbl24-footer-language-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(34px, 1fr));
  gap: 6px;
}
body.fbl24-clean-ui .fbl24-footer-language-options [data-fbl24-language] {
  min-height: 34px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 9px;
  background: rgba(255,255,255,.06);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}
body.fbl24-clean-ui .fbl24-footer-language-options [data-fbl24-language].is-active {
  background: #07943f;
  border-color: #07943f;
}
body.fbl24-clean-ui .fbl24-footer-settings-link {
  color: #fff;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
}
@media (max-width: 760px) {
  body.fbl24-clean-ui .sr-app,
  body.fbl24-clean-ui .fbl-auth-shell,
  body.fbl24-clean-ui .ac-shell,
  body.fbl24-clean-ui .ip-shell,
  body.fbl24-clean-ui .fbl24-settings-shell,
  body.fbl24-clean-ui .fbl24-my-feed {
    width: calc(100% - var(--fbl24-site-gutter-total)) !important;
  }
  body.fbl24-clean-ui .fbl24-footer-language-options { grid-template-columns: repeat(5, minmax(28px, 1fr)); }
}
