/* Keep editing controls readable independently of the creator's public palette.
   Profile previews style their own contents; these rules only style the editor. */
#editor{
  --text:#f5f6f8;--muted:#a7afbd;--line:#353d49;--surface:#171b23;--accent:#00d4ed;
  color-scheme:dark;background:#14171d;color:var(--text);border-color:var(--line);
  border-radius:24px;font-family:'DM Sans',sans-serif;width:min(680px,calc(100vw - 24px));
}
#editor :is(.field-label,.link-card .field-label){color:#e0e5ee}
#editor :is(.editor-note,.field-help,.empty-links,#save-status){color:var(--muted)}
#editor :is(.field input,.field textarea,.field select,.type-select select,.appearance-settings select,.typography-settings select){background:#0d1118;color:#f5f6f8;border-color:#4c5768}
#editor :is(.quiet-button,.upload-button){background:#202631;color:#f5f6f8;border:1px solid #4c5768;border-radius:10px}
#editor .primary-button{background:#00d4ed;color:#06151a;border-radius:10px}
#editor .close-button{color:#f5f6f8;background:#282e38}
#editor .editor-footer{margin:24px 0 0;padding:16px 0;min-height:0;gap:12px;background:#14171df5;color:var(--text);border-top:1px solid var(--line)}
#editor .editor-sections{min-width:0}
#editor .editor-section-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px;border:1px solid var(--line);border-radius:12px;background:#0d1118}
#editor .editor-section-tab{min-width:0;min-height:44px;padding:10px 8px;border:1px solid transparent;border-radius:8px;background:transparent;color:#b6bfce;font-weight:700;font-size:14px}
#editor .editor-section-tab[aria-selected=true]{background:#253746;border-color:#3e687c;color:#f5f6f8}
#editor .editor-section-tab:hover{background:#26303d;color:#fff}
#editor :is(.editor-section-tab,.editor-management-button,.editor-management-back,.editor-advanced-summary):focus-visible{outline:2px solid #00d4ed;outline-offset:3px}
#editor .editor-management-button{display:block;min-height:44px;margin:8px 0 16px auto;padding:8px 0 8px 14px;background:transparent;color:#b9c8d9;text-decoration:underline;text-underline-offset:4px;font-size:13px;max-width:100%;white-space:normal}
#editor .editor-management-button[aria-expanded=true]{color:#f5f6f8}
#editor .editor-section-panel{min-width:0;padding-top:4px;scroll-margin-top:16px}
#editor .editor-section-panel[hidden]{display:none!important}
#editor .editor-section-panel:focus-visible{outline:2px solid #00d4ed;outline-offset:5px}
#editor .editor-section-panel h2{font-size:19px;margin:8px 0 12px}
#editor .editor-appearance-basic{min-width:0}
#editor .editor-advanced{margin-top:24px;border:1px solid #434d5b;border-radius:12px;background:#11151c}
#editor .editor-advanced-summary{cursor:pointer;min-height:48px;padding:15px 16px;color:#e4eaf2;font-weight:700;font-size:14px}
#editor .editor-advanced[open]>.editor-advanced-summary{border-bottom:1px solid #353d49}
#editor .editor-advanced-content{padding:0 14px 14px;min-width:0}
#editor .editor-advanced-content>:last-child{margin-bottom:0}
#editor .editor-management-back{min-height:44px;padding:10px 14px;border:1px solid #4c5768;border-radius:10px;background:#202631;color:#f5f6f8;font-size:13px;margin-bottom:12px}
#editor .editor-management-content{min-width:0}
#editor .editor-section-panel :is(.field,.field-grid,.link-card,.design-tools){min-width:0;max-width:100%}
#editor .editor-section-panel :is(h2,h3,p,.field-label,.toggle-field){overflow-wrap:anywhere}
#editor .editor-section-panel .links-heading{border-top:0;padding-top:0}
@media(max-width:480px){
  #editor{padding:18px;border-radius:18px}
  #editor .editor-footer{bottom:-18px}
  #editor .editor-advanced-content{padding:0 10px 12px}
  #editor .editor-advanced-content :is(.appearance-settings,.typography-settings,.customization-settings,.design-tools){padding:12px}
  #editor .editor-section-tab{padding-inline:4px;font-size:13px}
  #editor .editor-section-panel .field-grid{grid-template-columns:1fr;gap:0}
}
@media(max-width:350px){#editor .editor-section-panel .appearance-colors{grid-template-columns:minmax(0,1fr)}}
