[data-themed][hidden], .themed-select-list[hidden] { display: none !important; }
.themed-select { display: block; position: relative; min-width: 0; }
.themed-select-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .6em;
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: .38em .65em;
  background: var(--panel, #fffaf3);
  color: var(--ink, #233b34);
  border: 1px solid var(--rule, #9a8474);
  border-radius: 5px;
  text-align: left;
  line-height: 1.2;
}
.themed-select-trigger::after {
  content: '';
  flex: 0 0 .45em;
  width: .45em;
  height: .45em;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-.12em) rotate(45deg);
}
.themed-select-trigger[aria-expanded='true'] { border-color: var(--study-action, #006653); }
.themed-select-list {
  display: grid;
  position: absolute;
  top: calc(100% + 4px);
  z-index: 4;
  inset-inline: 0;
  min-width: min(11rem, 100vw);
  max-height: min(15rem, 40vh);
  overflow: auto;
  padding: 4px;
  border: 1px solid var(--rule, #9a8474);
  border-radius: 7px;
  background: var(--panel, #fffaf3);
  box-shadow: 0 7px 22px #192a221c;
  color: var(--ink, #233b34);
  text-align: left;
}
.themed-select[data-above] .themed-select-list { top: auto; bottom: calc(100% + 4px); }
.themed-select-list [role='option'] { padding: .48em .65em; border-radius: 4px; cursor: pointer; }
.themed-select-list [role='option']:is([data-active], :hover):not([aria-disabled='true']) { background: var(--study-tint, #e0f2e9); }
.themed-select-list [aria-selected='true'] { font-weight: 700; }
.themed-select-list [aria-disabled='true'] { color: var(--muted, #62564d); cursor: default; }

/* Preserve native keyboard and form semantics; paint the controls consistently. */
input[type='range'] {
  appearance: none;
  height: 1.35rem;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
input[type='range']::-webkit-slider-runnable-track { height: 4px; background: #bdcfc4; border-radius: 1rem; }
input[type='range']::-moz-range-track { height: 4px; background: #bdcfc4; border-radius: 1rem; }
input[type='range']::-webkit-slider-thumb { appearance: none; width: 15px; height: 15px; margin-top: -5.5px; border: 1px solid #004c3d; border-radius: 50%; background: #006653; }
input[type='range']::-moz-range-thumb { width: 15px; height: 15px; border: 1px solid #004c3d; border-radius: 50%; background: #006653; }
input[type='range']:disabled { opacity: .6; cursor: not-allowed; }
input:is([type='radio'], [type='checkbox']):not([role='switch']) { accent-color: var(--study-action, #006653); }
