/* Until the app draws itself. The ground is the bottom bar's: it shows under
   the page on an iPhone, around the home indicator. */
:root {
  color-scheme: light dark;
  --ground: #ffffff;
  --ink: #1d1f1a;
  --muted: #5f645a;
  --track: #e9ebe6;
  --brand: #3d5f19;
  --on-brand: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1b1c1f;
    --ink: #f1f2ee;
    --muted: #a3a79d;
    --track: #303236;
    --brand: #a9c77a;
    --on-brand: #16180f;
  }
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--ground);
  overscroll-behavior: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

#boot {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  transition: opacity 0.2s ease;
}

#boot.leaving {
  opacity: 0;
  pointer-events: none;
}

#boot picture {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#boot img {
  display: block;
  -webkit-user-select: none;
  user-select: none;
}

#boot-progress {
  position: absolute;
  bottom: calc(15% + 24px);
  left: 50%;
  width: 160px;
  height: 4px;
  margin-left: -80px;
  border-radius: 2px;
  background: var(--track);
  overflow: hidden;
}

#boot-progress i {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 2px;
  background: var(--brand);
  animation: boot-slide 1.4s ease-in-out infinite;
}

@keyframes boot-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

@media (prefers-reduced-motion: reduce) {
  #boot-progress i { animation-duration: 4s; }
}

#boot-message {
  position: absolute;
  right: 24px;
  bottom: max(32px, 8%);
  left: 24px;
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
}

#boot-message h1 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.3;
  font-weight: 600;
}

#boot-message p {
  margin: 0 0 20px;
  color: var(--muted);
}

#boot-message button {
  min-height: 50px;
  padding: 0 28px;
  border: 0;
  border-radius: 25px;
  background: var(--brand);
  color: var(--on-brand);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

/* Under the message the mark moves up, so a small phone shows both. */
#boot.says picture {
  top: 34%;
}
