/* Copyright (c) 2026 High Horse Hodge, Inc. All rights reserved. Part of the "Uttermost" platform (proprietary; see LICENSE-UTTERMOST.md). */
/* Glorious eChurch — design system.
   One look everywhere: the Glorious brand (v2.2) royal blue + gold, Montserrat
   headings, Inter body. Tokens first; every screen uses these, never raw values. */
:root {
  --gc-royal: #1e4d91;
  --gc-royal-2: #153b75;
  --gc-royal-3: #0f2c5c;
  --gc-navy: #0a1d3d;
  --gc-gold: #FFC72C;
  --gc-gold-soft: rgba(255, 199, 44, 0.14);
  --gc-gold-line: rgba(255, 199, 44, 0.6);
  --gc-white: #ffffff;
  --gc-mist: #c4d6f0;          /* secondary text on blue (5.9:1) */
  --gc-card: rgba(255, 255, 255, 0.07);
  --gc-card-2: rgba(255, 255, 255, 0.12);
  --gc-line: rgba(255, 255, 255, 0.14);
  --gc-sunk: rgba(10, 29, 61, 0.45);
  --gc-live: #c62a2a;
  --gc-on: #3ddc84;
  --gc-paper: #f3f6fb;
  --gc-ink: #0a1d3d;
  --gc-ink-2: #4a5b78;

  --gc-font-head: Montserrat, system-ui, sans-serif;
  --gc-font-body: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --gc-r-sm: 10px; --gc-r: 14px; --gc-r-lg: 20px; --gc-r-pill: 999px;
  --gc-s1: 4px; --gc-s2: 8px; --gc-s3: 12px; --gc-s4: 16px; --gc-s5: 20px; --gc-s6: 28px;
  --gc-tap: 44px;
  --gc-ease: cubic-bezier(.2, .7, .2, 1);
  --gc-text: 1rem;              /* member text-size preference scales this */
}
html.gc-text-lg { --gc-text: 1.125rem; }
html.gc-text-xl { --gc-text: 1.25rem; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { background: var(--gc-royal-3); } /* iPhone: a short page left a white strip under the bottom bar */
body {
  font-family: var(--gc-font-body); font-size: var(--gc-text); color: var(--gc-white);
  background: radial-gradient(120% 70% at 50% 18%, var(--gc-royal) 0%, var(--gc-royal-2) 55%, var(--gc-royal-3) 100%) fixed;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--gc-gold); }
:focus-visible { outline: 3px solid var(--gc-gold); outline-offset: 2px; border-radius: 6px; }
.gc-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- type ---------- */
.gc-eyebrow { font-family: var(--gc-font-head); font-weight: 600; font-size: .75rem; letter-spacing: .2em; color: var(--gc-gold); text-transform: uppercase; }
.gc-h1 { font-family: var(--gc-font-head); font-weight: 800; font-size: 1.65rem; line-height: 1.15; margin: 0; }
.gc-h2 { font-family: var(--gc-font-head); font-weight: 700; font-size: 1.1rem; margin: 0; }
.gc-sub { color: var(--gc-mist); font-size: .9rem; }

/* ---------- buttons ---------- */
.gc-btn { min-height: var(--gc-tap); padding: 0 var(--gc-s4); border-radius: var(--gc-r); border: 1px solid var(--gc-line); background: var(--gc-card); color: var(--gc-white); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: var(--gc-s2); transition: transform .15s var(--gc-ease), background .2s; }
.gc-btn:active { transform: scale(.97); }
.gc-btn--gold { background: var(--gc-gold); color: var(--gc-navy); border-color: transparent; font-weight: 700; }
.gc-btn--ghost { background: transparent; }
.gc-btn--sm { min-height: 36px; padding: 0 var(--gc-s3); border-radius: var(--gc-r-sm); font-size: .85rem; }
.gc-btn[aria-pressed="true"] { background: var(--gc-gold-soft); border-color: var(--gc-gold-line); color: var(--gc-gold); }
.gc-btn svg { width: 20px; height: 20px; flex: none; }
.gc-icon-btn { width: var(--gc-tap); height: var(--gc-tap); padding: 0; border-radius: 50%; }

/* ---------- cards / pills ---------- */
.gc-card { background: var(--gc-card); border: 1px solid var(--gc-line); border-radius: var(--gc-r-lg); padding: var(--gc-s4); }
.gc-card--gold { background: var(--gc-gold-soft); border: 1.5px solid var(--gc-gold); }
.gc-pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .72rem; letter-spacing: .08em; padding: 5px 10px; border-radius: var(--gc-r-pill); }
.gc-pill--live { background: var(--gc-live); color: #fff; }
.gc-pill--live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.gc-badge { font-size: .65rem; font-weight: 700; letter-spacing: .06em; color: var(--gc-navy); background: var(--gc-gold); padding: 2px 6px; border-radius: 5px; }

/* ---------- avatar ---------- */
.gc-av { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: .8rem; color: #fff; flex: none; position: relative; }
.gc-av--me { box-shadow: 0 0 0 2.5px var(--gc-gold); }
.gc-av--cam::after { content: ''; position: absolute; right: -1px; top: -1px; width: 9px; height: 9px; border-radius: 50%; background: var(--gc-on); box-shadow: 0 0 0 2px var(--gc-royal-2); }

/* ---------- inputs ---------- */
.gc-input { width: 100%; min-height: 48px; border-radius: var(--gc-r-pill); border: 1px solid rgba(255,255,255,.22); background: var(--gc-sunk); color: #fff; padding: 0 18px; }
.gc-input::placeholder { color: rgba(196, 214, 240, .8); }
.gc-field { display: flex; flex-direction: column; gap: 6px; }
.gc-field label { font-size: .85rem; font-weight: 600; color: var(--gc-mist); }

/* ---------- tabs ---------- */
.gc-tabs { display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: var(--gc-sunk); }
.gc-tabs button { flex: 1; min-height: 40px; border-radius: 9px; border: 0; background: transparent; color: var(--gc-mist); font-weight: 600; }
.gc-tabs button[aria-selected="true"] { background: #fff; color: var(--gc-navy); }

/* ================= App layout ================= */
.ec-app { min-height: 100%; display: flex; flex-direction: column; }
/* padding-top adds the phone's status-bar height, so on an iPhone (opened from the Home Screen) the bar's buttons sit below the clock and the pill */
.ec-top { display: flex; align-items: center; justify-content: space-between; gap: var(--gc-s3); padding: calc(12px + env(safe-area-inset-top)) 18px 12px; position: sticky; top: 0; z-index: 5; background: linear-gradient(var(--gc-royal-2), color-mix(in srgb, var(--gc-royal-2) 92%, transparent)); backdrop-filter: blur(6px); }
.ec-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.ec-brand img { height: 30px; width: auto; }
.ec-brand b { font-family: var(--gc-font-head); font-weight: 800; font-size: 1rem; display: block; }
.ec-brand span { font-size: .75rem; color: var(--gc-mist); }
.ec-top-r { display: flex; align-items: center; gap: 8px; }

.ec-main { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 0 24px; display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.ec-stage { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.ec-side { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 12px; padding: 0 16px; }
@media (min-width: 900px) {
  .ec-main { padding: 20px 32px 32px; }
  .ec-side { padding: 0; position: sticky; top: 76px; }
  .ec-video { border-radius: var(--gc-r-lg); }
  .ec-pad { padding: 0 !important; }
}

.ec-video { position: relative; width: 100%; aspect-ratio: 16 / 9; background: var(--gc-navy); overflow: hidden; box-shadow: 0 18px 40px rgba(6, 18, 40, .4); }
.ec-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ec-video .ec-offline { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 16px; background: radial-gradient(circle at 50% 40%, var(--gc-royal), var(--gc-navy)); }
.ec-video .ec-offline img { width: 92px; }

.ec-pad { padding: 0 16px; }
.ec-title { display: flex; flex-direction: column; gap: 4px; }

.ec-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ec-actions .gc-btn { flex-direction: column; min-height: 72px; border-radius: 16px; font-size: .8rem; gap: 6px; padding: 0 4px; }
.ec-actions .gc-btn svg { width: 22px; height: 22px; }

.ec-pinned { display: flex; flex-direction: column; gap: 6px; }

/* congregation strip */
.ec-cong { display: flex; flex-direction: column; gap: 8px; }
.ec-cong-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.ec-cong-row::-webkit-scrollbar { display: none; }
.ec-cong .gc-av { width: 48px; height: 48px; font-size: .95rem; border-radius: 14px; }
.ec-cong .gc-av.round { border-radius: 50%; }

/* chat */
.ec-panel { display: flex; flex-direction: column; gap: 12px; min-height: 360px; }
.ec-chat { display: flex; flex-direction: column; gap: 3px; max-height: 52vh; overflow-y: auto; padding-right: 4px; }
@media (min-width: 900px) { .ec-chat { max-height: calc(100vh - 380px); } }
/* Chat bubbles, like a Messages thread: yours on the right in blue, everyone else on the left. */
.ec-msg { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; }
.ec-msg .gc-av { width: 28px; height: 28px; font-size: .7rem; }
.ec-msg-b { display: flex; flex-direction: column; gap: 2px; min-width: 0; max-width: 80%; }
.ec-msg-n { font-size: .74rem; font-weight: 600; color: var(--gc-mist); display: flex; gap: 6px; align-items: center; margin: 0 12px; }
.ec-msg-t { align-self: flex-start; font-size: 1rem; line-height: 1.4; overflow-wrap: anywhere; padding: 8px 13px; border-radius: 19px 19px 19px 6px; background: rgba(255, 255, 255, .15); }
.ec-msg--same { margin-top: 0; }
.ec-msg--same .gc-av { visibility: hidden; height: 0; }
.ec-msg--same .ec-msg-n { display: none; }
.ec-msg--host .ec-msg-t { background: var(--gc-gold-soft); border: 1px solid rgba(255,199,44,.35); }
.ec-msg--host .ec-msg-n { color: var(--gc-gold); }
.ec-msg--me { flex-direction: row-reverse; }
.ec-msg--me .gc-av { display: none; }
.ec-msg--me .ec-msg-b { align-items: flex-end; }
.ec-msg--me .ec-msg-t { align-self: flex-end; background: #0a84ff; border: 0; color: #fff; border-radius: 19px 19px 6px 19px; }
.ec-msg-x { margin-left: auto; background: none; border: 0; color: var(--gc-mist); font-size: .75rem; text-decoration: underline; min-height: 28px; }
.ec-compose { display: flex; gap: 8px; align-items: center; }
.ec-compose .gc-btn { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; flex: none; }
.ec-compose .gc-input { min-height: 44px; }
.ec-compose .ec-send { background: #0a84ff; border-color: #0a84ff; color: #fff; }
.ec-compose .ec-send svg { width: 20px; height: 20px; }
.ec-praise-btn { font-size: 1.2rem; line-height: 1; }
.ec-praise-btn[aria-expanded="true"] { background: var(--gc-gold-soft); border-color: var(--gc-gold-line); }

/* seating */
.ec-pulpit { text-align: center; font-family: var(--gc-font-head); font-weight: 700; font-size: .7rem; letter-spacing: .3em; color: var(--gc-gold); padding: 6px 0 2px; }
.ec-pews { display: flex; flex-direction: column; gap: 8px; padding: 12px 6px; border-radius: var(--gc-r-lg); background: rgba(10, 29, 61, .3); }
.ec-row { display: grid; grid-template-columns: 16px minmax(0, 1fr) minmax(0, 1fr) 16px; align-items: center; gap: 10px; }
.ec-row > span { font-size: .72rem; font-weight: 600; color: var(--gc-mist); text-align: center; }
.ec-sec { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.ec-seat { width: 100%; max-width: 48px; aspect-ratio: 1 / 1; justify-self: center; border-radius: 30%; border: 1.5px dashed rgba(196, 214, 240, .35); background: transparent; padding: 0; color: #fff; font-weight: 600; font-size: .68rem; display: flex; align-items: center; justify-content: center; overflow: hidden; transition: transform .15s var(--gc-ease); }
.ec-seat:hover { transform: scale(1.06); }
.ec-seat--taken { border: 0; }
.ec-seat--me { box-shadow: 0 0 0 3px var(--gc-gold); }
.ec-seat--people { box-shadow: 0 0 0 3px var(--gc-gold), 0 0 0 6px rgba(255,199,44,.25); }
.ec-seat--next { border: 2px dashed var(--gc-gold); background: var(--gc-gold-soft); color: var(--gc-gold); }
.ec-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; font-size: .75rem; color: var(--gc-mist); }

/* sheets & toasts */
.ec-sheet { position: fixed; inset: 0; z-index: 20; display: none; align-items: flex-end; justify-content: center; background: rgba(6, 18, 40, .55); }
.ec-sheet.open { display: flex; }
.ec-sheet-in { width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: #fff; color: var(--gc-ink); border-radius: 26px 26px 0 0; padding: 12px 20px 26px; display: flex; flex-direction: column; gap: 14px; animation: ec-up .28s var(--gc-ease); }
@media (min-width: 700px) { .ec-sheet { align-items: center; } .ec-sheet-in { border-radius: 22px; } }
.ec-sheet-in .gc-sub { color: var(--gc-ink-2); }
.ec-sheet-in .gc-eyebrow { color: #8a6400; }
.ec-sheet-in .gc-input { background: #fff; color: var(--gc-ink); border-color: #d5dce8; }
.ec-sheet-in .gc-input::placeholder { color: #7d8aa3; }
.ec-sheet-in .gc-btn { border-color: #d5dce8; background: #eef2f8; color: var(--gc-ink); }
.ec-sheet-in .gc-btn--gold { background: var(--gc-gold); }
.ec-sheet-in .gc-btn--blue { background: var(--gc-royal); color: #fff; border-color: transparent; }
.ec-grab { align-self: center; width: 44px; height: 5px; border-radius: 3px; background: #d5dce8; }
.ec-sheet iframe { width: 100%; height: 62vh; border: 0; border-radius: 14px; background: #f3f6fb; }
@keyframes ec-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

.ec-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 30; background: var(--gc-navy); color: #fff; border: 1px solid var(--gc-gold-line); padding: 12px 18px; border-radius: 14px; font-size: .9rem; box-shadow: 0 10px 30px rgba(0,0,0,.35); max-width: 90vw; }

.ec-banner { display: flex; align-items: center; gap: 12px; }
.ec-banner .gc-btn { flex: none; }

/* host bar */
.ec-host { display: flex; flex-direction: column; gap: 10px; }
details.ec-fold { display: block; }
details.ec-fold > :not(summary) { margin-top: 10px; }
.ec-fold > summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer; list-style: none; min-height: 28px; }
.ec-fold > summary::-webkit-details-marker { display: none; }
.ec-fold > summary::after { content: ""; flex: none; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-135deg); opacity: .8; margin: 4px 4px 0 2px; }
.ec-fold:not([open]) > summary::after { transform: rotate(45deg); margin-top: -4px; }
.ec-fold > summary .gc-sub { margin-left: auto; text-align: right; }
.ec-host-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ec-host-row .gc-input { flex: 1 1 220px; min-height: 44px; border-radius: 12px; }

/* entry */
.ec-entry { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.ec-entry .gc-card { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 16px; padding: 26px 22px; background: rgba(10, 29, 61, .5); }
.ec-entry img.logo { width: 120px; align-self: center; }

[hidden] { display: none !important; }

/* praise bar: church-only expressions */
.ec-praise { display: flex; flex-direction: column; gap: 8px; }
.ec-praise-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.ec-praise-row::-webkit-scrollbar { display: none; }
.ec-chip { flex: none; min-height: 38px; padding: 0 14px; border-radius: var(--gc-r-pill); border: 1px solid var(--gc-gold-line); background: var(--gc-gold-soft); color: var(--gc-gold); font-weight: 700; font-size: .85rem; white-space: nowrap; }
.ec-chip:active { transform: scale(.95); }
.ec-react { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--gc-line); background: var(--gc-card); font-size: 1.35rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.ec-react:active { transform: scale(.9); }
.ec-msg--praise .ec-msg-t, .ec-msg--me.ec-msg--praise .ec-msg-t { background: none; border: 0; padding: 0 8px; font-family: var(--gc-font-head); font-weight: 700; font-size: 1.1rem; color: var(--gc-gold); }

/* reactions float up over the stream */
.ec-float { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.ec-float span { position: absolute; bottom: 8px; font-size: 1.9rem; animation: ec-rise 3.2s ease-out forwards; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
@keyframes ec-rise { 0% { transform: translateY(0) scale(.6); opacity: 0; } 12% { opacity: 1; transform: translateY(-20px) scale(1.1); } 100% { transform: translateY(-260px) scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ec-float span { animation: ec-fade 2s forwards; } @keyframes ec-fade { from { opacity: 1; } to { opacity: 0; } } }
@media (min-width: 900px) {
  .ec-praise-row { flex-wrap: wrap; overflow: visible; }
  .ec-react-row { gap: 4px; }
  .ec-react { width: 34px; height: 34px; font-size: 1.05rem; }
  .ec-chip { min-height: 32px; padding: 0 11px; font-size: .8rem; }
}

/* reactions rise up over the chat, Facebook Live style (right side, above the compose box) */
#panel-chat { position: relative; }
.ec-float--chat { bottom: 64px; }
.ec-float--chat span { animation-name: ec-rise-chat; }
@keyframes ec-rise-chat { 0% { transform: translateY(0) scale(.6); opacity: 0; } 12% { opacity: 1; transform: translateY(-16px) scale(1.15); } 70% { opacity: .9; } 100% { transform: translateY(-250px) scale(1); opacity: 0; } }

/* camera seats: live video inside avatars and pews */
.gc-av, .ec-seat { overflow: hidden; }
.gc-av video, .ec-seat video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; background: #0a1d3d; }
.ec-seat { position: relative; }
video.ec-mirror { transform: scaleX(-1); }
.gc-av.has-video::after, .ec-seat.has-video::after { z-index: 1; }
.ec-seat.has-video { font-size: 0; }
.ec-seat--cam::after { content: ''; position: absolute; right: 3px; top: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--gc-on); box-shadow: 0 0 0 1.5px rgba(10,29,61,.8); z-index: 1; }
.ec-cong .gc-av.has-video { width: 64px; height: 64px; }
@media (min-width: 900px) { .ec-cong .gc-av.has-video { width: 84px; height: 84px; } }
.ec-cam-btn[aria-pressed="true"] { background: var(--gc-on); color: #08220f; border-color: transparent; }
.ec-cam-bar { display: flex; align-items: center; gap: 12px; }
.gc-av--cam::after { right: 3px; top: 3px; z-index: 1; }

/* host safety tools */
.ec-safety { margin-top: 12px; }
.ec-mod-sec { display: flex; flex-direction: column; gap: 6px; }
.ec-mod-h { font-weight: 700; font-size: .85rem; cursor: default; }
details.ec-mod-sec summary { cursor: pointer; }
.ec-mod-list { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; }
.ec-mod-item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: 12px; background: rgba(10,29,61,.35); }
.ec-mod-item b { font-weight: 700; }
.ec-mod-item .gc-sub { flex: 1; min-width: 140px; }
#h-cams[aria-pressed="false"], #h-chat[aria-pressed="true"] { background: #b3261e; color: #fff; border-color: transparent; }
.gc-btn--danger { background: #b3261e; color: #fff; border-color: transparent; }
.ec-mod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ec-mod-grid .gc-btn { min-height: 44px; }
.ec-mod-grid .ec-full { grid-column: 1 / -1; }

/* Sanctuary view */
.ec-sv-open { align-self: center; }
.ec-sv { position: fixed; inset: 0; z-index: 15; background: radial-gradient(120% 90% at 50% 0%, #2a5fae 0%, #1e4d91 35%, #0a1d3d 100%); display: flex; flex-direction: column; overflow: auto; }
.ec-sv[hidden] { display: none; }
.ec-sv-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; position: sticky; top: 0; background: rgba(10,29,61,.55); backdrop-filter: blur(10px); z-index: 2; }
.ec-sv-title { font-family: var(--gc-font-head); font-weight: 800; font-size: 1.25rem; }
.ec-sv-body { width: 100%; max-width: 1180px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.ec-pews--big { gap: 12px; padding: 18px 10px; }
.ec-pews--big .ec-row { grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1fr) 24px; column-gap: clamp(12px, 4vw, 48px); font-size: .9rem; }
.ec-pews--big .ec-sec { gap: clamp(4px, 1vw, 12px); }
.ec-pews--big .ec-seat { max-width: 104px; border-radius: 24%; font-size: clamp(.7rem, 1.4vw, 1.05rem); }
.ec-pews--big .ec-seat--cam::after { width: 10px; height: 10px; right: 6px; top: 6px; }
@media (min-width: 700px) { .ec-sv-hint { display: none; } }
@media (orientation: landscape) { .ec-sv-hint { display: none; } }

/* removed notice */
.ec-removed { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(6,18,40,.92); }
.ec-removed[hidden] { display: none; }
.ec-sheet-in .gc-btn--danger { background: #b3261e; color: #fff; border-color: transparent; }
.ec-sheet-in .gc-btn[disabled] { opacity: .5; }

/* phone sign-in */
.ec-entry-signin { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding-top: 6px; border-top: 1px solid rgba(196,214,240,.18); }
.ec-code { letter-spacing: .45em; font-size: 1.5rem; text-align: center; font-weight: 700; }
.ec-ok { color: var(--gc-on); font-weight: 700; }
.ec-sheet-in .ec-ok { color: #1a7f45; }
.ec-sheet-in .gc-field label { color: var(--gc-ink-2); font-weight: 600; }

.ec-nudge { display: flex; align-items: center; gap: 12px; }
.ec-nudge-x { background: none; border: 0; color: var(--gc-mist); font-size: 1.4rem; line-height: 1; padding: 4px 6px; cursor: pointer; }

/* ---------- the Lobby: conversation circles ---------- */
.ec-lobby-alerts { display: flex; flex-direction: column; gap: 8px; }
.ec-lobby-alerts:empty { display: none; }
.ec-lobby-intro { display: flex; flex-direction: column; gap: 4px; }
.ec-circles { display: flex; flex-direction: column; gap: 10px; }
.ec-circle { display: flex; flex-direction: column; gap: 10px; }
.ec-circle--here { box-shadow: inset 0 0 0 2px var(--gc-gold-line); }
.ec-circle-top { display: flex; align-items: center; gap: 10px; }
.ec-circle-n { font-family: var(--gc-font-head); font-weight: 700; font-size: 1.05rem; }
.ec-circle-faces { display: flex; gap: 6px; flex-wrap: wrap; min-height: 34px; align-items: center; }
.ec-circle-host { display: flex; gap: 6px; justify-content: flex-end; margin-top: -4px; }
.ec-here { display: flex; flex-direction: column; gap: 12px; box-shadow: inset 0 0 0 2px var(--gc-gold-line); }
.ec-here-top { display: flex; align-items: center; gap: 10px; }
.ec-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 8px; }
.ec-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; background: none; border: 0; color: inherit; padding: 0; font: inherit; cursor: pointer; }
.ec-tile .gc-av.ec-tile-av { width: 64px; height: 64px; font-size: 1.1rem; transition: box-shadow .15s var(--gc-ease); }
.ec-tile.ec-talking .gc-av { box-shadow: 0 0 0 3px var(--gc-on), 0 0 16px rgba(61, 220, 132, .55); }
.ec-tile-n { font-size: .8rem; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-here-ctl { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
.ec-here-ctl .gc-btn { min-height: 48px; padding: 0 6px; font-size: .88rem; white-space: nowrap; }
@media (min-width: 900px) { .ec-tile .gc-av.ec-tile-av { width: 72px; height: 72px; } }
/* choices on the white sheets (circle type, skin tone, cameras): show which one is picked */
.ec-sheet-in .gc-btn[aria-pressed="true"] { background: var(--gc-royal); color: #fff; border-color: transparent; }
.ec-lobby-clock { display: flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; color: var(--gc-gold); }
.ec-lobby-clock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gc-on); box-shadow: 0 0 0 3px rgba(61, 220, 132, .25); flex: none; }

/* ---------- the Family feed and the Prayer Wall ---------- */
.ec-fam { width: 100%; max-width: 680px; margin: 0 auto; padding: 14px 14px 40px; display: flex; flex-direction: column; gap: 14px; }
.ec-fam section { display: flex; flex-direction: column; gap: 14px; }
.ec-posts { display: flex; flex-direction: column; gap: 14px; }
.ec-compose-card { display: flex; flex-direction: column; gap: 12px; }
.ec-ta { min-height: 84px; border-radius: 16px; padding: 12px 16px; resize: vertical; font: inherit; line-height: 1.45; }
.ec-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ec-chip[aria-pressed="false"] { background: transparent; color: var(--gc-mist); border-color: var(--gc-line); }
.ec-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.ec-thumbs:empty { display: none; }
.ec-thumb { position: relative; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; background: var(--gc-sunk); }
.ec-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ec-thumb--busy img { opacity: .45; }
.ec-thumb--busy::after { content: 'Uploading\2026'; position: absolute; inset: auto 0 6px; text-align: center; font-size: .65rem; font-weight: 700; }
.ec-thumb button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(10, 29, 61, .8); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer; }
.ec-check { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--gc-mist); }
.ec-check input { width: 18px; height: 18px; accent-color: var(--gc-gold); }
.ec-post { display: flex; flex-direction: column; gap: 12px; }
.ec-post--hidden { opacity: .6; border-style: dashed; }
.ec-post-h { display: flex; align-items: center; gap: 10px; }
.ec-post-h .gc-av { width: 42px; height: 42px; font-size: .9rem; }
.ec-post-n { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-post-badges { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.ec-kind-testimony { background: #e9d8ff; }
.ec-kind-praise { background: var(--gc-gold); }
.ec-badge-warn { background: #ffd4cf; color: #8a1c12; }
.ec-more { min-height: 36px; width: 36px; padding: 0; font-size: 1.2rem; }
.ec-post-t { line-height: 1.55; overflow-wrap: anywhere; }
.ec-photos { display: grid; gap: 4px; border-radius: 14px; overflow: hidden; }
.ec-photos--1 { grid-template-columns: 1fr; }
.ec-photos--2, .ec-photos--4 { grid-template-columns: 1fr 1fr; }
.ec-photos--3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.ec-photos--3 .ec-photo:first-child { grid-row: 1 / 3; }
.ec-photo { padding: 0; border: 0; background: var(--gc-sunk); cursor: zoom-in; display: block; aspect-ratio: 4 / 3; }
.ec-photos--1 .ec-photo { aspect-ratio: auto; max-height: 520px; }
.ec-photos--3 .ec-photo { aspect-ratio: auto; min-height: 120px; }
.ec-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ec-photos--1 .ec-photo img { max-height: 520px; object-fit: contain; background: #061430; }
.ec-post-acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; border-top: 1px solid var(--gc-line); padding-top: 10px; }
.ec-react-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 38px; padding: 0 12px; border-radius: var(--gc-r-pill); border: 1px solid var(--gc-line); background: transparent; color: var(--gc-white); font-weight: 600; font-size: .88rem; cursor: pointer; }
.ec-react-btn[aria-pressed="true"] { background: var(--gc-gold-soft); border-color: var(--gc-gold-line); color: var(--gc-gold); }
.ec-react-btn span:empty { display: none; }
.ec-react-l { font-weight: 500; }
@media (max-width: 420px) { .ec-post-acts .ec-react-l { display: none; } .ec-prayed .ec-react-l { display: inline; } }
.ec-cmts { display: flex; flex-direction: column; gap: 10px; }
.ec-cmts:empty { display: none; }
.ec-cmt { display: flex; gap: 8px; align-items: flex-start; }
.gc-av.ec-av-sm { width: 28px; height: 28px; font-size: .7rem; }
.ec-cmt-b { display: flex; flex-direction: column; gap: 2px; background: var(--gc-sunk); padding: 8px 12px; border-radius: 14px; min-width: 0; overflow-wrap: anywhere; font-size: .92rem; }
.ec-cmt-form { display: flex; gap: 8px; }
.ec-cmt-form .gc-input { min-height: 40px; }
.ec-allc { align-self: flex-start; }
.ec-answered { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--gc-gold-soft); border: 1px solid var(--gc-gold-line); }
.ec-answered b { color: var(--gc-gold); }
.ec-prayer--answered { box-shadow: inset 0 0 0 1px var(--gc-gold-line); }
.ec-photo-view { position: fixed; inset: 0; z-index: 40; background: rgba(4, 12, 28, .94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; }
.ec-photo-view img { max-width: 100%; max-height: calc(100vh - 100px); border-radius: 12px; }
.ec-fam-host { display: flex; flex-direction: column; gap: 10px; }
.ec-top-r a.gc-btn { text-decoration: none; }

/* ---------- the eChurch navigation: Sanctuary · Church Family · Prayer Wall ---------- */
.ec-nav { display: flex; gap: 4px; }
.ec-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; padding: 6px 4px; border-radius: 12px; color: var(--gc-mist); text-decoration: none; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.ec-nav a svg { width: 22px; height: 22px; }
.ec-nav a[aria-current="page"] { color: var(--gc-gold); }
@media (max-width: 899px) {
  .ec-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 12; padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--gc-navy) 97%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--gc-line); }
  /* height:auto so the space for the bar comes AFTER the page's content (with a fixed 100% height it sat inside
     the first screenful, and the chat box at the bottom of a long page slid under the bar) */
  body.has-nav { height: auto; min-height: 100%; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  body.has-nav .ec-toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
@media (min-width: 900px) {
  .ec-nav { position: fixed; top: 11px; left: 50%; transform: translateX(-50%); z-index: 6; padding: 4px; border-radius: 14px; background: var(--gc-sunk); }
  .ec-nav a { flex-direction: row; gap: 8px; min-height: 40px; padding: 0 16px; font-size: .9rem; }
  .ec-nav a svg { width: 18px; height: 18px; }
  .ec-nav a[aria-current="page"] { background: #fff; color: var(--gc-navy); }
}
.ec-fam-head { display: flex; flex-direction: column; gap: 4px; }
.ec-fam-head h1 { margin: 0; }
.gc-badge.ec-badge-member { background: #fff; color: var(--gc-navy); }
.gc-badge.ec-badge-team { background: #cfe3ff; color: var(--gc-navy); }
.gc-badge.ec-badge-new { background: var(--gc-on); color: #08220f; }

/* ---------- Angel and the care / alert cards ---------- */
.ec-msg--angel .ec-msg-t { background: linear-gradient(135deg, rgba(255,199,44,.14), rgba(196,214,240,.1)); border: 1px solid var(--gc-gold-line); }
.gc-av.ec-av-angel { background: radial-gradient(circle at 50% 35%, #fff6d6, var(--gc-gold)); color: var(--gc-navy); font-size: 1rem; }
.gc-badge.ec-badge-angel { background: #fff6d6; color: #6b4a00; }
.ec-urgent { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 35; width: min(640px, calc(100vw - 24px)); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-radius: 16px; background: #8a1c12; color: #fff; box-shadow: 0 16px 40px rgba(0,0,0,.45); border: 2px solid #ffb4a8; }
.ec-urgent[hidden] { display: none; }
.ec-urgent-s { font-size: .85rem; opacity: .9; margin-top: 4px; }

/* Sign-in: optional text-message permission (unticked to start) + call notice — on the white sign-in sheet */
.ec-consent { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0 8px; padding: 12px; border: 1px solid #d5deeb; border-radius: 12px; background: #f3f6fb; font-size: .88rem; line-height: 1.45; color: var(--gc-ink-2); cursor: pointer; }
.ec-consent b { color: var(--gc-ink); }
.ec-consent i { color: var(--gc-ink-2); }
.ec-consent input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--gc-royal); cursor: pointer; }
.ec-fine { font-size: .78rem; line-height: 1.45; margin: 0 0 4px; }
.ec-fine a { color: var(--gc-royal); font-weight: 600; }

/* Add to Home Screen + notifications offer on the white sheets */
.ec-offer { margin: 0 0 12px; padding: 14px; border: 1px solid #d5deeb; border-radius: 14px; background: #f3f6fb; display: flex; flex-direction: column; gap: 10px; }
.ec-offer-h { display: flex; gap: 10px; align-items: center; }
.ec-offer-h b { display: block; color: var(--gc-ink); }
.ec-offer .gc-sub { font-size: .88rem; }
.ec-steps { list-style: none; margin: 0; padding: 0; counter-reset: ecs; display: grid; gap: 10px; }
.ec-steps li { display: flex; gap: 10px; align-items: flex-start; color: var(--gc-ink); line-height: 1.45; font-size: .95rem; }
.ec-steps li::before { counter-increment: ecs; content: counter(ecs); flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%; background: var(--gc-royal); color: #fff; font-weight: 700; font-size: .8rem; display: grid; place-items: center; }
.ec-ico { display: inline-block; width: 1.25em; height: 1.25em; vertical-align: -.28em; color: var(--gc-royal); }
.ec-done { color: #1a7f45; font-weight: 700; }

/* The Stage */
.ec-onstage { border: 1.5px solid var(--gc-gold); }
.ec-host-stage { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--gc-line); display: flex; flex-direction: column; gap: 8px; }
.ec-host-sub { display: flex; justify-content: space-between; align-items: center; }
.ec-stage-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ec-stage-n { flex: 1; min-width: 110px; font-weight: 600; }
.ec-cast { display: inline-flex; align-items: center; gap: 2px; }
/* The Stage shown inside the Sanctuary (over the video area) */
.ec-sv { position: absolute; inset: 0; z-index: 3; background: radial-gradient(120% 90% at 50% 30%, var(--gc-royal), var(--gc-royal-3)); padding: 8px; display: flex; }
.ec-sv[hidden] { display: none; }
.ec-sv-grid { flex: 1; display: grid; gap: 6px; grid-auto-rows: 1fr; min-height: 0; }
.ec-sv-tile { position: relative; border-radius: 12px; overflow: hidden; border: 1.5px solid rgba(255, 199, 44, .85); background: var(--gc-royal-3); min-height: 0; }
.ec-sv-spot .ec-sv-tile:first-child { grid-row: span 2; grid-column: span 2; }
.ec-sv-tile .ec-sv-av { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border-radius: 0 !important; font-size: 1.6rem; display: grid; place-items: center; }
.ec-sv-tile .ec-sv-av video { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.ec-sv-n { position: absolute; left: 0; bottom: 0; max-width: 100%; padding: 3px 9px; font-size: .78rem; font-weight: 700; background: rgba(10, 29, 61, .85); border-top-right-radius: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec-sv-speak, .ec-sv-more { position: absolute; left: 50%; transform: translateX(-50%); top: 12px; padding: 5px 14px; border-radius: 999px; background: var(--gc-gold); color: var(--gc-ink); font-weight: 700; font-size: .85rem; white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis; }
.ec-sv-more { left: auto; right: 12px; transform: none; max-width: 45%; background: rgba(10, 29, 61, .85); color: #fff; }
.ec-sv-tap { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); min-height: 48px; }
/* Church Family: Everyone / Groups / Messages */
.ec-seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(10, 29, 61, .45); margin-bottom: 12px; }
.ec-seg[hidden] { display: none; }
.ec-seg button { flex: 1; min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.ec-seg button[aria-pressed="true"] { background: #fff; color: var(--gc-ink); }
.ec-dot { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--gc-gold); color: var(--gc-ink); font-size: .75rem; font-weight: 800; text-align: center; }
.ec-alt-note { margin: 0 2px; }
.ec-grp { display: flex; gap: 10px; align-items: center; }
.ec-dm-list { display: flex; flex-direction: column; gap: 8px; }
.ec-dm-row { display: flex; gap: 10px; align-items: center; }
.ec-dm-conv { width: 100%; border: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; background: rgba(255, 255, 255, .06); border-radius: 14px; padding: 10px 12px; }
.gc-card.ec-dm-conv { background: var(--gc-card, rgba(255, 255, 255, .08)); }
.ec-row-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ec-one { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec-check { display: flex; gap: 10px; align-items: flex-start; }
.ec-check input { width: 22px; height: 22px; margin-top: 2px; }
.ec-chat-list { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; min-height: 160px; overflow-y: auto; padding: 4px 2px 12px; }
.ec-bub { align-self: flex-start; max-width: 82%; padding: 8px 12px; border-radius: 16px 16px 16px 4px; background: rgba(255, 255, 255, .12); display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.ec-bub--me { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: var(--gc-gold); color: var(--gc-ink); }
.ec-bub-t { font-size: .72rem; opacity: .75; }
.ec-post-n[data-fam] { cursor: pointer; }
/* Table / circle text chat */
.ec-tchat { display: flex; flex-direction: column; gap: 4px; max-height: 180px; overflow-y: auto; padding: 8px 10px; border-radius: 12px; background: rgba(10, 29, 61, .35); font-size: .95rem; overflow-wrap: anywhere; }
.ec-tchat-me b { color: var(--gc-gold); }
.ec-tables-set { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; width: 100%; }
.ec-tables-set input { width: 68px; min-height: 36px; padding: 4px 8px; }
/* Looks for seasons and events: colors only. Gold stays the accent so every look is still Glorious. */
html[data-theme="christmas"] { --gc-royal: #1d6b3c; --gc-royal-2: #14522d; --gc-royal-3: #0c3a1f; --gc-navy: #072613; --gc-mist: #cfe8d6; --gc-sunk: rgba(7, 38, 19, 0.5); }
html[data-theme="easter"] { --gc-royal: #6a3a9a; --gc-royal-2: #532a7c; --gc-royal-3: #3b1c5a; --gc-navy: #26103c; --gc-mist: #e0d2f2; --gc-sunk: rgba(38, 16, 60, 0.5); }
html[data-theme="anniversary"] { --gc-royal: #33343f; --gc-royal-2: #24252e; --gc-royal-3: #16171d; --gc-navy: #0c0c10; --gc-mist: #d6d7e0; --gc-sunk: rgba(12, 12, 16, 0.55); }
html[data-theme="watchnight"] { --gc-royal: #1b2a52; --gc-royal-2: #111c3b; --gc-royal-3: #091026; --gc-navy: #050918; --gc-mist: #c4d0ee; --gc-sunk: rgba(5, 9, 24, 0.55); }
html[data-theme="harvest"] { --gc-royal: #8a4a1c; --gc-royal-2: #6b3713; --gc-royal-3: #4a250b; --gc-navy: #2e1606; --gc-mist: #f0dcc8; --gc-sunk: rgba(46, 22, 6, 0.5); }
