/* Scoped profile editor: stable controls and a single scrolling form. */
#editProfileModal { padding:24px; background:#11132280; }
#editProfileModal .ep-dialog { display:flex; flex-direction:column; width:min(720px,100%); max-width:720px; max-height:min(900px,calc(100dvh - 48px)); padding:0; overflow:hidden; border-radius:24px; box-shadow:0 24px 90px #0004; }
#editProfileModal .modal-header { flex-shrink:0; padding:22px 26px 18px; margin:0; border-bottom:1px solid var(--border2); }
#editProfileModal .modal-title { font-size:23px; letter-spacing:-.4px; margin:0; }
#editProfileDescription { color:var(--text3); font-size:13px; margin-top:5px; }
#editProfileModal .modal-close-btn { width:36px; height:36px; flex-shrink:0; padding:0; }
#editProfileModal .modal-close-btn svg { width:18px; height:18px; }
#editProfileModal .ep-content { overflow-y:auto; overscroll-behavior:contain; min-height:0; padding:22px 26px; scrollbar-gutter:stable; }
.ep-identity { display:flex; align-items:center; gap:12px; margin-bottom:24px; }
.ep-avatar { width:52px; height:52px; flex-shrink:0; border-radius:16px; background:var(--accent-soft); color:var(--text); display:grid; place-items:center; overflow:hidden; font-weight:700; }
.ep-avatar img { width:100%; height:100%; object-fit:cover; }
.ep-identity > div:nth-child(2) { min-width:0; }
.ep-identity strong,.ep-identity span:not(.ep-identity-label) { display:block; overflow:hidden; text-overflow:ellipsis; }
.ep-identity strong { font-size:16px; }
.ep-identity span { font-size:12px; color:var(--text3); margin-top:4px; }
.ep-identity-label { margin-left:auto; white-space:nowrap; }
#editProfileModal .ep-section h3 { font-size:14px; font-weight:700; color:var(--text); margin:0 0 12px; }
.ep-field-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.ep-field { min-width:0; }
#editProfileModal .form-label { font-size:12px; font-weight:600; color:var(--text2); margin:10px 0 7px; }
#editProfileModal .form-input { width:100%; border-radius:11px; min-height:44px; padding:11px 12px; font-size:14px; margin:0; box-shadow:none; background:var(--bg3); border:1px solid var(--border2); }
#editProfileModal .form-input:focus { outline:2px solid var(--accent-primary); outline-offset:2px; }
#editProfileModal textarea.form-input { line-height:1.55; resize:vertical; min-height:88px; max-height:180px; }
#editProfileModal .edit-handle-row { margin:0; }
#editProfileModal .edit-handle-input { padding-left:32px; }
#editProfileModal .edit-profile-hint { font-size:11px; line-height:1.5; margin:7px 0 2px; color:var(--text3); }
#editProfileModal .edit-profile-counter { margin:7px 0 16px; font-size:11px; font-weight:500; }
#editProfileModal .edit-location-row { grid-template-columns:1fr 1fr; gap:12px; margin:0; }
#editProfileModal .edit-appearance-card { padding:22px 0 0; margin:24px 0 0; background:transparent; border:0; border-top:1px solid var(--border2); border-radius:0; }
.ep-section-heading { display:flex; align-items:start; justify-content:space-between; gap:12px; }
#editProfileModal .ep-section-heading h3 { margin-bottom:5px; }
.ep-section-heading p { font-size:12px; color:var(--text3); line-height:1.5; }
.ep-color-count { font-size:11px; color:var(--text3); white-space:nowrap; padding-top:2px; }
#editProfileModal .edit-accent-grid { grid-template-columns:repeat(5,minmax(0,1fr)); gap:9px; margin-top:16px; }
#editProfileModal .edit-accent-option { min-height:76px; padding:9px 4px; gap:7px; border-radius:12px; background:var(--bg2); border:1px solid var(--border2); box-shadow:none; }
#editProfileModal .edit-accent-option:hover { background:var(--bg3); transform:none; }
#editProfileModal .edit-accent-option.is-selected { border-color:var(--accent-primary); background:var(--accent-soft); box-shadow:inset 0 0 0 1px var(--accent-primary); }
#editProfileModal .edit-accent-option:focus-visible { outline:2px solid var(--accent-primary); outline-offset:3px; }
#editProfileModal .edit-accent-swatch { width:28px; height:28px; font-size:15px; box-shadow:inset 0 0 0 1px #0002; }
#editProfileModal .edit-accent-check { display:grid; place-items:center; width:18px; height:18px; border-radius:50%; color:#fff; background:#151515; border:1px solid #fff; font-size:11px; }
#editProfileModal .edit-accent-label { font-size:11px; font-weight:500; }
#editProfileModal .modal-footer { flex-shrink:0; align-items:center; padding:16px 26px; gap:10px; border-top:1px solid var(--border2); background:var(--bg2); }
#editProfileStatus { flex:1; font-size:12px; color:var(--text3); line-height:1.4; }
#editProfileStatus.is-error { color:var(--red); }
#editProfileModal .modal-footer .btn { min-height:42px; border-radius:11px; padding:10px 17px; font-size:13px; white-space:nowrap; }
@media(max-width:600px) {
 #editProfileModal { padding:12px; }
 #editProfileModal .ep-dialog { max-height:calc(100dvh - 24px); border-radius:20px; }
 #editProfileModal .modal-header { padding:18px; }
 #editProfileModal .ep-content { padding:18px; scrollbar-gutter:auto; }
 #editProfileModal .modal-footer { padding:14px 18px; flex-wrap:wrap; }
 #editProfileStatus:not(:empty) { flex-basis:100%; }
 #editProfileModal .modal-footer .btn { flex:1; }
 .ep-field-grid { grid-template-columns:1fr; gap:7px; }
 #editProfileModal .edit-accent-grid { gap:6px; }
 .ep-identity-label { display:none; }
}

#editProfileModal .ep-public-section { padding-top:22px; margin-top:24px; border-top:1px solid var(--border2); }
.ep-social-row { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.ep-social-row input { min-width:0; }
.ep-social-remove { display:grid; place-items:center; flex:0 0 38px; width:38px; height:38px; border:0; border-radius:10px; background:var(--bg3); color:var(--text3); cursor:pointer; }
.ep-social-remove svg { width:17px; height:17px; }
#editSocialAdd { min-height:36px; padding:7px 12px; margin-top:4px; font-size:12px; }
#editSocialAdd:disabled { opacity:.45; cursor:default; }
.ep-category-preview { margin:9px 0 0; font-size:13px; color:var(--text2); }

/* Themes (Default / Nomad): two cards, each with a small preview. */
#editProfileModal .edit-theme-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:16px; }
#editProfileModal .edit-theme-option { display:flex; align-items:center; gap:12px; min-width:0; padding:10px; border-radius:14px; background:var(--bg2); border:1px solid var(--border2); color:var(--text); text-align:left; cursor:pointer; font:inherit; }
#editProfileModal .edit-theme-option:hover:not(:disabled) { background:var(--bg3); }
#editProfileModal .edit-theme-option:disabled { opacity:.55; cursor:default; }
#editProfileModal .edit-theme-option.is-selected { border-color:var(--accent-primary); background:var(--accent-soft); box-shadow:inset 0 0 0 1px var(--accent-primary); }
#editProfileModal .edit-theme-option:focus-visible { outline:2px solid var(--accent-primary); outline-offset:3px; }
.edit-theme-preview { flex:0 0 64px; height:48px; border-radius:10px; padding:6px; box-sizing:border-box; display:flex; flex-direction:column; gap:4px; box-shadow:inset 0 0 0 1px #0002; }
.edit-theme-preview i { display:block; height:8px; border-radius:4px; }
.edit-theme-preview i:first-child { width:60%; }
.edit-theme-preview i:last-child { width:80%; }
.edit-theme-preview.is-default { background:var(--bg3); }
.edit-theme-preview.is-default i { background:var(--accent-primary); opacity:.7; }
.edit-theme-preview.is-nomad { background:linear-gradient(135deg,#101413,#1b2220); }
.edit-theme-preview.is-nomad i { background:var(--accent-primary); }
.edit-theme-text { display:flex; flex-direction:column; gap:3px; min-width:0; }
.edit-theme-text strong { font-size:13px; font-weight:700; }
.edit-theme-text > span { font-size:11px; line-height:1.4; color:var(--text3); }
.edit-theme-check { color:var(--accent-primary); }
@media(max-width:600px) { #editProfileModal .edit-theme-grid { grid-template-columns:1fr; } }

/* The Nomad page's own words: only while the profile uses the Nomad theme. */
#editNomadSection[hidden] { display:none !important; }
