/* Profile styles are intentionally self-contained: readable text, compact spacing. */
.overlay.profile-overlay{background:rgba(19,27,34,.42);backdrop-filter:blur(6px)}
.modal.profile-dialog{width:560px;max-width:100%;max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#bac3c0 transparent;border:1px solid #e2e7e4;border-radius:18px;background:#fff;box-shadow:0 24px 80px #101e292b;color:#26332d}
.profile-dialog *{box-sizing:border-box}.profile-dialog .modal-header{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;background:#fff;padding:22px 24px 18px;border:0;border-radius:18px 18px 0 0}.profile-dialog .modal-header h2{margin:0;font-size:17px;line-height:1.4;font-weight:650;letter-spacing:0;color:#26332d}.profile-dialog .modal-header>button{display:grid;place-items:center;width:32px;height:32px;min-height:32px;padding:6px;border:0;border-radius:8px;color:#56645e;background:#f4f6f5}.profile-dialog .modal-header>button:hover{background:#e9eeeb}
.profile-content{display:flex;flex-direction:column;gap:18px;padding:0 24px 22px;min-width:0}.profile-identity{display:flex;align-items:center;gap:12px;min-width:0}.profile-avatar{flex:0 0 52px;height:52px;display:grid;place-items:center;border-radius:15px;background:#eaf0ec;color:#345743;font-size:25px;font-weight:600}.profile-identity>div:nth-child(2){flex:1;min-width:0}.profile-identity h3{margin:0 0 5px;font-size:24px;line-height:1.25;font-weight:650;letter-spacing:-.02em;color:#202e27;overflow-wrap:anywhere}.profile-identity>div>span{display:block;color:#56645e;font-size:13px;line-height:1.5;overflow-wrap:anywhere}.profile-mode{flex-shrink:0;padding:5px 8px;border:1px solid #dce5df;border-radius:6px;background:#f7faf8;color:#45664f;font-size:11px;font-weight:500}
.profile-about{display:grid;grid-template-columns:1fr auto;align-items:center;gap:6px 12px;min-width:0}.profile-about>span{color:#56645e;font-size:13px;line-height:1.7;overflow-wrap:anywhere}.profile-about>p{grid-column:1/-1;grid-row:2;margin:0;font-size:13px;line-height:1.8;color:#56645e;white-space:pre-wrap;overflow-wrap:anywhere}.profile-edit{grid-column:2;grid-row:1;display:flex;align-items:center;justify-content:center;gap:5px;padding:8px 11px;min-height:36px;border:1px solid #d7dfda;border-radius:8px;background:#fff;color:#304b39;font-size:12px;font-weight:550}.profile-edit:hover{background:#f4f7f5}.profile-edit .icon{width:14px;height:14px}
.profile-user-id{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:9px 12px;background:#f5f7f6;border-radius:8px}.profile-user-id>span{font-size:12px;color:#56645e}.profile-user-id code{font-family:ui-monospace,SFMono-Regular,monospace;font-size:12px;color:#334a3c;user-select:all;overflow-wrap:anywhere}.profile-user-id button{display:flex;align-items:center;gap:4px;margin-left:auto;border:0;border-radius:6px;background:transparent;color:#365c43;font-size:12px;min-height:32px;padding:5px}.profile-user-id .icon{width:13px;height:13px}
.profile-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:0;padding:0 0 18px;border-bottom:1px solid #e7ebe8;background:none;border-radius:0}.profile-facts>div{min-width:0}.profile-facts dt{margin:0 0 7px;font-size:12px;color:#626f68}.profile-facts dd{margin:0;font-size:12px;line-height:1.7;color:#2f4036;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.profile-teams>header{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px}.profile-teams h3{font-size:14px;font-weight:650;color:#263a2f;margin:0}.profile-teams h3 small{display:inline-block;margin-left:5px;font-size:11px;font-weight:500;background:#edf1ee;border-radius:5px;color:#53695b;padding:2px 5px}.profile-teams>header>button{display:flex;align-items:center;gap:4px;min-height:32px;padding:4px 0;font-size:12px;color:#3e654a}.profile-teams>header .icon{width:14px;height:14px}.profile-team-list{display:grid;gap:8px;max-height:210px;overflow:auto}.profile-team-card{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid #e3e9e5;border-radius:10px;min-width:0}.profile-team-icon{flex:0 0 34px;height:34px;display:grid;place-items:center;border-radius:9px;background:#f0f4f1;color:#51705b}.profile-team-icon .icon{width:18px;height:18px}.profile-team-card>div{min-width:0;flex:1}.profile-team-card h4{margin:0 0 4px;font-size:13px;font-weight:600;color:#2e4235;overflow-wrap:anywhere}.profile-team-card p{margin:0;color:#626f68;font-size:12px;line-height:1.5}.profile-current{flex-shrink:0;font-size:11px;color:#41614c;background:#edf4ee;padding:5px 7px;border-radius:5px}.profile-switch{flex-shrink:0;font-size:12px;padding:7px 10px;min-height:34px;border:1px solid #cfddd3;border-radius:7px;color:#355f42;background:#fff}.profile-team-note{margin:10px 0 0;font-size:12px;line-height:1.7;color:#657269}.profile-team-empty{padding:14px;background:#f6f8f7;border-radius:8px;color:#596b5f;font-size:13px;line-height:1.8}.profile-release{align-self:flex-start;min-height:32px;margin:0;padding:4px 0;border:0;border-radius:0;background:none;color:#3e654a;font-size:12px;text-decoration:underline;text-underline-offset:4px}
.profile-footer{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;padding-top:16px;border-top:1px solid #e7ebe8}.profile-footer>span{font-size:12px;line-height:1.6;color:#657269}.profile-logout{padding:8px 12px;min-height:36px;border:1px solid #e3cdca;border-radius:8px;background:#fff;color:#944e46;font-size:12px;font-weight:500}.profile-logout:hover{background:#fcf5f4}
.profile-edit-form{margin:0;padding:18px 0 0;border:0;border-top:1px solid #e7ebe8;border-radius:0;background:none}.profile-edit-form[hidden]{display:none}.profile-edit-heading h3{margin:0 0 6px;font-size:15px;font-weight:600;color:#2e4034}.profile-edit-heading>span{font-size:12px;color:#657269;line-height:1.6}.profile-edit-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:18px}.profile-edit-fields label{display:flex;flex-direction:column;gap:8px;margin:0;font-size:13px;font-weight:550;color:#34463b}.profile-edit-fields input,.profile-edit-fields textarea{width:100%;min-width:0;margin:0;padding:11px 12px;border:1px solid #cdd7d0;border-radius:8px;background:#fff;color:#263a2d;font:inherit;font-size:14px;line-height:1.5;box-shadow:none;outline:none}.profile-edit-fields input::placeholder,.profile-edit-fields textarea::placeholder{color:#738178;font-weight:400;opacity:1}.profile-edit-fields input:focus,.profile-edit-fields textarea:focus{border-color:#517c5e;box-shadow:0 0 0 3px #517c5e14}.profile-bio-field{grid-column:1/-1}.profile-edit-fields textarea{min-height:96px;resize:vertical}.profile-save-message{margin:10px 0;font-size:12px;line-height:1.7;color:#a04538}.profile-save-message:empty{margin:8px 0}.profile-edit-actions{display:flex;justify-content:flex-end;gap:9px;padding-top:6px}.profile-edit-actions button{min-height:40px;padding:9px 17px;border-radius:8px;font-size:13px;font-weight:550}.profile-edit-actions .primary{background:#2f4938;border:1px solid #2f4938;color:#fff}.profile-edit-actions .ghost{border:1px solid #d9e2dc;color:#45564a;background:#fff}
.profile-editing .profile-about,.profile-editing .profile-user-id,.profile-editing .profile-facts,.profile-editing .profile-teams,.profile-editing .profile-release,.profile-editing .profile-footer{display:none}
.profile-dialog button:focus-visible{outline:2px solid #436b51;outline-offset:3px}
@media(max-width:600px){.modal.profile-dialog{border-radius:14px;max-height:calc(100dvh - 24px)}.profile-dialog .modal-header{padding:19px 18px 16px;border-radius:14px 14px 0 0}.profile-content{padding:0 18px 18px;gap:16px}.profile-identity h3{font-size:22px}.profile-mode{font-size:10px;padding:5px 6px}.profile-facts{grid-template-columns:1fr 1fr;gap:14px}.profile-facts>div:first-child{grid-column:1/-1}.profile-edit-fields{grid-template-columns:1fr;gap:14px}.profile-edit-fields input,.profile-edit-fields textarea{font-size:16px}.profile-edit,.profile-switch,.profile-logout,.profile-edit-actions button,.profile-user-id button{min-height:44px}.profile-edit-actions button{flex:1}.profile-user-id{gap:6px}.profile-user-id code{font-size:11px}.profile-team-card{padding:10px}.profile-current{font-size:10px}.profile-footer>span{max-width:65%}}
