/* Install bar, update bar, iOS install sheet and installed-app tweaks. Tokens only (docs/UI.md). */
.pwa-bar { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 12px; width: min(560px, calc(100vw - 24px)); padding: 12px 14px; border: 1px solid var(--ink); border-radius: var(--r); background: var(--surface); color: var(--ink); }
@media (max-width: 767px) { .pwa-bar { bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom)); } }
.pwa-bar-mark { display: grid; place-items: center; width: 36px; height: 36px; flex: none; }
.pwa-bar-mark .i { width: 36px; height: 36px; stroke: none; }
.pwa-bar-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.pwa-bar-text b { font: 500 var(--fs-2) var(--serif); }
.pwa-bar-text span { color: var(--muted); font-size: 13px; }
.pwa-x { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--r); background: transparent; color: var(--muted); cursor: pointer; }
.pwa-x:hover { color: var(--ink); }
.pwa-x .i { width: 16px; height: 16px; }
.pwa-sheet { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; background: var(--scrim); }
.pwa-sheet-body { width: min(520px, 100%); padding: 24px 24px calc(24px + env(safe-area-inset-bottom)); border-radius: 10px 10px 0 0; background: var(--surface); color: var(--ink); border-top: 1px solid var(--ink); }
.pwa-sheet-body b { display: block; margin-bottom: 10px; font: 500 var(--fs-4) var(--serif); }
.pwa-sheet-body ol { margin: 0 0 18px; padding-left: 20px; color: var(--muted); line-height: 1.6; }
.pwa-key { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--line-strong); border-radius: 4px; font-size: 13px; color: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .pwa-bar { animation: pwa-in .25s ease-out; }
  .pwa-sheet-body { animation: pwa-sheet .25s ease-out; }
}
@keyframes pwa-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes pwa-sheet { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* installed: no rubber-band pull on the shell, no text selection on chrome, smooth page-to-page transitions */
@media (display-mode: standalone) {
  html, body { overscroll-behavior-y: none; }
  .masthead, .tabbar { -webkit-user-select: none; user-select: none; }
}
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }
