.styled-select {
  position: relative;
  z-index: 1;
}
.styled-select.open {
  z-index: 240;
}
.styled-select > select {
  position: absolute;
  inset: auto !important;
  width: 1px !important;
  min-width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  clip-path: inset(50%);
  pointer-events: none;
}
.styled-select-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #071329;
  color: #fff;
  text-align: left;
  transition:
    border-color 0.2s,
    background 0.2s,
    opacity 0.2s;
}
.styled-select-trigger:after {
  content: "⌄";
  color: var(--violet);
}
.styled-select-trigger > span { flex: 1; }
.styled-select-trigger > img,
.styled-select-menu button > img {
  width: 34px;
  height: 34px;
  margin-right: 10px;
  border-radius: 9px;
  object-fit: cover;
}
.styled-select-menu button { align-items: center; }
.styled-select-menu button > span { flex: 1; }
.styled-select-group {
  display: block;
  padding: 11px 10px 6px;
  color: #65e4dc;
  font: 900 10px/1 Inter, sans-serif;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.styled-select-group:not(:first-child) {
  margin-top: 4px;
  border-top: 1px solid #ffffff12;
}
.styled-select-trigger:hover {
  border-color: #8d7cf4;
  background: #0b1930;
}
.styled-select-trigger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.styled-select-menu {
  position: absolute;
  z-index: 220;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  display: grid;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b1930;
  box-shadow: 0 18px 50px #0008;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  max-height: min(440px, 62vh);
  overflow-y: auto;
  transition: 0.22s;
}
.styled-select.open .styled-select-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.styled-select-menu.select-portal-open {
  position: fixed;
  z-index: 10020;
  opacity: 1;
  visibility: visible;
  transform: none;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #8d7cf4 #071329;
  transition:
    opacity 0.16s ease,
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
.styled-select-menu.select-portal-open::-webkit-scrollbar {
  width: 9px;
}
.styled-select-menu.select-portal-open::-webkit-scrollbar-track {
  margin-block: 7px;
  border-radius: 999px;
  background: #071329;
}
.styled-select-menu.select-portal-open::-webkit-scrollbar-thumb {
  border: 2px solid #071329;
  border-radius: 999px;
  background: linear-gradient(180deg, #65e4dc, #8d7cf4);
}
.styled-select-menu.select-portal-open::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #8af3ec, #aa9fff);
}
.styled-select-menu button {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #ddd9ff;
  text-align: left;
  transition:
    background 0.18s,
    color 0.18s,
    transform 0.18s;
}
.styled-select-menu button:hover,
.styled-select-menu button.active {
  background: #8d7cf425;
  color: #fff;
  transform: translateX(2px);
}
.routine-form-grid,
.routine-optional-content {
  overflow: visible !important;
}
.randomize-mix {
  margin-left: 8px;
}
