/* One visual language for owner and visitor profiles; intentionally scoped. */
:is(#profileScreen,#nomiPublicProfile){--np-bg:#150d27;--np-card:#241238;--np-soft:#321b49;--np-border:#6d3d91;--np-text:#fcf5ff;--np-muted:#c7addc;--np-accent:#c66cff;--np-primary:linear-gradient(115deg,#8b25d0,#a235dc);font-family:Arial,Helvetica,sans-serif;box-sizing:border-box}
html[data-nomi-theme="light"] :is(#profileScreen,#nomiPublicProfile){--np-bg:#f7f2fc;--np-card:#fff;--np-soft:#f0e5f8;--np-border:#c6a9d9;--np-text:#2c173c;--np-muted:#61486f;--np-accent:#794098;--np-primary:linear-gradient(115deg,#7d39ac,#9651bd)}
:is(#profileScreen,#nomiPublicProfile) *, :is(#profileScreen,#nomiPublicProfile) *::before,:is(#profileScreen,#nomiPublicProfile) *::after{box-sizing:border-box}
:is(#profileScreen,#nomiPublicProfile) [hidden]{display:none!important}
html[data-nomi-theme] #profileScreen{padding:16px 12px 80px!important;width:100%;max-width:980px;margin-inline:auto}
html[data-nomi-theme] #profileScreen>.auth-card{max-width:none;width:100%;padding:0!important;border:0!important;box-shadow:none!important;background:transparent!important}
#profileScreen>.auth-card>h2,#profileScreen>.auth-card>p:first-of-type,#profileScreen>.auth-card>.nomi-v2-old-edit{display:none!important}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-unified{display:block!important;position:relative;border:1px solid var(--np-border)!important;border-radius:18px!important;padding:16px!important;margin:0 0 12px!important;background:linear-gradient(130deg,var(--np-soft),var(--np-card) 65%)!important;color:var(--np-text)!important;overflow:visible}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-v2-owner-top{display:grid!important;grid-template-columns:108px minmax(0,1fr);align-items:start;gap:18px!important;flex-wrap:nowrap!important}
:is(#profileScreen,#nomiPublicProfile) :is(.nomi-v2-owner-details,.nomi-v2-public-about){min-width:0;width:auto!important;max-width:none;flex:initial;text-align:left}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) :is(.nomi-avatar-block,.nomi-v2-avatar-wrap){position:relative;width:108px;height:108px;margin:0!important;min-width:0!important;align-self:start}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) :is(.nomi-avatar,.nomi-avatar-placeholder,.nomi-v2-public-avatar,.nomi-v2-avatar-fallback){display:block;width:108px!important;height:108px!important;min-width:0!important;max-width:100%!important;aspect-ratio:1;object-fit:cover!important;border:3px solid #b95eea!important;border-radius:50%!important;box-shadow:0 0 0 4px #ad54d217!important;margin:0!important}
:is(#profileScreen,#nomiPublicProfile) .nomi-avatar-placeholder{display:grid!important;place-items:center;background:var(--np-soft);font-size:34px}
#profileScreen .nomi-avatar-upload,#profileScreen .nomi-v2-avatar-pencil{display:none!important}
#profileAvatarMessage:empty{display:none}
#profileAvatarMessage:not(:empty){position:absolute;left:0;top:100%;width:230px;padding:8px;background:var(--np-card);border:1px solid var(--np-border);z-index:4}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) :is(.nomi-v2-owner-details,.nomi-v2-public-about) h2{font:700 25px/1.15 Arial,sans-serif!important;color:var(--np-text)!important;margin:0 0 4px!important;overflow-wrap:anywhere}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) :is(.nomi-v2-handle,.nomi-v2-info,.nomi-presence){font:400 14px/1.4 Arial,sans-serif!important;color:var(--np-muted);margin:3px 0!important;overflow-wrap:anywhere}
:is(#profileScreen,#nomiPublicProfile) .nomi-v2-info>.nomi-presence{display:block;margin-top:4px!important}
:is(#profileScreen,#nomiPublicProfile) .nomi-presence.nomi-online{color:#75e5ad!important}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-v2-stats{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));align-items:start;gap:6px!important;margin:10px 0 0!important}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-v2-stats>:is(.nomi-v2-stat,.nomi-profile-likes,.nomi-profile-relation-directory){width:100%!important;min-width:0;min-height:34px;height:auto;max-width:none;margin:0!important}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) :is(.nomi-v2-stat,.nomi-profile-likes,.nomi-profile-relation-count){background:var(--np-soft)!important;color:var(--np-text)!important;border:1px solid var(--np-border)!important;border-radius:9px!important;box-shadow:none!important;font:500 13px/1.3 Arial,sans-serif!important;min-height:34px;padding:7px 8px!important;justify-content:center;white-space:normal;text-align:center}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-likes{display:flex!important;align-items:center;gap:5px!important;padding:0 6px!important;position:relative}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-likes button.nomi-profile-like-button{width:30px!important;height:32px!important;min-height:32px!important;padding:0!important;background:transparent!important;border:0!important;border-radius:6px!important;font:400 22px/1 Arial,sans-serif!important;color:#f194c6!important;box-shadow:none!important}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-like-count{font:500 13px/1.3 Arial,sans-serif!important;color:var(--np-text)!important;padding:4px!important;min-height:30px!important;background:transparent!important}
:is(#profileScreen,#nomiPublicProfile) .nomi-profile-likes>small:not(:empty){position:absolute;top:100%;right:0;z-index:6;background:var(--np-card);padding:10px;border:1px solid var(--np-border);min-width:180px}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-photo-progress{grid-column:1/-1;margin:4px 0 0!important;padding:12px!important;width:100%!important;color:var(--np-text)!important;font-size:13px!important;border-color:var(--np-border)!important;background:var(--np-card)!important}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-information{margin-top:12px;padding-top:10px;border-top:1px solid var(--np-border);text-align:left;min-width:0;position:relative}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-information-label{margin:0 0 5px!important;font:500 13px/1.3 Arial,sans-serif!important;color:var(--np-muted)!important}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-information>:is(.nomi-v2-quote,.nomi-v2-bio,.nomi-v4-bio){font:400 15px/1.45 Arial,sans-serif!important;color:var(--np-text)!important;margin:0!important;white-space:pre-wrap;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
:is(#profileScreen,#nomiPublicProfile) .nomi-profile-information.is-expanded>:is(.nomi-v2-quote,.nomi-v2-bio,.nomi-v4-bio){display:block;-webkit-line-clamp:unset;overflow:visible}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-read-more{display:block;margin:4px 0 0 auto!important;padding:4px 0!important;min-height:28px!important;background:transparent!important;box-shadow:none!important;border:0!important;color:var(--np-accent)!important;font:500 13px/1.3 Arial,sans-serif!important;cursor:pointer}
:is(#profileScreen,#nomiPublicProfile) .nomi-profile-empty-value{font-size:14px;color:var(--np-muted);margin:0}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-controls{display:grid!important;gap:8px!important;margin:0 0 12px!important;position:relative;z-index:5;width:100%}
:is(#profileScreen,#nomiPublicProfile) .nomi-profile-primary-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
#profileScreen .nomi-profile-primary-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
:is(#profileScreen,#nomiPublicProfile) .nomi-profile-secondary-actions{display:flex;align-items:start;gap:7px}
:is(#profileScreen,#nomiPublicProfile) .nomi-profile-secondary-actions>:not(.nomi-profile-more){flex:1;min-width:0}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) :is(.nomi-profile-control,.nomi-profile-controls .nomi-v2-pill,#nomiPromoteMyProfile){display:flex;align-items:center;justify-content:center;min-height:42px;padding:9px 10px!important;font:600 14px/1.25 Arial,sans-serif!important;color:var(--np-text)!important;background:var(--np-soft)!important;border:1px solid var(--np-border)!important;border-radius:11px!important;box-shadow:none!important;text-decoration:none;text-align:center;cursor:pointer;white-space:normal;max-width:100%}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) :is(.nomi-profile-primary,.nomi-profile-primary-actions>[data-profile-action="message"]){background:var(--np-primary)!important;border-color:#a347d8!important;color:white!important}
:is(#profileScreen,#nomiPublicProfile) :is(.nomi-profile-edit-menu,.nomi-profile-more,.nomi-profile-relation-directory){position:relative;min-width:0}
:is(#profileScreen,#nomiPublicProfile) summary{list-style:none;cursor:pointer}
:is(#profileScreen,#nomiPublicProfile) summary::-webkit-details-marker{display:none}
:is(#profileScreen,#nomiPublicProfile) .nomi-profile-more>summary{width:42px;min-width:42px;font-size:22px!important;padding:5px!important}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-menu-panel{position:absolute;z-index:30;top:calc(100% + 6px);right:0;width:min(270px,calc(100vw - 42px));padding:8px;border-radius:12px;border:1px solid var(--np-border)!important;background:var(--np-card)!important;color:var(--np-text)!important;box-shadow:0 10px 30px #0005;max-height:65dvh;overflow:auto}
:is(#profileScreen,#nomiPublicProfile) .nomi-profile-edit-menu>.nomi-profile-menu-panel{right:auto;left:0}
:is(#profileScreen,#nomiPublicProfile) .nomi-profile-menu-panel>:is(button,a),:is(#profileScreen,#nomiPublicProfile) .nomi-profile-menu-panel .nomi-v4-edit-actions>button{width:100%;min-height:40px;text-align:left;justify-content:flex-start;display:flex;margin:3px 0!important;padding:9px!important;font:500 14px/1.3 Arial,sans-serif!important;border-radius:8px!important}
:is(#profileScreen,#nomiPublicProfile) .nomi-profile-menu-panel .nomi-v4-edit-actions{display:grid;gap:4px;padding:0;margin:0;border:0}
:is(#profileScreen,#nomiPublicProfile) .nomi-profile-menu-panel .nomi-v2-relation-menu{width:100%}
:is(#profileScreen,#nomiPublicProfile) .nomi-profile-relation-directory[open]{z-index:20}
:is(#profileScreen,#nomiPublicProfile) .nomi-profile-relation-count{display:flex;align-items:center;width:100%}
:is(#profileScreen,#nomiPublicProfile) .nomi-profile-relation-list{font-size:14px}
:is(#profileScreen,#nomiPublicProfile) .nomi-profile-relation-list input{width:100%;max-width:100%;min-width:0;padding:9px;margin:8px 0;background:var(--np-soft);border:1px solid var(--np-border);border-radius:8px;color:var(--np-text);font-size:16px}
:is(#profileScreen,#nomiPublicProfile) .nomi-profile-relation-person{display:block;width:100%;padding:9px;border:0;border-radius:6px;background:transparent;color:var(--np-text);text-align:left;font:500 14px/1.3 Arial,sans-serif;cursor:pointer}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-v2-tabs{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px!important;overflow:visible!important;width:100%;padding:0!important;margin:0 0 12px!important}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-v2-tabs>.nomi-v2-tab{width:100%;min-width:0;min-height:42px!important;flex:initial!important;border:1px solid var(--np-border)!important;border-radius:11px!important;padding:9px 3px!important;background:var(--np-soft)!important;color:var(--np-text)!important;font:500 13px/1.25 Arial,sans-serif!important;white-space:normal;overflow-wrap:anywhere}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-v2-tabs>.nomi-v2-tab.active{background:var(--np-primary)!important;border-color:#a347d8!important;color:white!important;box-shadow:none!important}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) :is(.nomi-profile-timeline,.nomi-v2-pane,.nomi-v2-owner-pane){min-width:0;width:100%}
:is(#profileScreen,#nomiPublicProfile) .nomi-profile-timeline-title{display:none}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-feed-post{padding:12px!important;border:1px solid var(--np-border)!important;border-radius:16px!important;background:var(--np-card)!important;color:var(--np-text)!important;margin:0 0 12px!important}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-feed-post-head{gap:9px!important;margin-bottom:10px;min-width:0}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-feed-avatar{width:40px!important;height:40px!important;min-width:40px!important}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-feed-author{font-size:15px!important;color:var(--np-text)!important}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-feed-person small{font-size:12px!important;color:var(--np-muted)!important}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-feed-media img{display:block;width:100%;max-height:440px;object-fit:contain;border-radius:12px}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-feed-tools{display:flex;flex-wrap:wrap;gap:5px!important;margin-top:7px!important;padding-top:6px!important}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-feed-btn{padding:7px!important;min-height:34px;font:500 12px/1.3 Arial,sans-serif!important;color:var(--np-text)!important;background:var(--np-soft)!important;border:1px solid var(--np-border)!important;border-radius:8px!important}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-feed-emojis{gap:4px!important;margin:6px 0!important}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-feed-emoji{padding:4px 6px!important;min-width:0!important;min-height:30px;font-size:16px!important}
html[data-nomi-theme] #nomiPublicProfile{padding:16px!important;color:var(--np-text)!important;background:var(--np-bg)!important;border:1px solid var(--np-border)!important;width:min(850px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:96dvh;border-radius:20px}
#nomiPublicContent{min-width:0}
#nomiPublicClose{font-size:14px!important;min-height:40px!important;padding:8px 13px!important;margin:0 0 12px!important;border-radius:10px!important}
.nomi-profile-person-link{display:flex;align-items:center;gap:10px;width:100%;border:1px solid var(--np-border);background:var(--np-card);color:var(--np-text);padding:10px;border-radius:10px;margin:7px 0;text-align:left}
.nomi-profile-person-link img{width:40px;height:40px;object-fit:cover;border-radius:50%}
:is(#profileScreen,#nomiPublicProfile) :is(button,summary,a,label[role=button]):focus-visible{outline:3px solid var(--np-accent)!important;outline-offset:3px}
@media(max-width:650px){
 html[data-nomi-theme] #profileScreen{padding:10px 8px 76px!important}
 html[data-nomi-theme] #nomiPublicProfile{inset:0;margin:0;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border:0!important;border-radius:0;padding:12px 10px 76px!important}
 html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-unified{padding:13px!important;border-radius:16px!important}
 html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-v2-owner-top{grid-template-columns:82px minmax(0,1fr);gap:12px!important}
 html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) :is(.nomi-avatar-block,.nomi-v2-avatar-wrap){width:82px;height:82px}
 html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) :is(.nomi-avatar,.nomi-avatar-placeholder,.nomi-v2-public-avatar,.nomi-v2-avatar-fallback){width:82px!important;height:82px!important}
 html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) :is(.nomi-v2-owner-details,.nomi-v2-public-about) h2{font-size:21px!important}
 html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) :is(.nomi-v2-handle,.nomi-v2-info,.nomi-presence){font-size:12px!important}
 html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-v2-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px!important;margin-top:8px!important}
 html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) :is(.nomi-v2-stat,.nomi-profile-relation-count){font-size:12px!important;padding:6px 4px!important}
 html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-information>:is(.nomi-v2-quote,.nomi-v2-bio,.nomi-v4-bio){font-size:14px!important;line-height:1.45!important}
 html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) :is(.nomi-profile-control,.nomi-profile-controls .nomi-v2-pill,#nomiPromoteMyProfile){font-size:13px!important;padding:8px 7px!important}
}
@media(max-width:350px){html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-v2-owner-top{grid-template-columns:68px minmax(0,1fr);gap:9px!important}html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) :is(.nomi-avatar-block,.nomi-v2-avatar-wrap,.nomi-avatar,.nomi-avatar-placeholder,.nomi-v2-public-avatar,.nomi-v2-avatar-fallback){width:68px!important;height:68px!important}}
.nomi-profile-bottom-nav{display:none}
#nomiPublicProfile .nomi-profile-dialog-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
#nomiPublicProfile .nomi-profile-dialog-bar>strong{font-size:23px;letter-spacing:.5px;color:var(--np-accent)}
#nomiPublicProfile .nomi-profile-dialog-bar #nomiPublicClose{margin:0!important;min-height:38px!important;background:var(--np-soft)!important;color:var(--np-text)!important;border:1px solid var(--np-border)!important}
@media(max-width:650px){
 :is(#profileScreen,#nomiPublicProfile)>.nomi-profile-bottom-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;position:fixed;z-index:60;inset-inline:0;bottom:0;background:var(--np-bg);border-top:1px solid var(--np-border);padding:8px 8px max(8px,env(safe-area-inset-bottom));min-height:61px}
 .nomi-profile-bottom-nav>a{display:grid;place-items:center;gap:4px;text-decoration:none;color:var(--np-muted);font-size:11px;min-height:42px}
 .nomi-profile-bottom-nav>a[aria-current=page]{color:var(--np-accent)}
 .nomi-profile-nav-icon{font:400 25px/1 Arial,sans-serif}
 #nomiPublicProfile .nomi-profile-dialog-bar{margin-bottom:12px}
}

.nomi-profile-nav-icon svg{display:block;width:24px;height:24px}
:is(#profileScreen,#nomiPublicProfile) .nomi-photo-progress{order:10}
/* Hidden progress, private controls and avatar placeholders must remain hidden. */
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) [hidden]{display:none!important}

/* Keep the same compact badge order when likes arrive asynchronously. */
:is(#profileScreen,#nomiPublicProfile) .nomi-v2-stats>.nomi-v2-stat{order:0}
:is(#profileScreen,#nomiPublicProfile) .nomi-v2-stats>.nomi-profile-likes{order:1}
:is(#profileScreen,#nomiPublicProfile) .nomi-v2-stats>.nomi-profile-relation-directory{order:2}
