
/* NeXt Chapter Recovery v1.7.3 — Recovery Community Social UI */

:root{
  --ncr-social-bg:#fff1dd;
  --ncr-social-bg2:#f9d4aa;
  --ncr-social-surface:#fffaf3;
  --ncr-social-card:#fffdf8;
  --ncr-social-ink:#21150f;
  --ncr-social-muted:rgba(33,21,15,.70);
  --ncr-social-soft:rgba(33,21,15,.52);
  --ncr-social-border:rgba(130,45,19,.16);
  --ncr-social-rust:#a8321b;
  --ncr-social-orange:#ed7a1e;
  --ncr-social-gold:#f5aa3d;
  --ncr-social-shadow:0 20px 52px rgba(65,28,9,.10);
}
html[data-theme="dark"]{
  --ncr-social-bg:#100806;
  --ncr-social-bg2:#21110a;
  --ncr-social-surface:#17100c;
  --ncr-social-card:#1b100b;
  --ncr-social-ink:#fff4e5;
  --ncr-social-muted:rgba(255,244,229,.72);
  --ncr-social-soft:rgba(255,244,229,.52);
  --ncr-social-border:rgba(245,170,61,.20);
  --ncr-social-shadow:0 20px 52px rgba(0,0,0,.28);
}

.ncr-community-page{
  background:
    radial-gradient(circle at 80% 14%, rgba(237,122,30,.18), transparent 34%),
    linear-gradient(180deg,var(--ncr-social-bg),#fff8ef 52%,var(--ncr-social-bg))!important;
}
html[data-theme="dark"] .ncr-community-page{
  background:
    radial-gradient(circle at 80% 14%, rgba(237,122,30,.16), transparent 34%),
    linear-gradient(180deg,#100806,#1a0f0a 52%,#100806)!important;
}
.ncr-community-page .ncr-shell-hero{
  background:
    radial-gradient(circle at 84% 18%, rgba(237,122,30,.24), transparent 36%),
    linear-gradient(135deg,#fff1dd,#f8d4a9)!important;
  color:var(--ncr-social-ink)!important;
}
html[data-theme="dark"] .ncr-community-page .ncr-shell-hero{
  background:
    radial-gradient(circle at 84% 18%, rgba(237,122,30,.22), transparent 36%),
    linear-gradient(135deg,#130b08,#281207)!important;
}
.ncr-community-page .ncr-shell-title{
  color:var(--ncr-social-ink)!important;
  max-width:12ch!important;
}
.ncr-community-page .ncr-shell-lead{
  color:var(--ncr-social-muted)!important;
  max-width:68ch!important;
}
.ncr-page-hero-visual.ncr-community-visual{
  padding:1rem!important;
  background:rgba(255,255,255,.42)!important;
  border:1px solid var(--ncr-social-border)!important;
}
html[data-theme="dark"] .ncr-page-hero-visual.ncr-community-visual{
  background:rgba(255,255,255,.06)!important;
}
.ncr-community-preview{
  width:100%;
  max-width:430px;
  display:grid;
  gap:.85rem;
}
.ncr-community-preview-card{
  background:var(--ncr-social-card);
  border:1px solid var(--ncr-social-border);
  border-radius:22px;
  padding:1rem;
  box-shadow:var(--ncr-social-shadow);
}
.ncr-community-preview-card header{
  display:flex;
  align-items:center;
  gap:.75rem;
  margin-bottom:.75rem;
}
.ncr-community-preview-avatar{
  width:48px;
  height:48px;
  border-radius:999px;
  background:linear-gradient(135deg,var(--ncr-social-rust),var(--ncr-social-orange));
  display:grid;
  place-items:center;
  color:#fff;
  font-weight:950;
}
.ncr-community-preview-card strong{
  display:block;
  color:var(--ncr-social-ink);
}
.ncr-community-preview-card span{
  display:block;
  color:var(--ncr-social-soft);
  font-size:.85rem;
  font-weight:800;
}
.ncr-community-preview-card p{
  color:var(--ncr-social-muted)!important;
  margin:0 0 .75rem!important;
}
.ncr-community-preview-actions{
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
}
.ncr-community-preview-actions b{
  border-radius:999px;
  background:rgba(237,122,30,.12);
  color:var(--ncr-social-rust);
  padding:.38rem .65rem;
  font-size:.78rem;
  font-weight:950;
}

/* Social app layout */
.ncr-social-app{
  display:grid;
  grid-template-columns:minmax(220px,260px) minmax(0,1fr) minmax(230px,280px);
  gap:1rem;
  align-items:start;
  color:var(--ncr-social-ink);
}
.ncr-social-rail,
.ncr-social-main,
.ncr-social-login-card,
.ncr-groups-social,
.ncr-profile-social-page,
.ncr-social-notifications{
  min-width:0;
}
.ncr-social-profile-card,
.ncr-social-quick-nav,
.ncr-social-widget,
.ncr-social-composer,
.ncr-social-post,
.ncr-social-empty,
.ncr-groups-head,
.ncr-group-card,
.ncr-profile-hero-card,
.ncr-profile-settings,
.ncr-social-notifications article,
.ncr-social-login-card{
  background:var(--ncr-social-card)!important;
  border:1px solid var(--ncr-social-border)!important;
  border-radius:24px!important;
  box-shadow:var(--ncr-social-shadow)!important;
}
.ncr-social-rail{
  display:grid;
  gap:1rem;
  position:sticky;
  top:112px;
}
.ncr-social-main{
  display:grid;
  gap:1rem;
}
.ncr-profile-cover,
.ncr-profile-banner{
  height:78px;
  border-radius:22px 22px 0 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(245,170,61,.9), transparent 30%),
    linear-gradient(135deg,var(--ncr-social-rust),var(--ncr-social-orange));
}
.ncr-profile-card-body{
  padding:0 1rem 1rem;
  margin-top:-28px;
}
.ncr-social-avatar{
  border-radius:999px!important;
  border:4px solid var(--ncr-social-card)!important;
  background:#fff!important;
  object-fit:cover!important;
}
.ncr-profile-card-body h3,
.ncr-profile-identity h2,
.ncr-social-widget h3,
.ncr-groups-head h2,
.ncr-profile-settings h3,
.ncr-social-notifications h2{
  color:var(--ncr-social-ink)!important;
  margin:.6rem 0 .35rem!important;
  font-family:Georgia,"Times New Roman",serif!important;
  line-height:1.1!important;
}
.ncr-profile-card-body p,
.ncr-social-widget li,
.ncr-groups-head p,
.ncr-group-card p,
.ncr-profile-hero-card p,
.ncr-social-notifications p{
  color:var(--ncr-social-muted)!important;
  line-height:1.65!important;
}
.ncr-profile-card-body a,
.ncr-social-quick-nav a,
.ncr-widget-group,
.ncr-social-btn,
.ncr-group-card button,
.ncr-profile-settings button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:42px!important;
  border-radius:999px!important;
  text-decoration:none!important;
  font-weight:950!important;
}
.ncr-profile-card-body a,
.ncr-social-btn.primary,
.ncr-group-card button,
.ncr-profile-settings button{
  background:linear-gradient(135deg,var(--ncr-social-rust),var(--ncr-social-orange))!important;
  color:#fff!important;
  border:0!important;
  padding:.7rem 1rem!important;
}
.ncr-social-quick-nav{
  display:grid;
  gap:.25rem;
  padding:.65rem;
}
.ncr-social-quick-nav a{
  justify-content:flex-start!important;
  color:var(--ncr-social-ink)!important;
  background:transparent!important;
  padding:.72rem .9rem!important;
}
.ncr-social-quick-nav a:hover{
  background:rgba(237,122,30,.12)!important;
  color:var(--ncr-social-rust)!important;
}
.ncr-social-widget{
  padding:1rem;
}
.ncr-social-widget ul{
  padding-left:1.1rem;
  margin:.6rem 0 0;
}
.ncr-widget-group{
  justify-content:flex-start!important;
  gap:.65rem!important;
  color:var(--ncr-social-ink)!important;
  background:rgba(237,122,30,.08)!important;
  border:1px solid rgba(237,122,30,.12)!important;
  padding:.75rem!important;
  margin:.55rem 0 0!important;
}
.ncr-widget-group span{
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:rgba(237,122,30,.16);
  color:var(--ncr-social-rust);
  font-weight:950;
}

/* Feed tabs and composer */
.ncr-social-tabs{
  display:flex;
  gap:.5rem;
  padding:.55rem;
  background:var(--ncr-social-card);
  border:1px solid var(--ncr-social-border);
  border-radius:999px;
  box-shadow:var(--ncr-social-shadow);
}
.ncr-social-tabs a{
  flex:1;
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  color:var(--ncr-social-muted);
  text-decoration:none;
  font-weight:950;
}
.ncr-social-tabs a.active,
.ncr-social-tabs a:hover{
  background:linear-gradient(135deg,var(--ncr-social-rust),var(--ncr-social-orange));
  color:#fff;
}
.ncr-social-composer{
  padding:1rem!important;
}
.ncr-composer-row{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:.85rem;
}
.ncr-composer-body textarea{
  width:100%!important;
  border:0!important;
  background:rgba(237,122,30,.06)!important;
  border-radius:18px!important;
  color:var(--ncr-social-ink)!important;
  min-height:100px!important;
  resize:vertical;
}
.ncr-composer-tools{
  display:flex;
  gap:.65rem;
  margin-top:.65rem;
  align-items:center;
}
.ncr-composer-tools select{
  min-height:42px!important;
  border-radius:999px!important;
  border:1px solid var(--ncr-social-border)!important;
  background:var(--ncr-social-surface)!important;
  color:var(--ncr-social-ink)!important;
}
.ncr-composer-tools button{
  margin-left:auto;
  min-height:42px!important;
  border-radius:999px!important;
  border:0!important;
  background:linear-gradient(135deg,var(--ncr-social-rust),var(--ncr-social-orange))!important;
  color:#fff!important;
  font-weight:950!important;
  padding:.7rem 1.1rem!important;
}

/* Posts */
.ncr-social-feed-list{
  display:grid;
  gap:1rem;
}
.ncr-social-post{
  padding:1rem!important;
}
.ncr-post-header{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:.75rem;
  margin-bottom:.85rem;
}
.ncr-post-header strong{
  color:var(--ncr-social-ink);
  display:block;
}
.ncr-post-header span{
  color:var(--ncr-social-soft);
  font-size:.86rem;
  font-weight:800;
}
.ncr-post-header em{
  font-style:normal;
  color:var(--ncr-social-rust);
  background:rgba(237,122,30,.12);
  border-radius:999px;
  padding:.35rem .6rem;
  font-size:.78rem;
  font-weight:950;
}
.ncr-post-content{
  color:var(--ncr-social-muted);
  font-size:1.02rem;
  line-height:1.7;
}
.ncr-post-actions{
  display:flex;
  flex-wrap:wrap;
  gap:.45rem;
  padding:.8rem 0;
  border-top:1px solid var(--ncr-social-border);
  border-bottom:1px solid var(--ncr-social-border);
  margin-top:.75rem;
}
.ncr-post-actions form{
  margin:0!important;
}
.ncr-post-actions button{
  min-height:36px!important;
  border-radius:999px!important;
  border:1px solid rgba(237,122,30,.18)!important;
  background:rgba(237,122,30,.08)!important;
  color:var(--ncr-social-rust)!important;
  padding:.48rem .7rem!important;
  font-size:.84rem!important;
  font-weight:950!important;
}
.ncr-post-comments{
  display:grid;
  gap:.65rem;
  margin-top:.75rem;
}
.ncr-comment{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:.55rem;
  align-items:start;
}
.ncr-comment p{
  margin:0!important;
  padding:.65rem .8rem;
  border-radius:16px;
  background:rgba(237,122,30,.08);
  color:var(--ncr-social-muted)!important;
}
.ncr-comment p strong{
  color:var(--ncr-social-ink);
}
.ncr-comment-form{
  display:grid;
  grid-template-columns:1fr auto;
  gap:.55rem;
}
.ncr-comment-form input{
  border-radius:999px!important;
  border:1px solid var(--ncr-social-border)!important;
  background:var(--ncr-social-surface)!important;
  color:var(--ncr-social-ink)!important;
}
.ncr-comment-form button{
  border-radius:999px!important;
  border:0!important;
  background:var(--ncr-social-rust)!important;
  color:#fff!important;
  font-weight:950!important;
}
.ncr-report-form{
  text-align:right;
  margin-top:.45rem!important;
}
.ncr-report-form button{
  background:transparent!important;
  color:var(--ncr-social-soft)!important;
  border:0!important;
  font-size:.8rem!important;
  font-weight:800!important;
}

/* Groups/Profile/Notifications */
.ncr-groups-social,
.ncr-profile-social-page,
.ncr-social-notifications,
.ncr-social-login-card{
  display:grid;
  gap:1rem;
}
.ncr-groups-head,
.ncr-social-login-card{
  padding:1.2rem;
}
.ncr-group-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));
  gap:1rem;
}
.ncr-group-card{
  padding:1.15rem!important;
}
.ncr-group-icon{
  width:52px;
  height:52px;
  border-radius:18px;
  display:grid;
  place-items:center;
  color:#fff;
  background:linear-gradient(135deg,var(--ncr-social-rust),var(--ncr-social-orange));
  font-weight:950;
  margin-bottom:.8rem;
}
.ncr-group-card h3{
  color:var(--ncr-social-ink)!important;
  margin:0 0 .5rem!important;
  font-family:Georgia,"Times New Roman",serif!important;
}
.ncr-profile-hero-card{
  overflow:hidden;
}
.ncr-profile-identity{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:1rem;
  padding:0 1.2rem 1rem;
  margin-top:-44px;
  align-items:end;
}
.ncr-profile-stats{
  display:flex;
  gap:.75rem;
  flex-wrap:wrap;
  padding:0 1.2rem 1.2rem;
}
.ncr-profile-stats span{
  flex:1;
  min-width:120px;
  border-radius:16px;
  background:rgba(237,122,30,.08);
  padding:.8rem;
  color:var(--ncr-social-muted);
  font-weight:800;
}
.ncr-profile-stats strong{
  display:block;
  color:var(--ncr-social-ink);
  font-size:1.25rem;
}
.ncr-profile-settings{
  padding:1.2rem!important;
  display:grid;
  gap:1rem;
}
.ncr-profile-settings label{
  display:grid;
  gap:.4rem;
  color:var(--ncr-social-ink);
  font-weight:900;
}
.ncr-profile-settings input,
.ncr-profile-settings select,
.ncr-profile-settings textarea{
  border-radius:16px!important;
  border:1px solid var(--ncr-social-border)!important;
  background:var(--ncr-social-surface)!important;
  color:var(--ncr-social-ink)!important;
}
.ncr-profile-settings .ncr-check-row{
  display:flex!important;
  grid-template-columns:none!important;
  align-items:center;
}
.ncr-social-notifications{
  background:var(--ncr-social-card);
  border:1px solid var(--ncr-social-border);
  border-radius:24px;
  padding:1.2rem;
}
.ncr-social-notifications article{
  padding:1rem!important;
}
.ncr-social-actions{
  display:flex;
  gap:.75rem;
  flex-wrap:wrap;
}
.ncr-social-btn{
  padding:.7rem 1rem!important;
  border:1px solid var(--ncr-social-border)!important;
  color:var(--ncr-social-ink)!important;
}

/* Mobile */
@media(max-width:1100px){
  .ncr-social-app{
    grid-template-columns:minmax(0,1fr) minmax(230px,280px);
  }
  .ncr-social-left{
    display:none;
  }
}
@media(max-width:820px){
  .ncr-social-app{
    grid-template-columns:1fr;
  }
  .ncr-social-right{
    position:static;
    display:grid;
    grid-template-columns:1fr;
  }
  .ncr-post-header{
    grid-template-columns:auto 1fr;
  }
  .ncr-post-header em{
    grid-column:2;
    justify-self:start;
  }
  .ncr-composer-row{
    grid-template-columns:1fr;
  }
  .ncr-composer-row > .ncr-social-avatar{
    display:none!important;
  }
  .ncr-composer-tools,
  .ncr-comment-form{
    grid-template-columns:1fr;
    display:grid;
  }
  .ncr-composer-tools button{
    margin-left:0;
    width:100%;
  }
}
@media(max-width:640px){
  .ncr-social-tabs{
    border-radius:20px;
    flex-direction:column;
  }
  .ncr-post-actions button{
    width:100%;
  }
  .ncr-post-actions form{
    flex:1 1 45%;
  }
  .ncr-profile-identity{
    grid-template-columns:1fr;
    margin-top:-52px;
  }
}
