/* Foreground/link colors are separate from decorative yellow/lavender fills. */
:root{--fm-link:#36428c;--fm-focus:#5962b8;--fm-selected:#f4f5f9;--fm-selected-border:#8991b7}
:root[data-appearance=dark]{--fm-link:#c4c7ff;--fm-focus:#b2b6ff;--fm-selected:#242733;--fm-selected-border:#8288d2}
html[data-appearance] body :is(a,.brand,.sync-last-backup){color:var(--fm-link)!important}
html[data-appearance] body .account-link{color:var(--fm-text)!important;background:var(--fm-soft)!important;border-color:var(--fm-border)!important}
html[data-appearance] body .account-link .sync-last-backup{color:var(--fm-muted)!important}
html[data-appearance] body :is(button,a,input,summary,select,textarea):focus-visible{outline:2px solid var(--fm-focus)!important;outline-offset:3px}
html[data-appearance] body .shell :is(.result,.result.active){background:var(--fm-surface)!important;color:var(--fm-text)!important;border-color:var(--fm-border)!important}
html[data-appearance] body .shell .result.active{background:var(--fm-selected)!important;border-color:var(--fm-selected-border)!important;box-shadow:0 0 0 1px var(--fm-selected-border)}
html[data-appearance] body .shell :is(.result input,.product-save-details,.item-preview,.editor-advanced,.item-advanced,.quiet-tools,.saved-panel,.naming-health){background:var(--fm-soft)!important;color:var(--fm-text)!important;border-color:var(--fm-border)!important}
html[data-appearance] body .shell :is(.item-advanced,.editor-advanced,.quiet-tools,.product-save-details)>summary{color:var(--fm-text)!important;background:transparent!important}
html[data-appearance] body .shell .item-advanced{background:transparent!important}
html[data-appearance] body .shell :is(.item-number,.item-count,.count,.panel-count,#itemCount,#count){background:var(--fm-hover)!important;color:var(--fm-text)!important;border-color:var(--fm-border)!important}
html[data-appearance] body .shell :is(.panel-heading h2,.panel-heading h2 span,.panel-heading h2 strong){color:var(--fm-text)!important}
html[data-appearance] body .shell :is(.result button,.product-save-details button,.item-advanced button,.item-actions button,#editorHelp,.edit-selection){border:1px solid var(--fm-border)!important;background:var(--fm-surface)!important;color:var(--fm-text)!important;min-height:36px;border-radius:7px}
html[data-appearance] body .shell .lens-button{background:var(--fm-accent)!important;color:var(--fm-on-accent)!important;border:0!important;padding:13px!important}
html[data-appearance] body .shell .item-actions .remove-button{color:#ab3a3a!important}
html[data-appearance=dark] body .shell .item-actions .remove-button{color:#ffb4b4!important}
html[data-appearance] body .shell .link-entry{display:grid!important;grid-template-columns:minmax(0,1fr) 100px;gap:8px!important;background:transparent!important}
html[data-appearance] body .shell .link-entry input{box-sizing:border-box;min-width:0!important;width:100%!important;padding:10px!important;border:1px solid var(--fm-border)!important;border-radius:7px;background:var(--fm-surface)!important;color:var(--fm-text)!important}
html[data-appearance] body .shell .link-entry input[type=url]{grid-column:1/-1}
html[data-appearance] body .shell .link-entry button{padding:9px 12px!important;font-size:12px!important}
html[data-appearance] body .shell .link-entry input[type=number]{grid-row:2;grid-column:1;max-width:150px}
html[data-appearance] body .shell .link-entry button:last-child{grid-column:2;background:var(--fm-accent)!important;color:var(--fm-on-accent)!important;border-color:var(--fm-accent)!important}
html[data-appearance] body .shell .item-preview{padding:0!important;background:transparent!important}
html[data-appearance] body .shell .result :is(small,p){color:var(--fm-muted)!important}
html[data-appearance] body .shell .media-tabs button[aria-selected=true]{background:var(--fm-accent)!important;color:var(--fm-on-accent)!important}
html[data-appearance] body .shell header{align-items:center;flex-wrap:wrap;row-gap:10px}
html[data-appearance] body .shell header .account-link{padding:9px 12px;max-width:240px;font-size:12px;line-height:1.4;border-radius:9px;border:1px solid var(--fm-border)}
/* Image element was still capped at 260px by a legacy stylesheet. Fill the
   thumbnail box without clipping any part of the saved outfit. */
html[data-appearance] body.studio #gallery .thumb{padding:0!important;min-height:0!important;aspect-ratio:4/5!important}
html[data-appearance] body.studio #gallery .thumb :is(img,video){display:block!important;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;max-width:none!important;object-fit:contain!important;padding:0!important;margin:0!important}
html[data-appearance] body.studio .app[data-library-layout=list] #gallery .thumb{aspect-ratio:1!important}
/* Explicit sizing prevents legacy flex growth and margins in the sidebar. */
html[data-appearance] body.studio .studio-sidebar .v30-tabs{flex:0 0 auto!important;gap:5px!important;margin:0 0 5px!important;padding:0!important;min-height:0!important;height:auto!important;align-content:start!important}
html[data-appearance] body.studio .studio-sidebar :is(.v30-tab,.studio-nav){flex:0 0 auto!important;min-height:40px!important;height:40px!important;margin:0!important;padding:10px 12px!important;line-height:20px!important;box-sizing:border-box!important;display:flex!important;align-items:center!important;gap:5px!important;background:transparent!important;border-radius:9px!important;color:var(--fm-text)!important}
html[data-appearance] body.studio .studio-sidebar .v30-tab.active{background:var(--fm-accent)!important;color:var(--fm-on-accent)!important}
html[data-appearance] body.studio .studio-sidebar .v30-tab span{margin-left:3px}
html[data-appearance] body.studio .studio-sidebar .studio-brand{margin-bottom:25px!important}
html[data-appearance] body.studio .studio-sidebar .appearance-toggle{min-height:38px!important;width:100%;padding:9px 12px!important;border:1px solid var(--fm-border)!important;border-radius:20px!important;background:var(--fm-soft)!important;color:var(--fm-text)!important;font:500 12px/1.4 Arial,sans-serif!important;text-align:center!important;box-sizing:border-box}
html[data-appearance] body.studio .studio-rail .account-link{background:transparent!important;color:var(--fm-text)!important}
html[data-appearance] body.studio .studio-rail .account-link small{color:var(--fm-muted)!important}
@media(max-width:649px){html[data-appearance] body.studio .studio-sidebar{padding:15px 18px 13px!important;gap:7px!important;align-items:center}html[data-appearance] body.studio .studio-sidebar .studio-brand{margin:0!important}html[data-appearance] body.studio .studio-sidebar .appearance-toggle{width:auto;font-size:10px!important;padding:8px 11px!important;min-height:33px!important}html[data-appearance] body.studio .studio-sidebar .v30-tabs{margin:6px 0 0!important;gap:8px!important}html[data-appearance] body.studio .studio-sidebar :is(.v30-tab,.studio-nav){justify-content:center!important;min-height:36px!important;height:36px!important;padding:8px!important;font-size:11px!important}html[data-appearance] body .shell .link-entry{grid-template-columns:minmax(0,1fr) 85px}html[data-appearance] body .shell .link-entry button{font-size:11px!important;padding:8px!important}}

html[data-appearance] body .shell .link-entry{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}html[data-appearance] body .shell .link-entry input[type=number]{grid-row:2;grid-column:1/-1;max-width:none}html[data-appearance] body .shell .link-entry button:first-of-type{grid-row:3;grid-column:1}html[data-appearance] body .shell .link-entry button:last-of-type{grid-row:3;grid-column:2}

html[data-appearance] body .shell #results .result .lens-button,html[data-appearance] body .shell #results .link-entry button:last-of-type{background:var(--fm-accent)!important;color:var(--fm-on-accent)!important;border-color:var(--fm-accent)!important}
