/* ChurchBright member app (PWA) — app shell, touch-sized components, dark mode. Loaded after assets/css/app.css;
   the church colour arrives as --church / --primary from the layout. Other modules' member pages use the core UI kit
   (card, btn, field, list…) plus these app classes: m-section, m-section-head, m-list, m-row, m-tiles, m-tile, m-card, m-empty.
   Tokens: the core names (--ink, --surface, --border, --r*, --shadow*) are re-valued here for the app; --m-accent is the
   church colour tuned for text and icons (darkened for light brands, lifted in dark mode) and --m-hero the brand gradient. */
body.member-app {
  --font: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --ink: #0b1224; --ink-2: #28324a; --muted: #5b6480; --faint: #8a93ad;
  --bg: #f6f7fb; --surface: #ffffff; --surface-2: #f9fafc; --surface-3: #f2f4f9;
  --border: rgba(11, 18, 36, .08); --border-strong: rgba(11, 18, 36, .14);
  --input-border: #7c859f; --input-border-hover: #5f6985; --input-ph: #626c88;
  --r-sm: 6px; --r: 10px; --r-lg: 14px; --r-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(11, 18, 36, .04);
  --shadow: 0 1px 2px rgba(11, 18, 36, .04), 0 6px 20px -12px rgba(11, 18, 36, .12);
  --shadow-lg: 0 12px 40px -12px rgba(11, 18, 36, .25), 0 0 0 1px rgba(11, 18, 36, .06);
  --m-accent: var(--primary);
  --m-deep: color-mix(in srgb, var(--church) 58%, #0b1224);
  --m-shade: rgba(0, 0, 0, .2);
  --m-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --m-hero: var(--m-grain), radial-gradient(120% 100% at 100% 0%, rgba(255, 255, 255, .22), transparent 55%), radial-gradient(90% 80% at 0% 100%, var(--m-shade), transparent 60%), linear-gradient(135deg, var(--m-deep), var(--church) 88%);
  --m-ring: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent);
  --m-ease: cubic-bezier(.2, .8, .2, 1); --m-fast: 150ms; --m-slow: 220ms;
  --m-top-h: 56px; --m-tabs-h: 60px; --m-gutter: 16px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; text-rendering: optimizeLegibility;
  padding-bottom: calc(var(--m-tabs-h) + var(--safe-b));
}
body.member-app.no-tabs { padding-bottom: var(--safe-b); }
body.member-app.brand-light { --m-accent: var(--primary-ink); --m-deep: color-mix(in srgb, var(--church) 84%, #0b1224); --m-shade: rgba(0, 0, 0, .06); }
body.member-app a { -webkit-touch-callout: none; }
:where(.member-app) a { color: var(--m-accent); }
.member-app :focus-visible { outline-color: var(--m-accent); }
.member-app :is(.m-post-meta, .m-hello-sub, .m-kv dd, .m-row-text small, .badge, .mx-thumb-badge, .mx-countdown, .mx-countdown-inline, .mx-times-t, .gift-amount, .give-summary strong, .ev-datebox, .pw-card-when, .pw-count, .m-idcard-no, .m-testimony-by) { font-variant-numeric: tabular-nums; }
.member-app h1, .member-app h2, .member-app h3 { letter-spacing: -.01em; }

/* ── Top bar ── */
.m-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 6px; min-height: calc(var(--m-top-h) + var(--safe-t));
  padding: var(--safe-t) calc(8px + var(--safe-r)) 0 calc(8px + var(--safe-l)); background: color-mix(in srgb, var(--surface) 72%, transparent);
  -webkit-backdrop-filter: saturate(1.5) blur(12px); backdrop-filter: saturate(1.5) blur(12px); box-shadow: 0 1px 0 var(--border);
  transition: background var(--m-slow) var(--m-ease), box-shadow var(--m-slow) var(--m-ease); }
.is-home .m-top:not(.is-scrolled) { background: color-mix(in srgb, var(--bg) 60%, transparent); box-shadow: 0 1px 0 transparent; }
.m-brand { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 8px 6px 6px; border-radius: 12px; color: var(--ink) !important; text-decoration: none !important; }
.m-brand:active { background: var(--surface-3); }
.m-logo { width: 32px; height: 32px; border-radius: 9px; object-fit: contain; background: #fff; box-shadow: 0 0 0 1px var(--border); flex-shrink: 0; }
.m-brand-name { font-weight: 600; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-top-title { flex: 1; min-width: 0; font-weight: 600; font-size: 17px; letter-spacing: -.01em; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.m-top-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--m-accent) !important; flex-shrink: 0; transition: background var(--m-fast) var(--m-ease), transform var(--m-fast) var(--m-ease); }
.m-top-btn:active { background: var(--surface-3); transform: scale(.94); }
.m-top-right { margin-left: auto; min-width: 44px; display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-shrink: 0; }
.m-top-avatar { display: inline-flex; padding: 6px; border-radius: 999px; }
.m-top-avatar .avatar { width: 32px; height: 32px; font-size: 12px; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--border); }
.m-top-avatar:active .avatar { transform: scale(.94); }
.m-top-signin { font-weight: 600; font-size: 14px; height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-ink) !important; text-decoration: none !important; }
.m-net { position: sticky; top: calc(var(--m-top-h) + var(--safe-t)); z-index: 39; text-align: center; font-size: 13px; font-weight: 600; padding: 7px 12px; background: var(--ink); color: var(--surface); }
.m-net.ok { background: var(--success); color: #fff; }

/* ── Content ── */
.m-main { max-width: 480px; margin: 0 auto; padding: 16px calc(var(--m-gutter) + var(--safe-r)) 28px calc(var(--m-gutter) + var(--safe-l)); outline: none; min-height: calc(100vh - var(--m-top-h) - var(--m-tabs-h)); }
.m-flash { border-radius: var(--r-lg); }
.m-section { margin: 24px 0; }
.m-section:first-child { margin-top: 4px; }
.m-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 2px 10px; }
.m-section-head h2 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin: 0; color: var(--ink); }
.m-section-head a { font-size: 14px; font-weight: 600; color: var(--m-accent); text-decoration: none; white-space: nowrap; }
.m-h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin: 0 0 6px; color: var(--ink); }
.m-lead { color: var(--muted); margin: 0 0 16px; font-size: 15.5px; }
.m-muted { color: var(--muted); } .m-small { font-size: 13px; }
.m-group-label { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px var(--m-gutter) 8px; }
.m-group-label:first-child { margin-top: 4px; }

/* Home */
.m-hello { margin: 4px 2px 18px; }
.m-hello-title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin: 0; color: var(--ink); }
.m-hello-sub { color: var(--muted); font-size: 14px; margin-top: 3px; }
.m-hero, .m-welcome { position: relative; overflow: hidden; border-radius: var(--r-xl); color: var(--on-church); background: var(--m-hero);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 16px 32px -18px color-mix(in srgb, var(--church) 60%, #000); }
.m-welcome { padding: 20px 20px 18px; margin-bottom: 20px; }
.m-welcome h2 { color: inherit; font-size: 21px; font-weight: 700; letter-spacing: -.015em; margin: 0 0 6px; }
.m-welcome p { opacity: .88; margin: 0 0 16px; font-size: 15px; line-height: 1.5; }
.m-welcome .btn { height: 40px; border-radius: 10px; }
.m-welcome .btn-secondary { background: var(--on-church); color: var(--church) !important; border-color: transparent; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.m-welcome .btn-ghost { background: color-mix(in srgb, var(--on-church) 12%, transparent); color: var(--on-church) !important; border-color: color-mix(in srgb, var(--on-church) 35%, transparent); }
.m-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 24px; }
.m-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 4px 11px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  color: var(--ink) !important; text-decoration: none !important; font-size: 12px; font-weight: 600; text-align: center; line-height: 1.2; min-height: 86px; transition: transform var(--m-fast) var(--m-ease), background var(--m-fast) var(--m-ease); }
.m-tile:active { transform: scale(.98); background: var(--surface-2); }
.m-tile-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--m-accent); }
.m-tile-icon .icon { width: 22px; height: 22px; }
.m-tile span:last-child { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Posts / feed */
.m-feed { display: flex; flex-direction: column; gap: 12px; }
.m-post { display: block; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; color: var(--ink) !important; text-decoration: none !important; transition: transform var(--m-fast) var(--m-ease); }
.m-post:active { transform: scale(.99); }
.m-post-img { display: block; aspect-ratio: 16 / 9; background: var(--surface-3); }
.m-post-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m-post-body { display: flex; flex-direction: column; gap: 5px; padding: 14px 16px 15px; }
.m-post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.m-post-title { font-size: 16.5px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; color: var(--ink); }
.m-post-text { color: var(--ink-2); font-size: 15px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.m-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; background: var(--primary-soft); color: var(--primary-ink); }
.m-pill-pin { background: var(--warning-soft); color: var(--warning); }
.m-article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.m-article-img img { width: 100%; display: block; max-height: 420px; object-fit: cover; }
.m-article-body { padding: 18px 18px 20px; }
.m-article-title { font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; margin: 8px 0 12px; color: var(--ink); }
.m-prose { font-size: 16.5px; line-height: 1.7; color: var(--ink-2); overflow-wrap: anywhere; }
.m-prose p { margin: 0 0 1em; }
.m-prose p:last-child { margin-bottom: 0; }

/* Devotional card (Home): a tinted card; it becomes the hero when nothing else on the page is one */
.m-devo-card { display: block; position: relative; padding: 18px 18px 16px; border-radius: var(--r-lg); color: var(--ink) !important; text-decoration: none !important; border: 1px solid var(--border); box-shadow: var(--shadow);
  background: linear-gradient(180deg, color-mix(in srgb, var(--church) 7%, var(--surface)), var(--surface) 70%); transition: transform var(--m-fast) var(--m-ease); }
.m-devo-card:active { transform: scale(.99); }
.m-devo-kicker { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--m-accent); display: flex; align-items: center; gap: 6px; }
.m-devo-title { display: block; font-size: 19px; font-weight: 600; line-height: 1.25; margin: 8px 0 3px; letter-spacing: -.015em; }
.m-devo-ref { display: block; font-weight: 600; font-size: 13.5px; color: var(--muted); }
.m-devo-text { display: -webkit-box; margin-top: 8px; color: var(--ink-2); font-size: 15px; line-height: 1.5; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.m-devo-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-weight: 600; font-size: 14px; color: var(--m-accent); }
.m-main:not(:has(.mx-banner:not([hidden]))):not(:has(.m-welcome)):not(:has(.mc-hero)) .m-devo-card { color: var(--on-church) !important; background: var(--m-hero); border-color: transparent; padding: 20px 20px 18px; border-radius: var(--r-xl);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 16px 32px -18px color-mix(in srgb, var(--church) 60%, #000); }
.m-main:not(:has(.mx-banner:not([hidden]))):not(:has(.m-welcome)):not(:has(.mc-hero)) .m-devo-card :is(.m-devo-kicker, .m-devo-cta) { color: inherit; opacity: .9; }
.m-main:not(:has(.mx-banner:not([hidden]))):not(:has(.m-welcome)):not(:has(.mc-hero)) .m-devo-card :is(.m-devo-ref, .m-devo-text) { color: inherit; opacity: .86; }
.m-main:not(:has(.mx-banner:not([hidden]))):not(:has(.m-welcome)):not(:has(.mc-hero)) .m-devo-card .m-devo-title { font-size: 21px; font-weight: 700; }

/* Devotional page */
.m-devo-page .m-date { color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
.m-verse { margin: 16px 0; padding: 16px 18px; border-radius: 12px; background: color-mix(in srgb, var(--church) 7%, var(--surface-2)); color: var(--ink); }
.m-verse blockquote { margin: 0; font-size: 17.5px; line-height: 1.6; font-style: italic; color: var(--ink-2); }
.m-verse cite { display: block; margin-top: 8px; font-style: normal; font-weight: 600; font-size: 13.5px; color: var(--m-accent); }
.m-prayer { margin-top: 18px; padding: 16px 18px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.m-prayer h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 6px; font-weight: 600; }
.m-prayer p { margin: 0; font-style: italic; color: var(--ink-2); }
.m-daynav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin-top: 18px; }
.m-daynav a:last-child { justify-self: end; }
.m-row-date { flex-direction: column; line-height: 1; font-weight: 700; font-size: 15px; }

/* Grouped list (More, profile, settings) */
.m-list { list-style: none; margin: 0 0 18px; padding: 0; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); overflow: hidden; }
.m-list > li { position: relative; }
.m-list > li + li::before { content: ""; position: absolute; left: var(--m-gutter); right: 0; top: 0; height: 1px; background: var(--border); pointer-events: none; }
.m-list > li + li:has(> .m-row > .m-row-icon)::before, .m-list > li + li:has(> .m-row > .avatar)::before { left: 60px; }
.m-list > li.m-dir + li.m-dir::before { left: 72px; }
.m-row { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 9px var(--m-gutter); color: var(--ink) !important; text-decoration: none !important; width: 100%; background: none; border: 0; font: inherit; text-align: left; cursor: pointer; transition: background var(--m-fast) var(--m-ease); }
.m-row:active { background: var(--surface-2); }
.m-row-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--m-accent); flex-shrink: 0; }
.m-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.m-row-text strong { font-weight: 500; font-size: 16px; line-height: 1.3; }
.m-row-text small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.m-row-chev { color: var(--faint); flex-shrink: 0; }
.m-row-danger, .m-row-danger .m-row-icon { color: var(--danger) !important; }
.m-row-danger .m-row-icon { background: var(--danger-soft); }
.m-me { display: flex; padding: 14px var(--m-gutter); margin-bottom: 18px; }
.m-me .avatar { width: 56px; height: 56px; font-size: 20px; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--border); }
.m-me .m-row-text strong { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }

/* Profile */
.m-profile-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 24px 16px 16px; margin-bottom: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.m-profile-head .avatar { width: 88px; height: 88px; font-size: 30px; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px color-mix(in srgb, var(--church) 30%, transparent); }
.m-profile-name { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin-top: 10px; color: var(--ink); }
.m-profile-sub { color: var(--muted); font-size: 14px; }
.m-profile-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; margin-top: 16px; }
.m-profile-actions a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 12px; background: var(--surface-2); color: var(--ink) !important; text-decoration: none !important; font-size: 12.5px; font-weight: 600; border: 1px solid var(--border); transition: transform var(--m-fast) var(--m-ease), background var(--m-fast) var(--m-ease); }
.m-profile-actions a:active { transform: scale(.98); background: var(--surface-3); }
.m-profile-actions a .icon { color: var(--m-accent); }
.m-kv { display: grid; grid-template-columns: auto 1fr; gap: 12px 16px; font-size: 15px; margin: 0; }
.m-kv dt { color: var(--muted); } .m-kv dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-weight: 500; }

/* Membership card */
.m-idcard { position: relative; display: flex; flex-direction: column; gap: 24px; margin: 8px auto 20px; max-width: 400px; min-height: 216px; padding: 18px 20px; border-radius: var(--r-xl); overflow: hidden; color: var(--on-church); background: var(--m-hero);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 24px 48px -16px color-mix(in srgb, var(--church) 55%, #000), 0 2px 6px rgba(11, 18, 36, .12); }
.m-idcard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, .09) 50%, transparent 58%); pointer-events: none; }
.m-idcard-top { display: flex; align-items: center; gap: 10px; }
.m-idcard-top img { width: 32px; height: 32px; border-radius: 9px; background: #fff; object-fit: contain; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); flex-shrink: 0; }
.m-idcard-church { font-weight: 600; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-idcard-label { margin-left: auto; flex-shrink: 0; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--on-church) 35%, transparent); opacity: .9; }
.m-idcard-body { display: flex; align-items: flex-end; gap: 14px; margin-top: auto; }
.m-idcard-person { flex: 1; min-width: 0; }
.m-idcard-name { font-size: 20px; font-weight: 700; line-height: 1.15; letter-spacing: -.015em; overflow-wrap: anywhere; }
.m-idcard-status { opacity: .85; font-size: 13.5px; margin-top: 3px; }
.m-idcard-no { margin-top: 12px; font: 600 14px/1 var(--mono); letter-spacing: .1em; opacity: .95; }
.m-idcard-since { font-size: 12px; opacity: .72; margin-top: 6px; }
.m-idcard-qr { background: #fff; border-radius: 12px; padding: 7px; flex-shrink: 0; line-height: 0; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.m-idcard-qr svg { width: 104px; height: 104px; display: block; }
.m-idcard-hint { text-align: center; color: var(--muted); font-size: 14px; max-width: 34ch; margin: 0 auto 16px; }

/* Auth */
.m-auth { max-width: 440px; margin: 8px auto 0; }
.m-auth-head { text-align: center; margin: 12px 0 20px; }
.m-auth-head img { width: 64px; height: 64px; border-radius: 18px; object-fit: contain; background: #fff; box-shadow: 0 0 0 1px var(--border), 0 8px 20px -8px rgba(11, 18, 36, .2); margin-bottom: 14px; }
.m-auth-head h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 4px; }
.m-auth-head p { color: var(--muted); margin: 0; font-size: 15px; }
.m-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 16px; margin-bottom: 14px; }
.m-panel > :last-child { margin-bottom: 0; }
.m-alt { text-align: center; color: var(--muted); font-size: 14.5px; margin: 14px 0 0; }
.m-alt a, .m-alt .link-btn { font-weight: 600; }
.m-code .input { font: 600 30px/1 var(--mono) !important; letter-spacing: .42em; text-indent: .42em; text-align: center; height: 64px !important; border-radius: 12px; background: var(--surface-2); }
.m-code .input::placeholder { letter-spacing: .3em; color: var(--faint); }
.member-app :is(.m-seg, .pw-seg, .cp-seg) { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-3); margin: 0 0 16px; overflow-x: auto; scrollbar-width: none; }
.member-app :is(.m-seg, .pw-seg, .cp-seg) a { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 38px; padding: 0 12px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--ink-2) !important; text-decoration: none !important; white-space: nowrap; transition: background var(--m-fast) var(--m-ease), color var(--m-fast) var(--m-ease); }
.member-app :is(.m-seg, .pw-seg, .cp-seg) a.active { background: var(--surface); color: var(--ink) !important; box-shadow: 0 1px 2px rgba(11, 18, 36, .08), 0 0 0 1px var(--border); }

/* Testimonies */
.m-testimony { position: relative; padding: 18px 18px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.m-testimony::before { content: "\201C"; position: absolute; top: 4px; right: 16px; font: 700 56px/1 var(--font); color: var(--m-accent); opacity: .14; pointer-events: none; }
.m-testimony-title { font-weight: 600; font-size: 16.5px; letter-spacing: -.01em; margin: 0 28px 6px 0; color: var(--ink); }
.m-testimony-text { color: var(--ink-2); font-size: 15.5px; line-height: 1.65; }
.m-testimony-by { margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.m-testimony-by .icon { color: var(--m-accent); }
.m-testimony.featured { border-color: color-mix(in srgb, var(--church) 35%, var(--border)); }
.m-stack { display: flex; flex-direction: column; gap: 12px; }

/* Directory */
.m-dir { display: flex; align-items: center; gap: 12px; padding: 10px var(--m-gutter); min-height: 64px; }
.m-dir .avatar { width: 44px; height: 44px; font-size: 15px; }
.m-dir-name { font-weight: 500; font-size: 16px; }
.m-dir-links { display: flex; gap: 6px; margin-left: auto; }
.m-dir-links a { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--m-accent) !important; transition: transform var(--m-fast) var(--m-ease); }
.m-dir-links a:active { transform: scale(.94); }

/* Empty states & misc */
.m-empty { text-align: center; padding: 36px 20px 32px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.m-empty > .icon { color: var(--m-accent); }
.m-empty h2 { font-size: 17px; font-weight: 600; color: var(--ink); margin: 12px 0 6px; }
.m-empty p { margin: 0 auto 16px; max-width: 38ch; font-size: 15px; }
.m-empty p:last-child { margin-bottom: 0; }
.m-center { text-align: center; }
.m-foot { text-align: center; color: var(--faint); font-size: 12.5px; margin: 28px 0 8px; }
.m-foot a { color: var(--muted); }
.m-steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.m-steps li { position: relative; padding-left: 42px; min-height: 30px; color: var(--ink-2); font-size: 15px; }
.m-steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-ink); font-weight: 600; font-size: 14px; }
.m-app-icon { display: block; width: 96px; height: 96px; margin: 8px auto 0; border-radius: 24px; box-shadow: 0 0 0 1px var(--border), 0 16px 32px -12px rgba(11, 18, 36, .3); }
.m-list-plain { padding-left: 18px; margin: 0; color: var(--muted); font-size: 15px; }
.m-list-plain li { margin: 4px 0; }
.m-panel h2 { font-size: 17px; font-weight: 600; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.m-panel h2 .icon { color: var(--m-accent); }

/* ── Bottom tab bar ── */
.m-tabs { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(var(--tabs, 5), minmax(0, 1fr));
  height: calc(var(--m-tabs-h) + var(--safe-b)); padding: 0 var(--safe-r) var(--safe-b) var(--safe-l);
  background: color-mix(in srgb, var(--surface) 72%, transparent); -webkit-backdrop-filter: saturate(1.5) blur(12px); backdrop-filter: saturate(1.5) blur(12px); box-shadow: 0 -1px 0 var(--border); }
.m-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted) !important; text-decoration: none !important; font-size: 11px; font-weight: 500; letter-spacing: .01em; min-width: 0; padding: 6px 2px; transition: color var(--m-fast) var(--m-ease); }
.m-tab span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-tab .icon { width: 24px; height: 24px; transition: transform var(--m-fast) var(--m-ease); }
.m-tab.active { color: var(--m-accent) !important; font-weight: 600; }
.m-tab.active .icon { stroke-width: 2.25; }
.m-tab:active .icon { transform: scale(.88); }

/* Install banner */
.m-install { position: fixed; z-index: 44; left: 12px; right: 12px; bottom: calc(var(--m-tabs-h) + var(--safe-b) + 12px); display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px;
  border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lg); max-width: 456px; margin: 0 auto; animation: m-rise var(--m-slow) var(--m-ease); }
.no-tabs .m-install { bottom: calc(var(--safe-b) + 12px); }
.m-install-icon { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 0 0 1px var(--border); }
.m-install-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; color: var(--muted); line-height: 1.35; }
.m-install-text strong { color: var(--ink); font-size: 14.5px; font-weight: 600; }
.m-install-close { border: 0; background: none; color: var(--faint); width: 32px; height: 32px; display: grid; place-items: center; cursor: pointer; border-radius: 8px; }
.m-install-close:active { background: var(--surface-3); }
@keyframes m-rise { from { transform: translateY(16px); opacity: 0; } }

/* ── Core components, app sized ── */
.member-app .card { border-radius: var(--r-lg); border: 1px solid var(--border); box-shadow: var(--shadow); margin-bottom: 16px; }
.m-section > .card, .m-section > .card:last-child { margin-bottom: 0; }
.member-app .card-head { padding: 14px 16px 0; border-bottom: 0; }
.member-app .card-title { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.member-app .card-sub { font-size: 13px; }
.member-app .card-actions a.small { font-size: 14px; font-weight: 600; color: var(--m-accent); }
.member-app .card-body { padding: 14px 16px 16px; }
.member-app .card-head + .card-body { padding-top: 10px; }
.member-app .card-foot { padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.member-app .btn { height: 48px; padding: 0 18px; border-radius: var(--r); font: 600 16px/1 var(--font); gap: 8px; border-color: var(--border-strong); background: var(--surface); color: var(--ink);
  transition: background var(--m-fast) var(--m-ease), border-color var(--m-fast) var(--m-ease), box-shadow var(--m-fast) var(--m-ease), transform var(--m-fast) var(--m-ease); }
.member-app .btn:hover { background: var(--surface-2); }
.member-app .btn:active { transform: scale(.98); }
.member-app .btn-primary, .member-app .btn-primary:hover { background: var(--primary); border-color: transparent; color: var(--on-church) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 2px rgba(11, 18, 36, .15); }
.member-app .btn-primary:hover { background: var(--primary-hover); }
.member-app .btn-danger { background: var(--danger); border-color: transparent; color: #fff; }
.member-app .btn-ghost { background: transparent; border-color: transparent; color: var(--m-accent); }
.member-app .btn-ghost:hover { background: var(--surface-3); }
.member-app .btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 9px; gap: 6px; }
.member-app .btn-lg { height: 52px; font-size: 16px; border-radius: 12px; }
.member-app .btn-block { width: 100%; }
.member-app .btn-icon { width: 48px; padding: 0; }
.member-app .btn-sm.btn-icon { width: 36px; }
.member-app .btn:focus-visible { outline: none; box-shadow: var(--m-ring); }
.member-app .btn-row { gap: 10px; }
.member-app .link-btn { color: var(--m-accent); font-size: inherit; }
.member-app .input { height: 48px; border-radius: var(--r); font-size: 16px; padding: 0 14px; border-color: var(--input-border); background: var(--surface); color: var(--ink); transition: border-color var(--m-fast) var(--m-ease), box-shadow var(--m-fast) var(--m-ease); }
.member-app .input::placeholder, .member-app .m-code .input::placeholder { color: var(--input-ph); }
.member-app .input:focus { border-color: var(--primary); box-shadow: var(--m-ring); }
.member-app textarea.input { padding: 12px 14px; min-height: 96px; line-height: 1.45; }
.member-app select.input { padding-right: 36px; background-position: right 12px center; }
.member-app input[type="file"].input { padding: 10px 12px; height: auto; }
/* Language row on More: the select sits where the chevron would be */
.m-row-lang { cursor: default; }
.member-app .m-row-lang .m-lang-select { width: auto; max-width: 52%; height: 38px; padding: 0 34px 0 12px; font-size: 15px; flex-shrink: 0; background-position: right 10px center; }
.member-app .input-group .input { height: 48px; }
.member-app .input-group > :first-child { border-top-left-radius: var(--r); border-bottom-left-radius: var(--r); }
.member-app .input-group > :last-child { border-top-right-radius: var(--r); border-bottom-right-radius: var(--r); }
.member-app .input-group .addon { border-color: var(--input-border); background: var(--surface-2); }
.member-app .field { margin-bottom: 16px; }
.member-app .field > label, .member-app .field .label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.member-app .help { font-size: 13px; }
.member-app .has-error .input:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 22%, transparent); }
.member-app .check, .member-app .switch { font-size: 15.5px; align-items: center; gap: 12px; }
.member-app .check input { width: 20px; height: 20px; margin-top: 0; }
.member-app .switch { display: flex; width: 100%; flex-direction: row-reverse; justify-content: space-between; min-height: 30px; }
.member-app .switch > span:last-child { flex: 1; }
.member-app .switch-ui { width: 50px; height: 30px; margin: 0; background: var(--input-border); transition: background var(--m-slow) var(--m-ease); }
.member-app .switch-ui::after { width: 26px; height: 26px; top: 2px; left: 2px; box-shadow: 0 2px 4px rgba(11, 18, 36, .2), 0 0 0 .5px rgba(11, 18, 36, .06); transition: transform var(--m-slow) var(--m-ease); }
.member-app .switch input:checked + .switch-ui { background: var(--primary); }
.member-app .switch input:checked + .switch-ui::after { transform: translateX(20px); }
.member-app .switch input:focus-visible + .switch-ui { outline: none; box-shadow: var(--m-ring); }
.m-panel > .field-check { margin: 0; padding: 12px 0; }
.m-panel > .field-check + .field-check { border-top: 1px solid var(--border); }
.m-panel > .field-check:first-child { padding-top: 2px; }
.m-panel > .field-check:last-child { padding-bottom: 2px; }
.m-panel > .field-check .help { margin: 6px 0 0; }
.member-app .alert { border-radius: 12px; padding: 12px 14px; font-size: 14.5px; }
.member-app .callout { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); padding: 14px 16px; }
.member-app .callout > .icon { color: var(--m-accent); }
.member-app .callout strong { font-weight: 600; font-size: 15.5px; }
.member-app .chip { font-size: 13px; padding: 5px 12px; }
.member-app .badge { font-size: 11.5px; font-weight: 600; }
.member-app .toast-host { left: 16px; right: 16px; bottom: calc(var(--m-tabs-h) + var(--safe-b) + 14px); align-items: center; pointer-events: none; }
.member-app .toast { border-radius: 999px; padding: 12px 18px; font-size: 14.5px; font-weight: 500; max-width: min(360px, 100%); box-shadow: var(--shadow-lg); animation: m-rise var(--m-slow) var(--m-ease); }
.member-app dialog.modal { border-radius: var(--r-xl); box-shadow: var(--shadow-lg); background: var(--surface); color: var(--ink); }
.member-app dialog.modal::backdrop { background: rgba(11, 18, 36, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.member-app .modal-head { border-bottom: 0; padding: 18px 20px 4px; }
.member-app .modal-head h2 { font-size: 18px; font-weight: 600; }
.member-app .modal-foot { border-top: 0; background: transparent; padding: 8px 20px 20px; }
.member-app .modal-foot .btn { flex: 1; }
.member-app .dropdown-menu, .member-app .picker-results { border-radius: 12px; box-shadow: var(--shadow-lg); border-color: transparent; }
.member-app .pager { border-top: 0; padding: 14px 2px 0; }
.member-app .empty { padding: 32px 16px; }
.member-app .list > li { padding: 11px 0; border-bottom: 1px solid var(--border); }
.member-app .avatar { outline: 1px solid rgba(11, 18, 36, .08); outline-offset: -1px; }
.member-app .progress { background: var(--surface-3); height: 8px; }
.member-app .progress > span { background: var(--primary); }
.member-app .qr-box { border-radius: 12px; border-color: var(--border); padding: 10px; }
.member-app .kv { font-size: 15px; }
.member-app .cb-msg { border-radius: 16px; padding: 9px 13px; font-size: 15px; line-height: 1.4; }
.member-app .cb-msg.mine { background: var(--primary); color: var(--on-church); border-bottom-right-radius: 6px; }
.member-app .cb-msg:not(.mine) { border-bottom-left-radius: 6px; }
.member-app [data-chat-form].card-foot { padding: 10px 12px calc(10px + var(--safe-b)); align-items: flex-end; }
.member-app [data-chat-form] .input { border-radius: 22px; min-height: 44px; height: auto; padding: 10px 16px; }
.member-app [data-chat-form] .btn { width: 44px; height: 44px; padding: 0; border-radius: 50%; flex-shrink: 0; }

/* ── Media (Watch tab, live, sermon) ── */
.member-app .mx-app { --mx-accent: var(--m-accent); }
.member-app .mx-section-head h2 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.member-app .mx-section-head a { font-size: 14px; font-weight: 600; color: var(--m-accent) !important; }
.member-app .mx-h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.member-app .mx-h2 { font-size: 17px; font-weight: 600; }
.member-app .mx-kicker, .member-app .mx-guide-time, .member-app .mx-resume, .member-app .mx-episode-go, .member-app .mx-tile-icon, .member-app .mx-banner-icon { color: var(--m-accent); }
.member-app .mx-app-search { height: 48px; border-radius: 12px; box-shadow: var(--shadow-sm); border-color: var(--border); transition: border-color var(--m-fast) var(--m-ease), box-shadow var(--m-fast) var(--m-ease); }
.member-app .mx-app-search:focus-within { border-color: var(--primary); box-shadow: var(--m-ring); }
.member-app .mx-app-section { margin-bottom: 24px; }
.member-app .mx-card-title { font-weight: 600; letter-spacing: -.005em; }
.member-app .mx-card-wide .mx-card-title { font-size: 18px; letter-spacing: -.01em; }
.member-app .mx-thumb, .member-app .mx-series-art { border-radius: 12px; box-shadow: none; }
.member-app .mx-card-row { border-radius: var(--r-lg); border-color: var(--border); box-shadow: var(--shadow-sm); padding: 8px; transition: transform var(--m-fast) var(--m-ease); }
.member-app .mx-card-row:active { transform: scale(.99); }
.member-app .mx-card-row .mx-thumb { border-radius: 9px; }
.member-app .mx-thumb-badge { background: rgba(11, 18, 36, .72); font-weight: 600; }
.member-app .mx-tiles { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.member-app .mx-tile { border-radius: var(--r-lg); border-color: var(--border); box-shadow: var(--shadow-sm); padding: 12px 14px; transition: transform var(--m-fast) var(--m-ease); }
.member-app .mx-tile:active { transform: scale(.98); }
.member-app .mx-tile strong { font-weight: 600; }
.member-app .mx-tile-icon { border-radius: 12px; background: var(--primary-soft); }
.member-app .mx-tile-live { background: var(--danger-soft); color: var(--danger); }
.member-app .mx-empty { border: 1px solid var(--border); border-radius: var(--r-lg); }
.member-app .mx-empty h2 { font-size: 17px; font-weight: 600; }
.member-app .mx-player { border-radius: var(--r-lg); box-shadow: 0 16px 32px -20px rgba(11, 18, 36, .5); }
.member-app .mx-audio, .member-app .mx-episode, .member-app .mx-times, .member-app .mx-guide-list, .member-app .mx-onnow-bar, .member-app .mx-no-media { border-radius: var(--r-lg); border-color: var(--border); box-shadow: var(--shadow-sm); }
.member-app .mx-times li, .member-app .mx-guide-list li { border-color: var(--border); }
.member-app .mx-btn { min-height: 48px; border-radius: var(--r); font: 600 15px/1 var(--font); border-color: var(--border-strong); }
.member-app .mx-btn-sm { min-height: 36px; border-radius: 9px; font-size: 14px; }
.member-app .mx-btn-primary { background: var(--primary); border-color: transparent; color: var(--on-church) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 2px rgba(11, 18, 36, .15); }
.member-app .mx-btn-primary:hover { filter: none; background: var(--primary-hover); }
.member-app .mx-live-actions .mx-btn { border-radius: var(--r); }
.member-app .mx-mode { border-radius: 12px; padding: 3px; }
.member-app .mx-mode-btn { border-radius: 9px; min-height: 36px; }
.member-app .mx-mode-btn.active { box-shadow: 0 1px 2px rgba(11, 18, 36, .08), 0 0 0 1px var(--border); }
.member-app .mx-offline { border-radius: var(--r-xl); color: var(--on-church); background: var(--m-hero); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 16px 32px -18px color-mix(in srgb, var(--church) 60%, #000); }
.member-app .mx-offline .mx-kicker { color: inherit; opacity: .8; }
.member-app .mx-offline-icon { background: color-mix(in srgb, var(--on-church) 14%, transparent); }
.member-app .mx-next-title { font-weight: 700; letter-spacing: -.015em; }
.member-app .mx-prose blockquote { border-left-color: var(--m-accent); border-radius: 0 10px 10px 0; }
.member-app .mx-transcript .mx-prose { border-radius: 12px; }
.member-app .mx-chip, .member-app .mx-filters select, .member-app .mx-search { border-color: var(--input-border); }
.member-app .mx-live-pill { font-family: var(--font); }
/* Live / next-service hero on Home and Watch */
.member-app .mx-banner-wrap { margin: 0 0 20px; }
.member-app .mx-banner { position: relative; overflow: hidden; gap: 14px; padding: 18px 18px; border-radius: var(--r-xl); border: 0; color: var(--on-church) !important; background: var(--m-hero);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 16px 32px -18px color-mix(in srgb, var(--church) 60%, #000); transition: transform var(--m-fast) var(--m-ease); }
.member-app .mx-banner:active { transform: scale(.99); }
.member-app .mx-banner-live { background: var(--m-hero); border: 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 16px 32px -18px color-mix(in srgb, var(--church) 60%, #000); }
.member-app .mx-banner-icon { width: 44px; height: 44px; flex-basis: 44px; border-radius: 14px; background: color-mix(in srgb, var(--on-church) 16%, transparent); color: inherit; }
.member-app .mx-banner-text { gap: 3px; font-size: 14px; }
.member-app .mx-banner-text strong { font-size: 18px; font-weight: 700; letter-spacing: -.015em; white-space: normal; line-height: 1.2; }
.member-app .mx-banner-text > span { opacity: .86; }
.member-app .mx-banner > .icon:last-child { opacity: .7; }
.member-app .mx-banner .mx-live-pill { background: #fff; color: #dc2626; padding: 4px 10px 4px 8px; font-size: 11px; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.member-app .mx-banner .mx-live-pill::before { background: #dc2626; }
.member-app .mx-home-card .mx-section-head { margin: 0 2px 10px; }

/* ── Giving ── */
.member-app .give-hero { padding: 22px 20px 20px; border-radius: var(--r-xl); color: var(--on-church); background: var(--m-hero); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 16px 32px -18px color-mix(in srgb, var(--church) 60%, #000); }
.member-app .give-hero h1 { color: inherit; font-size: 30px; font-weight: 700; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.member-app .give-hero p { opacity: .86; }
.member-app .give-hero .give-kicker { font-size: 11.5px; letter-spacing: .06em; opacity: .85; }
.member-app .give-card { border-radius: var(--r-lg); border-color: var(--border); box-shadow: var(--shadow); padding: 18px 16px; background: var(--surface); }
.member-app .give-card h2 { font-size: 17px; font-weight: 600; margin: 0 0 14px; }
.member-app .give-step-title { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.member-app .give-card .input { height: 48px; font-size: 16px; }
.member-app .give-card textarea.input { height: auto; }
.member-app .pill span { min-height: 40px; padding: 8px 14px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; transition: background var(--m-fast) var(--m-ease), border-color var(--m-fast) var(--m-ease), color var(--m-fast) var(--m-ease), transform var(--m-fast) var(--m-ease); }
.member-app .pill span:active { transform: scale(.98); }
.member-app .pill input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--on-church); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); }
.member-app .pill input:focus-visible + span { outline: none; box-shadow: var(--m-ring); }
.member-app .segmented { border: 1px solid var(--border-strong); border-radius: var(--r); }
.member-app .segmented .pill span { border: 0; min-height: 46px; }
.member-app .segmented .pill + .pill span { border-left: 1px solid var(--border-strong); }
.member-app .amount-grid .pill span { border-radius: var(--r); min-height: 52px; font-size: 16px; }
.member-app .amount-custom .input { height: 52px; font-size: 20px; font-weight: 600; }
.member-app .give-summary { border-radius: var(--r); background: var(--surface-2); border-color: var(--border); }
.member-app .give-summary strong { font-weight: 700; }
.member-app .give-submit { height: 52px; font-size: 17px; border-radius: 12px; }
.member-app .give-member { border-radius: var(--r); font-weight: 500; }
.member-app .give-optional summary { color: var(--m-accent); }
.member-app .giftaid-box { border-radius: var(--r-lg); }
.member-app .giving-icon-bubble { border-radius: 12px; color: var(--m-accent); }
.member-app .give-help-list li { border-color: var(--border); }

/* ── Events ── */
.member-app .evp h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.member-app .evp-top { margin-bottom: 16px; }
.member-app .evp-cards { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.member-app .evp-card { border-radius: var(--r-lg); border-color: var(--border); box-shadow: var(--shadow); transition: transform var(--m-fast) var(--m-ease); }
.member-app .evp-card:hover { box-shadow: var(--shadow); transform: none; }
.member-app .evp-card:active { transform: scale(.99); }
.member-app .evp-card-img, .member-app .evp-hero { background: var(--m-hero); }
.member-app .evp-card-img .ev-datebox { border-radius: 10px; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.member-app .evp-card-body { padding: 12px 16px 14px; }
.member-app .evp-card-title { font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; }
.member-app .evp-price { font-weight: 600; }
.member-app .ev-datebox { border-radius: 10px; color: var(--primary-ink); font-weight: 600; }
.member-app .ev-datebox strong { font-weight: 700; }
.member-app .ev-myticket { border-radius: var(--r-lg); padding: 12px 14px; }
.member-app .ev-myticket strong { font-weight: 600; }
.member-app .ev-mini { padding: 2px 0; }
.member-app .ev-mini-title { font-weight: 500; font-size: 15.5px; }
.member-app .evp-toggle { border-color: var(--border-strong); }
.member-app .evp-toggle a.active { color: var(--on-church); }
.member-app .evp-chips a { border-color: var(--border-strong); }
.member-app .evp-chips a.active { color: var(--m-accent); border-color: var(--m-accent); }
.member-app .evp-month { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; }
.member-app .evp-empty { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.member-app .evp-panel, .member-app .evp-tt { border-radius: var(--r-lg); }
.member-app .evp-hero { border-radius: var(--r-lg); }

/* ── Prayer wall (care) ── */
.member-app .pw-hero { padding: 4px 0 12px; }
.member-app .pw-hero h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.member-app .pw-hero p { font-size: 15px; }
.member-app .pw-card { border-radius: var(--r-lg); border-color: var(--border); box-shadow: var(--shadow-sm); padding: 14px 16px; }
.member-app .pw-card.answered { border-color: color-mix(in srgb, var(--success) 30%, var(--border)); background: linear-gradient(180deg, var(--success-soft), var(--surface) 60%); }
.member-app .pw-card-head .pw-cat { font-weight: 600; }
.member-app .pw-card-who { font-size: 15.5px; }
.member-app .pw-card-text { font-size: 15px; }
.member-app .pw-pray-btn { min-height: 40px; border-color: var(--border-strong); font-weight: 600; font-size: 14px; transition: transform var(--m-fast) var(--m-ease), border-color var(--m-fast) var(--m-ease), background var(--m-fast) var(--m-ease); }
.member-app .pw-pray-btn:active { transform: scale(.97); }
.member-app .pw-form, .member-app .pw-empty { border-radius: var(--r-lg); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.member-app .pw-form { padding: 16px; }
.member-app .pw-cats label { border-radius: var(--r); min-height: 46px; }
.member-app .pw-submit { min-height: 48px; border-radius: var(--r); }
.member-app .pw-testimony { border-radius: 0 10px 10px 0; }
.member-app .pw-pager { margin-top: 16px; }
/* Care's generic member cards (.m-card, .m-sub, .m-list inside a card) */
.member-app .m-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 16px; }
.member-app .m-card h2 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 6px; }
.member-app .m-card h2 .icon { color: var(--m-accent); vertical-align: -3px; }
.member-app .m-card a.small { font-size: 14px; font-weight: 600; color: var(--m-accent); }
.member-app .m-sub { color: var(--muted); font-size: 13.5px; }
.member-app .m-card > .m-list { border: 0; border-radius: 0; background: none; box-shadow: none; margin: 0; overflow: visible; }
.member-app .m-card > .m-list > li + li::before { display: none; }
.member-app .m-card .m-date { border-radius: 10px; font-weight: 600; }
.member-app .m-btn-block { width: 100%; }
.member-app .m-home-card .pw-grid { gap: 0; }
.member-app .m-home-card .pw-card { border: 0; border-radius: 0; box-shadow: none; padding: 12px 0; }
.member-app .m-home-card .pw-card + .pw-card { border-top: 1px solid var(--border); }

/* ── Quizzes (compete) ── */
.member-app .cp-hero h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.member-app .cp-card { border-radius: var(--r-lg); border-color: var(--border); box-shadow: var(--shadow); }
.member-app .cp-card h2 { font-size: 17px; font-weight: 600; }
.member-app .cp-quiz-icon { background: linear-gradient(135deg, var(--m-deep), var(--church)); color: var(--on-church); border-radius: 12px; }
.member-app .cp-quiz-icon.done { background: linear-gradient(135deg, #10b981, #059669); color: #fff; }
.member-app .cp-cta { min-height: 48px; border-radius: var(--r); }
.member-app .cp-live-banner { border-radius: var(--r-xl); background: var(--m-hero); color: var(--on-church); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 16px 32px -18px color-mix(in srgb, var(--church) 60%, #000); }
.member-app .cp-live-dot { background: var(--on-church); }
.member-app .cp-facts div { border-radius: var(--r); }
.member-app .cp-badge-card { border-radius: var(--r-lg); }
.member-app .cp-board li.me { border-radius: var(--r); }

/* ── Dark mode ── */
@media (prefers-color-scheme: dark) {
  body.member-app {
    color-scheme: dark; --bg: #0f1320; --surface: #161b2e; --surface-2: #1b2137; --surface-3: #232a42; --border: rgba(255, 255, 255, .08); --border-strong: rgba(255, 255, 255, .14); --input-border: #6f7b99; --input-border-hover: #929eba; --input-ph: #8d98b8;
    --ink: #eef1f8; --ink-2: #c9d0e0; --muted: #98a2bd; --faint: #6b7590; --primary-soft: var(--church-dark-soft); --primary-ink: var(--church-dark-ink);
    --m-accent: color-mix(in srgb, var(--church) 78%, #fff);
    --success-soft: #10301f; --warning-soft: #33250b; --danger-soft: #3a1414; --info-soft: #102245;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -14px rgba(0, 0, 0, .6);
    --shadow-lg: 0 16px 48px -12px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .06);
    --m-ring: 0 0 0 3px color-mix(in srgb, var(--m-accent) 32%, transparent);
    --viz-surface: #161b2e; --viz-grid: #283350; --viz-axis: #3a4768; --viz-ink: #c9d0e0; --viz-muted: #98a2bd;
  }
  body.member-app.brand-light { --m-accent: var(--church); }
  .member-app .btn, .member-app .btn-secondary { background: var(--surface-2); border-color: var(--border-strong); color: var(--ink); }
  .member-app .btn:hover { background: var(--surface-3); }
  .member-app .btn-primary, .member-app .btn-primary:hover { background: var(--primary); color: var(--on-church) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
  .member-app .btn-primary:hover { background: var(--primary-hover); }
  .member-app .btn-ghost { background: transparent; border-color: transparent; color: var(--m-accent); }
  .member-app .btn-danger { background: var(--danger); border-color: transparent; color: #fff; }
  .member-app .input, .member-app .input-group .addon { background: var(--surface-2); color: var(--ink); border-color: var(--input-border); }
  .member-app .input[readonly], .member-app .input:disabled { background: var(--surface-3); }
  .member-app .input:focus { border-color: var(--m-accent); }
  .member-app .m-code .input { background: var(--surface-2); }
  .member-app .card-foot, .member-app .table th { background: var(--surface-2); }
  .member-app .table tbody tr:hover td { background: var(--surface-2); }
  .member-app .dropdown-menu, .member-app .picker-results, .member-app dialog.modal { background: var(--surface); color: var(--ink); }
  .member-app dialog.modal::backdrop { background: rgba(0, 0, 0, .6); }
  .member-app .alert-success { background: #10301f; color: #bbf7d0; border-color: #14532d; }
  .member-app .alert-error { background: #3a1414; color: #fecaca; border-color: #7f1d1d; }
  .member-app .alert-info { background: #102245; color: #bfdbfe; border-color: #1e3a8a; }
  .member-app .alert-warning { background: #33250b; color: #fde68a; border-color: #78350f; }
  .member-app .callout { background: var(--surface); }
  .member-app .chip { background: var(--surface-3); color: var(--ink-2); border-color: var(--border); }
  .member-app .badge-gray { background: #273049; color: #cbd5e1; }
  .member-app .badge-green { background: #10301f; color: #bbf7d0; } .member-app .badge-blue { background: #102245; color: #bfdbfe; }
  .member-app .badge-amber { background: #33250b; color: #fde68a; } .member-app .badge-red { background: #3a1414; color: #fecaca; }
  .member-app .badge-purple { background: #2a1d4a; color: #ddd6fe; } .member-app .badge-teal { background: #0f2f2c; color: #99f6e4; } .member-app .badge-pink { background: #3d1230; color: #fbcfe8; }
  .member-app .m-logo, .member-app .m-idcard-top img, .member-app .m-auth-head img, .member-app .m-install-icon { background: #fff; }
  .member-app .m-pill-pin { background: #3b2a08; color: #fcd34d; }
  .member-app .m-net { background: #000; color: #fff; }
  .member-app .qr-box, .member-app .m-idcard-qr { background: #fff; }
  .member-app .avatar { outline-color: rgba(255, 255, 255, .1); }
  .member-app .m-top-avatar .avatar, .member-app .m-me .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--border-strong); }
  .member-app .switch-ui { background: var(--input-border); }
  .member-app .switch input:checked + .switch-ui { background: var(--m-accent); }
  .member-app .m-devo-card { background: linear-gradient(180deg, color-mix(in srgb, var(--church) 14%, var(--surface)), var(--surface) 70%); }
  .member-app .m-verse { background: color-mix(in srgb, var(--church) 14%, var(--surface-2)); }
  .member-app .mx-tile-live { background: rgba(220, 38, 38, .18); color: #fca5a5; }
  .member-app .mx-thumb-badge { background: rgba(0, 0, 0, .7); }
  .member-app .mx-mode, .member-app :is(.m-seg, .pw-seg, .cp-seg) { background: var(--surface-3); }
  .member-app .mx-mode-btn.active, .member-app :is(.m-seg, .pw-seg, .cp-seg) a.active { background: var(--surface-2); box-shadow: 0 0 0 1px var(--border-strong); }
  .member-app .give-card, .member-app .pill span { background: var(--surface); }
  .member-app .pill span { border-color: var(--border-strong); color: var(--ink); }
  .member-app .give-summary { background: var(--surface-2); }
  .member-app .giftaid-box { background: #102245; border-color: #1e3a8a; }
  .member-app .giftaid-box .small, .member-app .giftaid-box .giftaid-logo { color: #bfdbfe; }
  .member-app .pw-pray-btn { background: var(--surface-2); color: var(--ink); }
  .member-app .pw-pray-btn.done { background: #3a1420; border-color: #9f1239; color: #fda4af; }
  .member-app .pw-testimony { background: #10301f; color: #bbf7d0; }
  .member-app .pw-card.answered { background: linear-gradient(180deg, #10301f, var(--surface) 60%); }
  .member-app .evp-card-img .ev-datebox { background: var(--surface); color: var(--ink); }
  .member-app .cb-msg:not(.mine) { background: var(--surface-3); }
  .member-app .cb-msg.staff { background: var(--primary-soft); }
}

/* Wider screens: a phone-width column on a soft ground, floating tab bar */
@media (min-width: 768px) {
  body.member-app { --m-ground: #eceef5; background: var(--m-ground); padding-bottom: calc(var(--m-tabs-h) + 36px); }
  .m-top { padding-left: max(8px, calc(50% - 240px)); padding-right: max(8px, calc(50% - 240px)); background: color-mix(in srgb, var(--surface) 78%, transparent); }
  .is-home .m-top:not(.is-scrolled) { background: color-mix(in srgb, var(--m-ground) 70%, transparent); }
  .m-main { padding-top: 20px; }
  .m-tabs { left: 50%; right: auto; width: min(480px, calc(100% - 32px)); transform: translateX(-50%); bottom: 16px; height: var(--m-tabs-h); padding: 0; border-radius: var(--r-xl); box-shadow: var(--shadow-lg); background: color-mix(in srgb, var(--surface) 86%, transparent); }
  .m-install { bottom: calc(var(--m-tabs-h) + 30px); }
  .member-app .toast-host { bottom: calc(var(--m-tabs-h) + 32px); }
  .m-net { top: calc(var(--m-top-h) + var(--safe-t)); }
  .m-tile:hover, .m-post:hover, .m-row:hover, .mx-card-row:hover, .evp-card:hover { background-color: color-mix(in srgb, var(--primary) 4%, var(--surface)); }
}
@media (min-width: 768px) and (prefers-color-scheme: dark) {
  body.member-app { --m-ground: #0a0d17; }
}
@media (max-width: 360px) { .m-tiles { gap: 8px; } .m-tile { font-size: 11.5px; } .m-hello-title { font-size: 24px; } .m-idcard-qr svg { width: 92px; height: 92px; } }
@media print {
  .m-top, .m-tabs, .m-install, .m-net, .m-flash, .no-print { display: none !important; }
  body.member-app { background: #fff; padding: 0; }
  .m-idcard { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (prefers-reduced-motion: reduce) {
  .m-install, .member-app .toast { animation: none; }
  .member-app *, .member-app *::before, .member-app *::after { transition-duration: 0s !important; }
  .m-tile:active, .m-post:active, .m-devo-card:active, .member-app .btn:active, .member-app .mx-banner:active, .member-app .evp-card:active, .m-profile-actions a:active { transform: none; }
}

/* ═══ Home cards (Member app → Cards) ═══════════════════════════════════════════════════════════════════════════════════
   The home screen is a two-column grid: .mc-full cells span both columns, .mc-half cells sit side by side (stacked below 340px).
   Every card is <article class="mc-card mc-c-{type} mc-t-{theme}">; .mc-dark switches it to light-on-dark text. Church TV and the
   live service card are heroes (.mc-hero): the biggest, brightest things on the page. */
.mc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 24px; }
.mc-cell[data-mc-type="builtin"] { margin-top: 6px; }
.mc-cell { min-width: 0; }
.mc-full { grid-column: 1 / -1; }
.mc-cell > .m-tiles { margin-bottom: 0; }
.mc-cell > .m-welcome { margin-bottom: 0; }
.mc-half > .mc-card { height: 100%; }
@media (max-width: 339px) { .mc-half { grid-column: 1 / -1; } .mc-half > .mc-card { height: auto; } }
.mc-card { position: relative; display: block; overflow: hidden; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--ink);
  --mc-sub: var(--muted); --mc-line: var(--border); --mc-chip: var(--surface-3); --mc-accent: var(--m-accent); }
.mc-card :is(h2, p, blockquote, cite) { margin: 0; }
.mc-card a { text-decoration: none; }
.mc-flat { background: transparent; border: 0; box-shadow: none; overflow: visible; }
:is(.mc-c-verse, .mc-c-quote, .mc-c-announcement, .mc-c-give, .mc-c-prayer, .mc-c-checkin, .mc-c-contact, .mc-c-events, .mc-c-live_service) { padding: 18px; }
.mc-c-gallery { padding: 0; }
.mc-size-half:is(.mc-c-verse, .mc-c-quote, .mc-c-announcement, .mc-c-give, .mc-c-prayer, .mc-c-checkin, .mc-c-contact, .mc-c-live_service) { padding: 14px; }

/* Colour themes. Automatic keeps the card's own look; the others are deep gradients with a touch of grain. */
.mc-t-navy { --mc-bg: linear-gradient(145deg, #1d2f58, #0c1530); }
.mc-t-rust { --mc-bg: linear-gradient(145deg, #c9582c, #86290f); }
.mc-t-forest { --mc-bg: linear-gradient(145deg, #327455, #123a29); }
.mc-t-plum { --mc-bg: linear-gradient(145deg, #70408a, #321640); }
.mc-t-slate { --mc-bg: linear-gradient(145deg, #4b5a70, #1a2332); }
.mc-card:is(.mc-t-navy, .mc-t-rust, .mc-t-forest, .mc-t-plum, .mc-t-slate) { background: var(--m-grain), var(--mc-bg); border-color: transparent; }
.mc-card.mc-t-image { background: linear-gradient(180deg, rgba(8, 12, 24, .2), rgba(8, 12, 24, .72)), var(--mc-img) center / cover no-repeat; border-color: transparent; }
.mc-card.mc-dark { color: #fff; --mc-sub: rgba(255, 255, 255, .8); --mc-line: rgba(255, 255, 255, .2); --mc-chip: rgba(255, 255, 255, .16); --mc-accent: #fff; border-color: transparent; }
.mc-card.mc-dark.mc-t-auto { background: var(--m-hero); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 16px 32px -20px color-mix(in srgb, var(--church) 60%, #000); }
.mc-card.mc-dark :is(.mc-title, .mc-big, .mc-quote, .mc-head h2, .mc-ev-title) { color: #fff; }

/* Type: shared pieces */
.mc-kicker { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--mc-accent); }
.mc-dark .mc-kicker { color: rgba(255, 255, 255, .86); }
.mc-title { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.012em; line-height: 1.28; color: var(--ink); }
.mc-big { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.mc-text, .mc-sub { font-size: 14.5px; line-height: 1.5; color: var(--mc-sub); }
.mc-meta { display: block; font-size: 12.5px; color: var(--mc-sub); }
.mc-size-half .mc-title { font-size: 15px; } .mc-size-half .mc-big { font-size: 18px; } .mc-size-half .mc-text { font-size: 13.5px; }
.mc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.mc-head h2 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.mc-head a { font-size: 14px; font-weight: 600; color: var(--m-accent); white-space: nowrap; }
.mc-bubble { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--m-accent); flex-shrink: 0; }
.mc-dark .mc-bubble { background: rgba(255, 255, 255, .16); color: #fff; }
.mc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--ink) !important;
  font-size: 15px; font-weight: 600; text-decoration: none !important; text-align: center; line-height: 1.2; transition: transform var(--m-fast) var(--m-ease), background var(--m-fast) var(--m-ease); }
.mc-btn:active { transform: scale(.98); }
.mc-btn-primary { background: var(--primary); border-color: transparent; color: var(--on-church) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16); }
.mc-btn-block { width: 100%; }
.mc-btn-inline { min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; color: var(--mc-accent) !important; justify-content: flex-start; margin-top: 8px; font-size: 14.5px; }
.mc-dark .mc-btn { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .24); color: #fff !important; }
.mc-dark .mc-btn-primary { background: #fff; border-color: transparent; color: #0b1224 !important; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .5); }
.mc-dark .mc-btn-inline { background: none; border: 0; color: #fff !important; box-shadow: none; text-decoration: underline !important; text-underline-offset: 3px; }
.mc-size-half .mc-btn { min-height: 44px; padding: 0 12px; font-size: 14px; }
.mc-media { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--surface-3); overflow: hidden; }
.mc-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mc-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); }
.mc-play { position: absolute; right: 12px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .94); color: #0b1224; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.mc-play .icon { margin-left: 2px; }
.mc-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.mc-size-half .mc-body { padding: 10px 12px 12px; }
.mc-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; flex-shrink: 0; animation: mc-pulse 1.5s ease-in-out infinite; }
@keyframes mc-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }

/* Church TV: the hero */
.mc-hero { border-radius: var(--r-xl); }
.mc-c-church_tv { padding: 0; color: #fff; border: 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 24px 44px -24px color-mix(in srgb, var(--church) 75%, #000), 0 2px 6px rgba(11, 18, 36, .12); }
.mc-tv-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, #0b1224, #1b2540); }
.mc-tv-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.mc-tv-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .34) 0, rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, .5) 100%); pointer-events: none; }
.mc-tv-ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .45); }
.mc-onair { position: absolute; top: 12px; left: 12px; z-index: 1; display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 10px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; line-height: 1.4; box-shadow: 0 6px 16px -4px rgba(220, 38, 38, .6); }
.mc-onair.is-live { background: #e11d48; }
.mc-tv-body { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 18px; }
.mc-tv-title { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; color: #fff !important; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mc-prog { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .24); overflow: hidden; }
.mc-prog span { display: block; height: 100%; border-radius: 4px; background: #fff; transition: width 1s linear; }
.mc-tv-times { display: flex; justify-content: space-between; gap: 12px; margin-top: -4px; font-size: 12.5px; color: rgba(255, 255, 255, .82); font-variant-numeric: tabular-nums; }
.mc-tv-next { display: flex; align-items: baseline; gap: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .11); font-size: 13.5px; min-width: 0; }
.mc-tv-next span { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .72); flex-shrink: 0; }
.mc-tv-next strong { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-tv-next em { font-style: normal; color: rgba(255, 255, 255, .8); flex-shrink: 0; font-size: 12.5px; }
.mc-c-church_tv .mc-btn-primary { min-height: 48px; margin-top: 2px; font-size: 16px; }

/* Live service */
.mc-live { display: flex; flex-direction: column; gap: 8px; }
.mc-pill-live { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; }
.mc-count { font-size: 13.5px; color: rgba(255, 255, 255, .86); }
.mc-countdown { font-weight: 700; font-variant-numeric: tabular-nums; color: #fff; }
.mc-live .mc-btn-primary { margin-top: 6px; }

/* Sermon, video, link, page */
.mc-c-sermon .mc-kicker { margin-bottom: 0; }
.mc-link-a { display: block; color: inherit !important; }
.mc-link-a:active { opacity: .92; }
.mc-link-plain .mc-body, .mc-c-page .mc-link-a { display: flex; flex-direction: row; gap: 14px; align-items: flex-start; padding: 16px; }
.mc-c-page .mc-link-a .mc-body { padding: 0; }
.mc-c-page .mc-body { flex: 1; min-width: 0; }
.mc-link-plain .mc-link-a { padding: 0; }
.mc-host { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--mc-sub); margin-top: 2px; }
.mc-more { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--mc-accent); margin-top: 4px; }
.mc-c-link.mc-size-half .mc-text, .mc-c-page.mc-size-half .mc-text { display: none; }
.mc-c-page.mc-size-half .mc-link-a { flex-direction: column; gap: 10px; }
.mc-video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.mc-video-frame .mc-media, .mc-video-el, .mc-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.mc-video-el { background: #000; }
.mc-c-video .mc-body { padding-top: 12px; }
.mc-page-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.mc-prose h2, .mc-prose h3, .mc-prose h4 { margin: 1.2em 0 .4em; letter-spacing: -.01em; }
.mc-prose ul, .mc-prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.mc-prose blockquote { margin: 1em 0; padding: 4px 0 4px 14px; border-left: 3px solid var(--primary); color: var(--ink-2); }

/* Verse and quote: typography first */
.mc-c-verse, .mc-c-quote { display: flex; flex-direction: column; gap: 0; padding: 22px 22px 20px; }
.mc-size-half:is(.mc-c-verse, .mc-c-quote) { padding: 16px 14px 14px; }
.mc-qmark { font-family: Georgia, 'Iowan Old Style', 'Palatino Linotype', serif; font-size: 72px; line-height: .6; height: 34px; opacity: .4; color: var(--mc-accent); }
.mc-dark .mc-qmark { color: #fff; opacity: .35; }
.mc-c-verse .mc-kicker { margin-bottom: 10px; }
.mc-quote { font-family: Georgia, 'Iowan Old Style', 'Palatino Linotype', serif; font-size: 21px; line-height: 1.42; font-weight: 500; letter-spacing: -.005em; color: var(--ink); text-wrap: pretty; }
.mc-quote.is-long { font-size: 17.5px; line-height: 1.5; }
.mc-size-half .mc-quote { font-size: 16px; } .mc-size-half .mc-quote.is-long { font-size: 14px; } .mc-size-half .mc-qmark { font-size: 52px; height: 24px; }
.mc-cite { display: block; margin-top: 14px; font-style: normal; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mc-sub); }
.mc-cite::before { content: "— "; }
.mc-dark .mc-cite { color: rgba(255, 255, 255, .86); }

/* Announcement */
.mc-c-announcement { display: flex; gap: 14px; align-items: flex-start; }
.mc-ann-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: var(--primary-soft); color: var(--m-accent); }
.mc-ann-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.mc-c-announcement.mc-size-half { flex-direction: column; gap: 8px; }
.mc-dark .mc-ann-icon { background: rgba(255, 255, 255, .16); color: #fff; }
.mc-t-auto.mc-tone-info { background: linear-gradient(180deg, color-mix(in srgb, var(--church) 8%, var(--surface)), var(--surface)); border-color: color-mix(in srgb, var(--church) 22%, var(--border)); }
.mc-t-auto.mc-tone-celebrate { background: linear-gradient(180deg, #fff6df, var(--surface)); border-color: #f3d98f; } .mc-t-auto.mc-tone-celebrate .mc-ann-icon { background: #fde7a8; color: #92400e; }
.mc-t-auto.mc-tone-urgent { background: linear-gradient(180deg, #ffeceb, var(--surface)); border-color: #f5b5b0; } .mc-t-auto.mc-tone-urgent .mc-ann-icon { background: #fbcdc9; color: #b42318; }
.mc-t-auto.mc-tone-celebrate .mc-btn-inline { color: #92400e !important; } .mc-t-auto.mc-tone-urgent .mc-btn-inline { color: #b42318 !important; }

/* Gallery */
.mc-c-gallery .mc-head { margin: 0 2px 10px; }
.mc-strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 calc(-1 * var(--m-gutter)); padding: 2px var(--m-gutter) 4px; scroll-padding: 0 var(--m-gutter); outline-offset: 4px; }
.mc-strip::-webkit-scrollbar { display: none; }
.mc-slide { flex: 0 0 82%; margin: 0; aspect-ratio: 4 / 3; border-radius: var(--r-lg); overflow: hidden; scroll-snap-align: start; background: var(--surface-3); box-shadow: var(--shadow); }
.mc-slide img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; }
.mc-slide:only-child { flex-basis: 100%; }

/* Give, prayer, check-in */
.mc-give-top { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.mc-c-give .mc-text { margin-top: 2px; }
.mc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.mc-chip { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--mc-chip); color: var(--ink) !important; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; border: 1px solid var(--mc-line); }
.mc-dark .mc-chip { color: #fff !important; }
.mc-c-prayer .mc-bubble, .mc-c-checkin .mc-bubble { margin-bottom: 12px; }
.mc-c-prayer .mc-text { margin: 4px 0 14px; }
.mc-c-checkin .mc-big { margin: 6px 0 14px; }
.mc-size-half:is(.mc-c-give) .mc-give-top { flex-direction: column; align-items: flex-start; gap: 8px; }

/* Events, contact */
.mc-events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.mc-ev { display: flex; align-items: center; gap: 12px; padding: 8px 0; color: inherit !important; }
.mc-datebox { width: 48px; height: 52px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--m-accent); flex-shrink: 0; line-height: 1.1; }
.mc-datebox span { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.mc-datebox strong { font-size: 19px; font-weight: 700; }
.mc-ev-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mc-ev-title { font-weight: 600; font-size: 15px; line-height: 1.3; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-address { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 14px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.mc-address .icon { margin-top: 2px; color: var(--mc-accent); flex-shrink: 0; }
.mc-dark .mc-address { color: #fff; }
.mc-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mc-size-half .mc-btns { grid-template-columns: minmax(0, 1fr); }

/* Half cards are tiles: equal heights per grid row, the action pinned to the bottom, 44px tap targets */
.mc-size-half:is(.mc-c-give, .mc-c-prayer, .mc-c-checkin, .mc-c-contact, .mc-c-sermon, .mc-c-link, .mc-c-page, .mc-c-announcement, .mc-c-live_service) { display: flex; flex-direction: column; }
.mc-size-half .mc-btn-block, .mc-size-half .mc-btns { margin-top: auto; }
.mc-size-half .mc-chips { margin-bottom: 10px; gap: 6px; }
.mc-size-half .mc-chip { padding: 0 12px; min-width: 44px; }
.mc-size-half:is(.mc-c-prayer, .mc-c-checkin) .mc-bubble, .mc-size-half.mc-c-give .mc-bubble { width: 40px; height: 40px; }
.mc-size-half .mc-link-a { display: flex; flex-direction: column; height: 100%; }
.mc-size-half .mc-link-a .mc-body { flex: 1; }
.mc-size-half .mc-link-a, .mc-size-half .mc-body .mc-title { overflow-wrap: anywhere; }
.mc-size-half.mc-c-link .mc-media { aspect-ratio: 4 / 3; }
.mc-size-half.mc-c-sermon .mc-media { aspect-ratio: 4 / 3; }
.mc-size-half.mc-c-sermon .mc-play { width: 40px; height: 40px; right: 8px; bottom: 8px; }
.mc-size-half .mc-cite { margin-top: auto; padding-top: 10px; }
.mc-size-half .mc-address { font-size: 13.5px; margin-bottom: 12px; }
.mc-size-half .mc-head h2 { font-size: 16px; }
.mc-size-half .mc-kicker { font-size: 10.5px; }
.mc-size-half .mc-meta { font-size: 12px; }
.mc-size-half :is(.mc-text, .mc-meta) { overflow-wrap: anywhere; }

/* Admin preview and empty slot */
.mc-ghost { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1.5px dashed var(--border-strong); border-radius: var(--r-lg); color: var(--muted); background: var(--surface-2); font-size: 13.5px; }
.mc-ghost span { display: flex; flex-direction: column; } .mc-ghost strong { color: var(--ink); font-size: 14px; }
.mc-editing .mc-card, .mc-editing .mc-ghost { outline: 2px solid var(--primary); outline-offset: 3px; }

@media (prefers-color-scheme: dark) {
  .mc-t-auto.mc-tone-info { background: linear-gradient(180deg, color-mix(in srgb, var(--church) 16%, var(--surface)), var(--surface)); border-color: color-mix(in srgb, var(--church) 30%, var(--border)); }
  .mc-t-auto.mc-tone-celebrate { background: linear-gradient(180deg, #33270c, var(--surface)); border-color: #6b4e12; } .mc-t-auto.mc-tone-celebrate .mc-ann-icon { background: #4a3710; color: #fcd34d; } .mc-t-auto.mc-tone-celebrate .mc-btn-inline { color: #fcd34d !important; }
  .mc-t-auto.mc-tone-urgent { background: linear-gradient(180deg, #3a1616, var(--surface)); border-color: #7f2a24; } .mc-t-auto.mc-tone-urgent .mc-ann-icon { background: #532020; color: #fca5a5; } .mc-t-auto.mc-tone-urgent .mc-btn-inline { color: #fca5a5 !important; }
  .mc-card:not(.mc-dark) .mc-quote { color: var(--ink); }
  .mc-play { background: rgba(255, 255, 255, .92); }
  .mc-slide { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) { .mc-dot { animation: none; } .mc-prog span, .mc-btn { transition: none; } .mc-btn:active { transform: none; } }
