.account-page {
  --account-ink: var(--ink, #173635);
  --account-muted: var(--muted,#526f7b);
  --account-green: var(--sa-turquoise,var(--teal,#087b94));
  --account-edge: var(--line,#dce7eb);
  --account-tint: color-mix(in srgb,var(--account-green) 9%,white);
  color: var(--account-ink);
  background: white;
  width: 100%;
  max-width: 48rem;
  margin-inline: auto;
  overflow-wrap: anywhere;
  text-align: start;
  min-width: 0;
}
.account-page *, .account-page *::before, .account-page *::after { box-sizing: border-box; }
.account-page h1, .account-page h2, .account-page h3, .account-page p, .account-page dl, .account-page dd { margin: 0; }
.account-page h1 { font-size: clamp(1.45rem, 4vw, 2rem); line-height: 1.15; }
.account-page h2 { font-size: 1.13rem; line-height: 1.4; }
.account-page h3 { font-size: 1rem; }
.account-page .ac-button, .account-page .ac-tab, .account-page .ac-link, .account-page .ac-person, .account-page summary { font: inherit; cursor: pointer; }
.ac-pad, .ac-heading, .ac-panel { padding: 1.05rem clamp(.85rem,3.5vw,1.55rem); }
.ac-heading { display: flex; align-items: center; gap: .85rem; }
.ac-heading .ac-ava-mini { width: 2.5rem; height: 2.5rem; }
.ac-body { display: grid; gap: .9rem; }
.ac-cover { position:relative; width:100%; height:clamp(7rem,23vw,12rem); overflow:hidden; background:linear-gradient(117deg,color-mix(in srgb,var(--account-green) 23%,white),color-mix(in srgb,var(--account-green) 7%,white)); }
.ac-cover > img { display:block; width:100%; height:100%; object-fit:cover; }
.ac-identity { padding: 0 clamp(.85rem,3.5vw,1.55rem) 1rem; }
.ac-avatar-line { margin-top:-2.3rem; margin-bottom:.56rem; display:flex; align-items:flex-end; gap:.8rem; position:relative; }
.ac-avatar-wrap { display:grid; position: relative; }
.ac-avatar,.ac-ava-mini { display:grid; place-items:center; aspect-ratio:1; border-radius:50%; background:color-mix(in srgb,var(--account-green) 18%,white); color:var(--account-green); font-weight:700; line-height:1; overflow:hidden; flex-shrink:0; }
.ac-avatar { width:clamp(5.3rem,15vw,7.2rem); border: .25rem solid white; font-size: 1.8rem; }
.ac-initials,.ac-avatar img,.ac-ava-mini img { grid-area:1/1; }
.ac-avatar img,.ac-ava-mini img { display:block; width:100%; height:100%; object-fit:cover; }
.ac-ava-mini { width:2.85rem; height:2.85rem; font-size:1rem; }
.ac-story-plus { position:absolute; right:-.3rem; bottom:-.2rem; display:grid; place-items:center; min-width:44px; min-height:44px; padding:0; border:0; border-radius:50%; color:white; background:radial-gradient(circle closest-side,var(--account-green) 66%,white 69% 77%,transparent 80%); font:700 1.25rem/1 system-ui; cursor:pointer; touch-action:manipulation; }
.ac-story-controls { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; }
.ac-story-controls button { min-height:44px; }
.ac-quick-photo { display:grid; gap:.2rem; align-items:center; max-width:11rem; }
.ac-photo-camera { position:relative; display:grid; place-items:center; width:44px; height:44px; overflow:hidden; border-radius:50%; color:var(--account-green); background:var(--account-tint); }
.ac-photo-camera svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.ac-photo-camera input[type=file] { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; padding:0; }
.ac-photo-camera:focus-within { outline:2px solid currentColor; outline-offset:2px; }
.ac-upload-retry[hidden],.ac-quick-photo .ac-field-note:empty { display:none; }
@media (min-width:960px) { .ac-quick-photo { align-self:end; padding-bottom:.1rem; } }
@media(forced-colors:active){ .ac-story-plus { border:2px solid ButtonText; background:ButtonFace; color:ButtonText; } }
.ac-name { margin-block: .25rem; }
.ac-meta, .ac-hint, .ac-empty { color:var(--account-muted); line-height:1.5; }
.ac-meta { font-size:.9rem; }
.ac-empty { padding-block:.5rem; }
.ac-profile-bio { white-space:pre-line; margin-top:.55rem!important; line-height:1.5; }
.ac-actions { display:flex; flex-wrap:wrap; gap:.42rem; padding-top:.82rem; }
.ac-button, .ac-link { display:inline-flex; justify-content:center; gap:.42rem; align-items:center; border:0; border-radius:.67rem; min-height:2.65rem; font-weight:650!important; padding:.55rem .88rem; background:var(--account-tint); color:var(--account-green); }
.ac-button--primary { background:var(--account-green); color:white; }
.ac-button--quiet,.ac-link { background:transparent; }
.ac-link { padding:.45rem .4rem; }
.ac-button:disabled, .ac-tab:disabled { opacity:.56; cursor:default; }
.ac-tabs { display:flex; align-items:stretch; gap:.35rem; overflow-x:auto; padding-inline:clamp(.65rem,3vw,1.5rem); border-bottom:1px solid var(--account-edge); scrollbar-width:thin; }
.ac-tab { white-space:nowrap; min-height:2.9rem; background:transparent; color:var(--account-muted); border:none; border-bottom:.19rem solid transparent; padding:.52rem .53rem; font-weight:600!important; }
.ac-tab[aria-pressed=true] { color:var(--account-green); border-color:var(--account-green); }
.ac-row, .ac-person { display:flex; gap:.8rem; align-items:center; justify-content:space-between; }
.ac-person { border:0; width:100%; min-height:3.65rem; text-align:left; justify-content:flex-start; color:inherit; background:transparent; border-radius:.5rem; padding:.3rem; }
.ac-person:hover, .ac-person:focus-visible { background:var(--account-tint); }
.ac-person div, .ac-person label { min-width:0; }
.ac-person strong, .ac-person small { display:block; }
.ac-person small { color:var(--account-muted); font-size:.88rem; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; }
.ac-friend-search { display:flex; align-items:end; flex-wrap:wrap; gap:.5rem; margin-bottom:.5rem; }
.ac-friend-search .ac-field { flex:1 1 13rem; }
.ac-friend-search button,.ac-friend-pages button,.ac-request-actions button { min-height:44px; }
.ac-friend-pages { display:flex; align-items:center; justify-content:space-between; gap:.4rem; margin-top:.3rem; }
.ac-friend-pages[hidden] { display:none; }
.ac-request { border-bottom:1px solid var(--account-edge); padding-block:.35rem; }
.ac-requests:not(:empty) { margin-top:1.2rem; }
.ac-request-actions { display:flex; flex-wrap:wrap; gap:.4rem; }
.ac-block-person { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem; }
.ac-block-person p { flex-basis:100%; }
.ac-details, .ac-form { display:grid; gap:.87rem; }
.ac-details { margin-top:.7rem!important; }
.ac-details div { display:grid; grid-template-columns:minmax(5.7rem, 30%) 1fr; gap:.6rem; }
.ac-details dt { color:var(--account-muted); }
.ac-field { display:grid; gap:.32rem; font-weight:600; font-size:.92rem; }
.account-page input:not([type=checkbox]), .account-page textarea, .account-page select { width:100%; min-width:0; padding:.69rem .76rem; color:var(--account-ink); background:#fff; font:inherit; font-size:1rem; border:1px solid #97b2ae; border-radius:.55rem; }
.account-page textarea { resize:vertical; min-height:4.2rem; }
.ac-check { display:flex; align-items:center; gap:.7rem; min-height:2.6rem; }
.ac-check input { width:1.2rem; height:1.2rem; accent-color:var(--account-green); }
.ac-block { border-bottom:1px solid var(--account-edge); padding:.5rem 0; }
.ac-block > summary { min-height:2.7rem; padding-block:.65rem; font-weight:650; color:var(--account-ink); }
.ac-block[open] > summary { color:var(--account-green); }
.ac-block > div { padding:.2rem 0 .8rem; }
.ac-error { color:#913e24; line-height:1.52; }
.ac-error-box { display:flex; align-items:center; flex-wrap:wrap; gap:.45rem; }
.ac-media-grid { display:grid; gap:.3rem; }
.ac-post-area { padding-inline:0; }
.ac-post-area > :is(h2,.ac-empty,.ac-hint,.ac-error-box,.ac-button) { margin-inline:clamp(.85rem,3.5vw,1.55rem); }
.ac-thumb { display:block; border:0; cursor:pointer; padding:0; background:var(--account-tint); width:100%; overflow:hidden; border-radius:.4rem; height:9rem; color:var(--account-green); }
.ac-thumb img { width:100%; height:100%; object-fit:cover; }
.ac-chat { display:flex; flex-direction:column; gap:.58rem; padding-block:.35rem; }
.ac-bubble { width:fit-content; max-width:83%; padding:.66rem .83rem; border-radius:1rem 1rem 1rem .25rem; background:#edf3f2; }
.ac-bubble--mine { align-self:flex-end; border-radius:1rem 1rem .25rem 1rem; background:var(--account-tint); }
.ac-bubble p { white-space:pre-wrap; }
.ac-bubble time { display:block; margin-top:.24rem; color:var(--account-muted); font-size:.76rem; }
.ac-compose { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:.3rem .4rem; align-items:end; position:sticky; bottom:calc(var(--nav-h,62px) + env(safe-area-inset-bottom)); background:white; padding-block:.58rem; }
.ac-compose textarea { grid-column:1; min-height:2.7rem; max-height:min(8rem,30dvh); resize:vertical; field-sizing:content; }
.ac-compose > .ac-button { grid-column:3; white-space:nowrap; }
.ac-emoji { grid-column:2; position:relative; }
.ac-emoji-button { display:grid; place-items:center; width:44px; min-height:44px; padding:0; border:0; border-radius:.6rem; background:var(--account-tint); color:var(--account-green); cursor:pointer; }
.ac-emoji-button svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.ac-emoji-choices { position:absolute; z-index:2; right:0; bottom:calc(100% + .3rem); display:flex; padding:.25rem; gap:.15rem; background:white; border:1px solid var(--account-edge); border-radius:.65rem; box-shadow:0 .15rem .55rem #203a3a22; }
.ac-emoji-choices[hidden] { display:none; }
.ac-compose .ac-status,.ac-message-tip { grid-column:1/-1; }
.ac-message-label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.ac-message-tip,.ac-field-note { color:var(--account-muted);font-size:.85rem;line-height:1.4; font-weight:400; }
.ac-field-error { color:#913e24;font-size:.9rem;font-weight:500; }
.ac-field-error:empty,.ac-field-note:empty { display:none; }
.ac-upload-retry { justify-self:start; }
.account-page [aria-invalid=true] { border-color:#a24026!important; }
.ac-form input,.ac-form textarea,.ac-compose textarea { scroll-margin-block:4rem calc(var(--nav-h,62px) + env(safe-area-inset-bottom) + 1rem); }
@media (pointer:coarse) { .ac-message-tip { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); } }
.ac-status:empty { display:none; }
.account-page :focus-visible { outline: 3px solid var(--account-green); outline-offset:2px; }
@media(max-width:480px){ .ac-action-text { font-size:.88rem; } .ac-button { padding:.5rem .7rem; } }
.ac-watch { border:0; background:transparent; padding:0; border-radius:50%; cursor:pointer; }
.ac-toolbar { display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; gap:.4rem; }
.ac-saved { color:var(--account-green); }
.ac-form fieldset { margin:0; min-width:0; padding:0; border:0; display:grid; gap:.76rem; }
.ac-form legend { padding:.45rem 0; font-weight:700; }
.ac-edit-tabs { display:flex; gap:.5rem; flex-wrap:wrap; }
.ac-edit-tabs .ac-button[aria-pressed=true] { background:var(--account-green); color:white; }
.ac-edit-tabs .ac-button[aria-pressed=false] { background:#fff; color:var(--account-green); border:1px solid var(--account-green); }

.ac-guest-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; }
.ac-extra-fields > summary { min-height:2.75rem; padding:.7rem .75rem; border-radius:.55rem; color:var(--account-green); background:var(--account-tint); font-weight:650; }
.ac-extra-fields > div { margin-top:.65rem; }
.ac-form input[type=date] { min-height:2.85rem; }


/* The cover and shared post media occupy the full profile width. Text keeps its own inset. */
body[data-social-page="profile"] #main, #main:has(> .account-profile) {
  width:100%; max-width:none; padding-inline:0; margin-block-start:0;
}
.account-profile { max-width:none; }
.ac-profile-layout,.ac-profile-sidebar,.ac-profile-heading { min-width:0; }
.ac-profile-layout { display:grid; grid-template-columns:minmax(0,1fr); }
.ac-profile-layout > .ac-panel { min-width:0; }
.ac-profile-heading { display:grid; gap:.24rem; }
.ac-overview { display:none; }
.ac-profile-layout > .ac-post-area { padding:0; }
.ac-profile-posts,.ac-preview-posts { display:grid; grid-template-columns:minmax(0,1fr); gap:.45rem; background:var(--account-edge); }
.ac-post-area > :is(.ac-page-status,.ac-button)[hidden] { display:none; }
.ac-post-area > .ac-page-status { padding-inline:.85rem; }
.ac-post-area > :is(.ac-empty,.ac-hint,.ac-error-box,h2,.ac-button) { margin-block:.85rem; }
.ac-profile-posts > article,.ac-media-grid > article,.ac-preview-posts > article { min-width:0; max-width:100%; }
@media (min-width:960px) {
  body[data-social-page="profile"] #main, #main:has(> .account-profile) { width:min(70rem,calc(100% - 3rem)); margin-block-start:.75rem; }
  .account-profile { background:transparent; }
  .account-profile > .ac-cover { height:clamp(14rem,24vw,19.5rem); border-radius:.85rem .85rem 0 0; }
  .account-profile > .ac-identity { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:start; column-gap:1.1rem; padding:0 1.5rem 1.15rem; background:white; border-radius:0 0 .85rem .85rem; }
  .ac-avatar-line { grid-row:1/3; margin:-3.45rem 0 0; }
  .ac-profile-heading { grid-column:2; padding-top:.85rem; }
  .ac-profile-heading > .ac-name { font-size:clamp(1.65rem,2.3vw,2.3rem); }
  .ac-identity > .ac-actions { grid-column:2; }
  .ac-profile-layout { grid-template-columns:minmax(14.5rem,.75fr) minmax(0,1.75fr); align-items:start; gap:1.05rem; margin-block-start:1rem; }
  .ac-profile-sidebar { display:grid; gap:.85rem; }
  .ac-profile-sidebar > .ac-tabs,.ac-overview,.ac-profile-layout > .ac-panel:not(.ac-post-area) { background:white; border-radius:.75rem; }
  .ac-profile-sidebar > .ac-tabs { display:grid; padding:.48rem; gap:.15rem; border:0; overflow:visible; }
  .ac-profile-sidebar .ac-tab { min-height:2.55rem; width:100%; text-align:left; padding:.6rem .78rem; white-space:normal; border:0; border-radius:.42rem; }
  .ac-profile-sidebar .ac-tab:hover { background:var(--account-tint); }
  .ac-profile-sidebar .ac-tab[aria-pressed=true] { background:var(--account-green); color:white; }
  .ac-overview:not([hidden]) { display:block; padding:1rem; }
  .ac-overview .ac-details { font-size:.94rem; }
  .ac-overview .ac-details div { grid-template-columns:minmax(4.5rem,35%) minmax(0,1fr); }
  .ac-profile-layout > .ac-post-area { background:transparent; }
  .ac-profile-posts,.ac-preview-posts,.account-profile .ac-media-grid { background:transparent; gap:.8rem; }
  .ac-profile-posts > article,.ac-preview-posts > article,.account-profile .ac-media-grid > article { border-radius:.75rem; }
}
