/* Church app — "Clean" look.
   Each church supplies --brand and --accent (set in the page head); everything else derives from them. */
:root {
  --brand: #2f5d50; --accent: #c8a15a; --on-brand: #fff; --on-accent: #14201f;
  --bg: #f7f6f3; --surface: #fff; --ink: #1c2422; --muted: #66716d; --faint: #98a19d;
  --line: #e8e5de; --line-strong: #d9d5cb;
  --brand-tint: color-mix(in srgb, var(--brand) 9%, #fff);
  --brand-soft: color-mix(in srgb, var(--brand) 18%, #fff);
  --brand-deep: color-mix(in srgb, var(--brand) 82%, #000);
  --accent-tint: color-mix(in srgb, var(--accent) 16%, #fff);
  --ok: #1e7d56; --ok-tint: #e6f4ec; --warn: #9a6400; --warn-tint: #fbf1dc; --danger: #b3372f; --danger-tint: #fbe9e7;
  --r-lg: 22px; --r: 16px; --r-sm: 11px; --tap: 48px;
  --shadow: 0 1px 2px rgba(28,36,34,.05), 0 8px 24px rgba(28,36,34,.06);
  --shadow-lg: 0 18px 50px rgba(28,36,34,.2);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--sans); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, .serif { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; line-height: 1.15; } h2 { font-size: 1.3rem; line-height: 1.2; } h3 { font-size: 1rem; font-weight: 650; }
a { color: var(--brand-deep); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
svg { width: 1.25em; height: 1.25em; flex: none; }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .tiny { font-size: .78rem; } .center { text-align: center; }
.row { display: flex; align-items: center; gap: 12px; } .row.wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; } .spread { justify-content: space-between; }
.stack { display: grid; gap: 14px; } .stack.tight { gap: 8px; } .stack.loose { gap: 26px; }
.eyebrow { font-size: .74rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; border-radius: 6px; }

/* ---------- boot / landing ---------- */
.boot { min-height: 100dvh; display: grid; place-items: center; }
.boot-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--brand); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.7); opacity: .35; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.landing main { max-width: 520px; margin: 12vh auto; padding: 0 24px; }
.landing ul { list-style: none; padding: 0; display: grid; gap: 10px; margin: 18px 0; }
.landing li a { display: flex; justify-content: space-between; gap: 12px; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; }
.landing li span { color: var(--muted); font-size: .85rem; }

/* ---------- app frame ---------- */
.frame { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; padding-top: var(--safe-t); }
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar-in { max-width: 1080px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 12px; min-height: 60px; }
.brandmark { width: 36px; height: 36px; border-radius: 10px; flex: none; background: var(--brand-tint); object-fit: contain; padding: 4px; }
.topbar .title { font-family: var(--serif); font-weight: 600; font-size: 1.12rem; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topnav { display: none; margin-left: auto; gap: 4px; }
.topnav a { padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .93rem; }
.topnav a:hover { background: #fff; color: var(--ink); }
.topnav a[aria-current=page] { background: var(--brand); color: var(--on-brand); }
main.page { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 8px 20px calc(96px + var(--safe-b)); }
.tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; background: color-mix(in srgb, #fff 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); display: flex; justify-content: space-around; padding: 6px 6px calc(6px + var(--safe-b)); }
.tabbar a { flex: 1; max-width: 110px; display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; text-decoration: none; color: var(--faint); font-size: .7rem; font-weight: 650; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a[aria-current=page] { color: var(--brand-deep); }
@media (min-width: 860px) {
  .tabbar { display: none; } .topnav { display: flex; }
  main.page { padding-bottom: 60px; padding-top: 18px; }
}
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 14px 0 18px; }
.pagehead p { color: var(--muted); margin-top: 4px; }
.back { display: inline-flex; align-items: center; gap: 4px; font-weight: 650; font-size: .9rem; text-decoration: none; color: var(--muted); margin-top: 10px; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card.pad { padding: 18px; } .card.flat { box-shadow: none; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 2px 10px; }
.section-title a { font-size: .88rem; font-weight: 650; text-decoration: none; }
.list { display: grid; }
.list > * { padding: 14px 18px; border-top: 1px solid var(--line); }
.list > *:first-child { border-top: 0; }
.list > a, .list > button { text-align: left; text-decoration: none; color: inherit; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; cursor: pointer; display: flex; align-items: center; gap: 14px; }
.list > a:hover, .list > button:hover { background: var(--brand-tint); }
.list > a:first-child, .list > button:first-child { border-top-left-radius: var(--r); border-top-right-radius: var(--r); }
.list > a:last-child, .list > button:last-child { border-bottom-left-radius: var(--r); border-bottom-right-radius: var(--r); }
.chev { margin-left: auto; color: var(--faint); flex: none; }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty h3 { color: var(--ink); margin-bottom: 4px; font-family: var(--serif); font-size: 1.15rem; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 20px; border-radius: 999px; border: 1px solid transparent; background: var(--brand); color: var(--on-brand); font-weight: 650; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .06s ease, filter .15s ease; }
.btn:hover { filter: brightness(1.06); } .btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; cursor: default; filter: none; }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn.soft { background: var(--brand-tint); color: var(--brand-deep); }
.btn.accent { background: var(--accent); color: var(--on-accent); }
.btn.danger { background: var(--danger); color: #fff; } .btn.danger-ghost { background: #fff; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, #fff); }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: .9rem; } .btn.lg { min-height: 58px; font-size: 1.08rem; padding: 0 28px; } .btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }
.iconbtn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; flex: none; color: var(--muted); }
.iconbtn:hover { color: var(--ink); border-color: var(--line-strong); } .iconbtn svg { width: 20px; height: 20px; }
label.field { display: grid; gap: 6px; font-size: .86rem; font-weight: 650; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; min-height: var(--tap); padding: 10px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: #fff; color: var(--ink); font-weight: 400; font-size: 1rem; }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.45; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.input.big { min-height: 58px; font-size: 1.15rem; border-radius: var(--r); padding-left: 18px; }
.search { position: relative; } .search svg { position: absolute; left: 16px; top: 50%; translate: 0 -50%; width: 20px; height: 20px; color: var(--faint); pointer-events: none; }
.search .input { padding-left: 46px; border-radius: 999px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .95rem; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }
.grid2 { display: grid; gap: 12px; grid-template-columns: 1fr; } @media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: none; padding: 9px 16px; border-radius: 999px; font-weight: 650; font-size: .92rem; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button[aria-selected=true] { background: var(--brand); color: var(--on-brand); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: #f0eee8; color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--ok-tint); color: var(--ok); } .pill.warn { background: var(--warn-tint); color: var(--warn); } .pill.danger { background: var(--danger-tint); color: var(--danger); } .pill.brand { background: var(--brand-tint); color: var(--brand-deep); }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: var(--r-sm); font-size: .93rem; background: var(--brand-tint); color: var(--brand-deep); }
.banner.warn { background: var(--warn-tint); color: #6d4700; } .banner.danger { background: var(--danger-tint); color: #842821; } .banner.ok { background: var(--ok-tint); color: #145a3d; }
.banner svg { width: 20px; height: 20px; flex: none; margin-top: 1px; } .banner b { font-weight: 700; }

/* ---------- avatars ---------- */
.avatar { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; flex: none; background: var(--brand-soft); color: var(--brand-deep); display: grid; place-items: center; font-weight: 700; font-size: 1rem; overflow: hidden; }
.avatar.lg { width: 84px; height: 100px; border-radius: 16px; font-size: 1.5rem; } .avatar.xl { width: 120px; height: 144px; border-radius: 20px; font-size: 2rem; } .avatar.sm { width: 38px; height: 38px; border-radius: 11px; font-size: .82rem; }
.avatar { position: relative; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s ease; } .avatar img.ready { opacity: 1; }

/* ---------- sign-in ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: radial-gradient(120% 70% at 50% 0%, var(--brand-tint), var(--bg) 70%); }
.auth-card { width: 100%; max-width: 400px; text-align: center; }
.auth-logo { width: 92px; height: 92px; margin: 0 auto 18px; border-radius: 26px; background: #fff; box-shadow: var(--shadow); padding: 14px; object-fit: contain; }
.auth-card h1 { font-size: 1.55rem; } .auth-card .card { margin-top: 26px; padding: 22px; text-align: left; }
.code-input { text-align: center; font-size: 1.9rem; letter-spacing: .32em; font-weight: 650; font-variant-numeric: tabular-nums; padding-left: .32em; }

/* ---------- home ---------- */
.hero { border-radius: var(--r-lg); padding: 26px 24px; background: linear-gradient(140deg, var(--brand), var(--brand-deep)); color: var(--on-brand); display: grid; gap: 6px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 34%, transparent); filter: blur(4px); }
.hero > * { position: relative; z-index: 1; } .hero h1 { font-size: 1.6rem; } .hero p { opacity: .88; }
.hero .when svg { width: 16px; height: 16px; }
.hero .when { margin-top: 10px; display: inline-flex; gap: 8px; align-items: center; font-size: .9rem; font-weight: 600; background: rgba(255,255,255,.14); padding: 6px 12px; border-radius: 999px; width: fit-content; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick a { display: grid; justify-items: center; gap: 8px; padding: 16px 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); font-weight: 650; font-size: .84rem; box-shadow: var(--shadow); }
.quick a .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand-deep); }
.quick a.give .ico { background: var(--accent); color: var(--on-accent); } .quick svg { width: 22px; height: 22px; }
.cols { display: grid; gap: 26px; } @media (min-width: 860px) { .cols { grid-template-columns: 1.15fr 1fr; align-items: start; } }
.datechip { width: 52px; flex: none; text-align: center; border-radius: 13px; background: var(--brand-tint); color: var(--brand-deep); padding: 6px 0 7px; line-height: 1.05; }
.datechip b { display: block; font-size: 1.25rem; font-family: var(--serif); } .datechip span { font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.announce { padding: 16px 18px; } .announce p { color: var(--muted); margin-top: 4px; white-space: pre-line; }

/* ---------- directory ---------- */
.dir-tools { position: sticky; top: calc(60px + var(--safe-t)); z-index: 10; background: var(--bg); padding: 6px 0 12px; }
.dir-grid { display: grid; gap: 12px; grid-template-columns: 1fr; } @media (min-width: 700px) { .dir-grid { grid-template-columns: 1fr 1fr; } } @media (min-width: 1020px) { .dir-grid { grid-template-columns: 1fr 1fr 1fr; } }
.person { display: flex; gap: 14px; padding: 14px; align-items: flex-start; }
.person .name { font-weight: 650; font-size: 1.02rem; line-height: 1.25; }
.person .lines { display: grid; gap: 3px; margin-top: 6px; font-size: .9rem; }
.person .lines a { text-decoration: none; display: flex; gap: 8px; align-items: flex-start; color: var(--ink); overflow-wrap: anywhere; }
.person .lines a.one span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .person .lines a.one { overflow: hidden; }
.person .lines a:hover { color: var(--brand-deep); } .person .lines svg { width: 15px; height: 15px; margin-top: 4px; flex: none; color: var(--faint); }
.dir-grid .letter { grid-column: 1 / -1; margin-bottom: 0; }
@media (min-width: 700px) { .dir-grid .letter:not(.keep) { display: none; } }
.letter { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; color: var(--brand-deep); margin: 18px 4px 8px; display: flex; align-items: center; gap: 12px; }
.letter::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.az { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin-top: 10px; } .az::-webkit-scrollbar { display: none; }
.az button { border: 0; background: none; min-width: 30px; height: 32px; border-radius: 8px; font-weight: 700; font-size: .82rem; color: var(--muted); cursor: pointer; } .az button:hover { background: #fff; color: var(--brand-deep); }

/* ---------- dialogs / toasts ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(20,28,26,.46); display: grid; place-items: end center; animation: fade .15s ease; }
@media (min-width: 640px) { .scrim { place-items: center; padding: 24px; } }
.dialog { background: #fff; width: 100%; max-width: 560px; max-height: 92dvh; border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: rise .2s ease; }
@media (min-width: 640px) { .dialog { border-radius: var(--r-lg); } } .dialog.wide { max-width: 760px; } .dialog.narrow { max-width: 420px; }
.dialog-head { padding: 20px 22px 6px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; } .dialog-head p { color: var(--muted); font-size: .92rem; margin-top: 2px; }
.dialog-body { padding: 12px 22px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.dialog-foot { padding: 14px 22px calc(16px + var(--safe-b)); border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } } @keyframes rise { from { transform: translateY(18px); opacity: 0; } }
.toasts { position: fixed; z-index: 90; left: 0; right: 0; bottom: calc(86px + var(--safe-b)); display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
@media (min-width: 860px) { .toasts { bottom: 28px; } } .kiosk .toasts { bottom: 28px; }
.toast { background: #1c2422; color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: .93rem; box-shadow: var(--shadow-lg); animation: rise .2s ease; max-width: 100%; }
.toast.ok { background: var(--ok); } .toast.err { background: var(--danger); }
.netbar { position: sticky; top: 0; z-index: 40; background: #6d4700; color: #fff; text-align: center; font-size: .86rem; font-weight: 650; padding: 7px 12px; }

/* ---------- tables (admin) ---------- */
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--line); font-weight: 700; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; } .table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; } .table tr.click:hover td { background: var(--brand-tint); }
.scrollx { overflow-x: auto; }
.adminnav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-bottom: 18px; } .adminnav::-webkit-scrollbar { display: none; }
.adminnav a { padding: 9px 16px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 650; font-size: .92rem; white-space: nowrap; background: #fff; border: 1px solid var(--line); }
.adminnav a[aria-current=page] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.swatch { width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line-strong); padding: 0; background: none; cursor: pointer; }
.pinreveal { font: 700 2.2rem/1 ui-monospace, Menlo, monospace; letter-spacing: .2em; text-align: center; padding: 18px; background: var(--brand-tint); border-radius: var(--r); color: var(--brand-deep); }

/* ---------- check-in ---------- */
.ci-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 14px; }
.ci-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.fam { padding: 14px 16px; display: grid; gap: 10px; }
.fam-head { display: flex; align-items: center; gap: 12px; }
.fam-ico { width: 46px; height: 46px; border-radius: 14px; background: var(--brand-tint); color: var(--brand-deep); display: grid; place-items: center; font-weight: 700; font-family: var(--serif); flex: none; }
.kid { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); background: #faf9f6; border: 1px solid var(--line); }
.kid .who { flex: 1; min-width: 0; } .kid .who b { font-size: 1.04rem; } .kid .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.kid.in { background: var(--ok-tint); border-color: color-mix(in srgb, var(--ok) 22%, #fff); }
.codebox { text-align: center; padding: 22px 16px; border-radius: var(--r); background: var(--brand-tint); }
.codebox .code { font: 700 3.4rem/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .14em; color: var(--brand-deep); padding-left: .14em; }
.adults { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.adult { display: grid; justify-items: center; gap: 8px; padding: 14px 10px; border: 2px solid var(--line); border-radius: var(--r); background: #fff; cursor: pointer; text-align: center; }
.adult:hover, .adult[aria-pressed=true] { border-color: var(--brand); background: var(--brand-tint); }
.adult b { line-height: 1.2; } .adult span { font-size: .82rem; color: var(--muted); }
.stop { border: 2px solid var(--danger); border-radius: var(--r); padding: 18px; background: var(--danger-tint); color: #6f1f19; }
.stop h3 { font-size: 1.15rem; margin-bottom: 6px; }

/* ---------- kiosk ---------- */
body.kiosk { background: var(--bg); }
.kiosk-lock { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: linear-gradient(160deg, var(--brand), var(--brand-deep)); color: var(--on-brand); text-align: center; }
.kiosk-lock .auth-logo { box-shadow: none; }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 22px 0 8px; height: 18px; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; opacity: .55; } .pin-dots i.on { background: currentColor; opacity: 1; }
.pinpad { display: grid; grid-template-columns: repeat(3, 84px); gap: 14px; justify-content: center; margin-top: 18px; }
.pinpad button { height: 84px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: inherit; font-size: 1.9rem; font-weight: 500; cursor: pointer; }
.pinpad button:active { background: rgba(255,255,255,.34); } .pinpad button.fn { background: none; font-size: 1rem; font-weight: 650; }
.kiosk-bar { position: sticky; top: 0; z-index: 20; background: var(--brand); color: var(--on-brand); padding: calc(10px + var(--safe-t)) 20px 10px; display: flex; align-items: center; gap: 14px; }
.kiosk-bar .seg { background: rgba(0,0,0,.22); border: 0; padding: 5px; } .kiosk-bar .seg button { color: #fff; padding: 12px 22px; font-size: 1rem; } .kiosk-bar .seg button[aria-selected=true] { background: #fff; color: var(--brand-deep); }
.kiosk-bar .btn.ghost, .kiosk-bar .iconbtn { border-color: transparent; }
.kiosk-main { max-width: 980px; margin: 0 auto; padding: 18px 20px 60px; }
.kiosk .kid .btn, .kiosk .fam .btn { min-height: 54px; font-size: 1.02rem; }

/* ---------- print: name tags ---------- */
#print-area { display: none; }
@media print {
  @page { size: 62mm 100mm; margin: 3mm; }
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block; font-family: Arial, Helvetica, sans-serif; color: #000; }
  .tag { break-after: page; height: 92mm; display: flex; flex-direction: column; justify-content: center; text-align: center; gap: 2mm; }
  .tag:last-child { break-after: auto; }
  .tag .t-name { font-size: 22pt; font-weight: 800; line-height: 1.05; } .tag .t-room { font-size: 12pt; }
  .tag .t-alert { font-size: 11pt; font-weight: 800; border: 1.2mm solid #000; padding: 1.5mm; }
  .tag .t-code { font: 800 34pt/1 "Courier New", monospace; letter-spacing: 2mm; } .tag .t-small { font-size: 8pt; }
}

/* =====================================================================================
   "Immersive" look (a church picks Clean or Immersive under Church settings).
   Same screens and the same code; a photo-led home screen, the church colour used boldly
   for the app frame, and quieter white cards inside.
   ===================================================================================== */
[data-theme=immersive] { --bg: color-mix(in srgb, var(--brand) 5%, #f3f2ee); --r-lg: 26px; --r: 18px; --shadow: 0 1px 2px rgba(20,26,34,.06), 0 12px 32px rgba(20,26,34,.09); }
[data-theme=immersive] .topbar { background: var(--brand-deep); color: var(--on-brand); border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
[data-theme=immersive] .topbar .brandmark { background: #fff; }
[data-theme=immersive] .topnav a { color: color-mix(in srgb, var(--on-brand) 72%, transparent); }
[data-theme=immersive] .topnav a:hover { background: rgba(255,255,255,.12); color: var(--on-brand); }
[data-theme=immersive] .topnav a[aria-current=page] { background: var(--accent); color: var(--on-accent); }
[data-theme=immersive] .tabbar { background: var(--brand-deep); border-top-color: transparent; }
[data-theme=immersive] .tabbar a { color: color-mix(in srgb, var(--on-brand) 55%, transparent); }
[data-theme=immersive] .tabbar a[aria-current=page] { color: var(--on-brand); }
[data-theme=immersive] .card { border-color: transparent; }
[data-theme=immersive] .card.flat { border-color: var(--line); }
[data-theme=immersive] h1 { font-size: 2rem; }
[data-theme=immersive] .dir-tools { background: var(--bg); }
[data-theme=immersive] .auth { background: linear-gradient(165deg, var(--brand), var(--brand-deep) 70%); }
[data-theme=immersive] .auth-card > h1, [data-theme=immersive] .auth-card > p { color: var(--on-brand); }
[data-theme=immersive] .auth-card > p.muted { opacity: .8; }
[data-theme=immersive] .auth-logo { box-shadow: 0 18px 40px rgba(0,0,0,.28); }

/* the home hero: full-bleed, tall, photo behind a colour wash */
[data-theme=immersive] .home { margin-top: 0 !important; }
[data-theme=immersive] .hero { margin: -8px calc(50% - 50vw) 0; border-radius: 0; min-height: min(62vh, 520px); padding: 28px max(20px, calc(50vw - 520px)) 74px; align-content: end; background-color: var(--brand-deep); background-size: cover; background-position: center; }
[data-theme=immersive] .hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--brand-deep) 30%, transparent) 0%, transparent 34%, color-mix(in srgb, var(--brand-deep) 92%, transparent) 100%); }
[data-theme=immersive] .hero::after { display: none; }
[data-theme=immersive] .hero:not(.has-photo) { background-image: radial-gradient(90% 80% at 80% 10%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 60%), linear-gradient(150deg, var(--brand), var(--brand-deep)); }
[data-theme=immersive] .hero h1 { font-size: clamp(2rem, 6.5vw, 3.2rem); line-height: 1.05; max-width: 16ch; text-wrap: balance; }
[data-theme=immersive] .hero p { font-size: 1.08rem; }
[data-theme=immersive] .hero .when { background: rgba(255,255,255,.18); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
[data-theme=immersive] .quick { margin-top: -66px; position: relative; z-index: 2; }
[data-theme=immersive] .quick a { border: 0; box-shadow: 0 10px 30px rgba(20,26,34,.16); padding: 18px 6px; }
[data-theme=immersive] .quick a .ico { background: var(--brand); color: var(--on-brand); border-radius: 50%; width: 48px; height: 48px; }
[data-theme=immersive] .quick a.give .ico { background: var(--accent); color: var(--on-accent); }
[data-theme=immersive] .section-title h2 { font-size: 1.5rem; }
[data-theme=immersive] .datechip { background: var(--brand); color: var(--on-brand); }
@media (min-width: 860px) { [data-theme=immersive] .hero { margin-top: -18px; min-height: 460px; } }

/* ---------- help and privacy pages ---------- */
.plainpage { max-width: 760px; margin: 0 auto; padding: calc(14px + var(--safe-t)) 20px 60px; }
.steps { margin: 0; padding-left: 22px; display: grid; gap: 10px; } .steps li { padding-left: 4px; } .steps li::marker { font-weight: 700; color: var(--brand-deep); }
.plainlist { margin: 0; padding-left: 20px; display: grid; gap: 7px; }
.prose h2 { font-size: 1.12rem; } .prose p, .prose li { color: #3a4542; }
.authlinks { margin-top: 12px; } .authlinks a { color: inherit; font-weight: 600; }
[data-theme=immersive] .authlinks, [data-theme=immersive] .auth-card > .tiny { color: var(--on-brand); opacity: .85; }
.profile .grow { min-width: 140px; } .profile .grow > * { overflow-wrap: anywhere; }
/* long names, emails and pills must wrap inside a card instead of pushing the page wider than the phone */
.stack > * { min-width: 0; } .list > a, .list > button { min-width: 0; } .list .grow, .list .grow > * { overflow-wrap: anywhere; }

/* ---------- giving page, translation card, QR ---------- */
.give h2 { font-size: 1.15rem; } .give p { margin: 0; color: #3a4542; }
.feecalc { margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--line); display: grid; gap: 8px; } .feecalc .input { max-width: 130px; } .feecalc b { font-size: 1.1rem; }
.translate { border-left: 4px solid var(--brand); }
.qr { background: #fff; padding: 6px; border-radius: 12px; max-width: 280px; margin: 0 auto; width: 100%; } .qr svg { display: block; width: 100%; height: auto; }
