/* ============ Fantasy header ============ */
.fx-head { background: radial-gradient(120% 140% at 100% 0%, #13684a 0%, var(--turf-deep) 45%, #061f17 100%); color: #fff; padding-top: clamp(22px, 4vw, 40px); position: relative; overflow: hidden; }
.fx-head::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 70px, transparent 70px 140px); pointer-events: none; }
.fx-head .container { position: relative; }
.fx-dim { color: rgba(255,255,255,.62); }
.fx-head-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.fx-title { margin-top: 6px; }
.fx-deadline { display: grid; gap: 8px; justify-items: end; }
.fx-stats { display: flex; gap: 8px 32px; flex-wrap: wrap; align-items: center; margin-top: 24px; padding: 16px 20px; border-radius: var(--r-lg); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); }
.fx-stats > div { display: grid; }
.fx-stats b { font-size: 1.5rem; font-weight: 800; font-variation-settings: "wdth" 115; letter-spacing: -0.02em; }
.fx-sim { margin-inline-start: auto; }
.fx-subnav { margin-top: 22px; border-color: rgba(255,255,255,.12); }
.fx-subnav a { color: rgba(255,255,255,.6); }
.fx-subnav a:hover, .fx-subnav a[aria-current="page"] { color: #fff; }
.fx-body { padding-top: 28px; }
@media (max-width: 760px) {
  .fx-deadline { justify-items: start; }
  .fx-stats { gap: 14px 22px; }
  .fx-stats > div { min-width: 40%; }
  .fx-sim { margin-inline-start: 0; width: 100%; }
}

/* Onboarding */
.fx-onboard { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.fx-steps { display: grid; gap: 16px; margin-top: 26px; }
.fx-steps li { display: flex; gap: 14px; align-items: flex-start; }
.fx-onboard-art .fx-pitch { transform: perspective(1200px) rotateX(18deg); box-shadow: var(--shadow-3); }
@media (max-width: 900px) { .fx-onboard { grid-template-columns: minmax(0, 1fr); } }

/* ============ Pitch view ============ */
.fx-team-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
@media (max-width: 1000px) { .fx-team-layout { grid-template-columns: minmax(0, 1fr); } }
.fx-pitch { position: relative; border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 22px 8px 26px; display: grid; gap: clamp(14px, 3vw, 28px); background: repeating-linear-gradient(180deg, #13865b 0 12.5%, #10794f 12.5% 25%); overflow: hidden; min-height: 520px; align-content: space-evenly; }
.fx-pitch.is-preview { border-radius: var(--r-lg); min-height: 440px; }
.fx-pitch-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fx-row { position: relative; display: flex; justify-content: space-evenly; gap: 4px; }
.ptoken { display: grid; justify-items: center; gap: 3px; width: clamp(64px, 12vw, 96px); border-radius: var(--r-sm); padding: 4px 2px; transition: transform var(--t-med) var(--ease-spring); position: relative; }
.ptoken:hover { transform: translateY(-4px); }
.ptoken-kit { position: relative; filter: drop-shadow(0 6px 6px rgba(0,0,0,.28)); }
.ptoken-name { background: #fff; color: var(--ink-fixed); font-size: 11.5px; font-weight: 700; padding: 3px 6px; border-radius: 5px 5px 0 0; width: 100%; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.ptoken-sub { background: rgba(13,20,17,.82); color: #fff; font-size: 10.5px; font-weight: 600; padding: 2px 6px; border-radius: 0 0 5px 5px; width: 100%; text-align: center; margin-top: -3px; white-space: nowrap; overflow: hidden; }
.ptoken .cap { position: absolute; inset-inline-end: -6px; top: -2px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink-bg); color: #fff; font-style: normal; font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.ptoken .cap.vice { background: #fff; color: var(--ink-fixed); box-shadow: 0 0 0 2px var(--ink); }
.ptoken .flag { position: absolute; inset-inline-start: -4px; top: -2px; width: 18px; height: 18px; border-radius: 50%; background: var(--gold); color: #fff; font-style: normal; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.ptoken.is-injured .flag { background: var(--danger-fill); }
.ptoken.is-swapping { background: rgba(255,255,255,.22); box-shadow: 0 0 0 2px #fff; }
.ptoken.is-eligible { animation: eligible 1.2s infinite; }
@keyframes eligible { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,210,63,.0); } 50% { box-shadow: 0 0 0 3px rgba(255,210,63,.95); } }
.fx-bench { background: #d8e6dd; border-radius: 0 0 var(--r-lg) var(--r-lg); padding: 14px 8px 16px; }
.fx-bench-label { display: block; text-align: center; color: var(--turf-deep); font-weight: 650; margin-bottom: 8px; }
.bench-slot { display: grid; justify-items: center; gap: 2px; }
.swap-hint { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--gold-tint); color: #6b4b04; margin-bottom: 12px; flex-wrap: wrap; }
.armband { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.armband .cap { width: 26px; height: 26px; border-radius: 50%; background: var(--ink-bg); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; }
.armband .cap.vice { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
tr.clickable { cursor: pointer; }

/* FDR colours */
.fdr-1 { --fdr: #1f9d61; --fdr-ink: #fff; }
.fdr-2 { --fdr: #8fd19e; --fdr-ink: #0d1411; }
.fdr-3 { --fdr: #e6e8e3; --fdr-ink: #0d1411; }
.fdr-4 { --fdr: #f19a76; --fdr-ink: #0d1411; }
.fdr-5 { --fdr: #b3283c; --fdr-ink: #fff; }
.ptoken-sub[class*="fdr-"] { background: var(--fdr); color: var(--fdr-ink); }
.fdr-pill { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; background: var(--fdr); color: var(--fdr-ink); }
.fix-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 10px; }
.fix-strip li { display: grid; justify-items: center; padding: 8px 4px; border-radius: var(--r-xs); background: var(--fdr); color: var(--fdr-ink); }
.fix-strip b { font-size: 13px; }

/* Bars */
.gw-bars { display: flex; align-items: flex-end; gap: 6px; height: 110px; padding-bottom: 18px; position: relative; overflow-x: auto; }
.gw-bar { display: grid; justify-items: center; align-content: end; min-width: 18px; flex: 1; height: 100%; position: relative; }
.gw-bar span { width: 100%; max-width: 26px; background: var(--turf-tint); border-radius: 4px 4px 0 0; box-shadow: inset 0 0 0 1px rgba(11,110,79,.2); max-height: 90px; transition: height .6s var(--ease); }
.gw-bar span.is-high { background: var(--turf-fill); }
.gw-bar i { position: absolute; bottom: -16px; font-style: normal; color: var(--ink-3); }
.gw-result { display: grid; justify-items: center; text-align: center; padding: 10px 0; }
.gw-big { font-size: 4.2rem; font-weight: 850; font-variation-settings: "wdth" 120; letter-spacing: -0.04em; line-height: 1; }

/* Player modal */
.pl-head { display: flex; gap: 18px; align-items: center; padding: 18px; margin: -18px -24px 0; border-radius: var(--r-lg) var(--r-lg) 0 0; background: linear-gradient(135deg, color-mix(in srgb, var(--kit) 22%, #fff), var(--surface)); }
.pl-kit { width: 104px; height: 104px; border-radius: 50%; background: rgba(255,255,255,.7); display: grid; place-items: center; flex: none; }
.pl-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-2); border-radius: var(--r-md); overflow: hidden; margin-top: 16px; border: 1px solid var(--line-2); }
.pl-kpis > div { background: var(--surface); padding: 12px 14px; display: grid; }
.pl-kpis b { font-size: 1.3rem; font-weight: 800; }
.pl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin-top: 22px; }
@media (max-width: 680px) { .pl-grid { grid-template-columns: minmax(0, 1fr); } .pl-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pl-head { padding: 16px; margin: -18px -24px 0; } .pl-kit { width: 76px; height: 76px; } .pl-kit svg { width: 64px; height: 64px; } }

/* Squad builder */
.sq-layout { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 24px; align-items: start; }
.sq-board { border-radius: var(--r-lg); padding: 16px; display: grid; gap: 16px; background: repeating-linear-gradient(180deg, #13865b 0 25%, #10794f 25% 50%); }
.sq-line { display: grid; gap: 8px; }
.sq-label { color: rgba(255,255,255,.85); font-weight: 650; }
.sq-label .muted { color: rgba(255,255,255,.6); }
.sq-row { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.sq-slot { position: relative; width: 86px; min-height: 96px; border-radius: var(--r-sm); background: rgba(255,255,255,.95); display: grid; justify-items: center; align-content: center; gap: 2px; padding: 8px 4px; transition: transform var(--t-fast) var(--ease); box-shadow: 0 6px 12px -6px rgba(0,0,0,.35); }
.sq-slot:hover { transform: translateY(-2px); }
.sq-slot.is-empty { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.5); border: 0; }
.sq-slot.is-empty:hover { background: rgba(255,255,255,.22); }
.sq-plus { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; }
.sq-slot.is-new { box-shadow: 0 0 0 2px var(--blaze); }
.sq-name { font-size: 11.5px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sq-x { position: absolute; top: 4px; inset-inline-end: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; opacity: 0; transition: opacity var(--t-fast); }
.sq-slot:hover .sq-x, .sq-slot:focus-visible .sq-x { opacity: 1; }
.sq-summary { display: flex; gap: 10px 26px; flex-wrap: wrap; align-items: center; padding: 16px 4px 8px; }
.sq-summary > div { display: grid; }
.sq-summary b { font-size: 1.25rem; font-weight: 800; }
.sq-budget { flex: 1 1 100%; }
.sq-actions { margin-top: 10px; }
.sq-market { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; max-height: calc(100vh - var(--header-h) - 32px); overflow: hidden; }
.sq-market-head { padding: 14px; border-bottom: 1px solid var(--line-2); }
.pl-list { overflow: auto; flex: 1; }
.pl-row { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line-2); }
.pl-row.is-in { background: var(--turf-tint); }
.pl-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-align: start; }
.pl-add { width: 40px; height: 40px; border-radius: 50%; background: var(--ink-bg); color: #fff; display: grid; place-items: center; flex: none; transition: transform var(--t-fast) var(--ease-spring), background var(--t-fast); }
.pl-add:hover { transform: scale(1.08); }
.pl-add.is-in { background: var(--turf-fill); }
.pl-add[disabled] { width: auto; min-width: 40px; padding: 0 8px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--ink-3); cursor: not-allowed; transform: none; }
@media (max-width: 1080px) { .sq-layout { grid-template-columns: minmax(0, 1fr); } .sq-market { position: static; max-height: 640px; } }
@media (max-width: 520px) { .sq-slot { width: 68px; min-height: 86px; } .sq-slot svg { width: 32px; height: 32px; } .sq-board { padding: 12px 6px; } }
.transfer-list { display: grid; gap: 8px; margin-top: 4px; }
.transfer-list li { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); }
.t-out { color: var(--danger); text-decoration: line-through; }
.t-in { color: var(--turf); font-weight: 700; }

/* Fixtures & table */
.gw-pager { display: flex; align-items: center; gap: 10px; }
.fx-day { margin: 18px 0 8px; color: var(--ink-2); }
.fixture-list { overflow: hidden; }
.fixture { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line-2); }
.fixture:last-child { border-bottom: 0; }
.fx-team { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: var(--fs-sm); min-width: 0; }
.fx-team.home { justify-content: flex-end; text-align: end; }
.fx-score { min-width: 74px; text-align: center; padding: 6px 10px; border-radius: var(--r-xs); background: var(--ink-bg); color: #fff; font-weight: 800; }
.fx-time { min-width: 74px; text-align: center; padding: 6px 10px; border-radius: var(--r-xs); background: var(--surface-2); font-weight: 700; font-size: var(--fs-sm); box-shadow: inset 0 0 0 1px var(--line); }
.league-table tr.zone-cl td:first-child { box-shadow: inset 3px 0 0 var(--turf); }
.league-table tr.zone-rel td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.form-pills { display: inline-flex; gap: 3px; }
.form-pills i { width: 20px; height: 20px; border-radius: 5px; font-style: normal; font-size: 10px; font-weight: 800; display: grid; place-items: center; color: #fff; }
.f-W { background: var(--turf-fill); } .f-D { background: var(--ink-3); } .f-L { background: var(--danger-fill); }
@media (max-width: 640px) { .hide-s { display: none; } .fixture { padding: 12px 10px; gap: 8px; } .fx-team .kit { width: 24px; height: 24px; } }

.stat-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Leagues */
.league-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .league-grid { grid-template-columns: minmax(0, 1fr); } }
.league-card { border-radius: var(--r-lg); padding: 22px; color: #fff; display: grid; gap: 18px; position: relative; overflow: hidden; }
.league-card::after { content: ""; position: absolute; inset-inline-end: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 36px solid rgba(255,255,255,.06); }
.lc-ink { background: var(--ink-bg); }
.lc-blaze { background: linear-gradient(135deg, #2a0f04, #7a2a05 60%, #b8410b); }
.lc-turf { background: linear-gradient(135deg, #062a1e, var(--turf)); }
.lc-gold { background: linear-gradient(135deg, #211804, #5e4508 60%, #8a6410); }
.lc-dim { color: rgba(255,255,255,.66); }
.lc-figs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.lc-figs > div { display: grid; gap: 2px; }
.lc-figs b { font-weight: 750; }
.lc-meter { background: rgba(255,255,255,.15); height: 6px; }
.lc-meter > span { background: #fff; }
.lc-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; position: relative; z-index: 1; }
.lc-ghost { color: #fff; }
.lc-ghost:hover { background: rgba(255,255,255,.1); }
.lc-join { background: #fff; color: var(--ink-fixed); }
.lc-join:hover { background: var(--blaze); color: #fff; }
.lc-joined { background: rgba(255,255,255,.14); color: #fff; }
.lc-top { position: relative; z-index: 1; }
@media (max-width: 520px) { .lc-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.prize-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.prize-mini > div { padding: 12px; border-radius: var(--r-sm); background: var(--gold-tint); display: grid; gap: 2px; }
.prize-mini b { font-size: var(--fs-sm); }
.league-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 1000px) { .league-layout { grid-template-columns: minmax(0, 1fr); } }
.medal { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; flex: none; }
.medal.m1 { background: #C9920F; } .medal.m2 { background: #8C969E; } .medal.m3 { background: #A0603A; } .medal.m4 { background: var(--surface-3); }
.prize-list { display: grid; gap: 10px; margin-top: 12px; }
.prize-list li { display: flex; align-items: center; gap: 10px; }
.invite-code { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px dashed var(--line); }
.invite-code b { font-size: 1.2rem; letter-spacing: .08em; }
.gw-compare { display: flex; gap: 10px; align-items: flex-end; height: 120px; padding-bottom: 18px; overflow-x: auto; }
.gwc { display: grid; justify-items: center; position: relative; flex: 1; min-width: 34px; height: 100%; align-content: end; }
.gwc-bars { display: flex; gap: 3px; align-items: flex-end; }
.gwc-bars span { width: 12px; border-radius: 3px 3px 0 0; }
.gwc i { position: absolute; bottom: -16px; font-style: normal; color: var(--ink-3); }
.them { background: var(--ink-3); } .me { background: var(--blaze); }
.key { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.cmp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.cmp-list { display: grid; gap: 4px; margin-top: 8px; }
.cmp-list li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--r-xs); }
.cmp-list li.is-common { background: var(--turf-tint); }
@media (max-width: 640px) { .cmp-grid { grid-template-columns: minmax(0, 1fr); } }
.fdr { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; }
