.storefront-editor{overflow-y:auto;overflow-x:hidden;box-sizing:border-box;width:min(1400px,96vw);max-width:1400px;padding:28px;max-height:94dvh;color:var(--text,#171c21);background:var(--panel,#fff)}
.storefront-editor-layout{display:grid;grid-template-columns:minmax(300px,480px) minmax(0,1fr);gap:32px;align-items:start}
.storefront-editor fieldset{border:0;padding:0;margin:0;min-width:0}.storefront-editor label{font-size:16px;font-weight:600;display:grid;gap:8px;margin:14px 0}
.storefront-editor input:not([type=checkbox]):not([type=file]),.storefront-editor select,.storefront-editor textarea{width:100%;min-width:0;font-size:16px;padding:12px;border-radius:12px;line-height:1.45;box-sizing:border-box}
.storefront-editor h3{font-size:23px;margin:0 0 18px}.storefront-editor-block{padding:24px 0;border-bottom:1px solid var(--line,#dfe3e6)}
.storefront-editor-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}.storefront-editor .sf-check{display:flex;align-items:center;gap:12px;line-height:1.5}.sf-check input{width:22px;height:22px;flex:none}
.sf-note{font-size:15px;line-height:1.6;color:var(--muted,#67707a);margin:12px 0}.sf-image-field{display:grid;gap:12px;margin:20px 0}.sf-image-field img{width:100%;height:180px;object-fit:cover;border-radius:12px}.sf-image-field[data-sf-image-field=logo_url] img{height:96px;object-fit:contain;background:#ececea;padding:12px}
.sf-image-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.storefront-editor .sf-image-actions label{margin:0;cursor:pointer;display:flex;font-weight:500}.sf-image-actions .ghost{min-height:44px;font-size:15px;padding:10px 14px}
.sf-section-row{padding:16px;margin:12px 0;border:1px solid var(--line,#dfe3e6);border-radius:16px;display:grid;gap:12px}.sf-section-heading{display:flex;gap:8px;align-items:center}.sf-section-heading .sf-check{margin:0 auto 0 0}.sf-section-heading button{min-width:44px;min-height:44px;font-size:22px}
.sf-preview-panel{position:sticky;top:0;min-width:0}.sf-preview-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}.sf-preview-toolbar>div{display:flex;gap:8px}.sf-preview-toolbar button[aria-pressed=true]{background:var(--text,#171c21);color:var(--panel,#fff)}
.sf-preview-viewport{overflow:auto;background:#e8e9e7;padding:16px;border-radius:18px;max-height:70dvh}.sf-preview-viewport iframe{display:block;margin:auto;border:0;width:390px;height:740px;max-width:none;background:white;border-radius:14px}.sf-preview-viewport[data-device=desktop] iframe{width:1100px;height:740px}
.sf-save-bar{padding:20px 0;position:sticky;bottom:0;background:var(--panel,#fff);z-index:2}.sf-save-bar p{font-size:15px}.sf-save-bar button{width:100%;min-height:50px;margin-top:10px}.sf-save-bar [hidden]{display:none}.sf-save-bar .error:empty{display:none}
.sf-gallery-preview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:14px}.sf-gallery-preview img{width:100%;height:96px;object-fit:cover;border-radius:10px}.sf-gallery-preview button{font-size:14px;width:100%;min-height:40px}
.sf-media-item{padding:0;overflow:hidden;border-radius:12px}.sf-media-item img{width:100%;height:150px;object-fit:cover}
[data-owner-theme=dark] .storefront-editor{--panel:#1b2028;--text:#f1f3f5;--line:#353d49;--muted:#b7c0cb}[data-owner-theme=dark] .sf-preview-viewport{background:#10151b}
@media(max-width:900px){.storefront-editor{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;padding:20px;border-radius:0;box-sizing:border-box}.storefront-editor-layout{grid-template-columns:minmax(0,1fr);gap:24px}.sf-preview-panel{position:static}.sf-preview-viewport{max-height:600px}.sf-preview-viewport[data-device=mobile] iframe{width:100%;height:650px}.storefront-editor-fields{gap:10px}.storefront-editor .owner-tool-dialog-head h2{font-size:30px}}
@media(max-width:360px){.storefront-editor{padding:14px}.storefront-editor-fields{grid-template-columns:1fr}.sf-section-row{padding:12px}}

#sfMediaDialog{padding:24px;overflow-y:auto;box-sizing:border-box}#sfMediaDialog .owner-media-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px}

.sf-accent-field{min-width:0}.storefront-editor .sf-accent-field label{margin-bottom:8px}.storefront-editor input#sfAccentPalette{display:block;height:48px;padding:5px;cursor:pointer;margin-bottom:8px}.storefront-editor input#sfAccent{font-size:14px}
