:root {
  --bg: #07080c;
  --ink: #f4f6fb;
  --ink-2: rgba(244, 246, 251, .62);
  --ink-3: rgba(244, 246, 251, .38);
  --glass: rgba(255, 255, 255, .055);
  --glass-hi: rgba(255, 255, 255, .09);
  --edge: rgba(255, 255, 255, .12);
  --shine: rgba(255, 255, 255, .22);
  --good: #3ddc97;
  --ok: #f4c95d;
  --bad: #ff6b6b;
  --cool: #7aa2ff;
  --r: 22px;
  --pad: 16px;
  --hh: 120px; /* header height, set by JS */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "tnum";
  min-height: 100dvh;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  overflow-x: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ambient light behind the glass */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.bg i { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; }
.bg i:nth-child(1) { width: 70vw; height: 70vw; left: -20vw; top: -10vw; background: #2b4cff; }
.bg i:nth-child(2) { width: 60vw; height: 60vw; right: -25vw; top: 35vh; background: #8a2be2; opacity: .4; }
.bg i:nth-child(3) { width: 55vw; height: 55vw; left: 10vw; bottom: -20vw; background: #00b3a4; opacity: .3; }

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  border: 1px solid var(--edge);
  box-shadow: inset 0 1px 0 var(--shine), 0 10px 30px rgba(0, 0, 0, .35);
}

/* header */
.top {
  position: sticky; top: 0; z-index: 6;
  padding: 10px var(--pad) 10px;
  background: linear-gradient(var(--bg) 40%, rgba(7, 8, 12, .75) 85%, rgba(7, 8, 12, 0));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.brand { font-size: 10px; letter-spacing: .32em; font-weight: 700; color: var(--ink-3); text-align: center; }
.weekbar { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
h1 { font-size: 22px; font-weight: 750; letter-spacing: -.02em; display: flex; align-items: baseline; gap: 8px; }
.sub { font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--ink-2); }
.nav {
  width: 36px; height: 36px; border-radius: 50%; font-size: 24px; line-height: 1;
  display: grid; place-items: center; padding-bottom: 3px;
  background: var(--glass); border: 1px solid var(--edge);
  box-shadow: inset 0 1px 0 var(--shine);
}
.nav:disabled { opacity: .25; cursor: default; }

.chips {
  display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 10px calc(-1 * var(--pad)) 0; padding: 2px var(--pad);
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; scroll-snap-align: center;
  min-width: 36px; height: 30px; padding: 0 10px; border-radius: 15px;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  background: var(--glass); border: 1px solid transparent;
  position: relative;
}
.chip.done { color: var(--ink-3); }
.chip.now::after {
  content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px;
  margin-left: -2px; border-radius: 50%; background: var(--good);
}
.chip.on { color: var(--ink); background: var(--glass-hi); border-color: var(--shine); box-shadow: inset 0 1px 0 var(--shine); }

/* slate */
main { padding: 0 var(--pad) 24px; max-width: 640px; margin: 0 auto; }
.day {
  position: sticky; top: calc(var(--hh) - 4px); z-index: 4;
  display: block; width: fit-content; margin: 14px 0 8px;
  padding: 4px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2);
  background: rgba(20, 22, 30, .55);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--edge);
}

.game { border-radius: var(--r); margin-bottom: 10px; overflow: hidden; position: relative; }
.game::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, var(--ca) 0%, transparent 42%, transparent 58%, var(--ch) 100%);
  opacity: .32;
}
.game > button { display: block; width: 100%; padding: 14px 12px; }

/* matchup row: logo | score | center | score | logo */
.mu { display: grid; grid-template-columns: 44px 1fr 104px 1fr 44px; align-items: center; gap: 6px; }
.lg { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .45)); }
.sc { display: flex; flex-direction: column; line-height: 1.05; }
.sc.a { align-items: flex-end; }
.sc.h { align-items: flex-start; }
.sc b { font-size: 28px; font-weight: 750; letter-spacing: -.02em; }
.sc b.imp { font-size: 20px; font-weight: 650; color: var(--ink-2); }
.sc small { font-size: 10.5px; color: var(--ink-3); margin-top: 3px; font-weight: 500; }
.sc.lost b { opacity: .45; }

.mid { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; color: var(--ink-2); }
.mid .t { color: var(--ink); font-weight: 600; font-size: 12.5px; }
.ou { width: 100%; margin-top: 2px; }
.ou .lbl { font-size: 10.5px; color: var(--ink-3); display: block; margin-bottom: 3px; }
.ou .lbl b { color: var(--ink-2); font-weight: 600; }
.bar { position: relative; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .1); }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; }
.bar u { position: absolute; top: -3px; width: 2px; height: 10px; margin-left: -1px; border-radius: 1px; background: var(--ink); box-shadow: 0 0 4px rgba(0, 0, 0, .6); }

.chev { display: block; margin: 8px auto -6px; color: var(--ink-3); transition: transform .2s; }
.game.open .chev { transform: rotate(180deg); }

/* expanded: position-aligned lineups */
.detail { display: none; padding: 0 12px 12px; }
.game.open .detail { display: block; }
.lu { border-top: 1px solid rgba(255, 255, 255, .08); }
.lr {
  display: grid; grid-template-columns: 1fr 40px 36px 40px 1fr; align-items: center; gap: 4px;
  padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .05);
  font-size: 12.5px; line-height: 1.2;
}
.lr .slot { text-align: center; font-size: 9.5px; font-weight: 700; letter-spacing: .05em; color: var(--ink-3); }
.lr .n { color: var(--ink-2); overflow-wrap: anywhere; }
.lr .n.a { text-align: left; }
.lr .n.h { text-align: right; }
.lr .n em { font-style: normal; font-size: 9.5px; font-weight: 700; color: var(--bad); margin: 0 3px; }
.lr .p { font-weight: 650; display: flex; align-items: center; gap: 4px; color: var(--ink-2); }
.lr .p.a { justify-content: flex-end; }
.lr .p.h { justify-content: flex-start; }
.lr .win { color: var(--ink); }
.lr .win.n { color: var(--ink); }
.dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 6px; }
.lr.tot { border-bottom: 0; font-weight: 700; }
.lr.tot .p { color: var(--ink); }
.note { font-size: 10.5px; color: var(--ink-3); display: flex; justify-content: center; gap: 12px; padding-top: 8px; }
.note span { display: inline-flex; align-items: center; gap: 4px; }

.byes { border-radius: var(--r); padding: 12px 14px; margin-top: 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.byes span { font-size: 11px; letter-spacing: .1em; color: var(--ink-3); font-weight: 600; margin-right: 4px; }
.byes img { width: 26px; height: 26px; object-fit: contain; }

.foot { text-align: center; font-size: 11px; color: var(--ink-3); padding: 0 var(--pad) 28px; }

@media (min-width: 700px) {
  .chips { justify-content: center; }
}
