:root {
  --bg: #ffffff;
  --band: #fff1e7;          /* peach panels used on lifespringministries.co */
  --ink: #1b1b1b;           /* near-black for headings and the dark panels */
  --font-head: "Fjalla One", "Arial Narrow", sans-serif;
  --seq-1: #f3e3c4; --seq-2: #e0bd7f; --seq-3: #b98a3e; --seq-4: #784e05;  /* one-hue gold ramp, light to dark */
  --ok-1: #d3efd5; --ok-2: #95d39b; --ok-3: #4caf57; --ok-4: #1f7a2c; --gap-red: #d93636;
  --ok-ink-1: #123d18; --ok-ink-2: #123d18; --ok-ink-3: #0b2a10; --ok-ink-4: #fff;
  --trend-cov: #2e8b3e; --trend-att: #2f6fd6; --trend-hrs: #7a4fc9;  /* trend line colours */
  /* who-prayed-when grid: green = covered, red = empty */
  --font-label: "Source Sans 3", "Source Sans Pro", system-ui, sans-serif;
  --surface: #faf8f6;
  --border: #ece7e2;
  --text: #1d1b19;
  --muted: #77716b;
  --gold: #784e05;          /* the site's gold-brown: labels, links, buttons */
  --gold-hover: #5a3a03;
  --accent: #1f5fd1;        /* globe blue, used for focus rings */
  --menu-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  --blue: #2f66d0; --blue-soft: #e8efff;
  --orange: #c77a12; --orange-soft: #fdf1df;
  --green: #18874f; --green-soft: #e3f5eb;
  --pink: #c8325f; --pink-soft: #fde8ee;
  --gray: #7d7f84; --gray-soft: #efefef;
  --danger: #c0352b;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141312; --band: #2a211b; --surface: #1c1a18; --border: #33302c;
    --text: #efebe6; --muted: #a59e96; --gold: #d9a44a; --gold-hover: #e8b862; --accent: #6a9bff; --ink: #efebe6;
    --menu-shadow: 0 8px 24px rgba(0, 0, 0, .5);
    --seq-1: #3d2e17; --seq-2: #6b4e22; --seq-3: #a77a35; --seq-4: #e3b765;
    --ok-1: #1d3b22; --ok-2: #2b6634; --ok-3: #3f9a4b; --ok-4: #7fd38a; --gap-red: #e5484d;
    --ok-ink-1: #d8f2db; --ok-ink-2: #e6f6e8; --ok-ink-3: #0f2a13; --ok-ink-4: #0f2a13;
    --trend-cov: #5cc46a; --trend-att: #6a9bff; --trend-hrs: #a98bf0;
    --blue-soft: #1c2840; --orange-soft: #3a2a14; --green-soft: #15302a; --pink-soft: #3a1a25; --gray-soft: #2a2826;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 "Source Sans 3", "Noto Sans Devanagari", "Noto Sans Telugu", "Noto Sans Tamil", system-ui, sans-serif;
}
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a { color: inherit; }
button, select, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Header: centered logo + wide-tracked uppercase menu */
.site-header { padding: 34px 16px 18px; text-align: center; border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .globe { width: 40px; height: 40px; display: block; }
.brand span { font-family: var(--font-head); font-weight: 400; font-size: 30px; letter-spacing: .02em; text-transform: uppercase; line-height: 1; color: var(--ink); }
.site-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 34px; margin-top: 24px; }
.site-nav > a, .dropdown > button {
  font-family: var(--font-label); font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .16em; text-decoration: none; background: none; border: 1px solid transparent;
  padding: 6px 2px; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; border-radius: 4px;
}
.site-nav > a:hover, .dropdown > button:hover { color: var(--gold); }
.site-nav > a.active, .dropdown > button.active { border-bottom-color: currentColor; border-radius: 0; }
.caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; transition: transform .15s; }
.dropdown { position: relative; }
.dropdown.open > button { border-color: var(--accent); }
.dropdown.open .caret { transform: rotate(180deg); }
.menu {
  display: none; position: absolute; top: calc(100% + 10px); left: 0; z-index: 10; min-width: 280px;
  background: var(--bg); box-shadow: var(--menu-shadow); padding: 18px 0; text-align: left;
}
.dropdown.open .menu { display: block; }
.menu a, .menu-empty {
  display: block; padding: 9px 24px; text-decoration: none; text-transform: uppercase;
  font-size: 13px; font-weight: 600; letter-spacing: .1em; color: var(--muted); white-space: nowrap;
}
.menu a:hover { color: var(--gold); }

/* Page */
.page { max-width: 1680px; margin: 0 auto; padding: 40px 48px 64px; }
.crumb { display: inline-block; margin-bottom: 18px; color: var(--muted); text-decoration: none; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.crumb:hover { color: var(--gold); }
.page-head { margin-bottom: 28px; }
.page-head h1 {
  margin: 0; color: var(--ink); font-family: var(--font-head); font-weight: 400;
  font-size: 30px; letter-spacing: .02em; text-transform: uppercase; line-height: 1.2;
}
.eyebrow {
  margin: 0 0 8px; color: var(--gold); font-family: var(--font-label); font-weight: 600;
  font-size: 13px; letter-spacing: .16em; text-transform: uppercase;
}
.count { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.break { overflow-wrap: anywhere; }

.band { background: var(--band); padding: 18px 24px; }
.toolbar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 10px; background: var(--bg); padding: 0 14px; height: 46px; flex: 1 1 280px; max-width: 460px; color: var(--muted); border: 1px solid var(--border); }
.search input { border: 0; background: transparent; outline: none; width: 100%; color: var(--text); }
select { height: 46px; border: 1px solid var(--border); background: var(--bg); padding: 0 12px; color: var(--text); border-radius: 0; }

.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 24px; cursor: pointer;
  font-family: var(--font-label); font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  border: 1px solid var(--gold); border-radius: 0;
}
.btn.primary { background: var(--gold); color: #fff; margin-left: auto; }
.btn.primary:hover { background: var(--gold-hover); border-color: var(--gold-hover); }
.btn.primary:disabled { opacity: .6; cursor: progress; }
.btn.ghost { background: transparent; color: var(--gold); }
.btn.ghost:hover { background: var(--gold); color: #fff; }
.btn.small { height: 34px; padding: 0 14px; font-size: 11px; }

.toast { margin-top: 14px; padding: 10px 14px; background: var(--bg); color: var(--gold); border-left: 3px solid var(--gold); }
.toast.ok { color: var(--green); border-color: var(--green); }
.toast.error { color: var(--danger); border-color: var(--danger); }

/* Upload progress */
.upload-panel { margin-top: 14px; background: var(--bg); border-left: 3px solid var(--gold); padding: 14px 18px; }
.upload-panel.ok { border-color: var(--green); }
.upload-panel.failed { border-color: var(--danger); }
.upload-head { display: flex; align-items: center; gap: 10px; }
.upload-head strong { font-weight: 600; }
.upload-panel.ok .upload-head strong, .up-done { color: var(--green); }
.upload-panel.failed .upload-head strong { color: var(--danger); }
.up-done { stroke-width: 2.5; }
.up-pct { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); }
.progress { height: 8px; background: var(--band); margin: 10px 0 8px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--gold); transition: width .2s ease; }
.upload-panel.ok .progress-bar { background: var(--green); }
.upload-panel.failed .progress-bar { background: var(--danger); }
.up-detail { margin: 0; font-size: 14px; color: var(--muted); }
.up-files { margin: 8px 0 0; padding-left: 18px; font-size: 14px; color: var(--text); }
.spinner {
  width: 18px; height: 18px; border-radius: 50%; flex: none; display: inline-block;
  border: 2px solid var(--band); border-top-color: var(--gold); animation: spin .8s linear infinite;
}
.spinner.small { width: 14px; height: 14px; }
.spinner.light { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
.working { display: inline-flex; align-items: center; gap: 10px; color: var(--gold); }
.error-text { color: var(--danger); }

/* Table */
.table-card { border: 1px solid var(--border); border-top: 0; overflow-x: auto; }
table.files { width: 100%; border-collapse: collapse; min-width: 1150px; }
.files th {
  text-align: left; font-family: var(--font-label); font-weight: 500; font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); padding: 18px 16px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.files td { padding: 14px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--muted); font-size: 15px; }
.files tbody tr:not(.no-match):hover td { background: var(--surface); }
.files tr:last-child td { border-bottom: 0; }
.files td.strong { color: var(--text); font-weight: 600; }
.files td.strong.muted { color: var(--muted); font-weight: 400; }
.files td.summary { color: var(--text); min-width: 300px; max-width: 420px; }
.files td.summary .clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.files td.name { white-space: nowrap; }
.file-cell { display: flex; align-items: center; gap: 10px; }
.file-cell a { color: var(--gold); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.file-cell a:hover { color: var(--gold-hover); }
.file-icon { width: 30px; height: 30px; padding: 6px; border-radius: 50%; stroke-width: 2; }
.files td.path { color: var(--text); min-width: 240px; max-width: 340px; }
.muted { color: var(--muted); }
.tag { font-family: var(--font-label); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.pill, .lang { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill.female { background: var(--pink-soft); color: var(--pink); }
.pill.male { background: var(--blue-soft); color: var(--blue); }
.pill.unknown { background: var(--gray-soft); color: var(--gray); }
.blue { color: var(--blue); background: var(--blue-soft); }
.orange { color: var(--orange); background: var(--orange-soft); }
.green { color: var(--green); background: var(--green-soft); }
.pink { color: var(--pink); background: var(--pink-soft); }
.gray { color: var(--gray); background: var(--gray-soft); }
.empty { text-align: center; padding: 48px !important; }
.footnote { color: var(--muted); font-size: 13px; margin: 16px 0 0; }

/* Testimony page */
.detail-card { border: 1px solid var(--border); padding: 28px; margin-bottom: 24px; }
.detail-card.band-top { border-top: 18px solid var(--band); }
.detail-card audio { width: 100%; }
.meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px 28px; margin: 24px 0 0; }
.meta .wide { grid-column: 1 / -1; }
.meta dt { color: var(--muted); font-family: var(--font-label); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.meta dd { margin: 4px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.meta dd.source { margin: 2px 0 0; font-weight: 400; font-size: 12px; color: var(--muted); }
.meta dd.path { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-weight: 400; }
.transcribe-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.transcribe-bar label { color: var(--muted); font-family: var(--font-label); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.transcribe-bar select { min-width: 280px; }
.transcribe-bar .btn.primary { margin-left: 0; }
.status { color: var(--muted); }
.status.error { color: var(--danger); }
.text-block { margin-top: 26px; }
.text-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 12px; }
.text-head h2 { margin: 0; color: var(--gold); font-family: var(--font-label); font-weight: 500; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; }
.text-block textarea {
  width: 100%; resize: vertical; border: 1px solid var(--border); background: var(--surface);
  padding: 16px; font-size: 17px; line-height: 1.75; color: var(--text); border-radius: 0;
}

/* Google Drive tab */
.readonly-note { display: flex; gap: 14px; align-items: flex-start; border-left: 3px solid var(--green); background: var(--green-soft); padding: 14px 18px; margin-bottom: 24px; }
.readonly-note svg { color: var(--green); margin-top: 2px; }
.readonly-note p { margin: 0; font-size: 15px; }
.drive-error { margin: 0 0 18px; }
.card-title { margin: 0 0 14px; color: var(--gold); font-family: var(--font-label); font-weight: 500; font-size: 14px; letter-spacing: .16em; text-transform: uppercase; }
.setup ol { margin: 0 0 16px; padding-left: 22px; }
.setup li { margin-bottom: 10px; }
.setup a, .open-link { color: var(--gold); font-weight: 600; }
.setup code { background: var(--surface); border: 1px solid var(--border); padding: 1px 6px; font-size: 14px; overflow-wrap: anywhere; }
.connect p { margin: 0 0 18px; }
.connect .btn.primary { margin-left: 0; }
.trail { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.trail button { background: none; border: 0; padding: 2px 0; cursor: pointer; color: var(--gold); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.trail button:disabled { color: var(--text); text-decoration: none; cursor: default; }
table.files.drive { min-width: 720px; }
.files .check { width: 44px; padding-right: 0; }
.files .check input { width: 18px; height: 18px; accent-color: var(--gold); cursor: pointer; }
.folder-link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--gold); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-align: left; }
.drive-name { color: var(--text); font-weight: 600; white-space: normal; }
.ok-text { color: var(--green); font-weight: 600; }
.open-link { margin-left: 8px; }
.drive-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.drive-foot form { margin-top: 12px; }

/* Log tab */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { border: 1px solid var(--border); border-top: 3px solid var(--border); padding: 14px 16px; }
.stat span { display: block; color: var(--muted); font-family: var(--font-label); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.stat strong { display: block; margin-top: 6px; font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat.ok { border-top-color: var(--green); }
.stat.warn { border-top-color: var(--orange); }
.stat.bad { border-top-color: var(--danger); }
table.files.log { min-width: 980px; }
.files td.nowrap { white-space: nowrap; }
.files td.details { color: var(--text); min-width: 320px; font-size: 14px; }
.log-name { font-weight: 600; }
.band .btn.ghost { margin-left: auto; }

/* Home: welcome block (dark panel + peach panel) and category cards, as on lifespringministries.co */
.welcome { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); margin-bottom: 44px; }
.welcome-media {
  position: relative; overflow: hidden; background: #1b1b1b; color: #fff; padding: 36px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; align-content: center;
}
.welcome-media .globe-mark { position: absolute; right: -60px; bottom: -60px; width: 260px; height: 260px; opacity: .22; pointer-events: none; }
.figure { position: relative; }
.figure strong { display: block; font-family: var(--font-head); font-weight: 400; font-size: 46px; line-height: 1; color: #fff; }
.figure span { display: block; margin-top: 8px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #d9b16a; }
.welcome-text { background: var(--band); padding: 40px 48px; text-align: center; display: flex; flex-direction: column; justify-content: center; }
.welcome-text h1 { margin: 0 0 16px; font-family: var(--font-head); font-weight: 400; font-size: 32px; line-height: 1.2; text-transform: uppercase; color: var(--ink); }
.welcome-text p { margin: 0 auto; max-width: 560px; color: var(--muted); font-size: 15px; }
.welcome-text .eyebrow { color: var(--gold); font-size: 13px; margin-bottom: 8px; }
.welcome-text .scripture { margin-top: 16px; color: var(--gold); font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 14px; }
.section-head .eyebrow { margin: 0; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 44px; }
.cat-card {
  display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; text-align: left; cursor: pointer;
  background: var(--band); border: 1px solid transparent; border-left: 3px solid var(--gold); color: var(--text);
}
.cat-card:hover { border-color: var(--gold); }
.cat-card[aria-pressed="true"] { background: var(--gold); color: #fff; }
.cat-card strong { font-family: var(--font-head); font-weight: 400; font-size: 19px; line-height: 1.2; text-transform: uppercase; letter-spacing: .02em; }
.cat-card span { font-size: 13px; color: var(--muted); }
.cat-card[aria-pressed="true"] span { color: rgba(255, 255, 255, .85); }
.cat-card.empty-cat { opacity: .55; }

/* Footer */
.site-footer { background: #1b1b1b; color: #cfc8c0; text-align: center; padding: 40px 16px 32px; margin-top: 24px; }
.site-footer .foot-brand { font-family: var(--font-head); font-size: 22px; letter-spacing: .04em; text-transform: uppercase; color: #fff; }
.site-footer .scripture { margin: 10px auto 0; max-width: 640px; color: #d9b16a; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.site-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 26px; margin: 22px 0 0; }
.site-footer nav a { color: #cfc8c0; text-decoration: none; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.site-footer nav a:hover { color: #fff; }
.site-footer .copy { margin: 22px 0 0; font-size: 12px; color: #8d857c; }

/* 24/7 Prayer Group */
.readonly-note > div { flex: 1; }
.note-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.note-actions form { margin: 0; }
table.files.prayer { min-width: 900px; }
.files .thumb { width: 44px; height: 44px; object-fit: cover; flex: none; border: 1px solid var(--border); }
.kind-icon { width: 44px; height: 44px; flex: none; display: grid; place-items: center; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--gold); background: var(--band); }
.kind-icon.sheet { color: var(--green); background: var(--green-soft); }
.kind-icon.pdf { color: var(--danger); background: var(--pink-soft); }
.kind-icon.doc { color: var(--blue); background: var(--blue-soft); }
.files .group-select { height: 36px; font-size: 14px; }
.files input.notes { width: 100%; min-width: 180px; height: 36px; border: 1px solid var(--border); background: var(--bg); padding: 0 10px; font-size: 14px; }
.view-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.sheet-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.sheet-tabs button { border: 1px solid var(--border); background: var(--bg); padding: 8px 14px; cursor: pointer; font-weight: 600; font-size: 14px; }
.sheet-tabs button[aria-selected="true"] { background: var(--gold); border-color: var(--gold); color: #fff; }
.sheet-search { margin-bottom: 12px; }
.sheet-scroll { overflow: auto; max-height: 72vh; border: 1px solid var(--border); }
.sheet-table { border-collapse: collapse; font-size: 14px; min-width: 100%; }
.sheet-table th, .sheet-table td { border: 1px solid var(--border); padding: 7px 10px; text-align: left; vertical-align: top; white-space: pre-wrap; }
.sheet-table thead th { position: sticky; top: 0; background: var(--band); font-weight: 600; z-index: 1; }
.sheet-table .rownum { color: var(--muted); font-size: 12px; text-align: right; background: var(--surface); }
.full-image { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; }
.pdf-frame { width: 100%; height: 80vh; border: 1px solid var(--border); }
.doc-text { white-space: pre-wrap; font: 16px/1.7 "Source Sans 3", "Noto Sans Telugu", "Noto Sans Tamil", "Noto Sans Devanagari", sans-serif; margin: 0; }
.login-card { max-width: 420px; margin: 40px auto; padding: 36px; background: var(--band); text-align: center; }
.login-card h1 { margin: 0 0 10px; font-family: var(--font-head); font-weight: 400; font-size: 30px; text-transform: uppercase; }
.login-card form { display: flex; gap: 10px; margin-top: 20px; }
.login-card input { flex: 1; height: 46px; border: 1px solid var(--border); padding: 0 12px; background: var(--bg); }
.login-card .btn.primary { margin-left: 0; }

.drive-picker { border: 1px solid var(--border); border-top: 0; padding: 20px 24px 8px; background: var(--surface); }
.picker-head .eyebrow .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.picker-head .trail { border-bottom: 0; padding: 12px 0 4px; }
.picker-list { max-height: 420px; overflow: auto; border: 1px solid var(--border); background: var(--bg); }
.picker-list table.files { min-width: 560px; }
.band .btn.ghost#from-drive { margin-left: 0; }

/* 24/7 Prayer dashboard */
.sub-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: -8px 0 28px; }
.sub-tabs a { padding: 10px 18px; text-decoration: none; font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.sub-tabs a:hover { color: var(--gold); }
.sub-tabs a.active { color: var(--gold); border-bottom-color: var(--gold); }
.month-pick { display: flex; align-items: center; gap: 10px; }
.month-pick select { height: 38px; }
.stat em { display: block; margin-top: 4px; font-style: normal; font-size: 12px; color: var(--muted); }
.trend-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; margin-bottom: 14px; }
.trend { margin: 0; border: 1px solid var(--border); border-top: 4px solid var(--trend); padding: 16px 18px 14px; background: var(--bg); }
.trend figcaption { display: grid; gap: 2px; margin-bottom: 10px; }
.trend-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.trend-title .swatch { width: 12px; height: 3px; border-radius: 2px; background: var(--trend); }
.trend-now strong { font-family: var(--font-head); font-size: 34px; line-height: 1.1; color: var(--text); }
.trend-now small { color: var(--muted); font-size: 13px; }
.trend-change { font-size: 13px; font-weight: 600; }
.trend-change.up { color: var(--green); } .trend-change.down { color: var(--danger); } .trend-change.same { color: var(--muted); }
.trend-meaning { font-size: 13px; color: var(--muted); }
.trend-range { margin: 8px 0 0; font-size: 13px; color: var(--text); }
.line-chart { display: block; width: 100%; height: auto; overflow: visible; }
.line-chart .grid { stroke: var(--border); stroke-width: 1; }
.line-chart, .line-chart * { stroke: none; }  /* undo the icon outline from the global svg rule */
.line-chart text { font-family: var(--font-label, inherit); }
.line-chart .axis { font-size: 13px; font-weight: 600; fill: var(--text); opacity: .75; }
.line-chart .axis.year { font-size: 12px; font-weight: 700; opacity: 1; }
.line-chart .line { fill: none; stroke: var(--trend); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.line-chart .area { fill: var(--trend); opacity: .12; }
.line-chart .hit { fill: transparent; }
.line-chart .guide { stroke: var(--trend); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.line-chart .pt:hover .guide, .line-chart .pt.current .guide { opacity: .6; }
.line-chart .dot { fill: var(--trend); stroke: var(--bg); stroke-width: 2; }
.line-chart .pt:hover .dot { r: 5.5px; }
.line-chart .pt.current .dot { fill: var(--bg); stroke: var(--trend); stroke-width: 3; }
.line-chart .pt-label { font-size: 14px; font-weight: 700; fill: var(--text); paint-order: stroke; stroke: var(--bg); stroke-width: 4px; }
.line-chart .pt-label.current { font-size: 16px; }
.trend.cov { --trend: var(--trend-cov); } .trend.att { --trend: var(--trend-att); } .trend.hrs { --trend: var(--trend-hrs); }
.trend-table { margin-bottom: 36px; }
.trend-table summary { cursor: pointer; color: var(--gold); font-weight: 600; font-size: 14px; padding: 6px 0; }
.trend-table .current-row td { background: var(--band); font-weight: 600; }
.heat-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); align-items: center; }
.heat-legend span { display: inline-flex; align-items: center; gap: 5px; }
.heat-legend .lv { display: inline-grid; place-items: center; width: 16px; height: 16px; font-style: normal; font-size: 11px; }
.heat-wrap { overflow-x: auto; border: 1px solid var(--border); margin-bottom: 36px; }
.heat { border-collapse: separate; border-spacing: 2px; font-size: 11px; width: 100%; }
.heat th { font-weight: 600; color: var(--muted); padding: 2px; text-align: center; }
.heat .slot-h { text-align: left; white-space: nowrap; padding-right: 10px; color: var(--text); font-size: 12px; position: sticky; left: 0; background: var(--bg); }
.heat .slot-h small { display: block; font-weight: 400; color: var(--muted); font-size: 10px; }
.heat td { height: 22px; min-width: 18px; border-radius: 3px; text-align: center; color: var(--danger); font-weight: 700; }
.heat td.num { color: var(--text); font-weight: 600; padding: 0 8px; white-space: nowrap; }
.heat .heat-total td { color: var(--text); font-weight: 700; font-size: 11px; background: var(--band); border-top: 2px solid var(--border); padding: 0 2px; }
.heat .heat-total td.lv.none { background: var(--surface); }
.heat .heat-total .slot-h { border-top: 2px solid var(--border); }
.lv.none { background: var(--surface); }
.lv.gap { background: var(--gap-red); color: #fff; }
.lv.l1 { background: var(--ok-1); } .lv.l2 { background: var(--ok-2); } .lv.l3 { background: var(--ok-3); } .lv.l4 { background: var(--ok-4); }
.heat td.l1 { color: var(--ok-ink-1); } .heat td.l2 { color: var(--ok-ink-2); } .heat td.l3 { color: var(--ok-ink-3); } .heat td.l4 { color: var(--ok-ink-4); }
.heat td.l1, .heat td.l2, .heat td.l3, .heat td.l4 { font-weight: 600; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.table-card.flat { border-top: 1px solid var(--border); }
table.files.compact { min-width: 0; }
.files.compact td, .files.compact th { padding: 9px 12px; }
.files .num { text-align: right; font-variant-numeric: tabular-nums; }
.status-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; margin-right: 6px; }
.status-pill.good { background: var(--green-soft); color: var(--green); }
.status-pill.fair { background: var(--blue-soft); color: var(--blue); }
.status-pill.warn { background: var(--orange-soft); color: var(--orange); }
.status-pill.bad { background: var(--pink-soft); color: var(--danger); }
.status-pill.unknown { background: var(--gray-soft); color: var(--gray); }
.checks { margin: 0; padding-left: 18px; font-size: 14px; color: var(--text); }
.checks li { margin-bottom: 10px; }
.checks summary { cursor: pointer; color: var(--gold); font-weight: 600; }
table.files.people { min-width: 960px; }
.person-link { color: var(--gold); font-weight: 600; }
.phone-link { color: var(--text); text-decoration: none; font-variant-numeric: tabular-nums; }
.phone-link:hover { color: var(--gold); text-decoration: underline; }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 26px; width: 150px; }
.spark span { flex: 1; background: var(--seq-3); border-radius: 2px 2px 0 0; min-height: 2px; }
.spark span.none { background: var(--border); }
.spark span.chosen { background: var(--gold); }
.check-filter { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; background: var(--bg); border: 1px solid var(--border); cursor: pointer; font-weight: 600; }
.check-filter input { width: 18px; height: 18px; accent-color: var(--gold); }
.active-cell { text-align: center; }
.active-yes { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-weight: 700; }
.meter-cell { width: 40%; }
.meter { display: block; height: 8px; background: var(--surface); border-radius: 4px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--gold); border-radius: 4px; }
.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: var(--bg); padding: 6px 10px; font-size: 12px; border-radius: 4px; box-shadow: var(--menu-shadow); max-width: 320px; }
/* 24/7 gap calendar */
.gap-cal { margin-bottom: 48px; scroll-margin-top: 16px; }
.gap-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; background: #1b1b1b; color: #fff; padding: 26px 30px; border-radius: 10px; }
.gap-head h2 { margin: 0; font-family: var(--font-head); font-weight: 400; font-size: 40px; line-height: 1.1; color: #e2b15c; text-transform: uppercase; letter-spacing: .02em; }
.gap-head p { margin: 6px 0 0; font-size: 18px; color: #e9e3db; }
.gap-figs { display: flex; gap: 12px; flex-wrap: wrap; }
.gap-figs div { background: #2c2a27; border-radius: 8px; padding: 12px 20px; text-align: center; min-width: 120px; }
.gap-figs strong { display: block; font-family: var(--font-head); font-weight: 400; font-size: 34px; line-height: 1.1; }
.gap-figs span { font-size: 14px; color: #cfc8c0; }
.gap-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; margin-top: 18px; }
.gap-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.dow { background: var(--seq-2); color: #2b1d05; text-align: center; font-weight: 700; padding: 8px 0; border-radius: 4px; }
.dow.sun { background: var(--gold); color: #fff; }
.day { min-height: 118px; border: 1px solid var(--border); border-radius: 6px; padding: 8px 8px 10px; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.day b { font-size: 20px; line-height: 1; margin-bottom: 4px; }
.day-top { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; }
.pray-count { font-size: 12px; font-weight: 700; color: var(--text); background: rgba(255, 255, 255, .7); border-radius: 999px; padding: 1px 7px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.day.blank { border: 0; }
.day.ok { background: var(--green-soft); }
.day.ok .ok-mark { color: var(--green); font-weight: 600; }
.day.gap { background: var(--pink-soft); border: 1.5px solid var(--danger); }
.day.none { background: var(--surface); }
.gap-pill { background: var(--danger); color: #fff; font-weight: 700; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gap-side h3 { margin: 0 0 14px; background: var(--band); border-left: 4px solid var(--gold); padding: 10px 14px; font-family: var(--font-head); font-weight: 400; font-size: 22px; text-transform: uppercase; }
.hour-row { margin-bottom: 12px; }
.hour-name { display: block; font-weight: 700; margin-bottom: 4px; }
.hour-track { display: block; background: var(--surface); border-radius: 6px; overflow: hidden; }
.hour-bar { display: block; background: var(--danger); color: #fff; font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 6px; white-space: nowrap; min-width: 64px; }
.needs-help { margin: 18px 0 0; background: var(--band); border-left: 4px solid var(--gold); padding: 14px 16px; font-size: 15px; line-height: 1.55; }
.gap-legend { display: flex; gap: 22px; flex-wrap: wrap; margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.gap-legend span { display: inline-flex; align-items: center; gap: 8px; }
.sw { display: inline-block; width: 16px; height: 16px; border-radius: 3px; }
.sw.gap { background: var(--danger); } .sw.ok { background: var(--green-soft); border: 1px solid var(--border); } .sw.none { background: var(--surface); border: 1px solid var(--border); }
@media (max-width: 1100px) { .gap-body { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .day { min-height: 84px; padding: 5px; } .gap-pill { font-size: 10.5px; padding: 2px 6px; } .gap-head h2 { font-size: 30px; } }

/* 24/7 slot list */
.slot-list { border: 1px solid var(--border); margin-bottom: 36px; }
.slot-row { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 18px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.slot-row:last-child { border-bottom: 0; }
.slot-row:nth-child(odd) { background: var(--surface); }
.slot-row.thin { box-shadow: inset 4px 0 0 var(--orange); }
.slot-when strong { display: block; font-family: var(--font-head); font-weight: 400; font-size: 20px; text-transform: uppercase; }
.slot-when span { display: block; font-weight: 600; color: var(--gold); }
.slot-when em { display: block; font-style: normal; font-size: 13px; color: var(--muted); margin-top: 2px; }
.slot-names { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.name-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--band); color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; border: 1px solid transparent; }
a.name-chip:hover { border-color: var(--gold); color: var(--gold); }
.name-chip small { font-size: 11px; font-weight: 600; color: var(--blue); }
.name-chip.unmatched { background: var(--bg); border: 1px dashed var(--muted); color: var(--muted); }
@media (max-width: 700px) { .slot-row { grid-template-columns: 1fr; gap: 8px; } }

/* Calendar: picker, day facts, day panel */
.cal-pick { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.cal-pick label { display: inline-flex; align-items: center; gap: 8px; }
.cal-pick select { height: 40px; min-width: 120px; }
button.day { font: inherit; color: inherit; text-align: left; cursor: pointer; }
button.day:hover, button.day.selected { outline: 2px solid var(--gold); outline-offset: 1px; }
.day-facts { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 1px; }
.day-facts .ok-mark, .day-facts .error-text { font-weight: 600; }
.glance { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 0 0 22px; }
.glance dt { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.glance dd { margin: 2px 0 0; font-weight: 700; font-size: 17px; }
.gap-side h3 + .glance { margin-top: 0; }
.day-panel { margin-top: 24px; border: 1px solid var(--border); border-top: 4px solid var(--gold); padding: 18px 20px; scroll-margin-top: 16px; }
.day-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.day-panel-head h3 { margin: 0; font-family: var(--font-head); font-weight: 400; font-size: 24px; text-transform: uppercase; }
.dp-slots { margin-top: 10px; }
.dp-slot { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; padding: 10px 0; border-top: 1px solid var(--border); }
.dp-slot.empty { background: var(--pink-soft); padding-left: 10px; padding-right: 10px; }
.dp-when strong { display: block; } .dp-when span { display: block; color: var(--gold); font-weight: 600; font-size: 13px; }
.dp-when em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
.dp-slot.empty .dp-when em { color: var(--danger); font-weight: 700; }
.dp-names { display: flex; flex-wrap: wrap; gap: 5px; align-content: flex-start; }
.name-chip.yes { background: var(--green-soft); color: var(--green); }
.name-chip.no { background: var(--bg); border: 1px solid var(--border); color: var(--muted); font-weight: 400; }
@media (max-width: 700px) { .dp-slot { grid-template-columns: 1fr; gap: 6px; } .day-facts span:first-child { display: none; } }

/* Sign in / user bar */
.user-bar { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.link-button { background: none; border: 0; padding: 0; color: var(--gold); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.login-form { flex-direction: column; }
.login-form input { width: 100%; }

@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

@media (max-width: 900px) {
  .site-header { padding-top: 32px; }
  .brand span { font-size: 22px; }
  .brand .globe { width: 32px; height: 32px; }
  .welcome { grid-template-columns: 1fr; }
  .welcome-text { padding: 28px 20px; }
  .welcome-media { padding: 26px 20px; }
  .site-nav { gap: 6px 22px; margin-top: 28px; }
  .site-nav > a, .dropdown > button { font-size: 12px; letter-spacing: .12em; }
  .page { padding: 28px 16px 48px; }
  .menu { left: 50%; transform: translateX(-50%); min-width: 240px; }
}
@media (max-width: 560px) {
  .btn.primary { margin-left: 0; width: 100%; justify-content: center; }
  .search { max-width: none; }
  .transcribe-bar select { min-width: 0; width: 100%; }
  .detail-card { padding: 18px; }
}

/* Prayer requests */
.request-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 20px; margin-top: 14px; align-items: end; }
.request-form label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.request-form label[hidden] { display: none; }
.request-form input:not([type="checkbox"]), .request-form textarea { width: 100%; height: 46px; border: 1px solid var(--border); background: var(--bg); color: var(--text); padding: 0 12px; font: inherit; font-weight: 400; }
.request-form textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.request-form select { width: 100%; font-weight: 400; }
.request-form .wide { grid-column: 1 / -1; }
.request-form .urgent-check { display: inline-flex; width: max-content; }
.request-form .req { color: var(--danger); }
.form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-foot p { margin: 0; font-size: 13px; flex: 1 1 260px; }
.request-thanks, .page-head + .toast { margin: 0 0 18px; }
.request-list { display: grid; gap: 14px; margin: 18px 0 36px; }
.request-card { border: 1px solid var(--border); border-left: 5px solid var(--orange); padding: 18px 22px; background: var(--bg); }
.request-card.prayed { border-left-color: var(--green); }
.request-card.urgent.pending { border-left-color: var(--danger); }
.request-card header { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.request-card h3 { margin: 0 0 4px; font-size: 18px; }
.request-card header p { margin: 0; font-size: 13px; }
.request-status { display: grid; justify-items: end; gap: 4px; }
.request-status .btn.done { background: var(--green); border-color: var(--green); color: #fff; }
.request-tags { margin: 12px 0 6px; }
.request-text { margin: 0; white-space: pre-wrap; line-height: 1.6; font-size: 15px; }
.request-notes { display: grid; gap: 4px; margin-top: 14px; font-size: 12px; }
.request-notes input { height: 38px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 0 10px; font: inherit; font-size: 14px; }
@media (max-width: 600px) { .request-status { justify-items: start; } .request-card { padding: 16px; } }
.voice-box { border: 1px dashed var(--border); padding: 14px 16px; display: grid; gap: 10px; }
.voice-title { font-weight: 600; font-size: 14px; }
.voice-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.voice-controls .btn.primary { margin-left: 0; }
.voice-controls audio { height: 40px; max-width: 100%; }
.voice-controls .file-btn { cursor: pointer; }
.voice-controls .file-btn[hidden], .voice-controls [hidden] { display: none; }
.rec-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--danger); }
.voice-msg { margin: 0; font-size: 13px; }
.request-audio { display: grid; gap: 6px; margin: 10px 0; }
.request-audio audio { width: 100%; max-width: 480px; }

/* Bible reading plan */
.bible-reader { border: 1px solid var(--border); margin-bottom: 24px; }
.bible-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 20px; background: var(--band); }
.bible-head h2 { margin: 0 0 2px; font-size: 18px; word-break: break-word; }
.bible-head p { margin: 0; font-size: 13px; }
.bible-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.bible-actions .btn.primary { margin-left: 0; }
.bible-pdf { display: block; width: 100%; height: 80vh; min-height: 480px; border: 0; background: var(--surface); }
.bible-pdf .detail-card { margin: 20px; }
.bible-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 6px; }
.bible-list li { padding: 10px 14px; border: 1px solid var(--border); }
.bible-list li.current { border-left: 4px solid var(--gold); font-weight: 600; }
.bible-upload-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.bible-upload-form .btn.primary { margin-left: 0; }
.bible-upload p { margin: 0; font-size: 13px; }

/* Bible reading plan: day-by-day view */
:root { --bible-old: #9a6a14; --bible-new: #2f6fd6; --bible-prov: #2e8b3e; }
@media (prefers-color-scheme: dark) { :root { --bible-old: #e3b765; --bible-new: #6a9bff; --bible-prov: #5cc46a; } }
.seg { display: inline-flex; border: 1px solid var(--border); margin: 0 0 18px; }
.seg button, .seg a { border: 0; background: transparent; color: var(--text); padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.seg button + button, .seg a + a { border-left: 1px solid var(--border); }
.seg button[aria-pressed="true"], .seg a.active { background: var(--gold); color: #fff; }
.plan-bar { display: flex; justify-content: flex-end; }
.today-card { border: 1px solid var(--border); border-top: 5px solid var(--gold); padding: 20px 22px; margin-bottom: 18px; background: var(--bg); }
.today-card.done { border-top-color: var(--green); }
.today-top { display: flex; align-items: center; gap: 12px; }
.today-when { flex: 1; text-align: center; }
.today-when .eyebrow { margin: 0; }
.today-when h2 { margin: 4px 0 0; font-family: var(--font-head); font-weight: 400; font-size: 30px; line-height: 1.15; }
.day-step { width: 44px; height: 44px; border: 1px solid var(--border); background: transparent; color: var(--text); font-size: 24px; cursor: pointer; border-radius: 50%; flex: none; }
.day-step:disabled { opacity: .3; cursor: default; }
.readings { list-style: none; padding: 0; margin: 18px 0 8px; display: grid; gap: 10px; }
.reading { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; padding: 12px 16px; border-left: 5px solid var(--part); background: var(--surface); }
.reading.old { --part: var(--bible-old); } .reading.new { --part: var(--bible-new); } .reading.proverbs { --part: var(--bible-prov); }
.reading .part { grid-column: 1; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.reading .ref { grid-column: 1; font-size: 22px; font-weight: 700; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.reading .bk-te { font-size: 18px; font-weight: 600; color: var(--muted); }
.reading .ch { color: var(--part); }
.reading .read-link { grid-column: 2; grid-row: 1 / span 2; color: var(--gold); font-weight: 700; text-decoration: none; padding: 8px 4px; white-space: nowrap; }
.te-text { font-family: "Noto Sans Telugu", "Kohinoor Telugu", "Telugu Sangam MN", var(--font-label); }
.reading-note { margin: 4px 0 0; color: var(--muted); }
.today-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.today-actions .read-btn { margin-left: 0; min-width: 200px; height: 50px; font-size: 14px; }
.today-actions .read-btn.done { background: var(--green); border-color: var(--green); }
.plan-stats .meter { height: 6px; background: var(--surface); margin-top: 10px; border-radius: 3px; overflow: hidden; }
.plan-stats .meter i { display: block; height: 100%; background: var(--green); border-radius: 3px; transition: width .3s; }
.cal-head { align-items: center; }
.plan-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 10px; }
.pday { display: flex; flex-direction: column; gap: 3px; min-height: 96px; padding: 6px 7px; border: 1px solid var(--border); background: var(--bg); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.pday.blank { border: 0; background: transparent; cursor: default; }
.pday:hover { border-color: var(--gold); }
.pday.today { box-shadow: inset 0 0 0 2px var(--gold); }
.pday.selected { background: var(--band); border-color: var(--gold); }
.pday.done { background: var(--green-soft); }
.pday-top { display: flex; justify-content: space-between; align-items: center; }
.pday-top b { font-size: 15px; }
.pday .tick { font-style: normal; color: var(--green); font-weight: 700; visibility: hidden; }
.pday.done .tick { visibility: visible; }
.pread { font-size: 12px; line-height: 1.3; padding-left: 6px; border-left: 3px solid var(--part, var(--border)); overflow-wrap: anywhere; }
.pread.old { --part: var(--bible-old); } .pread.new { --part: var(--bible-new); } .pread.proverbs { --part: var(--bible-prov); color: var(--muted); }
.pread.note { font-style: italic; color: var(--muted); }
.pread .te { display: none; font-family: "Noto Sans Telugu", "Kohinoor Telugu", "Telugu Sangam MN", var(--font-label); }
body[data-bible-lang="te"] .pread .en { display: none; }
body[data-bible-lang="te"] .pread .te { display: inline; }
.plan-legend .sw.old { background: var(--bible-old); } .plan-legend .sw.new { background: var(--bible-new); } .plan-legend .sw.proverbs { background: var(--bible-prov); }
@media (max-width: 700px) {
  .today-card { padding: 16px; }
  .today-when h2 { font-size: 24px; }
  .reading .ref { font-size: 19px; }
  .pday { min-height: 54px; padding: 5px; align-items: center; }
  .pday .pread { display: none; }
  .pday-top { flex-direction: column; gap: 2px; }
  .plan-bar { justify-content: stretch; } .plan-bar .seg { width: 100%; } .plan-bar .seg button { flex: 1; }
}
button.reading { width: 100%; border: 0; border-left: 5px solid var(--part); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
button.reading:hover, button.reading:focus-visible { background: var(--band); }
.readings li { list-style: none; }
.reader { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: flex; flex-direction: column; }
.reader[hidden] { display: none; }
body.reading-open { overflow: hidden; }
.rd-head { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--band); }
.rd-head h2 { flex: 1; margin: 0; font-family: var(--font-head); font-weight: 400; font-size: 26px; line-height: 1.2; }
.rd-sub { font-family: var(--font-label); font-size: 18px; color: var(--muted); margin-left: 6px; }
.rd-tools { display: flex; gap: 6px; }
.rd-btn { width: 44px; height: 44px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.rd-btn.close { font-size: 18px; }
.rd-body { flex: 1; overflow-y: auto; padding: 8px 20px 40px; --verse-size: 18px; }
.rd-body > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.rd-chapter h3 { font-family: var(--font-head); font-weight: 400; font-size: 24px; color: var(--gold); margin: 28px auto 12px; }
.verse { font-size: var(--verse-size); line-height: 1.7; margin: 0 auto 12px; }
.verse sup { font-size: .6em; font-weight: 700; color: var(--gold); margin-right: 6px; }
.verse .v-en + .v-te { display: block; margin-top: 4px; color: var(--muted); font-size: .95em; }
.rd-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 20px; border-top: 1px solid var(--border); background: var(--band); }
.rd-foot .read-btn { margin-left: 0; height: 46px; }
.rd-foot .read-btn.done { background: var(--green); border-color: var(--green); }
@media (max-width: 600px) { .rd-head { padding: 10px 12px; } .rd-head h2 { font-size: 20px; } .rd-body { padding: 4px 16px 32px; } .rd-foot small { order: 2; width: 100%; text-align: center; } .rd-foot .read-btn { width: 100%; } }
.rd-chapter h3 .ver { font-family: var(--font-label); font-size: 12px; letter-spacing: .1em; color: var(--muted); }
.rd-notice { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 32px auto 0; }
.rd-source a { color: var(--gold); }
.prepared-note { margin: 0 0 12px; padding: 10px 14px; background: var(--band); border-left: 4px solid var(--gold); font-size: 14px; }

/* Faith Confessions */
html[data-fc="en"] .fc-lang:not([data-l="en"]), html[data-fc="te"] .fc-lang:not([data-l="te"]),
html[data-fc="ta"] .fc-lang:not([data-l="ta"]), html[data-fc="hi"] .fc-lang:not([data-l="hi"]) { display: none; }
html:not([data-fc]) .fc-lang:not([data-l="en"]) { display: none; }
.fc-langs { flex-wrap: wrap; }
.fc-intro { border: 1px solid var(--border); background: var(--band); padding: 12px 18px; margin: 0 0 24px; }
.fc-intro summary { cursor: pointer; font-weight: 600; color: var(--gold); }
.fc-intro p { margin: 10px 0 0; line-height: 1.6; }
.fc-grid { list-style: none; padding: 0; margin: 0 0 36px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.fc-card { display: block; border: 1px solid var(--border); background: var(--bg); color: var(--text); text-decoration: none; overflow: hidden; transition: box-shadow .15s, transform .15s; height: 100%; }
.fc-card:hover, .fc-card:focus-visible { box-shadow: var(--menu-shadow); transform: translateY(-2px); }
.fc-card img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface); }
.fc-card-body { display: block; padding: 12px 14px 14px; }
.fc-card-body strong { display: block; font-size: 18px; line-height: 1.3; }
.fc-card-body em { display: block; font-style: normal; font-size: 13px; color: var(--muted); margin-top: 4px; }
.fc-prayers { list-style: none; padding: 0; margin: 0 0 24px; border-top: 1px solid var(--border); }
.fc-prayers a { display: flex; justify-content: space-between; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 600; }
.fc-prayers a:hover { color: var(--gold); }
.fc-source { font-size: 13px; color: var(--muted); }
.fc-back { margin: 0 0 14px; }
.fc-back a, .fc-noaudio a, .fc-steps a { color: var(--gold); }
.fc-topic { max-width: 760px; margin: 0 auto; }
.fc-banner { display: block; width: 100%; max-height: 340px; object-fit: cover; margin-bottom: 18px; }
.fc-topic h1 { font-family: var(--font-head); font-weight: 400; font-size: 34px; margin: 0 0 16px; line-height: 1.25; }
.fc-audio { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; background: var(--band); margin-bottom: 22px; }
.fc-audio span { font-weight: 600; color: var(--gold); }
.fc-audio audio { flex: 1; min-width: 220px; }
.fc-noaudio { font-size: 14px; color: var(--muted); margin: 0 0 20px; }
.fc-yt { position: relative; aspect-ratio: 16 / 9; background: #000; margin-bottom: 16px; overflow: hidden; }
.fc-yt button { all: unset; cursor: pointer; position: absolute; inset: 0; display: grid; place-items: center; }
.fc-yt button img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fc-yt-play { position: relative; width: 68px; height: 48px; border-radius: 12px; background: rgba(120, 78, 5, .92); color: #fff; display: grid; place-items: center; font-size: 22px; padding-left: 3px; box-sizing: border-box; }
.fc-yt button:hover .fc-yt-play, .fc-yt button:focus-visible .fc-yt-play { background: #c00; }
.fc-yt button:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.fc-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.fc-yt.playing button { display: none; }
.fc-intro-video { margin: 0 0 18px; }
.fc-intro-video video { display: block; width: 100%; max-height: 420px; background: #000; }
.fc-list { list-style: none; counter-reset: fc; padding: 0; margin: 0; }
.fc-list > li { counter-increment: fc; position: relative; border: 1px solid var(--border); padding: 18px 20px 18px 56px; margin-bottom: 16px; }
.fc-list > li::before { content: counter(fc); position: absolute; left: 16px; top: 18px; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: #fff; font: 600 14px/28px var(--font-label); text-align: center; }
.fc-label { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.fc-verse { margin: 0 0 14px; font-size: 18px; line-height: 1.65; }
blockquote.fc-verse { padding: 0 0 0 14px; border-left: 3px solid var(--gold); font-style: italic; }
.fc-verse cite { display: block; font-style: normal; font-weight: 600; color: var(--gold); margin-top: 6px; font-size: 15px; }
.fc-declare { margin: 0 0 8px; font-size: 18px; line-height: 1.7; }
.fc-iam-line { margin: 0 0 6px; font-size: 20px; line-height: 1.5; }
.fc-iam-line strong { color: var(--gold); }
.fc-iam .fc-verse { font-size: 16px; color: var(--muted); font-style: italic; margin-bottom: 4px; }
.fc-ref { margin: 0; font-weight: 600; color: var(--gold); font-size: 15px; }
.fc-prayer h3 { font-family: var(--font-label); color: var(--gold); font-size: 16px; letter-spacing: .06em; margin: 22px 0 6px; }
.fc-prayer p { font-size: 18px; line-height: 1.75; margin: 0 0 12px; }
.fc-steps { display: flex; justify-content: space-between; gap: 16px; max-width: 760px; margin: 28px auto 0; font-weight: 600; }
@media (max-width: 600px) {
  .fc-topic h1 { font-size: 28px; }
  .fc-list > li { padding: 14px 14px 14px 48px; }
  .fc-list > li::before { left: 12px; top: 14px; }
  .fc-verse, .fc-declare, .fc-prayer p { font-size: 17px; }
}
.fc-section { font-family: var(--font-head); font-weight: 400; font-size: 26px; margin: 0 0 10px; }
.fc-topic:not([lang="en"]) .fc-verse { font-style: normal; }
.fc-topic:not([lang="en"]) .fc-label { letter-spacing: 0; text-transform: none; font-size: 14px; }
.tab-count { display: inline-block; min-width: 22px; padding: 0 7px; margin-left: 6px; border-radius: 999px; background: var(--orange-soft); color: var(--orange); font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
.requests-jump { margin: -8px 0 24px; font-weight: 600; }

/* 24/7 attendance entry */
.att-day { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.att-when { flex: 1; text-align: center; }
.att-when h2 { font-family: var(--font-head); font-weight: 400; font-size: 28px; margin: 2px 0 8px; }
.att-pick { display: inline-flex; gap: 8px; align-items: center; }
.att-pick input { font: inherit; padding: 6px 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.day-step.off { visibility: hidden; }
.att-strip { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 6px 0 6px; }
.att-dot { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--text); border: 2px solid transparent; }
.att-dot.full { background: var(--ok-3); color: #fff; }
.att-dot.part { background: var(--ok-1); color: var(--ok-ink-1); }
.att-dot.none { background: var(--surface); border-color: var(--border); }
.att-dot.future { color: var(--border); }
.att-dot.chosen { border-color: var(--gold); box-shadow: 0 0 0 2px var(--bg) inset; }
.att-legend { text-align: center; font-size: 13px; margin: 0 0 20px; }
.att-legend .att-dot { width: 12px; height: 12px; vertical-align: -1px; margin: 0 4px 0 12px; border-width: 1px; }
.att-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; padding: 14px 18px; background: var(--band); margin-bottom: 16px; }
.att-summary strong { font-family: var(--font-head); font-weight: 400; font-size: 28px; }
.att-summary .meter { flex: 1 1 200px; }
.att-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-bottom: 16px; }
.att-tools .search { flex: 0 1 320px; }
.att-help { margin: 0; font-size: 14px; }
.att-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.att-slot { border: 1px solid var(--border); border-left: 4px solid var(--gap-red); padding: 12px 14px; background: var(--bg); }
.att-slot.covered { border-left-color: var(--ok-3); }
.att-slot header { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 10px; }
.att-count { font-size: 13px; color: var(--muted); white-space: nowrap; }
.att-names { display: flex; flex-wrap: wrap; gap: 8px; }
.att-name { font: inherit; font-size: 15px; padding: 8px 14px; min-height: 40px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.att-name:hover { border-color: var(--gold); }
.att-name.on { background: var(--ok-3); border-color: var(--ok-3); color: #fff; }
.att-name.on::before { content: "✓ "; }
.att-name.match { outline: 2px solid var(--accent); outline-offset: 1px; }
.att-name:disabled { opacity: .6; }
.att-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 12px; font-size: 14px; }
.att-add { display: flex; gap: 6px; flex: 1 1 220px; }
.att-add input { flex: 1; min-width: 0; font: inherit; font-size: 14px; padding: 6px 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
@media (max-width: 600px) {
  .att-slots { grid-template-columns: 1fr; }
  .att-when h2 { font-size: 22px; }
  .att-dot { width: 30px; height: 30px; }
}
.att-summary .meter i { display: block; height: 100%; background: var(--ok-3); border-radius: 4px; transition: width .2s; }
.att-day a.day-step { display: grid; place-items: center; text-decoration: none; }
#toast.toast:not([hidden]) { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; box-shadow: var(--menu-shadow); margin: 0; }
.sub-tabs { overflow-x: auto; scrollbar-width: none; }
.sub-tabs a { white-space: nowrap; flex: none; }

/* Morning Intercessory Prayers */
.mp-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 22px; margin: 0 0 28px; background: var(--band); color: inherit; text-decoration: none; border-left: 4px solid var(--gold); }
.mp-banner-text { display: flex; flex-direction: column; gap: 2px; }
.mp-banner-text strong { font-size: 20px; }
.mp-banner-text span:last-child { color: var(--muted); font-size: 15px; }
.mp-banner:hover strong { color: var(--gold); }
.mp-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 28px; align-items: start; margin-bottom: 28px; }
.mp-times { grid-column: 2; grid-row: 1 / span 2; }
.mp-join { background: var(--band); padding: 22px; }
.mp-join-btn { display: flex; align-items: center; justify-content: center; width: 100%; height: 52px; margin: 0; font-size: 15px; box-sizing: border-box; }
.mp-ids { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0 10px; }
.mp-ids dt { font-size: 13px; color: var(--muted); }
.mp-ids dd { margin: 0; font-size: 20px; font-weight: 700; user-select: all; }
.mp-yours { margin: 10px 0 4px; }
.mp-help { font-size: 14px; margin: 6px 0 0; }
.mp-times h2 { margin-top: 0; }
.mp-remind { grid-column: 1; border: 1px solid rgba(0, 0, 0, .1); padding: 22px; }
.mp-remind h2 { margin: 0 0 6px; }
.mp-when { display: flex; flex-direction: column; gap: 6px; font-weight: 600; margin: 14px 0; }
.mp-when select { font: inherit; font-weight: 400; padding: 10px; border: 1px solid rgba(0, 0, 0, .2); background: #fff; max-width: 100%; }
.mp-remind-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mp-remind-actions .btn.primary { margin-left: 0; }
.mp-remind-msg { min-height: 1.4em; margin: 12px 0 0; font-size: 15px; }
.mp-remind-msg.ok { color: #2e7d32; }
.mp-remind-msg.warn { color: var(--gold); }
.mp-remind-msg.error { color: #b3261e; }
.mp-times table { width: 100%; border-collapse: collapse; }
.mp-times th, .mp-times td { text-align: left; padding: 9px 6px; border-bottom: 1px solid rgba(0, 0, 0, .08); vertical-align: top; }
.mp-times th { font-weight: 500; }
.mp-prev { display: block; font-size: 13px; color: var(--muted); }
.mp-flyer { margin: 0; }
.mp-flyer img { display: block; width: 100%; height: auto; }
@media (max-width: 760px) { .mp-layout { grid-template-columns: 1fr; } .mp-times, .mp-remind { grid-column: 1; grid-row: auto; } }

/* Faith Confessions: video or audio only (only matters where a language has both) */
.fc-media-pick { margin: 0 0 12px; }
html[data-fc-media="audio"] .fc-media-pick ~ .fc-media[data-media="video"],
html:not([data-fc-media="audio"]) .fc-media-pick ~ .fc-media[data-media="audio"] { display: none; }

/* LSM Kids: adult overview and leaders page */
.kids-lead-link { margin: 0 0 20px; }
.kids-lead-link .btn.primary { margin-left: 0; }
.kids-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 28px; }
.kids-group { border: 1px solid var(--border); border-top: 6px solid #ff8a00; padding: 20px 22px; background: var(--bg); }
.kids-group-gems { border-top-color: #5b3fb5; }
.kids-group h2 { margin: 2px 0 12px; }
.kids-group h3 { margin: 2px 0 8px; }
.kids-group blockquote { margin: 0 0 14px; font-style: italic; }
.kids-group cite { font-style: normal; color: var(--muted); }
.kids-how ol { padding-left: 22px; }
.kids-how li { margin-bottom: 8px; }
.kids-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 18px; }
.kids-sum div { background: var(--band); padding: 14px; text-align: center; }
.kids-sum strong { display: block; font-size: 26px; }
.kids-sum span { font-size: 14px; color: var(--muted); }
.kids-add { border: 1px solid var(--border); padding: 12px 16px; margin: 0 0 20px; }
.kids-add summary { cursor: pointer; font-weight: 600; color: var(--gold); }
.kids-add form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-top: 12px; }
.kids-add label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; flex: 1 1 180px; }
.kids-add input, .kids-add select { font: inherit; font-weight: 400; padding: 9px 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.kids-add .btn.primary { margin-left: 0; }
.kids-list { list-style: none; padding: 0; margin: 0 0 30px; }
.kids-row { display: grid; grid-template-columns: minmax(0, 1.4fr) auto minmax(0, 1fr); gap: 8px 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.kids-row.is-new { background: var(--band); padding-left: 10px; padding-right: 10px; }
.kids-who strong { display: block; font-size: 17px; }
.kids-who .muted { font-size: 14px; }
.kids-week { list-style: none; display: flex; gap: 4px; padding: 0; margin: 0; }
.kids-week li { width: 26px; height: 26px; display: grid; place-items: center; font-size: 12px; background: var(--gray-soft); color: var(--muted); border-radius: 50%; }
.kids-week li.done { background: var(--ok-3); color: #fff; font-weight: 700; }
.kids-week li.future { opacity: .4; }
.kids-reward { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.kids-reward .btn.primary { margin-left: 0; }
.kids-actions { grid-column: 1 / -1; }
.kids-actions summary { cursor: pointer; color: var(--gold); font-size: 14px; font-weight: 600; }
.kids-link { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.kids-link input { flex: 1 1 260px; min-width: 0; font: 14px ui-monospace, monospace; padding: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.kids-more { display: flex; gap: 18px; flex-wrap: wrap; }
.kids-more form { margin: 0; }
.link-button.danger { color: var(--danger); }
.kids-new-note { margin: 10px 0 0; color: var(--green); font-weight: 600; }
.kids-devs li { margin-bottom: 6px; }
.kids-devs li.today a { font-weight: 700; }
.kids-today-tag { color: var(--green); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 640px) {
  .kids-row { grid-template-columns: 1fr; }
  .kids-reward { align-items: flex-start; text-align: left; }
  .kids-sum strong { font-size: 22px; }
}

/* Faith Confessions read-only for non-admins */
body.no-copy .page { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.no-copy .page img { pointer-events: none; }
@media print { body.no-copy .page { display: none; } }

/* Language switch */
.lang-switch { display: inline-flex; border: 1px solid var(--border); margin: 6px 0 0; }
.lang-switch button { border: 0; background: transparent; color: var(--text); padding: 5px 12px; font: 600 14px var(--font-label); cursor: pointer; }
.lang-switch button + button { border-left: 1px solid var(--border); }
.lang-switch button[aria-pressed="true"] { background: var(--gold); color: #fff; }
html[lang="te"] body { font-family: "Noto Sans Telugu", var(--font-label); }

/* Home: greeting, next Morning Prayer, big tiles */
.home-hi { margin: 0 0 18px; }
.home-hi h1 { margin: 2px 0 4px; }
.home-meet { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; background: var(--band); padding: 16px 20px; margin: 0 0 20px; border-left: 4px solid var(--gold); }
.home-meet p { margin: 0; }
.home-meet-time { font-size: 20px; font-weight: 600; margin: 4px 0 !important; }
.home-meet .btn.primary { margin-left: 0; }
.home-tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.home-tile { display: flex; align-items: center; gap: 14px; padding: 18px; background: var(--bg); border: 1px solid var(--border); border-radius: 14px;
  text-decoration: none; color: var(--text); min-height: 92px; transition: border-color .15s, transform .15s; }
.home-tile:hover, .home-tile:focus-visible { border-color: var(--gold); transform: translateY(-2px); }
.home-tile-icon { font-size: 34px; width: 56px; height: 56px; flex: none; display: grid; place-items: center; background: var(--band); border-radius: 14px; }
.home-tile-text { display: flex; flex-direction: column; gap: 2px; }
.home-tile-text strong { font-size: 18px; }
.home-tile-text span { color: var(--muted); font-size: 14px; line-height: 1.35; }

/* Phone: app-style bottom bar and menu sheet (hidden on larger screens) */
.tab-bar, .menu-sheet { display: none; }
@media (max-width: 760px) {
  body.signed-in { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  body.signed-in .site-nav, body.signed-in .user-bar { display: none; }
  body.signed-in .site-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; }
  body.signed-in .site-header .brand span { font-size: 18px; }
  body.signed-in .site-header .brand img { width: 30px; height: 30px; }
  body.signed-in .lang-switch { margin: 0; }
  .tab-bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: var(--bg); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(0, 0, 0, .06); }
  .tab-bar a, .tab-bar button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; border: 0; background: none;
    color: var(--muted); font: 600 11px var(--font-label); text-decoration: none; text-align: center; line-height: 1.2; cursor: pointer; }
  .tab-bar span { font-size: 22px; line-height: 1; }
  .tab-bar .active { color: var(--gold); }
  .menu-sheet:not([hidden]) { display: flex; position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .4); align-items: flex-end; }
  .menu-sheet-panel { width: 100%; max-height: 85vh; overflow: auto; background: var(--bg); border-radius: 18px 18px 0 0; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); }
  .menu-sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 18px; }
  .menu-sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .menu-sheet-grid a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border: 1px solid var(--border); border-radius: 14px;
    text-decoration: none; color: var(--text); font: 600 13px var(--font-label); text-align: center; line-height: 1.25; }
  .menu-sheet-grid span { font-size: 28px; }
  .menu-sheet-user { margin: 14px 0 0; text-align: center; font-size: 14px; }
  body.sheet-open { overflow: hidden; }
  .home-tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .home-tile { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; min-height: 0; }
  .home-tile-icon { width: 48px; height: 48px; font-size: 28px; }
  .home-tile-text strong { font-size: 16px; }
  .home-tile-text span { font-size: 13px; }
  .site-footer { padding-bottom: 24px; }
}

/* Users page */
.pw-box { background: var(--green-soft); border-left: 4px solid var(--green); padding: 14px 18px; margin: 0 0 20px; }
.pw-box p { margin: 0 0 8px; }
.pw-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pw-row code { font-size: 20px; padding: 6px 12px; background: var(--bg); border: 1px solid var(--border); user-select: all; }
.user-add, .user-edit { margin: 0 0 18px; }
.user-add { border: 1px solid var(--border); padding: 12px 16px; }
.user-add > summary, .user-edit > summary { cursor: pointer; font-weight: 600; color: var(--gold); }
.user-form { margin-top: 14px; }
.user-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 14px; }
.user-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; }
.user-fields input, .user-fields select { font: inherit; font-weight: 400; padding: 9px 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.user-fields .inline-check { flex-direction: row; align-items: center; gap: 8px; padding-top: 22px; }
.perm-boxes { border: 1px solid var(--border); padding: 10px 14px 14px; margin: 0 0 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 16px; }
.perm-boxes legend { font-weight: 600; font-size: 14px; padding: 0 6px; }
.perm-boxes[disabled] { opacity: .55; }
.perm-box { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.perm-box input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.perm-box strong { display: block; font-size: 15px; }
.perm-box small { color: var(--muted); font-size: 13px; }
.user-form .btn.primary { margin-left: 0; }
.user-list { list-style: none; padding: 0; margin: 0 0 30px; }
.user-card { border: 1px solid var(--border); padding: 14px 18px; margin-bottom: 12px; }
.user-card.off { opacity: .65; }
.user-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; }
.user-name { display: block; font-size: 18px; }
.role-tag { font: 600 12px var(--font-label); text-transform: uppercase; letter-spacing: .05em; padding: 4px 10px; background: var(--band); color: var(--gold); }
.role-tag.role-admin { background: var(--gold); color: #fff; }
.off-tag { background: var(--gray-soft); color: var(--muted); }
.perm-tags { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.perm-tags li { font-size: 13px; padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; }
.user-edit { margin: 4px 0 0; }
.user-more { display: flex; gap: 20px; margin-top: 4px; }
.user-more form { margin: 0; }
.roles-help dl div { margin-bottom: 10px; }
.roles-help dt { font-weight: 600; }
.roles-help dd { margin: 2px 0 0; color: var(--muted); }
@media (min-width: 761px) {
  .site-header { position: relative; }
  .lang-switch { position: absolute; top: 14px; right: 16px; margin: 0; }
}

/* Sunday services */
.sun-hero { background: var(--band); border-left: 4px solid var(--gold); padding: 20px 22px; margin: 0 0 22px; }
.sun-hero h1 { margin: 4px 0 6px; }
.sun-hero p:last-child { margin: 0; color: var(--muted); }
.sun-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.sun-card { border: 1px solid var(--border); border-radius: 14px; padding: 18px; background: var(--bg); }
.sun-card.live { border-color: var(--green); box-shadow: 0 0 0 2px var(--green-soft); }
.sun-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.sun-head h2 { margin: 0; font-size: 20px; }
.sun-live { color: var(--green); font-weight: 700; font-size: 14px; }
.sun-sgt { margin: 10px 0 2px; }
.sun-sgt strong { font-size: 24px; }
.sun-yours { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.sun-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sun-actions .btn.primary, .sun-way .btn.primary { margin-left: 0; }
.sun-times summary { cursor: pointer; color: var(--gold); font-weight: 600; font-size: 14px; }
.sun-times table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
.sun-times th, .sun-times td { text-align: left; padding: 5px 4px; border-bottom: 1px solid var(--border); font-weight: 400; }
.sun-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.sun-way { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.sun-way h2 { margin: 0 0 8px; font-size: 19px; }
.sun-way address { font-style: normal; margin: 0 0 12px; line-height: 1.5; }
.home-sunday { border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; margin: 0 0 20px; }
.home-sunday ul { list-style: none; padding: 0; margin: 6px 0 8px; }
.home-sunday li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.home-sun-time { color: var(--muted); white-space: nowrap; }
.sun-section { margin: 26px 0 10px; font-size: 22px; }
.sun-note { margin: -4px 0 12px; }
.sun-mode { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.sun-about { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.sun-nolink { font-size: 14px; align-self: center; }
.sun-card .eyebrow { margin: 0 0 4px; }

/* GIP locations */
.gip-intro { background: var(--band); border-left: 4px solid var(--gold); padding: 12px 16px; margin: 0 0 16px; }
.gip-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 6px; }
.gip-tools .btn.primary { margin-left: 0; }
.gip-tools .search { flex: 1 1 240px; }
.gip-tools select { font: inherit; padding: 9px 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.gip-status { min-height: 1.4em; margin: 4px 0 12px; }
.gip-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.gip-card { border: 1px solid var(--border); border-radius: 14px; padding: 16px; background: var(--bg); }
.gip-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.gip-top h2 { margin: 0; font-size: 19px; }
.gip-top p { margin: 2px 0 0; font-size: 14px; }
.gip-km { background: var(--green-soft); color: var(--green); font-weight: 700; font-size: 13px; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.gip-leader { margin: 10px 0 4px; }
.gip-leader .muted { font-size: 13px; display: block; }
.gip-time { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.gip-contact { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gip-phone { font-size: 13px; color: var(--muted); width: 100%; }
.gip-admin { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 14px; }
.gip-admin p { margin: 0 0 4px; }
.gip-admin summary, .gip-manage summary { cursor: pointer; color: var(--gold); font-weight: 600; margin-top: 6px; }
.gip-note { color: var(--danger); }
.gip-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin: 10px 0; }
.gip-form label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; font-weight: 600; }
.gip-form input, .gip-form textarea { font: inherit; font-weight: 400; padding: 7px 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.gip-form .wide { grid-column: 1 / -1; }
.gip-form .btn.primary { margin-left: 0; justify-self: start; }
.gip-help { font-size: 12px; margin: 0; }
.gip-manage { border-top: 1px solid var(--border); padding-top: 16px; }
.gip-month { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 10px; }
.gip-month label { display: flex; flex-direction: column; gap: 3px; font-size: 14px; font-weight: 600; }
.gip-month input { font: inherit; font-weight: 400; padding: 7px 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
