.custom-select { display: block; position: relative; width: 100%; min-width: 0; }
.custom-select-native { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; opacity: 0; pointer-events: none; clip-path: inset(50%); }
.select-trigger { width: 100%; min-width: 0; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 12px; border: 1px solid var(--line); background: #FFF; color: var(--ink); text-align: left; font: 16px/1.5 var(--sans); }
.select-trigger-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-trigger .material-symbols-outlined { width: 16px; height: 16px; flex-shrink: 0;  font-size: 16px; }
.select-trigger.is-placeholder { color: #888; }
.select-trigger:disabled { background: #F5F5F5; color: #999; cursor: default; }
.select-trigger.is-invalid { border-color: var(--wine); }
.select-trigger:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
dialog.select-dialog { width: min(480px, calc(100% - 32px)); max-width: 480px; max-height: calc(100dvh - 32px); padding: 24px; overflow: hidden; border-radius: 0; background: #FFF; }
dialog.select-dialog[open] { display: flex; flex-direction: column; }
.select-dialog-heading, .select-search, .select-dialog-footer { flex-shrink: 0; }
.select-dialog::backdrop { background: #0007; backdrop-filter: blur(3px); }
.select-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.select-dialog-heading h2 { font-size: 22px; line-height: 1.5; }
.select-dialog-close { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; color: var(--ink); }
.select-dialog-close:hover { background: var(--cream); }
.select-search { display: block; width: 100%; min-height: 44px; border: 1px solid var(--line); padding: 10px 12px; margin-bottom: 12px; background: #FFF; font-size: 16px; }
.select-search[hidden], .select-clear[hidden] { display: none; }
.select-search:focus { outline: none; box-shadow: none; }
.select-options-scroll { height: min(340px, 45dvh); min-height: 60px; overflow: auto; flex: 0 1 auto; }
.select-options { padding-right: 10px; }
.select-option { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 11px 12px; border-bottom: 1px solid #F0F0F0; font-size: 16px; line-height: 1.5; text-align: left; color: var(--ink); }
.select-option:hover, .select-option:focus-visible { outline: none; background: var(--cream); }
.select-option[aria-selected="true"] { background: #1A1A1A; color: #FFF; }
.select-option .material-symbols-outlined { width: 18px; height: 18px; flex-shrink: 0;  font-size: 18px; }
.select-no-results { padding: 28px 12px; font-size: 14px; color: var(--muted); line-height: 1.8; }
.select-dialog-footer { padding-top: 14px; border-top: 1px solid var(--line); margin-top: 12px; display: flex; align-items: center; justify-content: flex-end; min-height: 36px; gap: 14px; }
.select-clear { font-size: 14px; color: var(--wine); }
.select-options-scroll>.scrollbar-track-y { width: 5px; background: #1A1A1A08; }
.select-options-scroll>.scrollbar-track-x { display: none !important; }
@media(max-width:760px) {
  dialog.select-dialog { padding: 20px; }
  .select-dialog-heading h2 { font-size: 20px; }
}
