body { margin: 0; }

.startup-screen {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: #f6f7f3;
  color: #172d33;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.startup-content { width: 100%; max-width: 28rem; min-width: 0; }
.startup-icon { display: block; width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 16px; }
.startup-brand { margin: 0; color: #125a51; font-size: 1rem; font-weight: 700; line-height: 1.55; }
.startup-title { margin: .15rem 0 0; font-size: 2.25rem; font-weight: 760; letter-spacing: -.06em; line-height: 1.25; }
.startup-message {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .6rem;
  margin: 1.35rem 0 0;
  color: #536769;
  font-size: 1rem;
  line-height: 1.6;
}

.startup-spinner {
  box-sizing: border-box;
  flex: none;
  width: 1em;
  height: 1em;
  border: 2px solid #b6ccc5;
  border-top-color: #125a51;
  border-radius: 50%;
}

@media (prefers-reduced-motion: no-preference) {
  .startup-spinner { animation: startup-spin 1.1s linear infinite; }
}
@keyframes startup-spin { to { transform: rotate(360deg); } }

.startup-error { display: block; color: #873b27; }
.startup-retry {
  min-height: 48px;
  max-width: 100%;
  margin-top: 1.1rem;
  padding: .55em 1.15em;
  border: 1px solid #125a51;
  border-radius: 8px;
  background: #125a51;
  color: #fff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.startup-retry:focus-visible { outline: 3px solid #278778; outline-offset: 3px; }

/* Match the app's default phone type size while the main stylesheet loads. */
@media (max-width: 640px) {
  :root:not([data-text-size]):has(.startup-screen) { font-size: 112.5%; }
  .startup-brand, .startup-message { font-size: 1em; }
  .startup-title { font-size: 2.25em; }
}

.startup-content:has(noscript > p) > [role="status"] { display: none; }
