/* Personal editing inherits the approved D theme and existing form controls. */
.profile-editor {max-width:880px;margin-inline:auto;padding-bottom:32px;min-width:0}
.profile-editor-back {display:inline-flex;align-items:center;gap:8px;min-height:44px;margin-bottom:20px}
.profile-editor-back svg {width:16px;height:16px;transform:rotate(180deg)}
.profile-editor form,.profile-editor-media,.profile-media-field {min-width:0}
.profile-cover-stage {position:relative}
.profile-media-preview {display:flex;align-items:center;justify-content:center;overflow:hidden;background:var(--soft);color:var(--muted)}
.profile-media-preview img {width:100%;height:100%;display:block;object-fit:cover}
.profile-cover-preview {aspect-ratio:4/1;width:100%;border-radius:16px}
.profile-cover-preview>span {font-size:13px}
.profile-cover-tools {position:absolute;right:16px;top:16px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end;max-width:calc(100% - 32px)}
.profile-upload {position:relative;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;cursor:pointer;color:var(--ink);background:var(--surface);border:1px solid var(--control-border);border-radius:12px;font-size:13px}
.profile-upload:hover {background:var(--soft);color:var(--accent)}
.profile-upload:has(input:focus-visible) {outline:2px solid var(--primary);outline-offset:4px}
.profile-upload svg {width:16px;height:16px;flex:none}
.profile-cover-upload {padding:9px 14px}
.profile-cover-tools>button {min-height:44px;padding:9px 12px;border-radius:12px;background:var(--surface);color:var(--ink);font-size:13px}
.profile-cover-tools>button:hover {color:var(--accent)}
.profile-editor-identity {display:grid;grid-template-columns:132px minmax(0,1fr);gap:24px;padding:24px 24px 0;align-items:start}
.profile-media-avatar {position:relative;margin-top:-72px;text-align:center}
.profile-avatar-stage {position:relative;width:132px;height:132px}
.profile-avatar-preview {width:132px;height:132px;border:5px solid var(--canvas);border-radius:50%;font:600 42px/1 var(--body);background:var(--selected);color:var(--accent)}
.profile-avatar-stage>.profile-avatar-upload {position:absolute;inset:5px;min-height:0;padding:0;border:0;border-radius:50%;flex-direction:column;gap:8px;background:color-mix(in srgb,var(--canvas) 92%,transparent);color:var(--ink);opacity:0;transition:opacity 160ms ease}
.profile-avatar-stage:hover>.profile-avatar-upload,.profile-avatar-stage:focus-within>.profile-avatar-upload {opacity:1}
.profile-avatar-upload>svg {width:22px;height:22px}
.profile-avatar-upload>span {font-size:13px;font-weight:600}
.profile-media-avatar>button {min-height:44px;margin-top:4px;font-size:13px}
.profile-media-errors {padding-inline:24px}
.profile-media-errors>.field-error:empty,.profile-field-control>.field-error:empty {display:none}
.profile-media-errors>.field-error {margin-top:12px}
.profile-editor-section {margin-top:36px;padding-top:28px;border-top:1px solid var(--line)}
.profile-editor-section>h2 {display:flex;align-items:baseline;gap:12px;font:600 18px/1.6 var(--body);margin:0 0 8px}
.profile-edit-field {display:grid;grid-template-columns:136px minmax(0,1fr);gap:20px;align-items:start;min-width:0;margin-top:24px}
.profile-edit-field .form-label {display:flex;align-items:center;flex-wrap:wrap;gap:4px 8px;margin:0;min-height:48px;font-size:14px;line-height:1.6}
.profile-field-optional {font:400 12px/1.6 var(--body);color:var(--muted)}
.profile-field-control {min-width:0}
.profile-edit-field :is(input,textarea,select) {width:100%;max-width:100%}
.profile-edit-field textarea {resize:vertical;min-height:100px}
.profile-field-control>.field-error {margin-top:8px}
.profile-field-count {text-align:right;margin-top:6px;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.profile-editor-more {margin-top:28px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding-block:16px}
.profile-editor-more>summary {display:flex;align-items:center;gap:12px;min-height:44px;list-style:none;cursor:pointer;font-size:18px;font-weight:600}
.profile-editor-more>summary::-webkit-details-marker {display:none}
.profile-editor-more>summary>span {font-size:12px;font-weight:400;color:var(--muted)}
.profile-editor-more>summary>svg {width:16px;height:16px;margin-left:auto;transition:transform 160ms ease}
.profile-editor-more[open]>summary>svg {transform:rotate(180deg)}
.profile-fields-grid {display:grid;grid-template-columns:minmax(0,1fr)}
.profile-visibility-note {margin:16px 0 0 156px}
.profile-visibility-note a {color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.profile-experiences-section {padding-top:8px}
.profile-experience {min-width:0;margin:16px 0;padding:0 0 24px;border:0;border-bottom:1px solid var(--line)}
.profile-experience legend {float:left;font-size:14px;font-weight:600;padding-top:10px}
.profile-experience-remove {display:flex;justify-content:flex-end;min-height:44px}
.profile-experience-remove .text-link {display:inline-flex;align-items:center;gap:6px;min-height:44px;font-size:13px}
.profile-experience-remove svg {width:15px;height:15px}
.profile-experience .profile-fields-grid {clear:both}
.profile-experiences-section>[data-profile-add-experience] {display:inline-flex;align-items:center;gap:8px;min-height:44px}
.profile-experiences-section>[data-profile-add-experience] svg {width:16px;height:16px}
.profile-editor-actions {display:flex;align-items:center;gap:12px 16px;flex-wrap:wrap;margin:28px 0 0 156px}
.profile-editor-actions>.work-status {font-size:13px;color:var(--muted);margin:0}
.profile-crop-host:empty {display:none}
.profile-crop-panel {margin-top:24px;padding:20px;background:var(--soft);border-radius:12px}
.profile-crop-panel h3 {font:600 16px/1.6 var(--body);margin-bottom:16px}
.profile-crop-preview {max-width:100%;margin-inline:auto}
.profile-crop-preview.is-avatar {width:220px}
.profile-crop-preview canvas {display:block;width:100%;height:auto;background:var(--surface);border:1px solid var(--control-border);border-radius:8px}
.profile-crop-preview.is-avatar canvas {border-radius:50%}
.profile-crop-sliders {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 24px;margin-top:20px}
.profile-crop-sliders label {display:grid;align-content:start;gap:8px;font-size:13px;min-width:0}
.profile-crop-sliders input {min-width:0;width:100%;height:28px;accent-color:var(--primary)}
.profile-crop-actions {display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-block:16px 8px}
.profile-crop-actions>button {min-height:44px}
@media(max-width:700px){
  .profile-editor-back {margin-bottom:16px}
  .profile-cover-preview {border-radius:12px}
  .profile-cover-tools {right:10px;top:10px;gap:4px;max-width:calc(100% - 20px)}
  .profile-cover-upload,.profile-cover-tools>button {padding-inline:10px;font-size:12px}
  .profile-editor-identity {grid-template-columns:96px minmax(0,1fr);gap:16px;padding:20px 4px 0}
  .profile-media-avatar {margin-top:-52px}
  .profile-avatar-stage,.profile-avatar-preview {width:96px;height:96px}
  .profile-avatar-preview {border-width:4px;font-size:32px}
  .profile-media-errors {padding-inline:0}
  .profile-editor-section {margin-top:28px;padding-top:24px}
  .profile-edit-field {grid-template-columns:minmax(0,1fr);gap:8px;margin-top:20px}
  .profile-edit-field .form-label {min-height:0}
  .profile-visibility-note {margin-left:0}
  .profile-editor-actions {margin-left:0}
  .profile-crop-sliders {grid-template-columns:minmax(0,1fr);gap:10px}
  .profile-crop-sliders label {grid-template-columns:70px minmax(0,1fr);align-items:center}
  .profile-crop-panel {padding:16px}
  .profile-editor-actions>.work-status {flex-basis:100%}
}
@media(hover:none),(pointer:coarse){
  .profile-avatar-stage>.profile-avatar-upload {opacity:1;background:transparent;justify-content:flex-end;padding-bottom:10px;gap:0}
  .profile-avatar-upload>svg {display:none}
  .profile-avatar-upload>span {padding:3px 6px;border-radius:6px;background:var(--surface);font-size:12px}
}
@media(prefers-reduced-motion:reduce){.profile-editor-more>summary>svg,.profile-avatar-stage>.profile-avatar-upload {transition:none}}
