/* V51 — release-readiness polish */
:root{--v51-safe-bottom:env(safe-area-inset-bottom,0px)}
html{scroll-padding-top:7rem}
body.study-app{padding-bottom:calc(5rem + var(--v51-safe-bottom))}
.v51-offline{position:fixed;left:50%;bottom:calc(5.4rem + var(--v51-safe-bottom));transform:translate(-50%,140%);z-index:1200;background:#111d25;color:#f6e7b0;border:1px solid rgba(214,177,91,.45);border-radius:999px;padding:.6rem .9rem;font-size:.84rem;box-shadow:0 12px 30px rgba(0,0,0,.28);transition:transform .2s ease}
.v51-offline.show{transform:translate(-50%,0)}
.v51-install{display:none;position:fixed;right:1rem;bottom:calc(5.4rem + var(--v51-safe-bottom));z-index:1190;max-width:20rem;background:#0b202d;color:#fff;border:1px solid rgba(214,177,91,.45);border-radius:16px;padding:.85rem;box-shadow:0 12px 32px rgba(0,0,0,.32)}
.v51-install.show{display:block}.v51-install strong{display:block;color:#f0cf78;margin-bottom:.2rem}.v51-install p{margin:.15rem 0 .65rem;font-size:.86rem;line-height:1.4}.v51-install-actions{display:flex;gap:.45rem;flex-wrap:wrap}.v51-install button{border:1px solid rgba(255,255,255,.22);border-radius:999px;padding:.45rem .7rem;background:transparent;color:inherit;font:inherit;cursor:pointer}.v51-install button[data-install]{background:#d7b45e;color:#07131b;border-color:#d7b45e;font-weight:700}
@media(min-width:900px){body.study-app{padding-bottom:1rem}.v51-offline{bottom:1rem}.v51-install{bottom:1rem}}
@media(prefers-reduced-motion:reduce){.v51-offline{transition:none}}
