/* ChainLine Scores — app shell over chainline-tokens.css */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-ui, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--red-text); text-decoration: none; }

/* ---- top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: linear-gradient(var(--ink), rgba(21,15,8,.92));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--maple-dim);
}
.brand { display: flex; align-items: center; gap: 8px; background: none; border: none; padding: 0; cursor: pointer; color: inherit; }
.brand:active { opacity: .7; }
.brand-c {
  display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: 8px; background: var(--red-deep); color: var(--cream);
  font-weight: 800; font-size: 18px; box-shadow: var(--elev-1);
}
.brand-name { font-size: 17px; letter-spacing: .2px; color: var(--cream-dim); }
.brand-name b { color: var(--cream); }
.icon-btn {
  background: var(--surface); color: var(--cream); border: 1px solid var(--maple-dim);
  width: 36px; height: 36px; border-radius: var(--r-pill); font-size: 18px; cursor: pointer;
}
.icon-btn:active { transform: rotate(90deg); }

/* ---- league chips ---- */
.chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px;
  position: sticky; top: 0; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 8px 16px; border-radius: var(--r-pill);
  background: var(--surface); color: var(--cream-dim);
  border: 1px solid var(--maple-dim); font-size: 14px; font-weight: 600; cursor: pointer;
}
.chip.on { background: var(--cream); color: var(--ink); border-color: var(--cream); }

/* ---- segment + date ---- */
.segwrap { padding: 0 16px; display: flex; flex-direction: column; gap: 10px; }
.segment {
  display: inline-flex; background: var(--surface); border: 1px solid var(--maple-dim);
  border-radius: var(--r-pill); padding: 3px; align-self: flex-start;
}
.seg {
  border: none; background: transparent; color: var(--cream-dim);
  padding: 7px 16px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; cursor: pointer;
}
.seg.on { background: var(--maple); color: var(--ink); }
.datestrip { display: flex; align-items: center; gap: 8px; }
.date-arrow {
  width: 34px; height: 34px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--maple-dim); color: var(--cream); font-size: 18px; cursor: pointer;
}
.date-label {
  flex: 1; text-align: center; background: var(--surface); border: 1px solid var(--maple-dim);
  color: var(--cream); border-radius: var(--r-pill); padding: 8px; font-weight: 700; cursor: pointer;
}

/* ---- view + cards ---- */
.view { padding: 14px 16px 32px; display: flex; flex-direction: column; gap: 10px; }
.sect { font-size: 13px; text-transform: uppercase; letter-spacing: .8px; color: var(--cream-dim); margin: 14px 2px 2px; }
.sect:first-child { margin-top: 2px; }

.card {
  background: var(--surface); border: 1px solid var(--maple-dim);
  border-radius: var(--r-lg); padding: 10px 12px; box-shadow: var(--elev-1);
}
.card.live { border-color: var(--red-deep); }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.lg-tag { font-size: 10px; font-weight: 800; letter-spacing: 1px; color: var(--maple); }
.status { font-size: 12px; color: var(--cream-dim); display: flex; align-items: center; gap: 6px; }
.card.live .status { color: var(--red-text); font-weight: 700; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.trow { display: grid; grid-template-columns: 26px 30px 1fr auto; align-items: center; gap: 10px; padding: 6px 0; }
.trow.dim { opacity: .55; }
.fav {
  background: none; border: none; color: var(--maple-dim); font-size: 16px; cursor: pointer; padding: 0; line-height: 1;
}
.fav.on { color: var(--maple); }
.logo { width: 28px; height: 28px; object-fit: contain; }
.logo.sm { width: 20px; height: 20px; vertical-align: middle; margin-right: 6px; }
.logo.abbr {
  display: grid; place-items: center; background: var(--surface-2);
  border-radius: 6px; font-size: 11px; font-weight: 800; color: var(--cream-dim);
}
.tname { font-size: 15px; font-weight: 600; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.tname .rec { font-size: 11px; color: var(--cream-dim); font-weight: 500; }
.tscore { font-size: 22px; font-weight: 800; min-width: 26px; text-align: right; }
.tpts { font-size: 15px; color: var(--cream-dim); min-width: 24px; text-align: right; }
.meta, .lastplay { font-size: 11px; color: var(--cream-dim); margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--cream-faint); }
.lastplay { color: var(--cream); }

/* ---- standings ---- */
.stand { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--maple-dim); border-radius: var(--r-md); overflow: hidden; margin-top: 4px; }
.stand th, .stand td { padding: 9px 6px; font-size: 13px; text-align: center; }
.stand th { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--cream-dim); border-bottom: 1px solid var(--maple-dim); }
.stand td.tl, .stand th.tl { text-align: left; }
.stand tr:not(:last-child) td { border-bottom: 1px solid var(--cream-faint); }
.stand tr.favrow td { background: rgba(199,154,93,.12); }

/* ---- squash ---- */
.note { font-size: 13px; color: var(--cream-dim); line-height: 1.5; margin: 4px 2px 12px; }
.code-form { display: flex; gap: 8px; margin-bottom: 14px; }
.code-input { flex: 1; background: var(--surface); border: 1px solid var(--maple-dim); color: var(--cream); border-radius: var(--r-md); padding: 12px; font-size: 16px; }
.code-btn { background: var(--red-deep); color: var(--cream); border: none; border-radius: var(--r-md); padding: 0 20px; font-weight: 700; cursor: pointer; }
.squash-links { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.link-btn { display: block; text-align: center; background: var(--surface); border: 1px solid var(--maple-dim); border-radius: var(--r-md); padding: 12px; color: var(--cream); font-weight: 600; }
.tpts { font-variant-numeric: tabular-nums; }

/* ---- misc ---- */
.loading, .empty { text-align: center; color: var(--cream-dim); padding: 40px 16px; line-height: 1.6; }
.empty small { color: var(--cream-faint); }
.foot { text-align: center; font-size: 11px; color: var(--cream-dim); padding: 20px 16px calc(env(safe-area-inset-bottom) + 20px); border-top: 1px solid var(--maple-dim); }

.topbar-actions { display: flex; gap: 8px; }
.icon-btn.avatar { background: var(--maple); color: var(--ink); font-size: 16px; }
.icon-btn.avatar:active { transform: none; }

/* ---- per-game action links ---- */
.glinks { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--cream-faint); }
.glink { font-size: 12px; font-weight: 700; color: var(--maple); background: var(--surface-2); border: 1px solid var(--maple-dim); border-radius: var(--r-pill); padding: 5px 11px; }
.glink.watch { color: var(--red-text); }

/* ---- profile / settings ---- */
.profile-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--maple-dim); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--elev-1); }
.profile-card small { color: var(--cream-dim); }
.avatar.lg { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--maple); color: var(--ink); font-weight: 800; font-size: 17px; flex: 0 0 auto; }

.toggle-list { display: flex; flex-direction: column; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--cream-faint); }
.toggle-row small { color: var(--cream-dim); }
.switch { flex: 0 0 auto; width: 48px; height: 28px; border-radius: var(--r-pill); border: 1px solid var(--maple-dim); background: var(--surface-2); position: relative; cursor: pointer; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--cream-dim); transition: transform .15s, background .15s; }
.switch.on { background: var(--green); border-color: var(--green); }
.switch.on::after { transform: translateX(20px); background: var(--ink); }

.alerts-btn { width: 100%; padding: 13px; border-radius: var(--r-md); border: none; background: var(--red-deep); color: var(--cream); font-weight: 700; font-size: 15px; cursor: pointer; margin-bottom: 4px; }
.alerts-btn.on { background: var(--surface); color: var(--green); border: 1px solid var(--green); }
.alerts-btn:disabled { background: var(--surface); color: var(--cream-dim); }
.inline-link { color: var(--maple); font-weight: 700; }

/* ---- quiet hours ---- */
.quiet-window { display: flex; align-items: center; gap: 8px; padding: 10px 2px 4px; }
.quiet-window.off { opacity: .45; }
.qw-lab { font-size: 13px; color: var(--cream-dim); }
.hour-sel { background: var(--surface-2); color: var(--cream); border: 1px solid var(--maple-dim); border-radius: var(--r-sm); padding: 8px 10px; font-size: 14px; }

/* ---- game detail ---- */
.card.tappable { cursor: pointer; }
.card.tappable:active { transform: scale(.992); }
.back-btn { background: none; border: none; color: var(--maple); font-size: 15px; font-weight: 700; padding: 4px 0 8px; cursor: pointer; }
.detail-head { text-align: center; }
.dt-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.dt-team { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.logo.lg { width: 52px; height: 52px; object-fit: contain; }
.logo.abbr.lg { width: 52px; height: 52px; font-size: 15px; }
.dt-abbr { font-size: 14px; font-weight: 700; color: var(--cream-dim); }
.dt-nums { display: flex; align-items: center; gap: 10px; font-size: 34px; font-weight: 800; }
.dt-dash { color: var(--cream-dim); font-weight: 400; }
.dt-status { margin-top: 10px; font-size: 13px; color: var(--cream-dim); display: flex; align-items: center; justify-content: center; gap: 6px; }
.detail-head.live .dt-status { color: var(--red-text); font-weight: 700; }

.linescore { margin-top: 10px; }
.linescore th, .linescore td { padding: 7px 8px; }
.dt-tot { font-weight: 800; }

.stat-cmp { background: var(--surface); border: 1px solid var(--maple-dim); border-radius: var(--r-md); overflow: hidden; }
.stat-cmp-head { display: grid; grid-template-columns: 1fr 2fr 1fr; text-align: center; padding: 8px; font-weight: 800; color: var(--maple); border-bottom: 1px solid var(--maple-dim); }
.stat-cmp-row { display: grid; grid-template-columns: 1fr 2fr 1fr; align-items: center; text-align: center; padding: 8px; font-size: 14px; }
.stat-cmp-row:not(:last-child) { border-bottom: 1px solid var(--cream-faint); }
.stat-lab { color: var(--cream-dim); font-size: 12px; }

.plays { display: flex; flex-direction: column; }
.play { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--cream-faint); font-size: 14px; }
.play-clock { font-size: 11px; color: var(--maple); font-weight: 700; }
.play-text { color: var(--cream); }
.play-score { font-weight: 800; }

/* ---- brand logo ---- */
.brand-logo { height: 26px; width: auto; display: block; }

/* ---- watch link emphasis ---- */
.glink.watch.on { background: var(--red-deep); color: var(--cream); border-color: var(--red-deep); }

/* ---- schedule range bar ---- */
.range-bar { display: inline-flex; gap: 3px; background: var(--surface); border: 1px solid var(--maple-dim); border-radius: var(--r-pill); padding: 3px; margin-bottom: 4px; }
.range-btn { border: none; background: transparent; color: var(--cream-dim); padding: 6px 16px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; cursor: pointer; }
.range-btn.on { background: var(--maple); color: var(--ink); }

/* ---- odds ---- */
.odds-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.odds-cell { flex: 1; min-width: 90px; background: var(--surface); border: 1px solid var(--maple-dim); border-radius: var(--r-md); padding: 10px; text-align: center; }
.odds-lab { display: block; font-size: 11px; color: var(--cream-dim); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.odds-val { font-size: 16px; font-weight: 800; }

/* ---- rosters ---- */
.roster { background: var(--surface); border: 1px solid var(--maple-dim); border-radius: var(--r-md); margin-bottom: 8px; overflow: hidden; }
.roster summary { padding: 12px; font-weight: 700; cursor: pointer; list-style: none; }
.roster summary::-webkit-details-marker { display: none; }
.roster summary::after { content: " ›"; color: var(--cream-dim); }
.roster[open] summary::after { content: " ⌄"; }
.roster-list { border-top: 1px solid var(--cream-faint); }
.rost-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; padding: 7px 12px; font-size: 14px; }
.rost-row:not(:last-child) { border-bottom: 1px solid var(--cream-faint); }
.rost-num { color: var(--cream-dim); font-size: 12px; }
.rost-star { color: var(--green); font-size: 9px; }
.rost-pos { color: var(--cream-dim); font-size: 12px; }

/* ---- clickable team names ---- */
.tname.team-link { cursor: pointer; }
.tname.team-link:active { color: var(--maple); }
.team-row { cursor: pointer; }

/* ---- leaders ---- */
.leaders-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lead-team { background: var(--surface); border: 1px solid var(--maple-dim); border-radius: var(--r-md); padding: 10px; }
.lead-abbr { font-weight: 800; color: var(--maple); margin-bottom: 6px; }
.lead-row { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; padding: 3px 0; }
.lead-cat { color: var(--cream-dim); }
.lead-ath { flex: 1; text-align: right; color: var(--cream); margin: 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-val { font-weight: 800; }

/* ---- team page ---- */
.team-head { display: flex; align-items: center; gap: 14px; }
.logo.xl { width: 56px; height: 56px; object-fit: contain; }
.th-name { font-size: 20px; font-weight: 800; }
.th-sub { font-size: 13px; color: var(--cream-dim); margin-top: 2px; }
.mini-game { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface); border: 1px solid var(--maple-dim); border-radius: var(--r-md); padding: 11px 12px; margin-bottom: 6px; cursor: pointer; }
.mini-game.live { border-color: var(--red-deep); }
.mini-teams { font-weight: 700; font-size: 14px; }
.mini-when { font-size: 12px; color: var(--cream-dim); }

/* ---- search ---- */
.search-results { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.srch-lg { font-size: 11px; color: var(--maple); font-weight: 700; }
.team-opt { grid-template-columns: 24px 1fr auto; }

/* ---- player search results ---- */
.players-box { display: flex; flex-direction: column; gap: 4px; }
.player-opt { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid transparent; border-radius: var(--r-md); padding: 8px 12px; color: var(--cream); }
.player-img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--surface); }
.player-opt small { color: var(--cream-dim); }

/* ---- team page tabs / facts ---- */
.team-actions { display: flex; gap: 8px; margin-bottom: 10px; }
.team-actions .alerts-btn { margin-bottom: 0; }
.alerts-btn.ghost { background: var(--surface); color: var(--cream); border: 1px solid var(--maple-dim); flex: 0 0 auto; width: auto; padding: 13px 16px; }
.team-tabs { display: flex; width: 100%; margin-bottom: 12px; }
.team-tabs .seg { flex: 1; }
.facts { display: grid; grid-template-columns: 1fr; gap: 8px; }
.fact { display: flex; justify-content: space-between; gap: 12px; background: var(--surface); border: 1px solid var(--maple-dim); border-radius: var(--r-md); padding: 12px 14px; }
.fact-k { color: var(--cream-dim); font-size: 13px; }
.fact-v { font-weight: 700; text-align: right; }
.roster-list.flush { background: var(--surface); border: 1px solid var(--maple-dim); border-radius: var(--r-md); overflow: hidden; }

/* ---- highlights ---- */
.highlight { width: 100%; border-radius: var(--r-md); background: #000; max-height: 240px; }
.hl-cap { font-size: 13px; color: var(--cream-dim); margin: 6px 2px 10px; }
.hl-more { display: block; padding: 10px 4px; border-bottom: 1px solid var(--cream-faint); color: var(--cream); font-size: 14px; }

/* ---- feedback form ---- */
.feedback-form { display: flex; flex-direction: column; gap: 8px; }
.fb-msg, .fb-email { width: 100%; background: var(--surface-2); border: 1px solid var(--maple-dim); color: var(--cream); border-radius: var(--r-md); padding: 12px; font-size: 16px; font-family: inherit; resize: vertical; }
.feedback-form .alerts-btn { margin-bottom: 0; }

/* ---- account ---- */
.acct { display: flex; flex-direction: column; gap: 8px; }
.acct .alerts-btn { margin-bottom: 0; }

/* ---- win probability ---- */
.winprob { margin: 4px 0 6px; }
.wp-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--cream-dim); margin-bottom: 5px; }
.wp-cap { font-size: 10px; text-transform: uppercase; letter-spacing: .6px; }
.wp-track { display: flex; height: 8px; border-radius: var(--r-pill); overflow: hidden; background: var(--surface-2); }
.wp-away { background: var(--p2); }
.wp-home { background: var(--p1); }

/* ---- skeleton loaders ---- */
.skel-card { background: var(--surface); border: 1px solid var(--maple-dim); border-radius: var(--r-lg); padding: 14px; margin-bottom: 10px; }
.skel-line, .skel-row { background: linear-gradient(90deg, var(--surface-2) 25%, rgba(255,242,214,.06) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 6px; }
.skel-line { height: 12px; margin-bottom: 12px; }
.skel-line.w40 { width: 40%; }
.skel-row { height: 22px; margin-bottom: 10px; }
.skel-row:last-child { margin-bottom: 0; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ---- mobile optimization ---- */
* { -webkit-tap-highlight-color: transparent; }
html { overscroll-behavior-y: none; }
.chips, .picker-leagues, .range-bar { -webkit-overflow-scrolling: touch; }
input, select, textarea { font-size: 16px; } /* iOS: prevents zoom-on-focus */
.icon-btn, .chip, .seg, .range-btn, .fav, .glink, .switch { touch-action: manipulation; min-height: 36px; }
.fav { min-width: 32px; }
@media (hover: none) {
  .card.tappable:active { background: var(--surface-2); }
}

/* ---- dynamic chips: off-season greyed, live dot ---- */
.chip.off { opacity: .42; }
.chip-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--red); margin-left: 4px; vertical-align: middle; animation: pulse 1.4s infinite; }

/* ---- news ---- */
.news-list { display: flex; flex-direction: column; }
.news-item { display: block; padding: 11px 4px; border-bottom: 1px solid var(--cream-faint); font-size: 14px; color: var(--cream); }
.news-item::before { content: "📰 "; }

/* ---- toast ---- */
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 24px); transform: translate(-50%, 20px); background: var(--maple); color: var(--ink); font-weight: 700; padding: 10px 18px; border-radius: var(--r-pill); opacity: 0; transition: all .25s; z-index: 80; box-shadow: var(--elev-2); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---- add-to-home-screen bar ---- */
.a2hs { position: fixed; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 12px); display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--maple); border-radius: var(--r-md); padding: 12px 14px; z-index: 70; box-shadow: var(--elev-2); font-size: 13px; }
.a2hs span { flex: 1; }
.a2hs-add { background: var(--red-deep); color: var(--cream); border: none; border-radius: var(--r-sm); padding: 8px 14px; font-weight: 700; cursor: pointer; }
.a2hs-no { background: none; border: none; color: var(--cream-dim); font-size: 16px; cursor: pointer; }

/* ---- light theme ---- */
:root[data-theme="light"] {
  color-scheme: light;
  --ink: #f4eee2;
  --cream: #2a2113;
  --cream-dim: #6b5d45;
  --cream-faint: rgba(40, 30, 12, 0.12);
  --surface: #fffdf7;
  --surface-2: #f1e9d8;
  --maple-dim: rgba(150, 110, 50, 0.28);
  --elev-1: 0 1px 2px rgba(80,60,30,.12), 0 8px 20px -12px rgba(80,60,30,.2);
  --elev-2: 0 2px 6px rgba(80,60,30,.14), 0 16px 36px -16px rgba(80,60,30,.22);
  --elev-3: 0 4px 12px rgba(80,60,30,.16), 0 30px 60px -24px rgba(80,60,30,.3);
}
:root[data-theme="light"] body { background: var(--ink); }
:root[data-theme="light"] .topbar { background: linear-gradient(var(--ink), rgba(244,238,226,.92)); }
:root[data-theme="light"] .chip.on { background: var(--ink); color: var(--cream); border-color: var(--cream); }

/* ---- watch picker ---- */
.watch-menu { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; justify-content: center; }
.watch-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(2px); }
.watch-sheet { position: relative; width: 100%; max-width: 480px; background: var(--surface); border: 1px solid var(--maple-dim); border-bottom: none; border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 12px 12px calc(env(safe-area-inset-bottom) + 16px); box-shadow: var(--elev-3); animation: sheetUp .2s ease; }
.watch-title { text-align: center; font-weight: 800; color: var(--cream-dim); font-size: 13px; padding: 6px 0 10px; }
.watch-opt { display: block; text-align: center; padding: 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--maple-dim); color: var(--cream); font-weight: 700; font-size: 15px; margin-bottom: 8px; cursor: pointer; width: 100%; }
.watch-opt.primary { background: var(--red-deep); color: var(--cream); border-color: var(--red-deep); }
.watch-opt.cancel { background: none; border: none; color: var(--cream-dim); margin-bottom: 0; }
@media (min-width: 720px) { .watch-sheet { border-radius: var(--r-lg); margin-bottom: 24px; border-bottom: 1px solid var(--maple-dim); } }

/* ---- following sheet ---- */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(2px); }
.sheet-card {
  position: relative; width: 100%; max-width: 560px; max-height: 86vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--maple-dim); border-bottom: none;
  border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--elev-3);
  padding: 14px 16px calc(env(safe-area-inset-bottom) + 20px);
  animation: sheetUp .22s ease;
}
@keyframes sheetUp { from { transform: translateY(20px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: var(--surface); padding-bottom: 8px; }
.sheet-head h2 { margin: 0; font-size: 20px; }
.sheet-sect { font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--cream-dim); margin: 18px 0 8px; }

.alerts-card { background: var(--surface-2); border: 1px solid var(--maple-dim); border-radius: var(--r-md); padding: 12px; }
.alerts-row small { color: var(--cream-dim); }
.alerts-btn {
  margin-top: 10px; width: 100%; padding: 12px; border-radius: var(--r-md); border: none;
  background: var(--red-deep); color: var(--cream); font-weight: 700; font-size: 15px; cursor: pointer;
}
.alerts-btn.on { background: var(--surface); color: var(--green); border: 1px solid var(--green); }
.alerts-btn:disabled { background: var(--surface); color: var(--cream-dim); }

.follow-list { display: flex; flex-wrap: wrap; gap: 8px; }
.follow-chip {
  background: var(--maple); color: var(--ink); border: none; border-radius: var(--r-pill);
  padding: 7px 12px; font-weight: 700; font-size: 13px; cursor: pointer;
}
.follow-chip .x { opacity: .65; margin-left: 2px; }

.picker-leagues { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 8px; }
.picker-leagues::-webkit-scrollbar { display: none; }
.picker-lg {
  flex: 0 0 auto; background: var(--surface-2); color: var(--cream-dim); border: 1px solid var(--maple-dim);
  border-radius: var(--r-pill); padding: 6px 14px; font-weight: 600; font-size: 13px; cursor: pointer;
}
.picker-lg.on { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.picker-teams { display: flex; flex-direction: column; gap: 4px; max-height: 44vh; overflow-y: auto; }
.team-opt {
  display: grid; grid-template-columns: 24px 1fr 24px; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1px solid transparent; border-radius: var(--r-md);
  padding: 9px 12px; color: var(--cream); font-size: 15px; text-align: left; cursor: pointer;
}
.team-opt.on { border-color: var(--maple); }
.team-tick { font-weight: 800; color: var(--maple); text-align: center; }
.team-opt.on .team-tick { color: var(--green); }
.team-nm { min-width: 0; }

/* ---- responsive: use desktop width, multi-column cards ---- */
@media (min-width: 720px) {
  .topbar, .chips, .segwrap, .view, .foot { max-width: 1120px; margin-left: auto; margin-right: auto; }
  .sheet-card { border-radius: var(--r-lg); margin-bottom: 24px; border-bottom: 1px solid var(--maple-dim); }
}
@media (min-width: 900px) {
  .view.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; align-content: start; }
  .view.grid > * { grid-column: 1 / -1; }     /* headers, tables, bars span full width */
  .view.grid > .card { grid-column: auto; }    /* only game cards flow into columns */
}
@media (min-width: 1280px) {
  .topbar, .chips, .segwrap, .view, .foot { max-width: 1240px; }
  .view.grid { grid-template-columns: 1fr 1fr 1fr; }
}
