.site-select{display:block;position:relative;width:100%;min-width:0;text-transform:none;letter-spacing:normal}
select.site-select-native{position:absolute!important;opacity:0!important;pointer-events:none!important;width:1px!important;height:1px!important;padding:0!important;border:0!important;overflow:hidden}
.site-select-trigger{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;min-height:46px;padding:12px 14px;background:var(--card);border:1px solid var(--line);border-radius:8px;color:var(--ink);font:inherit;font-size:var(--text-small-size,16px);line-height:1.5;text-align:left;cursor:pointer}
.site-select-trigger>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.site-select-arrow{flex-shrink:0;color:var(--accent);font-size:18px;line-height:1}.site-select-trigger[aria-expanded="true"]{border-color:var(--accent)}.site-select-trigger[aria-expanded="true"] .site-select-arrow{transform:rotate(180deg)}.site-select-trigger:disabled{opacity:.5;cursor:default}
.site-select-menu{position:fixed;inset:auto;margin:0;padding:6px;border:1px solid var(--line);border-radius:12px;background:var(--card);color:var(--ink);box-shadow:0 12px 35px #4e3c4824;overflow:auto;overscroll-behavior:contain;z-index:10000;font:var(--text-small-size,16px)/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.site-select-menu::backdrop{background:transparent}.site-select-option{display:flex;align-items:center;gap:10px;width:100%;min-height:40px;padding:9px 12px;text-align:left;border:0;border-radius:7px;background:transparent;color:var(--ink);font:inherit;cursor:pointer}.site-select-option:hover,.site-select-option:focus-visible{background:var(--soft);outline:none}.site-select-option[aria-selected="true"]{background:var(--soft);color:var(--accent);font-weight:600}.site-select-option:disabled{opacity:.45;cursor:default}.site-select-check{width:16px;flex:0 0 16px;color:var(--accent)}.site-select-group{padding:9px 12px 5px;font-size:var(--text-small-size,16px);text-transform:uppercase;letter-spacing:.7px;color:var(--muted)}

.site-select-menu{box-sizing:border-box}.site-select-option{white-space:nowrap}.site-select-option>span:last-child{min-width:0;white-space:nowrap}.site-select-check{align-self:center}

.site-select-trigger[aria-invalid="true"]{border-color:#ad3953}.site-select-error{display:block;margin-top:6px;color:#ad3953;font-size:16px;line-height:1.4}.site-select-error[hidden]{display:none}

.site-select-arrow{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;flex:0 0 28px;border:1px solid var(--line);border-radius:50%;background:#fff;color:var(--accent);box-shadow:0 1px 3px #39263312;transition:transform .16s}
.site-select-arrow svg{display:block;width:14px;height:14px;stroke-width:2.5}
@media(prefers-reduced-motion:reduce){.site-select-arrow{transition:none}}

/* A single visual standard for dropdown fields throughout the application. */
:root{--select-height:50px;--select-font:16px;--select-radius:8px}
:root body .site-select-trigger{box-sizing:border-box;height:var(--select-height);min-height:var(--select-height);padding:10px 14px;border:1px solid var(--line);border-radius:var(--select-radius);background:var(--card);color:var(--ink);font-family:inherit;font-size:var(--select-font);font-weight:400;line-height:1.5;gap:12px;box-shadow:none}
:root body .site-select-trigger[aria-expanded="true"]{border-color:var(--accent)}
:root body .site-select-trigger[aria-invalid="true"]{border-color:#ad3953}
:root body .site-select-trigger:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
:root body .site-select-arrow{width:28px;height:28px;flex:0 0 28px;background:#fff;color:var(--accent);border:1px solid var(--line);border-radius:50%;box-shadow:0 1px 3px #39263312}
:root body .site-select-menu{font-size:var(--select-font);line-height:1.5;border-radius:12px;padding:6px}
:root body .site-select-option{min-height:42px;padding:9px 12px;border-radius:7px}

.site-select-group:not(:first-child){margin-top:8px;padding-top:13px;border-top:1px solid var(--line)}

.mobile-filter-open{display:none}
.shared-mobile-filter-dialog{position:fixed;inset:auto 0 0;width:100%;max-width:none;max-height:90dvh;margin:0;padding:0;border:1px solid var(--line);border-radius:22px 22px 0 0;background:var(--card);color:var(--ink);box-sizing:border-box;overflow:hidden}
.shared-mobile-filter-dialog[open]{display:flex;flex-direction:column}
.shared-mobile-filter-dialog::backdrop{background:#30272d66}
.shared-mobile-filter-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px;border-bottom:1px solid var(--line)}
.shared-mobile-filter-dialog h2{font:600 22px/1.3 system-ui,sans-serif;margin:0}
.shared-mobile-filter-dialog>header button{width:40px;height:40px;min-width:40px;min-height:40px;flex:none}
.shared-mobile-filter-body{overflow-y:auto;overscroll-behavior:contain;min-height:0;padding:20px}
.shared-mobile-filter-dialog>footer{padding:14px 20px calc(14px + env(safe-area-inset-bottom));border-top:1px solid var(--line)}
.shared-mobile-filter-dialog>footer>.button{width:100%;box-sizing:border-box}
@media(max-width:760px){
 :root body .mobile-filter-open{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 16px;min-height:44px;margin:0 0 16px;border:0;border-radius:10px;background:var(--soft);color:var(--accent);font:500 16px/1.4 system-ui,sans-serif}
 .mobile-filter-open [data-mobile-filter-count]:not([hidden]){display:grid;place-items:center;min-width:24px;height:24px;border-radius:50%;background:var(--accent);color:white}
 :root body .shared-mobile-filter-body :is(#yarn-filter-panel,#magazine-filter-panel,.project-list-controls){display:flex;flex-direction:column;align-items:stretch;gap:18px;width:100%;min-width:0;margin:0;padding:0;border:0}
 :root body .shared-mobile-filter-body .project-list-controls>label{width:100%;flex:auto;max-width:100%}
 :root body .shared-mobile-filter-body .site-filter-select{width:100%;display:flex;flex-direction:column;align-items:stretch}
 :root body .shared-mobile-filter-body .site-filter-group{display:flex;flex-wrap:wrap;gap:8px}
 :root body .shared-mobile-filter-body .catalog-filter-picker{width:100%}
 :root body .shared-mobile-filter-body .catalog-filter-picker>summary{width:100%;box-sizing:border-box;justify-content:space-between}
 :root body .shared-mobile-filter-body .catalog-filter-menu{position:static;width:100%;max-width:100%;box-sizing:border-box;box-shadow:none;margin:8px 0 0;max-height:240px;overflow-y:auto}
}
@media(max-width:760px){
 :root body #yarn-filters-toggle.mobile-filter-open{display:inline-flex}
 #yarn-filters-toggle.mobile-filter-open::after{display:none}
}
/* Mobile filter sheets share the full-width chip layout used on the home page. */
@media(max-width:760px){
 :root body .projects-page .shared-mobile-filter-body .project-list-controls{gap:18px;align-items:stretch}
 :root body .projects-page .shared-mobile-filter-body .project-list-controls>label{width:100%;flex:none;display:block}
 :root body .projects-page .shared-mobile-filter-body .project-list-controls .site-filter-select{display:flex;flex-direction:column;align-items:stretch;width:100%;max-width:100%;gap:8px}
 :root body .projects-page .shared-mobile-filter-body .project-list-controls .site-filter-select>.site-select-trigger{width:100%;flex:none;justify-content:space-between;min-height:44px}
 :root body .projects-page .shared-mobile-filter-body .filter-summary-chosen{align-self:flex-start}
}

.mobile-yarn-toolbar{display:contents}
@media(max-width:760px){
 .mobile-yarn-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
 :root body .mobile-yarn-toolbar>#yarn-filters-toggle{margin:0}
 .mobile-yarn-toolbar>#yarn-status{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin:0;min-width:0;color:var(--muted);font-size:16px;line-height:1.5;white-space:nowrap}
 .mobile-yarn-toolbar>#yarn-status strong{padding:4px 10px;border-radius:9px;background:var(--soft);color:var(--accent);font-weight:600;font-variant-numeric:tabular-nums}
}

@media(max-width:760px){
 .shared-mobile-filter-body .magazine-filter-controls{display:flex;flex-direction:column;align-items:stretch;gap:18px}
 .shared-mobile-filter-body .magazine-chip-filters .site-filter-group{align-items:stretch;flex-direction:column}
 .shared-mobile-filter-body .magazine-selected-filters{flex-wrap:wrap}
}

:root body .mobile-filter-open[hidden]{display:none!important}

/* Compact mobile search rows shared by the yarn and magazine catalogues. */
.catalog-mobile-search-tools{display:none}
@media(max-width:760px){
 :root body .catalog-mobile-search-tools{display:grid;grid-template-columns:44px minmax(0,1fr);align-items:start;gap:8px 10px;width:100%;min-width:0;margin:0;flex:1 0 100%;order:3;box-sizing:border-box}
 :root body .catalog-mobile-search-tools>.mobile-filter-open{grid-column:1;grid-row:1;position:relative;display:inline-flex;justify-content:center;align-items:center;width:44px;min-width:44px;height:48px;min-height:48px;padding:10px;margin:0;box-sizing:border-box}
 .catalog-mobile-search-tools>.mobile-filter-open>span:not([data-mobile-filter-count]){display:none}
 .catalog-mobile-search-tools>.mobile-filter-open>[data-mobile-filter-count]:not([hidden]){position:absolute;top:-6px;right:-5px;min-width:20px;height:20px;font-size:var(--text-small-size,16px)}
 :root body .catalog-mobile-search-tools>:is(#yarn-search,.catalog-search-slot){grid-column:2;grid-row:1;display:block;min-width:0;width:100%;max-width:none;margin:0;padding:0;box-sizing:border-box}
 :root body .catalog-mobile-search-tools #yarn-search .search-name{display:block;width:100%;margin:0}
 :root body .catalog-mobile-search-tools #yarn-search .yarn-search-input{width:100%;min-width:0;box-sizing:border-box}
 :root body .magazines-heading .catalog-mobile-search-tools>.catalog-search-slot{width:100%;min-width:0;padding:0}
 :root body .catalog-mobile-search-tools>:is(#yarn-status,#magazine-status){grid-column:2;grid-row:2;display:flex;align-items:baseline;justify-content:flex-start;gap:5px;flex:none;min-width:0;width:auto;min-height:24px;margin:0;padding:0;color:var(--muted);font-size:var(--text-small-size,16px);font-weight:400;line-height:1.5;white-space:normal}
 :root body .catalog-mobile-search-tools>:is(#yarn-status,#magazine-status) strong{display:inline;min-width:0;width:auto;min-height:0;margin:0;padding:0;background:none;border:0;border-radius:0;box-shadow:none;color:inherit;font-size:inherit;font-weight:400;line-height:inherit;text-align:inherit}
 .issue-models-page .catalog-mobile-search-tools{display:block}
}

@media(max-width:760px){
 :root body .catalog-mobile-search-tools .catalog-search{width:100%;max-width:100%;min-width:0;box-sizing:border-box;transition:none}
 :root body .home-mobile-search-tools{order:1;margin-bottom:14px}
 :root body .catalog-first-home .home-mobile-filter-bar{display:none}
 :root body .home-mobile-search-tools>#home-mobile-result-count{grid-column:2;grid-row:2;font-size:var(--text-small-size,16px);line-height:1.5;color:var(--muted)}
 .home-mobile-search-tools>.mobile-filter-open>#home-filter-count:not([hidden]){display:grid;place-items:center;position:absolute;top:-6px;right:-5px;min-width:20px;height:20px;font-size:var(--text-small-size,16px)}
}

@media(max-width:760px){:root body .catalog-first-home #catalog>.catalog-toolbar{display:none}}
@media(max-width:760px){:root body .issue-models-page .catalog-mobile-search-tools{display:block}}

/* Sorting uses the same compact icon control on every screen. */
:root body .site-sort-select{width:44px;min-width:44px;flex:0 0 44px}
:root body .site-sort-select>.model-sort-trigger{display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:12px;background:var(--soft);color:var(--accent)}
:root body .site-sort-select>.model-sort-trigger>span:not(.model-sort-icon){display:none}
:root body .site-sort-select .model-sort-icon{display:flex;align-items:center;justify-content:center}
:root body .sort-choice:has(.site-sort-select){width:auto;min-width:0;flex:0 0 auto}
:root body .sort-choice:has(.site-sort-select)>span:not(.site-select){display:none}

:root body .site-sort-select>.model-sort-trigger{width:44px!important;height:44px!important;min-width:44px;min-height:44px!important;max-height:44px;padding:0!important;flex:none;aspect-ratio:1;justify-content:center;text-align:center}
:root body .site-sort-select .model-sort-icon{width:22px;height:22px;line-height:0}
:root body .site-sort-select .model-sort-icon svg{display:block;flex:none}
:root body :is(.sort-row,.project-list-controls,.project-filters)>:is(label,.sort-choice):has(.site-sort-select){margin-left:auto;flex:0 0 auto}
:root body .stash-list-toolbar{justify-content:flex-end}

@media(max-width:760px){
 .favorites-page .shared-mobile-filter-body #filter-panel-general{margin:0;padding:0}
 .favorites-page .shared-mobile-filter-body .filter-summary-heading{display:none}
 .favorites-page .shared-mobile-filter-body #filter-summary-general{display:flex;flex-direction:column;align-items:stretch}
}
