.model-control { min-width: 0; max-width: 100%; }
.model-trigger { display: inline-flex; align-items: center; gap: .42rem; max-width: 100%; min-height: 2.15rem; padding: .28rem .6rem; font-size: .83rem; line-height: 1.2; font-weight: 570; color: #eeeaf5; background: #38353e; border: 1px solid #55505d; border-radius: .38rem; }
.model-trigger:hover, .model-trigger[aria-expanded="true"] { background: #44404c; border-color: #898093; }
.model-trigger-mark, .model-monogram { display: inline-grid; flex: none; place-items: center; font-family: "DM Sans", Inter, system-ui, sans-serif; font-weight: 720; letter-spacing: -.075em; color: #ded3ee; }
.model-trigger-mark { min-width: 1.1rem; font-size: .85rem; }
.model-trigger-name { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.model-trigger i { width: .37rem; height: .37rem; flex: none; border: solid #cbc2d3; border-width: 0 1px 1px 0; transform: translateY(-.1rem) rotate(45deg); }
.model-trigger[aria-expanded="true"] i { transform: translateY(.1rem) rotate(225deg); }

.model-menu { position: fixed; z-index: 40; inset: auto; margin: 0; padding: 0; overflow: hidden; max-width: none; border: 1px solid #55515c; border-radius: .75rem; background: #222327; color: #f2eff4; box-shadow: 0 18px 55px #0008,0 4px 14px #0006; }
.model-menu[open] { display: flex; flex-direction: column; }
.model-menu::backdrop { background: #09090bc7; }
.model-search-row { display: flex; align-items: center; gap: .65rem; flex: none; padding: .65rem .8rem; border-bottom: 1px solid #3e3d44; }
.model-search-icon { position: relative; display: inline-block; width: .85rem; height: .85rem; flex: none; margin: 0 .15rem 0 .22rem; border: 1.5px solid #bbb4c5; border-radius: 50%; }
.model-search-icon::after { content: ""; position: absolute; height: 1.5px; width: .39rem; right: -.3rem; bottom: -.15rem; transform: rotate(45deg); background: #bbb4c5; }
.model-search-row input { width: 100%; min-width: 0; min-height: 2rem; padding: .2rem 0; border: none; color: #f3eff6; background: transparent; font-size: .92rem; }
.model-search-row input::placeholder { color: #b0aab9; }
.model-search-row input:focus { outline: none; }
.model-search-row:focus-within { box-shadow: inset 0 -1px #8e819c; }
.model-close, .model-no-results button { border: 0; border-radius: .35rem; color: #cfc7d7; background: transparent; }
.model-close { min-width: 2rem; min-height: 2rem; padding: .2rem; font-size: 1.34rem; line-height: 1; }
.model-close:hover { background: #343238; color: white; }
.model-summary { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .75rem .98rem .35rem; flex: none; }
.model-summary h2, .model-total { margin: 0; font-size: .74rem; letter-spacing: .02em; line-height: 1.45; }
.model-summary h2 { font-weight: 640; color: #d8d1df; }
.model-total { color: #aaa5b1; }
.model-list { overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding: .1rem .42rem .46rem; scrollbar-color: #64606a #222327; scrollbar-width: thin; }
.model-option { position: relative; display: flex; align-items: center; gap: .68rem; min-height: 3.38rem; border: 1px solid transparent; border-radius: .45rem; padding: .36rem 1.64rem .36rem .47rem; cursor: pointer; }
.model-option:hover, .model-option.is-highlighted { background: #333238; }
.model-option[aria-selected="true"] { color: #f2eafb; }
.model-option[aria-selected="true"]::after { content: ""; position: absolute; right: .7rem; width: .64rem; height: .36rem; border: solid #d6c9e9; border-width: 0 0 2px 2px; transform: translateY(-.11rem) rotate(-45deg); }
.model-option.is-highlighted { border-color: #55505e; }
.model-monogram { width: 2.23rem; height: 2.23rem; border: 1px solid #56505f; border-radius: .45rem; background: #37333d; font-size: 1.04rem; }
.model-option-copy { display: grid; min-width: 0; gap: .13rem; }
.model-option-name { font-weight: 610; font-size: .92rem; line-height: 1.32; overflow-wrap: anywhere; }
.model-option-description { color: #b9b4bf; font-size: .77rem; line-height: 1.45; }
.model-no-results { padding: 1.3rem 1rem 1.7rem; text-align: center; color: #c2bbc9; font-size: .9rem; }
.model-no-results button { padding: .45rem; text-decoration: underline; text-underline-offset: .2em; }
.model-menu.is-sheet { padding-bottom: env(safe-area-inset-bottom); border-radius: .9rem .9rem 0 0; }
.model-menu.is-sheet .model-search-row input { font-size: 16px; }
.model-menu.is-sheet .model-option { min-height: 3.55rem; }
@media (max-width: 640px) {
  .model-trigger { min-height: 1.98rem; padding: .23rem .42rem; gap: .32rem; font-size: .76rem; }
}
