    :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;
    }
    * { box-sizing: border-box; }
    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;
    }
    .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-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;
    }
    .athletes-detail-list-chip-add {
      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;
    }
    .athletes-detail-list-chip-add:hover {
      color: #16a34a;
      background: rgba(22, 163, 74, 0.1);
    }
    .athletes-detail-list-chip-add: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-table-wrap + .admin-groups-permissions-block {
      margin-top: 1.25rem;
    }
    .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;
    }
    .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 {
      cursor: pointer;
      font: inherit;
      color: inherit;
      text-align: center;
    }
    .admin-viewer-stats-now button.admin-viewer-stat-card.traffic-stat-card-registered: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-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(28rem, 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;
    }
    .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-athlete-list-athletes-overlay-dialog {
      max-width: min(36rem, 100vw);
    }
    .admin-athlete-list-sharing-overlay-dialog {
      max-width: min(32rem, 100vw);
    }
    .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: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-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-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-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-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);
    }
    .admin-user-settings-panel {
      margin: 0.75rem 0 1rem;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: var(--panel);
      overflow: hidden;
    }
    .admin-user-settings-panel[hidden] {
      display: none !important;
    }
    .admin-user-settings-panel-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      padding: 0.45rem 0.5rem 0.45rem 0.75rem;
      background: var(--panel-muted);
      border-bottom: 1px solid var(--border);
    }
    .admin-user-settings-panel-title {
      font-size: 0.88rem;
      font-weight: 600;
      color: var(--text);
    }
    .admin-user-settings-panel-close {
      flex-shrink: 0;
      width: 2rem;
      height: 2rem;
      padding: 0;
      margin: 0;
      border: none;
      border-radius: 6px;
      background: transparent;
      color: var(--muted);
      font-size: 1.35rem;
      line-height: 1;
      cursor: pointer;
    }
    .admin-user-settings-panel-close:hover {
      background: var(--panel);
      color: var(--text);
    }
    .admin-user-settings-panel-close:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .admin-user-settings-panel .admin-settings-pre {
      margin: 0;
      padding: 0.75rem 1rem;
      background: var(--pre-bg);
      border: none;
      border-radius: 0;
      font-size: 0.78rem;
      line-height: 1.45;
      overflow-x: auto;
      max-height: 22rem;
      overflow-y: auto;
    }
    .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;
      padding: 1.25rem 1.5rem 2rem;
      max-width: 1200px;
      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-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);
    }
    .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;
    }
    .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 {
      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::-webkit-details-marker { display: none; }
    .round-block .round-inner { padding: 0 0.75rem 0.85rem; }
    .results-table-wrap {
      overflow-x: auto;
      border-radius: 8px;
      border: 1px solid var(--border);
      margin-top: 0.35rem;
    }
    .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;
      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 {
      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-name {
      min-width: 0;
      flex: 1 1 auto;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .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 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: 1px dashed var(--border);
      color: var(--muted);
      font-weight: 500;
    }
    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.td-score {
      text-align: center;
      vertical-align: middle;
      line-height: 1.25;
    }
    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 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.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;
    }
    table.results-athletes td.td-prior-round .prior-round-rank {
      font-weight: 700;
      font-variant-numeric: tabular-nums;
      margin-top: 0.15rem;
    }
    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);
    }
    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;
    }
    table.results-athletes td.td-athlete,
    table.results-athletes td.td-country {
      cursor: pointer;
    }
    /* 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;
    }
    table.results-athletes td.td-athlete:hover .athlete-cell-name-primary {
      text-decoration: underline;
      text-underline-offset: 2px;
    }
    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.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.cup-rankings-table td.cup-rankings-name-cell .athlete-cell-name-primary {
      display: inline-flex;
      align-items: center;
      flex-wrap: wrap;
      min-width: 0;
    }
    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;
    }
    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 {
      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 {
      text-decoration: none;
    }
    table.results-athletes .results-athlete-list-tag,
    table.registration-participants-table .results-athlete-list-tag,
    table.cup-rankings-table .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(--muted);
      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:focus,
    table.registration-participants-table .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.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-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: auto;
      padding: 0.28rem;
      min-width: 2.2rem;
      font-weight: 500;
      color: var(--text);
      border-color: var(--border);
      background: var(--panel);
    }
    .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);
    }
    .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-column-dialog {
      border: none;
      border-radius: 12px;
      padding: 0;
      max-width: min(440px, calc(100vw - 2rem));
      width: 100%;
      background: var(--panel);
      color: var(--text);
      box-shadow: 0 16px 48px rgba(15, 23, 42, 0.22);
    }
    .results-column-dialog::backdrop {
      background: rgba(15, 23, 42, 0.4);
    }
    .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-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-intro {
      margin: 0 0 0.3rem;
      font-size: 0.76rem;
      line-height: 1.32;
    }
    .results-column-dialog .col-dialog-section {
      margin-top: 0.34rem;
    }
    .results-column-dialog .col-dialog-section:first-of-type {
      margin-top: 0.12rem;
    }
    .results-column-dialog .col-dialog-section h4 {
      margin: 0 0 0.2rem;
      font-size: 0.67rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--muted);
      line-height: 1.2;
    }
    .col-dialog-list {
      list-style: none;
      margin: 0;
      padding: 0;
      border: 1px solid var(--border);
      border-radius: 8px;
      overflow: hidden;
    }
    .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;
    }
    .results-column-dialog .col-dialog-cup-settings-panel .col-dialog-disc-wrap {
      margin-top: 0;
      padding-top: 0.38rem;
      border-top: 1px solid var(--border);
      flex: none;
      min-width: 0;
    }
    .results-column-dialog .col-dialog-cup-settings-panel .col-dialog-disc-line {
      border: none;
      background: transparent;
      padding: 0.12rem 0.28rem 0.12rem 0;
      border-radius: 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-disc-section {
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.35rem 0.65rem;
    }
    .results-column-dialog .col-dialog-disc-section h4 {
      margin: 0;
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--muted-fg, #64748b);
      flex: 0 0 auto;
    }
    .results-column-dialog .col-dialog-disc-list {
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.35rem;
      flex: 1 1 auto;
      min-width: 0;
    }
    .col-dialog-disc-line {
      display: flex;
      align-items: flex-start;
      gap: 0.34rem;
      cursor: pointer;
      font-size: 0.8rem;
      line-height: 1.28;
      margin: 0;
      padding: 0.28rem 0.4rem;
      border: 1px solid var(--border);
      border-radius: 6px;
      background: var(--panel-muted);
    }
    .col-dialog-disc-line 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 {
      border: none;
      border-radius: 12px;
      padding: 0;
      max-width: min(480px, 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 {
      background: rgba(15, 23, 42, 0.4);
    }
    .results-highlights-dialog-inner {
      display: flex;
      flex-direction: column;
      min-height: 0;
      overflow: hidden;
      padding: 0 0.68rem 0;
      max-height: min(78vh, 32rem);
    }
    .results-column-dialog-inner .results-dialog-scroll,
    .results-highlights-dialog-inner .results-dialog-scroll {
      padding-top: 0.35rem;
    }
    .results-highlights-dialog-inner 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;
    }
    .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-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;
    }
    .results-highlights-dialog .settings-highlight-countries.highlights-dialog-country-names-host {
      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; }
    .raw-json details {
      margin-top: 0.75rem;
    }
    .raw-json summary {
      cursor: pointer;
      color: var(--muted);
      font-size: 0.85rem;
    }
    .raw-json-toolbar {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      align-items: center;
      gap: 0.35rem;
      margin: 0.35rem 0 0;
    }
    button.json-copy-btn {
      font-size: 0.72rem;
      padding: 0.15rem 0.5rem;
      min-height: 0;
      line-height: 1.2;
    }
    .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);
    }
    .app-admin-view .admin-view-tabs {
      flex-wrap: wrap;
    }
    .app-admin-view .admin-subtab-panel {
      margin-top: 0.15rem;
    }
    .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 .event-subtab[aria-selected="true"] {
      background: var(--panel);
      border-color: var(--accent);
      color: var(--accent);
    }
    .event-subpanel[hidden] {
      display: none !important;
    }
    .results-event-meta-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 0.35rem 1rem;
    }
    .results-event-meta-row #results-event-meta {
      margin: 0;
      flex: 1 1 10rem;
      min-width: 0;
    }
    .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 {
      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 {
      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;
    }
    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 {
      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 {
      box-sizing: border-box;
      min-width: 7rem;
      max-width: 100%;
      font-size: 0.8rem;
      padding: 0.24rem 0.45rem;
      padding-inline-end: 1.85rem;
    }
    .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.65rem;
      margin: 0.55rem 0 0.35rem;
    }
    .registration-list-compare-label {
      font-size: 0.8rem;
      color: var(--muted);
    }
    .registration-list-compare-select {
      min-width: min(18rem, 100%);
      max-width: 100%;
    }
    .registration-list-only-members-label,
    .registration-list-sort-separate-label {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      font-size: 0.8rem;
      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 td.td-reg-name,
    table.registration-participants-table td.td-reg-country {
      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-bib {
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
      max-width: 5rem;
    }
    table.registration-participants-table td.td-reg-birth {
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
    }
    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 {
      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 > span:first-child {
      white-space: normal;
      overflow-wrap: anywhere;
      word-break: break-word;
      min-width: 0;
      line-height: 1.25;
    }
    table.cup-rankings-table tbody tr:last-child td {
      border-bottom: none;
    }
    .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 {
      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-name-cell:hover .athlete-cell-name-primary {
      text-decoration: underline;
      text-underline-offset: 2px;
    }
    table.cup-rankings-table td.cup-rankings-country-cell:hover {
      text-decoration: underline;
      text-underline-offset: 2px;
    }
    table.cup-rankings-table td.cup-rankings-born-cell {
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
    }
    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-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 {
      margin-top: 0.05rem;
      max-width: 100%;
    }
    table.cup-rankings-table th.cup-rankings-th-event .cup-rankings-th-event-sort span:first-child {
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 100%;
    }
    .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;
    }
    .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: 6.75rem;
    }
    table.results-athletes td.td-boulder-potential {
      white-space: normal;
      line-height: 1.2;
    }
    table.results-athletes td.td-boulder-potential .boulder-potential-max {
      font-weight: 600;
      white-space: nowrap;
    }
    table.results-athletes td.td-boulder-potential .boulder-potential-delta {
      font-size: 0.85em;
      font-weight: 600;
      color: var(--muted);
      white-space: nowrap;
      margin-top: 0.12rem;
    }
    table.results-athletes td.td-boulder-potential--no-upside .boulder-potential-max {
      color: var(--muted);
      font-weight: 500;
    }
    table.cup-rankings-table td.cup-rankings-disc-sum-cell {
      text-align: right;
      white-space: nowrap;
    }
    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);
    }
    .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-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-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;
    }
    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;
    }
    .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-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 {
      grid-column: 1 / -1;
      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-owner-row {
      grid-column: 1 / -1;
      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: 14rem;
      font-size: 0.88rem;
      color: var(--muted);
      vertical-align: middle;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .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-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-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;
    }
    .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-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);
    }
    .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 tbody tr:last-child td {
      border-bottom: none;
    }
    .athletes-favorites-table tbody tr:hover td {
      background: var(--row-hover);
    }
    /* 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;
    }
    .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 {
      color: var(--muted);
      font-weight: 600;
      font-size: 0.82em;
    }
    .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 {
      flex: 1 1 auto;
      min-width: 0;
      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;
      max-width: 18rem;
    }
    a.athletes-favorite-open:visited {
      color: var(--accent);
    }
    .athletes-favorite-open:hover {
      color: var(--text);
    }
    .athletes-subtabs {
      display: flex;
      gap: 0.25rem;
      margin-bottom: 0.85rem;
      border-bottom: 1px solid var(--border);
      padding-bottom: 0;
    }
    .athletes-subtabs button {
      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 button:hover:not(:disabled) {
      color: var(--text);
      background: var(--panel-muted);
    }
    .athletes-subtabs button[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-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%;
    }
    .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-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-lists-group + .athletes-detail-lists-group {
      margin-top: 0.75rem;
    }
    .athletes-detail-lists-group-title {
      margin: 0 0 0.35rem;
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--muted);
    }
    .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;
    }
    @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;
      }
    }
