/* Shared single-choice controls. Native form semantics and OS fallback stay intact. */
select:not([multiple]):is(:not([size]),[size="1"]){
 --select-surface:var(--auth-input,var(--ui-bg,var(--paper,#fff)));
 --select-ink:var(--auth-ink,var(--text,#20242b));
 --select-muted:var(--auth-muted,var(--muted,#697386));
 --select-line:var(--auth-line,var(--line,#e3e6ea));
 --select-accent:var(--auth-link,var(--accent,#3370ff));
 --select-active:var(--active,color-mix(in srgb,var(--select-accent) 11%,var(--select-surface)));
 --select-hover:var(--auth-hover,var(--canvas,color-mix(in srgb,var(--select-ink) 6%,var(--select-surface))));
 color:var(--select-ink);background-color:var(--select-surface);border-color:var(--select-line);border-radius:7px;cursor:pointer;max-inline-size:100%;
}
select:not([multiple]):is(:not([size]),[size="1"]):disabled{cursor:default;opacity:.65}
select:not([multiple]):is(:not([size]),[size="1"]):focus-visible{outline:2px solid var(--select-accent);outline-offset:2px}
/* Compact inline editors keep the browser's original popup: their edit lifecycle
   relies on focus/blur and must not be changed by picker focus transitions. */
@supports (appearance:base-select) and selector(::picker(select)){
 select:not([multiple]):is(:not([size]),[size="1"]):where(:not(.cell-editing select)),select:not([multiple]):is(:not([size]),[size="1"]):where(:not(.cell-editing select))::picker(select){appearance:base-select}
 /* Explicit flex overrides surface rules such as label select {display:block}.
    Only the fixed end-aligned picker icon rotates; neither label nor box reflows. */
 select:not([multiple]):is(:not([size]),[size="1"]):where(:not(.cell-editing select)){display:flex;flex-flow:row nowrap;align-items:center;gap:6px;text-align:start;white-space:nowrap;min-inline-size:0;overflow:hidden;text-overflow:ellipsis}
 select:not([multiple]):is(:not([size]),[size="1"]):where(:not(.cell-editing select))::picker(select){border:1px solid var(--select-line);border-radius:9px;padding:5px;margin-block:4px;background:var(--select-surface);color:var(--select-ink);box-shadow:0 8px 24px #0002;max-block-size:min(360px,55dvh);max-inline-size:calc(100vw - 16px);overflow:auto;overscroll-behavior:contain}
 select:not([multiple]):is(:not([size]),[size="1"]):where(:not(.cell-editing select))::picker-icon{color:var(--select-muted);flex:0 0 auto;inline-size:1em;block-size:1em;line-height:1;text-align:center;margin-inline-start:auto;transform-origin:center;rotate:0deg;font-size:12px;transition:rotate .12s ease}
 select:not([multiple]):is(:not([size]),[size="1"]):where(:not(.cell-editing select)):open::picker-icon{rotate:180deg}
 select:not([multiple]):is(:not([size]),[size="1"]):where(:not(.cell-editing select)) option{display:flex;align-items:center;gap:8px;min-block-size:30px;padding:6px 9px;border-radius:5px;white-space:normal;overflow-wrap:anywhere;font-weight:400;cursor:pointer}
 select:not([multiple]):is(:not([size]),[size="1"]):where(:not(.cell-editing select)) option:hover,select:not([multiple]):is(:not([size]),[size="1"]):where(:not(.cell-editing select)) option:focus-visible{background:var(--select-hover)}
 select:not([multiple]):is(:not([size]),[size="1"]):where(:not(.cell-editing select)) option:checked{background:var(--select-active);color:var(--select-ink);font-weight:550}
 select:not([multiple]):is(:not([size]),[size="1"]):where(:not(.cell-editing select)) option::checkmark{order:10;margin-inline-start:auto;color:var(--select-accent);flex:none}
 select:not([multiple]):is(:not([size]),[size="1"]):where(:not(.cell-editing select)) option:disabled{opacity:.55;cursor:default}
 select:not([multiple]):is(:not([size]),[size="1"]):where(:not(.cell-editing select)) optgroup{padding:4px 0;color:var(--select-muted);font-size:11px;font-weight:600}
 select:not([multiple]):is(:not([size]),[size="1"]):where(:not(.cell-editing select)) optgroup option{font-size:13px;color:var(--select-ink)}
 select:not([multiple]):is(:not([size]),[size="1"]):where(:not(.cell-editing select)) optgroup+optgroup{border-block-start:1px solid var(--select-line)}
 @media(pointer:coarse){select:not([multiple]):is(:not([size]),[size="1"]):where(:not(.cell-editing select)) option{min-block-size:44px;padding:9px 10px}}
 @media(prefers-reduced-motion:reduce){select:not([multiple]):is(:not([size]),[size="1"]):where(:not(.cell-editing select))::picker-icon{transition:none}}
}
@media(forced-colors:active){select:not([multiple]):is(:not([size]),[size="1"]):focus-visible{outline-color:Highlight}}
