/* Installation UI is scoped to rpwa-* so it can be shared by the landing and app. */
.rpwa-dialog,
.rpwa-update,
.rpwa-feedback {
  --rpwa-forest: #166451;
  --rpwa-ink: #173e35;
  --rpwa-muted: #586b62;
  --rpwa-paper: #fbfcf7;
  --rpwa-lime: #d5f77e;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--rpwa-ink);
  -webkit-text-size-adjust: 100%;
  box-sizing: border-box;
}
.rpwa-dialog *,
.rpwa-update *,
.rpwa-feedback * { box-sizing: border-box; }
.rpwa-dialog {
  width: min(470px, calc(100vw - 28px));
  max-height: min(88dvh, 900px);
  margin: auto;
  padding: 30px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #e1e8dc;
  border-radius: 27px;
  background: var(--rpwa-paper);
  box-shadow: 0 30px 90px #102b3550;
  text-align: left;
  z-index: 2147483002;
}
.rpwa-dialog::backdrop { background: #0b292bb3; backdrop-filter: blur(6px); }
.rpwa-dialog:not([open]),
.rpwa-update[hidden],
.rpwa-feedback[hidden],
.rpwa-manual-backdrop[hidden] { display: none !important; }
.rpwa-dialog-fallback { position: fixed; inset: 50% auto auto 50%; margin: 0; transform: translate(-50%, -50%); }
.rpwa-manual-backdrop { position: fixed; inset: 0; background: #0b292bb3; backdrop-filter: blur(6px); z-index: 2147483001; }
.rpwa-dialog h2 { margin: 8px 0 12px; max-width: 330px; font-size: 28px; line-height: 1.12; letter-spacing: -.8px; color: var(--rpwa-ink); font-weight: 750; }
.rpwa-dialog p { margin: 0 0 17px; font-size: 14px; line-height: 1.6; color: var(--rpwa-muted); }
.rpwa-dialog button,
.rpwa-dialog a,
.rpwa-update button { -webkit-tap-highlight-color: transparent; }
.rpwa-dialog button,
.rpwa-update button { cursor: pointer; font-family: inherit; }
.rpwa-dialog :focus-visible,
.rpwa-update :focus-visible { outline: 3px solid #26785f; outline-offset: 4px; }
.rpwa-dialog svg,
.rpwa-update svg { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.rpwa-close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #edf2e8; color: var(--rpwa-ink); }
.rpwa-close:hover { background: #e1ead8; }
.rpwa-mark { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; gap: 4px; margin-bottom: 22px; background: var(--rpwa-forest); border-radius: 16px; }
.rpwa-mark span { width: 5px; height: 18px; display: block; border-radius: 4px; background: var(--rpwa-lime); }
.rpwa-mark span:nth-child(2) { height: 30px; }
.rpwa-mark span:nth-child(3) { height: 24px; }
.rpwa-mark span:nth-child(4) { height: 14px; }
.rpwa-kicker { font-size: 10px; font-weight: 750; line-height: 1.6; letter-spacing: 1.7px; color: var(--rpwa-forest); display: block; }
.rpwa-platforms { display: flex; gap: 6px; padding: 4px; background: #edf1e7; border-radius: 14px; margin: 18px 0; }
.rpwa-platforms button { min-height: 44px; flex: 1; border-radius: 11px; border: none; background: transparent; color: #5d6d60; font-size: 14px; font-weight: 650; }
.rpwa-platforms button[aria-pressed="true"] { background: #fff; box-shadow: 0 2px 5px #173e3510; color: var(--rpwa-forest); }
.rpwa-dialog .rpwa-note { padding: 13px 15px; background: #edf3e5; border-radius: 12px; color: #3a5e49; font-size: 13px; }
.rpwa-steps { list-style: none; padding: 0; margin: 23px 0; display: grid; gap: 18px; }
.rpwa-steps li { display: flex; gap: 12px; align-items: flex-start; color: #42584e; font-size: 14px; line-height: 1.55; }
.rpwa-steps li > span { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: #eaf1df; color: var(--rpwa-forest); font-size: 12px; font-weight: 750; }
.rpwa-steps li > div { flex: 1; min-width: 0; padding-top: 3px; }
.rpwa-steps strong { color: #203e30; font-weight: 650; }
.rpwa-steps svg { width: 17px; height: 17px; margin: -3px 2px 0; }
.rpwa-button { min-height: 50px; width: 100%; padding: 13px 17px; display: flex; gap: 10px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 13px; font-size: 14px; line-height: 1.4; font-weight: 700; text-decoration: none; transition: background .15s ease; }
.rpwa-primary { color: #fff; background: var(--rpwa-forest); }
.rpwa-primary:hover { background: #10513f; color: #fff; }
.rpwa-secondary { color: var(--rpwa-ink); background: #edf2e6; border-color: #dce7d4; }
.rpwa-secondary:hover { background: #e3ecd8; }
.rpwa-button:disabled { opacity: .65; cursor: wait; }
.rpwa-link-group { margin: 22px 0; }
.rpwa-link-group label { display: block; margin-bottom: 7px; color: #4f6657; font-size: 12px; font-weight: 600; }
.rpwa-link-row { display: flex; min-width: 0; gap: 6px; }
.rpwa-link-row input { width: 0; flex: 1; min-width: 0; padding: 11px 12px; font: inherit; font-size: 16px; line-height: 1.4; border-radius: 11px; border: 1px solid #d5dfcd; background: #fff; color: #526353; text-overflow: ellipsis; }
.rpwa-copy { border: 1px solid #d5dfcd; border-radius: 11px; color: var(--rpwa-forest); background: #edf3e4; width: 46px; flex: 0 0 46px; display: grid; place-items: center; }
.rpwa-dialog .rpwa-desktop-note { margin: 14px 0 8px; font-size: 12px; text-align: center; }
.rpwa-dialog .rpwa-fine-print { margin: 13px 0 0; text-align: center; font-size: 11px; line-height: 1.5; color: #61705f; }
.rpwa-dialog .rpwa-dialog-feedback { margin: 12px 0 0; color: #325940; font-size: 13px; }
.rpwa-dialog-feedback:empty { display: none; }
.rpwa-update-icon { width: 46px; height: 46px; background: var(--rpwa-lime); display: grid; place-items: center; border-radius: 15px; margin: 0 0 20px; }
.rpwa-update-icon svg { width: 24px; height: 24px; }
.rpwa-actions { display: flex; gap: 9px; align-items: stretch; }
.rpwa-actions .rpwa-secondary { width: auto; flex: 0 0 auto; }
.rpwa-update { position: fixed; top: max(14px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: min(470px, calc(100vw - 28px)); display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 16px; border: 1px solid #dae5d0; border-radius: 16px; background: #f9fff0; box-shadow: 0 10px 35px #123c351f; z-index: 2147483000; }
.rpwa-update > div { min-width: 0; }
.rpwa-update strong { display: block; font-size: 13px; line-height: 1.35; font-weight: 750; }
.rpwa-update span { display: block; color: #5e6f5c; font-size: 11px; line-height: 1.45; margin-top: 3px; }
.rpwa-update-button { display: flex; align-items: center; justify-content: center; gap: 7px; flex: none; min-height: 44px; padding: 10px 13px; border: none; border-radius: 11px; background: var(--rpwa-forest); color: #fff; font-weight: 650; font-size: 12px; }
.rpwa-update-button svg { width: 16px; height: 16px; }
.rpwa-feedback { position: fixed; bottom: max(20px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: min(470px, calc(100vw - 28px)); padding: 14px 18px; border-radius: 13px; background: #163f34; color: #fff; box-shadow: 0 7px 28px #123b342e; font-size: 13px; line-height: 1.45; text-align: center; z-index: 2147483003; pointer-events: none; }
[data-pwa-status] { overflow-wrap: anywhere; }
[data-pwa-detail] { overflow-wrap: anywhere; }
@media (max-width: 390px) {
  .rpwa-dialog { padding: 25px 21px; border-radius: 23px; }
  .rpwa-dialog h2 { font-size: 26px; }
  .rpwa-actions { flex-direction: column; }
  .rpwa-update { gap: 10px; padding: 12px; }
  .rpwa-update-button { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .rpwa-button { transition: none; }
}
