.profile-edit{padding:36px 0 72px}
.profile-edit__form{max-width:1040px;margin:0 auto}
.profile-edit__form>.errorlist{margin-bottom:20px;color:#A23B2E}
.profile-edit__section{margin-bottom:24px;padding:28px;background:var(--paper);border:1px solid var(--paper-2);border-radius:var(--r);box-shadow:0 12px 32px rgba(11,57,57,.06)}
.profile-edit__section h2{margin-bottom:8px;font-family:var(--font-d);font-size:clamp(22px,3vw,30px);color:var(--ink);text-transform:uppercase}
.profile-edit__lead{max-width:75ch;margin-bottom:24px;color:var(--muted);line-height:1.6}
.profile-edit__grid{display:grid;grid-template-columns:1fr;gap:20px}
.profile-edit__field{display:flex;flex-direction:column;gap:8px;min-width:0}
.profile-edit__field>label{font-weight:700}
.profile-edit__field input,.profile-edit__field select,.profile-edit__field textarea{width:100%;padding:13px 14px;border:2px solid var(--paper-2);border-radius:10px;background:#fff;color:var(--text);font:inherit}
.profile-edit__field textarea{resize:vertical;line-height:1.55}
.profile-edit__field input:focus,.profile-edit__field select:focus,.profile-edit__field textarea:focus{border-color:var(--orange-d);outline:3px solid rgba(224,122,45,.2)}
.profile-edit__field input[type="file"]{padding:11px;font-size:16px}
.profile-edit__field input[type="file"]::file-selector-button{margin-right:12px;padding:9px 13px;border:0;border-radius:7px;background:var(--green-900);color:var(--cream);font:inherit;cursor:pointer}
.profile-edit__hint{margin:0;color:var(--muted);font-size:13px;line-height:1.5}
.profile-edit__field .errorlist,.profile-edit__remove+.errorlist{color:#A23B2E;font-size:13px}
.profile-edit__url{overflow-wrap:anywhere;margin-top:18px;padding:14px 16px;background:var(--paper-2);border-radius:10px;font-size:14px}
.avatar-editor{display:grid;grid-template-columns:1fr;gap:24px;align-items:start}
.avatar-editor__current{display:flex;flex-direction:column;align-items:center;gap:10px;color:var(--muted);font-size:13px}
.avatar-editor__current img{width:160px;height:160px;object-fit:cover;border:5px solid var(--paper-2);border-radius:50%}
.avatar-cropper{max-width:430px;margin-top:20px}
.avatar-cropper[hidden]{display:none}
.avatar-cropper canvas{display:block;width:100%;height:auto;aspect-ratio:1;border:6px solid var(--paper-2);border-radius:50%;box-shadow:0 8px 24px rgba(11,57,57,.14);cursor:grab;touch-action:none}
.avatar-cropper canvas:active{cursor:grabbing}
.avatar-cropper canvas:focus-visible{outline:4px solid var(--orange);outline-offset:3px}
.avatar-cropper__zoom{display:flex;align-items:center;gap:12px;margin-top:20px}
.avatar-cropper__zoom label{font-size:14px;font-weight:700}
.avatar-cropper__zoom input{flex:1;min-width:80px;accent-color:var(--orange-d)}
.avatar-cropper__zoom output{min-width:44px;font-size:13px;text-align:right}
.avatar-cropper__controls{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px;margin:16px 0 12px}
.avatar-cropper__nudges{display:flex;gap:6px}
.avatar-cropper__nudges button{width:38px;height:38px;border:1px solid var(--paper-2);border-radius:8px;background:var(--paper);color:var(--ink);font-size:20px;cursor:pointer}
.avatar-cropper__nudges button:hover{background:var(--paper-2)}
.avatar-cropper__controls .btn{padding:9px 13px;font-size:13px}
.profile-edit__remove{display:flex;align-items:flex-start;gap:9px;margin-top:20px}
.profile-edit__remove input{flex-shrink:0;width:18px;height:18px;margin-top:3px;accent-color:var(--orange-d)}
.profile-edit__remove label{font-size:14px;line-height:1.5}
.profile-edit__actions{display:flex;flex-wrap:wrap;align-items:center;gap:14px;margin-top:28px}
.social-links{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}
.social-link{display:inline-flex;align-items:center;gap:9px;padding:7px 14px 7px 7px;border-radius:999px;background:var(--paper);color:var(--ink);font-size:14px;font-weight:700;transition:background .15s,color .15s}
.social-link:hover{background:var(--orange);color:#22120B}
.social-link__icon{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--green-900);color:var(--cream);font-size:10px;font-weight:800;letter-spacing:.03em}
.profile-hero__actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}
.profile-hero__messages{margin-bottom:18px}
.profile-hero__messages .auth-messages{max-width:900px;margin:0}
.profile-hero__messages .site-message__content p{max-width:none;margin-top:3px;color:var(--cream)}
@media (min-width:700px){
  .profile-edit__grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .profile-edit__field--wide{grid-column:1/-1}
  .avatar-editor{grid-template-columns:180px minmax(0,1fr)}
}
@media (max-width:600px){
  .profile-edit{padding-top:24px}
  .profile-edit__section{padding:20px}
  .profile-edit__actions{align-items:stretch;flex-direction:column}
  .profile-edit__actions .btn{text-align:center}
}
html[data-theme="dark"] .profile-edit__section{background:#15261F;border-color:#2C453B}
html[data-theme="dark"] .profile-edit__section h2,html[data-theme="dark"] .social-link{color:var(--cream)}
html[data-theme="dark"] .profile-edit__field input,html[data-theme="dark"] .profile-edit__field select,html[data-theme="dark"] .profile-edit__field textarea{background:#0F1B17;border-color:#2C453B;color:var(--text)}
html[data-theme="dark"] .profile-edit__url{background:#22382F}
html[data-theme="dark"] .social-link{background:#22382F}
html[data-theme="dark"] .social-link:hover{background:var(--orange);color:#22120B}
html[data-theme="dark"] .avatar-cropper__nudges button{background:#22382F;border-color:#2C453B;color:var(--cream)}

.profile-edit__errors{scroll-margin-top:100px;margin-bottom:24px;padding:18px 20px;border:2px solid #C65D35;border-left-width:6px;border-radius:var(--r);background:#FFF1E6;box-shadow:0 12px 28px rgba(140,58,31,.14);color:#6D2718}
.profile-edit__errors:focus{outline:3px solid rgba(198,93,53,.25)}
.profile-edit__errors-heading{display:flex;align-items:flex-start;gap:12px}
.profile-edit__errors-heading>span{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:10px;background:#C65D35;color:#fff;font-family:var(--font-d);font-size:20px}
.profile-edit__errors-heading strong{font-family:var(--font-d);font-size:18px;line-height:1.35;color:#8A2D1D}
.profile-edit__errors-heading p{margin-top:4px;font-size:14px;line-height:1.5}
.profile-edit__error-list{display:grid;gap:8px;margin-top:16px;list-style:none}
.profile-edit__error-list li{display:flex;flex-direction:column;gap:3px;padding:10px 12px;border:1px solid rgba(198,93,53,.28);border-radius:10px;background:rgba(255,255,255,.65);font-size:14px;line-height:1.5}
.profile-edit__error-list a{align-self:flex-start;color:#8A2D1D;text-decoration:underline;text-underline-offset:3px}
.profile-edit__error-list a:hover{color:#C65D35}
.profile-edit__error-list strong{font-weight:800}
.profile-edit__errors-photo{margin-top:14px;padding-top:12px;border-top:1px solid rgba(198,93,53,.3);font-size:14px;line-height:1.5}
.profile-edit__field,.profile-edit__remove{scroll-margin-top:110px}
.profile-edit__field:has(.errorlist) input,.profile-edit__field:has(.errorlist) select,.profile-edit__field:has(.errorlist) textarea{border-color:#A23B2E}
.profile-edit__field .errorlist{margin:0;padding-left:20px;line-height:1.5}
.region-picker{position:relative}
.region-picker__control{position:relative}
.region-picker__control input{padding-right:52px;cursor:text}
.region-picker__toggle{position:absolute;top:50%;right:7px;display:grid;place-items:center;width:38px;height:38px;border:0;border-radius:8px;background:transparent;transform:translateY(-50%);cursor:pointer}
.region-picker__toggle:hover{background:var(--paper-2)}
.region-picker__toggle span{display:block;width:9px;height:9px;margin-top:-5px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);transition:transform .15s}
.region-picker.is-open .region-picker__toggle span{margin-top:5px;transform:rotate(225deg)}
.region-picker__dropdown{position:absolute;z-index:80;top:calc(100% + 8px);right:0;left:0;overflow:hidden;border:1px solid var(--paper-2);border-radius:14px;background:#fff;box-shadow:0 18px 45px rgba(11,57,57,.18)}
.region-picker__dropdown[hidden]{display:none}
.region-picker__options{max-height:294px;overflow-y:auto;overscroll-behavior:contain;margin:0;padding:7px;list-style:none}
.region-picker__option{display:flex;flex-direction:column;gap:4px;width:100%;padding:12px 14px;border:0;border-radius:9px;background:transparent;color:var(--text);font:inherit;text-align:left;cursor:pointer}
.region-picker__option strong{font-size:15px;line-height:1.35}
.region-picker__option small{color:var(--muted);font-size:12px;line-height:1.4}
.region-picker__option:hover,.region-picker__option.is-active{background:var(--paper-2)}
.region-picker__option[aria-selected="true"]{box-shadow:inset 3px 0 var(--orange-d)}
.region-picker__option[aria-selected="true"] strong{color:var(--orange-d)}
.region-picker__empty{margin:0;padding:20px;color:var(--muted);font-size:14px;line-height:1.5}
html[data-theme="dark"] .profile-edit__errors{background:#3B281F;border-color:#D97E4A;color:#F5D8C7}
html[data-theme="dark"] .profile-edit__errors-heading strong,html[data-theme="dark"] .profile-edit__error-list a{color:#F1B18A}
html[data-theme="dark"] .profile-edit__errors-heading>span{background:#D97E4A;color:#22120B}
html[data-theme="dark"] .profile-edit__error-list li{background:#2B211B;border-color:#9B5836}
html[data-theme="dark"] .profile-edit__errors-photo{border-color:#9B5836}
html[data-theme="dark"] .region-picker__dropdown{background:#15261F;border-color:#2C453B}
html[data-theme="dark"] .region-picker__toggle:hover,html[data-theme="dark"] .region-picker__option:hover,html[data-theme="dark"] .region-picker__option.is-active{background:#22382F}
html[data-theme="dark"] .region-picker__option[aria-selected="true"] strong{color:var(--orange)}

.profile-edit__form{max-width:none}
.profile-edit__layout{display:grid;grid-template-columns:1fr;gap:24px;align-items:start}
.profile-edit__column{display:grid;align-content:start;gap:24px;min-width:0}
.profile-edit__column .profile-edit__section{margin-bottom:0;padding:24px}
.profile-edit__section h2{font-size:clamp(20px,2vw,26px)}
.profile-edit__lead{margin-bottom:18px}
.profile-edit__grid{gap:16px}
.profile-edit__field input,.profile-edit__field select,.profile-edit__field textarea{padding:11px 12px}
.avatar-editor__current img{width:96px;height:96px;border-width:4px}
.avatar-cropper{max-width:340px;margin:16px auto 0}
.profile-edit__url{margin-top:14px;padding:12px 14px}
.profile-edit__username-status{min-height:20px;margin:9px 0 0;font-size:13px;font-weight:600;line-height:1.5}
.profile-edit__username-status[data-state="available"]{color:#23734A}
.profile-edit__username-status[data-state="unavailable"]{color:#A23B2E}
.profile-edit__username-status[data-state="checking"]{color:var(--orange-d)}
.profile-edit__username-status[data-state="neutral"]{color:var(--muted)}
.profile-edit__field input[aria-invalid="true"]{border-color:#A23B2E}
@media (min-width:700px){
  .avatar-editor{grid-template-columns:96px minmax(0,1fr)}
}
@media (max-width:699px){
  .avatar-editor__current{flex-direction:row;justify-content:flex-start}
}
@media (min-width:1100px){
  .profile-edit__layout{grid-template-columns:minmax(0,1.2fr) minmax(340px,.8fr)}
  .profile-edit__column--aside .profile-edit__grid{grid-template-columns:1fr}
}
html[data-theme="dark"] .profile-edit__username-status[data-state="available"]{color:#75C89A}

.profile-edit__verification{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px 20px;margin:24px 0;padding:18px 20px;border-left:4px solid var(--orange-d);border-radius:12px;background:var(--paper-2)}
.profile-edit__verification>div{min-width:0}
.profile-edit__verification strong{color:var(--ink)}
.profile-edit__verification p{margin-top:4px;color:var(--muted);font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.profile-edit__verification form{flex-shrink:0}
.profile-edit__verification--confirmed{border-left-color:#39834D}
.verification-panel{max-width:720px;margin:0 auto}
.verification-panel h2{font-family:var(--font-d);font-size:clamp(26px,4vw,38px);line-height:1.2;color:var(--ink);text-transform:uppercase}
.verification-panel__lead{margin-top:16px;color:var(--muted);font-size:15px;line-height:1.65;overflow-wrap:anywhere}
.verification-panel .auth-form{margin-top:24px}
html[data-theme="dark"] .profile-edit__verification{background:#22382F}
html[data-theme="dark"] .profile-edit__verification strong{color:var(--cream)}
@media (max-width:600px){
  .profile-edit__verification{align-items:flex-start;flex-direction:column}
}

.account-links__list{display:grid;gap:10px;margin:0 0 20px;padding:0;list-style:none}
.account-links__list li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-radius:10px;background:var(--paper-2)}
.account-links__provider{font-weight:700}
.account-links__status{color:#39834D;font-size:13px;font-weight:700}
.merge-panel{max-width:900px;margin:0 auto}
.merge-account-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:24px 0}
.merge-account-grid article{min-width:0;padding:18px;border:1px solid var(--paper-2);border-radius:12px;background:var(--paper)}
.merge-account-grid article>span{display:block;margin-bottom:8px;color:var(--orange-d);font-size:12px;font-weight:800;text-transform:uppercase}
.merge-account-grid strong{font-size:19px;overflow-wrap:anywhere}
.merge-account-grid p{margin-top:8px;color:var(--muted);font-size:14px;line-height:1.55}
.merge-account-warning{margin:20px 0;padding:16px 18px;border-left:4px solid var(--orange);border-radius:10px;background:#FFF3E7;color:#71351C}
.merge-account-warning p{margin-top:6px;font-size:14px;line-height:1.55}
.merge-account-confirm{display:flex;align-items:flex-start;gap:10px;margin-bottom:16px}
.merge-account-confirm input{flex-shrink:0;width:18px;height:18px;margin-top:4px}
.merge-account-confirm label{font-weight:700;line-height:1.5}
html[data-theme="dark"] .merge-account-grid article{background:#15261F;border-color:#2C453B}
html[data-theme="dark"] .merge-account-warning{background:#3B281F;color:#F5D8C7}
@media (max-width:700px){
  .merge-account-grid{grid-template-columns:1fr}
}

.profile-edit__delete{margin-left:auto;color:#A23B2E;font-weight:700;text-decoration:underline;text-underline-offset:4px}
.profile-edit__delete:hover{color:#7F2B22}
html[data-theme="dark"] .profile-edit__delete{color:#F1B18A}
@media (max-width:600px){
  .profile-edit__delete{margin-left:0;text-align:center}
}
