.cah-select {
  position: relative;
  z-index: 12;
  width: 100%;
  margin-top: 6px;
  font-family: Inter, Arial, sans-serif;
}

.cah-select.is-open {
  z-index: 80;
}

.cah-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.cah-select-toggle {
  display: flex;
  width: 100%;
  min-height: 42px;
  padding: 0 14px 0 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #f6ecd3;
  border: 1px solid rgba(206, 171, 79, .72);
  border-radius: 18px;
  background: rgba(7, 20, 17, .03);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  font: 700 13px/1.2 Inter, Arial, sans-serif;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

/* First-page character selectors: 97% transparent, matching the language picker. */
.creator .cah-select-toggle {
  border: 1px solid rgba(224, 190, 96, .52);
  border-radius: 22px;
  background: rgba(7, 20, 17, .03);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(20px) saturate(1.22);
  -webkit-backdrop-filter: blur(20px) saturate(1.22);
}

.creator .cah-select-toggle:hover,
.creator .cah-select-toggle[aria-expanded="true"] {
  border-color: #f0cf6b;
  background: rgba(7, 20, 17, .09);
}

.cah-select-toggle:hover,
.cah-select-toggle[aria-expanded="true"] {
  color: #fff3cb;
  border-color: #f0cf6b;
  background: rgba(7, 20, 17, .42);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .34), 0 0 0 1px rgba(240, 207, 107, .09);
}

.cah-select-toggle:focus-visible,
.cah-select-option:focus-visible {
  outline: 3px solid rgba(255, 216, 105, .48);
  outline-offset: 2px;
}

.cah-select-value,
.cah-select-option-label {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.cah-select-value > span:last-child,
.cah-select-option-label > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cah-select-chevron {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-right: 2px;
  border-right: 1.5px solid #e7c96f;
  border-bottom: 1.5px solid #e7c96f;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .18s ease;
}

.cah-select-toggle[aria-expanded="true"] .cah-select-chevron {
  transform: translateY(2px) rotate(225deg);
}

.cah-select-menu[hidden] {
  display: none;
}

.cah-select-menu {
  position: absolute;
  z-index: 90;
  top: calc(100% + 9px);
  left: 0;
  width: max(100%, 230px);
  max-height: min(330px, 52vh);
  padding: 8px;
  overflow: auto;
  border: 1px solid rgba(224, 190, 96, .58);
  border-radius: 22px;
  background: rgba(7, 20, 17, .03);
  box-shadow: 0 22px 55px rgba(0, 0, 0, .52), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  scrollbar-color: rgba(224, 190, 96, .55) transparent;
  scrollbar-width: thin;
}

.creator .cah-select-menu {
  border: 1px solid rgba(224, 190, 96, .52);
  border-radius: 22px;
  background: rgba(7, 20, 17, .03);
  box-shadow: 0 22px 55px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(20px) saturate(1.22);
  -webkit-backdrop-filter: blur(20px) saturate(1.22);
}

.creator .cah-select-option {
  border-radius: 14px;
}

.cah-select-option {
  display: flex;
  width: 100%;
  min-height: 42px;
  padding: 0 13px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #f4ead0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  font: 700 13px/1.25 Inter, Arial, sans-serif;
  text-align: left;
  cursor: pointer;
  transition: color .16s ease, background .16s ease;
}

.cah-select-option:hover,
.cah-select-option:focus-visible {
  color: #fff3cb;
  background: rgba(226, 184, 73, .14);
}

.cah-select-option[aria-selected="true"] {
  color: #f6d778;
  background: rgba(226, 184, 73, .10);
}

.cah-select-check {
  flex: 0 0 auto;
  color: #f0cb61;
  font-size: 14px;
}

.cah-gender-symbol {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 23px;
  height: 23px;
  color: #f3cf62;
  border: 1px solid rgba(243, 207, 98, .78);
  border-radius: 50%;
  font: 900 17px/1 Georgia, "Times New Roman", serif;
  text-shadow: 0 0 9px rgba(243, 207, 98, .55);
  box-shadow: inset 0 0 8px rgba(243, 207, 98, .12), 0 0 8px rgba(0, 0, 0, .32);
}

.heroes-toolbar .cah-select {
  margin-top: 0;
}

.heroes-toolbar .cah-select-toggle {
  min-height: 44px;
  border-radius: 18px;
}

@media (max-width: 720px) {
  .cah-select-menu {
    width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cah-select-toggle,
  .cah-select-chevron,
  .cah-select-option {
    transition: none;
  }
}

/* Pause decorative work while Chrome has this tab in the background. */
.cah-page-inactive *,
.cah-page-inactive *::before,
.cah-page-inactive *::after {
  animation-play-state: paused !important;
}
