/* Chronicles — "A ministry management system" (2026-11-06; js/chronicles.js).
   The look the user approved in the mockup: dark glass over a moving aurora,
   violet → indigo → cyan, light mode a click away. */
:root {
  --bg: #07080f; --bg2: #0d0f1a; --glass: rgba(255,255,255,.045); --glass2: rgba(255,255,255,.07); --glass3: rgba(255,255,255,.1); --edge: rgba(255,255,255,.09);
  --text: #eef0ff; --dim: #a3a8c7; --faint: #6c7194; --ok: #34d399; --warn: #fbbf24; --bad: #fb7185; --a1: #8b5cf6; --a3: #22d3ee; --a4: #f472b6;
  --grad: linear-gradient(135deg, #a78bfa 0%, #6366f1 45%, #22d3ee 100%); --grad2: linear-gradient(135deg, #f472b6, #8b5cf6);
  --shadow: 0 24px 60px -30px rgba(0,0,0,.8); --r: 20px; --field: rgba(255,255,255,.06);
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #f4f5fb; --bg2: #ffffff; --glass: rgba(255,255,255,.72); --glass2: rgba(255,255,255,.92); --glass3: #fff; --edge: rgba(20,24,60,.09);
  --text: #12142b; --dim: #4c5175; --faint: #8a8fb0; --shadow: 0 24px 50px -30px rgba(30,30,90,.35); --field: #fff;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body.chr { font: 500 14px/1.5 "Plus Jakarta Sans", system-ui, sans-serif; color: var(--text); background: var(--bg); min-height: 100vh; overflow-x: hidden; }
body.chr #site-nav, body.chr #site-footer { display: none !important; }
.chr button, .chr input, .chr select, .chr textarea { font-family: inherit; }
.chr a { color: inherit; }
.aurora { position: fixed; inset: -20%; z-index: 0; pointer-events: none; filter: blur(80px); opacity: .5; }
.aurora i { position: absolute; border-radius: 50%; animation: chr-drift 26s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { width: 46vw; height: 46vw; left: 4%; top: 2%; background: #6d28d9; }
.aurora i:nth-child(2) { width: 38vw; height: 38vw; right: 0; top: 18%; background: #0e7490; animation-delay: -8s; }
.aurora i:nth-child(3) { width: 34vw; height: 34vw; left: 38%; bottom: -6%; background: #be185d; animation-delay: -14s; opacity: .55; }
html[data-theme="light"] .aurora { opacity: .2; }
@keyframes chr-drift { to { transform: translate(6vw, 4vh) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .aurora i { animation: none; } }
.grain { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .045; background-image: radial-gradient(rgba(255,255,255,.6) 1px, transparent 1px); background-size: 3px 3px; }

/* Shell */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--edge); background: color-mix(in srgb, var(--bg2) 55%, transparent); backdrop-filter: blur(24px); scrollbar-width: thin; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 16px; text-decoration: none; }
.logo { width: 40px; height: 40px; border-radius: 13px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 10px 30px -10px #7c3aed; position: relative; overflow: hidden; flex: none; }
.logo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255,255,255,.45), transparent 50%); }
.logo span { font: 600 22px Fraunces, Georgia, serif; color: #fff; position: relative; z-index: 1; }
.brand b { display: block; font-size: 17px; letter-spacing: -.01em; }
.brand small { display: block; font-size: 11px; color: var(--faint); font-weight: 600; }
.church { display: flex; align-items: center; gap: 10px; padding: 10px; margin: 0 0 8px; border-radius: 14px; background: var(--glass); border: 1px solid var(--edge); }
.church i { width: 30px; height: 30px; border-radius: 9px; background: var(--grad2); display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 12px; color: #fff; flex: none; }
.church b { font-size: 13px; display: block; line-height: 1.25; } .church small { color: var(--faint); font-size: 11px; }
.nav-h { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 12px 10px 4px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 12px; color: var(--dim); text-decoration: none; font-weight: 600; transition: .2s; position: relative; }
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a:hover { background: var(--glass); color: var(--text); }
.nav a.on { color: var(--text); background: linear-gradient(90deg, rgba(139,92,246,.22), rgba(99,102,241,.06)); box-shadow: inset 0 0 0 1px rgba(139,92,246,.35); }
.nav a.on::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--grad); }
.nav a em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 99px; background: rgba(244,114,182,.18); color: #f9a8d4; }
.nav a em:empty { display: none; }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--glass); border: 1px solid var(--edge); }
.me b { font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; } .me small { color: var(--faint); font-size: 11px; }
.main { padding: 18px 28px 48px; min-width: 0; }
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.icon-btn.menu-btn { display: none; }
.cmd { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--edge); color: var(--faint); backdrop-filter: blur(20px); cursor: text; text-align: left; font: inherit; }
.cmd kbd { margin-left: auto; font: 700 11px inherit; padding: 2px 7px; border-radius: 7px; border: 1px solid var(--edge); color: var(--dim); }
.icon-btn { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--edge); color: var(--dim); cursor: pointer; position: relative; flex: none; }
.icon-btn:hover { color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.btn { height: 42px; padding: 0 16px; border: 0; border-radius: 13px; font: 700 13.5px inherit; color: #fff; background: var(--grad); box-shadow: 0 12px 30px -12px #6366f1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; text-decoration: none; transition: transform .12s, filter .2s; }
.btn:hover { filter: brightness(1.08); } .btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: var(--glass2); color: var(--text); box-shadow: none; border: 1px solid var(--edge); }
.btn.danger { background: rgba(251,113,133,.15); color: #fda4af; box-shadow: none; border: 1px solid rgba(251,113,133,.35); }
html[data-theme="light"] .btn.danger { color: #be123c; }
.btn.sm { height: 32px; padding: 0 11px; border-radius: 10px; font-size: 12.5px; }
.btn svg { width: 16px; height: 16px; }
h1 { margin: 0; font: 600 30px/1.15 Fraunces, Georgia, serif; letter-spacing: -.01em; }
h2.sub { margin: 0 0 10px; font: 600 20px Fraunces, Georgia, serif; }
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.hello p { margin: 6px 0 0; color: var(--dim); }
.hello .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--glass2); border: 1px solid var(--edge); color: var(--dim); cursor: pointer; user-select: none; }
.chip.on { background: var(--grad); color: #fff; border-color: transparent; }
.chip b { font-weight: 800; opacity: .8; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: chr-pulse 1.8s infinite; }
@keyframes chr-pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.6); } 70% { box-shadow: 0 0 0 8px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.screen { animation: chr-rise .4s cubic-bezier(.2,.8,.2,1); }
@keyframes chr-rise { from { opacity: 0; transform: translateY(8px); } }

/* Cards and layout */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: start; }
.card { position: relative; border-radius: var(--r); padding: 18px; background: var(--glass); border: 1px solid var(--edge); backdrop-filter: blur(24px); box-shadow: var(--shadow); min-width: 0; }
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(160deg, rgba(255,255,255,.16), transparent 40%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.card h3 { margin: 0; font-size: 13px; font-weight: 700; color: var(--dim); display: flex; align-items: center; gap: 8px; }
.card h3 .more { margin-left: auto; font-size: 12px; color: var(--faint); font-weight: 600; text-decoration: none; cursor: pointer; }
.s2 { grid-column: span 2; } .s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s5 { grid-column: span 5; } .s6 { grid-column: span 6; } .s7 { grid-column: span 7; } .s8 { grid-column: span 8; } .s9 { grid-column: span 9; } .s12 { grid-column: span 12; }
.kpi { min-height: 150px; }
.kpi .val { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 10px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .trend { font-size: 12px; font-weight: 700; color: var(--ok); } .kpi .trend.down { color: var(--bad); } .kpi .trend.meh { color: var(--warn); } .kpi .trend.dim { color: var(--faint); }
.kpi svg.spark { position: absolute; right: 16px; top: 18px; width: 104px; height: 40px; }
.kpi .ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #fff; }
.kpi .ico svg { width: 18px; height: 18px; }
.ai { background: linear-gradient(135deg, rgba(139,92,246,.22), rgba(34,211,238,.09)); border-color: rgba(139,92,246,.35); }
.ai .spark-ico { width: 30px; height: 30px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; color: #fff; }
.ai ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.ai li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid var(--edge); }
.ai li b { display: block; font-size: 13.5px; } .ai li span { color: var(--dim); font-size: 12.5px; }
.ai li .btn { margin-left: auto; flex: none; }
.list { display: grid; gap: 4px; margin-top: 10px; }
.row { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 12px; transition: .15s; text-decoration: none; }
a.row:hover, .row.click:hover { background: var(--glass2); cursor: pointer; }
.row .grow { flex: 1; min-width: 0; } .row b { font-size: 13.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .row small { color: var(--faint); font-size: 12px; }
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; flex: none; text-transform: uppercase; }
.tag { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 99px; white-space: nowrap; display: inline-block; }
.t-ok { background: rgba(52,211,153,.14); color: #6ee7b7; } .t-warn { background: rgba(251,191,36,.14); color: #fcd34d; } .t-new { background: rgba(244,114,182,.15); color: #f9a8d4; } .t-v { background: rgba(139,92,246,.18); color: #c4b5fd; } .t-c { background: rgba(34,211,238,.14); color: #67e8f9; } .t-bad { background: rgba(251,113,133,.15); color: #fda4af; } .t-dim { background: var(--glass2); color: var(--dim); }
html[data-theme="light"] .t-ok { color: #047857; } html[data-theme="light"] .t-warn { color: #92400e; } html[data-theme="light"] .t-new { color: #be185d; } html[data-theme="light"] .t-v { color: #6d28d9; } html[data-theme="light"] .t-c { color: #0e7490; } html[data-theme="light"] .t-bad { color: #be123c; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--glass2); border: 1px solid var(--edge); flex-wrap: wrap; }
.seg button { border: 0; background: none; color: var(--dim); font: 700 12px inherit; padding: 6px 11px; border-radius: 9px; cursor: pointer; }
.seg button.on { background: var(--grad); color: #fff; }
.chart { width: 100%; height: 210px; margin-top: 8px; display: block; }
.legend-line { display: flex; gap: 16px; font-size: 12px; color: var(--dim); font-weight: 700; flex-wrap: wrap; }
.legend-line i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.donut-wrap { display: flex; align-items: center; gap: 18px; margin-top: 10px; }
.legend { display: grid; gap: 8px; flex: 1; min-width: 0; }
.legend div { display: flex; align-items: center; gap: 8px; font-size: 13px; } .legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; } .legend span { margin-left: auto; font-weight: 700; }
.ring { position: relative; flex: none; } .ring b { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; font-size: 20px; font-weight: 800; line-height: 1.1; } .ring b small { display: block; font-size: 11px; color: var(--faint); font-weight: 600; }
.qa { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
.qa a { padding: 14px 8px; border-radius: 16px; text-align: center; background: var(--glass2); border: 1px solid var(--edge); font-size: 12.5px; font-weight: 700; cursor: pointer; transition: .2s; text-decoration: none; }
.qa a:hover { transform: translateY(-2px); border-color: rgba(139,92,246,.5); }
.qa svg { width: 22px; height: 22px; display: block; margin: 0 auto 8px; }
.ev { display: flex; gap: 12px; align-items: center; padding: 10px 8px; border-radius: 12px; text-decoration: none; }
a.ev:hover { background: var(--glass2); }
.date { width: 48px; height: 52px; border-radius: 13px; display: grid; place-items: center; text-align: center; background: var(--glass2); border: 1px solid var(--edge); line-height: 1; flex: none; }
.date b { font-size: 18px; display: block; } .date small { font-size: 10px; font-weight: 800; color: var(--a3); letter-spacing: .08em; }
.bar { height: 7px; border-radius: 99px; background: var(--glass2); overflow: hidden; margin-top: 6px; } .bar i { display: block; height: 100%; border-radius: inherit; background: var(--grad); }
.empty { padding: 26px 16px; text-align: center; color: var(--faint); }
.empty b { display: block; color: var(--dim); font-size: 15px; margin-bottom: 4px; }
.muted { color: var(--faint); } .dim { color: var(--dim); }
.right { text-align: right; }

/* Tables */
.tbl-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.tbl th { text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 4px 12px; white-space: nowrap; }
.tbl td { padding: 11px 12px; background: var(--glass2); vertical-align: middle; } .tbl tr td:first-child { border-radius: 14px 0 0 14px; } .tbl tr td:last-child { border-radius: 0 14px 14px 0; }
.tbl tbody tr.click { cursor: pointer; } .tbl tbody tr.click:hover td, .tbl tbody tr.sel td { background: rgba(139,92,246,.13); }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; } .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .who small { color: var(--faint); font-size: 12px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 8px; }
.search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 12px; background: var(--field); border: 1px solid var(--edge); color: var(--faint); min-width: 220px; }
.search input { border: 0; background: none; outline: none; color: var(--text); font: inherit; flex: 1; min-width: 0; }
.search svg { width: 16px; height: 16px; flex: none; }
.load-more { display: flex; justify-content: center; margin-top: 10px; }

/* Profile */
.prof .cover { height: 84px; margin: -18px -18px 0; border-radius: var(--r) var(--r) 0 0; background: var(--grad); opacity: .85; }
.prof .bigav { width: 74px; height: 74px; border-radius: 22px; margin-top: -37px; border: 4px solid var(--bg2); font-size: 24px; }
.prof h2 { margin: 10px 0 4px; font: 600 22px Fraunces, Georgia, serif; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.kv div { padding: 10px 12px; border-radius: 13px; background: var(--glass2); min-width: 0; } .kv small { color: var(--faint); font-size: 11px; font-weight: 700; display: block; } .kv b { font-size: 13.5px; overflow-wrap: anywhere; }
.kv a { text-decoration: none; color: #c4b5fd; } html[data-theme="light"] .kv a { color: #6d28d9; }
.timeline { margin-top: 12px; display: grid; gap: 10px; border-left: 2px solid var(--edge); padding-left: 14px; }
.timeline div { position: relative; font-size: 13px; } .timeline div::before { content: ""; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--a1); box-shadow: 0 0 0 3px var(--bg2); }
.timeline small { color: var(--faint); display: block; }
.alert { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 14px; background: rgba(251,113,133,.14); color: #fda4af; font-weight: 700; font-size: 13px; margin-top: 12px; }
html[data-theme="light"] .alert { color: #be123c; }
.note { padding: 10px 12px; border-radius: 13px; background: rgba(251,191,36,.1); color: var(--dim); font-size: 13px; margin-top: 10px; }
.stack { display: grid; gap: 8px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

/* Grid cards (households, groups, events) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tile { padding: 16px; border-radius: 18px; background: var(--glass); border: 1px solid var(--edge); cursor: pointer; transition: .2s; text-decoration: none; display: block; backdrop-filter: blur(20px); }
.tile:hover { transform: translateY(-2px); border-color: rgba(139,92,246,.5); }
.tile h4 { margin: 0 0 4px; font-size: 15.5px; }
.tile p { margin: 0; color: var(--faint); font-size: 12.5px; }

/* Kids */
.kid { display: flex; align-items: center; gap: 12px; padding: 13px; border-radius: 16px; background: var(--glass2); border: 2px solid transparent; cursor: pointer; }
.kid.sel { border-color: var(--a1); background: rgba(139,92,246,.12); }
.kid.done { opacity: .6; cursor: default; }
.check { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--edge); display: grid; place-items: center; margin-left: auto; flex: none; }
.kid.sel .check { background: var(--grad); border: 0; color: #fff; }
.label { border-radius: 18px; padding: 14px 16px 14px 22px; background: #fff; color: #111; position: relative; overflow: hidden; }
.label::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--grad); }
.label .code { font: 800 32px/1 "Plus Jakarta Sans", sans-serif; letter-spacing: .2em; margin-top: 8px; }
.label small { color: #555; display: block; } .label .warn { color: #be123c; font-weight: 800; font-size: 12px; margin-top: 4px; }
.rooms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.rooms > div { padding: 12px; border-radius: 14px; background: var(--glass2); } .rooms b { font-size: 22px; display: block; } .rooms small { color: var(--faint); font-weight: 700; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.pad button { height: 52px; border-radius: 14px; border: 1px solid var(--edge); background: var(--glass2); color: var(--text); font: 800 20px inherit; cursor: pointer; }
.pad button:active { transform: scale(.96); }
.pad button.go { background: var(--grad); color: #fff; border: 0; }
.bigfield { width: 100%; height: 52px; font-size: 18px !important; font-weight: 700; letter-spacing: .04em; }

/* Giving */
.giving-hero { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.giving-hero .val { font-size: 40px; font-weight: 800; letter-spacing: -.03em; }
.methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-top: 14px; }
.methods div { padding: 12px; border-radius: 14px; background: var(--glass2); } .methods b { font-size: 17px; display: block; } .methods small { color: var(--faint); font-weight: 700; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; margin-top: 12px; }
.bars div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.bars i { width: 100%; max-width: 34px; border-radius: 8px 8px 3px 3px; background: var(--grad); min-height: 3px; }
.bars small { font-size: 10.5px; color: var(--faint); font-weight: 700; white-space: nowrap; }

/* Care board */
.board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.col h3 { margin-bottom: 10px; }
.care { padding: 14px; border-radius: 16px; background: var(--glass2); border: 1px solid var(--edge); margin-bottom: 10px; }
.care.urgent { border-color: rgba(251,113,133,.5); box-shadow: inset 3px 0 0 #fb7185; }
.care h4 { margin: 6px 0 4px; font-size: 14.5px; }
.care p { margin: 0 0 8px; color: var(--dim); font-size: 13px; white-space: pre-wrap; }
.care .foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--faint); }
.care .foot .btn { margin-left: auto; }

/* Rota */
.rota-day { margin-bottom: 14px; }
.rota-day h4 { margin: 0 0 8px; font-size: 13px; color: var(--dim); }
.slot { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--glass2); margin-bottom: 6px; }
.slot.gap { box-shadow: inset 3px 0 0 #fbbf24; }

/* Forms and windows */
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(4,5,12,.6); backdrop-filter: blur(6px); animation: chr-fade .2s; }
@keyframes chr-fade { from { opacity: 0; } }
.window { width: min(620px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 22px; padding: 22px; background: color-mix(in srgb, var(--bg2) 92%, transparent); border: 1px solid var(--edge); box-shadow: 0 40px 90px -30px rgba(0,0,0,.8); animation: chr-rise .3s cubic-bezier(.2,.8,.2,1); }
.window.wide { width: min(860px, 100%); }
.window h2 { margin: 0 0 4px; font: 600 22px Fraunces, Georgia, serif; }
.window .lead { margin: 0 0 14px; color: var(--dim); font-size: 13.5px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fld { display: grid; gap: 5px; grid-column: span 2; min-width: 0; }
.fld.half { grid-column: span 1; }
.fld > span { font-size: 12px; font-weight: 700; color: var(--dim); }
.fld input, .fld select, .fld textarea, .inp { width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--edge); background: var(--field); color: var(--text); font: 500 14px inherit; outline: none; }
.fld textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
.fld input:focus, .fld select:focus, .fld textarea:focus, .inp:focus { border-color: rgba(139,92,246,.7); box-shadow: 0 0 0 3px rgba(139,92,246,.18); }
.fld.chk { display: flex; align-items: center; gap: 10px; } .fld.chk input { width: 20px; height: 20px; min-height: 0; accent-color: #8b5cf6; } .fld.chk > span { order: 2; font-size: 13.5px; color: var(--text); }
.fld small.hint { color: var(--faint); font-size: 11.5px; }
.win-acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.win-acts .left { margin-right: auto; }
.err { color: var(--bad); font-size: 13px; font-weight: 700; min-height: 1em; margin-top: 8px; }
.picker { position: relative; }
.picker .opts { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; max-height: 240px; overflow-y: auto; border-radius: 14px; background: var(--bg2); border: 1px solid var(--edge); box-shadow: var(--shadow); padding: 4px; }
.picker .opts button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 8px 10px; border: 0; background: none; color: var(--text); text-align: left; border-radius: 10px; cursor: pointer; font: inherit; }
.picker .opts button:hover, .picker .opts button.hl { background: var(--glass2); }
.picker .picked { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 6px 4px 12px; border-radius: 12px; border: 1px solid var(--edge); background: var(--field); }
.picker .picked b { flex: 1; font-size: 14px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; gap: 12px; align-items: center; max-width: min(420px, calc(100vw - 48px)); padding: 12px 16px; border-radius: 16px; background: color-mix(in srgb, var(--bg2) 88%, transparent); border: 1px solid var(--edge); backdrop-filter: blur(20px); box-shadow: var(--shadow); font-size: 13px; transform: translateY(140px); transition: .4s cubic-bezier(.2,.8,.2,1); }
.toast.show { transform: none; }
.toast i { width: 28px; height: 28px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; color: #fff; font-style: normal; flex: none; }

/* Command bar */
.palette { width: min(640px, 100%); align-self: start; margin-top: 10vh; border-radius: 22px; background: color-mix(in srgb, var(--bg2) 94%, transparent); border: 1px solid var(--edge); box-shadow: 0 40px 90px -30px rgba(0,0,0,.8); overflow: hidden; }
.palette input { width: 100%; height: 58px; padding: 0 20px; border: 0; border-bottom: 1px solid var(--edge); background: none; color: var(--text); font: 600 17px inherit; outline: none; }
.palette .res { max-height: 50vh; overflow-y: auto; padding: 6px; }
.palette .res a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-decoration: none; }
.palette .res a.hl, .palette .res a:hover { background: var(--glass2); }
.palette .res small { color: var(--faint); margin-left: auto; font-size: 12px; }

/* Sign in and setup */
.welcome { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.welcome .window { width: min(520px, 100%); text-align: center; padding: 34px 30px; }
.welcome .logo { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 14px; }
.welcome .logo span { font-size: 34px; }
.welcome h1 { font-size: 32px; }
.welcome p { color: var(--dim); }
.welcome .form { text-align: left; margin-top: 18px; }
.feat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 4px; }
.feat div { padding: 10px 6px; border-radius: 14px; background: var(--glass2); font-size: 11.5px; font-weight: 700; color: var(--dim); }
.feat svg { width: 20px; height: 20px; display: block; margin: 0 auto 4px; color: #a78bfa; }

/* Narrow screens */
@media (max-width: 1180px) { .s3 { grid-column: span 6; } .s4, .s5 { grid-column: span 6; } .s7, .s8, .s9 { grid-column: span 12; } .qa { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 40; left: 0; top: 0; width: 270px; transform: translateX(-105%); transition: transform .3s; background: var(--bg2); }
  .app.menu-open .side { transform: none; box-shadow: 30px 0 80px rgba(0,0,0,.5); }
  .icon-btn.menu-btn { display: grid; }
  .main { padding: 14px 16px 40px; }
  .s3, .s4, .s5, .s6 { grid-column: span 12; }
  .board { grid-template-columns: 1fr; }
  .rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cmd kbd { display: none; }
}
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } .fld.half { grid-column: span 2; } .kv { grid-template-columns: 1fr; } .qa { grid-template-columns: repeat(2, minmax(0, 1fr)); } h1 { font-size: 25px; } .feat { grid-template-columns: repeat(2, 1fr); } }
@media print { .aurora, .grain, .side, .top { display: none !important; } }

/* The second batch (2026-11-06): engagement rings, pickup photos, automations,
   the activity log, the map, the door scanner, room ratios, the campus picker. */
.score { position: relative; display: inline-grid; place-items: center; border-radius: 50%; flex: none; }
.score span { position: absolute; inset: 4px; border-radius: 50%; background: var(--bg2); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
img.av { display: block; }
.bigav { width: 74px !important; height: 74px !important; border-radius: 22px !important; margin-top: -37px; border: 4px solid var(--bg2); font-size: 24px; }
.pick-grid { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.pick { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 82px; text-align: center; }
.pick b { font-size: 12.5px; } .pick small { color: var(--faint); font-size: 11px; }
.pick .btn { margin-top: 4px; height: 24px; padding: 0 8px; font-size: 11px; }
.pick-photo { width: 58px !important; height: 58px !important; border-radius: 18px !important; font-size: 16px; }
.rule { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 16px; background: var(--glass2); border: 1px solid var(--edge); margin-bottom: 10px; flex-wrap: wrap; }
.when, .then { padding: 6px 10px; border-radius: 10px; font-size: 12.5px; font-weight: 700; }
.when { background: rgba(34,211,238,.14); color: #67e8f9; } .then { background: rgba(139,92,246,.18); color: #c4b5fd; }
html[data-theme="light"] .when { color: #0e7490; } html[data-theme="light"] .then { color: #6d28d9; }
.sw { width: 42px; height: 24px; border-radius: 99px; background: var(--grad); position: relative; margin-left: auto; flex: none; border: 0; cursor: pointer; }
.sw::after { content: ""; position: absolute; right: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; }
.sw.off { background: var(--glass3); } .sw.off::after { right: auto; left: 3px; }
.log > div { display: flex; gap: 10px; align-items: baseline; padding: 10px 4px; border-bottom: 1px solid var(--edge); font-size: 13px; }
.log > div small { color: var(--faint); margin-left: auto; white-space: nowrap; }
.map-dark .leaflet-tile-pane { filter: invert(.92) hue-rotate(185deg) brightness(.85) saturate(.6); }
.leaflet-container { background: #0e1424; font-family: inherit; }
.scan { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.scan video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan i { position: absolute; left: 50%; top: 50%; width: 52%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 3px solid #22d3ee; border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.scan[hidden] { display: none; }
.rooms > div.over { box-shadow: inset 0 0 0 1px rgba(251,191,36,.5); }
.tch { display: inline-flex; align-items: center; gap: 4px; }
.tch button { width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--edge); background: var(--glass2); color: var(--text); font: 800 12px inherit; cursor: pointer; line-height: 1; padding: 0; }
.camp-pick { margin-top: 2px; width: 100%; max-width: 150px; padding: 2px 4px; border-radius: 8px; border: 1px solid var(--edge); background: var(--glass2); color: var(--dim); font: 600 11.5px inherit; }

/* ---------- Weddings (2026-11-06; js/chronicles-weddings.js) ---------- */
.tile.wed { position: relative; overflow: hidden; }
.tile.wed::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(244,114,182,.22), transparent 70%); pointer-events: none; }
.wed-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; font-size: 12.5px; }
.wed-count .val { background: linear-gradient(135deg, #f9a8d4, #a78bfa 55%, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 40px; }
.wtask.done b { text-decoration: line-through; color: var(--faint); }
.wtask small.late { color: var(--bad); font-weight: 700; }
.tick { position: relative; width: 22px; height: 22px; flex: none; cursor: pointer; }
.tick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tick span { position: absolute; inset: 0; border-radius: 7px; border: 1.5px solid var(--edge); background: var(--glass2); transition: .15s; }
.tick input:checked + span { background: var(--grad); border-color: transparent; }
.tick input:checked + span::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 800; }
.tick input:focus-visible + span { outline: 2px solid var(--a1); outline-offset: 2px; }
.addrow { display: flex; gap: 8px; margin-top: 12px; } .addrow .inp:first-child { flex: 1; min-width: 0; }
.btn.icon { width: 30px; padding: 0; justify-content: center; font-size: 17px; line-height: 1; }
.inp.sm { width: auto; height: 32px; padding: 0 28px 0 10px; font-size: 12.5px; border-radius: 10px; }
.rsvp.r-yes { color: var(--ok); } .rsvp.r-no { color: var(--bad); }
.facts { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.facts > div small { display: block; font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; } .facts > div b { font-size: 14px; }
@media (max-width: 640px) { .addrow { flex-wrap: wrap; } }

/* ---------- Wedding cards & fliers (2026-11-06; js/chronicles-cards.js) ---------- */
.cg-makers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.cg-maker { text-align: left; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--edge); background: linear-gradient(135deg, rgba(244,114,182,.14), rgba(139,92,246,.12) 60%, rgba(34,211,238,.08)); color: var(--text); cursor: pointer; font: inherit; transition: transform .15s, border-color .15s; }
.cg-maker:hover { transform: translateY(-2px); border-color: rgba(244,114,182,.45); }
.cg-maker b { display: block; font-size: 15px; margin-bottom: 4px; } .cg-maker small { color: var(--dim); font-size: 12.5px; line-height: 1.4; }
.window.cardgen { width: min(1180px, 100%); }
.cg { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; margin-top: 12px; }
.cg-prev { display: grid; place-items: center; min-height: 420px; padding: 16px; border-radius: 18px; background: repeating-conic-gradient(var(--glass) 0 25%, transparent 0 50%) 0 0 / 22px 22px; }
.cg-prev canvas { max-width: 100%; max-height: 66vh; width: auto; height: auto; border-radius: 6px; box-shadow: 0 24px 60px -20px rgba(0,0,0,.7); }
.cg-side { max-height: 68vh; overflow-y: auto; padding-right: 4px; }
.cg-label { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin: 14px 0 8px; } .cg-label:first-child { margin-top: 0; }
.cg-themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cg-theme { position: relative; height: 54px; border-radius: 12px; border: 2px solid transparent; cursor: pointer; padding: 0; overflow: hidden; }
.cg-theme i { position: absolute; inset: 7px; border: 1.5px solid var(--ac); border-radius: 6px; }
.cg-theme span { position: absolute; left: 0; right: 0; bottom: 3px; font-size: 9px; font-weight: 700; color: var(--ac); text-shadow: 0 1px 2px rgba(255,255,255,.4); }
.cg-theme.on { border-color: var(--a1); box-shadow: 0 0 0 3px rgba(139,92,246,.3); }
.cg-photo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .cg-photo small { font-size: 11.5px; }
.cg-form textarea { min-height: 70px; }
.cg-wa:empty { display: none; }
@media (max-width: 900px) { .cg { grid-template-columns: 1fr; } .cg-side { max-height: none; } .cg-makers { grid-template-columns: 1fr; } }

/* A group's meetings (church office) and My group (a leader's page) — 2026-11-06 */
.met-kpis { display: flex; gap: 26px; margin: 12px 0 10px; } .met-kpis b { display: block; font-size: 26px; font-weight: 800; } .met-kpis small { color: var(--faint); font-size: 12px; }
.met-bar { width: 120px; height: 7px; border-radius: 99px; background: var(--glass2); overflow: hidden; flex: none; } .met-bar i { display: block; height: 100%; background: var(--grad); }
.lead-card { border-color: rgba(139, 92, 246, .35); }
.lead-head small { color: var(--faint); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.lead-head h3 { margin: 2px 0 2px; font: 600 21px Fraunces, serif; }
.lead-head .dim { font-size: 13px; } .lead-head b { color: var(--text); }
.lead-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.lead-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; background: var(--glass); border: 1px solid var(--edge); }
.lead-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 12px; flex: none; overflow: hidden; } .lead-av img { width: 100%; height: 100%; object-fit: cover; }
.lead-g { flex: 1; min-width: 0; } .lead-g b { display: block; font-size: 14px; } .lead-g small { color: var(--faint); font-size: 12px; }
.lead-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--glass2); text-decoration: none; font-size: 14px; flex: none; }
.lead-tick { width: 34px; height: 34px; border-radius: 11px; border: 1.5px solid var(--edge); background: transparent; color: transparent; font-weight: 800; font-size: 16px; cursor: pointer; flex: none; }
.lead-tick.on { background: var(--grad); border-color: transparent; color: #fff; }
.lead-acts { display: flex; gap: 8px; margin-top: 12px; } .lead-acts .btn { flex: 1; justify-content: center; }

/* Online giving (2026-11-06; js/chronicles-giving.js) */
.og-card { display: grid; grid-template-columns: minmax(0, 1.3fr) auto auto; gap: 18px 22px; align-items: center; background: linear-gradient(120deg, rgba(236,72,153,.16), rgba(139,92,246,.14) 45%, rgba(34,211,238,.08)); border-color: rgba(236,72,153,.28); }
.og-card.og-off { grid-template-columns: minmax(0, 1fr) auto; }
.og-l { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.og-l h3 { margin: 0 0 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.og-l p { margin: 0; font-size: 13px; }
.og-ico { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #ec4899, #8b5cf6); box-shadow: 0 10px 30px -10px rgba(236,72,153,.7); }
.og-ico svg { width: 20px; height: 20px; }
.og-stats { display: flex; gap: 22px; }
.og-stats > div { display: grid; gap: 2px; padding: 4px 0; }
.og-stats b { font-size: 20px; letter-spacing: -.01em; }
.og-stats small { color: var(--dim); font-size: 12px; }
.og-stats .click { cursor: pointer; border-radius: 10px; }
.og-stats .click:hover b { color: #f9a8d4; }
.og-warn { color: var(--warn); }
.og-acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.og-recent { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.og-gift { display: grid; gap: 1px; padding: 10px 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--edge); }
.og-gift b { font-size: 15px; } .og-gift small { font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.og-gift.failed { opacity: .6; } .og-gift.failed b { text-decoration: line-through; }
.og-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.og-choice { position: relative; display: grid; gap: 6px; align-content: start; padding: 14px 14px 14px 16px; border-radius: 16px; border: 1px solid var(--edge); background: var(--glass); cursor: pointer; transition: border-color .15s, background .15s; }
.og-choice input { position: absolute; opacity: 0; pointer-events: none; }
.og-choice b { font-size: 14.5px; } .og-choice span { font-size: 12.5px; color: var(--dim); line-height: 1.45; }
.og-choice em { font-style: normal; font-size: 11.5px; color: var(--warn); }
.og-choice.on { border-color: rgba(167,139,250,.75); background: linear-gradient(135deg, rgba(139,92,246,.22), rgba(236,72,153,.12)); box-shadow: 0 0 0 3px rgba(139,92,246,.18); }
.og-choice.on::after { content: '✓'; position: absolute; top: 10px; right: 12px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; color: #fff; background: var(--grad); }
.og-choice.disabled { opacity: .55; cursor: not-allowed; }
.og-sec { padding: 14px 0; border-top: 1px solid var(--edge); }
.og-sec h3 { margin: 0 0 6px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.og-sec h3 small { font-weight: 500; font-size: 12px; }
.og-sec p { margin: 0 0 10px; font-size: 13px; }
.og-sec code { font-size: 12px; padding: 1px 5px; border-radius: 6px; background: var(--glass2); }
.og-copy { display: flex; gap: 8px; } .og-copy .inp { flex: 1; min-width: 0; }
.og-hook { margin-top: 10px; display: grid; gap: 8px; } .og-hook small { color: var(--dim); font-size: 12px; line-height: 1.5; }
.og-note { padding: 9px 12px; border-radius: 12px; background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.3); color: #fcd34d; font-size: 12.5px; }
@media (max-width: 900px) { .og-card { grid-template-columns: 1fr; } .og-acts { justify-content: flex-start; } .og-choices { grid-template-columns: 1fr; } }

/* The giving page (c.html ?give / /give/CODE) */
.give-amts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.give-amts button { height: 52px; border-radius: 14px; border: 1px solid var(--edge); background: var(--glass); color: var(--text); font: 700 16px "Plus Jakarta Sans", sans-serif; cursor: pointer; }
.give-amts button.on { border-color: transparent; background: var(--grad); color: #fff; box-shadow: 0 10px 30px -12px rgba(139,92,246,.9); }
.give-other { position: relative; } .give-other .inp { height: 52px; font-size: 18px; font-weight: 700; padding-left: 64px; }
.give-other b { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--dim); font-size: 14px; }
.give-seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: var(--glass); border: 1px solid var(--edge); margin: 10px 0; }
.give-seg button { height: 40px; border: 0; border-radius: 10px; background: none; color: var(--dim); font: 600 14px "Plus Jakarta Sans", sans-serif; cursor: pointer; }
.give-seg button.on { background: var(--glass3); color: var(--text); box-shadow: 0 4px 14px -6px rgba(0,0,0,.6); }
.give-pay { display: grid; gap: 8px; margin-top: 12px; }
.give-pay .btn { height: 54px; font-size: 16px; }
.give-pay small { text-align: center; color: var(--faint); font-size: 11.5px; }
.give-total { text-align: center; font: 600 44px Fraunces, Georgia, serif; margin: 6px 0 2px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.receipt { background: #fff; color: #111; border-radius: 20px; padding: 24px 22px; margin-top: 14px; }
.receipt h2 { margin: 0 0 2px; font: 600 20px Fraunces, Georgia, serif; } .receipt .dim { color: #555; }
.receipt dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 16px 0 0; font-size: 14px; } .receipt dt { color: #666; } .receipt dd { margin: 0; text-align: right; font-weight: 600; }
.receipt .amt { font: 700 32px "Plus Jakarta Sans", sans-serif; margin: 12px 0 0; }
@media print { body.chr .aurora, .mob-head, .no-print, footer { display: none !important; } body.chr { background: #fff !important; } .receipt { box-shadow: none; padding: 0; } }
.og-sec .form[hidden] { display: none; }
.og-choice b { padding-right: 26px; }
