/* Aligned, low-contrast segmented sorting. */
html body :is(.catalog-sortbar__left,.mobile-category-sort .result-sort-segment){--sort-surface:rgba(236,230,220,.075);--sort-line:rgba(226,217,204,.19);--sort-selected:rgba(232,225,215,.19);display:flex!important;align-items:stretch!important;gap:4px!important;padding:4px!important;border:1px solid var(--sort-line)!important;border-radius:999px!important;background:var(--sort-surface)!important;box-sizing:border-box;min-height:44px;}
html[data-theme=light] body :is(.catalog-sortbar__left,.mobile-category-sort .result-sort-segment){--sort-surface:rgba(92,78,62,.045);--sort-line:rgba(92,78,62,.15);--sort-selected:rgba(255,255,255,.88);}
html body .catalog-sortbar__label{display:none!important;}
html body :is(.catalog-sort-pill,.mobile-category-sort .result-sort-option){display:flex!important;align-items:center!important;justify-content:center!important;margin:0!important;padding:8px 15px!important;min-height:36px!important;height:auto!important;border:1px solid transparent!important;border-radius:999px!important;background:transparent!important;color:var(--c-text,#e9e7e3)!important;line-height:1.3!important;white-space:nowrap;box-sizing:border-box;transition:background .28s ease,border-color .28s ease,box-shadow .28s ease;}
html body :is(.catalog-sort-pill,.mobile-category-sort .result-sort-option).is-active{background:var(--sort-selected)!important;border-color:var(--sort-line)!important;box-shadow:0 1px 3px rgba(0,0,0,.07)!important;}
html body :is(.catalog-sort-pill,.mobile-category-sort .result-sort-option)::after{display:none!important;}
html body :is(.catalog-sort-pill,.mobile-category-sort .result-sort-option):focus-visible{outline:2px solid #b9aa95!important;outline-offset:3px;}
@media(max-width:1024px){
 html body :is(.catalog-sortbar__left,.mobile-category-sort .result-sort-segment){width:100%!important;display:grid!important;grid-template-columns:1.2fr .9fr 1.05fr 1.05fr!important;gap:2px!important;overflow:visible!important;}
 html body :is(.catalog-sort-pill,.mobile-category-sort .result-sort-option){min-width:0!important;min-height:36px!important;font-size:clamp(10px,2.7vw,12px)!important;padding:8px 5px!important;}
 html body [data-sort-key=hits_week]{order:0!important;}html body [data-sort-key=time]{order:1!important;}html body [data-sort-key=score]{order:2!important;}html body [data-sort-key=year]{order:3!important;}
}
@media(min-width:1025px){
 html body .catalog-sortbar__right{display:flex!important;gap:10px!important;align-items:center;min-width:350px;justify-content:flex-end;}
 html body .catalog-sortbar__right :is(.catalog-sortbar__reset,.catalog-recommend-btn){display:flex!important;align-items:center;justify-content:center!important;gap:0!important;width:44px!important;height:44px!important;min-width:44px!important;padding:0 12px!important;border-radius:999px!important;overflow:hidden;box-sizing:border-box;color:var(--c-text,#e9e7e3)!important;background:rgba(230,223,213,.09)!important;border-color:rgba(230,223,213,.2)!important;transition:width .5s cubic-bezier(.22,.61,.36,1) .12s,background .3s ease!important;}
 html body .catalog-sortbar__right :is(.catalog-sortbar__reset,.catalog-recommend-btn)>svg{flex:0 0 18px;width:18px!important;height:18px!important;}
 html body .catalog-sortbar__right :is(.catalog-sortbar__reset,.catalog-recommend-btn)>span{display:block!important;max-width:0;opacity:0;transform:translateX(-5px);overflow:hidden;white-space:nowrap;margin-left:0;transition:max-width .5s cubic-bezier(.22,.61,.36,1) .12s,margin-left .5s ease .12s,opacity .35s ease .24s,transform .4s ease .18s;}
 html body .catalog-sortbar__right :is(.catalog-sortbar__reset,.catalog-recommend-btn):is(:hover,:focus-visible){width:165px!important;}
 html body .catalog-sortbar__right :is(.catalog-sortbar__reset,.catalog-recommend-btn):is(:hover,:focus-visible)>span{max-width:130px;opacity:1;transform:translateX(0);margin-left:8px;}
 html body [data-sort-key=hits_week]{order:0!important;}html body [data-sort-key=score]{order:1!important;}html body [data-sort-key=time]{order:2!important;}html body [data-sort-key=year]{order:3!important;}
}
@media(prefers-reduced-motion:reduce){html body :is(.catalog-sort-pill,.result-sort-option,.catalog-sortbar__reset,.catalog-recommend-btn),html body .catalog-sortbar__right span{transition:none!important;}}
html body .catalog-sortbar__right .random-picker-trigger-die__left{fill:rgba(221,212,199,.35)!important;stroke:rgba(221,212,199,.7)!important;}
html body .catalog-sortbar__right .random-picker-trigger-die__right{fill:rgba(221,212,199,.17)!important;stroke:rgba(221,212,199,.7)!important;}
html body .catalog-sortbar__right .random-picker-trigger-die__top{fill:rgba(221,212,199,.52)!important;stroke:rgba(221,212,199,.7)!important;}
html body .catalog-sortbar__right .random-picker-trigger-die__pips{fill:currentColor!important;}
html body :is(.catalog-sort-pill,.mobile-category-sort .result-sort-option)::after{display:none!important;content:none!important;}
html[data-theme] body #catalogSortSegment#catalogSortSegment{background:rgba(236,230,220,.085)!important;border:1px solid rgba(226,217,204,.19)!important;padding:4px!important;gap:4px!important;border-radius:999px!important;--sort-selected:rgba(232,225,215,.18);--sort-line:rgba(226,217,204,.19);}
html[data-theme=light] body #catalogSortSegment#catalogSortSegment{background:rgba(92,78,62,.045)!important;border-color:rgba(92,78,62,.15)!important;--sort-selected:rgba(255,255,255,.88);--sort-line:rgba(92,78,62,.15);}
html body #catalogSortSegment#catalogSortSegment :is(.catalog-sort-pill,.result-sort-option){margin:0!important;min-height:36px!important;border-radius:999px!important;background:transparent!important;}
html body #catalogSortSegment#catalogSortSegment :is(.catalog-sort-pill,.result-sort-option).is-active{background:var(--sort-selected)!important;border:1px solid var(--sort-line)!important;}
html body #catalogSortSegment#catalogSortSegment :is(.catalog-sort-pill,.result-sort-option)::after{display:none!important;content:none!important;animation:none!important;}

/* Correct the mobile inner/outer hierarchy; only reset remains alongside sorting. */
@media(max-width:1024px){
 html body .mobile-category-sort:has(#catalogSortSegment#catalogSortSegment){display:flex!important;align-items:center!important;gap:8px!important;width:100%!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;}
 html body #catalogSortSegment#catalogSortSegment{display:grid!important;grid-template-columns:1.2fr .9fr 1.05fr 1.05fr!important;flex:1 1 0!important;min-width:0!important;width:auto!important;max-width:none!important;gap:2px!important;}
 html body #catalogSortSegment#catalogSortSegment :is(.result-sort-option,.catalog-sort-pill){min-width:0!important;padding:8px 4px!important;font-size:clamp(10px,2.7vw,12px)!important;}
 html body .mobile-category-sort:has(#catalogSortSegment) .result-sort-reset{flex:0 0 44px!important;width:44px!important;height:44px!important;min-width:44px!important;border-radius:50%!important;margin:0!important;background:rgba(232,225,215,.09)!important;color:var(--c-text)!important;}
 html body .catalog-sortbar:has(#catalogSortSegment){display:flex!important;align-items:center!important;gap:8px!important;}
 html body #catalogSortActions#catalogSortActions{flex:0 0 44px!important;min-width:44px!important;width:44px!important;}
 html body #catalogSortActions#catalogSortActions .catalog-recommend-btn,html body .mobile-category-sort .catalog-recommend-btn,html body .mobile-category-sort [data-random-picker-v4]{display:none!important;}
 html body #catalogSortActions#catalogSortActions .catalog-sortbar__reset{width:44px!important;height:44px!important;padding:0!important;display:flex!important;align-items:center;justify-content:center;border-radius:50%!important;}
 html body #catalogSortActions#catalogSortActions .catalog-sortbar__reset>span{display:none!important;}
}
html body #catalogSortActions#catalogSortActions :is(.catalog-recommend-btn,.catalog-sortbar__reset)>span{color:inherit!important;}
html body #catalogSortActions#catalogSortActions :is(.catalog-recommend-btn,.catalog-sortbar__reset){color:var(--c-text,#e9e7e3)!important;}
