/* BHUTNI FUND — design system
   Dark, high-contrast, mobile-first. One accent (saffron) plus a calm surface ramp. */

:root {
  --bg: #0b1020;
  --bg-2: #111834;
  --surface: #16203f;
  --surface-2: #1d2a4f;
  --line: #2a3763;
  --text: #eef2ff;
  --muted: #9aa8d0;
  --accent: #ffb020;
  --accent-2: #ff8a3d;
  --ok: #35d07f;
  --bad: #ff5f6d;
  --radius: 14px;
  --shadow: 0 18px 40px rgba(0, 0, 0, .38);
  --max: 1180px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: radial-gradient(1100px 520px at 15% -12%, #22305e 0%, transparent 62%), var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--accent); color: #1a1200; padding: .6rem 1rem; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------------------------------------------------------------- boot */
.boot {
  position: fixed; inset: 0; z-index: 400;
  display: grid; place-content: center; gap: 1rem; justify-items: center;
  background: var(--bg);
  transition: opacity .45s ease, visibility .45s ease;
}
.boot.done { opacity: 0; visibility: hidden; }
.boot-mark { font-size: clamp(1.6rem, 6vw, 2.6rem); font-weight: 800; letter-spacing: .34em; color: var(--accent); }
.boot-bar { width: min(260px, 60vw); height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.boot-bar span {
  display: block; height: 100%; width: 40%; border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  animation: slide 1.1s ease-in-out infinite;
}
@keyframes slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(320%); } }
.boot-text { color: var(--muted); font-size: .9rem; }

/* inline skeleton loading */
.skeleton {
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.25s linear infinite;
  border-radius: var(--radius);
}
@keyframes shimmer { to { background-position: -120% 0; } }
.sk-line { height: 14px; margin: .5rem 0; }
.sk-card { height: 180px; }

/* -------------------------------------------------------------- topbar */
/* The backdrop-filter that used to live here is gone on purpose. A
   backdrop-filter on a sticky element is re-evaluated whenever its backdrop
   changes, and this site's backdrop is an animating water canvas — so it ran
   on every frame. Measured: it alone took the page from a locked 60fps to a
   12fps median, at any blur radius, on software rendering. The glass look is
   now carried by an opaque layered gradient plus a rim light, which reads the
   same and costs nothing. See the longer note next to the .topbar rule in the
   3D WATER LAYER section. */
.topbar {
  position: sticky; top: 0; z-index: 120;
  background: rgba(11, 16, 32, .92);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--text); font-weight: 800; }
.brand-mark { color: var(--accent); font-size: 1.2rem; }
.brand-name { letter-spacing: .12em; }
.brand-name em { font-style: normal; color: var(--accent); }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 1.6rem 0; color: var(--muted); font-size: .85rem; }
.footer p { margin: .2rem 0; }

/* ------------------------------------------------------------- floating */
/* Stacked notification feed, top-down.

   Structure: #floatLayer is a fixed, non-interactive band between the topbar
   and the bottom navigation. Cards flow from the top of the band downward —
   the newest message directly under the topbar, older ones below it — like a
   notification shade. The band's own edges are the stack budget (the probe
   measures it), so the feed can never cover the topbar, run behind the bar,
   or overlap the toasts on the right.

   The glass recipe is the same layered tint used by every other panel (see
   the shared read-glass section): --glass-rgb + --glass-a plus a sheen and a
   rim light, so the cards pick up the quality-rung translucency and the
   water reads through them. */
.float-layer {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(64px + 8px);             /* hangs from the sticky topbar (64px) */
  bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  z-index: 140;                      /* above .bottomnav (130), below toasts (500) and modal (450) */
  display: flex;
  flex-direction: column;            /* DOM order = visual order: newest first, top-down */
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  pointer-events: none;              /* the layer blocks nothing it does not own */
  contain: layout style;             /* stack changes never dirty page layout */
}

/* Hidden measuring stick: fills the band, so its height IS the stack budget
   (no CSS var to keep in sync). Absolute so it never joins the flex feed. */
.float-probe {
  position: absolute;
  inset: 0;
  width: 0;
  visibility: hidden;
  pointer-events: none;
}

.float-card {
  position: relative;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  width: min(340px, calc(100vw - 24px));
  max-height: var(--float-card-max, 46vh);
  border-radius: 16px;
  padding: .8rem .9rem .85rem;
  overflow: hidden;
  /* SOLID surface, not translucent glass: this feed floats above page text,
     so transparency made the underlying content bleed through and hurt
     readability. The late shared-glass rule (same specificity) used to win
     and re-translucentize the card — hence !important here. The specular
     sheen layer is dropped too, so the surface is one flat opaque colour. */
  background: #141d3c !important;
  border: 1px solid var(--edge);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .07) inset,
    0 18px 38px -14px rgba(0, 0, 0, .66),
    0 4px 14px -6px rgba(0, 0, 0, .5);
  animation: floatIn .48s var(--ease) both;
  transition: transform .32s var(--ease), opacity .3s ease, margin-bottom .32s var(--ease);
}

@keyframes floatIn {
  from { opacity: 0; transform: translate3d(0, -18px, 0) scale(.96); }   /* drops in from above */
  to   { opacity: 1; transform: none; }
}

/* Exit: JS adds .float-out on close, then removes the node on animationend.
   The card fades upward while its collapsed margin lets the cards below it
   glide up to close the hole. */
.float-card.float-out {
  opacity: 0;
  transform: translate3d(0, -14px, 0) scale(.94);
  pointer-events: none;
  margin-bottom: calc(-1 * var(--float-h, 100px) - 10px);
}

.float-head { display: flex; align-items: flex-start; gap: .5rem; min-width: 0; }
.float-title {
  margin: 0;
  font-size: .9rem;
  color: var(--accent);
  font-weight: 700;
  line-height: 1.35;
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  padding-right: .2rem;
}
.float-close {
  flex: 0 0 auto;
  margin-left: auto;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, .4);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 50%;
  line-height: 1;
  cursor: pointer;
  font-size: .85rem;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.float-close:hover { background: var(--bad); border-color: var(--bad); color: #fff; }

.float-body {
  margin: 0;
  font-size: .85rem;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 5.2rem;
  overflow: auto;
  scrollbar-width: thin;
}

/* Media previews keep their REAL aspect ratio (contain, never cropped) at a
   small card size; the full-size version lives in the lightbox on tap. */
.float-media {
  display: block;
  width: 100%;
  border-radius: 10px;
  margin: 0;
  cursor: pointer;
  object-fit: contain;
  background: var(--bg-2);
  border: 0;
  padding: 0;
  max-height: 240px;
  transition: filter .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.float-media:hover { filter: brightness(1.08); }
/* The whole media area is a tap target for the lightbox: the video element
   itself is click-transparent so the wrapper's handler always wins (native
   playback happens in the lightbox, which has real controls). */
.float-card video.float-media { pointer-events: none; }
.float-caption { margin: 0; font-size: .8rem; color: var(--muted); max-height: 3.6rem; overflow: auto; }

/* Landscape phones: the vertical budget is tiny (a 390px-tall viewport leaves
   ~230px after bar, paddings and safe areas). Media and captions shrink so
   even the largest card — video with controls — always fits under --float-max
   and the stack can never collapse to zero cards. */
@media (max-width: 760px) and (orientation: landscape) {
  .float-card { padding: .6rem .7rem; gap: .25rem; }
  .float-head { gap: .35rem; }
  .float-title { font-size: .82rem; }
  .float-media { max-height: 110px; }
  .float-card video.float-media { max-height: 110px; }
  .float-caption { font-size: .74rem; max-height: 1.2rem; -webkit-line-clamp: 1; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
  .float-body { max-height: 2.6rem; }
}

/* ---------------------------------------------------------------- main */
.main { flex: 1; padding: 2rem 0 4rem; }
.hero { text-align: center; padding: 2.5rem 0 2rem; }
.hero h1 { font-size: clamp(1.9rem, 6vw, 3.2rem); margin: 0 0 .6rem; letter-spacing: -.01em; }
.hero h1 span { color: var(--accent); }
.hero p { color: var(--muted); max-width: 56ch; margin: 0 auto 1.6rem; font-size: 1.05rem; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin: 2rem 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; text-align: center; }
.stat b { display: block; font-size: 1.6rem; color: var(--accent); }
.stat span { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .09em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1c1200; font-weight: 700; font-size: 1rem;
  border: 0; border-radius: 12px; padding: .85rem 1.6rem; cursor: pointer;
  text-decoration: none; transition: transform .15s, filter .15s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn:active { transform: none; }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }
.btn-lg { font-size: 1.1rem; padding: 1rem 2.2rem; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn-sm { padding: .45rem .8rem; font-size: .85rem; border-radius: 9px; }
.btn-danger { background: linear-gradient(135deg, #ff5f6d, #c92a45); color: #fff; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 2.2rem 0 1rem; flex-wrap: wrap; }
.section-title h2 { margin: 0; font-size: 1.3rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* forms */
label { display: block; font-size: .85rem; color: var(--muted); margin: .8rem 0 .3rem; font-weight: 600; }
input, select, textarea {
  width: 100%; background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; padding: .7rem .85rem; font: inherit;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
textarea { min-height: 110px; resize: vertical; }
.hint { font-size: .78rem; color: var(--muted); margin-top: .25rem; }
.error-text { color: var(--bad); font-size: .85rem; margin-top: .4rem; min-height: 1.1em; }
.row { display: flex; gap: .8rem; flex-wrap: wrap; }
.row > * { flex: 1 1 180px; }

/* media */
.media-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.media-thumb { width: 100%; height: auto; max-height: 260px; object-fit: contain; background: var(--bg-2); display: block; }
.media-body { padding: .9rem 1rem 1rem; flex: 1; display: flex; flex-direction: column; gap: .4rem; }
.media-kind { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 700; }
.media-body h3 { margin: 0; font-size: 1rem; }
.media-body p { margin: 0; font-size: .85rem; color: var(--muted); }
.media-text { white-space: pre-wrap; word-break: break-word; }
/* Whole card is the tap target (no per-card Open button): cursor + thumb cue. */
.media-card--link { cursor: pointer; }
.media-card--link .media-thumb { transition: filter .2s ease; }
.media-card--link:hover .media-thumb { filter: brightness(1.07); }
.media-card .media-text { font-size: .85rem; color: var(--muted); max-height: 9rem; overflow: auto; }
.media-actions { display: flex; gap: .4rem; margin-top: auto; padding-top: .6rem; flex-wrap: wrap; }
video, img.player { width: 100%; border-radius: 10px; display: block; background: #000; }

/* donors */
.donor-row {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem;
}
.donor-row .who { flex: 1 1 200px; }
.donor-row .who b { display: block; }
.donor-row .who small { color: var(--muted); }
.donor-row .amt { color: var(--accent); font-weight: 800; font-size: 1.05rem; }
.donor-row .idtag { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; color: var(--muted); }

.load-more { display: block; margin: 1.4rem auto 0; }

/* certificate */
.certificate {
  background: linear-gradient(160deg, #fffdf6, #f6ecd4);
  color: #241a05; border-radius: 16px; padding: 2.2rem 1.6rem; text-align: center;
  border: 6px double #b8912f; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.certificate::after {
  content: ""; position: absolute; inset: 10px; border: 1px solid rgba(184, 145, 47, .45); border-radius: 10px; pointer-events: none;
}
.cert-eyebrow { letter-spacing: .32em; font-size: .72rem; text-transform: uppercase; color: #8a6d1f; font-weight: 700; }
.certificate h2 { margin: .5rem 0 0; font-size: clamp(1.5rem, 5vw, 2.2rem); font-family: Georgia, "Times New Roman", serif; }
.cert-name { font-size: clamp(1.3rem, 4.5vw, 1.9rem); font-weight: 800; margin: 1.1rem 0 .2rem; font-family: Georgia, serif; }
.cert-meta { display: flex; justify-content: center; gap: 1.6rem; flex-wrap: wrap; margin: 1rem 0; font-size: .92rem; }
.cert-meta b { display: block; font-size: 1.05rem; }
.cert-id {
  display: inline-block; font-family: ui-monospace, Menlo, monospace;
  background: #241a05; color: #ffd76e; padding: .4rem .9rem; border-radius: 8px; letter-spacing: .12em; font-weight: 700;
}
.cert-foot { margin-top: 1.2rem; font-size: .75rem; color: #6b5a2c; }

/* admin */
.admin-shell { display: grid; gap: 1.2rem; }
.login-box { max-width: 400px; margin: 3rem auto; }
.admin-bar { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pill { font-size: .74rem; padding: .2rem .6rem; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.pill.ok { color: var(--ok); border-color: rgba(53, 208, 127, .5); }
.pill.bad { color: var(--bad); border-color: rgba(255, 95, 109, .5); }
.pill.warn { color: var(--accent); border-color: rgba(255, 176, 32, .5); }

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
tbody tr:hover { background: var(--surface-2); }
.table-wrap { overflow-x: auto; }

.upload-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.thumb-preview { max-width: 220px; border-radius: 10px; border: 1px solid var(--line); display: block; margin-top: .6rem; }

/* toasts + modal */
.toast-stack { position: fixed; right: 1rem; bottom: 1rem; z-index: 500; display: grid; gap: .5rem; max-width: min(360px, 92vw); }
.toast {
  background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: .7rem .9rem; box-shadow: var(--shadow); font-size: .88rem;
  animation: toastIn .3s ease both;
}
.toast.ok { border-left-color: var(--ok); }
.toast.bad { border-left-color: var(--bad); }
@keyframes toastIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

.modal { position: fixed; inset: 0; z-index: 450; display: grid; place-items: center; padding: 1rem; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3, 6, 16, .78); backdrop-filter: blur(3px); }
.modal-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 1.6rem; width: min(560px, 100%); max-height: 90vh; overflow: auto; box-shadow: var(--shadow);
}
.modal-card h2 { margin: 0 0 1rem; }
.modal-close {
  position: absolute; top: .7rem; right: .8rem; background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: 8px; width: 32px; height: 32px; cursor: pointer;
}
.modal-close:hover { color: var(--bad); border-color: var(--bad); }

/* ------------------------------------------------- media lightbox (preview) */
/* Full-screen preview for floating image/video cards. Sits above the modal
   (450) and toasts (500) because a preview opened from a floating card must
   cover everything. The backdrop is the dark translucent glass the modal
   already uses; the stage keeps the media at its natural aspect ratio. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 3vmin, 36px);
}
.lightbox[hidden] { display: none; }
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 16, .84);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.lightbox-stage {
  position: relative;
  margin: 0;
  max-width: min(1080px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  animation: lbIn .32s var(--ease) both;
}
.lightbox.is-closing .lightbox-stage { animation: lbOut .26s ease both; }
.lightbox.is-closing .lightbox-backdrop { opacity: 0; transition: opacity .26s ease; }
@keyframes lbIn {
  from { opacity: 0; transform: scale(.94); }
  to   { opacity: 1; transform: none; }
}
@keyframes lbOut {
  to { opacity: 0; transform: scale(.95); }
}
.lightbox-media {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Largest size that still fits while preserving the aspect ratio: the media
   is constrained by both axes and centered, never cropped. */
.lightbox-media img,
.lightbox-media video {
  display: block;
  max-width: calc(100vw - 2 * clamp(10px, 3vmin, 36px));
  max-height: calc(100dvh - 130px);
  width: auto;
  height: auto;
  border-radius: 12px;
  background: #000;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .85);
}
.lightbox-media pre {
  margin: 0;
  max-width: min(720px, 92vw);
  max-height: 70dvh;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  font: inherit;
  font-size: .9rem;
  color: var(--text);
}
.lightbox-caption {
  max-width: 100%;
  text-align: center;
  font-size: .88rem;
  color: var(--muted);
  margin: 0;
  max-height: 3.2rem;
  overflow: auto;
}
.lightbox-close {
  position: absolute;
  top: -14px;
  right: -6px;
  z-index: 2;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: rgba(10, 15, 32, .92);
  color: var(--text);
  border: 1px solid var(--edge);
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 26px -8px rgba(0, 0, 0, .8);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.lightbox-close:hover { background: var(--bad); border-color: var(--bad); color: #fff; }
/* Backdrop click-through: the close button and backdrop share [data-lb-close].
   Media area is excluded so clicks on the image/video itself do not close. */

/* Landscape phones: the preview shrinks toward the safe area and the close
   button moves inside the viewport corner so it is always reachable. */
@media (max-width: 760px) and (orientation: landscape) {
  .lightbox-close { top: 8px; right: 8px; position: fixed; }
  .lightbox-media img,
  .lightbox-media video { max-height: calc(100dvh - 96px); }
}

/* --- bottom navigation (app-style dock) ----------------------------------
   Mobile-first: a fixed, full-width Android-style bar. Glass tint matches the
   topbar recipe exactly; no backdrop-filter, for the same measured reason.
   Desktop (≥761px): the same element becomes a centered floating dock.
   The bar never captures pointer events outside itself, and every hit target
   is ≥48px on touch. */
.bottomnav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 130;                      /* above .topbar (120), below modal (450) */
  pointer-events: none;              /* the bar blocks nothing it does not own */
  padding-bottom: env(safe-area-inset-bottom, 0px);
  transition: transform .32s var(--ease), opacity .24s ease;
}

.bottomnav-inner {
  pointer-events: auto;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  align-items: stretch;
  background:
    linear-gradient(var(--sheen), var(--sheen)),
    linear-gradient(180deg, rgba(9, 17, 40, .97) 0%, rgba(11, 22, 48, .93) 62%, rgba(13, 30, 58, .90) 100%);
  border: 1px solid var(--edge);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  box-shadow:
    0 -12px 32px -16px rgba(0, 0, 0, .65),
    0 1px 0 rgba(255, 255, 255, .06) inset;
}

.bottomnav a {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  min-height: 56px;
  padding: 6px 4px;
  color: var(--muted);
  text-decoration: none;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  -webkit-tap-highlight-color: transparent;
  transition: color .18s ease;
}

.bottomnav a svg {
  width: 24px; height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform .22s var(--ease), filter .22s ease;
}

/* 3D pressed state: water.js already adds .tapped on touch for .btn elements;
   the expanding ring is drawn by the shared ::after ripple recipe. */
.bottomnav a:active svg { transform: scale(.9); }
.bottomnav a:active { color: var(--text); }

/* --- active state: accent dot + accent label/icon ------------------------- */
.bottomnav a::before {
  content: "";
  position: absolute;
  top: 6px; left: 50%;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transform: translateX(-50%) scale(0);
  transition: opacity .2s ease, transform .25s var(--ease);
}
.bottomnav a[aria-current="page"] { color: var(--accent); }
.bottomnav a[aria-current="page"]::before { opacity: 1; transform: translateX(-50%) scale(1); }
.bottomnav a[aria-current="page"] svg { filter: drop-shadow(0 0 6px rgba(255, 176, 32, .45)); }

/* Desktop: floating dock — same element, adapted size and spacing only. */
@media (min-width: 761px) {
  .bottomnav {
    left: 50%; right: auto;
    bottom: 18px;
    width: max-content;
    transform: translateX(-50%);
    padding-bottom: 0;
  }
  .bottomnav-inner {
    border-radius: 16px;
    border-bottom: 1px solid var(--edge);
  }
  .bottomnav a {
    min-height: 54px;
    padding: 10px 26px;
    flex-direction: row;
    gap: 9px;
    font-size: .9rem;
  }
  .bottomnav a svg { width: 20px; height: 20px; }
  .bottomnav a::before { top: 5px; left: 26px; transform: translateX(0) scale(0); }
  .bottomnav a[aria-current="page"]::before { transform: translateX(0) scale(1); }
}

/* --- landscape phones: compact single-row dock ---------------------------- */
@media (max-width: 760px) and (orientation: landscape) {
  .bottomnav a {
    flex-direction: row;
    min-height: 48px;
    padding: 8px 14px;
  }
  .bottomnav a span { display: none; }  /* icon-only; aria-label carries the name */
  .bottomnav a::before { top: 50%; transform: translate(6px, -50%) scale(0); }
  .bottomnav a[aria-current="page"]::before { transform: translate(6px, -50%) scale(1); }
}

.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin .7s linear infinite; display: inline-block; vertical-align: -4px;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  /* Compact shell: tighter rhythm on small screens. */
  .main { padding: 1.1rem 0 4.5rem; }
  .certificate { padding: 1.6rem 1rem; }
  .hero { padding: 1.5rem 0 1rem; }

  /* Content must always clear the fixed bottom bar, including the keyboard:
     when app.js adds .kb-open, the bar is hidden, so a modest static clearance
     plus the bar's own height is enough. */
  .main { padding-bottom: 5.4rem; }
  .footer { padding-bottom: 5.8rem; }
  .toast-stack { bottom: 5rem; }          /* toasts above the bottom bar */
  .modal { align-items: flex-end; }        /* sheet-style modal on phones */
  .modal-card { max-height: 84dvh; padding-bottom: calc(1.4rem + env(safe-area-inset-bottom, 0px)); }
  .modal-card { -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2); }
  #depth-haze { height: 58vh; }

  /* Floating feed on phones: the band between topbar and bar is the budget;
     the probe measures it directly. The per-card cap keeps one huge media
     item from eating the whole band. */
  .float-layer { --float-card-max: 38vh; }
  .float-card { width: min(340px, calc(100vw - 24px)); }
  .float-card video.float-media { max-height: 200px; }
  .lightbox-media img,
  .lightbox-media video { max-height: calc(100dvh - 120px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Layout stack used by the loading skeletons in the public frontend. */
.stack { display: grid; gap: 1rem; }

/* ==========================================================================
   3D WATER LAYER
   --------------------------------------------------------------------------
   Presentation only. index.html's existing markup, app.js and api.js are all
   untouched by this block; the engine (water.js) only ever adds a <canvas> to
   the #water-stage node that index.html already ships.

   Depth stack, back to front:
     #water-stage    fixed water body  (canvas, or the CSS gradient fallback)
     #water-caustic  drifting light net, plus the pointer lens (own layer)
     #depth-haze     scrolling murk — the parallax that sells the distance
     #hero-sheen     raking specular sheet (own layer, high rungs only)
     page content    read-glass panels floating in that water

   Rule of thumb followed throughout: a stacking context is only introduced
   where it buys depth. Anywhere a transform would have created one, the z-index
   is raised inside it instead, because a stacking context silently pins a
   sticky element and an overlay in the wrong order.
   ========================================================================== */

/* --- live values published by the engine -------------------------------- */
:root {
  /* Written by writeVars() in water.js. Real defaults here mean the page still
     looks right if the engine never starts at all. */
  --wr: 0deg;           /* the raking light angle, consumed by #hero-sheen */
  /* Registered so a change to it can be animated, which lets the parallax
     transform below run on the compositor instead of in style+layout. */
  --ws: 0;            /* scroll progress, 0..1 */
  --water-ramp: linear-gradient(180deg, rgb(7,12,30) 0%, rgb(13,26,58) 22%, rgb(17,46,82) 45%, rgb(22,74,108) 68%, rgb(30,104,130) 86%, rgb(22,58,96) 100%);

  /* Read-glass tokens. --glass-rgb carries the hue, --glass-a the alpha, so a
     single variable cross-fades the translucency of every panel on the site
     between quality rungs. */
  --glass-rgb: 9, 17, 38;
  --glass-a: .70;
  --edge: rgba(255, 255, 255, .09);
  --edge-hi: rgba(126, 214, 238, .40);
  --sheen: rgba(255, 255, 255, .075);

  --lift-1: -1px;
  --lift-3: -5px;
  --tilt: 0deg;

  --ease: cubic-bezier(.22, .8, .28, 1);
}

/* Registering the scroll-progress custom property is what makes the parallax
   transform animatable: an unregistered custom property change forces a style
   recalc on everything that reads it, a registered one does not. */
@property --ws {
  syntax: '<number>';
  inherits: true;
  initial-value: 0;
}

/* Blur is the most expensive thing on a mid-range Android GPU, so the glass
   gets more opaque — not less capable — as the ladder steps down. */
html[data-water="LOW"]  { --glass-a: .90; --edge: rgba(255, 255, 255, .07); }
html[data-water="MED"]  { --glass-a: .76; }
html[data-water="HIGH"] { --glass-a: .66; }

/* --- the water surface --------------------------------------------------- */
#water-stage {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  contain: strict;
  background-color: #070c1e;
  background-image: var(--water-ramp);
}

#water-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  /* Deliberately rendered small and stretched: a smooth upscale is the
     cheapest anti-banding filter there is. */
  image-rendering: auto;
  opacity: 0;
  transition: opacity .18s linear;
}
html:not([data-water="OFF"]) #water-canvas { opacity: 1; }

/* --- drifting caustic net + pointer lens --------------------------------- */
#water-caustic {
  position: absolute;
  left: -18%;
  top: -12%;
  width: 136%;
  height: 124%;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  opacity: 0;
  transition: opacity .6s var(--ease);
  /* Four wide bands rather than seven small ones: the same net of light at a
     fraction of the per-pixel gradient evaluation, and it scales down to the
     smaller layer this is now painted on. */
  background-image:
    radial-gradient(46% 26% at 16% 20%, rgba(150, 232, 255, .20), transparent 72%),
    radial-gradient(42% 24% at 74% 26%, rgba(146, 228, 255, .17), transparent 72%),
    radial-gradient(50% 28% at 36% 62%, rgba(178, 240, 255, .14), transparent 72%),
    linear-gradient(104deg, transparent 34%, rgba(198, 246, 255, .11) 50%, transparent 66%);
  animation: causticDrift 46s linear infinite;
  /* Deliberately NOT mix-blend-mode. A blend mode forces the compositor to read
     the backdrop back out before it can blend, and this layer sits over a
     full-viewport canvas that repaints every frame. Over a water ramp this dark,
     plain alpha compositing is visually indistinguishable from a screen blend —
     it was measured as the single most expensive remaining layer. The falloff is
     baked into the gradient rather than applied with a mask, for the same
     reason: a mask-image costs another composited layer. */
  background-color: transparent;
  -webkit-mask-image: none;
  mask-image: none;
}
html[data-water="MED"]  #water-caustic { opacity: .70; }
html[data-water="HIGH"] #water-caustic { opacity: .95; animation-duration: 34s; }
/* LOW rung: the caustic is a full-viewport animated layer that must be
   re-blended over the canvas every frame. On the hardware that sits at LOW
   (software rendering, weak GPUs) that blend is pure cost with the water
   barely visible behind an opaque glass anyway — so the layer goes away
   entirely and the depth read is carried by the ramp + haze alone. */
/* OFF rung: the element is invisible at opacity 0, but its 46s transform
   animation would still be composited every frame. Switch the animation off
   with the layer — same reasoning as the reduced-motion block. */
html[data-water="OFF"]  #water-caustic { display: none; }
html[data-water="LOW"]  #water-caustic { display: none; }

@keyframes causticDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1.02); }
  50%  { transform: translate3d(2.5%, 1.6%, 0) scale(1.06); }
  100% { transform: translate3d(0, 0, 0) scale(1.02); }
}

/* The lens of light that follows the finger, written as two custom properties
   on the layer that is already promoted for the caustic drift — so it costs
   no extra element and no extra animation. */
#water-caustic::after {
  /* Off unless the engine says the pointer is actually there (see
     writeLens() in water.js). A viewport-sized animated gradient that runs
     while idle is pure cost. */
  display: none;
  content: "";
  position: absolute;
  left: var(--lens-x, -999px);
  top: var(--lens-y, -999px);
  width: 34vmax;
  height: 34vmax;
  margin: -17vmax 0 0 -17vmax;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle,
    rgba(214, 248, 255, .16) 0%,
    rgba(150, 226, 250, .09) 34%,
    transparent 66%);
  animation: lensPulse .9s var(--ease) infinite alternate;
}
#water-caustic[data-lens="on"]::after { display: block; }
html[data-water="LOW"]  #water-caustic::after,
html[data-water="MED"]  #water-caustic::after,
html[data-water="OFF"] #water-caustic::after { display: none !important; }
@keyframes lensPulse { from { opacity: .3; } to { opacity: 1; } }

/* --- scroll parallax murk -------------------------------------------------
   Counter-translates against the scroll, so the water appears to hold still
   while the page moves over it. This one layer is what reads as depth. */
#depth-haze {
  position: fixed;
  left: 0;
  right: 0;
  top: -22vh;
  height: 66vh;
  z-index: -1;
  pointer-events: none;
  /* No permanent will-change here: it would pin a full-viewport composited
     layer for the whole session. A short transform transition promotes the
     layer only while the page is actually scrolling, which is when it is
     needed and the only time it is worth anything. */
  transform: translate3d(0, calc(var(--ws) * 26vh), 0);
  transition: transform .14s linear;
  background: linear-gradient(180deg, rgba(4, 9, 24, 0) 0%, rgba(4, 9, 24, .16) 34%, rgba(4, 9, 24, .72) 100%);
}

/* --- raking specular sheet ------------------------------------------------
   One composited element above the water, below the content, that the glass
   above it picks up as a moving highlight. */
#hero-sheen {
  position: fixed;
  left: 0;
  right: 0;
  top: -22vh;
  height: 56vh;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
  transform: translate3d(0, 0, 0) rotate(var(--wr));
  /* --wr is published on the root and consumed by one element, so changing it
     invalidates this subtree rather than the document. */
  /* Alpha falls to zero at both ends, so no mask layer is needed to soften it. */
  background: linear-gradient(178deg,
    transparent 0%,
    rgba(196, 240, 255, .03) 28%,
    rgba(226, 248, 255, .06) 48%,
    rgba(196, 240, 255, .025) 66%,
    transparent 100%);
}
html[data-water="LOW"] #hero-sheen { display: none; }

/* --- 3D on the shell ------------------------------------------------------
   The lift is a 1px translate, which buys the floating feel without the cost
   or the stacking-context side effects of a real perspective transform. The
   tilt is opt-in via the variable and ships at 0deg. */
.topbar,
.footer,
.main {
  transform: translate3d(0, var(--lift-1), 0);
}
.footer { --lift-1: 1px; }
.main { --lift-1: 0px; }

/* The nav gets a little more depth than the rest of the shell.
   It deliberately has NO backdrop-filter, and that is a measured decision
   rather than an omission. A backdrop-filter on a sticky element has to
   re-sample and re-blur its backdrop every time the backdrop changes, and the
   backdrop here is an animating water canvas — so the filter re-runs on every
   single frame. Measured in Chromium: 16px, 10px, 6px, 3px and even 0px blur
   all cost the same (the pass itself is the expense, not the radius), and any
   of them over an animating backdrop took the page from a locked 60fps to a
   12fps median with 700ms+ spikes, with the filter left as the only variable.
   A layered opaque gradient plus a rim light gives the same read at zero cost,
   and it is stable on hardware that has no GPU blur path at all. The one
   place real refraction is kept is .modal-card, which is shown rarely and sits
   over a static, blurred backdrop. */
.topbar {
  background:
    linear-gradient(var(--sheen), var(--sheen)),
    linear-gradient(180deg, rgba(9, 17, 40, .97) 0%, rgba(11, 22, 48, .93) 62%, rgba(13, 30, 58, .88) 100%);
  border-bottom: 1px solid rgba(126, 214, 238, .16);
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(150, 232, 255, .55), transparent);
  pointer-events: none;
}

/* --- shared read-glass surface --------------------------------------------
   One recipe applied to every panel, so the water shows *through* the UI
   rather than only around it. The glass is a tint plus a specular top edge
   and a rim light — see the note on .topbar for why there is no
   backdrop-filter here.

   The glass is deliberately a translucent tint, not a backdrop-filter. A
   backdrop-filter on a scrolling list of translucent panels costs O(1) blurred
   read-backs per frame and was measured here as the single most expensive
   thing on the page — it alone accounted for a 60fps → 9fps regression once
   the water underneath started animating. The water is a smooth, low-contrast
   gradient, so an alpha tint with a specular top edge and a rim light reads
   as glass for a fraction of the cost, and it scales to a long list. The two
   places that genuinely need real refraction — the sticky bar and the modal —
   keep theirs, because there are only ever one or two of them on screen. */
.card,
.stat,
.donor-row,
.media-card,
.toast,
.float-card,
.pill,
.skeleton {
  position: relative;
  background:
    linear-gradient(var(--sheen), var(--sheen)),
    rgba(var(--glass-rgb), var(--glass-a));
  border: 1px solid var(--edge);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .06) inset,
    0 14px 34px -14px rgba(0, 0, 0, .62),
    0 2px 10px -4px rgba(0, 0, 0, .5);
}

/* Real refraction, used sparingly — and only where the water behind is not
   continuously repainting. See the note on .topbar below. */
.modal-card {
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
}

.modal-card {
  position: relative;
  background:
    linear-gradient(var(--sheen), var(--sheen)),
    rgba(var(--glass-rgb), calc(var(--glass-a) + .12));
  border: 1px solid var(--edge);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .08) inset,
    0 30px 70px -24px rgba(0, 0, 0, .8);
}

/* The certificate is paper. It must not become a glass panel. */
.certificate {
  background: linear-gradient(160deg, #fffdf6, #f6ecd4);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-color: #b8912f;
}

/* --- lift on interaction ---------------------------------------------------
   Only transform / shadow / border are animated, so a hover never triggers a
   layout pass. */
.stat,
.donor-row,
.media-card,
.card {
  transition: transform .32s var(--ease), box-shadow .32s var(--ease), border-color .32s var(--ease);
}
.stat:hover,
.donor-row:hover,
.media-card:hover {
  transform: translate3d(0, var(--lift-3), 0);
  border-color: var(--edge-hi);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .09) inset,
    0 22px 44px -18px rgba(0, 0, 0, .7),
    0 0 0 1px rgba(126, 214, 238, .12),
    0 0 34px -6px rgba(126, 214, 238, .28);
}

/* --- glass ripple ---------------------------------------------------------
   A delegated listener in water.js marks the panel under a touch; only this
   ::after ring animates, so a tap on a donor row costs one composited layer and
   never relayouts the row's contents. */
.donor-row::after,
.media-card::after,
.stat::after,
.card::after,
.btn::after {
  content: "";
  position: absolute;
  left: var(--rx, 50%);
  top: var(--ry, 50%);
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(190, 244, 255, .55) 0%, rgba(126, 214, 238, .22) 40%, transparent 70%);
  opacity: 0;
  transform: scale(.2);
}
.btn::after {
  width: 14px; height: 14px; margin: -7px 0 0 -7px;
  background: radial-gradient(circle, rgba(255, 255, 255, .85) 0%, rgba(255, 236, 190, .35) 42%, transparent 72%);
}
.donor-row.tapped::after,
.media-card.tapped::after,
.stat.tapped::after,
.card.tapped::after,
.btn.tapped::after { animation: panelRipple .78s var(--ease) forwards; }
@keyframes panelRipple {
  0%   { opacity: .95; transform: scale(.2); }
  100% { opacity: 0;   transform: scale(26); }
}
html[data-water="LOW"] .donor-row::after,
html[data-water="LOW"] .media-card::after,
html[data-water="LOW"] .stat::after,
html[data-water="LOW"] .card::after,
html[data-water="LOW"] .btn::after { display: none; }

.btn { position: relative; overflow: hidden; }

/* --- typography depth cue -------------------------------------------------- */
.hero h1 { text-shadow: 0 2px 0 rgba(0, 0, 0, .28), 0 18px 40px rgba(4, 14, 32, .55); }
::selection { background: rgba(126, 214, 238, .35); color: #eafcff; }
input::placeholder { color: #7f8fbe; }

/* --- the boot screen sits on the water ------------------------------------- */
.boot {
  z-index: 400;
  background: linear-gradient(180deg, rgba(6, 10, 26, .82), rgba(6, 12, 30, .94));
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.boot-bar { border: 1px solid var(--edge); }

/* ==========================================================================
   MOTION
   Every animation below is transform/opacity only, and every one of them is
   switched off wholesale for reduced motion or for the LOW rung.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {

  .hero,
  .section-title,
  .stats,
  .grid,
  .stack,
  .card,
  .donor-row,
  .empty,
  .load-more {
    animation: surfaceIn .62s var(--ease) both;
  }
  .section-title { animation-delay: .04s; }
  .stats        { animation-delay: .08s; }
  .grid,
  .stack        { animation-delay: .12s; }
  .card         { animation-delay: .10s; }
  .donor-row,
  .empty        { animation-delay: .14s; }
  @keyframes surfaceIn {
    from { opacity: 0; transform: translate3d(0, 22px, 0) scale(.988); }
    to   { opacity: 1; transform: none; }
  }

  /* Stagger the tiles and rows so a long list assembles instead of landing. */
  .stats > * { animation: surfaceIn .6s var(--ease) both; }
  .stats > *:nth-child(1) { animation-delay: .10s; }
  .stats > *:nth-child(2) { animation-delay: .16s; }
  .stats > *:nth-child(3) { animation-delay: .22s; }
  .stats > *:nth-child(4) { animation-delay: .28s; }
  .donor-row:nth-child(2) { animation-delay: .18s; }
  .donor-row:nth-child(3) { animation-delay: .24s; }
  .donor-row:nth-child(4) { animation-delay: .30s; }
  .donor-row:nth-child(5) { animation-delay: .36s; }
  .donor-row:nth-child(6) { animation-delay: .42s; }

  .topbar { animation: glassIn .7s var(--ease) both; }
  @keyframes glassIn {
    from { opacity: 0; transform: translate3d(0, -14px, 0); }
    to   { opacity: 1; transform: translate3d(0, var(--lift-1), 0); }
  }

  /* Floating cards drift gently, pinned at the bottom by the flex feed. */
  .float-card { animation: floatIn .5s var(--ease) both, buoy 9s ease-in-out 1.2s infinite; }
  @keyframes buoy {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
    25%      { transform: translate3d(0, -5px, 0) rotate(-.35deg); }
    50%      { transform: translate3d(0, 1px, 0) rotate(.3deg); }
    75%      { transform: translate3d(0, -3px, 0) rotate(-.2deg); }
  }
  html[data-water="LOW"] .float-card { animation: floatIn .5s var(--ease) both; }
  html[data-water="OFF"] .float-card { animation: floatIn .5s var(--ease) both; }
}

/* Reduced motion: static water, no canvas, no drift. */
@media (prefers-reduced-motion: reduce) {
  #water-caustic,
  #water-caustic::after,
  #hero-sheen,
  .topbar,
  .main,
  .float-card { animation: none !important; }
  .float-card { transition: none; }   /* exits become instant removes */
  #water-canvas { display: none; }
  #water-stage { background-image: var(--water-ramp); }
}

/* ==========================================================================
   DEVICE TIERING
   Blur radius is trimmed on the hardware most likely to be struggling, and
   hover-dependent affordances get a pressed equivalent where hover does not
   exist. All of this is media-query tiering only — it never depends on JS.
   ========================================================================== */
/* --- bottom nav: keyboard, reduced motion, print -------------------------- */
/* Keyboard open (app.js toggles .kb-open on <html>): the bar slides away so it
   never covers the focused input, and modals lift clear of the keyboard. */
html.kb-open .bottomnav { transform: translate3d(0, 110%, 0); opacity: 0; pointer-events: none; }
html.kb-open .modal { align-items: flex-start; }

@media (prefers-reduced-motion: reduce) {
  .bottomnav, .bottomnav a, .bottomnav a svg, .bottomnav a::before { transition: none !important; }
}

@media print {
  .bottomnav { display: none !important; }
}

/* Header CTA: the donate action is always one tap away; it lives in the bar
   on phones and hides on desktop, where the water/brand spacing reads better
   without a second pill next to the nav links. */
.topbar-cta { margin-left: auto; padding: .5rem 1rem; }
@media (min-width: 761px) { .topbar-cta { display: none; } }

/* Footer clearance on desktop: the floating dock sits 18px above the bottom
   edge, so the footer text gets a matching clearance. */
@media (min-width: 761px) {
  .footer { padding-bottom: 100px; }
  .toast-stack { bottom: 92px; }       /* toasts clear the floating dock */

  /* Floating feed on desktop: wider cards, taller cap, dock-aware lower edge
     (the band ends above the floating dock). */
  .float-layer { bottom: 110px; --float-card-max: 46vh; }
  .float-card { width: 400px; }
}

/* Keyboard open: the bottom bar hides, so the band extends toward the lower
   edge and the cards cannot sit behind an open keyboard. */
html.kb-open .float-layer { bottom: 16px; }

@media (max-width: 420px) {
  .modal-card { -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px); }
}

@media (hover: none) {
  .btn, .bottomnav a, .donor-row, .media-card, .stat { transition-duration: .12s; }
  .donor-row:active, .media-card:active, .stat:active { transform: translate3d(0, var(--lift-1), 0) scale(.995); }
}

/* Print: the water is decoration and has no business on paper. */
@media print {
  #water-stage, #depth-haze, #hero-sheen, .topbar, .footer, .toast-stack, .float-layer, .lightbox, #boot { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .stat, .donor-row, .media-card { background: #fff; border: 1px solid #999; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
