/* NOMI 2026-10-25: cover and compact owner/visitor profiles only.
   Scope prevents side effects in chat, gifts, news and advertising screens. */
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-unified{
  min-width:0!important;
  overflow:visible;
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-cover{
  position:relative;
  display:block;
  width:calc(100% + 32px);
  height:clamp(145px,22vw,212px);
  margin:-16px -16px 0;
  padding:0;
  border:0;
  border-radius:17px 17px 0 0;
  background:linear-gradient(120deg,#352047,#6e3d84 50%,#24183a);
  overflow:hidden;
  cursor:zoom-in;
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-cover:disabled{
  cursor:default;opacity:1;
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-cover-image{
  display:block;width:100%;height:100%;object-fit:cover;object-position:center 35%;
  filter:brightness(.85);
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-cover-image[hidden]{display:none!important}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-cover::after{
  content:"";position:absolute;inset:55% 0 0;pointer-events:none;
  background:linear-gradient(transparent,rgba(23,10,41,.63));
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-v2-owner-top{
  position:relative;z-index:1;margin-top:-30px!important;
  padding:0 8px;align-items:end;
  grid-template-columns:96px minmax(0,1fr)!important;gap:12px!important;
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) :is(.nomi-avatar-block,.nomi-v2-avatar-wrap){
  width:96px!important;height:96px!important;z-index:2;
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) :is(.nomi-avatar,.nomi-avatar-placeholder,.nomi-v2-public-avatar,.nomi-v2-avatar-fallback){
  width:96px!important;height:96px!important;
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) :is(.nomi-v2-owner-details,.nomi-v2-public-about){
  padding-top:34px!important;min-width:0!important;
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-v2-stats{
  display:flex!important;align-items:center!important;justify-content:flex-start!important;
  flex-wrap:nowrap!important;overflow-x:auto;overflow-y:visible;
  gap:5px!important;width:calc(100% - 16px)!important;
  margin:8px 8px 5px!important;scrollbar-width:thin;
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-v2-stats>:is(.nomi-v2-stat,.nomi-profile-likes,.nomi-profile-relation-directory){
  flex:0 1 auto!important;width:auto!important;min-width:46px!important;
  max-width:max-content!important;min-height:33px!important;
  margin:0!important;white-space:nowrap!important;
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) :is(.nomi-v2-stat,.nomi-profile-relation-count,.nomi-profile-likes){
  font-size:12px!important;padding:5px 8px!important;
  border-radius:9px!important;line-height:1.3!important;white-space:nowrap!important;
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-v2-stat[role=link]{
  cursor:pointer;
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-information{
  margin-top:6px!important;padding-top:7px!important;
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-information-label{
  margin-bottom:2px!important;font-size:12px!important;
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-controls{
  gap:5px!important;margin-bottom:8px!important;
}
html[data-nomi-theme] #profileScreen .nomi-profile-primary-actions{
  grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr) minmax(0,1.25fr) 42px!important;gap:5px!important;
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-primary-actions>.nomi-profile-more{
  min-width:42px!important;
}
html[data-nomi-theme] #profileScreen #nomiPromoteMyProfile{
  display:flex!important;justify-content:center!important;align-items:center!important;
  min-width:0!important;width:100%!important;min-height:38px!important;
  background:linear-gradient(120deg,#7225b7,#a53ce0)!important;
  border:1px solid #c177e4!important;color:white!important;box-shadow:none!important;
  font-weight:700!important;font-size:12px!important;padding:7px 5px!important;
  border-radius:10px!important;cursor:pointer!important;
}
html[data-nomi-theme] #profileScreen #nomiPromoteMyProfile:disabled{opacity:.65!important}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-primary-actions .nomi-profile-control{
  min-width:0!important;min-height:38px!important;font-size:12px!important;padding:7px 5px!important;
}
@media(max-width:650px){
 html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-unified{
  padding:10px!important;border-radius:14px!important;margin-bottom:8px!important;
 }
 html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-cover{
  width:calc(100% + 20px);height:clamp(124px,39vw,160px);
  margin:-10px -10px 0;border-radius:13px 13px 0 0;
 }
 html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-v2-owner-top{
  grid-template-columns:73px minmax(0,1fr)!important;gap:10px!important;
  padding:0 2px!important;margin-top:-24px!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:73px!important;height:73px!important;min-width:73px!important;
 }
 html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) :is(.nomi-v2-owner-details,.nomi-v2-public-about){
  padding-top:28px!important;
 }
 html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) :is(.nomi-v2-owner-details,.nomi-v2-public-about) h2{
  font-size:19px!important;line-height:1.18!important;margin-bottom:2px!important;
 }
 html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) :is(.nomi-v2-info,.nomi-v2-handle,.nomi-presence){
  font-size:11.5px!important;line-height:1.25!important;margin:2px 0!important;
 }
 html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-v2-stats{
  width:100%!important;margin:7px 0 4px!important;gap:4px!important;
 }
 html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-v2-stats>:is(.nomi-v2-stat,.nomi-profile-likes,.nomi-profile-relation-directory){
  min-width:40px!important;min-height:30px!important;
 }
 html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) :is(.nomi-v2-stat,.nomi-profile-relation-count,.nomi-profile-likes){
  font-size:11.5px!important;padding:4px 6px!important;min-height:30px!important;
 }
 html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-information{
  margin-top:4px!important;padding-top:5px!important;
 }
 html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-information>:is(.nomi-v2-quote,.nomi-v2-bio,.nomi-v4-bio){
  font-size:13px!important;line-height:1.35!important;-webkit-line-clamp:1;
 }
 html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-read-more{
  font-size:12px!important;margin-top:1px!important;min-height:22px!important;
 }
 html[data-nomi-theme] #profileScreen .nomi-profile-primary-actions{
  grid-template-columns:minmax(0,1.2fr) minmax(0,.7fr) minmax(0,1.1fr) 38px!important;
  gap:4px!important;
 }
 html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-primary-actions .nomi-profile-control,
 html[data-nomi-theme] #profileScreen #nomiPromoteMyProfile{
  font-size:11.5px!important;min-height:38px!important;padding:5px 3px!important;
 }
 html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-more>summary{
  min-width:38px!important;width:38px!important;
 }
}
@media(max-width:360px){
 html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-v2-owner-top{grid-template-columns:66px minmax(0,1fr)!important;gap:8px!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:66px!important;height:66px!important;min-width:66px!important}
 html[data-nomi-theme] #profileScreen #nomiPromoteMyProfile{font-size:10.5px!important}
}

/* 2026-10-25: full profile text must override both desktop two-line and
   mobile one-line clamps, including earlier !important theme rules. */
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-information.is-expanded > :is(.nomi-v2-quote,.nomi-v2-bio,.nomi-v4-bio){
 display:block!important;-webkit-line-clamp:unset!important;line-clamp:unset!important;
 overflow:visible!important;max-height:none!important;white-space:pre-wrap!important;
 overflow-wrap:anywhere;
}
/* Reusable clear and tactile dismiss action, in light and dark theme. */
html[data-nomi-theme] .nomi-green-close{
 display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;
 min-height:38px!important;width:auto;max-width:100%;padding:7px 12px!important;
 border-radius:10px!important;border:1px solid #1ba955!important;
 background:#78f6a0!important;color:#073b1c!important;
 font:700 14px/1.2 Arial,sans-serif!important;text-decoration:none!important;
 box-shadow:0 1px 4px #071a0b25!important;cursor:pointer!important;
 white-space:normal;
}
html[data-nomi-theme] .nomi-green-close::before{
 content:"✓";display:inline-grid;place-items:center;flex:0 0 19px;
 width:19px;height:19px;border-radius:50%;background:#087b37;color:#fff;
 font:800 14px/1 Arial,sans-serif;
}
html[data-nomi-theme] .nomi-green-close:is(:hover,:focus-visible){
 background:#a7ffc2!important;border-color:#0b8e41!important;
 outline:2px solid #169e51;outline-offset:2px;
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-read-more.nomi-green-close{
 display:inline-flex!important;margin:6px 0 0 auto!important;
 padding:6px 11px!important;min-height:34px!important;
 background:#78f6a0!important;color:#073b1c!important;border:1px solid #1ba955!important;
}
html[data-nomi-theme] #nomiPublicProfile #nomiPublicClose.nomi-green-close{
 background:#78f6a0!important;color:#073b1c!important;border-color:#1ba955!important;
 margin:0!important;
}
html[data-nomi-theme] .nomi-editor-inline-close{
 display:flex!important;width:max-content!important;margin:0 0 9px auto!important;
}
html[data-nomi-theme] .nomi-profile-menu-panel>.nomi-green-close{
 display:flex!important;width:100%!important;margin-top:8px!important;
}
html[data-nomi-theme] dialog[open]>.nomi-close-affordance{
 display:flex!important;width:max-content!important;margin:0 0 10px auto!important;
 position:relative;z-index:3;
}
@media(max-width:650px){
 html[data-nomi-theme] .nomi-green-close{min-height:38px!important;font-size:13px!important;padding:7px 10px!important}
 html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-read-more.nomi-green-close{min-height:34px!important}
}

/* Revisions: only the check CIRCLE is green; the full button follows NOMI. */
html[data-nomi-theme] .nomi-green-close,
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-read-more.nomi-green-close,
html[data-nomi-theme] #nomiPublicProfile .nomi-profile-dialog-bar #nomiPublicClose.nomi-green-close{
 background:var(--nomi-site-soft,#302047)!important;
 color:var(--nomi-site-text,#f4edff)!important;
 border:1px solid var(--nomi-site-border,#60416c)!important;
 box-shadow:none!important;
}
html[data-nomi-theme] .nomi-green-close:is(:hover,:focus-visible),
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-read-more.nomi-green-close:is(:hover,:focus-visible),
html[data-nomi-theme] #nomiPublicProfile .nomi-profile-dialog-bar #nomiPublicClose.nomi-green-close:is(:hover,:focus-visible){
 background:var(--nomi-site-surface,#281936)!important;
 color:var(--nomi-site-text,#f4edff)!important;
 border-color:var(--nomi-site-accent,#b97fe8)!important;
 outline:2px solid var(--nomi-site-accent,#b97fe8);outline-offset:2px;
}
html[data-nomi-theme] .nomi-green-close::before{
 background:#30ed80!important;color:#064423!important;
 border:1px solid #1fc569;box-shadow:none;
}
/* Expanding a narrow "..." trigger must give its inline menu a full row. */
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-primary-actions > :is(.nomi-profile-edit-menu,.nomi-profile-more)[open]{
 grid-column:1/-1!important;width:100%!important;min-width:0!important;max-width:none!important;
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-primary-actions > :is(.nomi-profile-edit-menu,.nomi-profile-more)[open] > summary{
 width:max-content;max-width:100%;margin-left:auto;
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-secondary-actions:has(> .nomi-profile-more[open]){
 flex-wrap:wrap!important;
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-secondary-actions > .nomi-profile-more[open]{
 flex:1 0 100%!important;width:100%!important;min-width:0!important;max-width:none!important;
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-secondary-actions > .nomi-profile-more[open] > summary{
 margin-left:auto;
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) :is(.nomi-profile-more,.nomi-profile-edit-menu)[open] > .nomi-profile-menu-panel{
 position:static!important;inset:auto!important;
 display:grid!important;width:100%!important;min-width:0!important;max-width:none!important;
 gap:6px;overflow:visible!important;max-height:none!important;margin-top:7px!important;
 padding:9px!important;border-radius:11px;
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) :is(.nomi-profile-more,.nomi-profile-edit-menu)[open] > .nomi-profile-menu-panel :is(button,a,label,summary){
 width:100%!important;min-width:0!important;max-width:100%!important;
 white-space:normal!important;overflow-wrap:break-word!important;word-break:normal!important;
 line-height:1.4!important;text-align:left!important;justify-content:flex-start!important;
 font-size:14px!important;min-height:40px!important;
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-profile-more[open]{z-index:15!important}

/* Keep profile names directly above @handles on phones and tablets.
   The generic .auth-card h2 rule otherwise centres the owner's name. */
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile)
  :is(.nomi-v2-owner-details,.nomi-v2-public-about) > h2 {
  text-align:left!important;
}

/* NOMI responsive profile alignment (2026-10-25). Only profile headers
   and owner profile buttons; do not touch the feed, chats, or other sections. */
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile)
  .nomi-v2-owner-top > :is(.nomi-v2-owner-details,.nomi-v2-public-about) {
  text-align:left!important;
  justify-self:start!important;
  min-width:0!important;
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile)
  .nomi-v2-owner-top > :is(.nomi-v2-owner-details,.nomi-v2-public-about) > h2 {
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  text-align:left!important;
  margin:0 0 3px!important;
}
/* All FOUR main actions have identical width and height on every screen. */
html[data-nomi-theme] #profileScreen .nomi-profile-owner-controls > .nomi-profile-primary-actions {
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:6px!important;
  align-items:stretch!important;
  width:100%!important;
}
html[data-nomi-theme] #profileScreen .nomi-profile-owner-controls
  .nomi-profile-primary-actions > :is(.nomi-profile-edit-menu,.nomi-profile-more):not([open]) {
  align-self:stretch!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  height:50px!important;
  min-height:50px!important;
  margin:0!important;
  box-sizing:border-box!important;
}
html[data-nomi-theme] #profileScreen .nomi-profile-owner-controls
  .nomi-profile-primary-actions > :is(.nomi-profile-edit-menu,.nomi-profile-more):not([open]) > summary,
html[data-nomi-theme] #profileScreen .nomi-profile-owner-controls
  .nomi-profile-primary-actions > label.nomi-profile-control,
html[data-nomi-theme] #profileScreen .nomi-profile-owner-controls
  .nomi-profile-primary-actions > #nomiPromoteMyProfile {
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  align-self:stretch!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  height:50px!important;
  min-height:50px!important;
  margin:0!important;
  padding:5px 3px!important;
  box-sizing:border-box!important;
  font-size:clamp(10px,1.8vw,13px)!important;
  line-height:1.18!important;
  white-space:normal!important;
  overflow-wrap:break-word!important;
  text-align:center!important;
}
html[data-nomi-theme] #profileScreen .nomi-profile-owner-controls
  .nomi-profile-primary-actions > :is(.nomi-profile-edit-menu,.nomi-profile-more)[open] {
  height:auto!important;
}
/* Six profile sections: three matching columns, exactly two matching rows. */
html[data-nomi-theme] #profileScreen .nomi-v2-tabs {
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-auto-rows:48px!important;
  align-items:stretch!important;
  gap:6px!important;
}
html[data-nomi-theme] #profileScreen .nomi-v2-tabs > .nomi-v2-tab {
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  height:48px!important;
  min-height:48px!important;
  margin:0!important;
  padding:5px 3px!important;
  box-sizing:border-box!important;
  line-height:1.2!important;
  text-align:center!important;
}
@media(max-width:420px) {
  html[data-nomi-theme] #profileScreen .nomi-profile-owner-controls > .nomi-profile-primary-actions {
    gap:4px!important;
  }
  html[data-nomi-theme] #profileScreen .nomi-profile-owner-controls
    .nomi-profile-primary-actions > :is(.nomi-profile-edit-menu,.nomi-profile-more):not([open]),
  html[data-nomi-theme] #profileScreen .nomi-profile-owner-controls
    .nomi-profile-primary-actions > :is(.nomi-profile-edit-menu,.nomi-profile-more):not([open]) > summary,
  html[data-nomi-theme] #profileScreen .nomi-profile-owner-controls
    .nomi-profile-primary-actions > label.nomi-profile-control,
  html[data-nomi-theme] #profileScreen .nomi-profile-owner-controls
    .nomi-profile-primary-actions > #nomiPromoteMyProfile {
    height:54px!important;
    min-height:54px!important;
  }
}

/* 2026-10-25: unobtrusive universal open/close affordance.
   The parent control retains its size, color and original click behavior. */
html[data-nomi-theme] .nomi-has-collapse-hint{position:relative}
html[data-nomi-theme] .nomi-collapse-hint{
 display:inline-flex;align-items:center;justify-content:center;gap:4px;
 margin-inline-start:5px;white-space:nowrap;vertical-align:middle;
 font:700 11px/1.15 Arial,sans-serif;color:inherit;
 pointer-events:none;user-select:none;flex:0 0 auto;
}
html[data-nomi-theme] .nomi-collapse-hint::before{
 content:"✓";display:inline-grid;place-items:center;flex:0 0 16px;
 width:16px;height:16px;border-radius:50%;
 border:1px solid #16bd64;background:#30ed80;color:#064423;
 box-sizing:border-box;font:800 12px/1 Arial,sans-serif;
}
html[data-nomi-theme] .nomi-collapse-hint::after{
 content:attr(data-nomi-close-label);color:inherit;
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-v2-tabs>.nomi-v2-tab.nomi-has-collapse-hint{
 flex-direction:column!important;gap:2px!important;
}
html[data-nomi-theme] :is(#profileScreen,#nomiPublicProfile) .nomi-v2-tabs>.nomi-v2-tab.nomi-has-collapse-hint .nomi-collapse-hint{
 margin:0!important;font-size:10px!important;
}
html[data-nomi-theme] .nomi-collapse-icon-only .nomi-collapse-hint{
 position:absolute;right:2px;bottom:2px;margin:0;gap:0;
}
html[data-nomi-theme] .nomi-collapse-icon-only .nomi-collapse-hint::after{content:none}
