/* League UI: scores, standings, players, stats, schedule. Layered on site.css tokens. */
:root { --surface: #f2f2f5; --card: #fff; --radius-lg: 12px; }

.league-page { background: var(--surface); }
.league-head { background: var(--ink); color: var(--white); padding: 136px 0 28px; position: relative; overflow: hidden; }
.league-head::after { content: ""; position: absolute; right: -80px; top: 40px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(237, 2, 140, 0.12); }
.league-head .wrap { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.league-head h1 { font-size: clamp(44px, 6vw, 80px); }
.league-head .sub { color: rgba(255,255,255,.7); margin-top: 8px; }
.season-select { appearance: none; background: rgba(255,255,255,.1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='white' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center; color: var(--white); border: 1px solid rgba(255,255,255,.25); border-radius: 8px; padding: 10px 40px 10px 14px; font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 16px; cursor: pointer; }
.season-select option { color: var(--ink); }

.card { background: var(--card); border-radius: var(--radius-lg); border: 1px solid rgba(21,22,58,.06); }
.card-pad { padding: 24px; }
.card h2.card-title { font-size: 32px; text-align: center; padding: 24px 24px 8px; }
.stack { display: grid; gap: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* Data caveat */
.data-note { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); background: var(--card); border-radius: 10px; padding: 12px 16px; }
.data-note b { color: var(--ink); }

/* Badges */
.badge { display: inline-grid; place-items: center; border-radius: 50%; background: #fff; overflow: hidden; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(21,22,58,.08); }
.badge img { width: 80%; height: 80%; object-fit: contain; }
.badge.mono { color: #fff; font-family: var(--display); font-weight: 800; letter-spacing: .02em; box-shadow: none; }
.avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 20px; color: #fff; flex-shrink: 0; position: relative; }
.avatar .badge { position: absolute; right: -4px; bottom: -4px; border: 2px solid #fff; }

/* Score ticker (OTE-style strip) */
.ticker { background: var(--ink); padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.ticker .wrap { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.ticker .wrap::-webkit-scrollbar { display: none; }
.score { scroll-snap-align: start; flex: 0 0 auto; width: 260px; background: var(--card); color: var(--ink); border-radius: 10px; padding: 12px 14px; display: grid; gap: 8px; transition: transform .15s; }
.score:hover { transform: translateY(-2px); }
.score .top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.score .top b { color: var(--magenta); font-family: var(--display); letter-spacing: .1em; text-transform: uppercase; font-size: 12px; }
.score .row { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; font-weight: 500; }
.score .row .nm { font-family: var(--display); font-size: 18px; font-weight: 700; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score .row .sc { font-family: var(--display); font-weight: 700; font-size: 18px; }
.score .row.lose { opacity: .5; }
.score .res { font-size: 12px; border-top: 1px solid var(--line); padding-top: 8px; color: var(--muted); }
.score--wide { width: auto; }

/* Results list */
.day-label { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); text-align: center; font-size: 15px; margin: 8px 0 4px; }
.result-card { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 18px 24px; }
.result-card .meta { grid-column: 1 / -1; text-align: center; font-size: 13px; color: var(--muted); margin-bottom: -4px; }
.result-card .meta b { color: var(--magenta); font-family: var(--display); letter-spacing: .1em; text-transform: uppercase; }
.result-card .side { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.result-card .side .nm { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 17px; line-height: 1; }
.result-card .side .sc { font-family: var(--display); font-weight: 800; font-size: 26px; }
.result-card .side .sc small { font-size: 14px; opacity: .6; }
.result-card .side.lose { opacity: .45; }
.result-card .mid { text-align: center; font-family: var(--display); text-transform: uppercase; font-weight: 700; font-size: 14px; color: var(--muted); }
.result-card .mid .won { color: var(--ink); font-size: 15px; display: block; max-width: 160px; }
.result-card .foot { grid-column: 1 / -1; display: flex; justify-content: center; gap: 18px; font-size: 13px; }
.result-card .foot a { font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--magenta); }

/* Filters */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.seg { display: inline-flex; background: var(--card); border-radius: 999px; padding: 4px; border: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: 8px 18px; border-radius: 999px; font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--ink); color: #fff; }
.search { position: relative; flex: 1; max-width: 420px; }
.search input { width: 100%; padding: 12px 16px 12px 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 15px; }
.search input:focus { outline: 2px solid var(--magenta); border-color: transparent; }
.search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.team-chips { display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px 10px; justify-content: center; scrollbar-width: none; }
.team-chips button { background: none; border: 0; display: grid; justify-items: center; gap: 4px; cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: .08em; color: var(--muted); opacity: .55; transition: .15s; }
.team-chips button:hover, .team-chips button.on { opacity: 1; color: var(--ink); }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: 13px; color: var(--muted); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl th.num { text-align: right; }
.tbl .pos { width: 36px; font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--muted); }
.tbl .team-cell { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.tbl .pts { font-family: var(--display); font-weight: 800; font-size: 20px; }
.tbl tr.q td { background: rgba(237, 2, 140, .04); }
.tbl tr.q .pos { color: var(--magenta); }
.tbl tbody tr:hover td { background: rgba(21,22,58,.03); }
.tbl-wrap { overflow-x: auto; }
.tbl .sorted { color: var(--ink); }
.tbl th[data-k] { cursor: pointer; }
.tbl th[data-k]:hover { color: var(--ink); }
.legend { font-size: 13px; color: var(--muted); padding: 12px 16px; display: flex; gap: 8px; align-items: center; }
.legend i { width: 12px; height: 12px; border-radius: 3px; background: rgba(237, 2, 140, .25); display: inline-block; }

/* Leaders (OTE season leaders) */
.lead-list { list-style: none; }
.lead { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 24px; }
.lead + .lead { border-top: 1px solid var(--line); }
.lead .nm { font-family: var(--display); font-weight: 700; font-size: 20px; text-transform: uppercase; line-height: 1; }
.lead .tm { font-size: 14px; color: var(--muted); }
.lead .val { text-align: right; }
.lead .val b { display: block; font-family: var(--display); font-size: 30px; line-height: 1; }
.lead .val span { display: inline-block; margin-top: 4px; font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: .1em; background: var(--ink); color: #fff; padding: 2px 8px; border-radius: 999px; }
.lead:first-child .val span { background: var(--magenta); }
.card .more { display: block; margin: 8px 24px 24px; text-align: center; background: var(--magenta); color: #fff; border-radius: 8px; padding: 10px; font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }

/* Players list */
.player-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 16px; align-items: center; padding: 14px 20px; transition: background .15s; }
.player-row:hover { background: #fafafe; }
.player-row + .player-row { border-top: 1px solid var(--line); }
.player-row .nm { font-family: var(--display); font-weight: 700; font-size: 21px; text-transform: uppercase; line-height: 1.05; }
.player-row .nm small { color: var(--magenta); margin-right: 6px; }
.player-row .sub { font-size: 14px; color: var(--muted); display: block; margin-top: 2px; }
.player-row .nm { display: block; }
.player-row .quick { display: flex; gap: 22px; text-align: center; }
.player-row .quick b { display: block; font-family: var(--display); font-size: 22px; line-height: 1; }
.player-row .quick span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-family: var(--display); font-weight: 700; }

/* Profile */
.profile-head { display: flex; gap: 24px; align-items: center; }
.profile-head .avatar { width: 112px; height: 112px; font-size: 42px; }
.profile-head .avatar .badge { width: 44px !important; height: 44px !important; }
.statbox { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 1px; background: var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.statbox div { background: var(--card); padding: 18px; text-align: center; }
.statbox b { display: block; font-family: var(--display); font-weight: 800; font-size: 36px; line-height: 1; }
.statbox span { font-family: var(--display); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }

/* Team list (OTE) */
.team-row { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 14px 24px; }
.team-row + .team-row { border-top: 1px solid var(--line); }
.team-row .nm { font-family: var(--display); font-weight: 700; font-size: 22px; text-transform: uppercase; line-height: 1; }
.team-row .sub { font-size: 14px; color: var(--muted); display: block; margin-top: 2px; }
.team-row .nm { display: block; }
.team-row .go { font-family: var(--display); font-weight: 700; text-transform: uppercase; color: var(--magenta); letter-spacing: .08em; }
.place { font-family: var(--display); font-weight: 800; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; background: var(--surface); }
.place.gold { background: #ffe8a3; color: #7a5600; }
.place.silver { background: #e9ecef; color: #495057; }
.place.bronze { background: #ffd8bf; color: #8a3b12; }

.tabbar { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.tabbar button { background: none; border: 0; padding: 14px 0; font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 17px; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.tabbar button.on { color: var(--ink); border-color: var(--magenta); }

/* Champions band */
.champs { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.champ { background: linear-gradient(135deg, var(--navy), var(--ink)); color: #fff; border-radius: var(--radius-lg); padding: 28px; display: flex; gap: 20px; align-items: center; position: relative; overflow: hidden; }
.champ::after { content: "🏆"; position: absolute; right: 18px; top: 12px; font-size: 64px; opacity: .18; }
.champ .k { font-family: var(--display); color: var(--magenta); letter-spacing: .14em; text-transform: uppercase; font-weight: 700; font-size: 14px; }
.champ .t { font-family: var(--display); font-size: 32px; font-weight: 800; text-transform: uppercase; line-height: 1; margin: 4px 0; }
.champ .d { font-size: 14px; opacity: .75; }

/* Schedule (Runningman-style timetable) */
.days { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 20px; }
.days button { border: 2px solid var(--ink); background: var(--card); border-radius: 18px 18px 6px 6px; padding: 14px 10px; cursor: pointer; font-family: var(--display); text-transform: uppercase; line-height: 1; color: var(--ink); transition: .15s; }
.days button b { display: block; font-size: 30px; font-weight: 800; }
.days button span { font-size: 22px; font-weight: 700; opacity: .8; }
.days button.on { background: var(--magenta); border-color: var(--magenta); color: #fff; }
.tt { background: var(--card); border-radius: var(--radius-lg); border: 2px solid var(--ink); overflow-x: auto; }
.tt-grid { display: grid; min-width: 880px; position: relative; }
.tt-col-head { position: sticky; top: 0; z-index: 2; background: var(--paper); border-bottom: 2px solid var(--ink); padding: 12px 8px; text-align: center; font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 15px; letter-spacing: .04em; line-height: 1.05; }
.tt-col-head small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .1em; margin-top: 3px; }
.tt-col { position: relative; border-left: 1px dashed var(--line); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hr) - 1px), rgba(21,22,58,.07) calc(var(--hr) - 1px), rgba(21,22,58,.07) var(--hr)); }
.tt-times { position: relative; background: var(--paper); }
.tt-times span { position: absolute; left: 0; right: 0; text-align: center; font-family: var(--display); font-weight: 700; font-size: 13px; color: var(--muted); transform: translateY(-50%); }
.slot { position: absolute; left: 6px; right: 6px; border-radius: 8px; padding: 8px 9px; font-size: 12px; line-height: 1.25; overflow: hidden; color: #fff; display: flex; flex-direction: column; gap: 3px; transition: transform .15s, box-shadow .15s; }
.slot:hover { transform: scale(1.02); box-shadow: 0 10px 24px rgba(21,22,58,.25); z-index: 3; }
.slot .t { font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: .1em; opacity: .85; }
.slot .v { font-family: var(--display); font-weight: 700; font-size: 15px; text-transform: uppercase; line-height: 1.05; }
.slot .r { font-size: 11px; opacity: .9; margin-top: auto; }
.slot.girls { background: linear-gradient(180deg, #ed028c, #b8006c); }
.slot.boys { background: linear-gradient(180deg, #3b3fa0, #242658); }
.slot.final { background: linear-gradient(180deg, #f59f00, #d9480f); }
.slot.off { background: repeating-linear-gradient(45deg, #fff4d6, #fff4d6 8px, #fff9e8 8px, #fff9e8 16px); color: #7a4b00; border: 1px dashed #d9a400; }
.slot.event { background: linear-gradient(180deg, #2f9e44, #1b6e2e); }
.tt-key { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; margin-top: 14px; color: var(--muted); }
.tt-key i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; }

/* Instagram */
.ig-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.ig { position: relative; aspect-ratio: 9/14; border-radius: 10px; overflow: hidden; background: #000; color: #fff; }
.ig img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s, opacity .3s; }
.ig:hover img { transform: scale(1.05); opacity: .55; }
.ig .ov { position: absolute; inset: auto 0 0 0; padding: 40px 10px 10px; background: linear-gradient(transparent, rgba(0,0,0,.8)); font-size: 12px; line-height: 1.3; }
.ig .ov p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ig .stats { display: flex; gap: 10px; margin-top: 6px; font-weight: 600; font-size: 11px; opacity: .9; }
.ig .kind { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.5); border-radius: 6px; padding: 3px 6px; font-size: 11px; font-weight: 600; }
.ig-head { display: flex; align-items: center; gap: 14px; }
.ig-head .ring { width: 56px; height: 56px; border-radius: 50%; padding: 3px; background: conic-gradient(#f58529, #dd2a7b, #8134af, #515bd4, #f58529); }
.ig-head .ring span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--ink); border: 3px solid var(--ink); }
.ig-head .ring img { width: 70%; }

@media (max-width: 1080px) { .ig-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 860px) {
  .grid-2, .grid-3, .champs { grid-template-columns: 1fr; }
  .player-row { grid-template-columns: auto 1fr; }
  .player-row .quick { grid-column: 1 / -1; justify-content: space-around; }
  .player-row .chev { display: none; }
  .ig-grid { grid-template-columns: repeat(3, 1fr); }
  .profile-head .avatar { width: 84px; height: 84px; font-size: 32px; }
}
@media (max-width: 560px) {
  .result-card { padding: 16px 12px; gap: 8px; }
  .result-card .side .nm { font-size: 14px; }
  .lead { padding: 12px 16px; }
  .ig-grid { grid-template-columns: repeat(2, 1fr); }
  .ig:nth-child(n+7) { display: none; }
}
.slot.social { background: linear-gradient(180deg, #7048e8, #5032b8); }
.days button span { font-size: 16px; letter-spacing: .04em; }
