:root{
  --bg: #fdf8fe;
  --surface: #fefcfe;
  --ink: #2f3874;
  --muted: #5b6b86;
  --line: #e6ebf4;

  --blue: #3381e9;
  --blue-2: #3381e9;

  --amber: #feb736;
  --amber-2: #feb736;

  --chip: #f2f5fb;
  --shadow: 0 10px 28px rgba(18, 28, 45, .08);
  --radius: 18px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; min-width:400px; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--ink);
  background-color: #fbf6fd;
}

.site-masthead-hidden{ display:none; }
a{ color:inherit; text-decoration:none; }
.container{
  width:100%;
  max-width:1124px;
  padding-inline:12px;
  margin:0 auto;
}

/* Header */
header{
  position:sticky;
  top:0;
  z-index:10;
  backdrop-filter:saturate(1.2) blur(10px);
  background: rgba(248, 250, 255, .9);
  border-bottom:1px solid rgba(230,235,244,.8);
}
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 0;
  gap:16px;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  letter-spacing:.2px;
}
.brand img{
  width: clamp(120px, 20vw, 200px);
  height: auto;
  display: block;
}
.brand svg{ width:32px; height:32px; }
.brand span{
  font-size:20px;
}
.nav-actions{
  display:flex;
  align-items:center;
  gap:10px;
}
.nav-user{
  display:none;
  align-items:center;
  gap:10px;
  font-weight:800;
  color:var(--muted);
}
.nav-user.active{ display:flex; }
.nav-user-name{ color:var(--ink); }
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:40px;
  padding:0 14px;
  border-radius:12px;
  border:1px solid var(--line);
  background:var(--surface);
  color:var(--ink);
  font-weight:700;
  cursor:pointer;
  transition:transform .08s ease, background .12s ease, border-color .12s ease;
  user-select:none;
}
.btn:active{ transform: translateY(1px); }
.btn.primary{
  border-color:transparent;
  background:linear-gradient(180deg, var(--amber), var(--amber-2));
  color:#fff;
  box-shadow: 0 2px 4px rgba(83, 80, 72, 0.24);
}
.btn.ghost{
  background:transparent;
  border-color: var(--line);
  color: var(--muted);
  font-weight:700;
  box-shadow: 0 2px 4px rgba(83, 80, 72, 0.24);
}
.btn.ghost.danger{
  border-color:#e6b3b3;
  color:#a13535;
}

/* Hero */
main{ padding:26px 0 0px; }
.hero{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap:28px;
  align-items:center;
}
.hero h1{
  font-size: clamp(34px, 3.3vw, 56px);
  line-height:1.02;
  margin:0 0 12px;
  letter-spacing:-.6px;
}
.hero h1 .accent{
  color: var(--amber-2);
}
.sub{
  max-width: 52ch;
  margin:0 0 18px;
  color:var(--muted);
  font-size:16px;
}
.hero-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin: 10px 0 14px;
}
.trustline{
  margin-top:8px;
  color:var(--muted);
  font-weight:700;
}

/* Illustration bubble */
.illus{
  width:100%;
  max-width: 420px;
  height:auto;
  display:block;
  margin:0 auto;
  object-fit:contain;
  position:relative;
  z-index:1;
}

/* Feature row */
.features{
  margin-top: 22px;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:16px;
}
.card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.feature{
  display:flex;
  flex-direction:column;
  gap:12px;
  align-items:center;
  text-align:center;
}
.iconbox{
  height:44px;
  display:grid;
  place-items:center;
  background: #f3f6ff;
  flex: 0 0 auto;
  text-align: center;
}
.iconbox.amber{
  background:#fff7e6;
  border-color:#ffe2a8;
}
.iconbox.gray{
  background:#f2f5fb;
  border-color:#e6ebf4;
}
.feature h3{
  margin:0 0 4px;
  font-size:16px;
  letter-spacing:-.2px;
}
.feature p{
  margin:0;
  color:var(--muted);
  font-size:13px;
}
.feature .text-center{
  text-align: center;
  margin-top: 1.8rem;
}

/* Mid section grid (feed / trending / suggestions) */
.mid{
  margin-top:18px;
  display:grid;
  grid-template-columns: 1.55fr .75fr;
  gap:16px;
  align-items:start;
}
.panel-title{
  font-weight:900;
  font-size:16px;
  margin: 0 0 12px;
  letter-spacing:-.2px;
}
.feed .post{
  display:grid;
  grid-template-columns: 96px 1fr;
  gap:14px;
  padding: 14px;
  border:1px solid var(--line);
  border-radius: 16px;
  background:#fbfcff;
}
.feed .post + .post{ margin-top: 12px; }
.thumb{
  border-radius: 14px;
  border:1px solid var(--line);
  overflow:hidden;
  background: linear-gradient(180deg, rgba(47,109,255,.12), rgba(255,177,0,.10));
  height: 64px;
  display:flex;
  align-items:flex-end;
  justify-content:flex-start;
  padding:10px;
  color:#24324b;
  font-weight:900;
  font-size:12px;
}
.thumb.has-image{
  padding:0;
  align-items:stretch;
  justify-content:stretch;
  background:#e9eef9;
}
.thumb-image{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.post .meta{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.post .text{
  color: var(--ink);
  font-weight:750;
  letter-spacing:-.1px;
}
.post .tags{
  color: var(--blue);
  font-weight:800;
  font-size:13px;
}
.post .stats{
  display:flex;
  gap:14px;
  color:var(--muted);
  font-weight:700;
  font-size:12px;
  margin-top:2px;
}

.side .card + .card{ margin-top: 12px; }

.list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.tag{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 10px 12px;
  border-radius: 14px;
  border:1px solid var(--line);
  background:#fbfcff;
  cursor:pointer;
  font-weight:800;
  color: var(--blue-2);
}
.tag small{ color:var(--muted); font-weight:800; }

.friends{
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  gap:10px;
  margin-bottom:12px;
}
.avatar{
  width:54px;
  height:54px;
  border-radius: 16px;
  border:1px solid var(--line);
  background: radial-gradient(circle at 30% 20%, rgba(47,109,255,.20), transparent 60%),
              radial-gradient(circle at 70% 60%, rgba(255,177,0,.18), transparent 62%),
              #f7f9ff;
  position:relative;
  overflow:hidden;
}

/* Manifesto strip */
.manifesto{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap:18px;
  align-items:center;
}
.manifesto-text{
  display:flex;
  align-items:center;
  gap:14px;
}
.manifesto-image{
  height:auto;
  flex:0 0 auto;
}
.manifesto h2{
  margin:0 0 8px;
  font-size: 22px;
  letter-spacing:-.3px;
}
.manifesto p{
  margin:0;
  color:var(--muted);
  font-weight: normal;
}
.badge{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border:1px solid #ffe2a8;
  background:#fff7e6;
  border-radius: 999px;
  font-weight:900;
  color:#3a2a00;
  justify-self:end;
  text-align:right;
}
.badge svg{ width:18px; height:18px; }
.badge-flag{
  width:22px;
  height:auto;
  display:block;
}
.logo-text-color{ color: var(--blue); }

/* Footer */
footer{
  padding: 24px 0 32px;
  border-top: 1px solid rgba(230,235,244,.9);
  background: rgba(246,248,252,.55);
}
.footer-row{
  display:flex;
  flex-wrap:wrap;
  gap:12px 18px;
  align-items:center;
  justify-content:space-between;
  color:var(--muted);
  font-weight:700;
}
.site-footer-mini{
  margin-top: 28px;
  border-top: 1px solid rgba(230,235,244,.9);
  background: rgba(246,248,252,.55);
}
.site-footer-mini-inner{
  display:flex;
  flex-wrap:wrap;
  gap:10px 16px;
  align-items:center;
  justify-content:center;
  padding:14px 0;
}
.site-footer-mini-links{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:13px;
  font-weight:800;
}
.site-footer-mini-links a:hover{
  text-decoration:underline;
}
.site-footer-mini-copy{
  color:var(--muted);
  font-size:13px;
  font-weight:700;
}
.cookie-banner{
  position:fixed;
  left:16px;
  right:16px;
  bottom:16px;
  z-index:45;
}
.cookie-banner[hidden]{
  display:none;
}
.cookie-banner-inner{
  width:min(960px, 100%);
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px;
  border:2px solid #f2c66d;
  border-radius:22px;
  background:linear-gradient(135deg, #fff7df 0%, #fff3cd 48%, #ffffff 100%);
  box-shadow:0 24px 54px rgba(18, 28, 45, .24);
}
.cookie-banner-label{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border-radius:999px;
  background:#3a2a00;
  color:#fff8e7;
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.08em;
  white-space:nowrap;
}
.cookie-banner-copy{
  margin:0;
  color:#4a4f61;
  font-size:14px;
  line-height:1.55;
  font-weight:800;
  flex:1 1 auto;
}
.cookie-banner-copy a{
  color:#0e5fd7;
  text-decoration:underline;
  text-underline-offset:2px;
}
.cookie-banner-action{
  flex:0 0 auto;
  min-width:160px;
  min-height:46px;
  font-size:15px;
  box-shadow:0 10px 24px rgba(254, 183, 54, .28);
}
.links{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}
.links a{
  padding:6px 8px;
  border-radius: 10px;
}
.links a:hover{ background: rgba(47,109,255,.06); color: var(--ink); }

/* Modal */
.modal-backdrop{
  position:fixed;
  inset:0;
  background: rgba(10,18,33,.42);
  display:none;
  align-items:flex-start;
  justify-content:center;
  padding: 18px;
  overflow:hidden;
  z-index: 50;
}
body.modal-open{
  overflow:hidden;
}
.modal{
  width:min(420px, 92vw);
  max-height: calc(100vh - 36px);
  background: var(--surface);
  border:1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,.25);
  padding: 16px;
  margin:auto 0;
  overflow-y:auto;
  overscroll-behavior: contain;
}
.modal h3{ margin: 4px 0 10px; letter-spacing:-.2px; }
.field{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin: 10px 0;
}
.modal [data-mode="signup"]{ display:none; }
.modal[data-mode="signup"] [data-mode="signup"]{ display:flex; }
.modal [data-mode="login"]{ display:block; }
.modal[data-mode="signup"] [data-mode="login"]{ display:none; }
label{ font-size:12px; font-weight:900; color: var(--muted); }
.checkbox-label{
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.checkbox-label input[type="checkbox"]{
  width:16px;
  height:16px;
  margin:0;
  padding:0;
  flex:0 0 auto;
}
input,
select{
  height:42px;
  padding: 10px 12px;
  border-radius: 12px;
  border:1px solid var(--line);
  outline:none;
  font-weight:700;
}
input:focus,
select:focus{ border-color: rgba(47,109,255,.55); }
.modal-note{
  min-height:18px;
  font-size:12px;
  font-weight:800;
  color:var(--muted);
  margin-top:4px;
}
.modal-note.error{ color:#b33a3a; }
.modal-note.success{ color:#1c7a4b; }
.linklike{
  background:transparent;
  border:0;
  padding:0;
  color:var(--blue);
  font-weight:800;
  cursor:pointer;
  text-align:left;
}
.linklike:hover{ text-decoration:underline; }
.modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top: 12px;
}
#profileBackdrop .modal{
  width:min(520px, 100%);
  max-height: calc(100dvh - 36px);
  display:flex;
  flex-direction:column;
  overflow-y: auto;
  overscroll-behavior: contain;
}
#profileBackdrop .modal .modal-note{
  flex:0 0 auto;
}
#profileBackdrop .modal .modal-actions{
  position:sticky;
  bottom:0;
  margin-top:auto;
  padding-top:12px;
  padding-bottom:2px;
  background:linear-gradient(to bottom, rgba(255,255,255,0), var(--surface) 18px);
  flex-wrap:wrap;
}
@media (max-width: 640px){
  #profileBackdrop{
    padding:12px;
  }
  #profileBackdrop .modal{
    width:100%;
    max-height: calc(100dvh - 24px);
    border-radius:16px;
    padding:14px;
  }
  #profileBackdrop .modal .modal-actions{
    justify-content:stretch;
  }
  #profileBackdrop .modal .modal-actions .btn{
    flex:1 1 140px;
  }
  .composer-tools{
    flex-wrap:nowrap;
    gap:8px;
  }
  .composer-tools > *{
    min-width:0;
  }
  .composer-tools .file-pill,
  .composer-tools .feeling{
    flex:1 1 0;
    padding:8px 10px;
    font-size:12px;
    white-space:nowrap;
  }
  .composer-tools .material-symbols-outlined,
  .composer-tools .font-size-18{
    font-size:18px;
  }
  #composerPost{
    width:auto;
    min-width:78px;
    padding:0 12px;
    flex:0 0 auto;
  }
}
.subscription-plan-card{
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px;
  background:#fff;
}
.subscription-plan-card.active{
  border-color: rgba(47,109,255,.55);
  box-shadow: 0 0 0 2px rgba(47,109,255,.12) inset;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}
.subscription-plan-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:6px;
}
.subscription-plan-title{
  font-size:14px;
  font-weight:900;
  color:#1d3356;
}
.subscription-plan-badge{
  display:inline-flex;
  align-items:center;
  padding:2px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  color:#14542f;
  background:#dff6e8;
  border:1px solid #9dd7b6;
}
#feelingBackdrop .modal{
  width:min(520px, 92vw);
}
#photoBackdrop{
  z-index:70;
}
.photo-modal{
  position:relative;
  width:min(96vw, 1200px);
  max-height:94vh;
  display:flex;
  align-items:center;
  justify-content:center;
}
.photo-modal img{
  max-width:100%;
  max-height:94vh;
  width:auto;
  height:auto;
  border-radius:14px;
  box-shadow:0 28px 80px rgba(0,0,0,.5);
}
.photo-modal .post-image.in-photo-overlay{
  width:100%;
  height:94vh;
  max-height:94vh;
  object-fit:contain;
  border:0;
  cursor:zoom-out;
}
.photo-modal-close{
  position:absolute;
  bottom:10px;
  right:auto;
  border:0;
  border-radius:10px;
  background:rgba(255,255,255,.16);
  color:#fff;
  padding:8px 12px;
  font-weight:800;
  cursor:pointer;
}
.photo-modal-close:hover{
  background:rgba(255,255,255,.26);
}
.feeling-grid{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}
.feeling-pill{
  border:1px solid var(--line);
  background:#fbfcff;
  border-radius:999px;
  padding:6px 12px;
  font-weight:800;
  cursor:pointer;
  color:var(--ink);
}
.feeling-pill:hover{ background:#f2f5fb; }
#joinNow{
  display:block;
  width:auto;
  min-width:100px;
  margin:0 auto;
}

/* Responsive */
@media (max-width: 980px){
  .hero{ grid-template-columns: 1fr; }
  .bubble{ max-width: 520px; margin-inline:auto; }
  .features{ grid-template-columns: 1fr; }
  .mid{ grid-template-columns: 1fr; }
  .manifesto{ grid-template-columns: 1fr; }
  .badge{ justify-self:anchor-center; }
  .brand img{ width: clamp(100px, 40vw, 200px); }
  .cookie-banner-inner{
    flex-direction:column;
    align-items:flex-start;
  }
  .cookie-banner-label{
    margin-bottom:-2px;
  }
  .cookie-banner-action{
    width:100%;
    min-width:0;
  }
}
@media (max-width: 640px){
  .brand{
    margin-left:15px;
  }
  .cookie-banner{
    top:calc(max(12px, env(safe-area-inset-top)) + 56px);
    right:12px;
    bottom:auto;
    left:12px;
  }
  .cookie-banner-inner{
    gap:12px;
    padding:16px;
    border-radius:18px;
  }
}

/* Logged-in home page */
body.home-page{
  background: #fbf6fd;
}
.app-header{
  position:sticky;
  top:0;
  z-index:20;
  background: rgba(248,250,255,.9);
  border-bottom:1px solid rgba(230,235,244,.8);
  backdrop-filter:saturate(1.2) blur(12px);
}
.app-header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
  gap:16px;
}
.header-actions{
  display:flex;
  align-items:center;
  gap:10px;
}
.icon-btn{
  width:44px;
  height:44px;
  border-radius:14px;
  border:1px solid var(--line);
  background:var(--surface);
  display:grid;
  place-items:center;
  position:relative;
  cursor:pointer;
  box-shadow: var(--shadow);
}
.badge-dot{
  position:absolute;
  top:6px;
  right:6px;
  background:#ff5d5d;
  color:#fff;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  padding:2px 6px;
}
.icon-home,.icon-chat,.icon-bell{
  width:18px;
  height:18px;
  display:block;
  background: linear-gradient(180deg, #457ae6, #2e5fd6);
  mask-repeat:no-repeat;
  mask-position:center;
  mask-size:contain;
}
.icon-home{ mask-image: linear-gradient(#000,#000); clip-path: polygon(50% 0, 100% 40%, 100% 100%, 0 100%, 0 40%); }
.icon-chat{ mask-image: linear-gradient(#000,#000); border-radius:4px; }
.icon-bell{ mask-image: linear-gradient(#000,#000); border-radius:50% 50% 40% 40%; }

.app-main{ padding:24px 0 40px; }
.app-grid{
  display:grid;
  grid-template-columns: 260px minmax(0, 1fr) 280px;
  gap:18px;
  align-items:start;
}
.groups-grid{
  grid-template-columns: 260px minmax(0, 1fr) 280px;
}
.sidebar,
.feed-col,
.right-col{
  min-width:0;
}
.app-card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:18px;
  padding:16px;
  box-shadow: var(--shadow);
}
.sidebar .app-card + .app-card,
.feed-col .app-card + .app-card,
.right-col .app-card + .app-card{ margin-top:14px; }

.profile-card .profile-row{
  display:flex;
  align-items:center;
  gap:12px;
}
.profile-name{ font-weight:900; }
.profile-name-btn{
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  text-align:left;
  cursor:pointer;
  font-weight:900;
}
.profile-name-btn:hover,
.profile-name-btn:focus-visible{
  text-decoration:underline;
}
.profile-sub{ color:var(--muted); font-size:13px; font-weight:700; }
.storage-subscribe-actions{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:10px;
  width:100%;
  text-align:center;
  margin-top:12px;
}
.storage-subscribe-actions .btn{
  min-width:160px;
}
.profile-sub-btn{
  background:transparent;
  border:0;
  padding:0;
  color:var(--muted);
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  text-align:left;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}
.profile-sub-btn:hover{ text-decoration:underline; }
.profile-photo-fallback{
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
  font-weight:900;
  color:#27406d;
  background: radial-gradient(circle at 30% 20%, rgba(47,109,255,.18), transparent 60%),
              radial-gradient(circle at 70% 70%, rgba(255,177,0,.18), transparent 60%),
              #f7f9ff;
}

.nav-card{ padding:8px; display:flex; flex-direction:column; gap:6px; }
.nav-link{
  display:flex;
  align-items:center;
  gap:10px;
  border:0;
  background:transparent;
  text-align:left;
  padding:10px 12px;
  border-radius:12px;
  font-weight:800;
  color:var(--muted);
  cursor:pointer;
}
.nav-link .material-symbols-outlined{
  font-size:20px;
}
.nav-link.active{
  background: rgba(47,109,255,.1);
  color: var(--blue);
}

.card-title{
  font-weight:900;
  margin-bottom:12px;
}
.trend-list{ display:flex; flex-direction:column; gap:8px; }
.trend-item{
  display:inline-flex;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fbfcff;
  color:var(--blue);
  font-weight:800;
  font-size:13px;
  cursor:pointer;
  user-select:none;
}
.trend-item.active{
  background:rgba(47,109,255,.12);
  border-color:rgba(47,109,255,.35);
}

.suggest-list,.follow-list,.online-list{ display:flex; flex-direction:column; gap:10px; }
.friend-list{ display:flex; flex-direction:column; gap:10px; }
.suggest-row,.follow-row,.online-row{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.follow-search{
  width:100%;
  margin-bottom:10px;
}
.suggest-name,.follow-name,.online-name{ font-weight:800; }
.follow-name{
  flex:1 1 auto;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.suggest-sub{ color:var(--muted); font-size:12px; }
.friend-row .online-name{
  flex:1 1 auto;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.friend-actions{
  display:flex;
  align-items:center;
  gap:10px;
  margin-left:auto;
}
.friend-actions .mini-btn{
  margin-left:0;
}
.mini-btn{
  margin-left:auto;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fbfcff;
  color:#000;
  font-weight:800;
  cursor:pointer;
}
.fake-profile-btn{
  margin-left:0;
  padding:6px 10px;
  font-size:11px;
}
.pill{
  margin-left: auto;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fbfcff;
  font-weight:800;
  cursor:pointer;
}
.pill.ghost{ background:transparent; }
.unset-margin-left {
  margin-left: unset;
}
.feeling {
  font-size: 12px;
  color: var(--muted);
}
#composerPost {
  width: 100px;
}

.avatar{
  width:40px;
  height:40px;
  flex:0 0 auto;
  border-radius:50%;
  border:1px solid var(--line);
  display:grid;
  place-items:center;
  overflow:hidden;
  background: radial-gradient(circle at 30% 20%, rgba(47,109,255,.18), transparent 60%),
              radial-gradient(circle at 70% 70%, rgba(255,177,0,.18), transparent 60%),
              #f7f9ff;
  font-weight:900;
  color:#27406d;
}
.avatar.size-48{ width:48px; height:48px; }
.avatar.size-44{ width:44px; height:44px; }
.avatar.size-40{ width:40px; height:40px; }
.avatar.size-38{ width:38px; height:38px; }
.avatar.size-36{ width:36px; height:36px; }
.avatar.size-34{ width:34px; height:34px; }
.avatar.size-30{ width:30px; height:30px; }
.avatar img{ width:100%; height:100%; object-fit:cover; display:block; }
.avatar-media-hidden{ display:none; }
.avatar-fallback-hidden{ display:none; }
.avatar.online{ position:relative; }
.avatar.online::after{
  content:"";
  position:absolute;
  right:2px;
  bottom:2px;
  width:10px;
  height:10px;
  border-radius:50%;
  background:#4cc36c;
  border:2px solid #fff;
}
.online-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#4cc36c;
  margin-left:auto;
}
.muted{ color:var(--muted); font-size:13px; font-weight:700; }

.composer{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.composer-tools{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.file-pill{
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-left:0;
}
.composer-input{
  min-height:80px;
  border-radius:14px;
  border:1px solid var(--line);
  padding:10px 14px;
  font-weight:700;
  resize:vertical;
  width: 100%;
}
.composer-quota{
  font-size:13px;
  font-weight:700;
  color:var(--muted);
}
.composer-preview{
  width:100%;
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
  background:#f8faff;
  margin-bottom: 5px;
}
.composer-preview img{
  display:block;
  width:100%;
  height:auto;
  max-height:320px;
  object-fit:contain;
}
.composer-preview video{
  display:block;
  width:100%;
  height:auto;
  max-height:320px;
  object-fit:contain;
  background:#000;
}
.composer .muted.error{ color:#b33a3a; }
.composer-tools .btn.primary{ margin-left:auto; }

.margin-left-2 {
  margin-left: 2px;
}
.font-size-18 {
  font-size: 18px;
}
.blue-icon {
  color:var(--blue);
}

.post-card{ display:flex; flex-direction:column; gap:12px; }
.post-review-note{
  align-self:center;
  text-align:center;
  font-size:12px;
  font-weight:800;
  color:var(--muted);
  background:#f7f9ff;
  border:1px solid var(--line);
  border-radius:999px;
  padding:5px 10px;
}
.post-ai-label{
  align-self:center;
  text-align:center;
  font-size:12px;
  font-weight:900;
  color:#8f4d00;
  background:#fff3de;
  border:1px solid #f0d2a2;
  border-radius:999px;
  padding:5px 10px;
}
.post-header{
  display:flex;
  align-items:center;
  gap:10px;
}
.post-meta{ display:flex; flex-direction:column; }
.post-name{ font-weight:900; }
.post-time{ font-size:12px; color:var(--muted); font-weight:800; }
.post-menu-wrap{
  margin-left:auto;
  position:relative;
}
.post-menu-btn{
  border:0;
  background:transparent;
  font-size:18px;
  color:var(--muted);
  cursor:pointer;
}
.post-menu-dropdown{
  position:absolute;
  right:0;
  top:28px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:12px;
  box-shadow: var(--shadow);
  padding:6px;
  min-width:140px;
  display:none;
  z-index:5;
}
.post-menu-wrap.open .post-menu-dropdown{ display:block; }
.post-menu-item{
  width:100%;
  border:0;
  background:transparent;
  text-align:left;
  padding:8px 10px;
  border-radius:10px;
  font-weight:800;
  color:var(--ink);
  cursor:pointer;
}
.post-menu-item:hover{ background:#f2f5fb; }
.post-body{ font-weight:700; color:var(--ink); }
.post-body .post-link{
  color:var(--blue);
  text-decoration:underline;
  text-underline-offset:2px;
  word-break:break-word;
}
.comment-body .post-link{
  color:var(--blue);
  text-decoration:underline;
  text-underline-offset:2px;
  word-break:break-word;
}
.post-tags{ display:flex; gap:8px; flex-wrap:wrap; color:var(--blue); font-weight:800; }
.post-tags span{ cursor:pointer; }
.post-image-frame{
  position:relative;
  height:320px;
  border-radius:16px;
  border:1px solid var(--line);
  overflow:hidden;
  background:#eef3fb;
}
.post-image-blur{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-position:center;
  filter:blur(15px);
  opacity:0;
  transform:scale(1.14);
  transition:opacity .12s ease;
  pointer-events:none;
  display:block;
}
.post-image-frame.is-narrow .post-image-blur{
  opacity:.92;
}
.post-image{
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  position:relative;
  z-index:1;
  cursor:zoom-in;
  display:block;
}
.post-image-frame .post-image{
  border:0;
  border-radius:0;
}
.post-video{
  height:320px;
  border-radius:16px;
  border:1px solid var(--line);
  background:#000;
  object-fit:contain;
  cursor:default;
}
.post-stats{
  display:flex;
  gap:16px;
  color:var(--muted);
  font-weight:800;
  font-size:13px;
}
.post-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:12px;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  padding:10px 0;
}
.post-actions button{
  background:transparent;
  border:0;
  color:var(--muted);
  font-weight:800;
  cursor:pointer;
}
.reaction-list{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.reaction-btn{
  min-width:42px;
  min-height:46px;
  display:inline-flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  border:1px solid var(--line) !important;
  border-radius:16px;
  background:#fbfcff !important;
  line-height:1;
  padding:5px 6px 4px;
  gap:2px;
  transition:transform .08s ease, border-color .12s ease, background .12s ease;
}
.reaction-btn-emoji{
  font-size:18px;
  line-height:1;
}
.reaction-btn-count{
  font-size:10px;
  line-height:1;
  font-weight:800;
  color:var(--muted);
  min-height:10px;
}
.reaction-btn:hover{
  background:#f2f5fb !important;
}
.reaction-btn.active{
  background:rgba(47,109,255,.1) !important;
  border-color:rgba(47,109,255,.3) !important;
}
.reaction-btn.active .reaction-btn-count{
  color:var(--blue);
}
.post-actions button:disabled{
  opacity:.55;
  cursor:not-allowed;
}
.post-actions .like-btn.active{ color:var(--blue); }
.post-actions .comment-btn{
  margin-left:auto;
}
.comment-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.comment-list.is-collapsed{
  max-height:200px;
  overflow:hidden;
  position:relative;
}
.comment-list.is-collapsed::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:56px;
  background:linear-gradient(to bottom, rgba(247,249,255,0), rgba(247,249,255,.96));
  pointer-events:none;
}
.comment-list-toggle{
  border:0;
  background:transparent;
  color:var(--blue);
  font-weight:800;
  font-size:12px;
  padding:4px 0 2px;
  cursor:pointer;
  text-align:left;
}
.comment-list-toggle:hover{
  text-decoration:underline;
}
.comment-item{
  display:flex;
  gap:10px;
  align-items:flex-start;
}
.comment-menu-wrap{
  margin-left:auto;
  position:relative;
}
.comment-menu-btn{
  border:0;
  background:transparent;
  font-size:14px;
  color:var(--muted);
  cursor:pointer;
}
.comment-menu-dropdown{
  position:absolute;
  right:0;
  top:20px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:10px;
  box-shadow: var(--shadow);
  padding:6px;
  min-width:110px;
  display:none;
  z-index:5;
}
.comment-menu-wrap.open .comment-menu-dropdown{ display:block; }
.comment-menu-item{
  width:100%;
  border:0;
  background:transparent;
  text-align:left;
  padding:6px 8px;
  border-radius:8px;
  font-weight:800;
  color:var(--ink);
  cursor:pointer;
  font-size:12px;
}
.comment-menu-item:hover{ background:#f2f5fb; }
.comment-name{
  font-weight:800;
  font-size:12px;
}
.comment-head{
  display:flex;
  align-items:center;
  gap:8px;
}
.comment-time{
  font-size:11px;
  color:var(--muted);
  font-weight:700;
}
.comment-body{
  font-size:13px;
  color:var(--muted);
}
.comment-box{
  display:flex;
  align-items:center;
  gap:10px;
}
.comment-box.comment-disabled{
  opacity:.72;
}
.comment-box input{
  flex:1;
  height:40px;
  border-radius:999px;
  border:1px solid var(--line);
  padding:0 14px;
  font-weight:700;
}
.comment-box.comment-disabled input{
  background:#f4f6fb;
  cursor:not-allowed;
}
.comment-disabled-note{
  font-size:11px;
  color:var(--muted);
  font-weight:700;
  text-align:center;
}
#feedList {
  margin-top: 14px;
}
.feed-controls{
  margin-top:10px;
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.feed-controls .pill.active{
  background:var(--blue);
  color:#fff;
  border-color:var(--blue);
}
.feed-filter{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fbfcff;
}
.feed-filter-label{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.feed-filter-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}
.feed-filter-chip::after{
  content:"x";
  font-size:11px;
}
.outgoing-section {
  margin-top: 0.5em;
}

@media (max-width: 1100px){
  .app-grid{ grid-template-columns: 1fr; }
  .sidebar{ order:1; }
  .feed-col{ order:2; }
  .right-col{ order:3; }
  .sidebar{
    display:flex;
    flex-direction:column;
    gap:14px;
  }
  .sidebar > .nav-card{ order:-1; }
  .sidebar .app-card + .app-card{ margin-top:0; }
  .nav-card{
    flex-direction:row;
    flex-wrap:nowrap;
    gap:8px;
    overflow-x:auto;
  }
  .nav-link{
    flex:1 1 0;
    min-width:0;
    justify-content:center;
    padding:10px 8px;
    font-size:12px;
    white-space:nowrap;
  }
  .nav-link .material-symbols-outlined{
    font-size:18px;
  }
  .home-page .app-grid{
    display:flex;
    flex-direction:column;
    gap:14px;
  }
  .home-page .app-grid > .sidebar,
  .home-page .app-grid > .feed-col,
  .home-page .app-grid > .right-col{
    display:contents;
  }
  .home-page .sidebar > .app-card,
  .home-page .feed-col > .app-card,
  .home-page .right-col > .app-card{
    width:100%;
  }
  .home-page .sidebar > .nav-card{ order:1; }
  .home-page .sidebar > .profile-card{ order:2; }
  .home-page .feed-col > .composer{ order:3; }
  .home-page .sidebar > .trending-card{ order:4; }
  .home-page .sidebar > .donation-card{ order:5; }
  .home-page .feed-col > .feed-controls{ order:6; }
  .home-page .feed-col > #feedList,
  .home-page .feed-col > .app-card:not(.composer){ order:7; }
  .home-page .right-col > .popular-profiles-card{ order:8; }
  .home-page .right-col > .friends-of-friends-card{ order:9; }
  .home-page .right-col > .friends-online-card{ order:10; }
  .home-page .right-col > .friend-requests-card{ order:11; }
  .friends-page .sidebar > .nav-card{ order:1; }
  .friends-page .sidebar > .profile-card{ order:2; }
  .friends-page .sidebar > .app-card,
  .friends-page .feed-col > .app-card,
  .friends-page .right-col > .app-card{
    width:100%;
  }
  .friends-page .feed-col > .add-friends-card{ order:3; }
  .friends-page .right-col > .friend-requests-card{ order:4; }
  .friends-page .sidebar > .friends-of-friends-card{ order:5; }
  .friends-page .right-col > .friends-online-card{ order:6; }
  .friends-page .feed-col > .current-friends-card{ order:7; }
  .friends-page .outlook-import-wrap{
    display:none;
  }
  .photos-page .sidebar > .nav-card{ order:1; }
  .photos-page .sidebar > .profile-card{ order:2; }
  .photos-page .feed-col > .your-media-card{ order:5; }
  .photos-page .feed-col > #photosGrid{ order:7; }
  .photos-page .feed-col > #photosEmptyState{ order:7; }
}

/* Groups */
.group-form{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.group-textarea{
  min-height:100px;
  resize:vertical;
}
.group-submit{
  width:100%;
  margin-top:4px;
}
.group-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.group-list-item{
  display:flex;
  flex-direction:column;
  gap:6px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fbfcff;
  padding:10px;
}
.group-list-item.active{
  border-color:rgba(47,109,255,.35);
  background:rgba(47,109,255,.08);
}
.group-list-title,
.group-list-title-link{
  font-weight:800;
}
.group-list-title{
  display:flex;
  align-items:center;
  gap:8px;
}
.group-unread-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  background:#2f6dff;
  color:#fff;
  font-size:11px;
  font-weight:800;
}
.group-list-title-link:hover{
  text-decoration:underline;
}
.group-list-meta{
  color:var(--muted);
  font-size:12px;
  font-weight:700;
}
.group-meta-line{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:8px;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}
.group-header-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.group-header-top > .btn{
  margin-left:auto;
  align-self:flex-start;
}
.group-edit-btn{
  margin-left:auto;
  align-self:flex-start;
}
#groupEditBackdrop .group-form + .group-form{
  margin-top:8px;
}
.group-private-note{
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.group-action-row{
  display:flex;
  gap:8px;
}
.group-create-trigger{
  width:100%;
  margin-top:12px;
}
.inline-form{ display:inline-flex; }
.group-member-row{
  display:flex;
  align-items:center;
  gap:10px;
}
.group-member-meta{
  flex:1;
  min-width:0;
}
.group-member-action{
  margin-left:auto;
}
.group-flash{
  font-weight:800;
}
.group-flash.error{ color:#b33a3a; }
.group-flash.success{ color:#1c7a4b; }

/* Photos */
.photos-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(240px, 1fr));
  gap:14px;
}
.photo-card{
  overflow:hidden;
  padding:0;
  display:flex;
  flex-direction:column;
  height:100%;
  margin-top: 14px;
}
.photo-card-frame{
  position:relative;
  width:100%;
  aspect-ratio:4 / 3;
  overflow:hidden;
  background:#eef2f8;
}
.photo-card-image-blur{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-position:center;
  filter:blur(15px);
  opacity:0;
  transform:scale(1.14);
  transition:opacity .12s ease;
  pointer-events:none;
  display:block;
}
.photo-card-frame.is-narrow .photo-card-image-blur{
  opacity:.92;
}
.photo-card-image{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
  cursor: zoom-in;
  position:relative;
  z-index:1;
}
.photo-card-video{
  aspect-ratio:4 / 3;
  background:#000;
  object-fit:contain;
}
.photo-card-meta{
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:6px;
  min-height:112px;
}
.photo-card-time{
  font-size:12px;
  color:#56607a;
  line-height:1.3;
}
.photo-card-links{
  margin:0;
  color:#2f3550;
  font-size:13px;
  line-height:1.35;
  overflow:hidden;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  min-height:calc(1.35em * 2);
}
.photo-delete-btn{
  width:100%;
  margin-top:auto;
}
#inviteFriendEmail {
  width: 150px;
}
.post-name:hover{
  cursor: pointer;
}

@media (max-width: 1180px){
  .groups-grid{
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .groups-grid .right-col{
    grid-column: 1 / -1;
  }
  .manifesto-image{
    width: 100%;
  }
  .manifesto-text
  {
    display: block;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 820px){
  .groups-grid{
    display:flex;
    flex-direction:column;
    gap:14px;
  }
  .groups-grid .sidebar,
  .groups-grid .right-col,
  .groups-grid .feed-col{
    display:contents;
  }
  .groups-grid .sidebar > .app-card,
  .groups-grid .feed-col > .app-card,
  .groups-grid .right-col > .app-card{
    width:100%;
    order:20;
  }
  .groups-grid .feed-col > .feed-controls{
    order:21;
  }
  .groups-grid .feed-col > #feedList{
    width:100%;
    order:22;
  }
  .groups-grid .feed-col > #feedList > .post-card{
    width:100%;
  }
  .groups-grid .sidebar > .nav-card{
    order:1;
  }
  .groups-grid .sidebar > .profile-card{
    order:2;
  }
  .groups-grid .sidebar > .my-groups-card{
    order:3;
  }
  .groups-grid .sidebar > .create-group-card{
    order:4;
  }
  .groups-grid .right-col > .discover-groups-card{
    order:30;
  }
  .groups-page.group-selected .groups-grid .sidebar > .nav-card{
    order:1;
  }
  .groups-page.group-selected .groups-grid .sidebar > .profile-card{
    order:2;
  }
  .groups-page.group-selected .groups-grid .sidebar > .my-groups-card{
    order:3;
  }
  .groups-page.group-selected .groups-grid .feed-col > .group-header-card{
    order:4;
  }
  .groups-page.group-selected.group-member .groups-grid .feed-col > .composer{
    order:5;
  }
  .groups-page.group-selected.group-member .groups-grid .feed-col > .feed-controls{
    order:6;
  }
  .groups-page.group-selected.group-member .groups-grid .feed-col > #feedList{
    order:7;
  }
  .groups-page.group-selected.group-member .groups-grid .right-col > .members-card{
    order:8;
  }
  .groups-page.group-selected.group-admin .groups-grid .right-col > .join-requests-card{
    order:9;
  }
  .groups-page.group-selected .groups-grid .right-col > .pending-invitations-card{
    order:10;
  }
  .groups-page.group-selected .groups-grid .right-col > .my-pending-requests-card{
    order:11;
  }
  .groups-page.group-selected.group-admin .groups-grid .right-col > .invite-friends-card{
    order:12;
  }
  .groups-page.group-selected .groups-grid .right-col > .discover-groups-card{
    order:30;
  }
  .mini-btn{
    color:#000;
  }
}
