/* FaceChrist - mobile-first design system (public site, account area and admin).
   Light and dark themes follow the device; the header toggle stores an explicit choice
   in <html data-theme="light|dark">. */

/* Self-hosted Lexend (text) and Poppins (headings): only the character
   subsets a page actually uses are downloaded, and text shows immediately
   in the fallback font while they load (font-display: swap). */
@font-face { font-family: "Lexend"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("../fonts/lexend-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Lexend"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("../fonts/lexend-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Lexend"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("../fonts/lexend-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-latin-ext-600.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-latin-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins-latin-ext-700.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins-latin-700.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/poppins-latin-ext-800.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/poppins-latin-800.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --brand: #1747b5;
  --brand-600: #0f3a9a;
  --brand-deep: #0b3d91;
  --brand-50: #eef3ff;
  --brand-100: #dbe5ff;
  --cyan: #06b6d4;
  --accent: #f2b01e;
  --accent-600: #d99a0b;
  --accent-50: #fff6de;
  --on-brand: #ffffff;
  --success: #15803d;
  --success-50: #eafaf0;
  --danger: #d12c2c;
  --danger-50: #fdeeee;
  --warning: #b45309;
  --warning-50: #fff5e5;
  --info: #0369a1;
  --info-50: #e8f4fb;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f0f3f9;
  --surface-glass: rgba(255, 255, 255, .72);
  --text: #0e1526;
  --text-2: #465066;
  --muted: #6b7489;
  --border: #e3e8f1;
  --ring: rgba(23, 71, 181, .22);
  --grad-brand: linear-gradient(135deg, #1747b5 0%, #2563eb 55%, #0891b2 100%);
  --grad-night: radial-gradient(900px 480px at 8% -10%, rgba(37, 99, 235, .55), transparent 60%), radial-gradient(700px 420px at 100% 0%, rgba(6, 182, 212, .28), transparent 65%), radial-gradient(520px 360px at 85% 110%, rgba(242, 176, 30, .28), transparent 70%), linear-gradient(160deg, #081a45 0%, #06122f 60%, #040b1f 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 20px rgba(15, 23, 42, .05);
  --shadow-lg: 0 18px 50px rgba(15, 23, 42, .12);
  --shadow-brand: 0 10px 28px rgba(23, 71, 181, .28);
  --font: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Poppins", "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --brand: #7aa2ff;
  --brand-600: #a3bfff;
  --brand-50: #111c3a;
  --brand-100: #1a2a55;
  --accent: #f6c145;
  --accent-600: #f2b01e;
  --accent-50: #2a220c;
  --on-brand: #06102a;
  --success: #4ade80;
  --success-50: #0d2619;
  --danger: #f87171;
  --danger-50: #2d1215;
  --warning: #fbbf24;
  --warning-50: #2b200b;
  --info: #38bdf8;
  --info-50: #0b2231;
  --bg: #060a16;
  --surface: #0d1427;
  --surface-2: #131c35;
  --surface-glass: rgba(10, 16, 32, .72);
  --text: #e9eefb;
  --text-2: #b6c0d6;
  --muted: #8791aa;
  --border: #1d2845;
  --ring: rgba(122, 162, 255, .3);
  --grad-brand: linear-gradient(135deg, #7aa2ff 0%, #60a5fa 50%, #22d3ee 100%);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .28);
  --shadow-lg: 0 20px 56px rgba(0, 0, 0, .5);
  --shadow-brand: 0 10px 30px rgba(96, 165, 250, .25);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #7aa2ff;
    --brand-600: #a3bfff;
    --brand-50: #111c3a;
    --brand-100: #1a2a55;
    --accent: #f6c145;
    --accent-600: #f2b01e;
    --accent-50: #2a220c;
    --on-brand: #06102a;
    --success: #4ade80;
    --success-50: #0d2619;
    --danger: #f87171;
    --danger-50: #2d1215;
    --warning: #fbbf24;
    --warning-50: #2b200b;
    --info: #38bdf8;
    --info-50: #0b2231;
    --bg: #060a16;
    --surface: #0d1427;
    --surface-2: #131c35;
    --surface-glass: rgba(10, 16, 32, .72);
    --text: #e9eefb;
    --text-2: #b6c0d6;
    --muted: #8791aa;
    --border: #1d2845;
    --ring: rgba(122, 162, 255, .3);
    --grad-brand: linear-gradient(135deg, #7aa2ff 0%, #60a5fa 50%, #22d3ee 100%);
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .28);
    --shadow-lg: 0 20px 56px rgba(0, 0, 0, .5);
    --shadow-brand: 0 10px 30px rgba(96, 165, 250, .25);
    color-scheme: dark;
  }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  padding-bottom: 76px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (min-width: 900px) { body { padding-bottom: 0; } }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .15s; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
::selection { background: var(--brand-100); color: var(--text); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--on-brand); padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.icon { flex: none; display: inline-block; vertical-align: middle; }
.gradient-text { background: linear-gradient(100deg, #ffd873 0%, #f2b01e 40%, #7dd3fc 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hide-sm { display: none; }
@media (min-width: 640px) { .hide-sm { display: table-cell; } }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.container-narrow { max-width: 840px; }
.section { padding: 36px 0; }
@media (min-width: 768px) { .section { padding: 64px 0; } .container { padding: 0 24px; } }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.eyebrow { display: inline-block; text-transform: uppercase; font-size: .72rem; letter-spacing: .12em; font-weight: 800; color: var(--accent-600); margin-bottom: 6px; }

/* Header */
/* The frosted glass sits on a layer behind the header: a backdrop-filter on the header itself
   would make it the containing block of the fixed mobile menu and squeeze the menu to nothing */
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--surface-glass); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); }
.site-header .container { max-width: 1400px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 12px; }
.brand { flex: none; display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; color: var(--text); font-size: 1.12rem; letter-spacing: -.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 11px; box-shadow: var(--shadow-brand); }
.header-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 0; background: transparent; color: var(--text); cursor: pointer; transition: background .15s, transform .15s; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.94); }
.theme-icon-light { display: none; }
:root[data-theme="dark"] .theme-icon-light { display: inline-flex; }
:root[data-theme="dark"] .theme-icon-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon-light { display: inline-flex; }
  :root:not([data-theme="light"]) .theme-icon-dark { display: none; }
}
.main-nav { position: fixed; inset: var(--header-h) 0 0 0; background: var(--bg); padding: 16px; overflow-y: auto; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: transform .25s var(--ease), opacity .2s, visibility 0s linear .25s; display: flex; flex-direction: column; gap: 18px; }
.main-nav.open { transform: none; opacity: 1; visibility: visible; transition: transform .25s var(--ease), opacity .2s; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul { display: grid; gap: 4px; }
.main-nav > ul > li > a, .dropdown-toggle { display: block; width: 100%; text-align: left; padding: 13px 14px; border-radius: 14px; color: var(--text); background: none; border: 0; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.main-nav a[aria-current="page"] { color: var(--brand); background: var(--brand-50); }
.main-nav a:hover, .dropdown-toggle:hover { text-decoration: none; background: var(--surface-2); }
.dropdown { display: none; padding: 4px 0 4px 12px; }
.has-dropdown.open .dropdown { display: grid; gap: 2px; }
.dropdown a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-weight: 500; white-space: nowrap; }
.nav-account { display: flex; gap: 8px; flex-wrap: wrap; }
.nav-account .btn { flex: 1 1 auto; }
@media (min-width: 1260px) {
  .menu-toggle { display: none; }
  .main-nav { position: static; transform: none; opacity: 1; visibility: visible; flex-direction: row; align-items: center; padding: 0; background: none; overflow: visible; gap: 14px; }
  .main-nav > ul { display: flex; gap: 2px; }
  .main-nav > ul > li > a, .dropdown-toggle { padding: 8px 10px; font-size: .9rem; border-radius: 10px; }
  .main-nav { margin-left: auto; }
  .has-dropdown { position: relative; }
  .dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 6px; }
  .has-dropdown:hover .dropdown, .has-dropdown.open .dropdown { display: grid; }
  .has-dropdown::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }
  .nav-account { flex-wrap: nowrap; }
  .nav-account .btn { flex: none; white-space: nowrap; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 14px; font-weight: 700; font-size: .95rem; border: 1px solid transparent; cursor: pointer; transition: background .2s, transform .12s, box-shadow .2s, border-color .2s, filter .2s; font-family: inherit; line-height: 1.2; text-decoration: none !important; white-space: nowrap; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--grad-brand); color: var(--on-brand); box-shadow: var(--shadow-brand); }
.btn-primary:hover { filter: brightness(1.07); box-shadow: 0 14px 32px rgba(23, 71, 181, .34); }
.btn-accent { background: linear-gradient(135deg, #ffcf55, #f2b01e); color: #221700; box-shadow: 0 10px 26px rgba(242, 176, 30, .32); }
.btn-accent:hover { filter: brightness(1.05); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--brand) 30%, var(--border)); }
.btn-light { background: #fff; color: #0b3d91; box-shadow: 0 10px 26px rgba(0, 0, 0, .14); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
:root[data-theme="dark"] .btn-danger, :root[data-theme="dark"] .btn-success { color: #06102a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-danger, :root:not([data-theme="light"]) .btn-success { color: #06102a; } }
.btn-sm { padding: 8px 14px; font-size: .85rem; border-radius: 11px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; }
.link-btn { background: none; border: 0; color: var(--brand); cursor: pointer; font: inherit; padding: 0; font-weight: 600; }

/* Hero */
.hero { position: relative; background: var(--grad-night); color: #fff; overflow: hidden; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 44px 44px; -webkit-mask-image: radial-gradient(ellipse at 30% 20%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at 30% 20%, #000 20%, transparent 75%); }
.hero::after { content: ""; position: absolute; z-index: -1; right: -140px; bottom: -160px; width: 440px; height: 440px; border-radius: 50%; background: radial-gradient(circle, rgba(242, 176, 30, .35), transparent 68%); filter: blur(10px); animation: glow 12s ease-in-out infinite alternate; }
@keyframes glow { from { transform: translate(0, 0) scale(1); } to { transform: translate(-60px, -40px) scale(1.12); } }
.hero-inner { position: relative; padding-top: 48px; padding-bottom: 56px; display: grid; gap: 28px; }
@media (min-width: 900px) { .hero-inner { grid-template-columns: 1.15fr .85fr; align-items: center; padding-top: 96px; padding-bottom: 96px; gap: 48px; } }
.hero h1 { color: #fff; font-size: clamp(2rem, 5.6vw, 3.6rem); line-height: 1.08; letter-spacing: -.035em; }
.hero .eyebrow { color: #ffd873; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); padding: 6px 12px; border-radius: 999px; backdrop-filter: blur(8px); }
.hero p.lead { font-size: 1.1rem; color: rgba(229, 236, 255, .86); max-width: 46ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .22); backdrop-filter: blur(8px); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .16); }
.verse-card { position: relative; background: linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .04)); border: 1px solid rgba(255, 255, 255, .18); border-radius: 24px; padding: 26px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 30px 60px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .15); }
.verse-card::before { content: "\201C"; position: absolute; top: -18px; right: 20px; font-family: var(--serif); font-size: 6rem; line-height: 1; color: rgba(255, 216, 115, .35); }
.verse-card blockquote { margin: 0 0 14px; font-family: var(--serif); font-size: 1.25rem; line-height: 1.6; color: #fff; }
.verse-card cite { font-style: normal; font-weight: 700; color: #ffd873; }
.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 28px; max-width: 520px; }
@media (min-width: 640px) { .hero-stats { grid-template-columns: repeat(4, 1fr); } }
.hero-stats div { padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); }
.hero-stats strong { display: block; font-family: var(--display); font-size: 1.4rem; font-weight: 800; color: #fff; }
.hero-stats span { font-size: .78rem; color: rgba(229, 236, 255, .75); }
.page-hero { position: relative; background: var(--grad-night); color: #fff; padding: 40px 0 44px; overflow: hidden; isolation: isolate; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 40px 40px; -webkit-mask-image: linear-gradient(90deg, #000, transparent 70%); mask-image: linear-gradient(90deg, #000, transparent 70%); }
@media (min-width: 768px) { .page-hero { padding: 56px 0 60px; } }
.page-hero h1 { color: #fff; margin-bottom: 8px; font-size: clamp(1.7rem, 4.5vw, 2.6rem); }
.page-hero p { color: rgba(229, 236, 255, .85); margin: 0; max-width: 62ch; }
.breadcrumbs { font-size: .85rem; margin-bottom: 10px; color: rgba(229, 236, 255, .7); }
.breadcrumbs a { color: rgba(255, 255, 255, .92); }

/* Cards & grids */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .grid-2, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid { gap: 20px; } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-media { aspect-ratio: 16 / 9; background: var(--surface-2); object-fit: cover; width: 100%; transition: transform .5s var(--ease); }
.card-media-square { aspect-ratio: 1 / 1; }
.card h3 { margin: 0; }
.card h3 a { color: var(--text); }
.card-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: .8rem; color: var(--muted); align-items: center; }
.card-link { position: relative; }
.card-link a.stretched::after { content: ""; position: absolute; inset: 0; }
.card-link a.stretched:hover { text-decoration: none; }
.card-link:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); box-shadow: var(--shadow-lg); }
.card-link:hover .card-media { transform: scale(1.04); }
.card-link:hover h3 a { color: var(--brand); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 16px; }
.panel h2, .panel h3 { margin-top: 0; }
.tile { position: relative; display: flex; gap: 14px; align-items: center; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); box-shadow: var(--shadow); transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
.tile:hover { text-decoration: none; transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); box-shadow: var(--shadow-lg); }
.tile-icon { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-weight: 800; font-size: .82rem; letter-spacing: -.01em; }
.tile:hover .tile-icon { background: var(--grad-brand); color: var(--on-brand); }
.tile-icon.monogram { background: var(--grad-brand); color: var(--on-brand); font-family: var(--display); box-shadow: var(--shadow-brand); }
.tile strong { display: block; font-family: var(--display); letter-spacing: -.01em; }
.tile span { font-size: .85rem; color: var(--muted); }
.tile .tile-icon { color: var(--brand); }
.tile .tile-icon.monogram, .tile:hover .tile-icon { color: var(--on-brand); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: .7rem; font-weight: 800; background: var(--brand-50); color: var(--brand); text-transform: uppercase; letter-spacing: .05em; }
.badge-accent { background: var(--accent-50); color: var(--warning); }
.badge-success { background: var(--success-50); color: var(--success); }
.badge-danger { background: var(--danger-50); color: var(--danger); }
.badge-muted { background: var(--surface-2); color: var(--muted); }
.stat { position: relative; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.stat::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--grad-brand); opacity: .09; }
.stat strong { display: block; font-family: var(--display); font-size: 1.8rem; font-weight: 800; letter-spacing: -.03em; }
.stat span { color: var(--muted); font-size: .85rem; }

/* Reveal on scroll (added by app.js only for elements below the fold) */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-visible { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Layout with sidebar */
.layout { display: grid; gap: 24px; }
@media (min-width: 960px) { .layout { grid-template-columns: minmax(0, 1fr) 340px; } .layout-left { grid-template-columns: 260px minmax(0, 1fr); } }

/* Article */
.article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
@media (min-width: 768px) { .article { padding: 36px; } }
.article .cover { border-radius: 14px; margin-bottom: 20px; width: 100%; }
.prose { font-size: 1.05rem; line-height: 1.75; }
.prose p { margin-bottom: 1.1em; }
.prose h2 { margin-top: 1.4em; }
.prose blockquote { margin: 1.2em 0; padding: 12px 18px; border-left: 4px solid var(--accent); background: var(--accent-50); border-radius: 0 12px 12px 0; }
.liturgy-body strong { color: var(--brand); }
.scripture { font-family: var(--serif); font-size: 1.15rem; line-height: 1.85; }
.scripture sup { color: var(--brand); font-family: var(--font); font-weight: 700; font-size: .7em; margin-right: 3px; }
.scripture .verse { scroll-margin-top: 90px; }
.scripture .verse:target { background: var(--accent-50); border-radius: 4px; }
.lyrics { font-family: var(--serif); font-size: 1.14rem; line-height: 1.85; }
.lyrics .stanza { margin-bottom: 1.2em; }
.lyrics .chorus { padding-left: 16px; border-left: 3px solid var(--accent); font-style: italic; }
.lyrics .chorus-repeat { opacity: .75; }

/* Forms */
.form { display: grid; gap: 14px; }
.form-row { display: grid; gap: 14px; }
@media (min-width: 640px) { .form-row { grid-template-columns: repeat(2, 1fr); } .form-row-3 { grid-template-columns: repeat(3, 1fr); } }
label { font-weight: 600; font-size: .9rem; display: block; margin-bottom: 6px; color: var(--text); }
.field-hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }
input:not([type]), input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], input[type="date"], input[type="datetime-local"], input[type="url"], input[type="search"], input[type="file"], select, textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; font-size: 16px; transition: border-color .15s, box-shadow .15s, background .15s;
}
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--brand) 25%, var(--border)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { min-height: 120px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.checkbox input { margin-top: 5px; width: 18px; height: 18px; }
.checkbox-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.search-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.search-bar input, .search-bar select { flex: 1 1 180px; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 4px 4px 12px; margin: -4px -4px 0; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 15px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-size: .85rem; font-weight: 600; white-space: nowrap; transition: all .15s; }
.chip:hover { text-decoration: none; border-color: var(--brand); color: var(--brand); }
.chip.active { background: var(--grad-brand); color: var(--on-brand); border-color: transparent; box-shadow: var(--shadow-brand); }

/* Alerts */
.alert { padding: 13px 16px; border-radius: 14px; margin-bottom: 10px; border: 1px solid transparent; font-weight: 500; }
.alert-success { background: var(--success-50); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.alert-error, .alert-danger { background: var(--danger-50); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alert-info { background: var(--info-50); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.alert-warning { background: var(--warning-50); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.flash-area { padding-top: 16px; }
.empty { text-align: center; padding: 44px 16px; color: var(--muted); background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-weight: 700; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); white-space: nowrap; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: color-mix(in srgb, var(--brand-50) 55%, transparent); }
tr:last-child td { border-bottom: 0; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.actions form { margin: 0; }

/* Pagination */
.pagination { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 28px 0 8px; }
.pagination a, .pagination span { min-width: 42px; height: 42px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: .9rem; }
.pagination a:hover { text-decoration: none; border-color: var(--brand); }
.pagination .current { background: var(--grad-brand); color: var(--on-brand); border-color: transparent; }

/* Avatars */
.avatar { aspect-ratio: 1 / 1; border-radius: 50%; object-fit: cover; flex: none; display: inline-block; vertical-align: middle; }
.avatar-initials { display: inline-grid; place-items: center; background: var(--grad-brand); color: var(--on-brand); font-weight: 700; font-size: .75rem; border-radius: 50%; }

/* Events */
.date-badge { flex: none; width: 60px; text-align: center; border-radius: 14px; background: var(--grad-brand); color: var(--on-brand); padding: 7px 0; line-height: 1.1; box-shadow: var(--shadow-brand); }
.date-badge b { display: block; font-family: var(--display); font-size: 1.45rem; }
.date-badge small { text-transform: uppercase; font-weight: 700; font-size: .68rem; letter-spacing: .06em; opacity: .9; }
.event-row { display: flex; gap: 14px; align-items: flex-start; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; }
.event-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 30%, var(--border)); }
.event-row + .event-row { margin-top: 10px; }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar .day-name { font-size: .7rem; font-weight: 700; text-align: center; color: var(--muted); text-transform: uppercase; }
.calendar .day { min-height: 54px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); padding: 4px; font-size: .78rem; min-width: 0; }
.calendar .day.other { opacity: .35; }
.calendar .day.today { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.calendar .day .dot { display: block; font-size: .65rem; background: var(--grad-brand); color: var(--on-brand); border-radius: 5px; padding: 1px 4px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 768px) { .calendar .day { min-height: 96px; padding: 6px; } }

/* Map */
.map { height: 380px; border-radius: var(--radius); border: 1px solid var(--border); z-index: 1; box-shadow: var(--shadow); }
@media (min-width: 960px) { .map { height: 540px; } }

.chapter-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 20px; }

/* Timeline & chat */
.post { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.post + .post { margin-top: 14px; }
.post-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.post-head strong { display: block; line-height: 1.2; }
.post-media { border-radius: 14px; margin: 10px 0; max-height: 540px; object-fit: cover; width: 100%; }
.post-actions { display: flex; gap: 8px; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; flex-wrap: wrap; }
.post-actions button, .post-actions a { flex: 1; background: var(--surface-2); border: 0; border-radius: 12px; padding: 9px; color: var(--text-2); cursor: pointer; font: inherit; font-weight: 600; font-size: .88rem; text-align: center; transition: background .15s, color .15s; }
.post-actions button:hover, .post-actions a:hover { background: var(--brand-50); color: var(--brand); text-decoration: none; }
.post-actions .active { color: var(--brand); background: var(--brand-50); }
.comment { display: flex; gap: 8px; margin-top: 10px; }
.comment-bubble { background: var(--surface-2); padding: 9px 13px; border-radius: 14px; font-size: .92rem; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.list > li:last-child { border-bottom: 0; }

/* Account side nav */
.side-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.side-nav::-webkit-scrollbar { display: none; }
.side-nav a { flex: none; padding: 10px 14px; border-radius: 12px; color: var(--text-2); font-weight: 600; background: var(--surface); border: 1px solid var(--border); font-size: .9rem; }
.side-nav a[aria-current="page"] { background: var(--grad-brand); color: var(--on-brand); border-color: transparent; box-shadow: var(--shadow-brand); }
@media (min-width: 960px) {
  .side-nav { flex-direction: column; position: sticky; top: calc(var(--header-h) + 16px); padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
  .side-nav a { border: 0; background: none; }
  .side-nav a:hover { background: var(--surface-2); text-decoration: none; }
}

/* Wallet */
.wallet-card { position: relative; overflow: hidden; background: var(--grad-night); color: #fff; border-radius: 24px; padding: 24px; box-shadow: var(--shadow-lg); isolation: isolate; }
.wallet-card::after { content: ""; position: absolute; z-index: -1; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(242, 176, 30, .4), transparent 70%); }
.wallet-card strong { font-family: var(--display); font-size: 2.2rem; letter-spacing: -.03em; display: block; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 14px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { background: none; border: 0; padding: 9px 14px; font: inherit; font-weight: 600; color: var(--muted); border-radius: 10px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.tabs button.active { color: var(--brand); background: var(--surface); box-shadow: var(--shadow); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .3s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Audio */
.track-list { list-style: none; padding: 0; margin: 0; }
.track-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; transition: background .15s; }
.track-list li:hover { background: var(--surface-2); }
.track-list button { flex: none; }
audio { width: 100%; }

/* Footer & CTA */
.app-cta { position: relative; overflow: hidden; background: linear-gradient(120deg, #ffcf55 0%, #f2b01e 45%, #e08a00 100%); color: #221700; margin-top: 48px; isolation: isolate; }
.app-cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(500px 240px at 90% 0%, rgba(255, 255, 255, .45), transparent 70%); }
.app-cta-inner { display: grid; gap: 16px; padding: 36px 16px; }
.app-cta h2 { margin-bottom: 6px; color: #1a1200; }
.app-cta p { margin: 0; max-width: 62ch; }
.store-buttons { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
@media (min-width: 900px) { .app-cta-inner { grid-template-columns: 1fr auto; align-items: center; padding: 48px 24px; } }
.site-footer { position: relative; background: #050a1a; color: #aab7d3; padding: 48px 0 24px; overflow: hidden; }
.site-footer::before { content: ""; position: absolute; left: -120px; top: -160px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(37, 99, 235, .25), transparent 70%); }
.site-footer a { color: #dfe7fb; }
.site-footer a:hover { color: #ffd873; }
.site-footer h3 { color: #fff; font-size: .95rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: .92rem; }
.footer-grid { position: relative; display: grid; gap: 28px; grid-template-columns: 1fr 1fr; }
.footer-grid > div:first-child { grid-column: 1 / -1; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } .footer-grid > div:first-child { grid-column: auto; } }
.brand-footer { color: #fff; margin-bottom: 12px; }
.site-footer .muted { color: #8f9dbb; }
.footer-bottom { position: relative; border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 32px; padding-top: 18px; font-size: .85rem; }
.footer-bottom p { margin: 0 0 4px; }

/* Bottom navigation (phones) */
.bottom-nav { position: fixed; bottom: 10px; left: 10px; right: 10px; z-index: 60; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface-glass); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 6px 4px; margin-bottom: env(safe-area-inset-bottom); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; font-weight: 600; color: var(--muted); padding: 5px 0; border-radius: 14px; }
.bottom-nav a:hover { text-decoration: none; }
.bottom-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav a[aria-current="page"] { color: var(--brand); background: var(--brand-50); }
@media (min-width: 900px) { .bottom-nav { display: none; } }

/* Auth */
.auth-wrap { position: relative; min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 32px 16px; background: radial-gradient(700px 360px at 0% 0%, var(--brand-50), transparent 70%), radial-gradient(600px 320px at 100% 100%, var(--accent-50), transparent 70%); }
.auth-card { width: 100%; max-width: 520px; box-shadow: var(--shadow-lg); }

/* Admin */
.admin-body { background: var(--bg); padding-bottom: 0; }
.admin-shell { display: grid; min-height: 100vh; }
@media (min-width: 1024px) { .admin-shell { grid-template-columns: 272px 1fr; background: linear-gradient(90deg, #050b1f 272px, transparent 272px); } }
.admin-sidebar { background: linear-gradient(180deg, #071335 0%, #050b1f 100%); color: #aab7d3; padding: 18px 14px; position: fixed; inset: 0 auto 0 0; width: min(290px, 84vw); transform: translateX(-100%); transition: transform .28s var(--ease); z-index: 70; overflow-y: auto; box-shadow: var(--shadow-lg); }
.admin-sidebar.open { transform: none; }
@media (min-width: 1024px) { .admin-sidebar { position: sticky; top: 0; height: 100vh; width: auto; transform: none; box-shadow: none; } }
.admin-sidebar a { display: flex; align-items: center; gap: 10px; color: #cdd7ee; padding: 9px 12px; border-radius: 12px; font-size: .9rem; font-weight: 500; transition: background .15s, color .15s; }
.admin-sidebar a .icon { opacity: .75; }
.admin-sidebar a:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.admin-sidebar a[aria-current="page"] { background: linear-gradient(135deg, rgba(37, 99, 235, .55), rgba(8, 145, 178, .4)); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.admin-sidebar a[aria-current="page"] .icon { opacity: 1; }
.admin-sidebar h4 { font-family: var(--font); font-size: .66rem; text-transform: uppercase; letter-spacing: .12em; color: #6d80a6; margin: 18px 12px 6px; }
.admin-sidebar .brand { color: #fff; margin: 0 6px 6px; }
.admin-role { margin: 0 12px 8px; color: #8f9dbb; }
.admin-main { min-width: 0; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--surface-glass); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40; }
.admin-title { font-family: var(--display); font-size: 1.05rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-topbar-actions { display: flex; gap: 8px; align-items: center; }
.admin-content { padding: 16px; }
@media (min-width: 768px) { .admin-content { padding: 28px; } }
.admin-toggle { display: inline-grid; }
@media (min-width: 1024px) { .admin-toggle { display: none; } }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar h1 { font-size: 1.6rem; margin: 0; }
.thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; }

@media print {
  .site-header, .site-footer, .bottom-nav, .app-cta, .theme-toggle { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Two-column tile grids on phones: icon above the text so labels have room */
@media (max-width: 639px) {
  .grid-4 > .tile { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* Payment breakdown and receipts */
.breakdown table { width: 100%; font-size: .9rem; }
.breakdown td, .breakdown th { padding: 6px 0; border-bottom: 1px dashed var(--border); }
.breakdown th { background: none; text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--text); }
.receipt { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 28px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.receipt::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--grad-brand); }
.receipt-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.receipt h1 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0; }
.receipt-amount { font-family: var(--display); font-size: clamp(2rem, 7vw, 2.8rem); font-weight: 800; letter-spacing: -.03em; margin: 4px 0 18px; }
.receipt-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 20px; margin: 0 0 18px; }
.receipt-facts dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.receipt-facts dd { margin: 2px 0 0; font-weight: 600; word-break: break-word; }
.receipt-lines { margin-bottom: 16px; }
.receipt-lines th { background: none; }
@media print {
  .receipt { box-shadow: none; border: 1px solid #ccc; }
  .actions { display: none !important; }
}

/* Upload previews */
.upload-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 10px; }
.upload-preview:empty { display: none; }
.upload-preview figure { margin: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.upload-preview img, .upload-preview video { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #000; }
.upload-preview audio { width: 100%; }
.upload-preview .upload-doc { display: grid; place-items: center; aspect-ratio: 1; font-weight: 800; color: var(--brand); background: var(--brand-50); }
.upload-preview figcaption { font-size: .72rem; padding: 6px 8px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Bulletins */
.order-of-service { margin: 0; padding: 0; list-style: none; counter-reset: service; }
.order-of-service li { counter-increment: service; display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.order-of-service li:last-child { border-bottom: 0; }
.order-of-service li::before { content: counter(service); flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-weight: 800; font-size: .85rem; }

/* Member notes */
.note-card { border-top: 4px solid var(--border); }
.note-gold { border-top-color: #f2b01e; }
.note-blue { border-top-color: #2563eb; }
.note-green { border-top-color: #16a34a; }
.note-rose { border-top-color: #e11d48; }
.note-purple { border-top-color: #7c3aed; }

/* Reports */
.bar-chart { display: flex; align-items: flex-end; gap: 3px; height: 160px; }
.bar-chart .bar { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.bar-chart .bar span { display: block; width: 100%; background: var(--grad-brand); border-radius: 4px 4px 0 0; min-height: 2px; }
.meter { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-bottom: 2px; }
.meter span { display: block; height: 100%; background: var(--grad-brand); border-radius: 999px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #16a34a; margin-left: 4px; box-shadow: 0 0 0 0 rgba(22, 163, 74, .6); animation: pulse 1.8s infinite; }
@keyframes pulse { to { box-shadow: 0 0 0 10px rgba(22, 163, 74, 0); } }

/* Tabs as links */
.tabs a { padding: 9px 14px; font-weight: 600; color: var(--muted); border-radius: 10px; white-space: nowrap; }
.tabs a[aria-selected="true"] { color: var(--brand); background: var(--surface); box-shadow: var(--shadow); }
.tabs a:hover { text-decoration: none; color: var(--brand); }

/* Bottom sheets (dialog) */
dialog.sheet { border: 0; padding: 0; background: var(--surface); color: var(--text); width: min(560px, 100%); max-height: 88vh; border-radius: 24px; box-shadow: var(--shadow-lg); overflow: auto; }
dialog.sheet::backdrop { background: rgba(6, 12, 30, .55); backdrop-filter: blur(3px); }
dialog.sheet > form, dialog.sheet > div { padding: 22px 20px 20px; }
dialog.sheet h2 { font-size: 1.2rem; margin: 0 0 4px; }
dialog.sheet[open] { animation: sheetUp .28s var(--ease); }
.sheet-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 6px; }
.choice { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
@media (max-width: 640px) {
  dialog.sheet { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: 24px 24px 0 0; }
  dialog.sheet::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--border); margin: 10px auto 0; }
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Chat */
.chat-shell { display: flex; flex-direction: column; height: calc(100vh - 200px); min-height: 460px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.chat-top { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
.chat-who { flex: 1; min-width: 0; line-height: 1.2; }
.chat-who strong, .chat-who span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-context { display: flex; gap: 8px; align-items: center; max-width: 45%; padding: 6px 10px; border-radius: 12px; background: var(--surface-2); color: var(--text); font-size: .82rem; line-height: 1.2; }
.chat-context img { width: 38px; height: 38px; object-fit: cover; border-radius: 8px; flex: none; }
.chat-context:hover { text-decoration: none; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: radial-gradient(600px 300px at 100% 0%, var(--brand-50), transparent 70%); }
.chat-older { align-self: center; }
.bubble { position: relative; max-width: 78%; padding: 9px 13px; border-radius: 18px; background: var(--surface-2); align-self: flex-start; word-wrap: break-word; border-bottom-left-radius: 6px; }
.bubble.mine { align-self: flex-end; background: var(--grad-brand); color: var(--on-brand); border-bottom-left-radius: 18px; border-bottom-right-radius: 6px; }
.bubble.mine a { color: inherit; text-decoration: underline; }
.bubble.deleted { opacity: .65; font-style: italic; }
.bubble.flash { box-shadow: 0 0 0 3px var(--ring); }
.bubble-text { white-space: pre-wrap; }
.bubble time { display: block; font-size: .68rem; opacity: .75; margin-top: 3px; text-align: right; }
.bubble .ticks.seen { color: #7dd3fc; font-weight: 700; }
.bubble-media { display: block; max-width: 100%; border-radius: 12px; margin: 2px 0 4px; }
.bubble-media img, img.bubble-media, video.bubble-media { display: block; max-width: min(320px, 100%); max-height: 360px; border-radius: 12px; object-fit: cover; }
.bubble audio { max-width: 260px; }
.bubble-quote { font-size: .8rem; padding: 6px 9px; margin-bottom: 5px; border-left: 3px solid currentColor; border-radius: 8px; background: rgba(127, 127, 127, .15); cursor: pointer; opacity: .9; }
.bubble-file { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: rgba(127, 127, 127, .15); color: inherit; min-width: 200px; }
.bubble-file:hover { text-decoration: none; }
.bubble-file strong, .bubble-file small { display: block; }
.bubble-file-icon { font-size: 1.5rem; }
.bubble-menu { position: absolute; top: -14px; right: 6px; display: none; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 2px; box-shadow: var(--shadow); }
.bubble:hover .bubble-menu, .bubble:focus-within .bubble-menu { display: flex; }
.bubble-menu button { border: 0; background: none; color: var(--text-2); font: inherit; font-size: .72rem; font-weight: 700; padding: 4px 7px; border-radius: 8px; cursor: pointer; }
.bubble-menu button:hover { background: var(--surface-2); color: var(--brand); }
.chat-system { align-self: center; max-width: 90%; text-align: center; }
.chat-system span { display: inline-block; font-size: .78rem; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.chat-card { min-width: 230px; display: grid; gap: 6px; color: var(--text); background: var(--surface); border-radius: 14px; padding: 12px; margin: 2px 0 4px; }
.chat-card .eyebrow { font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.chat-card-amount { font-family: var(--display); font-size: 1.5rem; letter-spacing: -.02em; }
.chat-card-lines { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; margin: 0; font-size: .86rem; }
.chat-card-lines dt { color: var(--muted); }
.chat-card-lines dd { margin: 0; font-weight: 700; text-align: right; }
.chat-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.chat-typing { padding: 0 16px 6px; }
.chat-reply, .chat-file { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 6px 12px; font-size: .82rem; background: var(--surface-2); border-top: 1px solid var(--border); }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); background: var(--surface); align-items: flex-end; flex-wrap: wrap; }
.chat-form textarea { flex: 1 1 200px; min-height: 44px; height: 44px; resize: none; }
.chat-attach { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); color: var(--text-2); cursor: pointer; flex: none; }
.chat-attach:hover { color: var(--brand); }
.chat-tools { display: flex; gap: 6px; align-items: center; }
.chat-list { padding: 6px; }
.chat-row { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; color: var(--text); }
.chat-row:hover { background: var(--surface-2); text-decoration: none; }
.chat-row.unread strong, .chat-row.unread .chat-row-last { color: var(--text); font-weight: 700; }
.chat-row-main { flex: 1; min-width: 0; }
.chat-row-main strong { margin-right: 6px; }
.chat-row-last { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row-meta { display: grid; gap: 4px; justify-items: end; }
.chat-avatar { position: relative; flex: none; }
.chat-avatar.online::after { content: ""; position: absolute; right: 1px; bottom: 1px; width: 12px; height: 12px; border-radius: 50%; background: var(--success); border: 2px solid var(--surface); }
.search-inline input { min-width: 200px; }
.inline-form { display: inline; margin: 0; }
@media (max-width: 640px) {
  .chat-shell { height: calc(100vh - 150px); border-radius: 0; margin: 0 -16px; border-left: 0; border-right: 0; }
  .chat-context { display: none; }
  .chat-tools .btn-ghost { padding: 8px 10px; }
  .bubble { max-width: 88%; }
}

/* Reactions */
.react { position: relative; display: flex; align-items: center; gap: 6px; flex: 1; }
.react-summary { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.post-actions .react .react-toggle { flex: 1; }
.react-toggle { background: var(--surface-2); border: 0; border-radius: 12px; padding: 9px; color: var(--text-2); cursor: pointer; font: inherit; font-weight: 600; font-size: .88rem; user-select: none; -webkit-user-select: none; }
.react-toggle.active { color: var(--brand); background: var(--brand-50); }
.react-picker { position: absolute; bottom: calc(100% + 6px); left: 0; display: flex; gap: 2px; padding: 5px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transform: translateY(6px) scale(.96); transition: all .18s var(--ease); z-index: 20; }
.react.open .react-picker { opacity: 1; pointer-events: auto; transform: none; }
.react-picker button { border: 0; background: none; font-size: 1.45rem; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; transition: transform .15s; }
.react-picker button:hover, .react-picker button:focus-visible { transform: scale(1.25) translateY(-3px); background: var(--surface-2); }
.comment-tools { display: flex; gap: 12px; align-items: center; margin: 4px 0 0 6px; flex-wrap: wrap; }
.comment-tools .react { flex: none; }
.comment-tools .react-toggle { padding: 3px 8px; font-size: .78rem; }
.inline-edit summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.inline-edit form { margin-top: 6px; }

/* Posts: composer, previews, carousels, menus, reels */
.feed-column { max-width: 680px; }
.post-body { white-space: pre-line; margin: 0; }
.post-audio { width: 100%; margin: 10px 0; }
.composer-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.composer-row select { flex: 0 1 180px; }
.composer-row .btn-primary { margin-left: auto; }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.preview-grid:empty { display: none; }
.preview-thumb { position: relative; display: grid; gap: 4px; align-content: start; font-size: .78rem; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); word-break: break-word; }
.preview-thumb img, .preview-thumb video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 9px; }
.preview-thumb.removable:has(input[type="checkbox"]:checked) { opacity: .45; outline: 2px solid var(--danger); }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; z-index: 10; min-width: 180px; display: grid; gap: 6px; padding: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); }
.carousel { position: relative; margin: 10px 0; }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 14px; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * { flex: 0 0 100%; scroll-snap-align: start; }
.carousel-track img { width: 100%; max-height: 540px; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.carousel-dots { display: flex; gap: 6px; justify-content: center; margin-top: 8px; }
.carousel-dots button { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 0; background: var(--border); cursor: pointer; }
.carousel-dots button.active { background: var(--brand); width: 20px; border-radius: 4px; }
.carousel-thumbs { display: flex; gap: 8px; overflow-x: auto; margin-top: 8px; scrollbar-width: none; }
.carousel-thumbs button { flex: none; padding: 0; border: 2px solid transparent; border-radius: 10px; background: none; cursor: pointer; overflow: hidden; }
.carousel-thumbs button.active { border-color: var(--brand); }
.carousel-thumbs img { width: 64px; height: 64px; object-fit: cover; display: block; }
.gallery-carousel .carousel-track img { aspect-ratio: 1; max-height: 560px; background: var(--surface-2); object-fit: contain; }
.reels { display: grid; gap: 16px; max-height: calc(100vh - 220px); overflow-y: auto; scroll-snap-type: y mandatory; border-radius: var(--radius); scrollbar-width: none; }
.reels::-webkit-scrollbar { display: none; }
.reel { position: relative; scroll-snap-align: start; height: calc(100vh - 220px); min-height: 420px; background: #000; border-radius: var(--radius); overflow: hidden; }
.reel video { width: 100%; height: 100%; object-fit: contain; }
.reel-info { position: absolute; left: 0; right: 0; bottom: 48px; padding: 16px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); pointer-events: none; }
.reel-info p { margin: 4px 0; }
.reel-actions { display: flex; gap: 10px; align-items: center; pointer-events: auto; }
.reel-actions a, .reel-actions .react-summary { color: #fff; }

/* Marketplace */
.market-search { margin-bottom: 12px; }
.market-toolbar { align-items: center; }
.market-toolbar .filters { flex: 1 1 320px; min-width: 0; padding-bottom: 4px; }
.toolbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.view-toggle { display: inline-flex; padding: 3px; background: var(--surface-2); border-radius: 12px; }
.view-toggle button { border: 0; background: none; color: var(--muted); padding: 6px 9px; border-radius: 9px; cursor: pointer; display: grid; place-items: center; }
.view-toggle button[aria-pressed="true"] { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.listing-card h3 { font-size: .98rem; margin: 6px 0 4px; }
.listing-card .price { color: var(--brand); font-family: var(--display); }
.listing-photo { position: relative; }
.photo-count { position: absolute; right: 8px; bottom: 8px; display: inline-flex; gap: 4px; align-items: center; padding: 3px 8px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: .72rem; font-weight: 700; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.listing-grid.as-list { grid-template-columns: 1fr; }
.listing-grid.as-list .listing-card { flex-direction: row; }
.listing-grid.as-list .listing-photo { flex: 0 0 min(34%, 180px); }
.listing-grid.as-list .card-media-square { height: 100%; }
.price-large { font-size: 1.6rem; font-weight: 800; color: var(--brand); font-family: var(--display); letter-spacing: -.02em; margin: 4px 0 8px; }
.stat-row { display: flex; gap: 14px; flex-wrap: wrap; color: var(--text-2); margin: 10px 0; }
.offer-box summary { list-style: none; }
.offer-box summary::-webkit-details-marker { display: none; }
.ad-slot { display: grid; place-items: center; min-height: 60px; }
.ad-label { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Orders and admin summaries */
.order-list { grid-template-columns: 1fr; gap: 12px; }
.order-card .stat-row { margin: 8px 0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
[hidden] { display: none !important; }
@media (max-width: 959px) {
  .layout:has(.chat-shell) > .side-nav { display: none; }
  .section:has(.chat-shell) { padding-top: 0; padding-bottom: 0; }
  body:has(.chat-shell) .bottom-nav { display: none; }
  body:has(.chat-shell) footer { display: none; }
  .chat-shell { height: calc(100dvh - var(--header-h, 64px)); min-height: 0; border-radius: 0; margin: 0 -16px; border-left: 0; border-right: 0; box-shadow: none; }
}
.post-actions > form { flex: 1; display: flex; margin: 0; }
.post-actions > form button { flex: 1; }

/* Music */
.grid-5 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .grid-5 { grid-template-columns: repeat(5, 1fr); } }
.section-title { font-size: 1.2rem; margin: 22px 0 10px; display: flex; gap: 10px; align-items: baseline; justify-content: space-between; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-row select { flex: 1 1 160px; }
.music-columns { align-items: start; }
.album-card h3 { font-size: .98rem; margin: 0 0 2px; }
.album-cover { position: relative; overflow: hidden; }
.album-play { position: absolute; right: 10px; bottom: 10px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-brand); color: var(--on-brand); box-shadow: var(--shadow-brand); opacity: 0; transform: translateY(8px); transition: all .25s var(--ease); }
.album-card:hover .album-play { opacity: 1; transform: none; }
.song-list { list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.song-list > li { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; }
.song-list > li:hover, .song-list > li.now-playing { background: var(--surface-2); }
.song-list > li.now-playing .song-meta strong { color: var(--brand); }
.song-rank { width: 22px; text-align: center; color: var(--muted); font-weight: 700; font-size: .85rem; flex: none; }
.song-play { position: relative; flex: none; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--surface-2); cursor: pointer; }
.song-play img { width: 100%; height: 100%; object-fit: cover; }
.song-play span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .35); opacity: 0; transition: opacity .15s; }
.song-play:hover span, .song-play.playing span, .song-play-plain span { opacity: 1; }
.song-play-plain { background: var(--grad-brand); width: 38px; height: 38px; border-radius: 50%; }
.song-play-plain span { background: none; }
.song-play:disabled { opacity: .4; cursor: not-allowed; }
.song-play.playing span::before { content: "❚❚"; }
.song-play.playing span { font-size: 0; }
.song-play.playing span::before { font-size: .8rem; }
.song-meta { flex: 1; min-width: 0; display: grid; }
.song-meta strong, .song-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-tags, .song-actions { display: flex; gap: 4px; align-items: center; }
@media (max-width: 640px) { .song-queue, .song-list .nowrap { display: none; } }
.album-hero { position: relative; color: #fff; padding: 40px 0; overflow: hidden; isolation: isolate; background: #06122f; }
.album-hero::before { content: ""; position: absolute; inset: -40px; z-index: -2; background: var(--cover) center / cover; filter: blur(40px) saturate(1.3); opacity: .7; }
.album-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(4, 11, 31, .35), rgba(4, 11, 31, .85)); }
.album-hero-inner { display: grid; gap: 20px; align-items: end; grid-template-columns: minmax(0, 200px) 1fr; }
.album-hero-inner img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.album-hero h1 { font-size: clamp(1.6rem, 4vw, 2.8rem); margin: 4px 0; }
.album-hero .eyebrow { color: #fcd34d; }
.album-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
@media (max-width: 640px) { .album-hero-inner { grid-template-columns: 1fr; } .album-hero-inner img { max-width: 220px; } }
.studio-track { border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; background: var(--surface); }
.studio-track summary { display: flex; gap: 10px; align-items: center; cursor: pointer; flex-wrap: wrap; }
.studio-track[open] summary { margin-bottom: 10px; }
.upload-rows { display: grid; gap: 6px; }
.upload-row { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 8px; align-items: center; }
tr.selected td { background: var(--brand-50); }

/* Docked music player */
.player { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; background: rgba(8, 18, 45, .92); color: #fff; border-radius: 20px; box-shadow: 0 18px 50px rgba(0, 0, 0, .35); backdrop-filter: blur(16px) saturate(1.4); overflow: hidden; animation: sheetUp .3s var(--ease); }
body.has-player { padding-bottom: 96px; }
.player-progress { height: 5px; background: rgba(255, 255, 255, .15); cursor: pointer; }
.player-progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, #60a5fa, #22d3ee, #fcd34d); transition: width .2s linear; }
.player-inner { display: flex; gap: 12px; align-items: center; padding: 10px 14px; }
.player-cover { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex: none; background: rgba(255, 255, 255, .1); }
.player-meta { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.player-meta strong, .player-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-meta span { font-size: .8rem; opacity: .75; }
.player button { border: 0; background: none; color: inherit; font: inherit; font-size: 1.05rem; cursor: pointer; width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; }
.player button:hover { background: rgba(255, 255, 255, .12); }
.player button.active { color: #fcd34d; }
.player .player-play { width: 46px; height: 46px; background: #fff; color: #06122f; font-size: 1rem; }
.player .player-play:hover { background: #e0ecff; }
.player-controls, .player-side { display: flex; gap: 2px; align-items: center; }
.player-time { font-size: .78rem; opacity: .75; font-variant-numeric: tabular-nums; margin-right: 6px; white-space: nowrap; }
.player-side input[type="range"] { width: 90px; accent-color: #60a5fa; }
.player-queue { max-height: 40vh; overflow: auto; border-top: 1px solid rgba(255, 255, 255, .12); padding: 8px 14px 12px; }
.player-queue-head { display: flex; justify-content: space-between; align-items: center; }
.player-queue-head button { width: auto; border-radius: 10px; padding: 0 10px; font-size: .85rem; }
.player-queue ol { margin: 6px 0 0; padding-left: 20px; }
.player-queue li { display: flex; align-items: center; }
.player-queue li button:first-child { flex: 1; width: auto; border-radius: 10px; justify-content: start; text-align: left; font-size: .9rem; padding: 0 8px; height: 34px; }
.player-queue li.active button:first-child { color: #fcd34d; font-weight: 700; }
.player-remove { font-size: .8rem !important; opacity: .6; }
@media (max-width: 760px) {
  .player { left: 8px; right: 8px; bottom: calc(76px + env(safe-area-inset-bottom)); }
  body.has-player { padding-bottom: 170px; }
  .player-side input[type="range"], .player-time, .player-controls [data-act="shuffle"], .player-controls [data-act="repeat"], .player-side [data-act="queue"] { display: none; }
  .player-controls [data-act="prev"] { display: none; }
}
@media (min-width: 960px) { .player { left: 50%; right: auto; width: min(980px, calc(100% - 32px)); transform: translateX(-50%); } }
.admin-songs { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 6px; } .admin-songs audio { display: block; width: 100%; max-width: 320px; height: 34px; margin-top: 2px; }

/* Premium, coins and bookstore */
.premium-grid { align-items: start; }
.premium-card { display: grid; gap: 8px; }
.premium-card.featured { border: 2px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad-brand) border-box; }
.plan-options { display: grid; gap: 8px; }
.plan-option { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.plan-option > div { display: grid; }
.plan-option .price, .coin-pack .price { font-family: var(--display); font-size: 1.3rem; font-weight: 800; color: var(--brand); }
.coin-pack { display: grid; gap: 8px; text-align: center; justify-items: center; }
.coin-pack .form { width: 100%; }
.coin-amount { font-family: var(--display); font-size: 1.7rem; }
.premium-lock { margin-top: 16px; background: linear-gradient(135deg, var(--brand-50), var(--surface)); border-style: dashed; }
.book-card h3 { font-size: .98rem; margin: 0; }
.book-cover { aspect-ratio: 2 / 3; object-fit: cover; }
.book-card .price { color: var(--brand); }
.book-detail { display: grid; gap: 20px; grid-template-columns: minmax(0, 200px) 1fr; align-items: start; }
.book-cover-large { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 12px; box-shadow: var(--shadow-lg); }
@media (max-width: 640px) { .book-detail { grid-template-columns: 1fr; } .book-cover-large { max-width: 200px; } }
.fellowship-plus { background: linear-gradient(135deg, var(--brand-50), var(--surface)); }

/* Hymn tune references (Yoruba hymns are sung to the tunes of other hymns) */
.tune-refs { display: flex; flex-wrap: wrap; gap: 8px; }
.tune-refs .chip { white-space: normal; text-align: left; }
.tune-refs .chip strong { color: var(--brand); margin-right: 4px; }

/* Birthday greeting on the member dashboard */
.birthday-card { display: flex; gap: 16px; align-items: center; background: linear-gradient(135deg, rgba(255, 196, 0, .16), rgba(236, 72, 153, .12)); border-color: rgba(255, 196, 0, .35); }
.birthday-card h2 { font-size: 1.15rem; margin: 0 0 4px; }
.birthday-card p { margin: 0; }
.birthday-emoji { font-size: 2.6rem; line-height: 1; }

/* Chat safety menu (block / report) */
.chat-menu { position: relative; margin-left: auto; }
.chat-menu > summary { list-style: none; cursor: pointer; }
.chat-menu > summary::-webkit-details-marker { display: none; }
.chat-menu-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(280px, 80vw); display: grid; gap: 10px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg, 0 12px 32px rgba(0,0,0,.18)); }

/* Chat: preview of the attachment about to be sent */
.chat-file { flex-wrap: wrap; }
.chat-file-preview { display: block; max-width: 160px; max-height: 120px; border-radius: 10px; object-fit: cover; }
audio.chat-file-preview { max-width: 100%; width: 260px; height: 40px; }

/* International phone number: country code picker + number */
.phone-field { display: flex; gap: 8px; }
.phone-field select { flex: 0 0 auto; width: 128px; min-width: 0; }
.phone-field input { flex: 1 1 auto; min-width: 0; }

/* Password fields with a show / hide button */
.password-field { position: relative; }
.password-field input { width: 100%; padding-right: 48px; }
.password-toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: transparent; color: var(--muted, #667085); cursor: pointer; }
.password-toggle:hover, .password-toggle:focus-visible { color: var(--text, inherit); background: rgba(127, 127, 127, .12); }
.password-toggle .eye-slash { display: none; }
.password-field.is-visible .eye-slash { display: inline; }

/* Cookie banner (Facebook / Google ad measurement) */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 560px; margin: 0 auto; padding: 14px 16px; border-radius: 16px; background: var(--surface, #fff); color: var(--text); border: 1px solid var(--border, rgba(0,0,0,.1)); box-shadow: 0 12px 40px rgba(0,0,0,.18); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cookie-banner p { margin: 0; flex: 1 1 260px; font-size: .9rem; }
.cookie-actions { display: flex; gap: 8px; }
@media (max-width: 720px) { .cookie-banner { bottom: 76px; } }

/* Checkboxes and radios large enough to see and tap */
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; flex: 0 0 auto; }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Hymn projector */
.projector { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4vh 4vw 10vh; cursor: pointer; user-select: none; transition: background .2s, color .2s; }
.projector-label { font-weight: 800; letter-spacing: .2em; text-transform: uppercase; opacity: .6; font-size: 14px; margin-bottom: 2vh; min-height: 1em; }
.projector-text { white-space: pre-line; text-align: center; line-height: 1.3; font-weight: 600; max-width: 92vw; }
.projector-text.is-title { font-family: 'Poppins', 'Lexend', sans-serif; font-weight: 800; }
.projector-bar { position: absolute; left: 50%; bottom: 2vh; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: rgba(127, 127, 127, .18); opacity: .55; transition: opacity .2s; }
.projector-bar:hover { opacity: 1; }
.projector-bar button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 22px; cursor: pointer; }
.projector-bar span { min-width: 64px; text-align: center; font-weight: 700; }

/* Departments: a heading per department, checkboxes for its units */
.dept-groups { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.dept-group { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.dept-group-title { font-weight: 800; color: var(--brand); font-size: .92rem; }

/* Admin settings: collapsible groups and a sticky save button */
.settings-group > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; }
.settings-group > summary::-webkit-details-marker { display: none; }
.settings-group > summary::before { content: '▸'; transition: transform .15s; color: var(--muted); }
.settings-group[open] > summary::before { transform: rotate(90deg); }
.settings-group[open] > summary { margin-bottom: 8px; }
.settings-save { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--bg, #fff) 40%); z-index: 5; }

/* The site's own dialogs and toasts */
.bc-dialog { border: 0; border-radius: 20px; padding: 0; width: min(440px, calc(100vw - 32px)); background: var(--surface, #fff); color: var(--text); box-shadow: 0 24px 80px rgba(0, 0, 0, .35); }
.bc-dialog::backdrop { background: rgba(6, 10, 22, .55); backdrop-filter: blur(3px); }
.bc-dialog form { padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 12px; }
.bc-dialog h2 { margin: 0; font-size: 1.15rem; }
.bc-dialog p { margin: 0; line-height: 1.55; white-space: pre-line; }
.bc-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.bc-dialog[open] { animation: bc-pop .16s ease-out; }
@keyframes bc-pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.bc-toasts { position: fixed; z-index: 90; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.bc-toast { padding: 12px 16px; border-radius: 14px; background: var(--surface, #fff); color: var(--text); box-shadow: 0 10px 30px rgba(0, 0, 0, .2); border-left: 4px solid var(--brand); transition: opacity .3s, transform .3s; }
.bc-toast.is-success { border-left-color: var(--success, #16a34a); }
.bc-toast.is-error { border-left-color: var(--danger, #dc2626); }
.bc-toast.is-leaving { opacity: 0; transform: translateY(6px); }
@media (max-width: 720px) { .bc-toasts { bottom: 76px; left: 16px; right: 16px; } }

/* Notification bell and inbox */
.notify-bell { position: relative; }
.notify-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger, #dc2626); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }
.notification-list li.is-unread { background: var(--surface-2, rgba(37, 99, 235, .06)); border-radius: 12px; }
.notification-list li.is-unread strong::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--brand); vertical-align: middle; }

/* Upload progress (assets/js/upload-progress.js) */
.upload-progress { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px; }
.upload-progress-track { flex: 1; height: 8px; border-radius: 99px; background: rgba(127,127,127,.2); overflow: hidden; }
.upload-progress-fill { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand, #1d4ed8), #f5b301); transition: width .2s ease; }
.upload-progress-label { white-space: nowrap; min-width: 9ch; }

/* Skeleton placeholders while content loads */
.skeleton { display: block; border-radius: 8px; background: linear-gradient(90deg, rgba(127,127,127,.12) 25%, rgba(127,127,127,.24) 37%, rgba(127,127,127,.12) 63%); background-size: 400% 100%; animation: bc-shimmer 1.4s ease infinite; }
.skeleton-line { height: 12px; margin: 8px 0; }
.skeleton-card { height: 120px; margin: 10px 0; }
@keyframes bc-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* One caption box per chosen photo or video */
.caption-list { display: grid; gap: 8px; }
.caption-row { display: flex; gap: 10px; align-items: center; }
.caption-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; background: rgba(127,127,127,.15); }
.caption-row input { flex: 1; min-width: 0; }

/* Ad slots (includes/ads.php): height reserved up front so pages never jump */
.ad-slot { margin: 16px 0; border-radius: 14px; overflow: hidden; position: relative; }
.ad-slot.ad-leaderboard { min-height: 90px; }
.ad-slot.ad-rectangle { min-height: 250px; }
.ad-slot.ad-fluid { grid-column: 1 / -1; min-height: 100px; }
.ad-slot.ad-waiting:not(:has(iframe)) { min-height: 0; }
.ad-slot ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.ad-promoted { border: 1px solid var(--border, rgba(127,127,127,.25)); background: var(--surface, transparent); }
.ad-promoted > a { display: flex; gap: 14px; align-items: center; color: inherit; text-decoration: none; padding: 12px; }
.ad-promoted img { width: 160px; max-width: 38%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; flex: none; }
.ad-promoted .ad-text { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 0; }
.ad-label { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; opacity: .6; font-weight: 700; }
@media (max-width: 560px) { .ad-promoted > a { flex-direction: column; align-items: stretch; } .ad-promoted img { width: 100%; max-width: none; } }

/* Music: Spotify / Boomplay style shelves, artists and genre tiles */
.music-hero { background: radial-gradient(1200px 400px at 10% -20%, #1e3a8a 0%, transparent 60%), linear-gradient(180deg, #0b1230, #070b18); color: #fff; }
.music-hero h1 { font-size: clamp(1.8rem, 5vw, 3rem); }
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 180px); gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.shelf > * { scroll-snap-align: start; }
.shelf-artists { grid-auto-columns: minmax(120px, 140px); }
.artist-card { display: grid; gap: 4px; justify-items: center; text-align: center; color: inherit; text-decoration: none; padding: 10px 6px; border-radius: 16px; transition: background .2s; }
.artist-card:hover { background: var(--surface-2); }
.artist-card img { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow); background: var(--surface-2); }
.album-artist { color: inherit; position: relative; z-index: 2; }
.album-artist:hover { text-decoration: underline; }
.genre-tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.genre-tile { display: flex; align-items: flex-end; min-height: 84px; padding: 12px; border-radius: 14px; color: #fff; font-weight: 800; text-decoration: none; overflow: hidden; transition: transform .2s var(--ease); }
.genre-tile:hover { transform: translateY(-3px); }
.tile-0 { background: linear-gradient(135deg, #1d4ed8, #7c3aed); }
.tile-1 { background: linear-gradient(135deg, #be123c, #f59e0b); }
.tile-2 { background: linear-gradient(135deg, #047857, #14b8a6); }
.tile-3 { background: linear-gradient(135deg, #7e22ce, #db2777); }
.tile-4 { background: linear-gradient(135deg, #0369a1, #22d3ee); }
.tile-5 { background: linear-gradient(135deg, #b45309, #eab308); }
.artist-hero { position: relative; color: #fff; padding: 48px 0 28px; overflow: hidden; isolation: isolate; background: #06122f; }
.artist-hero::before { content: ""; position: absolute; inset: -40px; z-index: -2; background: var(--cover) center / cover; filter: blur(50px) saturate(1.3); opacity: .65; }
.artist-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(4, 11, 31, .3), rgba(4, 11, 31, .9)); }
.artist-hero-inner { display: grid; gap: 22px; align-items: end; grid-template-columns: minmax(0, 190px) 1fr; }
.artist-photo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.artist-hero h1 { font-size: clamp(2rem, 6vw, 3.6rem); margin: 2px 0 6px; }
.artist-hero .eyebrow { color: #fcd34d; }
.artist-stats { margin: 0 0 14px; opacity: .9; }
@media (max-width: 640px) { .artist-hero-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; } .artist-photo { max-width: 170px; } }

/* Lyrics panel in the music player (synced lines highlight as they are sung) */
.player-lyrics { max-height: 42vh; overflow: auto; border-top: 1px solid rgba(255, 255, 255, .12); padding: 14px 18px 18px; text-align: center; scroll-behavior: smooth; }
.lyric-line { margin: 0 0 10px; font-size: 1.05rem; line-height: 1.4; opacity: .55; cursor: pointer; transition: opacity .2s, transform .2s; }
.lyric-line.plain { cursor: default; opacity: .9; margin-bottom: 4px; }
.lyric-line.active { opacity: 1; font-weight: 800; color: #fcd34d; transform: scale(1.03); }
.player-ad { padding: 6px 14px 8px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .8rem; }
.player-ad a { color: inherit; display: flex; gap: 10px; align-items: center; text-decoration: none; }
.player-ad img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }

/* Branded media player (assets/js/media-player.js) */
.bcp { position: relative; background: #000; border-radius: 14px; overflow: hidden; outline: none; color: #fff; }
.bcp:focus-visible { box-shadow: 0 0 0 3px var(--brand); }
.bcp-video video { display: block; width: 100%; max-height: 80vh; background: #000; cursor: pointer; }
.bcp-audio { background: linear-gradient(135deg, #1747b5, #06122f); padding: 10px 6px 4px; }
.bcp-audio audio { display: none; }
.bcp-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.bcp-video .bcp-bar { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); opacity: 0; transition: opacity .2s; }
.bcp-video:hover .bcp-bar, .bcp-video:focus-within .bcp-bar, .bcp-video:not(.is-playing) .bcp-bar { opacity: 1; }
.bcp-btn { border: 0; background: none; color: #fff; min-width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 1rem; display: grid; place-items: center; }
.bcp-btn:hover, .bcp-btn:focus-visible { background: rgba(255, 255, 255, .18); }
.bcp-text { font-size: .8rem; font-weight: 800; border-radius: 10px; padding: 0 8px; }
.bcp-time { font-size: .78rem; white-space: nowrap; opacity: .9; font-variant-numeric: tabular-nums; }
.bcp-seek { position: relative; flex: 1; min-width: 60px; height: 22px; cursor: pointer; touch-action: none; }
.bcp-seek::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .28); }
.bcp-buffered, .bcp-played { position: absolute; left: 0; top: 9px; height: 4px; border-radius: 4px; width: 0; }
.bcp-buffered { background: rgba(255, 255, 255, .35); }
.bcp-played { background: #fcd34d; }
.bcp-played::after { content: ""; position: absolute; right: -6px; top: -4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.bcp-volume { width: 70px; accent-color: #fcd34d; }
.bcp-big { position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 1.6rem; cursor: pointer; transition: opacity .2s, transform .2s; }
.bcp.is-playing .bcp-big { opacity: 0; pointer-events: none; transform: scale(.8); }
.bcp-watermark { position: absolute; top: 10px; right: 10px; display: flex; align-items: center; gap: 6px; padding: 4px 9px 4px 6px; border-radius: 999px; background: rgba(0, 0, 0, .35); font-size: .72rem; font-weight: 800; letter-spacing: .02em; opacity: .85; pointer-events: none; user-select: none; z-index: 2; }
.bcp-watermark img { border-radius: 5px; }
@media (max-width: 560px) { .bcp-volume { display: none; } .bcp-time { font-size: .7rem; } }
.bcp:fullscreen { border-radius: 0; display: flex; align-items: center; }
.bcp:fullscreen video { max-height: 100vh; height: 100%; object-fit: contain; }

/* "N new posts" pill (timeline-live.js) */
.new-posts-pill { position: sticky; top: 72px; z-index: 30; display: block; margin: 0 auto 12px; padding: 8px 18px; border: 0; border-radius: 999px; background: var(--grad-brand, #1747b5); color: #fff; font-weight: 800; box-shadow: 0 8px 24px rgba(23, 71, 181, .4); cursor: pointer; animation: pill-in .3s var(--ease, ease); }
@keyframes pill-in { from { opacity: 0; transform: translateY(-10px); } }

/* Reels: vertical snap-scrolling, one reel per screen */
.reels-feed { height: min(calc(100vh - 240px), 780px); min-height: 460px; overflow-y: auto; scroll-snap-type: y mandatory; border-radius: 18px; background: #050914; scrollbar-width: none; outline: none; }
.reels-feed::-webkit-scrollbar { display: none; }
.reel { height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: grid; place-items: center; }
.reel-stage { position: relative; height: 100%; aspect-ratio: 9 / 16; max-width: 100%; background: #000; overflow: hidden; border-radius: 14px; color: #fff; }
.reel-stage video { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.reel-stage .bcp-watermark { top: 12px; left: 12px; right: auto; }
.reel-sound { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .45); color: #fff; font-size: 1.1rem; cursor: pointer; z-index: 3; }
.reel-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .25); z-index: 3; }
.reel-progress > div { height: 100%; width: 0; background: #fcd34d; }
.reel-info { position: absolute; left: 0; right: 64px; bottom: 0; padding: 40px 14px 16px; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); z-index: 2; }
.reel-info p { margin: 6px 0 0; font-size: .92rem; line-height: 1.35; }
.reel-author { display: flex; align-items: center; gap: 8px; }
.reel-rail { position: absolute; right: 8px; bottom: 22px; display: flex; flex-direction: column; align-items: center; gap: 14px; z-index: 4; }
.reel-rail .react { flex-direction: column; gap: 0; }
.reel-rail .react-summary { font-size: .75rem; color: #fff; }
.reel-rail .react-toggle { background: rgba(0, 0, 0, .45); color: #fff; border: 0; border-radius: 999px; padding: 8px 10px; font-size: .78rem; }
.reel-rail .react-picker { bottom: 0; left: auto; right: calc(100% + 8px); }
.reel-rail-btn { display: grid; justify-items: center; gap: 2px; width: 46px; padding: 8px 0; border: 0; border-radius: 14px; background: rgba(0, 0, 0, .45); color: #fff; font-size: 1.25rem; cursor: pointer; text-decoration: none; }
.reel-rail-btn span { font-size: .7rem; font-weight: 700; }
.reel-heart { position: absolute; inset: 0; display: grid; place-items: center; font-size: 6rem; opacity: 0; pointer-events: none; z-index: 3; }
.reel-heart.pop { animation: heart-pop .8s ease-out; }
@keyframes heart-pop { 0% { opacity: 0; transform: scale(.4); } 25% { opacity: 1; transform: scale(1.1); } 100% { opacity: 0; transform: scale(1.5) translateY(-30px); } }
.reel-ad-stage { display: grid; place-items: center; padding: 18px; background: linear-gradient(160deg, #0b1230, #1747b5); }
.reel-ad-stage .ad-slot { width: 100%; background: #fff; color: #111; }
@media (max-width: 760px) { .reels-feed { height: calc(100vh - 130px); border-radius: 0; margin: 0 -16px; } .reel-stage { border-radius: 0; width: 100%; aspect-ratio: auto; } }

/* Reaction picker: larger, named, springy */
.react-picker { padding: 6px 8px; gap: 4px; border-radius: 999px; transition: opacity .16s var(--ease), transform .22s cubic-bezier(.34, 1.56, .64, 1); }
.react-picker::before { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; }
.react-picker button { position: relative; width: 44px; height: 44px; font-size: 1.65rem; transition: transform .2s cubic-bezier(.34, 1.56, .64, 1); }
.react-picker button:hover, .react-picker button:focus-visible { transform: scale(1.4) translateY(-6px); z-index: 2; }
.react-picker button::after { content: attr(aria-label); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%) scale(.8); padding: 2px 8px; border-radius: 999px; background: #111827; color: #fff; font-size: .68rem; font-weight: 700; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s, transform .12s; }
.react-picker button:hover::after, .react-picker button:focus-visible::after { opacity: 1; transform: translateX(-50%) scale(1); }
@media (max-width: 520px) { .react-picker button { width: 40px; height: 40px; font-size: 1.5rem; } }
.post .bcp-video { margin: 10px 0; }
.post .bcp-video video { max-height: 560px; object-fit: contain; margin: 0; border-radius: 0; }

/* Rich text editor (assets/js/rich-editor.js) and formatted text on pages */
.rte { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; }
.rte:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.rte-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px; border-bottom: 1px solid var(--border); background: var(--surface-2); position: sticky; top: 0; z-index: 5; }
.rte-btn { min-width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; color: inherit; font-weight: 800; cursor: pointer; }
.rte-btn:hover, .rte-btn:focus-visible { background: color-mix(in srgb, var(--brand) 14%, transparent); }
.rte-btn[aria-pressed="true"] { background: var(--brand); color: #fff; }
.rte-sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }
.rte-area { padding: 14px 16px; line-height: 1.65; outline: none; overflow-wrap: anywhere; }
.rte-area.rte-invalid { box-shadow: inset 0 0 0 2px var(--danger, #dc2626); }
.rte-area p { margin: 0 0 .9em; }
.rte-count { padding: 4px 12px 8px; text-align: right; }
.rich h2, .rte-area h2 { font-size: 1.35rem; margin: 1.2em 0 .5em; }
.rich h3, .rte-area h3 { font-size: 1.12rem; margin: 1.1em 0 .4em; }
.rich blockquote, .rte-area blockquote { margin: 1em 0; padding: .4em 1em; border-left: 4px solid var(--brand); background: var(--surface-2); border-radius: 0 10px 10px 0; font-style: italic; }
.rich ul, .rich ol, .rte-area ul, .rte-area ol { padding-left: 1.4em; margin: .6em 0 1em; }
.rich a, .rte-area a { color: var(--brand); text-decoration: underline; }
.rich hr { border: 0; border-top: 1px solid var(--border); margin: 1.4em 0; }

/* Book reader (read.php, assets/js/reader.js) */
.reader { --reader-size: 18px; background: var(--rd-bg, var(--bg)); color: var(--rd-fg, var(--text)); min-height: 70vh; padding: 18px 0 60px; }
.reader[data-theme="sepia"] { --rd-bg: #f4ecd8; --rd-fg: #3b2f1e; --rd-muted: #7a6a4f; }
.reader[data-theme="dark"] { --rd-bg: #0b0f1a; --rd-fg: #d9deea; --rd-muted: #8b93a7; }
.reader-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.reader-toc { position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow: auto; padding-right: 8px; font-size: .92rem; }
.reader-toc ol { margin: 10px 0 0; padding-left: 18px; }
.reader-toc li { margin: 0 0 6px; }
.reader-toc a { color: inherit; text-decoration: none; opacity: .85; }
.reader-toc a[aria-current="page"] { font-weight: 800; opacity: 1; color: var(--brand); }
.reader-back { display: block; font-weight: 800; color: inherit; text-decoration: none; }
.reader-page { max-width: 720px; width: 100%; margin: 0 auto; }
.reader-tools { display: flex; gap: 6px; align-items: center; margin-bottom: 12px; }
.reader-spacer { flex: 1; }
.reader-toc-toggle { display: none; }
.reader h1 { font-size: 1.9rem; margin: 6px 0 4px; }
.reader-text { font-family: Georgia, "Times New Roman", serif; font-size: var(--reader-size); line-height: 1.8; margin-top: 18px; }
.reader-text p { margin: 0 0 1.1em; }
.reader-text h2, .reader-text h3 { font-family: inherit; }
.reader-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 40px; }
.reader .muted, .reader .small { color: var(--rd-muted, var(--muted)); }
@media (max-width: 860px) {
  .reader-layout { grid-template-columns: 1fr; }
  .reader-toc { display: none; position: static; max-height: none; }
  .reader.toc-open .reader-toc { display: block; }
  .reader-toc-toggle { display: inline-flex; }
}

/* Language menu */
.lang-menu { position: relative; }
.lang-menu > summary { list-style: none; cursor: pointer; white-space: nowrap; gap: 4px; display: inline-flex; align-items: center; height: 40px; padding: 0 10px; border-radius: 12px; font-weight: 700; font-size: .82rem; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary:hover, .lang-menu[open] > summary { background: var(--surface-2); }
.lang-menu ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 170px; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); }
.lang-menu li a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; color: inherit; text-decoration: none; }
.lang-menu li a:hover, .lang-menu li a[aria-current="true"] { background: var(--surface-2); font-weight: 800; }

/* Bible reading plans */
.streak-card{display:flex;gap:14px;align-items:center;padding:14px 18px;border-radius:16px;background:linear-gradient(135deg,#fff7e6,#ffe9c2);margin-bottom:18px;color:#3a2a00}
.streak-flame{font-size:34px;line-height:1}
.plan-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px}
.plan-card{display:flex;flex-direction:column;gap:8px;padding:16px;border:1px solid var(--border);border-radius:16px;background:var(--surface);color:inherit;text-decoration:none;transition:transform .15s,box-shadow .15s}
.plan-card:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(0,0,0,.08)}
.plan-progress{height:8px;border-radius:99px;background:rgba(0,0,0,.08);overflow:hidden}
.plan-progress>div{height:100%;background:linear-gradient(90deg,#1e4fd8,#f4b400);border-radius:99px}
.plan-days{list-style:none;padding:0;margin:16px 0;display:grid;gap:8px}
.plan-days li{display:flex;align-items:center;gap:12px;padding:10px 14px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}
.plan-days li form{margin:0 0 0 auto}
.plan-days li.done{opacity:.7}
.plan-days li.next{border-color:#1e4fd8;box-shadow:0 0 0 2px rgba(30,79,216,.15)}
.plan-day-no{font-weight:700;min-width:64px}
:root[data-theme="dark"] .streak-card{background:linear-gradient(135deg,#3a2a00,#523c00);color:#ffe9c2}

/* Playlists */
.playlist-card{display:flex;flex-direction:column;gap:4px;color:inherit;text-decoration:none;min-width:150px}
.playlist-cover{display:grid;place-items:center;aspect-ratio:1;border-radius:14px;background:linear-gradient(135deg,#1e4fd8,#8e24aa) center/cover;color:#fff;font-size:42px;box-shadow:0 6px 18px rgba(0,0,0,.15);overflow:hidden}
.playlist-cover[style] span{display:none}
.playlist-cover-lg{width:180px;font-size:64px;flex:none}
.playlist-hero{display:flex;gap:20px;align-items:flex-end;margin-bottom:18px;flex-wrap:wrap}
.playlist-pick{display:grid;gap:6px}
.playlist-pick form{margin:0}
.playlist-pick-row{display:flex;gap:12px;align-items:center;width:100%;text-align:left;padding:10px;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:inherit;cursor:pointer}
.playlist-pick-row:hover{border-color:var(--brand)}
.playlist-pick-art{display:grid;place-items:center;width:44px;height:44px;border-radius:10px;background:linear-gradient(135deg,#1e4fd8,#8e24aa);color:#fff;font-size:20px;flex:none}
@media (max-width:560px){.playlist-cover-lg{width:120px}}

/* Check-in tickets and scanner */
.checkin-ticket{display:flex;gap:14px;align-items:center;margin-top:10px;padding:10px;border:1px dashed var(--border);border-radius:14px;background:var(--surface-2)}
.checkin-qr{width:112px;height:112px;flex:none;background:#fff;border-radius:10px;padding:4px}
.checkin-qr svg{width:100%;height:100%;display:block}
.scanner{position:relative;max-width:420px;aspect-ratio:1;border-radius:18px;overflow:hidden;background:#000}
.scanner video{width:100%;height:100%;object-fit:cover}
.scanner::after{content:"";position:absolute;inset:18%;border:3px solid rgba(255,255,255,.85);border-radius:16px;box-shadow:0 0 0 999px rgba(0,0,0,.35)}
.checkin-result{padding:16px;border-radius:14px;margin:14px 0;font-weight:600}
.checkin-result.ok{background:var(--success-50,#e7f8ee);color:var(--success,#15803d)}
.checkin-result.warn{background:var(--warning-50,#fff6e0);color:#8a5a00}
.checkin-result.bad{background:var(--danger-50,#fdecec);color:var(--danger,#b91c1c)}

/* Display choices from the footer: text size and high contrast */
html[data-text="lg"] { font-size: 112.5%; }
html[data-text="xl"] { font-size: 125%; }
.a11y-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; }
.a11y-bar [aria-pressed="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
html[data-contrast="high"] { --text: #000; --text-2: #111; --muted: #222; --border: #333; --bg: #fff; --surface: #fff; --surface-2: #f2f2f2; --brand: #0a3bb8; }
@media (prefers-color-scheme: dark) { html[data-contrast="high"]:not([data-theme="light"]) { --text: #fff; --text-2: #f2f2f2; --muted: #e6e6e6; --border: #ccc; --bg: #000; --surface: #000; --surface-2: #121212; --brand: #9cc0ff; } }
html[data-contrast="high"][data-theme="dark"] { --text: #fff; --text-2: #f2f2f2; --muted: #e6e6e6; --border: #ccc; --bg: #000; --surface: #000; --surface-2: #121212; --brand: #9cc0ff; }
html[data-contrast="high"] a { text-decoration: underline; }
html[data-contrast="high"] :focus-visible { outline: 3px solid #f5b400 !important; outline-offset: 2px; }
.trend-chart { height: 130px; }
.trend-chart .bar { flex-direction: column; justify-content: flex-end; }
.trend-chart .bar span { max-height: calc(100% - 16px); }
.trend-chart .bar em { font-style: normal; font-size: 10px; line-height: 16px; text-align: center; color: var(--muted); }

/* Google / Apple sign-in */
.social-login { display: grid; gap: 10px; justify-items: center; margin-bottom: 8px; }
.social-login [data-google-button] { min-height: 44px; }
.apple-button { background: #000; color: #fff; border-radius: 999px; min-height: 44px; font-weight: 600; max-width: 400px; }
.apple-button:hover { background: #222; color: #fff; }
.divider-text { display: flex; align-items: center; gap: 10px; width: 100%; color: var(--muted); font-size: .85rem; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; border-top: 1px solid var(--border); }

/* Groups and group chat */
.group-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.group-row { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: inherit; text-decoration: none; }
.group-row:hover { border-color: var(--brand); }
.group-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.group-text .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.group-icon { width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: linear-gradient(135deg, #e8eeff, #f6e8ff); overflow: hidden; }
.group-icon img { width: 100%; height: 100%; object-fit: cover; }
.group-icon-lg { width: 64px; height: 64px; font-size: 32px; border-radius: 18px; }
.group-head { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.group-card { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.group-card-top { display: flex; gap: 10px; align-items: center; }
.group-chat { height: min(60vh, 560px); overflow-y: auto; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-2); padding: 12px; }
.gm-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gm { max-width: 78%; align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 16px 16px 16px 4px; padding: 8px 12px; }
.gm-mine { align-self: flex-end; background: var(--brand-50, #e9efff); border-radius: 16px 16px 4px 16px; }
.gm-name { display: block; font-size: .78rem; font-weight: 700; color: var(--brand); }
.gm-body { margin: 2px 0; white-space: normal; overflow-wrap: anywhere; }
.gm-image { display: block; max-width: 100%; max-height: 320px; border-radius: 12px; margin: 4px 0; }
.gm-time { display: block; font-size: .72rem; color: var(--muted); text-align: right; }
.gm-time form.inline { display: inline; }
.gm-system { align-self: center; font-size: .78rem; color: var(--muted); background: var(--surface); border-radius: 999px; padding: 2px 10px; }
.link-button { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; }
.group-composer { margin-top: 10px; display: grid; gap: 8px; }
.group-composer textarea { min-height: 54px; }
/* Polls */
.poll-card { border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: var(--surface); margin: 6px 0; min-width: 240px; }
.poll-question { font-weight: 700; margin: 0 0 8px; }
.poll-form { display: grid; gap: 6px; margin: 0; }
.poll-option { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; cursor: pointer; }
.poll-option.mine { border-color: var(--brand); }
.poll-bar { position: absolute; inset: 0 auto 0 0; background: var(--brand-100, #dbe5ff); z-index: 0; transition: width .4s; }
.poll-label, .poll-pct { position: relative; z-index: 1; }
.poll-label { flex: 1; }
.poll-pct { font-weight: 700; font-size: .85rem; }
.poll-foot { margin: 2px 0 4px; }

/* Stories */
.stories-bar { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 8px; scrollbar-width: none; }
.stories-bar::-webkit-scrollbar { display: none; }
.story-ring { display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; flex: none; width: 72px; }
.story-avatar { position: relative; padding: 3px; border-radius: 50%; background: linear-gradient(45deg, #f59e0b, #ec4899, #8b5cf6); display: inline-flex; }
.story-avatar .avatar { border: 3px solid var(--surface); border-radius: 50%; width: 56px; height: 56px; object-fit: cover; }
.story-ring.seen .story-avatar { background: var(--border); }
.story-add .story-avatar { background: var(--border); }
.story-plus { position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--surface); line-height: 1; }
.story-name { font-size: .75rem; max-width: 72px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.story-viewer { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .94); display: grid; place-items: center; }
.story-viewer[hidden] { display: none; }
.sv-frame { position: relative; width: min(420px, 100vw); height: min(760px, 100vh); background: #000; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; justify-content: center; user-select: none; }
.sv-bars { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: 4px; z-index: 3; }
.sv-seg { flex: 1; height: 3px; background: rgba(255, 255, 255, .35); border-radius: 3px; overflow: hidden; }
.sv-seg span { display: block; height: 100%; background: #fff; }
.sv-head { position: absolute; top: 18px; left: 12px; right: 12px; display: flex; gap: 8px; align-items: center; color: #fff; z-index: 3; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.sv-head span { opacity: .8; font-size: .85rem; flex: 1; }
.sv-close { background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; }
.sv-media { width: 100%; max-height: 100%; object-fit: contain; }
.sv-text { position: absolute; inset: 0; display: grid; place-items: center; padding: 40px 28px; color: #fff; font-size: 1.6rem; font-weight: 700; text-align: center; line-height: 1.35; white-space: pre-wrap; }
.sv-caption { position: absolute; bottom: 56px; left: 0; right: 0; margin: 0; padding: 10px 16px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); z-index: 2; }
.sv-prev, .sv-next { position: absolute; top: 60px; bottom: 60px; width: 35%; background: none; border: 0; z-index: 2; cursor: pointer; }
.sv-prev { left: 0; } .sv-next { right: 0; width: 65%; }
.sv-foot { position: absolute; bottom: 10px; left: 10px; right: 10px; display: flex; gap: 8px; justify-content: center; z-index: 3; }
.sv-btn { background: rgba(255, 255, 255, .16); color: #fff; border: 0; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
body.no-scroll { overflow: hidden; }

/* Verse picture maker */
.verse-maker canvas { width: 100%; height: auto; border-radius: 18px; box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,.15)); }
.verse-looks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.verse-look { width: 40px; height: 40px; border-radius: 12px; border: 3px solid transparent; cursor: pointer; }
.verse-look[aria-pressed="true"] { border-color: var(--brand); }
.invite-card { padding: 18px; border-radius: 18px; background: linear-gradient(135deg, var(--brand-50, #eef3ff), var(--surface)); border: 1px solid var(--border); }

/* Badges */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 8px; }
.badge-tile { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; padding: 14px 10px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); filter: grayscale(1); opacity: .7; }
.badge-tile.earned { filter: none; opacity: 1; border-color: #f5b400; box-shadow: 0 6px 18px rgba(245, 180, 0, .18); }
.badge-tile .plan-progress { width: 100%; }
.badge-icon { font-size: 38px; line-height: 1.1; }

/* Live broadcasts (live.php, admin/live.php, body pages) */
.live-dot { display: inline-block; width: .6em; height: .6em; border-radius: 50%; background: var(--danger); vertical-align: middle; animation: live-pulse 1.4s ease-in-out infinite; }
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.live-banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin: 0 0 16px; border-radius: var(--radius); background: var(--danger-50); color: var(--danger); text-decoration: none; font-weight: 600; }
.live-banner:hover { text-decoration: underline; }
.live-player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
.live-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live-player-audio { aspect-ratio: auto; background: var(--danger-50); padding: 16px; }
.live-player-audio iframe { position: static; height: 180px; }
.live-player-audio audio { width: 100%; }
.live-player-link { aspect-ratio: auto; background: var(--danger-50); padding: 24px; text-align: center; }
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.live-card { display: flex; gap: 12px; align-items: flex-start; padding: 16px; text-decoration: none; color: inherit; }
.live-card-icon { font-size: 1.8rem; line-height: 1; }
