@font-face {
  font-family: Inter;
  src: url("./inter.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("./barlow-condensed.woff2") format("woff2");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --background: #0b1019;
  --surface: #111925;
  --surface-raised: #172231;
  --line: #263346;
  --ink: #f5f6f9;
  --muted: #a1aec1;
  --gold: #f6c260;
  --red: #ff747a;
  --width: 1224px;
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--background);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 280px; }
body:has(dialog[open]) { overflow: hidden; }
button, input { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
a { color: inherit; text-decoration: none; }
a, button, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { width: min(var(--width), calc(100% - 96px)); margin-inline: auto; }
.sr-only, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip:focus { position: absolute; z-index: 10; top: 8px; left: 8px; background: var(--gold); color: #14110c; padding: 12px; }
.icon { width: 19px; height: 19px; flex: 0 0 auto; display: inline-grid; place-items: center; }
.icon svg { display: block; width: 100%; height: 100%; }
.dot { width: 7px; height: 7px; flex: 0 0 auto; display: inline-block; border-radius: 50%; background: var(--red); }

.topbar { border-bottom: 1px solid #1c2635; background: #0c121d; }
.topbar-inner { min-height: 72px; display: flex; align-items: center; gap: 62px; }
.brand { display: inline-flex; gap: 10px; align-items: center; font-size: 22px; line-height: 1; font-weight: 800; letter-spacing: -.9px; white-space: nowrap; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--gold); box-shadow: 0 3px 15px #f6c26027; }
.brand-mark span { width: 13px; height: 15px; margin-left: 2px; background: #161119; clip-path: polygon(5% 0%, 100% 50%, 5% 100%); }
.brand-tv { margin-left: 5px; color: var(--gold); font-size: 15px; letter-spacing: 0; }
.main-nav { display: flex; align-self: stretch; gap: 28px; }
.nav-link { position: relative; display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; padding: 0 2px; font-size: 14px; font-weight: 650; color: var(--muted); }
.nav-link:hover, .nav-link.is-current { color: var(--ink); }
.nav-link.is-current::after { content: ""; position: absolute; inset: auto 0 -1px; height: 2px; background: var(--gold); border-radius: 2px; }
.top-search { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #141d2a; font-size: 13px; }
.top-search .icon { width: 16px; height: 16px; }
.top-search:hover, .refresh:hover { border-color: #627089; color: var(--ink); }
kbd { min-width: 19px; padding: 2px; border-radius: 4px; background: #212d3c; color: #c8d1de; text-align: center; font: 11px Inter, sans-serif; }

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center; min-height: 387px;
  margin-top: 28px; border-radius: 21px; border: 1px solid #34404d;
  background: #121a27;
}
.hero::before, .hero::after { content: ""; position: absolute; inset: 0; z-index: -1; }
.hero::before { background: url("./stadium.webp") 50% 59% / cover no-repeat; }
.hero::after { background: linear-gradient(90deg, #101520 4%, #101520f0 24%, #10152095 48%, #1015200a 78%), linear-gradient(0deg, #0b101996, transparent 36%); }
.hero-content { position: relative; padding: 33px 42px 41px; }
h1 { margin: 0; font-family: "Barlow Condensed", Impact, "Arial Narrow", sans-serif; font-size: clamp(58px, 6.25vw, 91px); font-weight: 800; line-height: .85; letter-spacing: -.015em; }
h1 em { color: var(--gold); font-style: normal; }
.hero-detail { max-width: 365px; margin: 22px 0 23px; font-size: 14px; line-height: 1.55; color: #d5dce7; }
.gold-button { min-height: 45px; min-width: 188px; width: max-content; display: inline-flex; align-items: center; gap: 9px; padding: 0 12px; border-radius: 8px; background: var(--gold); color: #1b140e; font-size: 13px; font-weight: 800; }
.gold-button:hover { background: #ffda8d; }
.gold-button .icon { width: 17px; height: 17px; }
.gold-button .arrow { margin-left: auto; }
.hero-stamp { position: absolute; right: 21px; bottom: 21px; display: flex; align-items: center; gap: 11px; min-width: 142px; padding: 10px 12px; border: 1px solid #f8d89054; background: #111521e6; border-radius: 11px; }
.hero-stamp-icon { width: 34px; height: 34px; padding: 7px; border-radius: 8px; background: #f6c26024; color: var(--gold); }
.hero-stamp strong, .hero-stamp small { display: block; }
.hero-stamp strong { color: #fff4dc; font-size: 19px; font-weight: 800; line-height: 1; }
.hero-stamp small { margin-top: 4px; color: #e3d2aa; font-size: 11px; line-height: 1.2; white-space: nowrap; }

.events { margin-top: 38px; padding-bottom: 58px; scroll-margin-top: 20px; min-height: 360px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 20px; }
.section-heading h2 { margin: 0 0 6px; font-size: clamp(24px, 4vw, 33px); line-height: 1.1; letter-spacing: -.05em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.refresh { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 12px; font-weight: 650; color: #dbe2ed; }
.refresh .icon { width: 15px; height: 15px; }
.spinning .icon { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.categories { display: flex; gap: 8px; overflow-x: auto; margin: -4px -4px 16px; padding: 4px 4px 8px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.sport { min-height: 42px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font-size: 12px; font-weight: 650; color: #bdc8d8; white-space: nowrap; }
.sport .icon { width: 17px; height: 17px; }
.sport[aria-pressed="true"] { color: var(--gold); background: #2a251e; border-color: #644d2e; }
.sport:hover { color: var(--ink); border-color: #68768e; }
.filterbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; min-width: 0; gap: 16px; }
.tabs button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 3px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); white-space: nowrap; font-size: 13px; font-weight: 700; }
.tabs button:hover, .tabs button[aria-pressed="true"] { color: var(--ink); }
.tabs button[aria-pressed="true"] { border-bottom-color: var(--gold); }
.live-count { color: #ffc0bf; background: #44232d; border-radius: 9px; min-width: 18px; padding: 1px 3px; font-size: 10px; text-align: center; }
.search { min-width: 0; width: 255px; display: flex; align-items: center; gap: 8px; padding: 0 10px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface); }
.search .icon { width: 16px; height: 16px; }
.search:focus-within { border-color: var(--gold); }
.search input { min-width: 0; width: 100%; min-height: 35px; padding: 0; border: 0; background: none; outline: none; font-size: 13px; }
.search input::placeholder { color: var(--muted); opacity: 1; }
.notice { font-size: 13px; color: var(--gold); }
.day { margin-top: 21px; }
.day-title { display: flex; align-items: center; gap: 8px; margin: 0 0 11px; color: #c3cddd; font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.event-card { min-width: 0; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; text-align: left; padding: 0; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); transition: border-color .16s, background-color .16s; }
.event-card:hover { background: var(--surface-raised); border-color: #64728a; }
.card-head, .card-foot { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 9px; padding-inline: 12px; }
.card-head { min-height: 43px; }
.league { display: flex; align-items: center; gap: 6px; min-width: 0; color: #b8c4d6; font-size: 11px; font-weight: 650; }
.league .icon { width: 15px; height: 15px; color: #98abc5; }
.league > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; padding: 4px 6px; border-radius: 5px; background: #203046; color: #c8d4e5; font-size: 9px; line-height: 1.05; font-weight: 800; letter-spacing: .025em; text-transform: uppercase; }
.badge-live { background: #47262f; color: #ffb1b4; }
.badge-live .dot { width: 5px; height: 5px; }
.badge-ended { background: #222a35; color: #aebcce; }
.matchup { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 7px; min-height: 86px; padding: 6px 11px 13px; text-align: center; }
.team { display: grid; justify-items: center; align-self: start; gap: 7px; min-width: 0; }
.team strong, .matchup-solo strong { font-size: 12px; font-weight: 750; line-height: 1.25; overflow-wrap: anywhere; }
.crest { position: relative; display: grid; place-items: center; width: 39px; height: 39px; flex: 0 0 auto; border-radius: 9px; background: #1d2b40; color: #d9e1ed; }
.crest.has-image { background: #e1e5eb; padding: 4px; }
.crest.has-image .crest-placeholder { visibility: hidden; }
.crest-placeholder { font-size: 11px; font-weight: 800; }
.crest img { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); object-fit: contain; }
.versus { position: relative; top: -7px; color: #97a6bc; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.matchup-solo { grid-template-columns: auto minmax(0, 1fr); justify-content: start; align-items: center; padding-inline: 17px; gap: 11px; text-align: left; }
.matchup-solo strong { font-size: 14px; }
.card-foot { min-height: 36px; border-top: 1px solid #253145; background: #141e2c; font-size: 11px; font-weight: 650; }
.card-time, .card-action { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.card-time { color: #acbbcf; }
.card-action { color: var(--gold); }
.card-time .icon, .card-action .icon { width: 14px; height: 14px; }
.skeleton { margin-top: 25px; }
.skeleton span { display: block; height: 160px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(100deg, #141c29 20%, #1c2838 50%, #141c29 80%); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { display: grid; justify-items: center; padding: 30px 15px; margin-top: 19px; border: 1px dashed #354258; border-radius: 12px; background: var(--surface); text-align: center; }
.empty > .icon { color: var(--gold); width: 23px; height: 23px; }
.empty h3 { margin: 10px 0 5px; font-size: 17px; }
.empty p { margin: 0 0 13px; font-size: 13px; color: var(--muted); }
.empty p:last-child { margin-bottom: 0; }

footer { border-top: 1px solid #1d293a; }
.footer-inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.footer-inner strong { color: #dce4ee; }
.footer-separator { margin-inline: 6px; color: #6f8098; }
.footer-inner a:hover { color: var(--gold); }
dialog { width: min(650px, calc(100% - 24px)); max-height: min(90dvh, 820px); padding: 20px; border: 1px solid #34455c; border-radius: 16px; background: var(--surface); color: var(--ink); }
dialog::backdrop { background: #05080dd9; backdrop-filter: blur(4px); }
.dialog-head { display: flex; justify-content: space-between; gap: 12px; }
.dialog-head h2 { margin: 4px 0 6px; font-size: clamp(20px, 5vw, 28px); letter-spacing: -.035em; }
.dialog-head p { margin: 0; color: var(--muted); font-size: 12px; }
#event-league { color: var(--gold); font-weight: 750; }
.icon-button { display: grid; flex: 0 0 auto; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-raised); }
.player { overflow: hidden; margin-top: 15px; border-radius: 8px; background: #000; }
.player video { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 48dvh; }
.player-note { color: #bec9db; font-size: 13px; line-height: 1.5; }
.player-note:empty { display: none; }
#source-area h3 { font-size: 13px; margin: 18px 0 8px; }
.sources { display: flex; flex-wrap: wrap; gap: 8px; }
.source { min-height: 38px; padding: 0 10px; border: 1px solid #354258; border-radius: 8px; background: #1a2739; font-size: 12px; font-weight: 650; }
.source:hover, .source[aria-pressed="true"] { color: var(--gold); border-color: #a38048; }
.dialog-actions { display: flex; margin-top: 16px; }

@media (max-width: 970px) {
  .wrap { width: calc(100% - 52px); }
  .hero { min-height: 355px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skeleton > span:last-child { display: none; }
}
@media (max-width: 620px) {
  .wrap { width: calc(100% - 28px); }
  .topbar-inner { min-height: 58px; gap: 20px; }
  .brand { font-size: 18px; gap: 7px; }
  .brand-mark { width: 28px; height: 28px; border-radius: 7px; }
  .brand-mark span { width: 11px; height: 12px; }
  .brand-tv { margin-left: 4px; font-size: 12px; }
  .main-nav { gap: 13px; }
  .nav-link { gap: 5px; font-size: 12px; }
  .top-search { min-width: 33px; min-height: 33px; padding: 0; justify-content: center; }
  .top-search span:nth-child(2), .top-search kbd { display: none; }
  .hero { margin-top: 14px; min-height: 322px; align-items: flex-start; border-radius: 14px; }
  .hero::before { background-position: 63% 55%; }
  .hero::after { background: linear-gradient(90deg, #0b1019ee 0%, #101520d9 30%, #10152060 100%), linear-gradient(0deg, #0b1019cc, transparent 40%); }
  .hero-content { padding: 35px 16px 62px; }
  h1 { font-size: clamp(43px, 11vw, 62px); }
  .hero-detail { font-size: 12px; max-width: 232px; margin-block: 13px 15px; }
  .gold-button { min-height: 40px; min-width: 163px; font-size: 12px; }
  .hero-stamp { right: 12px; bottom: 12px; min-width: 0; gap: 6px; padding: 6px 8px; }
  .hero-stamp-icon { width: 24px; height: 24px; padding: 4px; }
  .hero-stamp strong { font-size: 14px; }
  .hero-stamp small { margin-top: 2px; font-size: 9px; }
  .events { margin-top: 24px; padding-bottom: 36px; }
  .section-heading { margin-bottom: 13px; }
  .section-heading p { font-size: 11px; }
  .section-heading .refresh { min-height: 33px; }
  .categories { margin-bottom: 7px; }
  .sport { min-height: 37px; padding: 0 9px; gap: 6px; font-size: 11px; }
  .sport .icon { width: 15px; height: 15px; }
  .filterbar { flex-direction: column-reverse; align-items: stretch; gap: 5px; }
  .search { width: 100%; margin-bottom: 0; }
  .tabs { gap: 13px; }
  .tabs button { min-height: 40px; font-size: 12px; }
  .cards { gap: 8px; }
  .card-head, .card-foot { gap: 4px; padding-inline: 7px; }
  .card-head { min-height: 37px; }
  .league { gap: 3px; font-size: 10px; }
  .league .icon { width: 11px; height: 11px; }
  .badge { gap: 3px; padding: 3px 4px; font-size: 7px; }
  .matchup { min-height: 75px; gap: 3px; padding: 5px 6px 9px; }
  .crest { width: 30px; height: 30px; border-radius: 6px; }
  .team strong, .matchup-solo strong { font-size: 10px; }
  .card-foot { min-height: 31px; font-size: 10px; }
}
@media (max-width: 355px) {
  .topbar-inner { gap: 14px; }
  .cards { grid-template-columns: 1fr; }
  .skeleton > span:nth-child(n+2) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Match cards and stream controls */
.event-card { box-shadow: 0 5px 16px #03070d30; }
.card-head { border-bottom: 1px solid #26334675; }
.matchup { padding-top: 13px; min-height: 98px; }
.crest { width: 45px; height: 45px; border: 1px solid #8597b428; }
.crest.has-image { background: #f8fafc; border-color: #f8fafc; }
.card-action.can-watch { padding: 3px 8px 3px 5px; border-radius: 5px; background: #f6c260; color: #20160b; }
.card-foot { min-height: 41px; }
.player-cover {
  display: grid; justify-items: center; align-content: center; gap: 19px;
  min-height: clamp(155px, 30vw, 218px); margin-top: 16px; border: 1px solid #394359;
  border-radius: 12px; background: linear-gradient(95deg, #101728f0, #101728aa), url("./stadium.webp") center 57% / cover;
}
.cover-crests { display: flex; gap: 11px; }
.cover-crests .crest { width: 49px; height: 49px; }
.player-cover .gold-button { min-width: 134px; justify-content: center; border: 0; }
.source { display: inline-flex; align-items: center; gap: 6px; }
.source .icon { width: 16px; height: 16px; color: var(--gold); }
.source small { margin-left: 2px; color: #b2bfd0; font-weight: 500; }
@media (max-width: 620px) {
  .hero-detail { max-width: 235px; }
  .card-head { min-height: 39px; }
  .matchup { min-height: 85px; padding-top: 9px; }
  .crest { width: 37px; height: 37px; }
  .card-foot { min-height: 36px; }
}
@media (max-width: 440px) {
  .cards { grid-template-columns: 1fr; }
  .skeleton > span:nth-child(n+2) { display: none; }
  .card-head, .card-foot { padding-inline: 12px; }
  .league, .card-foot { font-size: 12px; }
  .badge { font-size: 9px; }
  .team strong, .matchup-solo strong { font-size: 12px; }
  .matchup-solo { padding-inline: 14px; }
}

.mobile-nav { display: none; }
#link-directory { margin-top: 20px; }
#link-directory h3 { margin: 0 0 10px; font-size: 14px; }
.link-row { margin-bottom: 7px; border: 1px solid var(--line); border-radius: 10px; background: #141e2c; }
.link-summary { display: flex; align-items: center; gap: 9px; padding: 11px; cursor: pointer; list-style: none; }
.link-summary::-webkit-details-marker { display: none; }
.link-summary strong { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.link-summary .icon { width: 14px; height: 14px; }
.link-row[open] .link-summary .icon { transform: rotate(90deg); }
.link-badge { font-size: 10px; padding: 3px 6px; border-radius: 5px; color: #dce5f3; background: #26344a; }
.link-content { padding: 0 11px 11px; }
.link-content p { margin: 0 0 7px; font-size: 12px; color: var(--muted); }
.source-url { display: block; margin: 0 0 9px; padding: 8px; overflow-wrap: anywhere; border-radius: 6px; background: #0b121e; color: #d9e6fa; font-size: 11px; user-select: all; }
.link-actions { display: flex; flex-wrap: wrap; gap: 7px; }

@media (max-width: 620px) {
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .topbar { position: sticky; z-index: 3; top: 0; padding-top: env(safe-area-inset-top); }
  .topbar-inner { min-height: 53px; }
  .main-nav, .top-search { display: none; }
  .hero { min-height: 245px; }
  .hero-content { padding-top: 21px; padding-bottom: 46px; }
  .hero-detail { margin-block: 10px 12px; }
  .gold-button { min-height: 37px; }
  .events { scroll-margin-top: calc(63px + env(safe-area-inset-top)); }
  .search input { font-size: 16px; }
  .mobile-nav { position: fixed; z-index: 4; inset: auto 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 5px 10px env(safe-area-inset-bottom); background: #101923; border-top: 1px solid #2c394d; }
  .mobile-nav button { min-height: 51px; display: grid; justify-items: center; align-content: center; gap: 4px; padding: 2px; border: 0; border-radius: 9px; background: none; color: #b4c2d4; font-size: 11px; font-weight: 650; }
  .mobile-nav button[aria-pressed="true"] { color: var(--gold); background: #f6c26016; }
  .mobile-nav .icon { width: 20px; height: 20px; }
  dialog { inset: 0; margin: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; overflow-y: auto; overscroll-behavior: contain; border: 0; border-radius: 0; padding: calc(14px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom)); }
  .dialog-head { position: sticky; top: calc(-14px - env(safe-area-inset-top)); z-index: 1; padding: calc(12px + env(safe-area-inset-top)) 0 11px; margin-top: calc(-12px - env(safe-area-inset-top)); border-bottom: 1px solid var(--line); background: var(--surface); }
  .dialog-head .icon-button { width: 44px; height: 44px; }
  .link-summary { min-height: 47px; }
}
