.hsel{position:relative; display:inline-block; vertical-align:middle; max-width:100%}
.hsel.is-input{display:block; width:100%}
.hsel.is-inline{display:inline-block; max-width:100%}
.hsel > select.hsel-native{position:absolute; left:0; top:0; width:100%; height:100%; margin:0; opacity:0; pointer-events:none}
.hsel-btn{display:flex; align-items:center; gap:8px; position:relative; text-align:left; cursor:pointer; line-height:normal; padding-right:12px; max-width:100%; transition:border-color .15s ease, background-color .15s ease, color .15s ease}
.hsel-btn-plain{background:var(--field); border:1px solid var(--line2); border-radius:7px; color:var(--text); padding:6px 10px; font-family:inherit; font-size:13px; box-shadow:none}
.hsel.is-input .hsel-btn{width:100%}
.hsel.is-find .hsel-btn{max-width:100%}
.hsel.is-inline .hsel-btn{width:auto}
.hsel-btn:hover{background-color:var(--raise); border-color:var(--line3)}
.hsel-btn:focus, .hsel-btn[aria-expanded="true"]{border-color:var(--accent-line)}
.hsel-btn:focus-visible{box-shadow:0 0 0 3px var(--accent-soft)}
.hsel-btn:disabled{opacity:.5; cursor:not-allowed}
.hsel-btn.hsel-empty .hsel-text{color:var(--dim)}
.hsel-btn.hsel-invalid{border-color:var(--err-line)}
.hsel-text{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.hsel-chev{display:flex; flex-shrink:0; margin-left:auto; color:var(--dim); transition:transform .2s cubic-bezier(.2,.8,.2,1), color .15s ease}
.hsel-chev svg{width:14px; height:14px}
.hsel-btn:hover .hsel-chev{color:var(--soft)}
.hsel-btn[aria-expanded="true"] .hsel-chev{transform:rotate(180deg); color:var(--accent)}
.hsel-list{position:fixed; z-index:1000; max-width:min(360px, calc(100vw - 16px)); max-height:290px; overflow-y:auto; overscroll-behavior:contain; padding:4px; background:var(--card); border:1px solid var(--line2); border-radius:8px; box-shadow:var(--shadow); opacity:0; transform:translateY(-6px) scale(.98); transform-origin:top center; transition:opacity .16s ease, transform .18s cubic-bezier(.2,.8,.2,1); pointer-events:none}
.hsel-list.up{transform:translateY(6px) scale(.98); transform-origin:bottom center}
.hsel-list.open{opacity:1; transform:none; pointer-events:auto}
.hsel-group-label{padding:7px 10px 4px; color:var(--faint); font-size:10px; font-weight:600; letter-spacing:.5px; text-transform:uppercase}
.hsel-opt{display:flex; align-items:center; gap:10px; padding:7px 10px; border-radius:6px; color:var(--soft); cursor:pointer; white-space:nowrap; line-height:1.35; transition:background-color .12s ease, color .12s ease}
.hsel-opt-text{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis}
.hsel-opt.active{background:var(--raise); color:var(--text)}
.hsel-opt.sel{color:var(--text)}
.hsel-opt.off{color:var(--faint); cursor:default}
.hsel-check{display:flex; margin-left:auto; color:var(--accent)}
.hsel-check svg{width:14px; height:14px}
.hsel-list{scrollbar-width:thin; scrollbar-color:var(--scroll, #33373d) transparent}
.hsel-list::-webkit-scrollbar{width:10px}
.hsel-list::-webkit-scrollbar-track{background:transparent}
.hsel-list::-webkit-scrollbar-thumb{background:var(--scroll, #33373d); border-radius:10px; border:2px solid transparent; background-clip:padding-box}
.hsel-list::-webkit-scrollbar-thumb:hover{background:var(--scroll-h, #454a51); background-clip:padding-box}
