:root:not(.alt) .statusbar { display: none; }

:root.alt { --warn: #ffb347; --well: var(--panel); --well-hover: color-mix(in srgb, var(--text) 3.5%, var(--panel)); }
:root.alt[data-theme="current"] { --dim: #798d85; --muted: #88a298; }
:root.alt[data-theme="roland-garros"] { --dim: #f3dfd5; --muted: #f7decf; }
:root.alt[data-theme="australian-open"] { --dim: #aec3e3; }
:root.alt[data-theme="us-open"] { --dim: #858eb3; }
:root.alt[data-theme="wimbledon"] { --dim: #a4c1b0; }
:root.alt[data-theme="dark"] { --dim: #85858c; }
:root.alt[data-theme="light"] { --dim: #5f6562; --muted: #5f6864; --accent: #097449; --live: #097449; --warn: #8a4700; }

.alt body:not(.nav-open) .sidebar > .statusbar { display: flex; }
.alt body.nav-open .statusbar { display: none; }

.alt .statusbar {
  align-items: center;
  gap: 6px 16px;
  min-width: 0;
}

.alt .views {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--panel);
  border-radius: 10px;
}

.alt .views button {
  padding: 5px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.alt .views button:hover { color: var(--text); }
.alt .views button[aria-pressed="true"] { background: var(--field); color: var(--text); }

.alt .zone-quick {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.alt .zone-quick select {
  min-width: 0;
  max-width: 230px;
  padding: 6px 4px;
  field-sizing: content;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: none;
  border: 0;
  border-radius: 8px;
  text-overflow: ellipsis;
  cursor: pointer;
}

.alt .zone-quick select:hover { background: var(--panel); }
.alt .zone-quick select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.alt .feed {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.alt .feed:empty { display: none; }
.alt .feed.warn { color: var(--warn); font-weight: 500; }

@media (min-width: 901px) {
  .alt body:not(.nav-open) .sidebar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-right: 18px;
  }
}

@media (max-width: 900px) {
  .alt .statusbar { flex: 1 1 auto; justify-content: flex-end; }
  .alt .controls, .alt .settings { flex-wrap: wrap; }
  .alt .nav-toggle { padding: 12px; }
  .alt h1 a { margin: -9px; padding: 9px; }
  .alt .views button { min-height: 44px; padding: 0 14px; }
  .alt .zone-quick select { min-height: 44px; }
  .alt .tournament summary { min-height: 44px; }
  .alt .show-all { min-height: 44px; }
  .alt .pane .back { width: 44px; height: 44px; top: 6px; right: 6px; }
  .alt .pane-nav a { width: 44px; height: 44px; }
  .alt .admin-toggle { right: 8px; bottom: 8px; }
}

@media (max-width: 640px) {
  .alt body:not(.nav-open) .sidebar > .statusbar { display: contents; }
  .alt .views { margin-left: auto; }
  .alt .zone-quick { flex: 1 1 60%; }
  .alt .zone-quick select { max-width: none; }
  .alt .feed.warn { flex-basis: 100%; }
}

.alt .pulse { animation: none; }

.alt.stale .pulse,
.alt.stale .sets .serve:not(.off) { animation: none; opacity: 0.4; }
.alt .is-live .when small { display: none; }
.alt.stale .is-live .when strong { color: var(--muted); }

.alt .when:is(.delayed, .ended) strong { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; }

.alt .win-tick { flex: none; width: 11px; }
.alt .tally { flex: none; width: 1ch; margin-right: 4px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; font-weight: 400; letter-spacing: 0; text-align: center; }
.alt .player.won .tally { font-weight: 700; }

.alt .sets span:is(.won, .points),
.alt .is-live .sets span.current { color: color-mix(in srgb, var(--win) 86%, var(--bg)); }
.alt .is-live .sets span.won:not(.current) { color: color-mix(in srgb, var(--name), var(--dim)); }

.alt .match.recent { opacity: 1; }
.alt .match.recent .player { color: var(--muted); }
.alt .match.recent .sets span { color: var(--muted); }
.alt .match.recent .stars { color: var(--dim); }
.alt .match.recent .rank.top-ten { color: var(--muted); }

.alt .player > span:not(.cc) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.alt .rank,
.alt .tour,
.alt .sets .game-time { font-size: 11px; }

.alt .stars i { display: none; }

.alt .match .sets span.won { font-weight: 700; }
.alt .sets span.unplayed { font-weight: 700; }

.alt .match + .match { margin-top: 2px; }

.alt #list a.match.selected { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.alt #list a.match.selected .sets > span:is(:nth-child(4n + 1), :nth-child(4n + 2)) { background: var(--well-hover); }


.alt #list a.match.is-post .sets > span:nth-child(n) { background: none; }

.alt .card:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

@container (max-width: 640px) {
  .alt .tournament h2 { font-size: 17px; }
  .alt .match { grid-template-columns: 72px minmax(0, 1fr) auto; }
  .alt .when small { white-space: nowrap; }
  .alt .match .sets { grid-auto-columns: minmax(20px, auto); justify-self: end; }
  .alt .sets .game-time { display: none; }
  .alt .sets span.point-cell { gap: 4px; padding: 2px 0 2px 6px; }
}

.alt .road .result.L { color: var(--muted); }

:root:not(.alt) .chat,
:root:not(.alt) .chat-toggle { display: none; }

.alt .pane-nav { display: grid; grid-template-columns: 1fr auto auto 1fr; align-items: center; }

.alt .chat-toggle {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px 0 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

.alt .chat-toggle:hover { background: var(--panel-alt); }
.alt .chat-toggle[aria-expanded="true"] { background: var(--field); border-color: transparent; }

.alt .pane.chat-open .card { flex: 1 1 0; }
.alt .pane.no-match .pane-nav,
.alt .card[hidden] { display: none; }
.alt .pane.no-match { bottom: 62px; }

.alt .chat {
  position: relative;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.alt .chat[hidden] { display: none; }

.alt .chat header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 52px 10px 16px;
}

.alt .chat h2 { margin: 0; font-size: 17px; font-weight: 600; white-space: nowrap; }

.alt .chat-close {
  position: absolute;
  top: 6px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  color: var(--text);
}

.alt .chat-close:hover { background: var(--panel-alt); }

.alt .chat-log {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  margin: 0;
  padding: 12px 16px;
  list-style: none;
  overflow-y: auto;
}

.alt .chat-log:empty::before {
  content: "No messages yet. Be the first to say something.";
  margin: auto;
  max-width: 28ch;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.alt .chat-log li { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 8px; }
.alt .chat-log b { color: var(--text); font-size: 14px; font-weight: 600; }
.alt .chat-log time { color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.alt .chat-log p { grid-column: 1 / -1; margin: 2px 0 0; color: var(--name); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }

.alt .chat-status { margin: 0; padding: 0 16px 6px; color: var(--warn); font-size: 12px; }
.alt .chat-status:empty { display: none; }

.alt .chat-form { display: flex; gap: 8px; padding: 10px 12px 12px; }

.alt .chat-form input {
  min-width: 0;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--field);
  border: 0;
  border-radius: 10px;
}

.alt .chat-form input::placeholder { color: var(--text); opacity: 0.7; }
.alt .chat-form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.alt #chat-name { flex: 0 0 104px; }
.alt #chat-text { flex: 1; }

.alt .chat-form button {
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--text);
  background: var(--panel-alt);
  font-size: 13px;
  font-weight: 600;
}

.alt .chat-form button:hover { background: var(--hover); }

@media (max-width: 900px) {
  .alt .pane.no-match { bottom: 0; }
  .alt .pane.no-match .chat-form { padding-right: 56px; }
  .alt .chat-toggle { height: 44px; border-radius: 22px; }
  .alt .chat-close { width: 44px; height: 44px; top: 1px; right: 4px; }
  .alt .chat-form input, .alt .chat-form button { min-height: 44px; font-size: 16px; }
  .alt #chat-name { flex-basis: 96px; }
}

:root:not(.alt) .pin-toggle { display: none; }
.alt .pin-toggle { grid-column: 4; justify-self: end; }
.alt .pin-toggle[aria-pressed="true"] { background: var(--field); border-color: transparent; }
.alt .pin-toggle[aria-pressed="true"] svg { fill: currentColor; }

.alt .tournament.pinned summary { cursor: default; }
.alt .tournament.pinned summary::before { display: none; }
.alt .tournament.pinned summary:hover h2 { color: inherit; }

.alt .tournament summary { -webkit-user-select: none; user-select: none; }
.alt .tournament.pinned .pin-icon { flex: none; align-self: center; margin-right: -3px; color: var(--muted); }
.alt .match.stub .player { color: var(--dim); }
.alt .match.stub .when strong { color: var(--dim); }

:root:not(.alt) .logo { display: none; }
.alt .logo-classic { display: none; }
.alt .logo { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-size: 24px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.alt .logo span { transform: scaleX(0.82); transform-origin: left; margin-right: -0.5em; }
.alt h1 a:hover { color: var(--text); }
.alt .logo { text-transform: none; }
.alt h1 .logo svg g { stroke: none; }

.alt .row-pin { display: none; }
@container (min-width: 641px) {
  .alt .rows { grid-template-columns: 88px fit-content(300px) minmax(0, 1fr) auto 74px 32px; }
  .alt .row-pin {
    grid-column: 6;
    margin-right: 8px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 28px;
    padding: 0;
    border-radius: 8px;
    color: var(--muted);
    opacity: 0;
  }
  .alt .match:hover .row-pin,
  .alt .row-pin:focus-visible { opacity: 1; }
  .alt .row-pin:hover { color: var(--text); }
  .alt .row-pin:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
  .alt .row-pin[aria-pressed="true"] svg { fill: currentColor; }
}
@container (min-width: 641px) and (max-width: 720px) {
  .alt .rows { grid-template-columns: 82px fit-content(300px) minmax(0, 1fr) auto 74px 32px; }
}
.alt .when.delayed strong { color: var(--dim); }
.alt .match.dim { opacity: 1; }
.alt .sets .point-cell .serve { margin-bottom: 2px; }
.alt .tournament h2 .tour { margin-top: 1px; }
.alt .tournament h2 { line-height: 26px; }
.alt .tournament h2 .tour { line-height: 15px; }

@media (min-width: 901px) {
  .alt body.pane-open .page {
    max-width: min(860px, 100% - 492px);
    margin-right: max(492px, (100% - 860px) / 2);
  }
}
.alt .logo span { color: var(--dim); }
.alt .logo { font-weight: 600; }
.alt .nav-toggle { display: none; }
.alt .chat-toggle:not(.pin-toggle) { display: none; }
.alt .views { background: none; }
.alt .views { gap: 4px; padding: 0; }
.alt .views button { padding: 4px 10px; border-radius: 10px; font-size: 14px; font-weight: 400; }
.alt .views button:hover { background: var(--panel); }
.alt .views button[aria-pressed="true"] { background: var(--panel); color: var(--text); }
.alt .views button[aria-pressed="true"]:hover { background: var(--panel-alt); }

@media (max-width: 640px) {
  .alt .zone-quick { flex: 0 1 auto; }
  .alt .zone-quick select { max-width: 150px; }
}
@media (max-width: 360px) {
  .alt .zone-quick select { max-width: 70px; }
}

.alt .sets > span.set-tally { display: none; order: -1; background: none; color: var(--muted); }
@container (max-width: 640px) {
  .alt .is-live .sets > span:not(.current, .point-cell, .set-tally) { display: none; }
  .alt .is-live .sets > span.set-tally { display: block; }
  .alt .is-live .sets > span.current { background: none; }
}
.alt .views { -webkit-user-select: none; user-select: none; }

:root:not(.alt) .settings-link { display: none; }
.alt .admin-toggle { display: none; }
.alt .settings-link { padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.alt .settings-link:hover { color: var(--text); }
.alt .settings-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@container (max-width: 640px) {
  .alt .match { row-gap: 2px; }
  .alt .match > :is(.when, .players) { grid-row: 1 / span 2; }
  .alt .match > .meta { grid-column: 3; grid-row: 1; align-self: end; text-align: right; white-space: nowrap; }
  .alt .match > .stars { grid-column: 3; grid-row: 2; align-self: start; justify-self: end; text-align: right; color: var(--muted); }
  .alt .match:has(.sets > *) > :is(.when, .players) { grid-row: 1 / span 3; }
  .alt .match:has(.sets > *) > .meta { grid-row: 2; }
  .alt .match:has(.sets > *) > .stars { grid-row: 3; }
}
@container (max-width: 640px) {
  .alt .match { grid-template-columns: 68px minmax(0, 1fr) auto; column-gap: 6px; padding-left: 0; padding-right: 0; }
}
@container (max-width: 640px) {
  .alt .match.is-live > :is(.stars, .meta) { display: none; }
  .alt .match.is-live { row-gap: 0; }
}
.alt .zone-quick select { color: var(--muted); }
.alt .zone-quick select:hover { color: var(--text); }

.more-menu { display: none; }
.alt .views .more-menu { display: block; letter-spacing: 1px; color: var(--muted); }

.levels {
  position: fixed;
  inset: auto;
  margin: 0;
  padding: 8px;
  min-width: 190px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  -webkit-user-select: none;
  user-select: none;
}
.levels label { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.levels label:hover { background: var(--panel-alt); }
.levels input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent, currentColor); }

.alt .levels .zone-quick { display: block; flex: none; margin: 8px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); border-radius: 0; }
.alt .levels .zone-quick:hover { background: none; }
.alt .levels .zone-quick select { width: 100%; max-width: none; min-height: 0; }

.alt body:not(.nav-open), .alt body { --sticky-top: 0px; }

.alt .sets .game-time { padding-left: 12px; white-space: nowrap; }

.levels .featured-row { margin-bottom: 8px; position: relative; }
.levels .featured-row::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; border-top: 1px solid var(--line); }
.levels .featured-row + label { margin-top: 9px; }

.alt .player .home-cc { margin: 0 0 0 4px; vertical-align: 1px; line-height: 15px; }

.alt .tournament.pinned.featured summary { cursor: pointer; }

.alt .tournament.featured .pin-icon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; overflow: visible; }
.alt .tournament.featured[open] .pin-icon { fill: currentColor; }

.alt .tournament.pinned summary { cursor: pointer; }
.alt .tournament.pinned:not(.featured):not([open]) .pin-icon { fill: none; }

.levels .group { padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.levels .group:last-of-type { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
.levels .featured-row { margin-bottom: 0; }
.levels .featured-row::after { display: none; }
.levels .featured-row + label { margin-top: 0; }

.alt .tournament.pinned.no-matches summary { cursor: default; }

@container (min-width: 641px) {
  .alt .rows > .match { grid-template-columns: 76px fit-content(300px) minmax(0, 1fr) auto 74px 20px; column-gap: 14px; }
}
@container (min-width: 641px) and (max-width: 720px) {
  .alt .rows > .match { grid-template-columns: 70px fit-content(300px) minmax(0, 1fr) auto 74px 20px; column-gap: 10px; }
}

.alt .logo span { color: var(--text); }

