.maps-overview-hero {
  padding-bottom: 34px;
}

.maps-overview {
  padding-bottom: 96px;
}

.maps-overview-toolbar {
  display: grid;
  gap: 18px;
  margin-bottom: 16px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.maps-overview-toolbar-top {
  display: grid;
  grid-template-columns: minmax(210px, .72fr) minmax(620px, 2.28fr) auto;
  gap: 14px;
  align-items: end;
}

.maps-overview-search {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.maps-overview-search > span,
.maps-overview-control-label {
  color: var(--muted);
  font: 800 11px/1 'Barlow Condensed';
  letter-spacing: .09em;
  text-transform: uppercase;
}

.maps-overview-search input {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  color: var(--ink);
  background: #151112;
  border: 1px solid var(--line);
  border-radius: 0;
  font: 600 14px Inter, Arial, sans-serif;
}

.maps-overview-search input:focus,
.maps-overview-sort-buttons button:focus-visible,
.maps-overview-season-buttons button:focus-visible,
.maps-overview-pagination button:focus-visible,
.maps-overview-card-link:focus-visible,
.maps-overview-record-holder a:focus-visible {
  outline: 2px solid var(--salmon);
  outline-offset: 2px;
}

.maps-overview-reset {
  min-height: 44px;
  white-space: nowrap;
}

.maps-overview-control-section {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.maps-overview-sort-section {
  padding-top: 0;
  border-top: 0;
}

.maps-overview-sort-buttons,
.maps-overview-season-buttons {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 7px;
}

.maps-overview-sort-buttons button {
  display: inline-flex;
  min-height: 44px;
  padding: 0 13px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  background: #151112;
  border: 1px solid var(--line);
  cursor: pointer;
  font: 700 12px Inter, Arial, sans-serif;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.maps-overview-sort-buttons button:hover,
.maps-overview-sort-buttons button.is-active {
  color: var(--cream);
  border-color: var(--red);
  background: rgba(190, 49, 50, .18);
}

.maps-overview-sort-buttons button i {
  min-width: 10px;
  color: var(--salmon);
  font: 900 18px/1 'Barlow Condensed';
  font-style: normal;
}

.maps-overview-season-buttons button {
  --season-badge-rgb: 126, 166, 255;
  position: relative;
  display: inline-flex;
  min-height: 40px;
  padding: 0 11px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  background: #151112;
  border: 1px solid var(--line);
  cursor: pointer;
  font: 800 11px Inter, Arial, sans-serif;
  letter-spacing: .02em;
  transition: color .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.maps-overview-season-buttons button i {
  display: none;
  color: rgb(var(--season-badge-rgb));
  font: 900 12px/1 Inter, Arial, sans-serif;
  font-style: normal;
}

.maps-overview-season-buttons button small {
  color: var(--muted);
  font: 700 10px/1 Inter, Arial, sans-serif;
}

.maps-overview-season-buttons button:hover {
  border-color: rgba(var(--season-badge-rgb), .55);
  color: var(--cream);
}

.maps-overview-season-buttons button.is-selected {
  color: rgb(var(--season-badge-rgb));
  border-color: rgba(var(--season-badge-rgb), .62);
  background: rgba(var(--season-badge-rgb), .14);
  box-shadow: inset 0 0 0 1px rgba(var(--season-badge-rgb), .05);
}

.maps-overview-season-buttons button.is-selected i {
  display: inline;
}

.maps-overview-status-row {
  display: flex;
  min-height: 36px;
  margin-bottom: 14px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.maps-overview-active-filters {
  display: flex;
  min-width: 0;
  margin: 0;
  padding: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.maps-overview-active-filters:empty {
  display: none;
}

.maps-overview-active-filters > strong {
  color: var(--muted);
  font: 800 10px/30px 'Barlow Condensed';
  letter-spacing: .08em;
}

.maps-overview-active-filters button {
  display: inline-flex;
  min-height: 30px;
  max-width: min(100%, 620px);
  padding: 0 9px;
  align-items: center;
  gap: 8px;
  color: var(--cream);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  cursor: pointer;
  font: 700 11px Inter, Arial, sans-serif;
}

.maps-overview-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 30px;
  white-space: nowrap;
}

.maps-overview-grid {
  margin-bottom: 28px;
  transition: opacity .14s ease;
}

.maps-overview.is-loading .maps-overview-grid {
  opacity: .45;
  pointer-events: none;
}

.maps-overview.has-error .maps-overview-count {
  color: var(--salmon);
}

.maps-overview-card {
  min-height: 390px;
}

.maps-overview-card-link {
  position: absolute;
  z-index: 1;
  inset: 0;
}

.maps-overview-card:has(.maps-overview-card-link:focus-visible) {
  border-color: var(--salmon);
}

.maps-overview-card-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.maps-overview-card-heading h2 {
  min-width: 0;
  padding-bottom: 4px;
  overflow: hidden;
  font-size: 26px;
  line-height: 1.14;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.maps-overview-season-badge {
  --season-badge-rgb: 126, 166, 255;
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  display: inline-flex;
  min-height: 28px;
  padding: 4px 9px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(var(--season-badge-rgb), .62);
  border-radius: 999px;
  background: rgba(11, 8, 9, .84);
  box-shadow: inset 0 0 0 999px rgba(var(--season-badge-rgb), .12);
  color: rgb(var(--season-badge-rgb));
  font: 800 10px/1 Inter, Arial, sans-serif;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.maps-overview-difficulty {
  display: inline-flex;
  min-width: 126px;
  min-height: 24px;
  padding: 4px 7px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #f2a35a;
  background: rgba(242, 163, 90, .08);
  border: 1px solid rgba(242, 163, 90, .24);
  white-space: nowrap;
}

.maps-overview-difficulty-label {
  color: var(--muted);
  font: 800 9px/1 Inter, Arial, sans-serif;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.maps-overview-difficulty-filled,
.maps-overview-difficulty-empty {
  font: 800 12px/1 'Barlow Condensed';
  letter-spacing: -1px;
}

.maps-overview-difficulty-empty {
  color: rgba(242, 163, 90, .35);
  font-style: normal;
}

.maps-overview-difficulty.is-unrated {
  min-width: 132px;
}

.maps-overview-difficulty.is-unrated .maps-overview-difficulty-empty {
  color: var(--muted);
  font: 700 10px/1 Inter, Arial, sans-serif;
  letter-spacing: 0;
}

.maps-overview-card .map-card-content,
.maps-overview-card .map-thumbnail {
  pointer-events: none;
}

.maps-overview-card .map-card-info {
  margin-top: 20px;
}

.maps-overview-card .map-card-info {
  grid-template-columns: minmax(0, .78fr) minmax(180px, 1.22fr);
  column-gap: 18px;
}

.maps-overview-card .map-card-detail > strong,
.maps-overview-card .map-author-time-value strong {
  font-size: 18px;
  line-height: 1.2;
}

.maps-overview-finishes-value {
  display: inline-flex;
  min-width: 0;
  min-height: 22px;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.maps-overview-finishes-value > strong {
  font-size: 18px;
  line-height: 1.2;
}

.maps-overview-completion-rate {
  color: var(--muted);
  font: 700 12px/1 'Barlow Condensed', sans-serif;
  align-self: center;
}

.maps-overview-record-holder-detail {
  grid-column: auto;
}

.maps-overview-record-holder {
  position: relative;
  z-index: 2;
  display: flex;
  width: 100%;
  max-width: 100%;
  min-height: 30px;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  pointer-events: auto;
}

.maps-overview-record-holder a {
  position: relative;
  z-index: 2;
  color: inherit;
  pointer-events: auto;
}

.maps-overview-record-holder-flag {
  display: inline-flex;
  width: 39px;
  height: 26px;
  align-items: stretch;
  flex: 0 0 39px;
}

.maps-overview-record-holder-flag img {
  display: block;
  width: 39px;
  height: 26px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.16);
}

.maps-overview-record-holder .map-player-identity {
  --map-identity-height: 30px;
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  min-height: 30px;
  height: auto;
  flex: 1 1 auto;
  align-items: center;
  gap: 7px;
  overflow: visible;
  font: 700 18px/1.2 'Barlow Condensed';
}

.maps-overview-record-holder .map-club-tag {
  height: 26px;
  max-width: none;
  padding-inline: 7px;
  align-self: center;
  overflow: visible;
  font-size: .7em;
  text-overflow: clip;
}

.maps-overview-record-holder .map-club-tag:has(.tm-text-wide) {
  padding-inline-end: 12px;
}

.maps-overview-record-holder .maps-overview-record-holder-name {
  display: inline-flex;
  min-width: 0;
  width: max-content;
  max-width: none;
  min-height: 30px;
  height: auto;
  box-sizing: border-box;
  padding-top: 2px;
  padding-bottom: 3px;
  align-items: center;
  flex: 0 1 auto;
  overflow: visible;
  color: var(--ink) !important;
  font: 700 18px/1.2 'Barlow Condensed';
  text-overflow: clip;
  white-space: nowrap;
}

.maps-overview-record-holder a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.maps-overview-card .map-card-updated {
  margin-top: auto;
  padding-top: 16px;
}

.maps-overview-card .map-card-updated.is-final-snapshot {
  color: var(--muted);
  font-weight: 600;
}

.maps-overview-card .map-card-updated.is-final-snapshot span {
  font-size: .72rem;
}

.maps-overview-pagination {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.maps-overview-pagination:empty {
  display: none;
}

.maps-overview-pagination button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  cursor: pointer;
  font: 800 13px Inter, Arial, sans-serif;
}

.maps-overview-pagination button:hover:not(:disabled),
.maps-overview-pagination button.is-active {
  background: var(--red);
  border-color: var(--red);
  color: var(--cream);
}

.maps-overview-pagination button:disabled {
  opacity: .35;
  cursor: default;
}

.maps-overview-pagination > span {
  color: var(--muted);
}

.maps-overview-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 80px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
}

@media (max-width: 1120px) {
  .maps-overview-toolbar-top {
    grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr);
  }

  .maps-overview-reset {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

@media (max-width: 820px) {
  .maps-overview-toolbar-top {
    grid-template-columns: 1fr;
  }

  .maps-overview-reset {
    justify-self: stretch;
  }

  .maps-overview-status-row {
    align-items: stretch;
    flex-direction: column;
    gap: 4px;
  }

  .maps-overview-count {
    line-height: 24px;
  }
}

@media (max-width: 560px) {
  .maps-overview-toolbar {
    padding: 14px;
  }

  .maps-overview-sort-buttons,
  .maps-overview-season-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .maps-overview-sort-buttons button,
  .maps-overview-season-buttons button {
    justify-content: flex-start;
  }

  .maps-overview-card-heading {
    grid-template-columns: 1fr;
  }

  .maps-overview-difficulty {
    justify-self: start;
  }

  .maps-overview-season-badge {
    top: 10px;
    right: 10px;
    max-width: calc(100% - 90px);
    overflow: hidden;
    text-overflow: ellipsis;
  }
}


@media (max-width: 680px) {
  .maps-overview-card .map-card-info {
    grid-template-columns: 1fr;
  }
}

/* Unified season filters: large selectable cards and one removable badge per active season. */
.maps-overview-season-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 10px;
}

.maps-overview-season-buttons button {
  --season-badge-rgb: 126, 166, 255;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  min-height: 72px;
  padding: 13px 15px;
  align-items: center;
  gap: 11px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  text-align: left;
}

.maps-overview-season-check {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: rgba(var(--season-badge-rgb), .32);
  background: rgba(var(--season-badge-rgb), .04);
  border: 1px solid rgba(var(--season-badge-rgb), .22);
  font: 900 13px/1 Inter, Arial, sans-serif;
}

.maps-overview-season-copy {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.maps-overview-season-copy strong {
  overflow: hidden;
  color: inherit;
  font: 900 17px/1 'Barlow Condensed', sans-serif;
  letter-spacing: .04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.maps-overview-season-copy small {
  color: var(--muted);
  font: 700 10px/1 Inter, Arial, sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.maps-overview-season-buttons button:hover {
  color: rgb(var(--season-badge-rgb));
  background: rgba(var(--season-badge-rgb), .08);
  border-color: rgba(var(--season-badge-rgb), .46);
}

.maps-overview-season-buttons button.is-selected {
  color: rgb(var(--season-badge-rgb));
  background: rgba(var(--season-badge-rgb), .13);
  border-color: rgba(var(--season-badge-rgb), .68);
  outline: 1px solid rgba(var(--season-badge-rgb), .18);
  outline-offset: -2px;
}

.maps-overview-season-buttons button.is-selected .maps-overview-season-check {
  color: rgb(var(--season-badge-rgb));
  background: rgba(var(--season-badge-rgb), .12);
  border-color: rgba(var(--season-badge-rgb), .58);
}

.maps-overview-active-filters:empty {
  display: none;
}

.maps-overview-active-filters > button.maps-active-search-chip {
  color: var(--cream);
  background: rgba(255, 255, 255, .04);
  border-color: var(--line);
}

.maps-active-filter-text {
  overflow: hidden;
  min-width: 0;
  color: inherit !important;
  font-size: inherit !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.maps-active-filter-remove {
  color: var(--salmon) !important;
  font-size: 16px !important;
  line-height: 1;
}

.maps-overview-active-filters > button.maps-active-season-chip {
  --season-badge-rgb: 126, 166, 255;
  min-height: 28px;
  padding: 4px 9px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: rgb(var(--season-badge-rgb));
  background: rgba(11, 8, 9, .84);
  border-color: rgba(var(--season-badge-rgb), .62);
  border-radius: 999px;
  box-shadow: inset 0 0 0 999px rgba(var(--season-badge-rgb), .12);
  font: 800 10px/1 Inter, Arial, sans-serif;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.maps-overview-active-filters > button.maps-active-season-chip > span:not(.sr-only) {
  flex: 0 0 auto;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.maps-overview-active-filters > button.maps-active-season-chip:hover:not(:disabled) {
  border-color: rgb(var(--season-badge-rgb));
  background: rgba(var(--season-badge-rgb), .18);
}

.maps-overview-active-filters > button.maps-active-season-chip i {
  color: rgb(var(--season-badge-rgb));
  font: 900 14px/1 Inter, Arial, sans-serif;
  font-style: normal;
}

.maps-overview-active-filters > button.maps-active-season-chip:disabled {
  cursor: default;
  opacity: .72;
}

.maps-overview-record-holder a:hover,
.maps-overview-record-holder a:focus-visible {
  text-decoration: none;
}

@media (max-width: 560px) {
  .maps-overview-season-buttons {
    grid-template-columns: 1fr;
  }
}


/* Compact maps toolbar: search, difficulty, sort and direction share one row. */
.maps-overview-toolbar-top {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 210px 58px auto;
  gap: 10px;
  align-items: end;
}

.maps-overview-toolbar-field {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.maps-overview-dropdown {
  width: 100%;
  flex: none;
}

.maps-overview-dropdown .map-filter-select {
  min-height: 44px;
  background: #151112;
}

.maps-overview-dropdown-menu {
  width: max(100%, 220px);
}

.maps-overview-sort-option > small {
  display: none;
}

.maps-overview-difficulty-option .map-filter-option-main > span {
  color: #e3aa48;
  font: 900 15px/1 Inter, Arial, sans-serif;
  letter-spacing: .03em;
}

.maps-overview-direction-field {
  width: 58px;
}

.maps-overview-direction {
  display: grid;
  width: 58px;
  min-height: 44px;
  place-items: center;
  color: var(--cream);
  background: #151112;
  border: 1px solid var(--line);
  cursor: pointer;
  font: 900 23px/1 'Barlow Condensed', sans-serif;
}

.maps-overview-direction:hover,
.maps-overview-direction:focus-visible {
  color: var(--salmon);
  border-color: var(--red);
  outline: 0;
}

.maps-overview-reset {
  align-self: end;
}

/* Seasons remain color-coded but are intentionally compact and checkmark-free. */
.maps-overview-season-buttons {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 7px;
}

.maps-overview-season-buttons button {
  --season-badge-rgb: 126, 166, 255;
  display: inline-flex;
  width: auto;
  min-width: 0;
  min-height: 36px;
  padding: 0 11px;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  color: var(--muted);
  background: #151112;
  border: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
}

.maps-overview-season-buttons button strong {
  overflow: visible;
  color: inherit;
  font: 850 13px/1 'Barlow Condensed', sans-serif;
  letter-spacing: .035em;
  text-overflow: clip;
  text-transform: uppercase;
  white-space: nowrap;
}

.maps-overview-season-buttons button small {
  color: inherit;
  font: 700 10px/1 Inter, Arial, sans-serif;
  opacity: .72;
  white-space: nowrap;
}

.maps-overview-season-buttons button small::before {
  content: '·';
  margin-right: 7px;
}

.maps-overview-season-buttons button:hover {
  color: rgb(var(--season-badge-rgb));
  background: rgba(var(--season-badge-rgb), .08);
  border-color: rgba(var(--season-badge-rgb), .48);
}

.maps-overview-season-buttons button.is-selected {
  color: rgb(var(--season-badge-rgb));
  background: rgba(var(--season-badge-rgb), .13);
  border-color: rgba(var(--season-badge-rgb), .68);
  box-shadow: inset 0 0 0 1px rgba(var(--season-badge-rgb), .05);
  outline: 0;
}

.maps-overview-active-filters > button.maps-active-difficulty-chip {
  min-height: 28px;
  padding: 4px 9px;
  gap: 7px;
  color: #e3aa48;
  background: rgba(227, 170, 72, .08);
  border-color: rgba(227, 170, 72, .42);
  border-radius: 999px;
  font: 800 11px/1 Inter, Arial, sans-serif;
  white-space: nowrap;
}

.maps-overview-active-filters > button.maps-active-difficulty-chip:hover:not(:disabled) {
  background: rgba(227, 170, 72, .15);
  border-color: #e3aa48;
}

.maps-overview-active-filters > button.maps-active-difficulty-chip i {
  color: var(--salmon);
  font: 900 14px/1 Inter, Arial, sans-serif;
  font-style: normal;
}

.maps-overview-active-filters > button.maps-active-difficulty-chip:disabled {
  cursor: default;
  opacity: .72;
}

@media (max-width: 1120px) {
  .maps-overview-toolbar-top {
    grid-template-columns: minmax(220px, 1fr) 180px 210px 58px;
  }

  .maps-overview-reset {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

@media (max-width: 820px) {
  .maps-overview-toolbar-top {
    grid-template-columns: minmax(0, 1fr) minmax(160px, .7fr) 58px;
  }

  .maps-overview-search {
    grid-column: 1 / -1;
  }

  .maps-overview-reset {
    grid-column: 1 / -1;
    justify-self: stretch;
  }
}

@media (max-width: 560px) {
  .maps-overview-toolbar-top {
    grid-template-columns: minmax(0, 1fr) 58px;
  }

  .maps-overview-toolbar-field:not(.maps-overview-direction-field) {
    grid-column: 1 / -1;
  }

  .maps-overview-direction-field {
    grid-column: 2;
  }

  .maps-overview-season-buttons {
    display: flex;
  }
}
