/* REKAP app fit for the iPhone (WKWebView, viewport-fit=cover): keep content
   and fixed bars out from under the notch / Dynamic Island and the home bar.
   env(safe-area-inset-*) is 0 in ordinary browsers, so nothing moves there. */
:root {
    --rk-safe-top: env(safe-area-inset-top, 0px);
    --rk-safe-right: env(safe-area-inset-right, 0px);
    --rk-safe-bottom: env(safe-area-inset-bottom, 0px);
    --rk-safe-left: env(safe-area-inset-left, 0px);
}

body.rk-safe {
    padding-top: var(--rk-safe-top);
    padding-left: var(--rk-safe-left);
    padding-right: var(--rk-safe-right);
    padding-bottom: var(--rk-safe-bottom);
}
/* Pages with the bottom bar (was pb-28): room for the bar plus the home bar. */
body.rk-safe:has(.rkn-bar) { padding-bottom: calc(5.5rem + var(--rk-safe-bottom)); }
@media (min-width: 1024px) { body.rk-safe:has(.rkn-bar) { padding-bottom: 2rem; } }

/* An opaque strip behind the status bar so scrolled content never shows under it. */
body.rk-safe::before {
    content: "";
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--rk-safe-top);
    background: rgb(22 25 32);
    z-index: 45;
    pointer-events: none;
}

/* Sticky page headers stop below the status bar. */
body.rk-safe .sticky.top-0 { top: var(--rk-safe-top); }

/* Full-screen overlays keep their close buttons reachable. */
body.rk-safe #imageModal > div { padding-top: var(--rk-safe-top); padding-bottom: var(--rk-safe-bottom); }
body.rk-safe .fixed-alert { top: calc(0.25rem + var(--rk-safe-top)); }

/* {% icon %} (templatetags/rekap_icons.py): inline Lucide SVG sized like the old icon font. */
.lc { width: 1em; height: 1em; font-size: 24px; display: inline-block; vertical-align: -0.15em; flex: none; }
.rk-icon-wrap { display: inline-flex; align-items: center; }
