/* The trigger stays in the results row; its dialog lives outside the scrolling list. */
#arenal-index-dos .results-heading #index-count{min-width:0;text-align:left}
#arenal-index-dos .sort-control{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:44px;padding:6px 8px;flex-shrink:0;color:#63705e;font-size:12px;font-weight:500;border:0;background:transparent;border-radius:10px;white-space:nowrap;cursor:pointer}
#arenal-index-dos .sort-control svg{width:16px;height:16px;flex-shrink:0}
#arenal-index-dos .sort-control[data-active=true]{color:#20533a}
#arenal-index-dos .sort-control[data-active=true]::after{content:'';width:4px;height:4px;border-radius:50%;background:currentColor}
#arenal-index-dos .sort-control:focus-within{outline:2px solid #285a3d;outline-offset:2px}
@media(hover:hover){#arenal-index-dos .sort-control:hover{background:#f3f5f0}}
@media(max-width:599px){
  #arenal-index-dos .results-heading{gap:4px}
  #arenal-index-dos #results-expand>span:not(.panel-chevron){display:none}
  #arenal-index-dos #results-expand{width:44px;flex:0 0 44px}
}
.sort-dialog{box-sizing:border-box;width:min(360px,calc(100% - 32px));max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain;margin:auto;padding:24px;border:1px solid #e4e8df;border-radius:20px;background:#fff;color:#303b2c;box-shadow:0 20px 80px #0003;font:14px/1.5 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.sort-dialog::backdrop{background:#15291d70}
.sort-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:8px}
.sort-dialog h2{margin:0;font-size:18px;font-weight:600}
.sort-dialog button{font:inherit;color:inherit;cursor:pointer}
.sort-dialog-heading button{width:44px;height:44px;margin-right:-8px;border:0;border-radius:50%;background:transparent;font-size:26px}
.sort-options{display:grid;gap:4px}
.sort-options button{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;padding:12px;border:1px solid transparent;border-radius:10px;background:transparent;text-align:left}
.sort-options button[aria-pressed=true]{border-color:#cbdac2;background:#f4f7f1;color:#285a3d}
.sort-options button[aria-pressed=true]::after{content:'✓';font-weight:600}
.sort-options button:disabled{opacity:.4;cursor:default}
.sort-dialog button:focus-visible{outline:2px solid #285a3d;outline-offset:2px}
@media(hover:hover){.sort-dialog button:not(:disabled):hover{background:#f3f5f0}}
@media(max-width:599px){.sort-dialog{width:100%;max-width:480px;margin:auto auto 0;border-radius:20px 20px 0 0;border-bottom:0;padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))}}
