:root select {
  appearance:none;
  -webkit-appearance:none;
  display:block;
  min-height:40px;
  max-width:100%;
  padding-block:8px;
  padding-inline:14px 38px;
  border:1px solid var(--border-control);
  border-radius:6px;
  background-color:var(--surface);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18' fill='none'%3E%3Cpath d='m4.5 7 4.5 4.5L13.5 7' stroke='%236229ba' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 12px center;
  background-size:16px 16px;
  color:var(--text);
  font:inherit;
  font-weight:700;
  line-height:1.35;
  cursor:pointer;
  box-shadow:none;
  transition:border-color .16s,background-color .16s,box-shadow .16s;
}
html[dir="rtl"] select { background-position:left 12px center; }
select:hover { border-color:var(--accent); background-color:var(--surface-hover); }
select:focus-visible { outline:2px solid var(--accent); outline-offset:2px; border-color:var(--accent); }
select:disabled { opacity:.55; cursor:not-allowed; }
select option, select optgroup { background:var(--surface); color:var(--text); font:inherit; font-weight:600; }
:root[data-theme="dark"] select {
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18' fill='none'%3E%3Cpath d='m4.5 7 4.5 4.5L13.5 7' stroke='%23c7a3ff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.context-left select#annotationScope { width:min(172px,36vw); min-height:34px; padding-block:5px; padding-inline:10px 28px; font-size:12px; }
html[dir="rtl"] .context-left select#annotationScope { background-position:left 7px center; }
html[dir="ltr"] .context-left select#annotationScope { background-position:right 7px center; }
.admin-main .toolbar select,.admin-main .panel-head select { min-width:138px; }
@media(max-width:700px) { select { min-height:38px; font-size:13px; }.admin-main .toolbar select { min-width:0; flex:1 1 135px; } }
.custom-select-menu { position:fixed; z-index:10020; overflow-y:auto; overflow-x:hidden; padding:6px; border:1px solid var(--border-strong); border-radius:8px; background:var(--surface); box-shadow:var(--shadow-sm); color:var(--text); scrollbar-width:thin; overscroll-behavior:contain; }
.custom-select-option { display:block; width:100%; min-height:37px; padding:7px 11px; border:0; border-radius:4px; background:transparent; color:var(--text); text-align:start; font:inherit; font-size:13px; font-weight:650; line-height:1.4; cursor:pointer; }
.custom-select-option:hover,.custom-select-option:focus-visible { background:var(--surface-hover); outline:0; }
.custom-select-option.selected { background:var(--selected-bg); color:var(--selected-text); border-inline-start:2px solid var(--accent); }
.custom-select-option:disabled { opacity:.45; cursor:not-allowed; }
.custom-select-group { padding:9px 11px 4px; color:var(--text-3); font-size:11px; font-weight:800; }

:root select{border-radius:11px;min-height:44px;background-color:var(--surface-2);padding-block:10px}
.custom-select-menu{padding:8px;border-radius:14px;border-color:var(--border-control);box-shadow:0 16px 40px -14px var(--metal-shadow),inset 0 1px var(--metal-light);animation:select-reveal .12s ease-out}
.custom-select-option{display:flex;align-items:center;gap:10px;min-height:42px;padding:10px 12px;border-radius:9px;font-size:13px;font-weight:700}
.custom-select-option span:first-of-type{flex:1;min-width:0;overflow-wrap:anywhere}
.custom-select-option.selected{border-inline-start:0}
.custom-select-check{color:var(--accent);visibility:hidden;font-size:15px}
.custom-select-option.selected .custom-select-check{visibility:visible}
.custom-select-search{display:block;width:100%;min-height:42px;padding:10px 12px;border:1px solid var(--border-control);border-radius:9px;margin:0 0 7px;background:var(--surface-2);color:var(--text);font:inherit;font-size:13px}
.custom-select-search:focus{outline:2px solid var(--accent);outline-offset:-2px}
.custom-select-empty{padding:16px 10px;margin:0;text-align:center;color:var(--text-2);font-size:13px}
.custom-select-avatar{width:30px;height:30px;border-radius:50%;object-fit:cover;flex:none}
.custom-select-option[hidden],.custom-select-group[hidden],.custom-select-empty[hidden]{display:none}
@keyframes select-reveal{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.custom-select-menu{animation:none}}

:root[data-theme] select{background-repeat:no-repeat!important;background-size:16px 16px!important;background-position:right 12px center!important}
html[dir="rtl"][data-theme] select{background-position:left 12px center!important}
