/* Profile-only composition. Learning routes and record ownership are unchanged. */
body[data-route="profile"] .content-grid{display:block;max-width:840px}
body[data-route="profile"] .right-rail{display:none}
body[data-route="profile"] #main-content{padding-top:30px}
.profile-page{display:grid;gap:14px;padding-bottom:36px}
.profile-overview{padding:28px;border:1px solid var(--brand-line);border-radius:24px;background:var(--brand-surface);margin-bottom:6px}
.profile-identity{display:flex;align-items:center;gap:22px;padding-bottom:24px}
.profile-portrait{position:relative;flex-shrink:0;display:grid;place-items:center;width:108px;height:108px;padding:0;border-radius:50%;background:#f8f0fc;border:4px solid #fff;box-shadow:0 0 0 1px #eee1f3;cursor:pointer}
.profile-portrait:hover{box-shadow:0 0 0 2px #ceabdf}
.profile-portrait-edit{position:absolute;right:-2px;bottom:0;display:grid;place-items:center;width:27px;height:27px;border:3px solid #fff;border-radius:50%;color:#fff;background:var(--brand-purple)}
.profile-portrait-edit>.icon{width:13px;height:13px}
.profile-identity-copy{flex:1;min-width:0}
.profile-identity-copy h1{margin:0 0 9px;font-size:27px;line-height:1.4;letter-spacing:-.5px;overflow-wrap:anywhere}
.profile-identity-links{display:flex;align-items:flex-start;flex-wrap:wrap;gap:8px 17px}
.profile-identity-links .profile-change-avatar{font-size:12px;min-height:28px;padding:0}
.profile-name-editor{min-width:0}.profile-name-editor[open]{flex-basis:100%}
.profile-name-editor>summary{list-style:none;display:flex;align-items:center;gap:6px;color:var(--brand-muted);font-size:12px;cursor:pointer;width:fit-content}
.profile-name-editor>summary::-webkit-details-marker,.profile-section>summary::-webkit-details-marker{display:none}
.profile-name-editor>summary:hover{color:var(--brand-purple)}
.profile-name-editor>summary{min-height:28px}
.profile-name-editor>summary .icon{width:14px;height:14px}
.profile-name-editor .field-label{display:block;margin-top:15px;font-size:12px}
.profile-name-editor .name-edit{margin-top:8px;max-width:390px}
.profile-name-editor .name-edit input{min-width:0;background:#fff;border-color:var(--brand-line);color:var(--brand-ink)}
.profile-name-editor .name-edit .button{flex-shrink:0;min-height:40px;padding:9px 15px}
.profile-edit-appearance{align-self:flex-start;margin-top:8px;flex-shrink:0;font-size:13px;min-height:43px;padding:10px 16px}
.profile-edit-appearance>.icon{width:17px;height:17px}
.profile-learning-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:20px 0;border-top:1px solid #f0e9f2;border-bottom:1px solid #f0e9f2}
.profile-learning-stats>div{display:flex;align-items:center;flex-direction:column;gap:6px;min-width:0}
.profile-learning-stats>div+div{border-left:1px solid #eee6f0}
.profile-learning-stats strong{font-size:28px;font-weight:800;line-height:1.3;color:var(--brand-ink);font-variant-numeric:tabular-nums}
.profile-learning-stats span{font-size:12px;color:var(--brand-muted)}
.profile-quick-actions{display:flex;align-items:center;gap:26px;padding-top:16px}
.profile-quick-actions>.text-button{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:650}
.profile-quick-actions .icon{width:17px;height:17px}.profile-quick-actions .icon:last-child{width:14px;color:#baa7c2}
.profile-section{background:#fff;border:1px solid var(--brand-line);border-radius:18px;min-width:0;overflow:hidden}
.profile-section>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:20px 24px;font-size:14px;font-weight:700;color:var(--brand-ink);cursor:pointer}
.profile-section>summary>span{display:flex;align-items:center;gap:12px}
.profile-section>summary .icon{width:21px;height:21px;color:#9f7eb1}
.profile-section>summary>.icon{width:16px;height:16px;color:#b7a5be;transition:transform .15s}
.profile-section[open]>summary>.icon{transform:rotate(180deg)}
.profile-section[open]>summary{border-bottom:1px solid #f0e9f2}
.profile-avatar-picker h2{font-size:23px;margin:0 0 24px;color:var(--brand-ink)}
.profile-avatar-picker .panda-group-tabs{margin:0 0 20px;gap:9px}
.profile-avatar-picker .group-tab{flex:1;justify-content:center;font-size:12px;padding:10px}
.profile-avatar-picker .avatar-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
.profile-avatar-picker .avatar-choice{padding:18px 7px;border-radius:16px;min-width:0}
.profile-avatar-picker .avatar-choice.selected{padding:17px 6px}
.profile-avatar-picker .avatar-choice>.avatar{--avatar-size:82px!important}
.profile-avatar-picker .avatar-choice>i{width:20px;height:20px;right:7px;top:7px}
.profile-avatar-picker .upload-actions{margin-top:24px;gap:14px}
.profile-avatar-picker .upload-actions .button{font-size:12px;min-height:42px;padding:10px 15px}
.profile-avatar-note{color:var(--brand-muted);font-size:11px;line-height:1.7;margin:13px 0 0}
.profile-avatar-picker[aria-busy="true"] .upload-actions>label{opacity:.5;pointer-events:none}
.profile-account-content{padding:0 24px 20px}
.profile-account-content .account-panel{margin:0;padding:20px 0 0;gap:16px;border:0;border-radius:0;box-shadow:none;background:transparent}
.profile-account-content .account-panel h2{font-size:13px;margin:0}
.profile-account-content .account-panel p{margin:7px 0 0;font-size:12px;overflow-wrap:anywhere}
.profile-account-content .account-panel .button{font-size:12px;padding:9px 15px;min-height:39px;flex-shrink:0}
.profile-account-content .profile-id{font-size:11px;margin:15px 0 0}
.profile-page .local-history-details>.profile-card{border:0;margin:0;padding:20px 24px;box-shadow:none}
.profile-page .local-history-details{margin-top:0}
.profile-page .local-history-details[open]>summary{margin-bottom:0}
.profile-page .local-history-details .profile-card h2{font-size:15px}
.profile-bank-link{display:flex;align-items:center;gap:12px;border:1px solid var(--brand-line);border-radius:18px;background:#fff;color:var(--brand-ink);padding:20px 24px;font-size:14px;font-weight:700;text-align:left;cursor:pointer}
.profile-bank-link>.icon{width:21px;height:21px;color:#9f7eb1}.profile-bank-link>.icon:last-child{margin-left:auto;width:16px;color:#b7a5be}
@media(max-width:700px){body[data-route="profile"] #main-content{padding-top:16px}.profile-page{gap:12px}.profile-overview{padding:24px 20px;border-radius:21px;margin-bottom:4px}.profile-identity{gap:15px;flex-wrap:wrap;padding-bottom:23px}.profile-portrait{width:88px;height:88px;border-width:4px}.profile-portrait>.avatar{--avatar-size:78px!important}.profile-identity-copy h1{font-size:23px;margin-bottom:7px}.profile-edit-appearance{margin-top:0;margin-left:103px;min-height:39px;padding:8px 13px;font-size:12px}.profile-learning-stats{padding:20px 0}.profile-learning-stats strong{font-size:25px}.profile-learning-stats span{font-size:11px}.profile-quick-actions{gap:20px;padding-top:19px}.profile-section>summary,.profile-bank-link{padding:18px 20px;font-size:13px}.profile-account-content{padding:0 20px 19px}.profile-name-editor[open]{position:relative}.profile-name-editor .name-edit{flex-wrap:wrap}.profile-name-editor .name-edit input{flex-basis:100%}.profile-name-editor .name-edit .button{min-height:36px}.profile-page .local-history-details>.profile-card{padding:19px 20px}.profile-account-content .account-panel{flex-wrap:wrap;align-items:center}}
@media(max-width:360px){.profile-overview{padding:22px 16px}.profile-portrait{width:76px;height:76px}.profile-portrait>.avatar{--avatar-size:66px!important}.profile-identity{gap:12px}.profile-edit-appearance{margin-left:88px}.profile-identity-copy h1{font-size:21px}.profile-learning-stats span{font-size:10px}}
@media(max-width:700px){.profile-avatar-picker h2{font-size:21px;margin-bottom:21px}.profile-avatar-picker .avatar-grid{gap:10px}.profile-avatar-picker .avatar-choice{padding:15px 5px}.profile-avatar-picker .avatar-choice.selected{padding:14px 4px}.profile-avatar-picker .avatar-choice>.avatar{--avatar-size:70px!important}.profile-avatar-picker .group-tab{padding:10px 7px;font-size:11px}.profile-avatar-picker .upload-actions{margin-top:20px}}
@media(max-width:360px){.profile-avatar-picker .avatar-choice>.avatar{--avatar-size:54px!important}.profile-avatar-picker .avatar-choice{padding:14px 4px}.profile-avatar-picker .avatar-choice.selected{padding:13px 3px}.profile-avatar-picker .avatar-choice>i{width:17px;height:17px;right:3px;top:3px}.profile-avatar-picker .group-tab{gap:5px}.profile-avatar-picker .panda-group-tabs{gap:7px}.profile-identity-links{column-gap:12px}}
@media(prefers-reduced-motion:reduce){.profile-section>summary>.icon{transition:none}}
