/* Shared native fallback and progressively enhanced single-select controls. */
select:not([multiple]) {
  appearance: none;
  padding-right: 40px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa8b6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 13px center !important;
  cursor: pointer;
}
select option { background: #1b222a; color: #edf2f7; }
.select-control { position: relative; display: block; min-width: 0; width: 100%; }
.select-native { position: absolute; width: 1px !important; height: 1px; padding: 0 !important; opacity: 0; pointer-events: none; overflow: hidden; }
.select-control .select-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 10px 13px;
  border: 1px solid #35414d; border-radius: 10px; background: #151c24;
  color: #e5ecf4; font: inherit; font-weight: 400; text-align: left;
  box-shadow: inset 0 1px 0 #ffffff04; cursor: pointer;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.select-trigger > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-trigger::after { content: ''; flex: 0 0 7px; width: 7px; height: 7px; margin: -4px 3px 0 0; border-right: 1.5px solid #9aa8b6; border-bottom: 1.5px solid #9aa8b6; transform: rotate(45deg); transition: transform .16s; }
.select-control .select-trigger:hover { background: #1c2530; border-color: #64744e; transform: none; filter: none; }
.select-control .select-trigger[aria-expanded=true] { border-color: #aacd68; box-shadow: 0 0 0 3px #c7f36b10; }
.select-trigger[aria-expanded=true]::after { transform: translateY(4px) rotate(225deg); }
.select-control .select-trigger:focus-visible { outline: 2px solid #c7f36b; outline-offset: 3px; }
.select-control .select-trigger:disabled { opacity: .45; cursor: not-allowed; }
.select-menu {
  position: fixed; z-index: 1000; display: flex; flex-direction: column;
  padding: 6px; border: 1px solid #414e5c; border-radius: 12px;
  background: #1b232d; color: #edf2f7; text-align: left;
  box-shadow: 0 18px 48px #0006, 0 2px 8px #0003; font: 14px/1.5 system-ui,"Microsoft YaHei",sans-serif;
}
.select-menu[hidden] { display: none !important; }
.select-menu .select-search { flex-shrink: 0; width: 100%; min-height: 39px; margin: 0 0 6px; padding: 9px 11px; border: 1px solid #35414d; border-radius: 7px; background: #111820; color: #edf2f7; font: inherit; outline: none; }
.select-menu .select-search:focus { border-color: #8ca958; box-shadow: none; outline: none; }
.select-search::placeholder { color: #8c9aa9; }
.select-options { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #4a5966 transparent; }
.select-option { display: flex; align-items: center; gap: 12px; min-height: 38px; padding: 9px 11px; border-radius: 7px; cursor: pointer; overflow-wrap: anywhere; }
.select-option::after { content: ''; margin-left: auto; flex-shrink: 0; width: 14px; }
.select-option.is-focused { background: #2d3946; }
.select-option[aria-selected=true] { color: #d3f694; background: #c7f36b13; }
.select-option[aria-selected=true]::after { content: '✓'; font-weight: 700; }
.select-option[aria-selected=true].is-focused { background: #c7f36b24; }
.select-option[aria-disabled=true] { opacity: .4; cursor: not-allowed; }
.select-option[lang=en],.select-option[lang=vi] { font-family: "Segoe UI","Noto Sans",Arial,sans-serif; }
.select-option[lang=ko] { font-family: "Malgun Gothic","Apple SD Gothic Neo","Noto Sans KR",system-ui,sans-serif; }
.select-option[lang=ja] { font-family: "Yu Gothic","Hiragino Kaku Gothic ProN","Noto Sans JP",system-ui,sans-serif; }
.select-option[lang=hi] { font-family: "Nirmala UI","Noto Sans Devanagari",Mangal,system-ui,sans-serif; }
.select-group { padding: 10px 11px 4px; font-size: 11px; color: #98a7b6; }
.select-empty { margin: 0; padding: 18px 11px; color: #a1aebb; font-size: 13px; }
.language .select-control { width: 152px; }
.language .select-trigger { font-size: 13px; background: #1b2027; }
.language-flag { display: block; flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px #98a7b62b; }
.select-language-control .select-trigger > .select-value { display: flex; align-items: center; gap: 9px; min-width: 0; }
.select-language-control .select-value-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-language-menu .select-option { gap: 11px; }
.select-language-menu .select-value-text { font-weight: 650; }
.language .select-control.select-language-control { width: 158px; }
@media (max-width: 650px), (pointer: coarse) {
  .select-control:not(.select-inline-control) .select-native { position: static; width: 100% !important; height: auto; min-height: 44px; padding: 10px 40px 10px 12px !important; opacity: 1; pointer-events: auto; }
  .select-control:not(.select-inline-control) .select-trigger, .select-menu:not(.select-inline-menu) { display: none !important; }
  .language .select-control { width: 140px; }
}
/* Public controls stay anchored to their trigger on both desktop and touch screens. */
.select-menu.select-inline-menu { padding: 7px; border-color: #4a5849; border-radius: 11px; background: linear-gradient(145deg, #232c30, #1b222c); font: 700 15px/1.5 var(--font, system-ui, sans-serif); }
.select-inline-menu .select-options { -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.select-inline-menu .select-option { min-height: 44px; padding: 10px 12px; border: 1px solid transparent; }
.select-inline-menu .select-option[aria-selected=true] { border-color: #c7f36b40; }
.select-inline-menu .select-search { min-height: 44px; font-size: 16px; font-weight: 600; }
@media (max-width: 650px), (pointer: coarse) {
  .select-inline-control .select-trigger { min-height: 44px; font-weight: 700; }
  .select-menu.select-inline-menu { font-size: 16px; }
  .select-inline-menu .select-option { min-height: 46px; }
}
@media (prefers-reduced-motion: reduce) { .select-trigger, .select-trigger::after { transition: none !important; } }
