/* Material library: shared web/tablet layout, with an accessible mobile detail sheet. */
.library-page{max-width:1800px;margin:auto;padding:26px 28px}
.library-page .page-heading{margin-bottom:18px}.library-page h1{font-size:clamp(23px,2.2vw,32px);margin:4px 0 8px}
.material-library{--library-line:#dde5ee;--library-soft:#f5f8fc;min-width:0}
.library-kind-tabs{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.library-kind-tabs .tabs{margin:0}.library-kind-tabs>small{color:var(--muted);font-size:12px}
.library-workbench{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,340px);gap:20px;align-items:start}
.library-browse{min-width:0}.library-filter-form{margin:0}.library-search-row{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:14px;align-items:end}
.library-search{display:flex;align-items:center;gap:10px;background:white;border:1px solid var(--library-line);border-radius:9px;padding:0 12px;min-height:46px;margin:0}
.library-search svg{width:22px;min-width:22px;color:#6e829c}.library-search input{border:0!important;box-shadow:none!important;background:transparent;min-width:0;padding:10px 0;width:100%}
.library-filter-form label{font-size:12px;min-width:0}.library-filter-form select,.library-filter-form input{font-size:13px;min-height:40px}
.library-filter-row{display:grid;grid-template-columns:1fr 1.5fr 1fr 1.15fr 1fr;gap:12px;margin-top:18px;align-items:end}
.library-filter-row label{margin:0}.library-color-filter{border:0;padding:0;margin:0;min-width:0}
.library-taxonomy-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}.library-taxonomy-filters label{margin:0;min-width:0}.library-taxonomy-filters select{width:100%;min-width:0;min-height:44px}
@media(max-width:540px){.library-taxonomy-filters{grid-template-columns:1fr;gap:10px}}
.library-color-filter legend{font-size:12px;margin-bottom:7px}.library-color-filter>div{display:flex;gap:7px;overflow-x:auto;max-width:100%;padding:6px 3px;min-height:40px;border:1px solid var(--library-line);border-radius:8px;background:#fff;scrollbar-width:thin}
.material-library .color-dot{min-height:25px;min-width:25px;width:25px;height:25px;padding:0;border-radius:50%;border:1px solid #0002;background:var(--color-chip);flex:none}
.material-library .color-dot[aria-pressed=true]{outline:2px solid var(--accent);outline-offset:2px}
.library-filter-tools{display:flex;flex-wrap:wrap;align-items:start;gap:12px;margin:14px 0;color:var(--muted);font-size:12px}
.library-filter-tools>button{margin-left:auto;min-height:32px;padding:6px 10px;font-size:12px;background:transparent}
.library-favorites-filter{display:flex;align-items:center;gap:7px;min-height:32px;white-space:nowrap}.library-favorites-filter input{width:16px;height:16px;min-height:16px!important}
.library-filter-tools details{flex:1;min-width:160px}.library-filter-tools summary{cursor:pointer;padding:7px}.library-filter-tools details[open]{flex-basis:100%;order:3;border:1px solid var(--library-line);border-radius:10px;background:white;padding:8px}
.library-filter-tools details .form-grid{gap:12px;padding:6px}.library-filter-tools details>small{display:block;padding:8px}.library-filter-tools [data-furniture-filters]{display:contents}
.library-category-strip{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px;margin:15px 0 18px}
.library-category-strip button{display:flex;flex-direction:column;gap:6px;justify-content:center;align-items:center;min-width:0;padding:12px 3px;min-height:76px;font-size:12px;background:#f9fbfd;border:1px solid var(--library-line);border-radius:8px}
.library-category-strip button svg{width:27px;height:27px}.library-category-strip button.active{background:#eaf3ff;color:var(--accent);border-color:var(--accent)}
.library-results{font-size:12px;color:var(--muted);margin:0 0 10px;min-height:18px}
.library-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}
.library-card{min-width:0;position:relative;border:1px solid var(--library-line);border-radius:9px;overflow:hidden;background:#fff;transition:box-shadow .15s}
.library-card.selected{border-color:var(--accent);box-shadow:0 0 0 2px #2785ff20}.library-card:focus-within{outline:2px solid var(--accent);outline-offset:2px}
.library-card .library-card-open{display:block;text-align:left;padding:0;min-height:0;width:100%;border:0;border-radius:0;background:transparent;color:inherit}
.library-card .swatch{width:100%;height:auto;max-height:none;aspect-ratio:1.12;border:0;border-radius:0;background-size:cover;background-position:center}
.library-card-info{padding:10px 11px;display:flex;flex-direction:column;gap:5px}.library-card-info strong{font-size:14px;line-height:1.3}.library-card-info>small{font-size:11px;line-height:1.5;color:var(--muted);overflow-wrap:anywhere}
.library-card-price{font-size:12px;font-weight:650}.library-card-price small{font-size:10px;font-weight:400}
.library-stock{font-size:11px;display:flex;gap:6px;align-items:center;font-weight:500}.library-stock:before{content:'';width:8px;height:8px;border-radius:50%;background:#8998a8;flex:none}.library-stock.available:before{background:#1bb57b}.library-stock.limited:before{background:#e6a031}.library-stock.unavailable:before{background:#c16666}
.library-heart{display:flex;align-items:center;justify-content:center;width:34px;height:34px;min-height:34px;padding:7px;border:0;border-radius:50%;background:#ffffffdf;color:#65738b;flex:none}.library-heart svg{width:22px;height:22px}.library-heart[aria-pressed=true]{color:#f36b75}
.library-card>.library-heart{position:absolute;right:7px;top:7px;box-shadow:0 1px 4px #0001}
.library-page .page-heading h1{letter-spacing:-1.2px}.library-page .library-kind-tabs .tabs{background:#f0f1e7;border-radius:25px;padding:5px}.library-kind-tabs .tabs button{border-radius:22px}.library-category-strip>button{border-radius:22px!important;min-width:84px;border-color:#e3e7db!important;background:#fffefb!important}.library-category-strip>button.active{background:#edf3e2!important;border-color:#a9ba91!important;color:#354a29}.library-workbench{gap:24px}.library-filter-form{background:#fffefb;border:1px solid #e5e7dc;border-radius:26px;padding:18px}.library-filter-form details{border-radius:18px}.library-card{border-radius:25px!important;border-color:#e4e6dc!important;background:#fffefb!important;overflow:hidden;box-shadow:0 6px 22px #293b2206;transition:transform .18s ease,box-shadow .18s ease}.library-card:hover{transform:translateY(-3px);box-shadow:0 14px 30px #293b2210}.library-card.selected{border-color:#94ab75!important;box-shadow:0 0 0 2px #cbdabd}.library-card .swatch{border-radius:20px}.library-card-info{padding:15px!important}.library-detail{border-radius:28px!important;background:#fffefb!important;border-color:#e5e7dc!important}.library-photo-gallery{border-radius:22px;overflow:hidden}.library-main-photo{border-radius:22px}.library-price-stock{background:#f1f3e8;border-radius:20px;padding:15px}.library-heart{width:40px;height:40px;min-height:40px;box-shadow:0 4px 15px #172d2012}.library-heart[aria-pressed=true]{color:#bf5964}.library-heart.favorite-confirmed svg{animation:catalog-heart-pop .45s ease}.library-heart:focus-visible{outline:3px solid #8da872;outline-offset:3px}.library-category-strip .category-art{width:44px;height:44px}.library-detail-actions .primary{border-radius:22px}
@keyframes catalog-heart-pop{0%{transform:scale(.7)}45%{transform:scale(1.25) rotate(-8deg)}75%{transform:scale(.95)}100%{transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.library-heart.favorite-confirmed svg{animation:none}.library-card{transition:none}}
.library-detail{border:1px solid var(--library-line);background:linear-gradient(145deg,#fff,#f8faff);border-radius:14px;padding:17px;position:sticky;top:16px;max-height:calc(100dvh - 125px);overflow:auto;scrollbar-width:thin;min-width:0}
.library-detail-heading{display:flex;align-items:start;gap:8px;justify-content:space-between}.library-detail-heading h2{font-size:21px;line-height:1.25;margin:0;padding:3px 0;overflow-wrap:anywhere}
.library-description{font-size:12px;color:var(--muted);line-height:1.55;margin:5px 0 13px}
.library-photo-gallery{display:flex;align-items:stretch;gap:8px;min-height:190px;margin:10px 0 16px}.library-photo-gallery>.swatch{flex:1;height:auto;min-height:190px;background-size:cover}
.library-main-photo{width:0;flex:1;min-width:0;object-fit:cover;aspect-ratio:1.4;border-radius:8px;max-height:225px}
.library-photo-thumbs{width:68px;flex:none;display:flex;flex-direction:column;gap:6px;max-height:260px;overflow:auto;scrollbar-width:thin}
.library-photo-thumbs img{width:100%;height:64px;flex:none;object-fit:cover;border-radius:6px}
.library-provider{display:flex;gap:8px;align-items:center;justify-content:space-between;border-bottom:1px solid var(--library-line);padding-bottom:13px;margin-bottom:13px}
.library-provider>div{display:flex;gap:8px;align-items:center;min-width:0}.library-provider img{width:34px;height:40px;object-fit:contain}.library-provider span{display:flex;flex-direction:column;gap:3px;min-width:0}.library-provider strong{font-size:13px;overflow-wrap:anywhere}.library-provider small{font-size:11px;color:var(--muted)}.library-provider button{border:0;background:transparent;color:var(--accent);padding:5px;min-height:34px;font-size:11px;max-width:110px}
.library-specifications h3,.library-alternatives h3{font-size:13px;margin:0 0 10px}.library-specifications dl{display:grid;grid-template-columns:1fr 1fr;gap:10px 12px;margin:0;padding:0}
.library-specifications dl>div{min-width:0}.library-specifications dt{color:var(--muted);font-size:10px;margin-bottom:3px}.library-specifications dd{font-size:11px;margin:0;overflow-wrap:anywhere;line-height:1.4}
.library-specifications>small,.library-alternatives>small{display:block;font-size:10px;line-height:1.5;color:var(--muted);margin:10px 0}.library-specifications>p{font-size:11px;margin:8px 0}.not-specified{color:#8592a3}
.library-price-stock{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;border-top:1px solid var(--library-line);padding:14px 0}.library-price-stock>div{display:flex;flex-direction:column;gap:4px}.library-price-stock strong{font-size:18px}.library-price-stock small{font-size:11px}.library-price-stock strong small{font-weight:400}
.library-stock-box{padding:8px 10px;background:#eef2f7;border-radius:8px}.library-stock-box.available{background:#e5f6ec}.library-stock-box.limited{background:#fff1d8}.library-stock-box>small{font-size:10px;color:var(--muted)}
.library-alternatives{padding:5px 0}.library-alternatives>div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.library-alternatives button{padding:0;border:0;background:transparent;display:flex;flex-direction:column;gap:4px;text-align:left;min-width:0}
.library-alternatives .swatch{width:100%;height:auto;aspect-ratio:1;max-height:none;background-size:cover;border-radius:5px}.library-alternatives .material-provider-logo{display:none}.library-alternatives strong{font-size:10px;line-height:1.3;font-weight:600}.library-alternatives small{font-size:10px}
.library-detail-actions{position:sticky;bottom:-17px;display:flex;flex-wrap:wrap;gap:7px;background:#f8fafff2;padding:12px 0 17px;margin-bottom:-17px;border-top:1px solid var(--library-line)}
.library-detail-actions button{flex:1;min-width:110px;font-size:12px;padding:9px;min-height:40px}.library-detail-actions .primary{flex-basis:100%;background:var(--sidebar);color:white;border-color:var(--sidebar)}
.library-detail-empty{padding:45px 12px;text-align:center;color:var(--muted)}.library-detail-empty>svg{width:50px;height:50px}.library-detail-empty h2{font-size:19px}
.catalog-spec-editor{border-top:1px solid var(--line);margin-top:12px;padding-top:16px}.catalog-spec-editor h3{margin:12px 0;font-size:17px}.catalog-spec-editor>p,.catalog-spec-editor>small{font-size:12px;color:var(--muted);line-height:1.6}
.catalog-gallery-editor{display:grid;gap:10px}.catalog-gallery-edit-row{display:flex;gap:10px;align-items:center;background:#f4f7fb;padding:8px;border-radius:9px}.catalog-gallery-edit-row img{width:60px;height:60px;object-fit:cover;border-radius:6px}.catalog-gallery-edit-row label{flex:1;min-width:0;font-size:12px}.catalog-gallery-edit-row button{padding:8px;font-size:12px}
.library-detail-dialog{width:min(600px,calc(100vw - 20px));max-height:calc(100dvh - 24px);border:1px solid var(--line);border-radius:15px;padding:18px;background:#fff;color:var(--text);overflow:auto}.library-detail-dialog::backdrop{background:#101a2c88}.library-sheet-close{position:sticky;top:0;display:block;margin:0 0 12px auto;z-index:2;background:white}.library-detail-dialog .library-detail-actions{bottom:-18px}
@media(min-width:1450px){.library-workbench{grid-template-columns:minmax(0,1fr) 365px;gap:24px}.library-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(min-width:1100px) and (max-width:1300px){.library-workbench .library-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:900px) and (max-width:1180px){.library-page{padding:18px}.library-workbench{grid-template-columns:minmax(0,1fr) 300px;gap:14px}.library-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.library-filter-row{grid-template-columns:repeat(3,minmax(0,1fr))}.library-category-strip{display:flex;overflow:auto}.library-category-strip button{min-width:70px;flex:1}.library-kind-tabs>small{display:none}}
@media(max-width:899px){.library-workbench{display:block}.library-workbench>.library-detail{display:none}.library-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.library-filter-row{grid-template-columns:repeat(3,minmax(0,1fr))}.library-kind-tabs>small{display:none}.library-category-strip{display:flex;overflow:auto}.library-category-strip button{min-width:85px;flex:1}.library-page{padding:20px}.library-page .page-heading .actions{flex-wrap:wrap}}
@media(max-width:540px){.library-page{padding:16px 12px}.library-search-row{grid-template-columns:1fr}.library-search-row>label:last-child{display:flex;align-items:center;gap:10px}.library-search-row>label:last-child select{flex:1}.library-filter-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.library-filter-row>label:last-child{grid-column:1/-1}.library-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.library-card-info{padding:9px}.library-card-info strong{font-size:13px}.library-card-price{font-size:11px}.library-filter-tools{gap:6px}.library-filter-tools>details{min-width:130px}.library-filter-tools>button{font-size:11px}.library-category-strip button{min-width:75px;min-height:66px}.library-detail-heading h2{font-size:23px}.catalog-gallery-edit-row{flex-wrap:wrap}.library-card .material-provider-logo{width:27px;height:29px}.library-detail-dialog .library-main-photo{max-height:300px}}

.catalog-access-note{padding:12px 16px;margin:0 0 18px;border:1px solid #d7e2ef;border-radius:8px;background:#fff;color:var(--muted);font-size:13px}.catalog-access-note button{margin-left:12px}

.library-create-actions{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 18px}.library-create-actions button{min-height:42px;padding:10px 16px}.viewer-side .library-create-actions button{flex:1}

.catalog-spec-list{display:grid;gap:0}.catalog-spec-list>label{display:grid;grid-template-columns:minmax(130px,165px) minmax(0,1fr);gap:16px;align-items:center;padding:12px 0;border-bottom:1px solid var(--line,#e0e6ed);margin:0}.catalog-spec-list>label:last-child{border-bottom:0}.catalog-spec-label{display:flex;align-items:center;gap:8px;min-width:0}.catalog-spec-label .help{flex:none;margin:0}.catalog-spec-list input,.catalog-spec-list select{width:100%;min-width:0;margin:0}
@media(max-width:600px){.catalog-spec-list>label{grid-template-columns:1fr;gap:8px;padding:12px 0}}

.catalog-color-classification{padding:14px 16px;border:1px solid #cbddec;border-radius:10px;background:#f4f8fc}.catalog-color-classification>label{margin:0}.catalog-color-classification>small{display:block;margin-top:8px;color:var(--muted);line-height:1.5}.library-color-filter>select{width:100%;min-width:0}.library-color-filter>div{margin-top:6px}

.library-category-strip{display:flex;overflow-x:auto;gap:8px;padding:3px 2px 9px}.library-category-strip button{flex:0 0 auto;min-width:90px}

.taxonomy-field{display:grid;grid-template-columns:1fr 38px;gap:8px;align-items:end;min-width:0}.taxonomy-field button{padding:0;font-size:23px;color:var(--accent);height:42px}.taxonomy-dialog{padding:24px;width:min(460px,calc(100vw - 28px))}.library-subcategory-strip{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 20px;padding:0 4px}.library-subcategory-strip:empty{display:none}.library-subcategory-strip>strong{font-size:12px;color:var(--muted)}.library-subcategory-strip button{border-radius:24px;min-height:34px;font-size:12px;padding:6px 13px}.library-subcategory-strip button.active{color:#155cba;background:#eaf3ff;border-color:#79aaff}.material-library>.library-category-strip{margin-bottom:14px}.library-filter-row{grid-template-columns:1.4fr 1fr 1fr 1fr}

.material-zoom-dialog{width:min(1100px,calc(100vw - 24px));padding:20px;background:#f5f6f8}.material-zoom-header{display:flex;justify-content:space-between;gap:16px;align-items:center}.material-zoom-dialog [data-material-preview]{height:min(68vh,700px)!important;width:100%;background:radial-gradient(#fff,#dee4e9);border-radius:14px;touch-action:none}.material-zoom-dialog label{max-width:500px;margin:16px auto}.material-zoom-dialog p{font-size:12px;text-align:center}.material-live [data-material-preview]{cursor:zoom-in}.material-live [data-expand-material]{width:100%;margin:10px 0;font-size:12px}
