/* Mesh gradient, rendered without an image request. */

.page[data-page="profile"]{background:#faf6ef}

.profile-head{position:relative;isolation:isolate;display:flex;align-items:center;justify-content:flex-start;gap:18px;height:auto;min-height:178px;box-sizing:border-box;padding:38px 28px 54px;color:#382f34;background:radial-gradient(ellipse at 92% 33%,#f5dda2 0,transparent 55%),radial-gradient(ellipse at 8% 80%,#dcdcf0 0,transparent 62%),radial-gradient(ellipse at 45% 10%,#f1d9df 0,transparent 68%),#f5e8e4}

.profile-head:before{display:none}

.profile-head .avatar{width:64px;height:64px;flex:0 0 64px;display:grid;place-items:center;border-radius:50%;border:2px solid #ffffffa6;background:#fff8;box-shadow:0 4px 20px #68526a08;overflow:hidden}

.profile-head .avatar svg{width:46px;height:46px;color:#a7a0a7}

.profile-identity{min-width:0;flex:1;padding:4px 0;border:0;background:transparent;text-align:left;color:inherit;cursor:pointer}

.profile-head .profile-identity b{display:block;font:600 clamp(20px,5vw,26px)/1.5 var(--sans);white-space:nowrap;letter-spacing:.02em}

.profile-head .profile-identity span{display:block;margin-top:5px;font:400 12px/1.6 var(--sans);color:#766772}

.profile-head .profile-settings{display:grid;place-items:center;width:40px;height:40px;flex:0 0 40px;padding:8px;border:0;border-radius:50%;background:#ffffff40;color:#584950;cursor:pointer}

.profile-settings svg{width:23px;height:23px}

.profile-head button:focus-visible{outline:2px solid #9d2933;outline-offset:4px}

.profile-head button:active{opacity:.7}

.profile-head+#profileContent.profile-body{margin-top:-28px;padding-top:0;padding-left:18px;padding-right:18px}

#profileContent>.stats{position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0 0 18px;padding:22px 4px;background:#fffaf3e8;border:1px solid #fff9;box-shadow:0 6px 24px #80675709;border-radius:18px!important}

#profileContent>.stats button{min-width:0;border:0;background:none;padding:0 4px}

#profileContent>.stats b{font:600 26px/1.3 var(--sans);font-variant-numeric:tabular-nums;color:#3d3436}

#profileContent>.stats span{margin-top:7px;font:400 13px/1.5 var(--sans);color:#857477;white-space:nowrap}

@media(max-width:360px){.profile-head{padding-left:20px;padding-right:20px;gap:13px}.profile-head .avatar{width:56px;height:56px;flex-basis:56px}.profile-head .profile-settings{width:36px;height:36px;flex-basis:36px}#profileContent>.stats span{font-size:12px}}



/* Reference palette: pale blue, warm gold and fine paper grain. */

.profile-head{background-image:repeating-linear-gradient(92deg,#ffffff19 0px,#ffffff19 1px,#a3a6a008 1px,transparent 3px),radial-gradient(ellipse at 24% 64%,#f5d87c99 0,transparent 56%),radial-gradient(ellipse at 88% 94%,#ead4aa80 0,transparent 52%),linear-gradient(120deg,#e5ebeb 0%,#f5ecd4 48%,#cfdfeb 100%);background-size:auto;background-position:center;background-repeat:repeat}



/* Avatar caption and account actions are part of the header, not a second card. */

.profile-head{align-items:center;gap:18px;padding:30px 24px 52px;min-height:190px}

.profile-avatar-column{flex:0 0 66px;display:flex;flex-direction:column;align-items:center;gap:8px}

.profile-avatar-button{display:block;padding:0;border:0;border-radius:50%;background:transparent;cursor:pointer}

.profile-head .profile-avatar-caption{font:400 12px/1.4 var(--sans);color:#75636b;white-space:nowrap}

.profile-head .avatar img{width:100%!important;height:100%!important;object-fit:cover}

.profile-account-main{flex:1;min-width:0}

.profile-head .profile-identity{display:block;width:100%;padding:0;margin:0 0 10px}

.profile-head .profile-identity b{font-size:clamp(18px,4.7vw,25px)}

.profile-head-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-height:34px}

.profile-head .profile-head-action{box-sizing:border-box;flex:1;min-width:0;min-height:34px;padding:6px 7px;margin:0;border:1px solid #9d29332e;border-radius:8px;background:#fff8;color:#9d2933;font:400 12px/1.5 var(--sans);white-space:nowrap;cursor:pointer;text-align:center}

.profile-head .profile-head-update{flex-basis:100%}

.profile-head .profile-settings{width:30px;height:30px;flex-basis:30px;padding:5px}

#profileContent #accountPanel:not(.profile-account-expanded){display:none!important}

@media(max-width:360px){.profile-head{padding-left:18px;padding-right:18px;gap:10px}.profile-avatar-column{flex-basis:56px}.profile-head .profile-head-action{font-size:11px;padding-inline:5px}}



/* Extend the personal header texture through the full profile page. */

html.ui-theme-goldsand body .page[data-page="profile"]{background-color:#f5e8e4!important;background-image:repeating-linear-gradient(92deg,#ffffff19 0px,#ffffff19 1px,#a3a6a008 1px,transparent 3px),radial-gradient(ellipse at 24% 64%,#f5d87c99 0,transparent 56%),radial-gradient(ellipse at 88% 94%,#ead4aa80 0,transparent 52%),linear-gradient(120deg,#e5ebeb 0%,#f5ecd4 48%,#cfdfeb 100%)!important;background-size:auto;background-position:center;background-repeat:repeat}

html.ui-theme-goldsand body .page[data-page="profile"]>.profile-head,html.ui-theme-goldsand body .page[data-page="profile"]>.profile-body{background:transparent!important}


/* Shared home texture for chart, academy and personal center surfaces. */
html.ui-theme-goldsand body .miniapp:has(:is([data-page="chart"],[data-page="academy"],[data-page="profile"]).active){background-color:#f5e8e4!important;background-image:repeating-linear-gradient(92deg,#ffffff19 0px,#ffffff19 1px,#a3a6a008 1px,transparent 3px),radial-gradient(ellipse at 24% 64%,#f5d87c99 0,transparent 56%),radial-gradient(ellipse at 88% 94%,#ead4aa80 0,transparent 52%),linear-gradient(120deg,#e5ebeb 0%,#f5ecd4 48%,#cfdfeb 100%)!important;background-size:auto;background-position:center;background-repeat:repeat}
html.ui-theme-goldsand body .miniapp:has(:is([data-page="chart"],[data-page="academy"],[data-page="profile"]).active)>.pages,html.ui-theme-goldsand body .miniapp:has(:is([data-page="chart"],[data-page="academy"],[data-page="profile"]).active)>.wx-bar,html.ui-theme-goldsand body .page:is([data-page="chart"],[data-page="academy"],[data-page="profile"]){background:transparent!important}

.profile-head .profile-identity-row{display:flex;align-items:center;gap:8px;margin-bottom:10px;min-width:0}
.profile-head .profile-identity-row .profile-identity{width:auto;flex:0 1 auto;margin:0;min-width:0}
.profile-head .profile-identity-row .profile-identity b{font-size:clamp(14px,4vw,23px)}
.profile-head .profile-nickname-edit{flex:none;min-height:30px;padding:3px 8px;border:1px solid #9d293340;border-radius:7px;background:#fff8;color:#9d2933;font:400 12px/1.5 var(--sans);white-space:nowrap;cursor:pointer}
.profile-head .profile-nickname-edit[hidden]{display:none}
.page[data-page="profile"]{background:#faf6ef}

.profile-head .profile-avatar-caption{max-width:80px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.profile-head .profile-account-id{margin:-3px 0 9px;color:#75636b;font:400 10px/1.5 var(--sans);overflow-wrap:anywhere;user-select:text}

/* Keep navigation opaque on all four main pages. */
html.ui-theme-goldsand body .miniapp:has(:is([data-page="home"],[data-page="chart"],[data-page="academy"],[data-page="profile"]).active)>.tabbar{background:#fffcef!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
