/* Personal feature contents. Geometry, entrance and exit use the shared sheet shell. */
.member-hub-dialog{box-sizing:border-box;width:min(480px,100%);max-height:calc(100dvh - 24px);border:0;border-radius:32px;padding:36px 22px 22px;color:#363636;background:#f3f3f3;font-family:inherit}
.member-hub-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}
.member-hub-head h2{margin:0;font-size:20px;line-height:28px;font-weight:500}
.member-hub-body{min-width:0;font-size:14px;line-height:24px}
.member-hub-body :is(p,h3,dl,ul){max-width:100%;overflow-wrap:anywhere}
.member-hub-body h3{margin:24px 0 12px;font-size:16px;line-height:24px;font-weight:600}
.member-hub-note,.member-hub-scope{font-size:12px;line-height:20px;color:#666;margin:0 0 16px}
.member-hub-scope{padding:0;background:none}
.member-hub-error:not([hidden]){margin:16px 0 0;padding:12px 0 0;border-top:1px solid #ddd;font-size:12px;line-height:20px;color:#555;overflow-wrap:anywhere}
.member-hub-empty{margin:0;padding:16px;background:#fafafa;border-radius:20px;color:#666;font-size:13px;line-height:22px}
:is(.member-hub-dialog,.member-hub-page) [hidden]{display:none!important}
:is(.member-hub-dialog,.member-hub-page) :is(button,a){touch-action:manipulation;-webkit-tap-highlight-color:transparent}
:is(.member-hub-dialog,.member-hub-page) a{text-decoration:none;color:inherit}
:is(.member-hub-dialog,.member-hub-page) .button{position:relative;min-width:44px;font-family:inherit}
:is(.member-hub-dialog,.member-hub-page) .button::after{content:"";position:absolute;inset:-4px 0;border-radius:inherit}
.member-hub-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px 0}
.member-hub-actions>.button{flex:0 1 auto}
/* Identity is a summary; security actions are settings rows, not five primary buttons. */
.ph-profile-summary{display:flex;align-items:center;gap:12px;padding:16px;background:#fafafa;border-radius:20px}
.ph-profile-avatar{display:grid;place-items:center;flex:none;width:44px;height:44px;overflow:hidden;border-radius:12px}
.ph-profile-avatar :is(svg,img){display:block;width:44px;height:44px;object-fit:cover}
.ph-profile-summary>div{flex:1;min-width:0}
.ph-profile-summary strong{display:block;font-size:16px;line-height:24px;font-weight:600;overflow-wrap:anywhere}
.ph-profile-summary small{display:block;color:#666;font-size:12px;line-height:20px}
.ph-profile-summary>.button{flex:none}
.member-hub-account{margin:0 0 12px;padding:0 2px}
.member-hub-account>div{display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding:8px 0;font-size:13px;line-height:22px}
.member-hub-account dt{color:#666}.member-hub-account dd{margin:0;text-align:right;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.ph-security-settings{display:grid;padding:0 16px;border-radius:20px;background:#fafafa}
:is(.member-hub-dialog,.member-hub-page) .ph-setting-row{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;min-height:56px;padding:14px 0;margin:0;border:0;border-bottom:1px solid #e8e8e8;border-radius:0;background:transparent;color:#363636;text-align:left;font-family:inherit;font-size:14px;line-height:22px;font-weight:400;box-shadow:none;cursor:pointer}
.ph-setting-row:last-child{border-bottom:0}
.ph-setting-row>span{flex:1;min-width:0}.ph-setting-row small{display:block;margin-top:2px;font-size:12px;line-height:20px;color:#737373}
.ph-setting-row b{flex:none;font-size:12px;line-height:20px;font-weight:400;color:#666}
.ph-signout{margin-top:20px;padding:0 16px;border-top:1px solid #ddd}
:is(.member-hub-dialog,.member-hub-page) .ph-signout .ph-setting-row{border:0;color:#666}
/* A switch and its schedule belong together. Original checkbox/form values are retained. */
:is(.member-hub-dialog,.member-hub-page) [data-hub-preferences]{display:grid;gap:12px;margin:20px 0 28px}
.member-hub-preference{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:14px 16px;border-radius:20px;background:#fff}
.member-hub-preference>label:last-child{font-size:12px;line-height:19px;color:#666}
.member-hub-switch{display:flex;align-items:center;gap:10px;min-height:44px;font-size:13px;line-height:21px;cursor:pointer}
.member-hub-switch input[type=checkbox]{appearance:none;flex:none;width:34px;height:20px;min-height:0;margin:0;padding:0;position:relative;border:0;border-radius:999px;background:#d5d5d5;cursor:pointer}
.member-hub-switch input[type=checkbox]::before{content:"";position:absolute;top:3px;left:3px;width:14px;height:14px;border-radius:50%;background:#fff;transition:transform 150ms ease-out}
.member-hub-switch input[type=checkbox]:checked{background:#181818}
.member-hub-switch input[type=checkbox]:checked::before{transform:translateX(14px)}
.ph-amount-setting>.member-hub-switch{justify-content:space-between;flex-direction:row-reverse;padding:4px 2px}
[data-hub-preferences]>.member-hub-note{margin:0}
[data-hub-preferences]>.button{justify-self:end;margin-top:6px}
.member-hub-report{padding:16px;margin:16px 0;border-radius:20px;background:#fff}
.member-hub-report header{display:flex;justify-content:space-between;gap:12px}
.member-hub-report small{font-size:12px;color:#666}.member-hub-report-text{font-size:14px;line-height:24px;white-space:pre-wrap;overflow-wrap:anywhere}
.member-hub-record-button{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;min-height:56px;padding:12px 0;border:0;border-bottom:1px solid #ddd;background:transparent;text-align:left;color:#363636;cursor:pointer}
.member-hub-record-button>span{min-width:0;overflow-wrap:anywhere}.member-hub-record-button small{font-size:11px;line-height:18px;color:#666;flex:none}
/* Invitation: share first, one clear surface; progress and rules remain separate. */
.member-hub-invite{display:grid;gap:20px}
.member-hub-invite h3{margin:0 0 12px;font-size:14px;line-height:22px;font-weight:600}
.member-hub-share{display:flex;flex-direction:column;align-items:stretch;gap:12px;margin:0;padding:20px;background:#fff;border-radius:20px}
.member-hub-share>h3{margin:0;text-align:center;font-size:16px;line-height:24px}
.member-hub-share>.member-hub-note{text-align:center;margin:0}
.member-hub-share>[data-invite-qr]{align-self:center;width:164px;height:164px;object-fit:contain;margin:4px 0}
.member-hub-share>[data-invite-qr-status]{font-size:11px;line-height:18px}.member-hub-share>[data-invite-qr-status]:empty{display:none}
.member-hub-share>label{display:grid;gap:8px;font-size:12px;line-height:19px;color:#666}
.member-hub-share input{box-sizing:border-box;width:100%;min-width:0;font-size:16px;text-overflow:ellipsis;border:1px solid #e5e5e5;border-radius:12px;padding:10px 12px;background:#f7f7f7;color:#363636}
.member-hub-share .member-hub-actions{justify-content:center;gap:12px;margin:4px 0}
.member-hub-share>[data-hub=copy-invite],.member-hub-share>[data-hub=retry-qr]{align-self:center;margin:0}
html body.v2-app #appView .member-hub-invite .button,html body.v2-app #appView .member-hub-invite-unavailable .button{display:inline-flex;align-items:center;justify-content:center;width:auto;min-width:44px;min-height:var(--mf-control-secondary,32px)!important;height:auto!important;padding:6px 12px!important;border-radius:999px;line-height:20px;box-sizing:border-box;margin:0}
html body.v2-app #appView .member-hub-invite [data-hub=share-invite]{min-height:var(--mf-control-main,36px)!important;padding-block:8px!important}
html body.v2-app #appView .member-hub-invite .button::after,html body.v2-app #appView .member-hub-invite-unavailable .button::after{inset:calc((var(--mf-control-secondary,32px) - var(--mf-control-hit,44px))/2) 0}
html body.v2-app #appView .member-hub-invite [data-hub=share-invite]::after{inset:calc((var(--mf-control-main,36px) - var(--mf-control-hit,44px))/2) 0}
.member-hub-share .member-hub-actions{gap:12px;margin:4px 0}
.member-hub-copy-status{margin:0;font-size:12px;line-height:20px;color:#666;text-align:center}.member-hub-copy-status:empty{display:none}
.member-invite-poster{display:block;width:100%;height:auto;border-radius:14px}
.member-hub-invite-rules{padding:0 4px}.member-hub-invite-rules>.member-hub-note{margin:10px 0 0}
.member-hub-reward-rules{margin:0;display:grid;gap:8px;font-size:13px;line-height:22px}.member-hub-reward-rules>div{display:flex;justify-content:space-between;gap:16px}.member-hub-reward-rules dt{color:#666}.member-hub-reward-rules dd{margin:0;text-align:right}
.member-hub-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0;padding:16px 4px;border-block:1px solid #e4e4e4}
.member-hub-stats>div{min-width:0}.member-hub-stats small{display:block;font-size:11px;line-height:18px;color:#666}
.member-hub-stats strong{display:block;margin-top:6px;font-size:24px;line-height:32px;font-weight:600;font-variant-numeric:tabular-nums}.member-hub-stats em{font-size:11px;font-weight:400;font-style:normal;color:#666}
.member-hub-progress-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 0 12px}.member-hub-progress-heading h3{margin:0}
.member-hub-friends,.member-hub-records{list-style:none;padding:0;margin:0}
.member-hub-friends li,.member-hub-records li{padding:12px 0;border-bottom:1px solid #e4e4e4}
.member-hub-friends li>div,.member-hub-records li{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}
.member-hub-friends strong,.member-hub-records strong{font-size:13px;line-height:22px;font-weight:500}
.member-hub-friends :is(p,span),.member-hub-records :is(small,span){font-size:12px;line-height:20px;color:#666}.member-hub-friends p{margin:4px 0 0}.member-hub-records small{display:block;margin-top:4px}
.member-hub-invite .member-hub-empty{padding:0;background:transparent!important}
.member-hub-invite-unavailable{padding:20px;background:#fff;border-radius:20px}.member-hub-invite-unavailable h3{margin:0 0 8px;font-size:16px;line-height:24px}.member-hub-invite-unavailable>.member-hub-note{margin-bottom:16px}
@media(max-width:350px){.ph-profile-summary{gap:8px;padding:12px}.ph-profile-avatar,.ph-profile-avatar :is(svg,img){width:36px;height:36px}.member-hub-preference{padding:12px}.member-hub-stats small{min-height:36px}}
@media(prefers-reduced-motion:reduce){.member-hub-switch input[type=checkbox]::before{transition:none}}

/* Profile editor content keeps the same upload and nickname controls. */
.ph-profile-editor{text-align:left;background:transparent;padding:0}
.ph-avatar-edit{display:flex;align-items:center;gap:16px;margin-bottom:24px}
.ph-avatar-edit .profile-preview{width:56px;height:56px;min-height:0;margin:0;flex:none}
.ph-avatar-edit .profile-preview :is(svg,img){width:56px;height:56px;object-fit:cover}
.ph-avatar-edit .avatar-picker{position:relative;display:inline-flex;align-items:center;justify-content:center;width:auto;min-height:36px;margin:0;padding:8px 16px;border:0;border-radius:999px;background:#fafafa;font-size:12px;line-height:20px;cursor:pointer}
.ph-avatar-edit .avatar-picker:focus-within{outline:2px solid #777;outline-offset:3px}
.ph-avatar-edit .avatar-picker::after{content:"";position:absolute;inset:-4px 0;border-radius:inherit}
.ph-profile-editor :is(.field-help,small){font-size:12px;line-height:20px;color:#666}

/* Page shell owns navigation; only nested editors remain modal. */
html body.v2-app #appView .member-hub-page{width:100%;max-width:520px;margin:0 auto;padding:0 0 24px;box-sizing:border-box;background:transparent;color:#363636}
.member-hub-page[hidden]{display:none!important}
.member-hub-page [hidden]{display:none!important}
.member-hub-page .ph-profile-summary,.member-hub-page .ph-security-settings,.member-hub-page .member-hub-empty{background:#fff}
.member-hub-page .member-hub-body{padding:0}
.member-hub-page .member-hub-body>h3{margin:20px 0 12px}
.member-hub-page .member-hub-body>p:first-child{margin-top:0}
.member-hub-page .ph-profile-summary{padding:16px 20px}
.member-hub-page .member-hub-account{margin:0 0 12px;padding:0}
.member-hub-page .ph-security-settings{padding-inline:20px}
.member-hub-page .ph-signout{margin-bottom:16px}

/* Digest notes belong to their settings or reading surface. */
.ph-digest-options,.ph-digest-today{padding:16px;border-radius:20px;background:#fff}
.ph-digest-options .member-hub-note,.ph-digest-options .member-hub-scope{margin:8px 0 0}
.ph-digest-today>h3{margin:0 0 12px}
.ph-digest-today>.member-hub-note{margin:0 0 12px}
.ph-digest-today .member-hub-actions{margin:0}
