/* A profile photo stays a circle everywhere it appears. */
html body .avatar.has-photo{overflow:hidden;padding:0;position:relative;flex-shrink:0;aspect-ratio:1}
.profile-avatar-photo{display:block;width:100%;height:100%;object-fit:cover;border-radius:50%}
.profile-editor{--profile-paper:#faf9f2;--profile-ink:#294634;--profile-muted:#576c52;--profile-line:#d0dcc7;--profile-field:#fffef8;max-width:760px!important;width:min(760px,calc(100vw - 32px))!important;padding:34px!important}
html[data-theme="dark"] .profile-editor{--profile-paper:#263c30;--profile-ink:#edece0;--profile-muted:#b1c1ac;--profile-line:#4a6350;--profile-field:#21382b}
.profile-editor h2{font-size:38px;line-height:1.12;color:var(--profile-ink);margin:12px 35px 14px 0}
.profile-editor .tinycaps{color:var(--profile-muted);font-size:10px}
.profile-editor-intro,.profile-editor-local,.profile-editor p{font-size:12px;line-height:1.8;color:var(--profile-muted)}
.profile-editor-identity{display:flex;align-items:center;gap:22px;margin:28px 0;padding:22px;border:1px solid var(--profile-line);background:var(--profile-paper);border-radius:15px}
.profile-editor-identity>div:first-child{flex-shrink:0}
.profile-editor-identity .avatar{width:90px!important;height:90px!important;min-width:90px;font-size:27px}
.profile-editor-identity>div:last-child{min-width:0}
.profile-editor-identity small,.profile-photo-crop>small,.profile-main-fields>small{display:block;font-size:10px;line-height:1.7;color:var(--profile-muted);margin-top:10px}
.profile-photo-upload{position:relative;overflow:hidden;min-height:44px;cursor:pointer}
.profile-photo-upload input{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}
.profile-photo-upload:focus-within{outline:3px solid var(--profile-ink);outline-offset:3px}
.profile-photo-tools{display:flex;gap:18px;margin-top:9px;flex-wrap:wrap}
.profile-photo-tools button{font-size:11px;min-height:36px}
.profile-main-fields{display:grid;gap:18px;margin-top:25px}
.profile-main-fields label,.profile-link-editor>label{display:block;font-size:12px;font-weight:650;color:var(--profile-ink)}
.profile-main-fields :is(input,textarea),.profile-link-editor input:not([type="checkbox"]){display:block;width:100%;min-width:0;padding:12px 13px;border:1px solid var(--profile-line);border-radius:10px;background:var(--profile-field);color:var(--profile-ink);font:13px/1.6 var(--sans,system-ui,sans-serif);margin-top:8px}
.profile-main-fields textarea{min-height:100px;resize:vertical}
.profile-link-settings{border-block:1px solid var(--profile-line);margin:28px 0;padding:8px 0}
.profile-link-settings summary{display:flex;align-items:center;justify-content:space-between;min-height:48px;font-size:13px;font-weight:750;color:var(--profile-ink);cursor:pointer;gap:12px}
.profile-link-settings>p{margin:6px 0 18px}
.profile-link-editor{border:1px solid var(--profile-line);border-radius:12px;padding:18px;margin:20px 0;display:grid;gap:14px;min-width:0}
.profile-link-editor legend{font-size:11px;padding:0 7px;color:var(--profile-muted)}
.profile-link-editor .profile-affiliate-choice{display:flex;align-items:flex-start;gap:9px;font-size:11px;font-weight:450;line-height:1.6;cursor:pointer}
.profile-affiliate-choice input{margin:2px 0 0;flex-shrink:0;width:17px;height:17px;accent-color:#719465}
.profile-editor-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}
.profile-editor-actions .btn{min-height:48px}
.profile-editor .profile-editor-error{padding:13px 16px;border:1px solid var(--profile-line);border-left:4px solid #c3926c;border-radius:9px;font-size:12px;color:var(--profile-ink);margin:20px 0}
.profile-editor-status{font-size:12px;color:var(--profile-muted)}
.profile-photo-crop{padding:22px;border:1px solid var(--profile-line);background:var(--profile-paper);border-radius:15px}
.profile-photo-crop h3{font-size:27px;margin:0 0 20px;color:var(--profile-ink)}
.profile-crop-frame{width:min(100%,260px);aspect-ratio:1;margin:0 auto 24px;border-radius:50%;overflow:hidden;border:4px solid var(--profile-line);background:#fff}
.profile-crop-frame canvas{width:100%;height:100%;display:block}
.profile-crop-controls{display:grid;gap:17px}
.profile-crop-controls label{font-size:12px;font-weight:600;color:var(--profile-ink)}
.profile-crop-controls output{float:right;color:var(--profile-muted);font-size:11px}
.profile-crop-controls input{display:block;width:100%;margin:12px 0 0;accent-color:#719465;min-height:30px}
.profile-crop-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-top:22px}
.profile-crop-actions .btn{min-height:44px}
.profile-editor :is(input,textarea,button,summary):focus-visible{outline:3px solid var(--profile-ink);outline-offset:3px}
.profile-links{margin:25px 0 0;padding:24px 0 0;border-top:1px solid var(--theme-line,#d0dcc7)}
.profile-links h2{font-size:27px;margin:0 0 17px;color:var(--ink,#294634)}
.profile-links>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.profile-links a{display:flex;flex-direction:column;gap:8px;padding:15px 17px;border:1px solid var(--theme-line,#d0dcc7);border-radius:11px;text-decoration:none;background:var(--theme-surface,#faf9f2);overflow-wrap:anywhere;min-width:0}
.profile-links a>span{font-size:12px;font-weight:700;color:var(--ink,#294634)}
.profile-links a>small{font-size:10px;line-height:1.6;color:var(--theme-muted,#576c52)}
.profile-links a:hover{border-color:var(--highlight-edge,#b98964);background:var(--theme-subtle,#eef1e6)}
.profile-links>p{font-size:10px;line-height:1.7;margin:15px 0 0;color:var(--theme-muted,#576c52)}
@media(max-width:620px){.profile-editor{padding:26px 22px!important}.profile-editor h2{font-size:32px}.profile-editor-identity{gap:16px;padding:17px;align-items:flex-start}.profile-editor-identity .avatar{width:70px!important;height:70px!important;min-width:70px;font-size:22px}.profile-photo-tools{gap:8px 16px}.profile-photo-upload{font-size:11px;padding:10px}.profile-editor-actions .btn{flex:1;justify-content:center}.profile-photo-crop{padding:18px}.profile-crop-actions .btn{flex:1;justify-content:center;min-width:0;white-space:normal}.profile-links>div{grid-template-columns:1fr}}
@media(max-width:360px){.profile-editor-identity{flex-direction:column}.profile-link-editor{padding:14px}}

.profile-editor-fields{border:0;padding:0;margin:0;min-width:0}.profile-editor-fields:disabled{opacity:.8}.profile-editor-fields:disabled :is(input,textarea,button){cursor:wait}
