/* Live ticker: navy/gold bar pinned to the bottom of the scoreboard.
   Content is built by ticker.js from real schedule/score/news data. */
:root { --tk-h: 56px; }
.ticker {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  display: flex; align-items: stretch;
  min-height: 54px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: linear-gradient(180deg, #1c1735 0%, #14112b 100%);
  color: #fff;
  border-top: 2px solid var(--accent);
  box-shadow: 0 -6px 18px rgba(10, 8, 22, .35);
  font-size: 1.15rem; line-height: 1.15;
}
.ticker[hidden], .ticker-open[hidden] { display: none !important; }
.tk-badge {
  flex: 0 0 auto; align-self: center; margin: 0 10px 0 max(8px, env(safe-area-inset-left, 0px));
  width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: #14112b;
  display: grid; place-items: center;
  font-family: Anton, Impact, "Arial Narrow Bold", sans-serif; font-size: 1.35rem; line-height: 1;
}
.tk-stage {
  position: relative; flex: 1 1 auto; min-width: 0; overflow: hidden; height: 54px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
}
.tk-track { display: flex; width: max-content; height: 100%; will-change: transform; }
.tk-strip { display: flex; flex: 0 0 auto; height: 100%; }
.tk-item {
  display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto;
  height: 100%; padding: 0 22px 0 0; margin-right: 22px;
  color: #fff; text-decoration: none; white-space: nowrap; position: relative;
}
.tk-item::after { content: ""; position: absolute; right: 0; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; background: var(--accent); transform: rotate(45deg); opacity: .8; }
.tk-item:hover, .tk-item:focus-visible { color: #ffe389; }
.tk-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tk-pill {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  padding: 4px 9px; border-radius: 6px; font-size: .92rem; font-weight: 800; letter-spacing: .08em; line-height: 1.15;
}
.tk-live { background: var(--live); color: #fff; }
.tk-live i { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: tk-blink 1.4s infinite; }
@keyframes tk-blink { 50% { opacity: .35; } }
.tk-final { background: rgba(255,255,255,.16); color: #fff; }
.tk-up { background: transparent; color: var(--accent); border: 1px solid rgba(255,207,74,.6); }
.tk-brk { background: var(--accent); color: #14112b; }
.tk-cat { color: var(--accent); font-weight: 800; font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; }
.tk-hl { font-weight: 800; font-size: 1.15rem; }
.tk-rot { color: #cfcaf5; font-weight: 700; font-size: .95rem; letter-spacing: .06em; }
.tk-meet { color: #cfcaf5; font-weight: 700; font-size: 1.05rem; }
.tk-teams { display: inline-flex; align-items: center; gap: 10px; }
.tk-t b { font-weight: 800; font-size: 1.15rem; }
.tk-t.is-lead b { color: var(--accent); }
.tk-n { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.2rem; color: #fff; }
.tk-sep { color: rgba(255,207,74,.7); }
.tk-more, .tk-time { color: #cfcaf5; font-weight: 700; font-size: 1.05rem; }
.tk-close {
  flex: 0 0 auto; width: 54px; height: 54px; align-self: flex-start; padding: 0;
  border: 0; background: transparent; color: #cfcaf5; font: inherit; font-size: 1.7rem; line-height: 1; cursor: pointer;
  margin-right: env(safe-area-inset-right, 0px);
}
.tk-close:hover, .tk-close:focus-visible { color: var(--accent); }
.tk-close:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
/* Reduced motion: one static item at a time, no crawl. */
.tk-stage.is-static { -webkit-mask-image: none; mask-image: none; }
.tk-stage.is-static .tk-track { width: 100%; }
.tk-stage.is-static .tk-single { animation: tk-fade .45s ease-out; width: 100%; }
.tk-stage.is-static .tk-item { max-width: 100%; overflow: hidden; }
.tk-stage.is-static .tk-hl, .tk-stage.is-static .tk-teams, .tk-stage.is-static .tk-meet { overflow: hidden; text-overflow: ellipsis; }
.tk-stage.is-static .tk-item::after { display: none; }
@keyframes tk-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tk-live i { animation: none; } .tk-stage.is-static .tk-single { animation: none; } }
/* Minimized: a restore tab with a 44px tap target. */
.ticker-open {
  position: fixed; right: max(10px, env(safe-area-inset-right, 0px)); bottom: calc(8px + env(safe-area-inset-bottom, 0px)); z-index: 15;
  min-height: 44px; min-width: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--accent);
  background: #14112b; color: var(--accent); font: inherit; font-size: .92rem; font-weight: 800; letter-spacing: .04em; cursor: pointer;
  box-shadow: 0 4px 14px rgba(10, 8, 22, .4);
}
.ticker-open:hover, .ticker-open:focus-visible { background: var(--accent); color: #14112b; }
.ticker-open:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* Keep page content (footer, last cards) clear of the bar. */
body.has-ticker { padding-bottom: calc(var(--tk-h, 56px) + 8px + env(safe-area-inset-bottom, 0px)); }
body.has-ticker-min { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
@media print { .ticker, .ticker-open { display: none !important; } }
