html,
body,
#root {
  margin: 0;
  min-height: 100dvh;
  background-color: #ebe8f5;
}

.app-boot-screen {
  box-sizing: border-box;
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  color: #1a1a2e;
  line-height: 1.5;
}

.app-boot-screen__status {
  margin: 0 0 1.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.app-boot-screen__title {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 8vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.app-boot-screen__copy {
  margin: 1em 0;
}

.app-boot-screen__links {
  margin: 1em 0;
}

.app-boot-screen__links a {
  color: #6c63ff;
  text-decoration: underline;
}

/* Cached app shell — painted before JS for returning / installed users. */
.app-boot-shell {
  box-sizing: border-box;
  display: none;
  min-height: 100dvh;
  flex-direction: column;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: #1a1a2e;
  background-color: #ebe8f5;
}

.app-boot-shell--content .app-boot-shell__body {
  padding-bottom: 1rem;
}

.app-boot-shell__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem 0.625rem;
}

.app-boot-shell__avatar {
  box-sizing: border-box;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(26, 26, 46, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #6c63ff;
}

.app-boot-shell__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-boot-shell__brand {
  margin: 0;
  min-width: 0;
  flex: 1;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.app-boot-shell__view {
  margin-left: 0.35rem;
  font-weight: 600;
  color: rgba(26, 26, 46, 0.8);
}

.app-boot-shell__view::before {
  content: "| ";
  font-weight: 600;
  color: rgba(107, 114, 128, 0.45);
}

.app-boot-shell__chip,
.app-boot-shell__bell,
.app-boot-shell__date,
.app-boot-shell__card,
.app-boot-shell__row {
  display: block;
  background: #d8d2ee;
  animation: app-shell-pulse 1.4s ease-in-out infinite;
}

.app-boot-shell__chip {
  width: 4.25rem;
  height: 1.15rem;
  border-radius: 9999px;
}

.app-boot-shell__bell {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
}

.app-boot-shell__body {
  box-sizing: border-box;
  flex: 1;
  padding: 0.25rem 1rem 5rem;
}

.app-boot-shell__date {
  width: 9.5rem;
  height: 1.5rem;
  margin: 0.25rem auto 0.85rem;
  border-radius: 9999px;
}

.app-boot-shell__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.app-boot-shell__card {
  height: 6.5rem;
  border-radius: 1.25rem;
}

.app-boot-shell__row {
  height: 3.15rem;
  margin-bottom: 0.5rem;
  border-radius: 1rem;
}

.app-boot-shell__nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  gap: 0.15rem;
  padding: 0.35rem 0.4rem calc(0.4rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(26, 26, 46, 0.05);
  background: #fff;
  font-size: 10px;
  font-weight: 600;
  color: #6b7280;
}

.app-boot-shell__nav span {
  flex: 1;
  text-align: center;
  padding: 0.4rem 0.15rem;
}

html[data-boot="shell"] .app-boot-marketing {
  display: none;
}

.app-boot-shell.is-active,
html[data-boot="shell"] .app-boot-shell {
  display: flex;
}

@keyframes app-shell-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-boot-shell__chip,
  .app-boot-shell__bell,
  .app-boot-shell__date,
  .app-boot-shell__card,
  .app-boot-shell__row {
    animation: none;
  }
}
