dialog#profile-panel{box-sizing:border-box;width:min(100%,530px);height:min(100dvh,920px);max-height:100dvh;max-width:100vw;padding:0;margin:auto;border-radius:24px;overflow-x:hidden;background:#f2f5ee;color:#173128;overscroll-behavior:contain}
#profile-panel .profile-top{position:sticky;top:0;z-index:2;display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:12px;align-items:center;padding:calc(10px + env(safe-area-inset-top,0px)) 17px 10px;background:#e9f2de}
#profile-panel .profile-top h2{margin:0;text-align:center;font-size:19px;letter-spacing:-.02em}
.profile-nav{display:grid;place-items:center;width:44px;height:44px;border:1px solid #c8ddc4;border-radius:50%;background:#f9fbf4;color:#214b36}
.profile-nav svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.profile-nav svg circle{fill:#f9fbf4}
.profile-hero{height:160px;position:relative;background:#d8ead0;margin-bottom:49px}
.profile-land{position:absolute;inset:0;width:100%;height:100%;display:block}
.profile-avatar{position:absolute;bottom:-42px;left:50%;translate:-50% 0;width:124px;height:124px;box-sizing:border-box;display:grid;place-items:center;border-radius:50%;background:conic-gradient(#28734e var(--hero-progress,0%),#cfdfce 0);box-shadow:0 8px 28px #2046282c}
.profile-avatar::before{content:"";position:absolute;inset:5px;border-radius:50%;background:#f8fbf5}
.profile-avatar img{position:relative;width:92px;height:92px;border-radius:26px}
.profile-avatar>strong{position:absolute;bottom:-2px;right:-5px;border:1px solid #a6caad;border-radius:999px;padding:5px 9px;background:#eaf7df;color:#20583a;font-size:14px}
.profile-intro{text-align:center;padding:4px 16px 13px}
#profile-panel .profile-intro h3{font-size:25px}
.profile-intro p{margin:6px 0}
.profile-hero-progress{font-weight:750;color:#246447;font-size:14px}
.profile-body{display:grid;gap:13px;padding:0 14px calc(20px + env(safe-area-inset-bottom,0px))}
.profile-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:11px 0;background:#fbfcf7;border:1px solid #dae6d7;border-radius:18px;margin:0}
.profile-stats>div{display:flex;min-width:0;flex-direction:column;align-items:center;gap:5px;text-align:center;padding:0 4px}
.profile-stats>div+div{border-left:1px solid #e1eae0}
.profile-stats dt{display:grid;gap:5px;justify-items:center;font-size:11px;color:#486457;line-height:1.25}
.profile-stats dt span{display:grid;place-items:center;border-radius:8px;width:28px;height:28px;background:#e7f2e1;color:#286144;font-size:18px;font-weight:750}
.profile-stats dd{margin:0;font-size:20px;font-weight:800;color:#173d2d;font-variant-numeric:tabular-nums}
.profile-block{min-width:0;background:#fbfcf7;border:1px solid #dae6d7;border-radius:18px;padding:13px}
#profile-panel .profile-block h3{font-size:17px;margin:0}
.profile-tag{color:#3f6650;background:#eaf2e4;font-size:11px;border-radius:999px;padding:4px 7px;white-space:nowrap}
#profile-spending:not(:empty){margin-top:9px}
.profile-spend-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.profile-spend-card{min-width:0;display:grid;gap:6px;padding:9px;background:#eef5ea;border-radius:12px;overflow-wrap:anywhere;font-size:13px}
.profile-spend-card>strong{font-size:16px}
.profile-spend-meter{display:block;background:#dae9d8;border-radius:8px;height:4px;overflow:hidden}
.profile-spend-meter>i{display:block;background:#43825a;height:100%;border-radius:8px}
#profile-form{padding:0 16px calc(20px + env(safe-area-inset-bottom,0px))}
#profile-panel>.profile-meter{padding:0 16px}
#profile-panel[data-profile-page="home"]>.profile-meter{display:none}
#profile-panel[data-profile-page="step"] .profile-top{background:#f2f5ee}
#profile-error:not([hidden]){margin:0 16px 16px}
@media(max-width:550px){
 dialog#profile-panel{width:100vw;height:100dvh;border-radius:0;margin:0}
}
