/* The Game simulator (/markets/sim, templates/markets/sim.html), a
   full-screen workspace like the chart (markets-chart.css): the top bar over
   the games list, the stage of results and the settings panel. Terminal
   Light tokens, so the light theme follows. */
html:has(> body.gs-page), body.gs-page { height: 100%; margin: 0; background: var(--tl-page); color: var(--tl-ink); }
body.gs-page { font-family: var(--tl-font); -webkit-font-smoothing: antialiased; font-feature-settings: 'tnum', 'cv11'; overflow: hidden; }
:where(.gs-page) :where(button, input, select) { font: inherit; color: inherit; margin: 0; }
:where(.gs-page) :where(button) { cursor: pointer; background: none; border: 0; padding: 0; }
:where(.gs-page) :where(a) { color: inherit; text-decoration: none; }
.gs-page :is(a, button, input, select):focus-visible { outline: none; box-shadow: var(--tl-focus-ring); }
.gs-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.gs {
  height: 100vh; display: grid;
  grid-template-columns: 290px minmax(0, 1fr) 340px;
  grid-template-rows: 52px minmax(0, 1fr);
}
.gs.is-settings-closed { grid-template-columns: 290px minmax(0, 1fr) 0; }
.gs.is-settings-closed .gs-settings { display: none; }

/* ---- Top bar ---- */
.gs-top { grid-row: 1; grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 12px; border-bottom: 1px solid var(--tl-line-07); min-width: 0; overflow-x: auto; scrollbar-width: none; }
.gs-top::-webkit-scrollbar { display: none; }
.gs-home { display: grid; place-items: center; width: 30px; height: 30px; flex: none; }
.gs-home img { border-radius: 6px; }
.gs-name { flex: none; font-size: 14px; font-weight: 650; letter-spacing: -0.2px; }
.gs-tag { flex: none; padding: 2px 6px; border: 1px solid var(--tl-line-12); border-radius: var(--tl-r-tag); font: 500 10px var(--tl-mono); letter-spacing: .06em; color: var(--tl-ink-60); }
.gs-pick { display: none; align-items: center; gap: 8px; height: 32px; padding: 0 12px; flex: none; max-width: 300px; border-radius: var(--tl-r-btn); background: var(--tl-fill-05); font-size: 13.5px; font-weight: 600; }
.gs-pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-pick svg { color: var(--tl-ink-50); flex: none; }
.gs-pick-logos { display: inline-flex; gap: 2px; }
.gs-seg { display: inline-flex; flex: none; padding: 2px; border-radius: var(--tl-r-chip); background: var(--tl-fill-05); }
.gs-seg > button { height: 28px; padding: 0 11px; border-radius: var(--tl-r-seg-in, 5px); font-size: 12.5px; font-weight: 550; color: var(--tl-ink-60); white-space: nowrap; }
.gs-seg > button:hover { color: var(--tl-ink); }
.gs-seg > button[aria-pressed="true"] { background: var(--tl-control); color: var(--tl-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.gs-seg > button:disabled { opacity: .45; cursor: default; }
.gs-seg-full { display: flex; }
.gs-seg-full > button { flex: 1; }
.gs-seg > button.is-locked { display: inline-flex; align-items: center; justify-content: center; gap: 4px; color: var(--tl-ink-45); }
.gs-seg > button.is-locked:hover { color: var(--tl-ink-70); }
.gs-set-label { display: inline-flex; align-items: center; gap: 6px; }
.gs-help { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--tl-line-14); font-size: 9.5px; font-weight: 650; line-height: 1; color: var(--tl-ink-50); cursor: pointer; }
.gs-help:hover, .gs-help[aria-expanded="true"] { color: var(--tl-ink); border-color: var(--tl-ink-45); }
.gs-help-text { padding: 9px 11px; border-radius: 8px; background: var(--tl-fill-03); }
.gs-note a { color: var(--tl-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.gs-grow { flex: 1; }
.gs-icon { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: var(--tl-r-btn); color: var(--tl-ink-60); }
.gs-icon:hover, .gs-icon[aria-pressed="true"] { background: var(--tl-fill-06); color: var(--tl-ink); }
.gs-run { display: flex; align-items: center; gap: 8px; flex: none; font: 500 11px var(--tl-mono); color: var(--tl-ink-50); }
.gs-run[hidden] { display: none; }
.gs-run-bar { position: relative; width: 90px; height: 4px; border-radius: 2px; background: var(--tl-line-10); overflow: hidden; }
.gs-run-bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--tl-ink); transition: width .15s; }

/* ---- Panels ---- */
.gs-games, .gs-settings { grid-row: 2; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.gs-games { border-right: 1px solid var(--tl-line-07); }
.gs-settings { border-left: 1px solid var(--tl-line-07); }
.gs-panel-head { height: 44px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 14px 0 16px; border-bottom: 1px solid var(--tl-line-06); }
.gs-panel-head h2 { margin: 0; font-size: 13.5px; font-weight: 650; }
.gs-panel-sub { font-size: 12px; color: var(--tl-ink-50); }
.gs-panel-head .gs-link { margin-left: auto; }
.gs-games-list { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.gs-game { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; width: 100%; padding: 12px 16px; border-bottom: 1px solid var(--tl-line-05); text-align: left; }
.gs-game:hover { background: var(--tl-fill-03); }
.gs-game[aria-current="true"] { background: var(--tl-fill-06); box-shadow: inset 2px 0 0 var(--tl-ink); }
.gs-game-teams { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gs-game-team { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 14px; font-weight: 600; }
.gs-game-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-game-px { align-self: center; font: 600 12px var(--tl-mono); color: var(--tl-ink-60); font-variant-numeric: tabular-nums; text-align: right; }
.gs-game-px small { display: block; font-size: 10px; font-weight: 500; color: var(--tl-ink-45); }
.gs-game-when { grid-column: 1 / -1; padding-left: 30px; font: 500 11px var(--tl-mono); color: var(--tl-ink-50); }
.gs-logo { display: inline-block; flex: none; width: 20px; height: 20px; object-fit: contain; }
.gs-skel-rows { display: flex; flex-direction: column; gap: 1px; }
.gs-skel-rows i { height: 76px; background: linear-gradient(90deg, var(--tl-fill-03), var(--tl-fill-06), var(--tl-fill-03)); background-size: 200% 100%; animation: gs-shimmer 1.4s infinite; }
@keyframes gs-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---- Stage ---- */
.gs-stage { grid-row: 2; grid-column: 2; min-width: 0; min-height: 0; overflow-y: auto; scrollbar-width: none; }
.gs-stage::-webkit-scrollbar { display: none; }
.gs-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; max-width: 560px; margin: 12vh auto 0; padding: 0 24px; }
.gs-empty-k { font: 500 11px var(--tl-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--tl-ink-50); }
.gs-empty h1 { margin: 0; font-size: 28px; font-weight: 650; letter-spacing: -0.6px; line-height: 1.15; }
.gs-empty p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--tl-ink-60); }

.gs-match { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.gs-match-teams { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 650; letter-spacing: -0.4px; }
.gs-match-teams .gs-logo { width: 34px; height: 34px; }
.gs-match-at { font-size: 15px; font-weight: 500; color: var(--tl-ink-45); }
.gs-match-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font: 500 11.5px var(--tl-mono); color: var(--tl-ink-50); }
.gs-chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: var(--tl-r-chip); background: var(--tl-fill-05); font: 500 11px var(--tl-mono); color: var(--tl-ink-70); white-space: nowrap; }
.gs-chip.is-adj { background: color-mix(in srgb, var(--tl-up) 16%, transparent); color: var(--tl-up); }

.gs-card { border: 1px solid var(--tl-line-07); border-radius: var(--tl-r-card); background: var(--tl-card-body); box-shadow: var(--tl-card-shadow); min-width: 0; }
.gs-card-head { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; border-bottom: 1px solid var(--tl-line-06); }
.gs-card-head h2 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -0.2px; white-space: nowrap; }
.gs-card-head .gs-sub { font-size: 12px; color: var(--tl-ink-50); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-card-head .gs-spacer { flex: 1; }
.gs-card-body { padding: 16px 18px 18px; }
.gs-k { display: block; font: 500 10.5px var(--tl-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--tl-ink-50); }


/* The win chance bar: the two teams' split, the market's price marked */
.gs-bar { position: relative; grid-column: 1 / -1; height: 10px; border-radius: 5px; background: var(--tl-line-10); overflow: visible; }
.gs-bar-away, .gs-bar-home { position: absolute; top: 0; bottom: 0; }
.gs-bar-away { left: 0; border-radius: 5px 0 0 5px; background: var(--gs-away, var(--tl-ink-60)); }
.gs-bar-home { right: 0; border-radius: 0 5px 5px 0; background: var(--gs-home, var(--tl-ink)); }
.gs-bar-mark { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--tl-ink); box-shadow: 0 0 0 2px var(--tl-page); }
/* The key for the bar's mark in the line under it: Kalshi's price. */
.gs-mark-key { display: inline-block; width: 2px; height: 10px; margin-right: 6px; vertical-align: -1px; background: var(--tl-ink); }
/* Kalshi's price for the same line, under the simulated share (game-sim.js sumLine). */
.gs-tile-vs { display: inline-flex; align-items: center; font: 600 12px var(--tl-mono); color: var(--tl-ink-70); }
.gs-k-logo { width: 12px; height: 12px; margin-right: 5px; border-radius: 3px; vertical-align: -2px; }
.gs-bar-key { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 10px; font: 500 11px var(--tl-mono); color: var(--tl-ink-50); }

/* Distributions */
.gs-hist { position: relative; padding-top: 16px; }
.gs-hist svg { display: block; width: 100%; height: 220px; overflow: visible; }
.gs-hist-x { position: relative; height: 18px; margin-top: 4px; }
.gs-hist-x span { position: absolute; top: 2px; transform: translateX(-50%); font: 500 10.5px var(--tl-mono); color: var(--tl-ink-50); }
.gs-hist-x span:first-child { transform: none; }
.gs-hist-x span:last-child { transform: translateX(-100%); }
.gs-hist-mkt { position: absolute; top: 0; margin-left: 4px; font: 600 10.5px var(--tl-mono); color: var(--tl-up); white-space: nowrap; }
.gs-bin { cursor: crosshair; }
.gs-bin-hit { fill: transparent; }
.gs-bin.is-on .gs-bin-hit { fill: var(--tl-fill-05); }
.gs-bin.is-on .gs-dist-bar { opacity: 1; filter: brightness(1.15); }
.gs-tip { position: fixed; left: 0; top: 0; z-index: 60; display: flex; flex-direction: column; gap: 2px; padding: 7px 10px; border-radius: 8px; background: var(--tl-card-body); box-shadow: var(--tl-float-shadow), 0 0 0 1px var(--tl-line-10); font-size: 12.5px; pointer-events: none; white-space: nowrap; }
.gs-tip[hidden] { display: none; }
.gs-tip b { font-weight: 650; }
.gs-tip span { font: 500 11px var(--tl-mono); color: var(--tl-ink-60); }
.gs-dist .gs-dist-bar { fill: var(--tl-ink-45); }
.gs-dist .gs-dist-bar.is-hi { fill: var(--tl-ink); }
.gs-dist-team .gs-dist-bar { fill: var(--gs-away); opacity: .85; }
.gs-dist-team .gs-dist-bar.is-hi { fill: var(--gs-home); opacity: 1; }
.gs-dist .gs-dist-line { stroke: var(--tl-up); stroke-width: 1.5; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; pointer-events: none; }
.gs-dist-facts { display: flex; gap: 22px; margin-top: 12px; }
.gs-dist-facts b { display: block; font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }

/* Tables */
.gs-tabs { display: inline-flex; padding: 2px; border-radius: var(--tl-r-chip); background: var(--tl-fill-05); }
.gs-tabs > button { height: 26px; padding: 0 10px; border-radius: 5px; font-size: 12px; font-weight: 550; color: var(--tl-ink-60); }
.gs-tabs > button[aria-pressed="true"] { background: var(--tl-control); color: var(--tl-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.gs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.gs-table th { padding: 9px 12px; border-bottom: 1px solid var(--tl-line-06); font: 500 10.5px var(--tl-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--tl-ink-50); text-align: right; white-space: nowrap; background: var(--tl-fill-025); }
.gs-table th:first-child, .gs-table td:first-child { text-align: left; padding-left: 18px; }
.gs-table th:last-child, .gs-table td:last-child { padding-right: 18px; }
.gs-table td { padding: 9px 12px; border-bottom: 1px solid var(--tl-line-05); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gs-table tr:last-child td { border-bottom: 0; }
.gs-table tbody tr:hover td { background: var(--tl-fill-025); }
.gs-who { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.gs-who .gs-logo { width: 16px; height: 16px; }
.gs-who small { font-weight: 500; color: var(--tl-ink-50); }
.gs-num b { font-weight: 650; }
.gs-range { color: var(--tl-ink-50); font-size: 12px; }
.gs-delta { margin-left: 6px; font-size: 11.5px; font-weight: 600; }
.is-pos { color: var(--tl-up); }
.is-neg { color: var(--tl-down); }
.gs-gap { display: inline-block; min-width: 54px; padding: 2px 6px; border-radius: 5px; font-weight: 650; text-align: center; }
.gs-gap.is-pos { background: color-mix(in srgb, var(--tl-up) 14%, transparent); }
.gs-gap.is-neg { background: color-mix(in srgb, var(--tl-down) 14%, transparent); }
.gs-ex { width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; }
.gs-ex-px { display: inline-flex; gap: 10px; }
.gs-ex-px > span { display: inline-flex; align-items: center; gap: 4px; }
.gs-logo-pair { display: inline-flex; align-items: center; width: auto; height: 16px; gap: 0; }
.gs-logo-pair .gs-logo { width: 12px; height: 12px; }
.gs-logo-pair .gs-logo + .gs-logo { margin-left: -3px; }
/* The market card's two groups: the game's lines, then the player props */
.gs-mkt td:nth-child(2) { text-align: left; }
.gs-mkt th:nth-child(2) { text-align: left; }
.gs-mkt tr.gs-group td { padding-top: 9px; padding-bottom: 9px; border-top: 1px solid var(--tl-line-10); border-bottom: 1px solid var(--tl-line-06); background: var(--tl-fill-03); text-align: left; font: 600 10.5px var(--tl-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--tl-ink-70); }
.gs-mkt tr.gs-group td span { margin-left: 10px; font-weight: 500; letter-spacing: .03em; text-transform: none; color: var(--tl-ink-45); }
.gs-mkt tbody tr.gs-group:first-child td { border-top: 0; }
.gs-mkt tbody tr.gs-group:hover td { background: var(--tl-fill-03); }
.gs-scroll { overflow-x: auto; }
.gs-locked td { color: var(--tl-ink-50); text-align: left !important; }
.gs-locked td > a { font-weight: 650; color: var(--tl-ink); text-decoration: underline; text-underline-offset: 2px; }
.gs-note { margin: 0; font-size: 12px; line-height: 1.5; color: var(--tl-ink-50); }
.gs-label { padding: 0 2px; font-size: 12px; color: var(--tl-ink-50); }

/* Drives: the cast's game, every play (the one on the field highlighted) */
.gs-pbp-list { position: relative; max-height: 440px; overflow-y: auto; scrollbar-width: thin; }
.gs-drive { border-bottom: 1px solid var(--tl-line-06); }
.gs-drive:last-child { border-bottom: 0; }
.gs-drive-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 9px 18px; background: var(--tl-card-body); border-bottom: 1px solid var(--tl-line-05); font-size: 13px; }
.gs-drive-head .gs-logo { width: 18px; height: 18px; }
.gs-drive-res { font-weight: 650; }
.gs-drive.is-score .gs-drive-res { color: var(--tl-up); }
.gs-drive-meta { font: 500 11px var(--tl-mono); color: var(--tl-ink-50); }
.gs-drive-score { margin-left: auto; font: 600 12px var(--tl-mono); font-variant-numeric: tabular-nums; }
.gs-plays { margin: 0; padding: 4px 0 6px; list-style: none; }
.gs-play { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 12px; padding: 5px 18px; font-size: 13px; line-height: 1.45; }
.gs-play-sit { display: flex; gap: 10px; font: 500 11.5px var(--tl-mono); color: var(--tl-ink-50); white-space: nowrap; }
.gs-play-sit i { font-style: normal; color: var(--tl-ink-45); min-width: 58px; }
.gs-play-text { color: var(--tl-ink); }
.gs-play.is-score { background: color-mix(in srgb, var(--tl-up) 9%, transparent); }
.gs-play.is-score .gs-play-text b { color: var(--tl-up); }
.gs-play.is-turn { background: color-mix(in srgb, var(--tl-down) 8%, transparent); }
.gs-play[data-gs-i] { cursor: pointer; }
.gs-play[data-gs-i]:hover { background: var(--tl-fill-03); }
.gs-play.is-now { background: var(--tl-fill-08, var(--tl-fill-06)); box-shadow: inset 2px 0 0 var(--tl-ink); }
.gs-play.is-end { grid-template-columns: 1fr; padding: 6px 18px; font: 500 10.5px var(--tl-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--tl-ink-50); text-align: center; }
@media (max-width: 700px) {
  .gs-play { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .gs-drive-meta { display: none; }
}

/* ---- The band: the game page's header (pages/game.css), the views as tabs ---- */
.gs-band { padding: 20px 28px 0; }
.gs-band[hidden] { display: none; }
.gs-band .gp-band-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.gs-band .gp-back { font-size: 12.5px; color: var(--tl-ink-60); }
.gs-band .gp-back:hover { color: var(--tl-ink); }
.gs-band .gp-kicker { font-family: var(--tl-mono); font-size: 11px; letter-spacing: 0.5px; color: var(--tl-ink-45); }
.gs-band .gp-matchup { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 24px; padding: 4px 0 6px; }
.gs-band .gp-side { display: flex; align-items: center; gap: 18px; min-width: 0; }
.gs-band .gp-side.is-home { justify-content: flex-end; text-align: right; }
.gs-band .gp-team { display: flex; align-items: center; gap: 14px; min-width: 0; }
.gs-band .gp-side.is-home .gp-team { flex-direction: row-reverse; }
.gs-band .gp-crest-lg { width: 56px; height: 56px; }
.gs-band .gp-team-text { display: flex; flex-direction: column; min-width: 0; }
.gs-band .gp-team-meta { font-family: var(--tl-mono); font-size: 11px; color: var(--tl-ink-45); white-space: nowrap; }
.gs-band .gp-team-name { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-band .gp-score { margin-left: auto; font-size: 56px; font-weight: 300; letter-spacing: -2.2px; line-height: 1; font-variant-numeric: tabular-nums; }
.gs-band .gp-side.is-home .gp-score { margin-left: 0; margin-right: auto; }
.gs-band .gp-score.is-trailing { color: var(--tl-ink-45); }
.gs-band .gp-center { min-width: 120px; text-align: center; }
.gs-band .gp-state { font-size: 15px; font-weight: 600; white-space: nowrap; }
.gs-band .gp-tv { margin-top: 3px; font-family: var(--tl-mono); font-size: 11px; color: var(--tl-ink-50); white-space: nowrap; text-transform: uppercase; }
.gs-band .gp-band-foot { display: flex; align-items: center; gap: 8px; min-height: 22px; margin: 8px 0 10px; }
.gs-band .gp-band-foot[hidden] { display: none; }
.gs-band .gp-band-foot[hidden] + .tl-tabs { margin-top: 16px; }
.gs-band .gp-spacer { flex: 1; }
.gs-band .tl-status { font-family: var(--tl-mono); font-size: 11px; color: var(--tl-ink-50); }
/* Sized by the stage (between the two panels), not the window */
.gs-stage { container: gs-stage / inline-size; }
@container gs-stage (max-width: 1100px) {
  .gs-band .gp-score { font-size: 44px; letter-spacing: -1.6px; }
  .gs-band .gp-team-name { font-size: 19px; }
  .gs-band .gp-matchup { gap: 16px; }
  .gs-band .gp-side { gap: 14px; }
}
@container gs-stage (max-width: 700px) {
  .gs-band { padding: 16px 16px 0; }
  .gs-band .gp-matchup { gap: 10px; }
  .gs-band .gp-side { flex-direction: column; align-items: flex-start; gap: 8px; }
  .gs-band .gp-side.is-home { align-items: flex-end; }
  .gs-band .gp-side.is-home .gp-score { order: 2; }
  .gs-band .gp-team, .gs-band .gp-side.is-home .gp-team { flex-direction: column; align-items: inherit; gap: 6px; }
  .gs-band .gp-crest-lg { width: 40px; height: 40px; }
  .gs-band .gp-team-name { font-size: 16px; letter-spacing: -0.3px; white-space: normal; }
  .gs-band .gp-score { margin: 0; font-size: 34px; letter-spacing: -1.2px; }
  .gs-band .gp-side.is-home .gp-score { margin: 0; }
  .gs-band .gp-center { min-width: 0; }
}

/* ---- The body: widgets, like the game page's ---- */
.gs-canvas { container: gs-canvas / inline-size; display: flex; flex-direction: column; gap: 14px; padding: 18px 28px 40px; }
.gs-canvas .gs-label { margin: 0; }
.gs-view { gap: 14px; }

/* Overview: the stat strip, the two distributions side by side, then the tables */
.gs-ov-dists { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
@container gs-canvas (max-width: 640px) {
  .gs-ov-dists { grid-template-columns: minmax(0, 1fr); }
}

/* ---- The answer across every simulated game: four numbers ---- */
.gs-sum-row { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)); }
.gs-tile { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px 18px; border-left: 1px solid var(--tl-line-06); }
.gs-tile:first-child { border-left: 0; }
.gs-tile:not(.gs-tile-win) { align-items: center; justify-content: center; text-align: center; }
.gs-tile-big { white-space: nowrap; font-size: 26px; font-weight: 650; letter-spacing: -0.6px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.gs-tile-big { display: flex; align-items: center; gap: 7px; }
.gs-tile-big .gs-logo { width: 20px; height: 20px; }
.gs-tile-big i { margin: 0 -2px; font-style: normal; color: var(--tl-ink-45); font-weight: 500; }
.gs-tile-sub { font: 500 11px var(--tl-mono); color: var(--tl-ink-50); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-win-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 600; color: var(--tl-ink-70); }
.gs-tile-teams { display: flex; gap: 12px; }
.gs-tile-teams > span { display: inline-flex; align-items: center; gap: 5px; }
.gs-tile-teams .gs-logo { width: 14px; height: 14px; }
.gs-win-line > span { display: flex; align-items: center; gap: 7px; }
.gs-win-line .gs-logo { width: 20px; height: 20px; }
.gs-win-line b { font-size: 26px; font-weight: 650; letter-spacing: -0.6px; color: var(--tl-ink); font-variant-numeric: tabular-nums; }
.gs-tile-win .gs-bar { height: 8px; margin: 2px 0; }

/* ---- Two views: the overview of every simulated game, and one game's replay ---- */
.gs-view { display: flex; flex-direction: column; gap: 14px; }
.gs-view[hidden] { display: none; }
.gs-link { font-size: 12px; font-weight: 600; color: var(--tl-ink-60); }
.gs-link:hover { color: var(--tl-ink); }
.gs-dim { color: var(--tl-ink-35); }
.gs-rp-dock { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 14px; }
.gs-rp-dock > .gs-card { display: flex; flex-direction: column; min-height: 260px; max-height: 520px; }
.gs-rp-dock .gs-pbp, .gs-boxscore { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.gs-rp-dock .gs-pbp-list { max-height: none; height: 100%; }
@container gs-canvas (max-width: 760px) {
  .gs-rp-dock { grid-template-columns: minmax(0, 1fr); }
}
.gs-bs-team { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--tl-line-06); font-size: 14px; }
.gs-bs-team span { margin-left: auto; font: 500 11.5px var(--tl-mono); color: var(--tl-ink-50); }
.gs-bs-sec { border-bottom: 1px solid var(--tl-line-06); }
.gs-bs-sec:last-child { border-bottom: 0; }
.gs-bs-sec > .gs-k { padding: 12px 18px 4px; }
.gs-bs-sec > .gs-note { padding: 0 18px 12px; }
.gs-bs th:first-child { color: var(--tl-ink-70); }
.gs-bs td { padding-top: 7px; padding-bottom: 7px; }
.gs-rp-dock .gs-drive-head { flex-wrap: wrap; row-gap: 2px; }
.gs-rp-dock .gs-drive-meta { order: 5; flex-basis: 100%; padding-left: 26px; }
.gs-rp-dock .gs-play { grid-template-columns: minmax(0, 1fr); gap: 1px; padding: 6px 18px; }
.gs-pbp-list:not(.is-all) :is(.gs-play, .gs-drive).is-future { display: none; }
.gs-pbp-list:not(.is-all) .gs-drive.is-open :is(.gs-drive-res, .gs-drive-score, .gs-drive-meta) { visibility: hidden; }
.gs-pbp-list.is-all .gs-play.is-future { opacity: .55; }
/* ---- The game cast: one simulated game played back like a broadcast ---- */
.gs-cast { container-type: inline-size; overflow: hidden; }
.gs-pick-wrap { position: relative; min-width: 0; }
.gs-pick-btn { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; height: 30px; padding: 0 10px; border: 1px solid var(--tl-line-10); border-radius: var(--tl-r-chip); background: var(--tl-fill-03); font-size: 12.5px; font-weight: 550; color: var(--tl-ink); }
.gs-pick-btn:hover, .gs-pick-btn[aria-expanded="true"] { border-color: var(--tl-line-14); background: var(--tl-fill-05); }
.gs-pick-btn > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-pick-btn > svg { flex: none; color: var(--tl-ink-50); }
.gs-pick-menu { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; width: 300px; max-width: calc(100vw - 32px); max-height: min(460px, 70vh); overflow-y: auto; padding: 6px; border: 1px solid var(--tl-line-10); border-radius: var(--tl-r-card); background: var(--tl-card-body); box-shadow: 0 12px 32px rgba(0, 0, 0, .28); }
.gs-pick-group { display: block; padding: 10px 10px 4px; font: 600 10.5px var(--tl-mono); letter-spacing: .4px; text-transform: uppercase; color: var(--tl-ink-45); }
.gs-pick-group:first-child { padding-top: 4px; }
.gs-pick-menu > button { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; width: 100%; padding: 7px 10px; border-radius: 6px; text-align: left; font-size: 13px; color: var(--tl-ink-70); }
.gs-pick-menu > button:hover { background: var(--tl-fill-05); color: var(--tl-ink); }
.gs-pick-menu > button[aria-checked="true"] { background: var(--tl-fill-05); color: var(--tl-ink); font-weight: 600; }
.gs-pick-menu > button small { flex: none; font: 500 11px var(--tl-mono); color: var(--tl-ink-50); }
.gs-cast:focus-visible { outline: none; box-shadow: var(--tl-focus-ring); }
.gs-sb { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; padding: 14px 18px 4px; }
.gs-sb-team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gs-sb-team.is-home { flex-direction: row-reverse; text-align: right; }
.gs-sb-team .gs-logo { width: 30px; height: 30px; }
.gs-sb-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.gs-sb-name b { font-size: 14px; font-weight: 650; }
.gs-sb-name small { font-size: 12px; color: var(--tl-ink-50); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-sb-pts { min-width: 1.6em; font-size: 38px; font-weight: 650; letter-spacing: -1.2px; line-height: 1; font-variant-numeric: tabular-nums; text-align: center; }
.gs-sb-team.is-away .gs-sb-pts { margin-left: auto; }
.gs-sb-team.is-home .gs-sb-pts { margin-right: auto; }
.gs-sb-pos { width: 0; height: 0; border: 5px solid transparent; opacity: 0; transition: opacity .2s; }
.gs-sb-team.is-away .gs-sb-pos { order: 3; margin-left: auto; border-left: 7px solid var(--gs-away); }
.gs-sb-team.is-away .gs-sb-pts { order: 4; margin-left: 4px; }
.gs-sb-team.is-home .gs-sb-pos { order: 3; margin-right: auto; border-right: 7px solid var(--gs-home); }
.gs-sb-team.is-home .gs-sb-pts { order: 4; margin-right: 4px; }
.gs-sb-pos.is-on { opacity: 1; }
.gs-sb-mid { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 14px; border-radius: 8px; background: var(--tl-fill-05); }
.gs-sb-clock { font: 650 15px var(--tl-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.2px; }
.gs-sb-sit { font: 500 11px var(--tl-mono); color: var(--tl-ink-60); white-space: nowrap; }

.gs-cast-body { display: grid; grid-template-columns: 172px minmax(0, 1fr) 172px; gap: 12px; align-items: center; padding: 0 14px 4px; }
.gs-box { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 12px; }
.gs-box .gs-k { margin-top: 7px; font-size: 9.5px; }
.gs-box-head { display: flex; align-items: center; gap: 6px; padding-bottom: 6px; border-bottom: 2px solid var(--gs-away); font-size: 12.5px; }
.gs-box.is-home .gs-box-head { border-bottom-color: var(--gs-home); }
.gs-box-head span { margin-left: auto; font: 500 11px var(--tl-mono); color: var(--tl-ink-50); }
.gs-box-row { display: flex; justify-content: space-between; gap: 8px; color: var(--tl-ink-70); }
.gs-box-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-box-row b { flex: none; font: 600 11.5px var(--tl-mono); color: var(--tl-ink); font-variant-numeric: tabular-nums; }
.gs-box-row.is-none { color: var(--tl-ink-35); }

.gs-field-col { position: relative; min-width: 0; perspective: 1100px; }
.gs-field-wrap { aspect-ratio: 1200 / 534; max-width: 980px; margin: -2.6% auto -3.8%; transform: rotateX(38deg) scale(.9); transform-origin: 50% 60%; }
.gs-field-wrap .gs-skel-rows i { height: 100%; aspect-ratio: 1200 / 534; border-radius: 6px; }
.gs-field { display: block; width: 100%; height: auto; border-radius: 6px; overflow: hidden; box-shadow: 0 18px 30px -18px rgba(0, 0, 0, .6); }
.gs-turf { fill: #24412f; }
.gs-turf-band { fill: #284836; }
.gs-yl { stroke: rgba(255, 255, 255, .42); stroke-width: 2.5; }
.gs-yl.is-goal { stroke: rgba(255, 255, 255, .9); stroke-width: 4; }
.gs-hash { stroke: rgba(255, 255, 255, .45); stroke-width: 2; }
.gs-ynum { font: 600 34px var(--tl-font); fill: rgba(255, 255, 255, .5); text-anchor: middle; }
.gs-ez { font: 800 44px var(--tl-font); letter-spacing: 6px; fill: rgba(255, 255, 255, .92); text-anchor: middle; dominant-baseline: central; }
.gs-drive-band { opacity: .22; transition: x .25s, width .25s; }
.gs-los { stroke: #4b9dff; stroke-width: 5; }
.gs-fd { stroke: #f2d020; stroke-width: 5; }
.gs-trail { fill: none; stroke-width: 4; stroke-linecap: round; opacity: .9; }
.gs-ball { fill: #9a5329; stroke: #fff; stroke-width: 3; }
.gs-ball-halo { fill: #fff; opacity: .16; }
.gs-ball-shadow { fill: #000; }
.gs-flash { position: absolute; left: 50%; top: 42%; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 9px 18px 9px 12px; border-radius: 10px; transform: translate(-50%, -50%);
  background: var(--gs-flash, var(--tl-ink)); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); animation: gs-flash .35s cubic-bezier(.2, .9, .3, 1.3); white-space: nowrap; }
.gs-flash[hidden] { display: none; }
.gs-flash.is-final { color: var(--tl-on-ink); }
.gs-flash b { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; text-transform: uppercase; }
.gs-flash span { font: 600 13px var(--tl-mono); opacity: .8; }
.gs-flash .gs-logo { width: 28px; height: 28px; filter: drop-shadow(0 0 1px rgba(255, 255, 255, .6)); }
@keyframes gs-flash { from { opacity: 0; transform: translate(-50%, -50%) scale(.7); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

.gs-caption { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 6px 18px; font-size: 14.5px; line-height: 1.35; text-align: center; }
.gs-caption b { font-weight: 650; }
.gs-caption b.is-neg { color: var(--tl-down); }
.gs-cap-off { display: inline-flex; flex: none; }
.gs-ctrl { display: flex; align-items: center; gap: 12px; padding: 8px 14px 12px; border-top: 1px solid var(--tl-line-06); }
.gs-ctrl-btns { display: flex; align-items: center; gap: 2px; flex: none; }
.gs-play-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--tl-ink); color: var(--tl-on-ink); }
.gs-play-btn:hover, .gs-play-btn[aria-pressed="true"] { background: var(--tl-ink); color: var(--tl-on-ink); opacity: .9; }
.gs-tl { position: relative; flex: 1; min-width: 0; height: 58px; cursor: ew-resize; touch-action: none; user-select: none; }
.gs-tl svg { display: block; width: 100%; height: 44px; border-radius: 6px; background: var(--tl-fill-03); }
.gs-tl-mid { stroke: var(--tl-line-15); stroke-width: 1; vector-effect: non-scaling-stroke; }
.gs-tl-q { stroke: var(--tl-line-12); stroke-width: 1; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.gs-tl-head { fill: var(--tl-ink); }
.gs-tl-q-lbl { position: relative; height: 14px; }
.gs-tl-q-lbl span { position: absolute; top: 2px; transform: translateX(-50%); font: 500 9.5px var(--tl-mono); color: var(--tl-ink-45); }
.gs-speed { flex: none; }
.gs-speed > button { padding: 0 8px; font: 550 11.5px var(--tl-mono); }

@container (max-width: 1100px) {
  .gs-cast-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 28px; row-gap: 6px; padding: 0 18px 8px; align-items: start; }
  .gs-field-col { grid-column: 1 / -1; grid-row: 1; }
  .gs-box { display: none; }             /* the box score card below has it all */
}
@container (max-width: 760px) {
  .gs-sb-name small { display: none; }
  .gs-sb-pts { font-size: 30px; }
}
@container (max-width: 520px) {
  .gs-cast > .gs-card-head { flex-wrap: wrap; row-gap: 6px; padding: 10px 14px; }
  .gs-cast > .gs-card-head .gs-spacer { display: none; }
  .gs-sb { gap: 8px; padding: 12px 12px 2px; }
  .gs-sb-team { gap: 6px; }
  .gs-sb-team .gs-logo { width: 22px; height: 22px; }
  .gs-sb-name { display: none; }
  .gs-sb-pts { min-width: 1.3em; font-size: 26px; letter-spacing: -0.8px; }
  .gs-sb-mid { padding: 4px 8px; }
  .gs-sb-clock { font-size: 13px; }
  .gs-sb-sit { font-size: 10px; }
  .gs-cast-body { column-gap: 16px; padding: 0 12px 8px; }
  .gs-ctrl { flex-wrap: wrap; }
  .gs-tl { order: 3; flex-basis: 100%; }
  .gs-speed { margin-left: auto; }
  .gs-caption { font-size: 13.5px; }
}

/* ---- Settings ---- */
.gs-settings-body { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.gs-set-group { border-bottom: 1px solid var(--tl-line-06); }
.gs-set-group > summary { display: flex; align-items: center; gap: 8px; padding: 13px 16px; cursor: pointer; list-style: none; font-size: 13px; font-weight: 650; }
.gs-set-group > summary::-webkit-details-marker { display: none; }
.gs-set-group > summary::after { content: ''; margin-left: auto; width: 7px; height: 7px; border-right: 1.5px solid var(--tl-ink-50); border-bottom: 1.5px solid var(--tl-ink-50); transform: rotate(45deg); transition: transform .2s; }
.gs-set-group[open] > summary::after { transform: rotate(-135deg); }
.gs-set-group > summary .gs-logo { width: 18px; height: 18px; }
.gs-set-count { font: 500 10.5px var(--tl-mono); color: var(--tl-up); }
.gs-set-rows { display: flex; flex-direction: column; gap: 14px; padding: 2px 16px 16px; }
.gs-set { display: flex; flex-direction: column; gap: 6px; }
.gs-set-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--tl-ink-70); }
.gs-set-top b { font: 600 11.5px var(--tl-mono); color: var(--tl-ink); }
.gs-set-top b.is-changed { color: var(--tl-up); }
.gs-set-hint { font: 11px var(--tl-mono); color: var(--tl-ink-50); }
.gs-set-head { margin-top: 4px; }
.gs-range-in { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 18px; background: transparent; cursor: pointer; }
.gs-range-in::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--tl-ink-60) var(--v, 50%), var(--tl-line-15) var(--v, 50%)); }
.gs-range-in::-moz-range-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--tl-ink-60) var(--v, 50%), var(--tl-line-15) var(--v, 50%)); }
.gs-range-in::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5.5px; border-radius: 50%; border: 2px solid var(--tl-ink); background: var(--tl-page); }
.gs-range-in::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--tl-ink); background: var(--tl-page); }
.gs-range-in:disabled { opacity: .4; cursor: default; }
.gs-inj { font: 600 10px var(--tl-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--tl-down); }
.gs-out { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--tl-ink-60); cursor: pointer; }
.gs-out input { accent-color: var(--tl-down); }
.gs-set-actions { display: flex; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--tl-line-06); flex: none; }
.gs-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--tl-r-btn); border: 1px solid var(--tl-line-12); font-size: 12.5px; font-weight: 600; color: var(--tl-ink); }
.gs-btn:hover { border-color: var(--tl-ink-45); }
.gs-btn.is-ink { border-color: var(--tl-ink); background: var(--tl-ink); color: var(--tl-on-ink); }
.gs-btn:disabled { opacity: .45; cursor: default; }
/* Pro, as the site's other Pro cards (scorecard.css .sc-cta): the pixel field, the kicker with the blue PRO tag, an ink button */
.gs-lock { position: relative; overflow: hidden; display: flex; flex-direction: column; margin: 14px 16px 6px; padding: 16px; border: 1px solid var(--tl-line-10); border-radius: var(--tl-r-card); background: var(--tl-card-body); box-shadow: var(--tl-card-shadow); }
.gs-lock > canvas.tl-field { position: absolute; inset: 0; width: 100%; height: 100%; opacity: var(--tl-field-opacity, .5); pointer-events: none; }
.gs-lock > :not(canvas) { position: relative; }
.gs-lock-k { display: inline-flex; align-items: center; gap: 8px; }
.gs-lock h3 { margin: 10px 0 6px; font-size: 15px; font-weight: 650; letter-spacing: -0.2px; line-height: 1.25; color: var(--tl-ink); }
.gs-lock p { margin: 0 0 14px; font-size: 12.5px; line-height: 1.5; color: var(--tl-ink-60); text-wrap: pretty; }
.gs-lock-btn { align-self: flex-start; text-decoration: none; }
.gs-set-group > summary .tl-pro-tag { margin-left: auto; }
.gs-set-group > summary:has(.tl-pro-tag)::after { margin-left: 0; }
.gs-upsell { display: flex; align-items: center; gap: 10px; color: var(--tl-ink-60); }
.gs-upsell > span:nth-child(2) { flex: 1; min-width: 0; }
.gs-upsell .tl-btn-ink-sm { flex: none; text-decoration: none; }

/* ---- Small-screen game picker ---- */
.gs-dialog { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: center; padding-top: 8vh; background: rgba(0, 0, 0, .45); }
.gs-dialog[hidden] { display: none; }
.gs-dialog-box { display: flex; flex-direction: column; width: min(460px, calc(100vw - 24px)); max-height: 76vh; border: 1px solid var(--tl-line-10); border-radius: var(--tl-r-card); background: var(--tl-page); box-shadow: var(--tl-float-shadow); overflow: hidden; }
.gs-dialog-box .gs-panel-head .gs-icon { margin-left: auto; }

@media (max-width: 1280px) {
  .gs { grid-template-columns: 250px minmax(0, 1fr) 310px; }
  .gs.is-settings-closed { grid-template-columns: 250px minmax(0, 1fr) 0; }
}
@container gs-canvas (max-width: 700px) {
  .gs-sum-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gs-tile-win { grid-column: 1 / -1; border-bottom: 1px solid var(--tl-line-06); }
  .gs-tile:nth-child(2) { border-left: 0; }
}
@media (max-width: 960px) {
  .gs, .gs.is-settings-closed { grid-template-columns: 0 minmax(0, 1fr) 0; }
  .gs-games { display: none; }
  .gs-pick { display: inline-flex; }
  .gs-name, .gs-tag { display: none; }
  .gs-settings { position: fixed; z-index: 20; top: 52px; right: 0; bottom: 0; width: min(340px, 100vw); background: var(--tl-page); box-shadow: var(--tl-float-shadow); }
  .gs:not(.is-settings-open) .gs-settings { display: none; }
  .gs-match-teams { font-size: 18px; }
  .gs-dist-facts { gap: 14px; flex-wrap: wrap; }
  .gs-canvas { padding: 14px 12px 28px; }
  .gs-sec-bar { margin: 0 -12px; padding: 10px 12px; gap: 10px; }
  .gs-lu > .gs-sec-bar:first-child { margin-top: -14px; }
  .gs-sec-bar h2 { font-size: 19px; }
}
@media (max-width: 600px) {
  .gs-tile-big, .gs-win-line b { font-size: 20px; letter-spacing: -0.4px; }
  .gs-tile { padding: 12px 10px; }
  .gs-tile-big { gap: 4px; }
  .gs-tile-big i { margin: 0 -3px; }
}
@media (prefers-reduced-motion: reduce) { .gs * { transition: none !important; animation: none !important; } }

/* Conditions: the chips, the row that adds one, and the stage's banner. */
.gs-conds { display: flex; flex-wrap: wrap; gap: 6px; }
.gs-cond { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border: 1px solid var(--tl-line-14); border-radius: var(--tl-r-pill); font-size: 12px; font-weight: 550; }
.gs-cond button { width: 18px; height: 18px; border: 0; border-radius: 50%; background: var(--tl-fill-05); color: var(--tl-ink-60); cursor: pointer; line-height: 1; }
.gs-cond button:hover { color: var(--tl-ink); background: var(--tl-fill-07); }
.gs-cond-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gs-cond-add select, .gs-cond-add input { min-width: 0; flex: 1 1 auto; height: 30px; padding: 0 8px; border: 1px solid var(--tl-line-14); border-radius: 7px; background: var(--tl-card-bg); color: var(--tl-ink); font: 12px var(--tl-font); }
.gs-cond-add input { flex: 0 0 64px; width: 64px; }
.gs-cond-banner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 14px; padding: 10px 14px; border: 1px solid var(--tl-line-14); border-radius: var(--tl-r-card); background: var(--tl-fill-03); font-size: 13px; }
.gs-cond-banner > span:last-child { flex-basis: 100%; color: var(--tl-ink-55); font-size: 12px; }
.gs-cond-banner .gs-rare { font-style: normal; color: var(--tl-down); }
/* The scenario card above the inputs (game-sim.js scnCard). */
.gs-scn-body { display: grid; gap: 10px; padding: 14px 22px 16px; }
.gs-scn.is-rare { border-color: color-mix(in srgb, var(--tl-down) 45%, transparent); }
.gs-scn .gs-card-head .gs-link { font-size: 12.5px; }
.gs-scn.is-rare .gs-scn-rate { color: var(--tl-down); }
.gs-scn-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gs-scn-chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 6px 0 5px; border-radius: 999px; border: 1px solid var(--tl-line-12); background: var(--tl-fill-03); font-size: 13px; font-weight: 600; color: var(--tl-ink); }
.gs-scn-chip > span:not(.gs-scn-pair) { padding-right: 2px; }
.gs-scn-chip button { width: 20px; height: 20px; border-radius: 50%; font-size: 14px; line-height: 1; color: var(--tl-ink-50); }
.gs-scn-chip button:hover { color: var(--tl-ink); background: var(--tl-fill-035); }
.gs-scn-face { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: var(--tl-logo-chip); }
.gs-scn-chip .gs-logo { width: 18px; height: 18px; }
.gs-scn-pair { display: inline-flex; }
.gs-scn-pair .gs-logo { width: 16px; height: 16px; }
.gs-scn-pair .gs-logo + .gs-logo { margin-left: -4px; }
.gs-scn-note { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--tl-ink-60); }
.gs-cond-match { margin: 6px 0 0; }
.gs-cond-match.is-rare { color: var(--tl-down); }

/* The starting quarterback choice, and props for players who don't play in the simulation. */
.gs-select { width: 100%; height: 32px; padding: 0 8px; border: 1px solid var(--tl-line-14); border-radius: 7px; background: var(--tl-card-bg); color: var(--tl-ink); font: 12.5px var(--tl-font); }
.gs-muted { color: var(--tl-ink-50); font-size: 12px; }

/* The user's AI changed the page: a note that fades after a few seconds. */
.gs-agent { position: fixed; left: 50%; top: 64px; z-index: 40; display: flex; flex-direction: column; gap: 2px; max-width: min(520px, calc(100vw - 32px));
  padding: 10px 14px; border: 1px solid var(--tl-line-14); border-radius: var(--tl-r-card); background: var(--tl-card-bg); box-shadow: var(--tl-float-shadow);
  font-size: 13px; opacity: 0; pointer-events: none; transform: translate(-50%, -6px); transition: opacity .2s, transform .2s; }
.gs-agent.is-on { opacity: 1; transform: translate(-50%, 0); }
/* A game loading: the Sports Index loader's mark and what's happening (game-sim.js loading()). */
.gs-loading { min-height: min(560px, 70vh); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 32px 16px; text-align: center; }
.gs-loading .si-loader-mark { width: 56px; height: 56px; border-radius: 12px; margin-bottom: 8px; }
.gs-loading-sub { max-width: 340px; font-size: 13px; color: var(--tl-ink-50); min-height: 1.4em; }
/* Against the market: each prop's book and volume; thin markets dimmed (game-sim.js props()). */
.gs-mkt .gs-book { display: block; margin-top: 2px; font: 500 10.5px var(--tl-mono); color: var(--tl-ink-45); }
.gs-mkt td.gs-vol { font-family: var(--tl-mono); font-variant-numeric: tabular-nums; color: var(--tl-ink-70); white-space: nowrap; }
.gs-mkt .gs-thin { display: block; margin-top: 2px; font: 600 9.5px var(--tl-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--tl-warn, #d6a243); }
.gs-mkt tr.is-thin td:not(.gs-vol) { opacity: .55; }

/* The panel's way to the Lineup view: a row per team with its changes. */
.gs-lu-links { display: flex; flex-direction: column; gap: 6px; }
.gs-lu-link { display: flex; align-items: center; gap: 9px; width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--tl-line-10); border-radius: var(--tl-r-btn); font-size: 13px; font-weight: 600; color: var(--tl-ink); text-align: left; }
.gs-lu-link:hover { border-color: var(--tl-ink-45); }
.gs-lu-link > span:not(.gs-set-count):not(.gs-lu-go) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-lu-go { font-size: 17px; line-height: 1; color: var(--tl-ink-50); }

/* The Lineup view (game-sim.js paintLineup): a team at a time. The team
   card first, its head naming the team with the toggle between the two
   (teamHead), then the depth chart and the player panel. */
.gs-lu-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.gs-lu-title > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-lu-title .gs-logo { flex: none; width: 20px; height: 20px; }
.gs-lu-card .gs-card-head .gs-link { font-size: 12.5px; }
.gs-lu-pro { display: flex; align-items: center; gap: 12px; padding: 12px 16px; font-size: 13px; color: var(--tl-ink-70); }
.gs-lu-pro > span:nth-child(2) { flex: 1; min-width: 0; }
.gs-lu-pro .tl-btn-ink-sm { flex: none; text-decoration: none; }
.gs-lu-pro-k { display: block; color: var(--tl-ink); }
.gs-lu-who { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.5; color: var(--tl-ink-70); }
.gs-lu-who b { font-weight: 600; color: var(--tl-ink); }
.gs-lu-who small { font-size: inherit; color: var(--tl-ink-50); }
.gs-lu-pro.is-thin { padding: 8px 16px; }
.gs-lu-pro.is-thin .gs-lu-who { margin-top: 0; }
.gs-soon-tag { flex: none; border-color: var(--tl-line-20); color: var(--tl-ink-60); }
@media (max-width: 640px) {
  .gs-lu-pro { flex-wrap: wrap; align-items: flex-start; }
  .gs-lu-pro > span:nth-child(2) { flex: 1 1 calc(100% - 50px); }
  .gs-lu-pro .tl-btn-ink-sm { margin-left: 41px; }
}
.gs-lu-card .gs-card-head { flex-wrap: wrap; row-gap: 2px; padding-top: 8px; padding-bottom: 8px; }
.gs-lu-card .gs-card-head .gs-sub { white-space: normal; }
.gs-lu-card .gs-card-body.gs-set-rows { padding: 14px 18px 18px; }
/* Both teams side by side (game-sim.js matchedCard, targetsCard): a row
   per stat, the away team's column then the home team's, the same columns
   in both cards. */
.gs-tg { padding: 4px 22px 12px; }
.gs-tg-row { display: grid; grid-template-columns: minmax(120px, .8fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px 32px; align-items: center; padding: 12px 0; border-top: 1px solid var(--tl-line-07); }
.gs-tg-head { padding: 0; border-top: 0; font-size: 13px; font-weight: 600; color: var(--tl-ink); }
.gs-lu-card .gs-tg-cardhead { display: block; min-height: 0; padding: 12px 22px; }
.gs-tg-title { gap: 8px; }
.gs-tg-title .gs-link { margin-left: 4px; font-size: 12px; font-weight: 500; letter-spacing: 0; }
.gs-tg-title .gs-pop { right: auto; left: -6px; }
.gs-tg > .gs-tg-row:first-child { border-top: 0; }
.gs-tg-head .gs-logo { width: 18px; height: 18px; }
.gs-tg-row > .gs-help-text { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.5; }
.gs-tg-row > .gs-help-text[hidden] { display: none; }
.gs-tg-row > .gs-help-text p { margin: 0; }
.gs-tg-cell { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.gs-tg-cell b { font: 600 17px var(--tl-mono); color: var(--tl-ink); font-variant-numeric: tabular-nums; }
.gs-tg-cell b.is-changed { color: var(--tl-up); }
.gs-tg-cell b.is-miss { color: var(--tl-down); }
/* Points: the result of the targets, a shaded band on top with no slider. */
.gs-tg-row.is-result { margin: 0 -22px; padding: 14px 22px; background: var(--tl-fill-03); border-top: 0; border-bottom: 1px solid var(--tl-line-10); }
.gs-tg-row.is-result + .gs-tg-row { border-top: 0; }
.gs-tg-cell.is-result b { font-size: 22px; }
.gs-tg-tag { font: 500 9.5px var(--tl-mono); letter-spacing: .5px; text-transform: uppercase; padding: 1px 5px; border-radius: var(--tl-r-tag); border: 1px solid var(--tl-line-20); color: var(--tl-ink-60); }
@container gs-canvas (max-width: 520px) { .gs-tg-row.is-result { margin: 0 -16px; padding: 12px 16px; } }
.gs-tg-miss { color: var(--tl-down); }
.gs-tg-cell small { flex-basis: 100%; font-size: 12px; color: var(--tl-ink-50); }
.gs-tg-cell.is-pinned { font-size: 12.5px; color: var(--tl-ink-50); }
.gs-tg-start { display: flex; flex-wrap: wrap; gap: 2px 10px; flex-basis: 100%; min-height: 15px; }
/* Kalshi's line for a target (game-sim.js kalshiMark): its figure beside
   the value, and a tick on the slider's track. */
.gs-tg-k { display: inline-flex; align-items: center; gap: 5px; font: 500 11.5px var(--tl-mono); color: var(--tl-ink-50); cursor: help; }
.gs-tg-k img { width: 11px; height: 11px; border-radius: 2px; }
.gs-tg-track { position: relative; flex-basis: 100%; margin-top: 4px; }
.gs-tg-track .gs-range-in { position: relative; z-index: 1; }
.gs-tg-mark { position: absolute; top: 3px; left: calc(7px + var(--p, 0) * (100% - 14px)); width: 2px; height: 12px; margin-left: -1px; border-radius: 1px; background: #28cc95; opacity: .85; }
/* Free: the sliders are locked; hovering one says so (game-sim.js tgCell). */
.gs-tg-track.is-locked { cursor: not-allowed; }
.gs-tg-track.is-locked .gs-range-in { pointer-events: none; }
.gs-lock-pop { display: none; position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); z-index: 20; align-items: center; gap: 7px; white-space: nowrap;
  padding: 6px 10px; border-radius: 8px; background: var(--tl-card-body); box-shadow: var(--tl-float-shadow), 0 0 0 1px var(--tl-line-10); font-size: 12px; color: var(--tl-ink-75); }
.gs-tg-track.is-locked:hover .gs-lock-pop { display: inline-flex; }
.gs-lu-bar .si-tag-pro { margin-left: -6px; }
/* The "?" in a card's head: its explainer on hover or focus. */
.gs-pop-wrap { position: relative; display: inline-flex; }
.gs-lu-title > .gs-pop-wrap { overflow: visible; white-space: normal; }
.gs-pop {
  display: none; position: absolute; right: -6px; top: calc(100% + 8px); z-index: 20; width: 320px; max-width: calc(100vw - 48px);
  padding: 10px 12px; border-radius: 8px; background: var(--tl-card-body); box-shadow: var(--tl-float-shadow), 0 0 0 1px var(--tl-line-10);
  font-size: 12.5px; font-weight: 400; line-height: 1.5; color: var(--tl-ink-75); white-space: normal;
}
.gs-pop-wrap:hover .gs-pop, .gs-pop-wrap:focus-within .gs-pop { display: block; }
/* A projection's source, on hover or focus of its number. */
.gs-has-tip { position: relative; }
.gs-has-tip > .gs-pop { left: -6px; right: auto; top: calc(100% + 6px); width: max-content; max-width: 240px; }
.gs-has-tip:hover > .gs-pop, .gs-has-tip:focus-within > .gs-pop { display: block; }
.gs-tset { gap: 8px; }
.gs-tset-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.gs-tset-label { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--tl-ink-75); }
.gs-tset-top b { font: 600 17px var(--tl-mono); color: var(--tl-ink); font-variant-numeric: tabular-nums; }
.gs-tset-top b.is-changed { color: var(--tl-up); }
/* What a baseline matches (game-sim.js baselineNote, pinned). */
.gs-base-note[hidden] { display: none; }
.gs-base-note { display: grid; gap: 8px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--tl-line-10); border-radius: 8px; }
.gs-base-row { display: grid; gap: 2px; }
.gs-base-row p { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--tl-ink-75); }
/* Overview's two sections: the inputs (data-gs-lineup), then the outcomes. */
/* The section bars, as Home's News bar (components/news-bar.css): full
   width across the canvas, a large title, chips, a solid button at the end. */
.gs-sec-bar {
  display: flex; align-items: center; gap: 16px; min-height: 60px; margin: 0 -28px; padding: 10px 28px; flex-wrap: wrap;
  background: var(--tl-header-glass); border-top: 1px solid var(--tl-line-07); border-bottom: 1px solid var(--tl-line-07);
}
.gs-lu > .gs-sec-bar:first-child { margin-top: -18px; border-top: 0; }
/* The inputs' bar folds them away (game-sim.js luToggle). */
.gs-lu-bar { cursor: pointer; user-select: none; }
.gs-lu-bar:hover h2 { color: var(--tl-ink); }
.gs-lu-bar:focus-visible { outline: 2px solid var(--tl-ink-45); outline-offset: -2px; }
.gs-lu-sum { font-size: 12.5px; color: var(--tl-ink-50); }
.gs-lu-chev { margin-left: auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--tl-r-chip); border: 1px solid var(--tl-line-12); color: var(--tl-ink-70); transition: transform .2s var(--tl-ease); }
.gs-lu-bar:hover .gs-lu-chev { color: var(--tl-ink); border-color: var(--tl-line-20); }
.gs-lu-bar[aria-expanded="true"] .gs-lu-chev { transform: rotate(180deg); }
.gs-lu-body { display: flex; flex-direction: column; gap: 14px; }
.gs-lu-body[hidden] { display: none; }
/* Folded, the inputs' bar and Outcomes' share one divider: no gap between them. */
[data-gs-lineup].is-folded .gs-canvas.gs-lu { padding-bottom: 0; }
[data-gs-lineup].is-folded:not([hidden]) + [data-gs-stage] .gs-canvas { padding-top: 0; }
[data-gs-lineup].is-folded + [data-gs-stage] .gs-ov > .gs-sec-bar:first-child { border-top: 0; }
.gs-sec-bar h2 { flex: none; margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.6px; line-height: 1.2; color: var(--tl-ink); }
.gs-chip-row { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.gs-bar-chip {
  height: 28px; padding: 0 11px; display: inline-flex; align-items: center; gap: 6px; flex: none;
  border-radius: var(--tl-r-chip); border: 1px solid var(--tl-line-10); background: transparent; color: var(--tl-ink-70);
  font: 400 12.5px var(--tl-font); line-height: 1; white-space: nowrap;
}
button.gs-bar-chip { cursor: pointer; }
button.gs-bar-chip:hover { color: var(--tl-ink); border-color: var(--tl-line-18); }
.gs-bar-chip.is-on, .gs-bar-chip[aria-pressed="true"] { border-color: var(--tl-ink); background: var(--tl-ink); color: var(--tl-on-ink); font-weight: 600; }
.gs-bar-chip .gs-logo { width: 14px; height: 14px; }
.gs-bar-btn {
  margin-left: auto; height: 30px; padding: 0 12px; flex: none; display: inline-flex; align-items: center;
  border-radius: var(--tl-r-chip); background: var(--tl-ink); color: var(--tl-on-ink); font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.gs-bar-btn:hover { background: var(--tl-ink-hover); }
.gs-bar-btn.is-link { padding: 0 2px; background: transparent; color: var(--tl-ink); }
.gs-bar-btn.is-link:hover { background: transparent; color: var(--tl-ink-70); }
[data-gs-baseline].is-flash, [data-gs-scenarios].is-flash { animation: gs-flash 1.2s ease-out; }
@keyframes gs-flash { 0% { box-shadow: 0 0 0 2px var(--tl-ink-50); } 100% { box-shadow: 0 0 0 2px transparent; } }
.gs-canvas.gs-lu { padding-bottom: 6px; }
.gs-lu + [data-gs-stage] .gs-canvas, [data-gs-lineup]:not([hidden]) + [data-gs-stage] .gs-canvas { padding-top: 14px; }
/* A setting's averages under its "?": the team's season and the NFL's. */
.gs-avg { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.gs-avg td { padding: 5px 0; border-top: 1px solid var(--tl-line-07); background: transparent; color: var(--tl-ink-70); }
.gs-avg td:first-child { display: flex; align-items: center; gap: 7px; }
.gs-avg td:last-child { text-align: right; font: 600 12.5px var(--tl-mono); color: var(--tl-ink); }
.gs-avg .gs-logo { width: 16px; height: 16px; }
@container gs-canvas (max-width: 520px) {
  .gs-tg { padding: 2px 16px 10px; }
  .gs-tg-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 20px; }
  .gs-tg-row > .gs-tset-label { grid-column: 1 / -1; }
  .gs-lu-card .gs-tg-cardhead { padding: 10px 16px; }
  .gs-tg-head > .gs-tg-title { grid-column: 1 / -1; }
}

/* The depth chart (game-sim.js board): each position's players in depth
   order with a usage bar, yards in this game and the projection; drag a
   row or use its arrows to move it. The player panel (inspector) sits
   beside it, sticky, and under it on narrow screens. */
.gs-dc { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.gs-dc-side { position: sticky; top: 12px; min-width: 0; }
.gs-dc-board .gs-card-head { flex-wrap: wrap; row-gap: 2px; padding-top: 8px; padding-bottom: 8px; }
.gs-dc-board .gs-card-head .gs-sub { white-space: normal; }
.gs-dc-group + .gs-dc-group { border-top: 1px solid var(--tl-line-07); }
.gs-dc-ghead, .gs-dc-row { display: grid; grid-template-columns: 12px 34px minmax(0, 1fr) minmax(120px, .9fr) 58px 62px 46px; align-items: center; column-gap: 10px; padding: 0 12px 0 10px; }
.gs-dc-ghead { height: 40px; font-size: 11.5px; color: var(--tl-ink-50); }
.gs-dc-gname { grid-column: 1 / 4; display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--tl-ink); }
.gs-dc-gsum { font: 500 11.5px var(--tl-mono); color: var(--tl-ink-50); white-space: nowrap; }
.gs-dc-row { min-height: 54px; border-top: 1px solid var(--tl-line-05); transition: background .12s; }
.gs-dc-row:hover { background: var(--tl-fill-03); }
.gs-dc-row.is-out { color: var(--tl-ink-50); }
.gs-dc-row.is-out .gs-dc-name b { color: var(--tl-ink-50); text-decoration: line-through; }
.gs-dc-row.is-drag { opacity: .4; }
.gs-dc-row.is-drop-before { box-shadow: inset 0 2px 0 var(--tl-ink); }
.gs-dc-row.is-drop-after { box-shadow: inset 0 -2px 0 var(--tl-ink); }
.gs-dc-grip { display: grid; place-items: center; color: var(--tl-ink-35); }
.gs-dc-slot { font: 600 12px var(--tl-mono); color: var(--tl-ink-60); }
.gs-dc-name { display: flex; align-items: center; gap: 8px; min-width: 0; height: 54px; padding: 0; font-size: 14px; color: var(--tl-ink); text-align: left; }
.gs-dc-name b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-dc-name small { flex: none; font-size: 11.5px; color: var(--tl-ink-50); }
/* A player's headshot over his initials (game-sim.js avatar). */
.gs-dc-av { position: relative; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--tl-fill-05); }
.gs-dc-av > span { font: 600 11.5px var(--tl-font); color: var(--tl-ink-50); }
.gs-dc-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 15%; }
.gs-dc-av.is-none img { display: none; }
.gs-dc-row.is-out .gs-dc-av { opacity: .5; filter: grayscale(1); }
.gs-dc-short { display: none; }
.gs-dc-name .gs-inj { align-self: center; }
.gs-dc-dot { flex: none; align-self: center; width: 6px; height: 6px; border-radius: 50%; background: var(--tl-up); }
.gs-dc-use { display: flex; align-items: center; gap: 8px; min-width: 0; }
.gs-dc-bar { flex: 1; min-width: 0; height: 4px; border-radius: 2px; background: var(--tl-fill-07); overflow: hidden; }
.gs-dc-bar i { display: block; height: 100%; border-radius: 2px; background: var(--tl-ink-60); transition: width .15s; }
.gs-dc-use b { flex: none; width: 46px; text-align: right; font: 600 13px var(--tl-mono); color: var(--tl-ink); }
.gs-dc-role { font-size: 12px; color: var(--tl-ink-60); }
.gs-dc-num { font: 500 13px var(--tl-mono); color: var(--tl-ink-75); text-align: right; font-variant-numeric: tabular-nums; }
.gs-dc-ghead .gs-dc-num, .gs-dc-col { font: 500 11px var(--tl-font); color: var(--tl-ink-50); }
.gs-dc-use b.is-changed, .gs-dc-num.is-changed { color: var(--tl-up); }
.gs-dc-proj { color: var(--tl-ink); font-weight: 600; }
.gs-dc-move { display: block; }
/* A player's settings, open under his row (game-sim.js editor). */
.gs-dc-row { cursor: pointer; }
.gs-dc-row.is-open { background: var(--tl-fill-03); }
.gs-dc-chev { flex: none; align-self: center; margin-left: 2px; color: var(--tl-ink-35); transition: transform .15s; }
.gs-dc-row.is-open .gs-dc-chev { transform: rotate(90deg); color: var(--tl-ink-60); }
.gs-dc-edit { padding: 16px 18px 18px 100px; background: var(--tl-fill-03); border-top: 1px solid var(--tl-line-05); }
.gs-dc-ctls { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px 28px; align-items: start; }
.gs-dc-ctls + .gs-dc-acts { margin-top: 18px; }
.gs-dc-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.gs-dc-acts .gs-link { font-size: 12.5px; }
.gs-dc-edit .gs-help-text { display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.5; }
.gs-dc-edit .gs-help-text[hidden] { display: none; }
.gs-dc-edit .gs-help-text p { margin: 0; }

/* Beside the depth chart: what the lineup comes to (game-sim.js derived). */
.gs-dv { display: flex; flex-direction: column; gap: 18px; padding: 16px 18px 20px; }
.gs-dv .gs-help-text { font-size: 13px; line-height: 1.5; }
.gs-dv .gs-help-text p { margin: 0; }
.gs-dv-row small { font: 500 11.5px var(--tl-mono); color: var(--tl-ink-50); }
.gs-dv b.is-changed { color: var(--tl-up); }
.gs-dv-sec { display: flex; flex-direction: column; }
.gs-dv-sec h3 { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin: 0 0 4px; font-size: 12.5px; font-weight: 600; color: var(--tl-ink); }
.gs-dv-sec .gs-help-text { margin: 4px 0 8px; }
.gs-dv .gs-help-text[hidden] { display: none; }
.gs-dv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 12px; padding: 8px 0; border-top: 1px solid var(--tl-line-05); font-size: 14px; color: var(--tl-ink-75); }
.gs-dv-row b { font: 600 15px var(--tl-mono); color: var(--tl-ink); text-align: right; font-variant-numeric: tabular-nums; }
.gs-dv-row small { grid-column: 2; text-align: right; }
.gs-dv-split { display: flex; flex-direction: column; gap: 7px; padding: 10px 0; border-top: 1px solid var(--tl-line-05); }
.gs-dv-split-k { font-size: 14px; color: var(--tl-ink-75); }
.gs-dv-split-k b { margin-left: 4px; font: 600 14px var(--tl-mono); color: var(--tl-ink); }
.gs-dv-bar { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; }
.gs-dv-bar i { min-width: 2px; }
.gs-dv-bar i.is-0, .gs-dv-key i.is-0 { background: var(--tl-ink); }
.gs-dv-bar i.is-1, .gs-dv-key i.is-1 { background: var(--tl-ink-55); }
.gs-dv-bar i.is-2, .gs-dv-key i.is-2 { background: var(--tl-ink-35); }
.gs-dv-bar i.is-3, .gs-dv-key i.is-3, .gs-dv-bar i.is-4, .gs-dv-key i.is-4 { background: var(--tl-fill-07); }
.gs-dv-key { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--tl-ink-60); }
.gs-dv-key span { display: inline-flex; align-items: center; gap: 6px; }
.gs-dv-key i { width: 8px; height: 8px; border-radius: 2px; }
.gs-dv-key b { font: 600 12.5px var(--tl-mono); color: var(--tl-ink); }
@container gs-canvas (max-width: 900px) {
  .gs-dc { grid-template-columns: minmax(0, 1fr); }
  .gs-dc-side { position: static; }
}
@container gs-canvas (max-width: 560px) {
  .gs-dc-ghead, .gs-dc-row { grid-template-columns: 30px minmax(0, 1fr) 92px 40px 44px; column-gap: 8px; padding: 0 10px; }
  .gs-dc-grip, .gs-dc-row > .gs-dc-num:not(.gs-dc-proj), .gs-dc-ghead > :not(.gs-dc-gname), .gs-dc-name small { display: none; }
  .gs-dc-gname { grid-column: 1 / -1; }
  .gs-dc-edit { padding: 14px 14px 16px; }
  .gs-dc-av { width: 30px; height: 30px; }
  .gs-dc-name { font-size: 13.5px; }
  .gs-dc-full { display: none; }
  .gs-dc-short { display: inline; }
}

/* The average game (game-sim.js avgGame): the teams' averages side by side,
   then a box score of averages per team. */
.gs-avg-body { display: grid; gap: 18px; padding: 0 0 14px; }
.gs-avg-teams th { background: transparent; }
.gs-avg-teams th:first-child { text-align: left; }
.gs-avg-teams th:last-child { text-align: right; padding-right: 18px; }
.gs-avg-teams th .gs-logo { width: 16px; height: 16px; vertical-align: -3px; margin: 0 6px; }
.gs-avg-teams td { padding: 7px 12px; border-bottom: 1px solid var(--tl-line-06); }
.gs-avg-teams td.gs-num:first-child { text-align: left; padding-left: 18px; }
.gs-avg-teams td.gs-num:last-child { text-align: right; padding-right: 18px; }
.gs-avg-teams td.gs-avg-k { text-align: center; font-size: 12.5px; color: var(--tl-ink-60); }
.gs-avg-teams b { font: 600 14px var(--tl-mono); }
.gs-avg-boxes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 0 14px; }
.gs-avg-box { min-width: 0; border: 1px solid var(--tl-line-07); border-radius: var(--tl-r-card); overflow: hidden; }
.gs-avg-box-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--tl-line-06); font-size: 13.5px; }
.gs-avg-box-head .gs-logo { width: 18px; height: 18px; }
.gs-avg-lines td { padding: 6px 10px; font-size: 12.5px; }
.gs-avg-lines td:first-child { padding-left: 14px; white-space: nowrap; }
.gs-avg-lines .gs-avg-sec th { padding: 7px 10px; font-size: 10px; }
.gs-avg-lines .gs-avg-sec th:first-child { padding-left: 14px; text-align: left; color: var(--tl-ink-70); }
.gs-avg-lines b { font: 600 12.5px var(--tl-mono); }
.gs-avg-lines .gs-range { display: block; font: 500 10.5px var(--tl-mono); color: var(--tl-ink-45); }
@container gs-canvas (max-width: 640px) {
  .gs-avg-boxes { grid-template-columns: minmax(0, 1fr); padding: 0 10px; }
  .gs-avg-lines td, .gs-avg-lines .gs-avg-sec th { padding-left: 5px; padding-right: 5px; }
  .gs-avg-lines td:first-child, .gs-avg-lines .gs-avg-sec th:first-child { padding-left: 10px; }
  .gs-avg-lines td:last-child, .gs-avg-lines .gs-avg-sec th:last-child { padding-right: 10px; }
  .gs-avg-lines td:first-child { white-space: normal; }
}

/* Team stats (game-sim.js tgCell): a result unless you set it. */
.gs-tg-titlebox { display: grid; gap: 2px; min-width: 0; }
.gs-tg-status { font-size: 12px; color: var(--tl-ink-50); }
.gs-tg-cell.is-auto b { color: var(--tl-ink); font-weight: 500; }
.gs-tg-set-wrap { margin-left: auto; position: relative; }
.gs-tg-set { height: 24px; padding: 0 10px; border-radius: var(--tl-r-chip); border: 1px solid var(--tl-line-12); font-size: 12px; font-weight: 600; color: var(--tl-ink-70); background: transparent; cursor: pointer; display: inline-flex; align-items: center; }
.gs-tg-set:hover { color: var(--tl-ink); border-color: var(--tl-line-20); }
.gs-tg-set.is-locked { cursor: not-allowed; opacity: .6; position: relative; }
.gs-tg-set.is-locked .gs-lock-pop { left: auto; right: 0; transform: none; }
.gs-tg-set.is-locked:hover .gs-lock-pop, .gs-tg-set.is-locked:focus .gs-lock-pop { display: inline-flex; }
.gs-tg-yours { flex-basis: 100%; display: inline-flex; align-items: center; gap: 5px; font: 600 11.5px var(--tl-font); color: var(--tl-up); }
.gs-tg-yours button { width: 18px; height: 18px; border-radius: 50%; font-size: 13px; line-height: 1; color: var(--tl-ink-50); }
.gs-tg-yours button:hover { color: var(--tl-ink); background: var(--tl-fill-035); }
.gs-avg-teams td.is-yours b { color: var(--tl-up); }
.gs-avg-teams td.is-yours b::after { content: ''; display: inline-block; width: 5px; height: 5px; margin-left: 5px; border-radius: 50%; background: var(--tl-up); vertical-align: 2px; }
/* A stat you set: a green-tinted cell, so yours stand apart from the simulated ones. */
.gs-tg-cell.is-yours { margin: -8px -10px; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--tl-up) 8%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tl-up) 30%, transparent); }
.gs-tg-cell.is-yours .gs-tg-start:empty { display: none; }
.gs-pop.gs-pop-left { right: auto; left: -6px; }
.gs-avg-game .gs-card-head h2 { gap: 8px; }

/* ---------------------------------------------------------------- the league switch (both leagues) */
.gs-league { flex: none; display: inline-flex; padding: 2px; border-radius: var(--tl-r-chip); background: var(--tl-fill-05); }
.gs-league a { padding: 2px 8px; border-radius: 5px; font: 500 10.5px var(--tl-mono); letter-spacing: .06em; color: var(--tl-ink-50); text-decoration: none; }
.gs-league a[aria-current="page"] { background: var(--tl-control); color: var(--tl-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.gs-league a:hover { color: var(--tl-ink); }

/* ---------------------------------------------------------------- NBA (game-sim-nba.js) */
.gs-games-day { position: sticky; top: 0; z-index: 1; padding: 8px 16px 6px; border-bottom: 1px solid var(--tl-line-05); background: var(--tl-panel, var(--tl-bg)); font: 500 10.5px var(--tl-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--tl-ink-50); }
.gs-kline { display: flex; align-items: center; justify-content: flex-end; gap: 3px; font: 500 10.5px var(--tl-mono); color: var(--tl-ink-45); }
.gs-kline .gs-k-logo { width: 10px; height: 10px; }
.gs-nba-lines td { vertical-align: top; }
.gs-nba-lines th { padding: 6px 10px; font-size: 10px; }

.gs-nba-players .gs-card-head { flex-wrap: wrap; row-gap: 8px; }
.gs-nba-players .gs-tabs > button { display: inline-flex; align-items: center; gap: 6px; }
.gs-nba-pace { max-width: 420px; padding: 12px 18px 4px; }
.gs-nba-table td { vertical-align: middle; }
.gs-nba-table td:first-child { white-space: normal; }
.gs-nba-table td.gs-num b { font: 600 13px var(--tl-mono); }
.gs-nba-row { cursor: pointer; }
.gs-nba-row.is-open td { background: var(--tl-fill-025); }
.gs-nba-row.is-open .gs-dc-chev { transform: rotate(180deg); }
.gs-nba-row.is-out { cursor: default; }
.gs-nba-row.is-out .gs-nba-name, .gs-nba-row.is-out .gs-dc-av { opacity: .45; }
.gs-nba-who { display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 260px; }
.gs-nba-name { display: flex; flex-direction: column; min-width: 0; }
.gs-nba-name b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-nba-name small { font: 500 10.5px var(--tl-mono); color: var(--tl-ink-45); white-space: nowrap; }
.gs-nba-acts { width: 1%; }
.gs-nba-acts .gs-link { margin-right: 6px; }
.gs-nba-acts .gs-link.is-locked { opacity: .5; }
.gs-nba-edit > td { padding: 4px 18px 16px !important; background: var(--tl-fill-025); white-space: normal !important; text-align: left !important; }
.gs-nba-sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 22px; padding: 8px 0 10px; }
.gs-nba-set .gs-set-top b { font: 600 13px var(--tl-mono); }
.gs-nba-set .gs-tg-start { display: flex; align-items: center; gap: 8px; margin-top: 2px; font: 500 10.5px var(--tl-mono); color: var(--tl-ink-45); }
.gs-nba-outs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 18px 14px; border-top: 1px solid var(--tl-line-05); font-size: 12.5px; }
.gs-nba-outs .gs-k { margin-right: 4px; }
.gs-nba-outp small { font: 600 10px var(--tl-mono); text-transform: uppercase; color: var(--tl-down); }

.gs-nba-cast .gs-card-head { flex-wrap: wrap; row-gap: 8px; }
.gs-nba-picks { flex-wrap: wrap; }
.gs-nba-sb { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 14px 22px 6px; }
.gs-nba-sbt { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.gs-nba-sbt.is-home { justify-content: flex-end; }
.gs-nba-pts { font: 650 30px var(--tl-mono); font-variant-numeric: tabular-nums; }
.gs-nba-clock { padding: 4px 10px; border-radius: var(--tl-r-chip); background: var(--tl-fill-05); font: 600 12.5px var(--tl-mono); color: var(--tl-ink-70); }
.gs-nba-court { padding: 6px 22px 4px; }
.gs-nba-court svg { display: block; width: 100%; height: auto; max-height: 420px; }
.gs-ct-floor { fill: color-mix(in srgb, #c8935a 18%, var(--tl-bg)); }
.gs-ct-paint { fill: color-mix(in srgb, var(--tl-ink) 5%, transparent); stroke: var(--tl-ink-35); stroke-width: .18; }
.gs-ct-line { fill: none; stroke: var(--tl-ink-35); stroke-width: .18; }
.gs-ct-rim { fill: none; stroke: #e2733b; stroke-width: .25; }
.gs-ct-make { stroke: var(--tl-bg); stroke-width: .15; }
.gs-ct-miss { fill: none; stroke-width: .3; opacity: .8; }
.gs-ct-make.is-now, .gs-ct-miss.is-now { stroke-width: .4; animation: gs-shot .5s ease-out; }
@keyframes gs-shot { from { r: 3; opacity: .2; } }
.gs-nba-play { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 22px; border-top: 1px solid var(--tl-line-05); font-size: 13.5px; }
.gs-nba-play > span:not(.gs-nba-tag) { flex: 1; min-width: 0; }
.gs-nba-tag { flex: none; padding: 2px 7px; border-radius: var(--tl-r-tag); background: var(--tl-fill-05); font: 600 11px var(--tl-mono); color: var(--tl-up); }
.gs-nba-ctl { display: flex; align-items: center; gap: 10px; padding: 10px 22px 16px; border-top: 1px solid var(--tl-line-05); }
.gs-nba-ctl .gs-btn { width: 30px; height: 30px; padding: 0; }
.gs-nba-flow { position: relative; flex: 1; min-width: 0; height: 64px; cursor: pointer; }
.gs-nba-flow svg { display: block; width: 100%; height: 100%; touch-action: none; }
.gs-nba-lead { fill: none; stroke: var(--tl-ink-70); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.gs-nba-zero, .gs-nba-q { stroke: var(--tl-line-12); stroke-width: 1; vector-effect: non-scaling-stroke; }
.gs-nba-mark { stroke: var(--tl-up); stroke-width: 2; vector-effect: non-scaling-stroke; }
.gs-nba-flow-k { position: absolute; left: 4px; bottom: 2px; font: 500 9.5px var(--tl-mono); color: var(--tl-ink-45); pointer-events: none; }
.gs-nba-flow-k.is-home { top: 2px; bottom: auto; }
.gs-nba-pbp { flex: 1; min-height: 0; margin: 0; padding: 0; overflow-y: auto; list-style: none; scrollbar-width: thin; }
.gs-nba-pbp li { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 18px; border-bottom: 1px solid var(--tl-line-05); font-size: 12.5px; cursor: pointer; }
.gs-nba-pbp li.is-now { background: var(--tl-fill-05); }
.gs-nba-pbp li:hover { background: var(--tl-fill-025); }
.gs-nba-t, .gs-nba-sc { font: 500 11px var(--tl-mono); color: var(--tl-ink-50); }
.gs-nba-txt { display: flex; align-items: center; gap: 8px; min-width: 0; }
.gs-nba-txt .gs-logo { width: 16px; height: 16px; }
.gs-nba-txt > span:not(.gs-nba-tag) { flex: 1; min-width: 0; }
.gs-nba-box td, .gs-nba-box th { padding: 7px 9px; }
.gs-nba-box td b { font-family: var(--tl-mono); }
@media (max-width: 720px) {
  .gs-nba-sb { padding: 12px 14px 4px; }
  .gs-nba-pts { font-size: 24px; }
  .gs-nba-court, .gs-nba-play { padding-left: 14px; padding-right: 14px; }
  .gs-nba-ctl { flex-wrap: wrap; padding: 10px 14px 14px; }
  .gs-nba-flow { order: 5; flex-basis: 100%; }
  .gs-nba-who { max-width: 190px; }
}
