:root {
  --bg: #ebe8e2;
  --panel: rgba(248, 246, 241, 0.92);
  --panel-soft: rgba(239, 235, 226, 0.88);
  --text: #242a31;
  --muted: rgba(45, 49, 52, 0.68);
  --accent: #a67d3d;
  --accent-hover: #8f6932;
  --border: rgba(97, 94, 87, 0.16);
  --danger: #c16b63;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 255, 255, .96), rgba(246, 244, 239, .82) 30%, transparent 52%),
    radial-gradient(circle at 88% 22%, rgba(236, 232, 223, .72), transparent 44%),
    linear-gradient(180deg, #f2f1ed 0%, #e5e3de 52%, #8b8b87 100%);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
.app-header {
  height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 28px;
  border-bottom: 1px solid rgba(255,255,255,.45);
  background: rgba(248, 246, 241, .72);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 10px 30px rgba(30, 33, 37, .06), inset 0 1px 0 rgba(255,255,255,.72);
}
.brand { font-size: 24px; font-weight: 700; letter-spacing: -.03em; color: #222831; }
.header-actions { display: flex; align-items: center; gap: 20px; }
nav { display: flex; gap: 18px; color: var(--muted); }
nav a:hover { color: var(--text); }
.language-switch {
  display: inline-flex;
  padding: 4px;
  border: 1px solid rgba(36, 42, 49, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .46);
  box-shadow: 0 10px 30px rgba(30, 33, 37, .08), inset 0 1px 0 rgba(255,255,255,.7);
}

.language-button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #242a31;
  font-weight: 800;
  padding: 8px 16px;
  cursor: pointer;
}

.language-button.is-active { background: #242a31; color: #fffaf0; box-shadow: 0 8px 18px rgba(22, 25, 29, .16); }
.home-shell {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 34px;
  padding: clamp(28px, 5vw, 72px);
}
.home-hero { max-width: 980px; margin: 0 auto; text-align: center; }
.hero {
  min-height: calc(100vh - 64px);
  display: grid;
  place-items: center;
  padding: 40px;
}
.hero > div { max-width: 860px; text-align: center; }
.eyebrow { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
h1 { font-size: clamp(42px, 7vw, 76px); line-height: .95; margin: 14px 0; }
.home-hero h1 { font-size: clamp(38px, 6vw, 70px); }
.hero-text { color: var(--muted); font-size: 20px; line-height: 1.55; }
.module-grid {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.module-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background:
    radial-gradient(circle at top left, rgba(47, 165, 114, .16), transparent 36%),
    var(--panel);
  box-shadow: 0 20px 70px rgba(0, 0, 0, .20);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.module-card-active:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  background:
    radial-gradient(circle at top left, rgba(47, 165, 114, .24), transparent 42%),
    var(--panel-soft);
}
.module-card-disabled { opacity: .72; filter: saturate(.82); }
.module-icon { font-size: 40px; }
.module-status {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .10em;
}
.module-status.coming-soon { color: var(--muted); }
.module-card h2 { margin: 0 0 10px; font-size: 28px; }
.module-card p:not(.module-status) { margin: 0; color: var(--muted); line-height: 1.5; }
.module-cta { color: var(--accent); font-weight: 900; }
.primary-link, .primary-button, .secondary-button, .ghost-button { background: rgba(255,255,255,.38); color: var(--muted); border: 1px solid rgba(97,94,87,.14); padding: 8px 12px; }
.primary-link, .primary-button { background: linear-gradient(180deg, #c29652, #9c7337); color: white; display: inline-block; box-shadow: 0 16px 28px rgba(83, 61, 31, .20), inset 0 1px 0 rgba(255,255,255,.28); }
.primary-link:hover, .primary-button:hover { background: linear-gradient(180deg, #cfa769, #8f6932); }
.secondary-button { background: rgba(255,255,255,.56); color: var(--text); border: 1px solid rgba(97,94,87,.14); }
.ghost-button { background: transparent; color: var(--muted); border: 1px solid var(--border); padding: 8px 12px; }
.builder-layout {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  padding: 16px;
  min-height: calc(100vh - 64px);
}
.panel {
  background: linear-gradient(145deg, rgba(248, 246, 241, .92), rgba(234, 230, 222, .82));
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 24px;
  padding: 20px;
  min-width: 0;
  box-shadow: 0 24px 60px rgba(28, 31, 35, .12), inset 0 1px 0 rgba(255,255,255,.76);
}

.panel h2 { margin: 0 0 14px; line-height: 1.2; }
.panel > h2 {
  min-height: 32px;
  display: flex;
  align-items: center;
}
.panel-title-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; }

/* Bible version selector: compact, right-aligned, and kept within the title row height
   so the Song and Bible search inputs start on the same horizontal line. */
.bible-title-row {
  align-items: center;
  margin-bottom: 14px;
  min-height: 32px;
}
.bible-title-row h2 {
  margin: 0;
  min-height: 32px;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
}
.bible-version-select {
  width: min(172px, 44%);
  min-width: 126px;
  height: 30px;
  min-height: 30px;
  margin-top: 0;
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  background-color: rgba(255,255,255,.68);
  flex: 0 0 auto;
}
.bible-version-select:disabled {
  opacity: .58;
  cursor: not-allowed;
}
.result-meta {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}
@media (max-width: 1180px) {
  .bible-title-row { flex-direction: column; align-items: stretch; }
  .bible-version-select { width: 100%; }
}

.search-input {
  width: 100%;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(97, 94, 87, 0.14);
  border-radius: 16px;
  color: var(--text);
  font-size: 16px;
  padding: 14px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}

.search-input:focus { border-color: var(--accent); }
.result-list, .flow-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - 210px);
  overflow: auto;
}
.result-item, .flow-item {
  background: rgba(255,255,255,.5);
  border: 1px solid rgba(97, 94, 87, 0.14);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 10px 24px rgba(30, 33, 37, .05);
}

.result-item { cursor: pointer; }
.result-item:hover { border-color: var(--accent); }
.result-title, .flow-title { font-weight: 800; margin-bottom: 6px; }
.result-snippet, .flow-snippet { color: var(--muted); font-size: 14px; line-height: 1.4; white-space: pre-line; }
.flow-item { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: start; }
.remove-button {
  border: 0;
  border-radius: 8px;
  background: var(--danger);
  color: white;
  cursor: pointer;
  width: 32px;
  height: 32px;
}
.empty-state { color: var(--muted); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.status-message { min-height: 24px; color: var(--muted); }
.preview-shell { min-height: calc(100vh - 64px); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.preview-slide {
  flex: 1;
  background: #f5f5dc;
  color: #1e1e1e;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 60px;
  text-align: center;
  font-family: Georgia, serif;
}
.slide-text { font-size: clamp(36px, 6vw, 72px); font-weight: 800; line-height: 1.15; white-space: pre-line; }
.slide-title { position: absolute; right: 42px; bottom: 36px; color: #666; font-size: 28px; }
.preview-controls { display: flex; align-items: center; justify-content: center; gap: 16px; }
@media (max-width: 980px) {
  .builder-layout { grid-template-columns: 1fr; }
  .result-list, .flow-list { max-height: none; }
  .module-grid { grid-template-columns: 1fr; }
  .module-card { min-height: 220px; }
}
@media (max-width: 720px) {
  .app-header { height: auto; min-height: 64px; align-items: flex-start; flex-direction: column; padding: 14px 18px; gap: 12px; }
  .header-actions { width: 100%; justify-content: space-between; gap: 12px; }
  nav { gap: 12px; }
}

/* Song preview layouts: songs are rendered as one lyric sheet instead of 3-4 line chunks. */
.song-single {
  width: min(100%, 1100px);
  font-weight: 800;
  line-height: 1.22;
  white-space: pre-line;
}
.song-columns {
  width: min(100%, 1180px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: center;
  text-align: left;
  font-weight: 800;
  line-height: 1.18;
  white-space: pre-line;
}
.song-column { min-width: 0; }
.song-large { font-size: clamp(30px, 4.8vw, 54px); }
.song-medium { font-size: clamp(26px, 4vw, 44px); }
.song-compact { font-size: clamp(22px, 3.2vw, 34px); }
.song-dense { font-size: clamp(18px, 2.6vw, 28px); }
@media (max-width: 900px) {
  .song-columns { grid-template-columns: 1fr; gap: 18px; }
}

/* Song search results: keep the list compact, reveal lyrics on hover. */
.result-song .result-snippet {
  display: none;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  max-height: 220px;
  overflow: auto;
}
.result-song:hover .result-snippet,
.result-song:focus-visible .result-snippet {
  display: block;
}

/* Closing slide modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .62);
  z-index: 100;
}
.modal-backdrop.is-open { display: grid; }
.modal-card {
  width: min(760px, 100%);
  max-height: min(92vh, 820px);
  overflow: auto;
  background: linear-gradient(145deg, rgba(248, 246, 241, .97), rgba(239, 235, 226, .94));
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 24px 90px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255,255,255,.72);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 18px;
}
.modal-header h2 { margin: 4px 0 0; }
.modal-eyebrow {
  margin: 0;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 12px;
}
.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-grid label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.full-row { grid-column: 1 / -1; }
.form-control {
  width: 100%;
  margin-top: 7px;
  background: rgba(255,255,255,.76);
  border: 1px solid rgba(97,94,87,.14);
  border-radius: 14px;
  color: var(--text);
  padding: 12px 14px;
  outline: none;
}

.form-control:focus { border-color: var(--accent); }
textarea.form-control { resize: vertical; min-height: 108px; line-height: 1.5; }
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}
.checkbox-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.hidden { display: none !important; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.preview-brand-logo {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  height: 62px;
  width: auto;
  object-fit: contain;
}
.closing-card {
  width: min(88%, 1080px);
  min-height: 56%;
  display: grid;
  place-items: center;
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid rgba(168, 132, 74, .75);
  border-radius: 28px;
  background: rgba(245, 239, 222, .91);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .22);
}
.closing-card.on-image {
  background: rgba(26, 23, 18, .84);
  color: #fffaf0;
}
.closing-content h2 {
  font-size: clamp(34px, 5.2vw, 64px);
  line-height: 1.05;
  margin: 0 0 20px;
}
.closing-subtitle {
  font-size: clamp(26px, 3.8vw, 46px);
  line-height: 1.15;
  margin: 0 0 24px;
  color: rgba(30, 30, 30, .78);
}
.closing-card.on-image .closing-subtitle { color: rgba(232, 220, 196, .96); }
.closing-note {
  font-size: clamp(18px, 2.2vw, 30px);
  line-height: 1.28;
  margin: 0;
  color: rgba(30, 30, 30, .72);
  white-space: pre-line;
}
.closing-card.on-image .closing-note { color: rgba(232, 220, 196, .92); }
.preview-slide.has-background-image {
  background-size: cover;
  background-position: center;
}
.preview-slide.has-background-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .34);
  border-radius: inherit;
}
.preview-slide > * { position: relative; z-index: 1; }
@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
  .modal-actions { justify-content: stretch; }
  .modal-actions button { flex: 1; }
}

/* Modern landing page */
body.home-page {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 255, 255, .96), rgba(246, 244, 239, .82) 30%, transparent 52%),
    radial-gradient(circle at 88% 22%, rgba(236, 232, 223, .72), transparent 44%),
    linear-gradient(180deg, #f2f1ed 0%, #e5e3de 52%, #8b8b87 100%);
  color: #242a31;
}
body.home-page::before {
  content: "";
  position: fixed;
  inset: auto 0 0;
  height: 45vh;
  pointer-events: none;
  opacity: .28;
  background:
    radial-gradient(ellipse at 14% 100%, rgba(45, 48, 50, .8) 0 16%, transparent 44%),
    radial-gradient(ellipse at 83% 100%, rgba(74, 76, 76, .66) 0 18%, transparent 48%),
    linear-gradient(180deg, transparent 0%, rgba(39, 41, 43, .42) 100%);
  filter: blur(1px);
}
body.home-page .app-header { display: none; }
body.home-page main { min-height: 100vh; }

.landing-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: clamp(14px, 2vw, 28px);
  padding: clamp(22px, 3vw, 42px) clamp(22px, 4vw, 70px) clamp(18px, 2.5vw, 34px);
}
.landing-topbar {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.landing-mini-logo {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #a67d3d;
  position: relative;
}
.landing-mini-logo::before {
  content: "";
  position: absolute;
  inset: 5px 7px 6px;
  border: 2px solid currentColor;
  border-bottom-color: transparent;
  border-radius: 999px 999px 42% 42%;
  opacity: .9;
}
.mini-logo-cross,
.mini-logo-cross::before {
  display: block;
  background: currentColor;
  border-radius: 999px;
}
.mini-logo-cross {
  width: 2px;
  height: 30px;
  position: relative;
}
.mini-logo-cross::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 2px;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
}
.landing-language-switch {
  background: rgba(255, 255, 255, .58);
  border-color: rgba(36, 42, 49, .28);
  box-shadow: 0 10px 30px rgba(30, 33, 37, .08), inset 0 1px 0 rgba(255,255,255,.7);
}
body.home-page .language-button {
  color: #242a31;
  padding: 8px 18px;
}
body.home-page .language-button.is-active {
  background: #242a31;
  color: #fffaf0;
  box-shadow: 0 8px 18px rgba(22, 25, 29, .16);
}
.landing-brand-block {
  text-align: center;
  margin-top: -22px;
}
.landing-brand {
  margin: 0;
  font-size: clamp(50px, 5.6vw, 78px);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .9;
  color: #222831;
}
.landing-tagline {
  margin: 14px 0 9px;
  color: #2e343b;
  font-size: clamp(11px, 1.05vw, 15px);
  font-weight: 800;
  letter-spacing: .38em;
}
.landing-accent-line,
.card-title-line {
  display: inline-block;
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: #a67d3d;
}
.landing-module-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2.3vw, 38px);
  align-items: stretch;
  min-height: min(70vh, 720px);
}
.landing-module-card {
  min-height: 560px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  text-align: center;
  padding: clamp(34px, 3vw, 54px) clamp(26px, 2.5vw, 48px);
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .7), transparent 44%),
    linear-gradient(145deg, rgba(248, 246, 241, .84), rgba(221, 219, 214, .72));
  box-shadow:
    0 28px 70px rgba(28, 31, 35, .18),
    inset 0 1px 0 rgba(255,255,255,.78),
    inset 0 -1px 0 rgba(90, 88, 82, .08);
  overflow: hidden;
  position: relative;
}
.landing-module-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 27px;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,.5);
}
.landing-module-card-active {
  color: #222831;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .88), transparent 46%),
    linear-gradient(145deg, rgba(255, 252, 245, .92), rgba(239, 235, 226, .82));
  border-color: rgba(166, 125, 61, .8);
  box-shadow:
    0 32px 76px rgba(28, 31, 35, .22),
    0 0 0 1px rgba(166, 125, 61, .22),
    0 0 42px rgba(196, 157, 89, .32),
    inset 0 1px 0 rgba(255,255,255,.9);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.landing-module-card-active:hover {
  transform: translateY(-6px);
  border-color: rgba(166, 125, 61, .96);
  box-shadow:
    0 38px 92px rgba(28, 31, 35, .28),
    0 0 0 1px rgba(166, 125, 61, .32),
    0 0 58px rgba(196, 157, 89, .4),
    inset 0 1px 0 rgba(255,255,255,.92);
}
.landing-module-card-disabled {
  color: #272d34;
  filter: saturate(.72);
}
.landing-card-header h2 {
  margin: 0 0 20px;
  color: #242a31;
  font-size: clamp(28px, 2.6vw, 42px);
  font-weight: 780;
  letter-spacing: -.045em;
}
.card-title-line {
  width: 46px;
  height: 4px;
  background: rgba(130, 126, 117, .52);
}
.card-title-line-gold { background: #a67d3d; }
.service-symbol {
  align-self: center;
  width: min(58%, 270px);
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  margin-top: clamp(20px, 3vh, 46px);
}
.service-symbol-arc {
  position: absolute;
  inset: 6%;
  border: 3px solid rgba(180, 140, 76, .42);
  border-bottom-color: transparent;
  border-radius: 999px;
}
.service-cross {
  position: absolute;
  border-radius: 999px;
  background: linear-gradient(90deg, #c79a57, #f5dfb7 44%, #9d7437 100%);
  box-shadow: 0 14px 28px rgba(96, 70, 35, .18), inset 0 0 0 1px rgba(105, 76, 34, .18);
}
.service-cross-vertical {
  width: 10%;
  height: 74%;
  top: 18%;
}
.service-cross-horizontal {
  width: 58%;
  height: 10%;
  top: 43%;
}
.service-cross-shine {
  position: absolute;
  width: 68%;
  height: 20%;
  top: 41%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.58), transparent 62%);
  transform: rotate(-4deg);
  opacity: .8;
}
.service-symbol::after,
.module-svg-wrap::after {
  content: "";
  position: absolute;
  width: 48%;
  height: 11px;
  bottom: 4%;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(52, 49, 42, .18), transparent 70%);
  filter: blur(2px);
}
.landing-card-bottom {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 22px;
}
.service-short-copy {
  max-width: 420px;
  margin: 0;
  color: rgba(45, 49, 52, .68);
  font-size: clamp(15px, 1.25vw, 19px);
  line-height: 1.55;
}
.landing-enter-button {
  min-width: 170px;
  border-radius: 999px;
  padding: 16px 32px;
  background: linear-gradient(180deg, #c29652, #9c7337);
  color: #fffaf0;
  font-size: 19px;
  font-weight: 850;
  box-shadow: 0 16px 28px rgba(83, 61, 31, .28), inset 0 1px 0 rgba(255,255,255,.38);
}
.landing-enter-button::after {
  content: "›";
  margin-left: 18px;
  font-size: 28px;
  line-height: 0;
  vertical-align: -1px;
}
.module-svg-wrap {
  align-self: center;
  width: min(56%, 270px);
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  margin-top: clamp(22px, 4vh, 56px);
}
.module-svg-wrap svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.flame-main { fill: url(#flameGradient); opacity: .92; }
.flame-inner { fill: rgba(255,255,255,.42); }
.dove { fill: #fffdf8; opacity: .95; }
.dove-eye { fill: #918b82; }
.house-roof,
.house-wall,
.chimney,
.group-arc {
  fill: none;
  stroke: #8a857d;
  stroke-width: 13;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.group-arc { stroke: #b89154; stroke-width: 5; opacity: .72; }
.person,
.person-body { fill: #8a857d; opacity: .92; }
.person-main { opacity: .98; }
.coming-soon-strip {
  width: min(70%, 300px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  color: rgba(75, 78, 80, .62);
}
.coming-soon-strip span {
  height: 1px;
  background: rgba(92, 95, 96, .28);
}
.coming-soon-strip p {
  margin: 0;
  font-size: clamp(15px, 1.2vw, 19px);
  letter-spacing: -.02em;
}
.landing-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  color: rgba(38, 42, 46, .54);
  font-size: 14px;
  padding-top: 4px;
}
@media (max-width: 1180px) {
  .landing-shell { padding-inline: 28px; }
  .landing-module-grid { gap: 18px; }
  .landing-module-card { min-height: 520px; padding-inline: 24px; }
}
@media (max-width: 900px) {
  body.home-page { overflow: auto; }
  .landing-shell { min-height: auto; }
  .landing-brand-block { margin-top: 0; }
  .landing-module-grid { grid-template-columns: 1fr; min-height: 0; }
  .landing-module-card { min-height: 430px; }
  .service-symbol, .module-svg-wrap { width: min(42%, 230px); margin-top: 18px; }
}
@media (max-width: 620px) {
  .landing-topbar { align-items: flex-start; }
  .landing-mini-logo { width: 46px; height: 46px; }
  .landing-brand { font-size: 48px; }
  .landing-tagline { letter-spacing: .22em; }
  .landing-shell { padding: 18px; }
  .landing-module-card { min-height: 390px; border-radius: 22px; }
  .landing-card-header h2 { font-size: 28px; }
  .service-symbol, .module-svg-wrap { width: min(62%, 210px); }
}


/* Main page image asset cards */
.module-image-wrap {
  align-self: center;
  width: min(56%, 270px);
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  margin-top: clamp(22px, 4vh, 56px);
}

.module-image-wrap::after {
  content: "";
  position: absolute;
  width: 52%;
  height: 12px;
  bottom: 3%;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(52, 49, 42, .17), transparent 72%);
  filter: blur(2px);
  transition: opacity .22s ease, transform .22s ease;
}

.module-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(22%) saturate(.78) opacity(.66);
  transform: translateY(4px) scale(.94);
  transition: filter .25s ease, opacity .25s ease, transform .25s ease;
}

.service-image {
  filter: saturate(.92) opacity(.74);
}

.groups-image {
  width: 108%;
  height: 108%;
}

.landing-module-card {
  cursor: default;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease, filter .22s ease;
}

.landing-module-card-active {
  cursor: pointer;
}

.landing-module-card-disabled {
  opacity: .84;
}

.landing-module-card:hover {
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, .94), transparent 48%),
    linear-gradient(145deg, rgba(255, 253, 248, .94), rgba(238, 235, 229, .86));
  border-color: rgba(255, 255, 255, .9);
  box-shadow:
    0 34px 86px rgba(28, 31, 35, .22),
    inset 0 1px 0 rgba(255,255,255,.92),
    inset 0 -1px 0 rgba(90, 88, 82, .05);
}

.landing-module-card:hover .module-image {
  filter: grayscale(0%) saturate(1) opacity(.96);
  transform: translateY(-2px) scale(1);
}

.landing-module-card:hover .module-image-wrap::after {
  opacity: .9;
  transform: scaleX(1.05);
}

.landing-module-card-disabled:hover {
  transform: translateY(-3px);
}

.landing-module-card-active:hover {
  transform: translateY(-6px);
  border-color: rgba(166, 125, 61, .96);
  box-shadow:
    0 38px 92px rgba(28, 31, 35, .28),
    0 0 0 1px rgba(166, 125, 61, .32),
    0 0 58px rgba(196, 157, 89, .4),
    inset 0 1px 0 rgba(255,255,255,.92);
}

@media (max-width: 900px) {
  .module-image-wrap { width: min(42%, 230px); margin-top: 18px; }
}

@media (max-width: 620px) {
  .module-image-wrap { width: min(62%, 210px); }
}


/* Safety fix: homepage icons are served from /static/assets/mainpage. */
.module-image {
  border: 0;
  outline: 0;
}
.module-image-wrap {
  min-height: 240px;
}
@media (max-width: 900px) {
  .module-image-wrap { min-height: 210px; }
}


/* Builder visual refinement: quieter gray palette, no bright cream dominance */
body:not(.home-page) {
  background:
    radial-gradient(circle at 18% 0%, rgba(245, 244, 240, .58), transparent 38%),
    radial-gradient(circle at 86% 18%, rgba(215, 213, 207, .40), transparent 44%),
    linear-gradient(180deg, #d7d5ce 0%, #bfc0bd 55%, #8f908d 100%);
  color: #242a31;
}

body:not(.home-page) .app-header {
  background: rgba(226, 225, 219, .78);
  border-bottom-color: rgba(255,255,255,.34);
}

body:not(.home-page) .builder-layout {
  gap: 18px;
  padding: 20px;
}

body:not(.home-page) .panel {
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.52), transparent 48%),
    linear-gradient(145deg, rgba(226, 224, 218, .92), rgba(199, 199, 194, .86));
  border-color: rgba(255, 255, 255, .52);
  box-shadow:
    0 24px 62px rgba(30, 33, 37, .15),
    inset 0 1px 0 rgba(255,255,255,.55);
}

body:not(.home-page) .panel h2 {
  color: #252b32;
  font-size: 25px;
  letter-spacing: -.03em;
}

body:not(.home-page) .search-input,
body:not(.home-page) .form-control {
  background: rgba(237, 236, 231, .72);
  border-color: rgba(75, 77, 76, .14);
  color: #242a31;
}

body:not(.home-page) .search-input:focus,
body:not(.home-page) .form-control:focus {
  border-color: rgba(166, 125, 61, .62);
  box-shadow: 0 0 0 4px rgba(166, 125, 61, .10);
}

body:not(.home-page) .result-item,
body:not(.home-page) .flow-item {
  background: rgba(230, 229, 224, .68);
  border-color: rgba(75, 77, 76, .13);
}

body:not(.home-page) .result-item:hover {
  border-color: rgba(166, 125, 61, .64);
  background: rgba(239, 237, 231, .82);
}

body:not(.home-page) .secondary-button {
  background: rgba(221, 220, 215, .72);
}

body:not(.home-page) .ghost-button {
  background: rgba(220, 219, 214, .46);
}

body:not(.home-page) .modal-card {
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.48), transparent 48%),
    linear-gradient(145deg, rgba(226, 224, 218, .98), rgba(200, 200, 195, .96));
  border-color: rgba(255,255,255,.55);
  color: #242a31;
}


/* Web preview fullscreen mode */
body.preview-page {
  overflow: hidden;
}

body.preview-page .app-header {
  display: none;
}

body.preview-page main {
  min-height: 100vh;
}

.preview-shell {
  min-height: 100vh;
  padding: 18px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  background:
    radial-gradient(circle at 18% 0%, rgba(245, 244, 240, .42), transparent 38%),
    linear-gradient(180deg, #d1d0cb 0%, #a5a6a3 100%);
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(226, 225, 219, .72);
  border: 1px solid rgba(255,255,255,.44);
  box-shadow: 0 12px 34px rgba(30, 33, 37, .11), inset 0 1px 0 rgba(255,255,255,.52);
  transition: opacity .2s ease, transform .2s ease;
}

.preview-toolbar-left,
.preview-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slide-counter {
  min-width: 68px;
  color: rgba(45, 49, 52, .68);
  font-weight: 800;
  text-align: center;
}

.preview-stage {
  min-height: 0;
  position: relative;
  outline: none;
  border-radius: 22px;
}

.preview-slide {
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #f5f1e8;
  color: #1e1e1e;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: clamp(44px, 5vw, 76px);
  text-align: center;
  font-family: Georgia, serif;
  box-shadow: 0 24px 70px rgba(24, 26, 29, .20);
  overflow: hidden;
}

.preview-stage:fullscreen {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  background: #111;
}

.preview-stage:fullscreen .preview-slide {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  box-shadow: none;
}

.preview-shell.is-fullscreen {
  padding: 0;
  gap: 0;
  grid-template-rows: 1fr;
}

.preview-shell.is-fullscreen .preview-toolbar {
  position: fixed;
  left: 16px;
  right: 16px;
  top: 16px;
  z-index: 50;
  opacity: .18;
}

.preview-shell.is-fullscreen .preview-toolbar:hover {
  opacity: 1;
}

.preview-shell.is-fullscreen .preview-stage {
  border-radius: 0;
}

.preview-shell.is-ui-hidden .preview-toolbar,
.preview-shell.is-ui-hidden .preview-help {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}

.blackout-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #000;
  color: rgba(255,255,255,.28);
  font-family: Inter, Segoe UI, Arial, sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  z-index: 40;
  transition: opacity .18s ease;
}

.preview-shell.is-blackout .blackout-overlay {
  opacity: 1;
  pointer-events: auto;
}

.preview-help {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 12;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(20, 22, 24, .34);
  color: rgba(255,255,255,.75);
  font-family: Inter, Segoe UI, Arial, sans-serif;
  font-size: 12px;
  backdrop-filter: blur(10px);
  transition: opacity .2s ease, transform .2s ease;
}

.preview-help strong {
  color: white;
}

.preview-slide .slide-footer-logo {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: clamp(46px, 5vw, 76px);
  height: auto;
  object-fit: contain;
  opacity: .88;
}

.preview-closing-slide {
  background-size: cover;
  background-position: center;
  color: #fff;
}

.preview-closing-slide .closing-content {
  max-width: 900px;
  padding: 56px;
  border-radius: 24px;
  background: rgba(18, 19, 20, .20);
  backdrop-filter: blur(2px);
  text-shadow: 0 2px 18px rgba(0,0,0,.38);
}

.preview-closing-slide h1 {
  font-size: clamp(42px, 6vw, 86px);
  margin: 0 0 18px;
  line-height: 1.05;
}

.preview-closing-slide h2 {
  font-size: clamp(28px, 4vw, 58px);
  margin: 0 0 30px;
  font-weight: 500;
}

.preview-closing-slide p {
  font-size: clamp(20px, 2.2vw, 34px);
  line-height: 1.35;
  white-space: pre-line;
  margin: 0;
}

@media (max-width: 840px) {
  body.preview-page {
    overflow: auto;
  }

  .preview-shell {
    min-height: 100vh;
    grid-template-rows: auto minmax(520px, 1fr);
  }

  .preview-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .preview-toolbar-left,
  .preview-toolbar-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .preview-help {
    display: none;
  }
}





/* Preview lyric autofit + footer separation */
.preview-slide {
  padding: clamp(40px, 5vw, 72px) clamp(52px, 6vw, 92px) clamp(112px, 12vh, 150px) !important;
  overflow: hidden;
}

.preview-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: min(1180px, 94%);
  max-height: calc(100% - 118px);
  overflow: visible;
}

.slide-text.preview-content {
  line-height: 1.12;
}

.song-single.preview-content {
  line-height: 1.14;
  text-align: center;
}

.song-columns.preview-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 44px;
  line-height: 1.12;
  text-align: left;
  white-space: pre-line;
}

.song-column {
  min-width: 0;
  overflow-wrap: anywhere;
}

.slide-title {
  position: absolute !important;
  right: clamp(28px, 4vw, 58px) !important;
  bottom: clamp(64px, 7vh, 92px) !important;
  max-width: min(620px, 54%);
  color: rgba(80, 80, 76, .82) !important;
  font-size: clamp(17px, 1.55vw, 24px) !important;
  line-height: 1.12;
  text-align: right;
  z-index: 5 !important;
  white-space: normal;
}

.preview-slide .slide-footer-logo {
  position: absolute;
  left: 50%;
  bottom: clamp(10px, 1.8vh, 20px) !important;
  transform: translateX(-50%);
  width: clamp(38px, 4.2vw, 64px) !important;
  height: auto;
  object-fit: contain;
  opacity: .82;
  z-index: 6 !important;
}

.preview-closing-slide {
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  padding: clamp(52px, 7vw, 92px) !important;
}

.preview-closing-slide .closing-content {
  max-height: none;
  overflow: visible;
}

.preview-stage:fullscreen .preview-slide {
  padding-bottom: clamp(112px, 10vh, 148px) !important;
}

.preview-stage:fullscreen .preview-closing-slide {
  padding: clamp(52px, 7vw, 92px) !important;
}

@media (max-width: 900px) {
  .song-columns.preview-content {
    grid-template-columns: 1fr;
    gap: 18px;
    text-align: center;
  }

  .preview-slide {
    padding-bottom: 108px !important;
  }

  .slide-title {
    right: 26px !important;
    bottom: 62px !important;
    max-width: 66%;
    font-size: 17px !important;
  }
}


.field-hint {
  display: block;
  margin-top: 7px;
  color: rgba(83, 80, 73, .72);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}
.preview-content { color: var(--preview-text-color, inherit); }
.slide-title { color: var(--preview-muted-text-color, #666); }


/* Custom background upload */
.custom-upload-panel {
  padding: 14px;
  border: 1px solid rgba(97,94,87,.16);
  border-radius: 18px;
  background: rgba(255,255,255,.48);
}

.custom-upload-panel.is-locked {
  opacity: .72;
}

.custom-upload-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.custom-upload-header strong {
  display: block;
  color: var(--text);
  margin-bottom: 3px;
}

.custom-upload-header small,
.upload-status {
  color: var(--muted);
  font-size: 12px;
}

.plan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: rgba(45,49,52,.78);
  border: 1px solid rgba(97,94,87,.16);
  background: rgba(230,229,224,.78);
}

.plan-badge.is-premium {
  color: #fffaf0;
  border-color: rgba(156,115,55,.28);
  background: linear-gradient(180deg, #c29652, #9c7337);
}

.custom-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.custom-upload-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .custom-upload-grid { grid-template-columns: 1fr; }
}


/* Design preview and local design defaults */
.background-preview-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(97,94,87,.14);
  border-radius: 16px;
  background: rgba(255,255,255,.38);
}

.background-preview-thumb {
  width: 96px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: 12px;
  border: 1px solid rgba(97,94,87,.18);
  background: linear-gradient(135deg, rgba(245,245,220,.98), rgba(226,225,219,.92));
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.background-preview-thumb span {
  font-size: 11px;
  font-weight: 800;
  color: rgba(45,49,52,.58);
}

.background-preview-row strong {
  display: block;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 2px;
}

.background-preview-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.translation-select-row {
  display: block;
  margin-bottom: 12px;
}
.translation-select-row span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
}
.compact-select {
  min-height: 44px;
  padding: 10px 12px;
}
.result-meta {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .03em;
  margin: -2px 0 6px;
}

.translation-help {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

/* Final Bible version select cleanup */
.bible-title-row .bible-version-select { margin-left: auto; }
@media (max-width: 1180px) {
  .bible-title-row .bible-version-select { margin-left: 0; width: 100%; height: 34px; min-height: 34px; font-size: 12px; }
}


/* Production prep: final compact Bible translation selector alignment */
.panel .bible-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  margin: 0 0 14px;
}
.panel .bible-title-row h2 {
  margin: 0;
  min-height: 32px;
  flex: 1 1 auto;
  min-width: 0;
}
.panel .bible-title-row .bible-version-select {
  width: 138px !important;
  max-width: 42%;
  min-width: 118px;
  height: 28px !important;
  min-height: 28px !important;
  padding: 3px 22px 3px 8px !important;
  border-radius: 9px;
  font-size: 10.5px !important;
  font-weight: 700;
  line-height: 1;
  margin: 0 0 0 auto !important;
  flex: 0 0 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 1180px) {
  .panel .bible-title-row { flex-direction: row; align-items: center; }
  .panel .bible-title-row .bible-version-select { width: 126px !important; max-width: 48%; }
}
@media (max-width: 720px) {
  .panel .bible-title-row .bible-version-select { width: 150px !important; max-width: 54%; }
}

.slide-attribution {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 7.5%;
  z-index: 3;
  text-align: center;
  font-size: clamp(8px, .72vw, 12px);
  line-height: 1.2;
  color: var(--preview-muted-text-color, rgba(255,255,255,.78));
  opacity: .82;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* PraiseCast Community */

.home-page .landing-module-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 980px;
  margin-inline: auto;
}

.community-page {
  min-height: 100vh;
}

.community-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 48px auto 80px;
}

.community-hero {
  max-width: 760px;
  margin-bottom: 36px;
}

.community-eyebrow,
.community-section-label {
  display: block;
  margin: 0 0 10px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.72;
}

.community-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 0.98;
}

.community-hero p {
  max-width: 660px;
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.7;
  opacity: 0.8;
}

.community-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);
  gap: 24px;
  align-items: start;
}

.community-panel {
  overflow: hidden;
  border: 1px solid rgba(128, 128, 128, 0.22);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.08);
}

.community-panel-heading {
  padding: 24px 26px 18px;
  border-bottom: 1px solid rgba(128, 128, 128, 0.18);
}

.community-panel-heading h2 {
  margin: 0;
  font-size: 1.45rem;
}

.community-video-placeholder {
  min-height: 390px;
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.community-play-symbol {
  width: 76px;
  height: 76px;
  margin-bottom: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(128, 128, 128, 0.32);
  border-radius: 50%;
  font-size: 1.45rem;
  padding-left: 5px;
}

.community-video-placeholder strong,
.community-comments-placeholder strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.08rem;
}

.community-video-placeholder p,
.community-comments-placeholder p {
  max-width: 520px;
  margin: 0;
  line-height: 1.65;
  opacity: 0.72;
}

.community-comments-placeholder {
  min-height: 260px;
  padding: 32px 26px;
}

@media (max-width: 820px) {
  .home-page .landing-module-grid,
  .community-layout {
    grid-template-columns: 1fr;
  }

  .community-shell {
    margin-top: 28px;
  }

  .community-video-placeholder {
    min-height: 300px;
  }
}

/* PraiseCast Community V2 */

.home-page .landing-module-grid {
  width: min(100%, 860px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(270px, 370px));
  justify-content: center;
  align-items: stretch;
  gap: clamp(20px, 3vw, 34px);
}

.home-page .landing-module-card {
  width: 100%;
  min-width: 0;
  height: auto;
  aspect-ratio: 4 / 5;
  display: flex;
  flex-direction: column;
}

.home-page .module-image-wrap {
  flex: 1 1 auto;
  min-height: 0;
}

.home-page .module-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-page .landing-card-bottom {
  margin-top: auto;
}

.home-access-panel {
  width: min(100%, 860px);
  margin: 38px auto 0;
  padding: clamp(24px, 4vw, 38px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 34px;
  align-items: center;
  border: 1px solid rgba(128, 128, 128, 0.2);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.08);
}

.home-access-eyebrow,
.profile-eyebrow {
  display: block;
  margin-bottom: 10px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  opacity: 0.68;
}

.home-access-copy h2 {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.home-access-copy p {
  margin: 0;
  line-height: 1.65;
  opacity: 0.74;
}

.home-access-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.home-access-form label {
  display: grid;
  gap: 7px;
}

.home-access-submit,
.home-access-status {
  grid-column: 1 / -1;
}

.home-access-submit {
  width: 100%;
}

.home-access-status,
.profile-save-status {
  min-height: 22px;
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.78;
}

.floating-profile-button {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 1000;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.23);
  border-radius: 50%;
  text-decoration: none;
  background: rgba(20, 20, 20, 0.88);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.floating-profile-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 17px 44px rgba(0, 0, 0, 0.34);
}

.floating-profile-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  background-position: center;
  background-size: cover;
  color: white;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.floating-profile-avatar.has-photo {
  color: transparent;
}

.community-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 80px;
}

.community-page-heading {
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
}

.community-page-heading h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 1;
}

.community-page-heading p {
  max-width: 470px;
  margin: 0;
  text-align: right;
  line-height: 1.65;
  opacity: 0.72;
}

.community-eyebrow,
.community-section-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  opacity: 0.65;
}

.community-video-stage {
  min-height: clamp(260px, 29vh, 390px);
  overflow: hidden;
  border: 1px solid rgba(128, 128, 128, 0.22);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 22px 65px rgba(0, 0, 0, 0.1);
}

.community-video-heading,
.community-comments-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(128, 128, 128, 0.18);
}

.community-video-heading h2,
.community-comments-header h2,
.community-archive-header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.community-video-embed {
  height: clamp(215px, 24vh, 330px);
  background: #000;
}

.community-video-embed iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.community-video-placeholder {
  min-height: clamp(215px, 24vh, 330px);
  padding: 34px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  text-align: left;
}

.community-play-symbol {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border: 1px solid rgba(128, 128, 128, 0.34);
  border-radius: 50%;
  font-size: 1.4rem;
}

.community-video-placeholder strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.community-video-placeholder p {
  max-width: 540px;
  margin: 0;
  line-height: 1.6;
  opacity: 0.7;
}

.community-workspace {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(245px, 300px) minmax(0, 1fr);
  gap: 24px;
  transition: grid-template-columns 180ms ease;
}

.community-workspace.is-archive-collapsed {
  grid-template-columns: 74px minmax(0, 1fr);
}

.community-archive,
.community-comments {
  overflow: hidden;
  border: 1px solid rgba(128, 128, 128, 0.22);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.035);
}

.community-archive {
  min-height: 430px;
}

.community-archive-header {
  min-height: 76px;
  padding: 17px 15px 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(128, 128, 128, 0.18);
}

.community-archive-toggle {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(128, 128, 128, 0.28);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 1.5rem;
}

.community-archive-body {
  padding: 22px;
}

.community-archive-empty {
  min-height: 240px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  text-align: center;
  opacity: 0.68;
}

.community-archive-empty span {
  font-size: 2rem;
}

.community-archive-empty p {
  margin: 0;
  line-height: 1.55;
}

.is-archive-collapsed .community-archive-heading-text,
.is-archive-collapsed .community-archive-body {
  display: none;
}

.is-archive-collapsed .community-archive-header {
  padding-inline: 17px;
  justify-content: center;
}

.community-comments {
  min-height: 430px;
}

.community-comment-list {
  min-height: 230px;
  padding: 26px;
}

.community-comments-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  text-align: center;
}

.community-comments-empty > span {
  font-size: 2rem;
}

.community-comments-empty strong {
  font-size: 1.05rem;
}

.community-comments-empty p {
  max-width: 520px;
  margin: 0;
  line-height: 1.6;
  opacity: 0.68;
}

.community-comment-composer {
  padding: 20px 24px 24px;
  border-top: 1px solid rgba(128, 128, 128, 0.18);
}

.community-comment-actions {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.community-comment-actions small {
  opacity: 0.66;
}

.profile-shell {
  width: min(980px, calc(100% - 32px));
  margin: 54px auto 90px;
}

.profile-heading {
  max-width: 690px;
  margin-bottom: 30px;
}

.profile-heading h1 {
  margin: 0 0 12px;
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  line-height: 1;
}

.profile-heading p {
  margin: 0;
  line-height: 1.65;
  opacity: 0.72;
}

.profile-card {
  padding: clamp(24px, 4vw, 42px);
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: clamp(26px, 5vw, 54px);
  border: 1px solid rgba(128, 128, 128, 0.22);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 22px 65px rgba(0, 0, 0, 0.1);
}

.profile-photo-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.profile-photo-preview {
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 50%;
  background: rgba(128, 128, 128, 0.12);
  background-position: center;
  background-size: cover;
  font-size: 2.7rem;
  font-weight: 700;
}

.profile-photo-preview.has-photo {
  color: transparent;
}

.profile-photo-input {
  max-width: 180px;
  display: grid;
  gap: 8px;
  text-align: center;
}

.profile-photo-input input {
  max-width: 100%;
  font-size: 0.8rem;
}

.profile-fields {
  min-width: 0;
  display: grid;
  gap: 22px;
}

.profile-fields label {
  display: grid;
  gap: 8px;
}

.profile-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.profile-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
}

.profile-local-note {
  margin: 0;
  max-width: 460px;
  font-size: 0.88rem;
  line-height: 1.55;
  opacity: 0.64;
}

@media (max-width: 820px) {
  .home-page .landing-module-grid {
    grid-template-columns: minmax(250px, 390px);
  }

  .home-access-panel,
  .profile-card {
    grid-template-columns: 1fr;
  }

  .home-access-form,
  .profile-field-grid {
    grid-template-columns: 1fr;
  }

  .community-page-heading {
    align-items: start;
    flex-direction: column;
  }

  .community-page-heading p {
    text-align: left;
  }

  .community-workspace,
  .community-workspace.is-archive-collapsed {
    grid-template-columns: 1fr;
  }

  .community-workspace.is-archive-collapsed .community-archive {
    min-height: 76px;
  }

  .community-video-placeholder {
    align-items: center;
    flex-direction: column;
    text-align: center;
  }

  .profile-photo-column {
    border-bottom: 1px solid rgba(128, 128, 128, 0.18);
    padding-bottom: 26px;
  }
}

@media (max-width: 560px) {
  .community-shell,
  .profile-shell {
    width: min(100% - 20px, 1180px);
  }

  .community-comment-actions,
  .profile-form-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .community-comment-actions button,
  .profile-form-footer button {
    width: 100%;
  }

  .floating-profile-button {
    width: 52px;
    height: 52px;
  }

  .floating-profile-avatar {
    width: 42px;
    height: 42px;
  }
}


/* PraiseCast Identity Modal */

.home-identity-actions {
  width: min(100%, 860px);
  margin: 30px auto 0;
  display: flex;
  justify-content: center;
}

.home-identity-open {
  min-width: 210px;
}

body.identity-modal-open {
  overflow: hidden;
}

.identity-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 22px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.identity-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.identity-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 10, 0.55);
  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
}

.identity-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  padding: clamp(26px, 5vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 25px;
  background:
    linear-gradient(
      145deg,
      rgba(38, 38, 40, 0.98),
      rgba(18, 18, 20, 0.98)
    );
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.44);
  transform: translateY(14px) scale(0.985);
  transition: transform 180ms ease;
}

.identity-modal.is-open .identity-modal-dialog {
  transform: translateY(0) scale(1);
}

.identity-modal-close {
  position: absolute;
  top: 15px;
  right: 16px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 1.35rem;
}

.identity-modal-copy {
  padding-right: 36px;
}

.identity-modal-copy h2 {
  margin: 0 0 12px;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
}

.identity-modal-copy p {
  margin: 0;
  line-height: 1.65;
  opacity: 0.72;
}

.identity-modal-form {
  margin-top: 28px;
  display: grid;
  gap: 18px;
}

.identity-modal-form label {
  display: grid;
  gap: 8px;
}

.identity-modal-submit {
  width: 100%;
  margin-top: 2px;
}

@media (max-width: 560px) {
  .identity-modal {
    align-items: end;
    padding: 10px;
  }

  .identity-modal-dialog {
    width: 100%;
    border-radius: 24px 24px 16px 16px;
  }
}



/* Identity Modal Readability Fix */

.identity-modal-dialog {
  width: min(100%, 560px);
}

.identity-modal-copy h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.identity-modal-copy p {
  font-size: 1.05rem;
  line-height: 1.7;
  opacity: 0.82;
}

.identity-modal-form label > span {
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: 0.005em;
}

.identity-modal-form .form-control {
  min-height: 50px;
  padding: 13px 15px;
  font-size: 1rem;
  line-height: 1.3;
}

.identity-modal-submit {
  min-height: 50px;
  font-size: 1rem;
  font-weight: 700;
}

.identity-modal-close {
  font-family: Arial, sans-serif;
}



/* Password Authentication UI */

.auth-modal-dialog {
  width: min(100%, 570px);
}

.auth-tabs {
  margin-top: 28px;
  padding: 5px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.auth-tab {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  opacity: 0.64;
  transition:
    background 160ms ease,
    opacity 160ms ease;
}

.auth-tab.is-active {
  background: rgba(255, 255, 255, 0.12);
  opacity: 1;
}

.auth-panel[hidden] {
  display: none !important;
}

.auth-status {
  min-height: 22px;
  margin: 18px 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.auth-status.is-error,
.profile-save-status.is-error {
  color: #ff9b9b;
}

.auth-status.is-success,
.profile-save-status.is-success {
  color: #a9dfb4;
}

.profile-loading {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
}

.profile-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(128, 128, 128, 0.24);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: profile-spin 720ms linear infinite;
}

@keyframes profile-spin {
  to {
    transform: rotate(360deg);
  }
}

.profile-photo-control {
  position: relative;
}

.profile-photo-button {
  padding: 0;
  display: block;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.profile-photo-preview {
  width: 156px;
  height: 156px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(128, 128, 128, 0.34);
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 32% 26%,
      rgba(255, 255, 255, 0.16),
      rgba(128, 128, 128, 0.08)
    );
  background-position: center;
  background-size: cover;
  box-shadow:
    0 15px 44px rgba(0, 0, 0, 0.18),
    inset 0 0 0 7px rgba(255, 255, 255, 0.035);
  font-family: Arial, sans-serif;
  font-size: 3rem;
  font-weight: 300;
  line-height: 1;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.profile-photo-button:hover .profile-photo-preview {
  transform: translateY(-2px);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.24),
    inset 0 0 0 7px rgba(255, 255, 255, 0.05);
}

.profile-photo-preview.has-photo {
  color: transparent;
}

.profile-photo-hint {
  max-width: 190px;
  margin: 0;
  text-align: center;
  font-size: 0.84rem;
  line-height: 1.5;
  opacity: 0.62;
}

.profile-photo-action-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  z-index: 50;
  width: 220px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  background: rgba(27, 27, 29, 0.98);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.34);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.profile-photo-action-menu[hidden] {
  display: none !important;
}

.profile-photo-action-menu button {
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-size: 0.9rem;
}

.profile-photo-action-menu button:hover {
  background: rgba(255, 255, 255, 0.09);
}

.profile-photo-action-menu .profile-photo-remove {
  color: #ffabab;
}

.profile-form-footer {
  padding-top: 5px;
}

.profile-logout-button {
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid rgba(255, 126, 126, 0.32);
  border-radius: 12px;
  background: rgba(255, 80, 80, 0.055);
  color: #ffb2b2;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
}

.profile-logout-button:hover {
  background: rgba(255, 80, 80, 0.1);
}

.profile-photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.profile-photo-viewer.is-open {
  opacity: 1;
  pointer-events: auto;
}

.profile-photo-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 7, 0.72);
  backdrop-filter: blur(14px);
}

.profile-photo-viewer-dialog {
  position: relative;
  z-index: 1;
  width: min(86vw, 620px);
  max-height: 86vh;
  display: grid;
  place-items: center;
}

.profile-photo-viewer-dialog img {
  max-width: 100%;
  max-height: 82vh;
  display: block;
  border-radius: 22px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
}

.profile-photo-viewer-close {
  position: absolute;
  top: -17px;
  right: -17px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(20, 20, 22, 0.94);
  color: white;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 1.4rem;
}

@media (max-width: 560px) {
  .auth-modal-dialog {
    max-height: calc(100vh - 20px);
    overflow-y: auto;
  }

  .profile-photo-action-menu {
    width: min(250px, calc(100vw - 38px));
  }
}



/* Community Interaction UI */

/* Brighter, more readable authentication modal */
.identity-modal-copy,
.identity-modal-form,
.auth-tabs {
  color: #f2f8ff;
}

.identity-modal-copy p {
  color: #dceeff;
  opacity: 0.96;
}

.identity-modal-form label > span {
  color: #eaf5ff;
  font-weight: 700;
}

.auth-tab {
  color: #d5ecff;
  opacity: 0.88;
}

.auth-tab.is-active {
  color: #ffffff;
  background: rgba(151, 207, 255, 0.17);
  box-shadow: inset 0 0 0 1px rgba(190, 225, 255, 0.13);
}

.identity-modal-form .form-control {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.095);
  border-color: rgba(195, 225, 255, 0.23);
}

.identity-modal-form .form-control::placeholder {
  color: rgba(222, 239, 255, 0.64);
}

.community-heading-actions {
  max-width: 480px;
  display: grid;
  justify-items: end;
  gap: 14px;
}

.community-heading-actions p {
  margin: 0;
  text-align: right;
  line-height: 1.65;
  opacity: 0.74;
}

.community-admin-add {
  min-width: 130px;
}

.community-video-summary {
  max-width: 780px;
  margin: 10px 0 0;
  line-height: 1.6;
  opacity: 0.74;
}

.community-archive-list {
  padding: 12px;
  display: grid;
  gap: 8px;
}

.community-archive-empty-message {
  margin: 18px 8px;
  line-height: 1.55;
  text-align: center;
  opacity: 0.62;
}

.community-archive-item {
  width: 100%;
  padding: 13px 14px;
  display: grid;
  gap: 5px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.community-archive-item:hover {
  background: rgba(255, 255, 255, 0.055);
}

.community-archive-item.is-active {
  border-color: rgba(151, 207, 255, 0.25);
  background: rgba(151, 207, 255, 0.09);
}

.community-archive-item strong {
  line-height: 1.35;
}

.community-archive-item span,
.community-archive-item small {
  font-size: 0.78rem;
  opacity: 0.62;
}

.community-comment-list {
  display: grid;
  gap: 14px;
}

.community-comment-card {
  padding: 18px;
  border: 1px solid rgba(128, 128, 128, 0.18);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.035);
}

.community-comment-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.community-comment-author {
  padding: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.community-comment-author > span:last-child {
  display: grid;
  gap: 3px;
}

.community-comment-author time {
  font-size: 0.76rem;
  opacity: 0.58;
}

.community-comment-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(151, 207, 255, 0.14);
  background-position: center;
  background-size: cover;
  font-weight: 700;
}

.community-comment-avatar.has-photo {
  color: transparent;
}

.community-comment-body {
  margin: 15px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
}

.community-comment-card footer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.community-like-button,
.community-comment-delete {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(128, 128, 128, 0.2);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.community-like-button.is-liked {
  color: #ff9ca8;
  border-color: rgba(255, 125, 145, 0.3);
  background: rgba(255, 100, 125, 0.08);
}

.community-comment-delete {
  margin-left: auto;
  color: #ffaaaa;
}

.community-comment-status,
.community-admin-status {
  min-height: 21px;
  margin: 12px 0 0;
  font-size: 0.88rem;
}

.community-comment-status.is-error,
.community-admin-status.is-error {
  color: #ffaaaa;
}

.community-comment-status.is-success,
.community-admin-status.is-success {
  color: #b5e8be;
}

.community-modal {
  position: fixed;
  inset: 0;
  z-index: 4200;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.community-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.community-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 10, 0.66);
  backdrop-filter: blur(13px);
}

.community-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  max-height: calc(100vh - 38px);
  overflow-y: auto;
  padding: clamp(25px, 4vw, 40px);
  border: 1px solid rgba(191, 222, 250, 0.17);
  border-radius: 24px;
  background: rgba(25, 28, 33, 0.98);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.46);
  transform: translateY(12px);
  transition: transform 180ms ease;
}

.community-modal.is-open .community-modal-dialog {
  transform: translateY(0);
}

.community-modal-close {
  position: absolute;
  top: 14px;
  right: 15px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: transparent;
  color: white;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 1.35rem;
}

.community-admin-form {
  margin-top: 24px;
  display: grid;
  gap: 18px;
}

.community-admin-form label {
  display: grid;
  gap: 8px;
}

.community-admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.public-profile-dialog {
  width: min(100%, 430px);
  text-align: center;
}

.public-profile-photo {
  width: 116px;
  height: 116px;
  margin: 3px auto 20px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(190, 225, 255, 0.2);
  border-radius: 50%;
  background: rgba(151, 207, 255, 0.12);
  background-position: center;
  background-size: cover;
  font-size: 2.2rem;
  font-weight: 700;
}

.public-profile-photo.has-photo {
  color: transparent;
}

.public-profile-dialog h2 {
  margin: 0 0 24px;
}

.public-profile-details {
  display: grid;
  gap: 12px;
  text-align: left;
}

.public-profile-details > div {
  padding: 13px 15px;
  border: 1px solid rgba(128, 128, 128, 0.16);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
}

.public-profile-details dt {
  margin-bottom: 5px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.56;
}

.public-profile-details dd {
  margin: 0;
  line-height: 1.55;
  white-space: pre-wrap;
}

@media (max-width: 720px) {
  .community-page-heading,
  .community-heading-actions {
    align-items: start;
    justify-items: start;
  }

  .community-heading-actions p {
    text-align: left;
  }

  .community-admin-grid {
    grid-template-columns: 1fr;
  }

  .community-modal {
    align-items: end;
    padding: 9px;
  }

  .community-modal-dialog {
    width: 100%;
    border-radius: 23px 23px 14px 14px;
  }
}



/* Community media layout corrections */

.community-video-stage {
  padding: 0;
  overflow: hidden;
}

.community-video-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #050607;
}

.community-video-embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.community-video-embed iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.community-video-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 22px;
  padding: 30px;
  text-align: center;
  background:
    radial-gradient(
      circle at center,
      rgba(137, 191, 229, 0.11),
      transparent 52%
    ),
    #0b0d10;
  color: #f1f7fc;
}

.community-video-placeholder p {
  max-width: 560px;
  margin: 9px auto 0;
  color: #cbdde9;
  line-height: 1.65;
}

.community-play-symbol {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border: 1px solid rgba(199, 229, 250, 0.3);
  border-radius: 50%;
  background: rgba(199, 229, 250, 0.08);
  color: #ffffff;
  font-size: 1.65rem;
}

.community-video-placeholder[hidden],
.community-video-embed[hidden] {
  display: none !important;
}

.community-video-meta {
  padding: 24px clamp(22px, 3vw, 34px) 30px;
  border-top: 1px solid rgba(128, 128, 128, 0.15);
}

.community-video-meta h2 {
  margin: 7px 0 0;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  line-height: 1.2;
}

.community-video-date {
  display: block;
  margin-top: 8px;
  color: #58778d;
  font-size: 0.82rem;
  font-weight: 650;
}

.community-video-date[hidden],
.community-video-summary[hidden] {
  display: none !important;
}

.community-video-summary {
  max-width: 850px;
  margin: 17px 0 0;
  color: #364f61;
  font-size: 1rem;
  line-height: 1.72;
  opacity: 1;
}

.public-profile-dialog {
  color: #f5f9fd;
}

.public-profile-dialog h2 {
  color: #ffffff;
}

.public-profile-details > div {
  border-color: rgba(188, 220, 244, 0.22);
  background: rgba(195, 225, 247, 0.09);
}

.public-profile-details dt {
  color: #d9effd;
  opacity: 1;
}

.public-profile-details dd {
  color: #ffffff;
  opacity: 1;
}

.public-profile-photo {
  border-color: rgba(205, 232, 250, 0.35);
  background: rgba(170, 215, 246, 0.18);
  color: #ffffff;
}

.community-archive-item span {
  opacity: 0.74;
}

.community-archive-item small {
  color: #52748c;
  font-weight: 700;
  opacity: 1;
}

@media (max-width: 720px) {
  .community-video-player {
    aspect-ratio: 16 / 9;
  }

  .community-video-meta {
    padding: 20px;
  }
}



/* Community final readability and UTF-8 safe UI */

.profile-loading {
  min-height: 0;
  padding: 16px 0;
  grid-auto-flow: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.profile-loading[hidden] {
  display: none !important;
}

.profile-loading-spinner {
  width: 22px;
  height: 22px;
  border-width: 2px;
}

.profile-loading p {
  margin: 0;
  font-size: 0.86rem;
}

.community-video-stage {
  width: min(100%, 920px);
  margin-inline: auto;
}

.community-comments,
.community-comment-card,
.community-comment-composer {
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.community-comment-body {
  color: #202b34;
  font-size: 1.01rem;
  font-weight: 440;
  letter-spacing: -0.012em;
  line-height: 1.68;
}

.community-comment-card footer {
  gap: 9px;
}

.community-like-button,
.community-comment-report,
.community-comment-delete {
  min-height: 36px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(56, 78, 94, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  color: #334b5d;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  opacity: 1;
}

.community-like-button:hover,
.community-comment-report:hover {
  border-color: rgba(58, 112, 150, 0.36);
  background: rgba(208, 231, 247, 0.43);
}

.community-like-button.is-liked {
  border-color: rgba(211, 71, 100, 0.34);
  background: rgba(255, 207, 216, 0.38);
  color: #bd3452;
}

.community-like-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
}

.community-like-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.community-like-button.is-liked svg {
  fill: currentColor;
}

.community-comment-delete {
  margin-left: auto;
  border-color: rgba(194, 53, 67, 0.34);
  background: rgba(255, 225, 228, 0.58);
  color: #ae2838;
}

.community-comment-delete:hover {
  border-color: rgba(194, 53, 67, 0.5);
  background: rgba(255, 209, 214, 0.72);
}

.community-comment-report {
  color: #536a7a;
}

.community-report-dialog {
  width: min(100%, 450px);
  text-align: center;
  color: #f5faff;
}

.community-report-dialog h2 {
  margin: 17px 0 8px;
  color: #ffffff;
}

.community-report-dialog p {
  margin: 0 0 24px;
  color: #d9edfa;
  font-size: 1rem;
  line-height: 1.65;
}

.community-report-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(126, 209, 151, 0.15);
  color: #a9e8bb;
}

.public-profile-dialog {
  color: #ffffff;
}

.public-profile-details dt {
  color: #d8efff;
  font-weight: 750;
}

.public-profile-details dd {
  color: #ffffff;
  font-size: 0.98rem;
}

@media (max-width: 720px) {
  .community-video-stage {
    width: 100%;
  }

  .community-comment-card footer {
    flex-wrap: wrap;
  }

  .community-comment-delete {
    margin-left: 0;
  }
}



/* Community profile and navigation corrections */

.community-nav-link-hidden {
  display: none !important;
}

.community-archive-toggle {
  display: none !important;
}

.community-workspace.is-archive-collapsed {
  grid-template-columns:
    minmax(250px, var(--community-archive-width, 320px))
    minmax(0, 1fr) !important;
}

.community-workspace.is-archive-collapsed
.community-archive {
  width: auto !important;
  min-width: 0 !important;
  overflow: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}

/* High-contrast logout button */

.profile-logout-button {
  border-color: #a52d40 !important;
  background: #a52d40 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em;
  opacity: 1 !important;
  box-shadow:
    0 8px 22px rgba(165, 45, 64, 0.2);
}

.profile-logout-button:hover {
  border-color: #872235 !important;
  background: #872235 !important;
  color: #ffffff !important;
}

.profile-logout-button:focus-visible {
  outline: 3px solid rgba(165, 45, 64, 0.28);
  outline-offset: 3px;
}

/* Fit the entire profile photo inside the public modal */

.public-profile-photo {
  background-size: contain !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-color: rgba(170, 215, 246, 0.14);
}

.public-profile-photo.has-photo {
  box-shadow:
    inset 0 0 0 1px rgba(205, 232, 250, 0.25),
    0 14px 38px rgba(0, 0, 0, 0.22);
}

/* UTF-8-independent SVG close icon */

#publicProfileClose {
  color: #ffffff;
}

#publicProfileClose svg {
  width: 19px;
  height: 19px;
  display: block;
  pointer-events: none;
}

/* Ensure report modal can become visible */

.community-report-modal[hidden] {
  display: none !important;
}

.community-report-modal.is-open {
  display: grid;
  opacity: 1;
  pointer-events: auto;
}



/* PraiseCast theme and subtle profile actions */

/* Crop rectangular photos naturally inside the circular frame. */

.public-profile-photo {
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  border-radius: 50% !important;
}

/* A smaller and more modest logout action. */

.profile-logout-button {
  min-height: 40px !important;
  padding: 0 15px !important;
  border: 1px solid rgba(158, 54, 72, 0.3) !important;
  border-radius: 10px !important;
  background: rgba(158, 54, 72, 0.07) !important;
  color: #96374a !important;
  box-shadow: none !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
}

.profile-logout-button:hover {
  border-color: rgba(158, 54, 72, 0.45) !important;
  background: rgba(158, 54, 72, 0.12) !important;
  color: #842f40 !important;
}

.profile-logout-button:focus-visible {
  outline: 3px solid rgba(158, 54, 72, 0.18);
  outline-offset: 3px;
}

/* Global sun and moon toggle. */

.theme-toggle {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 5000;
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(62, 83, 99, 0.19);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  color: #385162;
  box-shadow: 0 9px 28px rgba(30, 48, 61, 0.14);
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition:
    transform 150ms ease,
    background 150ms ease,
    border-color 150ms ease;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(62, 83, 99, 0.32);
  background: rgba(255, 255, 255, 0.95);
}

.theme-toggle:focus-visible {
  outline: 3px solid rgba(89, 154, 199, 0.25);
  outline-offset: 3px;
}

.theme-icon,
.theme-icon svg {
  width: 21px;
  height: 21px;
  display: block;
}

.theme-icon[hidden] {
  display: none !important;
}

/* Dark theme */

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background: #0c1117 !important;
  color: #eaf2f8 !important;
}

html[data-theme="dark"] .landing-shell,
html[data-theme="dark"] .community-shell,
html[data-theme="dark"] .profile-shell {
  color: #eaf2f8;
}

html[data-theme="dark"] .landing-module-card,
html[data-theme="dark"] .community-video-stage,
html[data-theme="dark"] .community-archive,
html[data-theme="dark"] .community-comments,
html[data-theme="dark"] .community-comment-card,
html[data-theme="dark"] .community-comment-composer,
html[data-theme="dark"] .profile-card {
  border-color: rgba(191, 220, 239, 0.14) !important;
  background: #151c24 !important;
  color: #edf5fa !important;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.23);
}

html[data-theme="dark"] .community-comment-card {
  background: #18212a !important;
}

html[data-theme="dark"] .community-comment-body {
  color: #e8f0f5 !important;
}

html[data-theme="dark"] .community-video-meta {
  border-color: rgba(191, 220, 239, 0.13);
}

html[data-theme="dark"] .community-video-summary {
  color: #c3d3de !important;
}

html[data-theme="dark"] .community-video-date,
html[data-theme="dark"] .community-archive-item span,
html[data-theme="dark"] .community-archive-item small {
  color: #9eb4c3 !important;
}

html[data-theme="dark"] .community-archive-item:hover {
  background: rgba(189, 222, 244, 0.06);
}

html[data-theme="dark"] .community-archive-item.is-active {
  border-color: rgba(143, 201, 238, 0.27);
  background: rgba(120, 186, 229, 0.1);
}

html[data-theme="dark"] .form-control {
  border-color: rgba(190, 220, 240, 0.18) !important;
  background: rgba(255, 255, 255, 0.065) !important;
  color: #f4f8fb !important;
}

html[data-theme="dark"] .form-control::placeholder {
  color: rgba(208, 226, 238, 0.53) !important;
}

html[data-theme="dark"] .community-like-button,
html[data-theme="dark"] .community-comment-report {
  border-color: rgba(190, 220, 240, 0.17);
  background: rgba(255, 255, 255, 0.055);
  color: #c9dbe7;
}

html[data-theme="dark"] .community-comment-delete {
  border-color: rgba(255, 130, 145, 0.25);
  background: rgba(197, 56, 76, 0.1);
  color: #ffabb7;
}

html[data-theme="dark"] .profile-logout-button {
  border-color: rgba(255, 138, 154, 0.24) !important;
  background: rgba(190, 52, 73, 0.1) !important;
  color: #ffabb8 !important;
}

html[data-theme="dark"] .public-profile-details > div {
  border-color: rgba(190, 220, 240, 0.16);
  background: rgba(255, 255, 255, 0.055);
}

html[data-theme="dark"] .public-profile-details dt {
  color: #bcd9eb;
}

html[data-theme="dark"] .public-profile-details dd {
  color: #f4f8fb;
}

html[data-theme="dark"] .theme-toggle {
  border-color: rgba(190, 220, 240, 0.17);
  background: rgba(25, 34, 43, 0.88);
  color: #f5ca6c;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.31);
}

html[data-theme="dark"] .theme-toggle:hover {
  background: rgba(35, 46, 57, 0.98);
}

@media (max-width: 600px) {
  .theme-toggle {
    left: 12px;
    bottom: 12px;
    width: 41px;
    height: 41px;
  }
}



/* Community session and moderator management */

.community-management-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.community-management-toolbar[hidden],
.community-management-button[hidden] {
  display: none !important;
}

.community-management-button {
  min-height: 39px;
  padding: 0 14px;
  border-radius: 10px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.community-management-danger {
  border: 1px solid rgba(180, 53, 71, 0.28);
  background: rgba(180, 53, 71, 0.07);
  color: #a72c40;
}

.community-management-danger:hover {
  border-color: rgba(180, 53, 71, 0.43);
  background: rgba(180, 53, 71, 0.12);
}

.community-session-status-field {
  max-width: 280px;
}

.community-archive-item {
  position: relative;
}

.community-archive-status {
  width: max-content;
  margin-top: 3px;
  padding: 4px 8px;
  border: 1px solid rgba(190, 137, 35, 0.25);
  border-radius: 999px;
  background: rgba(239, 190, 78, 0.1);
  color: #8b6512;
  font-size: 0.69rem !important;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 1 !important;
}

.community-moderator-dialog {
  width: min(100%, 640px);
  color: #f4f9fd;
}

.community-moderator-description {
  max-width: 540px;
  margin: 8px 0 0;
  color: #d5e9f5;
  line-height: 1.65;
}

.community-moderator-form {
  margin-top: 25px;
}

.community-moderator-form label {
  display: grid;
  gap: 9px;
}

.community-moderator-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.community-moderator-section {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid rgba(190, 220, 240, 0.14);
}

.community-moderator-section h3 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 1rem;
}

.community-moderator-list {
  display: grid;
  gap: 10px;
}

.community-moderator-card {
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border: 1px solid rgba(190, 220, 240, 0.14);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
}

.community-moderator-card > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.community-moderator-card strong {
  color: #ffffff;
}

.community-moderator-card span {
  overflow: hidden;
  color: #c5dce9;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-moderator-remove {
  min-height: 34px;
  padding: 0 11px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 137, 151, 0.25);
  border-radius: 9px;
  background: rgba(191, 52, 72, 0.09);
  color: #ffabb7;
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 750;
}

.community-moderator-empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed rgba(190, 220, 240, 0.16);
  border-radius: 13px;
  color: #b9cfdd;
  text-align: center;
}

html[data-theme="dark"]
.community-management-danger {
  border-color: rgba(255, 132, 148, 0.24);
  background: rgba(193, 49, 70, 0.1);
  color: #ffabb8;
}

html[data-theme="dark"]
.community-archive-status {
  border-color: rgba(244, 193, 77, 0.25);
  background: rgba(244, 193, 77, 0.1);
  color: #f3cd73;
}

@media (max-width: 720px) {
  .community-management-toolbar {
    justify-content: flex-start;
  }

  .community-moderator-add-row {
    grid-template-columns: 1fr;
  }

  .community-moderator-card {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* Unauthenticated floating login icon */

.floating-profile-avatar.is-login-icon {
  display: grid;
  place-items: center;
}

.floating-profile-avatar.is-login-icon svg {
  width: 25px;
  height: 25px;
  overflow: visible;
  transition: transform 160ms ease;
}

.floating-profile-button:hover
.floating-profile-avatar.is-login-icon svg {
  transform: translateX(1px);
}
