.directory-heading h1 {
  margin: 0;
  font: 900 clamp(3.35rem, 7.1vw, 6.35rem) / .88 var(--site-display);
  letter-spacing: -.025em;
  text-transform: uppercase;
}

.directory-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 19px;
}

.directory-heading h1 { color: #f2f2f2; font-size: clamp(2.75rem, 5.8vw, 5rem); }
.directory-heading .directory-create {
  flex: none;
  align-self: center;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 6px 13px 6px 7px;
  border: 1px solid #ededed;
  border-radius: 8px;
  background: #ededed;
  color: #171717;
  font: 750 .875rem/1.2 'Inter', system-ui, sans-serif;
  white-space: nowrap;
  cursor: pointer;
}
.directory-heading .directory-create:hover { border-color: #fff; background: #fff; }
.directory-heading .directory-create:focus-visible { outline: 2px solid #eee; outline-offset: 3px; }
.directory-create-icon {
  display: grid;
  width: 27px;
  height: 27px;
  flex: none;
  place-items: center;
  border-radius: 5px;
  background: #202020;
  color: #f5f5f5;
  font: 600 1.125rem/1 system-ui, sans-serif;
}

.directory-toolbar {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 9px 13px;
  padding: clamp(12px, 2vw, 18px);
  border: 1px solid var(--site-line);
  border-radius: 10px;
  background: var(--site-panel);
}

.directory-toolbar [hidden] { display: none !important; }
.directory-search, .directory-select { display: grid; min-width: 0; gap: 6px; }
.directory-search { flex: 2 1 245px; }
.directory-select { flex: 1 1 155px; }
.directory-toolbar :is(label, .directory-select) > span { color: var(--site-muted); font-size: .8125rem; font-weight: 650; }

.directory-toolbar :is(input, summary) {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 7px 11px;
  border: 1px solid #3c3c3c;
  border-radius: 7px;
  color: #f2f2f2;
  background: #0e0e0e;
  font: 500 .875rem/1.2 'Inter', system-ui, sans-serif;
}

.directory-filter { position: relative; min-width: 0; }
.directory-filter summary {
  display: flex;
  align-items: center;
  cursor: pointer;
  list-style: none;
  padding-right: 33px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23c7c7c7' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
}
.directory-filter summary::-webkit-details-marker { display: none; }
.directory-filter summary span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.directory-filter[open] summary { border-color: #818181; }
.directory-filter-options {
  position: absolute;
  z-index: 4;
  top: calc(100% + 6px);
  inset-inline: 0;
  display: grid;
  gap: 2px;
  max-height: 285px;
  overflow: auto;
  padding: 5px;
  border: 1px solid #515151;
  border-radius: 8px;
  background: #171717;
  box-shadow: 0 12px 30px #0009;
  overscroll-behavior: contain;
}
.directory-filter-options button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 37px;
  padding: 6px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #e4e4e4;
  font: inherit;
  font-size: .8125rem;
  text-align: left;
  overflow-wrap: anywhere;
}
.directory-filter-options button:hover { background: #2a2a2a; }
.directory-filter-options button[aria-pressed="true"] { background: #ececec; color: #171717; font-weight: 700; }
.directory-filter-options button:focus-visible { outline: 2px solid #bcbcbc; outline-offset: -2px; }
.directory-filter-options img { flex: none; object-fit: contain; }

.directory-toolbar :is(input, summary):focus-visible { outline: 2px solid #ddd; outline-offset: 1px; }
.directory-toolbar input::placeholder { color: #9d9d9d; }
.directory-action { min-height: 42px; background: #202020; color: #ededed; }
.directory-action:hover { background: #303030; }
.directory-count { margin: 12px 0 9px; color: var(--site-muted); font-size: .875rem; }
.directory-count:empty { display: none; }

.directory-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 3px;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  background: #101010;
}

.directory-categories button {
  min-height: 34px;
  padding: 0 11px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #bcbcbc;
  font-size: .8125rem;
  font-weight: 750;
}

.directory-categories button:hover { color: #fff; background: #272727; }
.directory-categories button.active { color: #151515; background: #e9e9e9; }

.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 247px), 1fr));
  gap: 10px;
}

.team-directory-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr)); }
.directory-grid > .directory-empty { grid-column: 1 / -1; }

.directory-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--site-line);
  border-radius: 10px;
  background: #151515;
  color: #f2f2f2;
  text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease;
}

.directory-card:hover { border-color: #656565; background: #1c1c1c; }
.directory-watermark {
  position: absolute;
  z-index: -1;
  inset: 50% auto auto 50%;
  width: 102%;
  height: 260%;
  object-fit: contain;
  transform: translate(-50%, -50%) scale(1.8225);
  opacity: .22;
  pointer-events: none;
}
.player-directory-card { display: grid; grid-template-rows: 1fr auto; min-height: 124px; }
.directory-card-main { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 13px 13px 11px; }
.directory-identity, .directory-team-copy { display: grid; gap: 3px; min-width: 0; }
.directory-identity strong, .directory-team-copy strong { font-size: 1rem; overflow-wrap: anywhere; line-height: 1.2; }
.directory-identity small, .directory-team-copy small { color: var(--site-muted); font-size: .8125rem; overflow-wrap: anywhere; }

.directory-avatar, .directory-crest {
  display: grid;
  width: 52px;
  height: 52px;
  flex: none;
  place-items: center;
  overflow: hidden;
  border: 1px solid #414141;
  border-radius: 50%;
  background: #252525;
  color: #e6e6e6;
  font-weight: 800;
}

.directory-avatar img { width: 100%; height: 100%; object-fit: cover; }
.directory-card-footer { display: flex; min-height: 38px; align-items: center; justify-content: space-between; gap: 7px; padding: 6px 11px; border-top: 1px solid var(--site-line); }
.directory-affiliation { display: flex; align-items: center; min-width: 0; gap: 6px; color: var(--site-muted); font-size: .8125rem; }
.directory-affiliation span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.directory-affiliation img { width: 21px; height: 21px; flex: none; object-fit: contain; }
.directory-tag { flex: none; max-width: 55%; padding: 3px 6px; border-radius: 4px; background: #282828; color: #e0e0e0; font-size: .75rem; overflow-wrap: anywhere; }

.team-directory-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 106px;
  padding: 13px;
}

.directory-crest { width: 62px; height: 62px; border-radius: 8px; padding: 7px; }
.directory-crest img { width: 100%; height: 100%; object-fit: contain; }
.directory-team-category { color: #b8b8b8; font-size: .75rem; font-weight: 650; }
.directory-empty { margin: 12px 0 0; padding: 25px 16px; border: 1px dashed #444; border-radius: 8px; color: var(--site-muted); text-align: center; }

#profileDetailContent .directory-detail-hero,
#druzynyContent .directory-detail-hero {
  overflow: hidden;
  border-radius: 12px;
  border-color: var(--site-line);
  background: #151515;
  box-shadow: none;
}

:is(#profileDetailContent, #druzynyContent) .directory-detail-hero .team-hero-banner {
  min-height: 118px;
  height: clamp(118px, 16vw, 215px);
}

:is(#druzynyContent, #profileDetailContent) .directory-detail-hero .team-hero-banner .directory-watermark {
  z-index: 0;
  width: min(92%, 720px);
  height: 250%;
  opacity: .32;
}

#rushContent .rp-banner { overflow: hidden; }
#rushContent .rp-banner .directory-watermark {
  z-index: 0;
  width: min(92%, 720px);
  height: 250%;
  opacity: .32;
}

:is(#profileDetailContent, #druzynyContent) .directory-detail-hero .team-hero-banner::after {
  background: linear-gradient(180deg, #15151512 0%, #15151555 58%, #151515 100%);
}

:is(#profileDetailContent, #druzynyContent) .directory-detail-hero .team-hero-body {
  column-gap: clamp(12px, 2vw, 21px);
  padding-inline: clamp(13px, 3vw, 35px);
}

:is(#profileDetailContent, #druzynyContent) .directory-detail-hero h2 {
  font: 850 clamp(2rem, 5vw, 3.65rem)/.93 var(--site-display);
  text-transform: none;
  overflow-wrap: anywhere;
}

:is(#profileDetailContent, #druzynyContent) .directory-detail-hero .team-hero-logo { background-color: #202020; box-shadow: none; }
#mainContent .directory-back { display: inline-flex; margin-bottom: 11px; text-decoration: underline; text-underline-offset: 3px; }

#profileDetailContent .pp-tabs,
#druzynyContent .tp-tabs {
  width: 100%;
  margin-block: 12px;
  overflow: auto;
  border-radius: 8px;
  scrollbar-width: thin;
}

@media (max-width: 640px) {
  .directory-search { flex-basis: 100%; }
  .directory-select { flex-basis: 135px; }
  .directory-categories { flex-basis: 100%; }
  .directory-tag { max-width: 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .directory-card { transition: none; }
}
