.wardrobe-editor{display:grid;grid-template-columns:minmax(200px,.65fr) minmax(0,1.7fr);align-items:start;gap:24px;min-width:0;margin-top:16px}
.wardrobe-preview{position:sticky;top:calc(var(--header-height,76px) + 16px);min-width:0}
.wardrobe-preview h4{font-size:15px;margin:0 0 12px}
.wardrobe-figure{position:relative;display:grid;place-items:center;align-content:center;gap:12px;min-height:360px;height:min(520px,64dvh);padding:16px;border:1px solid var(--soft-line,var(--line));border-radius:14px;background:var(--page);overflow:hidden;text-align:center}
.wardrobe-figure img{width:100%;height:100%;min-height:0;object-fit:contain;grid-area:1/1}
.wardrobe-figure:has(img:not([hidden])){grid-template-rows:minmax(0,1fr);align-content:stretch}
.wardrobe-figure:has(img:not([hidden])) .subtle:not([hidden]){position:absolute;bottom:12px;left:12px;right:12px;padding:10px;border-radius:8px;background:var(--side);font-size:12px}
.wardrobe-note{font-size:12px!important;margin-top:12px}
.wardrobe-panel{min-width:0}
.wardrobe-toolbar{display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin-bottom:16px}
.wardrobe-toolbar label{display:grid;gap:6px;flex:1 1 160px;color:var(--muted);font-size:13px}
.wardrobe-toolbar input{flex:1 1 180px}
.wardrobe-toolbar select,.wardrobe-toolbar input{width:100%;min-width:0;min-height:44px;background:var(--page);font-size:15px}
.wardrobe-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:12px;max-height:620px;overflow:auto;scrollbar-width:thin;padding:2px}
.wardrobe-card{display:flex;flex-direction:column;align-items:stretch;min-width:0;padding:0;border:1px solid var(--soft-line,var(--line));border-radius:12px;background:var(--page);overflow:hidden;text-align:left}
.wardrobe-card:hover:not(:disabled){border-color:var(--muted);background:var(--surface)}
.wardrobe-card[aria-pressed=true]{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.wardrobe-thumb{display:grid;place-items:center;width:100%;aspect-ratio:1;background:color-mix(in srgb,var(--surface) 65%,var(--side));padding:8px}
.wardrobe-thumb img{width:100%;height:100%;object-fit:contain;min-height:0}
.wardrobe-thumb .subtle{font-size:12px!important;text-align:center}
.wardrobe-name{display:block;padding:10px 12px;font-size:13px;line-height:1.4;overflow-wrap:anywhere}
.live-field-group:has(>.live-group-fields>.wardrobe-editor)>.live-group-fields{display:block}
@media(max-width:700px){.wardrobe-editor{grid-template-columns:minmax(0,1fr);gap:20px}.wardrobe-preview{position:static;display:block}.wardrobe-preview h4{margin-bottom:12px}.wardrobe-figure{min-height:260px;height:300px}.wardrobe-note{text-align:center}.wardrobe-grid{grid-template-columns:repeat(auto-fill,minmax(110px,1fr));max-height:520px;gap:8px}}

.wardrobe-crop{position:relative;grid-area:1/1;overflow:hidden;min-width:0;min-height:0;width:100%;height:100%}
.wardrobe-crop[hidden],.wardrobe-crop img[hidden]{display:none}
.wardrobe-figure .wardrobe-crop>img{position:absolute;max-width:none;min-height:0;left:0;top:0;width:100%;height:100%;object-fit:contain}
.wardrobe-focus-toggle{min-height:40px;margin:0 0 10px;font-size:13px}
.wardrobe-editor[data-preview-only="true"]{display:block;margin-top:0}
.wardrobe-editor[data-preview-only="true"]>.wardrobe-preview{position:static}
.wardrobe-figure[data-preview-state="loading"],.wardrobe-figure[data-preview-state="invalid"]{border-style:dashed}
