/* Catalog v119: compact discovery and independent, scrollable sheets. */
.studio-page[data-studio-tab="create"] .intro{min-height:0;display:block;padding:8px 0 16px;margin:0}
.studio-page[data-studio-tab="create"] .intro .brainy-mascot{display:none}
.studio-page[data-studio-tab="create"] .intro img{display:none}
.studio-page[data-studio-tab="create"] .intro h1{font-size:clamp(24px,5vw,32px);margin:0 0 8px}
.studio-page[data-studio-tab="create"] #catalogIntro{max-width:none;margin:0;font-size:14px;line-height:1.5}
#catalogSearchForm>label,#recommendTask,.scenario-shortcuts,#categoryCountNote,.catalog-hint,#catalogFilterDetails{display:none!important}
#catalogSearchForm{margin:0 0 12px}
#search{font-size:16px;min-height:48px}
.discovery-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:12px 0}
.discovery-controls>button{min-height:44px}
.discovery-controls .catalog-sort{margin:0 0 0 auto;font-size:0;min-width:0;max-width:100%}
.catalog-sort select{font-size:13px;min-height:44px;max-width:190px;margin:0}
#activeFilters:empty{display:none}
#catalogStatus{font-size:13px;line-height:1.5}
#catalog[aria-busy="true"]{opacity:.6;transition:opacity .15s}
#catalog .model-card{padding:16px;border-radius:22px;display:flex;flex-direction:column;gap:10px;min-width:0}
#catalog .model-card h3{font-size:17px;line-height:1.3;margin:0;overflow-wrap:anywhere}
#catalog .model-summary{font-size:13px;line-height:1.5;margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#catalog .model-facts{display:flex;flex-wrap:wrap;gap:6px 12px;font-size:12px;margin:0}
#catalog .model-facts strong{font-size:13px}
#catalog .model-card-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:auto}
#catalog .model-card-actions button{min-height:44px;padding:10px;font-size:13px;border-radius:14px;white-space:normal}
#catalog .model-star{flex:none;width:44px;height:44px}
.catalog-sheet{box-sizing:border-box;width:calc(100% - 32px);max-width:600px;max-height:85dvh;padding:0;border-radius:24px;border:1px solid var(--border,#39393e);color:var(--text,#f4f4f5);background:var(--panel,#222226);overflow:hidden}
.catalog-sheet[open]{display:flex;flex-direction:column}
.catalog-sheet::backdrop{background:rgb(0 0 0 / .65)}
.catalog-sheet header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px;border-bottom:1px solid #8883;flex:none}
.catalog-sheet header h2{font-size:20px;line-height:1.3;margin:0;overflow-wrap:anywhere}
.catalog-sheet header button{flex:none;width:44px;height:44px;font-size:26px;border-radius:50%;padding:0}
.catalog-sheet-body{overflow:auto;overscroll-behavior:contain;padding:16px 20px;line-height:1.6;min-height:0}
.catalog-sheet-body>label{display:block;margin-bottom:18px;font-size:14px}
.catalog-sheet-body select{display:block;width:100%;margin-top:8px;min-height:48px;font-size:16px}
.catalog-sheet footer{flex:none;padding:14px 20px max(16px,env(safe-area-inset-bottom));border-top:1px solid #8883}
.catalog-sheet footer button{width:100%;min-height:48px}
@media(max-width:600px){.catalog-sheet{width:100%;max-width:none;margin:auto 0 0;max-height:90dvh;border-radius:24px 24px 0 0}.discovery-controls .catalog-sort{flex:1;min-width:135px}.catalog-sort select{width:100%;max-width:none}#catalog.model-list{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}}
@media(prefers-reduced-motion:reduce){#catalog[aria-busy="true"]{transition:none}}
#catalog .model-facts{flex-direction:row;align-items:baseline}
#recentModels{margin:10px 0}
#recentModels h2{font-size:13px}
#recentModelList button{padding:8px 12px;min-height:36px}
.catalog-sheet .catalog-availability{display:flex;align-items:center;gap:8px}
body:has(.catalog-sheet[open]){overflow:hidden}
body.studio-page dialog.catalog-sheet:not(.viewer):not(.media-viewer):not(.result-viewer){padding:0;overflow:hidden}
body.studio-page dialog.catalog-sheet:not(.viewer):not(.media-viewer):not(.result-viewer) header{position:static;display:flex;justify-content:space-between;max-width:none;width:auto;margin:0;min-height:0}
@media(max-width:767px){body.studio-page dialog.catalog-sheet:not(.viewer):not(.media-viewer):not(.result-viewer){inset: auto 0 0;margin:0;width:100%;height:auto;max-height:90dvh;border-radius:24px 24px 0 0}}
#catalogTools>.catalog-availability,.catalog-ready-video{display:none!important}
.catalog-key-facts{display:flex;flex-wrap:wrap;gap:6px;list-style:none;padding:0;margin:0;font-size:12px;line-height:1.5}
.catalog-key-facts li{border:1px solid #8883;border-radius:9px;padding:4px 8px;overflow-wrap:anywhere}
.catalog-price-example{display:flex;flex-wrap:wrap;gap:4px 12px;justify-content:space-between;margin:0;font-size:12px;line-height:1.5;color:var(--muted,#aaa)}
.catalog-price-example strong{color:var(--text,#eee)}
.only-differences .comparison-same{display:none}
.comparison-different td{background:#61bcec0a}
.catalog-suggestions{border:1px solid #8883;background:var(--panel,#222226);border-radius:20px;padding:12px;margin:0 0 12px}
.catalog-suggestions[hidden]{display:none}
.catalog-suggestions h3{font-size:12px;color:var(--muted,#aaa);margin:6px 8px}
.catalog-suggestions button{display:flex;width:100%;align-items:center;justify-content:space-between;gap:8px;text-align:left;min-height:44px;border-radius:10px;background:transparent;padding:8px;font-size:14px;overflow-wrap:anywhere}
.catalog-suggestions small{flex:none;max-width:40%;font-size:11px;color:var(--muted,#aaa)}
.catalog-suggestions button:focus-visible{outline:2px solid #a7dfff}
/* v121: one category rail, compact task selector, reachable full-card details. */
body.studio-page>header{gap:12px}
.catalog-sections{position:relative;margin-left:auto;flex:none}
.catalog-sections summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-size:13px;list-style:none}
.catalog-sections summary::after{content:'⌄';margin-left:6px}
.catalog-sections nav{position:absolute;top:100%;right:0;z-index:12;display:flex;flex-direction:column;width:180px;margin:0;padding:8px;background:var(--panel,#222226);border:1px solid #8884;border-radius:18px;box-shadow:0 12px 32px #0005}
.catalog-sections nav button{width:100%;text-align:left;min-height:44px}
#catalogTools{display:contents}
.catalog-sticky-search{position:sticky;top:0;z-index:5;background:var(--bg,#111113);padding:8px 0;border-bottom:1px solid #8882}
.catalog-sticky-search #catalogSearchForm{margin:0 0 8px}
.catalog-sticky-search #taskChips{margin-block:0;padding-block:0}
.catalog-sticky-search .catalog-suggestions{position:absolute;top:64px;left:0;right:0;z-index:7;max-height:45dvh;overflow:auto;box-shadow:0 12px 30px #0005}
#subtaskChips{min-width:0;flex:1 1 140px}
#subtaskChips select{width:100%;min-height:44px;font-size:14px;margin:0;border-radius:14px;text-overflow:ellipsis}
.discovery-controls{gap:8px;margin:10px 0}
.discovery-controls .catalog-sort{flex:1 1 140px;min-width:0}
.discovery-controls .catalog-sort select{max-width:none;width:100%;font-size:13px}
#catalog .model-card{position:relative;isolation:isolate;gap:8px}
#catalog .model-detail-link{position:static;display:block;width:100%;padding:0;border:0;background:none;text-align:left;font:inherit;color:inherit;min-height:0;border-radius:0;box-shadow:none}
#catalog .model-detail-link span{font-size:14px;color:var(--muted,#aaa)}
#catalog .model-detail-link::after{content:'';position:absolute;inset:0;z-index:1;border-radius:22px;cursor:pointer}
#catalog .model-detail-link:focus-visible{outline:none}
#catalog .model-detail-link:focus-visible::after{outline:2px solid #a7dfff;outline-offset:3px}
#catalog .model-star,#catalog .model-card-actions button{position:relative;z-index:2}
#catalog .model-card-actions{display:flex;align-items:center;gap:12px}
#catalog .model-card-actions button{flex:1;max-width:220px}
.model-comparison-mark{font-size:12px;color:var(--muted,#aaa)}
@media(max-width:767px){
 #modelComparison .comparison-scroll{overflow:visible}
 #modelComparison table{min-width:0;width:100%}
 #modelComparison thead{display:none}
 #modelComparison tbody,#modelComparison tr{display:block}
 #modelComparison tr{margin:0 0 16px;border:1px solid #8883;border-radius:14px;overflow:hidden}
 #modelComparison th{display:block;width:auto;border:0;background:#8881;padding:10px}
 #modelComparison td{display:block;width:auto;padding:10px;border:0;border-top:1px solid #8882;overflow-wrap:anywhere}
 #modelComparison td::before{content:attr(data-model-name);display:block;font-size:12px;color:var(--muted,#aaa);margin-bottom:5px}
 #modelComparison .only-differences .comparison-same{display:none}
}
.catalog-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.catalog-title-row h1{min-width:0}
#modelFavorites{flex:none;width:44px;height:44px;padding:0;font-size:25px;border-radius:50%}
#modelFavorites[aria-pressed="true"]{background:#a7dfff;color:#15232d}
@media(max-width:767px){.discovery-controls:has(#subtaskChips:not([hidden])) .catalog-sort{flex-basis:100%}.discovery-controls .catalog-sort select{font-size:14px}}
#catalog .model-card-top{display:flex;align-items:flex-start;gap:8px;min-width:0}
#catalog .model-card-top h3{flex:1;min-width:0}
#catalog .model-detail-link{overflow-wrap:anywhere;white-space:normal}
#closeModelComparison{flex:none;min-width:80px;white-space:nowrap}
#modelComparison .comparison-controls{margin:12px 0;padding:12px;border:1px solid #8883;border-radius:14px}
#modelComparison .comparison-controls summary{cursor:pointer;font-size:14px;line-height:1.4}
#modelComparisonBody>p{font-size:12px;line-height:1.5}
/* v122: one price, tighter cards and decision-first details. */
#catalog .model-card{gap:6px;padding:14px}
#catalog .model-summary{-webkit-line-clamp:1}
#catalog .model-card-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin-top:6px}
#catalog .model-card-actions button{max-width:none;min-width:105px;padding:10px 14px}
.catalog-single-price{min-width:0;display:flex;flex-direction:column;gap:3px;line-height:1.3}
.catalog-single-price strong{font-size:14px;overflow-wrap:anywhere}
.catalog-single-price small{font-size:11px;color:var(--muted,#aaa);overflow-wrap:anywhere}
.model-comparison-mark:empty{display:none}
#catalog .model-card-text .model-key-facts{font-size:11px}
.catalog-sheet-body section{margin:0 0 18px}
.catalog-sheet-body section h3{font-size:14px;margin:0 0 6px}
.catalog-sheet-body section p{margin:6px 0;font-size:14px}
.catalog-sheet-body section ul{padding-left:20px;font-size:13px}
.catalog-technical{border:1px solid #8883;border-radius:14px;padding:12px;margin-bottom:16px}
.catalog-technical summary{cursor:pointer;font-size:13px}
body.studio-page #modelComparison[open]{display:flex;flex-direction:column;overflow:hidden;padding:16px;max-height:90dvh}
#modelComparisonBody{overflow:auto;min-height:0;overscroll-behavior:contain}
.comparison-choose{display:flex;flex:none;gap:8px;padding:12px 0 max(0px,env(safe-area-inset-bottom));border-top:1px solid #8883;margin-top:12px}
.comparison-choose button{flex:1;min-width:0;min-height:44px;padding:8px;overflow-wrap:anywhere;font-size:12px}
.category-icon{width:16px;height:16px;flex:none;vertical-align:middle}
#taskChips button{display:inline-flex;align-items:center;gap:6px}
#taskChips button[aria-pressed="true"]{box-shadow:inset 0 0 0 1px #a7dfff80}
#filterSummary{margin:8px 0;font-size:12px;color:var(--muted,#aaa)}
#filterSummary[hidden]{display:none}
#filterSummary summary{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;padding:10px 0;min-height:44px;box-sizing:border-box}
#filterSummary[open] summary{white-space:normal}
#catalog .model-card-text{padding-block:12px}
#catalog .model-card-text .catalog-key-facts{font-size:11px}

/* Shared, optional scenario settings remain compact on mobile. */
.catalog-scenario{margin:12px 0;border:1px solid var(--line,#35353c);border-radius:18px;padding:12px 14px}.catalog-scenario summary{cursor:pointer;font-weight:600;min-height:24px}.catalog-scenario-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}.catalog-scenario-fields label{display:grid;gap:6px;min-width:0;font-size:13px}.catalog-scenario-fields input,.catalog-scenario-fields select{width:100%;min-width:0;box-sizing:border-box;min-height:44px;font-size:16px}.catalog-scenario p{font-size:12px;color:var(--muted,#aaa);line-height:1.5}.catalog-scenario button{min-height:44px}@media(min-width:800px){.catalog-scenario-fields{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* v126: readable purpose first, technical parameters in model details. */
#catalog .model-summary{-webkit-line-clamp:2}
#catalog .catalog-key-facts{gap:4px 10px;color:var(--muted,#aaa);font-size:12px}
#catalog .catalog-key-facts li{border:0;border-radius:0;padding:0}
#catalog .catalog-key-facts li+li::before{content:'·';margin-right:10px;color:var(--muted,#aaa)}
#catalog .model-card-actions .primary{white-space:nowrap}

/* Variant selection keeps provider details inside a focused sheet. */
.model-family-count{color:var(--text-2);font-size:.8rem;margin:4px 0 12px}
.catalog-family-options{display:grid;gap:12px}
.catalog-family-options section{border:1px solid #ffffff18;border-radius:18px;padding:16px;min-width:0}
.catalog-family-options h3,.catalog-family-options p{overflow-wrap:anywhere;margin:0 0 10px}
.catalog-family-options section>div{display:flex;gap:8px;flex-wrap:wrap}
.catalog-family-options button{min-height:44px;flex:1;white-space:nowrap}

body.studio-page dialog.catalog-sheet:not(.viewer):not(.media-viewer):not(.result-viewer){inset:0;margin:auto;width:calc(100% - 24px);max-width:600px;max-height:calc(100dvh - 32px);border-radius:24px}

.catalog-sheet-body input[type=search]{display:block;box-sizing:border-box;width:100%;font-size:16px;min-height:44px;margin-top:8px;padding:10px 14px;border:1px solid #ffffff24;border-radius:18px;background:var(--surface,#29292f);color:inherit}
.catalog-family-options section[hidden]{display:none}

.catalog-family-toggle{min-height:44px;max-width:100%;text-align:left;font-size:13px;margin-block:8px;white-space:normal}

.family-task-filter{margin-bottom:16px}.family-task-filter label{display:block;margin-bottom:12px}.family-route-name{color:var(--text-2);font-size:12px!important}.catalog-family-options .model-last-choice{color:#a9dafa}

/* Keep long variant lists navigable without pinning expanded forms. */
.family-task-filter{position:sticky;top:-16px;z-index:2;background:var(--panel,#222226);padding:8px 0;border-bottom:1px solid #ffffff20}
.family-task-filter summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-size:13px;overflow-wrap:anywhere;gap:8px}
.family-task-filter summary::after{content:'⌄';margin-left:auto}
.family-task-filter[open]{position:static}
.family-task-fields{padding-top:8px}
.catalog-selection-status{flex-basis:100%;font-size:13px;line-height:1.4;color:var(--text-2);overflow-wrap:anywhere}

/* Browsing stays compact; advanced choices are staged in the filter sheet. */
.discovery-controls{margin-block:8px;gap:8px}
.catalog-summary{align-items:center;gap:8px;margin-block:8px}
#catalogStatus{margin:0;min-width:0}
#filterSummary{margin-block:6px}
#filterSummary>summary{font-size:13px}
.catalog-filter-sheet .catalog-scenario{margin:8px 0 0}
.catalog-filter-sheet .catalog-scenario-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
.catalog-filter-sheet .catalog-sheet-body>label:has(input[type="checkbox"]){display:flex;gap:10px;align-items:center}
.catalog-filter-sheet input[type="checkbox"]{flex:none;width:20px;height:20px}
