.theme-select { position: relative; display: inline-grid; width: 100%; min-width: 0; vertical-align: middle; text-align: left; }
.theme-select[hidden] { display: none !important; }
body .theme-select > select.theme-select-native { position: absolute !important; inset: 0 auto auto 0 !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; border: 0 !important; opacity: 0 !important; pointer-events: none !important; }
.theme-select-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body .theme-select > button.theme-select-trigger[type=button],
body.paper-theme .theme-select > button.theme-select-trigger[type=button] { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 10px 12px; border: 1px solid var(--ui-border-strong); border-radius: 6px; color: var(--ui-text); background: #ffffff; box-shadow: none; font: 400 15px/1.5 'Noto Sans TC',sans-serif; letter-spacing: 0; text-align: left; cursor: pointer; transform: none; transition: border-color 160ms ease, background-color 160ms ease; }
body.paper-theme .theme-select > button.theme-select-trigger[type=button]:hover:not(:disabled),
body .theme-select > button.theme-select-trigger[type=button]:hover:not(:disabled) { color: var(--ui-text); background: var(--ui-soft); border-color: var(--ui-accent); transform: none; box-shadow: none; }
.theme-select-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-select-arrow { flex: 0 0 7px; height: 7px; margin: -4px 3px 0 0; border-right: 1.5px solid var(--ui-accent); border-bottom: 1.5px solid var(--ui-accent); transform: rotate(45deg); transition: transform 160ms ease; }
.theme-select.is-open .theme-select-arrow { margin-top: 3px; transform: rotate(225deg); }
body .theme-select > button.theme-select-trigger:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 3px; }
.theme-select-trigger[aria-invalid=true] { border-color: var(--ui-danger) !important; }
.theme-select-list { position: fixed; inset: auto; z-index: 10000; box-sizing: border-box; margin: 0; padding: 5px; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--ui-border-strong); border-radius: 6px; color: var(--ui-text); background: #ffffff; box-shadow: 0 4px 20px rgb(var(--ui-text-rgb) / .04); font: 400 14px/1.6 'Noto Sans TC',sans-serif; text-align: left; }
.theme-select-list[hidden] { display: none !important; }
.theme-select-option { position: relative; min-height: 40px; display: flex; align-items: center; padding: 8px 32px 8px 11px; border-radius: 3px; cursor: pointer; overflow-wrap: anywhere; }
.theme-select-option[aria-selected=true] { color: var(--ui-accent); background: var(--ui-blue); }
.theme-select-option[aria-selected=true]::after { content: ''; position: absolute; right: 13px; width: 4px; height: 9px; margin-top: -3px; border-right: 1.5px solid var(--ui-accent); border-bottom: 1.5px solid var(--ui-accent); transform: rotate(45deg); }
.theme-select-option:is(:hover,.is-active):not([aria-disabled=true]) { color: var(--ui-text); background: var(--ui-blue); }
.theme-select-option[aria-disabled=true] { opacity: .4; cursor: default; }
.theme-select-group { padding: 9px 11px 5px; color: var(--ui-muted); font-size: 11px; }
@media (max-width: 640px) { body.paper-theme .theme-select > button.theme-select-trigger[type=button] { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .theme-select-trigger,.theme-select-arrow { transition: none !important; } }
