:root {
  --bg: #0e1116;
  --panel: #161b22;
  --panel-2: #1d232c;
  --line: #2a313c;
  --text: #e8edf2;
  --muted: #8b96a5;
  --accent: #ff8a1f;      /* basketball orange */
  --accent-ink: #1a0f00;
  --win: #ffffff;
  --col: clamp(240px, calc((100vw - 48px) / 7), 320px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }

/* header */
.top { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); }
.brand { display: flex; gap: 12px; align-items: center; }
.ball { width: 34px; height: 34px; fill: var(--accent); stroke: var(--accent-ink); stroke-width: 1.2; }
h1 { margin: 0; font-size: 20px; letter-spacing: .02em; text-transform: uppercase; font-weight: 800; }
.sub { margin: 0; color: var(--muted); font-size: 12px; letter-spacing: .04em; }

.filter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1 1 360px; max-width: 640px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; }
.filter:focus-within { border-color: var(--accent); }
.filter input { flex: 1 1 160px; min-width: 120px; background: none; border: 0; color: var(--text); font: inherit; padding: 4px; outline: none; }
.chips { display: contents; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 2px 4px 2px 4px; font-size: 13px; }
.chip img, .chip .mono { width: 18px; height: 18px; }
.chip button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; }
.chip button:hover { color: var(--text); }
.ghost { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; }
.ghost:hover { color: var(--text); }

/* day navigation */
.days-nav { display: flex; justify-content: center; gap: 8px; padding: 12px; }
.nav-btn { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.nav-btn:hover { border-color: var(--muted); }
.today-btn { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }

/* the horizontal track of days */
.track { display: grid; grid-auto-flow: column; grid-auto-columns: var(--col); gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 24px 24px; outline: none;
  scrollbar-color: var(--line) transparent; }
.day { scroll-snap-align: center; display: flex; flex-direction: column; gap: 8px; min-height: 60vh; }
.day-head { position: sticky; top: 0; text-align: center; padding: 8px 0 10px; border-bottom: 2px solid var(--line); }
.day-head .dow { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.day-head .dm { font-size: 18px; font-weight: 700; }
.day.is-today .day-head { border-color: var(--accent); }
.day.is-today .dow { color: var(--accent); font-weight: 700; }
.day.is-past .day-head .dm { color: #c3cbd5; }
.empty { color: var(--muted); text-align: center; font-size: 13px; padding: 24px 0; border: 1px dashed var(--line); border-radius: 10px; }

/* a game */
.game { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
  display: grid; gap: 4px; text-decoration: none; color: inherit; }
a.game { cursor: pointer; transition: border-color .12s, transform .12s, background .12s; }
a.game:hover { border-color: var(--accent); background: var(--panel-2); transform: translateY(-1px); }
a.game:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a.game:active { transform: none; }
.row { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 8px; }
.logo, .mono { width: 26px; height: 26px; border-radius: 50%; object-fit: contain; background: #fff; }
.mono { display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff; background: var(--c, #445); }
.name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.name .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.name .tag { flex: none; font-size: 10px; font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: 4px; padding: 0 4px; }
.other .name { color: var(--muted); }
.score { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 17px; min-width: 2ch; text-align: right; color: var(--muted); }
.won .score, .won .name { color: var(--win); font-weight: 700; }
.meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted);
  border-top: 1px solid var(--line); padding-top: 5px; margin-top: 2px; }
.meta .status { font-weight: 700; color: var(--text); white-space: nowrap; }
.meta .event { flex: 1; min-width: 0; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta .go { flex: none; color: var(--accent); font-weight: 600; white-space: nowrap; }

.foot { color: var(--muted); font-size: 12px; text-align: center; padding: 8px 16px 24px; }

@media (max-width: 720px) {
  :root { --col: 82vw; }
  .top { padding: 12px 14px; position: static; }
  .track { padding: 4px 9vw 24px; }
}
