/* maranatha.com: application UI (church dashboard, admin) and shared components. Loads after main.css. No inline styles anywhere (CSP). */

/* ---------- App shell ---------- */
body.app { background: #F7F4FB; }
.app-top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 6px 18px; background: var(--white); border-bottom: 1px solid var(--line); }
.app-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-height: 44px; margin-right: auto; min-width: 0; }
.app-brand:hover { color: var(--ink); }
.app-brand .logo-mark svg { width: 30px; height: 34px; }
.app-brand .logo-word { display: none; }
.app-brand-sub { font: 600 1.05rem var(--font-head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
.app-top-actions { display: flex; align-items: center; gap: 6px; }
.app-menu-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 2px solid var(--ink); border-radius: 999px; background: none; font: 600 .95rem var(--font-body); color: var(--ink); cursor: pointer; }
.app-body { display: block; }
.app-side { display: none; background: var(--white); border-bottom: 1px solid var(--line); padding: 10px 14px 16px; }
.app-side.open { display: block; }
.app-main { padding: 22px 16px 64px; min-width: 0; }
/* minmax(0, 1fr): without it a wide table inside a form stretches the whole page sideways on a phone instead of scrolling in its own box. */
.app-content { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.app-hide-sm { display: none; }
@media (min-width: 700px) { .app-hide-sm { display: inline-flex; } }
@media (min-width: 960px) {
  .app-menu-btn { display: none; }
  .app-body { display: grid; grid-template-columns: 252px 1fr; align-items: start; min-height: calc(100vh - 60px); }
  .app-side { display: block; position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; border-bottom: 0; border-right: 1px solid var(--line); padding: 14px 12px 28px; }
  .app-main { padding: 30px 34px 80px; }
}
.dash-nav { background: none; border: 0; padding: 0; border-radius: 0; }
.dash-nav ul { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; flex-wrap: nowrap; gap: 1px; }
.dash-nav-title { margin: 14px 12px 4px; font: 700 .72rem var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.dash-nav a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 7px 12px; border-radius: 10px; text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--ink); }
.dash-nav a span:first-of-type { flex: 1; }
.dash-nav a:hover { background: var(--sky); color: var(--violet); }
.dash-nav a[aria-current="page"] { background: var(--sky); color: var(--violet); font-weight: 600; }
.dash-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--coral); color: var(--white); font: 700 .75rem var(--font-body); }
.dash.container { display: block; padding: 0; max-width: none; }
.alert-warn { border-color: var(--dawn-deep); background: #FFF6E5; color: #5E3A05; }

/* ---------- Page structure ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; }
.page-head h1 { margin: 0; font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.page-head p { margin: 4px 0 0; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.split { display: grid; gap: 22px; }
@media (min-width: 1100px) { .split { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } .split-wide { grid-template-columns: minmax(0, 1fr) 420px; } }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; box-shadow: var(--shadow); min-width: 0; }
.panel > h2, .panel > h3:first-child { font-size: 1.2rem; margin-bottom: .7em; }
.panel-flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 1.1rem; }
.panel-pad { padding: 18px 22px; }
.stack-sm > * + * { margin-top: .6rem; }
.stack-lg > * + * { margin-top: 1.6rem; }
.gap-0 { gap: 0; }
.muted-box { background: var(--sky); border-radius: 14px; padding: 12px 16px; }
.hidden { display: none !important; }
.w-auto { width: auto; }
.text-right { text-align: right; }
.fw-600 { font-weight: 600; }
.ink-soft { color: var(--ink-soft); }
.rose { color: var(--rose-deep); }
.sage { color: var(--sage-deep); }
.max-sm { max-width: 520px; }
.max-md { max-width: 720px; }
.mt-0 { margin-top: 0; } .mt-5 { margin-top: 48px; }
.mb-4 { margin-bottom: 32px; }

/* ---------- Stats ---------- */
.stat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.stat-card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; text-decoration: none; color: inherit; display: block; box-shadow: var(--shadow); }
a.stat-card:hover { border-color: #CDBDEE; color: inherit; transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.stat-card .label { font-size: .8125rem; font-weight: 600; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; }
.stat-card .value { font: 700 1.9rem/1.15 var(--font-head); letter-spacing: -.02em; margin-top: 4px; }
.stat-card .sub { font-size: .8125rem; color: var(--ink-soft); }
.delta-up { color: var(--sage-deep); font-weight: 600; } .delta-down { color: var(--rose-deep); font-weight: 600; }

/* ---------- Tables and lists ---------- */
.table-wrap { background: var(--white); }
.table td, .table th { font-size: .92rem; }
.table tbody tr:hover { background: #FBF9FF; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .cell-main { font-weight: 600; }
.table a.row-link { text-decoration: none; color: var(--ink); font-weight: 600; }
.table a.row-link:hover { color: var(--violet); text-decoration: underline; }
.table .actions { white-space: nowrap; text-align: right; }
.table .actions form { display: inline; }
.table-compact td, .table-compact th { padding: 8px 12px; }
.table-plain { min-width: 0; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-rows > li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list-rows > li:last-child { border-bottom: 0; }
.list-rows .grow { flex: 1; min-width: 0; }
.empty { text-align: center; padding: 36px 20px; color: var(--ink-soft); }
.empty .icon { color: var(--violet); opacity: .7; margin-bottom: 8px; }
.empty h3 { font-size: 1.2rem; color: var(--ink); margin-bottom: .3em; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: .92rem; }

/* ---------- Filters, tabs, chips ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 0; }
.filter-bar .field { gap: 4px; }
.filter-bar .field label { font-size: .8125rem; color: var(--ink-soft); }
.filter-bar input, .filter-bar select { min-height: 42px; padding: 8px 12px; border-radius: 12px; width: auto; min-width: 140px; border-width: 1.5px; }
.filter-bar input[type=search] { min-width: 220px; }
/* A tick box in a filter bar stays a tick box (the rule above would turn it into a large empty square). */
.filter-bar .check { min-height: 42px; align-items: center; }
.filter-bar .check input[type=checkbox] { min-height: 0; min-width: 0; width: 22px; height: 22px; padding: 0; margin: 0; border-radius: 6px; }
/* An avatar next to a name in a table cell: keep them on one line, and let a long name wrap beside the avatar. */
.person-cell { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; min-width: 0; }
.person-cell > a, .person-cell > span:not(.avatar) { min-width: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; min-height: 44px; text-decoration: none; color: var(--ink-soft); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--violet); }
.tabs a[aria-current="page"] { color: var(--violet); border-bottom-color: var(--violet); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; background: var(--sky); font-size: .8125rem; font-weight: 600; color: var(--ink); text-decoration: none; }
a.chip:hover { background: #E3D9FB; color: var(--violet); }
.chip-ok { background: #DCEBE2; color: #1F4A33; } .chip-warn { background: #FBE7C6; color: #6B3F05; } .chip-bad { background: #F6DAD7; color: #7A2A24; } .chip-info { background: #DDE8FA; color: #1E3A6B; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--grad-badge); color: var(--white); font: 700 .85rem var(--font-body); flex: none; text-transform: uppercase; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* ---------- Key/value, timeline ---------- */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.kv dt { color: var(--ink-soft); font-size: .875rem; } .kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 18px 20px; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--violet); border: 2px solid var(--white); }
.timeline .when { font-size: .8125rem; color: var(--ink-soft); }
.timeline .body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Meters and charts ---------- */
progress.meter { appearance: none; -webkit-appearance: none; width: 100%; height: 12px; border: 0; border-radius: 999px; background: var(--line); overflow: hidden; display: block; }
progress.meter::-webkit-progress-bar { background: var(--line); border-radius: 999px; }
progress.meter::-webkit-progress-value { background: linear-gradient(90deg, #5B2EA6, #E0457B, #FFC24B); border-radius: 999px; }
progress.meter::-moz-progress-bar { background: linear-gradient(90deg, #5B2EA6, #E0457B, #FFC24B); border-radius: 999px; }
.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--violet); } .chart .bar-alt { fill: var(--coral); } .chart .bar-soft { fill: #CDBDEE; }
.chart .axis { stroke: var(--line); stroke-width: 1; } .chart .grid-line { stroke: #EFEAF8; stroke-width: 1; }
.chart text { font: 500 11px var(--font-body); fill: var(--ink-soft); }
.chart .line { fill: none; stroke: var(--violet); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: rgba(91, 46, 166, .1); }
.chart .dot { fill: var(--violet); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .8125rem; color: var(--ink-soft); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend .a { background: var(--violet); } .legend .b { background: var(--coral); } .legend .c { background: #CDBDEE; }

/* ---------- Forms in the app ---------- */
.form-grid { display: grid; gap: 16px 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); max-width: 900px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-section { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 8px; }
.form-section > h2, .form-section > h3 { font-size: 1.15rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
/* A long list of people to tick (volunteers, group members): scroll inside the form instead of making the page enormous. */
.pick-list { max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.check-grid { display: grid; gap: 4px 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.check-grid .check { min-height: 38px; align-items: center; }
.inline-select { display: inline-flex; gap: 8px; align-items: center; }
.inline-select select { width: auto; min-height: 40px; padding: 6px 10px; }
.btn-xs { min-height: 36px; padding: 4px 14px; font-size: .875rem; }
.btn-ghost { background: none; border: 2px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--violet); color: var(--violet); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; border: 0; background: none; color: var(--ink-soft); cursor: pointer; }
.icon-btn:hover { background: var(--sky); color: var(--violet); }
textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; }
.help-text { font-size: .875rem; color: var(--ink-soft); }
.checkin-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--white); min-height: 54px; }
.checkin-row:has(input:checked) { background: #EEF5F0; border-color: var(--sage); }
.checkin-row input { width: 24px; height: 24px; accent-color: var(--sage-deep); flex: none; }
.checkin-row label { flex: 1; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 10px; }

/* ---------- Setup checklist and onboarding ---------- */
.setup-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.setup-steps li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--white); }
.setup-steps li.done { background: #F2F8F4; border-color: #CBE0D2; }
.setup-steps li.done a { color: var(--sage-deep); text-decoration: none; }
.setup-steps .icon { color: var(--violet); } .setup-steps li.done .icon { color: var(--sage-deep); }
.setup-steps .grow { flex: 1; min-width: 0; }

/* ---------- Calendar (month grid) ---------- */
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; background: var(--white); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cal th { background: var(--sky); font-size: .78rem; padding: 8px 4px; text-transform: uppercase; letter-spacing: .06em; }
.cal td { vertical-align: top; height: 96px; padding: 4px 6px; border: 1px solid var(--line); font-size: .8125rem; }
.cal td.out { background: #FAF8FD; color: #A39DBE; }
.cal td.today { background: #FFF6E5; }
.cal .dnum { font-weight: 700; display: block; margin-bottom: 2px; }
.cal .ev { display: block; margin-bottom: 2px; padding: 1px 6px; border-radius: 6px; background: var(--sky); color: var(--ink); text-decoration: none; font-size: .75rem; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .ev:hover { background: #E3D9FB; }
@media (max-width: 700px) { .cal td { height: 64px; padding: 2px; } .cal .ev { font-size: .65rem; padding: 0 3px; } }

/* ---------- Pricing / marketing helpers ---------- */
.feature-cols { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.feature-cols .card h3 { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; }
.feature-cols .card h3 .icon { color: var(--violet); }
.feature-cols ul { padding-left: 1.1em; margin: .5em 0 0; color: var(--ink-soft); }
.compare { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.compare th, .compare td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.compare th { background: var(--sky); }
.compare td.yes { color: var(--sage-deep); font-weight: 700; }

@media print {
  .app-top, .app-side, .page-actions, .no-print { display: none !important; }
  .app-body { display: block; } .app-main { padding: 0; } body.app { background: #fff; }
  .panel { box-shadow: none; border: 0; padding: 0; }
}

/* ---------- Small utilities used across new views ---------- */
.grow { flex: 1 1 auto; min-width: 0; }
.cell-main { font-weight: 600; }
.muted-box { background: #FAF7FF; border: 1px solid var(--line); border-radius: 14px; }
.statement h1 { font-size: 1.6rem; }
.statement h2 { font-size: 1.2rem; margin-top: 1.2em; }
.notice { max-width: none; }
.table-compact td, .table-compact th { padding: 8px 12px; }

/* ---------- Template swatches (in the dashboard picker) ---------- */
.template-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.template-card { display: grid; gap: 6px; padding: 12px; border: 2px solid var(--line); border-radius: 16px; background: var(--white); cursor: pointer; align-content: start; }
.template-card:has(input:checked) { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(91, 46, 166, .18); }
.template-card input { position: absolute; opacity: 0; pointer-events: none; }
.template-card:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.template-swatch { display: grid; grid-template-rows: 46px 18px 18px; gap: 4px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); padding: 0 0 6px; background: #fff; }
.template-swatch i { display: block; border-radius: 3px; margin-inline: 8px; background: #E7E0F3; }
.template-swatch i:first-child { margin: 0; border-radius: 0; height: 100%; }
.swatch-dawn i:first-child { background: linear-gradient(180deg, #0F0B33, #5B2EA6 60%, #FF9A3D); }
.swatch-classic { background: #fff; } .swatch-classic i:first-child { background: #fff; border-bottom: 3px double #C9BFA9; }
.swatch-modern i:first-child { background: #D98E2B; } .swatch-modern i:nth-child(2) { background: #1B1744; width: 55%; }
.swatch-warm { background: #FBF3E6; } .swatch-warm i:first-child { background: #F3D9B8; margin: 6px 8px 0; border-radius: 12px; height: 40px; }
.swatch-minimal i:first-child { background: #fff; border-bottom: 1px solid #DDD; } .swatch-minimal i { background: #EEE; }


/* ---------- My Walk and Grow ---------- */
.walk-nav { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 64px; z-index: 30; }
.walk-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; }
.walk-nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 16px; text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: .95rem; border-bottom: 3px solid transparent; white-space: nowrap; }
.walk-nav a:hover { color: var(--violet); }
.walk-nav a[aria-current="page"] { color: var(--violet); border-bottom-color: var(--violet); }
.walk-section { padding-block: 32px 72px; }
.walk-head h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.walk-head .lead { margin-bottom: 0; }
.walk-card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 24px 26px; box-shadow: var(--shadow); min-width: 0; }
.walk-card h2 { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; }
.walk-card h2.h3 { font-size: 1.15rem; }
a.walk-card { text-decoration: none; color: inherit; display: block; }
a.walk-card:hover { border-color: #CDBDEE; box-shadow: var(--shadow-lift); color: inherit; }
.walk-streak, .freedom-big { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-width: 150px; padding: 14px 22px; border-radius: 20px; background: linear-gradient(135deg, #1B1257, #5B2EA6); color: var(--white); }
.walk-streak strong, .freedom-big strong { font: 600 2.8rem/1 var(--font-head); }
.walk-streak span, .freedom-big span { font-size: .85rem; opacity: .9; }
.freedom-big small { font-size: .78rem; opacity: .8; margin-top: 4px; }
.freedom-card .freedom-days strong { font: 600 2.2rem/1 var(--font-head); color: var(--violet); }
.freedom-card .freedom-days span { color: var(--ink-soft); font-size: .92rem; }
.how-list { padding-left: 1.2em; } .how-list li { margin-bottom: .55em; }
.privacy-card { background: #F2F8F4; border-color: #CBE0D2; }
.privacy-card h2 { color: var(--sage-deep); }
.prayer-item h2 a { text-decoration: none; color: var(--ink); } .prayer-item h2 a:hover { color: var(--violet); }
.prayer-item .answered { color: var(--sage-deep); font-weight: 600; margin: 0; }
.prayer-text { font-family: var(--font-head); font-size: 1.15rem; line-height: 1.7; margin: 0; }
.scripture-plain { font-family: var(--font-head); font-size: 1.25rem; line-height: 1.7; margin: 0; }
.walk-section .scripture { max-width: none; }

/* day strip */
.strip { list-style: none; display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; padding: 0; margin: 0 0 .6rem; }
.strip li { aspect-ratio: 1; min-width: 14px; border-radius: 8px; background: var(--line); }
.strip li.day-victory { background: var(--violet); } .strip li.day-tempted { background: #CDBDEE; } .strip li.day-slipped { background: var(--coral); }
.legend .a { background: var(--violet); } .legend .b { background: var(--coral); } .legend .c { background: #CDBDEE; }

/* emergency plan */
.sos { background: linear-gradient(180deg, #FFF3E6 0%, var(--paper) 40%); }
.sos h1 { color: var(--rose-deep); }
.sos-steps { list-style: none; counter-reset: sos; padding: 0; margin: 0; display: grid; gap: 14px; }
.sos-steps > li { counter-increment: sos; position: relative; background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px 20px 70px; box-shadow: var(--shadow); }
.sos-steps > li::before { content: counter(sos); position: absolute; left: 20px; top: 20px; width: 36px; height: 36px; border-radius: 50%; background: var(--grad-badge); color: var(--white); display: flex; align-items: center; justify-content: center; font: 600 1.1rem var(--font-head); }
.sos-steps h2 { font-size: 1.25rem; margin-bottom: .3em; }
.freedom-sos { border-color: #F2C6C0; background: #FFF8F7; }

/* plans */
.plan-days { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.plan-days li a { display: block; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); text-decoration: none; color: var(--ink); }
.plan-days li a:hover { border-color: #CDBDEE; }
.plan-days li.done a { background: #F2F8F4; border-color: #CBE0D2; }
.plan-days .n { font-weight: 700; margin-right: .5em; }
.step-card.done { background: #F2F8F4; border-color: #CBE0D2; }
.mark { border-left: 6px solid var(--gold); } .mark-rose { border-left-color: #E8708F; } .mark-sky { border-left-color: #6FA8E8; } .mark-sage { border-left-color: #6FB08A; }

/* verse highlights in the Bible reader */
.bible-text .verse.hl-gold { background: #FFE9B8; border-radius: 4px; } .bible-text .verse.hl-rose { background: #FBD5DF; border-radius: 4px; }
.bible-text .verse.hl-sky { background: #D6E7FA; border-radius: 4px; } .bible-text .verse.hl-sage { background: #D8EBDD; border-radius: 4px; }
.bible-text .verse.has-note::after { content: ' \270E'; font-size: .7em; color: var(--violet); }
.marks-panel { max-width: var(--measure); }

/* ---------- Service times editor ---------- */
.time-row { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 10px; max-width: 760px; }
.time-row > .field:first-child { flex: 0 0 11.5rem; }
.time-row .field { margin: 0; }
.time-row .time-remove { min-height: 44px; }
@media (max-width: 560px) { .time-row > .field:first-child { flex: 1 1 100%; } .time-row > .field.flex-1 { flex: 1 1 60%; } }

/* ---------- Profile photos ---------- */
.avatar { overflow: hidden; position: relative; }
.avatar.avatar-photo { background: var(--line); }
.avatar-xl { width: 96px; height: 96px; font-size: 1.8rem; }
.avatar-link { display: inline-flex; border-radius: 50%; position: relative; }
.avatar-link:hover .avatar, .avatar-link:focus-visible .avatar { box-shadow: 0 0 0 3px var(--violet); }
.photo-edit { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.photo-edit .field { margin: 0; }
.avatar-edit { position: absolute; right: -2px; bottom: -2px; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--white); color: var(--violet); border: 2px solid var(--line); box-shadow: var(--shadow); }
.avatar-link:hover .avatar-edit, .avatar-link:focus-visible .avatar-edit { background: var(--violet); color: var(--white); border-color: var(--violet); }
.service-times { margin-bottom: 1.4rem; }

/* ---------- Look picker: mini template previews and the live preview ---------- */
.look-grid { display: grid; gap: 22px; margin-bottom: 22px; }
@media (min-width: 1180px) { .look-grid { grid-template-columns: minmax(0, 1fr) 420px; align-items: start; } .look-preview { position: sticky; top: 84px; } }
.look-grid .template-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.template-card { transition: border-color .15s, box-shadow .15s, transform .15s; }
.template-card:hover { transform: translateY(-2px); }
.tpl-mini { display: flex; flex-direction: column; aspect-ratio: 16 / 11; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #FFFBF6; }
.tpl-mini i { display: block; font-style: normal; }
.tpl-mini b { display: block; border-radius: 3px; background: rgba(21, 15, 60, .16); }
.m-nav { display: flex; align-items: center; gap: 4px; padding: 0 6px; height: 15%; background: #fff; border-bottom: 1px solid #ECE8F5; }
.m-nav b { width: 13%; height: 3px; }
.m-nav b:first-child { width: 24%; height: 5px; background: var(--mini-accent); }
.m-hero { position: relative; flex: 1 1 0; padding: 0 9%; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.m-t1 { width: 64%; height: 8px; } .m-t2 { width: 42%; height: 4px; }
.tpl-mini .m-btn { width: 26%; height: 7px; border-radius: 99px; background: var(--mini-accent); margin-top: 3px; }
.m-cards { display: flex; gap: 4px; padding: 5px 6px 6px; height: 27%; }
.m-cards b { flex: 1; background: #fff; border: 1px solid #E4DFF0; border-radius: 3px; }
.mini-dawn .m-hero { background: linear-gradient(180deg, #150F3C, #4B2A9A 68%, #C9843F); }
.mini-dawn .m-t1, .mini-dawn .m-t2 { background: #fff; }
.mini-classic { background: #FBF9F4; }
.mini-classic .m-hero { align-items: center; background: #FBF9F4; border-bottom: 3px double #D6CBB0; }
.mini-classic .m-t1 { background: #2A2250; } .mini-classic .m-t2 { background: #8A84A8; }
.mini-classic .m-btn { border-radius: 2px; }
.mini-modern .m-hero { background: var(--mini-accent); }
.mini-modern .m-t1 { height: 11px; background: #150F3C; } .mini-modern .m-t2 { background: rgba(21, 15, 60, .55); }
.mini-modern .m-btn { background: #150F3C; border-radius: 3px; }
.mini-modern .m-cards b { border: 1.5px solid #150F3C; border-radius: 3px; }
.mini-warm { background: #FBF3E6; }
.mini-warm .m-nav { background: #FBF3E6; border: 0; }
.mini-warm .m-hero { margin: 0 6px; border-radius: 10px; background: linear-gradient(135deg, #2B1A78, #B0387F); }
.mini-warm .m-t1, .mini-warm .m-t2 { background: #fff; }
.mini-warm .m-cards b { border-radius: 8px; border-color: #EBDDC5; background: #FFFDF8; }
.mini-minimal .m-hero { background: #fff; border-bottom: 1px solid #E6E3EE; }
.mini-minimal .m-t1 { background: #1B1744; width: 52%; } .mini-minimal .m-t2 { background: #B5B1C6; }
.mini-minimal .m-btn { border-radius: 2px; }
.mini-minimal .m-cards b { border-radius: 1px; border-color: #E6E3EE; }
.mini-night { background: #0C0827; border-color: #2B2360; }
.mini-night .m-nav { background: #0C0827; border-color: rgba(255, 255, 255, .15); }
.mini-night .m-nav b { background: rgba(255, 255, 255, .45); } .mini-night .m-nav b:first-child { background: var(--mini-accent); }
.mini-night .m-hero { background: radial-gradient(70% 90% at 90% 110%, var(--mini-accent), transparent 70%), linear-gradient(135deg, #0C0827, #2B1A78); }
.mini-night .m-t1, .mini-night .m-t2 { background: #fff; }
.mini-night .m-cards b { background: #171040; border-color: rgba(255, 255, 255, .16); }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.preview-head h2 { margin: 0; font-size: 1.2rem; }
.preview-devices { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--sky); }
.chip-btn { min-height: 36px; padding: 4px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: 600 .875rem var(--font-body); cursor: pointer; }
.chip-btn:hover { background: rgba(255, 255, 255, .7); }
.chip-btn[aria-pressed="true"] { background: var(--white); box-shadow: 0 1px 4px rgba(35, 21, 102, .18); color: var(--violet); }
.preview-stage { position: relative; width: 100%; height: 640px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.preview-frame { position: absolute; left: 0; top: 0; width: 100%; height: 100%; max-width: none; border: 0; background: #fff; transform-origin: 0 0; }

/* Photo library and the editor's Photos picker */
.dropzone { border: 2px dashed var(--line); border-radius: 14px; padding: 22px; background: var(--sky); text-align: center; }
.dropzone:hover, .dropzone:focus-within { border-color: var(--violet); }
.dropzone input[type=file] { max-width: 100%; }
.media-grid { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.media-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); min-width: 0; }
.media-thumb { display: block; border-radius: 10px; overflow: hidden; background: var(--sky); aspect-ratio: 4 / 3; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
.media-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.media-actions form { margin: 0; }
.md-tools { display: flex; align-items: center; gap: 8px; margin: 4px 0 6px; }
.photo-picker { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 0; border-radius: 18px; padding: 0; box-shadow: 0 24px 80px rgba(20, 12, 60, .35); background: var(--white); color: var(--ink); }
.photo-picker::backdrop { background: rgba(20, 12, 60, .55); }
.photo-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.photo-picker-head h2 { margin: 0; font-size: 1.15rem; }
.photo-picker-body { padding: 18px 22px 22px; overflow: auto; max-height: calc(100vh - 140px); }
.photo-picker-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.photo-picker-grid button { display: block; width: 100%; padding: 0; border: 2px solid var(--line); border-radius: 12px; background: var(--white); cursor: pointer; text-align: left; overflow: hidden; font: inherit; color: inherit; }
.photo-picker-grid button:hover, .photo-picker-grid button:focus-visible { border-color: var(--violet); }
.photo-picker-grid img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-picker-grid span { display: block; padding: 6px 8px; font-size: .8125rem; line-height: 1.3; }

/* Builder: choosing which part of the hero photo stays in view */
.hero-thumb { display: block; max-width: 320px; height: auto; border-radius: 10px; }
.hero-focus { border: 1px solid var(--line, #e3e0ee); border-radius: 12px; padding: 16px 18px 18px; }
.hero-focus legend { padding-inline: 6px; font-weight: 700; }
.hero-focus-pick { position: relative; display: block; max-width: 360px; cursor: crosshair; }
.hero-focus-pick img { display: block; width: 100%; height: auto; border-radius: 10px; }
.hero-focus-dot { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid #fff; background: rgba(35, 21, 102, .55); box-shadow: 0 0 0 2px #231566, 0 2px 8px rgba(0, 0, 0, .4); pointer-events: none; }
.advice { margin: 6px 0 0; font-size: .9rem; }
.advice-low { color: #8a3b00; }
.hero-focus-pick[hidden] { display: none; }

.setup-steps .setup-hint { display: block; margin-top: 2px; }
.setup-steps .chip { flex: none; }
.hero-focus { min-width: 0; box-sizing: border-box; }

/* Home page sections: move buttons and heading boxes */
.list-rows > li { flex-wrap: wrap; }
.list-rows .move-buttons { display: inline-flex; gap: 4px; flex: none; }
.list-rows .move-buttons[hidden] { display: none; }
.list-rows .block-heading { flex-basis: 100%; margin-left: 34px; }
.list-rows .block-heading summary { cursor: pointer; font-size: .9rem; }
.list-rows .block-heading .form-grid { margin-top: 10px; }

/* Markdown boxes: toolbar, Scripture helper, live preview */
.md-tools { flex-wrap: wrap; }
.md-scripture { margin: 0 0 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.md-scripture[hidden] { display: none; }
.md-scripture label { display: block; margin-bottom: 4px; font-weight: 600; }
.md-scripture-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.md-scripture-row input[type=text] { flex: 1 1 220px; min-width: 0; }
.md-scripture-status { margin: 8px 0 0; }
.md-scripture-text { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--line); color: var(--ink-soft, inherit); font-style: italic; }
.md-scripture-text[hidden] { display: none; }
.md-preview { margin-top: 10px; padding: 14px 18px; border: 1px dashed var(--line); border-radius: 12px; background: var(--white); }
.md-preview[hidden] { display: none; }
.md-preview-body img { max-width: 100%; height: auto; border-radius: 10px; }
.md-preview-body figure.photo { margin: 1.2em 0; }
.md-preview-body figcaption { font-size: .9rem; color: var(--ink-soft, inherit); text-align: center; }
.md-button { margin: 1.2em 0; }
.md-button .btn { text-decoration: none; }

/* New page: example pages to start from */
.starter-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: 0; padding: 0; }
.starter-card { display: grid; gap: 4px; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: inherit; text-decoration: none; }
.starter-card:hover { border-color: var(--accent, var(--ink)); }

/* ---- Cookie consent (shared kit, see public/css/consent.css) ---- */
:root {
  --cc-bg: var(--white);
  --cc-fg: var(--ink);
  --cc-muted: var(--ink-soft);
  --cc-line: var(--line);
  --cc-soft: var(--sky);
  --cc-accent: var(--indigo);
  --cc-accent-fg: #fff;
  --cc-focus: var(--violet);
  --cc-font: var(--font-body);
  --cc-radius: var(--radius);
  --cc-btn-radius: 14px;
  --cc-shadow: var(--shadow-lift);
}
.link-button { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-button:hover { text-decoration-thickness: 2px; }
.site-footer .link-button { color: inherit; }
.video-embed[data-cc-state="waiting"] { aspect-ratio: auto; min-height: 16rem; background: var(--cc-soft, #f4f5f7); }
.video-embed .cc-embed-card { border: 0; border-radius: inherit; min-height: 16rem; }
.cc-notice h2 { margin-top: 1.8em; }
.cc-notice .cc-notice-open { color: var(--ink); }
