/* Fixed overlay: opening or loading a profile never changes the feed layout. */
.profile-hover{position:fixed;z-index:110;width:min(320px,calc(100vw - 24px));max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;--profile-hover-padding:16px;padding:var(--profile-hover-padding);border:0;border-radius:12px;--profile-hover-surface:#fff;background:var(--profile-hover-surface);color:var(--text);box-shadow:0 18px 46px #1722382e,0 3px 10px #17223814;font-family:var(--font-ui);font-size:14px;line-height:1.4;opacity:0;transform:translateY(4px);transition:opacity .14s ease,transform .14s ease;pointer-events:none}
.profile-hover.is-open{opacity:1;transform:translateY(0);pointer-events:auto}
.profile-hover[hidden]{display:none!important}
:root[data-theme="dark"] .profile-hover{--profile-hover-surface:#242630;box-shadow:0 20px 50px #0009,0 3px 12px #0005}

.profile-hover-head{display:flex;align-items:center;gap:12px;width:100%;min-width:0;min-height:64px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--text);font:inherit;text-align:left;cursor:pointer}
.profile-hover-head>.avatar{width:64px;height:64px;flex:none}
.profile-hover-identity{display:flex;flex:1;flex-direction:column;gap:3px;min-width:0;overflow:hidden}
.profile-hover-identity>strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:17px;font-weight:700;line-height:1.3}
.profile-hover-identity>span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:12px;line-height:1.4}

.profile-hover-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:14px 0}
.profile-hover-stat{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;min-width:0;min-height:48px;padding:4px 0;border:0;border-radius:5px;background:transparent;color:var(--text);font:inherit;text-align:center;cursor:pointer}
.profile-hover-stat+.profile-hover-stat{position:relative}
.profile-hover-stat+.profile-hover-stat::before{content:"";position:absolute;left:-3px;top:50%;height:24px;width:1px;transform:translateY(-50%);background:#26385217;pointer-events:none}
:root[data-theme="dark"] .profile-hover-stat+.profile-hover-stat::before{background:#e3e8ff20}
.profile-hover-stat>strong{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px;font-weight:700;line-height:1.3;font-variant-numeric:tabular-nums}
.profile-hover-stat>span{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:12px;font-weight:500;line-height:1.4}

.profile-hover-previews{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;margin:0 calc(-1 * var(--profile-hover-padding)) 14px}
.profile-hover-preview,.profile-hover-placeholder{position:relative;display:block;min-width:0;min-height:44px;width:100%;aspect-ratio:1 / 1.12;margin:0;padding:0;overflow:hidden;border:0;border-radius:0;background:var(--panel);color:var(--muted)}
.profile-hover-preview{cursor:pointer}
.profile-hover-preview>img{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:100%;object-fit:cover}
.profile-hover-preview>.icon{position:absolute;top:6px;right:6px;width:18px;height:18px;color:#fff;filter:drop-shadow(0 1px 3px #0008);pointer-events:none}
.profile-hover-placeholder{display:flex;align-items:center;justify-content:center}
.profile-hover-preview>.profile-hover-placeholder{position:absolute;inset:0;height:100%}
.profile-hover-empty{grid-column:1/-1;display:flex;align-items:center;justify-content:center;min-height:88px;margin:0;padding:12px;border-radius:0;background:var(--panel);color:var(--muted);font-size:12px;line-height:1.4;text-align:center}

/* Follow styling is local to this popover; the white overlay label is untouched.
   Follow remains stationary on hover, press and pending network requests. */
.profile-hover-follow{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:44px;padding:10px 14px;border:0;border-radius:8px;background:var(--button-bg);color:var(--text);font:inherit;font-size:14px;font-weight:700;line-height:1.4;cursor:pointer;transform:none;scale:1;transition:background-color .16s ease,color .16s ease,box-shadow .16s ease}
.profile-hover-follow:hover{background:var(--button-hover)}
.profile-hover-follow.is-followed,.profile-hover-follow.is-followed:hover{background:var(--followed-bg,var(--button-bg));color:var(--followed-text,var(--text))}
.profile-hover-follow:disabled{opacity:1;cursor:pointer}
.profile-hover-follow:active{transform:none;scale:1}
:root .profile-hover button.profile-hover-follow:is(:hover,:active,:disabled,[aria-pressed])>.icon{scale:1;transform:none}
.profile-hover-follow[hidden]{display:none!important}

.profile-hover-status{display:flex;align-items:center;flex-direction:column;gap:8px;margin-top:10px;color:var(--muted);font-size:12px;line-height:1.45;text-align:center;overflow-wrap:anywhere}
.profile-hover-status:empty{display:none}
.profile-hover-retry{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:8px 14px;border:0;border-radius:6px;background:var(--button-bg);color:var(--text);font:inherit;font-size:13px;font-weight:600;cursor:pointer}
.profile-hover-retry:hover{background:var(--button-hover)}
.profile-hover :is(button,a):focus-visible{outline:2px solid var(--text);outline-offset:2px}
.profile-hover .profile-hover-preview:focus-visible{outline-offset:-2px}
.profile-hover-follow.is-followed:focus-visible{outline-color:var(--text)}

.profile-hover.is-loading .profile-hover-placeholder{background:linear-gradient(110deg,var(--panel) 25%,var(--button-bg) 45%,var(--panel) 65%);background-size:200% 100%;animation:profile-hover-skeleton 1.4s ease-in-out infinite}
.profile-hover.is-loading .profile-hover-identity>strong:empty,.profile-hover.is-loading .profile-hover-identity>span:empty,.profile-hover.is-loading .profile-hover-stat>strong:empty{min-height:1.3em;border-radius:4px;background:var(--button-bg)}
.profile-hover.is-loading .profile-hover-identity>strong:empty{width:80%}
.profile-hover.is-loading .profile-hover-identity>span:empty{width:60%}
.profile-hover.is-loading .profile-hover-stat>strong:empty{width:32px}
@keyframes profile-hover-skeleton{from{background-position:100% 0}to{background-position:-100% 0}}
@media(max-width:320px){.profile-hover{--profile-hover-padding:12px}.profile-hover-head{gap:10px}.profile-hover-stats{gap:4px}}
@media(prefers-reduced-motion:reduce){.profile-hover{transform:none;transition:none}.profile-hover-follow{transition:none}.profile-hover.is-loading .profile-hover-placeholder{animation:none}}
