.sidebar-nav [data-personally-hidden]{display:none!important}
.sidebar .account-avatar img,.profile-photo img{width:100%;height:100%;object-fit:cover;display:block;border-radius:inherit}
.profile-dialog{font:13px/1.6 var(--app-font);color:var(--text);background:var(--card);border:1px solid var(--border-strong);border-radius:var(--radius);padding:0;width:min(700px,calc(100% - 32px));max-height:90dvh;overflow:auto;overscroll-behavior:contain;box-shadow:var(--shadow-lg)}
.profile-dialog::backdrop{background:#0009;backdrop-filter:blur(3px)}
.profile-dialog>header{display:flex;gap:20px;justify-content:space-between;align-items:start;padding:24px 28px;border-bottom:1px solid var(--border)}
.profile-dialog h2{font:550 23px/1.3 var(--app-font);letter-spacing:-.6px;margin:0}.profile-dialog h3{font:550 14px/1.5 var(--app-font);margin:0 0 5px}.profile-dialog p{color:var(--muted);margin:0 0 10px}
.profile-close{width:38px;height:38px;border:1px solid var(--border);border-radius:var(--radius);background:transparent;color:var(--muted);font-size:24px;cursor:pointer}
#profile-content{padding:0 28px}.profile-photo-row{display:flex;gap:22px;padding:26px 0;border-bottom:1px solid var(--border);align-items:center}.profile-photo{display:grid;place-items:center;flex:0 0 80px;width:80px;height:80px;overflow:hidden;border-radius:50%;font-size:24px;color:var(--primary);background:var(--primary-light);border:1px solid var(--border)}
.profile-photo-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center}.profile-file{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.profile-photo-actions:has(input:focus-visible)>label{outline:2px solid var(--primary);outline-offset:3px}
.profile-text-button{background:none;border:0;color:var(--primary);font:inherit;cursor:pointer;padding:7px 0;min-height:38px}.profile-text-button:disabled{opacity:.5;cursor:default}.profile-dialog .btn-flat{font-size:12px;line-height:1.5;min-height:38px;cursor:pointer}
.profile-navigation{padding:25px 0}.profile-section-heading{display:flex;align-items:start;gap:24px;margin-bottom:20px}.profile-section-heading>div{flex:1}.profile-section-heading>button{white-space:nowrap}.profile-navigation fieldset{border:0;padding:0;margin:20px 0}.profile-navigation legend{font-size:10px;color:var(--muted);letter-spacing:.08em;text-transform:uppercase;margin-bottom:6px}
.profile-menu-row{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:44px;padding:8px 0;border-bottom:1px solid var(--border);cursor:pointer;position:relative}.profile-menu-row>span:first-child{font-size:13px;color:var(--text)}.profile-menu-row input{position:absolute;right:0;opacity:0;width:36px;height:24px;cursor:pointer}.profile-check{width:34px;height:20px;border-radius:var(--radius-sm);background:var(--border-strong);padding:3px;flex-shrink:0;pointer-events:none}.profile-check:before{content:'';display:block;width:14px;height:14px;background:var(--card);border-radius:50%;transition:transform .15s}.profile-menu-row input:checked+.profile-check{background:var(--primary)}.profile-menu-row input:checked+.profile-check:before{transform:translateX(14px);background:#fff}.profile-menu-row input:focus-visible+.profile-check{outline:2px solid var(--primary);outline-offset:3px}
.profile-note{font-size:11px}.profile-dialog footer{position:sticky;bottom:0;background:var(--card);border-top:1px solid var(--border);padding:15px 0 20px}.profile-dialog footer>div{display:flex;justify-content:flex-end;gap:10px}.profile-dialog #profile-status{font-size:12px;min-height:20px;max-width:100%;overflow-wrap:anywhere}.profile-dialog .profile-saved{color:var(--primary)!important}
@media(max-width:768px){.profile-dialog{width:calc(100% - 16px)!important;max-height:calc(100dvh - 16px)!important}.profile-dialog>header{padding:20px 16px!important}#profile-content{padding-inline:16px!important}.profile-close,.profile-dialog .btn-flat,.profile-text-button{min-height:44px!important}.profile-close{min-width:44px!important}.profile-dialog h2{font-size:21px!important}.profile-section-heading{flex-wrap:wrap!important;gap:8px!important}.profile-photo-row{gap:16px!important}.profile-photo{flex-basis:64px!important;width:64px!important;height:64px!important}.profile-dialog footer>div{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr)!important}.profile-dialog footer .btn-flat{white-space:normal!important}.profile-photo-actions{gap:4px 12px!important}}
@media(prefers-reduced-motion:reduce){.profile-check:before{transition:none}}

body dialog.profile-dialog{margin:auto!important;inset:0!important;max-width:700px!important}
@media(max-width:768px){body dialog.profile-dialog{max-width:calc(100% - 16px)!important;margin:auto!important}}

.profile-dialog #profile-status.profile-error{color:var(--danger,#b42318)!important}

/* Keep photo controls visible before the optional navigation preferences. */
.profile-dialog .profile-image-status{margin:14px 0 0;font-size:12px;overflow-wrap:anywhere}
.profile-dialog .profile-image-status:empty{display:none}
.profile-dialog .profile-error{color:var(--danger,#b42318)}
.profile-image-editor{display:grid;grid-template-columns:minmax(0,260px) minmax(0,1fr);gap:24px;align-items:center;padding:22px 0;border-bottom:1px solid var(--border)}
.profile-image-editor[hidden]{display:none}
.profile-crop-view{position:relative;aspect-ratio:1;isolation:isolate;background:var(--bg);border-radius:var(--radius);overflow:hidden}
#profile-canvas{display:block;width:100%;height:100%;touch-action:none;cursor:grab;outline-offset:-3px}
#profile-canvas:focus-visible{outline:3px solid var(--primary)}
#profile-canvas.is-dragging{cursor:grabbing}
.profile-crop-mask{position:absolute;inset:0;border:1px solid #fff9;border-radius:50%;box-shadow:0 0 0 80px #0007;pointer-events:none}
.profile-crop-tools{min-width:0}.profile-crop-tools p{font-size:12px}
.profile-zoom-label{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;color:var(--text);margin:20px 0 6px}
.profile-zoom-label output{font-variant-numeric:tabular-nums;color:var(--muted)}
.profile-zoom-row{display:flex;align-items:center;gap:12px}
.profile-zoom-row button{flex:0 0 38px;width:38px;height:38px;border:1px solid var(--border);border-radius:var(--radius);font:20px/1 var(--app-font);background:var(--card);color:var(--text);cursor:pointer}
.profile-dialog .profile-zoom-row input{flex:1;min-width:0;width:100%;padding:0;height:38px;accent-color:var(--primary);cursor:pointer;background:transparent;border:0;box-shadow:none}
.profile-crop-actions{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin:16px 0}
.profile-navigation{padding:0}
.profile-navigation>summary{display:flex;justify-content:space-between;align-items:center;gap:16px;list-style:none;padding:22px 0;cursor:pointer}
.profile-navigation>summary::-webkit-details-marker{display:none}
.profile-navigation>summary h3{margin:0}.profile-navigation>summary span{font-size:11px;color:var(--muted)}
.profile-navigation>summary:after{content:'+';color:var(--primary);font-size:20px}
.profile-navigation[open]>summary:after{content:'−'}
.profile-navigation>summary span{margin-left:auto}.profile-navigation-content{padding-bottom:10px}
.profile-dialog footer{z-index:2}.profile-photo-actions{min-width:0}.profile-photo-row>div{min-width:0}
@media(max-width:768px){
 .profile-image-editor{grid-template-columns:minmax(0,1fr)!important;gap:16px!important;padding:18px 0!important}
 .profile-crop-view{width:min(100%,260px)!important;margin-inline:auto!important}
 .profile-crop-tools{width:100%!important}
 .profile-crop-tools h3{font-size:15px!important}
 .profile-zoom-row button{flex-basis:44px!important;width:44px!important;height:44px!important}
 .profile-dialog .profile-zoom-row input{height:44px!important}
 .profile-zoom-label{margin-top:14px!important}
 .profile-crop-actions{margin:12px 0!important;gap:16px!important}
 .profile-navigation>summary{padding:20px 0!important;min-height:44px!important}
 .profile-navigation>summary span{display:none!important}
 .profile-dialog footer{padding-bottom:max(16px,env(safe-area-inset-bottom))!important}
}
