.stash-page{max-width:1120px;margin:40px auto;padding:0 24px}.stash-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap}.stash-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:20px;margin:24px 0}.stash-card{border:1px solid #dfd9d0;border-radius:18px;padding:24px;background:#fff}.stash-card img{width:100%;height:180px;object-fit:cover}.stash-card .detail-actions{margin-top:18px;gap:10px}.stash-form{display:grid;gap:18px;max-width:650px;margin:24px 0}.stash-form label,[data-yarn-picker] label{display:grid;gap:8px;margin:12px 0}[data-results]{display:flex;gap:8px;flex-wrap:wrap}[data-yarn-picker]{grid-column:1/-1}.stash-models{display:flex;gap:10px;flex-wrap:wrap}.stash-models a{padding:8px 12px;background:#f3f0ea;border-radius:10px}

.stash-form input,.stash-form textarea,.stash-form select{box-sizing:border-box;width:100%;min-width:0;padding:11px 14px;border:1px solid var(--line,#dfd9d0);border-radius:9px;background:var(--card,#fff);color:var(--ink,#353034);font:inherit;font-size:16px;line-height:1.5;transition:border-color .15s,box-shadow .15s}
.stash-form input:focus-visible,.stash-form textarea:focus-visible,.stash-form select:focus-visible{outline:2px solid var(--accent,#784a65);outline-offset:3px;border-color:var(--accent,#784a65)}
.stash-amount-fields{display:grid;grid-template-columns:minmax(0,260px) minmax(0,160px);gap:20px;align-items:start}
.stash-form .stash-amount-fields label{margin:0;font-size:var(--text-small-size,16px);color:var(--muted)}
.stash-form textarea{resize:vertical}
@media(max-width:440px){.stash-amount-fields{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:12px}}

.stash-page h1{font-family:Georgia,serif;font-size:clamp(28px,3.2vw,40px);font-weight:400;line-height:1.2;letter-spacing:-.02em;margin:14px 0 18px}
.stash-heading{padding-bottom:24px;border-bottom:1px solid var(--line);align-items:center}
.stash-heading .eyebrow{font-size:var(--text-small-size,16px);margin:0 0 10px}
.stash-heading h1{margin:0 0 12px}
.stash-heading p:not(.eyebrow){margin:0;max-width:520px;color:var(--muted);font-size:var(--text-small-size,16px);line-height:1.65}
.stash-heading>.button{flex-shrink:0}
.stash-empty{max-width:620px;margin:36px auto;padding:36px 28px;text-align:center;border:1px dashed var(--line);border-radius:18px;background:var(--card,#fff)}
.stash-empty-symbol{display:inline-flex;align-items:center;justify-content:center;width:52px;height:52px;border-radius:50%;background:var(--soft,#eee7eb);color:var(--accent);font-size:30px}
.stash-empty h2{font-size:21px;line-height:1.4;margin:18px 0 10px}
.stash-empty p{font-size:var(--text-small-size,16px);line-height:1.7;color:var(--muted);max-width:440px;margin:0 auto 22px}
.stash-card{border-color:var(--line);background:var(--card,#fff);padding:22px;border-radius:16px}
.stash-card h2{font-size:20px;line-height:1.4;margin:16px 0 12px}.stash-card h2 a{text-decoration:none}.stash-card h2 a:hover{text-decoration:underline}
.stash-card h3{font-size:var(--text-small-size,16px);margin:22px 0 10px}.stash-card p{font-size:var(--text-small-size,16px);line-height:1.65;color:var(--muted)}.stash-card p strong{color:var(--ink)}
.stash-card .detail-actions{display:flex;flex-wrap:wrap;font-size:var(--text-small-size,16px);border-top:1px solid var(--line);padding-top:14px}.stash-card>.button{font-size:var(--text-small-size,16px)}
.stash-form{box-sizing:border-box;max-width:700px;padding:28px;border:1px solid var(--line);border-radius:20px;background:var(--card,#fff);gap:24px}
.stash-form label{font-size:var(--text-small-size,16px)}.stash-form [data-selected]:empty{display:none}.stash-form [data-selected] p{margin:0 0 16px}
.stash-form [data-message]:empty{display:none}.stash-form .detail-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:0}
.stash-form [data-results] .button{padding:9px 13px;font-size:var(--text-small-size,16px)}.stash-form [data-request]{font-size:var(--text-small-size,16px)}
@media(max-width:600px){.stash-page{margin-top:26px;padding:0 16px}.stash-form{padding:18px}.stash-heading{gap:18px}.stash-empty{padding:28px 18px}.stash-empty h2{font-size:19px}}

.stash-page .project-list-controls{display:flex;flex-wrap:wrap;gap:16px;align-items:end;padding:20px;margin:24px 0 16px;border:1px solid var(--line);border-radius:14px;background:var(--card,#fff)}
.stash-page .project-list-controls label{display:grid;gap:8px;font-size:var(--text-small-size,16px);color:var(--muted);flex:1;min-width:140px}
.stash-page .project-list-controls input[type=search]{box-sizing:border-box;width:100%;min-width:0;padding:11px 13px;border:1px solid var(--line);border-radius:9px;background:var(--card,#fff);color:var(--ink);font:inherit;font-size:var(--text-small-size,16px)}
.stash-page .project-list-controls input[type=search]:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.stash-page .project-list-controls label:has(input[type=checkbox]){display:flex;align-items:center;gap:8px;flex:0 0 auto;min-height:44px}
.stash-page .project-list-controls input[type=checkbox]{width:18px;height:18px;accent-color:var(--accent)}
.stash-page [data-work-count]{font-size:var(--text-small-size,16px);color:var(--muted)}
.stash-filter-empty{grid-column:1/-1;text-align:center;padding:32px 20px;border:1px solid var(--line);border-radius:14px;background:var(--card,#fff)}
.stash-filter-empty h2{font-size:21px;margin:0 0 10px}.stash-filter-empty p{font-size:var(--text-small-size,16px);color:var(--muted);margin:0 0 20px;line-height:1.6}

.stash-back{display:inline-flex;align-items:center;color:var(--accent);font-size:var(--text-small-size,16px);text-decoration:none;margin-bottom:6px}.stash-back:hover{text-decoration:underline;text-underline-offset:3px}

.stash-photo-editor [data-stash-photo-preview]{display:block;width:100%;max-width:360px;max-height:280px;object-fit:cover;border-radius:12px;margin:12px 0}.stash-photo-editor [hidden]{display:none}

.stash-card{position:relative}
.stash-card-menu{position:absolute;top:12px;right:12px;z-index:2}
.stash-card-menu>summary{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border:1px solid var(--line);border-radius:50%;background:var(--card,#fff);color:var(--ink);font-size:26px;line-height:1;cursor:pointer;list-style:none}
.stash-card-menu>summary::-webkit-details-marker{display:none}
.stash-card-menu>summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.stash-card-menu-panel{position:absolute;top:42px;right:0;min-width:170px;padding:6px;border:1px solid var(--line);border-radius:12px;background:var(--card,#fff);box-shadow:0 8px 24px #0002}
.stash-card-menu-panel>button{display:block;width:100%;padding:10px 12px;border:0;border-radius:6px;background:transparent;color:var(--ink);font:inherit;font-size:var(--text-small-size,16px);text-align:left;cursor:pointer}
.stash-card-menu-panel>button:hover{background:var(--soft)}
.stash-card-menu-panel>[data-delete]{color:#9b3c4c}

/* Inventory overview and cards; project galleries keep their existing layout. */
.stash-overview{display:flex;flex-wrap:wrap;gap:12px 0;width:fit-content;max-width:100%;box-sizing:border-box;margin:20px 0;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:14px 0}
.stash-overview>div{display:flex;align-items:baseline;gap:10px;padding:0 20px;border-right:1px solid var(--line)}
.stash-overview>div:last-child{border:0}
.stash-overview dt{font-size:var(--text-small-size,16px);color:var(--muted);margin:0}
.stash-overview dd{font-size:20px;font-weight:600;line-height:1.2;margin:0;color:var(--accent)}
.stash-overview dd span{font-size:var(--text-small-size,16px);font-weight:400}
.stash-list-card{padding:0;min-width:0;border-radius:20px;display:flex;flex-direction:column}
.stash-card-photo{position:relative;border-radius:20px 20px 0 0;padding:20px;background:var(--soft,#eee7eb)}
.stash-card-photo img{display:block;width:100%;height:200px;object-fit:cover;mix-blend-mode:normal;border-radius:12px}
.stash-weight{position:absolute;bottom:14px;left:16px;background:var(--card);border:1px solid var(--line);border-radius:30px;padding:7px 13px;font-size:17px;color:var(--accent);font-weight:600}
.stash-weight>span{font-size:var(--text-small-size,16px);font-weight:400}
.stash-card-body{padding:22px;display:flex;flex-direction:column;flex:1;min-width:0}
.stash-card-body h2{margin:0 0 10px;font-size:20px;overflow-wrap:anywhere}
.stash-card-body .stash-color{margin:0 0 14px;color:var(--ink)}
.stash-color>span{color:var(--muted);margin-right:6px}
.stash-card-body .stash-notes{white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 18px;padding:12px 14px;border-radius:12px;background:var(--bg);font-size:var(--text-small-size,16px)}
.stash-find{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;font-size:var(--text-small-size,16px);margin-top:auto}
.stash-related{margin-top:18px;border-top:1px solid var(--line);padding-top:14px}
.stash-related{display:block;text-decoration:none;font-size:16px;color:var(--muted);line-height:1.6}
.stash-related:hover{color:var(--accent)}
.stash-related>.stash-model-count{display:inline-block;padding:0 7px;border-radius:20px;background:var(--soft);color:var(--accent);margin-left:5px;font-size:var(--text-small-size,16px)}
.stash-related .stash-models{padding-top:12px;max-height:240px;overflow:auto}
.stash-related .stash-models p{margin:0}
.stash-card-body .detail-actions{justify-content:space-between;font-size:16px;line-height:1.5;margin-top:16px;margin-bottom:0}
.stash-create-project{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;box-sizing:border-box;margin-top:18px;font-size:16px}
.stash-list-card .stash-card-menu-panel>[data-delete]{border-top:1px solid var(--line);border-radius:0 0 6px 6px;margin-top:4px}
.feed-empty.stash-welcome{max-width:704px;margin:22px auto}
#stash-error:empty{display:none}
@media(max-width:600px){
 .stash-overview{display:grid;width:100%;padding:12px 16px;gap:8px}
 .stash-overview>div{padding:0;border:0;justify-content:space-between}
 .stash-overview dt{font-size:var(--text-small-size,16px);line-height:1.4}
 .stash-overview dd{font-size:18px}
 .stash-grid{grid-template-columns:minmax(0,1fr)}
}

/* Keep intrinsic file-input and picker widths inside the form on narrow screens. */
.stash-form{width:100%;min-width:0;grid-template-columns:minmax(0,1fr)}
.stash-form>*,.stash-form label,.stash-amount-fields>*{min-width:0}
.stash-form label{grid-template-columns:minmax(0,1fr)}
.stash-form input,.stash-form textarea,.stash-form select{max-width:100%}
.stash-form [data-selected] a{min-width:0;overflow-wrap:anywhere}
.stash-form .yarn-picker-actions .button{max-width:100%;white-space:normal}
.stash-form input[type=file]{overflow:hidden;text-overflow:ellipsis}
@media(max-width:600px){
 .stash-amount-fields{grid-template-columns:minmax(0,1fr);gap:16px}
 .stash-form .detail-actions>.button{max-width:100%;white-space:normal}
}

/* Compact stash editor; catalog dialogs retain their shared layout. */
.stash-form .stash-field-title{margin:0 0 10px;font-size:var(--text-small-size,16px);font-weight:600;color:var(--ink)}
.stash-field-title>span,.stash-optional{margin-left:6px;color:var(--muted);font-weight:400;font-size:var(--text-small-size,16px)}
.stash-form .stash-yarn-field{padding-bottom:0;border-bottom:0}
.stash-form .stash-yarn-field>[data-yarn-picker]{margin:0;padding:0;border:0;background:none;border-radius:0}
.stash-form .yarn-picker-actions{margin:0}
.stash-form [data-selected] p{margin:0}
.stash-form .stash-amount-fields{grid-template-columns:minmax(0,1fr) minmax(0,200px);gap:20px}
.stash-form .stash-amount-fields label{color:var(--ink);font-weight:600}
.stash-form .stash-notes-field{margin:0;color:var(--ink);font-weight:600}
.stash-form input,.stash-form textarea{font-weight:400;border-radius:12px}
.stash-form input::placeholder,.stash-form textarea::placeholder{color:var(--muted);opacity:.8}
.stash-form .stash-photo-upload{display:flex;align-items:center;gap:20px;padding:18px;border:1px dashed var(--line);border-radius:14px;background:var(--bg)}
.stash-form .stash-photo-choose{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:8px;margin:0;padding:10px 14px;border:1px solid var(--line);border-radius:10px;background:var(--card,#fff);color:var(--accent);font-weight:600;cursor:pointer}
.stash-photo-choose svg{flex:none}
.stash-form .stash-photo-choose:hover{border-color:var(--accent)}
.stash-form .stash-photo-choose:focus-within{outline:2px solid var(--accent);outline-offset:3px}
.stash-form .stash-photo-input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);border:0;white-space:nowrap}
.stash-form .stash-photo-hint{margin:8px 0 0;font-size:var(--text-small-size,16px);line-height:1.5;color:var(--muted)}
.stash-photo-controls{min-width:0}
.stash-form .stash-photo-editor [data-stash-photo-preview]{width:100px;height:100px;max-width:100px;object-fit:cover;margin:0;background:var(--card,#fff);flex:none;border:1px solid var(--line)}
.stash-form [data-remove-stash-photo]{margin-top:8px;padding:0;font-size:var(--text-small-size,16px)}
.stash-form .detail-actions{padding-top:20px;border-top:0;margin-bottom:0}
@media(max-width:600px){
 .stash-form{padding:20px;gap:20px}
 .stash-form .stash-amount-fields{grid-template-columns:minmax(0,1fr);gap:18px}
 .stash-form .stash-photo-upload{flex-wrap:wrap;gap:14px;padding:14px}
}

.stash-project-count{display:inline-block;padding:0 7px;border-radius:20px;background:var(--soft);color:var(--accent);margin-left:5px;font-size:var(--text-small-size,16px);text-decoration:none}

.stash-related-label{text-decoration:underline;text-underline-offset:3px}


.stash-catalog-facts{display:grid;gap:14px;margin:0;padding:0}
.stash-catalog-facts dt{font-size:var(--text-small-size,16px);color:var(--muted);margin-bottom:4px}
.stash-catalog-facts dd{margin:0;font-size:16px;line-height:1.6;overflow-wrap:anywhere}

.stash-list-card{position:relative}
.stash-card-open::after{content:"";position:absolute;inset:0;border-radius:20px;z-index:1}
.stash-card-open:focus-visible{outline:none}
.stash-card-open:focus-visible::after{outline:2px solid var(--accent);outline-offset:4px}
.stash-list-card:has(.stash-card-open:hover){border-color:var(--accent)}
.stash-list-card .stash-card-menu{z-index:2}
.stash-card-menu-panel>a{display:block;padding:10px 12px;border-radius:6px;color:var(--ink);font-size:var(--text-small-size,16px);text-decoration:none}
.stash-card-menu-panel>a:hover{background:var(--soft)}
.stash-card-body .stash-composition{margin:0 0 8px;font-size:var(--text-small-size,16px);line-height:1.6}
.stash-card-body .stash-meterage{margin:0;color:var(--accent);font-size:var(--text-small-size,16px)}
.stash-detail{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px 32px;align-items:start;margin:18px 0;padding:0;border:0;border-radius:0;background:transparent}
.stash-detail-photo{min-width:0;padding:0;background:transparent;border-radius:18px;align-self:start;overflow:hidden}
.stash-detail-photo img{display:block;width:auto;max-width:100%;height:auto;max-height:480px;margin:0;object-fit:contain;border-radius:20px}
.stash-detail-copy{min-width:0}
.stash-detail-notes{white-space:pre-wrap}
.stash-detail-links{display:grid;gap:0;margin-top:20px;padding:0;border:1px solid var(--line);border-radius:12px;overflow:hidden;font-size:var(--text-small-size,16px);line-height:1.5}
.stash-detail-links>a{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;text-decoration:none;border-bottom:1px solid var(--line)}
.stash-detail-links>a:last-child{border:0}
.stash-detail-links>a:hover{background:var(--bg);color:var(--accent)}
.stash-detail-links a{text-underline-offset:3px}
.stash-detail-find{margin-top:24px;width:100%}
@media(max-width:700px){.stash-detail{grid-template-columns:minmax(0,1fr);gap:20px;padding:0}.stash-detail-photo img{max-height:340px}}

.stash-detail-stock{display:flex;align-items:baseline;gap:14px;margin-bottom:8px;padding:0 0 20px;border-bottom:1px solid var(--line);color:var(--accent)}
.stash-detail-stock>span{font-size:16px}
.stash-detail-stock>strong{font-size:30px;line-height:1.2;font-weight:600;white-space:nowrap}
.stash-detail-stock small{font-size:17px;font-weight:400}
.stash-detail .stash-catalog-facts{gap:0}
.stash-detail .stash-catalog-facts>div{display:grid;grid-template-columns:86px minmax(0,1fr);gap:16px;padding:14px 0;border-bottom:1px solid var(--line);align-items:baseline}
.stash-detail .stash-catalog-facts dt{font-size:var(--text-small-size,16px)}
.stash-detail .stash-catalog-facts dd{font-size:16px;color:var(--ink)}
.stash-detail .stash-catalog-facts>.stash-detail-note-row{border:0;align-items:start}
.stash-detail .stash-catalog-link{color:var(--muted);font-size:16px}
.stash-detail-links :is(.stash-model-count,.stash-project-count){display:inline-block;min-width:26px;padding:0 7px;margin-left:5px;background:var(--soft);color:var(--accent);border-radius:20px;text-align:center;font-size:var(--text-small-size,16px)}
.stash-detail-copy .button{font-size:16px;border-radius:12px}

.stash-detail-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:24px}
.stash-detail-actions>.button{display:flex;align-items:center;justify-content:center;text-align:center;width:100%;min-width:0;min-height:48px;margin:0;padding:12px 10px;line-height:1.4;white-space:normal}

.stash-detail-actions>.button{gap:8px}
.stash-finder-lock{width:18px;height:18px;flex:0 0 18px}

.stash-detail-edit{flex-shrink:0;color:var(--accent);font-size:var(--text-small-size,16px);line-height:1.5;text-decoration:underline;text-underline-offset:3px}

.stash-detail-heading{align-items:center;border-bottom:0;padding-bottom:0}
.stash-detail-heading h1{margin:0}

.stash-yarn-field{--stash-yarn-font-size:var(--text-small-size,16px)}
.stash-form .stash-yarn-field .stash-field-title,.stash-form .stash-yarn-field .yarn-picker-actions>.button{font-size:var(--stash-yarn-font-size);line-height:1.5}


.stash-form input[type="number"]{appearance:textfield;-moz-appearance:textfield}
.stash-form input[type="number"]::-webkit-inner-spin-button,.stash-form input[type="number"]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}

.stash-list-header{display:flex;align-items:end;justify-content:space-between;flex-wrap:wrap;gap:18px 24px;margin:20px 0}
.stash-list-header>.stash-overview{margin:0}
.stash-list-toolbar{display:flex;justify-content:flex-end;margin:0;min-width:0;flex:0 1 300px}
.stash-list-toolbar label{display:grid;gap:8px;font-size:var(--text-small-size,16px);color:var(--muted);width:min(100%,300px)}
.stash-list-toolbar select{width:100%;padding:11px 14px;border:1px solid var(--line);border-radius:10px;background:var(--card);color:var(--ink);font:inherit}

@media(max-width:600px){.stash-list-header{align-items:stretch}.stash-list-toolbar{flex:1 1 100%}.stash-list-toolbar label{width:100%}}
.stash-form .yarn-characteristics label{margin:0}

.stash-form .stash-yarn-field>.stash-field-title{font-size:18px;font-weight:700;line-height:1.4;margin-bottom:12px}

.stash-form .stash-yarn-field{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:center;gap:10px}
.stash-form .stash-yarn-field>.stash-field-title{margin:0}
.stash-form .stash-yarn-field>[data-yarn-picker]{width:100%;min-width:0;max-width:100%;overflow:visible}
.stash-form .stash-yarn-field .yarn-picked-entry{margin-bottom:0}

.stash-form .stash-yarn-field{grid-template-columns:minmax(0,1fr)}

.stash-photo-choose.has-photo>svg{display:none}
.stash-list-heading{flex-wrap:nowrap;align-items:center;border-bottom:0;padding-bottom:0}
.stash-list-heading>div{min-width:0}
.stash-list-heading h1{margin-bottom:0}
.stash-list-heading:has(+.stash-welcome) .stash-list-intro{display:none}
.stash-list-heading>.stash-add-icon{display:grid;place-items:center;flex:none;width:48px;height:48px;min-width:48px;min-height:48px;padding:0;border-radius:50%}
@media(max-width:760px){
 .stash-heading .stash-list-intro{display:none}
 .feed-empty.stash-welcome{padding:24px 18px;margin:18px 0}
 .stash-welcome h2{font-size:25px;margin-bottom:10px}
 .stash-welcome .feed-empty-icon{width:52px;height:52px;margin-bottom:14px}
 .stash-welcome p{line-height:1.5;margin-bottom:18px}
 .stash-list-header{display:grid;grid-template-columns:minmax(0,1fr);align-items:center;gap:10px;margin:16px 0}
 .stash-list-header>.stash-overview{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);width:100%;padding:10px 0;border-radius:12px;gap:0}
 .stash-overview>div{display:flex;flex-direction:row;flex-wrap:wrap;align-items:baseline;justify-content:center;gap:3px 7px;padding:0 10px;border:0;border-right:1px solid var(--line);min-width:0}
 .stash-overview>div:last-child{border:0}
 .stash-overview dt{font-size:16px;line-height:1.35}
 .stash-overview dd{order:0;font-size:18px;line-height:1.2;font-weight:600;white-space:nowrap}
 .stash-list-toolbar{justify-self:end;width:44px;min-width:0;margin:0}
 .stash-list-toolbar>label{width:44px;display:block;font-size:0;line-height:0}
 .stash-list-toolbar .site-select{width:44px;min-width:0;margin:0;font-size:16px}
 .stash-list-toolbar .stash-sort-trigger{display:grid;place-items:center;width:44px;height:48px;min-height:48px;padding:0;border:0;border-radius:12px;background:var(--soft);color:var(--accent)}
 .stash-sort-trigger>span:not(.model-sort-icon){display:none}
 .stash-sort-trigger>.model-sort-icon{display:flex;align-items:center;justify-content:center}
 .stash-page .stash-grid:has(>.stash-list-card){grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 12px;margin-top:16px}
 .stash-list-card{border-radius:14px}
 .stash-list-card .stash-card-photo{padding:8px;border-radius:14px 14px 0 0}
 .stash-list-card .stash-card-photo img{height:auto;aspect-ratio:1;object-fit:contain;border-radius:8px}
 .stash-list-card .stash-weight{left:8px;bottom:8px;padding:5px 8px;font-size:16px}
 .stash-list-card .stash-card-body{padding:10px}
 .stash-list-card .stash-card-body h2{font-size:16px;line-height:1.35;margin-bottom:6px}
 .stash-list-card .stash-composition{font-size:16px;line-height:1.4;margin-bottom:6px}
 .stash-list-card .stash-meterage{font-size:16px;line-height:1.4;margin-top:auto}
 .stash-list-card .stash-card-menu{top:6px;right:6px}
 .stash-list-card .stash-card-menu>summary{width:40px;height:40px}
}

.stash-form .stash-cancel{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 4px;border:0;border-radius:0;background:none;box-shadow:none;color:var(--accent);font:inherit;font-size:16px;text-decoration:none}
@media(max-width:760px){
 .stash-page #stash-content:has(>.stash-form)>.stash-back{display:none}
}

@media(min-width:761px){
 :root body .stash-list-heading>.stash-add-icon{display:inline-flex;align-items:center;justify-content:center;gap:10px;width:auto;height:auto;min-height:48px;padding:12px 20px;border-radius:12px;white-space:nowrap}
}
@media(max-width:760px){.stash-add-label{display:none}}

.stash-list-card .stash-card-photo>.stash-card-menu{top:auto;right:8px;bottom:8px}
.stash-list-card .stash-card-photo>.stash-card-menu>.stash-card-menu-panel{top:auto;bottom:calc(100% + 6px)}

.stash-list-card .stash-card-photo{position:relative}

/* Keep selected yarn details together, above the editable stock fields. */
.stash-form .stash-yarn-field{padding-bottom:0;border-bottom:0;gap:6px}
.stash-yarn-characteristics .yarn-characteristics-facts:not([hidden]){display:block;margin:0;color:var(--muted);font-size:var(--text-small-size,16px);line-height:1.6}
.stash-yarn-characteristics .yarn-characteristics-facts>div,.stash-yarn-characteristics .yarn-characteristics-facts dd{display:inline}
.stash-yarn-characteristics .yarn-characteristics-facts dt{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.stash-yarn-characteristics .yarn-characteristics-facts div:has([data-meterage]:empty){display:none}
.stash-yarn-characteristics .yarn-characteristics-facts div:has([data-meterage]:not(:empty))::after{content:" · "}

.stash-detail-nav{display:flex;align-items:center;justify-content:space-between;gap:16px}
.stash-detail-nav>.stash-back{margin:0}
.stash-detail-nav>.project-detail-edit{color:var(--accent);text-decoration:none}

.stash-list-card .stash-card-photo{padding:0;border:0;background:transparent}
.stash-list-card .stash-card-photo img{height:240px;border:0;border-radius:20px 20px 0 0}
@media(max-width:760px){
 .stash-list-card .stash-card-photo img{height:auto;aspect-ratio:1;border-radius:14px 14px 0 0}
}

@media(min-width:1050px){.stash-page .stash-grid:has(>.stash-list-card){grid-template-columns:repeat(4,minmax(0,1fr))}}

@media(min-width:761px){
 .stash-list-toolbar{flex:0 1 auto;margin-left:auto;max-width:100%}
 .stash-list-toolbar>label{width:auto;max-width:100%}
 :root body .stash-list-toolbar .site-sort-select{width:fit-content;min-width:0;max-width:100%;flex:0 1 auto}
 :root body .stash-list-toolbar .site-sort-select>.model-sort-trigger{
  display:flex;justify-content:space-between;gap:8px;
  width:fit-content!important;min-width:0;max-width:100%;
  height:40px!important;min-height:40px!important;max-height:40px;
  padding:6px 10px!important;aspect-ratio:auto;
  border:1px solid var(--line);border-radius:var(--select-radius,8px);
  background:var(--card);color:var(--ink);white-space:nowrap;
 }
 :root body .stash-list-toolbar .model-sort-trigger>span:not(.model-sort-icon){display:inline-flex}
 :root body .stash-list-toolbar .model-sort-trigger>.model-sort-icon{display:none}
}

@media(max-width:760px){
 .stash-list-header{grid-template-columns:minmax(0,1fr) 44px;align-items:center;gap:10px}
 .stash-list-header>.stash-overview{min-width:0;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr)}
 .stash-list-header>.stash-list-toolbar{width:44px;flex:none;justify-self:end}
 .stash-list-header .stash-overview>div{padding-inline:6px;gap:2px 5px}
}

@media(max-width:760px){
 .stash-list-header .stash-overview>div{flex-wrap:nowrap;min-width:0}
 .stash-list-header .stash-overview dt{flex:0 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:clip}
 .stash-list-header .stash-overview dd{flex:none;white-space:nowrap}
}

@media(min-width:761px){
 .stash-list-header>.stash-overview{width:max-content;flex:0 0 auto;flex-wrap:nowrap}
 .stash-list-header .stash-overview>div{flex:none;flex-wrap:nowrap}
 .stash-list-header .stash-overview :is(dt,dd){white-space:nowrap}
}

body .stash-detail-nav>.project-detail-edit{justify-self:end;flex:none;height:44px}

.stash-detail-facts{margin:14px 0 0;color:var(--ink);font-size:var(--text-small-size,16px);line-height:1.6;overflow-wrap:anywhere}

body .stash-detail-nav{padding-bottom:0;margin-bottom:16px}
.stash-detail-nav+.stash-detail-heading{margin-top:0}

/* Match the catalogue identity block without the list heading layout. */
.stash-detail-heading{display:block;margin:0 0 20px;padding:0;border:0}
.stash-detail-heading+.stash-detail{margin-top:0}
