/* Calm Liquid Glass. Every rule is gated on html.theme-glass so the flag-off site is unchanged.
   The JS selector in wwwroot/js/liquid-glass.js mirrors the glass surfaces below. */

@property --glint {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}
@property --mx {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 50%;
}
@property --my {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 8%;
}
@property --scroll-sheen {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 32%;
}

html.theme-glass {
  --lg-ink: #1A1612;
  --lg-muted: #3F382F;
  --lg-eyebrow: #5A3810;
  --lg-fill: rgb(255 255 255 / .08);
  --lg-fill-strong: rgb(255 255 255 / .12);
  --lg-blur: blur(2px) saturate(160%) brightness(1.06);
  --lg-line: rgb(255 255 255 / .28);
  --lg-shadow:
    inset 0 1px 0 rgb(255 255 255 / .86),
    inset 1px 0 0 rgb(255 255 255 / .5),
    inset 0 -2px 8px rgb(50 60 80 / .1),
    inset 0 -1px 0 rgb(50 60 80 / .16),
    inset 1px 0 1px rgb(90 200 230 / .2),
    inset -1px 0 1px rgb(230 90 160 / .12),
    0 8px 24px rgb(50 60 80 / .16),
    0 20px 40px -10px rgb(255 186 140 / .48),
    0 36px 28px -14px rgb(255 214 180 / .36);
  --lg-radius: 28px;
  --lg-radius-sm: 18px;
  color-scheme: light;
  background-color: #b7c4b8;
  background-image: linear-gradient(180deg, #aebcd0 0%, #c5b8d4 26%, #e4c6b6 52%, #f0d8c0 68%, #d5d8c8 82%, #b7c4b8 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100%;
}

html.theme-glass::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(42% 32% at 20% 18%, rgb(180 196 230 / .45), transparent 70%),
    radial-gradient(48% 36% at 70% 28%, rgb(255 228 200 / .55), transparent 72%),
    radial-gradient(circle 140px at 78% 22%, rgb(243 212 180 / .55), transparent 72%),
    radial-gradient(circle 100px at 16% 64%, rgb(212 196 234 / .5), transparent 72%),
    radial-gradient(circle 120px at 64% 76%, rgb(255 232 200 / .48), transparent 72%),
    radial-gradient(circle 90px at 28% 32%, rgb(197 220 200 / .45), transparent 72%),
    radial-gradient(circle 75px at 86% 56%, rgb(240 200 192 / .5), transparent 72%),
    radial-gradient(circle 55px at 46% 14%, rgb(232 240 255 / .4), transparent 72%),
    radial-gradient(120% 46% at 50% 122%, rgb(132 154 142 / .62), transparent 58%),
    radial-gradient(88% 34% at 12% 118%, rgb(183 196 184 / .72), transparent 62%),
    radial-gradient(78% 30% at 92% 124%, rgb(196 176 160 / .55), transparent 64%),
    radial-gradient(circle at 50% 132%, transparent 46%, rgb(255 255 255 / .2) 47.1%, transparent 48.5%),
    radial-gradient(circle at 8% 148%, transparent 36%, rgb(255 255 255 / .14) 37.1%, transparent 38.4%);
  background-repeat: no-repeat;
}

html.theme-glass body,
html.theme-glass body:has(.admin-app),
html.theme-glass body:has(.admin-tiles-page) {
  position: relative;
  z-index: 1;
  background: transparent;
  color: var(--lg-ink);
  font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  text-shadow: 0 1px 0 rgb(255 255 255 / .7), 0 0 8px rgb(255 250 244 / .45);
}

html.theme-glass h1,
html.theme-glass h2,
html.theme-glass h3,
html.theme-glass h4 {
  font-family: Fraunces, "Iowan Old Style", Georgia, serif;
  color: var(--lg-ink);
}

html.theme-glass :is(.muted, .hint, .sub, .secure, .login-foot, .topb .sub, .fd-help, footer, .sample, .sample3) {
  color: var(--lg-muted);
}

html.theme-glass :is(.eyebrow, .verse cite, .login-foot a) {
  color: var(--lg-eyebrow);
}

html.theme-glass .ux-l2-fade { display: none; }
html.theme-glass .has-ux-l2 .topb { min-height: 0; }

/* Panels, 28px. Position is left alone on sticky and fixed chrome. */
html.theme-glass :is(
  .card, .wizard-card, .start-tile, .people-modal, dialog.fd-confirm, dialog.checkin-release,
  .checkin-confirm, .cal-v3-pop, .cal-v3, .admin-tile, .ux-ur-tile, .ad-tile, .mc-card,
  .pastor-hub-head, .cogband, .appband, .fd-preview, .fd-palette, .wa-block, .preview-frame,
  .hero, .phero, .published-section, footer, .side, .account-bar, .tabbar,
  .topbar, .drawer, .navbar .menu, nav.main.open, .people-cta, .tile, .jstrip, .legal-doc
) {
  background-color: var(--lg-fill);
  background-image: none;
  border: 1px solid var(--lg-line);
  border-radius: var(--lg-radius);
  box-shadow: var(--lg-shadow);
  color: var(--lg-ink);
  -webkit-backdrop-filter: var(--lg-blur);
  backdrop-filter: var(--lg-blur);
  transition-property: --glint, transform, box-shadow;
  transition-duration: .3s, .18s, .18s;
  transition-timing-function: linear, ease-out, ease-out;
}

html.theme-glass :is(
  .card, .wizard-card, .start-tile, .people-modal, .admin-tile, .ux-ur-tile, .ad-tile, .mc-card,
  .pastor-hub-head, .cogband, .appband, .fd-preview, .fd-palette, .wa-block, .preview-frame,
  .hero, .phero, .published-section, footer, .topbar, .people-cta, .tile, .jstrip,
  .cal-v3
) {
  position: relative;
  overflow: hidden;
}

/* Small glass, 18px, and pills. */
html.theme-glass :is(
  .banner, .errbox, .testmode, .fd-card, .fd-tile, .fd-palette-tile, .wa-kpi, .wa-ref, .fund,
  .cal-v3-day, .preview-banner, .kpi, .nmbox, .ai, .checkin-person, .video, .seg, .people-choice,
  .checkin-az-key, .burgerb, .jseg, .date, .account-avatar, .cogplate, .fd-control, .fd-hint,
  .fd-file-face, .fd-sign-face, .prayer-options, .prayer-match, .sign-preview
) {
  position: relative;
  overflow: hidden;
  background-color: var(--lg-fill);
  background-image: none;
  border: 1px solid var(--lg-line);
  border-radius: var(--lg-radius-sm);
  box-shadow: var(--lg-shadow);
  color: var(--lg-ink);
  -webkit-backdrop-filter: var(--lg-blur);
  backdrop-filter: var(--lg-blur);
  transition-property: --glint, transform, box-shadow;
  transition-duration: .3s, .18s, .18s;
}

/* Droplet buttons: dark glass, a bright top highlight, light text. Alpha stays high enough for WCAG AA on the lightest sky stop. */
html.theme-glass :is(.btn, button.btn, a.btn, .burgerb, a.signin) {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / .55);
  box-shadow: var(--lg-shadow);
  -webkit-backdrop-filter: var(--lg-blur);
  backdrop-filter: var(--lg-blur);
  color: #F7F4EE;
  text-shadow: 0 1px 0 rgb(8 24 18 / .45);
  background-color: rgb(23 48 42 / .9);
  background-image: linear-gradient(180deg, rgb(255 255 255 / .58) 0%, rgb(255 255 255 / .14) 28%, rgb(255 255 255 / 0) 48%);
  transition-property: --glint, transform, box-shadow;
  transition-duration: .3s, .18s, .18s;
}

html.theme-glass :is(.btn.light, a.signin, .burgerb) {
  background-color: rgb(36 71 61 / .84);
  background-image: linear-gradient(180deg, rgb(255 255 255 / .5) 0%, rgb(255 255 255 / .12) 26%, rgb(255 255 255 / 0) 46%);
  color: #F7F4EE;
  text-shadow: 0 1px 0 rgb(8 24 18 / .4);
}

/* Secondary droplet from the v3 mockup: light frost, dark ink. The shared rim and ::before highlight stay. */
html.theme-glass :is(.btn.ghost, .btn.sm.ghost) {
  background-color: rgb(255 255 255 / .12);
  background-image: linear-gradient(180deg, rgb(255 255 255 / .72) 0%, rgb(255 255 255 / .22) 30%, rgb(255 255 255 / 0) 52%);
  border-color: rgb(255 255 255 / .72);
  color: var(--lg-ink);
  text-shadow: none;
}

html.theme-glass :is(.btn.danger, .btn.clay) {
  background-color: rgb(142 46 40 / .92);
  background-image: linear-gradient(180deg, rgb(255 255 255 / .5) 0%, rgb(255 255 255 / .12) 28%, rgb(255 255 255 / 0) 48%);
  color: #FFF8F6;
  text-shadow: 0 1px 0 rgb(60 12 8 / .45);
}

html.theme-glass .btn.amber {
  background-color: rgb(122 62 18 / .92);
  background-image: linear-gradient(180deg, rgb(255 255 255 / .52) 0%, rgb(255 255 255 / .12) 28%, rgb(255 255 255 / 0) 48%);
  color: #FFF6EC;
  text-shadow: 0 1px 0 rgb(48 20 4 / .45);
}

html.theme-glass :is(
  input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]):not([type=color]):not([type=file]),
  select, textarea, .fd input:not([type=radio]):not([type=hidden]):not([type=checkbox]), .fd select, .fd textarea
) {
  background: var(--lg-fill-strong);
  border: 1px solid var(--lg-line);
  border-radius: var(--lg-radius-sm);
  box-shadow: var(--lg-shadow);
  color: var(--lg-ink);
  -webkit-backdrop-filter: var(--lg-blur);
  backdrop-filter: var(--lg-blur);
}

/* One box for every text-like control. An input with no type misses the app.css type=text padding and collapses to a sliver.
   The extra :not() list is only there so this beats .office-fields / .fd padding. */
html.theme-glass :is(
  input[type="text"],
  input:not([type]),
  input[type="tel"],
  input[type="email"],
  input[type="number"],
  input[type="url"],
  input[type="search"],
  input[type="date"],
  input[type="time"],
  input[type="datetime-local"],
  input[type="month"],
  select,
  textarea
):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]) {
  box-sizing: border-box;
  min-height: 44px;
  padding: 8px 14px;
  line-height: 1.4;
}
html.theme-glass :is(
  input[type="text"],
  input:not([type]),
  input[type="tel"],
  input[type="email"],
  input[type="number"],
  input[type="url"],
  input[type="search"],
  input[type="date"],
  input[type="time"],
  input[type="datetime-local"],
  input[type="month"],
  select
):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]) {
  height: 44px;
}
html.theme-glass textarea:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="range"]):not([type="color"]) {
  height: auto;
  min-height: 96px;
}
html.theme-glass .fd .fd-control :is(input, select):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]) {
  height: auto;
  min-height: 36px;
  padding: 4px 0;
  line-height: normal;
}
html.theme-glass .fd .fd-control input.fd-sr:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
html.theme-glass .fd .fd-control.fd-date input[type="date"]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]) {
  width: 1px;
  height: 1px;
  min-height: 0;
  max-height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  line-height: 1;
}

html.theme-glass ::placeholder { color: #4A4038; opacity: 1; }

/* A label belongs to the control under it. About 20px above the next label, 6px before its own field. */
html.theme-glass :is(.field, .fd-field) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
html.theme-glass :is(.field, .fd-field) > :is(label, .lbl, .fd-label, legend) {
  margin: 0;
}
html.theme-glass :is(.field + .field, .field + .row2, .field + .row3, .row2 + .field, .row2 + .row2, .row3 + .field, .row3 + .row2) {
  margin-top: 20px;
}
html.theme-glass :is(.row2, .row3, .form-grid, .filters, .fd-filters, .office-fields) > .field {
  margin-top: 0;
}
html.theme-glass :is(.form-grid, .fd-layout) {
  row-gap: 20px;
  align-items: start;
}
html.theme-glass :is(.row2, .row3) { align-items: start; }
@media (max-width: 800px) {
  html.theme-glass .row2 { row-gap: 20px; }
}
html.theme-glass .filters { row-gap: 20px; }
html.theme-glass .wizard-card .field { margin-bottom: 0; }
html.theme-glass .give-form .lbl { margin: 20px 0 6px; }

html.theme-glass :is(.pill, .pill.amber, .pill.clay, .pill.gray) {
  background-color: rgb(36 71 61 / .16);
  background-image: none;
  color: var(--lg-ink);
}

html.theme-glass .pill.amber { background-color: rgb(200 135 44 / .28); }
html.theme-glass .pill.clay { background-color: rgb(165 86 60 / .24); }

/* Specular, sheen, and cursor glare. */
html.theme-glass :is(
  .card, .wizard-card, .start-tile, .people-modal, dialog.fd-confirm, dialog.checkin-release,
  .checkin-confirm, .cal-v3-pop, .cal-v3, .admin-tile, .ux-ur-tile, .ad-tile, .mc-card,
  .pastor-hub-head, .cogband, .appband, .fd-preview, .fd-palette, .wa-block, .preview-frame,
  .hero, .phero, .published-section, footer, .side, .account-bar, .tabbar,
  .topbar, .drawer, .navbar .menu, .people-cta, .tile, .jstrip, .legal-doc,
  .banner, .errbox, .testmode, .fd-card, .fd-tile, .fd-palette-tile, .wa-kpi, .wa-ref, .fund,
  .cal-v3-day, .kpi, .nmbox, .people-choice, .checkin-az-key, .seg, .btn, .pill, .video, .burgerb, a.signin
)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  background-image:
    radial-gradient(ellipse 42% 36% at var(--mx) var(--my), rgb(255 255 255 / calc(.62 * var(--glint))), transparent 62%),
    linear-gradient(115deg, transparent 24%, rgb(255 255 255 / .32) 46%, rgb(255 255 255 / .08) 54%, transparent 70%),
    radial-gradient(130% 90% at calc(14% + (var(--mx) - 50%) * .18) calc(-8% + (var(--my) - 10%) * .12), rgb(255 255 255 / .82), transparent 46%);
  background-size: auto, 220% 100%, auto;
  background-position: 0 0, var(--scroll-sheen) 40%, 0 0;
  background-repeat: no-repeat;
}

html.theme-glass :is(
  .card, .wizard-card, .start-tile, .people-modal, dialog.fd-confirm, dialog.checkin-release,
  .checkin-confirm, .cal-v3-pop, .cal-v3, .admin-tile, .ux-ur-tile, .ux-ur-tile.ux-ur-strong,
  .ad-tile, .mc-card, .pastor-hub-head, .cogband, .appband, .fd-preview, .fd-palette, .wa-block,
  .preview-frame, .hero, .phero, .published-section, footer, .side, .account-bar,
  .tabbar, .topbar, .drawer, .navbar .menu, .people-cta, .tile, .jstrip, .legal-doc,
  .banner, .errbox, .testmode, .fd-card, .fd-tile, .fd-palette-tile, .wa-kpi, .wa-ref, .fund,
  .cal-v3-day, .kpi, .nmbox, .people-choice, .checkin-az-key, .seg, .btn, .pill, .video, .burgerb, a.signin
)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, rgb(255 255 255 / 1) 0%, rgb(255 255 255 / .8) 16%, rgb(255 255 255 / .22) 48%, rgb(180 200 220 / .12) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}

html.theme-glass :is(.btn, button.btn, a.btn, .burgerb, a.signin)::after {
  opacity: 0.95;
}

/* The sheen stays inside the card and paints under the words. List cards drop the circle so names are not washed out. */
html.theme-glass :is(
  .card, .wizard-card, .start-tile, .people-modal, dialog.fd-confirm, dialog.checkin-release,
  .checkin-confirm, .cal-v3-pop, .cal-v3, .admin-tile, .ux-ur-tile, .ad-tile, .mc-card,
  .pastor-hub-head, .cogband, .appband, .fd-preview, .fd-palette, .wa-block, .preview-frame,
  .hero, .phero, .published-section, footer, .side, .hdr, .navbar, .account-bar, .tabbar,
  .topbar, .drawer, .navbar .menu, .people-cta, .tile, .jstrip, .legal-doc,
  .banner, .errbox, .testmode, .fd-card, .fd-tile, .fd-palette-tile, .wa-kpi, .wa-ref, .fund,
  .cal-v3-day, .kpi, .nmbox, .ai, .checkin-person, .video, .seg, .people-choice,
  .checkin-az-key, .burgerb, .jseg, .date, .account-avatar, .cogplate, .fd-control, .fd-hint,
  .fd-file-face, .fd-sign-face, .prayer-options, .prayer-match, .sign-preview
) {
  isolation: isolate;
}

html.theme-glass :is(.card, .fd-card, .wizard-card):has(:is(.mini, .stat-line, table, .dir-row, .tree-row, .ai, .qr, ul, ol, .role-row))::before {
  content: none;
}

:where(html.theme-glass) :where(
  .card, .wizard-card, .start-tile, .people-modal, .admin-tile, .ux-ur-tile, .ad-tile, .mc-card,
  .pastor-hub-head, .cogband, .appband, .fd-preview, .fd-palette, .wa-block, .preview-frame,
  .hero, .phero, .published-section, footer, .side, .hdr, .navbar, .account-bar, .tabbar,
  .topbar, .drawer, .people-cta, .tile, .banner, .errbox, .btn, .pill, .seg, .people-choice,
  .legal-doc, .cal-v3, .fd-card, .fd-tile, .checkin-confirm
) > * {
  position: relative;
  z-index: 2;
}

/* Photo tiles keep their images and pick up the glass rim, specular, and a light scrim. */
html.theme-glass :is(.ux-ur-art, .ad-tile .art, .people-cta .art, .mc-art, .pastor-hub-art, .hero .bg) {
  z-index: 0;
  border-radius: inherit;
  -webkit-mask-image: none;
  mask-image: none;
  filter: saturate(1.08);
}

html.theme-glass :is(.ad-tile .scrim, .people-cta .scrim, .mc-scrim, .pastor-hub-scrim) {
  background: none;
}

html.theme-glass :is(.ux-ur-art, .ad-tile .art, .people-cta .art, .pastor-hub-art)::after,
html.theme-glass .hero .bg::after,
html.theme-glass .mc-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  padding: 0;
  border-radius: inherit;
  background: linear-gradient(to top, rgb(255 250 244 / .62) 0%, rgb(255 255 255 / .22) 34%, transparent 58%);
  -webkit-mask: none;
  mask: none;
}

html.theme-glass .mc-art::after {
  background: linear-gradient(to top, rgb(255 255 255 / .42), rgb(255 255 255 / .08) 36%, transparent 70%);
}

html.theme-glass .hero .bg::after {
  background:
    linear-gradient(100deg, rgb(255 247 238 / .9) 0%, rgb(255 247 238 / .66) 36%, rgb(255 255 255 / .22) 62%, rgb(255 255 255 / .06) 100%),
    linear-gradient(to top, rgb(255 255 255 / .42), transparent 48%);
}

html.theme-glass .ux-ur-tile.ux-ur-strong .ux-ur-art::after {
  background: linear-gradient(to top, rgb(255 250 244 / .72) 0%, rgb(255 255 255 / .3) 38%, transparent 64%);
}

html.theme-glass .mc-art-wrap--logo .mc-art {
  -webkit-mask-image: none;
  mask-image: none;
  filter: none;
}

html.theme-glass .mc-art-wrap--logo .mc-scrim,
html.theme-glass .mc-art--logo::after { background: none; }

html.theme-glass :is(.mc-art-wrap, .ux-ur-art, .pastor-hub-art) { z-index: 0; }
html.theme-glass :is(.ux-ur-copy, .pastor-hub-copy, .ad-tile .txt, .people-cta .txt, .mc-body, .hero .wrap) {
  position: relative;
  z-index: 2;
}

html.theme-glass :is(.ux-ur-label, .ux-ur-desc, .ux-ur-tile.ux-ur-strong .ux-ur-label, .ad-tile b, .ad-tile p.muted, .mc-title, .mc-sub) {
  color: var(--lg-ink);
}

html.theme-glass :is(.event-graphic, .event-thumb, .group-public-image, .published-section img, .published-section .grid img) {
  position: relative;
  z-index: 0;
  border-radius: var(--lg-radius-sm);
  border: 1px solid var(--lg-line);
  filter: saturate(1.06);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .86),
    inset 0 -56px 42px -18px rgb(255 255 255 / .4),
    0 8px 24px rgb(50 60 80 / .16);
}

html.theme-glass .hero {
  width: min(1160px, calc(100% - 32px));
  margin: 18px auto 0;
  min-height: 480px;
}

html.theme-glass :is(.hero h1, .hero p, .hero .eyebrow, .hero h1 em) { color: var(--lg-ink); }
html.theme-glass .hero h1 em { font-style: italic; }

html.theme-glass :is(.phero, .phero h1, .phero p, .phero a) { color: var(--lg-ink); }
html.theme-glass .phero { margin: 16px; padding: 36px 0 28px; }

html.theme-glass :is(.tile, .tile:nth-child(n), .tile b, .tile span, .tile small) {
  color: var(--lg-ink);
  background-image: none;
}

html.theme-glass :is(.appband, .appband h2, .appband p, .appband .eyebrow) { color: var(--lg-ink); }
html.theme-glass .appband { background-color: rgb(36 71 61 / .2); }

html.theme-glass :is(.topbar, .topbar .wrap, footer, footer h4, footer li, footer a, .sample, .sample b, .cogrow, .cogrow small) {
  color: var(--lg-ink);
}
html.theme-glass footer b { color: var(--lg-ink) !important; }
html.theme-glass :is(.navbar, .navbar .me, .navbar a, .side, .side a, .side .grp, .side .later, .dd > summary, .dd[open] > summary) {
  color: var(--lg-ink);
}
html.theme-glass .navbar {
  background-image: none;
  background-color: var(--lg-fill-strong);
}
html.theme-glass .side { background: var(--lg-fill); }
html.theme-glass :is(.side a.on, .side a.active, nav.main a.on, nav.main a.active, .account-nav a.active) {
  background: rgb(255 255 255 / .2);
  color: var(--lg-ink);
  box-shadow: inset 0 -2px 0 rgb(90 58 16 / .7);
}
html.theme-glass :is(.navbar img, .side .brand img, footer .rlogo, .login-top img) {
  filter: brightness(0) saturate(100%);
}

html.theme-glass .login-body { background: transparent; min-height: 100vh; }
html.theme-glass :is(.login-top, .login-top h1, .login-top p) { color: var(--lg-ink); }
html.theme-glass .login-card { background-color: var(--lg-fill-strong); }

html.theme-glass :is(.hdr, .account-bar) { background-color: var(--lg-fill-strong); }
html.theme-glass .account-mark,
html.theme-glass .account-mark-name,
html.theme-glass .account-mark-sub,
html.theme-glass .account-nav,
html.theme-glass .account-nav a,
html.theme-glass .account-who,
html.theme-glass .account-nav .account-signout button { color: var(--lg-ink); }

html.theme-glass :is(th, .dir-head, .tree-head) {
  background: rgb(255 255 255 / .2);
  color: var(--lg-ink);
}
html.theme-glass :is(.dir-row:hover, tr:hover td) { background: rgb(255 255 255 / .14); }
html.theme-glass :is(table, td, th) { color: var(--lg-ink); }

html.theme-glass .banner,
html.theme-glass .banner.pine {
  background: rgb(255 236 214 / .38);
  color: var(--lg-ink);
  border-color: var(--lg-line);
}
html.theme-glass .errbox {
  background: rgb(255 214 206 / .46);
  color: var(--lg-ink);
}
html.theme-glass .testmode { color: var(--lg-ink); }

html.theme-glass :is(.fd-palette, .fd-palette h2, .fd-palette h3, .fd-palette .fd-help, .fd .fd-palette .btn.ghost) {
  color: var(--lg-ink);
  background-color: var(--lg-fill);
}
html.theme-glass .fd-palette-tile {
  background: var(--lg-fill-strong);
  color: var(--lg-ink);
  border-color: var(--lg-line);
}
html.theme-glass :is(.fd-board, .fd-cell) {
  background: rgb(255 255 255 / .16);
  color: var(--lg-ink);
}
html.theme-glass .fd-ghost { background: var(--lg-fill-strong); color: var(--lg-ink); }

html.theme-glass .seg { background: var(--lg-fill); }
html.theme-glass .seg label { color: var(--lg-muted); }
html.theme-glass .seg label:has(input:checked) {
  background: rgb(255 255 255 / .42);
  color: var(--lg-ink);
}
html.theme-glass .amts button,
html.theme-glass .checkin-az-key,
html.theme-glass .burgerb,
html.theme-glass .yesno button,
html.theme-glass .start-tile button {
  background: var(--lg-fill-strong);
  color: var(--lg-ink);
  border: 1px solid var(--lg-line);
  box-shadow: var(--lg-shadow);
}
html.theme-glass :is(.amts button.on, .checkin-az-key.on) {
  background: rgb(36 71 61 / .9);
  color: #fff;
  text-shadow: none;
}
html.theme-glass .date {
  background: rgb(36 71 61 / .9);
  color: #fff;
  text-shadow: none;
}
html.theme-glass :is(.date .m, .date .dd) { color: #fff; text-shadow: none; }

html.theme-glass :is(.jstrip, .jseg) { background: var(--lg-fill); color: var(--lg-ink); }
html.theme-glass :is(.jseg .jsn, .jseg .jcnt) { color: var(--lg-ink); background: none; }
/* Office journey tiles keep their band color. The dark inset plate and the glass inner shadow are lifted so the label and count meet WCAG AA. */
html.theme-glass .jstrip {
  background-color: rgb(255 253 249 / .94);
  box-shadow: 0 8px 20px rgb(50 60 80 / .1);
}
html.theme-glass .jseg {
  color: #1A1612;
  box-shadow: inset 0 0 0 1000px rgb(255 253 249 / .42);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
html.theme-glass .jseg .jplate {
  background: rgb(255 253 249 / .94);
  box-shadow: none;
}
html.theme-glass :is(.jseg .jsn, .jseg .jcnt) {
  color: #1A1612;
  text-shadow: none;
}

html.theme-glass :is(.cnt, .ai.sf .cnt) {
  background: rgb(36 71 61 / .22);
  color: var(--lg-ink);
}
html.theme-glass :is(.drawer, .drawer.open, .drawer-signout) {
  background: var(--lg-fill-strong);
  color: var(--lg-ink);
}
html.theme-glass :is(.drawer a, .drawer .grp, .navbar .menu a) { color: var(--lg-ink); }

html.theme-glass :is(.people-overlay, dialog.people-overlay) { background: rgb(50 60 80 / .28); }
html.theme-glass :is(dialog.fd-confirm, dialog.checkin-release, .checkin-confirm, .cal-v3-pop, .people-modal) {
  background-color: var(--lg-fill-strong);
  color: var(--lg-ink);
}
html.theme-glass :is(.preview-banner, .cal-chip, .cal-chip.worship, .cal-chip.mdwk, .cal-chip.coffee) {
  color: var(--lg-ink);
  text-shadow: 0 1px 0 rgb(255 255 255 / .7);
}
html.theme-glass .cal-v3-day.has-art {
  background-image: linear-gradient(to top, rgb(255 255 255 / .55), rgb(255 255 255 / .12)), var(--cell-art);
}
html.theme-glass .cal-v3-day.has-art .num { color: var(--lg-ink); background: rgb(255 255 255 / .55); }

html.theme-glass .times .loc { background: rgb(255 255 255 / .16); }
html.theme-glass :is(.times .t .h, .times .loc b, .kpi b, .wa-num) { color: var(--lg-ink); }

html.theme-glass .lg-sweep { animation: lg-sweep .45s ease; }
@keyframes lg-sweep {
  0% { --mx: 6%; --glint: .15; }
  45% { --glint: 1; }
  100% { --mx: 94%; --glint: 0; }
}

html.theme-glass :focus-visible {
  outline: 3px solid rgb(180 140 90 / .85);
  outline-offset: 2px;
}
html.theme-glass :is(.btn, .card, .pill, input, select, textarea, a, button, summary, .admin-tile, .ux-ur-tile, .ad-tile, .mc-card):focus-visible {
  box-shadow: var(--lg-shadow), 0 0 0 3px rgb(255 253 249 / .9), 0 0 0 6px rgb(180 140 90 / .7);
}

html.theme-glass #blazor-error-ui {
  background: #FFFDF9;
  color: var(--lg-ink);
  text-shadow: none;
}

@media (max-width: 820px) {
  html.theme-glass { --lg-blur: blur(1px) saturate(140%) brightness(1.03); }
  html.theme-glass::before {
    background-image:
      radial-gradient(42% 32% at 20% 18%, rgb(180 196 230 / .4), transparent 70%),
      radial-gradient(48% 36% at 70% 28%, rgb(255 228 200 / .5), transparent 72%),
      radial-gradient(circle 90px at 78% 24%, rgb(243 212 180 / .45), transparent 72%),
      radial-gradient(circle 70px at 18% 70%, rgb(212 196 234 / .4), transparent 72%),
      radial-gradient(110% 40% at 50% 120%, rgb(132 154 142 / .55), transparent 60%),
      radial-gradient(circle at 50% 130%, transparent 48%, rgb(255 255 255 / .16) 49%, transparent 50.2%);
  }
}

@media (max-width: 600px) {
  html.theme-glass body:has(.tabbar) { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  html.theme-glass .tabbar {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    border-radius: 28px;
    background: var(--lg-fill-strong);
    border: 1px solid var(--lg-line);
    box-shadow: var(--lg-shadow);
    -webkit-backdrop-filter: var(--lg-blur);
    backdrop-filter: var(--lg-blur);
  }
  html.theme-glass .tabbar a,
  html.theme-glass .tabbar a.on { color: var(--lg-ink); }
  html.theme-glass .hero { width: calc(100% - 20px); margin-top: 10px; min-height: 420px; }
  html.theme-glass .phero { margin: 10px; }
  html.theme-glass nav.main.open {
    background: var(--lg-fill-strong);
    color: var(--lg-ink);
    border-radius: 0 0 28px 28px;
    -webkit-backdrop-filter: var(--lg-blur);
    backdrop-filter: var(--lg-blur);
  }
}

@media (max-width: 800px) {
  html.theme-glass :is(.drawer, .drawer.open, .drawer-signout) {
    background: var(--lg-fill-strong);
    -webkit-backdrop-filter: var(--lg-blur);
    backdrop-filter: var(--lg-blur);
  }
}

/* Open menus sit over the page. A backdrop-filter on the sticky bar would trap
   position:fixed and collapse the signed-in drawer to a thin empty strip, so the
   bar is a solid tint with no filter. The open panel is a solid sheet (see the
   floating-sheet rule at the end of this file). */
html.theme-glass :is(.hdr, .navbar) {
  background-color: #FFFDF9;
  background-image: none;
  overflow: visible;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
@media (max-width: 600px) {
  html.theme-glass .admin-app .navbar {
    background-color: #FFFDF9;
    box-shadow: 0 1px 0 rgb(43 38 34 / .08);
  }
  html.theme-glass .admin-app .navbar .nav-brand {
    z-index: 4;
    background-color: #FFFDF9;
    padding-right: 12px;
    margin-right: 6px;
    border-radius: 0 10px 10px 0;
  }
  html.theme-glass .admin-app .navbar .nav-brand img {
    position: relative;
    z-index: 1;
  }
}
html.theme-glass :is(nav.main.open, .drawer.open, .navbar .menu) {
  background-color: rgb(255 253 249 / .96);
  background-image: none;
  color: var(--lg-ink);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
}
html.theme-glass nav.main.open {
  position: absolute;
  z-index: 40;
  display: flex;
  flex-direction: column;
  height: auto;
  overflow: visible;
}
html.theme-glass nav.main.open a {
  display: block;
  min-height: 44px;
  color: #1A1612;
}
html.theme-glass .drawer.open {
  position: fixed;
  z-index: 90;
  left: 0;
  right: 0;
  top: 58px;
  bottom: auto;
  height: calc(100dvh - 58px);
  max-height: calc(100dvh - 58px);
  display: flex;
  flex-direction: column;
  overflow: auto;
}
html.theme-glass .drawer.open .drawer-links {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
html.theme-glass .drawer.open :is(a, .grp) {
  display: block;
  min-height: 44px;
  color: #1A1612;
}

@media (max-width: 640px) {
  html.theme-glass .card:has(table) { overflow: visible; }
  html.theme-glass table { display: block; width: 100%; }
  html.theme-glass table tr:has(th) {
    display: block;
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  html.theme-glass table tr {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin: 10px 12px;
    padding: 14px 14px 12px;
    border: 1px solid var(--lg-line);
    border-radius: 18px;
    background-color: rgb(255 255 255 / .16);
    box-shadow: var(--lg-shadow);
  }
  html.theme-glass table td {
    display: block;
    width: auto;
    padding: 0;
    border: 0;
    white-space: normal;
    overflow: visible;
    overflow-wrap: break-word;
  }
  html.theme-glass table td.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--lg-line);
  }
  html.theme-glass table td.row-actions::before { flex-basis: 100%; }

  html.theme-glass .dir-head { display: none; }
  html.theme-glass .dir-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin: 10px 12px;
    padding: 14px;
    border: 1px solid var(--lg-line);
    border-radius: 18px;
    background-color: rgb(255 255 255 / .16);
    box-shadow: var(--lg-shadow);
  }
  html.theme-glass .dir-end { display: block; text-align: left; }
  html.theme-glass :is(.dir-name b, .dir-id .hint, .dir-flex, .dir-end, .dir-mid) {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: 100%;
  }
  html.theme-glass :is(td, .dir-mid, .dir-flex, .dir-end)[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--lg-eyebrow);
  }

  html.theme-glass .stat-line { flex-wrap: wrap; align-items: flex-start; }
  html.theme-glass .fd-review :is(.seg, .cal-seg) {
    display: flex;
    flex-wrap: wrap;
    min-width: 0;
    width: 100%;
  }
  html.theme-glass .fd-review .seg form { flex: 1 1 100%; }
  html.theme-glass .fd-review .seg button { width: 100%; }

  html.theme-glass .checkin .card,
  html.theme-glass .checkin .pad,
  html.theme-glass .checkin .field { min-width: 0; max-width: 100%; }
  html.theme-glass .checkin-az { width: 100%; max-width: 100%; min-width: 0; }
  html.theme-glass .checkin input,
  html.theme-glass .checkin select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  html.theme-glass .checkin-child {
    flex-direction: column;
    align-items: stretch;
  }
  html.theme-glass .checkin-child > .checkin-tile,
  html.theme-glass .checkin .checkin-tile {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
    min-height: 132px;
  }
  html.theme-glass .checkin-child-actions { max-width: none; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html.theme-glass :is(
    .card, .btn, .pill, .hero, .ux-ur-tile, .ad-tile, .mc-card, footer, .banner
  )::before {
    background-image: radial-gradient(130% 90% at 14% -8%, rgb(255 255 255 / .45), transparent 46%);
    background-size: auto;
    background-position: 0 0;
  }
  html.theme-glass .lg-sweep { animation: none; }
  html.theme-glass :is(.card, .btn, .ad-tile, .ux-ur-tile, .mc-card) {
    transition: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  html.theme-glass :is(
    .card, .wizard-card, .start-tile, .people-modal, dialog.fd-confirm, dialog.checkin-release,
    .checkin-confirm, .cal-v3-pop, .cal-v3, .admin-tile, .ux-ur-tile, .ad-tile, .mc-card,
    .pastor-hub-head, .cogband, .appband, .fd-preview, .fd-palette, .wa-block, .preview-frame,
    .hero, .phero, .published-section, footer, .side, .hdr, .navbar, .account-bar, .tabbar,
    .topbar, .drawer, .navbar .menu, nav.main.open, .people-cta, .tile, .jstrip, .legal-doc,
    .banner, .errbox, .testmode, .fd-card, .fd-tile, .fd-palette-tile, .wa-kpi, .wa-ref, .fund,
    .cal-v3-day, .preview-banner, .kpi, .nmbox, .ai, .checkin-person, .video, .seg, .people-choice,
    .checkin-az-key, .jseg, .date, .account-avatar, .cogplate, .fd-control, .fd-hint,
    .fd-file-face, .fd-sign-face, .prayer-options, .prayer-match, .sign-preview,
    .login-card, .pill, dialog, .checkin-tile, input, select, textarea
  ) {
    background-color: #FAF6EF;
    background-image: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  html.theme-glass :is(.card, .login-card, .people-modal, .wizard-card, dialog, .checkin-confirm, .legal-doc, .published-section) {
    background-color: #FFFDF9;
  }
  html.theme-glass :is(.btn, button.btn, a.btn) {
    background-color: #17302A;
    background-image: none;
    color: #F7F4EE;
  }
  html.theme-glass :is(.btn.light, a.signin, .burgerb) {
    background-color: #31584C;
    background-image: none;
    color: #F7F4EE;
  }
  html.theme-glass :is(.btn.ghost, .btn.sm.ghost) {
    background-color: #FFFDF9;
    background-image: none;
    border-color: #E7DDCF;
    color: var(--lg-ink);
    text-shadow: none;
  }
  html.theme-glass :is(.btn.danger, .btn.clay) {
    background-color: #8E2E28;
    background-image: none;
    color: #FFF8F6;
  }
  html.theme-glass .btn.amber {
    background-color: #7A3E12;
    background-image: none;
    color: #FFF6EC;
  }
  html.theme-glass :is(table tr, .dir-row) {
    background-color: #FFFDF9;
    background-image: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  html.theme-glass :is(
    .card, .wizard-card, .start-tile, .people-modal, dialog.fd-confirm, dialog.checkin-release,
    .checkin-confirm, .cal-v3-pop, .cal-v3, .admin-tile, .ux-ur-tile, .ad-tile, .mc-card,
    .pastor-hub-head, .cogband, .appband, .fd-preview, .fd-palette, .wa-block, .preview-frame,
    .hero, .phero, .published-section, footer, .side, .hdr, .navbar, .account-bar, .tabbar,
    .topbar, .drawer, .navbar .menu, nav.main.open, .people-cta, .tile, .jstrip, .legal-doc,
    .banner, .errbox, .testmode, .fd-card, .fd-tile, .fd-palette-tile, .wa-kpi, .wa-ref, .fund,
    .cal-v3-day, .preview-banner, .kpi, .nmbox, .ai, .checkin-person, .video, .seg, .people-choice,
    .checkin-az-key, .jseg, .date, .account-avatar, .cogplate, .fd-control, .fd-hint,
    .fd-file-face, .fd-sign-face, .prayer-options, .prayer-match, .sign-preview,
    .login-card, .pill, dialog, .checkin-tile, input, select, textarea
  ) {
    background-color: #FAF6EF;
    background-image: none;
  }
  html.theme-glass :is(.card, .login-card, .people-modal, .wizard-card, dialog, .checkin-confirm, .legal-doc, .published-section) {
    background-color: #FFFDF9;
  }
  html.theme-glass :is(.btn, button.btn, a.btn) {
    background-color: #17302A;
    background-image: none;
    color: #F7F4EE;
  }
  html.theme-glass :is(.btn.light, a.signin, .burgerb) {
    background-color: #31584C;
    background-image: none;
    color: #F7F4EE;
  }
  html.theme-glass :is(.btn.ghost, .btn.sm.ghost) {
    background-color: #FFFDF9;
    background-image: none;
    border-color: #E7DDCF;
    color: var(--lg-ink);
    text-shadow: none;
  }
  html.theme-glass :is(.btn.danger, .btn.clay) {
    background-color: #8E2E28;
    background-image: none;
    color: #FFF8F6;
  }
  html.theme-glass .btn.amber {
    background-color: #7A3E12;
    background-image: none;
    color: #FFF6EC;
  }
  html.theme-glass :is(table tr, .dir-row) {
    background-color: #FFFDF9;
    background-image: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

html.theme-glass a.hub-back {
  background-color: rgb(255 253 249 / .96);
  color: #1A1612;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

/* Floating sheets, dialogs, popovers, and dropdowns are solid paper.
   Glass stays on cards and bars that sit in the page flow. */
html.theme-glass :is(
  .cal-v3-pop,
  dialog,
  [popover],
  .people-modal,
  .checkin-confirm,
  .person-overlay,
  .navbar .menu,
  nav.main.open,
  .drawer.open,
  .fd-confirm,
  .prayer-form
) {
  background-color: #FFFDF9 !important;
  background-image: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  color: #1A1612;
}
html.theme-glass :is(dialog, .cal-v3-pop, [popover])::backdrop {
  background-color: rgb(26 22 18 / .5) !important;
}
