/* Scoped PWA UI; uses the existing white, paper and dark reader palettes. */
[data-hm-install][hidden], [data-hm-install-wrap][hidden], #hm-install-card[hidden], #hm-install-help [hidden] { display: none !important; }
.hm-install-button, .hm-pwa-action, .hm-pwa-quiet { font: inherit; cursor: pointer; }
.hm-install-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 8px 14px; border: 1px solid var(--reader-rule, #e1e5dc); border-radius: 24px; background: var(--reader-paper, #fff); color: var(--reader-text, #2d332c); font-size: 13px; white-space: nowrap; }
.hm-install-button svg { width: 18px; height: 18px; flex: none; }
.hm-install-button:hover { background: var(--reader-surface, #f7f8f4); }
/* Hide the retired mobile strip even in older host-cached HTML. */
.hm-install-mobile { display: none !important; }
#hm-install-card, #hm-install-help { box-sizing: border-box; color: var(--reader-text, #2d332c); background: var(--reader-paper, #fff); border: 1px solid var(--reader-rule, #e1e5dc); border-radius: 18px; font-family: inherit; line-height: 1.9; text-align: right; }
#hm-install-card { position: fixed; z-index: 45; inset-inline-start: 24px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); width: min(360px, calc(100vw - 32px)); padding: 24px; box-shadow: 0 12px 48px #0002; }
body.has-podcast-dock #hm-install-card { bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
#hm-install-card h2, #hm-install-help h2 { margin: 0 0 10px; padding: 0; font-size: 19px; line-height: 1.7; color: var(--reader-heading, #242c25); }
#hm-install-card p, #hm-install-help p { margin: 0 0 16px; font-size: 15px; color: var(--reader-copy, #454c43); }
.hm-pwa-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hm-pwa-action { min-height: 44px; border: 0; border-radius: 24px; padding: 9px 18px; background: var(--reader-action, #315b48); color: var(--reader-action-ink, white); font-size: 14px; }
.hm-pwa-quiet { min-height: 44px; border: 0; padding: 8px 10px; background: transparent; color: var(--reader-text, #2d332c); font-size: 14px; }
.hm-pwa-close { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-inline-start: auto; margin-block-end: 6px; border: 1px solid var(--reader-rule, #e1e5dc); border-radius: 50%; background: transparent; color: inherit; font-size: 26px; cursor: pointer; }
#hm-install-help { width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 22px 26px 28px; margin: auto; overflow-y: auto; }
#hm-install-help::backdrop { background: #101c19a6; }
#hm-install-help ol { margin: 0; padding-inline-start: 24px; font-size: 15px; }
#hm-install-help li { margin-block: 8px; }
.hm-pwa-icon { display: block; width: 56px; height: 56px; border-radius: 13px; margin-block-end: 14px; }
.hm-install-button:focus-visible, .hm-pwa-action:focus-visible, .hm-pwa-quiet:focus-visible, .hm-pwa-close:focus-visible { outline: 3px solid var(--reader-accent, #315b48); outline-offset: 3px; }
.hm-pwa-menu { margin-block: 16px; }
@media (max-width: 700px) {
  .header-actions > .hm-install-button { display: none; }
  .hm-install-mobile { display: flex; justify-content: flex-end; padding: 8px 18px; background: var(--reader-shell, #f3f4f0); border-bottom: 1px solid var(--reader-rule, #e1e5dc); }
  .hm-install-mobile .hm-install-button { font-size: 12px; padding: 5px 12px; min-height: 44px; }
  #hm-install-card { inset-inline-start: 16px; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); padding: 20px; }
  body.has-podcast-dock #hm-install-card { bottom: calc(188px + env(safe-area-inset-bottom, 0px)); }
}
@media (display-mode: standalone) {
  [data-hm-install-wrap], [data-hm-install], #hm-install-card { display: none !important; }
}
