.pwa-install {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid #c9d4c8;
  border-radius: 9px;
  padding: 0.65rem 0.85rem;
  background: #f4f6ee;
  color: #24372e;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
}
.pwa-install:hover {
  background: #e8eee3;
}
.sidebar-bottom .pwa-install {
  width: 100%;
  margin-bottom: 0.9rem;
  font-size: 12px;
}
.login-card .pwa-install {
  margin-top: 1.25rem;
}
.pwa-install[hidden],
.pwa-update[hidden] {
  display: none;
}
.pwa-dialog {
  width: min(460px, calc(100% - 32px));
  border: 1px solid #dce2d8;
  border-radius: 18px;
  padding: 24px;
  color: #24372e;
  background: #fff;
  font-family: AutoSW, system-ui, sans-serif;
  box-sizing: border-box;
  box-shadow: 0 20px 80px #14271e26;
}
.pwa-dialog::backdrop {
  background: #14271e80;
}
.pwa-dialog h2 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
}
.pwa-dialog ol {
  padding-left: 1.25rem;
  line-height: 1.7;
}
.pwa-dialog p {
  line-height: 1.6;
}
.pwa-dialog button {
  margin-top: 0.75rem;
}
.pwa-update {
  position: fixed;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  width: min(520px, calc(100% - 32px));
  box-sizing: border-box;
  padding: 16px;
  border-radius: 14px;
  background: #24372e;
  color: #fff;
  box-shadow: 0 12px 40px #14271e33;
  font-family: AutoSW, system-ui, sans-serif;
}
.pwa-connection {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 85;
  padding: 0.8rem max(16px, env(safe-area-inset-right))
    max(0.8rem, env(safe-area-inset-bottom));
  background: #fff1d4;
  color: #674718;
  font:
    600 0.85rem/1.5 system-ui,
    sans-serif;
  text-align: center;
}
.pwa-connection[hidden] {
  display: none;
}
.pwa-update p {
  margin: 0.35rem 0 0.8rem;
  font-size: 0.85rem;
  line-height: 1.4;
}
.pwa-update .pwa-install {
  margin-right: 0.5rem;
}
.pwa-offline {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: #f4f6ee;
  color: #24372e;
  font-family: system-ui, sans-serif;
  padding: 24px;
  box-sizing: border-box;
}
.pwa-offline main {
  width: min(440px, 100%);
}
.pwa-eyebrow {
  margin-top: 2rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.pwa-offline h1 {
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.1;
  margin: 1rem 0;
  letter-spacing: -0.04em;
}
.pwa-offline p {
  line-height: 1.6;
}
.pwa-primary {
  display: inline-block;
  margin: 1.25rem 0;
  padding: 0.9rem 1.3rem;
  border-radius: 10px;
  background: #bd3d30;
  color: white;
  text-decoration: none;
  font-weight: 700;
}
.pwa-offline small {
  display: block;
  color: #667267;
  line-height: 1.6;
}
.pwa-install:focus-visible,
.pwa-primary:focus-visible {
  outline: 3px solid #659a6c;
  outline-offset: 3px;
}
@media (display-mode: standalone) {
  .topbar {
    padding-top: env(safe-area-inset-top);
  }
  .sidebar {
    padding-top: env(safe-area-inset-top);
  }
  .main-footer {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
}
