.app-header.workspace-header {
  position: relative;
  z-index: 40;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "brand picker system account" "sections sections sections sections";
  gap: 8px 14px;
}
.skip-link:focus { z-index: 50; }
.workspace-main, .workspace-mobile-control, .workspace-mobile-category { display: none; }
.workspace-desktop-control { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.workspace-picker { grid-area: picker; min-width: 0; max-width: 100%; justify-self: start; }
.workspace-picker-name { overflow: hidden; text-overflow: ellipsis; }
.workspace-system { grid-area: system; }
.workspace-main, .workspace-picker, .workspace-system, .enroll-category-picker { position: relative; }
.workspace-header details > summary, .enroll-category-picker > summary { list-style: none; }
.workspace-header details > summary::-webkit-details-marker,
.enroll-category-picker > summary::-webkit-details-marker { display: none; }
.workspace-picker > summary { max-width: 100%; }
.workspace-header:has(> [data-header-disclosure][open] > :is(.workspace-popover, .account-popover):not([data-dropdown-offscreen]))::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 42;
  background: #10281eb3;
}
.workspace-header [data-header-disclosure][open] > summary {
  position: relative;
  z-index: 44;
  background: #2c5947;
}
.workspace-header .account-popover { z-index: 45; }
.workspace-header .account-action { justify-content: flex-start; gap: 8px; }
.workspace-header details[open] > summary .workspace-desktop-control > svg { transform: rotate(180deg); }
.workspace-popover {
  position: absolute;
  top: calc(100% + 8px);
  z-index: 45;
  width: min(340px, calc(100vw - 24px));
  --dropdown-max-height: min(55vh, 420px);
  max-height: var(--dropdown-max-height);
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 8px 28px #19362a24;
}
.workspace-system .workspace-popover, .enroll-category-picker .workspace-popover { right: 0; }
.workspace-popover p { margin: 6px 10px; font-size: 12px; color: var(--color-muted); }
.workspace-popover a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--color-primary);
  font-size: 14px;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.workspace-header .workspace-popover a,
.workspace-sections a { gap: 8px; }
.workspace-header .workspace-popover a > .icon,
.workspace-header .account-action > .icon,
.workspace-sections a > .icon { width: 17px; height: 17px; }
.workspace-popover a:hover, .workspace-popover a[aria-current] { background: var(--color-soft); }
.workspace-header .workspace-popover a:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; }
.workspace-popover .workspace-all { margin-top: 4px; border-top: 1px solid var(--color-border); font-weight: 600; }
.workspace-sections {
  grid-area: sections;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid #ffffff33;
}
.workspace-sections a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px;
  border-radius: 7px;
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-size: 13px;
}
.workspace-sections a:hover { background: #ffffff18; }
.workspace-sections a[aria-current] { background: var(--color-accent); color: var(--color-primary); font-weight: 700; }
.app-page .category-tabs.task-tabs > a {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  justify-items: center;
  gap: 3px;
  padding: 6px 8px;
  line-height: 1.15;
}
.app-page .category-tabs.task-tabs .icon { width: 20px; height: 20px; }
.app-page .category-tabs.task-tabs > a > :is(.category-tab-label, .category-tab-short) {
  display: block;
  font: inherit;
  opacity: 1;
}
.app-page .category-tabs.task-tabs > a > .category-tab-short { display: none; }
.app-page .category-tabs.task-tabs > a[aria-selected="true"] {
  border-color: transparent;
  background: var(--color-accent);
  color: var(--color-primary);
}
@media (width > 768px) {
  .app-page .category-tabs.task-tabs > a[aria-selected="true"] {
    border-color: #aec5b4;
    background: #d6e5d9;
  }
}
.tournament-player-panel .tournament-player-toolbar { align-items: center; }
.tournament-player-filters { flex: 1; margin: 0; }
.tournament-player-toolbar .enroll-category-picker { margin-inline-start: auto; }
.roster-results-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; margin: 12px 0; font-size: 13px; }
.roster-results-summary p { margin: 0; color: var(--color-muted); }
.roster-results-summary strong { color: var(--color-text); }
.roster-pagination { padding-top: 10px; }
.tournament-player-table th:first-child { width: 32%; }
.tournament-player-table th:nth-child(2) { width: 37%; }
.sport-table.tournament-player-table td { vertical-align: middle; }
.roster-player-actions { position: relative; display: flex; align-items: center; gap: 2px; }
.roster-player-actions .favorite-icon-control { position: static; }
.roster-player .roster-player-actions .favorite-feedback { inset-inline: 0 auto; }
.roster-player .participant-results-link {
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 700;
}
.roster-categories { display: flex; flex-wrap: wrap; gap: 4px 6px; list-style: none; margin: 0; padding: 0; }
.roster-categories li { max-width: 100%; }
.roster-categories a {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--color-soft);
  color: var(--color-primary);
  font-size: 12px;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.roster-categories a:hover { text-decoration: underline; }
.roster-encounter { overflow-wrap: anywhere; }
.roster-encounter-status { color: var(--color-muted); }
.roster-match-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: min(100%, 13rem);
  min-height: 44px;
  padding: 7px 10px;
  color: var(--color-primary);
}
.roster-match-card:hover, .roster-match-card:focus-visible {
  border-color: var(--color-primary);
  background: var(--color-soft);
}
.roster-match-card > .icon { width: 15px; height: 15px; }
.roster-match-content { display: grid; gap: 2px; line-height: 1.35; }
.roster-match-title { font-weight: 600; }
time.roster-match-title { display: flex; align-items: baseline; gap: 0.35em; }
time.roster-match-title > :last-child { white-space: nowrap; }
.roster-match-content small { margin: 0; }
@media (max-width: 768px) {
  .app-header.workspace-header {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    grid-template-areas: "menu picker brand account" "category category category category";
    gap: 0 4px;
    align-items: center;
  }
  .workspace-main { display: block; grid-area: menu; }
  .workspace-header .brand-link { justify-self: start; margin-inline-start: 6px; }
  .workspace-system, .workspace-desktop-control, .workspace-sections { display: none; }
  .workspace-header .workspace-icon-control {
    width: 44px;
    height: 44px;
    padding: 0;
    border-color: transparent;
  }
  .workspace-mobile-control { display: grid; justify-items: center; gap: 2px; }
  .workspace-mobile-control .icon { width: 21px; height: 21px; }
  .workspace-mobile-control small { font-size: 10px; font-weight: 600; line-height: 1; }
  .workspace-popover .workspace-system-label { margin: 4px 0 0; padding: 8px 10px 0; border-top: 1px solid var(--color-border); }
  .workspace-main > .workspace-popover { inset-inline-start: 0; }
  .workspace-picker > .workspace-popover:not([data-anchored-dropdown]) {
    inset-inline-start: 0;
    max-width: calc(100vw - 48px - 2 * var(--mobile-gutter));
  }
  .workspace-main .workspace-popover a[aria-current] {
    background: var(--color-accent);
    font-weight: 700;
  }
  .workspace-mobile-category:not(:empty) { display: block; grid-area: category; }
  .app-page .category-tabs.task-tabs {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(44px, 1fr);
    gap: 3px;
    padding: 3px;
    overflow-x: auto;
  }
  .app-page .category-tabs.task-tabs > a {
    padding: 4px 2px;
    font-size: .6875rem;
    white-space: nowrap;
  }
  .app-page .category-tabs.task-tabs > a:last-child:nth-child(odd) { grid-column: auto; }
  .app-page .category-tabs.task-tabs > a > .category-tab-short { display: block; }
  .app-page .category-tabs.task-tabs .category-tab-label:has(+ .category-tab-short) { display: none; }
  .app-page .category-tabs.task-tabs .icon { width: 17px; height: 17px; }
  .workspace-mobile-category .category-tabs.task-tabs {
    margin: 5px 0 0;
    border: 0;
    border-top: 1px solid #ffffff33;
    border-radius: 0;
    padding: 5px 0 0;
    background: transparent;
  }
  .workspace-mobile-category .category-tabs.task-tabs > a { color: #fff; }
  .workspace-mobile-category .category-tabs.task-tabs > a:not([aria-selected="true"]):hover { background: #ffffff18; color: #fff; }
  .workspace-mobile-category .category-tabs.task-tabs > a:focus-visible { outline-offset: -3px; }
  .workspace-mobile-category .category-tabs.task-tabs > a[aria-selected="true"]:focus-visible { outline-color: var(--color-primary); }
  .sport-table.tournament-player-table { display: block; min-width: 0; border-top: 1px solid var(--color-border); }
  .tournament-player-table :is(thead, tbody) { display: block; }
  .tournament-player-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) min(48%, 16rem);
    column-gap: 10px;
    padding-inline: 6px;
  }
  .tournament-player-table thead tr { background: var(--color-bg); border-bottom: 1px solid var(--collection-rule); }
  .tournament-player-table.collection-table thead th { width: auto; padding: 6px 0; border: 0; white-space: normal; }
  .tournament-player-table.collection-table thead th:nth-child(2) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .tournament-player-table thead th:last-child { grid-column: 2; }
  .tournament-player-table tbody tr {
    grid-template-rows: auto 1fr;
    align-items: start;
    row-gap: 3px;
    padding-block: 8px;
    border-bottom: 1px solid var(--color-border);
  }
  .tournament-player-table tbody tr:last-child { border-bottom: 0; }
  .sport-table.tournament-player-table td:not(.empty-cell) { padding: 0; border: 0; }
  .roster-player .participant-results-link { padding-block: 4px; }
  .tournament-player-table .roster-encounter { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .roster-match-card { gap: 6px; padding-inline: 7px; }
  .roster-match-card > .icon { width: 13px; height: 13px; }
}

