.pwa-install-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--forest, #12372a);
  font: 600 12px/1 var(--body, "Figtree", sans-serif);
  cursor: pointer;
  text-decoration: none;
}

.pwa-install-button:hover {
  color: var(--accent, #c93632);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.pwa-install-button:active {
  text-decoration: underline;
}

.pwa-install-button svg {
  width: 17px;
  height: 17px;
}

.pwa-home-install {
  display: inline-flex;
  width: fit-content;
  min-height: 58px;
  margin-top: 14px;
  padding: 8px 16px 8px 10px;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(18, 55, 42, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--forest, #12372a);
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(18, 55, 42, 0.08);
}

.pwa-home-install img {
  width: 40px;
  height: 40px;
  border-radius: 9px;
}

.pwa-home-install span {
  display: grid;
  gap: 3px;
}

.pwa-home-install strong {
  font: 600 13px/1.2 var(--body, "Figtree", sans-serif);
}

.pwa-home-install small {
  color: var(--ink-soft, #65736c);
  font: 500 10px/1.2 var(--body, "Figtree", sans-serif);
}

.pwa-home-install:hover {
  border-color: rgba(18, 55, 42, 0.34);
  color: var(--forest, #12372a);
  transform: translateY(-2px);
}

.pwa-offline-banner,
.pwa-update-banner {
  position: fixed;
  z-index: 10000;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  display: flex;
  max-width: min(92vw, 520px);
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: #17372d;
  color: #fff;
  font: 500 13px/1.4 var(--body, "Figtree", sans-serif);
  text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transform: translateX(-50%);
}

.pwa-update-banner button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: #fff;
  color: #12372a;
  font: 600 12px var(--body, "Figtree", sans-serif);
  cursor: pointer;
}

.pwa-install-dialog {
  width: min(calc(100vw - 32px), 470px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #f7f6f2;
  color: #153a2d;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.3);
}

.pwa-install-dialog::backdrop {
  background: rgba(8, 26, 20, 0.64);
  backdrop-filter: blur(4px);
}

.pwa-install-dialog-inner {
  position: relative;
  padding: 28px;
}

.pwa-install-dialog h2 {
  margin: 0 42px 10px 0;
  color: #12372a;
  font: 600 26px/1.15 var(--display, "Sora", sans-serif);
  letter-spacing: -0.025em;
}

.pwa-install-dialog p {
  margin: 0;
  color: #66746e;
  font: 400 14px/1.65 var(--body, "Figtree", sans-serif);
}

.pwa-install-dialog ol {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: pwa-step;
}

.pwa-install-dialog li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 8px 0;
  border-top: 1px solid rgba(18, 55, 42, 0.12);
  counter-increment: pwa-step;
  font: 500 14px/1.45 var(--body, "Figtree", sans-serif);
}

.pwa-install-dialog li::before {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #12372a;
  color: #fff;
  content: counter(pwa-step);
  font-size: 12px;
}

.pwa-dialog-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #12372a;
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
}

.pwa-dialog-close:hover {
  background: rgba(18, 55, 42, 0.08);
}

.pwa-whatsapp-float {
  position: fixed;
  z-index: 9990;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  display: inline-flex;
  min-width: 54px;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  border-radius: 999px;
  background: #173c2f;
  color: #fff;
  font: 600 13px/1 var(--body, "Figtree", sans-serif);
  text-decoration: none;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
}

.pwa-whatsapp-float:hover {
  background: #0e2d23;
  color: #fff;
  transform: translateY(-2px);
}

.pwa-whatsapp-float svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

@media (max-width: 1100px) {
  .pwa-install-button {
    width: 44px;
    padding: 0;
  }

  .pwa-install-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .site-header .header-actions {
    gap: 4px;
  }

  .pwa-install-button {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
  }

  .pwa-install-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .pwa-home-install {
    width: 100%;
    justify-content: flex-start;
    background: #ffffff;
  }

  .pwa-whatsapp-float span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .pwa-whatsapp-float {
    min-width: 54px;
    padding: 0;
  }

  .pwa-offline-banner,
  .pwa-update-banner {
    bottom: calc(18px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 360px) {
  .site-header .brand-logo {
    height: 36px !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .pwa-install-button,
  .pwa-whatsapp-float {
    transition:
      transform 160ms ease,
      background-color 160ms ease,
      color 160ms ease;
  }
}
