/* Orion · mobile polish for iPhone and Android (social pages only; LIVE pages do not load this file).
   1. Safe areas: notch / Dynamic Island / home indicator when Scypho Live is installed as an app.
   2. Profile: photo button no longer covers the name; stats always in one row of three. */

/* --- Safe areas (env() is 0 in a normal browser tab, so nothing moves there) --- */
html body.social-screen:not(.video-feed) main{padding-top:max(24px,calc(env(safe-area-inset-top) + 12px))}
html .video-feed.social-screen header{height:calc(64px + env(safe-area-inset-top));padding-top:calc(10px + env(safe-area-inset-top))}
html .video-feed.social-screen #feed{margin-top:calc(64px + env(safe-area-inset-top));height:calc(100dvh - 130px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
html .video-feed.social-screen.has-live-strip #feed{margin-top:calc(164px + env(safe-area-inset-top));height:calc(100dvh - 230px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
html .video-feed #feed-status{top:calc(68px + env(safe-area-inset-top))}
html .social-screen .social-bottom{padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right))}

/* --- Profile --- */
/* The "+" photo button sits on the avatar edge instead of over the name. */
html body.profile-screen .profile-photo-button{top:58px;right:calc(50% - 48px)}
@media(min-width:760px){html body.profile-screen .profile-photo-button{top:98px;right:calc(50% - 66px)}}
html body.profile-screen .profile-hero h2,html body.profile-screen .profile-hero h1{margin-top:6px}
/* Following · Followers · Likes: one row on every phone, numbers shrink instead of wrapping. */
html body.profile-screen .follow-counts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin:18px 0}
html body.profile-screen .follow-counts>*{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:0;min-height:56px;padding:6px 2px;margin:0;border-radius:12px}
html body.profile-screen .follow-counts strong{margin:0;font-size:clamp(20px,6.4vw,28px);line-height:1.15}
html body.profile-screen .follow-counts span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
html body.profile-screen .follow-counts button:not(:disabled):active{background:#8b5cf61a}

/* Profile video grid: the pin button moves to the top corner so it never covers the view count. */
html .profile-videos .profile-video-pin{top:5px;bottom:auto;right:5px;width:30px;height:30px;min-height:30px;padding:5px;border-radius:50%;background:#0007;border-color:#ffffff40}
html .profile-videos .profile-video-pin svg{width:17px;height:17px}
html .profile-video-grid{gap:2px}
html .profile-video-grid a{border-radius:4px}
html .profile-video-grid span{font-weight:700}

/* Public profile: Follow and Messages side by side as the main actions; Report and Block as quieter buttons. */
html .public-user-screen .profile-hero>div:not(#profile-avatar):has(.follow-actions){display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px}
html .public-user-screen .profile-hero>div:not(#profile-avatar):has(.follow-actions)>:not(.follow-actions):not(#message-profile){flex-basis:100%}
html .public-user-screen .profile-hero .follow-actions{display:contents}
html .public-user-screen .profile-hero #follow-button{order:1}
html .public-user-screen .profile-hero #message-profile{order:2}
html .public-user-screen .profile-hero #community-report-open{order:3}
html .public-user-screen .profile-hero #block-profile{order:4}
html .public-user-screen .profile-hero .follow-actions>p,html .public-user-screen .profile-hero #block-manage,html .public-user-screen .profile-hero #follow-login{order:5;flex-basis:100%}
html .public-user-screen .profile-hero #follow-button,html .public-user-screen .profile-hero #message-profile{display:inline-flex;align-items:center;justify-content:center;flex:1 1 calc(50% - 8px);max-width:200px;min-width:0;min-height:44px;margin:0;font-weight:700;border-radius:12px;box-sizing:border-box}
html .public-user-screen .profile-hero #follow-button[hidden],html .public-user-screen .profile-hero #message-profile[hidden],html .public-user-screen .profile-hero #community-report-open[hidden],html .public-user-screen .profile-hero #block-profile[hidden]{display:none}
html .public-user-screen .profile-hero #community-report-open,html .public-user-screen .profile-hero #block-profile{flex:0 0 auto;min-width:0;min-height:36px;margin:2px 0 0;padding:6px 14px;font-size:13px;font-weight:600;background:transparent!important;border:1px solid #d9d9de!important;border-radius:999px;color:#666!important}

/* Video gift gallery on short phones (iPhone SE, small Android): keep the send button on screen. */
@media(max-height:700px){html .vg-dialog{padding:14px 16px;max-height:90dvh}html .vg-dialog .vg-catalog{max-height:34dvh}html .vg-dialog .vg-catalog button{min-height:82px;padding:8px 3px}html .vg-icon{font-size:26px}html .vg-primary{margin:10px 0}}

/* --- Touch --- */
html .social-screen button,html .social-screen a{-webkit-tap-highlight-color:transparent}
