@font-face {
  font-family: Onest;
  src: url("assets/Onest-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Onest;
  src: url("assets/Onest-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --canvas: #141419;
  --card: #212126;
  --surface: #2f2f36;
  --button: #393940;
  --accent: #ff681c;
  --text: #f2f2f5;
  --secondary: #98989f;
  --mobile-width: 480px;
  font: 500 14px/16px Onest, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: #0d0d10; color: var(--text); -webkit-text-size-adjust: 100%; }
button, summary { color: inherit; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button { border: 0; padding: 0; background: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
img { display: block; flex: none; }
h1, h2 { margin: 0; }
[hidden] { display: none !important; }
.app { max-width: var(--mobile-width); min-height: 100dvh; margin-inline: auto; background: var(--canvas); }
.app > header { position: sticky; top: 0; z-index: 2; background: var(--canvas); }
.masthead { overflow: hidden; border-radius: 0 0 24px 24px; background: linear-gradient(#0d0d10, #473632); }
.status-bar { position: relative; height: 47px; }
.status-bar img { position: absolute; }
.status-bar img:first-child { top: 14px; left: 27px; }
.status-bar img:last-child { top: 19px; right: 29px; }
.home-bar { position: relative; display: flex; align-items: center; justify-content: space-between; padding-inline: 16px; height: 44px; }
.wordmark { position: absolute; left: 50%; transform: translateX(-49%); width: 99.5px; }
.balance { display: flex; align-items: center; gap: 6px; color: white; }
.sports { display: flex; gap: 2px; padding: 12px; overflow-x: auto; scrollbar-width: none; }
.sports::-webkit-scrollbar { display: none; }
.sport { position: relative; display: block; flex: 0 0 60px; height: 60px; border-radius: 12px; font-size: 10px; line-height: 12px; color: #ffffffb3; transition: flex-basis 240ms ease, height 240ms ease; }
.sport > img { position: absolute; top: 10px; left: 18px; transition: top 240ms ease, left 240ms ease; }
.sport > span { position: absolute; top: 40px; left: 0; width: 100%; text-align: center; white-space: nowrap; transition: opacity 160ms ease, transform 240ms ease; }
.sports.is-compact .sport { flex-basis: 48px; height: 48px; }
.sports.is-compact .sport > img { top: 12px; left: 12px; }
.sports.is-compact .sport > span { opacity: 0; transform: translateY(-4px); pointer-events: none; }
.sport[aria-pressed="true"] { background: linear-gradient(#ffffff26, #ffffff26); color: white; box-shadow: inset 0 1px 1px #ffffff4d; }
.toolbar { height: 56px; padding-inline: 16px; display: flex; align-items: center; gap: 6px; }
.toolbar h1 { margin-right: auto; font-size: 18px; font-weight: 600; line-height: 20px; color: white; }
.broadcast-filter, .market-filter { height: 32px; border-radius: 8px; background: var(--surface); display: flex; align-items: center; }
.broadcast-filter { width: 32px; justify-content: center; }
.broadcast-filter[aria-pressed="true"] { background: var(--button); }
.broadcast-filter:active, .broadcast-filter:focus-visible { outline: none; background: #45454c; }
.market-filter { width: 112px; padding: 0 9px; justify-content: space-between; color: #bfbfc1; }
main { padding-bottom: 142px; }
section { display: grid; gap: 10px; padding: 0 8px 8px; }
section:not([hidden]) ~ section:not([hidden]) { padding-top: 8px; }
h2 { padding-left: 8px; height: 20px; }
.league { min-width: 0; }
summary { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; list-style: none; background: var(--surface); border-radius: 12px; font-size: 12px; line-height: 14px; }
summary > span, .team > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
summary > span { flex: 1; }
summary b { font-weight: 600; color: #d3d3d9; }
summary::-webkit-details-marker { display: none; }
details[open] > summary { border-radius: 12px 12px 4px 4px; }
.league > summary { transition: border-radius 280ms cubic-bezier(0.4, 0, 0.2, 1); }
.league > summary img { transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1); }
.league[data-collapsing="true"] > summary { border-radius: 12px; }
.league[data-collapsing="true"] > summary img { transform: rotate(180deg); }
summary span, .team span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
summary span { flex: 1; }
summary b { font-weight: 500; color: #d3d3d9; }
details:not([open]) summary img { transform: rotate(180deg); }
.match {
  --odd-width: 52px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-rows: 52px 16px; align-items: start;
  column-gap: 8px; row-gap: 8px; height: 92px;
  padding: 8px; margin-top: 2px; border-radius: 4px; background: var(--card);
}
.match:last-child { border-radius: 4px 4px 12px 12px; }
.teams { display: grid; gap: 4px; min-width: 0; }
.team { min-width: 0; display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; }
.team:nth-child(2) { color: #f0f0f3; }
.match-status { grid-row: 2; grid-column: 1 / 3; display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 14px; color: var(--secondary); white-space: nowrap; }
.live { margin-inline: -1px; }
.score { display: grid; grid-template-columns: 26px; grid-auto-rows: 26px; justify-items: stretch; color: var(--accent); font-weight: 600; }
.score span, .score small { display: grid; place-items: center; }
.score.tennis { grid-template-columns: repeat(3, 26px); grid-template-rows: 26px 26px 16px; color: var(--secondary); }
.tennis span:nth-child(3n+1) { color: var(--accent); }
.tennis span:not(:nth-child(3n)) { border-right: 1.5px solid var(--button); }
.tennis span:nth-child(-n+3) { border-bottom: 1.5px solid var(--button); }
.tennis small { align-self: end; height: 12px; font-weight: 500; font-size: 10px; line-height: 12px; opacity: .7; }
.odds { display: flex; gap: 2px; }
.odd, .total-line, .more { display: flex; align-items: center; justify-content: center; width: var(--odd-width); height: 52px; border-radius: 12px; }
.odd, .more { background-color: var(--button); }
.odd { position: relative; isolation: isolate; }
.odd.up::before, .odd.down::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: center / 100% 100% no-repeat;
  pointer-events: none;
  opacity: 0;
  animation: odds-update 8s ease-in-out infinite;
}
.odd.up::before { background-image: url("assets/odds-up.svg"); }
.odd.down::before { background-image: url("assets/odds-down.svg"); }
.odd[aria-pressed="true"]::before { display: none; }
@keyframes odds-update {
  0%, 65%, 90%, 100% { opacity: 0; }
  71%, 79% { opacity: 1; }
}
.odd[aria-pressed="true"] { color: white; background: var(--accent); }
.total-line { justify-content: space-around; font-size: 12px; }
.total-line span { color: var(--secondary); }
.market-name { grid-column: 3; grid-row: 2; align-self: center; justify-self: end; font-size: 12px; line-height: 14px; color: var(--secondary); white-space: nowrap; }
.more { flex-direction: column; width: calc(2 * var(--odd-width) + 2px); font-size: 12px; line-height: 14px; color: #d3d3d9; }
.more b { color: var(--text); font-weight: 600; }
.dock { position: fixed; z-index: 1; bottom: 0; left: 50%; width: min(100%, var(--mobile-width)); transform: translateX(-50%); pointer-events: none; }
.slip { height: 50px; margin: 0 8px 8px; border: 1px solid transparent; border-radius: 12px; display: flex; align-items: center; gap: 8px; padding: 4px 20px 4px 4px; background: linear-gradient(90deg,#ff6a131f,transparent) padding-box, linear-gradient(90deg,#2f2f36,#141419) padding-box, linear-gradient(90deg,#ff6a13,#393940) border-box; pointer-events: auto; }
.event-count { width: 40px; height: 40px; display: grid; place-items: center; background: var(--accent); border-radius: 8px; color: white; }
.slip strong { margin-left: auto; font-size: 18px; line-height: 20px; font-weight: 600; color: white; }
.bottom-nav { height: 60px; padding: 0 12px; display: grid; grid-template-columns: repeat(6, 1fr); background: #141419e6; backdrop-filter: blur(20px); box-shadow: inset 0 1px #ffffff1a; pointer-events: auto; }
.bottom-nav > span { display: flex; align-items: center; flex-direction: column; justify-content: center; gap: 4px; font: 500 10px/12px -apple-system, BlinkMacSystemFont, sans-serif; color: #bfbfc1; white-space: nowrap; }
.bottom-nav [aria-current] { color: #ff6a13; }
.home-indicator { height: 12px; background: #141419e6; display: flex; justify-content: center; }
.home-indicator::before { content: ''; width: 139px; height: 5px; margin-top: -1px; border-radius: 3px; background: #bfbfc1; }
@media (max-width: 380px) {
  .match { --odd-width: clamp(37px, calc((100vw - 224px) / 3), 52px); column-gap: 6px; }
  .score.tennis { grid-template-columns: repeat(3, 23px); }
  .team { gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .league > summary, .league > summary img { transition: none; }
  .sport, .sport > img, .sport > span { transition: none; }
  .odd.up::before, .odd.down::before { animation: none; }
}
@media (min-width: 481px) {
  :root { --mobile-width: 393px; }
}
