/* PWA (PLAN_FORUM.md §19): the offline page and the "add to home screen" sheet. */

/* ---- Offline page ---- */
.offline-body { background: var(--ground); min-height: 100vh; min-height: 100dvh; }
.offline { position: relative; overflow: hidden; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 1.5rem var(--gutter); }
.offline-card { position: relative; width: 100%; max-width: 26rem; text-align: center; }
.offline-card img { display: block; margin: 0 auto 1.5rem; height: auto; }
.offline-card h1 { margin: 0 0 0.75rem; font-size: clamp(1.9rem, 1.5rem + 2vw, 2.4rem); }
.offline-card p { margin: 0 auto 1.75rem; max-width: 22rem; color: var(--ink-2); }

/* ---- Install sheet: a quiet bottom sheet, not a modal ---- */
.install-sheet {
  position: fixed; inset: auto 0 0 0; z-index: 60; padding: 0 0.75rem calc(0.75rem + env(safe-area-inset-bottom));
  pointer-events: none;
}
.install-sheet[hidden] { display: none; }
.install-card {
  pointer-events: auto; position: relative; max-width: 30rem; margin-inline: auto; padding: 1.1rem 1.1rem 1rem;
  background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--orange);
  border-radius: 16px 16px 12px 12px; box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.16);
  animation: install-rise 0.28s ease-out;
}
@keyframes install-rise { from { transform: translateY(1.5rem); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .install-card { animation: none; } }
.install-head { display: flex; gap: 0.85rem; align-items: center; margin-bottom: 0.9rem; }
.install-head img { flex: none; width: 3.25rem; height: 3.25rem; border-radius: 12px; border: 1px solid var(--line); }
.install-card h2 { margin: 0 0 0.15rem; font-size: 1.3rem; line-height: 1.2; }
.install-card p { margin: 0; color: var(--ink-2); font-size: 0.97rem; line-height: 1.4; }
.install-steps { list-style: none; margin: 0 0 0.9rem; padding: 0; display: grid; gap: 0.55rem; }
.install-steps li { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.75rem; background: var(--ground); border-radius: 10px; font-size: 1rem; line-height: 1.3; }
.install-steps img { flex: none; width: 1.6rem; height: 1.6rem; }
.install-actions { display: flex; gap: 0.6rem; }
.install-actions .btn { flex: 1; text-align: center; min-height: 2.75rem; padding-inline: 1rem; }
.install-actions .btn-outline { flex: 1; }
.install-sheet [hidden] { display: none; }

/* header link on desktop, shown only when the browser can install */
.install-link { padding: 0 0.75rem; min-height: 2.75rem; border: 0; border-radius: 999px; background: none; font: 500 0.98rem/1 var(--text); color: #fff; cursor: pointer; white-space: nowrap; }
.install-link:hover { background: rgba(255, 255, 255, 0.12); }
.install-link[hidden] { display: none; }
@media (max-width: 760px) { .install-link { display: block; width: 100%; padding: 0.85rem 0; font: 600 1.25rem/1.2 var(--display); text-align: left; border-radius: 0; } }
