:root {
  --navy: #002855;
  --teal: #008675;
  --teal-deep: #00594e;
  --gray: #a2aaad;
  --paper: #f3f6f8;
  --surface: #ffffff;
  --ink: #002855;
  --ink-2: #24384c;
  --line: #d5dbde;
  --loss: #6e2436;
  --dot: #5c7080;
  --dot-on: #002855;
  --shadow: 0 1px 2px rgba(0, 40, 85, .06), 0 12px 28px -22px rgba(0, 40, 85, .7);
  --radius: 12px;
  --display: "Poppins", "Helvetica Neue", sans-serif;
  --body: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #07131f;
    --surface: #102233;
    --ink: #f4f8fb;
    --ink-2: #c5d2dc;
    --line: #2c455c;
    --gray: #8b969b;
    --dot: #8ea0b0;
    --dot-on: #f4f8fb;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #07131f;
  --surface: #102233;
  --ink: #f4f8fb;
  --ink-2: #c5d2dc;
  --line: #2c455c;
  --gray: #8b969b;
  --dot: #8ea0b0;
  --dot-on: #f4f8fb;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
html {
  /* Stops iOS Safari treating a quick second tap as a zoom. Pinch zoom still works. */
  touch-action: manipulation;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 var(--body);
  padding-bottom: env(safe-area-inset-bottom);
  touch-action: manipulation;
}
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--navy);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: 8px;
  z-index: 5;
}
.skip:focus { top: 1rem; }
a { color: var(--teal-deep); }
:root[data-theme="dark"] a { color: #d5f6f1; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) a { color: #d5f6f1; }
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  margin: 0;
  padding: 0;
  border: 0;
  background: #0b1216;
  cursor: pointer;
}
html[data-entered] .splash { display: none; }
.splash picture { width: 100%; height: 100%; min-height: 0; }
.splash img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.splash__cue {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(1.1rem, env(safe-area-inset-bottom));
  margin: 0;
  text-align: center;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: .06em;
  font-size: .95rem;
  color: rgba(244, 248, 251, .9);
  text-shadow: 0 1px 10px rgba(0, 0, 0, .55);
  pointer-events: none;
}
.splash__click { display: none; }
@media (min-width: 900px) {
  .splash__tap { display: none; }
  .splash__click { display: inline; }
}
.splash.is-leaving { opacity: 0; transition: opacity .4s ease; }
@media (prefers-reduced-motion: reduce) {
  .splash.is-leaving { transition: none; }
}

.top, .banner, .layout, .admin, .foot { width: min(1080px, calc(100% - 2rem)); margin-inline: auto; }
.top { padding: 1.25rem 0 0; }
.top__bar, .row, .deck__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.top__bar h1 { margin: 0; font-size: clamp(1.45rem, 5.2vw, 2.1rem); }
.home { font-family: var(--display); font-weight: 600; font-size: .85rem; letter-spacing: .04em; text-decoration: none; color: var(--ink); }
.eyebrow {
  margin: 1.1rem 0 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal-deep);
}
:root[data-theme="dark"] .eyebrow { color: #d5f6f1; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .eyebrow { color: #d5f6f1; }
}
h1, h2, h3 { font-family: var(--display); line-height: 1.2; }
h1 { margin: .2rem 0; font-size: clamp(1.8rem, 4vw, 2.4rem); }
h2 { margin: 0; font-size: 1.15rem; }
.meta, .followed, .hint, .lede { color: var(--ink-2); }
.followed { margin: .35rem 0 0; font-weight: 700; color: var(--ink); }
.lede, .live-note, .deck, .completed, .bracket-fold, .photos { width: min(1080px, calc(100% - 2rem)); margin-inline: auto; }
.lede { margin-bottom: 1rem; font-size: 1.05rem; }
.live-note { margin-top: .75rem; font-weight: 700; }
.nowrap { white-space: nowrap; }

.banner, .notice {
  margin-top: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  padding: .85rem 1rem;
}
.track, .slide { min-width: 0; }
.panel, .slide__card, .match {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel { padding: 1rem; }
.deck { margin-top: 1rem; margin-bottom: 1rem; display: flex; flex-direction: column; }
.deck__head { margin-bottom: 1.25rem; }
.deck__hint { margin: .7rem 0 .15rem; }

.track {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  border-radius: var(--radius);
  scrollbar-width: none;
  gap: .75rem;
}
.track::-webkit-scrollbar { display: none; }
.track.is-nudging { scroll-snap-type: none; scroll-behavior: auto; }
.slide {
  flex: 0 0 88%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
}
.deck__controls {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  column-gap: .35rem;
  row-gap: .1rem;
  margin-top: .75rem;
}
#prev { grid-column: 1; grid-row: 1; }
#dots { grid-column: 2; grid-row: 1; }
#next { grid-column: 3; grid-row: 1; }
#count { grid-column: 2; grid-row: 2; justify-self: center; }
.dots {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0;
  width: 100%;
  min-width: 0;
  margin: 0;
}
.dot {
  flex: 1 1 1.15rem;
  width: 1.15rem;
  max-width: 1.35rem;
  min-width: .7rem;
  min-height: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.dot::before {
  content: "";
  display: block;
  width: .38rem;
  height: .38rem;
  margin: auto;
  border-radius: 50%;
  background: var(--dot);
}
.dot[aria-selected="true"]::before {
  background: var(--dot-on);
  width: .5rem;
  height: .5rem;
}
#prev, #next {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}
#prev svg, #next svg { width: 22px; height: 22px; display: block; }
@media (min-width: 900px) {
  .slide { flex-basis: 20rem; }
}
.completed { margin-top: .25rem; margin-bottom: 1.25rem; }
.completed > h2 { margin-bottom: .75rem; }
.completed__list { display: grid; gap: .65rem; }
.completed__card {
  background: var(--surface);
  border: 1px solid #9ecfc8;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
:root[data-theme="dark"] .completed__card { border-color: #1f6f64; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .completed__card { border-color: #1f6f64; }
}
button.completed__toggle {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .35rem;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: .85rem .9rem .75rem;
  border: 0;
  border-radius: calc(var(--radius) - 1px);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}
button.completed__toggle:hover,
button.completed__toggle:focus-visible {
  background: rgba(0, 134, 117, .08);
}
.completed__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .6rem;
}
.completed__opponent {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  min-width: 0;
}
.completed__result {
  flex: none;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.completed__result.is-loss { color: var(--ink-2); }
.completed__meta { color: var(--ink-2); font-size: .85rem; min-width: 0; }
.completed__scoreline {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .35rem;
  min-width: 0;
}
.completed__scoreline .setboard { margin-top: .15rem; }
.completed__scoreline .completed__cue { justify-self: end; }
.completed__cue {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-left: auto;
  color: var(--teal-deep);
  font-family: var(--display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
}
:root[data-theme="dark"] .completed__cue { color: #9cf3e6; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .completed__cue { color: #9cf3e6; }
}
.completed__chevron {
  width: .5rem;
  height: .5rem;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -.15rem;
  flex: none;
  transition: transform .16s ease;
}
button.completed__toggle[aria-expanded="true"] .completed__chevron {
  transform: rotate(225deg);
  margin-top: .15rem;
}
.completed__body { padding: 0 .9rem .9rem; display: grid; gap: .45rem; overflow-x: auto; }
.completed__body[hidden] { display: none; }
.completed__body h3 { margin: 0; font-size: 1rem; }
.completed__card .tally { margin-top: .2rem; }
.totals { margin-bottom: .75rem; }
.totals__n, .totals__avg { display: block; font-variant-numeric: tabular-nums; }
.totals__n { font-weight: 800; }
.totals__avg { color: var(--ink-2); font-size: .78rem; font-weight: 650; }
.totals .tally td { vertical-align: top; }
.bracket-fold { margin-top: 0; padding: 0; }
.bracket-fold > summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  font-family: var(--display);
  font-weight: 700;
  cursor: pointer;
}
.bracket-fold > summary::after {
  content: "";
  width: .5rem;
  height: .5rem;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}
.bracket-fold[open] > summary::after { transform: rotate(45deg); }
.bracket-fold__body { padding: 0 1rem 1rem; }
.photos { display: none; }
.slide__card {
  flex: 1 1 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: 1rem 1rem 1.1rem;
  border-left: 5px solid var(--gray);
}
.slide__card[data-status="up-next"], .slide__card[data-status="final-win"], .slide__card[data-status="live"] { border-left-color: var(--teal); }
.slide__card[data-status="final-loss"] { border-left-color: var(--loss); }
.chip {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  border-radius: 999px;
  padding: .2rem .7rem;
  font-family: var(--display);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.chip--possible { background: #e7eef3; color: var(--navy); }
:root[data-theme="dark"] .chip--possible { background: #1c3348; color: #f4f8fb; }
.chip--loss { background: var(--loss); }
.chip--live { background: var(--teal-deep); }
.condition {
  margin: .75rem 0 0;
  min-height: 2.7em;
  font-weight: 700;
}
.when { margin: .35rem 0 .8rem; min-height: 2.7em; color: var(--ink-2); }
.team-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .5rem .75rem;
  align-items: center;
  padding: .45rem 0;
  border-top: 1px solid var(--line);
}
.team-row.is-followed { background: color-mix(in srgb, var(--teal) 12%, transparent); margin-inline: -.4rem; padding-inline: .4rem; border-radius: 8px; }
.seed {
  display: inline-grid;
  place-items: center;
  min-width: 1.8rem;
  height: 1.8rem;
  padding: 0 .35rem;
  border-radius: 6px;
  background: var(--gray);
  color: #002855;
  font-family: var(--display);
  font-weight: 700;
  font-size: .85rem;
}
.scores {
  display: flex;
  gap: .4rem;
  min-height: 1.35em;
  justify-content: flex-end;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.note { margin: .8rem 0 0; margin-top: auto; min-height: 2.7em; color: var(--ink-2); }
.result { margin: .8rem 0 0; font-family: var(--display); font-weight: 700; }
.deck__controls p { margin: 0; font-size: .8rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
button, select, input, textarea {
  font: inherit;
  color: inherit;
}
button, a, summary, label, input, select, textarea, [role="button"] {
  touch-action: manipulation;
}
button, .text-button {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: #fff;
  padding: .45rem .9rem;
  font-family: var(--display);
  font-weight: 600;
  cursor: pointer;
}
button.completed__toggle {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
}
@keyframes tap-press {
  0% { transform: scale(1); }
  40% { transform: scale(0.96); }
  100% { transform: scale(1); }
}
button.is-tap,
.hero button.is-tap,
.hero .stat-btn.is-tap,
.hero__side.is-followed .point.is-tap,
button.completed__toggle.is-tap {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  animation: tap-press 200ms ease;
}
button.completed__toggle.is-tap .completed__cue { color: #fff; }
@media (prefers-reduced-motion: reduce) {
  button.is-tap,
  .hero button.is-tap,
  .hero .stat-btn.is-tap,
  .hero__side.is-followed .point.is-tap,
  button.completed__toggle.is-tap {
    animation: none;
    transform: none;
  }
}
button[type="button"].secondary, #remove-set, #clear-score, #lock, #theme, .text-button {
  background: transparent;
  color: var(--ink);
}
#theme {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  flex: none;
  display: inline-grid;
  place-items: center;
}
#theme .theme__icon { width: 22px; height: 22px; display: block; }
#theme .theme__icon--sun { display: none; }
:root[data-theme="dark"] #theme .theme__icon--moon { display: none; }
:root[data-theme="dark"] #theme .theme__icon--sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #theme .theme__icon--moon { display: none; }
  :root:not([data-theme="light"]) #theme .theme__icon--sun { display: block; }
}
.text-button { margin-top: .5rem; }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: .45rem .7rem;
}
textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; }
label { display: block; font-weight: 700; margin: .8rem 0 .3rem; }
.check { display: flex; align-items: center; gap: .55rem; font-weight: 700; }
.check input { width: 1.15rem; height: 1.15rem; min-height: 0; }
.sets { display: grid; gap: .5rem; margin-top: .6rem; }
.set-line { display: grid; grid-template-columns: 1fr 5.2rem 5.2rem; gap: .5rem; align-items: center; }
.set-line input { text-align: center; font-variant-numeric: tabular-nums; }
.row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.row > button { flex: 0 0 auto; }
.row > input, .row > select { flex: 1 1 12rem; width: auto; }
.error { color: var(--loss); font-weight: 700; }
.outcome {
  margin: 0;
  background: var(--navy);
  color: #fff;
  border-radius: 999px;
  padding: .2rem .7rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: .85rem;
}
.round { margin: 0 0 .65rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.section__heading { margin: 0; font-size: 1rem; }
.section__toggle {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem .9rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.section__name { font-family: var(--display); font-weight: 700; }
.section__summary { margin-left: auto; color: var(--ink-2); font-weight: 700; font-size: .85rem; font-family: var(--body); text-align: right; }
.section__chevron {
  width: .5rem;
  height: .5rem;
  flex: 0 0 auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  margin-top: -.15rem;
}
.round.is-open .section__chevron { transform: rotate(45deg); margin-top: .15rem; }
.section__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .2s ease; }
.round.is-open .section__body { grid-template-rows: 1fr; }
.section__inner { overflow: hidden; }
.section__inner .match-list { padding: 0 .75rem .75rem; }
.round h3 { margin: 0; font-size: .95rem; }
.match-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.match { padding: .65rem .75rem; border-left: 4px solid transparent; }
.match.is-followed { border-left-color: var(--teal); }
.match__top, .sides { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.match__top { color: var(--ink-2); font-size: .9rem; }
.num { font-family: var(--display); font-weight: 700; color: var(--ink); }
.side { margin: .2rem 0 0; }
.side.is-winner { font-weight: 800; }
.setboard { display: grid; row-gap: .12rem; margin-top: .35rem; min-width: 0; }
.setboard__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(var(--sets, 0), 1.6rem) var(--won, 0px);
  column-gap: .15rem;
  align-items: center;
  min-width: 0;
}
.setboard { --sets: 0; --won: 0px; }
.setboard__head .setboard__h {
  color: var(--ink-2);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-align: center;
}
.setboard__team {
  display: flex;
  align-items: center;
  gap: .35rem;
  min-width: 0;
}
.setboard__name {
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.15;
}
@media (max-width: 359px) {
  .setboard__row {
    grid-template-columns: minmax(0, 1fr) repeat(var(--sets), 1.35rem) var(--won, 0px);
    column-gap: .1rem;
  }
}
.setboard__team.is-winner .setboard__name,
.setboard__team.is-winner .setboard__id { font-weight: 800; }
.setboard__won {
  color: var(--teal-deep);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-align: center;
  text-transform: uppercase;
}
.setboard__n {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  text-align: center;
}
.setboard__n.is-set-win { font-weight: 800; color: var(--teal-deep); }
.setboard__row.is-followed {
  background: color-mix(in srgb, var(--teal) 12%, transparent);
  border-radius: 8px;
}
.setboard__id {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  margin-inline: auto;
}
.setboard__id .seed { flex: none; }
.setboard__id .team-row__name {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 1 auto;
  width: auto;
  max-width: 100%;
  min-width: 0;
}
.setboard__id .place-teams,
.setboard__id .place-label {
  width: auto;
  max-width: 100%;
  text-align: center;
  white-space: normal;
  overflow-wrap: break-word;
}
:root[data-theme="dark"] .setboard__n.is-set-win,
:root[data-theme="dark"] .setboard__won { color: #7ddecb; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .setboard__n.is-set-win,
  :root:not([data-theme="light"]) .setboard__won { color: #7ddecb; }
}
.feed { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .65rem; }
.feed li { border-top: 1px solid var(--line); padding-top: .65rem; }
.feed time { display: block; color: var(--ink-2); font-size: .85rem; }
.hero { width: min(1080px, calc(100% - 2rem)); margin: 1rem auto 0; }
.hero__card {
  --hero-pad-x: .9rem;
  max-width: 32rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0 0 1.05rem;
  overflow: hidden;
}
.hero__kicker {
  margin: 0;
  padding: .72rem var(--hero-pad-x) .68rem;
  text-align: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: .06em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
  background: #002855;
  color: #fff;
}
.hero__card[data-kind="live"] .hero__kicker {
  background: #b42318;
  color: #fff;
}
:root[data-theme="dark"] .hero__kicker {
  background: #f4f7fb;
  color: #002855;
}
:root[data-theme="dark"] .hero__card[data-kind="live"] .hero__kicker {
  background: #fde8e6;
  color: #7f1d1d;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero__kicker {
    background: #f4f7fb;
    color: #002855;
  }
  :root:not([data-theme="light"]) .hero__card[data-kind="live"] .hero__kicker {
    background: #fde8e6;
    color: #7f1d1d;
  }
}
.hero__body { padding: .8rem var(--hero-pad-x) 0; }
.hero__top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.hero__set { margin: 0; color: var(--ink-2); font-size: .82rem; font-weight: 800; text-align: right; }
.hero h2 { margin: .7rem 0 0; font-size: 1.15rem; }
.hero__when {
  margin: 0;
  padding: .62rem var(--hero-pad-x);
  text-align: center;
  color: var(--ink);
  font-weight: 800;
  font-size: .95rem;
  line-height: 1.35;
  background: color-mix(in srgb, var(--teal) 16%, var(--surface));
}
.hero__photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: color-mix(in srgb, var(--teal) 18%, var(--surface));
}
.hero__thanks {
  margin: .95rem var(--hero-pad-x) .15rem;
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.15rem, 4.5vw, 1.45rem);
  line-height: 1.25;
}
.hero__card[data-kind="season"].is-nophoto {
  padding: 1.6rem var(--hero-pad-x) 1.4rem;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--teal) 28%, transparent), transparent 58%),
    var(--surface);
}
.hero__card[data-kind="season"].is-nophoto .hero__photo { display: none; }
.hero__scoreline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: .45rem;
  align-items: center;
  margin-top: 0;
}
.hero__side { min-width: 0; text-align: center; }
.serve-choice { margin-top: .75rem; align-self: center; max-width: 100%; }
.hero__side.is-followed {
  background: color-mix(in srgb, var(--teal) 14%, transparent);
  border-radius: 10px;
  padding: .45rem .3rem .55rem;
}
.hero__team--pending {
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
  gap: .15rem;
}
.hero__place-label, .place-label {
  display: block;
  width: 100%;
  text-align: center;
  color: var(--ink-2);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .03em;
  line-height: 1.2;
}
.place-teams { display: block; text-align: center; }
.hero__team--pending .hero__name { flex: none; width: 100%; }
.hero__team {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  margin: 0 auto;
  width: fit-content;
  min-width: 0;
  max-width: 100%;
  font-family: var(--display);
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.15;
  white-space: normal;
}
.hero__name {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  text-align: center;
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.15;
}
.hero__name.is-long { font-size: .82em; }
.hero__name.is-tight {
  font-size: .68em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.hero__seed {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.45rem;
  height: 1.45rem;
  padding: 0;
  border-radius: 32%;
  background: var(--teal);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 899px) {
  .hero__team { font-size: .74rem; gap: .16rem; }
  .hero__seed { width: 1.15rem; height: 1.15rem; font-size: .64rem; }
  .hero__side.is-followed { padding-inline: .18rem; }
  .hero__scoreline { gap: .22rem; }
}
@media (max-width: 370px) {
  .hero__team { font-size: .68rem; gap: .12rem; }
  .hero__seed { width: 1.05rem; height: 1.05rem; font-size: .58rem; }
  .hero__side.is-followed { padding-inline: .12rem; }
  .hero__scoreline { gap: .14rem; }
}
:root[data-theme="dark"] .hero__seed { background: #5ee0c8; color: #04241e; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero__seed { background: #5ee0c8; color: #04241e; }
}
.hero__points {
  margin: .15rem 0 .05rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 3.4rem;
  line-height: .9;
  font-variant-numeric: tabular-nums;
}
.hero__mid { text-align: center; padding-inline: .1rem; }
.hero__sets-label, .hero__vs {
  margin: 0;
  color: var(--ink-2);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hero__sets-num {
  margin: .1rem 0 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}
.serve {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 1.2rem;
  margin: .2rem 0 0;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.serve__dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--teal); }
.hero .point { width: 100%; min-height: 52px; margin-top: .45rem; }
.hero .point-fix { width: auto; align-self: center; min-height: 36px; margin-top: 1rem; padding: .15rem .9rem; }
.hero__controls { position: relative; z-index: 6; display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .85rem; }
.hero__controls button { flex: 1 1 calc(50% - .4rem); }
.hero button:disabled { opacity: .45; cursor: default; }
.hero__side.is-followed .point { background: var(--teal-deep); border-color: var(--teal-deep); color: #fff; }
.set-pills { display: flex; flex-wrap: wrap; gap: .35rem; margin: .85rem 0 0; }
.set-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .12rem .6rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.hero__place { margin: .7rem 0 0; font-family: var(--display); font-weight: 700; }
.hero__prompt { margin: .15rem 0 .85rem; font-weight: 800; text-align: center; }
.hero__reopen { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .85rem; align-items: center; }
.hero__reopen .hero__prompt { flex: 1 1 100%; margin: 0; text-align: left; }
.hero__status { margin: .7rem 0 0; font-weight: 700; min-height: 1.4em; }
.hero__status.is-stuck {
  margin-top: .7rem;
  padding: .5rem .75rem;
  border-radius: 8px;
  background: #fff1e6;
  color: #8a3412;
  font-weight: 800;
}
:root[data-theme="dark"] .hero__status.is-stuck { background: #4a2616; color: #ffd8bf; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero__status.is-stuck { background: #4a2616; color: #ffd8bf; }
}
.hero__activity.is-other { font-weight: 800; color: var(--ink); }
.hero__stats { margin-top: 1rem; display: grid; gap: .85rem; min-width: 0; }
.hero__stats > * { min-width: 0; max-width: 100%; }
.hero__stats h3 { margin: 0; font-size: 1rem; }
.hero__key { margin: .2rem 0 0; }
.player-block { margin-top: .65rem; }
.player-block__name { margin: 0 0 .25rem; font-weight: 800; }
.stat-pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.stat-pill {
  min-height: 64px;
  padding: .45rem .9rem;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 800;
}
.stat-pill.is-open { background: var(--navy); color: #fff; border-color: var(--navy); }
.stat-picker {
  margin-top: .35rem;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--teal) 10%, var(--surface));
}
.stat-picker__name { margin: 0 0 .45rem; font-weight: 800; }
.stat-picker__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.stat-picker .stat-btn { min-width: 4.5rem; min-height: 64px; flex: 1 1 4.5rem; }
.stat-undo { width: 100%; margin-top: .35rem; }
.stat-note { margin: .35rem 0 0; font-weight: 800; color: var(--teal-deep); }
:root[data-theme="dark"] .stat-note { color: #7ddecb; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .stat-note { color: #7ddecb; }
}
.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .25rem; width: 100%; }
.hero .stat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 44px;
  min-height: 44px;
  padding: .15rem .1rem;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: .72rem;
  line-height: 1.15;
}
@media (max-width: 899px) {
  .hero .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem .65rem; }
  .hero .stat-btn { min-height: 64px; min-width: 0; padding: .5rem .45rem; font-size: .85rem; }
  .hero .point { min-height: 52px; margin-top: .7rem; }
  .hero .point-fix { min-height: 36px; margin-top: 1.05rem; }
}
.hero__sticky {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  gap: .35rem;
  margin: 0 0 .35rem;
  padding: .45rem .55rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.hero__sticky-row { display: flex; gap: .45rem; }
.hero__sticky-side { display: flex; align-items: center; gap: .35rem; flex: 1; min-width: 0; }
.hero__sticky-name { font-weight: 800; font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero__sticky-score { font-size: 1.35rem; line-height: 1; font-variant-numeric: tabular-nums; }
.hero__sticky .point { width: auto; min-height: 44px; margin: 0; padding: .2rem .65rem; }
.hero__role { margin: .2rem 0 .55rem; font-weight: 800; font-size: .92rem; line-height: 1.35; }
.hero__sticky .hero__role { margin: 0; font-size: .75rem; }
.stat-btn__n { font-variant-numeric: tabular-nums; font-size: .95rem; }
.tally-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.tally { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tally__note { margin: .15rem 0 .4rem; color: var(--ink-2); font-size: .75rem; line-height: 1.35; }
.tally th, .tally td { padding: .28rem .2rem; text-align: center; font-variant-numeric: tabular-nums; }
.tally th:first-child, .tally td:first-child, .tally th[scope="row"] { text-align: left; font-variant-numeric: normal; }
.tally thead th { padding: 0; color: var(--ink-2); font-family: var(--display); font-size: .72rem; letter-spacing: .04em; }
button.tally__sort {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: .35rem .2rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  letter-spacing: inherit;
}
.tally th:first-child button.tally__sort { justify-content: flex-start; }
.tally td.is-high {
  font-weight: 800;
  background: color-mix(in srgb, var(--teal) 22%, transparent);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tally td.is-high {
    background: color-mix(in srgb, var(--teal) 42%, transparent);
  }
}
:root[data-theme="dark"] .tally td.is-high {
  background: color-mix(in srgb, var(--teal) 42%, transparent);
}
.set-switch { display: flex; flex-wrap: wrap; gap: .35rem; margin: .2rem 0 .45rem; }
.set-switch button[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.stat-section__title {
  margin: .85rem 0 .25rem;
  font-size: .75rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.stat-bench {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 64px;
  margin-top: .65rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.stat-bench__chevron {
  width: .55rem;
  height: .55rem;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -.15rem;
  flex: none;
}
.stat-bench[aria-expanded="true"] .stat-bench__chevron {
  transform: rotate(225deg);
  margin-top: .15rem;
}
.stat-bench-panel { margin-top: .5rem; }
.stat-bench-panel[hidden] { display: none !important; }
.hero__sync {
  margin: .15rem 0 .75rem;
  padding: .4rem .65rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: .82rem;
  background: var(--paper);
  color: var(--ink-2);
}
.hero__sync.is-waiting { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.tally tbody th { font-weight: 800; }
@media (min-width: 900px) {
  .hero { width: 100%; max-width: none; margin-left: 0; margin-right: 0; }
  .hero__card {
    --hero-pad-x: clamp(1.5rem, 4vw, 3rem);
    max-width: none;
    width: 100%;
    border-radius: 0;
    padding: 0 0 1.65rem;
  }
  .hero__scoreline { gap: 1.5rem; align-items: stretch; }
  .hero__scoreline .hero__mid { align-self: center; }
  .hero__side { display: flex; flex-direction: column; justify-content: center; padding: .9rem 1rem 1rem; }
  .hero__side.is-followed { padding: 1.1rem 1.35rem 1.2rem; }
  .hero__team { font-size: 1.5rem; }
  .hero__seed { width: 1.85rem; height: 1.85rem; font-size: .95rem; }
  .hero__when { font-size: 1.05rem; }
  .hero__points { font-size: clamp(4.6rem, 7vw, 6.25rem); }
  .hero__sets-label, .hero__vs { font-size: .85rem; }
  .hero__sets-num { font-size: 2.15rem; }
  .hero__card:not([data-kind="live"]) {
    --hero-pad-x: clamp(2rem, 5vw, 4.5rem);
    padding-bottom: 2.4rem;
  }
  .hero__card:not([data-kind="live"]) .hero__when { font-size: 1.2rem; padding-block: .8rem; }
  .hero__card:not([data-kind="live"]) .hero__team { font-size: clamp(2.4rem, 4vw, 3.1rem); gap: .6rem; }
  .hero__card:not([data-kind="live"]) .hero__seed { width: 1.7em; height: 1.7em; font-size: .72em; }
  .hero__card:not([data-kind="live"]) .hero__side { padding-block: 1.35rem; }
  .hero__card:not([data-kind="live"]) .hero__side.is-followed { padding: 1.6rem 1.75rem 1.75rem; }
  .hero__card:not([data-kind="live"]) .hero__vs,
  .hero__card:not([data-kind="live"]) .hero__sets-label { font-size: 1.2rem; }
  .hero__card:not([data-kind="live"]) .hero__sets-num { font-size: 3.1rem; }
  .hero__card:not([data-kind="live"]) .hero__points { font-size: 8rem; }
  .hero__card:not([data-kind="live"]) .set-pill { font-size: 1.15rem; padding: .28rem .9rem; }
  .hero__stats h3 { font-size: 1.25rem; }
  .hero .tally { table-layout: fixed; font-size: 1.05rem; }
  .hero .tally td { padding: .7rem 1rem; }
  .hero .tally thead th { padding: 0; }
  .hero button.tally__sort { padding: .7rem 1rem; }
  .hero .tally th:first-child,
  .hero .tally td:first-child,
  .hero .tally th[scope="row"] { width: 32%; }
  .hero .tally th:not(:first-child),
  .hero .tally td:not(:first-child) { text-align: center; }
}
@media (max-width: 899px) {
  .hero__card:not([data-kind="live"]) {
    --hero-pad-x: .7rem;
    padding-bottom: 1.5rem;
  }
  .hero__card:not([data-kind="live"]) .hero__when { font-size: .98rem; }
  .hero__card:not([data-kind="live"]) .hero__scoreline {
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
    gap: .55rem;
  }
  .hero__card:not([data-kind="live"]) .hero__side {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .hero__card:not([data-kind="live"]) .hero__team {
    width: fit-content;
    max-width: 100%;
    min-width: 0;
  }
  .hero__card:not([data-kind="live"]) .hero__team { font-size: clamp(1.2rem, 5.6vw, 1.7rem); gap: .4rem; }
  .hero__card:not([data-kind="live"]) .hero__seed { width: 1.7em; height: 1.7em; font-size: .7em; }
  .hero__card:not([data-kind="live"]) .hero__side { padding-block: .85rem; }
  .hero__card:not([data-kind="live"]) .hero__side.is-followed { padding: 1rem .85rem 1.15rem; }
  .hero__card:not([data-kind="live"]) .hero__vs,
  .hero__card:not([data-kind="live"]) .hero__sets-label { font-size: .9rem; }
  .hero__card:not([data-kind="live"]) .hero__sets-num { font-size: 1.42rem; }
  .hero__card:not([data-kind="live"]) .hero__points { font-size: 4.2rem; }
  .hero__card:not([data-kind="live"]) .set-pill { font-size: .95rem; padding: .16rem .65rem; }
}
.roster-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4.2rem 4.2rem auto;
  gap: .4rem;
  align-items: center;
  margin-top: .45rem;
}
.roster-line button { padding-inline: .55rem; }
.admin-fold { padding: 0; }
.admin-fold > summary,
.admin-fold summary {
  list-style: none;
}
.admin-fold summary::-webkit-details-marker { display: none; }
.admin-fold > summary {
  min-height: 48px;
  padding: .85rem 1rem;
  font-weight: 700;
}
.admin-fold > summary::after,
.admin-block > summary::after {
  content: "";
  width: .5rem;
  height: .5rem;
  margin-left: auto;
  flex: none;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}
.admin-fold[open] > summary::after,
.admin-block[open] > summary::after { transform: rotate(45deg); }
.admin-fold__body { padding: .15rem 1rem 1.15rem; }
.admin-fold details { margin-top: 0; }
.admin-block {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.admin-block > h3,
.admin-block > summary {
  margin: 0;
  min-height: 44px;
  font-size: 1.05rem;
  font-weight: 700;
}
.admin-fold .split {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}
#undo-reset { margin-top: .5rem; }
@media (max-width: 380px) {
  .roster-line { grid-template-columns: minmax(0, 1fr) 3.4rem 3.4rem; }
  .roster-line button { grid-column: 1 / -1; }
}

.admin { margin: 1rem auto 0; }
details { margin-top: 1rem; }
summary { cursor: pointer; font-family: var(--display); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.foot { padding: 1.5rem 0 calc(2rem + env(safe-area-inset-bottom)); color: var(--ink-2); font-size: .9rem; }
.foot a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  .track { scroll-behavior: auto; }
  .section__body { transition: none; }
  * { transition: none !important; }
}
