/* PCS Live: Game Day look (DESIGN.md) — light, crimson top bar with the crest, big text, 52px tap targets, no black areas. */
:root {
  --crimson: #BD2041; --crimson-dk: #8E1530; --crimson-soft: #FBECEF;
  --bg: #FAF7F2; --surface: #FFFFFF; --gray-soft: #F1ECE4; --line: #E8E1D6;
  --muted: #6B6560; --ink: #1E1A18; --icon-tint: #F6E9EC;
  --win: #2E7D4F; --warn: #9A6408; --bad: #B3261E;
  --se: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sa: "Libre Franklin", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --r-card: 18px; --r-btn: 12px;
  --shadow: 0 4px 18px rgba(80,40,30,.07);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--sa); font-size: 1.06rem; line-height: 1.5; }
a { color: var(--crimson); font-weight: 600; }
:focus-visible { outline: 3px solid var(--crimson); outline-offset: 2px; }
.wrap { max-width: 60rem; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
[hidden] { display: none !important; }

/* Top bar */
header.top { background: var(--crimson); color: #fff; padding-top: env(safe-area-inset-top); }
header.top .wrap { display: flex; align-items: center; gap: .8rem; min-height: 68px; flex-wrap: wrap; }
.seal { width: 46px; height: 46px; border-radius: 50%; background: #fff; border: 3px solid #fff; display: grid; place-items: center; flex: none; }
.seal img { width: 40px; height: 40px; }
.brand { flex: 1; min-width: 10rem; color: #fff; text-decoration: none; }
.brand b { font-family: var(--se); font-size: 1.6rem; font-weight: 700; display: block; line-height: 1.05; }
.brand span { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; opacity: .92; }
nav.tabs { display: flex; gap: .35rem; flex-wrap: wrap; padding-block: .4rem; }
nav.tabs a { color: #fff; text-decoration: none; font-weight: 700; font-size: .95rem; min-height: 44px; padding: 0 .9rem; border-radius: var(--r-btn); display: inline-flex; align-items: center; }
nav.tabs a:hover { background: rgba(255,255,255,.14); }
nav.tabs a[aria-current="page"] { background: #fff; color: var(--crimson); }

main { padding-block: 1.3rem 3rem; display: grid; gap: 1.3rem; }
h1, h2 { font-family: var(--se); font-weight: 700; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 6vw, 2.8rem); }
h2 { font-size: 1.75rem; margin-bottom: .7rem; }
.card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 1.2rem 1.25rem; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.kicker { font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--crimson); margin: 0 0 .3rem; }

/* Buttons and pills */
.btn { font: inherit; font-weight: 700; min-height: 52px; padding: 0 1.1rem; border-radius: var(--r-btn); border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; text-decoration: none; }
.btn.primary { background: var(--crimson); color: #fff; }
.btn.primary:hover { background: var(--crimson-dk); }
.btn.quiet { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); border: 1px solid var(--line); }
.btn.link { background: var(--crimson-soft); color: var(--crimson); }
.btn.sm { min-height: 44px; font-size: .92rem; padding: 0 .9rem; }
.pill { display: inline-block; border-radius: 999px; padding: .15rem .7rem; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; vertical-align: .1em; }
.pill.live { background: var(--crimson); color: #fff; }
.pill.win { background: #E6F2EA; color: var(--win); }
.pill.off { background: var(--gray-soft); color: var(--muted); }

/* Player */
.player { aspect-ratio: 16 / 9; width: 100%; max-width: 100%; border-radius: var(--r-btn); overflow: hidden; background: var(--gray-soft); display: grid; place-items: center; text-align: center; }
.player iframe { width: 100%; height: 100%; border: 0; display: block; }
.player .idle { padding: 1.5rem; display: grid; gap: .6rem; justify-items: center; }
.player .idle b { font-family: var(--se); font-size: 1.7rem; }
.livehead { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .8rem; margin-bottom: .8rem; }
.livehead h1 { font-size: clamp(1.7rem, 5vw, 2.3rem); }

/* Game rows */
.dayhead { font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 1rem 0 .2rem; }
.dayhead:first-child { margin-top: 0; }
.game { display: grid; grid-template-columns: 4rem 1fr auto; gap: .9rem; align-items: center; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.game:last-child { border-bottom: 0; }
.cal { border-radius: var(--r-btn); overflow: hidden; text-align: center; background: var(--gray-soft); }
.cal i { display: block; background: var(--crimson); color: #fff; font-style: normal; font-size: .7rem; font-weight: 800; letter-spacing: .1em; padding: .15rem 0; }
.cal b { display: block; font-family: var(--se); font-size: 1.6rem; line-height: 1.3; }
.opp { font-family: var(--se); font-size: 1.35rem; font-weight: 700; line-height: 1.15; }
.meta { font-size: .92rem; color: var(--muted); }
.right { text-align: right; display: grid; gap: .3rem; justify-items: end; }
.score { font-family: var(--se); font-size: 1.4rem; font-weight: 700; }

/* Filters and replay grid */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: .7rem; align-items: end; }
.filters label { min-width: 0; display: grid; gap: .25rem; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.filters select { width: 100%; min-width: 0; font: inherit; font-size: 1rem; color: var(--ink); min-height: 52px; border-radius: var(--r-btn); border: 1px solid var(--line); background: var(--surface); padding: 0 .7rem; text-transform: none; letter-spacing: 0; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chips button { font: inherit; font-weight: 700; font-size: .92rem; min-height: 44px; padding: 0 1rem; border-radius: var(--r-btn); border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--crimson); border-color: var(--crimson); color: #fff; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; }
.replay { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow); overflow: hidden; text-align: left; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; display: grid; }
.replay img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--gray-soft); }
.replay div { padding: .8rem 1rem 1rem; display: grid; gap: .15rem; }
.replay .opp { font-size: 1.2rem; }
.replay[aria-current="true"] { outline: 3px solid var(--crimson); outline-offset: 2px; }

@media (max-width: 34rem) {
  .game { grid-template-columns: 3.6rem 1fr; }
  .game .right { grid-column: 2; justify-items: start; text-align: left; }
}

/* Layout v2: watch page */
.watchgrid { display: grid; gap: 1.3rem; align-items: start; }
@media (min-width: 62rem) { .watchgrid { grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr); } }
.scorebar { margin-top: .8rem; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .8rem; background: var(--crimson-soft); border-radius: var(--r-btn); padding: .7rem 1rem; }
.scorebar .side { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.scorebar .them { justify-content: flex-end; text-align: right; }
.scorebar b { font-weight: 700; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scorebar em { font-style: normal; font-family: var(--se); font-weight: 700; font-size: 2.2rem; line-height: 1; color: var(--crimson-dk); font-variant-numeric: tabular-nums; }
.scorebar .mid { font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--crimson); }
.upnext { display: grid; gap: .3rem; }
.upnext h2 { margin-bottom: .2rem; }
.nx { display: grid; grid-template-columns: 3.6rem 1fr; gap: .8rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.nx:last-child { border-bottom: 0; }
.nx.first .opp { font-size: 1.5rem; }
.count { margin-top: .3rem; font-size: .92rem; color: var(--crimson-dk); }
.count b { font-weight: 800; }

/* Layout v2: past streams */
.chiprow { display: grid; gap: .35rem; }
.chiprow > span { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.filters2 { display: grid; gap: .9rem; }
.replay { position: relative; }
.replay .thumb { position: relative; display: block; }
.replay .thumb::after { content: ""; position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(189, 32, 65, .92); box-shadow: var(--shadow); }
.replay .thumb::before { content: ""; position: absolute; left: 50%; top: 50%; margin: -11px 0 0 -6px; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff; z-index: 1; }
.replay:hover .thumb::after { background: var(--crimson-dk); }
.datebadge { position: absolute; left: .6rem; top: .6rem; z-index: 1; background: var(--surface); color: var(--ink); border-radius: 999px; padding: .15rem .6rem; font-size: .75rem; font-weight: 800; box-shadow: var(--shadow); }
@media (min-width: 62rem) { .grid { grid-template-columns: repeat(3, 1fr); } }
