/* ============================================================
   MHBC APP STYLES v26
   ============================================================ */

:root {
  --navy:        #0a1628;
  --navy-mid:    #122040;
  --navy-light:  #1a2e55;
  --navy-card:   #0f1e3a;
  --gold:        #c9a84c;
  --gold-light:  #e8c97a;
  --gold-dim:    #8a6f2e;
  --white:       #ffffff;
  --text:        #dce6f5;
  --text-dim:    #7a8fa8;
  --border:      rgba(201,168,76,0.18);
  --radius:      14px;
  --radius-sm:   8px;
  --nav-height:  48px;
  --header-height: 60px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
  height: 100%;
  min-height: 100dvh;
  background: var(--navy);
}

body {
  min-height: 100dvh;
  background: var(--navy);
  color: var(--text);
  font-family: 'Lato', sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  padding-top: calc(var(--header-height) + env(safe-area-inset-top, 0px));
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
}

/* ---- HEADER ---- */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding-top: env(safe-area-inset-top, 0px);
  height: calc(var(--header-height) + env(safe-area-inset-top, 0px));
  background: var(--navy);
  border-bottom: 1px solid var(--border);
  z-index: 200;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 18px;
}

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

.logo-cross-svg { flex-shrink: 0; }

.header-titles { display: flex; flex-direction: column; line-height: 1.2; }

.header-title {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.02em;
}

.header-sub {
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #d32f2f;
  color: white;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
}

.live-dot {
  width: 7px; height: 7px;
  background: white;
  border-radius: 50%;
  animation: blink 1.2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* ---- PAGE WRAPPER ---- */
.page-wrapper { position: relative; width: 100%; }

.page { display: none; width: 100%; padding-bottom: 20px; }
.page.active { display: block; }

/* ---- HERO CARD ---- */
.hero-card {
  position: relative;
  min-height: 220px;
  margin: 14px 14px 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy-light) 0%, #1a3a6e 50%, var(--navy-mid) 100%);
  border: 1px solid var(--border);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(201,168,76,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(201,168,76,0.08) 0%, transparent 50%);
}

.hero-overlay::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 70px;
  height: 90px;
  background:
    linear-gradient(rgba(201,168,76,0.1) 0%, rgba(201,168,76,0.1) 100%) center/12px 100% no-repeat,
    linear-gradient(rgba(201,168,76,0.1) 0%, rgba(201,168,76,0.1) 100%) center 30%/100% 12px no-repeat;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px 22px;
  gap: 4px;
}

.hero-church-name {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
}

.hero-divider {
  width: 40px;
  height: 2px;
  background: var(--gold);
  margin-bottom: 10px;
  border-radius: 1px;
}

.hero-tagline {
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  font-weight: 400;
  font-style: italic;
  color: var(--gold-light);
  line-height: 1.5;
}

/* ---- SECTION LABEL ---- */
.section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold-dim);
  text-transform: uppercase;
  padding: 18px 18px 8px;
}

/* ---- CARD ROW ---- */
.card-row { display: flex; flex-direction: column; gap: 8px; padding: 0 14px; }

.info-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.info-icon { font-size: 22px; width: 36px; text-align: center; flex-shrink: 0; }
.info-title { font-weight: 700; font-size: 14px; color: var(--white); }
.info-sub { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

/* ---- QUICK GRID ---- */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 14px;
}

.quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 8px;
  color: var(--text);
  font-family: 'Lato', sans-serif;
  font-size: 12px;
  cursor: pointer;
  -webkit-appearance: none;
}

.quick-btn:active { background: var(--navy-light); }
.quick-icon { font-size: 22px; }

/* ---- INSTALL CARD ---- */
.install-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 14px;
}

.install-qr {
  flex-shrink: 0;
  background: white;
  padding: 6px;
  border-radius: 8px;
}

.install-qr img, .install-qr canvas { display: block; width: 90px !important; height: 90px !important; }

.install-heading {
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}

.install-row { font-size: 11px; color: var(--text-dim); line-height: 1.8; }

.install-link {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  color: var(--gold);
  text-decoration: none;
  word-break: break-all;
}

/* ---- LOCATION CARD ---- */
.location-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 14px;
  cursor: pointer;
}

.location-pin { font-size: 24px; }
.location-text { flex: 1; }
.location-title { font-weight: 700; font-size: 14px; color: var(--white); }
.location-sub { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.location-phone { font-size: 12px; color: var(--gold); margin-top: 4px; }
.location-arrow { font-size: 24px; color: var(--gold-dim); }

/* ---- FOOTER NOTE ---- */
.footer-note {
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  padding: 24px 18px 8px;
  line-height: 1.6;
}

/* ---- PAGE TITLE BAR ---- */
.page-title-bar { padding: 18px 18px 4px; }

.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--white);
  border-left: 3px solid var(--gold);
  padding-left: 12px;
}

/* ---- LINK LIST ---- */
.link-list {
  display: flex;
  flex-direction: column;
  margin: 0 14px;
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.link-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid rgba(201,168,76,0.08);
}

.link-row:last-child { border-bottom: none; }

.link-icon {
  width: 28px; height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  text-align: center;
  line-height: 28px;
}

/* Gold icon Ã¢ÂÂ larger, bolder cross, consistent with app theme */
.link-icon.gold {
  background: rgba(201,168,76,0.15);
  color: var(--gold);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.link-icon.yt-red { background: rgba(211,47,47,0.15); color: #ef5350; }
.link-icon.fb-blue { background: rgba(66,103,178,0.2); color: #7090d0; font-size: 15px; font-family: serif; font-weight: 700; }

.link-label { flex: 1; font-size: 14px; }
.link-arrow { font-size: 22px; color: var(--text-dim); }

/* ---- YOUTUBE ---- */
.yt-launch-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #1a0a0a;
  border: 1px solid rgba(211,47,47,0.4);
  border-radius: var(--radius);
  padding: 20px 16px;
  margin: 0 14px;
  cursor: pointer;
}

.yt-launch-icon {
  width: 52px; height: 52px;
  background: #d32f2f;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: white;
  flex-shrink: 0;
}

.yt-launch-title { font-weight: 700; font-size: 14px; color: var(--white); }
.yt-launch-sub { font-size: 12px; color: var(--text-dim); margin-top: 3px; }
.yt-launch-arrow { font-size: 24px; color: var(--text-dim); margin-left: auto; }

/* ---- BIBLE ---- */
.pill-row { display: flex; gap: 8px; padding: 0 14px; flex-wrap: wrap; }

.pill {
  padding: 7px 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--navy-card);
  color: var(--text-dim);
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  -webkit-appearance: none;
}

.pill.active { background: var(--gold); color: var(--navy); border-color: var(--gold); }

.bible-selects { display: flex; gap: 10px; padding: 0 14px; }

.bible-select {
  flex: 1;
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  padding: 10px 12px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.open-bible-btn {
  display: block;
  margin: 12px 14px 0;
  width: calc(100% - 28px);
  padding: 16px;
  background: var(--gold);
  color: var(--navy);
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  -webkit-appearance: none;
}

/* ---- GIVE ---- */
.give-hero {
  margin: 8px 14px 0;
  background: linear-gradient(135deg, var(--navy-light), var(--navy-mid));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  text-align: center;
}

.give-scripture {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-style: italic;
  color: var(--gold-light);
  line-height: 1.7;
}

.give-ref { font-size: 12px; color: var(--gold-dim); margin-top: 10px; }

.give-btn-main {
  display: block;
  margin: 0 14px;
  padding: 18px;
  background: var(--gold);
  color: var(--navy);
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius);
}

.give-note { text-align: center; font-size: 12px; color: var(--text-dim); padding: 10px 24px 0; }

/* ---- CONTACT ---- */
.contact-card {
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0 14px;
  padding: 16px;
}

.contact-row { font-size: 13px; color: var(--text); padding: 5px 0; }
.contact-row a { color: var(--gold); text-decoration: none; }

.contact-directions-btn {
  display: block;
  margin-top: 12px;
  padding: 11px;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: var(--radius-sm);
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ---- BOTTOM NAV ---- */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
  background: var(--navy);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  padding-bottom: 0;
  z-index: 200;
}

.nav-btn {
  flex: 1 1 0;
  height: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 0 2px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: 'Lato', sans-serif;
  font-size: 10px;
  cursor: pointer;
  -webkit-appearance: none;
  position: relative;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  line-height: 1;
  font-size: 22px;
  margin: 0;
  padding: 0;
}

.nav-label {
  display: block;
  line-height: 1;
  letter-spacing: 0.04em;
  margin: 0;
  padding: 0;
}

.nav-label-stacked {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 16px;
  font-size: 8px;
  letter-spacing: 0.03em;
  line-height: 1;
  font-family: 'Lato', sans-serif;
  margin: 0;
  padding: 0;
}

.nav-badge {
  position: absolute;
  top: 10px;
  right: calc(50% - 20px);
  background: #d32f2f;
  color: white;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  pointer-events: none;
  z-index: 10;
}

@media (min-width: 768px) {
  :root { --nav-height: 56px; }
}

@media (min-width: 500px) {
  .nav-badge {
    top: -4px;
  }
}

/* ---- CARE GROUPS ---- */
.cg-group-list {
  display: flex;
  flex-direction: column;
  margin: 0 14px;
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.cg-group-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(201,168,76,0.08);
  color: var(--text);
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  -webkit-appearance: none;
}

.cg-group-btn:last-child { border-bottom: none; }
.cg-group-btn:active { background: var(--navy-light); }
.cg-group-icon { font-size: 20px; flex-shrink: 0; }
.cg-group-name { flex: 1; font-weight: 600; }
.cg-arrow { font-size: 22px; color: var(--text-dim); }

.cg-badge {
  background: #d32f2f;
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.cg-info-note {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  padding: 14px 20px;
  line-height: 1.6;
}

/* Login */
.cg-login-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 4px;
}

.cg-back-btn {
  background: none;
  border: none;
  color: var(--gold);
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  -webkit-appearance: none;
}

.cg-login-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
}

.cg-login-box {
  margin: 8px 14px 0;
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.cg-login-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 6px;
  margin-top: 14px;
}

.cg-login-label:first-child { margin-top: 0; }

.cg-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.cg-input {
  width: 100%;
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: 'Lato', sans-serif;
  font-size: 16px;
  padding: 11px 44px 11px 12px;
  -webkit-appearance: none;
  outline: none;
}

.cg-input:focus { border-color: var(--gold); }

.cg-eye-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  -webkit-appearance: none;
  color: var(--text-dim);
}

.cg-login-note {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 10px;
  line-height: 1.5;
}

.cg-login-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  background: var(--gold);
  color: var(--navy);
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  -webkit-appearance: none;
}

.cg-login-error {
  color: #ef5350;
  font-size: 12px;
  margin-top: 10px;
  text-align: center;
  min-height: 18px;
}

.cg-start-over-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  background: transparent;
  color: var(--text-dim);
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  -webkit-appearance: none;
}

/* Pending */
.cg-pending-box {
  margin: 20px 14px;
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
}

.cg-pending-icon { font-size: 40px; margin-bottom: 14px; }
.cg-pending-msg { font-size: 14px; color: var(--text); line-height: 1.7; margin-bottom: 20px; }

/* Chat */
.cg-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 8px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: calc(var(--header-height) + env(safe-area-inset-top, 0px));
  background: var(--navy);
  z-index: 10;
}

.cg-chat-title {
  flex: 1;
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
}

.cg-admin-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  -webkit-appearance: none;
}

.cg-messages {
  padding: 12px 14px 60px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 300px;
  overflow-y: auto;
}

.cg-loading, .cg-no-msgs, .cg-empty-note {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  padding: 20px;
}

/* Messages */
.cg-msg-wrapper { display: flex; flex-direction: column; gap: 4px; }

.cg-msg { display: flex; flex-direction: column; max-width: 78%; }
.cg-msg-me { align-self: flex-end; align-items: flex-end; }
.cg-msg-them { align-self: flex-start; align-items: flex-start; }

.cg-msg-author {
  font-size: 11px;
  margin-bottom: 3px;
  font-weight: 700;
}

.cg-msg-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.cg-msg-me .cg-msg-bubble {
  background: var(--gold);
  color: var(--navy);
  border-bottom-right-radius: 4px;
}

.cg-msg-them .cg-msg-bubble {
  color: white;
  border-bottom-left-radius: 4px;
}

.cg-msg-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 4px;
}

.cg-msg-time { font-size: 10px; color: var(--text-dim); }

.cg-reply-btn {
  font-size: 11px;
  color: var(--gold-dim);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  background: none;
  border: none;
  font-family: 'Lato', sans-serif;
}

/* Input bar */
.cg-input-bar {
  position: fixed;
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
  left: 0; right: 0;
  display: none;
  flex-direction: column;
  padding: 10px 14px;
  background: var(--navy);
  border-top: 1px solid var(--border);
  z-index: 150;
  gap: 0;
}

.cg-reply-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--navy-light);
  border-radius: 8px 8px 0 0;
  padding: 6px 12px;
  width: 100%;
  margin-bottom: 6px;
}

.cg-reply-label { font-size: 12px; color: var(--gold); font-style: italic; }

.cg-reply-cancel {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 14px;
  cursor: pointer;
  padding: 0 4px;
}

.cg-input-row { display: flex; gap: 8px; width: 100%; }

.cg-msg-input {
  flex: 1;
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--white);
  font-family: 'Lato', sans-serif;
  font-size: 16px !important;
  padding: 10px 16px;
  outline: none;
  -webkit-appearance: none;
}

.cg-msg-input:focus { border-color: var(--gold); }

.cg-send-btn {
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: 20px;
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  cursor: pointer;
  -webkit-appearance: none;
}

/* Admin / Members */
.cg-member-list {
  margin: 0 14px;
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.cg-member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(201,168,76,0.08);
}

.cg-member-row:last-child { border-bottom: none; }
.cg-member-name { flex: 1; font-size: 14px; color: var(--white); }

.cg-approve-btn {
  background: #2e7d32;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
  -webkit-appearance: none;
}

.cg-deny-btn {
  background: #c62828;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
  -webkit-appearance: none;
}

/* ---- CHAT THREAD STYLES ---- */
.cg-thread { display: flex; flex-direction: column; gap: 0; }
.cg-thread-divider { height: 1px; background: rgba(201,168,76,0.15); margin: 12px 0; }
.cg-primary-row { display: flex; gap: 10px; align-items: flex-start; padding: 4px 0; }

.cg-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700;
  color: white; flex-shrink: 0; margin-top: 2px;
}

.cg-avatar-sm { width: 28px; height: 28px; font-size: 12px; }
.cg-primary-content { flex: 1; min-width: 0; }
.cg-primary-header { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.cg-primary-name { font-size: 13px; font-weight: 700; }
.cg-primary-time { font-size: 10px; color: var(--text-dim); }
.cg-primary-text { font-size: 14px; color: var(--text); line-height: 1.5; word-break: break-word; }

.cg-comment-bar { padding: 4px 0 4px 46px; }
.cg-comment-btn {
  background: none; border: none; color: var(--text-dim);
  font-family: 'Lato', sans-serif; font-size: 12px;
  cursor: pointer; padding: 4px 0; -webkit-appearance: none;
}
.cg-comment-btn:active { color: var(--gold); }

.cg-replies-container {
  margin-left: 46px; margin-top: 6px;
  display: flex; flex-direction: column; gap: 10px;
  padding-left: 12px;
  border-left: 2px solid rgba(201,168,76,0.2);
}

.cg-reply-row { display: flex; gap: 8px; align-items: flex-start; }
.cg-reply-content { flex: 1; min-width: 0; }
.cg-reply-text { font-size: 13px; color: var(--text); line-height: 1.5; word-break: break-word; }

/* ---- RICH MEDIA ---- */
.msg-image {
  max-width: 260px; width: 100%;
  border-radius: 10px; margin-top: 6px;
  cursor: pointer; display: block;
}

.msg-video {
  max-width: 260px; width: 100%;
  border-radius: 10px; margin-top: 6px; display: block;
}

.msg-youtube {
  width: 100%; max-width: 300px; height: 170px;
  border-radius: 10px; margin-top: 6px; border: none; display: block;
}

.msg-link {
  color: var(--gold); font-size: 13px;
  word-break: break-all; display: block;
  margin-top: 4px; text-decoration: underline;
}

/* ---- MEMBERS BUTTON ---- */
.cg-members-btn {
  background: rgba(201,168,76,0.15);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: 'Lato', sans-serif;
  font-size: 12px; font-weight: 700;
  padding: 6px 12px; border-radius: 6px;
  cursor: pointer; -webkit-appearance: none;
  letter-spacing: 0.05em; flex-shrink: 0;
}
.cg-members-btn {
  position: relative; /* add this line to existing rule */
}

#members-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #d32f2f;
  color: white;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  pointer-events: none;
}


/* ---- MESSAGE WRAPPER ---- */
.msg-wrapper { display: flex; flex-direction: column; gap: 6px; }

/* ---- EDITED LABEL ---- */
.msg-edited { font-size: 10px; color: var(--text-dim); font-style: italic; }

/* ---- LONG PRESS MENU ---- */
.msg-menu {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--navy-card);
  border-top: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  padding: 12px 14px 32px;
  z-index: 500;
  display: flex; flex-direction: column; gap: 8px;
}

.msg-menu-btn {
  display: block; width: 100%; padding: 14px;
  background: var(--navy-light); border: none;
  border-radius: var(--radius); color: var(--white);
  font-family: 'Lato', sans-serif; font-size: 15px;
  cursor: pointer; text-align: left; -webkit-appearance: none;
}

.msg-menu-delete { color: #ef5350; }

.msg-menu-cancel {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  text-align: center;
}

/* ---- YOUTUBE THUMBNAIL WRAPPER ---- */
.msg-yt-wrap {
  position: relative; display: inline-block;
  margin-top: 6px; max-width: 280px; width: 100%; cursor: pointer;
}

.msg-yt-thumb { width: 100%; border-radius: 10px; display: block; }

.msg-yt-play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.7); color: white;
  font-size: 24px; width: 50px; height: 50px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}

/* ---- MEMBERS HEADER (with Change Password button) ---- */
.cg-members-header {
  display: flex;
  align-items: center;
  padding: 12px 14px 8px;
  gap: 8px;
}

.cg-members-header .cg-login-title { flex: 1; }

/* Change Password button */
.cg-change-pw-btn {
  background: rgba(201,168,76,0.12);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: 'Lato', sans-serif;
  font-size: 10px; font-weight: 700;
  line-height: 1.3; padding: 6px 10px;
  border-radius: 6px; cursor: pointer;
  -webkit-appearance: none;
  text-align: center; flex-shrink: 0;
  letter-spacing: 0.04em;
}

/* ---- CHANGE PASSWORD BUTTON ROW ---- */
.cg-cp-btn-row {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  align-items: stretch;
}

.cg-cancel-btn {
  flex: 1;
  height: 56px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: 'Lato', sans-serif;
  font-size: 14px; font-weight: 700;
  border-radius: var(--radius);
  cursor: pointer; -webkit-appearance: none;
  text-align: center;
  display: flex; align-items: center; justify-content: center;
  padding: 0 16px;
}

.cg-cp-confirm-btn {
  flex: 2;
  height: 56px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 16px;
  margin-top: 0;
}

/* ---- CHANGE PASSWORD SUCCESS MESSAGE ---- */
.cg-cp-success {
  color: #4caf50;
  font-size: 13px;
  text-align: center;
  margin-top: 10px;
  min-height: 18px;
}

@media (min-width: 768px) {
  :root {
    --nav-height: 56px;
  }

  .bottom-nav {
    padding-top: 2px;
  }

  .nav-btn {
    padding: 4px 2px 2px;
  }
}

/* ===== PLAY BUTTON STYLE ===== */

/* Quick Access watch icon */
.quick-icon.play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #ff0000;
  border-radius: 5px;
  margin-bottom: 1px;
}

.quick-icon.play-icon svg {
  width: 11px;
  height: 11px;
  display: block;
}

/* Bottom nav watch icon */
.nav-icon.play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: #ff0000;
  border-radius: 5px;
  margin-bottom: 3px;
}

.nav-icon.play-icon svg {
  width: 9px;
  height: 9px;
  display: block;
}

/* ===== DESKTOP WIDTH CAP (tighter) ===== */
@media (min-width: 768px) {
  .page-wrapper {
    max-width: 620px;
    margin: 0 auto;
    width: 100%;
  }

  .app-header,
  .bottom-nav,
  .cg-input-bar {
    width: min(100%, 620px);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
}
.msg-wrapper {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.cg-primary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cg-primary-header-left {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
}

.msg-menu-trigger {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
  -webkit-appearance: none;
}

.msg-menu-trigger:active {
  opacity: 0.7;
}

.cg-inline-reply-box {
  margin: 8px 0 10px 52px;
  padding: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.cg-inline-reply-header {
  font-size: 11px;
  color: var(--gold);
  margin-bottom: 8px;
}

.cg-inline-reply-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cg-inline-reply-input {
  flex: 1;
  min-width: 0;
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--white);
  font-family: 'Lato', sans-serif;
  font-size: 16px;
  padding: 10px 12px;
  -webkit-appearance: none;
  outline: none;
}

.cg-inline-reply-send,
.cg-inline-reply-cancel {
  background: var(--navy-light);
  border: 1px solid var(--border);
  color: var(--white);
  border-radius: 8px;
  padding: 9px 12px;
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  cursor: pointer;
  -webkit-appearance: none;
}

.cg-inline-reply-send {
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
}
@media (min-width: 768px) {
  .msg-menu {
    width: min(100%, 620px);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    border-radius: 16px 16px 0 0;
  }
}

.cg-older-wrap {
  display: flex;
  justify-content: center;
  padding: 10px 14px 14px;
}

.cg-older-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--gold);
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  -webkit-appearance: none;
}

.cg-older-btn:active {
  background: rgba(201,168,76,0.12);
}

.cg-missing-thread {
  margin-bottom: 2px;
}

.cg-missing-parent-bar {
  margin: 0 0 8px 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cg-missing-parent-text {
  font-size: 11px;
  color: var(--text-dim);
}

.cg-missing-parent-btn {
  background: none;
  border: none;
  color: var(--gold);
  font-family: 'Lato', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
  -webkit-appearance: none;
  text-decoration: underline;
}

.cg-missing-parent-btn:active {
  opacity: 0.7;
}
.cg-removal-tag {
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 12px;
  border-radius: 999px;
  background-color: rgba(255, 193, 7, 0.15);
  color: #ffc107;
  font-weight: 600;
}


.cg-chat-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
}


#cg-leave-chat {
  justify-self: start;
}

#cg-prayer-btn {
  justify-self: center;
  white-space: nowrap;
}


#cg-members-btn {
  justify-self: end;
}

#cg-main-title {
  text-align: center;
  font-size: 22px;
  line-height: 1.15;
}

.cg-room-title-line {
  display: block;
  font-size: 18px;
}
.msg-deleted {
  font-style: italic;
  opacity: 0.7;
}
.quick-btn[data-action="watch"] span:last-child {
  transform: translateY(4px);
}
.cg-new-message-divider {
  margin: 14px 12px;
  padding: 8px 10px;
  border-top: 1px solid rgba(201,168,76,0.35);
  border-bottom: 1px solid rgba(201,168,76,0.35);
  color: #c9a84c;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.04em;
  background: rgba(201,168,76,0.07);
  border-radius: 8px;
}
.cg-admin-alert-btn {
  margin: 14px 30px 18px;
  padding: 12px 16px;
  border: 1px solid #c9a84c;
  border-radius: 10px;
  background: rgba(201,168,76,0.12);
  color: #c9a84c;
  font-weight: 800;
  font-size: 15px;
  width: calc(100% - 60px);
}

.church-alert-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.6);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.church-alert-box {
  width: 100%;
  max-width: 420px;
  background: #10203a;
  border: 1px solid #c9a84c;
  border-radius: 14px;
  padding: 18px;
}

.church-alert-box h3 {
  color: #c9a84c;
  margin-top: 0;
}

.church-alert-box input,
.church-alert-box textarea {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #c9a84c;
  background: #0a1628;
  color: white;
  font-size: 16px;
}

.church-alert-box textarea {
  min-height: 110px;
}

.church-alert-box button {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  border-radius: 8px;
  font-weight: 800;
}
.alert-item {
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 14px;
}

.alert-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 12px;
}

.alert-body {
  line-height: 1.5;
  font-size: 15px;
  margin-bottom: 16px;
}

.alert-time {
  font-size: 13px;
  color: var(--text-dim);
}
