/* NearNow Web v181 — MOBILE_OTHER_PROFILE_VISUAL_MATCH.
   Mobile-only visual layer for foreign profiles. Functionality, DOM order, ids,
   profile actions, galleries, safety actions, API contracts and desktop layout remain unchanged. */
@media (max-width: 860px) {
  #screen-profile.viewing-other-profile{
    position:relative;
    isolation:isolate;
    --other-profile-accent:#2f82ff;
    --other-profile-accent-rgb:47,130,255;
  }
  .sensual-mode #screen-profile.viewing-other-profile{
    --other-profile-accent:#d43d7a;
    --other-profile-accent-rgb:212,61,122;
  }
  #screen-profile.viewing-other-profile::before{
    content:"";
    position:absolute;
    z-index:-1;
    inset:-110px -20px auto;
    height:760px;
    pointer-events:none;
    background:
      radial-gradient(circle at 86% 5%,rgba(var(--other-profile-accent-rgb),.18),transparent 34%),
      radial-gradient(circle at 9% 45%,rgba(26,74,166,.10),transparent 39%);
    filter:blur(6px);
  }
  .sensual-mode #screen-profile.viewing-other-profile::before{
    background:
      radial-gradient(circle at 86% 5%,rgba(var(--other-profile-accent-rgb),.19),transparent 34%),
      radial-gradient(circle at 9% 45%,rgba(111,34,127,.10),transparent 39%);
  }

  #screen-profile.viewing-other-profile .mock-page{
    max-width:none!important;
    width:100%!important;
    margin:0!important;
    padding:0 0 8px!important;
  }
  #screen-profile.viewing-other-profile .placeholder-grid{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:12px!important;
    width:100%!important;
  }
  #screen-profile.viewing-other-profile .viewed-profile-overview{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
    overflow:visible!important;
  }
  #screen-profile.viewing-other-profile .viewed-profile-head{
    left:10px!important;
    top:10px!important;
    z-index:40!important;
  }
  #screen-profile.viewing-other-profile .viewed-profile-back{
    width:44px!important;
    height:44px!important;
    border:1px solid rgba(111,155,220,.34)!important;
    border-radius:14px!important;
    background:linear-gradient(180deg,rgba(15,27,46,.92),rgba(7,15,27,.96))!important;
    color:#f6f9ff!important;
    font-size:27px!important;
    box-shadow:0 10px 26px rgba(0,0,0,.26),0 0 20px rgba(var(--other-profile-accent-rgb),.08)!important;
    backdrop-filter:blur(16px) saturate(1.1)!important;
    -webkit-backdrop-filter:blur(16px) saturate(1.1)!important;
  }
  .sensual-mode #screen-profile.viewing-other-profile .viewed-profile-back{
    border-color:rgba(206,81,132,.38)!important;
    background:linear-gradient(180deg,rgba(39,13,29,.93),rgba(18,8,17,.97))!important;
  }

  #screen-profile.viewing-other-profile .profile-story-shell{
    display:grid!important;
    gap:11px!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:0 0 6px!important;
  }

  /* Hero uses the original uploaded image and preserves the whole subject whenever possible. */
  #screen-profile.viewing-other-profile .profile-story-hero{
    position:relative!important;
    width:100%!important;
    max-width:none!important;
    height:min(58dvh,520px)!important;
    min-height:330px!important;
    aspect-ratio:auto!important;
    margin:0 0 1px!important;
    overflow:hidden!important;
    border:1px solid rgba(var(--other-profile-accent-rgb),.46)!important;
    border-radius:22px!important;
    background:
      radial-gradient(circle at 50% 18%,rgba(var(--other-profile-accent-rgb),.11),transparent 35%),
      #07101d!important;
    box-shadow:0 18px 42px rgba(0,0,0,.30),0 0 30px rgba(var(--other-profile-accent-rgb),.08),inset 0 1px 0 rgba(255,255,255,.025)!important;
  }
  #screen-profile.viewing-other-profile .profile-story-hero .viewed-profile-hero-image{
    display:block!important;
    width:100%!important;
    height:100%!important;
    max-width:none!important;
    max-height:none!important;
    object-fit:contain!important;
    object-position:center center!important;
    background:#07101d!important;
    border:0!important;
  }
  #screen-profile.viewing-other-profile .profile-story-hero.fallback-avatar .viewed-profile-hero-image{
    object-fit:contain!important;
    object-position:center center!important;
  }
  #screen-profile.viewing-other-profile .viewed-profile-hero-edge{
    border-radius:inherit!important;
    background:
      linear-gradient(180deg,rgba(4,8,15,.01) 0%,transparent 57%,rgba(4,8,15,.20) 78%,rgba(4,8,15,.67) 100%),
      linear-gradient(90deg,rgba(4,8,15,.28),transparent 12%,transparent 88%,rgba(4,8,15,.28))!important;
    box-shadow:inset 0 0 44px rgba(5,9,16,.12)!important;
  }

  #screen-profile.viewing-other-profile .profile-story-hero-thumbs{
    max-width:100%!important;
    margin:0!important;
    padding:2px 1px 3px!important;
    gap:7px!important;
    overflow-x:auto!important;
    scrollbar-width:none!important;
  }
  #screen-profile.viewing-other-profile .profile-story-hero-thumbs::-webkit-scrollbar{display:none!important;}
  #screen-profile.viewing-other-profile .profile-story-hero-thumb,
  #screen-profile.viewing-other-profile .profile-story-hero-more{
    flex:0 0 62px!important;
    height:54px!important;
    border:1px solid rgba(99,133,187,.32)!important;
    border-radius:11px!important;
    background:#09121f!important;
    box-shadow:none!important;
  }
  #screen-profile.viewing-other-profile .profile-story-hero-thumb.active{
    border-color:rgba(var(--other-profile-accent-rgb),.90)!important;
    box-shadow:0 0 0 1px rgba(var(--other-profile-accent-rgb),.22),0 7px 18px rgba(var(--other-profile-accent-rgb),.12)!important;
  }

  /* Identity card matches the premium own-profile hierarchy. */
  #screen-profile.viewing-other-profile .profile-story-identity{
    display:grid!important;
    gap:5px!important;
    margin:0!important;
    padding:15px!important;
    border:1px solid rgba(67,126,217,.31)!important;
    border-radius:19px!important;
    background:
      radial-gradient(circle at 100% 0%,rgba(var(--other-profile-accent-rgb),.13),transparent 35%),
      linear-gradient(180deg,rgba(10,21,38,.97),rgba(7,15,27,.99))!important;
    box-shadow:0 12px 28px rgba(0,0,0,.20),inset 0 1px 0 rgba(255,255,255,.02)!important;
  }
  .sensual-mode #screen-profile.viewing-other-profile .profile-story-identity{
    border-color:rgba(178,52,104,.31)!important;
    background:
      radial-gradient(circle at 100% 0%,rgba(var(--other-profile-accent-rgb),.14),transparent 35%),
      linear-gradient(180deg,rgba(34,11,26,.97),rgba(17,8,16,.99))!important;
  }
  #screen-profile.viewing-other-profile .profile-story-mode{
    margin:0!important;
    color:rgb(var(--other-profile-accent-rgb))!important;
    font-size:10px!important;
    line-height:1.15!important;
    font-weight:950!important;
    letter-spacing:.11em!important;
    text-transform:uppercase!important;
  }
  #screen-profile.viewing-other-profile .profile-story-name-line{
    display:flex!important;
    align-items:baseline!important;
    flex-wrap:wrap!important;
    gap:7px!important;
    min-width:0!important;
  }
  #screen-profile.viewing-other-profile .profile-story-name-line h2{
    margin:0!important;
    color:#f8faff!important;
    font-size:clamp(27px,7.4vw,34px)!important;
    line-height:1.04!important;
    font-weight:950!important;
    letter-spacing:-.035em!important;
  }
  #screen-profile.viewing-other-profile .profile-story-age{
    color:#cdd8e8!important;
    font-size:18px!important;
    font-weight:850!important;
  }
  #screen-profile.viewing-other-profile .profile-story-meta{
    color:#9ca9bd!important;
    font-size:11px!important;
    line-height:1.35!important;
  }
  #screen-profile.viewing-other-profile .profile-story-quick-tags{
    display:flex!important;
    gap:6px!important;
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    margin:2px 0 0!important;
    padding:1px 1px 2px!important;
    scrollbar-width:none!important;
  }
  #screen-profile.viewing-other-profile .profile-story-quick-tags::-webkit-scrollbar{display:none!important;}
  #screen-profile.viewing-other-profile .profile-story-chip,
  #screen-profile.viewing-other-profile .own-profile-chip{
    flex:0 0 auto!important;
    min-height:auto!important;
    border:1px solid rgba(var(--other-profile-accent-rgb),.30)!important;
    border-radius:999px!important;
    background:rgba(var(--other-profile-accent-rgb),.07)!important;
    color:#eaf2ff!important;
    padding:7px 10px!important;
    font-size:11px!important;
    line-height:1.1!important;
    font-weight:700!important;
  }

  /* Four established actions remain unchanged functionally, now fit every phone width. */
  #screen-profile.viewing-other-profile .profile-story-actions{
    position:relative!important;
    top:auto!important;
    z-index:auto!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
  #screen-profile.viewing-other-profile .profile-story-actions button{
    width:100%!important;
    min-width:0!important;
    min-height:46px!important;
    margin:0!important;
    padding:0 9px!important;
    border:1px solid rgba(89,127,188,.32)!important;
    border-radius:13px!important;
    background:linear-gradient(180deg,rgba(16,29,49,.96),rgba(9,18,32,.99))!important;
    color:#eaf1fb!important;
    font-size:clamp(10.5px,2.9vw,12px)!important;
    line-height:1.12!important;
    font-weight:850!important;
    white-space:normal!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important;
  }
  .sensual-mode #screen-profile.viewing-other-profile .profile-story-actions button{
    border-color:rgba(171,69,112,.32)!important;
    background:linear-gradient(180deg,rgba(46,17,34,.96),rgba(24,10,21,.99))!important;
  }
  #screen-profile.viewing-other-profile .profile-story-actions #profileContactBtn{
    grid-column:1/-1!important;
    border-color:rgba(100,162,255,.60)!important;
    background:linear-gradient(180deg,#3484ff,#286fe3)!important;
    color:#fff!important;
    font-size:14px!important;
    box-shadow:0 8px 20px rgba(31,103,225,.25),0 0 18px rgba(var(--other-profile-accent-rgb),.10),inset 0 1px 0 rgba(255,255,255,.16)!important;
  }
  .sensual-mode #screen-profile.viewing-other-profile .profile-story-actions #profileContactBtn{
    border-color:rgba(238,96,153,.56)!important;
    background:linear-gradient(180deg,#cf437d,#a92c60)!important;
    box-shadow:0 8px 20px rgba(166,37,89,.24),0 0 18px rgba(var(--other-profile-accent-rgb),.10),inset 0 1px 0 rgba(255,255,255,.13)!important;
  }
  #screen-profile.viewing-other-profile .profile-story-actions #profilePriorityPingBtn,
  #screen-profile.viewing-other-profile .profile-story-actions #profileSpeedDatingPlusKnockBtn{
    border-color:rgba(184,145,68,.36)!important;
    background:linear-gradient(180deg,rgba(52,42,22,.95),rgba(28,22,13,.99))!important;
    color:#efd995!important;
  }
  #screen-profile.viewing-other-profile .profile-story-actions button:disabled{
    opacity:.46!important;
    filter:saturate(.55)!important;
  }

  #screen-profile.viewing-other-profile .profile-story-action-error{
    margin:0!important;
    padding:11px 12px!important;
    border:1px solid rgba(255,96,120,.28)!important;
    border-radius:13px!important;
    background:rgba(80,20,33,.22)!important;
    color:#ffb5c1!important;
    font-size:11px!important;
    line-height:1.4!important;
  }

  /* Information sections use the same mobile card system as the other redesigned tabs. */
  #screen-profile.viewing-other-profile .profile-story-info-grid{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:9px!important;
  }
  #screen-profile.viewing-other-profile .profile-story-card{
    grid-column:auto!important;
    margin:0!important;
    padding:14px!important;
    border:1px solid rgba(76,120,190,.27)!important;
    border-radius:17px!important;
    background:
      radial-gradient(circle at 100% 0%,rgba(var(--other-profile-accent-rgb),.055),transparent 35%),
      linear-gradient(180deg,rgba(11,22,38,.95),rgba(7,15,27,.985))!important;
    box-shadow:0 9px 22px rgba(0,0,0,.15),inset 0 1px 0 rgba(255,255,255,.018)!important;
  }
  .sensual-mode #screen-profile.viewing-other-profile .profile-story-card{
    border-color:rgba(163,52,98,.27)!important;
    background:
      radial-gradient(circle at 100% 0%,rgba(var(--other-profile-accent-rgb),.06),transparent 35%),
      linear-gradient(180deg,rgba(30,11,24,.95),rgba(15,8,15,.985))!important;
  }
  #screen-profile.viewing-other-profile .profile-story-card h4{
    margin:0 0 7px!important;
    color:#f2f6fc!important;
    font-size:13px!important;
    line-height:1.2!important;
    font-weight:950!important;
  }
  #screen-profile.viewing-other-profile .profile-story-card .viewed-profile-copy{
    color:#cbd5e3!important;
    font-size:12px!important;
    line-height:1.55!important;
  }
  #screen-profile.viewing-other-profile .own-profile-chips{
    display:flex!important;
    flex-wrap:wrap!important;
    gap:6px!important;
  }
  #screen-profile.viewing-other-profile .viewed-profile-facts{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
  #screen-profile.viewing-other-profile .viewed-profile-fact{
    min-height:58px!important;
    padding:10px 11px!important;
    border:1px solid rgba(86,123,181,.24)!important;
    border-radius:13px!important;
    background:rgba(7,14,25,.72)!important;
  }
  #screen-profile.viewing-other-profile .viewed-profile-fact span{
    color:#8795a8!important;
    font-size:9.5px!important;
  }
  #screen-profile.viewing-other-profile .viewed-profile-fact b{
    margin-top:4px!important;
    color:#eef3fa!important;
    font-size:11.5px!important;
  }

  /* Public/private/secret galleries retain the original media and interactions. */
  #screen-profile.viewing-other-profile .profile-story-gallery-card{
    display:grid!important;
    gap:10px!important;
  }
  #screen-profile.viewing-other-profile .profile-story-gallery{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:7px!important;
  }
  #screen-profile.viewing-other-profile .profile-story-gallery button{
    aspect-ratio:1!important;
    min-width:0!important;
    overflow:hidden!important;
    border:1px solid rgba(90,132,201,.28)!important;
    border-radius:13px!important;
    background:#09121f!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.02)!important;
  }
  #screen-profile.viewing-other-profile .profile-story-gallery img,
  #screen-profile.viewing-other-profile .profile-story-gallery video{
    width:100%!important;
    height:100%!important;
    object-fit:cover!important;
  }
  #screen-profile.viewing-other-profile .profile-protected-badge{
    border-radius:999px!important;
    background:rgba(5,10,18,.80)!important;
    backdrop-filter:blur(8px)!important;
  }
  #screen-profile.viewing-other-profile .viewed-profile-locked{
    display:grid!important;
    gap:10px!important;
    padding:12px!important;
    border:1px solid rgba(121,145,184,.20)!important;
    border-radius:14px!important;
    background:rgba(7,14,25,.65)!important;
  }
  #screen-profile.viewing-other-profile .viewed-profile-locked-copy{
    display:grid!important;
    gap:4px!important;
  }
  #screen-profile.viewing-other-profile .viewed-profile-locked-copy b{color:#edf3fb!important;font-size:12px!important;}
  #screen-profile.viewing-other-profile .viewed-profile-locked-copy span{color:#98a5b8!important;font-size:10.5px!important;line-height:1.4!important;}
  #screen-profile.viewing-other-profile .viewed-profile-locked button,
  #screen-profile.viewing-other-profile #profileIncognitoReleaseBtn{
    min-height:42px!important;
    border:1px solid rgba(var(--other-profile-accent-rgb),.38)!important;
    border-radius:12px!important;
    background:rgba(var(--other-profile-accent-rgb),.11)!important;
    color:#eef5ff!important;
    font-size:11px!important;
    font-weight:850!important;
  }

  #screen-profile.viewing-other-profile .nn-empty-state{
    min-height:112px!important;
    padding:18px!important;
    border:1px dashed rgba(92,130,187,.27)!important;
    border-radius:15px!important;
    background:rgba(6,13,23,.48)!important;
  }
  #screen-profile.viewing-other-profile .nn-empty-state b{color:#eef3fa!important;font-size:12px!important;}
  #screen-profile.viewing-other-profile .nn-empty-state span{color:#8f9caf!important;font-size:10.5px!important;line-height:1.45!important;}

  /* Safety stays clearly separate from contact actions. */
  #screen-profile.viewing-other-profile .profile-story-safety-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    padding:2px 0 84px!important;
  }
  #screen-profile.viewing-other-profile .profile-story-safety-actions button{
    min-height:44px!important;
    margin:0!important;
    border:1px solid rgba(205,74,103,.30)!important;
    border-radius:13px!important;
    background:linear-gradient(180deg,rgba(48,19,29,.80),rgba(27,12,19,.92))!important;
    color:#f4b2c0!important;
    font-size:11px!important;
    font-weight:850!important;
  }
  #screen-profile.viewing-other-profile .profile-story-safety-actions #profileBlockBtn{
    border-color:rgba(229,71,85,.40)!important;
    color:#ffc2ca!important;
  }

  #screen-profile.viewing-other-profile .profile-story-loading,
  #screen-profile.viewing-other-profile .viewed-profile-error{
    border:1px solid rgba(75,119,189,.27)!important;
    border-radius:18px!important;
    background:linear-gradient(180deg,rgba(10,20,35,.95),rgba(7,14,25,.985))!important;
    box-shadow:0 10px 24px rgba(0,0,0,.18)!important;
  }

  @media (max-width: 390px) {
    #screen-profile.viewing-other-profile .profile-story-hero{
      height:min(54dvh,460px)!important;
      min-height:300px!important;
    }
    #screen-profile.viewing-other-profile .profile-story-actions button{
      min-height:44px!important;
      padding-inline:7px!important;
      font-size:10px!important;
    }
    #screen-profile.viewing-other-profile .profile-story-actions #profileContactBtn{font-size:13px!important;}
    #screen-profile.viewing-other-profile .profile-story-name-line h2{font-size:26px!important;}
    #screen-profile.viewing-other-profile .profile-story-gallery{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
    #screen-profile.viewing-other-profile .viewed-profile-facts{grid-template-columns:1fr 1fr!important;}
  }
}
