/* 单选框统一使用后台主题；保留原生表单、键盘和禁用语义，旧浏览器继续使用系统菜单。 */
select:not([multiple]):not([size]) {
  min-width: 0;
  cursor: pointer;
  text-overflow: ellipsis;
}
select:disabled,
fieldset:disabled select {
  cursor: not-allowed;
}
@supports (appearance: base-select) {
  select:not([multiple]):not([size]),
  select:not([multiple]):not([size])::picker(select) {
    appearance: base-select;
  }
  select:not([multiple]):not([size]) {
    align-items: center;
    gap: 12px;
    text-align: start;
    transition: border-color 120ms;
  }
  select:not([multiple]):not([size]):hover:not(:disabled) {
    border-color: var(--muted);
  }
  select:not([multiple]):not([size])::picker-icon {
    content: "";
    display: block;
    flex: 0 0 12px;
    width: 12px;
    height: 12px;
    margin: 0 0 0 auto;
    background: var(--muted);
    clip-path: polygon(0 20%, 50% 65%, 100% 20%, 100% 40%, 50% 85%, 0 40%);
    rotate: 0deg;
    transition: rotate 120ms;
  }
  select:not([multiple]):not([size]):open::picker-icon {
    rotate: 180deg;
  }
  select:not([multiple]):not([size])::picker(select) {
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 4px;
    margin-block: 5px;
    min-width: anchor-size(width);
    max-width: min(440px, calc(100vw - 24px));
    max-height: min(320px, 50dvh);
    overflow: auto;
    overscroll-behavior: contain;
    box-shadow: 0 8px 28px rgb(0 0 0 / 14%);
  }
  select:not([multiple]):not([size]) option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: max(var(--touch-target), 34px);
    padding: 7px 10px;
    border-radius: 5px;
    color: var(--ink);
    background: transparent;
    overflow-wrap: anywhere;
    cursor: pointer;
    outline: none;
  }
  select:not([multiple]):not([size]) option:checked {
    background: var(--soft);
    font-weight: 600;
  }
  select:not([multiple]):not([size]) option:is(:hover, :focus-visible) {
    background: var(--hover);
    box-shadow: inset 0 0 0 1px var(--line);
  }
  select:not([multiple]):not([size]) option::checkmark {
    order: 1;
    margin-inline-start: auto;
    color: var(--ink);
    font-size: 13px;
  }
  select:not([multiple]):not([size]) option:disabled {
    color: var(--muted);
    opacity: 0.6;
    cursor: not-allowed;
  }
}
@media (prefers-reduced-motion: reduce) {
  select:not([multiple]):not([size]),
  select:not([multiple]):not([size])::picker-icon {
    transition: none;
  }
}
