/* ==========================================================
   Papan Skor — tampilan publik (mobile first)
   Tema terang & gelap (ikut sistem, bisa diganti lewat tombol di header).
   Hijau = aksen utama · Merah = live · Emas = gol / penanda aktif
   ========================================================== */

:root {
  --bg: #F1F4F9;
  --surface: #FFFFFF;
  --surface-2: #F5F7FB;
  --ink: #0E1A2F;
  --muted: #5B6A84;
  --line: #E2E8F1;
  --accent: #0A9B66;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(10, 155, 102, .12);
  --live: #E5324B;
  --gold: #F5B700;
  --shadow: 0 1px 2px rgba(14, 26, 47, .05), 0 6px 20px rgba(14, 26, 47, .06);

  /* nama lama yang masih dipakai di markup */
  --chalk: var(--bg); --paper: var(--surface); --grass: var(--accent); --red: var(--live); --yellow: var(--gold);

  --display: 'Big Shoulders Display', 'Barlow Condensed', Impact, sans-serif;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: 16px;
  --header-h: 60px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #080D18; --surface: #111A2C; --surface-2: #172238; --ink: #EEF3FB; --muted: #8D9CB8; --line: #22304A;
  --accent: #2BD98B; --accent-ink: #052217; --accent-soft: rgba(43, 217, 139, .14);
  --live: #FF566B;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .28);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #080D18; --surface: #111A2C; --surface-2: #172238; --ink: #EEF3FB; --muted: #8D9CB8; --line: #22304A;
    --accent: #2BD98B; --accent-ink: #052217; --accent-soft: rgba(43, 217, 139, .14);
    --live: #FF566B;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .28);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.45 var(--body); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.top-in { max-width: 1180px; height: 100%; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font: 900 26px/1 var(--display); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-logo { display: block; height: 36px; width: auto; max-width: 200px; object-fit: contain; }
.top-nav { display: none; gap: 4px; margin-left: 8px; }
.nav-link { padding: 8px 14px; border-radius: 99px; font-weight: 600; font-size: 15px; color: var(--muted); transition: background .15s, color .15s; }
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link.is-on { background: var(--accent-soft); color: var(--accent); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--muted); transition: background .15s, color .15s; }
.icon-btn:hover { color: var(--ink); background: var(--line); }
.icon-btn svg { width: 20px; height: 20px; }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: block; }
  :root:not([data-theme="light"]) .i-moon { display: none; }
}
.live-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px 7px 11px; border-radius: 99px;
  background: var(--live); color: #fff; font-weight: 700; font-size: 14px;
}
.live-chip[hidden] { display: none; }
.live-chip i, .pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.6s ease-out infinite; }
.pulse-dot { background: var(--live); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 86, 107, .7); } 100% { box-shadow: 0 0 0 8px rgba(255, 86, 107, 0); } }

.notice { padding: 9px var(--gutter); background: var(--gold); color: #1B1500; font-size: 14px; text-align: center; font-weight: 500; }
.notice.is-error { background: var(--live); color: #fff; }

/* ---------- Banner ---------- */
.banner-top { position: relative; margin: 16px 0 0; }
.slides {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  border-radius: 20px; box-shadow: var(--shadow); background: var(--surface-2);
}
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; display: block; scroll-snap-align: start; aspect-ratio: 5 / 2; }
.slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.dot { pointer-events: auto; width: 8px; height: 8px; padding: 0; border-radius: 99px; background: rgba(255, 255, 255, .55); box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); transition: width .2s, background .2s; }
.dot[aria-current="true"] { width: 22px; background: #fff; }
.ads { display: grid; gap: 12px; margin-top: 16px; }
.ad { display: block; overflow: hidden; border-radius: 16px; box-shadow: var(--shadow); background: var(--surface-2); }
.ad img { display: block; width: 100%; height: auto; }
.ads-bottom { margin: 22px 0 0; }

/* ---------- Layout ---------- */
.layout { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.hero { padding: 16px 0 4px; }
.hero:empty { display: none; }
.hero-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font: 700 16px var(--body); }
.hero-title span { padding: 1px 9px; border-radius: 99px; background: var(--live); color: #fff; font: 800 15px/1.4 var(--display); }

/* ---------- Kartu lapangan (live & detail) ---------- */
.hero-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 88%; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px;
}
.hero-track::-webkit-scrollbar { display: none; }
.hero-track.single { grid-auto-columns: 100%; }

.pitch {
  position: relative; isolation: isolate; overflow: hidden; scroll-snap-align: start;
  padding: 14px 16px 16px; border-radius: 22px; color: #fff;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(43, 217, 139, .30), transparent 55%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .035) 0 36px, transparent 36px 72px),
    linear-gradient(150deg, #0D4A33 0%, #0B2A4A 100%);
  box-shadow: var(--shadow);
}
.pitch::before { content: ""; position: absolute; inset: 8px; z-index: -1; border: 1.5px solid rgba(255, 255, 255, .2); border-radius: 15px; }
.pitch-lines { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.pitch-lines .half {
  position: absolute; left: 50%; top: 8px; bottom: 8px; width: 1.5px; background: rgba(255, 255, 255, .2);
  -webkit-mask: linear-gradient(#000 0 34%, transparent 34% 70%, #000 70%); mask: linear-gradient(#000 0 34%, transparent 34% 70%, #000 70%);
}
.pitch-lines .circle { position: absolute; left: 50%; top: 54%; width: 116px; aspect-ratio: 1; border: 1.5px solid rgba(255, 255, 255, .2); border-radius: 50%; transform: translate(-50%, -50%); }
.pitch-link { position: absolute; inset: 0; z-index: 3; border-radius: inherit; }
.pitch[data-state="live"] { box-shadow: 0 0 0 1.5px rgba(255, 86, 107, .55), var(--shadow); }

.pitch-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-height: 34px; }
.pitch-league { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.2; min-width: 0; }
.pitch-league b { display: block; font-weight: 600; }
.pitch-league small { display: block; opacity: .72; font-size: 12px; }
.badge-live { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 99px; background: var(--live); font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.badge-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.6s ease-out infinite; }

.pitch-main { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; margin: 10px 0 14px; }
.side { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-width: 0; }
.side .crest { box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 6px 14px rgba(0, 0, 0, .25); }
.side .name { font-weight: 600; font-size: 15px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.board { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 112px; }
.board .sc { font: 900 58px/1 var(--display); min-width: .62em; text-align: center; text-shadow: 0 2px 0 rgba(0, 0, 0, .2); }
.board .dash { font: 700 32px/1 var(--display); opacity: .55; }
.board .ko { font: 800 40px/1 var(--display); }

.clock { display: flex; align-items: center; gap: 10px; min-height: 26px; font-size: 13px; }
.clock-min { font: 800 22px/1 var(--display); min-width: 44px; }
.clock-end { font: 700 15px/1 var(--display); opacity: .65; }
.track { position: relative; flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .22); }
.track .fill { position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: inherit; background: linear-gradient(90deg, #2BD98B, #fff); transition: width .8s ease; }
.track .ball { position: absolute; top: 50%; left: var(--p); width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .22); transition: left .8s ease; }
.clock-txt { font-weight: 700; font-size: 14px; }
.clock-note { opacity: .78; }
.clock-note::before { content: ""; display: inline-block; width: 4px; height: 4px; margin: 0 10px 2px 0; border-radius: 50%; background: currentColor; opacity: .6; }

.pitch.is-big { border-radius: 0; padding: 16px 18px 20px; box-shadow: none; }
.pitch.is-big::before { border-radius: 10px; }
.pitch.is-big .board .sc { font-size: 84px; }
.pitch.is-big .board .ko { font-size: 52px; }
.pitch.is-big .pitch-lines .circle { width: 150px; }
.pitch.is-big .side .name { font-size: 17px; }

.tick { font-style: normal; animation: tick 1s steps(2, start) infinite; }
@keyframes tick { to { visibility: hidden; } }

/* ---------- Logo tim / liga ---------- */
.crest { display: inline-grid; place-items: center; flex: none; width: var(--s, 20px); height: var(--s, 20px); border-radius: 50%; overflow: hidden; background: #fff; }
.crest img { width: 100%; height: 100%; object-fit: contain; padding: 8%; }
.crest.noimg { background: hsl(var(--hue) 45% 38%); color: #fff; font: 800 calc(var(--s) * .42)/1 var(--display); letter-spacing: .02em; }
.crest.noimg::after { content: attr(data-i); }

/* ---------- Kontrol: tanggal, tab, cari ---------- */
.controls {
  position: sticky; top: var(--header-h); z-index: 20; margin: 0 calc(var(--gutter) * -1); padding: 10px var(--gutter) 10px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.dates { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 10px; }
.dates::-webkit-scrollbar { display: none; }
.date {
  flex: 1 0 58px; display: flex; flex-direction: column; align-items: center; padding: 8px 6px 9px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted); transition: transform .12s, border-color .15s;
}
.date small { font-size: 12px; font-weight: 600; line-height: 1.25; white-space: nowrap; }
.date b { font: 800 24px/1.1 var(--display); color: var(--ink); }
.date:hover { border-color: var(--accent); transform: translateY(-1px); }
.date[aria-current] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px var(--accent-soft); }
.date[aria-current] b { color: var(--accent-ink); }
.date.is-today:not([aria-current]) b { color: var(--accent); }

.filter-bar { display: flex; flex-direction: column; gap: 10px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 99px; white-space: nowrap;
  font-weight: 600; font-size: 14px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); transition: background .15s, color .15s;
}
.tab .n { font-size: 12px; font-weight: 700; padding: 0 7px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.tab[aria-selected="true"] .n { background: rgba(127, 127, 127, .28); color: inherit; }
.tab.hot .n { background: var(--live); color: #fff; }

.search { position: relative; display: block; }
.search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 42px; padding: 0 16px 0 40px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line);
  font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

.day-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 14px 0 4px; font: 800 26px/1.1 var(--display); letter-spacing: .01em; }
.day-title small { font: 600 14px var(--body); color: var(--muted); letter-spacing: 0; }

/* ---------- Daftar liga & laga ---------- */
.list { padding-bottom: 8px; }
.league { margin-top: 12px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.league-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: linear-gradient(90deg, var(--accent-soft), transparent 70%); border-bottom: 1px solid var(--line); }
.league-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.league-name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.league-country { font-size: 12.5px; color: var(--muted); }
.league-count { margin-left: auto; min-width: 26px; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); font: 700 13px var(--body); text-align: center; }

.row { display: grid; grid-template-columns: 62px 1fr auto; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); transition: background .15s; }
.league-head + .row { border-top: 0; }
.row:hover { background: var(--surface-2); }
.row-status { display: grid; place-items: center; }
.st { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; padding: 5px 8px; border-radius: 9px; background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: 13px; line-height: 1.1; text-align: center; }
.row[data-state="next"] .st { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.row[data-state="live"] .st { background: var(--live); color: #fff; font: 800 17px/1.1 var(--display); }
.row[data-state="off"] .st { color: var(--live); }
.row-teams { display: grid; gap: 7px; min-width: 0; }
.t { display: flex; align-items: center; gap: 10px; font-size: 15px; line-height: 24px; min-width: 0; }
.tn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t.win { font-weight: 700; }
.t.lose { color: var(--muted); }
.row-score { display: grid; gap: 7px; justify-items: end; min-width: 26px; }
.row-score b { font: 800 22px/24px var(--display); }
.row-score .pen { font-size: 11px; color: var(--muted); }
.row[data-state="live"] { box-shadow: inset 3px 0 0 var(--live); }
.row[data-state="live"] .row-score b { color: var(--live); }

/* Saring per tab & pencarian: cukup ganti data-filter / kelas, tanpa reload */
.list[data-filter="live"] .row:not([data-state="live"]),
.list[data-filter="done"] .row:not([data-state="done"]),
.list[data-filter="next"] .row:not([data-state="next"]),
.row.q-hide { display: none; }
.list[data-filter="live"] .league:not([data-has~="live"]),
.list[data-filter="done"] .league:not([data-has~="done"]),
.list[data-filter="next"] .league:not([data-has~="next"]),
.league.q-hide { display: none; }
.list[data-filter="live"] .league-head + .row,
.list[data-filter="done"] .league-head + .row,
.list[data-filter="next"] .league-head + .row { border-top: 0; }

.empty { display: none; margin: 16px 0; padding: 30px 20px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 18px; }
.empty a { color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.empty.is-always,
.list[data-filter="live"] .empty[data-for="live"],
.list[data-filter="done"] .empty[data-for="done"],
.list[data-filter="next"] .empty[data-for="next"],
.list.is-searching .empty[data-for="search"].is-on { display: block; }

/* Kilatan saat gol */
.goal { animation: goal 2.6s ease-out; }
.goal [data-h], .goal [data-a] { animation: pop .5s ease-out; }
@keyframes goal { 0%, 30% { background-color: color-mix(in srgb, var(--gold) 45%, transparent); } 100% { background-color: transparent; } }
@keyframes pop { 0% { transform: scale(1.5); } 100% { transform: scale(1); } }
.pitch.goal { animation: none; box-shadow: 0 0 0 4px var(--gold); transition: box-shadow 2s; }

/* ---------- Footer ---------- */
.foot { margin-top: 28px; border-top: 1px solid var(--line); background: var(--surface); }
.foot-in { max-width: 1180px; margin: 0 auto; padding: 20px var(--gutter) calc(30px + env(safe-area-inset-bottom)); font-size: 13px; color: var(--muted); }
.foot-in p { margin: 0 0 4px; }
.foot-custom { color: var(--ink); font-size: 14px; margin-bottom: 8px !important; }

/* ---------- Halaman detail ---------- */
.match { max-width: 780px; margin: 0 auto; }
.back { display: inline-flex; align-items: center; gap: 4px; padding: 16px 2px 10px; font-weight: 600; font-size: 14px; color: var(--muted); }
.back svg { width: 18px; height: 18px; }
.back:hover { color: var(--ink); }
.match .pitch.is-big { border-radius: 24px; box-shadow: var(--shadow); }
.match-tabs { margin: 14px 0 0; }
.panel { padding: 12px 0 4px; }

.tl { padding: 6px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.ev { display: grid; grid-template-columns: 1fr 54px 1fr; align-items: center; gap: 6px; padding: 10px 12px; }
.ev + .ev, .ev-break + .ev { border-top: 1px solid var(--line); }
.ev-min { justify-self: center; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); font: 800 15px/1.3 var(--display); }
.ev.is-goal .ev-min { background: var(--gold); color: #1B1500; }
.ev-side { display: flex; min-width: 0; }
.ev-side.home { justify-content: flex-end; text-align: right; }
.ev-body { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ev-side.home .ev-body { flex-direction: row-reverse; }
.ev-text { min-width: 0; }
.ev-text b { display: block; font-weight: 600; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.ev-text small { display: block; font-size: 13px; color: var(--muted); line-height: 1.3; }
.ev-score { font: 800 15px var(--display); font-style: normal; color: var(--accent); }
.ic { flex: none; width: 20px; height: 20px; color: var(--ink); }
.ic.miss { opacity: .45; }
.ic.card { width: 13px; height: 17px; border-radius: 2.5px; transform: rotate(8deg); }
.ic.card.yel { background: var(--gold); }
.ic.card.red { background: var(--live); }
.ic.var { width: auto; height: auto; padding: 1px 5px; border-radius: 4px; background: var(--ink); color: var(--surface); font: 800 11px var(--display); }
.ev-break { display: flex; align-items: center; gap: 12px; padding: 10px 16px; font-weight: 600; font-size: 13px; color: var(--muted); }
.ev-break::before, .ev-break::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ev + .ev-break { border-top: 1px solid var(--line); }

.stats { padding: 6px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.stat { padding: 12px 0; }
.stat + .stat { border-top: 1px solid var(--line); }
.stat-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.stat-top b { font: 800 19px/1 var(--display); min-width: 40px; }
.stat-top b:last-child { text-align: right; }
.stat-top span { font-size: 14px; color: var(--muted); text-align: center; }
.stat-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 8px; }
.stat-bar span { display: flex; height: 7px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.stat-bar .h { justify-content: flex-end; }
.stat-bar i { display: block; height: 100%; border-radius: 4px; background: color-mix(in srgb, var(--muted) 45%, transparent); }
.stat.lead-h .h i, .stat.lead-a .a i { background: var(--accent); }

.info { margin: 0; padding: 4px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.info div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 12px 0; }
.info div + div { border-top: 1px solid var(--line); }
.info dt { color: var(--muted); font-size: 14px; }
.info dd { margin: 0; font-weight: 500; }

/* ---------- Layar lebar ---------- */
@media (min-width: 720px) {
  :root { --gutter: 24px; }
  .top-nav { display: flex; }
  .slide { aspect-ratio: 3 / 1; }
  .hero-track { grid-auto-columns: calc(50% - 6px); }
  .hero-track.single { grid-auto-columns: minmax(0, 520px); }
  .filter-bar { flex-direction: row; align-items: center; justify-content: space-between; }
  .search { width: 280px; flex: none; }
}

@media (min-width: 1000px) {
  .layout { flex-direction: row; align-items: flex-start; gap: 24px; }
  .board-col { order: 1; flex: 1 1 0; min-width: 0; }
  .side-col { order: 2; flex: 0 0 380px; position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; scrollbar-width: thin; }
  .side-col:has(.hero:empty):not(:has(.ads)) { display: none; }
  .layout:has(.side-col .hero:empty):not(:has(.ads)) .board-col { max-width: 860px; margin-inline: auto; }
  .hero-track, .hero-track.single { grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; gap: 12px; }
  .controls { margin: 0 -10px; padding: 12px 10px; border-radius: 0 0 18px 18px; }
  .ads-bottom { margin-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ==========================================================
   Navigasi bawah (HP), klasemen, top skor, halaman 404
   ========================================================== */
.bottom-nav { display: none; }
@media (max-width: 719px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(4, 1fr);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }
  .bn-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 12px; color: var(--muted); font-size: 11.5px; font-weight: 600; }
  .bn-item svg { width: 23px; height: 23px; }
  .bn-item.is-on { color: var(--accent); background: var(--accent-soft); }
}

/* ---------- Halaman statistik ---------- */
.stats-page { padding-top: 16px; max-width: 920px; margin: 0 auto; }
.league-pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 12px; }
.league-pills::-webkit-scrollbar { display: none; }
.pill-l {
  display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 7px 14px 7px 8px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap;
  transition: border-color .15s, color .15s;
}
.pill-l:hover { border-color: var(--accent); color: var(--ink); }
.pill-l[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.seg a { padding: 8px 18px; border-radius: 10px; font-weight: 700; font-size: 14.5px; color: var(--muted); }
.seg a:hover { color: var(--ink); }
.seg a[aria-current] { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.stat-head { display: flex; align-items: center; gap: 14px; margin: 18px 0 14px; }
.stat-head h1 { margin: 0; font: 800 30px/1.1 var(--display); letter-spacing: .01em; }
.stat-head p { margin: 2px 0 0; color: var(--muted); font-size: 14.5px; }
.group-title { margin: 22px 0 8px; font: 800 20px var(--display); }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.standing { width: 100%; border-collapse: collapse; font-size: 15px; }
.standing th { padding: 11px 8px; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.standing td { padding: 10px 8px; text-align: center; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.standing tbody tr:first-child td { border-top: 0; }
.standing tbody tr:hover { background: var(--surface-2); }
.standing .c-rank { width: 44px; padding-left: 12px; }
.standing .c-team { text-align: left; width: 100%; min-width: 140px; }
.standing th.c-team { padding-left: 4px; }
.standing .c-pts { font-size: 16px; padding-right: 14px; }
.standing .c-form { padding-right: 14px; }
.tm { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tm .tn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.rk { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font: 800 14px var(--display); background: var(--surface-2); }
tr.zone .c-rank { box-shadow: inset 4px 0 0 var(--zc, transparent); }
.zone-cl { --zc: #0A9B66; } .zone-el { --zc: #2F7BF5; } .zone-ecl { --zc: #12B5CB; }
.zone-promo { --zc: #0A9B66; } .zone-po { --zc: #F5B700; } .zone-rel { --zc: #E5324B; } .zone-other { --zc: #8D9CB8; }
tr.zone-cl .rk, tr.zone-promo .rk { background: rgba(10, 155, 102, .16); color: #0A9B66; }
tr.zone-el .rk { background: rgba(47, 123, 245, .16); color: #2F7BF5; }
tr.zone-ecl .rk { background: rgba(18, 181, 203, .16); color: #0E9AAE; }
tr.zone-rel .rk { background: rgba(229, 50, 75, .16); color: #E5324B; }
:root[data-theme="dark"] tr.zone-cl .rk, :root[data-theme="dark"] tr.zone-promo .rk { color: #2BD98B; }
:root[data-theme="dark"] tr.zone-el .rk { color: #6AA6FF; }
:root[data-theme="dark"] tr.zone-rel .rk { color: #FF7C8D; }
.form { display: inline-flex; gap: 4px; }
.f { width: 18px; height: 18px; border-radius: 5px; display: inline-block; position: relative; }
.f::after { content: ""; position: absolute; inset: 0; margin: auto; }
.f-w { background: #0A9B66; } .f-d { background: #8D9CB8; } .f-l { background: #E5324B; }
.muted-dash { color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 2px 4px; padding: 0; list-style: none; font-size: 13.5px; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 8px; }
.zdot { width: 12px; height: 12px; border-radius: 4px; background: var(--zc); display: inline-block; }
.legend-note { margin: 8px 2px 0; font-size: 12.5px; color: var(--muted); }
.hide-s { display: none; }
.hide-m { display: none; }
@media (min-width: 560px) { .hide-s { display: table-cell; } }
@media (min-width: 760px) { .hide-m { display: table-cell; } }

.players { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pl { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.pl.is-lead { background: linear-gradient(90deg, var(--accent-soft), var(--surface) 55%); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.pl-rank { width: 28px; text-align: center; font: 900 22px/1 var(--display); color: var(--muted); }
.pl.is-lead .pl-rank { color: var(--accent); }
.pl .crest { background: var(--surface-2); }
.pl-main { min-width: 0; flex: 1; display: grid; gap: 1px; }
.pl-name { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-team { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; min-width: 0; }
.pl-team span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-extra { color: var(--muted); font-size: 12.5px; }
.pl-stat { display: grid; justify-items: center; min-width: 52px; }
.pl-stat b { font: 900 34px/1 var(--display); color: var(--accent); }
.pl-stat small { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }

.notfound { max-width: 520px; margin: 0 auto; padding: 64px 0 32px; text-align: center; }
.nf-code { margin: 0; font: 900 96px/1 var(--display); color: var(--accent); }
.notfound h1 { margin: 6px 0 8px; font: 800 30px var(--display); }
.notfound p { color: var(--muted); }
.nf-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn-link { padding: 10px 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; }
.btn-link.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Tabel klasemen: kolom tim boleh menyusut (nama panjang dipotong), agar Poin tidak terpotong di HP */
.standing .c-team { max-width: 0; min-width: 110px; }
@media (max-width: 559px) {
  .standing th, .standing td { padding-left: 5px; padding-right: 5px; }
  .standing .c-rank { width: 36px; padding-left: 8px; }
  .standing .c-pts { padding-right: 10px; }
  .tm { gap: 8px; }
}
