.sp-schedule {
  --sp-line: #d6dfd7;
  --sp-muted: #506459;
  --sp-ink: #1b3529;
  --sp-green: #20523c;
  color: var(--sp-ink);
  min-width: 0;
  font-variant-numeric: tabular-nums;
}
.sp-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.sp-heading h2 { margin: 0; }
.sp-heading > span, .sp-slot small, .sp-pair small, .sp-set-scores { color: var(--sp-muted); }
.sp-heading > span { font-size: 13px; }
.sp-toolbar { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 14px 0 16px; }
.sp-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid #b8c8bf; border-radius: 9px; }
.sp-switch button { background: transparent; color: #304b3b; border: 0; border-radius: 6px; padding: 6px 13px; min-height: 36px; font: inherit; font-size: 14px; }
.sp-switch button[aria-pressed=true] { color: #fff; background: var(--sp-green); }
.sp-mine { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; cursor: pointer; font-size: 14px; }
.sp-mine input { width: 17px; min-height: 0; height: 17px; margin: 0; padding: 0; accent-color: var(--sp-green); }
.sp-schedule h3 { margin: 18px 0 7px; font-size: 17px; letter-spacing: -.015em; }
.sp-day h4 { margin: 16px 0 5px; color: var(--sp-muted); font-size: 13px; font-weight: 600; }
.sp-day h4 + h3 { margin-top: 3px; }
.sp-cards, .sp-courts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); gap: 10px; align-items: start; }
.sp-card, .sp-list, .sp-court { background: #fff; border: 1px solid var(--sp-line); border-radius: 9px; min-width: 0; }
.sp-schedule .sg-match { display: block; text-decoration: none; color: inherit; overflow-wrap: anywhere; }
.sp-card { padding: 10px 13px; }
.sp-card-meta { display: flex; gap: 2px 7px; flex-wrap: wrap; align-items: baseline; color: var(--sp-muted); font-size: 12px; }
.sp-schedule .sp-state, .sp-schedule .sp-pair strong, .sp-schedule .sp-score strong { font-size: inherit; }
.sp-state { font-weight: 700; }
.sp-live { color: #165d3d; }
.sp-live::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #258053; }
.sp-paused { color: #785319; }
.sp-score { margin: 3px 0 0; display: grid; align-items: baseline; gap: 2px 10px; line-height: 1.35; }
.sp-cols-0 { grid-template-columns: minmax(0,1fr); }
.sp-cols-1 { grid-template-columns: minmax(0,1fr) auto; }
.sp-cols-2 { grid-template-columns: minmax(0,1fr) auto auto; }
.sp-score strong { font-weight: 600; }
.sp-score small, .sp-number { text-align: center; }
.sp-score small { font-size: 11px; color: var(--sp-muted); }
.sp-number { min-width: 32px; padding: 1px 4px; }
.sp-point { color: #185435; background: #edf4ee; border-radius: 4px; font-weight: 700; }
.sp-set-scores { display: block; font-size: 12px; margin-top: 5px; }
.sp-list { overflow: clip; }
.sp-schedule .sp-row { display: grid; align-items: center; grid-template-columns: minmax(72px, 115px) minmax(0, 1fr); gap: 10px; min-height: 44px; padding: 7px 13px; }
.sp-row + .sp-row { border-top: 1px solid var(--sp-line); }
.sp-slot, .sp-pair { display: grid; gap: 1px; }
.sp-schedule .sp-pair strong { font-weight: 600; }
.sp-pair { font-size: 14px; }
.sp-slot small, .sp-pair small { font-size: 12px; line-height: 1.35; }
.sp-slot b, .sp-final { font-size: 13px; }
.sp-final { font-weight: 600; color: var(--sp-green); }
.sp-mine-tag { display: inline-block; color: #285233; padding: 1px 5px; border-radius: 4px; background: #dfeddc; white-space: nowrap; font-weight: 550; font-size: 11px; }
.sp-schedule .sp-own { background-color: #f1f7ed; }
.sp-judge-match { min-width: 0; }
.sp-list > * + .sp-judge-match, .sp-list > .sp-judge-match + .sp-row, td > * + .sp-judge-match { border-top: 1px solid var(--sp-line); }
.sp-cards > .sp-judge-match { border: 1px solid var(--sp-line); border-radius: 9px; background: #fff; }
.sp-cards > .sp-judge-match > .sp-card { border: 0; }
.sp-judge-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; padding: 0 7px; }
.sp-judge-actions .text-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; margin: 0; padding: 2px 3px; font-size: 13px; }
@media (pointer: coarse) {
  .sp-judge-actions .text-btn { min-height: 44px; }
}
.sp-results { margin: 15px 0 0; }
.sp-results > summary { cursor: pointer; width: fit-content; padding: 8px 0; font-weight: 650; }
.sp-results > summary span { color: var(--sp-muted); font-weight: 400; }
.sp-court { padding: 0 12px 10px; }
.sp-court > h3 { border-bottom: 1px solid var(--sp-line); margin: 0; padding: 10px 0 7px; }
.sp-court .sp-cards { grid-template-columns: 1fr; gap: 0; }
.sp-court .sp-card, .sp-court .sp-list { border: 0; border-radius: 0; }
.sp-court .sp-card { border-bottom: 1px solid var(--sp-line); padding: 9px 0; }
.sp-court .sp-row { grid-template-columns: minmax(55px, 72px) minmax(0,1fr); padding: 7px 2px; }
.sp-court .sp-results { margin-top: 4px; }
.sp-empty { color: var(--sp-muted); padding: 15px 0; }
.sp-schedule :is(a, button, input, summary):focus-visible { outline: 2px solid #26714f; outline-offset: 2px; }
.sp-schedule .sp-row:focus-visible { outline-offset: -2px; }
.sp-schedule ::selection { color: #183927; background: #cfe5d6; }
@media (hover: hover) {
  .sp-schedule .sg-match:hover { background-color: #edf4ee; }
  .sp-switch button[aria-pressed=false]:hover { background-color: #e7eee9; }
}
@media (max-width: 650px) {
  .sp-toolbar { margin: 10px 0; gap: 1px 6px; }
  .sp-switch button { padding-inline: 9px; font-size: 13px; }
  .sp-mine { font-size: 13px; }
  .sp-cards, .sp-courts { grid-template-columns: minmax(0,1fr); gap: 7px; }
  .sp-card { padding: 8px 10px; }
  .sp-schedule .sp-row { grid-template-columns: 70px minmax(0,1fr); gap: 5px; padding: 7px 9px; }
  .sp-court .sp-row { padding-inline: 0; }
}
@media (min-width: 900px) {
  .sp-feed .sp-row { grid-template-columns: 85px minmax(75px,.45fr) minmax(0,1.65fr) minmax(0,1fr); gap: 2px 12px; }
  .sp-feed .sp-slot, .sp-feed .sp-pair { display: contents; }
  .sp-feed .sp-slot b { grid-column: 1; grid-row: 1; }
  .sp-feed .sp-slot small { grid-column: 2; grid-row: 1; }
  .sp-feed .sp-contest { grid-column: 3; grid-row: 1; }
  .sp-feed .sp-pair > .sp-card-meta { grid-column: 4; grid-row: 1; }
}

/* The public grid shares the time and court headings across matches. */
.sp-matrix { border: 1px solid #bccfc7; border-radius: 12px; overflow: clip; background: #fff; }
.sp-matrix table { width: 100%; table-layout: fixed; border-spacing: 0; }
.sp-matrix th { text-align: left; padding: 7px 10px; overflow-wrap: anywhere; }
.sp-matrix thead th { background: #204e45; color: white; font-size: 13px; }
.sp-matrix th:first-child { width: 90px; }
.sp-matrix tbody th { background: #e5efec; color: #244b42; font-size: 15px; }
.sp-matrix td { padding: 0; vertical-align: top; border-left: 1px solid var(--sp-line); }
.sp-matrix tr + tr > *, .sp-grid-match + .sp-grid-match { border-top: 1px solid var(--sp-line); }
.sp-schedule .sp-grid-match { padding: 5px 9px 6px; min-height: 44px; line-height: 1.3; }
.sp-grid-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; margin-bottom: 2px; color: #405d52; font-size: 11px; }
.sp-grid-meta .sp-state { color: #195e4d; }
.sp-grid-court { display: none; }
.sp-link-time { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.sp-cat { display: inline-block; padding: 1px 5px; border-radius: 4px; max-width: 100%; }
.sp-cat::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 4px; background: currentColor; }
.sp-tone-0 { color: #234f81; background: #e4edfa; }
.sp-tone-0::before { border-radius: 50%; }
.sp-tone-1 { color: #633d85; background: #f0e8f7; }
.sp-tone-1::before { width: 6px; height: 6px; transform: rotate(45deg); }
.sp-tone-2 { color: #744318; background: #fbebd9; }
.sp-tone-2::before { clip-path: polygon(50% 0,100% 100%,0 100%); }
.sp-stage, .sp-source, .sp-contest .sp-team { display: block; }
.sp-stage, .sp-source { font-size: 12px; line-height: 1.3; color: var(--sp-muted); }
.sp-stage { font-weight: 600; }
.sp-stage-major { font-size: 14px; color: var(--sp-ink); }
.sp-grid-match .sp-team { display: block; font-size: 14px; }
.sp-grid-match .sp-score { font-size: 14px; gap: 1px 4px; margin: 0; }
.sp-grid-match .sp-score small { font-size: 10px; }
.sp-grid-match .sp-number { min-width: 17px; padding: 0 2px; }
.sp-schedule .sp-grid-match:focus-visible { outline-offset: -2px; }
.sp-many-courts thead { display: none; }
.sp-many-courts tbody, .sp-many-courts table { display: block; }
.sp-many-courts tbody tr { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.sp-many-courts tbody th:first-child { width: auto; grid-column: 1/-1; }
.sp-many-courts td { border-top: 1px solid var(--sp-line); }
.sp-many-courts .sp-unused { display: none; }
.sp-many-courts .sp-grid-court { display: inline; }
@media (max-width: 700px) {
  .sp-matrix thead { display: none; }
  .sp-matrix tbody, .sp-matrix table { display: block; }
  .sp-matrix tbody tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sp-one-court tbody tr { grid-template-columns: minmax(0,1fr); }
  .sp-matrix tbody th:first-child { width: auto; grid-column: 1/-1; padding: 3px 7px; }
  .sp-matrix .sp-last-single { grid-column: 1/-1; }
  .sp-matrix td { border-top: 1px solid var(--sp-line); }
  .sp-matrix .sp-unused { display: none; }
  .sp-grid-court { display: inline; }
  .sp-schedule .sp-grid-match { padding: 4px 6px; }
  .sp-grid-match .sp-score, .sp-grid-match .sp-team { font-size: 13px; }
  .sp-grid-match .sp-score { column-gap: 4px; }
  .sp-grid-meta { gap: 2px 4px; }
}
