/* Shared shell — home-dash inspired */
.sc-shell {
  background: #f7f7f5 !important;
  max-width: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  min-height: 100vh;
  min-height: 100dvh;
}
.sc-mobile-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #ecece8;
  position: sticky;
  top: 0;
  z-index: 25;
}
.sc-mobile-bar .brand {
  font-size: 15px;
  font-weight: 800;
  color: #18181b;
}
.sc-layout {
  display: flex;
  min-height: calc(100vh - 0px);
  max-width: 1280px;
  margin: 0 auto;
}
.sc-side {
  width: 220px;
  flex-shrink: 0;
  padding: 20px 14px;
  border-right: 1px solid #ecece8;
  background: #fafaf8;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: none;
}
.sc-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 15px;
  color: #1a1a1a;
  margin-bottom: 20px;
  padding: 0 8px;
  text-decoration: none;
}
.sc-brand .mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #111;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.sc-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sc-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #52525b;
  text-decoration: none;
}
.sc-nav a:hover { background: #f0f0ec; color: #111; }
.sc-nav a.active {
  background: #e8f0e4;
  color: #1a3a12;
}
.sc-nav .ico { width: 20px; text-align: center; font-size: 15px; }
.sc-nav .sep {
  height: 1px;
  background: #ecece8;
  margin: 10px 8px;
}
.sc-content {
  flex: 1;
  min-width: 0;
  background: #f7f7f5;
}
.sc-shell > .header,
.sc-content > .header {
  background: #fff;
  border-bottom: 1px solid #ecece8;
  position: sticky;
  top: 0;
  z-index: 15;
}
.sc-shell .pad {
  padding: 18px 18px 100px;
  max-width: 920px;
}
.sc-shell .card-block,
.sc-shell .profile-section,
.sc-shell .event-card,
.sc-shell .post-card {
  border-radius: 14px;
  border-color: #ecece8;
  box-shadow: 0 2px 10px rgba(0,0,0,.03);
}
.sc-shell .event-card {
  background: #fff;
}
.sc-shell .btn-primary {
  background: #111;
  border-color: #111;
}
.sc-shell .section-label {
  color: #71717a;
  font-weight: 700;
}

@media (min-width: 900px) {
  .sc-mobile-bar { display: none; }
  .sc-side { display: block; }
  .sc-shell .bottom-nav { display: none !important; }
  .sc-shell .pad {
    padding: 22px 28px 40px;
  }
  .sc-content > .header {
    padding-left: 24px;
    padding-right: 24px;
  }
}
@media (min-width: 1100px) {
  .sc-side { width: 240px; }
  .sc-shell .pad { max-width: 1000px; }
}


/* responsive extras */
@media (max-width: 899px) {
  .sc-content > .header h1 {
    font-size: 15px;
    max-width: 60vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
@media (min-width: 900px) {
  .sc-layout { min-height: 100vh; }
  .sc-content { min-width: 0; }
}

.sc-nav-group {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: none;
  color: #a1a1aa;
  padding: 14px 14px 6px;
}
.sc-nav-sep {
  height: 1px;
  background: #e4e4e7;
  margin: 8px 12px;
}
.sc-side-nav a.sc-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #3f3f46;
  text-decoration: none;
  border-radius: 8px;
  margin: 0 8px;
}
.sc-side-nav a.sc-nav-item:hover { background: #f4f4f5; }
.sc-side-nav a.sc-nav-item.active {
  background: #111;
  color: #fff;
}
.sc-side-nav a.sc-nav-item .ico { width: 1.4em; text-align: center; }
.sc-side-brand {
  font-weight: 800;
  font-size: 13px;
  padding: 16px 16px 8px;
  letter-spacing: 0.02em;
}


/* —— Mobile X-style navigation drawer —— */
.sc-mobile-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  padding-top: calc(10px + env(safe-area-inset-top));
  background: #fff;
  border-bottom: 1px solid #ecece8;
  position: sticky;
  top: 0;
  z-index: 40;
}
.sc-mobile-bar .brand {
  font-size: 15px;
  font-weight: 800;
  color: #18181b;
  text-decoration: none;
  flex: 1;
  text-align: center;
}
.sc-menu-btn,
.sc-bar-profile {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  text-decoration: none;
  border-radius: 999px;
}
.sc-menu-btn:active,
.sc-bar-profile:active { background: #f4f4f5; }

.sc-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 60;
}
.sc-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(86vw, 320px);
  background: #fff;
  z-index: 70;
  transform: translateX(-105%);
  transition: transform .22s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 8px 0 32px rgba(0,0,0,.12);
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
body.sc-drawer-open .sc-drawer { transform: translateX(0); }
body.sc-drawer-open .sc-drawer-backdrop { display: block; }
body.sc-drawer-open { overflow: hidden; }

.sc-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid #ecece8;
}
.sc-drawer-brand {
  font-weight: 800;
  font-size: 16px;
}
.sc-drawer-close {
  width: 36px; height: 36px; border: none; background: #f4f4f5;
  border-radius: 999px; font-size: 14px; cursor: pointer;
}
.sc-drawer-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 10px 24px;
  -webkit-overflow-scrolling: touch;
}
.sc-drawer-nav .sc-nav-group,
.sc-side-nav .sc-nav-group,
.sc-nav .sc-nav-group {
  font-size: 11px;
  font-weight: 800;
  color: #a1a1aa;
  padding: 14px 12px 6px;
  letter-spacing: .02em;
}
.sc-drawer-nav .sc-nav-item,
.sc-side-nav .sc-nav-item,
.sc-nav .sc-nav-item,
.sc-nav a,
.hd-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #52525b;
  text-decoration: none;
  margin-bottom: 2px;
}
.sc-drawer-nav .sc-nav-item:hover,
.sc-nav .sc-nav-item:hover,
.sc-nav a:hover,
.hd-nav a:hover { background: #f0f0ec; color: #111; }
.sc-drawer-nav .sc-nav-item.active,
.sc-nav .sc-nav-item.active,
.sc-nav a.active,
.hd-nav a.active {
  background: #e8f0e4;
  color: #1a3a12;
  font-weight: 700;
}
.sc-drawer-nav .ico,
.sc-nav .ico,
.hd-nav .ico { width: 20px; text-align: center; font-size: 15px; }

/* hide legacy bottom nav everywhere on shell pages */
.sc-shell .bottom-nav,
.sc-bottom-nav-legacy {
  display: none !important;
}
.sc-shell .pad {
  padding-bottom: 28px !important;
}

@media (min-width: 900px) {
  .sc-mobile-bar { display: none !important; }
  .sc-drawer,
  .sc-drawer-backdrop { display: none !important; }
  body.sc-drawer-open { overflow: auto; }
  .sc-side { display: block; }
  .sc-shell .bottom-nav { display: none !important; }
}


/* Narrow desktop (mouse): hamburger is primary; drawer does not rely on swipe */
@media (max-width: 899px) and (pointer: fine) {
  .sc-mobile-bar .sc-menu-btn {
    background: #f4f4f5;
    border-radius: 10px;
    font-size: 18px;
  }
  .sc-mobile-bar .sc-menu-btn::after {
    /* keep accessible hit target */
  }
}

/* Touch phones: keep edge-swipe discoverable */
@media (max-width: 899px) and (pointer: coarse) {
  .sc-mobile-bar .sc-menu-btn {
    font-size: 22px;
  }
}
