/* =========================
   BASE
   ========================= */

   * {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "DM Sans", sans-serif;
    text-align: center;
    background-color: #f4f7f8;
    color: #10151a;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

:root {
    --card-bg: #ffffff;
    --text: #10151a;
    --muted: #65707a;
    --line: #dce3e7;
    --accent: #00e5ff;
    --accent-dark: #087e8f;
}

/* =========================
   TOP BAR
   ========================= */

.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 72px;
    padding: 12px 24px;
    background: #0d1117;
    color: #ffffff;
    box-shadow: 0 2px 12px rgba(0,0,0,.14);
}

.brand,
.modal-brand,
.auth-logo {
    font-family: "Parisienne", cursive;
    color: #00e5ff;
}

.brand {
    font-size: 38px;
    line-height: 1;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex: 1;
}

.nav-links a {
    color: #c8d2dc;
    text-decoration: none;
    font-weight: 700;
    transition: .2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #00e5ff;
}

.header-auth,
.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-signin-button,
.signout-button,
.settings-button,
.notification-button,
.header-create-reel-button {
    border: 1px solid rgba(255,255,255,.14);
    background: #212830;
    color: #ffffff;
    border-radius: 999px;
}

.header-signin-button,
.signout-button {
    padding: 9px 14px;
}

.settings-button,
.notification-button,
.header-create-reel-button {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
}

.header-create-reel-button {
    color: #00e5ff;
    font-size: 26px;
}

.notification-wrap {
    position: relative;
}

.notification-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #ff4d6d;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

.notification-panel {
    position: absolute;
    top: 48px;
    right: 0;
    width: min(380px, 92vw);
    max-height: 72vh;
    overflow: hidden;
    border: 1px solid #2a313a;
    border-radius: 16px;
    background: #161b22;
    color: #f5f7fa;
    box-shadow: 0 18px 60px rgba(0,0,0,.28);
}

.notification-panel-header,
.notification-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
}

.notification-panel-header {
    border-bottom: 1px solid #2a313a;
}

.notification-panel-header h3 {
    margin: 0;
}

.notification-panel-header button,
.notification-filter {
    border: 0;
    background: transparent;
    color: inherit;
}

.notification-filter.active {
    color: #00e5ff;
}

.notification-list {
    max-height: 56vh;
    overflow-y: auto;
}

.user-profile-button {
    border: 0;
    background: transparent;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.header-avatar-image,
.header-avatar-fallback {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    display: grid;
    place-items: center;
    background: #10373d;
    color: #00e5ff;
    font-weight: 800;
}

.header-name-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* =========================
   LAYOUT / HERO
   ========================= */

.app-shell {
    min-height: calc(100vh - 72px);
}

.app-page {
    min-height: calc(100vh - 72px);
}

.hero,
.page-hero {
    padding: 70px 20px 44px;
    background: linear-gradient(135deg, #0d1117 0%, #15252b 62%, #0d1117 100%);
    color: #fff;
}

.home-hero {
    padding-top: 86px;
}

.hero h1,
.page-hero h1 {
    margin: 8px 0 4px;
    font-size: clamp(34px, 7vw, 66px);
}

.hero h1 span,
.page-hero h1 span {
    color: #00e5ff;
}

.hero h2 {
    margin: 0 0 18px;
    color: #c9eaf0;
}

.hero-text,
.page-hero p,
.compact-page-hero p {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: #bdc8d3;
    line-height: 1.65;
}

.eyebrow {
    margin: 0;
    color: #00e5ff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .12em;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.primary-button,
.secondary-button,
.post-button,
.small-primary-button,
.follow-button,
.edit-profile-button,
.auth-primary-button,
.profile-save-button,
.settings-reset-button,
.danger-button {
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 800;
}

.primary-button,
.post-button,
.small-primary-button,
.follow-button,
.auth-primary-button,
.profile-save-button {
    border: 0;
    background: #00e5ff;
    color: #0d1117;
}

.secondary-button,
.edit-profile-button,
.settings-reset-button {
    border: 1px solid #cbd5dc;
    background: #fff;
    color: #26323c;
}

.danger-button {
    border: 1px solid #cc3b4a;
    background: #fff5f6;
    color: #a82334;
}

/* =========================
   FEED / POSTS
   ========================= */

.feed {
    width: min(760px, calc(100% - 28px));
    margin: 28px auto 52px;
}

.post-composer,
.quick-composer,
.post-card,
.profile-about-card,
.profile-posts-card,
.settings-card,
.content-panel {
    border: 1px solid #dfe5e9;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(16,21,26,.06);
}

.post-composer,
.quick-composer {
    padding: 18px;
    margin-bottom: 22px;
}

.composer-header {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.avatar,
.composer-avatar-image {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    display: grid;
    place-items: center;
    background: #10373d;
    color: #00e5ff;
    font-weight: 800;
}

.composer-header h3,
.composer-user-name {
    margin: 0;
}

.composer-user-name {
    color: #6a747d;
    font-size: 13px;
}

.post-input,
.quick-composer textarea,
.comment-input,
.message-composer textarea,
.settings-card input,
.settings-card select,
.settings-card textarea,
.search-box input,
.search-box select,
.message-search-box input,
.group-search-box input,
.church-form input,
.church-form textarea,
.marketplace-form input,
.marketplace-form textarea,
.marketplace-form select,
.profile-edit-card input,
.profile-edit-card textarea,
.compact-action-modal textarea,
.compact-action-modal select {
    width: 100%;
    border: 1px solid #d6dee4;
    border-radius: 12px;
    padding: 11px 12px;
    background: #fff;
    color: #10151a;
}

.post-input {
    margin: 14px 0;
    resize: vertical;
}

.composer-actions,
.post-options,
.post-actions,
.public-profile-actions,
.profile-page-actions,
.feed-filter-tabs,
.search-box,
.settings-footer-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.composer-actions {
    justify-content: space-between;
}

.post-options button {
    border: 0;
    background: #eef4f6;
    border-radius: 10px;
    padding: 8px 10px;
}

.feed-title {
    text-align: left;
}

.feed-status,
.section-status,
.profile-message,
.settings-save-status,
.profile-post-status,
.notification-status {
    min-height: 18px;
    color: #66717a;
}

.post-card {
    margin: 0 0 18px;
    padding: 18px;
    text-align: left;
}

.post-label {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .05em;
}

.scripture-label { background: #eef8ff; color: #316f9e; }
.prayer-label { background: #f2f0ff; color: #6c55a8; }
.testimony-label { background: #fff7e8; color: #956315; }
.photo-label { background: #eef9f4; color: #307b58; }
.reel-label { background: #102d32; color: #00e5ff; }

.post-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-avatar-button,
.post-author-button {
    border: 0;
    background: transparent;
    padding: 0;
    color: inherit;
}

.post-avatar-slot .avatar {
    width: 44px;
    height: 44px;
    object-fit: cover;
}

.post-user-info {
    min-width: 0;
}

.post-author-name-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.post-author,
.post-time {
    margin: 0;
}

.post-time {
    margin-top: 2px;
    color: #7a838c;
    font-size: 12px;
}

.post-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.55;
}

.post-photo,
.post-reel-video {
    width: 100%;
    max-height: 72vh;
    margin: 14px 0;
    border-radius: 14px;
    object-fit: contain;
    background: #000;
}

.post-actions {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #edf0f2;
}

.post-actions button {
    border: 0;
    background: transparent;
    color: #59636c;
    border-radius: 10px;
    padding: 8px 10px;
    font-weight: 700;
}

.post-actions button:hover,
.post-actions button.active {
    background: #eefbfc;
    color: #087e8f;
}

.comment-section {
    display: none;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #edf0f2;
}

.comment-section.show {
    display: block;
}

.comment-section > .comment-input {
    margin-bottom: 8px;
}

.comments-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.comment {
    padding: 10px 12px;
    border-radius: 12px;
    background: #f5f8fa;
}

.delete-comment-button,
.submit-comment {
    margin-top: 8px;
}

/* =========================
   PROFILE / MODALS
   ========================= */

.modal-backdrop,
.auth-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(3,7,10,.68);
    backdrop-filter: blur(6px);
}

.modal-card,
.auth-card {
    position: relative;
    width: min(620px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 20px;
    background: #fff;
    color: #10151a;
    padding: 26px;
    box-shadow: 0 24px 90px rgba(0,0,0,.32);
    text-align: left;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
}

.auth-logo,
.modal-brand {
    font-size: 38px;
}

.auth-card h2,
.modal-card h2 {
    margin-top: 8px;
}

.auth-card form,
.profile-edit-card form {
    display: grid;
    gap: 8px;
}

.google-button {
    width: 100%;
    border: 1px solid #d8dee3;
    background: #fff;
    border-radius: 12px;
    padding: 11px 14px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
}

.auth-divider span {
    height: 1px;
    flex: 1;
    background: #e1e6ea;
}

.public-profile-header,
.profile-edit-sections {
    text-align: center;
}

.public-profile-avatar,
.public-profile-avatar-fallback,
.profile-avatar-preview,
.profile-avatar-preview-placeholder,
.profile-page-avatar-image,
.profile-page-avatar-fallback {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    object-fit: cover;
    display: grid;
    place-items: center;
    margin: 0 auto;
    background: #10373d;
    color: #00e5ff;
    font-size: 24px;
    font-weight: 800;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin: 14px 0;
}

.profile-stat {
    display: grid;
    gap: 3px;
}

.profile-page-shell {
    width: min(1100px, calc(100% - 28px));
    margin: 28px auto 54px;
}

.profile-cover-area {
    height: 240px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(135deg, #10373d, #0d1117);
}

.profile-page-cover-image,
.profile-page-cover-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-page-cover-placeholder {
    display: grid;
    place-items: center;
    color: #00e5ff;
    font-family: "Parisienne", cursive;
    font-size: 52px;
}

.profile-top-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: end;
    gap: 18px;
    padding: 18px 22px 22px;
    background: #fff;
    border: 1px solid #dfe5e9;
    border-top: 0;
    border-radius: 0 0 20px 20px;
    text-align: left;
}

.profile-page-avatar-wrap {
    margin-top: -58px;
}

.profile-page-avatar-image,
.profile-page-avatar-fallback {
    width: 116px;
    height: 116px;
    margin: 0;
    border: 4px solid #fff;
}

.profile-page-heading h1,
.profile-page-heading p {
    margin: 0;
}

.profile-page-username,
.profile-page-bio,
.muted-text {
    color: #67717a;
}

.profile-page-content-grid {
    display: grid;
    grid-template-columns: minmax(230px, 320px) 1fr;
    gap: 18px;
    margin-top: 18px;
}

.profile-about-card,
.profile-posts-card {
    padding: 18px;
    text-align: left;
}

.profile-about-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

/* =========================
   SETTINGS
   ========================= */

.settings-shell {
    width: min(840px, calc(100% - 28px));
    margin: 34px auto 52px;
    text-align: left;
}

.settings-heading {
    text-align: center;
}

.settings-card {
    margin-top: 16px;
    padding: 20px;
}

.settings-card-heading,
.settings-row,
.settings-select-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.settings-card-heading > div {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.settings-icon {
    font-size: 24px;
}

.settings-card-heading h2,
.settings-card-heading p {
    margin: 0;
}

.settings-row,
.settings-select-row {
    padding: 14px 0;
    border-top: 1px solid #edf0f2;
}

.settings-row span,
.settings-select-row span {
    display: grid;
    gap: 3px;
}

.settings-row small,
.settings-select-row small {
    color: #6f7880;
}

.settings-select-row select {
    width: auto;
    min-width: 180px;
}

.settings-account-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

/* =========================
   GROUPS
   ========================= */

.groups-layout {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0,1fr);
    gap: 18px;
    width: min(1150px, calc(100% - 28px));
    margin: 26px auto 48px;
}

.groups-sidebar-heading,
.group-header-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.groups-list,
.group-request-list,
.group-posts {
    display: grid;
    gap: 10px;
}

.create-group-form,
.group-composer,
.group-admin-tools {
    display: grid;
    gap: 10px;
    margin: 14px 0;
}

/* =========================
   SOCIAL / PEOPLE / MESSAGES
   ========================= */

.social-grid-layout,
.moderation-layout {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto 32px;
    padding: 0 20px;
}

.content-panel {
    padding: 20px;
}

.section-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.people-grid,
.directory-grid,
.marketplace-grid,
.church-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
    gap: 14px;
}

.social-person-card,
.directory-card,
.marketplace-card,
.moderation-card,
.reel-submission-row {
    border: 1px solid rgba(127,127,127,.18);
    border-radius: 16px;
    padding: 14px;
    background: var(--card-bg,#fff);
}

.social-person-main,
.comment-author-button {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.social-person-main {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.social-person-avatar,
.message-mini-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #10373d;
    color: #00e5ff;
    font-weight: 700;
    overflow: hidden;
    flex: 0 0 auto;
}

.social-person-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.social-person-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.social-person-copy small {
    opacity: .7;
}

.social-person-actions,
.comment-actions,
.moderation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.social-person-actions button,
.comment-actions button {
    padding: 7px 10px;
}

.messages-layout {
    display: grid;
    grid-template-columns: minmax(260px,340px) minmax(0,1fr);
    gap: 18px;
    max-width: 1150px;
    margin: 0 auto 32px;
    padding: 0 20px;
}

.conversation-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.conversation-row {
    display: grid;
    grid-template-columns: auto minmax(0,1fr) auto;
    gap: 10px;
    align-items: center;
    border: 0;
    border-radius: 12px;
    padding: 10px;
    background: rgba(127,127,127,.08);
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.conversation-row-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.conversation-row-copy strong,
.conversation-row-copy small,
.conversation-row-preview {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conversation-row-preview {
    color: #6d7680;
}

.conversation-row-meta {
    display: grid;
    justify-items: end;
    gap: 6px;
}

.conversation-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00e5ff;
}

.message-person-results {
    display: grid;
    gap: 8px;
    margin: 10px 0;
}

.message-thread-header {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #edf0f2;
    padding-bottom: 10px;
}

.message-thread-person {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
}

.message-back-button {
    display: none;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(127,127,127,.1);
    color: inherit;
    font-size: 20px;
}

.messages-list {
    min-height: 360px;
    max-height: 60vh;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
}

.message-bubble {
    max-width: 78%;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(127,127,127,.12);
    text-align: left;
}

.message-bubble.mine {
    align-self: flex-end;
    background: #10373d;
    color: #eafcff;
}

.message-bubble.theirs {
    align-self: flex-start;
}

.message-bubble p {
    margin: 4px 0;
    white-space: pre-wrap;
}

.message-bubble time,
.message-bubble small {
    font-size: 11px;
    opacity: .7;
}

.message-composer {
    display: flex;
    gap: 10px;
    align-items: end;
    position: sticky;
    bottom: 0;
    background: var(--card-bg,#fff);
    padding-top: 10px;
    padding-bottom: max(4px, env(safe-area-inset-bottom));
}

.message-composer textarea {
    flex: 1;
    min-width: 0;
}

/* =========================
   CHURCH / MARKETPLACE / MORE
   ========================= */

.church-form,
.marketplace-form {
    max-width: 900px;
    margin: 0 auto 20px;
}

.form-grid,
.church-form-grid,
.marketplace-form-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px;
}

.form-grid label,
.church-form-grid label,
.marketplace-form-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.full-span {
    grid-column: 1/-1;
}

.directory-card,
.marketplace-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.marketplace-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 12px;
}

.marketplace-price {
    font-size: 20px;
}

.more-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
    gap: 14px;
    max-width: 1000px;
    margin: auto;
    padding: 0 20px 42px;
}

.more-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 18px;
    border-radius: 16px;
    border: 1px solid rgba(127,127,127,.18);
    background: #fff;
    text-decoration: none;
    color: inherit;
    text-align: left;
}

.more-card span {
    font-size: 24px;
}

/* =========================
   POST TOOLS / PRAYER UPDATES
   ========================= */

.group-header-actions,
.saved-page-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.group-header-actions {
    justify-content: flex-end;
}

.saved-page-toolbar {
    justify-content: space-between;
    margin-bottom: 14px;
}

.saved-page-feed,
.single-post-feed {
    max-width: 760px;
}

.single-post-back-button {
    margin-bottom: 14px;
}

.post-focus-hero {
    padding-bottom: 20px;
}

.post-secondary-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 0 2px;
    border-top: 1px solid rgba(120,130,140,.18);
}

.post-secondary-button {
    border: 0;
    background: transparent;
    color: #5d6771;
    font-size: 13px;
    font-weight: 700;
    padding: 7px 9px;
    border-radius: 9px;
}

.post-secondary-button:hover,
.post-secondary-button.active {
    background: rgba(0,229,255,.1);
    color: #087e8f;
}

.report-post-button:hover {
    background: rgba(170,45,45,.08);
    color: #9b2c2c;
}

.pinned-post-badge {
    display: inline-flex;
    width: fit-content;
    margin: 0 0 10px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(0,229,255,.1);
    color: #087e8f;
    font-size: 12px;
    font-weight: 800;
}

.prayer-updates {
    margin: 14px 0;
    padding: 13px 14px;
    border-left: 3px solid #00e5ff;
    border-radius: 0 12px 12px 0;
    background: rgba(0,229,255,.055);
}

.group-members-list,
.reaction-people-list {
    display: grid;
    gap: 8px;
    max-height: min(60vh,560px);
    overflow-y: auto;
}

.group-member-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #e1e6ea;
    background: #fff;
    color: inherit;
    border-radius: 12px;
    padding: 10px 12px;
    text-align: left;
}

.group-member-avatar {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 50%;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: #00e5ff;
    color: #0d1117;
    font-weight: 900;
}

.group-member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================
   REACTIONS + THREADED COMMENTS QOL
   ========================= */

.post-reaction-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 28px;
    margin-top: 10px;
    color: #5d6771;
    font-size: 13px;
}

.post-reaction-summary button,
.comment-reaction-count,
.reel-reaction-count {
    border: 0;
    background: transparent;
    color: inherit;
    padding: 2px 4px;
    font-weight: 700;
}

.reaction-picker {
    position: fixed;
    z-index: 2200;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 7px;
    border-radius: 999px;
    background: #0d1117;
    box-shadow: 0 10px 40px rgba(0,0,0,.32);
    transform: translate(-50%, -110%);
}

.reaction-picker button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    font-size: 23px;
}

.reaction-picker button:hover,
.reaction-picker button:focus-visible {
    background: #212830;
    transform: scale(1.08);
}

.reaction-people-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    margin: 8px 0 12px;
    padding-bottom: 4px;
}

.reaction-people-tab {
    flex: 0 0 auto;
    border: 1px solid #dce4e8;
    border-radius: 999px;
    background: #fff;
    color: #50606b;
    padding: 7px 10px;
    font-weight: 700;
}

.reaction-people-tab.active {
    border-color: #00cddd;
    background: rgba(0,229,255,.1);
    color: #087e8f;
}

.comment {
    position: relative;
}

.comment.comment-reply {
    margin-left: 26px;
    border-left: 2px solid rgba(0,229,255,.35);
    border-radius: 0 12px 12px 0;
}

.comment-header-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.comment-actions {
    margin-top: 6px;
}

.comment-actions button {
    border: 0;
    background: transparent;
    border-radius: 8px;
    color: #647079;
    font-size: 12px;
    font-weight: 700;
}

.comment-actions button:hover,
.comment-actions button.active {
    background: rgba(0,229,255,.1);
    color: #087e8f;
}

.comment-replies {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.comment-reply-form {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 8px;
    margin-top: 8px;
}

.comment-reply-form input {
    min-width: 0;
    border: 1px solid #d6dee4;
    border-radius: 10px;
    padding: 8px 10px;
}

.comment-reply-form button {
    border: 0;
    border-radius: 10px;
    background: #00e5ff;
    color: #0d1117;
    font-weight: 800;
    padding: 8px 11px;
}

/* =========================
   DISCOVER QOL
   ========================= */

.discover-panel .people-grid {
    grid-template-columns: repeat(auto-fit,minmax(190px,1fr));
}

.discover-panel .social-person-card {
    padding: 10px;
}

.discover-panel .social-person-avatar {
    width: 38px;
    height: 38px;
}

.discover-panel .social-person-actions {
    margin-top: 8px;
}

/* =========================
   REELS
   ========================= */

.reel-modal-open {
    overflow: hidden;
}

.reels-page {
    background: #07090c;
    min-height: calc(100vh - 80px);
}

.reels-viewer-shell {
    position: relative;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    min-height: calc(100vh - 80px);
    background: #07090c;
}

.reels-viewer-status {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 8;
    color: rgba(255,255,255,.8);
    font-size: 13px;
    pointer-events: none;
}

.reels-swipe-feed {
    height: calc(100vh - 80px);
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    overscroll-behavior-y: contain;
    scrollbar-width: none;
    background: #000;
}

.reels-swipe-feed::-webkit-scrollbar {
    display: none;
}

.reel-slide {
    position: relative;
    height: calc(100vh - 80px);
    min-height: 620px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: #000;
    overflow: hidden;
}

.reel-stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: #000;
}

.reel-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.reel-gradient {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to bottom,rgba(0,0,0,.08) 45%,rgba(0,0,0,.76) 100%);
}

.reel-media-loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255,255,255,.8);
    font-weight: 600;
    pointer-events: none;
}

.reel-info {
    position: absolute;
    left: 22px;
    right: 92px;
    bottom: max(28px, calc(18px + env(safe-area-inset-bottom)));
    z-index: 4;
    color: #fff;
    text-align: left;
}

.reel-author {
    border: 0;
    background: transparent;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    text-align: left;
}

.reel-author > span:last-child {
    display: flex;
    flex-direction: column;
}

.reel-author small {
    color: rgba(255,255,255,.72);
}

.reel-author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    overflow: hidden;
    flex: 0 0 auto;
    background: #10373d;
    color: #00e5ff;
    font-weight: 700;
    border: 2px solid rgba(255,255,255,.8);
}

.reel-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reel-caption {
    margin: 12px 0 0;
    max-width: 620px;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    text-shadow: 0 1px 4px rgba(0,0,0,.6);
}

.reel-action-rail {
    position: absolute;
    right: 18px;
    bottom: max(30px, calc(20px + env(safe-area-inset-bottom)));
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reel-action-button {
    width: 58px;
    min-height: 58px;
    border: 0;
    border-radius: 50%;
    background: rgba(20,24,30,.74);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    backdrop-filter: blur(8px);
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.reel-action-button > span {
    font-size: 24px;
    line-height: 1;
}

.reel-action-button small {
    color: inherit;
    font-weight: 700;
}

.reel-action-button.active {
    color: #00e5ff;
    background: rgba(16,55,61,.9);
}

.reel-sound-button {
    font-size: 20px;
}

.reels-empty-state,
.reels-caught-up {
    min-height: calc(100vh - 80px);
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    background: radial-gradient(circle at center,#17232a 0%,#0d1117 58%,#07090c 100%);
}

.reels-empty-icon,
.reels-caught-up-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    background: #00e5ff;
    color: #0d1117;
    font-size: 30px;
}

.reels-empty-state h2,
.reels-caught-up h2 {
    margin: 0 0 8px;
    font-size: 30px;
}

.reels-empty-state p,
.reels-caught-up p {
    max-width: 420px;
    margin: 0 0 22px;
    color: #aeb7c2;
}

.reels-empty-create-button,
.reels-caught-up-actions button {
    border: 0;
    border-radius: 999px;
    padding: 12px 22px;
    background: #00e5ff;
    color: #0d1117;
    font-weight: 800;
}

.reels-caught-up-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.reels-caught-up-actions button:last-child {
    background: #212830;
    color: #fff;
}

.reel-create-modal {
    z-index: 1400;
}

.reel-create-modal-card {
    max-width: 760px;
    max-height: 92vh;
    padding: 28px;
}

.reel-create-modal-heading {
    text-align: center;
    padding: 0 36px 8px;
}

.reel-create-modal-heading h2 {
    margin: 4px 0 8px;
}

.reel-create-modal-heading > p:last-child {
    color: #7a838c;
    line-height: 1.5;
}

.reel-creator-panel-modal {
    text-align: left;
}

.reel-lock-card,
.reel-agreement-card,
.reel-upload-form {
    border: 1px solid rgba(127,127,127,.18);
    border-radius: 16px;
    padding: 16px;
    margin: 12px 0;
}

.true-verified-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #10373d;
    color: #00e5ff;
    font-size: 12px;
    font-weight: 700;
}

.pledge-button {
    width: 100%;
    padding: 14px;
    border: 2px solid #00e5ff;
    border-radius: 12px;
    background: #0d1117;
    color: #00e5ff;
    font-weight: 700;
}

.reel-creator-panel-modal .reel-upload-form input[type="file"],
.reel-creator-panel-modal .reel-upload-form textarea {
    width: 100%;
}

.reel-creator-panel-modal .reel-upload-form textarea {
    min-height: 110px;
    margin-top: 6px;
}

.reel-creator-panel-modal .reel-upload-form > small {
    display: block;
    margin: 7px 0 14px;
    color: #7a838c;
}

.reel-submissions {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

/* =========================
   ROLE BADGES
   ========================= */

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #cbd5dc;
    border-radius: 999px;
    padding: 3px 7px;
    font-size: 11px;
    font-weight: 800;
}

.role-badge.role-moderator {
    border-color: #00e5ff;
    color: #007f8d;
    background-color: rgba(0,229,255,.08);
    letter-spacing: .75px;
}

.role-badge.role-moderator .moderator-s {
    font-family: "Parisienne", cursive;
    font-size: 18px;
    font-weight: 400;
    line-height: .85;
}

.role-badge.role-moderator .moderator-label {
    font-family: "DM Sans", sans-serif;
    font-weight: 800;
    text-transform: uppercase;
}

/* =========================
   MOBILE BOTTOM NAV
   ========================= */

.mobile-bottom-nav {
    display: none;
}

/* =========================
   MOBILE
   ========================= */

@media (max-width: 800px) {
    .social-grid-layout,
    .moderation-layout,
    .messages-layout,
    .groups-layout,
    .profile-page-content-grid {
        grid-template-columns: 1fr;
    }

    .messages-layout {
        padding: 0 12px;
    }

    .form-grid,
    .church-form-grid,
    .marketplace-form-grid {
        grid-template-columns: 1fr;
    }

    .full-span {
        grid-column: auto;
    }

    .message-bubble {
        max-width: 90%;
    }
}

@media (max-width: 760px) {
    body {
        padding-bottom: calc(72px + env(safe-area-inset-bottom));
    }

    .topbar {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 10px;
        row-gap: 4px;
        padding: 8px 12px 6px;
    }

    .brand {
        grid-column: 1;
        margin: 0;
        line-height: 1;
        font-size: 34px;
    }

    .header-auth,
    .header-user {
        grid-column: 3;
        align-self: center;
    }

    .nav-links {
        display: none;
    }

    .header-name-wrap,
    .signout-button,
    .settings-button {
        display: none;
    }

    .user-profile-button {
        padding: 0;
    }

    .mobile-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1200;
        display: grid;
        grid-template-columns: repeat(6,1fr);
        min-height: 64px;
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
        border-top: 1px solid #dce3e7;
        background: rgba(255,255,255,.97);
        backdrop-filter: blur(14px);
    }

    .mobile-bottom-nav a {
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: #67717a;
        text-decoration: none;
        font-size: 10px;
        font-weight: 700;
    }

    .mobile-bottom-nav a.active {
        color: #007f8d;
    }

    .mobile-nav-icon {
        font-size: 19px;
        line-height: 1;
    }

    .compact-page-hero {
        padding-top: 54px;
    }

    .profile-top-card {
        grid-template-columns: auto 1fr;
        align-items: center;
    }

    .profile-page-actions {
        grid-column: 1/-1;
    }

    .messages-layout.mobile-thread-open .messages-sidebar {
        display: none;
    }

    .messages-layout:not(.mobile-thread-open) .message-thread {
        display: none;
    }

    .message-back-button {
        display: grid;
        place-items: center;
    }

    .messages-list {
        min-height: calc(100dvh - 315px);
        max-height: calc(100dvh - 315px);
        padding-bottom: 16px;
    }

    .message-composer {
        display: grid;
        grid-template-columns: minmax(0,1fr) auto;
        align-items: end;
        width: 100%;
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }

    #message-send-button {
        width: auto;
        white-space: nowrap;
    }

    .discover-panel .people-grid {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        scroll-snap-type: x proximity;
        padding-bottom: 4px;
    }

    .discover-panel .social-person-card {
        flex: 0 0 215px;
        scroll-snap-align: start;
    }

    .comment.comment-reply {
        margin-left: 16px;
    }

    .reaction-picker {
        max-width: calc(100vw - 18px);
        overflow-x: auto;
        transform: translate(-50%, -120%);
    }

    .reels-page,
    .reels-viewer-shell,
    .reels-swipe-feed,
    .reel-slide,
    .reels-empty-state,
    .reels-caught-up {
        min-height: calc(100dvh - 138px - env(safe-area-inset-bottom));
    }

    .reels-swipe-feed,
    .reel-slide {
        height: calc(100dvh - 138px - env(safe-area-inset-bottom));
    }

    .reel-info {
        left: 16px;
        right: 82px;
        bottom: max(22px, calc(14px + env(safe-area-inset-bottom)));
    }

    .reel-action-rail {
        right: 12px;
        bottom: max(22px, calc(14px + env(safe-area-inset-bottom)));
    }

    .reel-action-button {
        width: 54px;
        min-height: 54px;
    }

    .reel-create-modal {
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
        align-items: flex-end;
    }

    .reel-create-modal-card {
        max-width: none;
        width: 100%;
        max-height: 94dvh;
        border-radius: 22px 22px 0 0;
        padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 430px) {
    .brand {
        font-size: 32px;
    }

    .mobile-bottom-nav a {
        font-size: 9px;
    }

    .profile-page-avatar-image,
    .profile-page-avatar-fallback {
        width: 92px;
        height: 92px;
    }
}

/* =========================
   DARK MODE
   ========================= */

@media (prefers-color-scheme: dark) {
    body {
        background: #0d1117;
        color: #f5f7fa;
    }

    .post-composer,
    .quick-composer,
    .post-card,
    .profile-about-card,
    .profile-posts-card,
    .settings-card,
    .content-panel,
    .social-person-card,
    .directory-card,
    .marketplace-card,
    .moderation-card,
    .reel-submission-row,
    .more-card,
    .profile-top-card,
    .modal-card,
    .auth-card {
        background: #161b22;
        color: #f5f7fa;
        border-color: #2a313a;
    }

    .post-input,
    .quick-composer textarea,
    .comment-input,
    .message-composer textarea,
    .settings-card input,
    .settings-card select,
    .settings-card textarea,
    .search-box input,
    .search-box select,
    .message-search-box input,
    .group-search-box input,
    .church-form input,
    .church-form textarea,
    .marketplace-form input,
    .marketplace-form textarea,
    .marketplace-form select,
    .profile-edit-card input,
    .profile-edit-card textarea,
    .compact-action-modal textarea,
    .compact-action-modal select,
    .comment-reply-form input {
        background: #0f141a;
        color: #f5f7fa;
        border-color: #333c46;
    }

    .secondary-button,
    .edit-profile-button,
    .settings-reset-button,
    .group-member-row,
    .reaction-people-tab {
        background: #212830;
        color: #eef2f5;
        border-color: #39434e;
    }

    .conversation-row,
    .comment,
    .post-options button {
        background: #212830;
    }

    .message-composer {
        background: #161b22;
    }

    .mobile-bottom-nav {
        border-color: #2a313a;
        background: rgba(13,17,23,.97);
    }

    .mobile-bottom-nav a {
        color: #9da7b1;
    }

    .mobile-bottom-nav a.active {
        color: #00e5ff;
    }
}
