.hope-boot-recovery {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  overflow: auto;
  color: #152126;
  background:
    radial-gradient(circle at 18% 16%, rgba(152, 225, 220, 0.48), transparent 38%),
    radial-gradient(circle at 86% 82%, rgba(247, 217, 141, 0.32), transparent 34%),
    #fbf8f0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.hope-boot-recovery[hidden] { display: none; }

html.hope-app-recovery,
html.hope-app-recovery body { overflow: hidden; }

.hope-boot-recovery__card {
  width: min(100%, 520px);
  padding: clamp(26px, 7vw, 42px);
  text-align: center;
  background: rgba(251, 248, 240, 0.96);
  border: 1px solid rgba(8, 118, 109, 0.24);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(21, 33, 38, 0.16);
}

.hope-boot-recovery__wordmark {
  display: block;
  width: min(100%, 270px);
  height: auto;
  margin: 0 auto 28px;
}

.hope-boot-recovery__signal {
  width: 18px;
  height: 18px;
  margin: 0 auto 20px;
  border-radius: 999px;
  background: #0f8f8b;
  box-shadow: 0 0 0 9px rgba(88, 206, 208, 0.2);
  animation: hope-boot-pulse 1.8s ease-in-out infinite;
}

.hope-boot-recovery h1 {
  margin: 0;
  font-family: "Iowan Old Style", Baskerville, Georgia, serif;
  font-size: clamp(30px, 8vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hope-boot-recovery__copy,
.hope-boot-recovery__status {
  margin: 16px auto 0;
  max-width: 40ch;
  color: #334349;
  font-size: 17px;
  line-height: 1.55;
}

.hope-boot-recovery__recovery-copy,
.hope-boot-recovery__actions { display: block; }

.hope-app-booting .hope-boot-recovery__recovery-copy,
.hope-app-booting .hope-boot-recovery__actions { display: none; }

.hope-app-booting .hope-boot-recovery__boot-copy { display: block; }
.hope-boot-recovery__boot-copy { display: none; }
.hope-boot-recovery__actions { margin-top: 28px; }

.hope-boot-recovery__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  margin-top: 12px;
  padding: 12px 18px;
  border: 2px solid #08766d;
  border-radius: 15px;
  color: #fbf8f0;
  background: #08766d;
  font: inherit;
  font-size: 17px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.hope-boot-recovery__button--secondary { color: #08766d; background: #fbf8f0; }

.hope-boot-recovery__button:focus-visible {
  outline: 4px solid #58ced0;
  outline-offset: 3px;
}

.hope-boot-recovery__button[aria-disabled="true"] { cursor: wait; opacity: 0.68; }

@keyframes hope-boot-pulse {
  50% { transform: scale(0.82); opacity: 0.72; }
}

@media (prefers-reduced-motion: reduce) {
  .hope-boot-recovery__signal { animation: none; }
}

@media (max-height: 650px) {
  .hope-boot-recovery {
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  }

  .hope-boot-recovery__card { padding: 18px; border-radius: 22px; }
  .hope-boot-recovery__wordmark { width: min(100%, 220px); margin-bottom: 14px; }

  .hope-boot-recovery__signal {
    width: 14px;
    height: 14px;
    margin-bottom: 14px;
    box-shadow: 0 0 0 7px rgba(88, 206, 208, 0.2);
  }

  .hope-boot-recovery h1 { font-size: 32px; }

  .hope-boot-recovery__copy,
  .hope-boot-recovery__status {
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.38;
  }

  .hope-boot-recovery__actions { margin-top: 16px; }

  .hope-boot-recovery__button {
    min-height: 48px;
    margin-top: 8px;
    padding: 9px 10px;
    font-size: 15px;
  }
}
