/* NearNow Web v243 — mobile/desktop visual parity.
   Desktop is the visual source of truth; mobile only adapts geometry for narrow viewports. */
@media (max-width:860px){
  :root{
    --nn243-panel:linear-gradient(180deg,rgba(18,22,30,.94),rgba(10,12,17,.96));
    --nn243-panel-solid:#0d1118;
    --nn243-line:var(--line);
    --nn243-shadow:var(--shadow);
  }

  html,body,.app,.main,.content,.screen,.screen.active{
    background:transparent!important;
  }
  body{
    background:radial-gradient(circle at 44% 16%,#111728 0,#090b10 28%,#06070a 72%)!important;
  }
  .content{
    padding:14px 12px calc(88px + env(safe-area-inset-bottom))!important;
  }

  /* Same shell language as desktop. */
  .topbar{
    min-height:76px!important;
    padding:max(10px,env(safe-area-inset-top)) 12px 10px!important;
    gap:10px!important;
    border-bottom:1px solid var(--line)!important;
    background:rgba(7,9,13,.82)!important;
    backdrop-filter:blur(18px)!important;
    box-shadow:none!important;
  }
  .topbar .mode{
    padding:5px!important;
    gap:4px!important;
    border:1px solid var(--line)!important;
    border-radius:15px!important;
    background:#11151d!important;
    box-shadow:none!important;
  }
  .topbar .mode button{
    min-height:40px!important;
    padding:9px 14px!important;
    border:0!important;
    border-radius:11px!important;
    background:transparent!important;
    color:var(--muted)!important;
    box-shadow:none!important;
  }
  .topbar .mode button.active.connect{
    background:rgba(47,111,237,.18)!important;
    color:#dbe7ff!important;
    box-shadow:inset 0 0 0 1px rgba(47,111,237,.35)!important;
  }
  .topbar .mode button.active.sensual{
    background:rgba(169,31,69,.22)!important;
    color:#ffe3eb!important;
    box-shadow:inset 0 0 0 1px rgba(169,31,69,.38)!important;
  }
  .topbar .mode button.connect:not(.active),
  .topbar .mode button.sensual:not(.active){
    background:transparent!important;
    color:var(--muted)!important;
  }
  .top-actions .pill,.topbar button:not(.connect):not(.sensual),.recommend-friends{
    min-height:40px!important;
    padding:9px 13px!important;
    border:1px solid var(--line)!important;
    border-radius:12px!important;
    background:#10141b!important;
    color:#dde3ed!important;
    box-shadow:none!important;
  }
  .recommend-friends{
    border-color:rgba(63,212,122,.34)!important;
    background:rgba(63,212,122,.07)!important;
    color:#dfffea!important;
  }

  .sidebar{
    border-top:1px solid var(--line)!important;
    background:rgba(8,10,14,.96)!important;
    box-shadow:none!important;
  }
  .sidebar .nav button{
    color:#c7cdda!important;
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
  }
  .sidebar .nav button.active{
    background:#151923!important;
    color:#fff!important;
    box-shadow:inset 0 3px 0 var(--blue)!important;
  }
  .sensual-mode .sidebar .nav button.active{
    background:#151923!important;
    box-shadow:inset 0 3px 0 var(--red)!important;
  }
  .sidebar .nav button.active .icon{
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
  }

  /* Desktop card language everywhere; mobile changes only stacking and sizing. */
  .card,
  #screen-radar .radar-card,
  #screen-radar .sidebox,
  #screen-discover .discover-hero,
  #screen-discover .discover-filters,
  #screen-chats .chat-sidebar,
  #screen-chats .chat-thread,
  #screen-community .community-toolbar,
  #screen-profile .profile-overview,
  #screen-profile .profile-editor,
  #screen-profile .profile-summary{
    border:1px solid var(--line)!important;
    background:var(--nn243-panel)!important;
    box-shadow:var(--shadow)!important;
  }

  .pill,.intent,.choice-chip{
    border:1px solid #303747!important;
    background:#10151d!important;
    color:#cfd6e2!important;
    box-shadow:none!important;
  }
  .intent.on,.choice-chip.on{
    border-color:rgba(47,111,237,.55)!important;
    background:rgba(47,111,237,.12)!important;
    color:#e5edff!important;
  }
  .sensual-mode .intent.on,.sensual-mode .choice-chip.on{
    border-color:rgba(169,31,69,.58)!important;
    background:rgba(169,31,69,.15)!important;
    color:#ffe3eb!important;
  }

  /* Radar: desktop visuals, one-column mobile composition. */
  #screen-radar .radar-grid{
    grid-template-columns:1fr!important;
    gap:14px!important;
  }
  #screen-radar .radar-card{
    padding:18px 18px 14px!important;
    border-radius:22px!important;
  }
  #screen-radar .radar{
    min-height:0!important;
    height:auto!important;
    aspect-ratio:1/1!important;
    border-radius:20px!important;
    background:radial-gradient(circle at center,rgba(47,111,237,.12),transparent 23%),linear-gradient(180deg,#0a1018,#080a0f)!important;
    border:0!important;
    box-shadow:none!important;
  }
  .sensual-mode #screen-radar .radar{
    background:radial-gradient(circle at center,rgba(169,31,69,.17),transparent 24%),linear-gradient(180deg,#11090d,#080709)!important;
  }
  #screen-radar .sidecol{gap:14px!important;}
  #screen-radar .sidebox{
    padding:18px!important;
    border-radius:22px!important;
  }
  #screen-radar .stats{
    gap:8px!important;
    margin-top:15px!important;
  }
  #screen-radar .stat{
    display:block!important;
    min-height:0!important;
    padding:12px!important;
    border:1px solid var(--line)!important;
    border-radius:13px!important;
    background:#0d1118!important;
    box-shadow:none!important;
  }
  #screen-radar .stat::before,#screen-radar .stat span::after{display:none!important;content:none!important;}
  #screen-radar .stat b{font-size:20px!important;color:var(--text)!important;}
  #screen-radar .stat span{font-size:11px!important;color:var(--muted)!important;font-weight:400!important;}
  #screen-radar .spot{
    margin-top:14px!important;
    padding:15px!important;
    border:1px solid #4e4328!important;
    border-radius:15px!important;
    background:linear-gradient(135deg,rgba(217,178,95,.10),rgba(60,50,25,.03))!important;
    box-shadow:none!important;
  }
  #screen-radar .spot::before,#screen-radar .spot::after{display:none!important;content:none!important;}
  #screen-radar .spot strong{font-size:inherit!important;color:#f4df9d!important;text-shadow:none!important;}
  #screen-radar .spot .sub{max-width:none!important;color:var(--muted)!important;font-size:13px!important;}
  #screen-radar .spot .cta{background:var(--blue)!important;box-shadow:none!important;}
  .sensual-mode #screen-radar .spot .cta{background:var(--red)!important;}
  #screen-radar .locationbox{
    padding:18px!important;
    border:1px solid var(--line)!important;
    border-radius:22px!important;
    background:var(--nn243-panel)!important;
    box-shadow:var(--shadow)!important;
  }
  #screen-radar .location-state,#screen-radar .radar-location-toggle-row{
    border:1px solid var(--line)!important;
    border-radius:13px!important;
    background:#0d1118!important;
    box-shadow:none!important;
  }
  #screen-radar .location-actions .pill{background:#10141b!important;border:1px solid var(--line)!important;}

  /* Discover: retain desktop hero/filter visual system; only stack controls. */
  #screen-discover .discover-hero{
    padding:22px!important;
    border-radius:22px!important;
    background:radial-gradient(circle at 88% 0%,rgba(47,111,237,.16),transparent 30%),var(--nn243-panel)!important;
  }
  .sensual-mode #screen-discover .discover-hero{
    background:radial-gradient(circle at 88% 0%,rgba(169,31,69,.20),transparent 30%),linear-gradient(180deg,rgba(25,15,20,.96),rgba(10,9,12,.96))!important;
  }
  #screen-discover .discover-hero h2{font-size:30px!important;}
  #screen-discover .discover-filters{padding:16px 18px!important;border-radius:22px!important;}
  #screen-discover .discover-filter-grid{grid-template-columns:1fr 1fr!important;gap:10px!important;}
  #screen-discover .discover-wide{grid-column:1/-1!important;}
  #screen-discover input,#screen-discover select,#screen-discover .discover-interest-toggle{
    border:1px solid var(--line)!important;background:#0d1117!important;border-radius:11px!important;color:#edf1f7!important;box-shadow:none!important;
  }

  /* Community keeps desktop photo-card language and desktop neutral chrome. */
  #screen-community .community-page{gap:14px!important;}
  #screen-community .community-toolbar{padding:14px 16px!important;border-radius:22px!important;}
  #screen-community .community-category-photo{
    border:1px solid rgba(121,145,183,.26)!important;
    border-radius:14px!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 7px 20px rgba(0,0,0,.16)!important;
  }
  #screen-community .community-category-photo::after{display:none!important;content:none!important;}
  #screen-community .community-post,.community-inline-thread,.community-comment{
    background:#0d1117!important;border-color:var(--line)!important;box-shadow:none!important;
  }

  /* Chats return to the desktop conversation surfaces. */
  #screen-chats .chat-shell{
    gap:12px!important;
    background:transparent!important;
  }
  #screen-chats .chat-sidebar,#screen-chats .chat-thread{border-radius:22px!important;}
  #screen-chats .chat-sidebar-head,#screen-chats .chat-thread-head{
    background:transparent!important;
    border-bottom:1px solid var(--line)!important;
  }
  #screen-chats .chat-contact,
  #screen-chats .chat-contact.chat-contact-compact{
    border:1px solid transparent!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  #screen-chats .chat-contact:hover,#screen-chats .chat-contact.active{
    background:#121720!important;border-color:var(--line)!important;
  }
  #screen-chats .chat-messages{
    background:radial-gradient(circle at 50% 100%,rgba(47,111,237,.055),transparent 36%)!important;
  }
  .sensual-mode #screen-chats .chat-messages{
    background:radial-gradient(circle at 50% 100%,rgba(169,31,69,.08),transparent 36%)!important;
  }
  #screen-chats .bubble{background:#151a23!important;border:1px solid var(--line)!important;box-shadow:none!important;}
  #screen-chats .message-row.own .bubble{background:rgba(47,111,237,.22)!important;border-color:rgba(47,111,237,.35)!important;}
  .sensual-mode #screen-chats .message-row.own .bubble{background:rgba(169,31,69,.27)!important;border-color:rgba(169,31,69,.42)!important;}
  #screen-chats .chat-compose{background:rgba(10,13,19,.96)!important;border-top:1px solid var(--line)!important;box-shadow:none!important;}

  /* Own profile: exact desktop story-card language, stacked for width only. */
  #screen-profile:not(.viewing-other-profile) #profileOverviewCard{
    max-width:980px!important;
    margin:0 auto!important;
    background:var(--nn243-panel)!important;
    border:1px solid var(--line)!important;
    border-radius:22px!important;
    box-shadow:var(--shadow)!important;
  }
  #screen-profile:not(.viewing-other-profile) #profileOverviewCard .profile-overview-body,
  #screen-profile:not(.viewing-other-profile) #profileOverviewCard .own-profile-story-grid{gap:10px!important;}
  #screen-profile:not(.viewing-other-profile) #profileOverviewCard .own-profile-story-grid{
    grid-template-columns:1fr!important;
  }
  #screen-profile:not(.viewing-other-profile) #profileOverviewCard .own-profile-story-grid .own-profile-section{
    min-height:0!important;
    margin:0!important;
    padding:15px 16px!important;
    border:1px solid rgba(113,132,164,.22)!important;
    border-radius:16px!important;
    background:linear-gradient(180deg,rgba(17,23,34,.78),rgba(10,14,22,.86))!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.018)!important;
  }
  #screen-profile:not(.viewing-other-profile) #profileOverviewCard .own-profile-story-grid .own-profile-section::before{
    display:none!important;content:none!important;
  }
  #screen-profile:not(.viewing-other-profile) #profileOverviewCard .own-profile-section-head{
    min-height:0!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;
  }
  #screen-profile:not(.viewing-other-profile) #profileOverviewCard .own-profile-section-head::before{
    display:none!important;content:none!important;
  }
  #screen-profile:not(.viewing-other-profile) #profileOverviewCard .own-profile-section h4{
    margin:0 0 8px!important;color:#eef3fa!important;font-size:14px!important;text-transform:none!important;letter-spacing:0!important;
  }
  #screen-profile:not(.viewing-other-profile) #profileOverviewCard .own-profile-section h4::after{display:none!important;content:none!important;}
  #screen-profile:not(.viewing-other-profile) #profileOverviewCard .own-profile-copy{
    color:#dbe1eb!important;line-height:1.55!important;font-size:inherit!important;
  }
  #screen-profile:not(.viewing-other-profile) #profileOverviewCard .own-profile-chip,
  #screen-profile:not(.viewing-other-profile) #profileOverviewCard .profile-story-chip{
    border:1px solid #303747!important;background:#10151d!important;color:#d3dbe8!important;border-radius:999px!important;box-shadow:none!important;
  }
  #screen-profile:not(.viewing-other-profile) #profileOverviewCard .own-profile-edit-cue{
    width:auto!important;height:auto!important;min-width:0!important;flex:0 0 auto!important;padding:0!important;
    border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;
    color:#65a3ff!important;font-size:10px!important;font-weight:850!important;
  }
  .sensual-mode #screen-profile:not(.viewing-other-profile) #profileOverviewCard .own-profile-edit-cue{color:#ff78ad!important;}
  #screen-profile:not(.viewing-other-profile) #profileOverviewCard .own-profile-edit-cue::before{display:none!important;content:none!important;}
  #screen-profile:not(.viewing-other-profile) #profileOverviewCard .own-profile-media-row{
    min-height:0!important;padding:13px 14px!important;border:1px solid var(--line)!important;border-radius:14px!important;
    background:#0d1117!important;box-shadow:none!important;
  }
  #screen-profile:not(.viewing-other-profile) #profileOverviewCard .own-profile-media-row::before{display:none!important;content:none!important;}
  #screen-profile:not(.viewing-other-profile) #profileOverviewCard .own-profile-media-row:hover{background:#121720!important;}
  #screen-profile:not(.viewing-other-profile) #profileOverviewCard .own-profile-media-row b{font-size:inherit!important;color:var(--text)!important;}
  #screen-profile:not(.viewing-other-profile) #profileOverviewCard .own-profile-media-row>span{font-size:12px!important;color:var(--muted)!important;}
  #screen-profile:not(.viewing-other-profile) #profileOverviewCard .own-profile-restricted-section>.own-profile-section{
    margin:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;
  }
  #screen-profile:not(.viewing-other-profile) #profileOverviewCard .own-profile-quick-tags{display:none!important;}

  /* Keep the functional per-chat menu, but render it in the desktop palette. */
  #screen-chats .chat-list-menu-wrap{position:relative!important;display:inline-flex!important;z-index:12!important;}
  #screen-chats .chat-list-menu-button{
    width:34px!important;min-width:34px!important;height:34px!important;padding:0!important;
    display:grid!important;place-items:center!important;border:1px solid var(--line)!important;border-radius:11px!important;
    background:#10151d!important;color:#c7cdda!important;box-shadow:none!important;
  }
  #screen-chats .chat-list-menu-panel{
    position:absolute!important;right:0!important;top:calc(100% + 7px)!important;z-index:260!important;
    width:176px!important;padding:6px!important;display:grid!important;gap:3px!important;
    border:1px solid var(--line)!important;border-radius:14px!important;background:#0b0f15!important;
    box-shadow:0 18px 44px rgba(0,0,0,.52)!important;
  }
  #screen-chats .chat-list-menu-panel[hidden]{display:none!important;}
  #screen-chats .chat-list-menu-panel button{
    width:100%!important;min-height:42px!important;padding:8px 11px!important;border:0!important;border-radius:10px!important;
    background:transparent!important;color:#edf2ff!important;text-align:left!important;font-size:12px!important;font-weight:800!important;
  }
  #screen-chats .chat-list-menu-panel button:hover,#screen-chats .chat-list-menu-panel button:focus-visible{background:#151923!important;outline:none!important;}
  #screen-chats .chat-list-menu-panel button.danger{color:#ff9eb9!important;}

  @media(max-width:560px){
    .topbar{align-items:stretch!important;flex-wrap:wrap!important;}
    .topbar-left{width:100%!important;}
    .topbar .mode{width:100%!important;}
    .topbar .mode button{flex:1 1 50%!important;}
    .top-actions{width:100%!important;justify-content:flex-end!important;}
    #screen-discover .discover-filter-grid{grid-template-columns:1fr!important;}
    #screen-discover .discover-wide{grid-column:auto!important;}
    #screen-chats .chat-list-menu-panel{
      position:fixed!important;left:14px!important;right:14px!important;top:auto!important;
      bottom:calc(var(--nn-mobile-nav,70px) + env(safe-area-inset-bottom) + 10px)!important;width:auto!important;
    }
  }
}
