body.profile-open{overflow:hidden}
#work-dialog.profile-dialog{width:min(1120px,calc(100vw - 40px));max-width:1120px;height:min(900px,calc(100dvh - 42px));max-height:calc(100dvh - 42px);padding:0;overflow:hidden;display:flex;flex-direction:column;border:1px solid #c7b698;border-radius:24px;background:#f3ebdd;color:#352f28;box-shadow:0 30px 80px #14212c67,0 2px 12px #564b3a22}
#work-dialog.profile-dialog:not([open]){display:none}
.profile-discard[hidden]{display:none}
#work-dialog.profile-dialog::backdrop{background:#1d2a3480;backdrop-filter:blur(7px)}
#work-dialog.profile-dialog>.dialog-head{flex:none;min-height:0;padding:13px 32px 0;background:#f3ebdd}
#work-dialog.profile-dialog>.dialog-head h2{font-size:1.18rem;margin:0;color:#4a3d2d}
#work-dialog.profile-dialog>.dialog-head .close{top:8px;right:16px;z-index:3;width:40px;height:40px;border:1px solid #c8b899;border-radius:12px;background:#faf6ef;color:#45392a;box-shadow:0 2px 7px #584d3824}
#work-dialog.profile-dialog #work-content{display:flex;flex:1;min-height:0;padding:0;overflow:hidden}
.profile-shell{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;position:relative}
.profile-fixed{flex:none;background:linear-gradient(160deg,#f7f1e7,#ece1ce);border-bottom:1px solid #cdbda4;box-shadow:0 5px 14px #5c4b3515;z-index:1}
.profile-nav{display:flex;gap:6px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scroll-snap-type:x proximity;padding:9px 32px 6px 24px;white-space:nowrap;touch-action:pan-x}
.profile-nav button{display:inline-flex;align-items:center;gap:7px;flex:none;scroll-snap-align:center;border:1px solid transparent;border-radius:11px;padding:8px 12px;background:transparent;color:#625340;font-size:.88rem;font-weight:650}
.profile-nav button:hover{background:#e8dac4}.profile-nav button[aria-current=true]{background:#e0e9e4;border-color:#97b9ad;color:#145d56;box-shadow:0 2px 7px #2b726d18}
.profile-nav svg,.profile-section summary svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.profile-hero{display:flex;justify-content:center;gap:24px;align-items:center;padding:4px 32px 10px}
.profile-avatar-block{text-align:center;font-size:.75rem;color:#756855}.profile-avatar-block small{display:block;margin-top:4px}
.profile-avatar-picker{position:relative;display:grid;place-items:center;width:98px;height:98px;margin:auto;border:3px solid #faf8f3;border-radius:50%;overflow:hidden;background:linear-gradient(145deg,#c5d7d3,#92aca8);box-shadow:0 4px 14px #273a3a35;cursor:pointer}
.profile-avatar-picker img{width:100%;height:100%;object-fit:cover}.profile-avatar-initials{font-size:1.75rem;font-weight:750;color:#124b48}
.profile-camera{position:absolute;bottom:3px;right:3px;display:grid;place-items:center;width:27px;height:27px;border:2px solid #fff;border-radius:50%;background:#17665e;color:white;font-size:16px}
.profile-site-emblem{width:126px;height:118px;object-fit:contain;filter:drop-shadow(0 4px 7px #66503245)}
.profile-identity{min-width:0;max-width:360px}.profile-visibility{display:inline-block;padding:4px 8px;border-radius:9px;background:#e0ede7;color:#246158;font-size:.71rem;font-weight:750;letter-spacing:.02em}
.profile-visibility{border:1px solid #9cbdb1;cursor:pointer;text-align:left}.profile-visibility:hover,.profile-visibility[aria-expanded=true]{background:#cce5d9}.profile-visibility:focus-visible{outline:2px solid #176c65;outline-offset:2px}
.profile-card-preview[hidden]{display:none}.profile-card-preview{margin:0 0 14px;padding:17px;border:1px solid #b5cbbd;border-radius:15px;background:linear-gradient(140deg,#fffdf6,#edf3e9);box-shadow:0 3px 12px #465b4515}.profile-card-caption{margin:0 0 12px;color:#456456;font-size:.78rem;font-weight:700}.profile-card-surface{display:flex;align-items:center;gap:17px}.profile-card-initials{display:grid;place-items:center;flex:none;width:68px;height:68px;border:2px solid #fff;border-radius:50%;background:#d5e4de;color:#17584f;font-size:1.25rem;font-weight:800;box-shadow:0 2px 8px #24473425}.profile-card-surface h3{margin:0 0 5px;color:#252f28;font-size:1.25rem}.profile-card-surface p{margin:0 0 8px;color:#4e5b52;font-size:.83rem}.profile-card-private{margin:12px 0 0;color:#66645a;font-size:.76rem;line-height:1.45}
.profile-identity h3{font-size:clamp(1.35rem,2.4vw,2rem);line-height:1.1;margin:7px 0 4px;overflow-wrap:anywhere;color:#2e2b28}.profile-identity p{margin:0 0 7px;color:#645746;font-size:.87rem}.profile-role{display:inline-block;padding:5px 10px;border:1px solid #bacac5;border-radius:99px;background:#edf5f1;color:#1a5951;font-size:.8rem;font-weight:700}
.profile-head-actions{display:flex;align-items:center;justify-content:center;gap:10px;min-height:50px;padding:0 24px 12px}.profile-head-actions button{padding:9px 15px;border-radius:10px;border:1px solid #b9a889;background:#fbf6ec;color:#51402c;font-weight:700}.profile-head-actions .primary{background:#176c65;border-color:#176c65;color:#fff;min-width:220px}.profile-head-actions .primary:disabled{background:#c6c3bc;border-color:#c6c3bc;color:#5f5c58;cursor:default;box-shadow:none}.profile-head-actions [role=status]{font-size:.8rem;color:#1b6658;max-width:260px}
.profile-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:18px 30px 30px;background:#f6f1e9;scroll-behavior:smooth}
.profile-section{margin:0 0 12px;border:1px solid #dccdb7;border-radius:15px;background:#fffaf2;box-shadow:0 2px 7px #65533c0c;overflow:hidden}.profile-section[open]{border-color:#c6b49b}
.profile-section summary{display:flex;align-items:center;gap:10px;list-style:none;cursor:pointer;padding:15px 18px;color:#3b372f}.profile-section summary::-webkit-details-marker{display:none}.profile-section summary strong{flex:1;font-size:.98rem}.profile-section summary svg{color:#1b6c65}.profile-chevron{font-size:1.2rem;color:#756754;transition:transform .18s}.profile-section[open] .profile-chevron{transform:rotate(180deg)}
.profile-section-content{padding:0 18px 19px}.profile-private-note{font-size:.82rem;color:#766a5d;margin:0 0 12px}.profile-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 18px}.profile-fields label{display:block;min-width:0;font-size:.84rem;font-weight:700;color:#463c30}.profile-fields label>small{display:block;margin:3px 0 5px;font-size:.7rem;font-weight:500;color:#77695b}.profile-fields input,.profile-fields select{width:100%;min-height:42px;padding:8px 11px;border:1px solid #c9b9a1;border-radius:10px;background:#fffefa;color:#2e2d2b;font:inherit}.profile-fields input:focus,.profile-fields select:focus{outline:2px solid #3b8a82;outline-offset:1px}.profile-fields input[readonly]{background:#eee9e0;color:#625d55}.profile-fields #nickname-suggestions{font-weight:500;color:#776a5c}
.profile-inline-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:13px}.profile-inline-actions button,.profile-section-content>button,.profile-signout{padding:9px 12px;border:1px solid #bba88d;border-radius:9px;background:#f5ebda;color:#4e3f2c;font-weight:650}.profile-policy{margin-top:12px;padding:12px;border-left:3px solid #4c8177;border-radius:8px;background:#edf4ee;color:#37453e;line-height:1.5;font-size:.84rem}
.profile-candidate-label{display:block;margin-top:14px;max-width:430px;font-size:.82rem;font-weight:700;color:#514431}.profile-candidate-label input{display:block;width:100%;margin-top:5px;min-height:40px;padding:8px 10px;border:1px solid #c9b9a1;border-radius:9px;background:#fffefa;color:#2e2d2b;font:inherit}
.profile-action-list{display:grid;gap:8px}.profile-action-list button{display:flex;justify-content:space-between;text-align:left;padding:11px 12px;border:1px solid #d5c5af;border-radius:9px;background:#f9f4ec;color:#41382f}.profile-action-list p{margin:6px 0 0;font-size:.8rem}.profile-permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 18px}.profile-permission-grid p{margin:0;padding:10px;border-radius:9px;background:#f4eee4;overflow-wrap:anywhere}.profile-permission-grid small,.profile-permission-grid strong{display:block}.profile-permission-grid small{font-size:.71rem;color:#756957}.profile-permission-grid strong{font-size:.85rem;margin-top:4px}
.profile-stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:10px}.profile-stat{padding:15px;border:1px solid #d9d2c4;border-radius:12px;background:#f7f9f6}.profile-stat strong{display:block;color:#1d635e;font-size:1.6rem}.profile-stat span{font-size:.76rem;color:#5d625c}.profile-stats-dates{line-height:1.6;font-size:.82rem;color:#625849}.profile-signout{margin:8px 0}
.profile-discard{position:absolute;inset:0;z-index:10;display:grid;place-items:center;padding:20px;background:#1929329c;backdrop-filter:blur(3px)}.profile-discard>div{width:min(480px,100%);padding:24px;border-radius:16px;background:#fffaf1;box-shadow:0 15px 50px #14212b70}.profile-discard h3{font-size:1.1rem;margin:0 0 17px}.profile-discard button{margin:4px 8px 0 0;padding:9px 12px;border:1px solid #b9a78b;border-radius:8px;background:#f3e8d7;color:#493928}
@media(max-width:700px){#work-dialog.profile-dialog{width:calc(100vw - 12px);max-width:none;height:calc(100dvh - 12px);max-height:calc(100dvh - 12px);border-radius:16px}#work-dialog.profile-dialog>.dialog-head{padding:10px 14px 0}#work-dialog.profile-dialog>.dialog-head .close{top:6px;right:10px;width:38px;height:38px}.profile-nav{padding:5px 12px;gap:3px}.profile-nav button{padding:7px 9px;font-size:.76rem}.profile-nav svg{width:15px;height:15px}.profile-hero{display:grid;grid-template-columns:67px 70px minmax(0,1fr);gap:7px;padding:2px 12px 7px}.profile-avatar-picker{width:62px;height:62px}.profile-avatar-initials{font-size:1.15rem}.profile-camera{width:21px;height:21px;font-size:12px}.profile-avatar-block small{display:none}.profile-site-emblem{width:70px;height:68px}.profile-visibility{font-size:.59rem;padding:2px 5px}.profile-identity h3{font-size:1.07rem;margin:3px 0}.profile-identity p{font-size:.7rem;margin-bottom:3px}.profile-role{font-size:.65rem;padding:3px 6px}.profile-head-actions{padding:0 10px 8px;min-height:40px;gap:6px;flex-wrap:wrap}.profile-head-actions button{font-size:.74rem;padding:7px 9px}.profile-head-actions .primary{min-width:0}.profile-head-actions [role=status]{width:100%;text-align:center}.profile-scroll{padding:10px 10px calc(14px + env(safe-area-inset-bottom))}.profile-section summary{padding:12px}.profile-section-content{padding:0 12px 14px}.profile-fields,.profile-permission-grid{grid-template-columns:1fr}.profile-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.profile-stat{padding:10px}.profile-stat strong{font-size:1.25rem}}
@media(max-width:700px){.profile-card-preview{padding:12px}.profile-card-surface{gap:10px}.profile-card-initials{width:52px;height:52px;font-size:1rem}.profile-card-surface h3{font-size:1.05rem}}
.profile-account-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.profile-delete{padding:9px 12px;border:1px solid #a85b58;border-radius:9px;background:#fff0ed;color:#9b3030;font-weight:700;cursor:pointer}.profile-delete-confirm[hidden]{display:none}.profile-delete-confirm{margin:12px 0;padding:18px;border:1px solid #be7770;border-radius:13px;background:#fff5f1;color:#563b38}.profile-delete-confirm h3{margin:0 0 8px}.profile-delete-confirm p{font-size:.85rem;line-height:1.5}.profile-delete-confirm label{display:block;font-weight:700;font-size:.85rem}.profile-delete-confirm input{display:block;width:min(360px,100%);margin:6px 0 12px;padding:10px;border:1px solid #ad847b;border-radius:8px;background:#fff;color:#282421}.profile-delete-confirm button{padding:9px 13px;margin:0 8px 0 0;border:1px solid #a78d78;border-radius:8px;background:#eee1d1;color:#453a32}.profile-delete-confirm #profile-delete-submit{background:#a33434;border-color:#a33434;color:white}.profile-delete-confirm #profile-delete-error{color:#9a2424}
[data-theme=dark] .profile-delete,.dark .profile-delete{background:#512f38;border-color:#b6757b;color:#ffd9d7}[data-theme=dark] .profile-delete-confirm,.dark .profile-delete-confirm{background:#352d34;border-color:#9e6972;color:#f3dfe0}[data-theme=dark] .profile-delete-confirm input,.dark .profile-delete-confirm input{background:#26313b;color:#f5f1eb;border-color:#8e7371}
.profile-personal-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.profile-fields.profile-personal-column{display:flex;flex-direction:column;align-items:stretch;min-width:0}
.profile-personal-column h3{font-size:1rem;margin:0 0 2px}
.profile-personal-column button{align-self:flex-start}
.profile-fields [hidden]{display:none}
@media(max-width:700px){.profile-personal-columns{grid-template-columns:1fr;gap:20px}}
.profile-memberships{margin-top:20px;padding-top:14px;border-top:1px solid var(--line,#cdbda4)}
.profile-memberships h3,.profile-security-events h3{margin:0 0 10px}
.profile-security-events{margin-top:10px}
#profile-password-panel{padding:12px;border:1px solid var(--line,#cdbda4);border-radius:10px;background:var(--raised,#faf6ef)}
.profile-head-actions{position:relative}
.profile-head-stats summary{display:flex;align-items:center;gap:6px;padding:8px 10px;border:1px solid var(--line,#cdbda4);border-radius:9px;background:var(--raised,#faf6ef);cursor:pointer;font-size:.84rem}
.profile-head-stats summary svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8}
.profile-head-stats summary::after{content:'▾'}
.profile-head-stats[open] summary::after{content:'▴'}
#profile-stat-content{position:absolute;inset:100% 16px auto auto;z-index:2;width:min(460px,calc(100% - 32px));max-height:48dvh;overflow:auto;padding:14px;border:1px solid var(--line,#cdbda4);border-radius:10px;background:var(--surface,#f7f1e7);box-shadow:0 8px 24px #192d3940}
