/* DailyHoops — a gym at night. The court carries the colour; the chrome around
   it is quiet graphite with one accent (the ball's orange).
   Spacing sits on a 4px grid. Design pass follows "unslop" by Damir Sokolovsky
   (@heydamir, CC BY 4.0). */
:root {
  color-scheme: dark;
  --deep: #0f0f10; --bg: #141415; --card: #19191b; --raised: #232325;
  --line: rgba(237, 237, 237, .08); --line-2: rgba(237, 237, 237, .14);
  --text: #ededed; --text-2: #a1a1a6; --text-3: #85858b;
  --accent: #f26a1b; --good: #4cc38a; --bad: #e5676b;
  --team: #e63946;
  --sans: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text); font: 400 15px/22px var(--sans); }
h1, h2, p, ol, dl, dd { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---- Header ---- */
.top { width: 100%; max-width: 1008px; margin: 0 auto; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-size: 18px; font-weight: 600; line-height: 1; }
.logo svg { display: block; }
nav { display: flex; gap: 4px; }
nav a, nav button {
  height: 32px; display: inline-flex; align-items: center; padding: 0 12px; border: 0; border-radius: 8px; background: none;
  color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 500;
  transition: color 150ms var(--ease), background-color 150ms var(--ease);
}
nav a:hover, nav button:hover { color: var(--text); background: var(--card); }
nav a.active { color: var(--text); background: var(--raised); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }

body { display: flex; flex-direction: column; }
main { width: 100%; max-width: 1008px; margin: 0 auto; padding: 0 24px 64px; flex: 1; }
.note { padding: 8px 0 16px; color: var(--text-2); } .note a { color: var(--text); }

/* ---- Game panel: scoreboard, court, scorebook ---- */
.game { border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; animation: rise 420ms var(--ease) backwards; }
/* Score bug, in the manner of a broadcast graphic: a coloured block per side
   with code, badge and score, and a dark centre panel for the level. */
.bug { --wide: "wdth" 75; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); background: #0b0b0c; text-transform: uppercase; }
.bug-side { position: relative; display: flex; align-items: center; gap: 12px; height: 72px; padding-right: 20px; background: linear-gradient(var(--c), color-mix(in srgb, var(--c) 82%, #000)); color: var(--ink); }
.bug-side.you { --c: var(--p-jersey, #f7f7fb); --ink: var(--p-ink, #0f0f10); }
.bug-side.opp { --c: var(--opp); --ink: var(--opp-ink); flex-direction: row-reverse; padding: 0 0 0 20px; }
.abbr { align-self: stretch; width: 32px; display: grid; place-items: center; background: rgba(0, 0, 0, .3); color: #fff; writing-mode: vertical-rl; font: 800 15px/1 var(--sans); font-variation-settings: var(--wide); letter-spacing: .06em; }
.bug-side.you .abbr { transform: rotate(180deg); }
.crest { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #0f0f10; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
.crest svg { width: 34px; height: 34px; display: block; }
.crest.badge { font: 800 24px/1 var(--sans); font-variation-settings: "wdth" 75; }
.pts { font: 800 56px/1 var(--sans); font-variation-settings: "wdth" 75; font-variant-numeric: tabular-nums; }
.bug-side.you .pts { margin-left: auto; } .bug-side.opp .pts { margin-right: auto; }
.bug-mid { min-width: 168px; padding: 0 20px; display: grid; align-content: center; justify-items: center; gap: 4px; background: #16161a; color: var(--text); }
.bug-mid b { font: 800 24px/1 var(--sans); font-variation-settings: "wdth" 75; letter-spacing: .02em; }
.bug-mid span { font: 600 12px/16px var(--sans); letter-spacing: .08em; color: var(--accent); }
.bug-foot { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; padding: 4px 16px; background: #232325; font: 600 11px/16px var(--sans); letter-spacing: .08em; color: var(--text-2); white-space: nowrap; }
.bug-foot span { overflow: hidden; text-overflow: ellipsis; } .bug-foot span:last-child { text-align: right; }
/* Scoring graphic: "+3" pops up beside the score and a slanted stamp calls the make. */
.pops { position: absolute; right: 96px; top: 50%; translate: 0 -50%; display: flex; align-items: center; gap: 8px; pointer-events: none; z-index: 2; }
.pop { padding: 2px 10px; border-radius: 6px; background: #ffd23f; color: #0f0f10; font: 800 26px/1.1 var(--sans); font-variation-settings: "wdth" 75; box-shadow: 0 3px 0 rgba(0, 0, 0, .35); animation: pop 1.4s var(--ease) both; }
.stamp { padding: 3px 12px; background: #0f0f10; color: #fff; border: 2px solid #fff; font: 800 20px/1.1 var(--sans); font-variation-settings: "wdth" 75; letter-spacing: .03em; transform: rotate(-8deg) skewX(-8deg); animation: stamp 1.4s var(--ease) both; }
@keyframes pop { 0% { opacity: 0; transform: translateY(14px) scale(.4) rotate(8deg); } 14% { opacity: 1; transform: translateY(0) scale(1.18) rotate(6deg); } 24%, 78% { opacity: 1; transform: scale(1) rotate(6deg); } 100% { opacity: 0; transform: translateY(-14px) scale(1) rotate(6deg); } }
@keyframes stamp { 0% { opacity: 0; transform: scale(2) rotate(-8deg) skewX(-8deg); } 12%, 80% { opacity: 1; transform: scale(1) rotate(-8deg) skewX(-8deg); } 100% { opacity: 0; transform: scale(1) rotate(-8deg) skewX(-8deg); } }

/* The "Final" graphic on the end card. */
.fin { display: grid; grid-template-columns: 1fr 1fr; text-transform: uppercase; background: #0b0b0c; }
.fin-head { grid-column: 1 / -1; display: flex; justify-content: center; align-items: center; gap: 8px; padding: 8px; background: #1c1c20; color: var(--text) !important; font: 800 16px/1 var(--sans); font-variation-settings: "wdth" 75; letter-spacing: .1em; }
.fin-head svg { width: 16px; height: 16px; } .fin-head span { font: 600 11px/1 var(--sans); letter-spacing: .08em; color: var(--text-3); }
.fin-side { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; background: linear-gradient(var(--c), color-mix(in srgb, var(--c) 78%, #000)); color: var(--ink); border-bottom: 3px solid transparent; }
.fin-side.you { --c: var(--p-jersey, #f7f7fb); --ink: var(--p-ink, #0f0f10); } .fin-side.opp { --c: var(--opp); --ink: var(--opp-ink); }
.fin-side.won { border-bottom-color: #ffd23f; }
.fin-side .pts { font-size: 64px; } .fin-side .crest { width: 56px; height: 56px; } .fin-side .crest svg { width: 44px; height: 44px; } .fin-side .crest.badge { font-size: 30px; }
.fin-name { display: grid; justify-items: center; gap: 2px; padding: 8px; background: color-mix(in srgb, var(--c) 70%, #000); color: var(--ink); }
.fin-name.you { --c: var(--p-jersey, #f7f7fb); --ink: var(--p-ink, #0f0f10); } .fin-name.opp { --c: var(--opp); --ink: var(--opp-ink); }
.fin-name b { font: 800 18px/1 var(--sans); font-variation-settings: "wdth" 75; letter-spacing: .08em; } .fin-name span { font: 600 11px/1 var(--sans); letter-spacing: .08em; opacity: .8; }
.fin-stats { display: grid; gap: 4px; padding: 12px 24px; font: 500 13px/20px var(--sans); color: var(--text); }
.fin-stats + .fin-stats { border-left: 1px solid var(--line); }
.fin-stats div { display: flex; gap: 8px; } .fin-stats dt { font-weight: 800; font-variation-settings: "wdth" 75; letter-spacing: .04em; } .fin-stats dd { text-transform: none; color: var(--text-2); }

.stage { position: relative; background: var(--deep); border-block: 1px solid var(--line); }
canvas { display: block; width: 100%; aspect-ratio: 3 / 2; touch-action: none; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; cursor: grab; user-select: none; -webkit-user-select: none; }
canvas:active { cursor: grabbing; }

.camera { position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(15, 15, 16, .88); font-size: 12px; line-height: 16px; color: var(--text-2); }
.camera input { width: 120px; accent-color: var(--accent); }
.camera output { width: 32px; font-family: var(--mono); color: var(--text); }
.camera button { height: 32px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); font-size: 13px; font-weight: 500; transition: background-color 150ms var(--ease); }
.camera button:hover { background: #2c2c2f; }
.camera svg { color: var(--text-2); }

.overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(15, 15, 16, .84); overflow: auto; }
.overlay[hidden] { display: none; }
.card { width: min(100%, 416px); border: 1px solid var(--line-2); border-radius: 16px; background: var(--card); overflow: hidden; text-align: left; animation: rise 360ms var(--ease) both; }
.card .band { height: 104px; padding: 16px 24px; }
.card .band .mascot { font-size: 28px; line-height: 32px; }
.card .band .city { font-size: 14px; line-height: 20px; }
.card.wide { width: min(100%, 760px); }
.card.wide .card-body { padding-top: 20px; }
.final-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); align-items: center; }
.map { margin: 0; padding: 8px 24px 24px 0; display: grid; gap: 8px; }
.map svg { display: block; width: 100%; height: auto; border-radius: 8px; }
.map figcaption { display: flex; gap: 16px; font-size: 12px; line-height: 16px; color: var(--text-3); }
.map figcaption span { display: flex; align-items: center; gap: 8px; }
.map i { width: 10px; height: 10px; border-radius: 50%; }
.map i.made { background: #f26a1b; } .map i.missed { background: #5b7cff; opacity: .7; }
.card-body { display: grid; gap: 16px; justify-items: start; padding: 8px 24px 24px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.meta { font-family: var(--mono); font-size: 12px; line-height: 16px; color: var(--text-3); }
.card h1 { font-size: 32px; line-height: 36px; font-weight: 500; letter-spacing: -.01em; text-wrap: balance; }
.card h1.win { color: var(--good); }
.card p { color: var(--text-2); text-wrap: pretty; }
.card p b { color: var(--text); font-weight: 500; }
.card .blurb { color: var(--text); }
.final { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 32px; line-height: 1; font-weight: 500; color: var(--text) !important; }
.final span { color: var(--text-3); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { height: 40px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--raised); font-size: 14px; font-weight: 500; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); transition: background-color 150ms var(--ease), transform 150ms var(--ease); }
.btn:hover { background: #2c2c2f; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--text); border-color: var(--text); color: var(--deep); }
.btn.primary:hover { background: #fff; }

.stats { display: flex; gap: 32px; }
.stats dt { font-size: 12px; line-height: 16px; color: var(--text-3); }
.stats dd { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 24px; line-height: 32px; font-weight: 500; }

/* Scorebook row: one box per shot, makes circled, misses struck. */
.book { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.book li { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 6px; background: var(--raised); font-family: var(--mono); font-size: 13px; color: var(--text-3); }
.book li span { width: 24px; height: 24px; display: grid; place-items: center; border: 1.5px solid transparent; border-radius: 50%; }
.book li.now { color: var(--text); box-shadow: inset 0 0 0 1.5px var(--accent); }
.book li.ot { width: auto; padding: 0 4px; font-family: var(--sans); font-weight: 800; font-variation-settings: "wdth" 75; font-size: 12px; } .book li.ot span { width: 28px; }
.bug.in-ot .bug-mid b { color: #ffd23f; } .bug.in-ot .bug-mid { background: #2a2208; }
.book li.make { color: var(--text); }
.book li.make span { border-color: var(--good); }
.book li.new span { animation: mark 320ms var(--ease) both; }
@keyframes mark { from { opacity: 0; transform: scale(.7); } }
.book li.miss { text-decoration: line-through; text-decoration-color: var(--bad); }
.strip { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 16px 24px; }
.info { display: grid; gap: 4px; text-align: right; font-size: 14px; line-height: 20px; color: var(--text-2); }
.info b { color: var(--text); font-weight: 500; }
.info span { font-family: var(--mono); font-size: 12px; line-height: 16px; color: var(--text-3); }

/* ---- Ticker: scores scrolling under the header ---- */
.ticker { width: 100%; max-width: 1008px; margin: 0 auto 12px; padding: 0 24px; display: flex; align-items: center; gap: 12px; font: 600 12px/28px var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }
.ticker:empty { display: none; }
.ticker-tag { flex: none; padding: 0 8px; border-radius: 4px; background: var(--accent); color: #0f0f10; font-weight: 800; font-variation-settings: "wdth" 75; line-height: 20px; }
.ticker-clip { flex: 1; min-width: 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.ticker-run { display: inline-flex; white-space: nowrap; animation: ticker 60s linear infinite; }
.ticker-run span { padding-right: 32px; } .ticker-run b { color: var(--text); font-weight: 700; }
@keyframes ticker { to { transform: translateX(-50%); } }
.pbp { flex-basis: 100%; min-height: 20px; font-size: 14px; line-height: 20px; color: var(--text-2); }

/* ---- Stats page ---- */
.statspage h2 { margin: 24px 0 12px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text-2); }
.cardrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 8px; }
.cardrow > div { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); display: grid; gap: 4px; align-content: start; }
.cardrow dt { font-size: 12px; line-height: 16px; color: var(--text-3); }
.cardrow dd { font: 800 36px/1 var(--sans); font-variation-settings: "wdth" 75; font-variant-numeric: tabular-nums; } .cardrow dd.word { font-size: 22px; line-height: 36px; }
.cardrow small { font-size: 12px; line-height: 16px; color: var(--text-3); }
.statgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.tbl th, .tbl td { padding: 8px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.tbl td { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--text-2); } .tbl tbody th { color: var(--text); }
.tbl thead th { font-size: 12px; color: var(--text-3); text-align: right; } .tbl thead th:nth-child(2) { text-align: left; }
.standings td:first-child { text-align: left; width: 32px; color: var(--text-3); }
.standings tr.you th, .standings tr.you td { color: var(--accent); font-weight: 600; }
.map.career { padding: 0; align-content: start; } .map.career h2 { margin-bottom: 4px; }
.awards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.awards li { padding: 12px; border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 2px; opacity: .45; }
.awards li.earned { opacity: 1; border-color: var(--accent); background: var(--card); }
.awards b { font-size: 14px; line-height: 20px; font-weight: 500; } .awards span { font-size: 12px; line-height: 16px; color: var(--text-3); }
.box { width: 100%; } .box summary { cursor: pointer; font-size: 13px; line-height: 20px; color: var(--text-2); }
.box table { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 12px; line-height: 16px; }
.box th, .box td { padding: 4px 8px 4px 0; text-align: left; border-bottom: 1px solid var(--line); color: var(--text-3); font-weight: 400; }
.box tr.in td { color: var(--text); } .box td:last-child, .box th:last-child { text-align: right; padding-right: 0; font-family: var(--mono); }
.tile.upcoming { opacity: .6; } .tile.upcoming .band { filter: saturate(.6); }

/* ---- Practice ---- */
.drill { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 24px 32px; padding: 20px 24px 24px; }
.drill h2 { margin-bottom: 12px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text-2); }
.drill-map svg { display: block; width: 100%; height: auto; border-radius: 8px; }
.drill-map .meta { margin-top: 8px; }
.spot { cursor: pointer; outline: none; }
.spot .dot { fill: #56565c; stroke: #0f0f10; stroke-width: 3; transition: fill 150ms var(--ease); }
.spot:hover .dot, .spot:focus-visible .dot { fill: #ededed; }
.spot.on .dot { fill: var(--accent); stroke: #ededed; }
.drill-side { display: grid; gap: 12px; align-content: start; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 32px; align-items: center; }
.chip { height: 32px; display: inline-flex; align-items: center; gap: 8px; padding: 0 8px 0 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--raised); font-size: 13px; font-weight: 500; }
.chip span { color: var(--text-3); font-size: 16px; line-height: 1; } .chip:hover span { color: var(--bad); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.toggle[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.practice .bug-side.opp .pts { margin: 0 auto 0 0; }

/* ---- Archive ---- */
.archive-head { display: flex; justify-content: space-between; align-items: end; gap: 16px 32px; flex-wrap: wrap; padding: 16px 0 8px; }
.archive h1, .statspage h1 { font-size: 32px; line-height: 36px; font-weight: 500; letter-spacing: -.01em; }
.archive-head p { margin-top: 8px; color: var(--text-2); }
.archive h2 { margin: 32px 0 12px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text-2); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); gap: 12px; }
.tile { display: grid; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); text-decoration: none; overflow: hidden; transition: background-color 150ms var(--ease), border-color 150ms var(--ease); }
.tile:hover { background: var(--raised); border-color: var(--line-2); }
.grid:first-of-type .tile:nth-child(-n+6) { animation: rise 420ms var(--ease) both; }
.grid:first-of-type .tile:nth-child(2) { animation-delay: 50ms; } .grid:first-of-type .tile:nth-child(3) { animation-delay: 100ms; }
.grid:first-of-type .tile:nth-child(4) { animation-delay: 150ms; } .grid:first-of-type .tile:nth-child(5) { animation-delay: 200ms; }
.grid:first-of-type .tile:nth-child(6) { animation-delay: 250ms; }
/* On hover the trim stripe along the cut thickens a touch. */
.band::before { transition: clip-path 180ms var(--ease); }
.tile:hover .band::before { clip-path: polygon(0 0, 100% 0, 100% 52%, 0 88%); }
/* The visitors' banner: their colour cut on a diagonal, edged with their trim. */
.band { position: relative; display: grid; width: 100%; align-content: start; gap: 0; height: 88px; padding: 12px 16px; background: var(--trim); color: var(--ink); clip-path: polygon(0 0, 100% 0, 100% 64%, 0 100%); }
.band::before { content: ""; position: absolute; inset: 0; background: var(--team); clip-path: polygon(0 0, 100% 0, 100% 56%, 0 92%); }
.band span { position: relative; }
.band .city { font-size: 12px; line-height: 16px; opacity: .8; }
.band .mascot { font-size: 20px; line-height: 24px; font-weight: 600; letter-spacing: -.01em; }
.tile .body { display: grid; gap: 8px; padding: 4px 16px 16px; }
.tile .when { display: flex; justify-content: space-between; gap: 8px; font-family: var(--mono); font-size: 12px; line-height: 16px; color: var(--text-3); }
.tile .result { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: var(--mono); font-size: 12px; line-height: 16px; color: var(--text-2); }
.tile .result b { font-weight: 400; }
.tile.won .result b { color: var(--good); font-weight: 500; }
.tile.lost .result b { color: var(--bad); font-weight: 500; }
.tile.tied .result b { color: var(--text); font-weight: 500; }
.tile .result svg { color: var(--text-3); }
.tile.locked .band { filter: grayscale(.7) brightness(.7); }
.dots { display: flex; gap: 2px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--text-3); }
.dots i.on { background: var(--good); border-color: var(--good); }

/* ---- Text pages and footer ---- */
.page { max-width: 640px; padding: 16px 0; display: grid; gap: 16px; animation: rise 420ms var(--ease) both; }
.page h1 { font-size: 32px; line-height: 36px; font-weight: 500; letter-spacing: -.01em; margin-bottom: 8px; }
.page h2 { margin-top: 16px; font-size: 18px; line-height: 24px; font-weight: 500; }
.page p { color: var(--text-2); text-wrap: pretty; }
.page b { color: var(--text); font-weight: 500; }
.page a { color: var(--text); text-decoration-color: var(--text-3); text-underline-offset: 3px; }
.page a:hover { text-decoration-color: var(--accent); }
.select { user-select: all; }
.page ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--text-2); }
/* The written guide under the game: what it is, what is in the way, common questions. */
.guide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.guide[hidden] { display: none; }
.guide h2 { margin-bottom: 12px; font-size: 18px; line-height: 24px; font-weight: 500; }
.guide p, .guide li, .guide dd { font-size: 14px; line-height: 22px; color: var(--text-2); text-wrap: pretty; }
.guide p + p { margin-top: 12px; }
.guide ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.guide dl { display: grid; gap: 4px; } .guide dt { font-size: 14px; line-height: 22px; font-weight: 500; } .guide dd { margin-bottom: 8px; }
.guide b { color: var(--text); font-weight: 500; }
.guide a { color: var(--text); text-decoration-color: var(--text-3); text-underline-offset: 3px; }
.foot { width: 100%; max-width: 1008px; margin: 0 auto; padding: 24px; display: flex; justify-content: space-between; align-items: center; gap: 8px 24px; flex-wrap: wrap; border-top: 1px solid var(--line); font-size: 13px; line-height: 20px; color: var(--text-3); }
.foot nav { margin-left: -12px; }
.foot nav a { font-size: 13px; }

/* ---- Ads: a slot has no size, label or spacing until Google fills it ---- */
.ad .ad-label { display: none; }
.ad ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.ad:has(ins[data-ad-status="filled"]) { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); }
.ad:has(ins[data-ad-status="filled"]) .ad-label { display: block; margin-bottom: 8px; font-size: 12px; line-height: 16px; color: var(--text-3); }

/* ---- Player look ---- */
.look { display: flex; gap: 24px; align-items: center; margin-bottom: 24px; }
.look-preview { width: 96px; flex: none; padding: 12px; border-radius: 12px; background: var(--deep); border: 1px solid var(--line); }
.look-rows { display: grid; gap: 16px; min-width: 0; }
.look fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.look legend { padding: 0; margin-bottom: 8px; font-size: 13px; line-height: 20px; color: var(--text-2); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 28px; height: 28px; padding: 0; border-radius: 8px; border: 1px solid var(--line-2); background: var(--c); cursor: pointer; transition: transform 150ms var(--ease); }
.swatch:active { transform: scale(.94); }
.swatch[aria-pressed="true"], .swatch.custom[data-on="true"] { outline: 2px solid var(--text); outline-offset: 2px; }
.swatch.custom { position: relative; display: block; background: conic-gradient(#e5484d, #f2a900, #4cc38a, #3a86ff, #b388ff, #e5484d); }
.swatch.custom[data-on="true"] { background: var(--c); }
.swatch.custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
@media (max-width: 600px) { .look { flex-direction: column; align-items: flex-start; gap: 16px; } .look-preview { width: 72px; padding: 8px; } }

dialog { width: min(480px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--card); color: var(--text); }
dialog::backdrop { background: rgba(15, 15, 16, .7); }
dialog h2 { margin-bottom: 16px; font-size: 20px; line-height: 28px; font-weight: 500; }
dialog ol { padding-left: 20px; display: grid; gap: 12px; color: var(--text-2); }
dialog p { margin: 16px 0 24px; color: var(--text-2); }
dialog b { color: var(--text); font-weight: 500; }
dialog a { color: var(--text); text-decoration-color: var(--text-3); text-underline-offset: 3px; }

@media (max-width: 600px) {
  .top { padding: 12px 16px; } main { padding: 0 0 48px; }
  .game { border-radius: 0; border-inline: 0; }
  .bug-side { height: 52px; gap: 6px; padding-right: 10px; } .bug-side.opp { padding-left: 10px; } .abbr { width: 22px; font-size: 12px; }
  .crest { width: 30px; height: 30px; } .crest svg { width: 23px; height: 23px; } .crest.badge { font-size: 17px; } .pts { font-size: 36px; }
  .bug-mid { min-width: 0; padding: 0 10px; } .bug-mid b { font-size: 15px; } .bug-mid span { font-size: 10px; letter-spacing: .04em; }
  .bug-foot { padding: 3px 10px; font-size: 9px; gap: 8px; } .pop { font-size: 18px; padding: 1px 6px; } .stamp { font-size: 13px; padding: 2px 6px; }
  .fin-side { padding: 8px 14px; } .fin-side .pts { font-size: 44px; } .fin-side .crest { width: 40px; height: 40px; } .fin-side .crest svg { width: 31px; height: 31px; } .fin-stats { padding: 8px 14px; font-size: 12px; } .pops { right: 58px; gap: 4px; }
  .strip { padding: 12px 16px; } .info { text-align: left; }
  .book li { width: 28px; height: 28px; } .book li span { width: 22px; height: 22px; }
  /* Phones: one scrolling row of full-height tabs, a taller court, and controls sized for thumbs. */
  .top { flex-wrap: nowrap; flex-direction: column; align-items: stretch; gap: 8px; padding-bottom: 8px; }
  .top nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 12px; } .top nav::-webkit-scrollbar { display: none; }
  .top nav a, .top nav button { flex: none; height: 40px; padding: 0 12px; font-size: 14px; white-space: nowrap; }
  canvas { aspect-ratio: 10 / 11; }
  .btn { min-height: 44px; } .chip { height: 40px; padding: 0 10px 0 14px; } .swatch { width: 36px; height: 36px; }
  button, .tile, nav a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  .foot nav a { height: 44px; }
  .final-grid { grid-template-columns: minmax(0, 1fr); } .map { padding: 0 16px 16px; max-width: 320px; }
  .overlay.is-final { position: fixed; z-index: 5; place-items: start center; background: rgba(15, 15, 16, .94); }
  /* Touch screens: the rotate control sits under the court at full width, with a long slider and big targets. */
  .camera { position: static; gap: 12px; padding: 8px 16px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: var(--card); font-size: 13px; }
  .camera label { display: none; } .camera input { flex: 1; width: auto; min-width: 0; height: 32px; } .camera output { width: 40px; text-align: right; }
  .camera button { height: 40px; padding: 0 12px; font-size: 13px; }
  .drill { grid-template-columns: minmax(0, 1fr); padding: 16px; } .drill-map svg { max-width: 300px; }
  .card-body { gap: 8px; padding: 4px 16px 16px; } .card .band { height: 72px; padding: 8px 16px; } .card .band .mascot { font-size: 20px; line-height: 24px; } .card h1 { font-size: 24px; line-height: 28px; } .card p { font-size: 13px; line-height: 20px; } .final { font-size: 24px; }
  .stats dd { font-size: 20px; line-height: 24px; } .btn { height: 44px; padding: 0 14px; }
  .archive, .page, .statspage { padding-inline: 16px; } .ticker { padding: 0 16px; margin-bottom: 8px; } .statgrid { grid-template-columns: minmax(0, 1fr); } .awards { grid-template-columns: minmax(0, 1fr); } .pbp { font-size: 13px; } .guide { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 32px; padding: 24px 16px 0; } .ad { margin-inline: 16px; } .foot { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { .ticker-run { animation: none; } .card, .game, .tile, .page, .book li span { animation: none !important; } .pop, .stamp { animation-duration: 1.4s; animation-timing-function: step-end; } * { transition: none !important; } }
