/* Personal community homes: clear identity, flat posts and explicit sharing. */
.community-profile{--profile-line:var(--border,#303034);--profile-soft:var(--surface-2,#202023);--profile-accent:var(--accent,#c1ff35);min-width:0;min-height:68vh;padding:0 3px 34px;color:var(--text)}
.community-profile svg,.community-profile-sharing svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
body.ui-polished .community-profile button,body.ui-polished .community-profile-sharing button,body.ui-polished .community-avatar[data-community-profile],body.ui-polished .post-detail-avatar[data-community-profile]{box-shadow:none!important;translate:none}
.community-profile button,.community-profile-sharing button{font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
.community-profile button:disabled,.community-profile-sharing button:disabled{cursor:default;opacity:.5}
.community-profile button:focus-visible,.community-profile-sharing button:focus-visible,.community-profile-sharing input:focus-visible+.community-profile-sharing-check{outline:2px solid var(--profile-accent,var(--accent));outline-offset:3px}
.community-profile [hidden]{display:none!important}
.community-profile-nav{display:flex;align-items:center;justify-content:space-between;min-height:48px;gap:12px;margin-bottom:23px}
body .community-profile-nav .strategy-back{display:flex;align-items:center;gap:7px;min-height:44px;padding:9px 13px 9px 10px;font-size:13px}
.community-profile-nav>span{font-size:11px;color:var(--muted);margin-right:4px}
.community-profile-hero{padding:7px 2px 25px}
.community-profile-identity{display:flex;align-items:center;gap:15px;min-width:0}
.community-profile-avatar{display:grid;place-items:center;width:66px;height:66px;flex:0 0 66px;border-radius:21px;background:var(--accent-soft);border:1px solid var(--profile-line);color:var(--profile-accent);font-size:25px;font-weight:600;overflow:hidden}
.community-profile-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.community-profile-identity>div{flex:1;min-width:0}
.community-profile-identity h1{font-size:23px;font-weight:650;letter-spacing:-.035em;line-height:1.4;overflow-wrap:anywhere;margin:0 0 8px}
.community-profile-identity p{font-size:11px;font-variant-numeric:tabular-nums;letter-spacing:.05em;color:var(--muted);margin:0}
.community-profile-self{font-size:9px;color:var(--muted);padding:5px 7px;border-radius:7px;border:1px solid var(--profile-line);align-self:flex-start;margin-top:5px;white-space:nowrap}
.community-profile-stats{display:flex;align-items:center;gap:0;margin-top:24px;min-width:0}
.community-profile-stats>div{display:flex;flex-direction:column;gap:6px;min-width:0;flex:1}
.community-profile-stats strong{font-size:21px;line-height:1.3;font-weight:650;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
.community-profile-stats span{font-size:11px;color:var(--muted)}
body .community-profile-follow,body .community-profile-manage{display:flex;align-items:center;justify-content:center;gap:6px;flex:0 0 auto;min-width:87px;min-height:39px;border-radius:12px;padding:9px 12px;border:1px solid transparent;background:var(--profile-accent);color:#12160c;line-height:1.4;font-size:11px;font-weight:600;margin-left:13px}
.community-profile-follow svg,.community-profile-manage svg{width:15px;height:15px;stroke-width:1.8}
.community-profile-follow>span,.community-profile-manage>span{color:inherit;font-size:inherit}
body .community-profile-follow.is-following,body .community-profile-manage{background:var(--profile-soft);color:var(--text);border-color:var(--profile-line);font-weight:500}
.community-profile-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:center;gap:0;border-bottom:1px solid var(--profile-line);padding:0 2px;margin-bottom:0}
body .community-profile-tabs>button{position:relative;min-height:51px;padding:13px 2px;border:0;background:none;color:var(--muted);border-radius:0;font-size:14px;font-weight:500;line-height:1.5}
body .community-profile-tabs>button[aria-selected=true]{color:var(--text);font-weight:650}
.community-profile-tabs>button[aria-selected=true]:after{content:"";position:absolute;bottom:-1px;left:calc(50% - 9px);height:3px;width:18px;border-radius:2px;background:var(--profile-accent)}
.community-profile .community-post{padding-inline:1px}
.community-profile-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px 12px;text-align:center;color:var(--muted)}
.community-profile-empty>svg{height:29px;width:29px;stroke-width:1.3;opacity:.65;margin-bottom:16px}
.community-profile-empty h2,.community-profile-empty h3{color:var(--text);font-size:14px;line-height:1.6;font-weight:550;margin:0}
.community-profile-empty p{font-size:12px;line-height:1.8;margin:9px 0 0;overflow-wrap:anywhere;max-width:270px}
.community-profile-spinner{width:17px;height:17px;border:1.5px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:community-profile-spin .8s linear infinite}
@keyframes community-profile-spin{to{transform:rotate(360deg)}}
.community-profile-status,.community-profile-sharing-status{font-size:11px;color:var(--muted);line-height:1.8;margin:10px 0 0;overflow-wrap:anywhere}
.community-profile-status:empty,.community-profile-sharing-status:empty{display:none}
body .community-profile-status button,body .community-profile-sharing-status button{border:0;border-radius:6px;background:none;color:var(--accent);font-size:11px;min-height:30px;padding:5px 7px}
body .community-profile-more{display:block;min-height:42px;margin:13px auto 0;padding:10px 14px;border:0;border-radius:11px;background:none;color:var(--accent);font-size:12px}
.community-profile-live-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:24px 2px 18px}
.community-profile-live-head h2{font-size:13px;font-weight:600;line-height:1.6;margin:0}
.community-profile-live-head p{font-size:10px;line-height:1.7;color:var(--muted);margin:5px 0 0}
body #community-profile-refresh{display:grid;place-items:center;width:36px;height:36px;flex:0 0 36px;padding:8px;border:1px solid var(--profile-line);border-radius:11px;background:var(--profile-soft);color:var(--muted)}
#community-profile-refresh svg{width:17px;height:17px;stroke-width:1.5}
.community-profile-account{border:1px solid var(--profile-line);border-radius:20px;padding:17px 16px 13px;background:var(--card,var(--surface));margin:0 0 13px;min-width:0}
.community-profile-account>header{display:flex;align-items:center;justify-content:space-between;gap:10px}
.community-profile-account>header>div{display:flex;align-items:center;gap:9px;min-width:0}
.community-profile-account>header>div>div{min-width:0}
.community-profile-account-icon{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:10px;background:var(--accent-soft);color:var(--profile-accent)}
.community-profile-account-icon svg{width:17px;height:17px;stroke-width:1.6}
.community-profile-account h3{font-size:12px;line-height:1.6;font-weight:600;margin:0;overflow-wrap:anywhere}
.community-profile-account header small{display:block;font-size:9px;line-height:1.6;color:var(--muted);margin-top:2px}
.community-profile-snapshot{font-size:9px;color:var(--muted);white-space:nowrap;padding:4px 7px;border:1px solid var(--profile-line);border-radius:7px}
.community-profile-snapshot.is-current{color:var(--profile-accent);border-color:transparent;background:var(--accent-soft)}
.community-profile-equity{display:flex;flex-direction:column;gap:8px;margin:22px 0 19px}
.community-profile-equity>span{color:var(--muted);font-size:10px;line-height:1.6}
.community-profile-equity small{font-size:9px;font-weight:400;margin-left:4px;opacity:.7}
.community-profile-equity>strong{font-size:29px;font-weight:600;line-height:1.3;letter-spacing:-.04em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.community-profile-account-metrics{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1.15fr) minmax(0,.7fr);gap:9px}
.community-profile-account-metrics>div{display:flex;flex-direction:column;gap:7px;min-width:0}
.community-profile-account-metrics span{font-size:9px;color:var(--muted);line-height:1.6}
.community-profile-account-metrics b{font-size:14px;line-height:1.5;font-weight:550;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.community-profile-account-metrics .is-positive{color:var(--positive,var(--profile-accent))}
.community-profile-account-metrics .is-negative{color:var(--negative,#ed6686)}
.community-profile-account>footer{display:flex;flex-wrap:wrap;justify-content:space-between;gap:5px 10px;font-size:9px;color:var(--muted);line-height:1.7;margin-top:18px;padding-top:11px;border-top:1px solid var(--profile-line);font-variant-numeric:tabular-nums}
.community-profile-live-note{color:var(--muted);font-size:10px;line-height:1.9;margin:16px 3px 0}
.community-profile-curve{color:var(--profile-accent);margin-top:22px}
.community-profile-curve>div,.community-profile-curve>footer{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:9px;line-height:1.6;color:var(--muted)}
.community-profile-curve>svg{display:block;width:100%;height:auto;margin:10px 0 3px;stroke:none;overflow:visible}
.community-profile-curve>footer{font-size:8px;font-variant-numeric:tabular-nums}
.community-profile-private{min-height:245px;padding-top:33px}
.community-profile-sharing>header{display:flex;align-items:center;gap:9px;margin:7px 27px 15px 0}
.community-profile-sharing>header>span{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:var(--accent-soft);color:var(--accent)}
.community-profile-sharing>header svg{width:17px;height:17px}
.community-profile-sharing h2{font-size:19px;line-height:1.5;letter-spacing:-.025em;font-weight:600;margin:0}
.community-profile-sharing>p{font-size:12px;line-height:1.85;color:var(--muted);margin:0 0 19px}
.community-profile-sharing-accounts{display:flex;flex-direction:column;border:1px solid var(--border);border-radius:15px;overflow:hidden}
.community-profile-sharing-accounts>label{position:relative;display:flex;align-items:center;gap:12px;min-height:68px;padding:14px 13px;background:var(--surface-2);border-bottom:1px solid var(--border);cursor:pointer}
.community-profile-sharing-accounts>label:last-child{border-bottom:0}
.community-profile-sharing-accounts input{position:absolute;inset:auto auto auto 12px;width:calc(100% - 24px);height:45px;opacity:0;cursor:pointer;z-index:1;margin:0}
.community-profile-sharing-accounts input:disabled{cursor:default}
.community-profile-sharing-accounts>label>span:nth-of-type(1){flex:1;min-width:0}
.community-profile-sharing-accounts b{display:block;font-size:12px;font-weight:550;line-height:1.7;overflow-wrap:anywhere}
.community-profile-sharing-accounts small{display:block;color:var(--muted);font-size:9px;line-height:1.7;margin-top:3px}
.community-profile-sharing-check{width:21px;height:21px;display:grid;place-items:center;flex:0 0 21px;border:1px solid var(--border);border-radius:7px;background:var(--bg)}
.community-profile-sharing-check svg{width:14px;height:14px;color:transparent;stroke-width:2}
.community-profile-sharing-accounts input:checked~.community-profile-sharing-check{background:var(--accent);border-color:var(--accent)}
.community-profile-sharing-accounts input:checked~.community-profile-sharing-check svg{color:#111}
.community-profile-sharing-accounts input:focus-visible~.community-profile-sharing-check{outline:2px solid var(--accent);outline-offset:3px}
.community-profile-sharing-actions{display:flex;align-items:center;gap:10px;margin-top:19px}
body .community-profile-sharing-actions button{display:block;min-height:43px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2);color:var(--text);padding:11px 13px;font-size:12px}
body .community-profile-sharing-actions [type=submit]{flex:1;border-color:transparent;background:var(--accent);color:#111;font-weight:600}
#community-profile-sharing-form>small{display:block;font-size:9px;line-height:1.8;color:var(--muted);margin-top:12px;text-align:center}
.community-profile-delete h2{margin:8px 25px 13px 0;font-size:20px;font-weight:600}
.community-profile-delete>p{font-size:13px;line-height:1.7;color:var(--muted);margin:0 0 17px}
body .community-avatar[data-community-profile],body .post-detail-avatar[data-community-profile]{padding:0;margin:0;cursor:pointer;font-family:inherit;-webkit-tap-highlight-color:transparent}
body .community-avatar[data-community-profile]{background:var(--accent-soft)}
.community-avatar[data-community-profile]:focus-visible,.post-detail-avatar[data-community-profile]:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
/* Keep the dynamic filter within its existing fifth of the square tabs. */
.square-tabs .community-dynamic-tab{position:relative;display:flex;align-items:stretch;justify-content:center;min-width:0;border-radius:inherit}
body .square-tabs .community-dynamic-tab>[data-square-category]{width:100%;min-width:0;padding-left:4px!important;padding-right:19px!important;border-radius:inherit}
body .square-tabs .community-dynamic-tab>#community-feed-toggle{position:absolute;right:0;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:23px;min-width:23px;height:30px;min-height:30px;padding:6px;border:0;background:none;color:var(--muted);border-radius:8px;z-index:2;box-shadow:none!important}
#community-feed-toggle svg{width:10px;height:10px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
body .square-tabs .community-dynamic-tab>#community-feed-toggle[aria-expanded=true],body .square-tabs .community-dynamic-tab>#community-feed-toggle.is-following{color:var(--accent)}
.community-dynamic-tab .community-unread-badge{right:21px!important;top:1px!important}
.community-dynamic-tab .community-unread-badge.dot{right:20px!important;top:4px!important}
#community-feed-menu{position:absolute;left:0;top:calc(100% + 7px);display:flex;flex-direction:column;width:122px;padding:5px;border:1px solid var(--border);border-radius:13px;background:var(--card,var(--bg));box-shadow:0 8px 25px #0003;z-index:12}
#community-feed-menu[hidden]{display:none!important}
body #community-feed-menu>[data-community-feed-mode]{display:flex;align-items:center;justify-content:space-between;min-height:39px;padding:9px 11px;width:100%;border:0;border-radius:9px;background:none;color:var(--text);font-size:12px;line-height:1.5;box-shadow:none!important}
body #community-feed-menu>[data-community-feed-mode][aria-checked=true]{background:var(--accent-soft);color:var(--accent)}
#community-feed-menu svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
:root[data-theme=light] .community-profile{--profile-line:#e1e7f0;--profile-soft:#f0f4fa;--profile-accent:#3478ed}
[data-theme=light] .community-profile-account{background:#fff}
[data-theme=light] .community-profile-follow:not(.is-following),[data-theme=light] .community-profile-sharing-actions [type=submit]{color:#fff}
[data-theme=light] .community-profile-sharing-accounts input:checked~.community-profile-sharing-check svg{color:#fff}
[data-theme=light] #community-feed-menu{background:#fff;box-shadow:0 8px 25px #23374d16}
@media(max-width:360px){.community-profile{padding-inline:1px}.community-profile-identity{gap:12px}.community-profile-avatar{width:57px;height:57px;flex-basis:57px;border-radius:18px}.community-profile-identity h1{font-size:20px}.community-profile-self{display:none}.community-profile-stats strong{font-size:18px}.community-profile-stats span{font-size:10px}body .community-profile-follow,body .community-profile-manage{padding-inline:9px;min-width:76px;margin-left:9px;font-size:10px}.community-profile-account{padding:15px 13px 12px}.community-profile-account-metrics b{font-size:12px}.community-profile-snapshot{font-size:8px;padding:4px 5px}body .square-tabs .community-dynamic-tab>[data-square-category]{padding-left:0!important;padding-right:16px!important}body .square-tabs .community-dynamic-tab>#community-feed-toggle{width:20px;min-width:20px;padding:5px}}
@media(min-width:700px){.community-profile{max-width:700px;margin-inline:auto}.community-profile-hero{padding-top:13px}.community-profile-avatar{height:76px;width:76px;flex-basis:76px;border-radius:24px}.community-profile-identity h1{font-size:27px}.community-profile-stats{max-width:420px}.community-profile-account{padding:20px 23px}.community-profile-curve>svg{max-height:155px}}
@media(prefers-reduced-motion:reduce){.community-profile-spinner{animation:none}.community-profile button,.community-profile-sharing button{transition:none!important}}

/* Profile links keep names and message identities visually lightweight. */
body .community-user-name,body .community-post-open,body .chat-profile-name,body .chat-profile-avatar{appearance:none;border:0;background:none;border-radius:4px;padding:0;font:inherit;color:inherit;text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent}
body.ui-polished :is(.community-user-name,.community-post-open,.chat-profile-name,.chat-profile-avatar),body.ui-polished :is(.community-user-name,.community-post-open,.chat-profile-name,.chat-profile-avatar):not(:disabled):active{box-shadow:none!important;translate:none;scale:none;filter:none}
body .community-user-name{display:inline;margin:0;max-width:100%;min-width:0;font-weight:600;line-height:inherit;white-space:normal;overflow-wrap:anywhere;vertical-align:baseline}
body .community-post>header>.community-user-name{font-size:12px;color:var(--text)}
body .community-comments-inline .community-user-name{color:var(--text)}
body .post-detail-article>header>div>.community-user-name{justify-self:start;font-size:15px;line-height:1.5}
body .post-detail-comment header>.community-user-name{font-size:12px;line-height:1.5}
body .post-detail-liker-names .community-user-name{font-weight:500}
body .community-post>.community-post-open{display:block;width:calc(100% - 47px);margin:12px 0 12px 47px;font-size:14px;line-height:1.85;white-space:pre-wrap;overflow-wrap:anywhere}
body .chat-identity>.chat-profile-name{display:block;margin:0;max-width:64px;font-size:10px;line-height:14px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}
body .chat-identity>.chat-profile-avatar{display:grid;place-items:center;width:36px;height:36px;margin:0;border-radius:10px;flex:0 0 36px}
body :is(.community-user-name,.community-post-open,.chat-profile-name,.chat-profile-avatar):focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(max-width:360px){body .community-post>.community-post-open{width:100%;margin-left:0}}

/* A full-width cover fades into the page; posts and accounts retain their own background. */
body.ui-polished:not(.chat-view) .app-shell:has(>#page>.community-profile){max-width:none;padding-top:0}
body.ui-polished:not(.chat-view) #page:has(>.community-profile){padding:0 0 24px}
.community-profile{--profile-fade-rgb:0,0,0;position:relative;width:100%;max-width:none;margin:0;padding:0 0 34px;background:var(--bg)}
[data-theme=light] .community-profile{--profile-fade-rgb:244,247,252}
.community-profile-nav{position:absolute;inset:calc(8px + env(safe-area-inset-top,0px)) 12px auto;z-index:4;display:flex;align-items:center;justify-content:space-between;min-height:44px;gap:12px;margin:0;pointer-events:none}
.community-profile-nav>button{pointer-events:auto}
body .community-profile-back-icon{appearance:none;display:grid;place-items:center;flex:0 0 44px;width:44px;min-width:44px;height:44px;min-height:44px;margin:0;padding:10px;border:0;border-radius:50%;background:none;color:var(--text);box-shadow:none!important}
.community-profile-back-icon svg{width:24px;height:24px;stroke-width:1.8}
body .community-profile-settings-button{appearance:none;display:flex;align-items:center;justify-content:center;gap:6px;min-height:40px;margin:0;padding:8px 11px;border:0;border-radius:18px;background:none;color:var(--text);font-size:12px;line-height:1.5;font-weight:550;white-space:nowrap;box-shadow:none!important}
.community-profile-settings-button svg{width:17px;height:17px;stroke-width:1.7}
body .community-profile.has-wallpaper .community-profile-nav>button{color:#fff;filter:drop-shadow(0 1px 3px #0009)}
body .community-profile.has-wallpaper .community-profile-settings-button{background:#0b10251f;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
body.ui-polished .community-profile-nav>button:not(:disabled):active{scale:.96;box-shadow:none!important;translate:none}
.community-profile-hero{position:relative;isolation:isolate;min-height:50vw;padding:0 0 28px;overflow:hidden;border-radius:0;background:var(--bg)}
.community-profile-identity{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:13px;min-height:242px;padding:calc(83px + env(safe-area-inset-top,0px)) 20px 9px;border-radius:0;overflow:visible;text-align:center}
.community-profile-identity>div{flex:initial}
.community-profile-cover{position:absolute;inset:0 0 auto;z-index:0;width:100%;aspect-ratio:2/1;overflow:hidden;pointer-events:none;background:radial-gradient(ellipse at 50% -20%,var(--accent-soft),transparent 75%),var(--profile-soft)}
.community-profile-cover>img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;object-position:center}
.community-profile-cover:before{content:"";position:absolute;inset:0;z-index:1;background:linear-gradient(180deg,#080d1c20 0%,#080d1c00 35%);opacity:0}
.community-profile-hero.has-wallpaper .community-profile-cover:before{opacity:1}
.community-profile-cover:after{content:"";position:absolute;inset:0;z-index:3;background:linear-gradient(180deg,rgba(var(--profile-fade-rgb),0) 0%,rgba(var(--profile-fade-rgb),0) 76%,rgba(var(--profile-fade-rgb),.08) 86%,rgba(var(--profile-fade-rgb),.58) 96%,rgb(var(--profile-fade-rgb)) 100%)}
.community-profile-frost{position:absolute;inset:0;z-index:2;pointer-events:none}
.community-profile-frost.frost-soft{backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);mask-image:linear-gradient(180deg,transparent 85%,#000 100%);-webkit-mask-image:linear-gradient(180deg,transparent 85%,#000 100%)}
.community-profile-frost.frost-medium,.community-profile-frost.frost-deep{display:none}

.community-profile-identity>.community-profile-avatar{position:relative;flex:0 0 76px;width:76px;height:76px;border-radius:25px;border:3px solid var(--card,var(--bg));background:var(--profile-soft);box-shadow:0 5px 19px #0002;font-size:28px}
.community-profile-hero.has-wallpaper .community-profile-avatar{border-color:#ffffffd9;background:#f4f7fa;color:#243550}
.community-profile-name{position:relative;min-width:0;max-width:100%}
.community-profile-name h1{font-size:23px;line-height:1.4;letter-spacing:-.02em;margin:0;font-weight:650;color:var(--text);text-shadow:none}
.community-profile-name p{margin:6px 0 0;font-size:10px;line-height:1.5;letter-spacing:.07em;color:var(--muted)}
.community-profile-summary{position:relative;z-index:1;padding:0 24px}
.community-profile-stats{justify-content:center;width:100%;max-width:340px;gap:0;margin:18px auto 0;text-align:center}
.community-profile-stats>div{align-items:center;gap:5px}
.community-profile-stats>div+div{border-left:1px solid var(--profile-line)}
.community-profile-stats strong{font-size:20px;line-height:1.3}
.community-profile-stats span{font-size:10px;line-height:1.5}
.community-profile-actions{display:flex;justify-content:center;margin:18px 0 0}
.community-profile-actions:empty{display:none}
body .community-profile-actions>.community-profile-follow{min-width:145px;min-height:38px;margin:0;padding:8px 18px;border-radius:13px;font-size:11px}
.community-profile-content{position:relative;width:100%;max-width:756px;margin:0 auto;padding:0 18px;background:var(--bg)}
.community-profile-content>.community-profile-tabs{padding-inline:1px}
.community-profile>#community-profile-status{max-width:756px;margin:0 auto;padding:0 18px 10px}
.community-profile>#community-profile-status:empty{display:none}
#community-profile-hero>.community-profile-empty{min-height:310px;padding-top:calc(86px + env(safe-area-inset-top,0px))}
.community-profile-settings-sheet{min-width:0;color:var(--text)}
.community-profile-settings-sheet>header{display:flex;flex-direction:column;align-items:flex-start;gap:6px;margin:6px 26px 18px 0}
.community-profile-settings-sheet h2{margin:0;font-size:20px;line-height:1.5;font-weight:600;letter-spacing:-.025em}
.community-profile-settings-sheet>header p{margin:0;font-size:11px;line-height:1.7;color:var(--muted)}
.community-profile-settings-sheet svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
body .community-profile-settings-row{appearance:none;display:flex;align-items:center;gap:12px;width:100%;min-width:0;min-height:77px;margin:0;padding:14px 2px;border:0;border-bottom:1px solid var(--border);border-radius:0;background:none;color:var(--text);font:inherit;text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent;box-shadow:none!important;translate:none}
body .community-profile-settings-row:last-child{border-bottom:0}
.community-profile-settings-row>svg:first-child{display:block;flex:0 0 38px;width:38px;height:38px;padding:9px;border-radius:12px;background:var(--surface-2);color:var(--accent)}
.community-profile-settings-row>span:nth-child(2){display:flex;flex-direction:column;gap:5px;flex:1;min-width:0}
.community-profile-settings-row b{font-size:13px;line-height:1.5;font-weight:550}
.community-profile-settings-row small{font-size:10px;line-height:1.65;color:var(--muted);overflow-wrap:anywhere}
.community-profile-settings-row>.community-profile-settings-arrow{flex:0 0 auto;color:var(--muted);font-size:23px;line-height:1;font-weight:400;padding:4px}
.community-profile-settings-sheet button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(max-width:360px){.community-profile-nav{left:7px;right:9px}.community-profile-identity{min-height:227px;padding-top:calc(77px + env(safe-area-inset-top,0px))}.community-profile-identity>.community-profile-avatar{width:70px;height:70px;flex-basis:70px;border-radius:23px}.community-profile-name h1{font-size:21px}.community-profile-stats strong{font-size:19px}.community-profile-content{padding-inline:14px}.community-profile-summary{padding-inline:20px}}
@media(min-width:700px){.community-profile-nav{left:24px;right:24px;top:calc(14px + env(safe-area-inset-top,0px))}.community-profile-hero{padding-bottom:34px}.community-profile-identity{min-height:277px;padding-top:max(calc(96px + env(safe-area-inset-top,0px)),calc(50vw - 200px));padding-bottom:13px}.community-profile-identity>.community-profile-avatar{width:88px;height:88px;flex-basis:88px;border-radius:28px}.community-profile-name h1{font-size:27px}.community-profile-content{padding-inline:24px}}
@media(prefers-reduced-transparency:reduce){.community-profile-frost{backdrop-filter:none;-webkit-backdrop-filter:none}}
.community-profile-wallpaper-sheet{min-width:0;color:var(--text)}
.community-profile-wallpaper-sheet>header{display:flex;align-items:center;gap:11px;margin:6px 26px 20px 0}
.community-profile-wallpaper-sheet>header>span{display:grid;place-items:center;width:37px;height:37px;flex:0 0 37px;border-radius:12px;background:var(--accent-soft);color:var(--accent)}
.community-profile-wallpaper-sheet svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.community-profile-wallpaper-sheet h2{font-size:19px;line-height:1.45;font-weight:600;letter-spacing:-.025em;margin:0}
.community-profile-wallpaper-sheet>header p{font-size:10px;line-height:1.7;color:var(--muted);margin:3px 0 0}
.community-profile-wallpaper-preview{position:relative;isolation:isolate;display:grid;place-items:center;width:100%;aspect-ratio:2/1;overflow:hidden;border-radius:17px;background:radial-gradient(ellipse at 50% 0%,var(--accent-soft),transparent 80%),var(--surface-2)}
.community-profile-wallpaper-preview>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2}
.community-profile-wallpaper-preview.has-image:after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,transparent 70%,#050b181a 90%,#050b1833)}
.community-profile-wallpaper-preview-identity{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;max-width:90%;padding:14px 0}
.community-profile-wallpaper-preview-identity>span{display:grid;place-items:center;flex:0 0 43px;width:43px;height:43px;border:2px solid var(--card,var(--bg));border-radius:14px;overflow:hidden;background:var(--surface-2);color:var(--accent);font-size:17px;font-weight:600}
.community-profile-wallpaper-preview-identity img{width:100%;height:100%;object-fit:cover}
.community-profile-wallpaper-preview-identity b{font-size:13px;line-height:1.5;font-weight:600;text-align:center;overflow-wrap:anywhere}
.community-profile-wallpaper-preview.has-image .community-profile-wallpaper-preview-identity b{color:#fff;text-shadow:0 1px 6px #0005}
.community-profile-wallpaper-preview.has-image .community-profile-wallpaper-preview-identity>span{border-color:#ffffffd9}
.community-profile-wallpaper-tip{font-size:11px;line-height:1.8;color:var(--muted);margin:12px 0 15px;text-align:center}
.community-profile-wallpaper-pickers{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center}
body .community-profile-wallpaper-sheet button{appearance:none;font:inherit;cursor:pointer;box-shadow:none!important;translate:none;-webkit-tap-highlight-color:transparent}
body .community-profile-wallpaper-pickers>button{display:flex;align-items:center;justify-content:center;gap:6px;min-height:40px;border:1px solid var(--border);border-radius:12px;padding:10px 13px;background:var(--surface-2);color:var(--text);font-size:11px;line-height:1.5}
.community-profile-wallpaper-pickers svg{width:16px;height:16px}
body #community-profile-wallpaper-remove{background:none;border-color:transparent;color:var(--muted);padding-inline:7px}
.community-profile-wallpaper-status{font-size:11px;line-height:1.75;color:var(--muted);margin:12px 0 0;overflow-wrap:anywhere}
.community-profile-wallpaper-status:empty{display:none}
body #community-profile-wallpaper-save{display:block;width:100%;min-height:44px;margin-top:18px;border:1px solid transparent;border-radius:13px;background:var(--accent);color:#111;padding:11px 16px;font-size:12px;font-weight:600;line-height:1.5}
.community-profile-wallpaper-sheet>small{display:block;font-size:9px;line-height:1.7;text-align:center;color:var(--muted);margin:10px 0 0}
.community-profile-wallpaper-sheet button:disabled{opacity:.45;cursor:default}
.community-profile-wallpaper-sheet button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.community-profile-wallpaper-sheet [hidden]{display:none!important}
[data-theme=light] #community-profile-wallpaper-save{color:#fff}
@media(max-width:360px){.community-profile-wallpaper-sheet h2{font-size:18px}}

/* Text remains readable while the photo itself keeps its detail. */
.community-profile-hero.has-wallpaper .community-profile-name{text-shadow:0 1px 2px rgb(var(--profile-fade-rgb)),0 0 12px rgba(var(--profile-fade-rgb),.85)}
.community-profile-hero.has-wallpaper .community-profile-name h1{text-shadow:inherit}
/* Fixed 2:1 crop stage; only its surface captures touch dragging. */
.community-profile-crop-editor{margin:0 0 14px;min-width:0}
.community-profile-crop-viewport{position:relative;width:100%;aspect-ratio:2/1;overflow:hidden;background:#0b0d11;border:0;border-radius:15px;box-shadow:inset 0 0 0 1px var(--border);touch-action:none}
.community-profile-crop-canvas{display:block;width:100%;height:100%;touch-action:none;cursor:grab;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.community-profile-crop-canvas:active{cursor:grabbing}
.community-profile-crop-canvas:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}
.community-profile-crop-viewport:after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(to right,transparent calc(33.333% - .5px),#ffffff30 33.333%,transparent calc(33.333% + .5px),transparent calc(66.666% - .5px),#ffffff30 66.666%,transparent calc(66.666% + .5px)),linear-gradient(to bottom,transparent calc(33.333% - .5px),#ffffff30 33.333%,transparent calc(33.333% + .5px),transparent calc(66.666% - .5px),#ffffff30 66.666%,transparent calc(66.666% + .5px))}
.community-profile-crop-hint{font-size:11px;color:var(--muted);line-height:1.75;margin:10px 0 15px;text-align:center}
.community-profile-crop-zoom{display:flex;align-items:center;gap:12px;font-size:11px;color:var(--muted);margin:0 0 16px}
.community-profile-crop-zoom input[type=range]{flex:1;min-width:0;width:auto;padding:0;height:28px;accent-color:var(--accent);background:none;border:0}
.community-profile-crop-zoom output{min-width:38px;text-align:right;font-variant-numeric:tabular-nums}
.community-profile-crop-actions{display:flex;align-items:center;gap:8px}
body .community-profile-crop-actions>button{display:flex;align-items:center;justify-content:center;min-height:40px;min-width:0;padding:9px 12px;border:1px solid var(--border);border-radius:11px;background:var(--surface-2);color:var(--text);font-size:11px;line-height:1.5}
body .community-profile-crop-actions>button:last-child{flex:1;background:var(--accent);color:#111;border-color:transparent;font-weight:600}
[data-theme=light] .community-profile-crop-actions>button:last-child{color:#fff}
@media(max-width:360px){.community-profile-crop-actions{gap:6px}.community-profile-crop-actions>button{padding-inline:9px}.community-profile-crop-zoom{gap:8px}}

/* Personal introduction and evenly spaced profile sections. */
body .community-profile-name .community-profile-signature{display:block;max-width:460px;margin:12px auto 0;padding:4px 5px;border:0;border-radius:7px;background:none;color:var(--muted);font:inherit;font-size:12px;font-weight:400;line-height:1.8;letter-spacing:0;text-align:center;white-space:pre-wrap;overflow-wrap:anywhere;text-shadow:inherit}
body .community-profile-name button.community-profile-signature{min-height:36px;cursor:pointer}
.community-profile-signature>svg{display:inline-block;width:12px;height:12px;margin-left:6px;vertical-align:-1px;opacity:.65;stroke-width:1.5}
body .community-profile-tabs>button{min-width:0;text-align:center;white-space:nowrap}
.community-profile-recommendations-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:59px;padding:13px 2px;color:var(--muted);font-size:11px}
body .community-profile-recommendations-head>button{padding:8px 10px;border:0;border-radius:10px;background:var(--accent-soft);color:var(--accent);font-size:11px}
.community-profile-recommendations-list{padding:0 0 16px}
body .community-profile-strategy-row{display:flex;align-items:center;gap:12px;width:100%;min-height:81px;padding:17px 2px;border:0;border-bottom:1px solid var(--profile-line);border-radius:0;background:none;text-align:left;color:var(--text)}
.community-profile-strategy-icon{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;border:1px solid var(--border);border-radius:13px;background:var(--accent-soft);color:var(--accent);font-size:19px;font-weight:600;line-height:1;box-shadow:inset 0 1px 0 #ffffff10}
.community-profile-strategy-icon.is-cfd{background:linear-gradient(145deg,#f5d89224,#b18b2612);color:#d4b573;border-color:#c7a34c20}
[data-theme=light] .community-profile-strategy-icon.is-cfd{color:#957123;background:linear-gradient(145deg,#fff6df,#f6eddd)}
.community-profile-strategy-copy{flex:1;min-width:0}
.community-profile-strategy-copy>b{display:block;color:var(--text);font-size:13px;font-weight:550;line-height:1.65;overflow-wrap:anywhere}
.community-profile-strategy-copy>small{display:block;margin-top:4px;color:var(--muted);font-size:10px;line-height:1.5}
.community-profile-strategy-arrow{font-size:22px;line-height:1;color:var(--muted);padding:4px 7px}
.community-profile-edit-sheet{min-width:0;color:var(--text)}
.community-profile-edit-sheet>header{margin:5px 27px 20px 0}
.community-profile-edit-sheet h2{margin:0;font-size:20px;font-weight:600;letter-spacing:-.025em;line-height:1.5}
.community-profile-edit-sheet header p{margin:5px 0 0;font-size:11px;line-height:1.8;color:var(--muted)}
.community-profile-signature-label{display:block;margin-bottom:9px;font-size:11px;color:var(--muted)}
.community-profile-edit-sheet textarea{display:block;width:100%;min-height:116px;max-height:200px;resize:vertical;padding:14px;border:1px solid var(--border);border-radius:15px;background:var(--surface-2);color:var(--text);font:inherit;font-size:16px;line-height:1.75}
.community-profile-edit-sheet textarea::placeholder{color:var(--muted);font-size:13px}
.community-profile-edit-counter{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:10px 1px 13px;color:var(--muted);font-size:10px;line-height:1.7}
.community-profile-edit-counter output{font-variant-numeric:tabular-nums;white-space:nowrap}
.community-profile-edit-status{margin:12px 0 0;color:var(--muted);font-size:11px;line-height:1.8;overflow-wrap:anywhere}
.community-profile-edit-status:empty{display:none}
body .community-profile-edit-save{display:block;width:100%;min-height:44px;margin-top:19px;padding:12px 16px;border:0;border-radius:13px;background:var(--accent);color:#111;font-size:13px;font-weight:600;line-height:1.5;box-shadow:none!important}
[data-theme=light] .community-profile-edit-save{color:#fff}
.community-profile-edit-sheet button:disabled,.community-profile-edit-sheet input:disabled,.community-profile-edit-sheet textarea:disabled{opacity:.5;cursor:default}
.community-profile-edit-sheet button:focus-visible,.community-profile-edit-sheet textarea:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.community-profile-strategy-choices{max-height:min(48vh,400px);overflow-y:auto;overscroll-behavior:contain;border:1px solid var(--border);border-radius:15px;background:var(--surface-2)}
.community-profile-strategy-choices>label{position:relative;display:flex;align-items:center;gap:10px;min-height:73px;padding:13px 12px;border-bottom:1px solid var(--border);cursor:pointer}
.community-profile-strategy-choices>label:last-child{border:0}
.community-profile-strategy-choices input{position:absolute;width:1px;height:1px;opacity:0;margin:0}
.community-profile-strategy-choices .community-profile-strategy-icon{width:34px;height:34px;flex-basis:34px;font-size:17px;border-radius:11px}
.community-profile-strategy-choices .community-profile-strategy-copy>b{font-size:12px}
.community-profile-choice-check{display:grid;place-items:center;flex:0 0 21px;width:21px;height:21px;border:1px solid var(--border);border-radius:7px;background:var(--bg);color:transparent}
.community-profile-choice-check svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.community-profile-strategy-choices input:checked~.community-profile-choice-check{background:var(--accent);border-color:var(--accent);color:#111}
[data-theme=light] .community-profile-strategy-choices input:checked~.community-profile-choice-check{color:#fff}
.community-profile-strategy-choices input:focus-visible~.community-profile-choice-check{outline:2px solid var(--accent);outline-offset:3px}
.community-profile-choice-empty{margin:0;padding:28px 15px;text-align:center;font-size:12px;line-height:1.8;color:var(--muted)}

/* A personal homepage is a full screen detail view with its own back control. */
body.ui-polished .app-shell:has(>#page>.community-profile)>.bottom-nav{display:none!important}
body.ui-polished:not(.chat-view) .app-shell:has(>#page>.community-profile){padding-bottom:env(safe-area-inset-bottom,0px)}
