    :root {
      --bg: #eef1f6;
      --panel: #ffffff;
      --panel-muted: #f1f5f9;
      --text: #0f172a;
      --muted: #64748b;
      --accent: #2563eb;
      --border: #cbd5e1;
      --ok: #059669;
      --warn: #ca8a04;
      --table-header: #e2e8f0;
      --table-header-text: #475569;
      --sticky-bg: #f8fafc;
      --sticky-bg-hover: #f1f5f9;
      --pre-bg: #f8fafc;
      --row-hover: rgba(37, 99, 235, 0.06);
      --src-dav: #0369a1;
      --src-ifsc: #6d28d9;
      --gender-icon-male: #2563eb;
      --gender-icon-female: #9333ea;
    }
    * { box-sizing: border-box; }
    /**
     * While `preflight.mjs` runs, hide the shell so default DE copy / guest chrome
     * are not painted before resolved locale + auth.
     */
    html.results-booting .app-layout {
      visibility: hidden;
    }
    body {
      margin: 0;
      font-family: "Segoe UI", system-ui, sans-serif;
      background: var(--bg);
      color: var(--text);
      line-height: 1.5;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }
    .app-layout {
      flex: 1;
      display: flex;
      flex-direction: column;
      min-height: 100vh;
    }
    .app-header {
      padding: clamp(0.5rem, 2vw, 1.25rem) clamp(0.35rem, 2.5vw, 0.65rem);
      border-bottom: 1px solid var(--border);
      background: linear-gradient(180deg, #ffffff 0%, var(--panel-muted) 100%);
      flex-shrink: 0;
      box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
      position: relative;
      z-index: 100;
    }
    .header-admin-pending-banner {
      max-width: 1200px;
      margin: 0.65rem auto 0;
      padding: 0.5rem 0.75rem;
      border-radius: 8px;
      border: 1px solid rgba(202, 138, 4, 0.45);
      background: rgba(254, 243, 199, 0.65);
      color: var(--text);
      font-size: 0.86rem;
      line-height: 1.45;
    }
    .header-admin-pending-banner[hidden] {
      display: none !important;
    }
    .header-admin-pending-inner {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.5rem 0.75rem;
    }
    .header-admin-pending-text {
      flex: 1 1 12rem;
      min-width: 0;
      font-weight: 500;
    }
    .header-admin-pending-go {
      flex-shrink: 0;
      font-size: 0.82rem;
      padding: 0.3rem 0.6rem;
      border-radius: 6px;
    }
    .header-admin-pending-dismiss {
      flex-shrink: 0;
      width: 1.75rem;
      height: 1.75rem;
      padding: 0;
      margin: 0;
      font-size: 1.15rem;
      line-height: 1;
      border-radius: 6px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .header-admin-feedback-banner {
      border-color: rgba(37, 99, 235, 0.45);
      background: rgba(219, 234, 254, 0.72);
    }
    .header-user-feedback-prompt {
      max-width: 1200px;
      margin: 0.65rem auto 0;
      padding: 0.65rem 0.85rem;
      border-radius: 8px;
      border: 1px solid rgba(16, 185, 129, 0.4);
      background: rgba(209, 250, 229, 0.55);
      color: var(--text);
      font-size: 0.86rem;
      line-height: 1.45;
    }
    .header-user-feedback-prompt[hidden] {
      display: none !important;
    }
    .header-user-feedback-inner {
      display: flex;
      flex-direction: column;
      gap: 0.65rem;
      align-items: stretch;
      min-width: 0;
    }
    .header-user-feedback-copy {
      flex: 1;
      min-width: 0;
    }
    .header-user-feedback-p {
      margin: 0 0 0.5rem;
      font-weight: 400;
      font-size: 0.84rem;
      line-height: 1.5;
    }
    .header-user-feedback-p:last-child {
      margin-bottom: 0;
      font-style: italic;
      font-weight: 500;
    }
    .header-user-feedback-actions {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: flex-end;
      gap: 0.5rem 0.65rem;
      flex-shrink: 0;
    }
    .header-user-feedback-go {
      flex-shrink: 0;
      font-size: 0.82rem;
      padding: 0.35rem 0.65rem;
      border-radius: 6px;
    }
    .header-user-feedback-dismiss {
      flex-shrink: 0;
      width: 1.75rem;
      height: 1.75rem;
      padding: 0;
      margin: 0;
      font-size: 1.15rem;
      line-height: 1;
      border-radius: 6px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .header-user-feedback-dismiss-forever {
      flex-shrink: 0;
      font-size: 0.78rem;
      padding: 0.3rem 0.55rem;
      border-radius: 6px;
      max-width: 100%;
    }
    .header-user-feedback-dismiss-forever:disabled {
      opacity: 0.55;
      cursor: not-allowed;
    }
    .app-header-inner {
      display: flex;
      align-items: center;
      flex-wrap: nowrap;
      gap: 0.35rem min(0.65rem, 2cqi);
      width: 100%;
      max-width: none;
      margin: 0;
      justify-content: space-between;
      min-width: 0;
      container-type: inline-size;
      container-name: app-header;
    }
    .app-header-end {
      display: flex;
      align-items: center;
      gap: 0.35rem min(0.65rem, 2cqi);
      margin-left: auto;
      flex: 1 1 0;
      flex-wrap: nowrap;
      justify-content: flex-end;
      min-width: 0;
    }
    .app-header-menu-wrap {
      position: relative;
      flex-shrink: 0;
      padding-top: 0.12rem;
    }
    .header-menu-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: clamp(2rem, 5cqi + 1.25rem, 2.65rem);
      height: clamp(2rem, 5cqi + 1.25rem, 2.65rem);
      padding: 0;
      border-radius: 10px;
      background: var(--panel);
      border: 1px solid var(--border);
      color: var(--text);
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
      cursor: pointer;
      flex-shrink: 0;
    }
    .header-menu-btn:hover {
      background: var(--panel-muted);
      border-color: var(--accent);
      color: var(--accent);
    }
    .header-menu-btn svg {
      width: clamp(1rem, 2.5cqi + 0.65rem, 1.4rem);
      height: clamp(1rem, 2.5cqi + 0.65rem, 1.4rem);
    }
    /* Very narrow header: drop settings/menu control; rest of app remains usable (tabs, etc.) */
    @container app-header (max-width: 26rem) {
      .app-header-menu-wrap .header-menu-btn {
        display: none;
      }
    }
    /* Fallback when container queries are unavailable */
    @media (max-width: 380px) {
      .app-header-menu-wrap .header-menu-btn {
        display: none;
      }
    }
    .app-header-brand {
      display: flex;
      align-items: center;
      gap: min(0.28rem, 1cqi);
      flex: 2 1 0;
      min-width: 0;
      max-width: 100%;
      position: relative;
      /* Must allow overflow: the shared #header-menu is moved here on logo tap (see moveHeaderMenuToAnchor). */
      overflow: visible;
    }
    .app-header-climber {
      flex-shrink: 1;
      height: clamp(1.85rem, 12cqi + 0.5rem, 5.1rem);
      width: auto;
      max-width: min(5.85rem, 38cqi);
      display: block;
      object-fit: contain;
      object-position: left center;
      cursor: pointer;
    }
    .app-header-titles {
      flex: 1 1 auto;
      min-width: 0;
      overflow: hidden;
    }
    .header-auth-root {
      flex: 1 1 0;
      min-width: 0;
      max-width: min(100%, 36cqi + 4rem);
      padding: 0.15rem 0;
      padding-top: 0.12rem;
      display: flex;
      align-items: center;
      justify-content: flex-end;
    }
    .header-auth-guest {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: clamp(0.2rem, 0.8cqi, 0.35rem);
      max-width: min(100%, 14rem, 34cqi);
    }
    .header-auth-benefits-hint {
      margin: 0;
      font-size: clamp(0.5rem, 1.1cqi + 0.22rem, 0.72rem);
      line-height: 1.3;
      color: var(--muted);
      text-align: right;
      max-width: 100%;
    }
    .header-auth-benefits-hint-text {
      hyphens: auto;
      -webkit-hyphens: auto;
      overflow-wrap: anywhere;
    }
    a.header-auth-benefits-link {
      color: var(--accent);
      font-weight: 500;
      text-decoration: none;
      white-space: nowrap;
    }
    a.header-auth-benefits-link:hover {
      text-decoration: underline;
    }
    .header-auth-open {
      font: inherit;
      font-size: clamp(0.72rem, 1.85cqi + 0.4rem, 0.88rem);
      font-weight: 600;
      padding: clamp(0.28rem, 0.65cqi, 0.35rem) clamp(0.45rem, 1.4cqi, 0.65rem);
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--panel);
      color: var(--accent);
      cursor: pointer;
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    }
    .header-auth-open:hover {
      background: var(--panel-muted);
      border-color: var(--accent);
    }
    .header-auth-msg-err {
      color: #b91c1c;
    }
    .auth-view-lead {
      margin-bottom: 1rem;
    }
    .auth-view-benefits-teaser {
      margin: 0 0 1rem;
      font-size: 0.88rem;
      line-height: 1.45;
    }
    a.auth-view-benefits-link {
      color: var(--accent);
      font-weight: 500;
      text-decoration: none;
    }
    a.auth-view-benefits-link:hover {
      text-decoration: underline;
    }
    .header-auth-logged-in {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      max-width: min(100%, 15rem);
    }
    .header-auth-user-line {
      display: flex;
      flex-wrap: wrap;
      align-items: baseline;
      justify-content: flex-end;
      gap: 0.2rem 0.35rem;
      font-size: clamp(0.5rem, 0.82cqi + 0.18rem, 0.6rem);
      line-height: 1.2;
      color: var(--text);
      word-break: break-word;
      text-align: right;
      min-width: 0;
    }
    .header-auth-logged-in-as {
      color: var(--muted);
      font-weight: 400;
      white-space: nowrap;
    }
    .header-auth-user-name {
      font-weight: 600;
      min-width: 0;
    }
    .app-header-titles h1,
    h1.app-header-title {
      margin: 0 0 0.12rem;
      line-height: 1.15;
    }
    h1 {
      font-size: 1.35rem;
      font-weight: 600;
      letter-spacing: -0.02em;
    }
    .app-header-titles h1.app-header-title {
      font-size: clamp(0.72rem, 3.2cqi + 0.35rem, 1.35rem);
    }
    .app-header-titles .app-title-home {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .app-header-titles p.sub {
      margin: 0;
      font-size: clamp(0.52rem, 1.55cqi + 0.16rem, 0.8rem);
      line-height: 1.2;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .app-title-home {
      display: block;
      width: 100%;
      margin: 0;
      padding: 0;
      border: none;
      background: none;
      font: inherit;
      font-size: inherit;
      font-weight: inherit;
      letter-spacing: inherit;
      text-align: inherit;
      color: inherit;
      cursor: pointer;
      border-radius: 6px;
    }
    .app-title-home:hover {
      color: var(--accent);
    }
    .app-title-home:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .header-menu {
      position: absolute;
      top: calc(100% + 0.35rem);
      min-width: 12.5rem;
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 10px;
      box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
      padding: 0.4rem;
      z-index: 250;
    }
    .app-header-menu-wrap > .header-menu {
      right: 0;
      left: auto;
    }
    .app-header-brand > .header-menu {
      left: 0;
      right: auto;
    }
    .header-menu[hidden] {
      display: none !important;
    }
    .header-menu button.menu-item {
      display: block;
      width: 100%;
      text-align: left;
      background: transparent;
      border: none;
      color: var(--text);
      box-shadow: none;
      min-height: 2.4rem;
      padding: 0.52rem 0.72rem;
      border-radius: 8px;
      font: inherit;
      font-weight: 500;
      font-size: 0.95rem;
      cursor: pointer;
    }
    /* `display: block` above beats the UA [hidden] rule; force hide when JS sets .hidden */
    .header-menu button.menu-item[hidden] {
      display: none !important;
    }
    .header-menu button.menu-item:hover {
      background: var(--panel-muted);
    }
    .header-menu button.menu-item.menu-item-logout {
      border-top: 1px solid var(--border);
      margin-top: 0.3rem;
      padding-top: 0.55rem;
    }
    .app-settings-view {
      max-width: 720px;
    }
    .app-settings-view.app-speed-records-view {
      max-width: none;
      width: 100%;
      box-sizing: border-box;
    }
    .app-settings-view.app-feedback-view {
      max-width: min(100%, 52rem);
    }
    .app-feedback-view .feedback-form {
      display: flex;
      flex-direction: column;
      gap: 0.85rem;
      margin-top: 0.5rem;
    }
    .feedback-form-field label {
      display: block;
      margin-bottom: 0.25rem;
    }
    .app-feedback-view #feedback-body {
      width: 100%;
      box-sizing: border-box;
      min-height: 16rem;
      resize: vertical;
      font-size: 0.95rem;
      line-height: 1.45;
      padding: 0.55rem 0.65rem;
    }
    .app-feedback-view #feedback-sender-name,
    .app-feedback-view #feedback-sender-email {
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
      font-size: 0.95rem;
      padding: 0.5rem 0.65rem;
      min-height: 2.45rem;
    }
    .feedback-stars {
      display: flex;
      flex-wrap: wrap;
      gap: 0.15rem;
      align-items: center;
    }
    .feedback-star-btn {
      font-size: 1.35rem;
      line-height: 1;
      padding: 0.15rem 0.25rem;
      border: none;
      background: transparent;
      color: var(--muted);
      cursor: pointer;
      border-radius: 4px;
    }
    .feedback-star-btn:hover,
    .feedback-star-btn:focus-visible {
      color: var(--text);
      outline: none;
      box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
    }
    .feedback-star-btn.is-selected {
      color: #ca8a04;
    }
    .feedback-form-status {
      font-size: 0.9rem;
    }
    .feedback-form-status-err {
      color: #b91c1c;
    }
    .feedback-email-alt {
      margin-top: 1.25rem;
    }
    .feedback-email-obfuscated {
      margin: 0.25rem 0 0;
      font-size: 0.82rem;
      line-height: 1.4;
    }
    .feedback-email-obfuscated .feedback-email-link {
      font-size: inherit;
      word-break: break-all;
    }
    .admin-feedback-msg-preview {
      margin: 0;
      max-width: 28rem;
      max-height: 5.5rem;
      overflow: hidden;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 4;
      line-clamp: 4;
      font-size: 0.82rem;
      line-height: 1.45;
      word-break: break-word;
      color: var(--text);
      user-select: text;
      cursor: default;
    }
    .admin-feedback-message-overlay-dialog {
      max-width: min(100%, 40rem);
    }
    .admin-feedback-message-overlay-body {
      max-height: min(70vh, 32rem);
      overflow: auto;
    }
    .admin-feedback-message-readonly {
      margin: 0;
      white-space: pre-wrap;
      word-break: break-word;
      font-size: 0.9rem;
      line-height: 1.5;
      user-select: text;
      cursor: text;
    }
    .admin-feedback-pre {
      margin: 0;
      white-space: pre-wrap;
      word-break: break-word;
      max-height: 12rem;
      overflow: auto;
      font-size: 0.82rem;
    }
    .admin-feedback-row-unread td {
      background: rgba(254, 243, 199, 0.35);
    }
    .admin-feedback-table .admin-feedback-body {
      max-width: 28rem;
    }
    .feedback-donation-block {
      margin-top: 0.35rem;
      padding: 0.65rem 0.75rem;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--panel-muted);
    }
    .feedback-donation-intro {
      margin: 0 0 0.35rem;
    }
    .feedback-donation-line {
      margin: 0;
    }
    .feedback-donation-link {
      font-size: 0.88rem;
      font-weight: 600;
    }
    .admin-feedback-donation-panel {
      margin-bottom: 1.25rem;
      padding: 0.85rem 1rem;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--panel-muted);
    }
    .admin-feedback-donation-panel h3 {
      margin: 0 0 0.5rem;
      font-size: 1rem;
    }
    .admin-feedback-donation-label {
      display: block;
      margin: 0.65rem 0 0.25rem;
      font-weight: 500;
      font-size: 0.88rem;
    }
    .admin-feedback-donation-url {
      width: 100%;
      max-width: 40rem;
      box-sizing: border-box;
      font-size: 0.88rem;
    }
    .admin-feedback-donation-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      margin-top: 0.65rem;
      align-items: center;
    }
    .app-settings-view h2 {
      margin: 0 0 0.5rem;
      font-size: 1.15rem;
    }
    .settings-dl {
      margin: 0;
      display: grid;
      grid-template-columns: minmax(7rem, 10rem) 1fr;
      gap: 0.5rem 1rem;
      font-size: 0.9rem;
    }
    .settings-dl dt {
      margin: 0;
      color: var(--muted);
      font-weight: 500;
    }
    .settings-dl dd {
      margin: 0;
      word-break: break-word;
    }
    .settings-select-wide {
        min-width: min(100%, 22rem);
        max-width: 100%;
    }

    .settings-field-hint {
        margin: 0.35rem 0 0;
        font-size: 0.9em;
    }

    .settings-time-zone-dd {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .settings-dl dd.mono {
      font-family: ui-monospace, monospace;
      font-size: 0.82rem;
    }
    .settings-highlight-athletes,
    .settings-highlight-countries {
      display: flex;
      flex-wrap: wrap;
      gap: 0.35rem 0.65rem;
      align-items: center;
      line-height: 1.5;
    }
    .settings-chip-row {
      display: inline-flex;
      align-items: center;
      gap: 0.15rem;
      max-width: 100%;
    }
    .settings-highlight-athletes .ath-chip,
    .country-chip {
      cursor: default;
      border-bottom: 1px dotted var(--border);
    }
    .settings-chip-remove {
      flex-shrink: 0;
      margin: 0;
      padding: 0 0.2rem;
      min-width: 1.35rem;
      height: 1.35rem;
      line-height: 1;
      font-size: 1rem;
      font-weight: 600;
      border: none;
      border-radius: 4px;
      background: transparent;
      color: var(--muted);
      cursor: pointer;
      box-shadow: none;
    }
    .settings-chip-remove:hover {
      color: #dc2626;
      background: rgba(220, 38, 38, 0.1);
    }
    .settings-chip-remove:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 1px;
    }
    a.settings-open-last-event {
      color: var(--accent);
      text-decoration: none;
    }
    a.settings-open-last-event:hover {
      text-decoration: underline;
    }
    .settings-section {
      margin-bottom: 1.35rem;
    }
    .settings-section h3 {
      margin: 0 0 0.5rem;
      font-size: 0.95rem;
      font-weight: 600;
      color: var(--text);
    }
    .settings-auth-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1.25rem 1.5rem;
      align-items: start;
    }
    @media (max-width: 640px) {
      .settings-auth-grid {
        grid-template-columns: 1fr;
      }
    }
    .settings-auth-grid h4 {
      margin: 0 0 0.5rem;
      font-size: 0.88rem;
      font-weight: 600;
      color: var(--muted);
    }
    .settings-auth-label {
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
      margin-bottom: 0.65rem;
      font-size: 0.85rem;
      font-weight: 500;
      color: var(--text);
    }
    .settings-auth-label input {
      font: inherit;
      padding: 0.35rem 0.5rem;
      border: 1px solid var(--border);
      border-radius: 6px;
      max-width: 100%;
    }
    .settings-auth-msg {
      margin: 0.4rem 0 0;
      font-size: 0.82rem;
      color: var(--muted);
    }
    .settings-auth-msg-err {
      color: #b91c1c;
    }
    .settings-account-actions {
      margin: 0.75rem 0 0;
    }
    .settings-profile-footer-wrap {
      margin-top: 2rem;
      padding-top: 1.35rem;
      border-top: 1px solid var(--border);
    }
    .settings-profile-footer-inner {
      margin: 0;
    }
    a.settings-delete-account-link {
      color: #b91c1c;
      font-size: 0.78rem;
      text-decoration: underline;
    }
    a.settings-delete-account-link:hover {
      color: #991b1b;
    }
    .app-admin-view {
      max-width: 100%;
    }
    .admin-email-form {
      max-width: 36rem;
    }
    .admin-email-actions {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.4rem;
      margin: 1rem 0 0.75rem;
    }
    .admin-email-section button {
      font-size: 0.8rem;
      font-weight: 500;
      line-height: 1.25;
      padding: 0.28rem 0.62rem;
      border-radius: 6px;
    }
    .admin-email-checkbox-label {
      flex-direction: row;
      align-items: center;
      gap: 0.4rem;
    }
    .admin-email-checkbox-label input {
      width: auto;
      margin: 0;
    }
    .admin-email-templates-fieldset {
      margin-top: 1.75rem;
      padding: 1rem 0 0;
      border: none;
      border-top: 1px solid var(--border);
    }
    .admin-email-templates-fieldset > legend {
      padding: 0;
      font-size: 0.95rem;
      font-weight: 600;
      color: var(--text);
    }
    .admin-email-templates-intro {
      margin: 0.5rem 0 0.65rem;
    }
    .admin-email-tpl-lang-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.5rem 0.75rem;
      margin: 0 0 1rem;
    }
    .admin-email-tpl-lang-label {
      font-size: 0.85rem;
      color: var(--text-muted, var(--text));
    }
    .admin-email-tpl-lang-seg {
      display: inline-flex;
      border-radius: 6px;
      border: 1px solid var(--border);
      overflow: hidden;
    }
    .admin-email-tpl-lang-seg .admin-email-tpl-lang-btn {
      margin: 0;
      border: none;
      border-radius: 0;
      box-shadow: none;
    }
    .admin-email-tpl-lang-seg .admin-email-tpl-lang-btn + .admin-email-tpl-lang-btn {
      border-left: 1px solid var(--border);
    }
    .admin-email-tpl-lang-btn.is-active {
      background: var(--accent, var(--text));
      color: var(--accent-contrast, #fff);
    }
    .admin-email-template-details {
      margin-bottom: 1rem;
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 0.5rem 0.75rem;
      background: rgba(0, 0, 0, 0.02);
    }
    .admin-email-template-summary {
      cursor: pointer;
      font-weight: 600;
      font-size: 0.88rem;
      color: var(--text);
    }
    .admin-email-template-ph {
      margin: 0.35rem 0 0.65rem;
      font-size: 0.78rem;
    }
    .admin-email-template-locale {
      margin-top: 0.15rem;
    }
    .admin-email-template-details .admin-tpl-body {
      font-family: ui-monospace, monospace;
      font-size: 0.82rem;
      min-height: 8rem;
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
    }
    .admin-email-footer-details .admin-footer-plain,
    .admin-email-footer-details .admin-footer-html {
      font-family: ui-monospace, monospace;
      font-size: 0.82rem;
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
    }
    .admin-new-user {
      margin-bottom: 1.25rem;
      padding: 0.85rem 1rem;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: var(--panel);
    }
    .admin-new-user-heading {
      margin: 0 0 0.65rem;
      font-size: 1rem;
      font-weight: 600;
    }
    .admin-new-user-fields {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-end;
      gap: 0.65rem 1rem;
    }
    .admin-new-user-label {
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--text-muted);
    }
    .admin-new-user-label input[type="email"],
    .admin-new-user-label input[type="password"],
    .admin-new-user-label input[type="text"],
    .admin-new-user-label select {
      font: inherit;
      font-weight: 400;
      color: var(--text);
      min-width: 10rem;
      max-width: 16rem;
      padding: 0.3rem 0.45rem;
      border: 1px solid var(--border);
      border-radius: 6px;
      box-sizing: border-box;
    }
    .admin-new-user-label select {
      padding: 0.28rem 1.35rem 0.28rem 0.45rem;
      background-color: var(--panel);
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1.41.59L6 5.17 10.59.59 12 2l-6 6-6-6z'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 0.35rem center;
      background-size: 0.5rem;
    }
    .admin-new-user-enabled {
      margin-bottom: 0.15rem;
    }
    .admin-user-create-submit {
      align-self: flex-end;
    }
    .app-admin-view .admin-user-create-submit,
    .app-admin-view .admin-open-new-user-overlay,
    .app-admin-view .admin-open-new-group-overlay {
      padding: 0.28rem 0.55rem;
      font-size: 0.8rem;
      line-height: 1.25;
      border-radius: 6px;
      box-shadow: none;
      box-sizing: border-box;
      min-width: 15.75rem;
    }
    .admin-db-section {
      margin: 0;
    }
    .admin-db-section-inner {
      padding: 0;
    }
    .admin-upstream-debug-toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-end;
      gap: 0.65rem 1rem;
      margin: 0.5rem 0 0.75rem;
    }
    .admin-upstream-debug-field {
      flex: 1 1 18rem;
      min-width: 0;
    }
    .admin-upstream-debug-field label {
      display: block;
      margin-bottom: 0.25rem;
      font-size: 0.78rem;
    }
    .admin-upstream-debug-url {
      width: 100%;
      box-sizing: border-box;
      font-family: var(--font-mono, ui-monospace, monospace);
      font-size: 0.8rem;
    }
    .admin-upstream-debug-meta {
      margin: 0 0 0.5rem;
      font-size: 0.78rem;
    }
    .admin-upstream-debug-body {
      margin: 0;
      max-height: min(70vh, 36rem);
      overflow: auto;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--panel-muted);
    }
    .admin-upstream-debug-body--plain {
      padding: 0.65rem 0.75rem;
      font-size: 0.72rem;
      line-height: 1.35;
      white-space: pre-wrap;
      word-break: break-word;
    }
    .admin-upstream-debug-body.json-tree-holder {
      margin: 0;
      padding: 0.5rem 0.65rem;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
      font-size: 0.76rem;
      line-height: 1.45;
      color: var(--text);
      white-space: normal;
    }
    .admin-table-wrap + .admin-groups-permissions-block {
      margin-top: 1.25rem;
    }
    .admin-db-vacuum-block {
      margin: 0.45rem 0 0.6rem;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.35rem;
      max-width: min(100%, 40rem);
    }
    .admin-db-vacuum-block > p.meta {
      margin: 0;
      font-size: 0.72rem;
      line-height: 1.45;
      color: var(--muted);
    }
    .admin-db-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.45rem;
      align-items: center;
    }
    .app-admin-view .admin-db-section button.admin-db-vacuum-btn.secondary,
    .app-admin-view .admin-db-section button.admin-db-download-btn.secondary {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin: 0;
      padding: 0.2rem 0.55rem;
      min-width: 0;
      width: auto;
      max-width: 100%;
      font-size: 0.72rem;
      font-weight: 500;
      line-height: 1.25;
      border-radius: 6px;
      box-shadow: none;
    }
    .admin-db-section .admin-db-file-meta {
      margin: 0 0 0.4rem;
      font-size: 0.72rem;
    }
    .admin-db-empty {
      margin: 0;
      font-size: 0.78rem;
    }
    .admin-db-section .admin-table-wrap {
      margin-bottom: 0;
      border-radius: 8px;
    }
    .admin-table-count {
      margin-top: 0.45rem;
      margin-bottom: 0;
    }
    .admin-group-users-slug-line {
      margin: 0 0 0.65rem;
    }
    .admin-group-users-overlay-list {
      list-style: none;
      margin: 0 0 1rem;
      padding: 0;
      max-height: min(50vh, 22rem);
      overflow: auto;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--panel-muted);
    }
    .admin-group-users-li {
      margin: 0;
      padding: 0.45rem 0.65rem;
      border-bottom: 1px solid var(--border);
      font-size: 0.88rem;
    }
    .admin-group-users-li:last-child {
      border-bottom: none;
    }
    .admin-group-users-empty {
      font-style: normal;
    }
    .admin-db-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.76rem;
      table-layout: auto;
    }
    .admin-db-table th,
    .admin-db-table td {
      padding: 0.22rem 0.4rem;
      border-bottom: 1px solid var(--border);
      text-align: left;
      vertical-align: middle;
    }
    .admin-db-table th {
      background: var(--table-header);
      color: var(--table-header-text);
      font-weight: 600;
      font-size: 0.72rem;
    }
    .admin-db-table tbody > tr:last-child > td {
      border-bottom: none;
    }
    .admin-db-table code {
      font-size: 0.92em;
    }
    .admin-db-table td:last-child {
      white-space: nowrap;
    }
    .admin-db-actions-cell {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      flex-wrap: nowrap;
    }
    .admin-db-section button.admin-db-lock {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0.12rem;
      margin: 0;
      border: none;
      border-radius: 5px;
      background: transparent;
      color: var(--text-muted, inherit);
      cursor: pointer;
      line-height: 0;
      vertical-align: middle;
    }
    .admin-db-section button.admin-db-lock:hover {
      background: var(--panel-muted, rgba(128, 128, 128, 0.15));
      color: var(--text, inherit);
    }
    .admin-db-section button.admin-db-lock--on {
      color: var(--warn, #b45309);
    }
    .admin-db-lock-svg {
      width: 1rem;
      height: 1rem;
      display: block;
    }
    .admin-db-section button.admin-db-clear {
      font-size: 0.7rem;
      padding: 0.18rem 0.42rem;
      line-height: 1.2;
      border-radius: 5px;
    }
    .admin-db-section button.admin-db-clear:disabled {
      opacity: 0.45;
      cursor: not-allowed;
    }
    .admin-viewer-stats-now {
      display: flex;
      flex-wrap: wrap;
      gap: 0.75rem 1rem;
      margin: 0.25rem 0 0.5rem;
    }
    .traffic-app-access-now-cards {
      margin-top: 0.15rem;
    }
    .traffic-section-loading {
      margin: 0.2rem 0 0.45rem;
      font-size: 0.78rem;
    }
    #traffic-combined-scope-stats-wrap {
      margin-top: 0.35rem;
    }
    .traffic-combined-scope-cards {
      margin-top: 0.15rem;
      margin-bottom: 0.35rem;
    }
    .admin-viewer-stat-card {
      min-width: 7rem;
      padding: 0.65rem 0.85rem;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--panel);
    }
    .admin-viewer-stats-now button.admin-viewer-stat-card.traffic-stat-card-registered,
    .admin-viewer-stats-now button.admin-viewer-stat-card.traffic-stat-card-registered-scope {
      cursor: pointer;
      font: inherit;
      color: inherit;
      text-align: center;
    }
    .admin-viewer-stats-now button.admin-viewer-stat-card.traffic-stat-card-registered:hover,
    .admin-viewer-stats-now button.admin-viewer-stat-card.traffic-stat-card-registered-scope:hover {
      background: var(--panel-muted);
    }
    .admin-viewer-stats-now a.admin-viewer-stat-card.traffic-stat-card-user-accounts {
      text-decoration: none;
      color: inherit;
      font: inherit;
      text-align: center;
      cursor: pointer;
    }
    .admin-viewer-stats-now a.admin-viewer-stat-card.traffic-stat-card-user-accounts:hover {
      background: var(--panel-muted);
    }
    .admin-viewer-stat-value {
      display: block;
      font-size: 1.35rem;
      font-weight: 600;
      font-variant-numeric: tabular-nums;
      line-height: 1.2;
    }
    .admin-viewer-stat-label {
      display: block;
      font-size: 0.78rem;
      color: var(--muted);
      margin-top: 0.2rem;
    }
    .admin-viewer-stats-daily-title {
      font-size: 1rem;
      font-weight: 600;
      margin: 0.5rem 0 0.35rem;
    }
    .admin-viewer-stats-table th,
    .admin-viewer-stats-table td {
      font-variant-numeric: tabular-nums;
    }
    .traffic-view-toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.5rem 1rem;
      margin: 0.35rem 0 0.65rem;
    }
    .traffic-view-toolbar label {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      font-size: 0.88rem;
      color: var(--muted);
    }
    .traffic-view-toolbar select {
      font: inherit;
      padding: 0.25rem 1.45rem 0.25rem 0.45rem;
      border-radius: 6px;
      border: 1px solid var(--border);
      background-color: var(--panel);
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1.41.59L6 5.17 10.59.59 12 2l-6 6-6-6z'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 0.35rem center;
      background-size: 0.5rem;
      color: var(--text);
    }
    .traffic-view-head-actions {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.5rem;
      width: 100%;
    }
    .traffic-view-head-actions .traffic-retention-settings-btn {
      margin-left: auto;
    }
    .traffic-retention-settings-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 2.5rem;
      height: 2.5rem;
      padding: 0;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--panel);
      color: var(--muted);
      cursor: pointer;
    }
    .traffic-retention-settings-btn:hover {
      background: var(--panel-muted);
      color: var(--text);
    }
    .traffic-retention-settings-btn svg {
      display: block;
    }
    .traffic-audience-overlay .traffic-retention-dialog-shell.results-highlights-dialog {
      position: relative;
      z-index: 1;
      margin: 0;
    }
    .traffic-retention-dialog-inner .traffic-retention-dialog-body {
      flex: 1 1 auto;
      min-height: 0;
      overflow-x: hidden;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      padding-top: 0.35rem;
      padding-bottom: 0.4rem;
    }
    .traffic-retention-storage-section {
      margin: 0 0 0.45rem;
    }
    .traffic-retention-storage-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.8rem;
      line-height: 1.32;
    }
    .traffic-retention-storage-table th,
    .traffic-retention-storage-table td {
      padding: 0.3rem 0.38rem;
      border-bottom: 1px solid var(--border);
      text-align: left;
      vertical-align: top;
    }
    .traffic-retention-storage-table tbody tr:last-child th,
    .traffic-retention-storage-table tbody tr:last-child td {
      border-bottom: none;
    }
    .traffic-retention-storage-table th {
      font-weight: 500;
      color: var(--text);
      width: 58%;
    }
    .traffic-retention-storage-table td.num {
      text-align: right;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
      color: var(--muted);
    }
    .traffic-retention-storage-summary-row td {
      border-top: 1px solid var(--border);
      border-bottom: none;
      padding-top: 0.42rem;
      padding-bottom: 0.28rem;
      font-size: 0.74rem;
      line-height: 1.35;
      color: var(--muted);
      text-align: left;
      vertical-align: top;
    }
    .traffic-retention-admin {
      margin: 0.75rem 0 1rem;
      padding: 0.65rem 0.85rem;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--panel);
    }
    .traffic-retention-admin--overlay {
      margin: 0;
      padding: 0;
      border: none;
      background: transparent;
    }
    .traffic-retention-fields {
      display: flex;
      flex-wrap: wrap;
      gap: 0.65rem 1.25rem;
      margin: 0.4rem 0 0.5rem;
    }
    .traffic-retention-label {
      display: inline-flex;
      flex-direction: column;
      gap: 0.25rem;
      font-size: 0.88rem;
      color: var(--muted);
    }
    .traffic-retention-input {
      font: inherit;
      width: 6.5rem;
      padding: 0.25rem 0.45rem;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: var(--bg);
      color: var(--text);
    }
    #traffic-retention-overlay
      .results-dialog-footer-actions
      button.results-dialog-footer-reset {
      margin-inline-end: auto;
    }
    .traffic-retention-msg--ok {
      color: var(--muted);
    }
    .traffic-retention-msg--err {
      color: #b45309;
    }
    .app-traffic-view #btn-traffic-refresh:disabled {
      opacity: 0.72;
      cursor: progress;
    }
    #traffic-refresh-error:not([hidden]) {
      margin: 0.35rem 0;
    }
    .traffic-actions-cell {
      width: 3rem;
      text-align: center;
      vertical-align: middle;
    }
    .traffic-audience-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    html.traffic-audience-overlay-open {
      overflow: hidden;
    }
    .traffic-audience-overlay {
      position: fixed;
      inset: 0;
      z-index: 10060;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 1rem;
      box-sizing: border-box;
    }
    .traffic-audience-overlay[hidden] {
      display: none !important;
    }
    .traffic-audience-overlay-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.4);
    }
    .traffic-audience-overlay-panel {
      position: relative;
      z-index: 1;
      width: 100%;
      max-width: min(36rem, 100vw);
      max-height: min(85vh, 32rem);
      padding: 1rem 1.1rem 1.1rem;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: var(--panel);
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
      display: flex;
      flex-direction: column;
      min-height: 0;
    }
    .traffic-audience-overlay-title {
      margin: 0 2.25rem 0.65rem 0;
      font-size: 1.05rem;
      font-weight: 600;
      line-height: 1.3;
    }
    .traffic-audience-overlay-close {
      position: absolute;
      top: 0.35rem;
      right: 0.35rem;
      width: 2rem;
      height: 2rem;
      padding: 0;
      border: none;
      border-radius: 6px;
      background: transparent;
      color: var(--muted);
      font-size: 1.35rem;
      line-height: 1;
      cursor: pointer;
    }
    .traffic-audience-overlay-close:hover {
      background: var(--panel-muted);
      color: var(--text);
    }
    .traffic-audience-overlay-body {
      overflow: auto;
      flex: 1;
      min-height: 0;
      font-size: 0.88rem;
    }
    .traffic-audience-overlay-body td.traffic-audience-user-id {
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }
    .traffic-audience-overlay-body td.traffic-audience-last-app {
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
      font-size: 0.86em;
      color: var(--muted);
    }
    .traffic-audience-user-actions {
      width: 1%;
      white-space: nowrap;
      vertical-align: middle;
    }
    .traffic-audience-user-actions .secondary {
      font-size: 0.78rem;
      padding: 0.26rem 0.5rem;
      min-height: 2.05rem;
    }
    .traffic-user-views-toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.5rem 0.85rem;
      margin: 0 0 0.65rem;
    }
    .traffic-user-views-scope-label {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      font-size: 0.88rem;
      color: var(--muted);
    }
    .traffic-user-views-toolbar .traffic-range-select {
      font: inherit;
      padding: 0.25rem 1.45rem 0.25rem 0.45rem;
      border-radius: 6px;
      border: 1px solid var(--border);
      background-color: var(--panel);
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1.41.59L6 5.17 10.59.59 12 2l-6 6-6-6z'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 0.35rem center;
      background-size: 0.5rem;
      color: var(--text);
    }
    .traffic-user-views-subhead {
      margin: 0.65rem 0 0.35rem;
      font-size: 0.67rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--muted);
    }
    .traffic-user-views-toolbar + .traffic-user-views-empty {
      margin-top: 0.15rem;
    }
    .traffic-user-views-toolbar + .traffic-user-views-subhead {
      margin-top: 0.2rem;
    }
    .traffic-user-views-toolbar + .traffic-user-views-devices-meta {
      margin-top: 0.2rem;
    }
    .traffic-user-views-devices-meta {
      margin: 0 0 0.35rem;
      font-size: 0.82rem;
      line-height: 1.35;
    }
    .traffic-user-views-devices-meta + .traffic-user-views-subhead {
      margin-top: 0.35rem;
    }
    .traffic-user-views-devices-meta + .traffic-user-views-empty {
      margin-top: 0.15rem;
    }
    .traffic-user-views-table .traffic-user-views-hits {
      text-align: right;
      font-variant-numeric: tabular-nums;
      width: 5.5rem;
    }
    .admin-users-toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.36rem 0.46rem;
      margin: 0 0 0.85rem;
    }
    .admin-users-toolbar button.secondary {
      font-size: 0.76rem;
      font-weight: 500;
      padding: 0.28rem 0.52rem;
      line-height: 1.25;
      border-radius: 10px;
      min-height: 2.2rem;
    }
    .admin-users-toolbar button.secondary.results-toolbar-overlay-btn {
      display: inline-flex;
      align-items: center;
      gap: 0.32rem;
      border-color: rgba(37, 99, 235, 0.48);
      background: var(--panel);
      box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
    }
    .admin-users-toolbar button.secondary.results-toolbar-overlay-btn::after {
      content: "";
      display: inline-block;
      width: 0.4rem;
      height: 0.4rem;
      margin-inline-start: 0.02rem;
      border-right: 1.5px solid var(--accent);
      border-bottom: 1.5px solid var(--accent);
      transform: rotate(45deg) translateY(-1px);
      opacity: 0.88;
      flex-shrink: 0;
    }
    .admin-users-toolbar button.secondary.results-toolbar-overlay-btn:hover {
      border-color: var(--accent);
      background: rgba(37, 99, 235, 0.06);
    }
    .admin-user-name-email-cell .admin-user-display-name {
      display: inline-block;
      line-height: 1.35;
    }
    .admin-user-name-email-cell .admin-user-display-email {
      font-size: 0.92em;
      line-height: 1.35;
    }
    html.admin-user-edit-overlay-open {
      overflow: hidden;
    }
    .admin-user-edit-overlay {
      position: fixed;
      inset: 0;
      z-index: 10055;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 1rem;
      box-sizing: border-box;
    }
    .admin-user-edit-overlay-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.4);
    }
    .admin-user-edit-overlay-dialog {
      position: relative;
      z-index: 1;
      width: 100%;
      max-width: 22rem;
      padding: 1rem 1.1rem 1.1rem;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: var(--panel);
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    }
    .admin-user-edit-overlay-close {
      position: absolute;
      top: 0.35rem;
      right: 0.35rem;
      width: 2rem;
      height: 2rem;
      padding: 0;
      border: none;
      border-radius: 6px;
      background: transparent;
      color: var(--muted);
      font-size: 1.35rem;
      line-height: 1;
      cursor: pointer;
    }
    .admin-user-edit-overlay-close:hover {
      background: var(--panel-muted);
      color: var(--text);
    }
    .admin-user-edit-overlay-title {
      margin: 0 2rem 0.85rem 0;
      font-size: 1.05rem;
      font-weight: 600;
    }
    .admin-user-edit-overlay-dialog--stacked {
      display: flex;
      flex-direction: column;
      min-height: 0;
      max-width: min(28rem, calc(100vw - 2rem));
      max-height: min(85vh, 42rem);
      overflow: hidden;
      padding: 0;
    }
    .admin-user-edit-overlay-dialog--stacked .admin-user-edit-overlay-title {
      flex-shrink: 0;
      margin: 0;
      padding: 0.85rem 2.25rem 0.65rem 1.1rem;
      font-size: 1rem;
      border-bottom: 1px solid var(--border);
    }
    .admin-user-edit-overlay-scroll {
      flex: 1 1 auto;
      min-height: 0;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      padding: 0.65rem 1.1rem 0.85rem;
    }
    .admin-user-session-json-block {
      margin: 1rem 0 0;
      padding-top: 0.85rem;
      border-top: 1px solid var(--border);
    }
    .admin-user-session-json-heading {
      margin: 0 0 0.35rem;
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--text-muted);
    }
    .admin-user-session-settings-pre {
      margin: 0;
      padding: 0.65rem 0.75rem;
      background: var(--pre-bg);
      border: 1px solid var(--border);
      border-radius: 8px;
      font-size: 0.76rem;
      line-height: 1.45;
      overflow: auto;
      white-space: pre;
      word-break: normal;
    }
    .admin-user-edit-overlay-footer {
      flex-shrink: 0;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.44rem;
      padding: 0.55rem 1.1rem 0.75rem;
      margin: 0;
      border-top: 1px solid var(--border);
      background: var(--panel);
    }
    .admin-user-edit-overlay-footer-grow {
      flex: 1 1 auto;
      min-width: 0;
    }
    .admin-user-edit-overlay-footer .secondary,
    .admin-user-edit-overlay-footer .primary {
      font-size: 0.82rem;
      padding: 0.34rem 0.68rem;
      min-height: 2.3rem;
      min-width: 5.75rem;
      line-height: 1.25;
      box-sizing: border-box;
    }
    .admin-user-overlay-delete--subtle {
      background: transparent;
      border: 1px solid transparent;
      color: var(--muted);
      font-size: 0.74rem;
      font-weight: 450;
      padding: 0.2rem 0.42rem;
      min-height: 1.85rem;
      min-width: 0;
      line-height: 1.2;
      box-shadow: none;
    }
    .admin-user-overlay-delete--subtle:hover {
      background: var(--panel-muted);
      border-color: var(--border);
      color: var(--text);
    }
    .admin-user-overlay-delete--subtle:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 1px;
    }
    .admin-athlete-list-athletes-overlay-dialog {
      max-width: min(36rem, 100vw);
    }
    .admin-athlete-list-sharing-overlay-dialog {
      max-width: min(32rem, 100vw);
    }
    .admin-athlete-lists-table .admin-athlete-list-name-cell {
      min-width: 10rem;
      max-width: 24rem;
      word-break: break-word;
      vertical-align: middle;
    }
    .admin-athlete-lists-table .admin-athlete-list-tag-name-cell {
      max-width: 16rem;
      word-break: break-word;
      vertical-align: middle;
      color: var(--muted);
      font-size: 0.92em;
    }
    .admin-athlete-lists-table tr[data-list-depth]:not([data-list-depth="0"]) td {
      background: rgba(148, 163, 184, 0.045);
    }
    .admin-athlete-list-sharing-cell {
      vertical-align: middle;
    }
    .admin-athlete-list-sharing-subtitle {
      margin: 0.75rem 0 0.35rem;
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--text-muted);
    }
    .admin-athlete-list-sharing-subtitle:first-child {
      margin-top: 0;
    }
    .admin-athlete-list-sharing-list {
      list-style: none;
      margin: 0 0 0.65rem;
      padding: 0;
      font-size: 0.82rem;
      line-height: 1.35;
      max-height: min(40vh, 18rem);
      overflow: auto;
    }
    .admin-athlete-list-sharing-item {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-start;
      gap: 0.35rem 0.75rem;
      padding: 0.35rem 0;
      border-bottom: 1px solid var(--border);
    }
    .admin-athlete-list-sharing-item:last-child {
      border-bottom: none;
    }
    .admin-athlete-list-sharing-item-text {
      flex: 1 1 12rem;
      min-width: 0;
    }
    .admin-athlete-list-sharing-name {
      display: block;
      font-weight: 500;
      word-break: break-word;
    }
    .admin-athlete-list-sharing-line2 {
      display: block;
      margin-top: 0.15rem;
      font-size: 0.78rem;
    }
    .admin-athlete-list-sharing-role {
      flex: 0 0 auto;
      font-size: 0.78rem;
      color: var(--muted);
      white-space: nowrap;
    }
    .admin-athlete-list-sharing-status.is-err {
      color: #b91c1c;
    }
    .admin-athlete-list-sharing-empty {
      margin: 0 0 0.5rem;
    }
    .admin-athlete-list-athletes-compact-list {
      list-style: none;
      margin: 0 0 0.65rem;
      padding: 0;
      font-size: 0.82rem;
      line-height: 1.35;
      max-height: min(55vh, 26rem);
      overflow: auto;
    }
    .admin-athlete-list-athletes-item {
      display: flex;
      flex-wrap: wrap;
      align-items: baseline;
      gap: 0.25rem 0.5rem;
      padding: 0.2rem 0;
      border-bottom: 1px solid var(--border);
    }
    .admin-athlete-list-athletes-item:last-child {
      border-bottom: none;
    }
    .admin-athlete-list-athletes-open-detail.admin-athlete-list-athletes-item-name {
      flex: 1 1 auto;
      min-width: 0;
      margin: 0;
      padding: 0;
      border: none;
      background: transparent;
      color: var(--accent);
      font: inherit;
      font-weight: 500;
      cursor: pointer;
      text-align: left;
      text-decoration: underline;
      text-underline-offset: 2px;
      word-break: break-word;
    }
    .admin-athlete-list-athletes-open-detail.admin-athlete-list-athletes-item-name:visited {
      color: var(--accent);
    }
    .admin-athlete-list-athletes-open-detail.admin-athlete-list-athletes-item-name:hover {
      color: var(--text);
    }
    .admin-athlete-list-athletes-item-meta {
      font-size: 0.78rem;
      margin-left: auto;
      text-align: right;
      flex: 1 1 12rem;
    }
    .admin-athlete-list-athletes-item-meta.admin-athlete-list-meta--multiline {
      white-space: normal;
      line-height: 1.45;
    }
    .admin-athlete-list-athletes-item-meta .admin-athlete-list-meta-ref-link {
      color: var(--accent);
      text-decoration: underline;
      text-underline-offset: 2px;
    }
    .admin-athlete-list-athletes-item-meta .admin-athlete-list-meta-ref-link:visited {
      color: var(--accent);
    }
    .admin-athlete-list-athletes-item-comment {
      flex: 1 1 100%;
      margin: 0.2rem 0 0;
      padding: 0;
      font-size: 0.78rem;
      line-height: 1.4;
      color: var(--text);
      font-weight: 400;
      white-space: pre-wrap;
      word-break: break-word;
    }
    .admin-athlete-list-athletes-status.is-err {
      color: #b91c1c;
    }
    .admin-user-edit-form .admin-new-user-label {
      display: flex;
      flex-direction: column;
      gap: 0.3rem;
      margin-bottom: 0.65rem;
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--text-muted);
    }
    .admin-user-edit-form .admin-new-user-label input {
      font: inherit;
      font-weight: 400;
      padding: 0.35rem 0.45rem;
      border: 1px solid var(--border);
      border-radius: 6px;
      max-width: 100%;
    }
    .admin-edit-user-readonly-meta {
      margin: 0 0 0.65rem;
      font-size: 0.88rem;
      line-height: 1.45;
    }
    .admin-edit-user-readonly-meta strong {
      font-weight: 600;
      color: var(--text);
    }
    .admin-user-edit-form .admin-edit-user-enabled-label {
      display: flex;
      align-items: center;
      gap: 0.35rem;
      margin-bottom: 0.65rem;
    }
    .admin-edit-user-extra {
      margin-top: 0.85rem;
      padding-top: 0.85rem;
      border-top: 1px solid var(--border);
    }
    .admin-edit-user-extra-actions {
      margin-bottom: 0.75rem;
    }
    .admin-user-edit-overlay-scroll .admin-user-overlay-pw-apply.primary {
      font-size: 0.78rem;
      font-weight: 500;
      padding: 0.24rem 0.5rem;
      min-height: 1.95rem;
      min-width: 0;
      line-height: 1.2;
    }
    .admin-edit-user-delete-wrap {
      margin-top: 0.35rem;
    }
    .admin-user-edit-form-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      margin-top: 0.35rem;
    }
    .admin-user-edit-msg.is-err {
      color: #b91c1c;
      margin: 0.5rem 0 0;
    }
    .admin-edit-groups-wrap {
      margin: 0 0 0.65rem;
    }
    .admin-group-fieldset {
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 0.5rem 0.75rem 0.65rem;
      margin: 0;
    }
    .admin-group-fieldset legend {
      padding: 0 0.35rem;
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--text-muted);
    }
    .admin-grp-chk-label {
      display: block;
      margin: 0.35rem 0 0;
      font-size: 0.82rem;
      font-weight: 400;
      color: var(--text);
    }
    .admin-groups-perm-table th,
    .admin-groups-perm-table td {
      text-align: center;
      vertical-align: middle;
    }
    .admin-groups-perm-table th:first-child,
    .admin-groups-perm-table td:first-child {
      text-align: left;
    }
    .admin-pw-panel-cell {
      padding: 0.65rem 0.75rem 0.85rem;
      background: var(--panel-muted);
      border-bottom: 1px solid var(--border);
    }
    .admin-pw-panel-inner {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-end;
      gap: 0.65rem 1rem;
    }
    .admin-pw-panel-inner .admin-new-user-label {
      margin: 0;
    }
    .admin-table-wrap {
      overflow-x: auto;
      margin-bottom: 1rem;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: var(--panel);
    }
    .admin-users-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.85rem;
      table-layout: auto;
    }
    .admin-users-table th,
    .admin-users-table td {
      padding: 0.45rem 0.55rem;
      border-bottom: 1px solid var(--border);
      text-align: left;
      vertical-align: middle;
    }
    .admin-users-table th {
      background: var(--table-header);
      color: var(--table-header-text);
      font-weight: 600;
    }
    .admin-th-sort {
      display: inline-flex;
      align-items: center;
      gap: 0.15rem;
      margin: 0;
      padding: 0.15rem 0.25rem;
      font: inherit;
      font-weight: 600;
      color: inherit;
      background: transparent;
      border: none;
      border-radius: 6px;
      cursor: pointer;
      text-align: left;
      max-width: 100%;
    }
    .admin-th-sort:hover {
      background: rgba(37, 99, 235, 0.12);
      color: var(--accent);
    }
    .admin-sort-mark {
      font-size: 0.7em;
      opacity: 0.85;
      white-space: nowrap;
    }
    button.danger-outline,
    button.secondary.danger-outline {
      border-color: #dc2626;
      color: #b91c1c;
    }
    button.danger-outline:hover,
    button.secondary.danger-outline:hover {
      background: rgba(220, 38, 38, 0.08);
      border-color: #b91c1c;
      color: #991b1b;
    }
    .admin-users-table tbody > tr:last-child > td {
      border-bottom: none;
    }
    .admin-users-table input[type="email"],
    .admin-users-table input[type="text"],
    .admin-users-table input[type="password"],
    .admin-users-table select {
      font: inherit;
      width: 100%;
      padding: 0.25rem 0.4rem;
      border: 1px solid var(--border);
      border-radius: 6px;
      box-sizing: border-box;
    }
    .admin-users-table select {
      padding: 0.25rem 1.3rem 0.25rem 0.4rem;
      background-color: var(--panel);
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1.41.59L6 5.17 10.59.59 12 2l-6 6-6-6z'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 0.3rem center;
      background-size: 0.5rem;
    }
    .admin-users-table input[type="email"],
    .admin-users-table input[type="text"],
    .admin-users-table input[type="password"],
    .admin-users-table select {
      max-width: 14rem;
    }
    .admin-users-table input.admin-cl-url-input {
      max-width: 28rem;
      min-width: 8rem;
    }
    .admin-region-settings .admin-region-mapping-csv-wrap {
      width: 100%;
      max-width: min(100%, 72rem);
      margin: 0.35rem 0 0.85rem;
    }
    .admin-region-settings textarea.admin-region-mapping-csv {
      display: block;
      width: 100%;
      min-width: min(100%, 42rem);
      box-sizing: border-box;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
      font-size: 0.78rem;
      line-height: 1.4;
      resize: vertical;
      min-height: 14rem;
    }
    .admin-region-settings .admin-region-settings-regions-table-wrap.admin-table-wrap {
      width: max-content;
      max-width: 100%;
    }
    .admin-region-settings-regions-table.admin-users-table {
      width: auto;
      max-width: 100%;
    }
    .admin-region-settings-regions-table.admin-users-table th,
    .admin-region-settings-regions-table.admin-users-table td {
      padding: 0.26rem 0.35rem;
      font-size: 0.76rem;
      line-height: 1.25;
      vertical-align: middle;
    }
    .admin-region-settings-regions-table.admin-users-table th {
      font-size: 0.72rem;
      font-weight: 600;
    }
    .admin-region-settings-regions-table.admin-users-table input.admin-region-inp {
      font-size: 0.74rem;
      line-height: 1.25;
      padding: 0.16rem 0.28rem;
      max-width: 100%;
      min-width: 0;
    }
    .admin-region-settings-regions-table.admin-users-table input.admin-region-inp[data-f="slug"] {
      max-width: 8.5rem;
    }
    .admin-region-settings-regions-table.admin-users-table input.admin-region-inp[data-f="name"] {
      max-width: 12rem;
    }
    .admin-region-settings-regions-table.admin-users-table input.admin-region-inp[data-f="flag_url"] {
      max-width: min(20rem, 100%);
    }
    .admin-region-settings-regions-table .admin-region-settings-city-count {
      text-align: right;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
      min-width: 2.5rem;
    }
    .admin-region-settings-regions-table .admin-region-settings-actions-cell {
      width: 1%;
      white-space: nowrap;
      text-align: center;
      vertical-align: middle;
      padding-left: 0.2rem;
      padding-right: 0.2rem;
    }
    .admin-region-settings-regions-table
      .admin-region-settings-actions-cell
      .admin-icon-btn
      + .admin-icon-btn {
      margin-left: 0.18rem;
    }
    .admin-region-settings-regions-table .admin-region-settings-cities-btn.admin-icon-btn,
    .admin-region-settings-regions-table .admin-region-settings-remove-row.admin-icon-btn {
      width: 1.4rem;
      height: 1.4rem;
    }
    .admin-region-settings-regions-table .admin-region-settings-cities-btn.admin-icon-btn svg,
    .admin-region-settings-regions-table .admin-region-settings-remove-row.admin-icon-btn svg {
      width: 0.72rem;
      height: 0.72rem;
    }
    .admin-region-cities-overlay-dialog.admin-user-edit-overlay-dialog {
      max-width: min(34rem, 94vw);
    }
    .admin-region-cities-overlay-scroll {
      max-height: min(70vh, 28rem);
      overflow: auto;
      margin-top: 0.35rem;
    }
    .admin-region-cities-overlay-list {
      margin: 0;
      padding-left: 1.25rem;
    }
    .admin-region-settings button.secondary.admin-region-settings-add-row,
    .admin-region-settings button#admin-region-settings-save.startlist-schedule-save-all-btn {
      font-size: 0.76rem;
      padding: 0.26rem 0.55rem;
      min-height: 0;
      line-height: 1.25;
    }
    .admin-users-table input.admin-athlete-list-priority-input {
      width: 5.5rem;
      max-width: 100%;
      font-size: 0.88rem;
      padding: 0.22rem 0.35rem;
    }
    .admin-athlete-list-priority-cell {
      vertical-align: middle;
    }
    .admin-athlete-list-owner-cell {
      max-width: 16rem;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      vertical-align: middle;
    }
    .admin-athlete-list-enabled-cell {
      text-align: center;
    }
    .admin-athlete-list-athletes-count-cell {
      vertical-align: middle;
    }
    .admin-athlete-list-count-open {
      display: block;
      width: 100%;
      margin: 0;
      padding: 0;
      font: inherit;
      font-variant-numeric: tabular-nums;
      text-align: inherit;
      color: var(--accent);
      background: transparent;
      border: none;
      cursor: pointer;
      text-decoration: none;
    }
    .admin-athlete-list-count-open:hover {
      text-decoration: underline;
    }
    .admin-athlete-list-count-open:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .admin-cl-edit-panel-cell {
      padding: 0.65rem 0.75rem 0.85rem;
      background: var(--panel-muted);
      border-bottom: 1px solid var(--border);
    }
    .admin-cl-edit-panel-inner {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-end;
      gap: 0.65rem 1rem;
    }
    .admin-cl-edit-panel-inner .admin-new-user-label {
      margin: 0;
    }
    button.admin-cl-status-icon-wrap {
      margin: 0;
      padding: 0;
      font: inherit;
      line-height: 0;
      appearance: none;
      -webkit-appearance: none;
      cursor: pointer;
    }
    .admin-cl-status-icon-wrap {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 1.05rem;
      height: 1.05rem;
      border-radius: 50%;
      box-sizing: border-box;
      vertical-align: middle;
      flex-shrink: 0;
    }
    button.admin-cl-status-icon-wrap:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .admin-cl-status-pending {
      border: 2px solid var(--warn);
      background: transparent;
    }
    .admin-cl-status-approved {
      border: none;
      background: var(--ok);
      color: #fff;
    }
    .admin-cl-status-approved svg {
      width: 0.62rem;
      height: 0.62rem;
    }
    .admin-cl-url-cell {
      max-width: 20rem;
      word-break: break-word;
      vertical-align: middle;
    }
    .admin-cl-url-cell a {
      word-break: break-all;
    }
    .admin-cl-submitted-cell {
      vertical-align: middle;
      line-height: 1.35;
    }
    .admin-cl-submitted-user-display {
      cursor: help;
    }
    .admin-enabled-label {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      cursor: pointer;
      font-weight: 500;
      white-space: nowrap;
    }
    .admin-actions-cell {
      vertical-align: middle;
      white-space: nowrap;
      width: 1%;
    }
    .admin-actions-inner {
      display: inline-flex;
      flex-wrap: nowrap;
      align-items: center;
      gap: 0.2rem;
      vertical-align: middle;
    }
    .admin-user-client-sessions-cell {
      vertical-align: middle;
      text-align: end;
      font-variant-numeric: tabular-nums;
    }
    .admin-user-client-sessions-cell .admin-user-client-devices-link {
      font-weight: 600;
    }
    .admin-client-devices-overlay-dialog {
      max-width: min(52rem, calc(100vw - 2rem));
      width: 100%;
    }
    .admin-client-devices-intro {
      margin: 0 0 0.35rem;
      font-size: 0.82rem;
      line-height: 1.35;
    }
    .admin-client-devices-entry-count {
      margin: 0.45rem 0 0;
    }
    .admin-client-devices-table-wrap {
      max-height: min(60vh, 22rem);
      overflow: auto;
    }
    .admin-client-devices-table {
      font-size: 0.78rem;
    }
    .admin-client-devices-install-cell {
      font-family: ui-monospace, monospace;
      font-size: 0.74rem;
    }
    .admin-user-display-cell {
      vertical-align: middle;
      max-width: 22rem;
      word-break: break-word;
      font-weight: 500;
      color: var(--text);
    }
    .admin-user-datetime-cell {
      vertical-align: middle;
      font-weight: 400;
      font-variant-numeric: tabular-nums;
      white-space: normal;
      line-height: 1.35;
      max-width: 10.5rem;
      overflow-wrap: break-word;
    }
    .admin-user-id-cell {
      vertical-align: middle;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
      max-width: 5rem;
      color: var(--muted);
      font-size: 0.88em;
    }
    .admin-user-icon-cell {
      text-align: center;
      width: 2.5rem;
      max-width: 3rem;
      padding-left: 0.3rem;
      padding-right: 0.3rem;
    }
    .admin-user-state-svg {
      display: block;
      width: 1.05rem;
      height: 1.05rem;
      margin: 0 auto;
    }
    .admin-user-state-yes {
      color: var(--ok);
    }
    .admin-user-state-no {
      color: var(--muted);
    }
    .admin-enabled-icon-label {
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 2rem;
      min-height: 1.75rem;
      margin: 0;
      cursor: pointer;
      vertical-align: middle;
    }
    .admin-enabled-icon-label .admin-chk-enabled {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }
    .admin-enabled-icon-label .admin-chk-enabled:focus-visible {
      width: auto;
      height: auto;
      margin: 0;
      clip: auto;
      overflow: visible;
      z-index: 2;
    }
    .admin-enabled-icon-label .admin-enabled-icon-on,
    .admin-enabled-icon-label .admin-enabled-icon-off {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      pointer-events: none;
    }
    .admin-enabled-icon-label .admin-chk-enabled:checked ~ .admin-enabled-icon-on {
      display: inline-flex;
    }
    .admin-enabled-icon-label .admin-chk-enabled:checked ~ .admin-enabled-icon-off {
      display: none;
    }
    .admin-enabled-icon-label .admin-chk-enabled:not(:checked) ~ .admin-enabled-icon-on {
      display: none;
    }
    .admin-enabled-icon-label .admin-chk-enabled:not(:checked) ~ .admin-enabled-icon-off {
      display: inline-flex;
    }
    .admin-icon-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 1.65rem;
      height: 1.65rem;
      padding: 0;
      margin: 0;
      border: 1px solid var(--border);
      border-radius: 5px;
      background: var(--panel-muted);
      color: var(--text);
      cursor: pointer;
      box-shadow: none;
      flex-shrink: 0;
    }
    .admin-icon-btn:hover {
      border-color: var(--accent);
      color: var(--accent);
      background: var(--panel);
    }
    .admin-icon-btn:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 1px;
    }
    .admin-icon-btn svg {
      width: 0.88rem;
      height: 0.88rem;
    }
    .admin-icon-btn.danger-outline {
      border-color: #fca5a5;
      color: #b91c1c;
    }
    .admin-icon-btn.danger-outline:hover {
      border-color: #dc2626;
      color: #991b1b;
      background: rgba(220, 38, 38, 0.08);
    }
    .settings-check-label {
      display: inline-flex;
      align-items: center;
      gap: 0.45rem;
      cursor: pointer;
      font-weight: 500;
    }
    .settings-check-label input {
      width: auto;
      margin: 0;
    }
    .sub {
      color: var(--muted);
      font-size: 0.9rem;
    }
    .app-content {
      flex: 1 1 auto;
      /* No top padding: keeps main menubar flush under the header (horizontal padding unchanged). */
      padding: 0 1.5rem 2rem;
      max-width: none;
      width: 100%;
      min-width: 0;
      margin: 0 auto;
    }
    #app-main-view {
      min-width: 0;
      max-width: 100%;
    }
    .app-footer {
      flex-shrink: 0;
      margin-top: auto;
      padding: clamp(0.55rem, 1.8vw, 1.1rem) clamp(0.65rem, 4vw, 1.5rem);
      border-top: 1px solid var(--border);
      background: var(--panel);
      color: var(--muted);
      /* Tighter floor so version + locale + © stay one line on small / zoomed viewports */
      font-size: clamp(0.58rem, 0.12rem + 0.55vmin, 0.88rem);
    }
    .app-footer-inner {
      max-width: 1200px;
      margin: 0 auto;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 0.5rem 0.75rem;
    }
    .footer-meta {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
      align-items: center;
      column-gap: clamp(0.35rem, 2vw, 0.85rem);
      width: 100%;
      min-width: 0;
    }
    .footer-links {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: center;
      gap: 0.65rem 1rem;
      min-width: 0;
    }
    .footer-version {
      justify-self: start;
      font-variant-numeric: tabular-nums;
      color: var(--text);
      opacity: 0.9;
      min-width: 0;
      max-width: 100%;
      overflow-wrap: anywhere;
      word-break: break-word;
    }
    a.footer-impressum-link,
    a.footer-account-benefits-link,
    a.footer-privacy-link,
    a.footer-feedback-link {
      color: var(--accent);
      text-decoration: none;
      font-weight: 500;
    }
    a.footer-impressum-link:hover,
    a.footer-account-benefits-link:hover,
    a.footer-privacy-link:hover,
    a.footer-feedback-link:hover {
      text-decoration: underline;
    }
    .footer-copy {
      justify-self: end;
      text-align: end;
      min-width: 0;
      max-width: 100%;
      overflow-wrap: anywhere;
      word-break: break-word;
    }
    .footer-locale {
      justify-self: center;
      display: inline-flex;
      align-items: center;
      gap: 0.35rem 0.5rem;
      flex-wrap: nowrap;
      white-space: nowrap;
      max-width: 100%;
    }
    .footer-locale-title {
      color: inherit;
    }
    .footer-locale-btns {
      display: inline-flex;
      border-radius: 6px;
      overflow: hidden;
      border: 1px solid var(--border);
    }
    .footer-locale-btn {
      font: inherit;
      font-size: 0.92em;
      font-weight: 500;
      padding: 0.15rem 0.45rem;
      margin: 0;
      border: none;
      background: var(--bg);
      color: var(--muted);
      cursor: pointer;
      letter-spacing: 0.02em;
    }
    .footer-locale-btn:hover {
      color: var(--text);
    }
    .footer-locale-btn.is-active {
      background: var(--border);
      color: var(--text);
    }
    .footer-locale-btn + .footer-locale-btn {
      border-left: 1px solid var(--border);
    }
    @media (max-width: 520px) {
      .app-footer {
        font-size: clamp(0.52rem, 0.1rem + 0.5vmin, 0.82rem);
      }
    }
    .app-impressum-view .impressum-page,
    .app-account-benefits-view .impressum-page,
    .app-privacy-view .impressum-page {
      max-width: 40rem;
      margin: 0;
      padding: 0 0 1.5rem;
      color: var(--text);
      font-size: 0.92rem;
      line-height: 1.55;
    }
    .account-benefits-when-enabled {
      margin: 0.35rem 0 0.4rem;
      font-weight: 600;
      color: var(--text);
    }
    .account-benefits-list {
      margin: 0 0 0.85rem;
      padding-left: 1.25rem;
    }
    .account-benefits-list li {
      margin-bottom: 0.45rem;
    }
    .account-benefits-list li:last-child {
      margin-bottom: 0;
    }
    .impressum-page h2 {
      font-size: 1.02rem;
      font-weight: 600;
      margin: 1.4rem 0 0.45rem;
      color: var(--text);
    }
    .impressum-page p {
      margin: 0 0 0.65rem;
    }
    .impressum-page a {
      color: var(--accent);
    }
    .events-overview-favorite-events-wrap {
      margin-bottom: 1rem;
    }
    .events-overview-favorite-events-list {
      list-style: none;
      margin: 0;
      padding: 0;
      display: flex;
      flex-wrap: wrap;
      align-items: stretch;
      gap: 0.45rem 0.55rem;
      flex: 1 1 100%;
      min-width: 0;
    }
    .events-overview-favorite-events-list .favorite-event-card-slot {
      margin: 0;
    }
    .events-overview-favorite-events-empty {
      flex: 0 0 100%;
      margin: 0.15rem 0 0;
      font-size: 0.82rem;
    }
    .toolbar {
      display: flex;
      flex-wrap: wrap;
      gap: 0.75rem;
      align-items: center;
      margin-bottom: 1rem;
    }
    label { font-size: 0.85rem; color: var(--muted); }
    select, button {
      font: inherit;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--panel);
      color: var(--text);
      padding: 0.45rem 0.75rem;
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    }
    /* iOS WebKit gives native <select> extra vertical padding/height; reset + custom chevron. */
    select {
      -webkit-appearance: none;
      appearance: none;
      line-height: 1.35;
      padding: 0.38rem 1.75rem 0.38rem 0.65rem;
      background-color: var(--panel);
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1.41.59L6 5.17 10.59.59 12 2l-6 6-6-6z'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 0.5rem center;
      background-size: 0.55rem;
    }
    .toolbar input[type="search"],
    .toolbar-event-search input[type="search"],
    .events-overview-name-search-wrap input[type="search"] {
      font: inherit;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--panel);
      color: var(--text);
      padding: 0.45rem 0.75rem;
      min-width: 12rem;
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    }
    .toolbar-event-search {
      flex: 1 1 12rem;
      min-width: 12rem;
      max-width: 100%;
    }
    .toolbar-event-search input[type="search"] {
      width: 100%;
      min-width: 0;
      box-sizing: border-box;
    }
    .toolbar input[type="search"]::placeholder,
    .toolbar-event-search input[type="search"]::placeholder,
    .events-overview-name-search-wrap input[type="search"]::placeholder {
      color: var(--muted);
    }
    button {
      cursor: pointer;
      background: var(--accent);
      border-color: transparent;
      color: #fff;
      font-weight: 500;
    }
    button:disabled {
      opacity: 0.55;
      cursor: not-allowed;
    }
    button.secondary {
      background: var(--panel-muted);
      border-color: var(--border);
      color: var(--text);
    }
    .nav-back-glyph {
      margin-inline-end: 0.35em;
    }
    .status {
      font-size: 0.85rem;
      color: var(--muted);
    }
    .status.syncing { color: var(--warn); }
    .status.ok { color: var(--ok); }
    table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.9rem;
      background: var(--panel);
      border-radius: 10px;
      overflow: hidden;
      border: 1px solid var(--border);
    }
    th, td {
      text-align: left;
      padding: 0.65rem 0.85rem;
      border-bottom: 1px solid var(--border);
    }
    th {
      background: var(--table-header);
      font-weight: 600;
      font-size: 0.78rem;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: var(--table-header-text);
    }
    tr:last-child td { border-bottom: none; }
    tr:hover td { background: var(--row-hover); }
    .src-dav { color: var(--src-dav); }
    .src-ifsc { color: var(--src-ifsc); }
    a.row-link {
      color: var(--accent);
      text-decoration: none;
      cursor: pointer;
    }
    a.row-link:hover { text-decoration: underline; }
    /* Inner flex — never `display:flex` on `td` (breaks table row/border alignment). */
    .td-event-name-inner {
      display: flex;
      align-items: flex-start;
      gap: 0.5rem;
      min-width: 0;
    }
    .td-event-name-inner .row-link {
      flex: 1 1 auto;
      min-width: 0;
    }
    .td-event-name-inner .event-favorite-star-btn {
      align-self: center;
      margin-top: 0.05em;
    }
    .event-series-logo {
      width: 1.75rem;
      height: 1.75rem;
      object-fit: contain;
      flex-shrink: 0;
      margin-top: 0.12em;
    }
    pre {
      margin: 0;
      font-size: 0.78rem;
      white-space: pre-wrap;
      word-break: break-word;
      background: var(--pre-bg);
      color: var(--text);
      padding: 0.75rem;
      border-radius: 8px;
      border: 1px solid var(--border);
    }
    .meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.5rem; }
    .rounds { list-style: none; padding: 0; margin: 0; }
    .rounds li { margin-bottom: 0.35rem; }
    .round-block-host {
      position: relative;
      display: block;
      margin-bottom: 0.65rem;
    }
    .round-block-host > .round-block {
      width: 100%;
      min-width: 0;
      margin-bottom: 0;
    }
    .round-block-host > .round-block > summary {
      /* Reserve horizontal space for absolutely positioned ``.round-block-external-toolbar``. */
      padding-right: clamp(6.5rem, 22vw, 10.5rem);
    }
    .round-block-host > .round-block-external-toolbar {
      position: absolute;
      top: 0.65rem;
      right: 0.85rem;
      z-index: 2;
      display: flex;
      align-items: center;
      gap: 0.35rem;
      pointer-events: auto;
    }
    details.round-block:not([open]) + .round-block-external-toolbar {
      display: none !important;
    }
    .round-block {
      border: 1px solid var(--border);
      border-radius: 10px;
      margin-bottom: 0.65rem;
      background: var(--panel);
      box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    }
    .round-block > summary {
      cursor: pointer;
      padding: 0.65rem 0.85rem;
      font-weight: 500;
      list-style: none;
    }
    .round-block-summary-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      width: 100%;
    }
    .round-block-summary-title {
      display: inline-flex;
      align-items: center;
      flex-wrap: wrap;
      min-width: 0;
      flex: 1;
    }
    .round-block-summary-actions {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      flex-shrink: 0;
    }
    .round-block-summary-fetched-at {
      font-size: 0.78rem;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
      max-width: 7rem;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .round-block-summary-fetched-at[hidden] {
      display: none !important;
    }
    .round-block-table-filters-btn {
      flex-shrink: 0;
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0.2rem;
      border-radius: 6px;
      cursor: pointer;
      line-height: 1;
      transition:
        border-color 0.15s ease,
        background 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease;
    }
    /* Filters strip visible */
    .round-block-table-filters-btn[aria-pressed="true"] {
      border: 1px solid var(--accent);
      background: rgba(37, 99, 235, 0.12);
      color: var(--accent);
      box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
    }
    .round-block-table-filters-btn[aria-pressed="true"]:hover {
      background: rgba(37, 99, 235, 0.18);
      border-color: #1d4ed8;
      color: #1d4ed8;
    }
    /* Filters strip hidden — muted “off” look */
    .round-block-table-filters-btn[aria-pressed="false"]:not(:disabled) {
      border: 1px dashed var(--muted);
      background: var(--panel-muted);
      color: var(--muted);
    }
    .round-block-table-filters-btn[aria-pressed="false"]:not(:disabled):hover {
      border-color: var(--border);
      border-style: solid;
      background: var(--sticky-bg-hover);
      color: var(--text);
    }
    .round-block-table-filters-btn:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .round-block-table-filters-btn svg {
      display: block;
    }
    .round-block-table-filters-btn:disabled {
      cursor: not-allowed;
      opacity: 0.72;
    }
    .round-block-table-filters-btn:disabled::after {
      display: none !important;
    }
    .round-block-table-filters-btn--locked {
      border: 1px solid var(--border);
      background: var(--panel-muted);
      color: var(--muted);
    }
    .round-block-table-filters-btn--locked::after {
      display: none !important;
    }
    .results-secondary-filter-locked-inner {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      flex-wrap: wrap;
    }
    .results-secondary-filter-lock-slot svg {
      display: block;
      flex-shrink: 0;
    }
    .results-secondary-filter-row--locked .results-secondary-filter-locked-hint {
      font-size: 0.82rem;
    }
    .round-block > summary::-webkit-details-marker { display: none; }
    .round-block .round-inner { padding: 0 0.75rem 0.85rem; }
    .results-secondary-filters {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-end;
      gap: 0.75rem 1.25rem;
      margin-top: 0.35rem;
    }
    .results-secondary-filters.results-secondary-filters--collapsed {
      display: none !important;
      margin-top: 0;
    }
    .results-secondary-filters .results-born-filter-wrap,
    .results-secondary-filters .results-topn-filter-wrap {
      margin-top: 0;
    }
    .results-born-filter-wrap {
      margin-top: 0.35rem;
    }
    .results-born-filter-label-row {
      display: inline-flex;
      flex-direction: row;
      align-items: center;
      gap: 0.35rem;
      flex-wrap: nowrap;
      min-width: 0;
    }
    .results-topn-filter-input {
      min-width: 6rem;
      max-width: 8rem;
      font: inherit;
      padding: 0.25rem 0.45rem;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: var(--panel);
      color: var(--text);
    }
    .results-topn-filter-row:not(.results-secondary-filter-row--locked) {
      flex-wrap: nowrap;
      align-items: center;
      width: 100%;
      min-width: 0;
      box-sizing: border-box;
    }
    .results-topn-filter-row:not(.results-secondary-filter-row--locked)
      .results-topn-filter-inner {
      flex: 1 1 auto;
      min-width: 0;
    }
    .results-topn-filter-highlight-actions {
      display: inline-flex;
      flex: 0 0 auto;
      flex-shrink: 0;
      align-items: center;
      margin-left: auto;
    }
    .results-topn-filter-highlight-actions .results-topn-filter-highlight-toolbar {
      margin: 0;
    }
    .results-born-filter-row .round-filter-btn.is-pressed {
      border-color: var(--accent);
      color: var(--accent);
    }
    .results-born-filter-inner--no-birth-access .round-filter-btn:disabled {
      opacity: 0.55;
      cursor: not-allowed;
    }
    td.td-born {
      vertical-align: middle;
      text-align: center;
    }
    table.results-athletes thead th[data-base-col="born"] {
      text-align: center;
    }
    .td-born-line--year {
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
    }
    .td-born-line--single {
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
    }
    .td-born-line--age {
      font-size: 0.82em;
      color: var(--muted);
      line-height: 1.25;
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
    }
    .results-table-wrap {
      overflow-x: auto;
      border-radius: 8px;
      border: 1px solid var(--border);
      margin-top: 0.35rem;
    }
    .results-bottom-actions {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-end;
      gap: 0.65rem 1rem;
      margin-top: 0.65rem;
    }
    .results-extend-prior-rounds-wrap {
      margin-top: 0;
    }
    .results-extend-prior-rounds-btn.secondary {
      font-size: 0.8rem;
      line-height: 1.25;
      padding: 0.22rem 0.5rem;
      min-height: 0;
    }
    .results-boulder-route-stats-btn.secondary {
      font-size: 0.8rem;
      line-height: 1.25;
      padding: 0.22rem 0.5rem;
      min-height: 0;
    }
    .results-boulder-stats-panel {
      position: relative;
      margin-top: 0.75rem;
      padding: 0.65rem 0.75rem 0.85rem;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--panel);
    }
    .results-boulder-stats-pop-switch {
      display: inline-flex;
      align-items: stretch;
      flex-shrink: 0;
      margin: 0;
      padding: 2px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: var(--surface-muted, color-mix(in srgb, var(--panel) 88%, var(--border)));
      font: inherit;
      font-size: 0.72rem;
      line-height: 1.25;
      cursor: pointer;
      min-height: 0;
      box-shadow: none;
    }
    .results-boulder-stats-pop-switch:hover {
      border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
    }
    .results-boulder-stats-pop-switch:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .results-boulder-stats-pop-switch-seg {
      padding: 0.28rem 0.55rem;
      border-radius: 8px;
      color: var(--muted);
      white-space: nowrap;
      pointer-events: none;
      user-select: none;
      transition:
        background 0.12s ease,
        color 0.12s ease,
        box-shadow 0.12s ease;
    }
    .results-boulder-stats-pop-switch:not(.is-scored)
      .results-boulder-stats-pop-switch-seg[data-boulder-stats-population="starterfield"],
    .results-boulder-stats-pop-switch.is-scored
      .results-boulder-stats-pop-switch-seg[data-boulder-stats-population="scored"] {
      background: var(--panel, var(--bg));
      color: var(--text);
      font-weight: 600;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    }
    .results-boulder-stats-panel[hidden] {
      display: none !important;
    }
    .results-boulder-stats-startlist-n {
      margin: 0 0 0.5rem;
      font-size: 0.82rem;
    }
    .results-boulder-stats-round-n {
      margin: 0 0 0.45rem;
      font-size: 0.82rem;
    }
    .results-boulder-stats-round {
      margin-top: 1rem;
    }
    .results-boulder-stats-round:first-of-type {
      margin-top: 0.35rem;
    }
    .results-boulder-stats-round-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem 0.75rem;
      margin: 0 0 0.35rem;
      min-height: 0;
    }
    .results-boulder-stats-round-title {
      margin: 0;
      flex: 1 1 auto;
      min-width: 0;
      font-size: 0.92rem;
      font-weight: 600;
      color: var(--text);
      line-height: 1.3;
    }
    .results-boulder-stats-table-wrap {
      overflow-x: auto;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--bg, var(--panel));
    }
    .results-boulder-stats-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.78rem;
      line-height: 1.35;
    }
    .results-boulder-stats-table th,
    .results-boulder-stats-table td {
      padding: 0.35rem 0.45rem;
      border-bottom: 1px solid var(--border);
      text-align: left;
      vertical-align: top;
    }
    .results-boulder-stats-table thead th {
      font-weight: 600;
      color: var(--muted);
      background: var(--panel);
      white-space: nowrap;
    }
    .results-boulder-stats-table thead th.th-sortable {
      cursor: pointer;
      user-select: none;
    }
    .results-boulder-stats-table thead th.th-sortable:hover {
      color: var(--text);
    }
    .results-boulder-stats-table tbody th[scope="row"] {
      font-weight: 500;
      color: var(--text);
      max-width: 10rem;
    }
    .results-boulder-stats-table tbody tr:last-child th,
    .results-boulder-stats-table tbody tr:last-child td {
      border-bottom: none;
    }
    .results-boulder-stats-cell-sub {
      display: block;
      margin-top: 0.2em;
      font-size: 0.92em;
      color: var(--muted);
      font-variant-numeric: tabular-nums;
    }
    .results-boulder-stats-cell-fav {
      display: flex;
      flex-direction: row;
      align-items: flex-start;
      gap: 0.38em;
      margin-top: 0.35em;
      padding-top: 0.3em;
      border-top: 1px solid var(--border);
    }
    /** Decorative only (matches filled ``athlete-favorite-star-btn.is-favorite``). */
    .results-boulder-stats-fav-star {
      flex-shrink: 0;
      margin: 0;
      padding: 0.12em 0 0;
      line-height: 0;
      color: var(--warn);
      pointer-events: none;
      user-select: none;
    }
    .results-boulder-stats-fav-lines {
      flex: 1;
      min-width: 0;
    }
    /**
     * Same tint as ``table.results-athletes tr.row-highlight-athlete td``
     * (favorite row background in results).
     */
    .results-boulder-stats-cell-fav--tint {
      margin-left: -0.12em;
      margin-right: -0.12em;
      padding-left: 0.28em;
      padding-right: 0.28em;
      padding-bottom: 0.15em;
      border-radius: 4px;
      border-top-color: rgba(37, 99, 235, 0.22);
      background: rgba(37, 99, 235, 0.1);
    }
    .results-boulder-stats-cell-fav-sub {
      margin-top: 0.15em;
    }
    .results-boulder-stats-empty {
      margin: 0;
    }
    .speed-elimination-wrap {
      margin-top: 1rem;
    }
    .speed-elimination-heading {
      margin: 0 0 0.5rem;
      font-size: 0.95rem;
      font-weight: 600;
      color: var(--text);
    }
    .speed-elim-bracket-outer {
      overflow-x: auto;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--panel);
      padding: 0.65rem 0.5rem 0.85rem;
      margin-top: 0.35rem;
    }
    .speed-elim-bracket-flow {
      display: flex;
      flex-direction: row;
      align-items: stretch;
      gap: 0;
      min-width: min-content;
    }
    .speed-elim-bracket-column {
      flex: 0 0 auto;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      min-width: 12.5rem;
      max-width: 16rem;
      padding-right: 1.5rem;
      position: relative;
    }
    .speed-elim-bracket-column:not(:last-child)::after {
      content: "";
      position: absolute;
      right: 0;
      top: 2.25rem;
      bottom: 0.35rem;
      width: 1px;
      background: var(--border);
      pointer-events: none;
    }
    .speed-elim-bracket-round-label {
      font-size: 0.68rem;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: var(--muted);
      text-align: center;
      margin-bottom: 0.55rem;
      padding: 0 0.25rem;
    }
    .speed-elim-bracket-match-list {
      display: flex;
      flex-direction: column;
      justify-content: space-around;
      flex: 1 1 auto;
      gap: 1rem;
      min-height: 2rem;
    }
    .speed-elim-match {
      position: relative;
      border: 1px solid var(--border);
      border-radius: 8px;
      overflow: hidden;
      background: var(--panel);
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    }
    .speed-elim-bracket-column:not(:last-child) .speed-elim-match::after {
      content: "";
      position: absolute;
      right: -1.5rem;
      top: 50%;
      width: 1.5rem;
      height: 1px;
      background: var(--border);
      pointer-events: none;
    }
    .speed-elim-match-slot {
      padding: 0.38rem 0.45rem;
      font-size: 0.74rem;
      line-height: 1.35;
      text-align: left;
      background: var(--panel);
    }
    .speed-elim-match-slot:not(.speed-elim-match-slot--empty) {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 0.5rem;
    }
    .speed-elim-match-slot--details:not(.speed-elim-match-slot--empty) {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      grid-template-rows: auto auto auto;
      column-gap: 0.5rem;
      row-gap: 0.1rem;
      align-items: start;
    }
    .speed-elim-match-slot--details:not(.speed-elim-match-slot--empty)
      .speed-elim-match-name-line {
      grid-column: 1;
      grid-row: 1;
      flex: unset;
    }
    .speed-elim-match-slot--details:not(.speed-elim-match-slot--empty)
      .speed-elim-match-result {
      grid-column: 2;
      grid-row: 1;
      flex: unset;
    }
    .speed-elim-match-slot--details:not(.speed-elim-match-slot--empty)
      .speed-elim-match-meta {
      grid-column: 1 / -1;
      grid-row: 2;
    }
    .speed-elim-match-slot--details:not(.speed-elim-match-slot--empty)
      .speed-elim-match-best-lines {
      grid-column: 1 / -1;
      grid-row: 3;
      font-size: 0.66rem;
      line-height: 1.35;
      color: var(--muted);
      margin-top: 0.12rem;
    }
    .speed-elim-match-best-line {
      display: block;
      min-width: 0;
    }
    .speed-elim-match-best-line + .speed-elim-match-best-line {
      margin-top: 0.06rem;
    }
    .speed-elim-match-best-label {
      font-weight: 500;
      color: var(--muted);
    }
    .speed-elim-match-best-value {
      font-variant-numeric: tabular-nums;
    }
    /* PB denied: lock must stay within one text line of ``.speed-elim-match-best-lines`` (0.66rem). */
    .speed-elim-match-best-lines .speed-elim-pb-lock-slot {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      line-height: 0;
      font-size: inherit;
    }
    .speed-elim-match-best-lines .speed-elim-pb-lock-slot .results-col-perm-lock {
      line-height: 0;
      display: inline-flex;
    }
    .speed-elim-match-best-lines .speed-elim-pb-lock-slot .results-col-perm-lock svg {
      display: block;
      width: 0.87em;
      height: 0.87em;
      max-width: 1.4cap;
      max-height: 1.4cap;
    }
    .speed-elim-match-name-line {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.14rem;
      min-width: 0;
      flex: 1 1 auto;
    }
    .speed-elim-match-name-line .speed-elim-match-name {
      min-width: 0;
      width: 100%;
      flex: 0 1 auto;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .speed-elim-match-name-line .results-athlete-list-tags {
      flex: 0 1 auto;
      max-width: 100%;
    }
    .speed-elim-match-result {
      flex: 0 0 auto;
      text-align: right;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }
    .speed-elim-match-meta {
      font-size: 0.68rem;
      line-height: 1.25;
      color: var(--muted);
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .speed-elim-match-result--winner {
      color: var(--ok);
      font-weight: 600;
    }
    .speed-elim-match-slot--empty {
      color: var(--muted);
      font-style: italic;
    }
    .speed-elim-match-slot--winner {
      background: rgba(5, 150, 105, 0.08);
      border-left: 3px solid var(--ok);
      padding-left: calc(0.45rem - 3px);
    }
    .speed-elim-match-divider {
      height: 1px;
      background: var(--border);
      margin: 0;
    }
    table.results-athletes {
      font-size: 0.78rem;
      border: none;
      border-radius: 0;
    }
    table.results-athletes th,
    table.results-athletes td {
      padding: 0.4rem 0.5rem;
      vertical-align: middle;
    }
    /* Newlines in header labels (data / i18n) render as line breaks. */
    table.results-athletes thead th {
      white-space: pre-line;
    }
    table.results-athletes thead tr.results-route-group-row th {
      font-size: 0.82rem;
      line-height: 1.15;
      padding-top: 0.2rem;
      padding-bottom: 0.2rem;
      font-weight: 600;
    }
    table.results-athletes thead th.results-route-group-th {
      text-align: center;
      border-bottom: 0;
      background: var(--surface-2);
    }
    table.results-athletes thead th.results-route-group-spacer {
      background: var(--surface-2);
      border-bottom: 0;
    }
    table.results-athletes th.route-col,
    table.results-athletes td.route-col {
      text-align: center;
      font-variant-numeric: tabular-nums;
      max-width: 5.5rem;
    }
    table.results-athletes td.route-col {
      white-space: normal;
      vertical-align: top;
      line-height: 1.25;
    }
    td.route-col .ascent-points-line {
      font-variant-numeric: tabular-nums;
    }
    td.route-col .ascent-inline-box-layout {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.35rem;
    }
    td.route-col .ascent-inline-box-layout .ascent-points-line {
      min-width: 1.3rem;
      text-align: right;
      line-height: 1.3;
    }
    td.route-col .ascent-tz-line {
      font-size: 0.92em;
      margin-top: 0.2em;
    }
    td.route-col .ascent-tz-boxes {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 1px;
      margin-top: 0;
    }
    td.route-col .ascent-tz-box {
      width: 2.1rem;
      padding: 0.12rem 0.35rem;
      font-size: 0.85em;
      font-weight: 600;
      font-variant-numeric: tabular-nums;
      border-radius: 4px;
      line-height: 1.2;
      text-align: center;
      box-sizing: border-box;
      border: 2px solid transparent;
    }
    td.route-col .ascent-tz-box--filled {
      background: var(--ascent-filled-color, var(--ok));
      border-color: var(--ascent-filled-color, var(--ok));
      color: var(--ascent-filled-text-color, #fff);
    }
    td.route-col .ascent-tz-box--outline {
      background: transparent;
      border-color: var(--border);
      color: var(--text);
    }
    td.route-col .ascent-tz-box--miss-text {
      color: #dc2626;
    }
    td.route-col .ascent-tz-box--empty {
      background: transparent;
      border: 2px dashed var(--border);
      color: var(--muted);
      font-weight: 500;
    }
    table.results-athletes td.td-score.td-score--has-predict {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: center;
      gap: 0.2rem 0.35rem;
    }
    td.route-col .results-route-predict-wrap {
      display: inline-flex;
      align-items: center;
      flex-shrink: 0;
    }
    td.route-col .ascent-tz-boxes--predicted .ascent-tz-box--predicted {
      border-style: dashed;
      border-color: color-mix(in srgb, var(--warning, #d97706) 55%, var(--border));
      background: transparent;
      color: var(--warning, #d97706);
      font-weight: 600;
    }
    td.route-col .results-route-predict-legacy {
      color: var(--warning, #d97706);
      font-weight: 600;
      font-size: 0.92em;
      white-space: nowrap;
    }
    td.route-col .ascent-lead-cell {
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
    }
    td.route-col .ascent-lead-rank-inline {
      color: var(--muted);
      font-size: 0.88em;
      font-weight: 500;
      font-variant-numeric: tabular-nums;
    }
    td.route-col .ascent-top-ok,
    td.route-col .ascent-zone-ok {
      color: var(--ok);
      font-weight: 600;
    }
    td.route-col .ascent-top-miss,
    td.route-col .ascent-zone-miss {
      color: #dc2626;
    }
    table.results-athletes td.route-col.ascent-status-active {
      box-shadow: inset 0 0 0 2px var(--ok);
      border-radius: 6px;
    }
    table.results-athletes td.route-col.route-col-next-starter {
      box-shadow: inset 0 0 0 2px var(--accent);
      border-radius: 6px;
    }
    table.results-athletes td.route-col .route-col-next-starter-label {
      display: block;
      margin-top: 0.15em;
      font-size: 0.72em;
      font-weight: 600;
      color: var(--accent);
      line-height: 1.2;
    }
    table.results-athletes td.route-col.route-cell-start-position {
      color: var(--muted);
      font-weight: 400;
      font-size: 0.92em;
      font-variant-numeric: tabular-nums;
      opacity: 0.88;
    }
    td.route-col .results-route-cell-start-time-sub {
      display: block;
      margin-top: 0.2em;
      font-size: 0.88em;
      font-weight: 500;
      font-variant-numeric: tabular-nums;
      color: var(--muted);
      opacity: 0.92;
      line-height: 1.2;
    }
    td.route-col .results-route-cell-start-time-sub.results-col-perm-guarded {
      position: relative;
      min-height: 1.35rem;
    }
    table.results-athletes td.td-score {
      text-align: center;
      vertical-align: middle;
      line-height: 1.25;
    }
    table.results-athletes td.td-score.td-score--under-appeal {
      background: color-mix(in srgb, var(--warning, #d97706) 22%, var(--panel));
    }
    table.results-athletes td.td-score .td-score-appeal-head {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.35rem;
      max-width: 100%;
    }
    table.results-athletes td.td-score .td-score-appeal-icon {
      display: inline-flex;
      flex-shrink: 0;
      align-self: center;
      color: var(--warning, #d97706);
    }
    table.results-athletes td.td-score .td-score-appeal-icon svg {
      display: block;
    }
    table.results-athletes td.route-col.route-col--under-appeal {
      background: color-mix(in srgb, var(--warning, #d97706) 22%, var(--panel));
    }
    table.results-athletes td.route-col .route-col-appeal-head {
      display: inline-flex;
      align-items: flex-start;
      justify-content: center;
      gap: 0.35rem;
      max-width: 100%;
    }
    table.results-athletes td.route-col .route-col-appeal-icon {
      display: inline-flex;
      flex-shrink: 0;
      align-self: center;
      color: var(--warning, #d97706);
    }
    table.results-athletes td.route-col .route-col-appeal-icon svg {
      display: block;
    }
    table.results-athletes td.route-col .route-col-appeal-body {
      display: flex;
      flex-direction: column;
      align-items: center;
      min-width: 0;
    }
    table.results-athletes th.th-cup-standings,
    table.results-athletes td.td-cup-standings {
      text-align: center;
      vertical-align: middle;
      font-variant-numeric: tabular-nums;
      font-weight: 400;
    }
    table.results-athletes td.td-cup-standings {
      line-height: 1.25;
    }
    table.results-athletes td.td-cup-standings .cup-standings-cell-rank {
      font-weight: 400;
      font-size: 0.95em;
      line-height: 1.2;
    }
    table.results-athletes td.td-cup-standings .cup-standings-cell-points {
      display: block;
      margin-top: 0.2rem;
      font-size: 0.72rem;
      font-weight: 400;
      color: var(--muted);
      line-height: 1.2;
    }
    /* Same typography as ``.cup-rankings-th-event-cup-title`` (rankings cup column title). */
    table.results-athletes thead th.th-cup-standings {
      position: relative;
      font-size: 0.8em;
      font-weight: 400;
      line-height: 1.2;
      white-space: normal;
      overflow-wrap: anywhere;
      word-break: break-word;
      max-width: 8rem;
    }
    table.results-athletes thead th.th-cup-standings .th-cup-standings-inner {
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0.15rem;
      width: 100%;
      max-width: 100%;
    }
    table.results-athletes thead th.th-cup-standings .th-cup-standings-label {
      min-width: 4rem;
      max-width: 7rem;
      width: 100%;
    }
    table.results-athletes thead th.th-cup-standings .th-cup-standings-link svg {
      width: 0.92rem;
      height: 0.92rem;
    }
    table.results-athletes td.td-score--boulder .score-main {
      font-weight: 600;
    }
    table.results-athletes td.td-score .score-ascent-summary {
      display: block;
      margin-top: 0.2rem;
      font-size: 0.72rem;
      font-weight: 600;
      color: var(--muted);
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }
    table.results-athletes td.td-score .score-ascent-summary .score-ascent-summary-negative {
      color: var(--danger, #b91c1c);
    }
    table.results-athletes td.td-overall-score {
      text-align: center;
      vertical-align: middle;
      line-height: 1.25;
    }
    table.results-athletes td.td-overall-score.td-score--boulder .score-main {
      font-weight: 600;
    }
    table.results-athletes td.td-overall-score .score-ascent-summary {
      display: block;
      margin-top: 0.2rem;
      font-size: 0.72rem;
      font-weight: 600;
      color: var(--muted);
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }
    table.results-athletes td.td-overall-score .score-ascent-summary .score-ascent-summary-negative {
      color: var(--danger, #b91c1c);
    }
    table.results-athletes thead th.speed-best-column-sep,
    table.results-athletes tbody td.speed-best-column-sep {
      border-right: 2px solid var(--table-header-text);
    }
    table.results-athletes thead th.route-group-sep-after,
    table.results-athletes tbody td.route-group-sep-after {
      border-right: 2px solid var(--table-header-text);
    }
    table.results-athletes thead th.speed-elim-stage-col {
      max-width: 9rem;
      font-size: 0.88em;
    }
    table.results-athletes td.speed-elim-stage-col {
      max-width: 9rem;
      font-size: 0.88em;
      white-space: nowrap;
    }
    table.results-athletes thead th.th-prior-round {
      text-align: center;
      vertical-align: middle;
      font-weight: 600;
      font-variant-numeric: tabular-nums;
      max-width: 6.5rem;
    }
    table.results-athletes td.td-prior-round {
      text-align: center;
      vertical-align: middle;
      font-size: 0.82rem;
      line-height: 1.25;
      max-width: 7rem;
      white-space: normal;
    }
    table.results-athletes td.td-prior-round .prior-round-score-line {
      font-variant-numeric: tabular-nums;
      margin-top: 0.15rem;
    }
    table.results-athletes td.td-prior-round .prior-round-rank {
      font-weight: 400;
      font-variant-numeric: tabular-nums;
    }
    table.results-athletes td.results-col-perm-guarded,
    table.cup-rankings-table td.results-col-perm-guarded,
    table.registration-participants-table td.results-col-perm-guarded {
      position: relative;
      min-height: 2.25rem;
    }
    table.results-athletes .results-col-perm-overlay,
    table.cup-rankings-table .results-col-perm-overlay,
    table.registration-participants-table .results-col-perm-overlay {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0.2rem;
      color: var(--muted);
      background: color-mix(in srgb, var(--bg) 82%, transparent);
      backdrop-filter: blur(2px);
      z-index: 2;
      pointer-events: none;
    }
    table.results-athletes .results-col-perm-lock,
    table.cup-rankings-table .results-col-perm-lock,
    table.registration-participants-table .results-col-perm-lock {
      pointer-events: auto;
      cursor: help;
      line-height: 0;
      opacity: 0.92;
    }
    table.results-athletes .results-col-perm-lock svg,
    table.cup-rankings-table .results-col-perm-lock svg,
    table.registration-participants-table .results-col-perm-lock svg {
      display: block;
      width: 0.95rem;
      height: 0.95rem;
    }
    table.results-athletes th.sticky-left,
    table.results-athletes td.sticky-left {
      position: sticky;
      left: 0;
      background: var(--sticky-bg);
      z-index: 1;
      box-shadow: 4px 0 8px -4px rgba(15, 23, 42, 0.12);
    }
    /* Match other header cells (``th`` uses ``--table-header``); sticky used ``--sticky-bg`` for body rows. */
    table.results-athletes thead th.sticky-left {
      background: var(--table-header);
    }
    table.results-athletes tr:hover td.sticky-left { background: var(--sticky-bg-hover); }
    table.results-athletes thead th.th-sortable {
      cursor: pointer;
      user-select: none;
    }
    table.results-athletes thead th.th-sortable:hover {
      color: var(--text);
    }
    table.results-athletes thead th.route-col .route-col-head {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0.2rem;
      line-height: 1.2;
      min-height: 2.5rem;
    }
    table.results-athletes thead th.route-col .route-col-title {
      font-weight: 600;
      text-align: center;
    }
    table.results-athletes thead th.route-col .route-col-stats {
      font-size: 0.72rem;
      font-weight: 600;
      color: var(--muted);
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }
    table.results-athletes thead th.route-col.route-col-detail-off .route-col-stats {
      display: none;
    }
    table.results-athletes thead th.route-col.route-col-detail-off .route-col-head {
      min-height: 0;
      gap: 0;
    }
    /* Speed: no stats sub-row; keep header single-line even when “Details” is on */
    table.results-athletes thead th.route-col.route-col-speed .route-col-head {
      min-height: 0;
      gap: 0;
    }
    /* Highlight fastest valid speed time per athlete row */
    table.results-athletes td.route-col-fastest {
      color: var(--success, #28a745);
      font-weight: 700;
    }
    table.results-athletes td.td-country {
      cursor: pointer;
      text-align: center;
      vertical-align: middle;
      line-height: 1;
      padding-block: 0.1rem;
    }
    table.results-athletes td.td-country .td-country-stack {
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0;
      max-width: 100%;
      line-height: 1;
    }
    table.results-athletes td.td-country .td-country-code {
      display: block;
      font-size: 0.68rem;
      font-weight: 600;
      font-variant-numeric: tabular-nums;
      line-height: 1;
      margin: 0;
      padding: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 100%;
    }
    table.results-athletes td.td-country .td-country-flag {
      display: block;
      margin: 0 auto;
      height: 0.95rem;
      width: auto;
      max-width: 1.95rem;
      object-fit: contain;
      flex-shrink: 0;
    }
    table.results-athletes td.td-country.td-highlight-marked .td-country-stack,
    table.results-athletes td.td-country.td-highlight-marked .td-country-code {
      font-weight: 700;
    }
    table.results-athletes td.td-region.td-highlight-marked {
      font-weight: 700;
    }
    /* Safari/WebKit: underline on the whole td breaks chip styling on list tags; underline name only. */
    table.results-athletes td.td-athlete {
      text-decoration: none;
      position: relative;
    }
    table.registration-participants-table td.td-reg-name,
    table.startlist-matrix td.td-reg-name,
    table.cup-rankings-table td.cup-rankings-name-cell {
      position: relative;
    }
    table.results-athletes td.td-country:hover {
      text-decoration: underline;
      text-underline-offset: 2px;
    }
    /* WebKit/Safari: flex + min-width:0 inside td fixes list-tag pills collapsing to plain text. */
    table.results-athletes td.td-athlete .athlete-cell-name-inner,
    table.registration-participants-table td.td-reg-name .athlete-cell-name-inner,
    table.startlist-timeline-matrix td.startlist-timeline-slot-cell .athlete-cell-name-inner,
    table.cup-rankings-table td.cup-rankings-name-cell .athlete-cell-name-inner {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.22rem 0.35rem;
      min-width: 0;
      width: 100%;
      box-sizing: border-box;
      line-height: 1.25;
    }
    table.results-athletes td.td-athlete .athlete-cell-name-primary,
    table.registration-participants-table td.td-reg-name .athlete-cell-name-primary,
    table.startlist-timeline-matrix td.startlist-timeline-slot-cell .athlete-cell-name-primary,
    table.cup-rankings-table td.cup-rankings-name-cell .athlete-cell-name-primary {
      display: inline-flex;
      align-items: center;
      flex-wrap: wrap;
      min-width: 0;
    }
    table.results-athletes td.td-athlete .athlete-cell-profile-link,
    table.registration-participants-table td.td-reg-name .athlete-cell-profile-link,
    table.startlist-matrix td.td-reg-name .athlete-cell-profile-link,
    table.cup-rankings-table td.cup-rankings-name-cell .athlete-cell-profile-link,
    table.athletes-events-matrix td.athletes-events-matrix-td-name .athlete-cell-profile-link,
    table.cup-rankings-table th.cup-rankings-th-event .cup-rankings-th-event-results-link,
    table.results-athletes thead th.th-cup-standings .th-cup-standings-link {
      position: absolute;
      top: 0.08rem;
      right: 0.08rem;
      z-index: 2;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: var(--muted);
      text-decoration: none;
      line-height: 0;
      border-radius: 4px;
      padding: 0.1rem;
      pointer-events: auto;
      background: var(--panel-bg, rgba(255, 255, 255, 0.82));
      box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
    }
    table.results-athletes td.td-athlete .athlete-cell-profile-link:hover,
    table.registration-participants-table td.td-reg-name .athlete-cell-profile-link:hover,
    table.startlist-matrix td.td-reg-name .athlete-cell-profile-link:hover,
    table.cup-rankings-table td.cup-rankings-name-cell .athlete-cell-profile-link:hover,
    table.athletes-events-matrix td.athletes-events-matrix-td-name .athlete-cell-profile-link:hover,
    table.cup-rankings-table th.cup-rankings-th-event .cup-rankings-th-event-results-link:hover,
    table.results-athletes thead th.th-cup-standings .th-cup-standings-link:hover {
      color: var(--text);
      background: rgba(37, 99, 235, 0.08);
    }
    table.results-athletes td.td-athlete .athlete-cell-profile-link:focus-visible,
    table.registration-participants-table td.td-reg-name .athlete-cell-profile-link:focus-visible,
    table.startlist-matrix td.td-reg-name .athlete-cell-profile-link:focus-visible,
    table.cup-rankings-table td.cup-rankings-name-cell .athlete-cell-profile-link:focus-visible,
    table.athletes-events-matrix td.athletes-events-matrix-td-name .athlete-cell-profile-link:focus-visible,
    table.cup-rankings-table th.cup-rankings-th-event .cup-rankings-th-event-results-link:focus-visible,
    table.results-athletes thead th.th-cup-standings .th-cup-standings-link:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 1px;
    }
    button.athlete-favorite-star-btn {
      flex-shrink: 0;
      margin: 0;
      padding: 0.1rem;
      line-height: 0;
      border: none;
      border-radius: 4px;
      background: transparent;
      color: var(--muted);
      cursor: pointer;
      box-shadow: none;
      vertical-align: middle;
      text-decoration: none;
    }
    button.athlete-favorite-star-btn:hover {
      color: var(--text);
      background: rgba(37, 99, 235, 0.08);
    }
    button.athlete-favorite-star-btn.is-favorite:hover {
      color: var(--warn);
      background: rgba(202, 138, 4, 0.14);
    }
    button.athlete-favorite-star-btn:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 1px;
    }
    button.athlete-favorite-star-btn .athlete-favorite-star-path {
      fill: none;
      stroke: currentColor;
      stroke-width: 1.35;
      stroke-linejoin: round;
    }
    button.athlete-favorite-star-btn.is-favorite {
      color: var(--warn);
    }
    button.athlete-favorite-star-btn.is-favorite .athlete-favorite-star-path {
      fill: currentColor;
      stroke: none;
    }
    .athlete-favorite-star-indicator {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      margin: 0;
      margin-inline-end: 0.12rem;
      padding: 0.1rem;
      line-height: 0;
      color: var(--warn);
      vertical-align: middle;
      cursor: default;
      user-select: none;
      pointer-events: none;
    }
    .athlete-favorite-star-indicator svg {
      width: 16px;
      height: 16px;
      display: block;
    }
    .athlete-favorite-star-indicator .athlete-favorite-star-path {
      fill: currentColor;
      stroke: none;
    }
    table.results-athletes td.td-athlete:hover .athlete-favorite-star-btn,
    table.registration-participants-table td.td-reg-name:hover .athlete-favorite-star-btn,
    table.cup-rankings-table td.cup-rankings-name-cell:hover .athlete-favorite-star-btn {
      text-decoration: none;
    }
    table.results-athletes td.td-athlete .results-athlete-list-tags,
    table.registration-participants-table td.td-reg-name .results-athlete-list-tags,
    table.startlist-matrix .results-athlete-list-tags,
    table.startlist-timeline-matrix .results-athlete-list-tags,
    .speed-elim-match-name-line .results-athlete-list-tags {
      display: inline-flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.22rem 0.35rem;
      margin: 0;
      vertical-align: middle;
      max-width: 100%;
      min-width: 0;
      line-height: 1.2;
      cursor: default;
      text-decoration: none;
    }
    table.results-athletes td.td-athlete .results-athlete-list-tags:hover,
    table.registration-participants-table td.td-reg-name .results-athlete-list-tags:hover,
    table.startlist-matrix .results-athlete-list-tags:hover,
    table.startlist-timeline-matrix .results-athlete-list-tags:hover,
    .speed-elim-match-name-line .results-athlete-list-tags:hover {
      text-decoration: none;
    }
    table.results-athletes .results-athlete-list-tag,
    table.registration-participants-table .results-athlete-list-tag,
    table.startlist-matrix .results-athlete-list-tag,
    table.startlist-timeline-matrix .results-athlete-list-tag,
    table.cup-rankings-table .results-athlete-list-tag,
    .speed-elim-match-name-line .results-athlete-list-tag {
      display: inline-block;
      box-sizing: border-box;
      font-family: inherit;
      font-size: 0.68rem;
      font-weight: 500;
      line-height: 1.25;
      padding: 0.1rem 0.35rem;
      border-radius: 4px;
      border: 1px solid var(--border);
      background: var(--panel-muted);
      color: var(--text);
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      cursor: pointer;
      text-align: center;
      vertical-align: middle;
      -webkit-appearance: none;
      appearance: none;
      margin: 0;
    }
    table.results-athletes .results-athlete-list-tag.is-list-favorite,
    table.registration-participants-table .results-athlete-list-tag.is-list-favorite,
    table.startlist-matrix .results-athlete-list-tag.is-list-favorite,
    table.startlist-timeline-matrix .results-athlete-list-tag.is-list-favorite,
    table.cup-rankings-table .results-athlete-list-tag.is-list-favorite,
    .speed-elim-match-name-line .results-athlete-list-tag.is-list-favorite {
      font-weight: 700;
    }
    table.results-athletes .results-athlete-list-tag:focus,
    table.registration-participants-table .results-athlete-list-tag:focus,
    table.startlist-matrix .results-athlete-list-tag:focus,
    table.startlist-timeline-matrix .results-athlete-list-tag:focus,
    table.cup-rankings-table .results-athlete-list-tag:focus {
      outline: none;
    }
    table.results-athletes .results-athlete-list-tag:focus-visible,
    table.registration-participants-table .results-athlete-list-tag:focus-visible,
    table.startlist-matrix .results-athlete-list-tag:focus-visible,
    table.startlist-timeline-matrix .results-athlete-list-tag:focus-visible,
    table.cup-rankings-table .results-athlete-list-tag:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    table.results-athletes tr.row-highlight-athlete td {
      background: rgba(37, 99, 235, 0.1);
    }
    table.results-athletes tr.row-highlight-athlete:hover td {
      background: rgba(37, 99, 235, 0.16);
    }
    table.results-athletes tr.row-highlight-athlete td.sticky-left {
      background: rgba(37, 99, 235, 0.12);
    }
    table.results-athletes tr.row-highlight-athlete:hover td.sticky-left {
      background: rgba(37, 99, 235, 0.18);
    }
    table.results-athletes tr.row-highlight-country td {
      background: var(--session-hl-bg, rgba(5, 150, 105, 0.1));
    }
    table.results-athletes tr.row-highlight-country:hover td {
      background: var(--session-hl-bg-hover, rgba(5, 150, 105, 0.16));
    }
    table.results-athletes tr.row-highlight-country td.sticky-left {
      background: var(--session-hl-sticky, rgba(5, 150, 105, 0.12));
    }
    table.results-athletes tr.row-highlight-country:hover td.sticky-left {
      background: var(--session-hl-sticky-hover, rgba(5, 150, 105, 0.18));
    }
    table.results-athletes tr.row-highlight-athlete.row-highlight-country td {
      background: var(--session-hl-athlete-blend, rgba(14, 116, 144, 0.12));
    }
    table.results-athletes tr.row-highlight-athlete.row-highlight-country:hover td {
      background: var(--session-hl-athlete-blend, rgba(14, 116, 144, 0.16));
    }
    table.results-athletes tr.row-highlight-athlete.row-highlight-country td.sticky-left {
      background: var(--session-hl-athlete-sticky, rgba(14, 116, 144, 0.16));
    }
    table.results-athletes tr.row-highlight-athlete.row-highlight-country:hover td.sticky-left {
      background: var(--session-hl-athlete-sticky, rgba(14, 116, 144, 0.2));
    }
    .results-table-toolbar {
      display: flex;
      flex-wrap: wrap;
      gap: 0.36rem 0.46rem;
      align-items: center;
      margin: 0.35rem 0 0.4rem;
    }
    .results-main.results-main--speed-tree-only > .results-secondary-filters,
    .results-main.results-main--speed-tree-only > .results-table-wrap,
    .results-main.results-main--speed-tree-only > .results-athlete-counts {
      display: none !important;
    }
    .results-main.results-main--speed-tree-only .results-bottom-actions,
    .results-main.results-main--speed-tree-only .results-boulder-stats-panel,
    .results-main.results-main--speed-tree-only .results-extend-prior-rounds-wrap {
      display: none !important;
    }
    .results-main.results-main--speed-tree-only .speed-elimination-heading {
      display: none !important;
    }
    .results-table-toolbar-label {
      flex: 0 0 auto;
      font-size: 0.73rem;
      font-weight: 600;
      color: var(--muted);
      line-height: 1.2;
      margin-right: 0.2rem;
    }
    .results-table-toolbar button.secondary {
      font-size: 0.76rem;
      font-weight: 500;
      padding: 0.28rem 0.52rem;
      line-height: 1.25;
      border-radius: 10px;
      min-height: 2.2rem;
    }
    .results-table-toolbar button.secondary.registration-export-csv-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin-inline-start: 0;
      padding: 0.28rem;
      min-width: 2.2rem;
      font-weight: 500;
      color: var(--text);
      border-color: var(--border);
      background: var(--panel);
    }
    .registration-export-toolbar-actions {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      margin-inline-start: auto;
    }
    .results-table-toolbar button.secondary.registration-export-json-btn {
      font-size: 0.76rem;
      font-weight: 500;
      padding: 0.28rem 0.52rem;
      line-height: 1.25;
      border-radius: 10px;
      min-height: 2.2rem;
      color: var(--text);
      border-color: var(--border);
      background: var(--panel);
    }
    button.secondary.registration-export-json-btn {
      display: inline-flex;
      align-items: center;
      gap: 0.28rem;
    }
    button.secondary.registration-export-json-btn--locked {
      opacity: 0.82;
      cursor: not-allowed;
    }
    button.secondary.registration-export-json-btn .registration-export-json-lock-slot .results-col-perm-lock svg {
      width: 14px;
      height: 14px;
      display: block;
    }
    .results-table-toolbar button.secondary.registration-export-csv-btn svg {
      display: block;
      flex-shrink: 0;
    }
    .results-table-toolbar button.secondary.registration-export-csv-btn:hover,
    .results-table-toolbar button.secondary.registration-export-csv-btn:focus-visible {
      color: var(--text);
      border-color: var(--border);
      background: var(--panel);
    }
    .round-filters .event-results-toolbar-host .results-table-toolbar {
      margin: 0.3rem 0 0;
      padding-top: 0.4rem;
      border-top: 1px solid var(--border);
    }
    .registration-json-dump-wrap {
      margin: 0.5rem 0 0.65rem;
    }
    .registration-json-dump-field-wrap {
      position: relative;
    }
    .registration-json-dump-copy-btn {
      position: absolute;
      top: 0.45rem;
      right: 0.5rem;
      z-index: 2;
      font-size: 0.72rem;
      font-weight: 500;
      padding: 0.22rem 0.48rem;
      line-height: 1.25;
      border-radius: 8px;
      min-height: auto;
    }
    .registration-json-dump-textarea {
      display: block;
      width: 100%;
      min-height: 16rem;
      max-height: 50vh;
      box-sizing: border-box;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
      font-size: 0.72rem;
      line-height: 1.35;
      padding: 2.35rem 0.65rem 0.55rem 0.65rem;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: var(--panel);
      color: var(--text);
      resize: vertical;
    }
    .event-results-toolbar-host--standalone .results-table-toolbar {
      margin: 0 0 0.55rem;
    }
    .results-table-toolbar .results-filter-btn.is-pressed {
      background: rgba(37, 99, 235, 0.14);
      border-color: var(--accent);
      color: var(--text);
    }
    .results-table-toolbar button.secondary.registration-bib-toggle {
      display: inline-flex;
      align-items: center;
      gap: 0.28rem;
    }
    .results-table-toolbar button.secondary.registration-bib-toggle--locked {
      opacity: 0.82;
      cursor: not-allowed;
    }
    .results-table-toolbar button.secondary.registration-bib-toggle--locked .registration-bib-lock-slot .results-col-perm-lock svg {
      width: 14px;
      height: 14px;
      display: block;
    }
    /* Column dialog + highlights dialog — distinct from toggle-only filter chips. */
    .results-table-toolbar button.secondary.results-toolbar-overlay-btn {
      display: inline-flex;
      align-items: center;
      gap: 0.32rem;
      border-color: rgba(37, 99, 235, 0.48);
      background: var(--panel);
      box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
    }
    .results-table-toolbar button.secondary.results-toolbar-overlay-btn::after {
      content: "";
      display: inline-block;
      width: 0.4rem;
      height: 0.4rem;
      margin-inline-start: 0.02rem;
      border-right: 1.5px solid var(--accent);
      border-bottom: 1.5px solid var(--accent);
      transform: rotate(45deg) translateY(-1px);
      opacity: 0.88;
      flex-shrink: 0;
    }
    .results-table-toolbar button.secondary.results-toolbar-overlay-btn:hover {
      border-color: var(--accent);
      background: rgba(37, 99, 235, 0.06);
    }
    .results-athlete-counts,
    .registration-athlete-counts,
    .events-overview-counts {
      font-size: 0.75rem;
      margin: 0.35rem 0 0;
      color: var(--muted);
    }
    .results-speed-pb-dialog {
      border: none;
      border-radius: 12px;
      padding: 0;
      max-width: min(980px, calc(100vw - 2rem));
      width: 100%;
      background: var(--panel);
      color: var(--text);
      box-shadow: 0 16px 48px rgba(15, 23, 42, 0.22);
    }
    .results-speed-pb-dialog::backdrop {
      background: rgba(15, 23, 42, 0.4);
    }
    .results-speed-pb-overlay-inner {
      display: flex;
      flex-direction: column;
      min-height: 0;
      overflow: hidden;
      padding: 0 0.68rem 0;
      max-height: min(90vh, 44rem);
    }
    .results-speed-pb-overlay-head {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.35rem 0.55rem;
      border-bottom: 1px solid var(--border);
      margin: 0;
      padding: 0.44rem 0 0.52rem;
    }
    .results-speed-pb-overlay-head > h3 {
      flex: 1 1 auto;
      margin: 0;
      font-size: 0.94rem;
      font-weight: 600;
      text-align: left;
      min-width: 8rem;
    }
    .results-speed-pb-overlay-actions {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.35rem;
      justify-content: flex-end;
      border-top: 1px solid var(--border);
      margin: 0;
      padding: 0.44rem 0 0.52rem;
    }
    .results-speed-pb-overlay-reload.square {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 1.4rem;
      height: 1.4rem;
      padding: 0;
      border: 1px solid var(--border);
      border-radius: 5px;
      background: var(--panel);
      cursor: pointer;
      color: var(--muted);
      line-height: 0;
    }
    .results-speed-pb-overlay-reload.square:hover:not(:disabled) {
      color: var(--accent);
      border-color: var(--accent);
    }
    .results-speed-pb-overlay-reload.square:disabled {
      opacity: 0.45;
      cursor: not-allowed;
    }
    .results-speed-pb-overlay-reload.square svg {
      width: 13px;
      height: 13px;
      display: block;
    }
    .td-speed-pb {
      vertical-align: top;
    }
    .td-speed-pb .td-speed-pb-time {
      line-height: 1.25;
    }
    .td-speed-pb .td-speed-pb-meta {
      margin-top: 0.18rem;
      font-size: 0.82em;
      line-height: 1.3;
      word-break: break-word;
      display: flex;
      flex-direction: column;
      gap: 0.12rem;
      align-items: flex-start;
    }
    .td-speed-pb .td-speed-pb-event-text {
      color: inherit;
    }
    .td-speed-pb--click {
      cursor: pointer;
    }
    .results-dialog-scroll {
      flex: 1 1 auto;
      min-height: 0;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      padding-top: 0.58rem;
      padding-bottom: 0.4rem;
    }
    .results-dialog-footer-actions {
      flex-shrink: 0;
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      align-items: stretch;
      gap: 0.44rem;
      padding: 0.44rem 0 0.68rem;
      margin: 0;
      border-top: 1px solid var(--border);
    }
    .results-dialog-footer-actions button {
      font-size: 0.82rem;
      padding: 0.34rem 0.68rem;
      min-height: 2.3rem;
      min-width: 5.75rem;
      line-height: 1.25;
      box-sizing: border-box;
    }
    /** Restore defaults: de-emphasized (smaller, muted) vs. secondary “Close”. */
    .results-dialog-footer-actions button.results-dialog-footer-reset {
      background: transparent;
      border: 1px solid transparent;
      color: var(--muted);
      font-size: 0.74rem;
      font-weight: 450;
      padding: 0.18rem 0.42rem;
      min-height: 1.72rem;
      min-width: 0;
      line-height: 1.2;
      box-shadow: none;
    }
    .results-dialog-footer-actions button.results-dialog-footer-reset:hover {
      background: var(--panel-muted);
      border-color: var(--border);
      color: var(--text);
    }
    .results-dialog-footer-actions button.results-dialog-footer-reset:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 1px;
    }
    .results-column-dialog-inner > h3,
    .results-highlights-dialog-inner > h3 {
      flex-shrink: 0;
      margin: 0.58rem 0 0.28rem;
      font-size: 0.94rem;
      font-weight: 600;
      color: var(--text);
      line-height: 1.25;
    }
    .results-column-dialog .col-dialog-section {
      margin-top: 0.34rem;
    }
    .results-column-dialog .col-dialog-section:first-of-type {
      margin-top: 0.12rem;
    }
    .col-dialog-list {
      list-style: none;
      margin: 0;
      padding: 0;
      border: 1px solid var(--border);
      border-radius: 8px;
      overflow: hidden;
    }
    .col-dialog-list li.col-dialog-loading {
      display: block;
      justify-content: center;
      text-align: center;
      font-size: 0.78rem;
      color: var(--muted);
    }
    .col-dialog-list li {
      display: flex;
      align-items: center;
      gap: 0.42rem;
      padding: 0.28rem 0.38rem;
      min-height: 2.15rem;
      border-bottom: 1px solid var(--border);
      background: var(--panel);
      font-size: 0.81rem;
      line-height: 1.28;
    }
    .col-dialog-list li:last-child {
      border-bottom: none;
    }
    .col-dialog-list label {
      flex: 1;
      min-width: 0;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 0.34rem;
      margin: 0;
    }
    .col-dialog-list input[type="checkbox"] {
      width: 1rem;
      height: 1rem;
      accent-color: var(--accent);
      flex-shrink: 0;
    }
    .results-column-dialog .col-dialog-cup-settings-panel {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 0.4rem;
      margin: 0.3rem 0 0;
      padding: 0.32rem 0.42rem;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--panel-muted);
    }
    .results-column-dialog .col-dialog-cup-settings-panel .col-dialog-cup-event-points-label {
      display: flex;
      align-items: flex-start;
      gap: 0.34rem;
      cursor: pointer;
      font-size: 0.8rem;
      line-height: 1.28;
      margin: 0;
      padding: 0;
      border: none;
      background: transparent;
      min-height: 0;
    }
    .results-column-dialog .col-dialog-cup-settings-panel .col-dialog-cup-event-points-label input {
      width: 1rem;
      height: 1rem;
      margin-top: 0.08rem;
      accent-color: var(--accent);
      flex-shrink: 0;
    }
    .col-dialog-routes-all-label {
      display: flex;
      align-items: flex-start;
      gap: 0.34rem;
      cursor: pointer;
      font-size: 0.8rem;
      line-height: 1.28;
      margin: 0.3rem 0 0;
      padding: 0.28rem 0.38rem;
      min-height: 2.15rem;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--panel-muted);
    }
    .col-dialog-routes-all-label input {
      width: 1rem;
      height: 1rem;
      margin-top: 0.08rem;
      accent-color: var(--accent);
      flex-shrink: 0;
    }
    .results-column-dialog .col-dialog-prior-rounds-label {
      margin-top: 0.45rem;
    }
    .col-dialog-move {
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: 0.12rem;
      flex-shrink: 0;
    }
    .col-dialog-move button {
      padding: 0.18rem 0.32rem;
      min-width: 2rem;
      min-height: 1.85rem;
      font-size: 0.75rem;
      line-height: 1.1;
    }
    .results-highlights-dialog,
    .results-column-dialog {
      border: none;
      border-radius: 12px;
      padding: 0;
      max-width: min(540px, calc(100vw - 2rem));
      width: 100%;
      background: var(--panel);
      color: var(--text);
      box-shadow: 0 16px 48px rgba(15, 23, 42, 0.22);
    }
    .results-highlights-dialog::backdrop,
    .results-column-dialog::backdrop {
      background: rgba(15, 23, 42, 0.4);
    }
    .results-highlights-dialog-inner,
    .results-column-dialog-inner {
      display: flex;
      flex-direction: column;
      min-height: 0;
      overflow: hidden;
      padding: 0 0.68rem 0;
      max-height: min(78vh, 32rem);
    }
    .results-highlights-dialog-toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.35rem;
      margin: 0.28rem 0 0.32rem;
    }
    .results-highlights-dialog-toolbar .results-filter-btn {
      flex: 0 0 auto;
      padding: 0.22rem 0.48rem;
      font-size: 0.76rem;
      line-height: 1.25;
      min-height: 0;
    }
    .results-highlights-dialog-toolbar .results-filter-btn.is-pressed {
      background: rgba(37, 99, 235, 0.14);
      border-color: var(--accent);
      color: var(--text);
    }
    .results-column-dialog-inner .results-dialog-scroll,
    .results-highlights-dialog-inner .results-dialog-scroll {
      padding-top: 0.35rem;
    }
    .results-highlights-dialog-inner h4,
    .results-column-dialog-inner .results-dialog-scroll > h4,
    .results-column-dialog-inner .col-dialog-section h4 {
      margin: 0.42rem 0 0.2rem;
      font-size: 0.67rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--muted);
      line-height: 1.2;
    }
    .results-column-dialog-inner .col-dialog-section h4 {
      margin-top: 0;
    }
    .highlights-dialog-priority-hint,
    .highlights-dialog-no-lists {
      margin: 0 0 0.28rem;
      font-size: 0.76rem;
      line-height: 1.32;
    }
    .highlights-dialog-section {
      display: flex;
      flex-direction: column;
      gap: 0.28rem;
      margin: 0.32rem 0 0.2rem;
      padding: 0.36rem 0.44rem;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--panel-muted);
    }
    .highlights-dialog-tight-label {
      display: flex;
      align-items: flex-start;
      gap: 0.34rem;
      cursor: pointer;
      font-size: 0.8rem;
      line-height: 1.28;
      margin: 0;
    }
    .highlights-dialog-tight-label input[type="checkbox"] {
      width: 1rem;
      height: 1rem;
      margin-top: 0.06rem;
      accent-color: var(--accent);
      flex-shrink: 0;
    }
    .highlights-dialog-chain {
      display: flex;
      flex-direction: column;
      gap: 0.28rem;
      margin-top: 0.28rem;
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 0.32rem 0.4rem;
      background: var(--panel);
    }
    .highlights-dialog-chain-loading,
    .highlights-dialog-chain-error {
      margin: 0;
      padding: 0.45rem 0.2rem;
      text-align: center;
    }
    .highlights-dialog-matrix {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      font-size: 0.81rem;
      border: 1px solid var(--border);
      border-radius: 8px;
      overflow: hidden;
    }
    .highlights-dialog-matrix th,
    .highlights-dialog-matrix td {
      padding: 0.28rem 0.35rem;
      vertical-align: middle;
      text-align: center;
      border-right: 1px solid var(--border);
      border-bottom: 1px solid var(--border);
      background-clip: padding-box;
    }
    .highlights-dialog-matrix thead th {
      background: var(--panel);
    }
    .highlights-dialog-matrix th:last-child,
    .highlights-dialog-matrix td:last-child {
      border-right: none;
    }
    .highlights-dialog-matrix tbody tr:last-child td {
      border-bottom: none;
    }
    .highlights-dialog-matrix th:first-child,
    .highlights-dialog-matrix td:first-child {
      text-align: start;
      min-width: 13rem;
      width: 44%;
    }
    .highlights-dialog-matrix td[data-hl-matrix-col] {
      position: relative;
    }
    .hl-matrix-cell-label {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip-path: inset(50%);
      white-space: nowrap;
      border: 0;
    }
    .highlights-dialog-matrix-th {
      font-weight: 600;
      white-space: nowrap;
    }
    .highlights-dialog-matrix-source-cell {
      min-width: 0;
    }
    .highlights-dialog-matrix-source-inner {
      display: flex;
      align-items: center;
      gap: 0.35rem;
      flex-wrap: wrap;
      min-width: 0;
    }
    .highlights-dialog-matrix-source-label {
      flex: 1;
      min-width: 0;
      text-align: start;
    }
    .highlights-dialog-matrix .highlights-dialog-moves {
      margin-left: auto;
      flex-shrink: 0;
    }
    .highlights-dialog-matrix .highlights-dialog-moves button {
      padding: 0.08rem 0.18rem;
      min-width: 1.45rem;
      min-height: 1.38rem;
      font-size: 0.62rem;
      line-height: 1;
    }
    .highlights-dialog-matrix-row--all td {
      font-weight: 600;
      background: var(--surface-muted, rgba(0, 0, 0, 0.04));
    }
    .highlights-dialog-matrix-row--list-parent td:first-child {
      background: var(--surface-muted, rgba(0, 0, 0, 0.03));
    }
    .highlights-dialog-matrix-row--child td:first-child {
      padding-left: 0.1rem;
    }
    /** Swatch column: same 1.35rem slot for leaf rows and parent rows (expand control sits on the swatch). */
    .highlights-dialog-matrix .hl-matrix-swatch-slot {
      position: relative;
      display: inline-flex;
      width: 1.35rem;
      height: 1.35rem;
      flex-shrink: 0;
      vertical-align: middle;
    }
    .highlights-dialog-matrix .hl-matrix-swatch-slot > .highlights-dialog-swatch {
      position: absolute;
      left: 0;
      top: 0;
      right: 0;
      bottom: 0;
      width: auto;
      height: auto;
    }
    .highlights-dialog-matrix .hl-matrix-swatch-slot--expandable > .secondary.hl-matrix-expand-btn {
      position: absolute;
      left: 0;
      top: 0;
      z-index: 1;
      box-sizing: border-box;
      width: 100%;
      height: 100%;
      margin: 0;
      min-width: 0;
      min-height: 0;
      padding: 0;
      border: none;
      border-radius: 5px;
      background: transparent;
      color: rgba(255, 255, 255, 0.96);
      text-shadow:
        0 0 2px rgba(0, 0, 0, 0.78),
        0 1px 2px rgba(0, 0, 0, 0.42);
      box-shadow: none;
      font-size: 0.58rem;
      line-height: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .highlights-dialog-matrix
      .hl-matrix-swatch-slot--expandable
      > .secondary.hl-matrix-expand-btn:hover {
      background: rgba(0, 0, 0, 0.2);
    }
    .highlights-dialog-matrix
      .hl-matrix-swatch-slot--expandable
      > .secondary.hl-matrix-expand-btn:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 0;
    }
    .highlights-dialog-matrix-star-col {
      width: 2.4rem;
    }
    .highlights-dialog-matrix-th-filter-star {
      position: relative;
      text-align: center;
      vertical-align: middle;
    }
    .highlights-dialog-matrix-filter-th-sr {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }
    .highlights-dialog-matrix-filter-star-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      vertical-align: middle;
      line-height: 0;
    }
    .highlights-dialog-matrix-filter-star-icon .highlights-matrix-filter-star-path {
      fill: #e8b923;
      stroke: #a67c00;
      stroke-width: 0.45;
      paint-order: stroke fill;
    }
    .highlights-dialog-matrix-na {
      color: var(--muted, #888);
      font-size: 0.85em;
    }
    .highlights-dialog-matrix input[type="checkbox"] {
      width: 1rem;
      height: 1rem;
      accent-color: var(--accent);
    }
    /**
     * “Alle Listen” tri-state: pill track, ✕ (off / steel blue) and ✓ (on / green) at ends,
     * white thumb slides left / center / right (matches reference layout).
     */
    .highlights-dialog-matrix .hl-list-master-switch {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0.12rem 0.06rem;
      margin: 0 auto;
      border: none;
      background: transparent;
      cursor: pointer;
      font: inherit;
      vertical-align: middle;
      border-radius: 8px;
    }
    .highlights-dialog-matrix .hl-list-master-switch:hover .hl-list-master-switch-track {
      border-color: color-mix(in srgb, var(--border) 55%, var(--accent) 45%);
    }
    .highlights-dialog-matrix .hl-list-master-switch:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .highlights-dialog-matrix .hl-list-master-switch-track {
      position: relative;
      display: block;
      width: 3.38rem;
      height: 1.06rem;
      border-radius: 999px;
      border: 1px solid rgba(0, 0, 0, 0.1);
      box-sizing: border-box;
      background: var(--surface-muted, rgba(0, 0, 0, 0.06));
      box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.06),
        0 1px 2px rgba(0, 0, 0, 0.05);
    }
    .highlights-dialog-matrix .hl-list-master-switch-icon {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      z-index: 1;
      width: 0.62rem;
      text-align: center;
      font-size: 0.52rem;
      font-weight: 800;
      line-height: 1;
      pointer-events: none;
      user-select: none;
      letter-spacing: -0.02em;
    }
    .highlights-dialog-matrix .hl-list-master-switch-icon--off {
      left: 0.22rem;
      color: #c62828;
    }
    .highlights-dialog-matrix .hl-list-master-switch-icon--on {
      right: 0.2rem;
      color: #1fa34a;
      font-size: 0.55rem;
    }
    .highlights-dialog-matrix .hl-list-master-switch-thumb {
      position: absolute;
      top: 50%;
      left: 0.12rem;
      z-index: 2;
      width: 0.78rem;
      height: 0.78rem;
      margin: 0;
      border-radius: 50%;
      box-sizing: border-box;
      background: linear-gradient(
        180deg,
        var(--surface, #fff) 0%,
        color-mix(in srgb, var(--surface, #fff) 88%, var(--border) 12%) 100%
      );
      border: 1px solid rgba(0, 0, 0, 0.12);
      box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.14),
        0 0.5px 0 rgba(255, 255, 255, 0.9) inset;
      transform: translateY(-50%);
      transition:
        left 0.22s cubic-bezier(0.34, 1.15, 0.64, 1),
        border-color 0.2s ease,
        box-shadow 0.2s ease;
    }
    .highlights-dialog-matrix
      .hl-list-master-switch.hl-list-master--false
      .hl-list-master-switch-track {
      background: linear-gradient(
        90deg,
        rgba(70, 105, 150, 0.12) 0%,
        rgba(255, 255, 255, 0.45) 55%,
        rgba(255, 255, 255, 0.35) 100%
      );
    }
    .highlights-dialog-matrix
      .hl-list-master-switch.hl-list-master--false
      .hl-list-master-switch-thumb {
      left: 0.12rem;
      border-color: rgba(55, 90, 135, 0.35);
      box-shadow:
        0 0 0 1px rgba(55, 90, 135, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.12),
        0 0.5px 0 rgba(255, 255, 255, 0.85) inset;
    }
    .highlights-dialog-matrix
      .hl-list-master-switch.hl-list-master--na
      .hl-list-master-switch-track {
      background: var(--surface-muted, rgba(0, 0, 0, 0.06));
    }
    .highlights-dialog-matrix
      .hl-list-master-switch.hl-list-master--na
      .hl-list-master-switch-thumb {
      left: 50%;
      transform: translate(-50%, -50%);
      border-color: rgba(0, 0, 0, 0.12);
      box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.12),
        0 0.5px 0 rgba(255, 255, 255, 0.85) inset;
    }
    .highlights-dialog-matrix
      .hl-list-master-switch.hl-list-master--true
      .hl-list-master-switch-track {
      background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.35) 0%,
        rgba(31, 163, 74, 0.08) 55%,
        rgba(31, 163, 74, 0.16) 100%
      );
    }
    .highlights-dialog-matrix
      .hl-list-master-switch.hl-list-master--true
      .hl-list-master-switch-thumb {
      left: calc(100% - 0.12rem - 0.78rem);
      border-color: rgba(31, 163, 74, 0.45);
      box-shadow:
        0 0 0 1px rgba(31, 163, 74, 0.15),
        0 1px 4px rgba(31, 130, 70, 0.2),
        0 0.5px 0 rgba(255, 255, 255, 0.9) inset;
    }
    @supports (color-mix(in srgb, red, blue)) {
      .highlights-dialog-matrix .hl-list-master-switch-track {
        background: color-mix(in srgb, var(--surface, #fff) 88%, var(--border) 12%);
      }
      .highlights-dialog-matrix
        .hl-list-master-switch.hl-list-master--na
        .hl-list-master-switch-track {
        background: color-mix(in srgb, var(--surface, #fff) 90%, var(--border) 10%);
      }
    }
    @supports not (color: color-mix(in srgb, red, blue)) {
      .highlights-dialog-matrix .hl-list-master-switch:hover .hl-list-master-switch-track {
        border-color: rgba(70, 110, 160, 0.45);
      }
      .highlights-dialog-matrix .hl-list-master-switch-thumb {
        background: var(--surface, #fff);
      }
      .highlights-dialog-matrix
        .hl-list-master-switch.hl-list-master--true
        .hl-list-master-switch-thumb {
        border-color: #1fa34a;
      }
    }
    .highlights-dialog-matrix--lock-active
      tbody
      tr:not(.highlights-dialog-matrix-row--all):not([data-row-kind="favorites"])
      td[data-hl-matrix-col="active"],
    .highlights-dialog-matrix--lock-colorize
      tbody
      tr:not(.highlights-dialog-matrix-row--all):not([data-row-kind="favorites"])
      td[data-hl-matrix-col="colorize"],
    .highlights-dialog-matrix--lock-tags
      tbody
      tr:not(.highlights-dialog-matrix-row--all):not([data-row-kind="favorites"])
      td[data-hl-matrix-col="tags"] {
      opacity: 0.45;
    }
    .highlights-dialog-row {
      display: flex;
      align-items: center;
      gap: 0.42rem;
      min-height: 2.15rem;
      font-size: 0.81rem;
    }
    .highlights-dialog-row .highlights-dialog-list-filter-star {
      flex-shrink: 0;
      padding: 0.12rem;
      min-width: 1.65rem;
      min-height: 1.65rem;
    }
    .highlights-dialog-swatch {
      width: 1.35rem;
      height: 1.35rem;
      border-radius: 5px;
      flex-shrink: 0;
      border: 1px solid var(--border);
      box-sizing: border-box;
    }
    .highlights-dialog-row-label {
      flex: 1;
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 0.34rem;
      margin: 0;
      cursor: pointer;
    }
    .highlights-dialog-row-label input[type="checkbox"] {
      width: 1rem;
      height: 1rem;
      accent-color: var(--accent);
      flex-shrink: 0;
    }
    .highlights-dialog-moves {
      display: flex;
      flex-direction: row;
      gap: 0.12rem;
      flex-shrink: 0;
    }
    .highlights-dialog-moves button {
      padding: 0.18rem 0.32rem;
      min-width: 2rem;
      min-height: 1.85rem;
      font-size: 0.75rem;
      line-height: 1.1;
    }
    .highlights-dialog-country-block {
      margin-top: 0.35rem;
      padding-top: 0.32rem;
      padding-bottom: 0.32rem;
      border-top: 1px solid var(--border);
      border-bottom: 1px solid var(--border);
    }
    .highlights-dialog-chain > .highlights-dialog-country-block:first-child {
      margin-top: 0;
      padding-top: 0;
      border-top: none;
    }
    .highlights-dialog-country-block h4 {
      margin-top: 0;
      margin-bottom: 0.28rem;
    }
    .highlights-dialog-country-block .highlights-dialog-countries-swatch-row {
      align-items: center;
      min-height: 0;
      margin-bottom: 0;
    }
    .highlights-dialog-country-block .highlights-dialog-countries-swatch-row
      .highlights-dialog-swatch {
      flex-shrink: 0;
    }
    .highlights-dialog-region-block {
      margin-top: 0.35rem;
      padding-top: 0.32rem;
      padding-bottom: 0.32rem;
      border-top: 1px solid var(--border);
      border-bottom: 1px solid var(--border);
    }
    .highlights-dialog-chain > .highlights-dialog-region-block:first-child {
      margin-top: 0;
      padding-top: 0;
      border-top: none;
    }
    .highlights-dialog-region-block h4 {
      margin-top: 0;
      margin-bottom: 0.28rem;
    }
    .highlights-dialog-region-block .highlights-dialog-regions-swatch-row {
      align-items: center;
      min-height: 0;
      margin-bottom: 0;
    }
    .highlights-dialog-region-block .highlights-dialog-regions-swatch-row
      .highlights-dialog-swatch {
      flex-shrink: 0;
    }
    .results-highlights-dialog .settings-highlight-regions.highlights-dialog-region-names-host {
      flex: 1;
      min-width: 0;
      flex-wrap: nowrap;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      margin: 0;
    }
      flex: 1;
      min-width: 0;
      flex-wrap: nowrap;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      margin: 0;
    }
    .results-highlights-dialog
      .settings-highlight-countries.highlights-dialog-country-names-host
      .country-chip {
      font-size: 0.81rem;
      line-height: 1.28;
      font-weight: inherit;
      border-bottom: none;
    }
    .athlete-active-dot {
      display: inline-block;
      width: 0.45rem;
      height: 0.45rem;
      border-radius: 50%;
      background: var(--ok);
      box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
      vertical-align: middle;
      margin-right: 0.15rem;
      flex-shrink: 0;
    }
    .athlete-next-round-star {
      display: inline-block;
      color: var(--accent);
      font-size: 0.72em;
      line-height: 1;
      vertical-align: middle;
      margin-right: 0.2rem;
      flex-shrink: 0;
    }
    .round-block > summary .round-status-dot {
      display: inline-block;
      width: 0.5rem;
      height: 0.5rem;
      border-radius: 50%;
      vertical-align: middle;
      margin-left: 0.35rem;
      flex-shrink: 0;
    }
    .round-status-dot.pending { background: #94a3b8; box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08); }
    .round-status-dot.active { background: var(--ok); }
    .round-status-dot.completed { background: #dc2626; }
    .round-results-reload-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin-left: 0.2rem;
      padding: 0.12rem 0.28rem;
      border: 1px solid var(--border);
      border-radius: 5px;
      background: var(--panel);
      cursor: pointer;
      vertical-align: middle;
      color: var(--muted);
      line-height: 0;
    }
    .round-results-reload-btn:hover:not(:disabled) {
      color: var(--accent);
      border-color: var(--accent);
    }
    .round-results-reload-btn:disabled {
      opacity: 0.45;
      cursor: not-allowed;
    }
    .round-results-reload-btn svg {
      display: block;
    }
    .cell-muted { color: var(--muted); font-size: 0.72rem; }
    .json-tree-holder {
      margin: 0.35rem 0 0;
      padding: 0.5rem 0.65rem;
      max-height: min(55vh, 28rem);
      overflow: auto;
      background: var(--panel-muted);
      border: 1px solid var(--border);
      border-radius: 8px;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
      font-size: 0.76rem;
      line-height: 1.45;
      color: var(--text);
    }
    .json-node {
      margin: 0;
      border: none;
      padding: 0;
    }
    .json-node > summary {
      cursor: pointer;
      list-style: none;
      user-select: none;
      color: var(--muted);
      font-size: inherit;
    }
    .json-node > summary::-webkit-details-marker {
      display: none;
    }
    .json-node > summary::before {
      content: "\25b6";
      display: inline-block;
      width: 0.65rem;
      margin-right: 0.2rem;
      font-size: 0.55rem;
      vertical-align: middle;
      transition: transform 0.12s ease;
      color: var(--muted);
    }
    .json-node[open] > summary::before {
      transform: rotate(90deg);
    }
    .json-node > summary:hover {
      color: var(--text);
    }
    .json-bracket,
    .json-brace {
      color: var(--muted);
      font-weight: 600;
    }
    .json-meta {
      color: var(--muted);
      font-weight: normal;
    }
    .json-children {
      margin: 0.15rem 0 0.1rem 0.85rem;
      padding-left: 0.5rem;
      border-left: 1px solid var(--border);
    }
    .json-row {
      margin: 0.08rem 0;
    }
    .json-key {
      color: #7c3aed;
      margin-right: 0.25rem;
    }
    .json-scalar.json-str {
      color: #0d9488;
      word-break: break-word;
    }
    .json-scalar.json-num {
      color: #2563eb;
    }
    .json-scalar.json-bool {
      color: #c026d3;
    }
    .json-scalar.json-null {
      color: var(--muted);
      font-style: italic;
    }
    .json-inline {
      color: var(--muted);
    }
    .round-filters {
      display: flex;
      flex-direction: column;
      gap: 0.45rem;
      margin-bottom: 1rem;
      padding: 0.5rem 0.65rem;
      background: var(--panel-muted);
      border: 1px solid var(--border);
      border-radius: 10px;
    }
    .round-filter-row {
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: 0.5rem 0.65rem;
      flex-wrap: wrap;
    }
    .round-filter-row-label {
      flex: 0 0 auto;
      min-width: 4.75rem;
      font-size: 0.77rem;
      font-weight: 600;
      color: var(--muted);
      line-height: 1.2;
    }
    .round-filter-btn-group {
      display: flex;
      flex: 1 1 auto;
      flex-wrap: wrap;
      gap: 0.3rem 0.45rem;
      align-items: center;
      min-width: 0;
    }
    .events-overview-cup-select-wrap {
      display: flex;
      flex: 1 1 auto;
      flex-wrap: wrap;
      align-items: center;
      min-width: 0;
    }
    .events-overview-cup-select-wrap select {
      min-width: 10rem;
      max-width: 100%;
    }
    .events-overview-name-search-wrap {
      display: flex;
      flex: 1 1 auto;
      flex-wrap: wrap;
      align-items: center;
      min-width: 0;
    }
    .events-overview-name-search-wrap input[type="search"] {
      width: 100%;
      min-width: 10rem;
      max-width: 100%;
      box-sizing: border-box;
    }
    button.round-filter-btn {
      font-size: 0.76rem;
      font-weight: 500;
      padding: 0.28rem 0.52rem;
      line-height: 1.25;
      border-radius: 10px;
      min-height: 2.2rem;
    }
    button.round-filter-btn.is-pressed {
      border-color: var(--accent);
      background: rgba(37, 99, 235, 0.12);
      color: var(--accent);
    }
    .app-tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 0.25rem;
      margin-bottom: 1.1rem;
      border-bottom: 1px solid var(--border);
      padding-bottom: 0;
      max-width: 100%;
      min-width: 0;
      box-sizing: border-box;
    }
    .app-tabs button {
      font: inherit;
      padding: 0.55rem clamp(0.45rem, 2.5vw, 1rem) 0.65rem;
      border: none;
      border-bottom: 3px solid transparent;
      border-radius: 8px 8px 0 0;
      background: transparent;
      color: var(--muted);
      cursor: pointer;
      font-weight: 500;
      margin-bottom: -1px;
      box-shadow: none;
      flex: 0 1 auto;
      max-width: 100%;
      min-width: 0;
      text-align: center;
    }
    .app-tabs button:hover {
      color: var(--text);
      background: var(--panel-muted);
    }
    .app-tabs button[aria-selected="true"] {
      color: var(--accent);
      border-bottom-color: var(--accent);
      background: var(--panel);
    }
    /** Main app horizontal menu (Events / Results / Rankings / Athletes). */
    .app-main-menubar {
      margin-bottom: 0.75rem;
      max-width: 100%;
      min-width: 0;
      box-sizing: border-box;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--panel-muted);
      padding: 0.18rem 0.32rem;
    }
    .app-main-menubar-inner {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.3rem 0.4rem;
      max-width: 100%;
      min-width: 0;
    }
    .app-main-menubar-tablist-wrap {
      display: flex;
      flex-wrap: wrap;
      align-items: stretch;
      gap: 0.08rem;
      flex: 0 1 auto;
      min-width: 0;
    }
    /** Always occupies the remainder row width so tab buttons do not shift when the title is empty vs filled. */
    .app-main-menubar-title-slot {
      flex: 1 1 0;
      min-width: 0;
      min-height: 1.28em;
      display: flex;
      justify-content: flex-end;
      align-items: center;
    }
    .app-main-menubar-current-title {
      max-width: 100%;
      font-weight: 600;
      font-size: 0.8125rem;
      color: var(--text);
      text-align: right;
      padding: 0;
      line-height: 1.25;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .app-main-menubar--secondary-page .app-main-menubar-tablist-wrap .app-main-menubar-tab,
    .app-main-menubar--secondary-page .app-main-menubar-tablist-wrap button {
      color: var(--muted);
      background: transparent;
      border-color: transparent;
      box-shadow: none;
      font-weight: 500;
    }
    .app-main-menubar--secondary-page .app-main-menubar-tablist-wrap .app-main-menubar-tab:hover,
    .app-main-menubar--secondary-page .app-main-menubar-tablist-wrap button:hover {
      color: var(--text);
      background: var(--panel);
      border-color: var(--border);
    }
    .app-main-menubar .app-main-menubar-tab,
    .app-main-menubar button {
      font: inherit;
      font-size: 0.8125rem;
      padding: 0.28rem clamp(0.28rem, 1.6vw, 0.65rem);
      border: 1px solid transparent;
      border-radius: 6px;
      background: transparent;
      color: var(--muted);
      cursor: pointer;
      font-weight: 600;
      box-shadow: none;
      flex: 1 1 auto;
      max-width: 100%;
      min-width: 0;
      text-align: center;
    }
    .app-main-menubar .app-main-menubar-tab {
      display: block;
      text-decoration: none;
      box-sizing: border-box;
    }
    /* Same as header menu items: ``display: block`` beats the UA ``[hidden]`` rule. */
    .app-main-menubar .app-main-menubar-tab[hidden] {
      display: none !important;
    }
    .app-main-menubar .app-main-menubar-tab:hover,
    .app-main-menubar button:hover {
      color: var(--text);
      background: var(--panel);
      border-color: var(--border);
    }
    .app-main-menubar .app-main-menubar-tab[aria-selected="true"],
    .app-main-menubar button[aria-selected="true"] {
      color: var(--accent);
      background: var(--panel);
      border-color: var(--accent);
      box-shadow: 0 1px 0 rgba(37, 99, 235, 0.12);
    }
    .app-main-menubar .app-main-menubar-tab.app-main-menubar-tab--disabled,
    .app-main-menubar .app-main-menubar-tab[aria-disabled="true"] {
      opacity: 0.55;
      cursor: not-allowed;
      pointer-events: none;
    }
    .app-main-menubar .app-main-menubar-tab.app-main-menubar-tab--disabled:hover,
    .app-main-menubar .app-main-menubar-tab[aria-disabled="true"]:hover {
      color: var(--muted);
      background: transparent;
      border-color: transparent;
      box-shadow: none;
    }
    .app-main-menubar button:disabled {
      opacity: 0.55;
      cursor: not-allowed;
    }
    .app-main-menubar button:disabled:hover {
      color: var(--muted);
      background: transparent;
      border-color: transparent;
      box-shadow: none;
    }
    .app-main-view-panels {
      min-width: 0;
    }
    /** Admin section switcher: same chrome as `.app-main-menubar` (pill row + optional title column). */
    .app-admin-submenubar.app-main-menubar .app-main-menubar-tablist-wrap button,
    .app-admin-submenubar.app-main-menubar .app-main-menubar-tablist-wrap a.app-main-menubar-tab {
      flex: 0 1 auto;
    }
    .app-admin-view .admin-subtab-panel {
      margin-top: 0.75rem;
    }
    .event-subtabs {
      display: flex;
      gap: 0.35rem;
      margin-bottom: 0.85rem;
      flex-wrap: wrap;
    }
    .event-subtabs .event-subtab {
      background: var(--panel-muted);
      border: 1px solid var(--border);
      color: var(--text);
      font-weight: 500;
      box-shadow: none;
    }
    .event-subtabs a.event-subtab {
      text-decoration: none;
      display: inline-block;
      box-sizing: border-box;
      cursor: pointer;
      font: inherit;
      padding: 0.35rem 0.65rem;
      border-radius: 6px;
    }
    .event-subtabs .event-subtab[aria-selected="true"] {
      background: var(--panel);
      border-color: var(--accent);
      color: var(--accent);
    }
    .event-subtabs .event-subtab.results-notes-toolbar-btn {
      margin-left: auto;
    }
    .event-subtabs .event-subtab:disabled,
    .event-subtabs a.event-subtab[aria-disabled="true"],
    .event-subtabs a.event-subtab.event-subtab--disabled {
      opacity: 0.55;
      cursor: not-allowed;
    }
    .event-subtabs .event-subtab:disabled:hover,
    .event-subtabs a.event-subtab[aria-disabled="true"]:hover,
    .event-subtabs a.event-subtab.event-subtab--disabled:hover {
      background: var(--panel-muted);
      border-color: var(--border);
      color: var(--text);
    }
    .event-subpanel[hidden] {
      display: none !important;
    }
    .event-subpanel-startlist .startlist-controls-box {
      margin-bottom: 0.65rem;
    }
    .startlist-interactive .event-results-toolbar-host {
      margin-top: 0.35rem;
    }
    .startlist-interactive .startlist-toolbar-timeline-slot {
      display: inline-flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.36rem;
      margin-inline-start: 0.15rem;
    }
    .startlist-matrix-meta-row {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 0.25rem;
      margin: 0.25rem 0 0.5rem;
    }
    .startlist-matrix-meta-row .startlist-matrix-meta {
      margin: 0;
    }
    .startlist-matrix-refetch-btn {
      flex: 0 0 auto;
      padding: 0.25rem 0.4rem;
    }
    .event-results-toolbar-host .startlist-matrix-group-filter-wrap--toolbar {
      width: 100%;
      margin: 0.35rem 0 0.15rem;
    }
    .event-results-toolbar-host .startlist-matrix-group-filter-wrap--toolbar .round-filter-row {
      margin: 0;
    }
    .startlist-schedule-controls {
      margin: 0 0 0.65rem;
      padding: 0.45rem 0.55rem;
      border: 1px solid var(--border);
      border-radius: 6px;
      background: var(--panel-muted);
    }
    .startlist-schedule-controls.startlist-schedule-controls--no-start-time-view {
      box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--muted) 35%, transparent);
    }
    .startlist-schedule-details {
      margin: 0;
      border: 0;
      padding: 0;
    }
    .startlist-schedule-details > summary.startlist-schedule-heading {
      list-style-position: inside;
      cursor: pointer;
      font-weight: 600;
      font-size: 0.95rem;
      margin: 0 0 0.35rem;
      padding: 0.2rem 0.35rem 0.2rem 0.35rem;
      color: var(--text);
      border-radius: 0.3rem;
    }
    .startlist-schedule-details > summary.startlist-schedule-heading:hover {
      background: color-mix(in srgb, var(--text) 5%, transparent);
    }
    .startlist-schedule-details[open] > summary.startlist-schedule-heading {
      margin-bottom: 0.45rem;
    }
    .startlist-schedule-details > summary.startlist-schedule-heading::-webkit-details-marker {
      color: var(--muted);
      margin-inline-end: 0.35rem;
    }
    .startlist-schedule-warn-save-row {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      margin: 0 0 0.55rem;
    }
    .startlist-schedule-warn-save-row.startlist-schedule-warn-save-row--above-table {
      margin: 0.5rem 0 0.55rem;
    }
    .startlist-schedule-warn-save-row .startlist-schedule-warning {
      margin: 0;
      flex: 1 1 auto;
      min-width: 0;
    }
    .startlist-schedule-controls-actions {
      display: flex;
      justify-content: flex-start;
      width: 100%;
      margin: 0.4rem 0 0;
    }
    .startlist-schedule-controls-actions-inner {
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: flex-start;
      flex-wrap: wrap;
      gap: 0.45rem;
    }
    button.startlist-schedule-reset-matrix-btn {
      font-size: 0.82rem;
      padding: 0.28rem 0.55rem;
    }
    button.startlist-schedule-reset-matrix-btn.startlist-schedule-reset-matrix-btn--subtle {
      background: transparent;
      border-color: transparent;
      color: var(--muted);
      font-weight: 400;
      box-shadow: none;
      padding-inline: 0.35rem;
    }
    button.startlist-schedule-reset-matrix-btn.startlist-schedule-reset-matrix-btn--subtle:hover {
      color: var(--text);
      background: color-mix(in srgb, var(--text) 6%, transparent);
      border-color: transparent;
    }
    button.startlist-schedule-reset-matrix-btn.startlist-schedule-reset-matrix-btn--subtle:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .startlist-schedule-warning {
      padding: 0.45rem 0.55rem;
      font-size: 0.82rem;
      line-height: 1.45;
      color: var(--text);
      background: color-mix(in srgb, var(--warning, #d97706) 12%, var(--panel));
      border: 1px solid color-mix(in srgb, var(--warning, #d97706) 45%, var(--border));
      border-radius: 6px;
    }
    button.startlist-schedule-save-all-btn.startlist-schedule-save-all-btn--icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0.35rem 0.4rem;
      min-width: 2.35rem;
      min-height: 2.35rem;
    }
    button.startlist-schedule-save-all-btn.startlist-schedule-save-all-btn--icon svg {
      display: block;
    }
    .startlist-schedule-matrix-scroll {
      width: max-content;
      max-width: 100%;
      overflow-x: auto;
      margin: 0 0 0.35rem;
    }
    .startlist-schedule-matrix-scroll table.startlist-schedule-matrix th.startlist-schedule-matrix-corner,
    .startlist-schedule-matrix-scroll table.startlist-schedule-matrix td.startlist-schedule-matrix-disc {
      min-width: 9.75rem;
      max-width: 22rem;
    }
    .startlist-schedule-matrix-scroll
      table.startlist-schedule-matrix
      td.startlist-schedule-matrix-row-label {
      min-width: 9.75rem;
      max-width: 22rem;
    }
    .startlist-schedule-matrix-scroll table.startlist-schedule-matrix th.startlist-schedule-matrix-round-col,
    .startlist-schedule-matrix-scroll table.startlist-schedule-matrix td.startlist-schedule-matrix-cell,
    .startlist-schedule-matrix-scroll table.startlist-schedule-matrix td.startlist-schedule-matrix-empty,
    .startlist-schedule-matrix-scroll table.startlist-schedule-matrix td.startlist-schedule-matrix-foot-cell {
      width: 11.75rem;
      min-width: 11.75rem;
      max-width: 11.75rem;
    }
    .startlist-schedule-matrix-scroll input.startlist-schedule-wallclock,
    .startlist-schedule-matrix-scroll input.startlist-schedule-matrix-duration {
      width: 8.5rem;
      max-width: 100%;
      min-width: 0;
      box-sizing: border-box;
      font-variant-numeric: tabular-nums;
    }
    .startlist-schedule-matrix-scroll
      input.startlist-schedule-wallclock.startlist-schedule-wallclock--unpersisted {
      color: var(--warn, #b45309);
      font-weight: 600;
    }
    .startlist-schedule-matrix-scroll
      input.startlist-schedule-matrix-duration.startlist-schedule-matrix-duration--unpersisted {
      color: var(--warn, #b45309);
      font-weight: 600;
    }
    .startlist-schedule-matrix-scroll
      .startlist-schedule-first-start-inline
      .startlist-schedule-wallclock,
    .startlist-schedule-matrix-scroll
      .startlist-schedule-first-start-inline
      .startlist-schedule-matrix-duration {
      flex: 0 0 auto;
    }
    .startlist-schedule-matrix-scroll .startlist-schedule-matrix-duration-stack {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.35rem;
      width: 100%;
    }
    .startlist-schedule-matrix-scroll
      .startlist-schedule-matrix-duration-by-disc {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.2rem;
      width: 100%;
    }
    .startlist-schedule-matrix-scroll .startlist-schedule-matrix-duration-disc {
      font-size: 0.75rem;
      font-weight: 600;
      color: var(--muted);
      line-height: 1.2;
      text-align: center;
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .startlist-event-schedule-scope-bar {
      margin: 0.5rem 0 0.35rem;
      padding: 0.45rem 0.55rem;
      border-radius: 0.35rem;
      background: color-mix(in srgb, var(--panel-muted) 55%, var(--panel));
      border: 1px solid var(--border);
    }
    .startlist-event-schedule-scope-line {
      margin: 0 0 0.25rem;
      font-size: 0.84rem;
    }
    .startlist-event-schedule-scope-manager {
      margin: 0 0 0.35rem;
      font-size: 0.8rem;
    }
    .startlist-event-schedule-scope-bar .startlist-event-schedule-scope-manager {
      color: var(--danger, #b91c1c);
      font-weight: 600;
    }
    .startlist-event-schedule-scope-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.35rem;
      align-items: center;
    }
    table.startlist-schedule-matrix {
      width: max-content;
      max-width: 100%;
      table-layout: fixed;
      border-collapse: collapse;
      font-size: 0.86rem;
    }
    table.startlist-schedule-matrix th,
    table.startlist-schedule-matrix td {
      border: 1px solid var(--border);
      padding: 0.35rem 0.45rem;
      vertical-align: middle;
      text-align: left;
      box-sizing: border-box;
    }
    table.startlist-schedule-matrix th.startlist-schedule-matrix-corner,
    table.startlist-schedule-matrix td.startlist-schedule-matrix-disc {
      white-space: nowrap;
      font-weight: 600;
      background: var(--panel-muted);
      width: auto;
      min-width: 7.5rem;
      max-width: 18rem;
      text-align: left;
    }
    table.startlist-schedule-matrix td.startlist-schedule-matrix-disc {
      font-weight: 500;
      background: color-mix(in srgb, var(--panel-muted) 65%, var(--panel));
    }
    table.startlist-schedule-matrix th.startlist-schedule-matrix-round-col,
    table.startlist-schedule-matrix td.startlist-schedule-matrix-cell,
    table.startlist-schedule-matrix td.startlist-schedule-matrix-empty,
    table.startlist-schedule-matrix td.startlist-schedule-matrix-foot-cell {
      width: 9.25rem;
      min-width: 9.25rem;
      max-width: 9.25rem;
      text-align: center;
      vertical-align: middle;
    }
    table.startlist-schedule-matrix th.startlist-schedule-matrix-round-col {
      font-weight: 600;
      background: var(--panel-muted);
      overflow-wrap: anywhere;
      white-space: normal;
    }
    table.startlist-schedule-matrix th.startlist-schedule-matrix-group-col {
      font-weight: 600;
      background: var(--panel-muted);
      text-align: center;
      white-space: normal;
      overflow-wrap: anywhere;
    }
    table.startlist-matrix th.startlist-schedule-matrix-group-col {
      font-weight: 600;
      background: var(--panel-muted);
      text-align: center;
      white-space: normal;
      overflow-wrap: anywhere;
    }
    table.startlist-schedule-matrix tr.startlist-schedule-matrix-sets-row th {
      font-weight: 500;
      font-size: 0.8rem;
      vertical-align: top;
      padding: 0.32rem 0.35rem;
    }
    table.startlist-schedule-matrix
      tr.startlist-schedule-matrix-sets-row
      th.startlist-schedule-matrix-summary-corner {
      font-size: 0.78rem;
      color: var(--muted);
      vertical-align: top;
    }
    table.startlist-schedule-matrix th.startlist-schedule-matrix-sets-col {
      text-align: left;
      vertical-align: top;
    }
    .startlist-schedule-matrix-sets-col-stack {
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      align-items: stretch;
      gap: 0.4rem;
      min-width: 0;
    }
    .startlist-schedule-matrix-callzone-tools-inner {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      justify-content: flex-start;
      gap: 0.4rem;
      min-width: 0;
    }
    .startlist-schedule-matrix-callzone-tools-head {
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
      gap: 0.35rem;
      width: 100%;
      min-width: 0;
    }
    .startlist-schedule-matrix-callzone-tools-head
      .startlist-schedule-callzone-enable-label {
      flex: 1;
      min-width: 0;
      justify-content: flex-start;
    }
    .startlist-schedule-matrix-training-tools-head {
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: flex-start;
      gap: 0.35rem;
      width: 100%;
      min-width: 0;
    }
    label.startlist-schedule-training-enable-label {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 0.35rem;
      font-size: 0.76rem;
      color: var(--text);
      cursor: pointer;
      user-select: none;
      line-height: 1.2;
    }
    label.startlist-schedule-training-enable-label input {
      flex-shrink: 0;
    }
    .startlist-schedule-matrix-cell-line--training {
      margin-top: 0.28rem;
    }
    .startlist-schedule-matrix-set-summary {
      font-size: 0.72rem;
      line-height: 1.35;
      color: var(--text);
      text-align: left;
      word-break: break-word;
      --slsp-c0: #2563eb;
      --slsp-c1: #059669;
      --slsp-c2: #d97706;
      --slsp-c3: #7c3aed;
      --slsp-c4: #0d9488;
      --slsp-c5: #db2777;
    }
    .startlist-schedule-matrix-set-summary-empty {
      color: var(--muted);
    }
    .startlist-schedule-matrix-set-summary-tags {
      display: flex;
      flex-direction: column;
      flex-wrap: nowrap;
      align-items: flex-start;
      justify-content: flex-start;
      gap: 0.22rem;
    }
    .startlist-schedule-matrix-set-summary-disc {
      font-size: 0.68rem;
      font-weight: 600;
      color: var(--muted);
      line-height: 1.2;
      margin-top: 0.08rem;
    }
    .startlist-schedule-matrix-set-summary-tags
      > .startlist-schedule-matrix-set-summary-disc:first-child {
      margin-top: 0;
    }
    .startlist-schedule-matrix-set-summary-disc-tags {
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.22rem;
      max-width: 100%;
    }
    .startlist-schedule-matrix-set-tag {
      display: inline-block;
      box-sizing: border-box;
      max-width: 100%;
      font-size: 0.66rem;
      font-weight: 600;
      line-height: 1.25;
      padding: 0.1rem 0.42rem;
      border-radius: 999px;
      border: 1px solid var(--border);
      white-space: normal;
      overflow: hidden;
      text-overflow: ellipsis;
      color: var(--text);
    }
    .startlist-schedule-matrix-set-tag--0 {
      background: color-mix(in srgb, var(--slsp-c0) 14%, var(--panel));
      border-color: color-mix(in srgb, var(--slsp-c0) 32%, var(--border));
    }
    .startlist-schedule-matrix-set-tag--1 {
      background: color-mix(in srgb, var(--slsp-c1) 14%, var(--panel));
      border-color: color-mix(in srgb, var(--slsp-c1) 32%, var(--border));
    }
    .startlist-schedule-matrix-set-tag--2 {
      background: color-mix(in srgb, var(--slsp-c2) 16%, var(--panel));
      border-color: color-mix(in srgb, var(--slsp-c2) 34%, var(--border));
    }
    .startlist-schedule-matrix-set-tag--3 {
      background: color-mix(in srgb, var(--slsp-c3) 14%, var(--panel));
      border-color: color-mix(in srgb, var(--slsp-c3) 32%, var(--border));
    }
    .startlist-schedule-matrix-set-tag--4 {
      background: color-mix(in srgb, var(--slsp-c4) 14%, var(--panel));
      border-color: color-mix(in srgb, var(--slsp-c4) 32%, var(--border));
    }
    .startlist-schedule-matrix-set-tag--5 {
      background: color-mix(in srgb, var(--slsp-c5) 12%, var(--panel));
      border-color: color-mix(in srgb, var(--slsp-c5) 30%, var(--border));
    }
    button.startlist-schedule-matrix-route-sets-btn.admin-icon-btn {
      flex-shrink: 0;
    }
    button.startlist-schedule-matrix-route-sets-btn.admin-icon-btn svg {
      width: 0.92rem;
      height: 0.92rem;
    }
    label.startlist-schedule-callzone-enable-label {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.35rem;
      font-size: 0.76rem;
      color: var(--text);
      cursor: pointer;
      user-select: none;
      line-height: 1.2;
    }
    label.startlist-schedule-callzone-enable-label input {
      flex-shrink: 0;
    }
    table.startlist-schedule-matrix td.startlist-schedule-matrix-empty {
      color: var(--muted);
    }
    table.startlist-schedule-matrix td.startlist-schedule-matrix-cell {
      padding: 0.28rem 0.35rem;
    }
    button.startlist-schedule-save-all-btn {
      font-size: 0.86rem;
    }
    button.startlist-schedule-save-all-btn.startlist-schedule-save-all-btn--saved {
      color: var(--ok);
      border-color: color-mix(in srgb, var(--ok) 35%, var(--border));
      background: color-mix(in srgb, var(--ok) 10%, var(--panel));
    }
    button.startlist-schedule-save-all-btn.startlist-schedule-save-all-btn--dirty {
      color: var(--warn);
      border-color: color-mix(in srgb, var(--warn) 40%, var(--border));
      background: color-mix(in srgb, var(--warn) 12%, var(--panel));
    }
    .startlist-schedule-matrix-cell-time.startlist-schedule-first-start-inline {
      display: flex;
      justify-content: center;
      align-items: center;
    }
    .startlist-schedule-matrix-cell-stack {
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
    }
    .startlist-schedule-matrix-cell-line {
      display: flex;
      flex-direction: column;
      gap: 0.2rem;
      min-width: 0;
    }
    .startlist-schedule-matrix-cat {
      font-size: 0.78rem;
      color: var(--muted);
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    table.startlist-schedule-matrix td.startlist-schedule-matrix-row-label {
      font-weight: 600;
      font-size: 0.82rem;
      white-space: nowrap;
      background: color-mix(in srgb, var(--panel-muted) 65%, var(--panel));
      text-align: left;
      vertical-align: middle;
      width: auto;
      min-width: 7.5rem;
      max-width: 18rem;
    }
    .startlist-schedule-row {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-end;
      gap: 0.65rem 1rem;
    }
    .startlist-schedule-field {
      display: flex;
      flex-direction: column;
      gap: 0.2rem;
      min-width: 0;
    }
    .startlist-schedule-label {
      font-size: 0.82rem;
      color: var(--muted);
    }
    .startlist-schedule-controls input[type="time"],
    .startlist-schedule-controls input.startlist-schedule-duration,
    .startlist-schedule-controls input.startlist-schedule-wallclock {
        max-width: 9rem;
    }
    .startlist-schedule-controls input.startlist-schedule-wallclock {
        font-variant-numeric: tabular-nums;
    }
    .startlist-schedule-first-start-inline {
      display: flex;
      align-items: center;
      gap: 0.35rem;
      min-width: 0;
    }
    .startlist-schedule-first-start-inline .startlist-schedule-wallclock {
      flex: 1 1 auto;
      min-width: 0;
    }
    button.startlist-schedule-save-first-start-btn {
      flex: 0 0 auto;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0.25rem 0.35rem;
      min-width: 2.25rem;
    }
    button.startlist-schedule-save-first-start-btn.startlist-schedule-save-first-start-btn--persisted {
      color: var(--ok);
      background: color-mix(in srgb, var(--ok) 10%, var(--panel));
      border-color: color-mix(in srgb, var(--ok) 35%, var(--border));
    }
    button.startlist-schedule-save-first-start-btn.startlist-schedule-save-first-start-btn--not-persisted {
      color: var(--warn);
      background: color-mix(in srgb, var(--warn) 12%, var(--panel));
      border-color: color-mix(in srgb, var(--warn) 40%, var(--border));
    }
    .startlist-route-cell-main {
      font-weight: 500;
    }
    .startlist-route-cell-schedule {
      font-size: 0.82rem;
      color: var(--muted);
      margin-top: 0.15rem;
      font-variant-numeric: tabular-nums;
    }
    table.startlist-matrix {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.92rem;
    }
    table.startlist-matrix th,
    table.startlist-matrix td {
      border-bottom: 1px solid var(--border);
      padding: 0.35rem 0.45rem;
      text-align: left;
      vertical-align: top;
    }
    table.startlist-matrix thead th {
      font-weight: 600;
      white-space: nowrap;
    }
    table.startlist-matrix th.startlist-th-sortable {
      cursor: pointer;
      user-select: none;
    }
    table.startlist-matrix th.startlist-th-sortable:hover {
      text-decoration: underline;
    }
    table.startlist-matrix th.startlist-th-callzone {
      /* Same typography as other ``thead`` cells; border aligns with callzone body cells. */
      border-right: 1px solid var(--border);
    }
    table.startlist-matrix td.startlist-callzone-cell {
      font-variant-numeric: tabular-nums;
      font-size: 0.84rem;
      color: var(--text);
      background: color-mix(in srgb, var(--panel-muted) 35%, var(--panel));
      border-right: 1px solid var(--border);
      vertical-align: top;
    }
    table.startlist-matrix tbody tr:hover td.startlist-callzone-cell {
      background: color-mix(in srgb, var(--panel-muted) 55%, var(--panel));
    }
    table.startlist-matrix th.startlist-timeline-th-time,
    table.startlist-matrix td.startlist-timeline-td-time {
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
      width: 1%;
      vertical-align: middle;
    }
    table.startlist-matrix td.startlist-timeline-td-time {
      border-right: 1px solid var(--border);
      background: color-mix(in srgb, var(--panel-muted) 25%, var(--panel));
    }
    table.startlist-matrix tbody tr:hover td.startlist-timeline-td-time {
      background: color-mix(in srgb, var(--panel-muted) 45%, var(--panel));
    }
    /* Fat separator before each repeated time column (after the first). */
    table.startlist-matrix th.startlist-timeline-th-time ~ th.startlist-timeline-th-time,
    table.startlist-matrix td.startlist-timeline-td-time ~ td.startlist-timeline-td-time {
      border-left: 4px solid var(--border);
    }
    table.startlist-timeline-matrix th.startlist-timeline-th-slot {
      vertical-align: bottom;
      white-space: pre-line;
    }
    table.startlist-timeline-matrix th.startlist-timeline-th-slot.startlist-th-callzone,
    table.startlist-timeline-matrix td.startlist-timeline-slot-cell.startlist-timeline-callzone-column {
      border-left: 4px solid var(--border);
    }
    table.startlist-timeline-matrix td.startlist-timeline-slot-cell {
      vertical-align: top;
      min-width: 6.5rem;
    }
    table.startlist-timeline-matrix td.startlist-timeline-slot-cell[data-athlete-id] {
      cursor: pointer;
    }
    /* Favorite is toggled by clicking the slot cell; keep the row compact (no star column). */
    table.startlist-timeline-matrix .athlete-favorite-star-btn {
      display: none !important;
    }
    .startlist-timeline-slot-line {
      font-weight: 500;
    }
    table.startlist-timeline-matrix td.startlist-timeline-slot-cell.row-highlight-athlete {
      background: rgba(37, 99, 235, 0.1);
    }
    table.startlist-timeline-matrix td.startlist-timeline-slot-cell.row-highlight-athlete:hover {
      background: rgba(37, 99, 235, 0.16);
    }
    table.startlist-timeline-matrix td.startlist-timeline-slot-cell.row-highlight-country {
      background: var(--session-hl-bg, rgba(5, 150, 105, 0.1));
    }
    table.startlist-timeline-matrix td.startlist-timeline-slot-cell.row-highlight-country:hover {
      background: var(--session-hl-bg-hover, rgba(5, 150, 105, 0.16));
    }
    table.startlist-timeline-matrix
      td.startlist-timeline-slot-cell.row-highlight-athlete.row-highlight-country {
      background: var(--session-hl-athlete-blend, rgba(14, 116, 144, 0.12));
    }
    table.startlist-timeline-matrix
      td.startlist-timeline-slot-cell.row-highlight-athlete.row-highlight-country:hover {
      background: var(--session-hl-athlete-blend, rgba(14, 116, 144, 0.16));
    }
    .startlist-filter-btn-group button.round-filter-btn.is-disabled {
      opacity: 0.55;
      cursor: not-allowed;
    }
    table.results-athletes th.th-callzone-next,
    table.results-athletes td.td-callzone-next {
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }
    table.results-athletes td.td-callzone-next {
      color: var(--text);
    }
    dialog.startlist-set-plan-dialog {
      border: none;
      border-radius: 12px;
      padding: 0;
      max-width: min(52rem, calc(100vw - 2rem));
      width: 100%;
      background: var(--panel);
      color: var(--text);
      box-shadow: 0 16px 48px rgba(15, 23, 42, 0.22);
      --slsp-c0: #2563eb;
      --slsp-c1: #059669;
      --slsp-c2: #d97706;
      --slsp-c3: #7c3aed;
      --slsp-c4: #0d9488;
      --slsp-c5: #db2777;
    }
    dialog.startlist-set-plan-dialog::backdrop {
      background: rgba(15, 23, 42, 0.4);
    }
    .startlist-set-plan-dialog-inner {
      display: flex;
      flex-direction: column;
      min-height: 0;
      overflow: hidden;
      padding: 0 0.48rem 0;
      max-height: min(82vh, 40rem);
    }
    .startlist-set-plan-dialog-inner > .results-dialog-scroll {
      padding-top: 0.2rem;
    }
    .startlist-set-plan-dialog-inner > h3 {
      flex-shrink: 0;
      margin: 0.38rem 0 0.18rem;
      font-size: 0.88rem;
      font-weight: 600;
      color: var(--text);
      line-height: 1.2;
    }
    .startlist-set-plan-dialog-loading {
      margin: 0.65rem 0.35rem 0.5rem;
    }
    .startlist-set-plan-multi-hint {
      margin: 0 0 0.28rem;
      font-size: 0.74rem;
      line-height: 1.3;
    }
    .startlist-set-plan-cat-blocks {
      display: flex;
      flex-direction: column;
      gap: 0.22rem;
    }
    .startlist-set-plan-cat-block {
      border: 1px solid var(--border);
      border-radius: 7px;
      margin-bottom: 0;
      padding: 0.26rem 0.34rem 0.22rem;
      background: color-mix(in srgb, var(--panel-muted) 32%, var(--panel));
      box-sizing: border-box;
    }
    .startlist-set-plan-cat-block:last-child {
      margin-bottom: 0;
    }
    .startlist-set-plan-route-matrix {
      display: flex;
      flex-direction: row;
      flex-wrap: nowrap;
      gap: 0.28rem;
      margin: 0;
      padding: 0 0 0.06rem;
      align-items: stretch;
      overflow-x: auto;
    }
    .startlist-set-plan-route-matrix-col {
      flex: 0 0 auto;
      width: max-content;
      min-width: 4.35rem;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 0.14rem;
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 0.14rem 0.2rem 0.18rem;
      box-sizing: border-box;
      background: var(--panel);
    }
    .startlist-set-plan-route-matrix-col-head {
      font-size: 0.64rem;
      font-weight: 600;
      letter-spacing: 0.02em;
      color: var(--text);
      text-align: center;
      line-height: 1.2;
      padding: 0.08rem 0.22rem 0.12rem;
      margin: 0 -0.06rem 0.06rem;
      border-bottom: 1px solid var(--border);
      word-break: break-word;
      white-space: normal;
      align-self: stretch;
      min-width: 0;
      box-sizing: border-box;
    }
    .startlist-set-plan-route-matrix-col-body {
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      align-items: stretch;
      justify-content: flex-start;
      gap: 0.2rem 0.22rem;
      flex: 0 0 auto;
      width: max-content;
      max-width: 100%;
      min-height: 0;
      box-sizing: border-box;
    }
    .startlist-set-plan-route-matrix-col--set-0 {
      background: color-mix(in srgb, var(--slsp-c0) 10%, var(--panel));
      border-color: color-mix(in srgb, var(--slsp-c0) 28%, var(--border));
    }
    .startlist-set-plan-route-matrix-col--set-1 {
      background: color-mix(in srgb, var(--slsp-c1) 10%, var(--panel));
      border-color: color-mix(in srgb, var(--slsp-c1) 28%, var(--border));
    }
    .startlist-set-plan-route-matrix-col--set-2 {
      background: color-mix(in srgb, var(--slsp-c2) 11%, var(--panel));
      border-color: color-mix(in srgb, var(--slsp-c2) 30%, var(--border));
    }
    .startlist-set-plan-route-matrix-col--set-3 {
      background: color-mix(in srgb, var(--slsp-c3) 10%, var(--panel));
      border-color: color-mix(in srgb, var(--slsp-c3) 28%, var(--border));
    }
    .startlist-set-plan-route-matrix-col--set-4 {
      background: color-mix(in srgb, var(--slsp-c4) 10%, var(--panel));
      border-color: color-mix(in srgb, var(--slsp-c4) 28%, var(--border));
    }
    .startlist-set-plan-route-matrix-col--set-5 {
      background: color-mix(in srgb, var(--slsp-c5) 9%, var(--panel));
      border-color: color-mix(in srgb, var(--slsp-c5) 26%, var(--border));
    }
    .startlist-set-plan-route-cell {
      display: flex;
      flex-direction: column;
      gap: 0.1rem;
      flex: 0 1 auto;
      min-width: 3.55rem;
      max-width: 5.4rem;
      width: auto;
      padding: 0.14rem 0.2rem 0.14rem 0.16rem;
      border: 1px solid var(--border);
      border-radius: 5px;
      background: var(--panel);
      box-sizing: border-box;
    }
    .startlist-set-plan-route-cell-name {
      font-size: 0.65rem;
      font-weight: 600;
      line-height: 1.15;
      color: var(--text);
      word-break: break-word;
    }
    .startlist-set-plan-route-cell select.startlist-set-plan-route-set-sel {
      width: 100%;
      min-width: 0;
      max-width: none;
      flex: none;
      font-size: 0.7rem;
      padding: 0.12rem 0.22rem;
    }
    .startlist-set-plan-route-cell--set-0 {
      background: color-mix(in srgb, var(--slsp-c0) 14%, var(--panel));
      border-color: color-mix(in srgb, var(--slsp-c0) 32%, var(--border));
      border-left: 3px solid var(--slsp-c0);
    }
    .startlist-set-plan-route-cell--set-1 {
      background: color-mix(in srgb, var(--slsp-c1) 14%, var(--panel));
      border-color: color-mix(in srgb, var(--slsp-c1) 32%, var(--border));
      border-left: 3px solid var(--slsp-c1);
    }
    .startlist-set-plan-route-cell--set-2 {
      background: color-mix(in srgb, var(--slsp-c2) 16%, var(--panel));
      border-color: color-mix(in srgb, var(--slsp-c2) 34%, var(--border));
      border-left: 3px solid var(--slsp-c2);
    }
    .startlist-set-plan-route-cell--set-3 {
      background: color-mix(in srgb, var(--slsp-c3) 14%, var(--panel));
      border-color: color-mix(in srgb, var(--slsp-c3) 32%, var(--border));
      border-left: 3px solid var(--slsp-c3);
    }
    .startlist-set-plan-route-cell--set-4 {
      background: color-mix(in srgb, var(--slsp-c4) 14%, var(--panel));
      border-color: color-mix(in srgb, var(--slsp-c4) 32%, var(--border));
      border-left: 3px solid var(--slsp-c4);
    }
    .startlist-set-plan-route-cell--set-5 {
      background: color-mix(in srgb, var(--slsp-c5) 12%, var(--panel));
      border-color: color-mix(in srgb, var(--slsp-c5) 30%, var(--border));
      border-left: 3px solid var(--slsp-c5);
    }
    .startlist-set-plan-set-row--set-0 {
      background: color-mix(in srgb, var(--slsp-c0) 10%, var(--panel));
      border-left: 3px solid var(--slsp-c0);
    }
    .startlist-set-plan-set-row--set-1 {
      background: color-mix(in srgb, var(--slsp-c1) 10%, var(--panel));
      border-left: 3px solid var(--slsp-c1);
    }
    .startlist-set-plan-set-row--set-2 {
      background: color-mix(in srgb, var(--slsp-c2) 11%, var(--panel));
      border-left: 3px solid var(--slsp-c2);
    }
    .startlist-set-plan-set-row--set-3 {
      background: color-mix(in srgb, var(--slsp-c3) 10%, var(--panel));
      border-left: 3px solid var(--slsp-c3);
    }
    .startlist-set-plan-set-row--set-4 {
      background: color-mix(in srgb, var(--slsp-c4) 10%, var(--panel));
      border-left: 3px solid var(--slsp-c4);
    }
    .startlist-set-plan-set-row--set-5 {
      background: color-mix(in srgb, var(--slsp-c5) 9%, var(--panel));
      border-left: 3px solid var(--slsp-c5);
    }
    .startlist-set-plan-round-sets-label {
      margin: 0.32rem 0 0.12rem;
      font-size: 0.64rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--muted);
      line-height: 1.2;
    }
    .startlist-set-plan-pane--round-sets {
      margin-bottom: 0.22rem;
    }
    .startlist-set-plan-default-row {
      margin: 0 0 0.42rem;
      font-size: 0.81rem;
      line-height: 1.32;
      color: var(--text);
    }
    .startlist-set-plan-default-label {
      display: inline-flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.35rem;
    }
    .startlist-set-plan-default-label input {
      width: 4rem;
      min-width: 0;
      font-size: 0.81rem;
      padding: 0.22rem 0.35rem;
    }
    .startlist-set-plan-section-label {
      margin: 0.42rem 0 0.2rem;
      font-size: 0.67rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--muted);
      line-height: 1.2;
    }
    .startlist-set-plan-section-label:first-of-type {
      margin-top: 0.12rem;
    }
    .startlist-set-plan-pane {
      border: 1px solid var(--border);
      border-radius: 7px;
      overflow: hidden;
      background: var(--panel);
      margin: 0 0 0.28rem;
    }
    .startlist-set-plan-route-list {
      display: flex;
      flex-direction: column;
      gap: 0;
      margin: 0;
    }
    .startlist-set-plan-route-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.42rem;
      padding: 0.28rem 0.42rem;
      min-height: 2.15rem;
      border-bottom: 1px solid var(--border);
      font-size: 0.81rem;
      line-height: 1.28;
      box-sizing: border-box;
    }
    .startlist-set-plan-route-row:last-child {
      border-bottom: none;
    }
    .startlist-set-plan-route-name {
      flex: 1 1 6rem;
      min-width: 0;
    }
    select.startlist-set-plan-route-set-sel {
      flex: 0 1 11rem;
      min-width: 6.5rem;
      max-width: 100%;
      font-size: 0.81rem;
      padding: 0.2rem 0.32rem;
    }
    .startlist-set-plan-set-manage {
      display: flex;
      flex-direction: column;
      gap: 0;
      margin: 0;
    }
    .startlist-set-plan-set-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.28rem;
      padding: 0.18rem 0.3rem 0.18rem 0.26rem;
      min-height: 1.85rem;
      border-bottom: 1px solid var(--border);
      font-size: 0.74rem;
      line-height: 1.22;
      box-sizing: border-box;
    }
    .startlist-set-plan-set-slots-wrap {
      display: inline-flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.22rem;
      flex-shrink: 0;
    }
    .startlist-set-plan-set-slots-label {
      font-size: 0.68rem;
      color: var(--muted);
      white-space: nowrap;
    }
    .startlist-set-plan-set-manage .startlist-set-plan-set-row:last-child {
      border-bottom: none;
    }
    input.startlist-set-plan-set-id {
      flex: 0 0 auto;
      width: 4.75rem;
      max-width: 6rem;
      min-width: 3.25rem;
      box-sizing: border-box;
      font-size: 0.72rem;
      padding: 0.14rem 0.28rem;
    }
    input.startlist-set-plan-set-slots {
      width: 3.35rem;
      min-width: 0;
      flex-shrink: 0;
      font-size: 0.72rem;
      padding: 0.14rem 0.24rem;
    }
    button.startlist-set-plan-set-delete {
      flex-shrink: 0;
      font-size: 0.7rem;
      padding: 0.16rem 0.38rem;
      min-height: 1.65rem;
    }
    .startlist-set-plan-pane-footer {
      padding: 0.22rem 0.32rem;
      border-top: 1px solid var(--border);
      background: color-mix(in srgb, var(--panel-muted) 40%, var(--panel));
    }
    button.startlist-set-plan-add-set {
      font-size: 0.74rem;
      padding: 0.2rem 0.45rem;
      min-height: 1.78rem;
    }
    table.startlist-matrix tbody tr:hover td {
        background: var(--panel-muted);
    }
    .startlist-matrix-below-table {
        margin-top: 0.65rem;
    }
    .startlist-matrix-below-table .results-source-page-link.meta {
        margin: 0 0 0.35rem;
    }
    .startlist-matrix-below-table .startlist-matrix-athlete-counts {
        margin: 0;
    }
    .results-event-meta-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 0.35rem 1rem;
    }
    .results-event-meta-primary {
      display: inline-flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.25rem;
      flex: 0 1 auto;
      min-width: 0;
      max-width: 100%;
    }
    .results-event-meta-primary #results-event-meta {
      margin: 0;
      flex: 0 1 auto;
      min-width: 0;
      /* Sit directly before the reload control; wrap within the row without stretching across it */
      width: fit-content;
      max-width: 100%;
    }
    .results-event-meta-primary .round-results-reload-btn {
      margin-left: 0;
      flex-shrink: 0;
    }
    .speed-cutoff-line {
      height: 0;
      padding: 0;
    }
    .speed-cutoff-line td {
      padding: 0.25rem 0.5rem;
      border-top: 2px solid var(--accent, #2563eb);
      font-size: 0.78rem;
      color: var(--accent, #2563eb);
      font-weight: 500;
      text-align: center;
    }
    tr.results-extended-round-cutoff td.results-extended-round-cutoff-line {
      border-top-color: var(--border);
      color: var(--muted);
      font-weight: 400;
    }
    .result-invalid {
      color: #b91c1c;
    }
    .result-wildcard {
      color: #059669;
    }


    .results-event-external-links-wrap {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: flex-end;
      gap: 0.45rem 1rem;
      flex: 0 1 auto;
      min-width: 0;
      font-size: 0.85rem;
      color: var(--muted);
    }
    .results-event-external-links-wrap:empty {
      display: none;
    }
    .results-event-community-wrap {
      margin-top: 0.45rem;
      padding-top: 0.45rem;
      border-top: 1px solid var(--border);
      font-size: 0.85rem;
      color: var(--muted);
    }
    .results-event-community-wrap[hidden] {
      display: none !important;
    }
    .event-community-links-approved {
      margin-bottom: 0.5rem;
    }
    .event-community-links-label {
      display: block;
      font-weight: 500;
      color: var(--text);
      margin-bottom: 0.25rem;
      font-size: 0.82rem;
    }
    .event-community-links-row {
      display: flex;
      flex-wrap: wrap;
      gap: 0.35rem 1rem;
      align-items: center;
    }
    .event-community-links-row a {
      color: var(--accent);
      text-decoration: underline;
    }
    .event-community-link-item {
      display: inline-flex;
      flex-wrap: wrap;
      align-items: baseline;
      gap: 0 0.35rem;
    }
    .event-community-link-kind {
      font-weight: 500;
      color: var(--muted);
      font-size: 0.8em;
    }
    .event-custom-link-suggest-slot {
      display: inline-flex;
      align-items: center;
      flex-shrink: 0;
    }
    .event-custom-link-suggest-open {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 1.75rem;
      height: 1.75rem;
      padding: 0;
      border: none;
      border-radius: 6px;
      background: transparent;
      color: var(--muted);
      cursor: pointer;
      opacity: 0.65;
    }
    .event-custom-link-suggest-open:hover {
      opacity: 1;
      color: var(--text);
      background: var(--panel-muted);
    }
    .event-custom-link-suggest-open:focus-visible {
      opacity: 1;
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    html.event-custom-link-overlay-open,
    html.speed-records-regex-overlay-open {
      overflow: hidden;
    }
    .event-custom-link-overlay {
      position: fixed;
      inset: 0;
      z-index: 10050;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 1rem;
      box-sizing: border-box;
    }
    .event-custom-link-overlay[hidden] {
      display: none !important;
    }
    .event-custom-link-overlay-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.4);
    }
    .event-custom-link-overlay-dialog.speed-records-regex-dialog {
      max-width: min(42rem, calc(100vw - 2rem));
      display: flex;
      flex-direction: column;
      overflow: hidden;
      padding-bottom: 0;
    }
    .event-custom-link-overlay-dialog.speed-records-regex-dialog .speed-records-regex-dialog-scroll {
      flex: 1 1 auto;
      min-height: 0;
      overflow-x: hidden;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      padding-top: 0.12rem;
    }
    .event-custom-link-overlay-dialog.speed-records-regex-dialog .speed-records-regex-msg {
      flex-shrink: 0;
      margin: 0.2rem 0 0;
      padding: 0 0 0.2rem;
    }
    .event-custom-link-overlay-dialog.speed-records-regex-dialog
      .speed-records-regex-dialog-footer.results-dialog-footer-actions {
      padding-bottom: 1rem;
    }
    #speed-records-regex-overlay .results-dialog-footer-actions button.results-dialog-footer-reset {
      margin-inline-end: auto;
    }
    .event-custom-link-overlay-dialog {
      position: relative;
      z-index: 1;
      width: 100%;
      max-width: 24rem;
      max-height: min(90vh, 32rem);
      overflow: auto;
      padding: 1rem 1.1rem 1.1rem;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: var(--panel);
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    }
    .event-custom-link-overlay-close {
      position: absolute;
      top: 0.35rem;
      right: 0.35rem;
      width: 2rem;
      height: 2rem;
      padding: 0;
      border: none;
      border-radius: 6px;
      background: transparent;
      color: var(--muted);
      font-size: 1.35rem;
      line-height: 1;
      cursor: pointer;
    }
    .event-custom-link-overlay-close:hover {
      color: var(--text);
      background: var(--panel-muted);
    }
    .event-custom-link-overlay-title {
      margin: 0 2rem 0.65rem 0;
      font-size: 1rem;
      font-weight: 600;
      color: var(--text);
    }
    .event-custom-link-overlay-body .event-custom-link-sub-intro {
      margin: 0 0 0.35rem;
    }
    .event-custom-link-overlay-body .event-custom-link-submissions {
      margin: 0 0 0.75rem;
    }
    .event-custom-link-fields {
      display: flex;
      flex-wrap: wrap;
      gap: 0.35rem 0.65rem;
      align-items: flex-end;
      margin-bottom: 0.35rem;
    }
    .event-custom-link-fields label {
      display: flex;
      flex-direction: column;
      gap: 0.15rem;
      font-size: 0.8rem;
      color: var(--muted);
      min-width: min(100%, 10rem);
    }
    .event-custom-link-fields input {
      font: inherit;
      padding: 0.3rem 0.45rem;
      border: 1px solid var(--border);
      border-radius: 6px;
      min-width: min(100%, 14rem);
    }
    .event-custom-link-msg {
      margin: 0.25rem 0 0;
      font-size: 0.8rem;
    }
    .event-custom-link-msg.is-err {
      color: #b91c1c;
    }
    .event-custom-link-submissions {
      margin: 0.35rem 0 0;
      padding-left: 1.1rem;
      font-size: 0.78rem;
      color: var(--muted);
    }
    .results-event-public-info {
      margin: 0.35rem 0 0;
      font-size: 0.88rem;
      line-height: 1.45;
      color: var(--text);
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--panel-muted);
      overflow: hidden;
    }
    .results-event-public-info[hidden] {
      display: none !important;
    }
    .results-event-public-info > summary {
      cursor: pointer;
      padding: 0.5rem 0.65rem;
      font-weight: 500;
      font-size: 0.85rem;
      color: var(--muted);
      list-style: none;
      user-select: none;
    }
    .results-event-public-info > summary::-webkit-details-marker {
      display: none;
    }
    .results-event-public-info > summary::before {
      content: "";
      display: inline-block;
      width: 0.35em;
      height: 0.35em;
      margin-right: 0.45em;
      border-right: 2px solid currentColor;
      border-bottom: 2px solid currentColor;
      transform: rotate(-45deg);
      vertical-align: 0.12em;
      transition: transform 0.12s ease;
    }
    .results-event-public-info[open] > summary::before {
      transform: rotate(45deg);
      vertical-align: 0.08em;
    }
    .results-event-public-info > summary:hover {
      color: var(--text);
    }
    .results-event-public-info-inner {
      padding: 0 0.65rem 0.65rem;
      border-top: 1px solid var(--border);
      margin: 0;
    }
    .results-event-public-info-inner > p {
      margin: 0 0 0.5rem;
    }
    .results-event-public-info-inner > p:last-child {
      margin-bottom: 0;
    }
    .results-event-pi-venue {
      color: var(--muted);
      font-size: 0.85rem;
    }
    .results-event-pi-description {
      color: var(--text);
    }
    .results-source-page-link {
      margin: 0.65rem 0 0;
    }
    /* Unified small type for "Source:" / "Quelle:" labels and their rows */
    .source-quelle-prefix {
      font-weight: 400;
      color: var(--muted);
    }
    .results-source-page-link.meta,
    p.registration-source-quelle.meta {
      font-size: 0.72rem;
      line-height: 1.45;
    }
    .athletes-detail-fetched-at-group.athletes-detail-source-line.meta {
      font-size: 0.72rem;
      line-height: 1.45;
      margin-bottom: 1rem;
    }
    .results-source-page-link.meta .results-external-source-link {
      font-size: inherit;
    }
    p.registration-source-quelle.meta a {
      color: var(--accent);
      text-decoration: none;
    }
    p.registration-source-quelle.meta a:hover {
      text-decoration: underline;
    }
    .results-external-source-link {
      color: var(--accent);
      text-decoration: none;
      word-break: break-all;
    }
    .results-external-source-link:hover {
      text-decoration: underline;
    }
    .event-external-links {
      display: flex;
      flex-wrap: wrap;
      gap: 0.45rem 1rem;
      align-items: center;
      margin: 0;
      padding: 0;
      border: none;
      font-size: inherit;
      color: inherit;
    }
    .event-external-links a {
      color: var(--accent);
      text-decoration: none;
    }
    .event-external-links a:hover {
      text-decoration: underline;
    }
    .event-external-links .event-external-text {
      color: var(--muted);
    }
    .tab-panel[hidden] {
      display: none !important;
    }
    #tab-panel-events {
      min-width: 0;
    }
    .events-overview-table-wrap {
      max-width: 100%;
      min-width: 0;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }
    #tab-panel-events table.events-overview-table {
      table-layout: auto;
      width: max-content;
      min-width: 100%;
      font-size: 0.9rem;
    }
    #tab-panel-events table.events-overview-table th,
    #tab-panel-events table.events-overview-table td {
      vertical-align: top;
    }
    #tab-panel-events table.events-overview-table thead th.th-sortable {
      cursor: pointer;
      user-select: none;
    }
    #tab-panel-events table.events-overview-table thead th.th-sortable:hover {
      color: var(--text);
    }
    #tab-panel-events table.events-overview-table td.td-events-disciplines {
      white-space: pre-line;
    }
    #tab-panel-events table.events-overview-table th.events-overview-th-actions,
    #tab-panel-events table.events-overview-table td.td-events-overview-actions {
      width: 1%;
      white-space: nowrap;
      text-align: center;
      vertical-align: middle;
    }
    #tab-panel-events table.events-overview-table td.td-events-overview-actions .events-overview-add-to-list-btn {
      margin: 0 auto;
    }
    .events-overview-add-to-list-dialog[open] {
      display: flex;
      flex-direction: column;
      min-height: 0;
      max-width: min(28rem, 100vw - 2rem);
      width: 100%;
      padding: 0;
      border: 1px solid var(--border);
      border-radius: 12px;
      background: var(--panel);
      color: var(--text);
      box-shadow: 0 16px 48px rgba(15, 23, 42, 0.22);
    }
    .events-overview-add-to-list-dialog::backdrop {
      background: rgba(15, 23, 42, 0.4);
    }
    .events-overview-add-to-list-dialog-inner {
      padding: 0.65rem 0.85rem 0.85rem;
      box-sizing: border-box;
      width: 100%;
    }
    .events-overview-add-to-list-title {
      margin: 0 0 0.35rem;
      font-size: 0.94rem;
      font-weight: 600;
    }
    .events-overview-add-to-list-event {
      margin: 0 0 0.55rem;
    }
    .events-overview-add-to-list-field {
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
      margin-bottom: 0.5rem;
      font-size: 0.88rem;
    }
    .events-overview-add-to-list-select {
      width: 100%;
      max-width: 100%;
    }
    .events-overview-add-to-list-err {
      margin: 0.35rem 0 0;
    }
    .events-overview-add-to-list-actions {
      margin-top: 0.65rem;
    }
    /* Past vs upcoming when both time filters are on (``event_time=all`` + mixed list). */
    #tab-panel-events table.events-overview-table tbody tr.events-overview-row--past {
      filter: saturate(0.88);
    }
    #tab-panel-events table.events-overview-table tbody tr.events-overview-row--past td {
      background-color: color-mix(in srgb, var(--panel) 78%, var(--muted) 22%);
    }
    /* Single 2px-tall cell: no margins, no inner wrapper — avoids white gaps and extra row height. */
    #tab-panel-events table.events-overview-table tbody tr.events-overview-time-sep-row td.events-overview-time-sep-cell {
      padding: 0 !important;
      margin: 0;
      height: 2px;
      line-height: 0;
      font-size: 0;
      border: none;
      vertical-align: top;
      background-color: color-mix(in srgb, var(--border) 42%, var(--muted) 58%);
      background-image: linear-gradient(
        90deg,
        color-mix(in srgb, var(--accent) 55%, var(--muted) 45%) 0%,
        color-mix(in srgb, var(--border) 42%, var(--muted) 58%) 22%,
        color-mix(in srgb, var(--border) 42%, var(--muted) 58%) 78%,
        color-mix(in srgb, var(--accent) 55%, var(--muted) 45%) 100%
      );
    }
    table.registration-table {
      margin-top: 0.5rem;
    }
    .registration-filters {
      margin: 0.65rem 0 0.5rem;
    }
    .registration-birth-year-selects {
      display: flex;
      flex: 1 1 auto;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.45rem 0.85rem;
      min-width: 0;
    }
    .registration-birth-year-selects-fields {
      display: flex;
      flex: 1 1 auto;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.45rem 0.85rem;
      min-width: 0;
    }
    .registration-birth-year-selects-fields[hidden] {
      display: none !important;
    }
    .registration-birth-year-selects label,
    .registration-list-compare-label {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      font-size: 0.77rem;
      color: var(--muted);
      font-weight: 500;
      margin: 0;
      cursor: pointer;
      min-width: 0;
    }
    .registration-birth-year-select,
    .registration-list-compare-select {
      box-sizing: border-box;
      max-width: 100%;
      font-size: 0.8rem;
      padding: 0.24rem 0.45rem;
      padding-inline-end: 1.85rem;
    }
    .registration-birth-year-select {
      min-width: 7rem;
    }
    .registration-birth-year-row--locked {
      align-items: flex-start;
    }
    .registration-birth-year-filter-lock-area {
      display: flex;
      align-items: center;
      gap: 0.35rem;
      flex: 1 1 auto;
      min-width: 0;
      font-size: 0.77rem;
      color: var(--muted);
      line-height: 1.3;
    }
    .registration-birth-year-filter-lock-area[hidden] {
      display: none !important;
    }
    .registration-birth-year-filter-lock-area .results-col-perm-lock svg {
      display: block;
      width: 1.05rem;
      height: 1.05rem;
    }
    .registration-birth-year-filter-lock-msg {
      flex: 1 1 auto;
      min-width: 0;
    }
    .registration-list-compare-bar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.45rem 0.85rem;
      margin: 0.65rem 0 0.35rem;
    }
    .registration-list-compare-label {
      display: inline-flex;
      align-items: center;
      gap: 0.28rem;
    }
    .registration-list-compare-lock-slot .results-col-perm-lock svg {
      width: 14px;
      height: 14px;
      display: block;
    }
    .registration-list-compare-bar--locked .registration-list-compare-select {
      opacity: 0.82;
      cursor: not-allowed;
    }
    .registration-list-compare-select {
      min-width: min(18rem, 100%);
    }
    .registration-list-only-members-label,
    .registration-list-sort-separate-label {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      font-size: 0.77rem;
      font-weight: 500;
      color: var(--muted);
      cursor: pointer;
      user-select: none;
    }
    .registration-list-only-members-label[hidden],
    .registration-list-sort-separate-label[hidden] {
      display: none !important;
    }
    table.registration-participants-table tr.registration-row-after-missing-block td {
      border-top: 3px solid var(--border);
      box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.06);
    }
    table.registration-participants-table .registration-status-missing {
      color: #c2410c;
      font-weight: 600;
      letter-spacing: 0.02em;
    }
    p.registration-source-quelle {
      margin: 0.65rem 0 0;
      word-break: break-all;
    }
    table.registration-participants-table {
      font-size: 0.78rem;
      border: none;
      border-radius: 0;
    }
    table.registration-participants-table th,
    table.registration-participants-table td {
      padding: 0.4rem 0.5rem;
      vertical-align: middle;
      text-align: left;
    }
    table.registration-participants-table thead th.th-sortable {
      cursor: pointer;
      user-select: none;
    }
    table.registration-participants-table thead th.th-sortable:hover {
      color: var(--text);
    }
    table.registration-participants-table thead th.th-reg-matrix {
      cursor: default;
      font-weight: 600;
      white-space: normal;
      max-width: 9.5rem;
    }
    table.registration-participants-table thead th.th-reg-matrix.th-sortable {
      cursor: pointer;
      user-select: none;
    }
    table.registration-participants-table td.td-reg-matrix {
      vertical-align: top;
      max-width: 10.5rem;
    }
    /* Rank / result / speed-time: single-line-ish; match base columns (middle). Plan stays top. */
    table.registration-participants-table td.td-reg-matrix.td-reg-matrix-result {
      vertical-align: middle;
    }
    table.registration-participants-table
      td.td-reg-status
      .registration-status-matrix-plan-sep {
      margin-top: 0.35rem;
      margin-bottom: 0.2rem;
      border-top: 1px solid var(--border);
    }
    table.registration-participants-table td.td-reg-status.td-reg-status--matrix-plan .registration-status-matrix-plan-block {
      max-width: 10.5rem;
    }
    table.registration-participants-table td.td-reg-matrix .athletes-events-cell-inner,
    table.registration-participants-table td.td-reg-status.td-reg-status--matrix-plan .athletes-events-cell-inner {
      min-width: 0;
    }
    /* Matrix markup reused here is styled under `.athletes-events-matrix` elsewhere; cap icons to text size. */
    table.registration-participants-table td.td-reg-matrix .athletes-events-att-glyph,
    table.registration-participants-table td.td-reg-status.td-reg-status--matrix-plan .athletes-events-att-glyph {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 1em;
      height: 1em;
      flex-shrink: 0;
      vertical-align: -0.12em;
    }
    table.registration-participants-table td.td-reg-matrix .athletes-events-att-glyph svg,
    table.registration-participants-table td.td-reg-status.td-reg-status--matrix-plan .athletes-events-att-glyph svg {
      width: 1em;
      height: 1em;
      display: block;
    }
    table.registration-participants-table td.td-reg-matrix .athletes-events-att-qmark,
    table.registration-participants-table td.td-reg-status.td-reg-status--matrix-plan .athletes-events-att-qmark {
      font-size: 0.65em;
      font-weight: 700;
      line-height: 1;
      width: 1em;
      height: 1em;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      border-width: 1px;
      box-sizing: border-box;
    }
    table.registration-participants-table td.td-reg-matrix .athletes-events-att-excused-badge,
    table.registration-participants-table td.td-reg-status.td-reg-status--matrix-plan .athletes-events-att-excused-badge {
      font-size: 0.58rem;
      font-weight: 800;
      line-height: 1;
      padding: 0.1rem 0.24rem 0.08rem;
      border-radius: 4px;
      background: #fef08a;
      color: #713f12;
      border: 1px solid #eab308;
      letter-spacing: -0.02em;
    }
    table.registration-participants-table td.td-reg-matrix .athletes-events-medal,
    table.registration-participants-table td.td-reg-status.td-reg-status--matrix-plan .athletes-events-medal {
      font-size: 1em;
      line-height: 1;
    }
    /* Plan cells (matrix column or merged into status): align with `.athletes-events-matrix` registration/planning look. */
    table.registration-participants-table td.td-reg-matrix-plan .athletes-events-reg-row,
    table.registration-participants-table td.td-reg-status.td-reg-status--matrix-plan .athletes-events-reg-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.25rem 0.4rem;
    }
    table.registration-participants-table td.td-reg-matrix-plan .athletes-events-reg-row--irrelevant,
    table.registration-participants-table td.td-reg-status.td-reg-status--matrix-plan .athletes-events-reg-row--irrelevant {
      min-height: 1.1em;
    }
    table.registration-participants-table td.td-reg-matrix-plan .athletes-events-reg-inline,
    table.registration-participants-table td.td-reg-status.td-reg-status--matrix-plan .athletes-events-reg-inline {
      flex: 1 1 auto;
      min-width: 0;
    }
    table.registration-participants-table td.td-reg-matrix-plan .athletes-events-reg,
    table.registration-participants-table td.td-reg-status.td-reg-status--matrix-plan .athletes-events-reg {
      font-size: 0.78rem;
      color: #94a3b8;
    }
    table.registration-participants-table td.td-reg-matrix-plan .athletes-events-reg--confirmed,
    table.registration-participants-table td.td-reg-status.td-reg-status--matrix-plan .athletes-events-reg--confirmed {
      color: var(--ok, #059669);
      font-weight: 600;
    }
    table.registration-participants-table td.td-reg-matrix-plan .athletes-events-reg--not-attending,
    table.registration-participants-table td.td-reg-status.td-reg-status--matrix-plan .athletes-events-reg--not-attending {
      color: #ea580c;
      font-weight: 600;
    }
    table.registration-participants-table td.td-reg-matrix-plan .athletes-events-reg--missing,
    table.registration-participants-table td.td-reg-status.td-reg-status--matrix-plan .athletes-events-reg--missing {
      color: var(--danger, #b91c1c);
      font-weight: 600;
    }
    table.registration-participants-table
      td.td-reg-matrix-plan
      .athletes-events-reg--missing.athletes-events-reg--missing-not-qualified,
    table.registration-participants-table
      td.td-reg-status.td-reg-status--matrix-plan
      .athletes-events-reg--missing.athletes-events-reg--missing-not-qualified {
      color: #94a3b8;
      font-weight: 500;
    }
    table.registration-participants-table td.td-reg-matrix-plan .athletes-events-reg--missing-excused,
    table.registration-participants-table td.td-reg-status.td-reg-status--matrix-plan .athletes-events-reg--missing-excused {
      color: var(--text-muted, #94a3b8);
      font-weight: 500;
      opacity: 0.78;
    }
    table.registration-participants-table td.td-reg-matrix-plan .athletes-events-reg-reason,
    table.registration-participants-table td.td-reg-status.td-reg-status--matrix-plan .athletes-events-reg-reason,
    table.registration-participants-table
      td.td-reg-matrix-plan
      .athletes-events-reg-inline
      .athletes-events-reg-reason,
    table.registration-participants-table
      td.td-reg-status.td-reg-status--matrix-plan
      .athletes-events-reg-inline
      .athletes-events-reg-reason,
    table.registration-participants-table td.td-reg-matrix-result .athletes-events-reg-reason,
    table.registration-participants-table
      td.td-reg-matrix-result
      .athletes-events-result-row
      .athletes-events-reg-reason {
      font-size: 0.78rem;
      color: var(--text-muted, #94a3b8);
      font-weight: 500;
      opacity: 0.78;
    }
    table.registration-participants-table td.td-reg-matrix-plan .athletes-events-att-glyph--unset,
    table.registration-participants-table td.td-reg-status.td-reg-status--matrix-plan .athletes-events-att-glyph--unset {
      color: var(--text-muted, #94a3b8);
    }
    table.registration-participants-table td.td-reg-matrix-plan .athletes-events-att-glyph--expected_to_start,
    table.registration-participants-table td.td-reg-status.td-reg-status--matrix-plan .athletes-events-att-glyph--expected_to_start {
      color: var(--ok, #059669);
    }
    table.registration-participants-table td.td-reg-matrix-plan .athletes-events-att-glyph--wont_start,
    table.registration-participants-table td.td-reg-status.td-reg-status--matrix-plan .athletes-events-att-glyph--wont_start {
      color: var(--danger, #b91c1c);
    }
    table.registration-participants-table td.td-reg-matrix-plan .athletes-events-att-glyph--not_qualified,
    table.registration-participants-table td.td-reg-status.td-reg-status--matrix-plan .athletes-events-att-glyph--not_qualified {
      color: #ea580c;
    }
    table.registration-participants-table td.td-reg-matrix-plan .athletes-events-att-glyph--excused,
    table.registration-participants-table td.td-reg-status.td-reg-status--matrix-plan .athletes-events-att-glyph--excused {
      color: inherit;
    }
    table.registration-participants-table td.td-reg-matrix-plan .athletes-events-att-glyph--mixed,
    table.registration-participants-table td.td-reg-status.td-reg-status--matrix-plan .athletes-events-att-glyph--mixed {
      color: #7c3aed;
    }
    table.registration-participants-table td.td-reg-matrix-plan .athletes-events-att-glyph--clearpick,
    table.registration-participants-table td.td-reg-status.td-reg-status--matrix-plan .athletes-events-att-glyph--clearpick {
      color: var(--text-muted, #64748b);
    }
    table.registration-participants-table td.td-reg-matrix-plan .athletes-events-att-qmark--reserve,
    table.registration-participants-table td.td-reg-status.td-reg-status--matrix-plan .athletes-events-att-qmark--reserve {
      background: #fef9c3;
      border-color: #eab308;
      color: #854d0e;
    }
    /* Ergebnis: rank vs speed time — flex row + separator (registration cells are not under `.athletes-events-matrix`). */
    table.registration-participants-table td.td-reg-matrix-result .athletes-events-result-body {
      display: block;
      width: 100%;
    }
    table.registration-participants-table td.td-reg-matrix-result .athletes-events-result-row {
      width: 100%;
    }
    table.registration-participants-table td.td-reg-matrix-result .athletes-events-result-line--speed {
      display: flex;
      flex-wrap: nowrap;
      align-items: baseline;
      width: 100%;
      min-width: 0;
      column-gap: 0.35rem;
    }
    table.registration-participants-table td.td-reg-matrix-result .athletes-events-result-line--speed > .athletes-events-result-rank--with-speed-time {
      flex: 1 1 auto;
      min-width: 0;
    }
    table.registration-participants-table td.td-reg-matrix-result .athletes-events-result-rank--with-speed-time {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 0.35rem 0.55rem;
      width: 100%;
      min-width: 0;
    }
    table.registration-participants-table td.td-reg-matrix-result .athletes-events-result-rank--with-speed-time .athletes-events-result-rank-main {
      flex: 0 1 auto;
      min-width: 0;
    }
    table.registration-participants-table td.td-reg-matrix-result .athletes-events-result-speed-time {
      flex: 0 0 auto;
      margin-left: auto;
      text-align: right;
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
      font-weight: 500;
      font-size: 0.88em;
      padding-left: 0.45rem;
      border-left: 1px solid var(--line, rgba(148, 163, 184, 0.55));
      color: var(--text-muted, #64748b);
    }
    table.registration-participants-table td.td-reg-matrix-result-time {
      text-align: right;
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
    }
    table.registration-participants-table
      td.td-reg-matrix-result-time
      .athletes-events-result-speed-time {
      border-left: none;
      margin-left: 0;
      padding-left: 0;
    }
    table.startlist-matrix.registration-participants-table thead th.startlist-group-sep-after,
    table.startlist-matrix.registration-participants-table tbody td.startlist-group-sep-after {
      border-right: 2px solid var(--line, #d2dae3);
    }
    table.registration-participants-table td.td-reg-name,
    table.registration-participants-table td.td-reg-country,
    table.registration-participants-table td.td-reg-region {
      cursor: pointer;
    }
    table.registration-participants-table td.td-reg-name {
      text-decoration: none;
    }
    table.registration-participants-table td.td-reg-name:hover .athlete-cell-name-primary {
      text-decoration: underline;
      text-underline-offset: 2px;
    }
    table.registration-participants-table td.td-reg-country:hover {
      text-decoration: underline;
      text-underline-offset: 2px;
    }
    table.registration-participants-table td.td-reg-region:hover {
      text-decoration: underline;
      text-underline-offset: 2px;
    }
    table.registration-participants-table td.td-reg-region {
      white-space: nowrap;
      max-width: 12rem;
    }
    table.registration-participants-table td.td-reg-country.td-highlight-marked,
    table.registration-participants-table td.td-reg-region.td-highlight-marked {
      font-weight: 700;
    }
    table.registration-participants-table td.td-reg-bib {
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
      max-width: 5rem;
    }
    table.registration-participants-table td.td-reg-birth {
      font-variant-numeric: tabular-nums;
      text-align: center;
    }
    table.registration-participants-table thead th.th-reg-birth {
      text-align: center;
    }
    table.registration-participants-table td.td-reg-discipline,
    table.registration-participants-table td.td-reg-category,
    table.registration-participants-table td.td-reg-status {
      white-space: pre-line;
    }
    table.registration-participants-table .registration-status-not-attending {
      color: #b91c1c;
      font-weight: 500;
    }
    table.registration-participants-table tr.row-highlight-athlete td {
      background: rgba(37, 99, 235, 0.1);
    }
    table.registration-participants-table tr.row-highlight-athlete:hover td {
      background: rgba(37, 99, 235, 0.16);
    }
    table.registration-participants-table tr.row-highlight-country td {
      background: var(--session-hl-bg, rgba(5, 150, 105, 0.1));
    }
    table.registration-participants-table tr.row-highlight-country:hover td {
      background: var(--session-hl-bg-hover, rgba(5, 150, 105, 0.16));
    }
    table.registration-participants-table tr.row-highlight-athlete.row-highlight-country td {
      background: var(--session-hl-athlete-blend, rgba(14, 116, 144, 0.12));
    }
    table.registration-participants-table tr.row-highlight-athlete.row-highlight-country:hover td {
      background: var(--session-hl-athlete-blend, rgba(14, 116, 144, 0.16));
    }
    .rankings-selectors-row.rankings-toolbar {
      margin-bottom: 0.65rem;
    }
    .rankings-toolbar {
      margin-bottom: 0.75rem;
    }
    .rankings-controls-box .rankings-dcat-wrap,
    .rankings-controls-box .rankings-born-wrap {
      margin: 0;
    }
    .rankings-dcat-wrap {
      margin: 0.5rem 0 0.25rem;
    }
    .rankings-born-wrap {
      margin: 0.25rem 0 0.25rem;
    }
    .rankings-born-controls-slot {
      display: flex;
      flex: 1 1 auto;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.3rem 0.45rem;
      min-width: 0;
      min-height: 2.2rem;
    }
    .cup-rankings-born-filter-row--locked {
      align-items: center;
    }
    .cup-rankings-born-filter-lock-area {
      display: flex;
      align-items: center;
      min-height: 2rem;
      padding: 0 0.15rem;
      color: var(--muted);
    }
    .cup-rankings-born-filter-lock-area .results-col-perm-lock svg {
      display: block;
      width: 1.1rem;
      height: 1.1rem;
    }
    .rankings-dcat-group .round-filter-btn.is-pressed {
      border-color: var(--accent);
      color: var(--accent);
    }
    .events-overview-loaded-meta-host[hidden] {
      display: none !important;
    }
    .events-overview-meta-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.5rem 0.85rem;
    }
    .events-overview-sync-status {
      margin: 0;
      flex: 0 1 auto;
    }
    /* Same visual line as "Geladen am" (cup-rankings-loaded-meta-text cell-muted); avoid toolbar .status / .status.syncing */
    .events-overview-sync-status.syncing {
      color: var(--muted);
    }
    .events-overview-loaded-inner {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.25rem 0.35rem;
      flex: 1 1 auto;
      min-width: 0;
    }
    .events-overview-loaded-inner:not(:has(.events-overview-loaded-meta)) {
      flex: 0 1 auto;
    }
    .events-overview-loaded-inner:has(.cup-rankings-loaded-meta) {
      flex: 1 1 auto;
      min-width: 0;
    }
    .cup-rankings-loaded-meta {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.25rem 0.35rem;
      margin: 0 0 0.45rem;
      font-size: 0.88rem;
    }
    .cup-rankings-loaded-meta-text {
      margin: 0;
    }
    .cup-rankings-reload-btn {
      vertical-align: middle;
    }
    .rankings-cup-loaded-meta-host[hidden] {
      display: none !important;
    }
    .rankings-cup-sync-status {
      margin: 0;
    }
    .rankings-cup-loaded-meta-host .cup-rankings-loaded-meta {
      margin: 0;
    }
    .cup-rankings-table-wrap {
      overflow-x: auto;
      margin-top: 0.35rem;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: var(--panel);
    }
    table.cup-rankings-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.82rem;
    }
    table.cup-rankings-table th,
    table.cup-rankings-table td {
      padding: 0.4rem 0.45rem;
      border-bottom: 1px solid var(--border);
      text-align: left;
      vertical-align: top;
    }
    table.cup-rankings-table thead th {
      background: var(--table-header);
      color: var(--table-header-text);
      font-weight: 600;
      white-space: nowrap;
      vertical-align: top;
    }
    table.cup-rankings-table thead th.cup-rankings-th-event {
      position: relative;
      white-space: normal;
      max-width: 7rem;
      vertical-align: top;
    }
    table.cup-rankings-table thead th.cup-rankings-th-event .admin-th-sort {
      align-items: flex-start;
      flex-wrap: wrap;
      white-space: normal;
      width: 100%;
      box-sizing: border-box;
    }
    table.cup-rankings-table thead th.cup-rankings-th-event .admin-th-sort > .cup-rankings-th-event-label-stack {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.12rem;
      white-space: normal;
      overflow-wrap: anywhere;
      word-break: break-word;
      min-width: 0;
      line-height: 1.2;
      text-align: center;
    }
    .cup-rankings-th-event-disc {
      font-size: 0.72em;
      font-weight: 600;
      color: var(--muted-fg, #64748b);
      line-height: 1.2;
    }
    .cup-rankings-th-event-cup-title {
      font-size: 0.8em;
      font-weight: 500;
      line-height: 1.2;
    }
    table.cup-rankings-table tbody tr:last-child td {
      border-bottom: none;
    }
    /* Toolbar is not a child of the table host; keep it above wide/scrollable table chrome. */
    .rankings-cup-toolbar-slot:not([hidden]) {
      position: relative;
      z-index: 2;
    }
    .rankings-cup-toolbar-slot .results-table-toolbar {
      margin: 0.3rem 0 0;
    }
    table.cup-rankings-table td.cup-rankings-name-cell,
    table.cup-rankings-table td.cup-rankings-country-cell,
    table.cup-rankings-table td.cup-rankings-region-cell {
      cursor: pointer;
    }
    table.cup-rankings-table td.cup-rankings-name-cell {
      text-decoration: none;
      max-width: 14rem;
      font-weight: 500;
    }
    table.cup-rankings-table td.cup-rankings-country-cell:hover {
      text-decoration: underline;
      text-underline-offset: 2px;
    }
    table.cup-rankings-table td.cup-rankings-region-cell:hover {
      text-decoration: underline;
      text-underline-offset: 2px;
    }
    table.cup-rankings-table td.cup-rankings-country-cell.td-highlight-marked,
    table.cup-rankings-table td.cup-rankings-region-cell.td-highlight-marked {
      font-weight: 700;
    }
    table.cup-rankings-table td.cup-rankings-born-cell {
      font-variant-numeric: tabular-nums;
      vertical-align: top;
      text-align: center;
    }
    table.cup-rankings-table thead th:has(.admin-th-sort[data-cup-rank-sort="born"]) {
      text-align: center;
    }
    table.cup-rankings-table thead th .admin-th-sort[data-cup-rank-sort="born"] {
      justify-content: center;
      text-align: center;
    }
    table.cup-rankings-table td.cup-rankings-name-cell .results-athlete-list-tags {
      display: inline-flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.22rem 0.35rem;
      margin: 0;
      max-width: 100%;
      min-width: 0;
      line-height: 1.2;
      cursor: default;
      text-decoration: none;
    }
    table.cup-rankings-table td.cup-rankings-event-cell {
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
    }
    .cup-rankings-th-event-stack {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.3rem;
      text-align: center;
      min-width: 0;
      max-width: 11rem;
      margin: 0 auto;
    }
    .cup-rankings-th-event-top-row {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.28rem;
      max-width: 100%;
    }
    .athletes-events-matrix-th-cup-events-meta {
      font-size: 0.72rem;
      font-weight: 500;
      line-height: 1.35;
      color: var(--text-muted, #64748b);
      margin: 0;
      max-width: 100%;
    }
    table.cup-rankings-table th.cup-rankings-th-event .cup-rankings-th-event-results-link svg,
    table.athletes-events-matrix th.cup-rankings-th-event .cup-rankings-th-event-results-link svg {
      width: 0.92rem;
      height: 0.92rem;
    }
    .cup-rankings-th-event-date {
      font-size: 0.72rem;
      font-weight: 500;
      line-height: 1.25;
      color: var(--muted-fg, #64748b);
      white-space: nowrap;
    }
    table.cup-rankings-table th.cup-rankings-th-event .cup-rankings-th-event-sort,
    table.athletes-events-matrix th.cup-rankings-th-event .cup-rankings-th-event-sort {
      margin-top: 0.05rem;
      max-width: 100%;
    }
    table.cup-rankings-table th.cup-rankings-th-event .cup-rankings-th-event-sort .cup-rankings-th-event-cup-title,
    table.athletes-events-matrix th.cup-rankings-th-event .cup-rankings-th-event-sort .cup-rankings-th-event-cup-title {
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 100%;
    }
    table.athletes-events-matrix thead th.cup-rankings-th-event .athletes-events-th-stand-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: center;
      gap: 0.2rem 0.3rem;
      width: 100%;
      margin-top: 0;
      max-width: 100%;
    }
    table.athletes-events-matrix thead th.cup-rankings-th-event .athletes-events-th-bottom {
      position: static;
      flex: 0 0 auto;
      width: 100%;
      margin-top: 0.2rem;
      padding-top: 0.3rem;
      border-top: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
      box-sizing: border-box;
    }
    table.athletes-events-matrix thead th.cup-rankings-th-event
      .athletes-events-th-stand-row
      .startlist-matrix-refetch-btn.admin-icon-btn {
      width: 1.28rem;
      height: 1.28rem;
      padding: 0;
      font-size: 0.68rem;
      line-height: 1;
    }
    .athletes-events-th-stand {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      flex: 1 1 auto;
      min-width: 0;
      font-size: 0.58rem;
      font-weight: 500;
      line-height: 1.3;
      color: var(--muted-fg, #64748b);
      max-width: 100%;
      text-align: center;
    }
    .athletes-events-th-stand-prefix,
    .athletes-events-th-stand-date {
      display: block;
      max-width: 100%;
      white-space: normal;
      overflow-wrap: anywhere;
      word-break: break-word;
    }
    .cup-rankings-event-cell-inner {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.2rem;
    }
    .cup-rankings-event-rankpts {
      line-height: 1.25;
      white-space: nowrap;
    }
    .cup-rankings-event-pts {
      font-weight: 500;
      color: var(--muted-fg, #64748b);
      font-variant-numeric: tabular-nums;
    }
    .cup-rankings-event-speed-best {
      font-size: 0.78em;
      font-variant-numeric: tabular-nums;
      color: var(--muted-fg, #64748b);
      line-height: 1.2;
      white-space: nowrap;
    }
    table.cup-rankings-table .cup-rankings-score-virtual {
      color: var(--muted-fg, #64748b);
      font-variant-numeric: tabular-nums;
    }
    table.results-athletes th.th-boulder-potential,
    table.results-athletes td.td-boulder-potential {
      text-align: right;
      font-variant-numeric: tabular-nums;
      vertical-align: middle;
      max-width: 7.5rem;
    }
    table.results-athletes td.td-boulder-potential {
      white-space: normal;
      line-height: 1.2;
    }
    table.results-athletes td.td-boulder-potential .boulder-potential-rank-range {
      font-weight: 400;
      white-space: nowrap;
    }
    table.results-athletes td.td-boulder-potential .boulder-potential-score-delta {
      font-weight: 400;
      white-space: nowrap;
      margin-top: 0.12rem;
      font-variant-numeric: tabular-nums;
    }
    table.results-athletes td.td-boulder-potential .boulder-potential-delta-suffix {
      font-size: 0.85em;
      font-weight: 400;
      color: var(--muted);
    }
    table.results-athletes td.td-boulder-potential--no-upside .boulder-potential-rank-range,
    table.results-athletes td.td-boulder-potential--no-upside .boulder-potential-max-pts {
      color: var(--muted);
    }
    table.results-athletes th.th-boulder-prediction,
    table.results-athletes td.td-boulder-prediction {
      text-align: right;
      font-variant-numeric: tabular-nums;
      vertical-align: middle;
      max-width: 7.5rem;
    }
    table.results-athletes td.td-boulder-prediction {
      white-space: normal;
      line-height: 1.2;
    }
    table.results-athletes td.td-boulder-prediction .boulder-prediction-rank {
      font-weight: 400;
      white-space: nowrap;
    }
    table.results-athletes td.td-boulder-prediction .boulder-prediction-total {
      font-weight: 600;
      white-space: nowrap;
      margin-top: 0.12rem;
      color: var(--warning, #d97706);
    }
    table.cup-rankings-table td.cup-rankings-disc-sum-cell {
      text-align: right;
      white-space: nowrap;
    }
    table.cup-rankings-table td.cup-rankings-disc-sum-total-cell {
      text-align: right;
      vertical-align: middle;
    }
    .cup-rankings-disc-sum-total-inner {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 0.1rem;
      line-height: 1.15;
    }
    .cup-rankings-disc-sum-total-rank {
      font-weight: 600;
      font-variant-numeric: tabular-nums;
    }
    .cup-rankings-disc-sum-total-pts {
      font-size: 0.88em;
      font-weight: 500;
      color: var(--muted);
      font-variant-numeric: tabular-nums;
    }
    .cup-rankings-disc-sum-total-avg {
      font-weight: 400;
      color: var(--muted);
      opacity: 0.92;
    }
    table.cup-rankings-table td.cup-rankings-speed-overall-cell {
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
    }
    .cup-rankings-event-rank {
      font-weight: 600;
    }
    .cup-rankings-event-cell-inner--excluded,
    .cup-rankings-event-cell-inner--excluded .cup-rankings-event-rank,
    .cup-rankings-event-cell-inner--excluded .cup-rankings-event-pts,
    .cup-rankings-event-cell-inner--excluded .cup-rankings-event-speed-best {
      color: #b91c1c;
    }
    table.cup-rankings-table tr.row-highlight-athlete td {
      background: rgba(37, 99, 235, 0.1);
    }
    table.cup-rankings-table tr.row-highlight-athlete:hover td {
      background: rgba(37, 99, 235, 0.16);
    }
    table.cup-rankings-table tr.row-highlight-country td {
      background: var(--session-hl-bg, rgba(5, 150, 105, 0.1));
    }
    table.cup-rankings-table tr.row-highlight-country:hover td {
      background: var(--session-hl-bg-hover, rgba(5, 150, 105, 0.16));
    }
    table.cup-rankings-table tr.row-highlight-athlete.row-highlight-country td {
      background: var(--session-hl-athlete-blend, rgba(14, 116, 144, 0.12));
    }
    table.cup-rankings-table tr.row-highlight-athlete.row-highlight-country:hover td {
      background: var(--session-hl-athlete-blend, rgba(14, 116, 144, 0.16));
    }
    tr.row-startlist-only td {
      color: var(--muted);
    }
    .results-view-head {
      margin-bottom: 1rem;
      padding-bottom: 0.85rem;
      border-bottom: 1px solid var(--border);
    }
    .favorite-event-cards-strip {
      display: flex;
      flex-wrap: wrap;
      align-items: stretch;
      gap: 0.45rem 0.55rem;
      margin: 0 0 0.35rem;
      min-height: 1.5rem;
    }
    .favorite-event-cards-strip[hidden] {
      display: none !important;
    }
    .favorite-event-cards-label {
      font-size: 0.82rem;
      margin-right: 0.15rem;
      flex: 0 0 100%;
      width: 100%;
    }
    .favorite-event-card-slot {
      display: flex;
      flex-direction: column;
      align-self: stretch;
      box-sizing: border-box;
      min-width: 9.5rem;
      max-width: 17rem;
    }
    .favorite-event-card-slot > .favorite-event-card-shell {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      grid-template-rows: auto auto minmax(0, 1fr);
      column-gap: 0.35rem;
      row-gap: 0.12rem;
      align-items: start;
      flex: 1 1 auto;
      min-height: 0;
      width: 100%;
      min-width: 0;
      box-sizing: border-box;
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 0.38rem 0.52rem;
      background: var(--panel-muted);
    }
    .favorite-event-card-shell > .favorite-event-card {
      display: contents;
    }
    .favorite-event-card-shell .favorite-event-card__date-loc {
      grid-column: 1 / -1;
      grid-row: 1;
    }
    .favorite-event-card-shell .favorite-event-card__title {
      grid-column: 1 / -1;
      grid-row: 2;
      margin-top: 0;
    }
    .favorite-event-card-shell .favorite-event-card__source-cell {
      grid-column: 1;
      grid-row: 3;
      align-self: end;
      justify-self: start;
      margin-top: 0;
      padding-top: 0.12rem;
      min-width: 0;
    }
    .favorite-event-card-shell .favorite-event-card__star {
      grid-column: 2;
      grid-row: 3;
      align-self: end;
      justify-self: end;
      margin: 0;
      padding: 0.1rem 0 0 0.15rem;
    }
    .favorite-event-card-shell .favorite-event-card__star svg {
      width: 14px;
      height: 14px;
    }
    .favorite-event-card {
      display: flex;
      flex-direction: column;
      gap: 0.12rem;
      text-decoration: none;
      color: inherit;
      border: none;
      border-radius: 0;
      padding: 0;
      background: transparent;
      box-sizing: border-box;
      font-size: 0.78rem;
      line-height: 1.28;
      text-align: left;
      cursor: pointer;
    }
    .favorite-event-card-shell:hover {
      filter: brightness(0.97);
    }
    .favorite-event-card-shell:focus-within {
      outline: 2px solid var(--accent);
      outline-offset: 1px;
    }
    .favorite-event-card:focus-visible {
      outline: none;
    }
    .favorite-event-card__date-loc {
      display: block;
      font-size: 0.72rem;
      line-height: 1.25;
      color: var(--muted);
      flex-shrink: 0;
    }
    .favorite-event-card__title {
      display: block;
      font-size: 0.84rem;
      font-weight: 600;
      color: var(--text);
      margin-top: 0.12rem;
      line-height: 1.28;
      min-width: 0;
    }
    .favorite-event-card__source {
      display: block;
      font-size: 0.72rem;
      font-weight: 600;
      color: var(--muted);
      margin-top: auto;
      padding-top: 0.12rem;
      line-height: 1.25;
    }
    .results-view-head .results-view-title {
      margin: 0.35rem 0 0.25rem;
      font-size: 1.15rem;
      font-weight: 600;
      display: flex;
      flex-wrap: wrap;
      align-items: baseline;
      gap: 0.35rem 0.55rem;
    }
    .results-view-head .results-view-title .results-view-title-line {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      min-width: 0;
    }
    .results-view-head .results-view-title .results-view-title-text {
      min-width: 0;
    }
    .results-view-head .results-view-title .results-view-title-dates {
      font-size: 0.92em;
      font-weight: 500;
      color: var(--muted);
      font-variant-numeric: tabular-nums;
    }
    .results-view-head .results-view-title .results-view-title-dates::before {
      content: "\00b7";
      margin-right: 0.45rem;
      color: var(--border);
      font-weight: 400;
    }
    .results-view-head .results-view-title .results-view-title-location {
      min-width: 0;
      font-size: 0.92em;
      font-weight: 500;
      color: var(--muted);
    }
    .results-view-head .results-view-title .results-view-title-location::before {
      content: "\00b7";
      margin-right: 0.45rem;
      color: var(--border);
      font-weight: 400;
    }
    .results-view-head .btn-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.65rem;
    }
    .results-view-head .btn-row button.secondary {
      font-size: 0.88rem;
      padding: 0.42rem 0.78rem;
      min-height: 2.35rem;
    }
    .results-view-head .btn-row .results-filter-btn.is-pressed {
      background: rgba(37, 99, 235, 0.14);
      border-color: var(--accent);
      color: var(--text);
    }
    .athletes-favorites-wrap {
      margin-bottom: 1rem;
    }
    .athletes-favorites-empty {
      margin: 0.25rem 0 0.5rem;
      font-size: 0.88rem;
      line-height: 1.45;
    }
    .athletes-favorites-list-add-wrap {
      margin-top: 0.5rem;
    }
    .athletes-favorites-wrap[hidden] {
      display: none !important;
    }
    .athletes-lists-wrap {
      margin-bottom: 1.25rem;
    }
    .athletes-lists-wrap[hidden] {
      display: none !important;
    }
    .athletes-lists-toolbar {
      flex-wrap: wrap;
      align-items: flex-end;
      gap: 0.75rem 1.25rem;
    }
    .athletes-lists-toolbar-planning-row {
      flex: 1 0 100%;
      display: flex;
      flex-wrap: wrap;
      align-items: baseline;
      gap: 0.35rem 0.65rem;
      margin: 0.1rem 0 0;
    }
    .athletes-lists-planning-nav {
      font: inherit;
      font-weight: 500;
      color: var(--accent);
      text-decoration: none;
    }
    .athletes-lists-planning-nav:hover {
      text-decoration: underline;
    }
    .athletes-lists-select-field {
      min-width: min(22rem, 100%);
    }
    .athletes-lists-select-open {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      max-width: 28rem;
      text-align: left;
      padding: 0.45rem 0.65rem;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--panel);
      color: var(--text);
      font: inherit;
      cursor: pointer;
    }
    .athletes-lists-select-open:hover {
      border-color: var(--accent);
    }
    .athletes-lists-select-label {
      flex: 1;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .athletes-lists-select-dialog,
    .athletes-lists-new-dialog,
    .athletes-events-add-dialog {
      width: min(28rem, calc(100vw - 2rem));
      max-height: min(70vh, 28rem);
      padding: 0;
      border: none;
      border-radius: 12px;
      background: var(--panel);
      color: var(--text);
      box-shadow: 0 16px 48px rgba(15, 23, 42, 0.22);
    }
    /**
     * Author ``display: flex`` on ``<dialog>`` overrides the closed UA rule
     * (same specificity as ``dialog:not(:open)``), so the panel stayed visible.
     */
    .athletes-events-add-dialog:not([open]) {
      display: none !important;
    }
    .athletes-events-add-dialog[open] {
      width: min(32rem, calc(100vw - 1.25rem));
      /**
       * Definite height so column flex children (body + scroll area) get real
       * main-axis space; with ``height: auto`` and ``flex: 1 1 0`` the body
       * collapsed to a few pixels (indefinite flex sizing).
       */
      height: min(82dvh, 30rem);
      max-height: min(90dvh, 32rem);
      box-sizing: border-box;
      display: flex;
      flex-direction: column;
      min-height: 0;
      overflow: hidden;
    }
    .athletes-events-add-dialog .athletes-lists-select-dialog-head {
      flex-shrink: 0;
    }
    .athletes-events-add-dialog .athletes-lists-select-dialog-title {
      flex: 1;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 0.95rem;
      line-height: 1.25;
    }
    .athletes-events-add-dialog-body {
      flex: 1 1 0;
      min-height: 0;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      padding: 0.65rem 0.85rem 0.45rem;
      overflow: hidden;
    }
    .athletes-events-add-dialog-filters {
      flex-shrink: 0;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.45rem 0.6rem;
      align-items: end;
    }
    @media (max-width: 26rem) {
      .athletes-events-add-dialog-filters {
        grid-template-columns: 1fr;
      }
    }
    .athletes-events-add-dialog-field {
      display: flex;
      flex-direction: column;
      gap: 0.18rem;
      min-width: 0;
      font-size: 0.76rem;
      font-weight: 500;
      color: var(--muted);
    }
    .athletes-events-add-dialog-field > span,
    .athletes-events-add-dialog-field > label {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .athletes-events-add-dialog-field--grow {
      grid-column: 1 / -1;
    }
    .athletes-events-add-select,
    .athletes-events-add-dialog-body input[type="search"] {
      font: inherit;
      font-size: 0.84rem;
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--panel);
      color: var(--text);
      padding: 0.32rem 0.5rem;
      min-height: 2.05rem;
    }
    .athletes-events-add-search-with-load {
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      align-items: stretch;
      gap: 0.35rem;
      min-width: 0;
    }
    .athletes-events-add-search-with-load input[type="search"] {
      flex: 1 1 auto;
      min-width: 0;
    }
    .athletes-events-add-find-btn {
      flex-shrink: 0;
      align-self: stretch;
      white-space: nowrap;
      font-size: 0.8rem;
      font-weight: 500;
      padding: 0.32rem 0.55rem;
      min-height: 2.05rem;
      box-sizing: border-box;
      border-radius: 8px;
    }
    .athletes-events-add-dialog-body #athletes-events-add-dialog-err {
      flex-shrink: 0;
      margin: 0;
      padding: 0.25rem 0.35rem;
      font-size: 0.8rem;
      line-height: 1.3;
      max-height: 4.25rem;
      overflow-y: auto;
    }
    .athletes-events-add-results {
      flex: 1 1 0;
      min-height: 0;
      overflow-x: hidden;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 0.3rem 0.4rem;
      background: var(--panel-muted, rgba(148, 163, 184, 0.08));
    }
    .athletes-events-add-results > p {
      margin: 0.35rem 0.25rem;
      font-size: 0.82rem;
      line-height: 1.35;
    }
    .athletes-events-add-result-row {
      display: flex;
      align-items: flex-start;
      gap: 0.4rem;
      padding: 0.26rem 0.2rem;
      border-bottom: 1px solid rgba(148, 163, 184, 0.2);
      font-size: 0.82rem;
      line-height: 1.35;
    }
    .athletes-events-add-result-row:last-child {
      border-bottom: none;
    }
    .athletes-events-add-result-row label {
      display: flex;
      align-items: flex-start;
      gap: 0.4rem;
      cursor: pointer;
      flex: 1;
      min-width: 0;
    }
    .athletes-events-add-result-row input {
      margin-top: 0.18rem;
      flex-shrink: 0;
    }
    .athletes-events-add-result-line {
      flex: 1;
      min-width: 0;
      word-break: break-word;
    }
    .athletes-events-add-result-name {
      font-weight: 500;
      color: var(--text);
    }
    .athletes-events-add-result-row--on-list {
      opacity: 0.58;
    }
    .athletes-events-add-dialog-footer.results-dialog-footer-actions {
      flex-shrink: 0;
      margin: 0;
      padding: 0.5rem 0.85rem 0.65rem;
    }
    .athletes-lists-select-dialog::backdrop,
    .athletes-lists-new-dialog::backdrop,
    .athletes-events-add-dialog::backdrop {
      background: rgba(15, 23, 42, 0.35);
    }
    .athletes-lists-select-dialog-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      padding: 0.65rem 0.85rem;
      border-bottom: 1px solid var(--border);
    }
    .athletes-lists-select-dialog-title {
      margin: 0;
      font-size: 1rem;
      font-weight: 600;
    }
    .athletes-lists-select-dialog .dialog-close-btn,
    .athletes-lists-new-dialog .dialog-close-btn,
    .athletes-events-add-dialog .dialog-close-btn {
      border: none;
      background: transparent;
      font-size: 1.35rem;
      line-height: 1;
      cursor: pointer;
      color: var(--muted);
      padding: 0.15rem 0.35rem;
      border-radius: 6px;
    }
    .athletes-lists-select-dialog .dialog-close-btn:hover,
    .athletes-lists-new-dialog .dialog-close-btn:hover,
    .athletes-events-add-dialog .dialog-close-btn:hover {
      color: var(--text);
      background: rgba(37, 99, 235, 0.08);
    }
    .athletes-lists-select-tree {
      max-height: min(52vh, 22rem);
      overflow: auto;
      padding: 0.35rem 0.5rem 0.65rem;
    }
    .athletes-lists-tree-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.9rem;
    }
    .athletes-lists-tree-table thead th {
      position: sticky;
      top: 0;
      z-index: 1;
      text-align: left;
      font-weight: 600;
      font-size: 0.78rem;
      text-transform: uppercase;
      letter-spacing: 0.03em;
      color: var(--muted);
      background: var(--panel-bg, var(--bg));
      padding: 0.35rem 0.4rem 0.45rem;
      border-bottom: 1px solid rgba(148, 163, 184, 0.35);
      white-space: nowrap;
    }
    .athletes-lists-tree-table th.athletes-lists-tree-th-num,
    .athletes-lists-tree-table td.athletes-lists-tree-td-num {
      text-align: right;
      width: 1%;
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
    }
    .athletes-lists-tree-table th.athletes-lists-tree-th-compact-mem {
      text-align: left;
      min-width: 6rem;
    }
    .athletes-lists-tree-td-compact-mem {
      padding: 0.28rem 0.45rem 0.32rem;
      border-bottom: 1px solid rgba(148, 163, 184, 0.22);
      vertical-align: middle;
    }
    .athletes-lists-mem-compact-suffix {
      font-size: 0.82rem;
      font-variant-numeric: tabular-nums;
      color: var(--muted);
    }
    .athletes-lists-tree-table tr.athletes-lists-tree-row.is-selected .athletes-lists-mem-compact-suffix {
      color: inherit;
      opacity: 0.92;
    }
    .athletes-lists-tree-table td.athletes-lists-tree-td-name {
      padding: 0.32rem 0.4rem;
      border-bottom: 1px solid rgba(148, 163, 184, 0.22);
      word-break: break-word;
    }
    .athletes-lists-tree-table td.athletes-lists-tree-td-num {
      padding: 0.32rem 0.35rem;
      border-bottom: 1px solid rgba(148, 163, 184, 0.22);
      color: var(--muted);
    }
    .athletes-lists-tree-table td.athletes-lists-tree-td-num.athletes-lists-tree-td-na {
      color: var(--muted);
    }
    .athletes-lists-tree-table tr.athletes-lists-tree-row {
      cursor: pointer;
    }
    .athletes-lists-tree-table tr.athletes-lists-tree-row:hover td {
      background: rgba(37, 99, 235, 0.06);
    }
    .athletes-lists-tree-table tr.athletes-lists-tree-row.is-selected td {
      font-weight: 600;
      background: rgba(37, 99, 235, 0.1);
      color: inherit;
    }
    .athletes-lists-new-dialog-body {
      padding: 0.75rem 0.85rem 0.5rem;
      display: flex;
      flex-direction: column;
      gap: 0.45rem;
    }
    .athletes-lists-new-dialog-body input[type="text"] {
      width: 100%;
      box-sizing: border-box;
    }
    .athletes-lists-new-parent-tree {
      max-height: min(36vh, 16rem);
    }
    .athletes-lists-new-dialog-footer {
      padding: 0.5rem 0.85rem 0.75rem;
    }
    html.athletes-lists-settings-overlay-open {
      overflow: hidden;
    }
    .athletes-lists-new-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.35rem;
    }
    .athletes-lists-settings-icon-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0.32rem;
      min-width: 2rem;
      min-height: 2rem;
      line-height: 0;
    }
    .athletes-lists-settings-icon-btn svg {
      display: block;
    }
    /** Toolbar list star: same outline/filled behavior as other `athlete-favorite-star-btn`; override `secondary` text color. */
    button.secondary.athletes-lists-favorite-toggle.athlete-favorite-star-btn {
      background: transparent;
      border-color: transparent;
      color: var(--muted);
    }
    button.secondary.athletes-lists-favorite-toggle.athlete-favorite-star-btn.is-favorite {
      color: var(--warn);
    }
    button.secondary.athletes-lists-favorite-toggle.athlete-favorite-star-btn:hover {
      color: var(--text);
      background: rgba(37, 99, 235, 0.08);
    }
    button.secondary.athletes-lists-favorite-toggle.athlete-favorite-star-btn.is-favorite:hover {
      color: var(--warn);
      background: rgba(202, 138, 4, 0.14);
    }
    .athletes-lists-settings-overlay {
      position: fixed;
      inset: 0;
      z-index: 10050;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 1rem;
      box-sizing: border-box;
    }
    .athletes-lists-settings-overlay[hidden] {
      display: none !important;
    }
    .athletes-lists-settings-overlay-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(15, 23, 42, 0.4);
    }
    .athletes-lists-settings-overlay-dialog {
      position: relative;
      z-index: 1;
      display: flex;
      flex-direction: column;
      min-height: 0;
      overflow: hidden;
      width: 100%;
      max-width: min(40rem, calc(100vw - 2rem));
      max-height: min(78vh, 42rem);
      padding: 0;
      border: none;
      border-radius: 12px;
      background: var(--panel);
      color: var(--text);
      box-shadow: 0 16px 48px rgba(15, 23, 42, 0.22);
    }
    .athletes-lists-settings-overlay-inner {
      display: flex;
      flex-direction: column;
      min-height: 0;
      overflow: hidden;
      flex: 1 1 auto;
      width: 100%;
      padding: 0 0.68rem 0;
      max-height: min(78vh, 42rem);
    }
    .athletes-lists-settings-overlay-close {
      position: absolute;
      top: 0.35rem;
      right: 0.35rem;
      width: 1.6rem;
      height: 1.6rem;
      padding: 0;
      border: none;
      border-radius: 6px;
      background: transparent;
      color: var(--muted);
      font-size: 1.05rem;
      line-height: 1;
      cursor: pointer;
    }
    .athletes-lists-settings-overlay-close:hover {
      color: var(--text);
      background: var(--panel-muted);
    }
    .athletes-lists-settings-overlay-title {
      flex-shrink: 0;
      margin: 0.58rem 0 0.28rem;
      padding-right: 2rem;
      font-size: 0.94rem;
      font-weight: 600;
      color: var(--text);
      line-height: 1.25;
    }
    .athletes-lists-settings-overlay-body {
      min-width: 0;
    }
    .athletes-lists-settings-overlay-scroll .athletes-lists-share-search-controls button.secondary,
    .athletes-lists-settings-overlay-scroll .athletes-lists-shared-users button {
      font-size: 0.82rem;
      padding: 0.28rem 0.55rem;
      min-height: 2.1rem;
    }
    .athletes-lists-settings-overlay-body .athletes-lists-editor {
      margin: 0;
      padding: 0;
      border: none;
      background: transparent;
      max-width: none;
    }
    .athletes-lists-editor {
      margin: 0.5rem 0 0;
      padding: 0.75rem 1rem;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: var(--panel);
      max-width: 40rem;
    }
    .athletes-lists-meta-editor {
      margin-top: 0.35rem;
      display: flex;
      flex-direction: column;
      gap: 0.65rem;
    }
    .athletes-lists-meta-below-grid {
      display: flex;
      flex-direction: column;
      gap: 0.65rem;
      margin-top: 0.15rem;
      padding-top: 0.45rem;
      border-top: 1px solid var(--border);
      max-width: 40rem;
    }
    .athletes-lists-enabled-block {
      padding-bottom: 0.5rem;
      margin-bottom: 0.35rem;
      border-bottom: 1px solid var(--border);
    }
    .athletes-lists-enabled-block[hidden] {
      display: none !important;
    }
    .athletes-lists-enabled-main-label {
      display: flex;
      align-items: flex-start;
      gap: 0.5rem;
      font-weight: 500;
      cursor: pointer;
      max-width: 36rem;
    }
    .athletes-lists-enabled-main-label input {
      margin-top: 0.2rem;
      flex-shrink: 0;
    }
    .athletes-lists-enabled-hint {
      margin: 0.35rem 0 0;
      max-width: 36rem;
    }
    .athletes-lists-editor-grid {
      display: grid;
      grid-template-columns: minmax(6rem, auto) 1fr;
      gap: 0.5rem 1rem;
      align-items: center;
    }
    .athletes-lists-tag-name-cell {
      display: flex;
      flex-direction: column;
      gap: 0.28rem;
      min-width: 0;
    }
    .athletes-lists-athlete-count {
      margin: 0.45rem 0 0;
    }
    .athletes-lists-new-compact {
      font-size: 0.82rem;
      padding: 0.32rem 0.65rem;
    }
    .athletes-lists-athlete-count[hidden] {
      display: none !important;
    }
    .athletes-lists-shared-row {
      display: flex;
      flex-direction: column;
      gap: 0.45rem;
    }
    .athletes-lists-priority-block {
      grid-column: 1 / -1;
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
      max-width: 36rem;
    }
    .athletes-lists-priority-row {
      display: grid;
      grid-template-columns: minmax(6rem, auto) 1fr;
      gap: 0.5rem 1rem;
      align-items: center;
    }
    .athletes-lists-priority-hint {
      margin: 0;
    }
    .athletes-lists-parent-block {
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
      max-width: 36rem;
    }
    .athletes-lists-parent-block[hidden] {
      display: none !important;
    }
    .athletes-lists-parent-hint {
      margin: 0;
    }
    .athletes-lists-parent-label {
      font-weight: 600;
      font-size: 0.88rem;
    }
    .athletes-lists-settings-parent-tree {
      width: 100%;
      max-width: 36rem;
      min-width: 0;
      max-height: min(40vh, 14rem);
      overflow: auto;
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 0.35rem 0.4rem;
      background: var(--panel);
    }
    .athletes-lists-th-child-sublist {
      text-align: center;
      font-weight: 600;
      font-size: 0.78rem;
      max-width: 7rem;
      min-width: 3.25rem;
      white-space: normal;
      word-break: break-word;
      overflow-wrap: anywhere;
      line-height: 1.25;
      vertical-align: bottom;
      hyphens: auto;
    }
    /** Match ``.results-athlete-list-tag`` pill; matrix leaf headers override cursor via ``#athletes-lists-table thead`` rules. */
    .athletes-lists-th-child-sublist-tag {
      display: inline-block;
      box-sizing: border-box;
      max-width: 100%;
      margin-top: 0;
      margin-bottom: 0.1rem;
      padding: 0.1rem 0.35rem;
      border-radius: 4px;
      border: 1px solid var(--border);
      background: var(--panel-muted);
      color: var(--text);
      font-family: inherit;
      font-size: 0.68rem;
      font-weight: 500;
      line-height: 1.25;
      text-align: center;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      vertical-align: middle;
      cursor: default;
      user-select: none;
    }
    .athletes-lists-th-child-sublist-count {
      display: block;
      box-sizing: border-box;
      width: 100%;
      margin: 0;
      text-align: center;
      font-size: 0.7rem;
      font-weight: 600;
      line-height: 1.15;
      color: var(--muted);
    }
    .athletes-lists-th-child-sublist-count--dirty {
      color: var(--warn, #b45309);
    }
    /** Matrix header band: banner + each ``data-ath-list-matrix-depth`` row (lighter = deeper). */
    #athletes-lists-table {
      --ath-list-matrix-border-strong: color-mix(
        in srgb,
        var(--border) 88%,
        var(--accent) 12%
      );
      --ath-list-matrix-bg-banner: color-mix(in srgb, var(--accent) 20%, var(--panel));
      --ath-list-matrix-row-1: color-mix(in srgb, var(--accent) 15.5%, var(--panel));
      --ath-list-matrix-row-2: color-mix(in srgb, var(--accent) 12.5%, var(--panel));
      --ath-list-matrix-row-3: color-mix(in srgb, var(--accent) 10%, var(--panel));
      --ath-list-matrix-row-4: color-mix(in srgb, var(--accent) 8%, var(--panel));
      --ath-list-matrix-row-5: color-mix(in srgb, var(--accent) 6.25%, var(--panel));
      --ath-list-matrix-row-6: color-mix(in srgb, var(--accent) 5%, var(--panel));
      --ath-list-matrix-row-7: color-mix(in srgb, var(--accent) 4%, var(--panel));
      --ath-list-matrix-row-8: color-mix(in srgb, var(--accent) 3.15%, var(--panel));
      --ath-list-matrix-row-9: color-mix(in srgb, var(--accent) 2.5%, var(--panel));
      --ath-list-matrix-row-10: color-mix(in srgb, var(--accent) 2%, var(--panel));
    }
    #athletes-lists-table thead th.athletes-lists-th-child-matrix-group {
      text-align: center;
      font-weight: 600;
      font-size: 0.74rem;
      line-height: 1.2;
      vertical-align: middle;
      color: var(--text);
      background: color-mix(in srgb, var(--accent) 11%, var(--panel));
      border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, var(--accent) 20%);
      padding: 0.28rem 0.35rem;
      max-width: 8rem;
      word-break: break-word;
    }
    #athletes-lists-table
      thead
      tr[data-ath-list-child-matrix]
      th.athletes-lists-th-child-matrix-group:not(.athletes-lists-th-child-matrix-group--banner) {
      cursor: pointer;
    }
    #athletes-lists-table
      thead
      tr[data-ath-list-child-matrix]
      th.athletes-lists-th-child-matrix-group:not(.athletes-lists-th-child-matrix-group--banner):hover {
      filter: brightness(1.04);
    }
    #athletes-lists-table
      thead
      tr[data-ath-list-child-matrix]
      th.athletes-lists-th-child-matrix-group:not(.athletes-lists-th-child-matrix-group--banner):focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    #athletes-lists-table thead th.athletes-lists-th-child-sublist[data-ath-list-child-id],
    #athletes-lists-table thead th[data-ath-list-nested-direct] {
      cursor: pointer;
    }
    #athletes-lists-table thead th.athletes-lists-th-child-sublist[data-ath-list-child-id]:hover,
    #athletes-lists-table thead th[data-ath-list-nested-direct]:hover {
      filter: brightness(1.04);
    }
    #athletes-lists-table thead th.athletes-lists-th-child-sublist[data-ath-list-child-id]:focus-visible,
    #athletes-lists-table thead th[data-ath-list-nested-direct]:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    #athletes-lists-table
      thead
      th.athletes-lists-th-child-sublist[data-ath-list-child-id]
      .athletes-lists-th-child-sublist-tag,
    #athletes-lists-table thead th[data-ath-list-nested-direct] .athletes-lists-th-child-sublist-tag {
      cursor: pointer;
    }
    #athletes-lists-table
      thead
      tr[data-ath-list-child-matrix]
      th.athletes-lists-th-child-matrix-group
      ~ th.athletes-lists-th-child-matrix-group {
      border-left: 2px solid var(--ath-list-matrix-border-strong);
    }
    #athletes-lists-table thead th.athletes-lists-matrix-edge-start,
    #athletes-lists-table tbody td.athletes-lists-matrix-edge-start {
      border-left: 2px solid var(--ath-list-matrix-border-strong);
    }
    #athletes-lists-table thead th.athletes-lists-matrix-edge-end,
    #athletes-lists-table tbody td.athletes-lists-matrix-edge-end {
      border-right: 2px solid var(--ath-list-matrix-border-strong);
    }
    #athletes-lists-table
      thead
      tr.athletes-lists-matrix-header-row
      th.athletes-lists-matrix-col-group-start,
    #athletes-lists-table tbody td.athletes-lists-matrix-col-group-start {
      border-left: 2px solid var(--ath-list-matrix-border-strong);
    }
    #athletes-lists-table
      thead
      th.athletes-lists-th-child-matrix-group--banner {
      font-size: 0.82rem;
      font-weight: 700;
      letter-spacing: 0.01em;
      padding: 0.4rem 0.5rem;
      border-bottom: 1px solid var(--border);
      background: var(--ath-list-matrix-bg-banner);
      white-space: normal;
      cursor: pointer;
    }
    #athletes-lists-table thead th.athletes-lists-th-child-matrix-group--banner:hover {
      filter: brightness(1.03);
    }
    #athletes-lists-table thead th.athletes-lists-th-child-matrix-group--banner:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    #athletes-lists-table thead tr.athletes-lists-matrix-parent-nav-row th.athletes-lists-matrix-parent-nav-pad {
      padding: 0.2rem 0.35rem;
      font-size: 0.72rem;
      font-weight: 500;
      color: var(--muted);
      background: var(--panel-bg, var(--bg));
      border-bottom: 1px solid var(--border);
      vertical-align: middle;
    }
    #athletes-lists-table thead tr.athletes-lists-matrix-parent-nav-row th.athletes-lists-matrix-parent-nav {
      text-align: center;
      font-size: 0.78rem;
      font-weight: 600;
      line-height: 1.25;
      padding: 0.28rem 0.45rem;
      color: var(--text);
      background: color-mix(in srgb, var(--accent) 7%, var(--panel));
      border-bottom: 1px solid var(--border);
      vertical-align: middle;
      cursor: pointer;
    }
    #athletes-lists-table thead tr.athletes-lists-matrix-parent-nav-row th.athletes-lists-matrix-parent-nav:hover {
      filter: brightness(1.04);
    }
    #athletes-lists-table thead tr.athletes-lists-matrix-parent-nav-row th.athletes-lists-matrix-parent-nav:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    #athletes-lists-table thead th[data-ath-list-direct-member-stub] {
      padding: 0.28rem 0.3rem;
      min-width: 3rem;
      max-width: 5.5rem;
      border-right: 1px solid var(--border);
      background: var(--ath-list-matrix-bg-banner);
      vertical-align: bottom;
    }
    #athletes-lists-table
      thead
      tr.athletes-lists-matrix-header-row[data-ath-list-matrix-depth="1"]
      > th:not([data-ath-list-direct-member-stub]) {
      background: var(--ath-list-matrix-row-1);
    }
    #athletes-lists-table
      thead
      tr.athletes-lists-matrix-header-row[data-ath-list-matrix-depth="2"]
      > th:not([data-ath-list-direct-member-stub]) {
      background: var(--ath-list-matrix-row-2);
    }
    #athletes-lists-table
      thead
      tr.athletes-lists-matrix-header-row[data-ath-list-matrix-depth="3"]
      > th:not([data-ath-list-direct-member-stub]) {
      background: var(--ath-list-matrix-row-3);
    }
    #athletes-lists-table
      thead
      tr.athletes-lists-matrix-header-row[data-ath-list-matrix-depth="4"]
      > th:not([data-ath-list-direct-member-stub]) {
      background: var(--ath-list-matrix-row-4);
    }
    #athletes-lists-table
      thead
      tr.athletes-lists-matrix-header-row[data-ath-list-matrix-depth="5"]
      > th:not([data-ath-list-direct-member-stub]) {
      background: var(--ath-list-matrix-row-5);
    }
    #athletes-lists-table
      thead
      tr.athletes-lists-matrix-header-row[data-ath-list-matrix-depth="6"]
      > th:not([data-ath-list-direct-member-stub]) {
      background: var(--ath-list-matrix-row-6);
    }
    #athletes-lists-table
      thead
      tr.athletes-lists-matrix-header-row[data-ath-list-matrix-depth="7"]
      > th:not([data-ath-list-direct-member-stub]) {
      background: var(--ath-list-matrix-row-7);
    }
    #athletes-lists-table
      thead
      tr.athletes-lists-matrix-header-row[data-ath-list-matrix-depth="8"]
      > th:not([data-ath-list-direct-member-stub]) {
      background: var(--ath-list-matrix-row-8);
    }
    #athletes-lists-table
      thead
      tr.athletes-lists-matrix-header-row[data-ath-list-matrix-depth="9"]
      > th:not([data-ath-list-direct-member-stub]) {
      background: var(--ath-list-matrix-row-9);
    }
    #athletes-lists-table
      thead
      tr.athletes-lists-matrix-header-row[data-ath-list-matrix-depth="10"]
      > th:not([data-ath-list-direct-member-stub]) {
      background: var(--ath-list-matrix-row-10);
    }
    .athletes-lists-td-child-member {
      text-align: center;
      vertical-align: middle;
      padding: 0.35rem 0.25rem;
    }
    #athletes-lists-table thead th.athletes-lists-th-direct-member {
      text-align: center;
      font-weight: 600;
      font-size: 0.78rem;
      max-width: 5.5rem;
      min-width: 3rem;
      vertical-align: middle;
      line-height: 1.2;
    }
    #athletes-lists-table thead th.athletes-lists-th-nested-direct-member {
      font-size: 0.7rem;
      max-width: 4.25rem;
      min-width: 2.75rem;
    }
    /** Left edge of this-list / nested direct columns (same stroke as matrix ``edge-start``). */
    #athletes-lists-table thead th.athletes-lists-th-direct-member.athletes-lists-th-child-sublist,
    #athletes-lists-table tbody td.athletes-lists-td-direct-member {
      border-left: 2px solid var(--ath-list-matrix-border-strong);
    }
    .athletes-lists-td-direct-member {
      text-align: center;
      vertical-align: middle;
      padding: 0.35rem 0.25rem;
    }
    .athletes-lists-child-membership-save-wrap {
      display: flex;
      justify-content: flex-start;
      align-items: center;
      gap: 0.45rem;
      flex-wrap: wrap;
      margin: 0.4rem 0 0.15rem;
      min-height: 2.35rem;
    }
    /* display:flex on this class can override UA [hidden] (same specificity). */
    .athletes-lists-child-membership-save-wrap[hidden] {
      display: none !important;
    }
    .athletes-lists-child-membership-save-btn {
      display: inline-flex;
      flex-direction: row;
      align-items: center;
      gap: 0.35rem;
      padding: 0.35rem 0.55rem;
      min-height: 2.35rem;
    }
    .athletes-lists-child-membership-save-btn-icon {
      display: inline-flex;
      flex-shrink: 0;
      align-items: center;
      justify-content: center;
      line-height: 0;
    }
    .athletes-lists-child-membership-save-btn-icon svg {
      display: block;
    }
    .athletes-lists-child-membership-save-btn-label {
      font-size: 0.82rem;
      font-weight: 600;
      white-space: nowrap;
    }
    .athletes-lists-child-membership-reset-btn {
      font-size: 0.78rem;
      padding: 0.2rem 0.4rem;
      color: var(--muted);
      background: transparent;
      border: 1px solid transparent;
      border-radius: 6px;
      cursor: pointer;
      font: inherit;
    }
    .athletes-lists-child-membership-reset-btn:hover:not(:disabled) {
      color: var(--text);
      border-color: color-mix(in srgb, var(--border) 72%, transparent);
      background: color-mix(in srgb, var(--panel) 92%, var(--border) 8%);
    }
    .athletes-lists-child-membership-reset-btn:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .athletes-lists-child-membership-reset-btn:disabled {
      opacity: 0.32;
      cursor: default;
    }
    .athletes-lists-child-checkbox-label {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin: 0;
      cursor: pointer;
      padding: 0.12rem;
      border-radius: 4px;
    }
    .athletes-lists-child-checkbox-label:has(
        input.athletes-lists-child-checkbox--dirty:not(:disabled)
      ) {
      background: color-mix(in srgb, var(--warn, #b45309) 14%, var(--panel));
      outline: 1px solid color-mix(in srgb, var(--warn, #b45309) 42%, var(--border));
    }
    input.athletes-lists-child-checkbox {
      width: 1rem;
      height: 1rem;
      margin: 0;
      flex-shrink: 0;
      accent-color: var(--ok);
      cursor: pointer;
    }
    input.athletes-lists-child-checkbox:disabled {
      cursor: default;
      opacity: 0.55;
    }
    input.athletes-lists-child-checkbox--dirty:not(:disabled) {
      accent-color: var(--warn, #b45309);
    }
    .athletes-lists-owner-row {
      display: flex;
      flex-wrap: wrap;
      align-items: baseline;
      gap: 0.35rem 0.65rem;
      font-size: 0.9rem;
    }
    .athletes-lists-owner-label {
      color: var(--muted);
      font-size: 0.88rem;
    }
    .athletes-lists-owner-display {
      font-weight: 500;
    }
    .athletes-lists-owner-display[title] {
      cursor: help;
    }
    .athletes-lists-shared-label {
      font-size: 0.88rem;
      color: var(--muted);
    }
    .athletes-lists-shared-users,
    .athletes-lists-shared-groups-list {
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
      max-width: 36rem;
    }
    .athletes-lists-share-acl-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.4rem 0.65rem;
      padding: 0.35rem 0.5rem;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--panel);
      font-size: 0.88rem;
    }
    .athletes-lists-share-acl-row-self {
      border-style: dashed;
    }
    .athletes-lists-share-acl-row-main {
      flex: 1 1 10rem;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 0.1rem;
    }
    .athletes-lists-share-acl-row-main[title] {
      cursor: help;
    }
    .athletes-lists-share-acl-row-name {
      font-weight: 500;
    }
    .athletes-lists-share-acl-row-sub {
      font-size: 0.82rem;
      color: var(--muted);
    }
    .athletes-lists-share-acl-role {
      font-size: 0.86rem;
      padding: 0.25rem 0.4rem;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: var(--panel);
      color: var(--text);
      min-width: 9rem;
    }
    .athletes-lists-share-acl-role-fixed {
      display: inline-block;
      min-width: 9rem;
      font-size: 0.86rem;
      padding: 0.25rem 0;
      box-sizing: border-box;
    }
    .athletes-lists-share-acl-remove {
      border: none;
      background: transparent;
      padding: 0.15rem 0.35rem;
      margin: 0;
      cursor: pointer;
      color: var(--muted);
      font-size: 1.1rem;
      line-height: 1;
    }
    .athletes-lists-share-acl-remove:hover {
      color: var(--text);
    }
    .athletes-lists-share-search-row label {
      display: block;
      font-size: 0.88rem;
      margin-bottom: 0.2rem;
    }
    .athletes-lists-share-search-controls {
      display: flex;
      flex-wrap: wrap;
      gap: 0.4rem;
      align-items: center;
    }
    .athletes-lists-share-search-controls input[type="search"] {
      flex: 1 1 12rem;
      min-width: 0;
      max-width: 22rem;
    }
    .athletes-lists-share-results {
      list-style: none;
      margin: 0.35rem 0 0;
      padding: 0;
      display: flex;
      flex-direction: column;
      gap: 0.3rem;
      max-width: 36rem;
    }
    .athletes-lists-share-result-li {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 0.4rem 0.75rem;
      padding: 0.35rem 0.5rem;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--panel);
    }
    .athletes-lists-share-result-info {
      display: flex;
      flex-wrap: wrap;
      align-items: baseline;
      gap: 0.25rem 0.5rem;
      min-width: 0;
    }
    .athletes-lists-share-result-name {
      font-weight: 500;
    }
    .athletes-lists-share-result-email {
      font-size: 0.86rem;
      color: var(--muted);
    }
    .athletes-lists-share-result-empty {
      padding: 0.35rem 0;
    }
    .athletes-lists-shared-groups-wrap {
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
      margin-top: 0.35rem;
      max-width: 36rem;
    }
    .athletes-lists-shared-groups-wrap label,
    .athletes-lists-add-group-label {
      font-size: 0.88rem;
      color: var(--muted);
    }
    .athletes-lists-add-shared-group {
      width: 100%;
      max-width: 22rem;
      font-size: 0.88rem;
      padding: 0.35rem 0.45rem;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--panel);
      color: var(--text);
    }
    .athletes-lists-share-groups-hint {
      margin: 0;
      font-size: 0.82rem;
    }
    .athletes-lists-shared-row[hidden] {
      display: none !important;
    }
    .athletes-lists-th-comment {
      min-width: 7rem;
      max-width: 14rem;
    }
    .athletes-lists-comment-cell {
      max-width: 20rem;
      font-size: 0.88rem;
      color: var(--muted);
      vertical-align: middle;
      white-space: pre-line;
      word-break: break-word;
      line-height: 1.35;
      max-height: 6rem;
      overflow-y: auto;
    }
    #athletes-lists-table tbody .athletes-lists-comment-cell-list-label {
      display: inline;
      font-style: italic;
      font-weight: 600;
      font-size: 0.84rem;
      letter-spacing: 0.02em;
      color: var(--text);
    }
    .athletes-lists-comment-dialog {
      max-width: min(32rem, 100vw - 2rem);
      width: 100%;
      padding: 0;
      border: 1px solid var(--border);
      border-radius: 0.5rem;
      background: var(--panel);
      color: var(--text);
      box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.2);
    }
    .athletes-lists-comment-dialog::backdrop {
      background: rgba(0, 0, 0, 0.35);
    }
    .athletes-lists-comment-dialog-inner {
      padding: 1rem 1.1rem;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }
    .athletes-lists-comment-dialog-title {
      margin: 0;
      font-size: 1rem;
      font-weight: 600;
    }
    .athletes-lists-comment-label {
      font-size: 0.86rem;
      color: var(--muted);
    }
    .athletes-lists-comment-textarea {
      width: 100%;
      min-height: 6rem;
      resize: vertical;
      font: inherit;
      padding: 0.45rem 0.55rem;
      border: 1px solid var(--border);
      border-radius: 0.35rem;
      background: var(--bg);
      color: var(--text);
      box-sizing: border-box;
    }
    .athletes-favorites-to-list-dialog .athletes-favorites-to-list-tree {
      max-height: min(36vh, 16rem);
      overflow: auto;
      padding: 0.35rem 0.5rem 0.65rem;
      border: 1px solid var(--border);
      border-radius: 0.35rem;
      background: var(--bg);
      box-sizing: border-box;
    }
    /**
     * ``<dialog>`` is ``display: none`` when closed. Do not set ``display`` on
     * ``.athletes-favorites-to-list-dialog`` without ``[open]`` or the overlay
     * stays visible in the page (flex overrides the closed state).
     */
    .athletes-favorites-to-list-dialog[open] {
      display: flex;
      flex-direction: column;
      min-height: 0;
      max-width: min(40rem, 100vw - 2rem);
      width: 100%;
      max-height: min(86vh, 50rem);
      padding: 0;
      border: 1px solid var(--border);
      border-radius: 12px;
      background: var(--panel);
      color: var(--text);
      box-shadow: 0 16px 48px rgba(15, 23, 42, 0.22);
    }
    .athletes-favorites-to-list-dialog::backdrop {
      background: rgba(15, 23, 42, 0.4);
    }
    .athletes-favorites-to-list-dialog-inner {
      display: flex;
      flex-direction: column;
      flex: 1 1 auto;
      min-height: 0;
      max-height: min(86vh, 50rem);
      overflow: hidden;
      width: 100%;
      box-sizing: border-box;
      padding: 0 0.68rem 0;
    }
    .athletes-favorites-to-list-dialog .athletes-favorites-to-list-dialog-title {
      flex-shrink: 0;
      margin: 0.58rem 0 0.28rem;
      font-size: 0.94rem;
      font-weight: 600;
      line-height: 1.25;
      color: var(--text);
    }
    .athletes-favorites-to-list-controls {
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
      padding-bottom: 0.45rem;
    }
    .athletes-favorites-to-list-dialog .athletes-favorites-to-list-scroll {
      flex: 1 1 0;
      min-height: 10rem;
      max-height: none;
      border-top: 1px solid var(--border);
      margin: 0;
    }
    .athletes-favorites-to-list-roster-count {
      flex-shrink: 0;
      margin: 0.35rem 0 0;
      font-size: 0.82rem;
      color: var(--muted);
      min-height: 1.1rem;
    }
    .athletes-favorites-to-list-err {
      flex-shrink: 0;
      margin: 0.4rem 0 0;
    }
    .athletes-favorites-to-list-scroll .athletes-favorites-to-list-name-list.admin-athlete-list-athletes-compact-list {
      margin: 0;
      max-height: none;
      overflow: visible;
    }
    .athletes-favorites-to-list-name-list li.is-loading {
      padding: 0.18rem 0.1rem;
      font-size: 0.82rem;
      color: var(--muted);
    }
    .athletes-favorites-to-list-name-list .admin-athlete-list-athletes-item.is-in-list {
      opacity: 0.88;
    }
    .athletes-favorites-to-list-name-list .admin-athlete-list-athletes-item.is-in-list .admin-athlete-list-athletes-open-detail.admin-athlete-list-athletes-item-name,
    .athletes-favorites-to-list-name-list .admin-athlete-list-athletes-item.is-in-list .admin-athlete-list-athletes-item-meta {
      color: var(--muted);
    }
    .athletes-favorites-to-list-name-list .admin-athlete-list-athletes-item.is-in-list .admin-athlete-list-athletes-open-detail.admin-athlete-list-athletes-item-name {
      opacity: 1;
    }
    .athletes-favorites-to-list-dialog-footer.results-dialog-footer-actions {
      margin-top: 0;
    }
    .athletes-lists-comment-dialog-actions {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 0.45rem;
      margin-top: 0.35rem;
    }
    .athletes-lists-th-actions {
      position: relative;
      width: 4.75rem;
      text-align: center;
      vertical-align: middle;
    }
    .athletes-lists-th-actions-label {
      display: block;
      font-size: 0.72rem;
      font-weight: 600;
      line-height: 1.2;
      color: var(--table-header-text, var(--muted));
      opacity: 0.92;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .athletes-lists-cell-actions {
      text-align: center;
      vertical-align: middle;
      white-space: nowrap;
    }
    .athletes-lists-cell-actions-inner {
      display: inline-flex;
      flex-wrap: nowrap;
      align-items: center;
      justify-content: center;
      gap: 0.2rem;
    }
    .athletes-lists-th-actions[hidden],
    .athletes-lists-cell-actions[hidden] {
      display: none !important;
    }
    .athletes-lists-custom-add-wrap {
      margin-top: 0.8rem;
      display: flex;
      flex-wrap: wrap;
      align-items: flex-end;
      gap: 0.5rem;
    }
    .athletes-lists-custom-add-title {
      width: 100%;
      margin: 0.1rem 0 0;
      font-size: 0.97rem;
      font-weight: 600;
    }
    .athletes-lists-custom-add-hint {
      width: 100%;
      margin: 0 0 0.15rem;
    }
    .athletes-lists-custom-add-field {
      display: flex;
      flex-direction: column;
      gap: 0.2rem;
      min-width: 10rem;
    }
    .athletes-lists-custom-add-field--year {
      min-width: 7rem;
      max-width: 8rem;
    }
    .athletes-lists-custom-add-field input {
      width: 100%;
    }
    .athletes-lists-custom-add-btn {
      padding: 0.28rem 0.58rem;
      font-size: 0.82rem;
      line-height: 1.15;
      min-height: 1.8rem;
      border-radius: 0.42rem;
    }
    .athletes-lists-custom-add-msg {
      margin: 0.28rem 0 0.45rem;
      width: 100%;
    }
    .athletes-candidate-row {
      display: flex;
      flex-wrap: wrap;
      gap: 0.45rem 0.65rem;
      align-items: flex-start;
    }
    .athletes-candidate-row .athletes-candidate-remove-list {
      flex: 0 0 auto;
      align-self: center;
    }
    .athletes-candidate-row button.athletes-candidate-list-action--pending {
      cursor: wait;
      opacity: 0.88;
    }
    .athletes-candidate-row .athletes-candidate-hit {
      flex: 1 1 12rem;
      min-width: 0;
    }
    .athletes-favorites-heading {
      margin: 0 0 0.4rem;
    }
    .athletes-favorites-table-scroll {
      overflow-x: auto;
      max-width: 100%;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: var(--panel);
    }

    html.athletes-lists-marquee-dragging {
      user-select: none;
      -webkit-user-select: none;
    }

    .athletes-lists-checkbox-marquee-overlay {
      position: fixed;
      z-index: 10000;
      pointer-events: none;
      box-sizing: border-box;
      border: 1px solid var(--accent);
      border-radius: 2px;
      background: rgba(37, 99, 235, 0.16);
      background: color-mix(in srgb, var(--accent) 18%, transparent);
    }

    .athletes-lists-checkbox-marquee-overlay--uncheck {
      border-color: #dc2626;
      background: rgba(220, 38, 38, 0.14);
    }
    .athletes-favorites-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.92rem;
      border: none;
      border-radius: 0;
      background: transparent;
      overflow: visible;
    }
    .athletes-favorites-table th,
    .athletes-favorites-table td {
      padding: 0.45rem 0.65rem;
      text-align: left;
      border-bottom: 1px solid var(--border);
      vertical-align: middle;
    }
    .athletes-favorites-table thead th {
      background: var(--table-header);
      color: var(--table-header-text);
      font-weight: 600;
      font-size: inherit;
      text-transform: none;
      letter-spacing: normal;
    }
    .athletes-favorites-table thead th:has(> .admin-th-sort) {
      padding: 0.35rem 0.45rem;
      vertical-align: middle;
    }
    .athletes-favorites-table thead th:has(.admin-th-sort[data-ath-fav-sort="name"]),
    .athletes-favorites-table thead th:has(.admin-th-sort[data-ath-list-sort="name"]),
    .athletes-favorites-table td.athletes-fav-name-cell {
      min-width: 16rem;
    }
    .athletes-favorites-table tbody tr:last-child td {
      border-bottom: none;
    }
    .athletes-favorites-table tbody tr:hover td {
      background: var(--row-hover);
    }
    .athletes-favorites-table tbody tr.athletes-lists-row-custom td {
      color: var(--text-muted, #64748b);
    }
    /* Flex lives on inner div — not on td (preserves table column layout). */
    .athletes-fav-name-inner {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      min-width: 0;
      width: 100%;
    }
    .athletes-fav-name-cell {
      position: relative;
      cursor: pointer;
    }
    .athletes-favorite-name-label {
      min-width: 0;
      overflow-wrap: anywhere;
    }
    .athletes-list-remove-inline {
      margin-left: auto;
      transform: scale(0.88);
      transform-origin: right center;
    }
    .athletes-fav-country-cell {
      vertical-align: top;
    }
    .athletes-fav-country-line {
      line-height: 1.4;
    }
    .athletes-fav-country-line + .athletes-fav-country-line {
      margin-top: 0.3rem;
    }
    .athletes-fav-country-line-src,
    a.athletes-fav-country-line-src,
    a.athletes-fav-country-line-src:visited {
      color: var(--muted);
      font-weight: 600;
      font-size: 0.82em;
      text-decoration: none;
    }
    a.athletes-fav-country-line-src:hover,
    a.athletes-fav-country-line-src:focus-visible {
      color: var(--muted);
      text-decoration: none;
    }
    .athletes-fav-country-line-val {
      font-weight: 400;
    }
    .athletes-fav-star.athlete-favorite-star-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      padding: 0.12rem;
      margin: 0;
      border-radius: 6px;
      line-height: 0;
    }
    .athletes-fav-star.athlete-favorite-star-btn svg {
      width: 1.15rem;
      height: 1.15rem;
      display: block;
    }
    .athletes-detail-name-value {
      display: flex;
      align-items: center;
      gap: 0.45rem;
      flex-wrap: wrap;
    }
    a.athletes-favorite-open.athletes-favorite-open-icon {
      position: absolute;
      top: 0.08rem;
      right: 0.08rem;
      z-index: 2;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: var(--muted);
      text-decoration: none;
      line-height: 0;
      border-radius: 4px;
      padding: 0.1rem;
      background: var(--panel-bg, rgba(255, 255, 255, 0.82));
      box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
    }
    a.athletes-favorite-open.athletes-favorite-open-icon:hover {
      color: var(--text);
      background: rgba(37, 99, 235, 0.08);
    }
    a.athletes-favorite-open.athletes-favorite-open-icon:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 1px;
    }
    .athletes-subtabs {
      display: flex;
      gap: 0.25rem;
      margin-bottom: 0.85rem;
      border-bottom: 1px solid var(--border);
      padding-bottom: 0;
    }
    .athletes-subtabs button,
    .athletes-subtabs a.athletes-subtab-link {
      font: inherit;
      padding: 0.45rem 0.85rem 0.55rem;
      border: none;
      border-bottom: 3px solid transparent;
      border-radius: 8px 8px 0 0;
      background: transparent;
      color: var(--muted);
      cursor: pointer;
      font-weight: 500;
      margin-bottom: -1px;
      box-shadow: none;
    }
    .athletes-subtabs a.athletes-subtab-link {
      text-decoration: none;
      display: inline-block;
      box-sizing: border-box;
    }
    .athletes-subtabs button:hover:not(:disabled),
    .athletes-subtabs a.athletes-subtab-link:hover {
      color: var(--text);
      background: var(--panel-muted);
    }
    .athletes-subtabs button[aria-selected="true"],
    .athletes-subtabs a.athletes-subtab-link[aria-selected="true"] {
      color: var(--accent);
      border-bottom-color: var(--accent);
      background: var(--panel);
    }
    .athletes-subtabs button:disabled {
      opacity: 0.45;
      cursor: not-allowed;
    }
    .athletes-subpanel[hidden] {
      display: none !important;
    }
    .athletes-events-toolbar-wrap {
      margin-bottom: 0.75rem;
    }
    .athletes-events-toolbar-wrap .athletes-events-toolbar {
      margin-bottom: 0.35rem;
    }
    .athletes-events-toolbar {
      margin-bottom: 0;
    }
    .athletes-events-toolbar-lists {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-end;
      gap: 0.65rem 1rem;
    }
    .athletes-events-toolbar-meta-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: flex-start;
      gap: 0.5rem 0.75rem;
    }
    .athletes-events-matrix-meta-refresh {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      flex-wrap: wrap;
      min-width: 0;
    }
    .athletes-events-matrix-data-meta {
      flex: 0 1 auto;
      min-width: 0;
      margin: 0;
      line-height: 1.35;
      font-size: 0.75rem;
    }
    .athletes-events-matrix-mode-row {
      display: inline-flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.45rem;
      max-width: 100%;
    }
    .athletes-events-matrix-mode {
      display: inline-flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0;
      border-radius: 8px;
      border: 1px solid var(--border);
      overflow: hidden;
      background: var(--panel-muted, rgba(148, 163, 184, 0.12));
    }
    .athletes-events-matrix-actions {
      display: inline-flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.35rem;
    }
    .athletes-events-matrix-footer {
      margin: 0.15rem 0 0.5rem;
    }
    .athletes-events-matrix-footer[hidden] {
      display: none !important;
    }
    .athletes-events-matrix-footer button.secondary.athletes-events-export-json-btn {
      font-size: 0.7rem;
      font-weight: 500;
      padding: 0.2rem 0.44rem;
      line-height: 1.2;
      border-radius: 8px;
      min-height: 1.85rem;
      color: var(--text);
      border-color: var(--border);
      background: var(--panel);
    }
    .athletes-events-json-dump-wrap {
      margin: 0 0 0.65rem;
    }
    .athletes-events-add-open-btn {
      font-size: 0.78rem;
      font-weight: 500;
      padding: 0.42rem 0.65rem;
      white-space: nowrap;
    }
    .athletes-events-add-open-btn[hidden] {
      display: none !important;
    }
    .athletes-events-cups-link-open-btn {
      font-size: 0.78rem;
      font-weight: 500;
      padding: 0.42rem 0.65rem;
      white-space: nowrap;
    }
    .athletes-events-cups-link-open-btn[hidden] {
      display: none !important;
    }
    .athletes-events-links-overview-open-btn[hidden] {
      display: none !important;
    }
    dialog.athletes-events-links-overview-dialog {
      border: none;
      border-radius: 12px;
      padding: 0;
      max-width: min(36rem, calc(100vw - 2rem));
      width: 100%;
      background: var(--panel);
      color: var(--text);
      box-shadow: 0 16px 48px rgba(15, 23, 42, 0.22);
    }
    dialog.athletes-events-links-overview-dialog::backdrop {
      background: rgba(15, 23, 42, 0.4);
    }
    dialog.athletes-events-links-overview-dialog .results-column-dialog-inner {
      display: flex;
      flex-direction: column;
      min-height: 0;
      overflow: hidden;
      padding: 0 0.68rem 0;
      max-height: min(78vh, 40rem);
    }
    .athletes-events-links-overview-empty {
      margin: 0.2rem 0 0.5rem;
    }
    .athletes-events-links-overview-tree {
      display: flex;
      flex-direction: column;
      gap: 0.55rem;
      padding-bottom: 0.35rem;
    }
    .athletes-events-links-overview-list-block {
      border: 1px solid var(--border);
      border-radius: 8px;
      overflow: hidden;
      background: var(--panel-muted, rgba(148, 163, 184, 0.08));
    }
    .athletes-events-links-overview-list-head {
      padding: 0.38rem 0.45rem;
      font-size: 0.78rem;
      font-weight: 650;
      border-bottom: 1px solid var(--border);
      background: var(--panel);
    }
    .athletes-events-links-overview-rows {
      display: flex;
      flex-direction: column;
    }
    .athletes-events-links-overview-row {
      display: flex;
      align-items: flex-start;
      gap: 0.35rem;
      padding: 0.32rem 0.4rem;
      border-bottom: 1px solid var(--border);
      font-size: 0.8rem;
      line-height: 1.35;
      background: var(--panel);
    }
    .athletes-events-links-overview-row:last-child {
      border-bottom: none;
    }
    .athletes-events-links-overview-row--event {
      border-left: 4px solid #2563eb;
      padding-top: 0.22rem;
      padding-bottom: 0.22rem;
    }
    .athletes-events-links-overview-event-line {
      font-size: 0.78rem;
      line-height: 1.28;
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .athletes-events-links-overview-row--cup {
      border-left: 4px solid #a855f7;
    }
    .athletes-events-links-overview-row-main {
      flex: 1 1 auto;
      min-width: 0;
    }
    .athletes-events-links-overview-kind {
      display: inline-block;
      font-size: 0.65rem;
      font-weight: 650;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      margin-right: 0.28rem;
      color: var(--muted);
    }
    .athletes-events-links-overview-row--event .athletes-events-links-overview-kind {
      color: #1d4ed8;
    }
    .athletes-events-links-overview-row--cup .athletes-events-links-overview-kind {
      color: #7e22ce;
    }
    .athletes-events-links-overview-delete {
      flex-shrink: 0;
    }
    .athletes-cups-link-popover {
      position: fixed;
      z-index: 120;
      max-width: min(22rem, calc(100vw - 1.25rem));
      box-sizing: border-box;
      padding: 0;
      margin: 0;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: var(--panel);
      box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
    }
    .athletes-cups-link-popover[hidden] {
      display: none !important;
    }
    .athletes-cups-link-popover-inner {
      padding: 0.75rem 0.85rem 0.65rem;
      display: flex;
      flex-direction: column;
      gap: 0.55rem;
      min-width: 0;
    }
    .athletes-cups-link-popover-title {
      margin: 0;
      font-size: 0.95rem;
      font-weight: 650;
      line-height: 1.25;
    }
    .athletes-cups-link-popover-fields {
      display: flex;
      flex-direction: column;
      gap: 0.45rem;
    }
    .athletes-cups-link-events-block {
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
      max-height: 11rem;
      overflow: auto;
      padding: 0.15rem 0;
    }
    .athletes-cups-link-events-intro {
      margin: 0;
      font-size: 0.78rem;
      line-height: 1.35;
    }
    .athletes-cups-link-events-checkboxes {
      display: flex;
      flex-direction: column;
      gap: 0.3rem;
      font-size: 0.8rem;
    }
    .athletes-cups-link-events-checkboxes label {
      display: flex;
      align-items: flex-start;
      gap: 0.4rem;
      cursor: pointer;
      line-height: 1.35;
    }
    .athletes-cups-link-events-checkboxes input {
      margin-top: 0.15rem;
      flex-shrink: 0;
    }
    .athletes-cups-link-popover-footer {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 0.4rem;
      padding-top: 0.15rem;
    }
    .athletes-events-matrix-mode-btn {
      margin: 0;
      border: none;
      border-radius: 0;
      box-shadow: none;
      font-size: 0.78rem;
      font-weight: 500;
      padding: 0.42rem 0.65rem;
      background: transparent;
      color: var(--text-muted, #64748b);
    }
    .athletes-events-matrix-mode-btn + .athletes-events-matrix-mode-btn {
      border-left: 1px solid var(--border);
    }
    .athletes-events-matrix-mode-btn:hover {
      background: rgba(99, 102, 241, 0.08);
      color: var(--text);
    }
    .athletes-events-matrix-mode-btn--active {
      position: relative;
      z-index: 1;
      background: var(--panel);
      color: var(--text);
      font-weight: 700;
      box-shadow: inset 0 0 0 2px var(--accent, #2563eb);
    }
    .athletes-events-matrix-mode-btn--active:hover {
      background: var(--panel);
      color: var(--text);
      box-shadow: inset 0 0 0 2px var(--accent, #2563eb);
    }
    .athletes-events-list-select-with-settings {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      max-width: 100%;
    }
    .athletes-events-list-select-with-settings .athletes-events-list-select {
      flex: 1 1 auto;
      min-width: 0;
    }
    a.athletes-events-list-settings-link {
      flex-shrink: 0;
      text-decoration: none;
      box-sizing: border-box;
    }
    /** Match `button.secondary` + gear stroke so the link reuses the lists settings icon look. */
    a.athletes-events-list-settings-link.secondary,
    a.athletes-events-list-settings-link.secondary:visited {
      cursor: pointer;
      font: inherit;
      font-weight: 500;
      background: var(--panel-muted);
      border: 1px solid var(--border);
      color: var(--text);
      border-radius: 8px;
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    }
    a.athletes-events-list-settings-link.secondary:hover {
      background: var(--panel);
      border-color: var(--accent);
      color: var(--accent);
    }
    a.athletes-events-list-settings-link.secondary:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 1px;
    }
    a.athletes-events-list-settings-link[hidden] {
      display: none !important;
    }
    .athletes-events-list-select {
      min-width: 14rem;
      max-width: 100%;
      font: inherit;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--panel);
      color: var(--text);
      padding: 0.45rem 0.75rem;
    }
    .athletes-events-matrix-favorites-row {
      margin: 0 0 0.45rem;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.5rem;
    }
    .athletes-events-matrix-favorites-row[hidden] {
      display: none !important;
    }
    /** Same metrics as ``.results-table-toolbar button.secondary`` (filter chips). */
    .athletes-events-matrix-favorites-row button.secondary.results-filter-btn {
      font-size: 0.76rem;
      font-weight: 500;
      padding: 0.28rem 0.52rem;
      line-height: 1.25;
      border-radius: 10px;
      min-height: 2.2rem;
    }
    .athletes-events-matrix-favorites-row .results-filter-btn.is-pressed {
      background: rgba(37, 99, 235, 0.14);
      border-color: var(--accent);
      color: var(--text);
    }
    .athletes-events-matrix-wrap {
      overflow: auto;
      max-width: 100%;
      margin-bottom: 0.35rem;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--panel);
    }
    .athletes-events-matrix-athlete-count {
      margin: 0 0 0.75rem;
      line-height: 1.35;
      font-size: 0.75rem;
    }
    .athletes-events-matrix {
      border-collapse: collapse;
      font-size: 0.82rem;
      min-width: 100%;
      /* Sticky col 2 uses ``left:`` this wide; col 1 must stay the same width or a visual gap appears when scrolling. */
      --ath-mx-sticky1-w: 12rem;
    }
    .athletes-events-matrix th,
    .athletes-events-matrix td {
      border: 1px solid var(--border);
      padding: 0.35rem 0.45rem;
      vertical-align: top;
      text-align: left;
      box-sizing: border-box;
    }
    .athletes-events-matrix th {
      position: sticky;
      top: 0;
      background: var(--panel);
      z-index: 1;
      max-width: 9rem;
    }
    .athletes-events-matrix th.cup-rankings-th-event {
      max-width: 11rem;
      vertical-align: top;
      white-space: normal;
    }
    table.athletes-events-matrix thead th.cup-rankings-th-event > .cup-rankings-th-event-stack {
      position: static;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 0;
      width: 100%;
      height: auto;
      margin: 0;
      max-width: none;
    }
    table.athletes-events-matrix thead th.cup-rankings-th-event .athletes-events-th-main {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      gap: 0.22rem;
      width: 100%;
      min-width: 0;
      margin-top: 0;
      padding-bottom: 0;
      flex: 0 0 auto;
    }
    table.athletes-events-matrix thead th.cup-rankings-th-event
      .cup-rankings-th-event-sort
      .cup-rankings-th-event-label-stack {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.14rem;
      width: 100%;
      min-width: 0;
      white-space: normal;
      overflow-wrap: anywhere;
      word-break: break-word;
      line-height: 1.25;
      text-align: center;
    }
    table.athletes-events-matrix thead th.cup-rankings-th-event .cup-rankings-th-event-disc,
    table.athletes-events-matrix thead th.cup-rankings-th-event .cup-rankings-th-event-cup-title {
      display: block;
      max-width: 100%;
      white-space: normal;
      overflow-wrap: anywhere;
      word-break: break-word;
    }
    /** Cup columns omit ``.admin-th-sort``; same header palette as events, a touch darker. */
    table.athletes-events-matrix thead th.cup-rankings-th-event {
      background: color-mix(in srgb, var(--table-header) 91%, black 9%);
      color: var(--table-header-text);
      font-weight: 600;
    }
    .athletes-events-matrix td.athletes-events-matrix-td-cup {
      text-align: center;
      white-space: nowrap;
      color: var(--text-muted, #64748b);
      font-variant-numeric: tabular-nums;
    }
    /** Separator between event columns and linked cup columns (matrix has events then cups). */
    table.athletes-events-matrix th.athletes-events-matrix-col-after-events,
    table.athletes-events-matrix td.athletes-events-matrix-col-after-events {
      border-left: 2px solid color-mix(in srgb, var(--border), var(--text) 22%);
    }
    .athletes-events-matrix thead th:has(.admin-th-sort) {
      padding: 0.32rem 0.45rem;
      vertical-align: middle;
      background: var(--table-header);
      color: var(--table-header-text);
      font-weight: 600;
    }
    .athletes-events-matrix thead th:nth-child(1):has(.admin-th-sort),
    .athletes-events-matrix thead th:nth-child(2):has(.admin-th-sort) {
      background: var(--table-header);
      color: var(--table-header-text);
    }
    .athletes-events-matrix thead th:has(.admin-th-sort[data-ath-events-matrix-sort="born"]) {
      text-align: center;
    }
    .athletes-events-matrix
      thead
      th
      .admin-th-sort[data-ath-events-matrix-sort="born"] {
      justify-content: center;
      width: 100%;
    }
    table.athletes-events-matrix thead th.cup-rankings-th-event .admin-th-sort.athletes-events-matrix-th-ev-sort {
      align-items: center;
      justify-content: center;
      flex-wrap: nowrap;
      white-space: nowrap;
      width: auto;
      min-width: 0;
      box-sizing: border-box;
      margin-top: 0.08rem;
      padding: 0.12rem 0.28rem;
      align-self: center;
    }
    .athletes-events-matrix .athletes-events-th-event-location {
      font-size: 0.68rem;
      font-weight: 500;
      line-height: 1.3;
      color: var(--muted-fg, #64748b);
      max-width: 100%;
      word-break: break-word;
      margin-top: 0.12rem;
    }
    .athletes-events-matrix .athletes-events-th-reg-deadlines {
      margin-top: 0.28rem;
      font-size: 0.62rem;
      line-height: 1.35;
      font-weight: 400;
      text-transform: none;
      letter-spacing: 0;
      color: var(--text-muted, #64748b);
    }
    .athletes-events-matrix a.athletes-events-th-reg-deadlines {
      display: inline-block;
      max-width: 100%;
      text-decoration: none;
      color: inherit;
      cursor: pointer;
      box-sizing: border-box;
    }
    .athletes-events-matrix a.athletes-events-th-reg-deadlines:hover {
      text-decoration: underline;
    }
    .athletes-events-matrix .athletes-events-th-reg-deadlines--active {
      display: block;
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
      margin-top: 0.18rem;
      padding: 0.28rem 0.4rem;
      border-radius: 8px;
      font-size: 0.62rem;
      font-weight: 600;
      line-height: 1.35;
      color: var(--ok, #047857);
      background: rgba(5, 150, 105, 0.14);
      border: 1px solid rgba(5, 150, 105, 0.45);
    }
    .athletes-events-matrix .athletes-events-th-reg-deadlines--inactive {
      opacity: 0.55;
    }
    .athletes-events-matrix .athletes-events-th-reg-deadlines-main {
      word-break: break-word;
    }
    .athletes-events-matrix .athletes-events-th-reg-deadlines-remaining {
      margin-top: 0.14rem;
      font-size: 0.58rem;
      font-weight: 500;
      line-height: 1.3;
      color: var(--text-muted, #64748b);
      word-break: break-word;
    }
    .athletes-events-matrix
      .athletes-events-th-reg-deadlines--active
      .athletes-events-th-reg-deadlines-remaining {
      color: var(--ok, #047857);
    }
    .athletes-events-matrix th:nth-child(1),
    .athletes-events-matrix td:nth-child(1) {
      position: sticky;
      left: 0;
      background: var(--panel);
      width: var(--ath-mx-sticky1-w);
      min-width: var(--ath-mx-sticky1-w);
      max-width: var(--ath-mx-sticky1-w);
      box-shadow: 1px 0 0 var(--border);
    }
    .athletes-events-matrix td.athletes-events-matrix-td-name {
      position: relative;
    }
    .athletes-events-matrix td:nth-child(1) {
      word-break: break-word;
      overflow-wrap: anywhere;
    }
    .athletes-events-matrix-name-inner {
      display: flex;
      align-items: center;
      gap: 0.38rem;
      min-width: 0;
      width: 100%;
    }
    .athletes-events-matrix-name-label {
      min-width: 0;
      overflow-wrap: anywhere;
    }
    .athletes-events-matrix-td-name--interactive {
      cursor: pointer;
      padding-right: 1.15rem;
    }
    .athletes-events-matrix th:nth-child(2),
    .athletes-events-matrix td:nth-child(2) {
      position: sticky;
      left: var(--ath-mx-sticky1-w);
      background: var(--panel);
      max-width: 5.5rem;
      min-width: 3.25rem;
      box-shadow:
        1px 0 0 var(--border),
        4px 0 10px -4px rgba(15, 23, 42, 0.1);
      text-align: center;
      font-variant-numeric: tabular-nums;
    }
    /* Corner + horizontal scroll: header cells above body stickies; body stickies above scrolling event cells. */
    .athletes-events-matrix thead th:nth-child(1) {
      z-index: 6;
    }
    .athletes-events-matrix thead th:nth-child(2) {
      z-index: 5;
    }
    .athletes-events-matrix tbody td:nth-child(1) {
      z-index: 2;
    }
    .athletes-events-matrix tbody td:nth-child(2) {
      z-index: 3;
    }
    .athletes-events-matrix tbody td.athletes-events-cell {
      position: relative;
      z-index: 0;
    }
    .athletes-events-matrix .athletes-events-cell {
      cursor: pointer;
      white-space: normal;
      word-break: break-word;
    }
    .athletes-events-matrix tbody tr.athletes-events-matrix-row-custom td {
      color: var(--text-muted, #64748b);
    }
    .athletes-events-matrix tbody tr.athletes-events-matrix-row-custom td.athletes-events-cell {
      cursor: default;
    }
    .athletes-events-matrix .athletes-events-custom-missing-license {
      color: var(--text-muted, #64748b);
      font-style: italic;
      opacity: 0.92;
    }
    .athletes-events-matrix .athletes-events-cell.athletes-events-cell--selected {
      outline: 2px solid var(--accent);
      outline-offset: -2px;
      background: color-mix(in srgb, var(--accent) 14%, var(--panel));
    }
    .athletes-events-matrix .athletes-events-cell-inner {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 0.32rem;
      min-width: 0;
    }
    .athletes-events-matrix tbody tr:hover td {
      background: rgba(99, 102, 241, 0.08);
    }
    .athletes-events-matrix
      td.athletes-events-cell.athletes-events-cell--matrix-result-reached-final {
      background: rgba(59, 130, 246, 0.09);
      box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.2);
    }
    .athletes-events-matrix
      tbody
      tr:hover
      td.athletes-events-cell.athletes-events-cell--matrix-result-reached-final {
      background: rgba(59, 130, 246, 0.14);
      box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.25);
    }
    .athletes-events-matrix .athletes-events-reg-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.25rem 0.4rem;
    }
    .athletes-events-matrix .athletes-events-reg-row--irrelevant {
      min-height: 1.1em;
    }
    .athletes-events-matrix .athletes-events-result-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.25rem 0.4rem;
    }
    .athletes-events-matrix .athletes-events-result-att {
      display: inline-flex;
      flex: 0 0 auto;
      flex-wrap: nowrap;
      align-items: center;
      gap: 0.2rem 0.28rem;
      max-width: 100%;
      min-width: 0;
    }
    .athletes-events-matrix .athletes-events-result-att .athletes-events-reg-reason {
      min-width: 0;
      overflow-wrap: anywhere;
    }
    .athletes-events-matrix .athletes-events-result-body {
      display: inline-flex;
      align-items: center;
      gap: 0.2rem;
      flex: 1 1 auto;
      min-width: 0;
      line-height: 1.25;
    }
    .athletes-events-matrix .athletes-events-result-body--multi {
      flex-direction: column;
      align-items: flex-start;
      align-content: flex-start;
      gap: 0.18rem;
      width: 100%;
    }
    .athletes-events-matrix
      .athletes-events-result-body--multi
      .athletes-events-result-line {
      width: 100%;
    }
    .athletes-events-matrix .athletes-events-result-line {
      display: inline-flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 0.2rem;
      min-width: 0;
    }
    .athletes-events-matrix .athletes-events-result-line--speed {
      flex: 1 1 100%;
      width: 100%;
      min-width: 0;
    }
    .athletes-events-matrix .athletes-events-result-rank--with-speed-time {
      display: flex;
      flex: 1 1 auto;
      flex-wrap: wrap;
      align-items: baseline;
      align-content: flex-start;
      justify-content: flex-start;
      column-gap: 0.35rem;
      row-gap: 0.12rem;
      min-width: 0;
      width: 100%;
    }
    .athletes-events-matrix .athletes-events-result-rank-main {
      flex: 1 1 auto;
      /* Prefer one line with time; when rank+category need space, wrap time below. */
      min-width: min(100%, max-content);
      max-width: 100%;
      box-sizing: border-box;
      overflow-wrap: break-word;
      word-break: break-word;
    }
    .athletes-events-matrix .athletes-events-result-speed-time {
      flex: 0 0 auto;
      margin-left: auto;
      text-align: right;
      font-variant-numeric: tabular-nums;
      font-weight: 500;
      font-size: 0.82em;
      opacity: 0.72;
      color: #94a3b8;
    }
    .athletes-events-matrix .athletes-events-result-lines-join {
      font-size: 0.68rem;
      font-weight: 500;
      color: #94a3b8;
      opacity: 0.88;
      align-self: center;
    }
    .athletes-events-matrix
      td.athletes-events-cell--matrix-result-podium
      .athletes-events-result-rank.athletes-events-result-visibility--early,
    .athletes-events-matrix
      td.athletes-events-cell--matrix-result-podium
      .athletes-events-result-rank.athletes-events-result-visibility--mid,
    .athletes-events-matrix
      td.athletes-events-cell--matrix-result-podium
      .athletes-events-result-rank.athletes-events-result-visibility--final {
      opacity: 1;
      font-size: 0.95rem;
      font-weight: 500;
      color: var(--text);
    }
    .athletes-events-matrix
      td.athletes-events-cell--matrix-result-podium
      .athletes-events-medal {
      font-size: 1.22rem;
    }
    .athletes-events-matrix
      td.athletes-events-cell--matrix-result-podium
      .athletes-events-result-category {
      opacity: 0.72;
      font-weight: 500;
    }
    .athletes-events-matrix
      td.athletes-events-cell--matrix-result-podium
      .athletes-events-result-speed-time {
      opacity: 0.88;
      font-weight: 500;
    }
    .athletes-events-matrix .athletes-events-result-rank {
      font-variant-numeric: tabular-nums;
      font-weight: 500;
    }
    .athletes-events-matrix .athletes-events-result-rank.athletes-events-result-visibility--early {
      opacity: 1;
      font-size: 0.84rem;
      font-weight: 500;
      color: var(--text);
    }
    .athletes-events-matrix .athletes-events-result-category {
      font-weight: 500;
      font-size: 0.82em;
      opacity: 0.55;
      color: #94a3b8;
    }
    .athletes-events-matrix .athletes-events-result-visibility--mid {
      opacity: 0.78;
      font-size: 0.8rem;
      font-weight: 500;
      color: var(--text);
    }
    .athletes-events-matrix .athletes-events-result-visibility--final {
      opacity: 1;
      font-size: 0.9rem;
      font-weight: 500;
      color: var(--text);
    }
    .athletes-events-matrix .athletes-events-result-empty {
      font-size: 0.78rem;
      color: var(--text-muted, #94a3b8);
      opacity: 0.55;
    }
    .athletes-events-matrix .athletes-events-medal {
      font-size: 1.05rem;
      line-height: 1;
      flex-shrink: 0;
    }
    .athletes-events-matrix .athletes-events-reg-disc {
      flex: 0 0 auto;
      min-width: 2.75rem;
      max-width: 5.25rem;
      font-size: 0.66rem;
      font-weight: 600;
      color: #94a3b8;
      line-height: 1.25;
    }
    .athletes-events-matrix .athletes-events-reg {
      font-size: 0.78rem;
      color: #94a3b8;
    }
    .athletes-events-matrix .athletes-events-reg-inline {
      flex: 1 1 auto;
      min-width: 0;
    }
    .athletes-events-matrix .athletes-events-reg--confirmed {
      color: var(--ok, #059669);
      font-weight: 600;
    }
    .athletes-events-matrix .athletes-events-reg--not-attending {
      color: #ea580c;
      font-weight: 600;
    }
    .athletes-events-matrix .athletes-events-reg--missing {
      color: var(--danger, #b91c1c);
      font-weight: 600;
    }
    .athletes-events-matrix
      .athletes-events-reg--missing.athletes-events-reg--missing-not-qualified {
      color: #94a3b8;
      font-weight: 500;
    }
    .athletes-events-matrix .athletes-events-reg--missing-excused {
      color: var(--text-muted, #94a3b8);
      font-weight: 500;
      opacity: 0.78;
    }
    .athletes-events-matrix .athletes-events-reg-reason,
    .athletes-events-matrix .athletes-events-reg-inline .athletes-events-reg-reason,
    .athletes-events-matrix .athletes-events-result-row .athletes-events-reg-reason {
      font-size: 0.78rem;
      color: var(--text-muted, #94a3b8);
      font-weight: 500;
      opacity: 0.78;
    }
    .athletes-events-matrix .athletes-events-att-glyph {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 1.2rem;
      height: 1.2rem;
      flex-shrink: 0;
      vertical-align: middle;
    }
    .athletes-events-matrix .athletes-events-att-glyph svg {
      width: 1.05rem;
      height: 1.05rem;
      display: block;
    }
    .athletes-events-matrix .athletes-events-att-glyph--unset {
      color: var(--text-muted, #94a3b8);
    }
    .athletes-events-matrix .athletes-events-att-qmark {
      font-size: 0.62rem;
      font-weight: 700;
      line-height: 1;
      width: 0.95rem;
      height: 0.95rem;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      border: 1.5px solid currentColor;
      box-sizing: border-box;
    }
    .athletes-events-matrix .athletes-events-att-glyph--expected_to_start {
      color: var(--ok, #059669);
    }
    .athletes-events-matrix .athletes-events-att-glyph--wont_start {
      color: var(--danger, #b91c1c);
    }
    .athletes-events-matrix .athletes-events-att-glyph--not_qualified {
      color: #ea580c;
    }
    .athletes-events-matrix .athletes-events-att-glyph--excused {
      color: inherit;
    }
    .athletes-events-matrix .athletes-events-att-excused-badge {
      font-size: 0.58rem;
      font-weight: 800;
      line-height: 1;
      padding: 0.1rem 0.24rem 0.08rem;
      border-radius: 4px;
      background: #fef08a;
      color: #713f12;
      border: 1px solid #eab308;
      letter-spacing: -0.02em;
    }
    .athletes-events-matrix .athletes-events-att-qmark--reserve {
      background: #fef9c3;
      border-color: #eab308;
      color: #854d0e;
    }
    .athletes-events-matrix .athletes-events-att-glyph--mixed {
      color: #7c3aed;
    }
    .athletes-events-matrix .athletes-events-att-mixed-glyph {
      font-size: 0.72rem;
      font-weight: 800;
      line-height: 1;
    }
    .athletes-events-matrix .athletes-events-att-glyph--clearpick {
      color: var(--text-muted, #64748b);
    }
    .athletes-events-popover {
      position: fixed;
      z-index: 80;
      min-width: 14rem;
      max-width: min(22rem, calc(100vw - 1.5rem));
      padding: 0.65rem 0.75rem;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: var(--panel);
      color: var(--text);
      box-shadow: 0 8px 28px rgba(15, 23, 42, 0.18);
    }
    .athletes-events-popover h3 {
      margin: 0 0 0.4rem;
      font-size: 0.95rem;
    }
    .athletes-events-popover .athletes-events-popover-head {
      margin-bottom: 0.35rem;
    }
    .athletes-events-popover .athletes-events-popover-athlete {
      margin: 0 0 0.2rem;
      font-size: 0.95rem;
      font-weight: 700;
      line-height: 1.25;
    }
    .athletes-events-popover .athletes-events-popover-event {
      font-size: 0.8rem;
      font-weight: 500;
      color: var(--text-muted, #64748b);
      line-height: 1.3;
      word-break: break-word;
    }
    .athletes-events-popover .athletes-events-popover-reg {
      font-size: 0.8rem;
      color: var(--text-muted, #64748b);
      margin-bottom: 0.5rem;
    }
    .athletes-events-popover-main-footer {
      margin-top: 0.55rem;
      padding-top: 0.5rem;
      border-top: 1px solid var(--border);
    }
    .athletes-events-popover-main-footer-buttons {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 0.35rem;
    }
    .athletes-events-popover-main-footer-btn {
      font-size: 0.78rem;
      padding: 0.28rem 0.55rem;
    }
    .athletes-events-popover
      button.athletes-events-popover-main-footer-apply--idle:disabled {
      opacity: 0.42;
      color: var(--text-muted, #64748b);
      background: transparent;
      border-color: transparent;
      box-shadow: none;
      font-weight: 400;
    }
    .athletes-events-popover
      button.athletes-events-popover-main-footer-apply.primary:disabled {
      opacity: 0.68;
      cursor: wait;
    }
    .athletes-events-popover-dcat {
      margin-top: 0.45rem;
      padding-top: 0.45rem;
      border-top: 1px solid var(--border);
    }
    .athletes-events-popover--tabbed-dcats .athletes-events-popover-dcats-tabs {
      margin-top: 0.35rem;
    }
    .athletes-events-popover-tablist {
      display: flex;
      flex-wrap: wrap;
      gap: 0.15rem 0.35rem;
      align-items: flex-end;
      border-bottom: 1px solid var(--border);
      margin-bottom: 0.35rem;
      padding-bottom: 0;
    }
    .athletes-events-popover-tab {
      position: relative;
      z-index: 0;
      margin-bottom: -1px;
      padding: 0.32rem 0.55rem;
      font-size: 0.8rem;
      font-weight: 600;
      line-height: 1.2;
      color: var(--text-muted, #64748b);
      cursor: pointer;
      border: 1px solid transparent;
      border-bottom: none;
      border-radius: 7px 7px 0 0;
      background: transparent;
      max-width: 100%;
    }
    .athletes-events-popover-tab:hover {
      color: var(--text);
      background: rgba(15, 23, 42, 0.04);
    }
    .athletes-events-popover-tab[aria-selected="true"] {
      z-index: 1;
      color: var(--text);
      background: var(--panel);
      border-color: var(--border);
      border-bottom-color: var(--panel);
      box-shadow: 0 -1px 0 var(--panel);
    }
    .athletes-events-popover-tab:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .athletes-events-popover-tabpanels {
      min-width: 0;
    }
    .athletes-events-popover--tabbed-dcats
      .athletes-events-popover-tabpanels
      > .athletes-events-popover-dcat {
      margin-top: 0;
      padding-top: 0.35rem;
      border-top: none;
    }
    .athletes-events-popover-dcat-disc--in-tabs {
      display: none !important;
    }
    .athletes-events-popover-dcat-disc {
      font-size: 0.88rem;
      font-weight: 700;
      color: var(--text);
      margin: 0 0 0.25rem;
      line-height: 1.25;
    }
    .athletes-events-popover-dcat label {
      display: block;
      font-size: 0.78rem;
      margin-bottom: 0.2rem;
      color: var(--text-muted, #64748b);
    }
    .athletes-events-popover-dcat-mixed-hint {
      margin: 0 0 0.35rem;
      padding: 0.28rem 0.4rem;
      font-size: 0.72rem;
      line-height: 1.35;
      color: var(--text-muted, #64748b);
      background: rgba(234, 88, 12, 0.1);
      border: 1px solid rgba(234, 88, 12, 0.35);
      border-radius: 6px;
    }
    .athletes-events-popover-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.25rem;
    }
    .athletes-events-popover-actions button {
      font-size: 0.75rem;
      padding: 0.2rem 0.45rem;
    }
    .athletes-events-popover-dcat-delete {
      display: flex;
      justify-content: flex-end;
      margin-top: 0.45rem;
    }
    .athletes-events-popover-dcat-delete-btn {
      font-size: 0.75rem;
      padding: 0.22rem 0.55rem;
    }
    .athletes-events-popover
      button.athletes-events-popover-dcat-delete-btn--pending:not(:disabled) {
      border-color: rgba(234, 88, 12, 0.55);
      background: rgba(234, 88, 12, 0.12);
      color: var(--warn, #c2410c);
      font-weight: 600;
    }
    .athletes-events-popover
      button.athletes-events-popover-dcat-delete-btn--applying {
      box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.4);
      animation: athletes-events-popover-delete-applying 1s ease-in-out
        infinite;
    }
    @keyframes athletes-events-popover-delete-applying {
      0%,
      100% {
        opacity: 1;
      }
      50% {
        opacity: 0.72;
      }
    }
    .athletes-events-popover-comment {
      margin-top: 0.45rem;
      display: flex;
      flex-direction: column;
      gap: 0.28rem;
      align-items: stretch;
    }
    .athletes-events-popover-comment-label {
      font-size: 0.72rem;
      font-weight: 600;
      color: var(--text-muted, #64748b);
    }
    .athletes-events-popover-comment-input {
      width: 100%;
      box-sizing: border-box;
      font-size: 0.8rem;
      padding: 0.28rem 0.4rem;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: var(--panel-elevated, var(--panel));
      color: var(--text);
    }
    .athletes-events-popover-comment-input:disabled {
      opacity: 0.55;
      cursor: not-allowed;
    }
    .athletes-events-popover-comment-save {
      align-self: flex-start;
      font-size: 0.75rem;
      padding: 0.22rem 0.5rem;
    }
    .athletes-events-attpick-btn {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      text-align: left;
      border: 1px solid transparent;
    }
    .athletes-events-popover .athletes-events-attpick-btn[aria-pressed="true"] {
      border: 1px solid var(--accent);
      background: rgba(37, 99, 235, 0.12);
      color: var(--accent);
      font-weight: 600;
      box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
    }
    .athletes-events-popover .athletes-events-attpick-btn[aria-pressed="true"]:hover {
      background: rgba(37, 99, 235, 0.18);
      border-color: #1d4ed8;
      color: #1d4ed8;
    }
    .athletes-events-attpick-btn .athletes-events-att-glyph--in-btn {
      width: 1rem;
      height: 1rem;
      flex-shrink: 0;
    }
    .athletes-events-attpick-btn .athletes-events-att-glyph--in-btn svg {
      width: 0.92rem;
      height: 0.92rem;
    }
    .athletes-events-attpick-btn .athletes-events-att-qmark {
      font-size: 0.55rem;
      width: 0.82rem;
      height: 0.82rem;
    }
    .athletes-events-attpick-btn .athletes-events-att-excused-badge {
      font-size: 0.52rem;
      padding: 0.06rem 0.18rem 0.05rem;
    }
    .athletes-events-attpick-btn .athletes-events-att-glyph--expected_to_start {
      color: var(--ok, #059669);
    }
    .athletes-events-attpick-btn .athletes-events-att-glyph--wont_start {
      color: var(--danger, #b91c1c);
    }
    .athletes-events-attpick-btn .athletes-events-att-glyph--not_qualified {
      color: #ea580c;
    }
    .athletes-events-attpick-btn .athletes-events-att-glyph--unset {
      color: var(--text-muted, #64748b);
    }
    .athletes-events-attpick-btn .athletes-events-att-glyph--unclear {
      color: var(--text-muted, #64748b);
    }
    .athletes-events-attpick-btn .athletes-events-att-glyph--irrelevant {
      color: var(--text-muted, #64748b);
    }
    .athletes-events-attpick-btn .athletes-events-att-glyph--clearpick {
      color: var(--text-muted, #64748b);
    }
    .athletes-events-attpick-btn .athletes-events-att-qmark--reserve {
      background: #fef9c3;
      border-color: #eab308;
      color: #854d0e;
    }
    .athletes-events-attpick-btn .athletes-events-att-glyph--mixed {
      color: #7c3aed;
    }
    .athletes-events-attpick-btn-label {
      line-height: 1.2;
    }
    .athletes-view-head {
      margin-bottom: 1rem;
    }
    .athletes-guest {
      max-width: 36rem;
    }
    .athletes-guest .primary {
      margin-top: 0.75rem;
    }
    .athletes-toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-end;
      gap: 0.75rem 1rem;
      margin-bottom: 0.75rem;
    }
    .athletes-overview-toolbar .athletes-toolbar-source-col {
      flex: 0 1 11rem;
      min-width: 8rem;
      max-width: 100%;
    }
    .athletes-search-source-select {
      width: 100%;
      min-width: 0;
      max-width: 20rem;
      font: inherit;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--panel);
      color: var(--text);
      padding: 0.45rem 0.75rem;
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    }
    #athletes-search-btn.athletes-search-btn--pending {
      cursor: wait;
      opacity: 0.9;
    }
    button.secondary.athletes-detail-reg-index-btn.athletes-detail-reg-index-btn--pending {
      cursor: wait;
      opacity: 0.9;
    }
    .athletes-toolbar .athletes-search-spacer {
      display: block;
      visibility: hidden;
    }
    .athletes-candidates-label {
      margin: 0.5rem 0 0.35rem;
    }
    .athletes-candidates {
      list-style: none;
      margin: 0 0 1rem;
      padding: 0;
      display: flex;
      flex-direction: column;
      gap: 0.22rem;
      max-width: 40rem;
    }
    .athletes-candidates li {
      margin: 0;
    }
    .athletes-candidate-hit {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.15rem;
      width: 100%;
      padding: 0.35rem 0.55rem;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--panel);
      color: var(--text);
      box-sizing: border-box;
    }
    .athletes-candidate-hit:hover {
      border-color: var(--accent);
      background: var(--row-hover);
    }
    .athletes-candidate-name-primary {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      min-width: 0;
      width: 100%;
      position: relative;
    }
    .athletes-candidate-name-primary .athletes-candidate-btn {
      flex: 1 1 auto;
      min-width: 0;
    }
    .athletes-candidate-btn {
      display: block;
      width: 100%;
      text-align: left;
      padding: 0;
      margin: 0;
      border: none;
      background: none;
      font: inherit;
      color: var(--text);
      cursor: pointer;
      text-decoration: none;
    }
    .athletes-candidate-btn:visited {
      color: var(--text);
    }
    .athletes-candidate-open-icon {
      position: absolute;
      top: 0.08rem;
      right: 0.08rem;
      z-index: 2;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: var(--muted);
      text-decoration: none;
      line-height: 0;
      border-radius: 4px;
      padding: 0.1rem;
      background: var(--panel-bg, rgba(255, 255, 255, 0.82));
      box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
    }
    .athletes-candidate-open-icon:hover {
      color: var(--text);
      background: rgba(37, 99, 235, 0.08);
    }
    .athletes-candidate-open-icon:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 1px;
    }
    .athletes-candidate-name {
      font-weight: 500;
      width: 100%;
    }
    .athletes-candidate-meta {
      font-size: 0.86rem;
      color: var(--muted);
      line-height: 1.3;
      width: 100%;
      min-width: 0;
    }
    .athletes-candidate-meta .athletes-candidate-id-link {
      font-weight: 600;
      font-variant-numeric: tabular-nums;
      color: var(--accent);
    }
    .athletes-candidate-meta .athletes-candidate-id-link:hover {
      color: var(--text);
    }
    .athletes-detail-dl {
      margin: 0;
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 0.35rem 1rem;
      align-items: baseline;
      width: 100%;
      max-width: 100%;
      min-width: 0;
    }
    .athletes-detail-dl dt {
      margin: 0;
      color: var(--muted);
      font-weight: 500;
    }
    .athletes-detail-dl dd {
      margin: 0;
      min-width: 0;
      overflow-wrap: anywhere;
    }
    .athletes-detail-profile-source-readonly {
      margin-right: 0.35rem;
    }
    select.athletes-detail-profile-source-select.athletes-detail-profile-source-select--locked {
      cursor: not-allowed;
      opacity: 0.88;
    }
    button.round-filter-btn.athletes-detail-source-filter-btn--locked {
      cursor: not-allowed;
      opacity: 0.88;
    }
    .athletes-detail-profile-source-wrap {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.45rem 0.65rem;
    }
    .athletes-detail-profile-source-wrap .athletes-detail-link-add-btn {
      flex-shrink: 0;
    }
    .athletes-detail-linked-accounts {
      overflow-x: auto;
    }
    table.athletes-detail-linked-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.88rem;
    }
    table.athletes-detail-linked-table th,
    table.athletes-detail-linked-table td {
      padding: 0.35rem 0.5rem;
      text-align: left;
      border-bottom: 1px solid var(--border);
      vertical-align: top;
    }
    table.athletes-detail-linked-table thead th {
      color: var(--muted);
      font-weight: 600;
      font-size: 0.82rem;
    }
    table.athletes-detail-linked-table tbody tr:last-child td {
      border-bottom: none;
    }
    .athletes-detail-linked-col-unlink {
      width: 2rem;
      text-align: right;
      white-space: nowrap;
    }
    html.athletes-link-account-overlay-open {
      overflow: hidden;
    }
    .athletes-link-account-overlay-dialog {
      max-width: min(38rem, calc(100vw - 2rem));
    }
    .athletes-link-overlay-source-block {
      margin-bottom: 0.75rem;
    }
    .athletes-link-overlay-source-block label {
      display: block;
      margin-bottom: 0.25rem;
      font-size: 0.88rem;
      color: var(--muted);
    }
    .athletes-link-overlay-toolbar {
      margin-bottom: 0.35rem;
    }
    .athletes-link-overlay-candidate-row {
      align-items: flex-start;
    }
    .athletes-detail-fetched-at-group {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 0.35rem 1rem;
      align-items: baseline;
      grid-column: 1 / -1;
      margin-top: 0.55rem;
      padding-top: 0.8rem;
      border-top: 1px solid var(--border);
    }
    .athletes-detail-fetched-at-group dt,
    .athletes-detail-fetched-at-group dd {
      margin: 0;
      font-size: inherit;
      line-height: inherit;
    }
    .athletes-detail-fetched-at-group dd a {
      color: var(--accent);
      text-decoration: none;
      word-break: break-all;
    }
    .athletes-detail-fetched-at-group dd a:hover {
      text-decoration: underline;
    }
    .athletes-detail-detail-subtabs {
      margin-top: 0.65rem;
    }
    .athletes-detail-section {
      margin-top: 1.1rem;
    }
    .athletes-detail-section-title {
      margin: 0 0 0.45rem;
      font-size: 1rem;
      font-weight: 600;
    }
    .athletes-detail-upcoming-reg-section .athletes-detail-section-title {
      margin-bottom: 0.35rem;
    }
    .athletes-detail-reg-index-actions {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.4rem;
      margin: 0 0 0.65rem;
      max-width: 40rem;
    }
    .athletes-detail-reg-index-toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.45rem 0.75rem;
    }
    .athletes-detail-reg-index-season-label {
      font: inherit;
      color: var(--muted);
      margin: 0;
    }
    .athletes-detail-reg-index-season-select {
      font: inherit;
      min-width: 10rem;
      max-width: min(100%, 22rem);
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--panel);
      color: var(--text);
      padding: 0.4rem 0.65rem;
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    }
    .athletes-detail-reg-index-hint {
      margin: 0;
      line-height: 1.35;
    }
    .athletes-detail-athlete-lists-dd {
      min-width: 0;
    }
    .athletes-detail-athlete-lists-inner {
      margin: 0;
    }
    .athletes-detail-athlete-lists-section .athletes-detail-athlete-lists-toggle-err {
      margin: 0 0 0.35rem;
    }
    .athletes-detail-athlete-lists-body {
      font-size: 0.92rem;
    }
    .athletes-detail-athlete-lists-body .settings-highlight-athletes {
      max-width: 36rem;
    }
    .athletes-detail-list-readonly {
      font-size: 0.82rem;
      white-space: nowrap;
    }
    .athletes-detail-table-wrap {
      overflow-x: auto;
      max-width: 100%;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: var(--panel);
    }
    table.athletes-detail-data-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.88rem;
    }
    table.athletes-detail-data-table th,
    table.athletes-detail-data-table td {
      padding: 0.4rem 0.55rem;
      text-align: left;
      border-bottom: 1px solid var(--border);
      vertical-align: top;
    }
    table.athletes-detail-data-table thead th {
      background: var(--table-header);
      color: var(--table-header-text);
      font-weight: 600;
    }
    table.athletes-detail-data-table thead th:has(> .admin-th-sort) {
      padding: 0.35rem 0.45rem;
      vertical-align: middle;
    }
    table.athletes-detail-data-table tbody tr:last-child td {
      border-bottom: none;
    }
    .athletes-detail-event-link,
    .athletes-detail-cup-rank-link {
      border: none;
      background: transparent;
      color: var(--accent);
      font: inherit;
      font-weight: 500;
      padding: 0;
      cursor: pointer;
      text-align: left;
      text-decoration: underline;
      text-underline-offset: 2px;
      display: inline;
    }
    .athletes-detail-event-link:focus-visible,
    .athletes-detail-cup-rank-link:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .athletes-detail-event-link:hover,
    .athletes-detail-cup-rank-link:hover {
      color: var(--text);
    }
    .athletes-detail-cup-rank-links {
      display: inline;
      line-height: inherit;
    }
    .athletes-detail-pb-section {
      margin-top: 1.1rem;
      margin-bottom: 1.2rem;
    }
    .athletes-detail-pb-heading-wrap {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      margin-bottom: 0.25rem;
    }
    .athletes-detail-pb-heading {
      font-size: 1rem;
      font-weight: 600;
      margin: 0;
    }
    .athletes-pb-loaded-meta-bar {
      display: flex;
      align-items: center;
      gap: 0.35rem;
      margin-bottom: 0.5rem;
    }
    .athletes-pb-loaded-meta-text {
      font-size: 0.82rem;
    }
    .athletes-pb-reload-btn {
        flex-shrink: 0;
    }
    .athletes-pb-plot-toggle-btn {
      margin: 0.25rem 0 0;
    }
    .athletes-pb-plot-mode {
      display: inline-flex;
      gap: 0.35rem;
      flex-wrap: wrap;
    }
    .athletes-pb-plot-mode-btn.is-pressed {
      box-shadow: inset 0 0 0 1px var(--border);
      background: color-mix(in srgb, var(--accent) 14%, var(--panel));
    }
    .athletes-detail-pb-plot-spoiler {
      margin-top: 0.7rem;
      padding-top: 0.55rem;
      border-top: 1px solid var(--border);
    }
    .athletes-detail-pb-content.results-col-perm-guarded {
        position: relative;
        min-height: 2.75rem;
    }
    .athletes-detail-pb-content .results-col-perm-overlay {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.35rem;
        color: var(--muted);
        background: color-mix(in srgb, var(--bg) 82%, transparent);
        backdrop-filter: blur(2px);
        z-index: 2;
        pointer-events: none;
    }
    .athletes-detail-pb-content .results-col-perm-lock {
        pointer-events: auto;
        cursor: help;
        line-height: 0;
        opacity: 0.92;
    }
    .athletes-detail-pb-content .results-col-perm-lock svg {
        display: block;
        width: 1rem;
        height: 1rem;
    }
    .athletes-pb-table {
      width: 100%;
      border-collapse: collapse;
    }
    .athletes-pb-table th,
    .athletes-pb-table td {
      padding: 0.4rem 0.5rem;
      text-align: left;
      border-bottom: 1px solid var(--border);
    }
    .athletes-pb-table thead th {
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--text-muted);
    }
    .athletes-pb-time-cell {
      font-variant-numeric: tabular-nums;
      font-weight: 600;
    }
    .athletes-pb-category {
      color: var(--text-muted);
      font-size: 0.85rem;
    }
    .athletes-pb-empty {
      margin: 0.5rem 0;
    }
    @media (max-width: 720px) {
      .header-menu-btn {
        width: clamp(2rem, 8vw, 2.65rem);
        height: clamp(2rem, 8vw, 2.65rem);
      }
      .header-menu-btn svg {
        width: clamp(1rem, 3.5vw, 1.4rem);
        height: clamp(1rem, 3.5vw, 1.4rem);
      }
      .header-menu button.menu-item {
        min-height: 2.55rem;
        font-size: 0.98rem;
      }
      button.round-filter-btn {
        font-size: 0.82rem;
        padding: 0.38rem 0.62rem;
        /* Keep aligned with .event-subtab / toolbar row; 2.5rem was visibly taller on iOS. */
        min-height: 2.2rem;
      }
      .results-table-toolbar button.secondary {
        font-size: 0.82rem;
        padding: 0.38rem 0.62rem;
        min-height: 2.2rem;
      }
      .col-dialog-list li {
        min-height: 2.42rem;
        font-size: 0.85rem;
        padding: 0.34rem 0.46rem;
      }
      .col-dialog-list input[type="checkbox"] {
        width: 1.1rem;
        height: 1.1rem;
      }
      .col-dialog-move button {
        min-height: 2.05rem;
        min-width: 2.15rem;
        font-size: 0.78rem;
      }
      .results-dialog-footer-actions button {
        min-height: 2.5rem;
        font-size: 0.86rem;
      }
      .results-dialog-footer-actions button.results-dialog-footer-reset {
        min-height: 1.88rem;
        font-size: 0.76rem;
        padding: 0.22rem 0.48rem;
      }
      .col-dialog-routes-all-label {
        min-height: 2.35rem;
        font-size: 0.85rem;
        padding: 0.36rem 0.44rem;
      }
      .col-dialog-routes-all-label input {
        width: 1.1rem;
        height: 1.1rem;
      }
      .results-view-head .btn-row button.secondary {
        min-height: 2.35rem;
      }
    }

    /* User athlete notes (results tables) */
    .round-block-summary-actions .round-block-notes-capture-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 1.75rem;
      min-height: 1.75rem;
      padding: 0.12rem;
      margin-right: 0.35rem;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: var(--panel);
      color: var(--muted-fg, #64748b);
      cursor: pointer;
    }
    .round-block-summary-actions .round-block-notes-capture-btn[aria-pressed="true"] {
      color: var(--accent);
      border-color: var(--accent);
      background: rgba(37, 99, 235, 0.08);
    }
    .round-block-summary-actions .round-block-notes-capture-btn:disabled {
      cursor: not-allowed;
      opacity: 0.55;
    }
    .round-block-summary-actions .round-block-notes-capture-btn:disabled[aria-pressed="false"] {
      color: var(--muted-fg, #64748b);
      border-color: var(--border);
      background: var(--panel);
    }
    details.round-block.round-block--notes-capture > summary {
      outline: 1px dashed rgba(37, 99, 235, 0.35);
    }
    .results-note-icon-slot {
      display: inline-flex;
      align-items: center;
      vertical-align: middle;
      margin-left: 0.2rem;
      color: var(--muted-fg, #64748b);
    }
    .results-note-icon-slot:not([hidden]) {
      cursor: pointer;
    }
    .results-note-icon-slot--route {
      position: absolute;
      top: 0.15rem;
      right: 0.15rem;
      margin: 0;
    }
    td.route-col--rel {
      position: relative;
    }
    .results-athlete-note-dialog,
    .results-notes-list-dialog {
      border: none;
      border-radius: 12px;
      padding: 0;
      max-width: min(520px, calc(100vw - 2rem));
      width: 100%;
      background: var(--panel);
      color: var(--text);
      box-shadow: 0 16px 48px rgba(15, 23, 42, 0.22);
    }
    .results-notes-list-dialog {
      max-width: min(900px, calc(100vw - 2rem));
    }
    .results-athlete-note-dialog::backdrop,
    .results-notes-list-dialog::backdrop {
      background: rgba(15, 23, 42, 0.4);
    }
    .results-athlete-note-dialog-inner,
    .results-notes-list-dialog-inner {
      display: flex;
      flex-direction: column;
      min-height: 0;
      max-height: min(82vh, 36rem);
      padding: 0 0.68rem 0;
    }
    .results-notes-list-dialog-inner {
      max-height: min(85vh, 40rem);
    }
    .results-athlete-note-dialog-title {
      margin: 0.5rem 0 0.35rem;
      font-size: 1rem;
      font-weight: 600;
    }
    .results-note-ascent-block {
      margin-top: 0.35rem;
      font-size: 0.9rem;
      line-height: 1.35;
    }
    .results-note-ascent-preview {
      font-weight: 500;
    }
    .results-notes-list-dialog-head-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      flex-wrap: wrap;
      gap: 0.35rem;
      margin: 0.35rem 0 0.5rem;
    }
    .results-notes-list-new-btn {
      flex-shrink: 0;
      padding: 0.25rem 0.65rem;
      min-height: 2rem;
      font-size: 0.875rem;
    }
    .results-notes-list-csv-btn {
      flex-shrink: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0.25rem 0.4rem;
      min-width: 2rem;
      min-height: 2rem;
    }
    .results-notes-list-csv-btn svg {
      display: block;
    }
    .results-athlete-note-dialog-inner .results-dialog-scroll {
      flex: 1;
      min-height: 0;
      overflow: auto;
      padding: 0.25rem 0 0.5rem;
    }
    .results-notes-list-filters {
      margin-bottom: 0;
    }
    .results-notes-list-round-filters .results-notes-list-filters-dropdowns {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem 1.25rem;
        align-items: center;
        padding-bottom: 0.35rem;
        margin-bottom: 0.1rem;
        border-bottom: 1px solid var(--border);
    }
    .results-notes-list-filter-item {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        font-size: 0.82rem;
    }
    .results-notes-list-filter-label {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        font-size: 0.82rem;
        margin: 0;
    }
    .results-notes-list-filter-label[hidden] {
        display: none !important;
    }
    .results-notes-list-filter-select {
      min-width: 10rem;
      max-width: min(22rem, 100%);
      font-size: 0.82rem;
    }
    .results-notes-list-round-filters.round-filters {
      margin-bottom: 0.55rem;
    }
    .results-notes-list-dialog-inner .results-dialog-scroll {
      flex: 1;
      min-height: 0;
      overflow: auto;
      padding: 0.25rem 0 0.5rem;
    }
    .event-subpanel.event-subpanel-notes {
      min-height: min(52vh, 26rem);
    }
    .event-subpanel.event-subpanel-notes .results-notes-list-dialog-inner {
      max-height: none;
    }
    .results-note-field {
      display: flex;
      flex-direction: column;
      gap: 0.2rem;
      margin-bottom: 0.55rem;
      font-size: 0.84rem;
    }
    .results-note-field select,
    .results-note-field input[type="datetime-local"],
    .results-note-field textarea {
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
      font: inherit;
    }
    .results-note-field-text textarea {
      min-height: 10rem;
      resize: vertical;
    }
    .results-athlete-note-dialog-actions {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 0.35rem;
      padding: 0.5rem 0 0.65rem;
      border-top: 1px solid var(--border);
      margin-top: 0.25rem;
    }
    .results-athlete-note-dialog-actions-spacer {
      flex: 1;
    }
    /* Match admin icon row: no accent (blue) hover on delete — class is admin-icon-btn admin-athlete-list-delete only */
    .results-athlete-note-dialog-actions .admin-icon-btn.admin-athlete-list-delete:hover {
      border-color: var(--border);
      color: var(--text);
      background: var(--panel);
    }
    .results-athlete-note-dialog-actions .admin-icon-btn.admin-athlete-list-delete:focus-visible {
      outline: 2px solid var(--border);
      outline-offset: 1px;
    }
    .results-notes-list-count {
      margin: 0.45rem 0 0;
      padding: 0 0.15rem;
      font-size: 0.76rem;
      line-height: 1.35;
    }
    .results-notes-list-table {
      table-layout: fixed;
      width: 100%;
      border-collapse: collapse;
      font-size: 0.78rem;
    }
    .results-notes-list-table col.results-notes-list-col-time {
      width: 5.75rem;
    }
    .results-notes-list-table--all-events col.results-notes-list-col-event {
      width: 12%;
      max-width: 10rem;
    }
    .results-notes-list-table col.results-notes-list-col-athlete {
      width: 13%;
      max-width: 9rem;
    }
    .results-notes-list-table col.results-notes-list-col-route {
      width: 9%;
      max-width: 6rem;
    }
    .results-notes-list-table col.results-notes-list-col-discipline {
      width: 8%;
      max-width: 5rem;
    }
    .results-notes-list-table col.results-notes-list-col-category {
      width: 8%;
      max-width: 5rem;
    }
    .results-notes-list-table col.results-notes-list-col-round-name {
      width: 10%;
      max-width: 6.5rem;
    }
    .results-notes-list-table col.results-notes-list-col-note {
      width: auto;
      min-width: 36%;
    }
    .results-notes-list-table col.results-notes-list-col-actions {
      width: 5.95rem;
      min-width: 5.5rem;
    }
    .results-notes-list-table th,
    .results-notes-list-table td {
      border-bottom: 1px solid var(--border);
      padding: 0.28rem 0.35rem;
      text-align: left;
      vertical-align: top;
    }
    .results-notes-list-table:not(.results-notes-list-table--all-events) td:nth-child(3),
    .results-notes-list-table:not(.results-notes-list-table--all-events) td:nth-child(4),
    .results-notes-list-table:not(.results-notes-list-table--all-events) td:nth-child(5),
    .results-notes-list-table:not(.results-notes-list-table--all-events) td:nth-child(6) {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .results-notes-list-table:not(.results-notes-list-table--all-events) td:nth-child(7) {
      white-space: normal;
      word-break: break-word;
    }
    .results-notes-list-table--all-events td:nth-child(1),
    .results-notes-list-table--all-events td:nth-child(4),
    .results-notes-list-table--all-events td:nth-child(5),
    .results-notes-list-table--all-events td:nth-child(6),
    .results-notes-list-table--all-events td:nth-child(7) {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .results-notes-list-table--all-events td:nth-child(8) {
      white-space: normal;
      word-break: break-word;
    }
    .results-notes-list-cell-event {
      white-space: normal !important;
      overflow: visible !important;
      text-overflow: clip !important;
      line-height: 1.28;
    }
    .results-notes-list-cell-event a {
      color: var(--accent);
      text-decoration: none;
    }
    .results-notes-list-cell-event a:hover {
      text-decoration: underline;
    }
    .results-notes-list-event-date {
      font-size: 0.78em;
      margin-top: 0.12em;
      line-height: 1.25;
    }
    .results-notes-list-table th.th-sortable {
      cursor: pointer;
      user-select: none;
    }
    .results-notes-list-table th.th-sortable:hover {
      color: var(--accent);
    }
    .results-notes-list-cell-athlete {
      white-space: normal;
      overflow: visible;
      text-overflow: clip;
      line-height: 1.3;
    }
    .results-notes-list-cell-route {
      white-space: normal !important;
      overflow: visible !important;
      text-overflow: clip !important;
      line-height: 1.28;
    }
    .results-notes-list-route-name {
      font-weight: 500;
    }
    .results-notes-list-route-score {
      font-size: 0.78em;
      margin-top: 0.12em;
      line-height: 1.25;
    }
    .results-notes-list-athlete-name {
      font-weight: 500;
    }
    .results-notes-list-athlete-meta {
      display: block;
      margin-top: 0.12em;
      font-size: 0.78em;
      font-weight: 400;
      color: var(--muted-fg, #64748b);
      line-height: 1.25;
      opacity: 0.88;
    }
    .results-notes-list-table thead th:last-child {
      white-space: normal;
      word-break: normal;
    }
    .results-notes-list-actions {
      white-space: nowrap;
    }
    .results-notes-list-action-btn {
      font-size: 0.76rem;
      padding: 0.2rem 0.45rem;
      margin-right: 0.25rem;
    }
    .results-notes-list-action-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0.12rem 0.22rem;
      min-width: 1.65rem;
      min-height: 1.65rem;
      margin-right: 0.12rem;
      vertical-align: middle;
    }
    .results-notes-list-action-icon svg {
      display: block;
    }
    .results-notes-list-time {
      line-height: 1.25;
      font-variant-numeric: tabular-nums;
    }
    .results-notes-list-clock {
      display: inline;
      font-weight: 500;
    }
    .results-notes-list-date {
      display: inline;
      color: var(--muted-fg, #64748b);
      font-size: 0.88em;
    }

    /* Speed Records + filterable table */
    .admin-speed-gender-section {
      max-width: min(100%, 44rem);
      margin-bottom: 1rem;
    }
    .admin-speed-gender-form {
      display: flex;
      flex-direction: column;
      gap: 0.65rem;
      margin-top: 0.5rem;
    }
    .admin-speed-gender-input {
      width: 100%;
      box-sizing: border-box;
      font: inherit;
      padding: 0.4rem 0.5rem;
    }
    .admin-speed-source-country-iso,
    .admin-speed-route-type-rules {
      display: block;
      width: 100%;
      box-sizing: border-box;
      font: inherit;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
      font-size: 0.88em;
      line-height: 1.35;
      padding: 0.45rem 0.55rem;
      margin-top: 0.25rem;
      min-height: 12rem;
      resize: vertical;
    }
    .admin-speed-route-type-rules {
      min-height: 10rem;
    }
    .admin-speed-gender-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      align-items: center;
    }
    .app-speed-records-view .speed-records-section {
      margin: 0 0 1.5rem;
      padding: 0;
    }
    .app-speed-records-view .speed-records-section:last-child {
      margin-bottom: 0;
    }
    .app-speed-records-view .speed-records-section-title {
      margin: 0 0 0.35rem;
      font-size: 1.05rem;
      font-weight: 600;
      color: var(--text);
      letter-spacing: -0.02em;
    }
    .app-speed-records-view .speed-records-section-intro {
      margin: 0 0 0.85rem;
      max-width: min(100%, 44rem);
      line-height: 1.45;
      color: var(--muted);
    }
    .app-speed-records-view .speed-records-selection-threshold-table {
      font-size: 0.8125rem;
      width: max-content;
      max-width: 100%;
    }
    .app-speed-records-view .speed-records-selection-threshold-table thead th {
      text-align: center;
      vertical-align: middle;
      padding: 0.2rem 0.3rem;
      line-height: 1.2;
    }
    .app-speed-records-view
      .speed-records-selection-threshold-table
      .speed-records-selection-th-birth-col {
      text-align: center;
      white-space: nowrap;
    }
    .app-speed-records-view
      .speed-records-selection-threshold-table
      .speed-records-selection-th-tier-head {
      font-weight: 600;
    }
    .app-speed-records-view
      .speed-records-selection-threshold-table
      .speed-records-selection-th-mw {
      font-weight: 500;
    }
    .app-speed-records-view
      .speed-records-selection-threshold-table
      tbody
      td {
      padding: 0.15rem 0.3rem;
      text-align: center;
      vertical-align: middle;
    }
    .app-speed-records-view
      .speed-records-selection-threshold-table
      .speed-sel-th-sec {
      width: 4.25rem;
      max-width: 100%;
      box-sizing: border-box;
      margin: 0 auto;
      display: block;
      text-align: center;
      font-variant-numeric: tabular-nums;
      padding: 0.15rem 0.25rem;
      font-size: inherit;
    }
    .app-speed-records-view
      .speed-records-selection-threshold-table
      tbody
      td:first-child {
      font-variant-numeric: tabular-nums;
    }
    .app-speed-records-view .speed-records-selection-merged-table td {
      vertical-align: middle;
    }
    .app-speed-records-view
      .speed-records-selection-merged-table
      thead
      th.speed-records-selection-th--sortable {
      cursor: pointer;
      user-select: none;
    }
    .app-speed-records-view
      .speed-records-selection-merged-table
      thead
      th.speed-records-selection-th--sorted-asc::after {
      content: " \2191";
      font-size: 0.72em;
      opacity: 0.85;
    }
    .app-speed-records-view
      .speed-records-selection-merged-table
      thead
      th.speed-records-selection-th--sorted-desc::after {
      content: " \2193";
      font-size: 0.72em;
      opacity: 0.85;
    }
    .app-speed-records-view .speed-records-selection-criterion {
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
      font-weight: 600;
    }
    .app-speed-records-view .speed-records-selection-criterion--pass {
      color: var(--success, #15803d);
    }
    .app-speed-records-view .speed-records-selection-criterion--fail {
      color: var(--danger, #b91c1c);
    }
    .app-speed-records-view .speed-records-selection-criterion--na {
      color: var(--muted);
      font-weight: 400;
    }
    .app-speed-records-view .speed-records-selection-threshold-toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.45rem 0.75rem;
      margin: 0 0 0.55rem;
    }
    .app-speed-records-view .speed-records-selection-limits-details {
      margin: 0 0 0.85rem;
    }
    .app-speed-records-view
      .speed-records-selection-limits-details
      .speed-records-selection-limits-details-inner {
      margin-top: 0.35rem;
    }
    .app-speed-records-view
      .speed-records-selection-threshold-table--readonly
      .speed-sel-th-ro {
      display: inline-block;
      min-width: 3.25rem;
      font-variant-numeric: tabular-nums;
      text-align: center;
    }
    .app-speed-records-view
      .speed-records-selection-threshold-toolbar
      button.secondary {
      font-size: 0.7rem;
      font-weight: 500;
      padding: 0.2rem 0.42rem;
      line-height: 1.25;
      border-radius: 8px;
      min-height: 1.75rem;
    }
    .app-speed-records-view .speed-records-selection-table-filters {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-end;
      gap: 0.65rem 1.25rem;
      margin: 0 0 0.65rem;
    }
    .app-speed-records-view .speed-records-selection-filter-group {
      display: inline-flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.35rem 0.65rem;
    }
    .app-speed-records-view .speed-records-selection-filter-heading {
      margin-right: 0.15rem;
    }
    /** Match athletes matrix ``results-filter-btn`` (Favorites-style chips). */
    .app-speed-records-view .speed-records-selection-tier-btns {
      display: inline-flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.35rem;
    }
    .app-speed-records-view
      .speed-records-selection-filter-group
      > button.secondary.results-filter-btn {
      font-size: 0.76rem;
      font-weight: 500;
      padding: 0.28rem 0.52rem;
      line-height: 1.25;
      border-radius: 10px;
      min-height: 2.2rem;
    }
    .app-speed-records-view
      .speed-records-selection-filter-group
      > .results-filter-btn.is-pressed {
      background: rgba(37, 99, 235, 0.14);
      border-color: var(--accent);
      color: var(--text);
    }
    .app-speed-records-view
      .speed-records-selection-tier-btns
      button.secondary.results-filter-btn {
      font-size: 0.76rem;
      font-weight: 500;
      padding: 0.28rem 0.52rem;
      line-height: 1.25;
      border-radius: 10px;
      min-height: 2.2rem;
    }
    .app-speed-records-view
      .speed-records-selection-tier-btns
      .results-filter-btn.is-pressed {
      background: rgba(37, 99, 235, 0.14);
      border-color: var(--accent);
      color: var(--text);
    }
    .app-speed-records-view .speed-records-selection-shown-count {
      margin: 0.5rem 0 0;
    }
    .app-speed-records-view .speed-records-selection-filter-empty {
      padding: 0.65rem 0;
      text-align: center;
    }
    .app-speed-records-view .speed-records-records-table-intro {
      margin-bottom: 0.65rem;
    }
    .app-speed-records-view .speed-records-bestenlisten-fetch-msg:empty {
      display: none;
    }
    .app-speed-records-view .speed-records-bestenlisten-fetch-msg:not(:empty) {
      margin: 0 0 0.65rem;
      color: var(--danger, var(--muted));
    }
    .app-speed-records-view .speed-records-load-times-table-btn {
      font: inherit;
      padding: 0.45rem 0.85rem;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--panel-muted);
      color: var(--text);
      cursor: pointer;
      margin: 0 0 0.65rem;
    }
    .app-speed-records-view .speed-records-load-times-table-btn:hover:not(:disabled) {
      background: var(--panel);
    }
    .app-speed-records-view .speed-records-load-times-table-btn:disabled {
      cursor: wait;
      opacity: 0.75;
    }
    .app-speed-records-view .speed-records-section--records-table .speed-records-table-msg {
      margin: 0 0 0.5rem;
    }
    .app-speed-records-view .speed-records-section--records-table .speed-records-table-host {
      margin-top: 0.15rem;
    }
    .app-speed-records-view .speed-records-event-pb-plots {
      margin-top: 1rem;
      padding-top: 0.75rem;
      border-top: 1px solid var(--border);
      width: 100%;
      max-width: none;
      box-sizing: border-box;
    }
    .speed-records-event-pb-toolbar-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 0.65rem 1rem;
      margin-top: 0.5rem;
      width: 100%;
    }
    .speed-records-event-pb-toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.5rem 1rem;
      flex: 1 1 auto;
      min-width: 0;
    }
    .speed-records-event-pb-toolbar-row .secondary {
      font-size: 0.82rem;
      line-height: 1.2;
      padding: 0.28rem 0.52rem;
    }
    .speed-records-event-pb-gender {
      display: inline-flex;
      flex-wrap: nowrap;
      gap: 0.35rem;
      flex: 0 0 auto;
    }
    .speed-records-event-pb-gender-btn.is-pressed {
      box-shadow: inset 0 0 0 1px var(--border);
      background: color-mix(in srgb, var(--accent) 14%, var(--panel));
    }
    .speed-records-event-pb-seg {
      display: inline-flex;
      flex-wrap: wrap;
      gap: 0.35rem;
    }
    .speed-records-event-pb-seg-btn.is-pressed {
      box-shadow: inset 0 0 0 1px var(--border);
      background: color-mix(in srgb, var(--accent) 14%, var(--panel));
    }
    .speed-records-event-pb-plot-hint {
      margin: 0.35rem 0 0.25rem;
      font-size: 0.78rem;
    }
    .speed-records-event-pb-plot-stage {
      position: relative;
      width: 100%;
      max-width: none;
      margin-top: 0.35rem;
      box-sizing: border-box;
    }
    .speed-records-event-pb-plot-empty-msg {
      margin: 0.35rem 0 0;
    }
    .speed-records-event-pb-plot-root {
      width: 100%;
      min-height: min(52vh, 520px);
      max-width: none;
      box-sizing: border-box;
    }
    .speed-records-event-pb-plot-root .modebar {
      opacity: 0.85;
    }
    .speed-records-event-pb-plots-grid {
      display: flex;
      flex-direction: column;
      gap: 1.25rem;
      margin-top: 0.5rem;
    }
    .speed-records-event-pb-plot-cell {
      min-width: 0;
    }
    .speed-records-event-pb-plot-route-title {
      font-size: 0.95rem;
      margin: 0 0 0.35rem;
      color: var(--text);
    }
    .speed-records-event-pb-plot-root .js-plotly-plot {
      border-radius: 6px;
      border: 1px solid var(--border);
      overflow: hidden;
    }
    .speed-records-event-pb-plot-frame {
      fill: none;
      stroke: var(--border);
      stroke-width: 1;
    }
    .speed-records-event-pb-plot-grid-v,
    .speed-records-event-pb-plot-grid-h {
      stroke: color-mix(in srgb, var(--border) 70%, transparent);
      stroke-width: 1;
    }
    .speed-records-event-pb-plot-axis {
      font-size: 0.62rem;
      fill: var(--muted);
    }
    .speed-records-event-pb-plot-axis-label {
      font-size: 0.68rem;
      fill: var(--muted);
    }
    .speed-records-event-pb-plot-empty {
      font-size: 0.78rem;
      fill: var(--muted);
    }
    .speed-records-event-pb-plot-legend {
      display: flex;
      flex-wrap: wrap;
      gap: 0.35rem 0.5rem;
      margin-top: 0.35rem;
      max-width: min(100%, 44rem);
    }
    .speed-records-event-pb-plot-legend-chip {
      display: inline-block;
      font-size: 0.68rem;
      padding: 0.12rem 0.4rem;
      border-radius: 4px;
      border: 1px solid;
      background: color-mix(in srgb, var(--panel) 92%, transparent);
    }
    .speed-records-route-boards {
      width: 100%;
      max-width: min(100%, 64rem);
      margin: 0 0 0.35rem;
      box-sizing: border-box;
    }
    .speed-records-route-boards-head {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.5rem 1rem;
      margin-bottom: 0.5rem;
    }
    .speed-records-country-filter-label {
      display: inline-flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.35rem 0.5rem;
    }
    .speed-records-country-iso-select {
      font: inherit;
      padding: 0.25rem 0.45rem;
      min-width: 7rem;
      max-width: min(100%, 12rem);
    }
    .speed-records-route-topn-label {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      font: inherit;
    }
    .speed-records-route-topn-select {
      font: inherit;
      padding: 0.28rem 0.45rem;
      min-width: 3.25rem;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--panel);
      color: var(--text);
    }
    .speed-records-dedupe-mode-label {
      display: inline-flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.35rem 0.5rem;
    }
    .speed-records-dedupe-mode-select {
      font: inherit;
      padding: 0.28rem 0.45rem;
      min-width: 12rem;
      max-width: min(100%, 22rem);
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--panel);
      color: var(--text);
    }
    .speed-records-dedupe-mode-select:disabled {
      opacity: 0.45;
      cursor: not-allowed;
    }
    .speed-records-leaderboard-year-label,
    .speed-records-leaderboard-age-label {
      display: inline-flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.35rem 0.5rem;
    }
    .speed-records-leaderboard-event-year-select,
    .speed-records-leaderboard-age-band-select {
      font: inherit;
      padding: 0.28rem 0.45rem;
      min-width: 5.5rem;
      max-width: min(100%, 12rem);
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--panel);
      color: var(--text);
    }
    .speed-records-route-boards-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(17.25rem, 1fr));
      gap: 0.65rem 1rem;
      align-items: start;
    }
    .speed-records-route-board-title {
      margin: 0 0 0.3rem;
      font-size: 0.92rem;
      font-weight: 600;
      color: var(--text);
      min-height: 2.75rem;
      line-height: 1.25;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      overflow: hidden;
    }
    .speed-records-route-board-wrap {
      margin: 0;
    }
    table.speed-records-route-board-table {
      width: 100%;
      font-size: 0.86rem;
      table-layout: fixed;
    }
    .speed-records-route-board-th-rank,
    .speed-records-route-board-rank {
      width: 2.35rem;
      min-width: 2.1rem;
      max-width: 2.65rem;
      padding-left: 0.12rem;
      padding-right: 0.12rem;
      text-align: center;
      box-sizing: border-box;
      white-space: nowrap;
    }
    .speed-records-route-boards-grid .speed-records-route-board-table thead th {
      box-sizing: border-box;
      height: auto;
      min-height: 2.35rem;
      max-height: none;
      padding: 0.4rem 0.45rem;
      vertical-align: middle;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    /* Table-cell ``height`` is a minimum in CSS tables; fixed row sync uses inner boxes. */
    .speed-records-route-boards-grid .speed-records-route-board-table tbody td {
      box-sizing: border-box;
      vertical-align: top;
      padding: 0;
      overflow: visible;
    }
    .speed-records-route-board-rank-inner,
    .speed-records-route-board-cell-inner {
      height: var(--speed-records-route-cell-height, 7.4rem);
      min-height: var(--speed-records-route-cell-height, 7.4rem);
      max-height: var(--speed-records-route-cell-height, 7.4rem);
      box-sizing: border-box;
      padding: 0.35rem 0.45rem;
      overflow-x: hidden;
      overflow-y: auto;
      scrollbar-gutter: stable;
    }
    .speed-records-route-board-rank-inner {
      display: flex;
      justify-content: center;
      align-items: flex-start;
      line-height: 1.35;
    }
    .speed-records-route-board-cell {
      vertical-align: top;
      line-height: 1.35;
      word-break: break-word;
      white-space: normal;
    }
    td.speed-records-route-board-cell--pb {
      cursor: pointer;
    }
    td.speed-records-route-board-cell--pb .speed-records-route-board-athlete-name {
      font-weight: inherit;
      color: inherit;
    }
    .speed-records-route-board-cell-inner {
      line-height: 1.35;
      word-break: break-word;
      white-space: normal;
    }
    .speed-records-route-board-cell-time {
      font-weight: 600;
      margin-right: 0.2rem;
    }
    .speed-records-route-board-cell-date {
      display: block;
      margin: 0.18rem 0 0.28rem;
      padding: 0.06rem 0;
      line-height: 1.45;
      font-size: 0.88em;
      color: var(--muted);
    }
    .speed-records-route-board-event-name {
      display: inline;
      word-break: break-word;
      font-size: 0.88em;
      font-weight: inherit;
      color: var(--muted);
    }
    .speed-records-scope-ingest-bar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.5rem 0.75rem;
      margin: 0 0 0.75rem;
    }
    .speed-records-scope-ingest-fetched {
      flex: 1 1 14rem;
      margin: 0;
    }
    .speed-records-scope-ingest-result {
      flex-basis: 100%;
      margin: 0;
    }
    .speed-records-refetch-all-btn {
      flex-shrink: 0;
      font-size: 0.82rem;
      line-height: 1.2;
      padding: 0.28rem 0.52rem;
      border-radius: 7px;
      border: 1px solid var(--border);
      background: var(--panel);
      color: var(--muted);
      cursor: pointer;
    }
    .speed-records-refetch-all-btn:hover {
      background: var(--panel-muted);
      color: var(--text);
    }
    .speed-records-refetch-all-btn:disabled {
      opacity: 0.6;
      cursor: not-allowed;
    }
    .speed-records-toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.5rem 0.75rem;
      margin-bottom: 0;
    }
    .speed-records-label {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
    }
    .speed-records-field {
      display: inline-flex;
      align-items: flex-start;
      gap: 0.35rem;
    }
    .speed-records-event-combo {
      position: relative;
      display: inline-flex;
      align-items: stretch;
      vertical-align: middle;
    }
    .speed-records-event-select-sr {
      position: absolute !important;
      width: 1px !important;
      height: 1px !important;
      padding: 0 !important;
      margin: -1px !important;
      overflow: hidden !important;
      clip: rect(0, 0, 0, 0) !important;
      white-space: nowrap !important;
      border: 0 !important;
    }
    .speed-records-event-trigger {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      min-width: 10rem;
      max-width: 22rem;
      justify-content: flex-start;
      text-align: left;
      font: inherit;
      padding: 0.25rem 0.5rem;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--panel);
      color: var(--text);
      cursor: pointer;
      box-sizing: border-box;
    }
    .speed-records-event-trigger:hover {
      background: var(--panel-muted);
    }
    .speed-records-event-trigger:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .speed-records-event-trigger-label {
      flex: 1;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .speed-records-event-panel {
      position: absolute;
      left: 0;
      top: calc(100% + 2px);
      min-width: 100%;
      max-width: min(100vw - 2rem, 28rem);
      max-height: 18rem;
      overflow: auto;
      z-index: 5000;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--panel);
      box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
    }
    .speed-records-event-list {
      list-style: none;
      margin: 0;
      padding: 0.25rem 0;
    }
    .speed-records-event-li {
      display: flex;
      align-items: flex-start;
      gap: 0.45rem;
      padding: 0.35rem 0.65rem;
      cursor: pointer;
      font-size: 0.92em;
      line-height: 1.35;
    }
    .speed-records-event-li:hover {
      background: var(--panel-muted);
    }
    .speed-records-event-li-text {
      flex: 1;
      min-width: 0;
    }
    .speed-records-ingest-icon {
      flex-shrink: 0;
      width: 1.15em;
      text-align: center;
      font-weight: 700;
      line-height: 1.25;
      font-size: 0.95em;
    }
    .speed-records-ingest-icon--loaded {
      color: var(--ok);
    }
    .speed-records-ingest-icon--partial {
      color: #ca8a04;
    }
    .speed-records-ingest-icon--excluded {
      color: #dc2626;
    }
    .speed-records-ingest-icon--none {
      visibility: hidden;
      width: 1.15em;
    }
    .speed-records-select {
      min-width: 10rem;
      max-width: 22rem;
    }
    .speed-records-toolbar-meta {
      flex: 1 1 14rem;
      min-width: 10rem;
      text-align: right;
      line-height: 1.35;
    }
    .speed-records-category-panel {
      width: 100%;
      max-width: min(100%, 52rem);
      margin: 0 0 1rem;
    }
    .speed-records-category-title {
      margin: 0 0 0.45rem;
      font-size: 0.95rem;
      font-weight: 600;
      color: var(--text);
    }
    .speed-records-category-msg:not([hidden]) {
      margin: 0 0 0.35rem;
    }
    .speed-records-category-table-wrap {
      margin-top: 0.25rem;
    }
    .speed-records-category-td-route {
      min-width: 9rem;
      max-width: 16rem;
      vertical-align: middle;
    }
    .speed-records-category-td-bests {
      min-width: 8.5rem;
      max-width: 14rem;
      vertical-align: middle;
    }
    .speed-records-cat-bests {
      font-size: 0.86rem;
      line-height: 1.35;
    }
    .speed-records-cat-best-line--male {
      color: var(--gender-icon-male);
    }
    .speed-records-cat-best-line--female {
      color: var(--gender-icon-female);
    }
    .speed-records-cat-best-time {
      font-weight: 600;
    }
    .speed-records-cat-best-athlete-name {
      display: inline-block;
      font-weight: 400;
      font-size: 0.92em;
      color: var(--muted-fg, var(--text-muted, #888));
    }
    .speed-records-cat-best-athletes {
      margin-top: 0.25rem;
      font-size: 0.82em;
      line-height: 1.3;
    }
    .speed-records-cat-best-athletes-line + .speed-records-cat-best-athletes-line {
      margin-top: 0.2em;
    }
    .speed-records-category-table .speed-records-cat-select {
      min-width: 10rem;
      max-width: 100%;
      font: inherit;
      padding: 0.28rem 0.4rem;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: var(--bg);
      color: var(--text);
    }
    .speed-records-category-table .speed-records-cat-select--gender {
      font-feature-settings: "liga" 0;
    }
    .speed-records-category-table
      .speed-records-cat-select--gender.speed-records-cat-select--gender-male {
      color: var(--gender-icon-male);
    }
    .speed-records-category-table
      .speed-records-cat-select--gender.speed-records-cat-select--gender-female {
      color: var(--gender-icon-female);
    }
    .speed-records-category-table .speed-records-cat-select--gender option {
      font-size: 0.95em;
    }
    .speed-records-category-table
      .speed-records-cat-select--gender
      option[value="1"] {
      color: var(--gender-icon-male);
    }
    .speed-records-category-table
      .speed-records-cat-select--gender
      option[value="0"] {
      color: var(--gender-icon-female);
    }
    .speed-records-gender-icon {
      font-weight: 600;
    }
    .speed-records-gender-icon--male {
      color: var(--gender-icon-male);
    }
    .speed-records-gender-icon--female {
      color: var(--gender-icon-female);
    }
    .speed-records-events-table-wrap {
      overflow-x: auto;
    }
    table.speed-records-events-table thead th.th-sortable {
      vertical-align: bottom;
    }
    table.speed-records-events-table thead th .admin-th-sort {
      width: 100%;
      text-align: left;
    }
    table.speed-records-events-table thead th.speed-records-events-tag-cell .admin-th-sort {
      white-space: normal;
    }
    .speed-records-events-event-cell {
      vertical-align: top;
      min-width: 12rem;
      max-width: 28rem;
    }
    .speed-records-events-event-line1 {
      font-weight: 600;
    }
    .speed-records-events-event-line2 {
      margin-top: 0.2rem;
      line-height: 1.35;
    }
    .speed-records-events-event-line2 > a {
      font-weight: 500;
    }
    .speed-records-events-source-part {
      color: var(--muted-fg, var(--text-muted, #888));
      font-size: 0.92em;
    }
    .speed-records-events-event-line3 {
      margin-top: 0.2rem;
      font-size: 0.88em;
      color: var(--muted-fg, var(--text-muted, #888));
      line-height: 1.35;
    }
    a.speed-records-events-settings-link.traffic-retention-settings-btn {
      text-decoration: none;
      color: inherit;
      box-sizing: border-box;
    }
    .speed-records-events-actions-cell {
      width: 3.25rem;
      text-align: center;
      vertical-align: middle;
      white-space: nowrap;
    }
    .speed-records-events-settings-btn.traffic-retention-settings-btn {
      width: 2.25rem;
      height: 2.25rem;
    }
    .speed-records-events-tag-cell {
      min-width: 9.5rem;
      max-width: 22rem;
      vertical-align: top;
    }
    .speed-records-events-tag-stack {
      display: flex;
      flex-direction: column;
      gap: 0.45rem;
    }
    .speed-records-events-round-block + .speed-records-events-round-block {
      margin-top: 0.15rem;
    }
    .speed-records-events-round-label {
      font-size: 0.78em;
      font-weight: 600;
      color: var(--muted-fg, var(--text-muted, #888));
      margin-bottom: 0.15rem;
    }
    .speed-records-events-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 0.3rem 0.35rem;
      align-items: center;
    }
    .speed-records-events-tag {
      display: inline-flex;
      align-items: center;
      gap: 0.2rem;
      flex-wrap: wrap;
      padding: 0.12rem 0.42rem;
      border-radius: 999px;
      font-size: 0.78em;
      line-height: 1.35;
      background: var(--surface-2, rgba(128, 128, 128, 0.1));
      border: 1px solid var(--border-color, rgba(128, 128, 128, 0.35));
    }
    .speed-records-events-tag--excluded {
      background: var(--surface-2, rgba(192, 57, 43, 0.1));
      border-color: var(--danger-border, rgba(192, 57, 43, 0.35));
    }
    .speed-records-events-tag--excluded-struck {
      border-style: dashed;
      color: #b91c1c;
      background: var(--surface-2, rgba(192, 57, 43, 0.12));
      border-color: var(--danger-border, rgba(192, 57, 43, 0.45));
    }
    .speed-records-events-tag--excluded-struck .speed-records-events-tag-name {
      text-decoration: line-through;
      text-decoration-thickness: 1px;
      text-decoration-color: rgba(185, 28, 28, 0.85);
    }
    .speed-records-events-tag--excluded-struck .speed-records-gender-icon--male {
      color: var(--gender-icon-male);
    }
    .speed-records-events-tag--excluded-struck .speed-records-gender-icon--female {
      color: var(--gender-icon-female);
    }
    .speed-records-events-tag-name {
      font-weight: 500;
    }
    .speed-records-category-table .speed-records-category-col-exclude,
    .speed-records-category-table .speed-records-category-td-exclude {
      width: 8.25rem;
      text-align: center;
      vertical-align: middle;
    }
    .speed-records-exclude-th-wrap {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.2rem;
      line-height: 1.2;
    }
    .speed-records-exclude-th-title {
      font-weight: 600;
    }
    .speed-records-exclude-select-all-label {
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      gap: 0.1rem;
      cursor: pointer;
      user-select: none;
    }
    .speed-records-exclude-select-all {
      width: 1.1rem;
      height: 1.1rem;
      cursor: pointer;
      accent-color: var(--accent);
    }
    .speed-records-exclude-select-all-text {
      font-size: 0.75rem;
      line-height: 1.1;
      max-width: 6.5rem;
      text-wrap: balance;
    }
    .speed-records-exclude-cell {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-wrap: wrap;
      gap: 0.35rem 0.5rem;
    }
    .speed-records-cat-db-icon {
      display: inline-flex;
      line-height: 0;
      color: var(--muted-fg, var(--text-muted, #888));
    }
    .speed-records-cat-db-icon.speed-records-cat-db-icon--has-data {
      color: var(--ok);
    }
    .speed-records-exclude-checkbox {
      width: 1.1rem;
      height: 1.1rem;
      cursor: pointer;
      accent-color: var(--accent);
    }
    .speed-records-exclude-checkbox:disabled {
      opacity: 0.45;
      cursor: not-allowed;
    }
    .speed-records-toolbar-actions {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-start;
      gap: 0.5rem 0.75rem;
      margin: 0.75rem 0 0;
      justify-content: flex-start;
    }
    .speed-records-toolbar-load-block {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.35rem;
    }
    .speed-records-toolbar-load-block .speed-records-source-link-wrap {
      margin: 0;
    }
    .speed-records-load-btn {
      font: inherit;
      padding: 0.4rem 0.75rem;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--panel);
      color: var(--text);
      cursor: pointer;
    }
    .speed-records-load-btn:hover {
      background: var(--panel-muted);
    }
    .speed-records-load-btn:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .speed-records-load-btn:disabled {
      opacity: 0.55;
      cursor: not-allowed;
    }
    .speed-records-delete-times-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0.35rem;
      line-height: 0;
      border-radius: 8px;
      border: 1px solid rgba(220, 38, 38, 0.45);
      background: var(--panel);
      color: #b91c1c;
      cursor: pointer;
      min-width: 2.5rem;
      min-height: 2.5rem;
    }
    .speed-records-delete-times-btn svg {
      flex-shrink: 0;
    }
    .speed-records-delete-times-btn:hover:not(:disabled) {
      background: rgba(220, 38, 38, 0.08);
    }
    .speed-records-delete-times-btn:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .speed-records-delete-times-btn:disabled {
      opacity: 0.55;
      cursor: not-allowed;
    }
    .speed-records-event-filter-btn {
      font: inherit;
      padding: 0.4rem 0.75rem;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--panel-muted);
      color: var(--text);
      cursor: pointer;
    }
    .speed-records-event-filter-btn:hover:not(:disabled) {
      background: var(--sticky-bg-hover);
    }
    .speed-records-event-filter-btn.is-pressed {
      background: rgba(37, 99, 235, 0.1);
      border-color: var(--accent);
      color: var(--accent);
      font-weight: 600;
    }
    .speed-records-event-filter-btn:disabled {
      opacity: 0.45;
      cursor: not-allowed;
    }
    .speed-records-best-cell {
      white-space: normal;
      font-size: 0.9em;
      line-height: 1.35;
      vertical-align: top;
      max-width: 11rem;
    }
    .speed-records-source-link-wrap {
      margin: 0;
      word-break: break-all;
      max-width: min(100%, 24rem);
      font-size: 0.88em;
      line-height: 1.35;
    }
    .speed-records-source-link-wrap a {
      color: var(--accent);
    }
    .speed-records-view-body {
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
    }
    .speed-records-table-host {
      overflow: auto;
      width: 100%;
      max-width: 100%;
    }
    .filterable-table-toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-start;
      justify-content: flex-start;
      gap: 0.5rem 1rem;
      margin-bottom: 0.5rem;
    }
    .filterable-table-toolbar-right {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: flex-end;
      gap: 0.5rem 0.75rem;
      margin-left: auto;
    }
    .filterable-table-toolbar-summary {
      text-align: right;
      white-space: pre-line;
      line-height: 1.35;
      max-width: min(100%, 28rem);
      font-size: 0.88rem;
      color: var(--muted, #64748b);
    }
    .filterable-table-page-size-label {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      font-size: 0.88rem;
    }
    .filterable-table-page-size-select {
      font: inherit;
      padding: 0.25rem 0.4rem;
      min-width: 4rem;
    }
    .filterable-table-pager {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
    }
    .filterable-table-pager-btn {
      min-width: 2rem;
      padding: 0.25rem 0.45rem;
      line-height: 1.2;
    }
    .filterable-table-foot {
      margin-top: 0.5rem;
      font-size: 0.88rem;
      color: var(--muted, #64748b);
    }
    .filterable-table-foot[hidden] {
      display: none !important;
    }
    table.results-table.filterable-table td a {
      color: var(--accent, #2563eb);
      text-decoration: underline;
      text-underline-offset: 2px;
    }
    table.results-table.filterable-table tbody tr.filterable-table-row--clickable {
      cursor: pointer;
    }
    table.results-table.filterable-table tbody tr.filterable-table-row--clickable:hover td {
      background: var(--sticky-bg-hover);
    }
    table.results-table.filterable-table td a:hover {
      text-decoration-thickness: 2px;
    }
    .filterable-table-wrap {
      overflow: auto;
      width: 100%;
      max-width: 100%;
    }
    table.results-table.filterable-table {
      width: 100%;
      table-layout: auto;
    }
    .speed-records-table-msg:empty {
      display: none;
    }
    .filterable-table-th {
      display: flex;
      align-items: center;
      gap: 0.25rem;
      flex-wrap: wrap;
      white-space: normal;
    }
    .filterable-table-th-label {
      font-weight: 600;
    }
    .filterable-table-sort-btn,
    .filterable-table-filter-btn {
      font-size: 0.75rem;
      padding: 0.15rem 0.32rem;
      line-height: 1;
      border-radius: 0.2rem;
      border: 1px solid var(--border, #cbd5e1);
      background: var(--panel, #fff);
      color: var(--text, #0f172a);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 1.65rem;
      min-height: 1.65rem;
      flex-shrink: 0;
    }
    .filterable-table-sort-btn svg,
    .filterable-table-filter-btn svg {
      display: block;
      vertical-align: middle;
    }
    .filterable-table-sort-btn.is-active,
    .filterable-table-filter-btn.is-active {
      border-color: var(--accent, #2563eb);
      background: color-mix(in srgb, var(--accent, #2563eb) 18%, var(--panel, #ffffff));
      color: var(--text, #0f172a);
      box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent, #2563eb) 32%, transparent);
    }
    .filterable-table-sort-btn.is-active:hover,
    .filterable-table-filter-btn.is-active:hover {
      background: color-mix(in srgb, var(--accent, #2563eb) 26%, var(--panel, #ffffff));
    }
    .filterable-table-filter-panel {
      max-height: min(70vh, 22rem);
      width: min(18rem, 92vw);
      overflow: auto;
      padding: 0.5rem;
      border-radius: 0.35rem;
      border: 1px solid var(--border, #cbd5e1);
      background: var(--panel, #fff);
      box-shadow: 0 4px 18px rgba(15, 23, 42, 0.12);
    }
    .filterable-table-filter-panel-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      margin-bottom: 0.35rem;
    }
    .filterable-table-filter-panel-title {
      font-weight: 600;
      font-size: 0.85rem;
      line-height: 1.2;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .filterable-table-filter-panel-close {
      flex-shrink: 0;
      font-size: 1.1rem;
      line-height: 1;
      padding: 0.1rem 0.35rem;
      min-width: 1.65rem;
      min-height: 1.65rem;
      border-radius: 0.2rem;
      border: 1px solid var(--border, #cbd5e1);
      background: var(--panel, #fff);
      color: var(--text, #0f172a);
      cursor: pointer;
    }
    .filterable-table-filter-panel-close:hover {
      background: var(--sticky-bg-hover, #f1f5f9);
    }
    .filterable-table-filter-search {
      width: 100%;
      margin-bottom: 0.35rem;
      font: inherit;
      padding: 0.25rem 0.4rem;
    }
    .filterable-table-filter-actions {
      display: flex;
      gap: 0.35rem;
      margin-bottom: 0.35rem;
    }
    .filterable-table-filter-actions button {
      font-size: 0.78rem;
      padding: 0.15rem 0.45rem;
    }
    .filterable-table-filter-row {
      display: flex;
      align-items: center;
      gap: 0.35rem;
      font-size: 0.82rem;
      margin: 0.12rem 0;
    }

