/* Bak'd On The Bay — social platform styling (feed, composer, posts, the
   profile picker modal and follow controls). Layers on top of profiles.css,
   reusing its colour variables and translucent "bubble" aesthetic. */

.so-wrap { max-width: 720px; margin: 0 auto; padding: clamp(7.2rem, 12vw, 9rem) 18px 80px; }

/* Identity bar — who you're posting as */
.so-identity { display: flex; align-items: center; gap: 12px; border-radius: 16px; padding: 12px 16px; margin-bottom: 18px; }
.so-identity .so-id-text { flex: 1; min-width: 0; }
.so-identity .so-id-text strong { display: block; color: #fff; font-size: 0.98rem; }
.so-identity .so-id-text span { color: var(--muted); font-size: 0.8rem; text-transform: capitalize; }
.so-btn {
  border: none; cursor: pointer; border-radius: 999px; font-weight: 700; font-size: 0.85rem;
  padding: 9px 18px; background: var(--green); color: #04210a; transition: transform .15s, opacity .15s;
}
.so-btn:hover { transform: translateY(-1px); opacity: .92; }
.so-btn.ghost { background: transparent; color: var(--green); border: 1px solid var(--border-focus); }
.so-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* Avatars */
.so-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: none;
  background: #122; display: flex; align-items: center; justify-content: center;
  color: var(--green); font-weight: 800; border: 1px solid var(--border); }
.so-avatar.sm { width: 36px; height: 36px; font-size: 0.85rem; }
.so-avatar.placeholder { font-size: 1rem; }

/* Composer */
.so-composer { border-radius: 18px; padding: 16px; margin-bottom: 22px; }
.so-composer textarea {
  width: 100%; min-height: 84px; resize: vertical; border-radius: 12px;
  background: rgba(0,0,0,0.35); border: 1px solid var(--border); color: #fff;
  padding: 12px 14px; font: inherit; font-size: 0.98rem;
}
.so-composer textarea:focus { outline: none; border-color: var(--border-focus); }
.so-composer-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.so-composer-row input[type="url"] {
  flex: 1; min-width: 180px; border-radius: 999px; background: rgba(0,0,0,0.35);
  border: 1px solid var(--border); color: #fff; padding: 9px 14px; font: inherit; font-size: 0.85rem;
}
.so-composer-row input[type="url"]:focus { outline: none; border-color: var(--border-focus); }

/* Posts */
.so-feed { display: flex; flex-direction: column; gap: 16px; }
.so-post { border-radius: 18px; padding: 16px 18px; }
.so-post-head { display: flex; align-items: center; gap: 12px; }
.so-post-head .so-name { flex: 1; min-width: 0; }
.so-post-head .so-name a { color: #fff; text-decoration: none; font-weight: 700; }
.so-post-head .so-name a:hover { color: var(--green); }
.so-post-head .so-sub { color: var(--muted); font-size: 0.78rem; }
.so-role-pill {
  display: inline-block; font-size: 0.62rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--green); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; margin-left: 6px;
}
.so-post-body { color: #e8efe6; margin: 12px 2px; white-space: pre-wrap; word-wrap: break-word; line-height: 1.55; }
.so-post-img { width: 100%; border-radius: 14px; margin-top: 6px; border: 1px solid var(--border); }
.so-post-actions { display: flex; gap: 8px; margin-top: 12px; border-top: 1px solid rgba(255,255,255,.06); padding-top: 12px; }
.so-action {
  background: transparent; border: none; cursor: pointer; color: var(--gray);
  font: inherit; font-size: 0.86rem; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px; transition: background .15s, color .15s;
}
.so-action:hover { background: rgba(255,255,255,.06); color: #fff; }
.so-action.inert,
.so-action:disabled {
  cursor: default;
  opacity: .62;
  pointer-events: none;
}
.so-action.inert:hover,
.so-action:disabled:hover {
  background: transparent;
  color: var(--gray);
}
.so-action.liked { color: #ff5c8a; }
.so-action.danger:hover { color: #ff6b6b; }

.so-signed-out .like-btn,
.so-signed-out .comment-btn,
.so-signed-out .reel-like {
  display: none;
}

.so-signed-out .like-btn,
.so-signed-out .comment-btn,
.so-signed-out .reel-like,
.reel-like:disabled {
  cursor: default;
  opacity: .62;
  pointer-events: none;
}

.so-signed-out .so-fab {
  display: none !important;
}

/* Comments */
.so-comments { margin-top: 12px; display: none; }
.so-comments.open { display: block; }
.so-comment { display: flex; gap: 10px; padding: 8px 0; }
.so-comment .so-c-body { flex: 1; }
.so-comment .so-c-body .so-c-name { color: #fff; font-weight: 700; font-size: 0.86rem; }
.so-comment .so-c-body .so-c-text { color: #d7e0d4; font-size: 0.9rem; white-space: pre-wrap; word-wrap: break-word; }
.so-comment .so-c-body .so-sub { color: var(--muted); font-size: 0.72rem; }
.so-comment-form { display: flex; gap: 8px; margin-top: 8px; }
.so-comment-form input {
  flex: 1; border-radius: 999px; background: rgba(0,0,0,0.35); border: 1px solid var(--border);
  color: #fff; padding: 9px 14px; font: inherit; font-size: 0.86rem;
}
.so-comment-form input:focus { outline: none; border-color: var(--border-focus); }

.so-muted { color: var(--muted); text-align: center; padding: 14px; }
.so-error { color: #ff8585; font-size: 0.85rem; margin-top: 8px; }
.so-empty { color: var(--muted); text-align: center; padding: 40px 16px; }

/* Profile picker modal */
.so-modal-overlay {
  position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.66);
  display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px; overflow-y: auto;
}
.so-modal { position: relative; width: 100%; max-width: 460px; border-radius: 20px; padding: 24px; }
.so-modal h3 { color: #fff; margin-bottom: 4px; }
.so-modal-hint { color: var(--muted); font-size: 0.86rem; margin-bottom: 14px; }
.so-text-link {
  appearance: none; background: none; border: 0; border-radius: 0; color: var(--green);
  cursor: pointer; font: inherit; font-weight: 700; margin: 0; padding: 0; text-decoration: underline;
}
.so-text-link:hover { color: #cfff64; }
.so-modal-hint a, .so-muted a { color: var(--green); }
.so-modal-close { position: absolute; top: 12px; right: 16px; background: none; border: none; color: var(--muted); font-size: 1.8rem; cursor: pointer; line-height: 1; }
.so-modal-search { width: 100%; border-radius: 999px; background: rgba(0,0,0,0.4); border: 1px solid var(--border); color: #fff; padding: 10px 16px; font: inherit; margin-bottom: 12px; }
.so-modal-search:focus { outline: none; border-color: var(--border-focus); }
.so-modal-list { max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.so-pick { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 12px; padding: 8px 10px; cursor: pointer; color: #fff; }
.so-pick:hover { background: rgba(159,226,45,.08); border-color: var(--border); }
.so-pick-meta { display: flex; flex-direction: column; }
.so-pick-role { color: var(--muted); font-size: 0.75rem; text-transform: capitalize; }

/* Follow controls on profile view */
.profile-social { display: flex; flex-direction: column; gap: 8px; align-items: center; margin: 14px 0 4px; }
.profile-stats { display: flex; gap: 22px; justify-content: center; color: var(--muted); font-size: 0.85rem; }
.profile-stats b { color: #fff; display: block; font-size: 1.05rem; text-align: center; }
.profile-posts { margin-top: 26px; }
.profile-posts h3 { color: #fff; margin-bottom: 12px; text-align: center; }

@media (max-width: 540px) {
  .so-wrap { padding-top: 100px; }
  .so-post-actions { flex-wrap: wrap; }
}

/* ── Shared social sub-navigation ── */
:root {
  --so-shell-header-height: 80px;
  --so-shell-subnav-height: 68px;
}

.so-subnav {
  position: fixed; top: var(--so-shell-header-height); left: 0; right: 0; z-index: 900;
  background: rgba(6, 14, 8, 0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.so-subnav-inner {
  max-width: 1100px; margin: 0 auto; display: flex; gap: 4px; align-items: center;
  padding: 8px 14px; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.so-subnav-inner a {
  color: var(--gray); text-decoration: none; font-weight: 600; font-size: 0.86rem;
  padding: 7px 13px; border-radius: 999px; white-space: nowrap; transition: background .15s, color .15s;
}
.so-subnav-inner a:hover { color: #fff; background: rgba(255,255,255,.06); }
.so-subnav-inner a.active { color: #04210a; background: var(--green); }
.so-subnav-cta { margin-left: auto; color: #04210a !important; background: linear-gradient(135deg, #ffd166, #f6a609); }
.so-subnav-cta:hover { opacity: .92; }

/* ── Notifications: sub-nav bell + dropdown ── */
.bn-wrap { position: relative; margin-left: auto; flex: 0 0 auto; }
/* When the bell precedes the CTA it already owns the auto gap, so the CTA drops
   its own auto to avoid a double gap between them. */
.bn-wrap + .so-subnav-cta { margin-left: 6px; }
.bn-bell {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.05); border: 1px solid var(--border); color: #eaf5df;
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer; line-height: 1;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.bn-bell:hover { background: rgba(159,226,45,.16); border-color: var(--border-focus); color: #fff; transform: translateY(-1px); }
.bn-bell[aria-expanded="true"] { background: rgba(159,226,45,.18); border-color: var(--border-focus); color: #fff; }
.bn-badge {
  position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px; background: linear-gradient(150deg, #ff5f6d, #ff2d55); color: #fff;
  font-size: .66rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px #0b130d, 0 3px 8px rgba(255,45,85,.5); animation: bn-pop .28s ease;
}
@keyframes bn-pop { from { transform: scale(0); } 60% { transform: scale(1.18); } to { transform: scale(1); } }

.bn-panel {
  position: absolute; top: 50px; right: 0; width: 372px; max-width: 92vw; max-height: 72vh;
  overflow-y: auto; overflow-x: hidden;
  background: linear-gradient(180deg, #0e1a12, #0a130d);
  border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.6), 0 0 0 1px rgba(159,226,45,.05) inset;
  z-index: 1000; transform-origin: top right; animation: bn-panel-in .16s ease;
}
@keyframes bn-panel-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.bn-panel::-webkit-scrollbar { width: 8px; }
.bn-panel::-webkit-scrollbar-thumb { background: rgba(159,226,45,.22); border-radius: 8px; }

.bn-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0;
  background: rgba(12,21,14,.96); backdrop-filter: blur(6px); z-index: 2;
}
.bn-panel-head strong { color: #fff; font-size: .98rem; letter-spacing: .2px; }
.bn-panel-actions { display: flex; gap: 4px; align-items: center; }
.bn-mark, .bn-gear {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--green); font-size: .78rem; font-weight: 700;
  cursor: pointer; padding: 6px 8px; border-radius: 9px; transition: background .15s ease;
}
.bn-gear { color: var(--muted); }
.bn-mark:hover, .bn-gear:hover { background: rgba(255,255,255,.07); color: #fff; }

.bn-item {
  display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px 13px 18px;
  border-bottom: 1px solid rgba(255,255,255,.045); text-decoration: none; color: #e8efe6;
  position: relative; transition: background .14s ease;
}
.bn-item:last-child { border-bottom: 0; }
.bn-item:hover { background: rgba(159,226,45,.07); }
.bn-item.unread { background: rgba(159,226,45,.06); }
/* Left accent bar marks unread at a glance. */
.bn-item.unread::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--green);
}
/* Avatar with a small type badge tucked into its corner. */
.bn-av { position: relative; flex: 0 0 auto; }
.bn-av .so-avatar.sm { width: 42px; height: 42px; }
.bn-ic {
  position: absolute; right: -3px; bottom: -3px; width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ic, var(--green));
  background: #0d1710; border: 2px solid #0d1710;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ic, #9FE22D) 55%, transparent);
}
.bn-ic svg { display: block; }
.bn-text { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 2px; }
.bn-label { font-size: .87rem; line-height: 1.4; color: #cdd8c8; }
.bn-label strong { color: #fff; font-weight: 700; }
.bn-detail {
  font-size: .79rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-left: 9px; border-left: 2px solid var(--border); margin-top: 1px;
}
.bn-text time { font-size: .68rem; color: #6f8069; margin-top: 3px; letter-spacing: .3px; }
.bn-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: 0 0 auto; margin-top: 6px; box-shadow: 0 0 8px rgba(159,226,45,.6); }

/* Empty state — composed icon + copy. */
.bn-empty { padding: 34px 26px; text-align: center; color: var(--muted); }
.bn-empty-ic {
  display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px;
  border-radius: 50%; margin-bottom: 12px; color: var(--green);
  background: rgba(159,226,45,.1); border: 1px solid var(--border);
}
.bn-empty p { font-size: .86rem; line-height: 1.5; margin: 0 auto; max-width: 240px; }

/* Loading skeleton rows. */
.bn-skeleton { padding: 8px 0; }
.bn-skeleton span {
  display: block; height: 44px; margin: 8px 16px; border-radius: 12px;
  background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04));
  background-size: 200% 100%; animation: bn-shimmer 1.2s ease-in-out infinite;
}
.bn-skeleton span:nth-child(2) { opacity: .8; }
.bn-skeleton span:nth-child(3) { opacity: .6; }
@keyframes bn-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Preferences (opt-out) form. */
.bn-prefs { padding: 16px; }
.bn-prefs-hint { color: var(--muted); font-size: .78rem; margin: 12px 0 8px; }
.bn-pref { display: flex; gap: 10px; align-items: center; color: #dbe6d5; font-size: .87rem; padding: 8px 0; cursor: pointer; }
.bn-pref input { accent-color: var(--green); width: 16px; height: 16px; }
.bn-pref-master { border-bottom: 1px solid var(--border); padding-bottom: 13px; margin-bottom: 6px; }
.bn-save { margin-top: 14px; }
.bn-saved { color: var(--green); font-size: .82rem; margin-left: 10px; font-weight: 700; }

/* ── Notifications: full inline panel (hub) ── */
.bn-hub { background: linear-gradient(180deg, rgba(14,26,18,.7), rgba(10,19,13,.7)); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-soft); }
.bn-hub-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.bn-hub-head h3 { margin: 0; color: #fff; font-size: 1.12rem; display: flex; align-items: center; gap: 9px; }
.bn-hub-ic { display: inline-flex; color: var(--green); }
.bn-hub .bn-list { max-height: 460px; overflow-y: auto; }
.so-btn.ghost { background: transparent; border: 1px solid var(--border); color: #cfe8c2; }

/* Pages that use the sub-nav get extra top padding so content clears it. */
.so-has-subnav { padding-top: 0 !important; }

/* ── Studio (create) modal ── */
.so-modal.studio { max-width: 560px; }
.studio-tabs { display: flex; gap: 6px; background: rgba(0,0,0,.3); border-radius: 999px; padding: 4px; margin-bottom: 14px; }
.studio-tab { flex: 1; background: transparent; border: none; color: var(--muted); font: inherit; font-weight: 700; padding: 9px; border-radius: 999px; cursor: pointer; }
.studio-tab.active { background: var(--green); color: #04210a; }
.studio-stage {
  position: relative; border-radius: 14px; overflow: hidden; background: #060d07;
  border: 1px solid var(--border); min-height: 200px; display: flex; align-items: center; justify-content: center;
}
.studio-stage img, .studio-stage video { width: 100%; max-height: 380px; object-fit: contain; display: block; background: #000; }
.studio-drop { width: 100%; min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; color: var(--green); }
.studio-drop span { font-weight: 700; }
.studio-drop small { color: var(--muted); }
.studio-clear { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.6); color: #fff; font-size: 1.2rem; cursor: pointer; }
.studio-caption { width: 100%; min-height: 64px; resize: vertical; border-radius: 12px; background: rgba(0,0,0,.35); border: 1px solid var(--border); color: #fff; padding: 11px 13px; font: inherit; margin-top: 12px; }
.studio-caption:focus { outline: none; border-color: var(--border-focus); }
.studio-section { margin-top: 14px; }
.studio-section > label { display: block; color: #fff; font-weight: 700; font-size: 0.82rem; margin-bottom: 7px; }
.studio-section > label small { color: var(--muted); font-weight: 500; }
.studio-filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.studio-filter { flex: none; background: transparent; border: none; color: var(--muted); font: inherit; font-size: 0.72rem; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.studio-filter-sw { width: 46px; height: 46px; border-radius: 10px; border: 2px solid transparent; background-image: linear-gradient(135deg, #6ab04c, #f6a609, #8e44ad); }
.studio-filter.active { color: #fff; }
.studio-filter.active .studio-filter-sw { border-color: var(--green); }
.studio-music, .studio-loc { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.studio-chip { background: rgba(0,0,0,.35); border: 1px solid var(--border); color: var(--gray); font: inherit; font-size: 0.82rem; padding: 7px 13px; border-radius: 999px; cursor: pointer; }
.studio-chip.active { background: var(--green); color: #04210a; border-color: var(--green); }
.studio-loc input, .studio-loc select, .studio-vis { background: rgba(0,0,0,.35); border: 1px solid var(--border); color: #fff; border-radius: 10px; padding: 9px 12px; font: inherit; }
.studio-vis { width: 100%; }
.studio-publish { width: 100%; margin-top: 18px; padding: 13px; font-size: 0.98rem; }
.studio-library { margin-top: 10px; }
.studio-lib-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.studio-lib-item { flex: none; width: 64px; height: 64px; padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; cursor: pointer; background: #000; }
.studio-lib-item img, .studio-lib-item video { width: 100%; height: 100%; object-fit: cover; }

/* ── Floating create button ── */
.so-fab { position: fixed; right: 22px; bottom: 22px; z-index: 950; width: 60px; height: 60px; border-radius: 50%; border: none; background: var(--green); color: #04210a; font-size: 1.8rem; font-weight: 800; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.so-fab:hover { transform: translateY(-2px); }

/* ── Hub ── */
.hub-wrap { max-width: 1000px; margin: 0 auto; padding: 150px 18px 80px; }
.hub-cta { background: linear-gradient(135deg, rgba(246,166,9,.18), rgba(159,226,45,.12)); border: 1px solid var(--border-focus); border-radius: 18px; padding: 22px 24px; margin-bottom: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
/* The role/approval gate toggles `hidden` on this box; without this rule the
   `display:flex` above overrides the UA `[hidden]` style and the vendor/sponsor
   package CTA shows to every role (and flashes for all users before JS runs). */
.hub-cta[hidden] { display: none; }
.hub-cta h2 { color: #fff; margin: 0 0 4px; }
.hub-cta p { color: var(--muted); margin: 0; }
.hub-cta .so-btn { margin-left: auto; padding: 13px 24px; background: linear-gradient(135deg, #ffd166, #f6a609); }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.hub-card { display: block; text-decoration: none; background: rgba(10,20,12,.6); border: 1px solid var(--border); border-radius: 16px; padding: 20px; transition: transform .15s, border-color .15s; }
.hub-card:hover { transform: translateY(-2px); border-color: var(--border-focus); }
.hub-card .hub-icon { font-size: 1.8rem; }
.hub-card h3 { color: #fff; margin: 10px 0 4px; }
.hub-card p { color: var(--muted); font-size: 0.86rem; margin: 0; }
.next-steps-panel {
  margin-bottom: 26px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(12,24,14,.76), rgba(8,16,10,.76));
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,.08);
}
.next-steps-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.next-steps-kicker {
  margin: 0 0 5px;
  color: var(--green);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.next-steps-head h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  line-height: 1.12;
}
.next-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.next-step-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(159,226,45,.18);
  border-radius: 16px;
  background: rgba(255,255,255,.045);
}
.next-step-num {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(159,226,45,.14);
  color: var(--green);
  font-weight: 800;
  font-size: .78rem;
}
.next-step-card h3 {
  margin: 0;
  color: #fff;
  font-size: 1rem;
  line-height: 1.18;
}
.next-step-card p {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.45;
}
.next-step-link {
  margin-top: auto;
  color: var(--green);
  font-size: .85rem;
  font-weight: 800;
  text-decoration: none;
}
.next-step-link:hover {
  text-decoration: underline;
}
.assistant-panel {
  margin-bottom: 26px;
  padding: 22px;
  border: 1px solid rgba(159,226,45,.34);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18,28,20,.82), rgba(8,16,12,.78));
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,.08);
}
.assistant-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.assistant-kicker {
  margin: 0 0 5px;
  color: var(--green);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.assistant-head h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  line-height: 1.15;
}
.assistant-head p {
  max-width: 68ch;
  margin: 7px 0 0;
  color: var(--muted);
}
.assistant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.assistant-card {
  position: relative;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(0,0,0,.22);
}
.assistant-step {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--green);
  color: #061006;
  font-weight: 900;
}
.assistant-card h3 {
  margin: 0;
  color: #fff;
  font-size: 1.02rem;
  line-height: 1.2;
}
.assistant-explain,
.assistant-question {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.45;
}
.assistant-question {
  color: #d8efcf;
  font-weight: 700;
}
.assistant-link {
  margin-top: auto;
  color: var(--green);
  font-weight: 900;
  text-decoration: none;
}
.assistant-link:hover {
  text-decoration: underline;
}
.opportunity-panel {
  margin-bottom: 26px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(10,20,12,.6);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,.08);
}
.opportunity-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.opportunity-kicker {
  margin: 0 0 5px;
  color: var(--green);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.opportunity-head h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  line-height: 1.15;
}
.opportunity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.opportunity-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(159,226,45,.18);
  border-radius: 16px;
  background: rgba(255,255,255,.045);
  color: #fff;
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.opportunity-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
}
.opportunity-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: #122;
  border: 1px solid var(--border);
}
.opportunity-avatar.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  font-weight: 800;
}
.opportunity-role {
  color: var(--green);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.opportunity-card strong {
  font-size: 1rem;
  line-height: 1.15;
}
.opportunity-sub,
.opportunity-reason {
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.4;
}
.opportunity-reason {
  margin-top: auto;
  color: #cfe8c2;
}

/* ── Reels ── */
.reels-stage { max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.reel-card { position: relative; background: #000; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; }
.reel-card video { width: 100%; max-height: 78vh; display: block; background: #000; }
.reel-overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px; background: linear-gradient(transparent, rgba(0,0,0,.75)); color: #fff; }
.reel-overlay .reel-author { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.reel-overlay .reel-author a { color: #fff; text-decoration: none; }
.reel-overlay .reel-cap { margin-top: 8px; font-size: 0.92rem; }
.reel-music { font-size: 0.78rem; color: var(--green); margin-top: 6px; }
.reel-actions { position: absolute; right: 12px; bottom: 90px; display: flex; flex-direction: column; gap: 14px; }
.reel-actions button { background: rgba(0,0,0,.5); border: none; color: #fff; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; }
.reel-like { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.reel-like.liked { color: #ff5c8a; }
.reel-like .lc { font-size: 0.62rem; margin-top: 2px; }

/* ── Stories ── */
.stories-row { display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px 16px; }
.story-bubble { flex: none; width: 78px; text-align: center; cursor: pointer; background: none; border: none; color: #fff; }
.story-ring { width: 70px; height: 70px; border-radius: 50%; padding: 3px; background: linear-gradient(135deg, var(--green), #f6a609); }
.story-ring img, .story-ring .ph { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #122; display: flex; align-items: center; justify-content: center; color: var(--green); font-weight: 800; border: 2px solid #060d07; }
.story-bubble span { display: block; font-size: 0.72rem; margin-top: 6px; color: var(--gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.story-viewer { position: fixed; inset: 0; z-index: 11000; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; }
.story-viewer .sv-card { position: relative; width: 100%; max-width: 440px; max-height: 92vh; }
.story-viewer img, .story-viewer video { width: 100%; max-height: 86vh; object-fit: contain; border-radius: 14px; }
.story-viewer .sv-meta { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; }
.story-viewer .sv-cap { position: absolute; bottom: 18px; left: 16px; right: 16px; color: #fff; background: rgba(0,0,0,.4); padding: 8px 12px; border-radius: 10px; }
.story-viewer .sv-close { position: absolute; top: 10px; right: 12px; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; z-index: 2; }

/* ── Library grid ── */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.lib-item { position: relative; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 1; }
.lib-item img, .lib-item video { width: 100%; height: 100%; object-fit: cover; }
.lib-item .lib-del { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: none; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
.lib-item .lib-kind { position: absolute; left: 6px; bottom: 6px; font-size: 0.66rem; background: rgba(0,0,0,.6); color: #fff; padding: 2px 7px; border-radius: 999px; }

/* ── Groups ── */
.groups-layout { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }
.group-list { display: flex; flex-direction: column; gap: 8px; }
.group-item { display: flex; gap: 12px; align-items: center; text-align: left; width: 100%; background: rgba(10,20,12,.6); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; cursor: pointer; color: #fff; }
.group-item:hover, .group-item.active { border-color: var(--border-focus); }
.group-item .gi-meta { flex: 1; min-width: 0; }
.group-item .gi-meta strong { display: block; }
.group-item .gi-meta span { color: var(--muted); font-size: 0.78rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.group-chat { background: rgba(10,20,12,.6); border: 1px solid var(--border); border-radius: 16px; display: flex; flex-direction: column; min-height: 540px; }
.gc-head { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.gc-head h3 { color: #fff; margin: 0; flex: 1; }
.gc-msgs { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; max-height: 60vh; }
.gc-msg { max-width: 78%; }
.gc-msg .gc-bubble { background: rgba(255,255,255,.07); padding: 9px 13px; border-radius: 14px; color: #e8efe6; }
.gc-msg .gc-who { font-size: 0.72rem; color: var(--green); margin-bottom: 2px; }
.gc-msg.mine { align-self: flex-end; }
.gc-msg.mine .gc-bubble { background: var(--green); color: #04210a; }
.gc-form { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); align-items: center; }
.gc-form input[type=text] { flex: 1; border-radius: 999px; background: rgba(0,0,0,.35); border: 1px solid var(--border); color: #fff; padding: 10px 15px; font: inherit; }
.gc-media { display: block; max-width: 100%; max-height: 260px; width: auto; border-radius: 10px; margin-top: 6px; }
/* Chat attachment button + pre-send preview, shared by group chats and direct
   messages so a photo/video attaches identically in both. */
.dm-attach { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: rgba(0,0,0,.35); color: #fff; font-size: 1.1rem; cursor: pointer; }
.dm-attach:hover { background: rgba(159,226,45,.12); }
.dm-attach:disabled { opacity: .5; cursor: default; }
.dm-preview { position: relative; margin: 0 14px 12px; padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: rgba(0,0,0,.3); max-width: 180px; }
.dm-preview img, .dm-preview video { display: block; max-width: 100%; max-height: 140px; border-radius: 8px; }
.dm-preview-x { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: #1b2229; color: #fff; cursor: pointer; font-size: 1rem; line-height: 1; }
.gc-empty { padding: 60px 20px; text-align: center; color: var(--muted); }
@media (max-width: 760px) { .groups-layout { grid-template-columns: 1fr; } }

/* ── Map ── */
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.map-card { background: rgba(10,20,12,.6); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.map-card iframe { width: 100%; height: 180px; border: 0; display: block; background: #122; }
.map-card .mc-body { padding: 12px 14px; }
.map-card .mc-body h3 { color: #fff; margin: 0 0 2px; font-size: 0.95rem; }
.map-card .mc-body p { color: var(--muted); font-size: 0.8rem; margin: 0; }
.so-page { max-width: 1000px; margin: 0 auto; padding: 150px 18px 80px; }
.so-page-narrow { max-width: 720px; }
.so-page h1 { color: #fff; }
.so-page .lead { color: var(--muted); margin-bottom: 22px; }

/* Shared polish layer */
.hub-wrap,
.so-wrap,
.so-page,
.so-has-subnav .page-hero {
  padding-top: calc(var(--so-shell-header-height) + var(--so-shell-subnav-height) + 24px);
}

.hub-card,
.group-item,
.group-chat,
.map-card {
  background: var(--surface-glass);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,.08);
}

.so-btn,
.studio-chip,
.studio-tab,
.so-action {
  min-height: 38px;
}

@media (max-width: 640px) {
  :root {
    --so-shell-header-height: 134px;
    --so-shell-subnav-height: 128px;
  }

  .so-has-subnav .site-header {
    min-height: var(--so-shell-header-height);
  }

  .so-subnav-inner {
    flex-wrap: wrap;
    justify-content: center;
    overflow: visible;
    padding-inline: 12px;
    gap: 6px;
  }

  .so-subnav-inner a {
    flex: 1 1 auto;
    min-width: 64px;
    padding: 7px 10px;
    text-align: center;
    white-space: normal;
  }

  .bn-wrap,
  .so-subnav-cta,
  .bn-wrap + .so-subnav-cta {
    margin-left: 0;
  }

  body:has(.so-fab) {
    padding-bottom: 86px;
  }

  .so-fab {
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));
    width: 54px;
    height: 54px;
    font-size: 1.55rem;
  }

  .so-identity,
  .so-composer-row,
  .hub-cta,
  .next-steps-head,
  .assistant-head,
  .opportunity-head,
  .gc-form {
    align-items: stretch;
    flex-direction: column;
  }

  .next-steps-grid,
  .assistant-grid,
  .opportunity-grid {
    grid-template-columns: 1fr;
  }

  .next-step-card,
  .assistant-card,
  .opportunity-card {
    min-height: auto;
  }

  .hub-cta .so-btn {
    margin-left: 0;
  }
}

@media (max-width: 900px) {
  :root {
    --so-shell-header-height: 124px;
    --so-shell-subnav-height: 128px;
  }

  .so-has-subnav .site-header {
    min-height: var(--so-shell-header-height);
  }

  .so-subnav-inner {
    flex-wrap: wrap;
    justify-content: center;
    overflow: visible;
    padding-inline: 12px;
    gap: 6px;
  }

  .so-subnav-inner a {
    flex: 1 1 auto;
    min-width: 64px;
    padding: 7px 10px;
    text-align: center;
    white-space: normal;
  }

  .bn-wrap,
  .so-subnav-cta,
  .bn-wrap + .so-subnav-cta {
    margin-left: 0;
  }

  body[data-cms-page="hub"] .so-fab {
    left: 16px;
    right: auto;
  }
}
