/* Completed member profile: mobile-first, one clean profile system for everyone. */
.member-profile-view:not(.history-profile-view):not(.account-profile-view){max-width:820px;margin:0 auto;padding-bottom:28px}
.member-profile-view:not(.history-profile-view):not(.account-profile-view)>.fu-back{margin:8px 0 16px}

.fb-member-profile{position:relative!important;overflow:visible!important;padding:0 0 26px!important;margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;text-align:center!important}
.fb-member-profile:before{display:none!important;content:none!important}

.fb-basic-cover{position:relative;width:100%;height:300px;overflow:hidden;border-radius:20px;background:rgba(255,255,255,.045);border:1px solid var(--line)}
.fb-cover-open{display:block;width:100%;height:100%;padding:0!important;margin:0!important;border:0!important;border-radius:inherit!important;background:transparent!important;overflow:hidden;cursor:pointer;touch-action:manipulation}
.fb-cover-open img{display:block;width:100%;height:100%;object-fit:cover}
.fb-basic-cover-empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;color:var(--muted);font-weight:800;cursor:default}
.fb-basic-cover.is-editable-empty .fb-basic-cover-empty{cursor:pointer}
.fb-basic-cover-empty svg{width:34px;height:34px}
.fb-cover-edit{position:absolute!important;right:14px;bottom:14px;z-index:3;display:flex!important;align-items:center;gap:7px;min-height:40px!important;padding:0 14px!important;border-radius:999px!important;background:rgba(15,22,18,.86)!important;color:#fff!important;border:2px solid rgba(255,255,255,.9)!important;backdrop-filter:blur(12px);box-shadow:0 5px 16px rgba(0,0,0,.2);font-weight:800!important}
.fb-cover-edit svg{width:18px;height:18px}

.fb-basic-avatar-slot{position:relative;z-index:5;width:max-content;margin:-82px auto 0}
.fb-avatar-home{position:relative}
.fb-member-profile .profile-view-avatar{width:164px!important;height:164px!important;margin:0!important;border:5px solid var(--paper)!important;border-radius:50%!important;overflow:hidden;box-shadow:0 5px 18px rgba(0,0,0,.25);background:var(--paper)!important;cursor:pointer}
.fb-member-profile .profile-view-avatar img{width:100%;height:100%;object-fit:cover;cursor:pointer}
.fb-profile-photo-edit{position:absolute!important;right:3px;bottom:8px;z-index:7;width:42px!important;height:42px!important;min-height:42px!important;padding:0!important;margin:0!important;border-radius:50%!important;display:grid!important;place-items:center;background:var(--accent)!important;color:#fff!important;border:3px solid var(--paper)!important;box-shadow:0 3px 10px rgba(0,0,0,.22)}
.fb-profile-photo-edit svg{width:18px;height:18px}

.fb-basic-name{position:relative;margin:18px auto 0;padding:0 24px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-height:52px}
.fb-member-profile .fb-basic-name>h1{margin:0!important;text-align:center!important;font-size:clamp(2rem,6vw,2.7rem)!important;line-height:1.08}
.fb-profile-edit-button{position:static!important;right:auto!important;top:auto!important;transform:none!important;margin:2px auto 0!important;min-height:42px!important;padding:0 14px!important;border-radius:999px!important;display:flex!important;align-items:center;justify-content:center;gap:7px;font-size:.88rem!important;font-weight:800!important;white-space:nowrap;width:max-content!important}
.fb-profile-edit-button svg{width:17px;height:17px}

.fb-profile-actions{margin:18px auto 0;padding:0 14px;max-width:520px}
.fb-profile-actions .member-contact-actions{display:flex!important;justify-content:center;gap:10px;margin:0!important;padding:0!important}
.fb-profile-actions .member-contact-actions a{flex:1;max-width:220px;min-height:44px;border:1px solid var(--line);border-radius:12px;display:flex;align-items:center;justify-content:center;gap:8px;text-decoration:none;font-weight:800;color:var(--ink);background:var(--paper)}
.fb-profile-actions .member-contact-actions a svg{width:19px;height:19px;color:var(--accent)}

.fb-profile-content{display:grid;gap:14px;margin-top:22px;text-align:left}
.fb-profile-section{background:var(--paper);border:1px solid var(--line);border-radius:18px;padding:18px;box-shadow:0 5px 18px rgba(0,0,0,.04)}
.fb-profile-section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.fb-profile-section-head span{display:block;color:var(--muted);font-size:.72rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;margin-bottom:2px}
.fb-profile-section-head h2{margin:0;font-size:1.25rem}
.fb-profile-about .profile-details{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px!important;margin:0!important;padding:0!important}
.fb-profile-about .profile-detail{margin:0!important;min-width:0;padding:12px 13px!important;border:1px solid var(--line)!important;border-radius:13px!important;background:rgba(127,127,127,.035)!important;display:flex!important;align-items:center;gap:10px}
.fb-profile-about .profile-detail svg{width:20px;height:20px;flex:0 0 auto;color:var(--accent)}
.fb-profile-about .profile-detail div{min-width:0}
.fb-profile-about .profile-detail span{display:block;color:var(--muted);font-size:.76rem;font-weight:700;margin-bottom:2px}
.fb-profile-about .profile-detail strong{display:block;font-size:.94rem;overflow-wrap:anywhere}

.fb-profile-activity{padding:0!important;overflow:hidden}
.fb-profile-activity .member-activity-card{margin:0!important;padding:18px!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important}
.fb-profile-activity .member-activity-head{margin-bottom:12px!important}
.fb-profile-activity .member-activity-head h2{font-size:1.25rem!important;margin:2px 0 0!important}
.fb-profile-activity .member-activity-all{min-height:38px!important;padding:0 12px!important;border-radius:10px!important}
.fb-profile-activity .member-activity-empty{min-height:150px!important;border-radius:13px!important}

.fb-profile-media-viewer{position:fixed;inset:0;z-index:10050;background:rgba(0,0,0,.92);display:flex;align-items:center;justify-content:center;padding:18px}
.fb-profile-media-stage{width:100%;height:100%;display:flex;align-items:center;justify-content:center}
.fb-profile-media-stage img{max-width:100%;max-height:100%;object-fit:contain;border-radius:8px}
.fb-profile-media-close{position:fixed!important;right:18px;top:calc(18px + env(safe-area-inset-top));z-index:2;width:44px!important;height:44px!important;min-height:44px!important;padding:0!important;border-radius:50%!important;display:grid!important;place-items:center;background:rgba(255,255,255,.15)!important;color:#fff!important;border:1px solid rgba(255,255,255,.22)!important}

.member-cover-editor{position:fixed;inset:0;z-index:10060;background:rgba(0,0,0,.68);display:flex;align-items:center;justify-content:center;padding:18px}
.member-cover-editor-card{width:min(560px,100%);max-height:min(760px,92vh);overflow:auto;background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:20px;padding:18px;box-shadow:0 24px 70px rgba(0,0,0,.35)}
.member-cover-editor-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.member-cover-editor-head>div{text-align:left}
.member-cover-editor-head span{display:block;color:var(--muted);font-size:.72rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.member-cover-editor-head strong{display:block;font-size:1.2rem;margin-top:2px}
.member-cover-editor-head>[data-cover-close]{width:40px!important;height:40px!important;min-height:40px!important;padding:0!important;border-radius:50%!important;display:grid!important;place-items:center}
.member-cover-preview{position:relative;width:100%;aspect-ratio:16/7;border-radius:14px;overflow:hidden;background:rgba(127,127,127,.08);border:1px solid var(--line);display:flex;align-items:center;justify-content:center}
.member-cover-preview img{width:100%;height:100%;object-fit:cover;display:block}
.member-cover-preview-empty{display:flex;flex-direction:column;align-items:center;gap:8px;color:var(--muted);font-weight:800}
.member-cover-preview-empty svg{width:28px;height:28px}
.member-cover-pick-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}
.member-cover-pick-actions button{min-height:44px!important;border-radius:12px!important;display:flex!important;align-items:center;justify-content:center;gap:8px}
.member-cover-position-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:16px;text-align:left}
.member-cover-position-grid label{display:grid;gap:7px;font-size:.8rem;font-weight:800;color:var(--muted)}
.member-cover-position-grid input[type="range"]{width:100%}
.member-cover-editor-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}
.member-cover-editor-actions button{min-height:44px!important;border-radius:12px!important}
.member-cover-status{margin-top:12px;padding:10px 12px;border-radius:10px;background:rgba(190,56,56,.1);color:#b43636;font-weight:700;font-size:.86rem;text-align:left}
.member-cover-status[data-type="success"]{background:rgba(52,145,91,.1);color:#2f8a55}

/* Uses the same bottom-sheet language already used by Family Book's photo picker. */
.fb-profile-action-sheet h3{text-align:left;margin:4px 10px 10px}

@media(max-width:759px){
  .member-profile-view:not(.history-profile-view):not(.account-profile-view){margin:0 -11px;max-width:none;padding-bottom:18px}
  .member-profile-view:not(.history-profile-view):not(.account-profile-view)>.fu-back{margin:10px 18px 14px}
  .fb-basic-cover{width:100vw;max-width:100vw;height:235px;margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw);border-left:0;border-right:0;border-radius:0}
  .fb-cover-edit{right:13px;bottom:13px;width:44px!important;height:44px!important;min-height:44px!important;padding:0!important;justify-content:center;border-radius:50%!important}
  .fb-cover-edit span{display:none}
  .fb-basic-avatar-slot{margin-top:-72px}
  .fb-member-profile .profile-view-avatar{width:144px!important;height:144px!important;border-width:4px!important}
  .fb-profile-photo-edit{width:42px!important;height:42px!important;min-height:42px!important;right:0;bottom:5px;border-width:3px!important}
  .fb-basic-name{margin-top:14px;padding:0 18px;display:block;min-height:0;max-width:100%;box-sizing:border-box}
  .fb-member-profile .fb-basic-name>h1{font-size:2rem!important;padding:0 30px;max-width:100%;box-sizing:border-box;overflow-wrap:anywhere}
  .fb-profile-edit-button{position:static!important;transform:none!important;margin:12px auto 0!important;min-height:40px!important;padding:0 15px!important;width:max-content!important;max-width:calc(100% - 28px)}
  .fb-profile-actions{margin-top:14px;padding:0 16px;width:100%;max-width:100%;box-sizing:border-box}
  .fb-profile-actions .member-contact-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px!important;width:100%;max-width:100%;box-sizing:border-box}
  .fb-profile-actions .member-contact-actions a{width:100%;max-width:none!important;min-width:0!important;min-height:42px;font-size:.78rem!important;padding:0 6px!important;gap:5px!important;box-sizing:border-box;overflow:hidden}
  .fb-profile-actions .member-contact-actions a svg{width:18px;height:18px;flex:0 0 18px}
  .fb-profile-actions .member-contact-actions a span{min-width:0;white-space:nowrap}
  .fb-profile-content{margin-top:18px;padding:0 12px;gap:12px}
  .fb-profile-section{border-radius:16px;padding:15px}
  .fb-profile-about .profile-details{grid-template-columns:1fr!important}
  .fb-profile-activity .member-activity-card{padding:15px!important}
  .fb-profile-activity .member-activity-head{align-items:flex-start!important;gap:10px}
  .fb-profile-activity .member-activity-all{font-size:.82rem!important;white-space:nowrap}
  .member-cover-editor{align-items:flex-end;padding:0}
  .member-cover-editor-card{width:100%;max-height:90vh;border-radius:20px 20px 0 0;padding:16px 16px calc(16px + env(safe-area-inset-bottom))}
  .member-cover-position-grid{grid-template-columns:1fr;gap:12px}
  .member-cover-editor-actions{display:grid;grid-template-columns:1fr}
}
