: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); }


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

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

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

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

.premium-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);
}

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

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

@media (max-width: 720px) {
  .premium-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%; }
}
