/* ============================================================ NG Sports */
:root {
  --bg: #0b0f17;
  --bg-2: #111725;
  --card: #151c2c;
  --card-2: #1b2438;
  --line: #24304a;
  --line-2: #2f3d5c;
  --text: #e8edf7;
  --text-2: #a8b3c9;
  --muted: #74819b;
  --accent: #ff3b5c;
  --accent-2: #ff8a00;
  --accent-soft: rgba(255, 59, 92, .14);
  --good: #22c55e;
  --good-soft: rgba(34, 197, 94, .14);
  --warn: #f5a524;
  --warn-soft: rgba(245, 165, 36, .14);
  --bad: #ef4444;
  --bad-soft: rgba(239, 68, 68, .14);
  --info: #3b82f6;
  --info-soft: rgba(59, 130, 246, .14);
  --live: #ff3b5c;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 6px 24px rgba(0, 0, 0, .28);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --maxw: 1320px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f3f5f9;
  --bg-2: #ffffff;
  --card: #ffffff;
  --card-2: #f5f7fb;
  --line: #e2e7f0;
  --line-2: #cfd7e5;
  --text: #0f1729;
  --text-2: #3d4a63;
  --muted: #6b7890;
  --accent-soft: rgba(255, 59, 92, .1);
  --shadow: 0 4px 18px rgba(15, 23, 41, .08);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding-bottom: 72px;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 1.2rem; font-weight: 750; letter-spacing: -.01em; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .8em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ------------------------------------------------------------ top bar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg-2) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; gap: 20px; padding: 0 16px; height: 58px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.12rem; letter-spacing: .02em; white-space: nowrap; }
.brand b { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mainnav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.mainnav a { padding: 8px 12px; border-radius: 9px; color: var(--text-2); font-weight: 600; font-size: .93rem; white-space: nowrap; }
.mainnav a:hover { background: var(--card); color: var(--text); }
.mainnav a.active { color: var(--text); background: var(--card-2); box-shadow: inset 0 -2px 0 var(--accent); }
.userbox { display: flex; align-items: center; gap: 8px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }

.tabbar { display: none; }

/* ------------------------------------------------------------ layout */
#app { max-width: var(--maxw); margin: 0 auto; padding: 20px 16px 40px; outline: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head p { color: var(--text-2); margin: 4px 0 0; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.layout-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.layout-main.wide-side { grid-template-columns: minmax(0, 1fr) 400px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.tiny { font-size: .75rem; }
.bold { font-weight: 700; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 16px; }
.hidden { display: none !important; }

/* ------------------------------------------------------------ cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { font-size: 1rem; }
.card-body { padding: 14px 16px; }
.card-foot { padding: 10px 16px; border-top: 1px solid var(--line); font-size: .85rem; }
.section-title { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 10px; }

/* ------------------------------------------------------------ chips / tabs / buttons */
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: thin; margin-bottom: 14px; }
.chip {
  border: 1px solid var(--line); background: var(--card); color: var(--text-2);
  padding: 6px 13px; border-radius: 999px; font-weight: 650; font-size: .86rem; white-space: nowrap; cursor: pointer;
}
.chip:hover { border-color: var(--line-2); color: var(--text); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tab { padding: 10px 14px; font-weight: 650; color: var(--text-2); border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer; background: none; border-top: 0; border-left: 0; border-right: 0; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.seg { display: inline-flex; background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 7px; font-weight: 650; font-size: .85rem; color: var(--text-2); cursor: pointer; }
.seg button.active { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line-2); background: var(--card-2); color: var(--text);
  padding: 8px 14px; border-radius: 10px; font-weight: 650; font-size: .9rem; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--text-2); color: var(--text); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; }
.btn.primary:hover { filter: brightness(1.08); color: #fff; }
.btn.danger { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.btn.ghost { background: none; border-color: transparent; }
.btn.sm { padding: 5px 10px; font-size: .82rem; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { border: 1px solid var(--line); background: var(--card); width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; cursor: pointer; }
.icon-btn:hover { border-color: var(--line-2); }
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------ forms */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field label { font-size: .82rem; font-weight: 650; color: var(--text-2); }
.input, select.input, textarea.input {
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; width: 100%;
}
.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
select.input.select-sm, .input.select-sm { padding: 6px 30px 6px 10px; font-size: .86rem; width: auto; max-width: 100%; }
.check { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 4px 0; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }
.form-error { color: var(--bad); font-size: .87rem; min-height: 1.2em; margin: 4px 0 8px; }

/* ------------------------------------------------------------ badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 750; letter-spacing: .02em; background: var(--card-2); color: var(--text-2); border: 1px solid var(--line); white-space: nowrap; }
.badge.live { background: var(--live); color: #fff; border-color: transparent; }
.badge.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
.badge.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
@keyframes pulse { 50% { opacity: .3; } }
.pos { display: inline-block; min-width: 30px; text-align: center; font-size: .7rem; font-weight: 800; padding: 2px 5px; border-radius: 5px; background: var(--card-2); color: var(--text-2); }
.pos-QB { background: #7c3aed33; color: #a78bfa; }
.pos-RB { background: #05966933; color: #34d399; }
.pos-WR { background: #2563eb33; color: #60a5fa; }
.pos-TE { background: #ea580c33; color: #fb923c; }
.pos-K { background: #64748b33; color: #94a3b8; }
.pos-DEF { background: #be123c33; color: #fb7185; }
.grade { display: inline-grid; place-items: center; min-width: 36px; height: 28px; padding: 0 6px; border-radius: 7px; font-weight: 850; font-size: .9rem; }
.grade-A { background: var(--good-soft); color: var(--good); }
.grade-B { background: var(--info-soft); color: var(--info); }
.grade-C { background: var(--warn-soft); color: var(--warn); }
.grade-D, .grade-F { background: var(--bad-soft); color: var(--bad); }

/* ------------------------------------------------------------ news */
.hero { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; margin-bottom: 18px; }
.hero-main { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 360px; display: flex; align-items: flex-end; background: var(--card-2); border: 1px solid var(--line); }
.hero-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-main .hero-text { position: relative; padding: 22px; background: linear-gradient(transparent, rgba(0,0,0,.88) 40%); width: 100%; color: #fff; }
.hero-main h2 { font-size: 1.6rem; margin: 6px 0; }
.hero-main p { color: #d6dbe6; margin: 0; }
.hero-side { display: flex; flex-direction: column; gap: 10px; }
.news-row { display: flex; gap: 12px; padding: 10px; border-radius: var(--radius-sm); cursor: pointer; }
.news-row:hover { background: var(--card-2); color: inherit; }
.news-row img { width: 108px; height: 68px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: var(--card-2); }
.news-row h3 { font-size: .95rem; margin-bottom: 4px; }
.news-row .meta { font-size: .76rem; color: var(--muted); }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.news-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: transform .15s, border-color .15s; }
.news-card:hover { transform: translateY(-2px); border-color: var(--line-2); color: inherit; }
.news-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--card-2); }
.news-card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.news-card h3 { font-size: 1rem; }
.news-card p { color: var(--text-2); font-size: .87rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card .meta { margin-top: auto; font-size: .76rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.tag { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; gap: 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { background: var(--card-2); color: inherit; }

/* article reader */
.reader { max-width: 760px; margin: 0 auto; }
.reader h1 { font-size: 2rem; margin: 8px 0 10px; }
.reader .lede { font-size: 1.1rem; color: var(--text-2); }
.reader .hero-img { width: 100%; border-radius: var(--radius); margin: 14px 0; }
.story { font-size: 1.06rem; line-height: 1.75; }
.story p { margin: 0 0 1.1em; }
.story img { width: 100%; border-radius: 10px; margin: 8px 0; }
.story a { color: var(--accent); }
.story h2, .story h3 { margin: 1.4em 0 .6em; }
.story table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 1em 0; }
.story td, .story th { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.story blockquote { border-left: 3px solid var(--accent); margin: 1em 0; padding: 4px 16px; color: var(--text-2); }

/* ------------------------------------------------------------ scores */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.datebar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; max-width: 100%; min-width: 0; }
.daystrip { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1 1 0; }
.day { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 5px 10px; text-align: center; cursor: pointer; min-width: 58px; }
.day .d1 { font-size: .68rem; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.day .d2 { font-weight: 750; font-size: .9rem; }
.day.active { border-color: var(--accent); background: var(--accent-soft); }
.day.has { box-shadow: inset 0 -2px 0 var(--line-2); }
.scores-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.game-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; transition: border-color .15s, transform .15s; display: flex; flex-direction: column; gap: 8px; }
.game-card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.game-card.is-live { border-color: color-mix(in srgb, var(--live) 55%, var(--line)); }
.game-card.mine { box-shadow: inset 3px 0 0 var(--accent); }
.gc-status { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; font-weight: 700; color: var(--text-2); }
.gc-team { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; }
.gc-team img { width: 28px; height: 28px; object-fit: contain; }
.gc-team .nm { font-weight: 700; display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.gc-team .nm span.n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-team .rk { font-size: .72rem; color: var(--muted); font-weight: 700; }
.gc-team .rec { font-size: .74rem; color: var(--muted); font-weight: 500; }
.gc-team .sc { font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.gc-team.loser { opacity: .55; }
.gc-foot { display: flex; justify-content: space-between; gap: 8px; font-size: .76rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 7px; }
.gc-foot .odds { color: var(--text-2); font-weight: 600; }
.spoiler .sc { filter: blur(6px); }
.situation { font-size: .78rem; color: var(--warn); font-weight: 650; }
.field-event .fe-row { display: grid; grid-template-columns: 28px 24px 1fr auto; gap: 8px; align-items: center; padding: 4px 0; font-size: .9rem; }
.field-event .fe-row img { width: 22px; height: 15px; object-fit: cover; border-radius: 2px; }
.group-title { margin: 22px 0 10px; display: flex; align-items: center; gap: 10px; }
.group-title h2 { font-size: 1rem; }

/* game page */
.game-hero { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; position: relative; overflow: hidden; }
.game-hero .gh-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; position: relative; }
.gh-team { display: flex; align-items: center; gap: 14px; }
.gh-team.home { flex-direction: row-reverse; text-align: right; }
.gh-team img { width: 72px; height: 72px; object-fit: contain; }
.gh-team .nm { font-size: 1.25rem; font-weight: 800; }
.gh-team .score { font-size: 2.6rem; font-weight: 900; font-variant-numeric: tabular-nums; margin: 0 8px; }
.gh-mid { text-align: center; }
.gh-mid .st { font-weight: 800; font-size: 1rem; }
table.data.linescore { width: auto; min-width: 320px; margin: 16px auto 0; }
.wp-chart { width: 100%; height: 150px; }

/* ------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
table.data th { text-align: right; font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--card); position: sticky; top: 0; }
table.data td { text-align: right; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th:first-child, table.data td:first-child, table.data .left { text-align: left; }
table.data tbody tr:hover { background: var(--card-2); }
table.data tr.me { background: var(--accent-soft); }
table.data th.sortable { cursor: pointer; }
table.data th.sorted { color: var(--accent); }
table.data td.team-cell { display: flex; align-items: center; gap: 9px; min-width: 180px; }
table.data td.team-cell img { width: 24px; height: 24px; object-fit: contain; flex-shrink: 0; }
table.data td.team-cell .hs { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--card-2); }
table.data td.sticky { position: sticky; left: 0; background: var(--card); z-index: 1; }
table.data tr:hover td.sticky { background: var(--card-2); }
.rank-num { color: var(--muted); font-weight: 700; width: 26px; display: inline-block; }
.note-dot { width: 4px; align-self: stretch; border-radius: 2px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .78rem; color: var(--text-2); padding: 10px 16px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ------------------------------------------------------------ team page */
.team-hero { border-radius: var(--radius); padding: 24px; margin-bottom: 16px; color: #fff; position: relative; overflow: hidden; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.team-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, rgba(0,0,0,.05), rgba(0,0,0,.45)); pointer-events: none; }
.team-hero > * { position: relative; z-index: 1; }
.team-hero img.logo { width: 96px; height: 96px; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(0,0,0,.35)); }
.team-hero h1 { font-size: 2rem; }
.team-hero .sub { opacity: .9; font-weight: 600; }
.team-hero .btn { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.35); color: #fff; }
.team-hero .btn.following { background: #fff; color: #111; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.tile { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.tile .k { font-size: .72rem; color: var(--muted); font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.tile .v { font-size: 1.35rem; font-weight: 850; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tile .s { font-size: .76rem; color: var(--text-2); }
.player-chip { display: flex; align-items: center; gap: 10px; }
.player-chip img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--card-2); flex-shrink: 0; }
.player-chip .n { font-weight: 700; line-height: 1.2; }
.player-chip .s { font-size: .78rem; color: var(--muted); }
.roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.roster-grid a { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); }
.roster-grid a:hover { border-color: var(--line-2); }

/* ------------------------------------------------------------ fantasy */
.insight { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); border-left: 4px solid var(--muted); }
.insight.high { border-left-color: var(--bad); }
.insight.medium { border-left-color: var(--warn); }
.insight.low { border-left-color: var(--info); }
.insight .ic { font-size: 1.15rem; line-height: 1.3; }
.insight h4 { font-size: .95rem; margin-bottom: 2px; }
.insight p { margin: 0; color: var(--text-2); font-size: .86rem; }
.meter { height: 8px; border-radius: 99px; background: var(--card-2); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.wp-gauge { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; }
.wp-gauge .bar { grid-column: 1 / -1; height: 12px; border-radius: 99px; background: var(--card-2); overflow: hidden; display: flex; }
.wp-gauge .bar i:first-child { background: var(--good); }
.wp-gauge .bar i:last-child { background: var(--bad); opacity: .65; }
.lineup-row { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.lineup-row:last-child { border-bottom: 0; }
.slot { font-size: .72rem; font-weight: 850; color: var(--muted); text-align: center; background: var(--card-2); border-radius: 6px; padding: 4px 0; }
.proj { font-weight: 800; font-variant-numeric: tabular-nums; }
.proj small { display: block; font-size: .7rem; color: var(--muted); font-weight: 600; text-align: right; }
.inj { font-size: .68rem; font-weight: 850; padding: 1px 5px; border-radius: 4px; background: var(--bad-soft); color: var(--bad); margin-left: 4px; }
.inj.Questionable { background: var(--warn-soft); color: var(--warn); }
.match-lbl { font-size: .7rem; font-weight: 800; }
.match-Great { color: var(--good); }
.match-Tough { color: var(--bad); }
.match-Neutral { color: var(--muted); }
.vbar { display: inline-block; width: 70px; height: 6px; border-radius: 9px; background: var(--card-2); vertical-align: middle; margin-left: 8px; overflow: hidden; }
.vbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.tier-row td { background: var(--card-2); font-size: .72rem !important; font-weight: 850; color: var(--accent) !important; text-transform: uppercase; letter-spacing: .08em; padding: 5px 10px !important; }
.pick-list { display: flex; flex-direction: column; gap: 8px; }
.pick { display: flex; align-items: center; gap: 10px; background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.pick.winner { border-color: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.search-pop { position: relative; }
.search-results { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); background: var(--card); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow); max-height: 300px; overflow-y: auto; }
.search-results button { display: flex; width: 100%; gap: 8px; align-items: center; padding: 8px 12px; border: 0; background: none; text-align: left; cursor: pointer; }
.search-results button:hover, .search-results button.hl { background: var(--card-2); }
.trade-side { min-height: 120px; }
.verdict { font-size: 1.4rem; font-weight: 900; }
.verdict.win { color: var(--good); }
.verdict.lose { color: var(--bad); }
.verdict.fair { color: var(--info); }
.callout { padding: 16px; border-radius: var(--radius); background: linear-gradient(135deg, var(--accent-soft), transparent); border: 1px solid var(--line); }

/* ------------------------------------------------------------ my teams */
.team-card { overflow: hidden; display: flex; flex-direction: column; }
.team-card .tc-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: #fff; position: relative; }
.team-card .tc-head::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent, rgba(0,0,0,.4)); }
.team-card .tc-head > * { position: relative; z-index: 1; }
.team-card .tc-head img { width: 44px; height: 44px; object-fit: contain; }
.team-card .tc-games { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.team-card .tc-games > div { padding: 10px 16px; }
.team-card .tc-games > div + div { border-left: 1px solid var(--line); }

/* ------------------------------------------------------------ misc */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty h3 { color: var(--text); margin-bottom: 6px; }
.skeleton { background: linear-gradient(90deg, var(--card) 25%, var(--card-2) 50%, var(--card) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }
.loading { display: grid; gap: 14px; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-box { padding: 14px 16px; border-radius: 12px; background: var(--bad-soft); color: var(--bad); font-weight: 600; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(5, 8, 14, .66); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { background: var(--card); border: 1px solid var(--line-2); border-radius: 18px; width: min(440px, 100%); max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.modal.wide { width: min(860px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 20px; }
@keyframes fade { from { opacity: 0; } }

#toast-root { position: fixed; bottom: 88px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 650; box-shadow: var(--shadow); animation: fade .2s; }
.toast.error { background: var(--bad); color: #fff; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.play { padding: 8px 16px; border-bottom: 1px solid var(--line); font-size: .88rem; display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; }
.play.scoring { background: var(--good-soft); }
.play .clk { color: var(--muted); font-size: .78rem; font-weight: 700; }
details.drive { border-bottom: 1px solid var(--line); }
details.drive summary { padding: 10px 16px; cursor: pointer; display: flex; align-items: center; gap: 10px; list-style: none; }
details.drive summary::-webkit-details-marker { display: none; }
details.drive[open] summary { background: var(--card-2); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
  .layout-main, .layout-main.wide-side { grid-template-columns: minmax(0, 1fr); }
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .cols-3 { grid-template-columns: minmax(0, 1fr); }
  .mainnav { display: none; }
  .topbar-inner { justify-content: space-between; }
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    background: color-mix(in srgb, var(--bg-2) 94%, transparent); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; font-weight: 700; color: var(--muted); padding: 4px 0; }
  .tabbar a svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a.active { color: var(--accent); }
}
@media (max-width: 640px) {
  #app { padding: 14px 12px 32px; }
  h1 { font-size: 1.4rem; }
  .cols-2, .cols-4 { grid-template-columns: minmax(0, 1fr); }
  .scores-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-main { min-height: 260px; }
  .hero-main h2 { font-size: 1.25rem; }
  .gh-team img { width: 44px; height: 44px; }
  .gh-team .nm { font-size: .95rem; }
  .gh-team .score { font-size: 1.8rem; }
  .game-hero { padding: 14px; }
  .team-hero img.logo { width: 64px; height: 64px; }
  .team-hero h1 { font-size: 1.4rem; }
  .reader h1 { font-size: 1.5rem; }
}
@media (max-width: 640px) {
  .datebar { width: 100%; flex-wrap: nowrap; }
  .datebar input[type=date], .datebar .btn { display: none; }
  .toolbar > select { flex: 1 1 100%; }
  .page-head .seg { width: 100%; }
}
body { overflow-x: hidden; }
