/* LISD Athletics Engine — shared components.
   Everything brand-specific keys off --brand-primary / --brand-secondary /
   --brand-on-primary, set per context (district hub or school page). */

/* ---------- badges ---------- */
.lisd-badge {
  display: inline-block; padding: 3px 10px;
  font-family: var(--font-display);
  font-size: .7rem; font-weight: 600; letter-spacing: .1em;
  transform: skewX(-10deg);
}
.lisd-badge--live { background: #d90429; color: #fff; animation: lisd-pulse 1.6s infinite; }
.lisd-badge--scheduled { background: var(--badge-bg, rgba(255,255,255,.12)); color: var(--badge-text, #cfcfd6); }
.lisd-badge--final, .lisd-badge--replay { background: var(--badge-bg, rgba(255,255,255,.2)); color: var(--title, #fff); }
.lisd-badge--postponed { background: #b45309; color: #fff; }
@keyframes lisd-pulse { 50% { opacity: .55; } }

/* ---------- ticker ---------- */
.lisd-ticker { background: #0b0b0f; border-bottom: 1px solid #22222a; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.lisd-ticker[hidden] { display: none; }
.lisd-ticker::-webkit-scrollbar { display: none; }
.lisd-ticker__track { display: flex; gap: 0; width: max-content; }
.lisd-ticker__item {
  display: flex; flex-direction: column; gap: 1px; padding: 8px 18px;
  border-right: 1px solid #1c1c24; border-top: 3px solid var(--brand-primary, #444);
  text-decoration: none; min-width: 150px;
}
.lisd-ticker__school { color: #fff; font-family: var(--font-display); font-size: .76rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lisd-ticker__opp { color: #b9b9c2; font-size: .78rem; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lisd-ticker__when { color: #8a8a94; font-size: .68rem; }
.lisd-ticker__when.is-live { color: #ff4d5e; font-weight: 800; }

/* ---------- buttons ---------- */
.lisd-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.lisd-btn {
  flex: 1 1 150px; display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 15px 18px; border-radius: 4px; border: none; cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.02rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  text-decoration: none; text-align: center;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.lisd-btn__ico { width: 16px; height: 16px; flex: none; }
.lisd-btn__tag {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: .64rem; font-weight: 600; letter-spacing: .1em; opacity: .8; margin-left: 2px;
}
/* Broadcast-partner logo instead of a text tag: a small white chip so the
   partner's own colors stay legible on any school's button background. */
.lisd-btn__tag--logo {
  flex: none;                 /* never let the flex button squeeze the badge */
  opacity: 1; margin-left: 2px; display: inline-flex; align-items: center; line-height: 0;
}
.lisd-btn__tag--logo img {
  flex: none; display: block;
  height: 46px; width: auto; max-width: none;
  object-fit: contain;        /* keep aspect ratio — no squish on narrow screens */
}
.lisd-actions--hero .lisd-btn__tag--logo img { height: 54px; }
.lisd-btn--watch { background: var(--brand-primary-strong, var(--brand-primary, #C8102E)); color: var(--brand-on-primary, #fff); }
.lisd-btn--listen { background: var(--surface, #15151c); color: var(--title, #fff); border: 2px solid var(--brand-secondary, #C5B783); }
.lisd-btn--listen:active, .lisd-btn--watch:active { transform: scale(.98); }
.lisd-actions--hero .lisd-btn { padding: 18px 26px; font-size: 1.12rem; }
.lisd-actions__none { color: var(--muted, #8a8a94); font-size: .85rem; padding: 8px 0; }

/* ---------- pre-game coverage chips ---------- */
/* Weeks out, a Listen tap would just play the off-air loop — so until the
   game-day window (~90 min to kick), cards say where the broadcast will be.
   The real buttons render alongside, hidden; player.js adds is-actionable on
   the status poll and the chips swap for buttons without a reload. */
/* .lisd-covchip, not .lisd-chip — that name belongs to the record chips. */
.lisd-coverage { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lisd-covchip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
  border: 1px solid var(--card-line, #23232d); border-radius: 999px;
  color: var(--muted, #8a8a94);
  font-family: var(--font-display);
  font-size: .74rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
}
.lisd-covchip .lisd-btn__ico { width: 14px; height: 14px; }
.lisd-covchip .lisd-btn__tag--logo { margin-left: 0; }
.lisd-covchip .lisd-btn__tag--logo img { height: 24px; }
/* Heroes are pinned dark islands — theme-token borders/text would wash out. */
.lisd-actions--hero .lisd-covchip { color: rgba(255, 255, 255, .85); border-color: rgba(255, 255, 255, .3); font-size: .85rem; padding: 10px 18px; }
.lisd-actions--hero .lisd-covchip .lisd-btn__tag--logo img { height: 32px; }
.lisd-actions--pregame .lisd-btn { display: none; }
.is-actionable .lisd-actions--pregame .lisd-coverage { display: none; }
.is-actionable .lisd-actions--pregame .lisd-btn { display: flex; }

/* ---------- Thursday Night Throwdown mark ---------- */
/* District gold/navy on purpose — the franchise brand, not a school color —
   and fixed hex so it reads identically in both theme modes. The skew echoes
   the action buttons' clip-path. */
.lisd-tnt {
  display: inline-block; padding: 4px 12px; margin-top: 4px;
  background: #F2A900; color: #001871;
  font-family: var(--font-display); font-size: .68rem; font-weight: 700;
  letter-spacing: .11em; text-transform: uppercase; white-space: nowrap;
  clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
}
.lisd-hero__kicker .lisd-tnt { margin: 0 0 0 8px; vertical-align: middle; }

/* ---------- game card ---------- */
.lisd-card {
  position: relative; overflow: hidden;
  background: var(--surface, #15151c); border: 1px solid var(--card-line, #23232d); border-radius: 8px; padding: 16px;
  border-left: 4px solid var(--brand-primary, #444);
}
.lisd-card::before {
  content: ""; position: absolute; top: -12%; right: -8%; width: 46%; height: 90%;
  background: var(--brand-mark) no-repeat center / contain;
  opacity: .08; pointer-events: none; transform: rotate(-6deg);
}
.lisd-card > * { position: relative; }
.lisd-card.is-live { border-color: #d90429; box-shadow: 0 0 0 1px #d9042955; }
.lisd-card__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lisd-card__school { font-family: var(--font-display); font-size: .74rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--brand-accent-text, var(--brand-secondary, #C5B783)); }
/* On white cards the pale secondaries (Estacado silver, Monterey sky) wash out —
   daylight cards label with the primary instead. */
html[data-theme="light"] .lisd-card__school,
html[data-theme="light"] .lisd-card__notes { color: color-mix(in srgb, var(--brand-primary, #001871) 90%, #000); }
.lisd-card__sportchip {
  margin-left: auto; padding: 2px 8px; border-radius: 99px;
  background: var(--chip-bg, rgba(255,255,255,.09)); color: var(--chip-text, #c9c9d2);
  font-size: .62rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
.lisd-card__sportchip + .lisd-badge { margin-left: 8px; }
.lisd-card__matchup { margin: 8px 0 4px; font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; color: var(--title, #fff); line-height: 1.15; text-transform: uppercase; letter-spacing: .02em; }
.lisd-card__matchup a { color: inherit; text-decoration: none; }
.lisd-card__matchup a:hover { color: var(--brand-secondary, #C5B783); }
.lisd-card__score {
  margin: 0 0 6px; display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 1.45rem; font-weight: 700;
  color: var(--title, #fff); letter-spacing: .02em; font-variant-numeric: tabular-nums;
}
.lisd-card__result { font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; letter-spacing: .08em; }
.lisd-card__result--w { background: #14532d; color: #86efac; }
.lisd-card__result--l { background: #58151c; color: #fda4af; }
.lisd-card__result--t { background: #3f3f46; color: #d4d4d8; }
.lisd-card__meta { margin: 0; color: var(--muted, #9a9aa5); font-size: .82rem; display: flex; flex-direction: column; gap: 2px; }
.lisd-card__notes { color: var(--brand-accent-text, var(--brand-secondary, #C5B783)); }

/* ---------- hero ---------- */
.lisd-hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 160% at 85% 0%, color-mix(in srgb, var(--brand-primary, #001871) 48%, transparent) 0%, transparent 62%),
    linear-gradient(160deg, #14141b 0%, #0b0b0f 70%);
}
.lisd-hero::before {
  content: ""; position: absolute; top: 6%; right: -4%; width: 46%; height: 92%;
  background: var(--brand-mark) no-repeat center right / contain;
  opacity: .14; pointer-events: none;
}
.lisd-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: linear-gradient(100deg,
    var(--brand-primary, #001871) 0 42%,
    var(--brand-secondary, #F2A900) 42% 58%,
    var(--brand-accent, #D22630) 58% 100%);
}
.lisd-hero__inner { position: relative; max-width: 1080px; margin: 0 auto; padding: 56px 20px 52px; }
.lisd-hero__kicker { color: #b9b9c2; font-family: var(--font-display); font-size: .82rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.lisd-hero__matchup { color: #fff; font-family: var(--font-display); font-size: clamp(2rem, 6.5vw, 3.8rem); line-height: 1.04; margin: 0 0 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .01em; }
.lisd-hero__vs { color: var(--brand-accent-text, var(--brand-secondary, #F2A900)); font-weight: 500; font-size: .55em; padding: 0 6px; }
.lisd-hero__when { color: #b9b9c2; margin: 0; font-size: 1rem; }
.lisd-hero__tagline { color: var(--brand-accent-text, var(--brand-secondary, #F2A900)); font-family: var(--font-display); font-size: .8rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; margin: 14px 0 0; }
.lisd-hero .lisd-actions { max-width: 560px; }
.lisd-hero__transcript { margin: 12px 0 0; font-size: .88rem; }
.lisd-hero__transcript a { color: #b9b9c2; text-decoration: underline; text-underline-offset: 3px; }
.lisd-hero__transcript a:hover, .lisd-hero__transcript a:focus-visible { color: #fff; }
.lisd-hero__score {
  display: flex; align-items: baseline; gap: 14px; margin: 12px 0 0;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.2rem, 7vw, 3.4rem); color: #fff; font-variant-numeric: tabular-nums;
}
.lisd-hero__score span {
  font-size: .32em; letter-spacing: .18em; text-transform: uppercase;
  color: var(--brand-accent-text, var(--brand-secondary, #F2A900));
}
.lisd-hero__link { color: inherit; text-decoration: none; }
.lisd-hero__link:hover { color: var(--brand-secondary, #F2A900); }

/* ---------- kickoff countdown (hero is a pinned dark island in both modes) ---------- */
.lisd-countdown { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 18px 0 20px; }
.lisd-countdown__label {
  font-family: var(--font-display); font-size: .78rem; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--brand-accent-text, var(--brand-secondary, #F2A900));
}
.lisd-countdown__units { display: flex; gap: 10px; }
.lisd-countdown__unit {
  display: flex; flex-direction: column; align-items: center; min-width: 52px; padding: 9px 8px 7px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px;
}
.lisd-countdown__unit[hidden] { display: none; }
.lisd-countdown__unit b {
  font-family: var(--font-display); font-size: 1.55rem; font-weight: 700;
  color: #fff; line-height: 1; font-variant-numeric: tabular-nums;
}
.lisd-countdown__unit i {
  font-style: normal; font-size: .58rem; letter-spacing: .16em; text-transform: uppercase;
  color: #b9b9c2; margin-top: 5px;
}
.lisd-countdown__live { color: #fff; font-family: var(--font-display); font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- record / district standing chips ---------- */
.lisd-hero__record { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.lisd-chip {
  display: inline-flex; align-items: baseline; gap: 8px; padding: 6px 13px; border-radius: 99px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15);
  color: #c9c9d2; font-family: var(--font-display);
  font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
}
.lisd-chip b { color: #fff; font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- replay archive ---------- */
.lisd-replay {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 16px; background: var(--surface, #15151c);
  border: 1px solid var(--card-line, #23232d); border-left: 3px solid var(--brand-primary, #001871);
  border-radius: 12px;
}
.lisd-replay__matchup { color: var(--text, #e8e8ee); font-weight: 600; font-size: .95rem; text-decoration: none; }
.lisd-replay__matchup:hover { color: var(--brand-secondary, #F2A900); }
html[data-theme="light"] .lisd-replay__matchup:hover { color: color-mix(in srgb, var(--brand-primary, #001871) 90%, #000); }
.lisd-replay__meta { display: block; color: var(--muted, #8a8a94); font-size: .74rem; margin-top: 3px; }
.lisd-replay__transcript { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.lisd-replay__transcript:hover { color: var(--text, #e8e8ee); }
.lisd-btn--compact { flex: none; padding: 9px 16px; font-size: .82rem; }
.lisd-replay__info { min-width: 0; }
.lisd-replay__matchup { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- replay slider ---------- */
/* Native scroll + snap, no JS arrows: mandatory snap cancels programmatic smooth
   scrolling (the trap the install walkthrough hit). Swipe on touch, shift-scroll
   or drag the bar on desktop. */
.lisd-slider { margin: 0 -4px; padding: 0 4px; }
.lisd-slider__track {
  list-style: none; margin: 0; padding: 2px 0 12px; display: flex; gap: 12px;
  overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--card-line, #23232d) transparent;
}
.lisd-slider__track::-webkit-scrollbar { height: 8px; }
.lisd-slider__track::-webkit-scrollbar-thumb { background: var(--card-line, #23232d); border-radius: 4px; }
.lisd-slide { flex: 0 0 clamp(268px, 78vw, 340px); scroll-snap-align: start; }
@media (min-width: 720px) { .lisd-slide { flex-basis: 340px; } }

/* ---------- season archive (/{school}/{year}/) ---------- */
.lisd-seasonhead__eyebrow { margin: 0 0 6px; font-size: .8rem; }
.lisd-seasonhead__eyebrow a { color: var(--muted, #8a8a94); text-decoration: none; }
.lisd-seasonhead__eyebrow a:hover { color: var(--brand-secondary, #F2A900); }
.lisd-seasonhead__title {
  margin: 0; font-family: var(--font-display, Oswald, sans-serif); text-transform: uppercase;
  font-size: clamp(1.7rem, 5vw, 2.5rem); line-height: 1.05; color: var(--text, #e8e8ee);
}
.lisd-seasonhead__meta { margin: 8px 0 0; color: var(--muted, #8a8a94); font-size: .9rem; }
.lisd-seasonhead__meta strong { color: var(--text, #e8e8ee); }
.lisd-seasonhead__note {
  margin: 10px 0 0; padding: 9px 12px; font-size: .78rem; line-height: 1.4;
  color: var(--muted, #8a8a94); background: var(--surface, #15151c);
  border-left: 3px solid var(--brand-secondary, #F2A900); border-radius: 0 8px 8px 0;
}
.lisd-seasonnav { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.lisd-seasonnav__item {
  padding: 5px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600; text-decoration: none;
  color: var(--muted, #8a8a94); background: var(--surface, #15151c);
  border: 1px solid var(--card-line, #23232d);
}
.lisd-seasonnav__item:hover { color: var(--text, #e8e8ee); border-color: var(--brand-primary, #001871); }
.lisd-seasonnav__item.is-current {
  color: var(--brand-on-primary, #fff); background: var(--brand-primary, #001871);
  border-color: var(--brand-primary, #001871);
}
.lisd-seasonnav--sport { margin-top: 8px; }

/* "No recording available" — a real state, not an absence. Muted so it never
   competes with a row that actually has a replay. */
.lisd-norecording {
  display: inline-block; font-size: .76rem; color: var(--muted, #8a8a94);
  font-style: italic; white-space: nowrap; padding: 9px 2px;
}
.lisd-season { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lisd-season__row {
  display: grid; grid-template-columns: 78px 1fr auto auto; align-items: center; gap: 14px;
  padding: 12px 16px; background: var(--surface, #15151c);
  border: 1px solid var(--card-line, #23232d); border-left: 3px solid var(--brand-primary, #001871);
  border-radius: 12px;
}
.lisd-season__date { color: var(--muted, #8a8a94); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
.lisd-season__game { min-width: 0; }
.lisd-season__matchup { display: block; color: var(--text, #e8e8ee); font-weight: 600; font-size: .95rem; text-decoration: none; }
.lisd-season__matchup:hover { color: var(--brand-secondary, #F2A900); }
html[data-theme="light"] .lisd-season__matchup:hover { color: color-mix(in srgb, var(--brand-primary, #001871) 90%, #000); }
.lisd-season__venue { display: block; color: var(--muted, #8a8a94); font-size: .74rem; margin-top: 2px; }
.lisd-season__notes { display: block; color: var(--muted, #8a8a94); font-size: .72rem; margin-top: 3px; opacity: .85; }
.lisd-season__result { font-weight: 700; font-size: .86rem; white-space: nowrap; letter-spacing: .01em; }
.lisd-season__result.is-win { color: #4ade80; }
.lisd-season__result.is-loss { color: var(--muted, #8a8a94); }
.lisd-season__result.is-tie { color: var(--brand-secondary, #F2A900); }
html[data-theme="light"] .lisd-season__result.is-win { color: #15803d; }
@media (max-width: 640px) {
  .lisd-season__row { grid-template-columns: 1fr auto; grid-template-areas: "date result" "game game" "action action"; row-gap: 8px; }
  .lisd-season__date { grid-area: date; }
  .lisd-season__game { grid-area: game; }
  .lisd-season__result { grid-area: result; text-align: right; }
  .lisd-season__action { grid-area: action; }
  .lisd-season__action .lisd-btn { width: 100%; justify-content: center; }
}

/* ---------- replay video (Cloudflare Stream recording: branded slate + score cards) ---------- */
.lisd-replayvideo__linkout { margin: 0; }
.lisd-replayvideo {
  position: relative; aspect-ratio: 16 / 9; max-width: 880px;
  background: #000; border: 1px solid var(--card-line, #23232d); border-radius: 14px; overflow: hidden;
}
.lisd-replayvideo iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- hub hero carousel ---------- */
.lisd-heroc { position: relative; }
.lisd-heroc__track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; outline: none;
}
.lisd-heroc__track::-webkit-scrollbar { display: none; }
.lisd-heroc__slide { flex: 0 0 100%; min-width: 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.lisd-heroc__dots {
  position: absolute; left: 0; right: 0; bottom: 20px; z-index: 5;
  display: flex; justify-content: center; gap: 10px; pointer-events: none;
}
.lisd-heroc__dot {
  pointer-events: auto; cursor: pointer; border: none; padding: 0;
  width: 10px; height: 10px; border-radius: 99px;
  background: rgba(255,255,255,.35); transition: background .2s, width .2s;
}
.lisd-heroc__dot.is-active { background: #fff; width: 24px; }
.lisd-heroc__dot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* WCAG 2.2.2: user-facing pause for the auto-rotation. */
.lisd-heroc__pause {
  pointer-events: auto; cursor: pointer; border: none; margin-left: 6px;
  width: 22px; height: 22px; border-radius: 99px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.45); color: #fff;
}
.lisd-heroc__pause:hover { background: rgba(0,0,0,.65); }
.lisd-heroc__pause:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lisd-heroc__pause .icon-play { display: none; }
.lisd-heroc__pause[aria-pressed="true"] .icon-pause { display: none; }
.lisd-heroc__pause[aria-pressed="true"] .icon-play { display: block; }
@media (prefers-reduced-motion: reduce) {
  .lisd-heroc__track { scroll-behavior: auto; }
}

.lisd-hero__cal { margin: 14px 0 0; font-size: .85rem; }
.lisd-hero__cal a { color: var(--brand-accent-text, var(--brand-secondary, #F2A900)); text-decoration: none; font-weight: 600; }
.lisd-hero__cal a:hover { text-decoration: underline; }
.lisd-hero__cal span { color: #9a9aa5; }

/* ---------- school tiles ---------- */
.lisd-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.lisd-tile {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 2px; padding: 22px 20px; border-radius: 8px; text-decoration: none;
  background: linear-gradient(150deg, var(--brand-primary-strong, var(--brand-primary, #444)) 0%, color-mix(in srgb, var(--brand-primary-strong, var(--brand-primary, #444)) 55%, #0b0b0f) 100%);
  border-bottom: 4px solid var(--brand-secondary, #C5B783);
  min-height: 128px;
}
.lisd-tile::after {
  content: ""; position: absolute; right: -6%; bottom: -10%; width: 52%; height: 110%;
  background: var(--brand-mark) no-repeat bottom right / contain;
  opacity: .28; pointer-events: none; transition: opacity .2s, transform .2s;
}
.lisd-tile:hover::after { opacity: .45; transform: scale(1.04); }
.lisd-tile > * { position: relative; z-index: 1; }
.lisd-tile__name { color: var(--brand-on-primary, #fff); font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.lisd-tile__mascot { color: var(--brand-secondary, #eee); font-family: var(--font-display); font-size: .85rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.lisd-tile__cta { color: color-mix(in srgb, var(--brand-on-primary, #fff) 75%, transparent); font-size: .78rem; margin-top: auto; padding-top: 14px; }

/* ---------- add-to-home-screen banner (mimics the OS's own surfaces) ---------- */
.lisd-install[hidden] { display: none; }
@media (min-width: 900px) { .lisd-install { display: none !important; } }
.lisd-install {
  display: flex; align-items: center; gap: 11px;
  background: #1c1c1e; /* iOS systemGray6 dark */
  border-bottom: 1px solid #38383a;
  padding: 9px 14px 9px 6px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.lisd-install__icon { width: 44px; height: 44px; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.lisd-install__text { flex: 1; margin: 0; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.lisd-install__text strong { color: #fff; font-size: .84rem; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lisd-install__text span { color: #98989e; font-size: .7rem; }
.lisd-install__cta {
  border: none; cursor: pointer; font-family: inherit;
  font-weight: 700; font-size: .8rem; letter-spacing: .01em;
}
.lisd-install--ios .lisd-install__cta {
  background: #0A84FF; color: #fff; border-radius: 99px; padding: 7px 20px; /* App Store GET pill */
}
.lisd-install--android .lisd-install__cta {
  background: #D3E3FD; color: #041E49; border-radius: 8px; padding: 9px 18px; /* Material tonal */
}
.lisd-install__dismiss { background: none; border: none; color: #98989e; font-size: .9rem; cursor: pointer; padding: 8px 6px; }

/* bottom sheet, iOS-style */
.lisd-install-sheet[hidden] { display: none; }
.lisd-install-sheet {
  position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.55);
  display: flex; align-items: flex-end; justify-content: center;
}
.lisd-install-sheet__card {
  background: #1c1c1e; border-radius: 16px 16px 0 0;
  padding: 8px 20px calc(22px + env(safe-area-inset-bottom));
  width: 100%; max-width: 480px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  animation: lisd-sheet-up .28s cubic-bezier(.32,.72,.35,1);
}
@keyframes lisd-sheet-up { from { transform: translateY(40%); opacity: .4; } }
.lisd-install-sheet__grabber { width: 36px; height: 5px; border-radius: 3px; background: #48484a; margin: 4px auto 16px; }
.lisd-install-sheet__head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.lisd-install-sheet__icon { width: 64px; height: 64px; border-radius: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.lisd-install-sheet__head .lisd-install-sheet__name { color: #fff; margin: 0 0 2px; font-size: 1.05rem; font-weight: 700; }
.lisd-install-sheet__head p { color: #98989e; margin: 0; font-size: .78rem; }
/* guided walkthrough — one illustrated slide per tap, swipeable + buttons */
.lisd-iw__track {
  display: flex; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; margin: 0 -20px;
}
.lisd-iw__track::-webkit-scrollbar { display: none; }
.lisd-iw__track:focus-visible { outline: 2px solid #0A84FF; outline-offset: -2px; }
.lisd-iw__step {
  flex: 0 0 100%; box-sizing: border-box; padding: 0 20px;
  scroll-snap-align: center; scroll-snap-stop: always;
}
/* the sheet's platform class (install.js) hides the other OS's slides */
.lisd-install--ios .lisd-iw__step[data-platform="android"],
.lisd-install--android .lisd-iw__step[data-platform="ios"] { display: none; }
.lisd-iw__art {
  background: #2c2c2e; border-radius: 12px; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: center; min-height: 168px;
}
.lisd-iw__art svg { width: 100%; max-width: 310px; height: auto; display: block; }
.lisd-iw__homeicon { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 16px 0; }
.lisd-iw__homeicon img { width: 76px; height: 76px; border-radius: 17px; box-shadow: 0 3px 10px rgba(0,0,0,.5); }
.lisd-iw__homeicon span { color: #ebebf0; font-size: .74rem; }
.lisd-iw__num {
  color: #0A84FF; font-size: .72rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; margin: 0 0 5px;
}
.lisd-iw__text { color: #ebebf0; font-size: 1.02rem; line-height: 1.45; margin: 0; }
.lisd-iw__hint { color: #98989e; font-size: .82rem; line-height: 1.4; margin: 7px 0 0; }
.lisd-iw__nav { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.lisd-iw__dots { flex: 1; display: flex; justify-content: center; gap: 7px; }
.lisd-iw__dots span { width: 7px; height: 7px; border-radius: 50%; background: #48484a; }
.lisd-iw__dots span.is-on { background: #0A84FF; }
.lisd-iw__btn {
  border: none; cursor: pointer; font-family: inherit;
  font-weight: 700; font-size: .95rem; padding: 13px 0;
  border-radius: 12px; flex: none; width: 92px;
}
.lisd-iw__btn--back { background: #2c2c2e; color: #ebebf0; }
.lisd-iw__btn--back[disabled] { opacity: .35; cursor: default; }
.lisd-iw__btn--next { background: #0A84FF; color: #fff; }

/* ---------- ScoreStream scoreboard embed ---------- */
.lisd-scorestream {
  max-width: 560px; margin: 0 auto;
  background: var(--surface, #15151c); border: 1px solid var(--card-line, #23232d); border-radius: 8px;
  border-top: 4px solid var(--brand-secondary, #F2A900);
  overflow: hidden; padding: 6px;
}
.lisd-scorestream__note {
  max-width: 560px; margin: 10px auto 0; text-align: center;
  color: var(--muted, #8a8a94); font-size: .72rem;
}

/* ---------- headlines ---------- */
.lisd-news { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 4px 28px; }
.lisd-news__item { padding: 11px 0; border-bottom: 1px solid var(--line, #22222a); display: flex; flex-direction: column; gap: 3px; }
.lisd-news__link { color: var(--text, #e8e8ee); text-decoration: none; font-size: .92rem; line-height: 1.35; font-weight: 500; }
.lisd-news__link:hover { color: var(--brand-secondary, #F2A900); }
/* On white the pale secondaries (Estacado silver, Monterey sky, district gold)
   wash out — daylight accents the hover with the primary, matching the game
   cards (.lisd-card__school/__notes light-mode rule above). */
html[data-theme="light"] .lisd-news__link:hover { color: color-mix(in srgb, var(--brand-primary, #001871) 90%, #000); }
.lisd-news__meta { color: var(--muted, #8a8a94); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }
/* "More coverage" link-outs in the section head — stay in the head's muted
   tone (light-mode .section__more override applies) rather than link blue. */
.lisd-news__more { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.lisd-news__more:hover { color: var(--text, #e8e8ee); }
/* Inside the brand-tinted band the hairlines pick up a hint of the brand so
   they don't disappear against the tinted background. */
.section--tint .lisd-news__item { border-bottom-color: color-mix(in srgb, var(--brand-primary, #001871) 22%, var(--line, #22222a)); }

/* ---------- game-alerts card (push.js drives state) ---------- */
button.lisd-push-card {
  font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%;
}
.lisd-bell { width: 14px; height: 14px; vertical-align: -2px; margin-right: 5px; }
.follow-card .num .lisd-bell { width: 15px; height: 15px; vertical-align: middle; margin: 0; }

/* alerts banner (installed app, first launch) — same chrome as the install
   banner, bell tile in brand colors, brand pill CTA */
.lisd-install--alerts { padding-left: 14px; }
/* unlike the install banner, alerts apply to installed desktop apps too */
@media (min-width: 900px) { .lisd-install--alerts:not([hidden]) { display: flex !important; } }
.lisd-alerts__icon {
  flex: none; width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-primary, #001871); color: var(--brand-on-primary, #fff);
  box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.lisd-alerts__icon svg { width: 22px; height: 22px; }
.lisd-install--alerts .lisd-install__cta {
  background: var(--brand-primary, #001871); color: var(--brand-on-primary, #fff);
  border-radius: 99px; padding: 8px 20px;
}
button.lisd-push-card[hidden] { display: none; }
.lisd-push-card.is-on { border-color: #22c55e; }
.lisd-push-card.is-on strong::after, .lisd-push-card.is-on h3::after {
  content: " ✓"; color: #22c55e;
}

/* ---------- fetch-swap loading bar ---------- */
html.lisd-nav-loading::after {
  content: ""; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 2000;
  background: linear-gradient(90deg, transparent 15%, var(--brand-secondary, #F2A900), transparent 85%);
  animation: lisd-nav-sweep .9s linear infinite;
}
@keyframes lisd-nav-sweep {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .lisd-badge--live { animation: none; }
  .lisd-install-sheet__card { animation: none; }
  html.lisd-nav-loading::after { animation: none; left: 0; right: 60%; transform: none; }
  .lisd-tile::after { transition: none; }
}

/* ---------- persistent player bar ---------- */
.lisd-playerbar[hidden] { display: none; }
.lisd-playerbar {
  position: fixed; inset: auto 0 0 0; z-index: 999;
  display: flex; align-items: center; gap: 12px;
  background: #101016ee; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 2px solid var(--brand-secondary, #C5B783);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
}
.lisd-playerbar__art { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; }
.lisd-playerbar__text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.lisd-playerbar__text strong { color: #fff; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lisd-playerbar__text span { color: #9a9aa5; font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lisd-playerbar__clock { color: #9a9aa5; font-size: .78rem; font-variant-numeric: tabular-nums; }
.lisd-playerbar__toggle, .lisd-playerbar__close {
  background: none; border: none; color: #fff; font-size: 1.25rem; cursor: pointer; padding: 8px;
}
.lisd-playerbar__toggle { display: flex; align-items: center; justify-content: center; }
/* SVG play/pause pair — .is-paused (set by player.js) picks which shows */
.lisd-playerbar__toggle .icon-play, .lisd-nowplaying__toggle .icon-play { display: none; }
.lisd-playerbar__toggle.is-paused .icon-pause, .lisd-nowplaying__toggle.is-paused .icon-pause { display: none; }
.lisd-playerbar__toggle.is-paused .icon-play, .lisd-nowplaying__toggle.is-paused .icon-play { display: block; }
.lisd-nowplaying__toggle.is-paused .icon-play { margin-left: 3px; } /* optical centering of the triangle */
.lisd-playerbar__close { color: #9a9aa5; }
.lisd-playerbar { cursor: pointer; }
.lisd-playerbar__toggle, .lisd-playerbar__close { cursor: pointer; }
body.lisd-playing { padding-bottom: 76px; }

/* ---------- fullscreen now-playing sheet (tap the mini bar to open) ---------- */
.lisd-nowplaying[hidden] { display: none; }
.lisd-nowplaying {
  position: fixed; inset: 0; z-index: 1001;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,0);
  transition: background .32s ease;
}
.lisd-nowplaying.is-open { background: rgba(0,0,0,.55); }
.lisd-nowplaying__sheet {
  position: relative; overflow-y: auto; -webkit-overflow-scrolling: touch;
  width: 100%; max-width: 560px; height: 100%; max-height: 100dvh;
  background:
    radial-gradient(120% 90% at 85% 0%, color-mix(in srgb, var(--brand-primary, #001871) 55%, transparent) 0%, transparent 62%),
    linear-gradient(170deg, #17171f 0%, #0b0b0f 55%);
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform .34s cubic-bezier(.32,.72,.35,1);
  padding-bottom: env(safe-area-inset-bottom);
}
.lisd-nowplaying.is-open .lisd-nowplaying__sheet { transform: translateY(0); }
@media (min-width: 640px) {
  .lisd-nowplaying__sheet { height: auto; max-height: 88dvh; border-radius: 20px 20px 0 0; }
}
.lisd-nowplaying__sheet::after {
  content: ""; position: absolute; top: 8%; right: -10%; width: 60%; height: 70%;
  background: var(--brand-mark) no-repeat center / contain;
  opacity: .1; pointer-events: none;
}
.lisd-nowplaying__head {
  position: relative; flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 8px 4px;
}
.lisd-nowplaying__collapse, .lisd-nowplaying__stop {
  background: none; border: none; color: #d5d5db; font-size: 1.3rem; cursor: pointer; padding: 10px;
}
.lisd-nowplaying__kicker {
  color: #9a9aa5; font-family: var(--font-display);
  font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
}
.lisd-nowplaying__body {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 10px 26px 34px; margin: auto 0;
}
.lisd-nowplaying__art {
  width: min(64vw, 260px); height: min(64vw, 260px); border-radius: 18px; object-fit: cover;
  box-shadow: 0 18px 40px rgba(0,0,0,.5); margin-bottom: 18px;
}
.lisd-nowplaying__art[hidden] { display: none; }
.lisd-nowplaying__badge { font-size: .8rem; padding: 4px 14px; margin-bottom: 12px; }
.lisd-nowplaying__matchup {
  color: #fff; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.4rem, 6vw, 2rem); text-transform: uppercase; line-height: 1.12; margin: 0;
}
.lisd-nowplaying__meta { color: #b9b9c2; font-size: .88rem; margin: 8px 0 0; }
.lisd-nowplaying__score[hidden] { display: none; }
.lisd-nowplaying__score {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.4rem, 12vw, 3.6rem); color: #fff; margin: 10px 0 0;
  font-variant-numeric: tabular-nums;
}
/* replay timeline — only appears for finite-duration (archived) media */
.lisd-nowplaying__seekrow[hidden] { display: none; }
.lisd-nowplaying__seekrow {
  display: flex; align-items: center; gap: 12px;
  width: 100%; max-width: 380px; margin-top: 22px;
}
.lisd-nowplaying__time { color: #9a9aa5; font-size: .74rem; font-variant-numeric: tabular-nums; min-width: 38px; }
.lisd-nowplaying__time:last-child { text-align: right; }
.lisd-nowplaying__seek {
  flex: 1; height: 4px; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background: rgba(255,255,255,.22); border-radius: 99px;
  accent-color: var(--brand-secondary, #F2A900);
}
.lisd-nowplaying__seek::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 99px; border: none;
  background: var(--brand-secondary, #F2A900);
}
.lisd-nowplaying__seek::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 99px; border: none;
  background: var(--brand-secondary, #F2A900);
}
.lisd-nowplaying__elapsed[hidden] { display: none; }
.lisd-nowplaying__controls {
  display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 26px;
}
.lisd-nowplaying__toggle {
  width: 68px; height: 68px; border-radius: 99px; border: none; cursor: pointer;
  background: var(--brand-secondary, #F2A900); color: #101016; font-size: 1.7rem;
  display: flex; align-items: center; justify-content: center;
}
.lisd-nowplaying__elapsed { color: #9a9aa5; font-size: .78rem; font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.lisd-nowplaying__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; width: 100%; }
.lisd-nowplaying__link {
  padding: 10px 18px; border-radius: 99px; border: 1px solid rgba(255,255,255,.18);
  color: #fff; text-decoration: none; font-size: .82rem; font-weight: 600;
}
.lisd-nowplaying__link:hover { border-color: var(--brand-secondary, #F2A900); color: var(--brand-secondary, #F2A900); }

@media (prefers-reduced-motion: reduce) {
  .lisd-nowplaying, .lisd-nowplaying__sheet { transition: none; }
}
