.ap-select, .ap-select *, .ap-choice-dialog, .ap-choice-dialog * { box-sizing: border-box; }
.ap-select { position: relative; display: block; width: 100%; min-width: 0; color: var(--app-ink, #243b32); font: inherit; }
.ap-select .ap-select-native { position: absolute!important; width: 1px!important; height: 1px!important; min-height: 0!important; padding: 0!important; margin: 0!important; clip-path: inset(50%); overflow: hidden; white-space: nowrap; border: 0!important; }
.ap-select .ap-select-trigger { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-width: 0; min-height: 40px; margin: 0; padding: 9px 12px; background: var(--ap-select-surface, #fff); color: inherit; border: 1px solid var(--app-border, #d6ddda); border-radius: 8px; font: inherit; font-weight: 400; text-align: left; cursor: pointer; }
.ap-select-trigger > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-select-change { flex: none; font-size: 12px; color: var(--app-muted, #66756d); }
.ap-select-trigger:focus-visible, .ap-choice-dialog :focus-visible { outline: 2px solid var(--app-muted, #66756d)!important; outline-offset: 2px; }
.ap-select-trigger:disabled { opacity: .55; cursor: default; }
.ap-select[hidden], .ap-choice-dialog [hidden] { display: none!important; }
.ap-choice-dialog { width: min(520px, calc(100vw - 32px)); max-height: min(680px, calc(100dvh - 32px)); margin: auto; padding: 24px; border: 1px solid var(--app-border, #d6ddda); border-radius: 16px; background: var(--ap-select-surface, #fff); color: var(--app-ink, #243b32); font: 14px/1.5 system-ui,sans-serif; box-shadow: 0 20px 70px #14271d26; overflow-y: auto; }
.ap-choice-dialog::backdrop { background: #14271d66; }
.ap-choice-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.ap-choice-dialog h2 { margin: 0; font-size: 20px; line-height: 1.3; }
.ap-choice-dialog .ap-choice-close { display: grid; place-items: center; min-width: 36px; min-height: 36px; padding: 0; border: 1px solid var(--app-border, #d6ddda); background: transparent; color: inherit; border-radius: 8px; font-size: 24px; cursor: pointer; }
.ap-choice-dialog .ap-choice-search { display: block; width: 100%; min-height: 42px; margin: 0 0 14px; padding: 10px 12px; background: var(--ap-select-surface, #fff); border: 1px solid var(--app-border, #d6ddda); border-radius: 8px; color: inherit; font: inherit; }
.ap-choice-list { max-height: min(380px, 48dvh); overflow-y: auto; overscroll-behavior: contain; border-block: 1px solid var(--app-border, #d6ddda); }
.ap-choice-option { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 46px; padding: 12px 10px; border-bottom: 1px solid var(--app-border, #d6ddda); cursor: pointer; overflow-wrap: anywhere; }
.ap-choice-option:last-child { border-bottom: 0; }
.ap-choice-option[aria-selected="true"] { font-weight: 600; }
.ap-choice-option:hover, .ap-choice-option.ap-choice-active { background: var(--ap-select-hover, #edf3ef); }
.ap-choice-option[aria-disabled="true"] { opacity: .45; cursor: default; }
.ap-choice-status { margin: 12px 0 0; font-size: 13px; color: var(--app-muted, #66756d); }
.ap-choice-done { margin-top: 16px; }
.ap-choice-error { display: block; margin-top: 6px; color: var(--error, #a33131); font-size: 13px; }
.workspace-section { margin-block: 20px; }
.workspace-section > h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; color: inherit; }
.app-theme .ap-select { flex: 1; }
.app-theme .ap-select-trigger { border-color: transparent; background: transparent; font-size: 13px; }
html[data-theme="dark"] { --ap-select-surface: var(--night-surface, #18231f); --ap-select-hover: var(--night-raised, #26372f); }
@media(max-width:720px) { .ap-select .ap-select-trigger { min-height: 44px; }.ap-choice-dialog { padding: 20px; }.ap-choice-dialog .ap-choice-search { font-size: 16px; }.ap-choice-option { min-height: 48px; } }
