.public-timeline .presentation-tabs { grid-template-columns: repeat(4,minmax(0,1fr)); }
.public-teams { min-width: 0; }
.public-teams [hidden] { display: none!important; }
.team-directory-title { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 20px; margin: 16px 0; }
.public-teams h2,.public-teams h3 { color: var(--theme-heading-text,var(--header)); font-family: 'Barlow Condensed',Barlow,sans-serif; }
.team-directory-title h2 { font-size: 24px; margin: 0; }
#teamCount { font-size: 14px; color: var(--theme-muted-text,var(--mid)); }
.team-tools { display: flex; align-items: end; justify-content: flex-start; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 14px; }
.team-tools label { display: grid; gap: 5px; width: 230px; max-width: 100%; color: var(--theme-text,var(--dark)); }
.team-tools select,.team-tools input { margin: 0; width: 100%; height: 42px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 5px; background: #fff; color: var(--dark); font: inherit; }
#teamSearchLabel { width: 300px; }
.team-favorite-games { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; max-width: 100%; padding: 8px 14px; border: 1px solid var(--theme-button,var(--header)); border-radius: 5px; background: var(--theme-button,var(--header)); color: var(--theme-button-text,#fff); font: inherit; font-size: 14px; cursor: pointer; white-space: normal; }
.favorite-games-heading { font-family: 'Barlow Condensed',Barlow,sans-serif; font-size: 28px; color: var(--theme-heading-text,var(--header)); }
.team-status { font-size: 13px; }
.team-status:empty { display: none; }
#teamDirectory h3 { font-size: 20px; margin: 20px 0 8px; }
.directory-team-list { border: 1px solid var(--border); border-radius: 5px; overflow: hidden; background: #fff; }
.directory-team-row { position: relative; min-width: 0; border-bottom: 1px solid var(--border); }
.directory-team-row:last-child { border-bottom: 0; }
.directory-team-open { position: relative; width: 100%; min-height: 66px; display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 14px; padding: 8px 100px 8px 14px; text-align: left; border: 0; background: transparent; color: var(--theme-text,var(--dark)); cursor: pointer; font: inherit; }
.directory-team-open:hover { background: #f5f4f8; }
.directory-team-logo { display: flex; align-items: center; justify-content: center; width: 40px; height: 44px; flex-shrink: 0; }
.directory-team-logo img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.directory-team-text { display: grid; gap: 3px; min-width: 0; }
.directory-team-first { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.directory-team-first strong { font-family: 'Barlow Condensed',Barlow,sans-serif; font-size: 21px; overflow-wrap: anywhere; }
.directory-team-text small { font-size: 13px; color: var(--theme-muted-text,var(--mid)); overflow-wrap: anywhere; }
.team-category-badge { display: inline-block; padding: 2px 6px; background: #ece8f3; color: #352653; font-size: 12px; border-radius: 4px; }
.team-favorite { width: 44px; height: 44px; flex-shrink: 0; border: 0; border-radius: 4px; background: transparent; color: #785812; font-size: 29px; line-height: 1; cursor: pointer; }
.team-favorite.is-favorite { color: #a77800; }
.directory-team-row > .team-favorite { position: absolute; right: 36px; top: 50%; transform: translateY(-50%); }
.team-open-arrow { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 28px; color: var(--header); }
.public-teams button:focus-visible { outline: 2px solid var(--theme-button,var(--header)); outline-offset: -2px; }
.team-back { border: 0; padding: 8px 0; min-height: 44px; background: transparent; color: var(--theme-heading-text,var(--header)); cursor: pointer; font: inherit; font-weight: 600; }
.team-detail-heading { display: flex; align-items: center; gap: 14px; margin: 8px 0 18px; }
.team-detail-heading .directory-team-logo { width: 58px; height: 64px; }
.team-detail-heading .directory-team-first strong { font-size: 30px; }
.team-detail-heading > .team-favorite { margin-left: auto; }
.team-referee-switch { display: flex; align-items: center; gap: 24px; min-height: 48px; margin-left: auto; padding: 5px 0; border: 0; background: transparent; color: var(--theme-text,var(--dark)); cursor: pointer; font: inherit; text-align: left; }
.team-referee-switch > span:first-child { display: grid; gap: 2px; font-size: 14px; font-weight: 600; }
.team-referee-switch small { font-size: 12px; font-weight: 400; color: var(--theme-muted-text,var(--mid)); }
.team-switch-track { display: inline-flex; align-items: center; width: 50px; height: 28px; padding: 3px; background: #66717b; border-radius: 20px; flex-shrink: 0; }
.team-switch-track > span { width: 22px; height: 22px; background: #fff; border-radius: 50%; transform: translateX(0); transition: transform .15s; }
.team-referee-switch[aria-checked=true] .team-switch-track { background: var(--theme-button,var(--header)); }
.team-referee-switch[aria-checked=true] .team-switch-track > span { transform: translateX(22px); }
.public-teams #teamGames { display: grid; gap: 8px; }
.public-teams #teamGames .date-divider { margin: 12px 0 2px; }
.public-teams #teamGames .game { grid-template-columns: 80px minmax(0,1fr) 64px minmax(0,1fr); }
.public-teams #teamGames .game-with-referees { margin: 0; }
.public-teams #teamGames .referee-line { grid-template-columns: minmax(0,1fr) minmax(0,4fr) minmax(0,1fr); }
.public-teams #teamGames .referee-names { flex-wrap: wrap; overflow: visible; white-space: normal; font-size: 12px; gap: 5px; }
.public-teams .team-referee-badge { display: inline-block; padding: 1px 6px; font-size: 11px; line-height: 16px; background: #1163bf; color: #fff; border-radius: 4px; white-space: nowrap; }
.public-teams .is-referee-appointment,.public-teams .is-referee-appointment .game,.public-teams .is-referee-appointment .referee-line { background: #eaf4ff; }
@media(max-width:600px) {
  .public-timeline .presentation-tabs { gap: 4px; }
  .public-timeline .presentation-tabs button { padding-left: 3px; padding-right: 3px; font-size: 13px; letter-spacing: 0; }
  .team-tools { gap: 10px; }
  .team-tools label,#teamSearchLabel { width: 100%; }
  .team-favorite-games { width: 100%; }
  .team-referee-switch { width: 100%; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); margin: 0; }
  .directory-team-open { grid-template-columns: 34px minmax(0,1fr); gap: 8px; padding: 8px 78px 8px 8px; }
  .directory-team-logo { width: 32px; height: 38px; }
  .directory-team-first strong { font-size: 19px; }
  .directory-team-text small { font-size: 12px; }
  .team-category-badge { font-size: 11px; }
  .directory-team-row > .team-favorite { right: 26px; }
  .team-open-arrow { right: 9px; }
  .team-detail-heading { gap: 9px; }
  .team-detail-heading .directory-team-logo { width: 44px; height: 52px; }
  .team-detail-heading .directory-team-first strong { font-size: 26px; }
  .public-teams #teamGames .game { grid-template-columns: minmax(0,1fr) 40px minmax(0,1fr); border-left-width: 0; }
  .public-teams #teamGames .time-col { grid-column: 1 / -1; display: flex; flex-direction: row; justify-content: space-between; align-items: center; padding: 4px 8px; min-height: 26px; }
  .public-teams #teamGames .time-col .stage-label { white-space: pre-line; text-align: right; margin: 0; font-size: 11px; }
  .public-teams #teamGames .team-col { gap: 6px; padding: 8px 6px; text-align: left; }
  .public-teams #teamGames .away-side { flex-direction: row-reverse; }
  .public-teams #teamGames img.team-logo { width: 25px; height: 32px; transform: none; margin: 0; }
  .public-teams #teamGames .team-info { flex: 1; min-width: 0; }
  .public-teams #teamGames .team-abbr { font-size: 17px; white-space: normal; overflow-wrap: anywhere; }
  .public-teams #teamGames .team-full { font-size: 11px; line-height: 1.15; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
  .public-teams #teamGames .vs-col { min-width: 0; padding: 0 2px; }
  .public-teams #teamGames .score-display { font-size: 17px; white-space: nowrap; padding: 0 2px; }
  .public-teams #teamGames .game.is-live .stage-label { color: #403814!important; }
  .public-teams #teamGames .referee-line { grid-template-columns: max-content minmax(0,1fr) max-content; gap: 4px; padding: 4px 6px; font-size: 10px; white-space: nowrap; }
  .public-teams #teamGames .referee-names { grid-column: 2; grid-row: 1; justify-content: center; flex-wrap: nowrap; min-width: 0; font-size: 10px; gap: 3px; }
  .public-teams #teamGames .referee-names > span:first-child { flex-shrink: 0; font-size: 9px; }
  .public-teams #teamGames .referee-names > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .public-teams #teamGames .team-referee-badge { padding: 0 3px; line-height: 14px; }
  .public-teams #teamGames .game-number { grid-column: 1; grid-row: 1; }
  .public-teams #teamGames .referee-court-label { grid-column: 3; grid-row: 1; }
}
@media(prefers-reduced-motion:reduce) { .team-switch-track > span { transition: none; } }
