/* Ball Today — shared structure for football widgets. Themes restyle via the --w-* variables and their own overrides. */
.fbt-w {
  --w-bg: #fff; --w-text: #111; --w-muted: #6b7280; --w-line: rgba(0,0,0,.08); --w-accent: #2563eb; --w-accent-ink: #fff;
  --w-live: #ef4444; --w-win: inherit; --w-home: #2563eb; --w-draw: #9ca3af; --w-away: #f97316;
  --w-radius: 12px; --w-chip-bg: rgba(0,0,0,.05); --w-chip-text: inherit; --w-row-hover: rgba(0,0,0,.03); --w-skel: rgba(0,0,0,.06);
  --w-head-font: inherit;
  color: var(--w-text);
  min-width: 0;
  max-width: 100%;
}
.fbt-w *, .fbt-w *::before, .fbt-w *::after { box-sizing: border-box; }
.fbt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fbt-logo { display: inline-block; flex: none; object-fit: contain; vertical-align: middle; }
.fbt-logo--ph { border-radius: 50%; background: var(--w-skel); }
.fbt-lglogo { display: inline-block; flex: none; object-fit: contain; vertical-align: middle; }
.fbt-lglogo--ph { width: 8px; height: 8px; border-radius: 50%; background: var(--w-accent); }

/* article table of contents (numbering only counts h2) */
.toc__list { list-style: none; counter-reset: fbt-toc; }
.toc__list li { position: relative; }
.toc__l2 { counter-increment: fbt-toc; padding-left: 1.9em; }
.toc__l2::before { content: counter(fbt-toc) "."; position: absolute; left: 0; font-weight: 700; color: var(--toc-num, currentColor); }
.toc__l3 { padding-left: 3.1em; font-size: .94em; }
.toc__l3::before { content: "–"; position: absolute; left: 1.9em; opacity: .6; }

/* chips & day tabs */
.fbt-chips, .fbt-days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.fbt-chips::-webkit-scrollbar, .fbt-days::-webkit-scrollbar { display: none; }
.fbt-chip { display: inline-flex; align-items: center; gap: 6px; flex: none; border: 0; cursor: pointer; font: inherit; font-size: 14px; line-height: 1; padding: 9px 14px; border-radius: 999px; background: var(--w-chip-bg); color: var(--w-chip-text); white-space: nowrap; transition: background .2s, color .2s, transform .2s; }
.fbt-chip:hover { transform: translateY(-1px); }
.fbt-chip.is-active { background: var(--w-accent); color: var(--w-accent-ink); }
.fbt-chip .fbt-lglogo { width: 16px; height: 16px; }
.fbt-day { flex: 1 0 auto; min-width: 92px; border: 0; cursor: pointer; font: inherit; padding: 10px 12px; border-radius: var(--w-radius); background: var(--w-chip-bg); color: var(--w-chip-text); display: flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1.2; transition: background .2s, color .2s; }
.fbt-day span { font-weight: 700; font-size: 15px; font-family: var(--w-head-font); }
.fbt-day small { font-size: 12px; opacity: .75; }
.fbt-day.is-active { background: var(--w-accent); color: var(--w-accent-ink); }

/* skeleton / empty / more */
.fbt-skel-list { display: grid; gap: 10px; }
.fbt-skel { height: 52px; border-radius: var(--w-radius); background: linear-gradient(90deg, var(--w-skel) 25%, transparent 50%, var(--w-skel) 75%); background-size: 300% 100%; animation: fbt-shimmer 1.4s infinite linear; }
.fbt-skel--big { height: 220px; }
@keyframes fbt-shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }
.is-loading { opacity: .55; transition: opacity .2s; }
.fbt-empty { padding: 28px 16px; text-align: center; color: var(--w-muted); border: 1px dashed var(--w-line); border-radius: var(--w-radius); }
.fbt-more { display: block; margin-top: 12px; text-align: center; font-weight: 600; color: var(--w-accent); text-decoration: none; }
.fbt-live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--w-live); margin-right: 6px; vertical-align: middle; animation: fbt-pulse 1.2s infinite; }
@keyframes fbt-pulse { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,.6); } 70% { box-shadow: 0 0 0 7px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }

/* match list */
.fbt-group { margin-bottom: 14px; border-radius: var(--w-radius); background: var(--w-bg); overflow: hidden; border: 1px solid var(--w-line); }
.fbt-group__h { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-family: var(--w-head-font); font-weight: 700; border-bottom: 1px solid var(--w-line); }
.fbt-group__c { color: var(--w-muted); font-weight: 400; font-size: 13px; }
.fbt-group__n { margin-left: auto; font-size: 12px; color: var(--w-muted); font-weight: 500; }
.fbt-match { display: grid; grid-template-columns: 74px minmax(0,1fr) 74px minmax(0,1fr); align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--w-line); transition: background .15s; }
.fbt-match:last-child { border-bottom: 0; }
.fbt-match:hover { background: var(--w-row-hover); }
.fbt-match__st { font-size: 13px; color: var(--w-muted); display: flex; align-items: center; flex-wrap: wrap; gap: 2px 4px; line-height: 1.2; }
.fbt-match.is-live .fbt-match__st { color: var(--w-live); font-weight: 700; }
.fbt-match__lg { display: block; width: 100%; font-size: 11px; opacity: .8; }
.fbt-match__team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fbt-match__team--h { justify-content: flex-end; text-align: right; }
.fbt-match__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.fbt-match__team.is-win .fbt-match__name { font-weight: 800; color: var(--w-win); }
.fbt-match__score { text-align: center; font-family: var(--w-head-font); }
.fbt-sc { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 64px; padding: 5px 8px; border-radius: 8px; background: var(--w-chip-bg); font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.fbt-sc i { font-style: normal; opacity: .5; font-weight: 400; }
.fbt-match.is-live .fbt-sc { background: var(--w-live); color: #fff; }
.fbt-vs { font-weight: 800; font-size: 13px; letter-spacing: .08em; color: var(--w-muted); }
.fbt-ko { display: none; }
.fbt-match__venue { grid-column: 2 / -1; font-size: 12px; color: var(--w-muted); text-align: center; margin-top: -4px; }
.fbt-list .fbt-match { background: var(--w-bg); border: 1px solid var(--w-line); border-radius: var(--w-radius); margin-bottom: 8px; }
@media (max-width: 560px) {
  .fbt-match { grid-template-columns: 54px minmax(0,1fr) 58px minmax(0,1fr); gap: 6px; padding: 10px; font-size: 14px; }
  .fbt-match__team .fbt-logo { width: 20px; height: 20px; }
  .fbt-sc { min-width: 52px; font-size: 15px; padding: 4px 6px; }
}

/* ticker */
.fbt-ticker { position: relative; overflow: hidden; }
.fbt-ticker__track { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px; scroll-snap-type: x proximity; }
.fbt-ticker__track::-webkit-scrollbar { display: none; }
.fbt-ticker__msg { padding: 12px; color: var(--w-muted); font-size: 14px; white-space: nowrap; }
.fbt-tk { flex: none; width: 196px; display: grid; gap: 5px; padding: 9px 12px; border-radius: var(--w-radius); background: var(--w-bg); border: 1px solid var(--w-line); color: inherit; text-decoration: none; scroll-snap-align: start; font-size: 13px; }
.fbt-tk__top { display: flex; justify-content: space-between; gap: 6px; font-size: 11px; color: var(--w-muted); text-transform: uppercase; letter-spacing: .03em; }
.fbt-tk.is-live .fbt-tk__st { color: var(--w-live); font-weight: 700; }
.fbt-tk__row { display: flex; align-items: center; gap: 7px; }
.fbt-tk__n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fbt-tk__row b { font-variant-numeric: tabular-nums; }
.fbt-tk__row.is-win { font-weight: 700; }
.fbt-ticker--marquee .fbt-ticker__track { overflow: hidden; }
.fbt-marquee { display: flex; align-items: center; gap: 36px; white-space: nowrap; animation: fbt-marquee 60s linear infinite; will-change: transform; }
.fbt-marquee:hover { animation-play-state: paused; }
.fbt-marquee__gap { width: 0; }
@keyframes fbt-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.fbt-mq { display: inline-flex; align-items: center; gap: 8px; }
.fbt-mq b { font-size: 11px; padding: 2px 6px; border-radius: 4px; background: var(--w-accent); color: var(--w-accent-ink); }
.fbt-mq em { font-style: normal; opacity: .7; font-size: 13px; }
.fbt-mq.is-live em { color: var(--w-live); opacity: 1; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .fbt-marquee { animation: none; } .fbt-ticker--marquee .fbt-ticker__track { overflow-x: auto; } }

/* standings */
.fbt-table-wrap { overflow-x: auto; border-radius: var(--w-radius); background: var(--w-bg); border: 1px solid var(--w-line); }
.fbt-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.fbt-table th { font-size: 12px; font-weight: 600; color: var(--w-muted); padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--w-line); white-space: nowrap; }
.fbt-table td { padding: 8px; border-bottom: 1px solid var(--w-line); text-align: center; }
.fbt-table tr:last-child td { border-bottom: 0; }
.fbt-table tbody tr:hover { background: var(--w-row-hover); }
.fbt-table .t { text-align: left; }
.fbt-table tr.has-zone td:first-child { box-shadow: inset 3px 0 0 var(--zone); }
.fbt-teamcell { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.fbt-teamcell span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fbt-rank { display: inline-block; min-width: 22px; font-weight: 700; }
.fbt-pts { font-weight: 800; }
.fbt-st__group { margin: 14px 0 8px; font-size: 15px; }
.fbt-st__legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; font-size: 12px; color: var(--w-muted); }
.fbt-st__legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.is-compact .fbt-table { font-size: 13px; }
.is-compact .fbt-teamcell { min-width: 0; }
@media (max-width: 560px) { .fbt-table .hide-s { display: none; } }

/* form badges */
.fbt-form { display: inline-flex; gap: 3px; }
.fbt-form i { font-style: normal; width: 18px; height: 18px; display: inline-grid; place-items: center; border-radius: 4px; font-size: 10px; font-weight: 700; color: #fff; }
.fbt-form__w { background: #16a34a; } .fbt-form__d { background: #9ca3af; } .fbt-form__l { background: #dc2626; }

/* probability bar */
.fbt-prob { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--w-chip-bg); gap: 2px; }
.fbt-prob span { display: block; height: 100%; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.fbt-prob__h { background: var(--w-home); } .fbt-prob__d { background: var(--w-draw); } .fbt-prob__a { background: var(--w-away); }
.fbt-prob__lbl { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--w-muted); }
.fbt-prob__lbl b { color: var(--w-text); font-size: 14px; }
.fbt-prob__lbl .d { text-align: center; } .fbt-prob__lbl .a { text-align: right; }

/* prediction cards */
.fbt-ai__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.fbt-pred { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--w-radius); background: var(--w-bg); border: 1px solid var(--w-line); }
.fbt-pred--skel .fbt-skel { height: 30px; } .fbt-pred--skel .fbt-skel:nth-child(2) { height: 90px; }
.fbt-pred__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--w-muted); }
.fbt-pred__lg { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.fbt-pred.is-live .fbt-pred__time { color: var(--w-live); font-weight: 700; }
.fbt-pred__teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: start; }
.fbt-pred__team { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; min-width: 0; }
.fbt-pred__team b { font-size: 15px; line-height: 1.25; }
.fbt-pred__team small { font-size: 12px; color: var(--w-muted); }
.fbt-pred__mid { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding-top: 8px; min-width: 84px; }
.fbt-pred__mid small { font-size: 11px; color: var(--w-muted); white-space: nowrap; }
.fbt-pred__score { font-family: var(--w-head-font); font-size: 28px; font-weight: 800; line-height: 1.1; letter-spacing: .02em; }
.fbt-pred__now { font-size: 12px; font-weight: 700; color: #fff; background: var(--w-live); padding: 2px 8px; border-radius: 999px; }
.fbt-pred__stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.fbt-pred__stats li { display: flex; flex-direction: column; gap: 2px; padding: 8px 6px; border-radius: 8px; background: var(--w-chip-bg); text-align: center; }
.fbt-pred__stats small { font-size: 10.5px; color: var(--w-muted); line-height: 1.2; }
.fbt-pred__stats b { font-size: 14px; }
.fbt-conf--3 { color: #16a34a; } .fbt-conf--2 { color: #d97706; } .fbt-conf--1 { color: var(--w-muted); }
.fbt-pred__text { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--w-muted); }
.fbt-pred__text b { color: var(--w-text); }
@media (max-width: 420px) { .fbt-pred__stats { grid-template-columns: repeat(2, 1fr); } .fbt-ai__grid { grid-template-columns: 1fr; } }

/* big match */
.fbt-big { padding: 18px; border-radius: var(--w-radius); background: var(--w-bg); border: 1px solid var(--w-line); }
.fbt-big__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--w-muted); margin-bottom: 14px; }
.fbt-big__lg { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--w-text); }
.fbt-big__vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.fbt-big__team { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-width: 0; }
.fbt-big__team b { font-family: var(--w-head-font); font-size: 18px; line-height: 1.2; }
.fbt-big__team small { color: var(--w-muted); font-size: 12px; }
.fbt-big__mid { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.fbt-big__x { font-family: var(--w-head-font); font-size: 30px; font-weight: 900; letter-spacing: .06em; color: var(--w-accent); }
.fbt-big__score { font-family: var(--w-head-font); font-size: 36px; font-weight: 900; }
.fbt-big__live { color: var(--w-live); font-weight: 700; font-size: 13px; }
.fbt-big__pred { margin-top: 16px; }
.fbt-big__pt { font-size: 12.5px; color: var(--w-muted); margin-bottom: 8px; text-align: center; }
.fbt-big__venue { margin-top: 12px; text-align: center; font-size: 12px; color: var(--w-muted); }
.fbt-cd { text-align: center; }
.fbt-cd__l { display: block; font-size: 11px; color: var(--w-muted); margin-bottom: 2px; }
.fbt-cd__v { display: inline-flex; align-items: baseline; gap: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fbt-cd__v b { font-size: 17px; font-weight: 800; }
.fbt-cd__v i { font-style: normal; font-size: 10px; color: var(--w-muted); margin-right: 4px; }

/* power ranking */
.fbt-pw__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fbt-pw__row { display: grid; grid-template-columns: 26px 28px minmax(0, 1.4fr) minmax(60px, 1fr) 72px; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--w-radius); background: var(--w-bg); border: 1px solid var(--w-line); }
.fbt-pw__rank { font-weight: 800; font-family: var(--w-head-font); text-align: center; }
.fbt-pw__team { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.fbt-pw__team b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fbt-pw__team small { font-size: 12px; color: var(--w-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fbt-pw__bar { height: 8px; border-radius: 999px; background: var(--w-chip-bg); overflow: hidden; }
.fbt-pw__bar i { display: block; height: 100%; border-radius: inherit; background: var(--w-accent); }
.fbt-pw__val { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.fbt-pw__val b { font-size: 17px; font-family: var(--w-head-font); }
.fbt-pw__val small { font-size: 10.5px; color: var(--w-muted); }
@media (max-width: 520px) { .fbt-pw__row { grid-template-columns: 22px 24px minmax(0,1fr) 62px; } .fbt-pw__bar { display: none; } }
