/* ---- start-up and connection ----
   #boot covers the page for returning users while the app loads (see the
   session check in <head>), and says so when there's no connection. It only
   fades in after a moment, so a quick start shows nothing. */
#boot {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  background: var(--bg);
}
html[data-session] #boot,
#boot.show {
  display: flex;
}
/* As specific as the rule above, or it would keep the screen up. */
html[data-session] #boot.done,
#boot.done {
  display: none;
}
#boot > * {
  animation: fade-in 0.4s var(--ease) 0.3s both;
}
#boot.offline > * {
  animation-delay: 0s;
}
.boot-globe {
  width: 64px;
  height: 64px;
  margin-bottom: 6px;
  color: var(--accent);
}
/* The meridian narrows and widens: the globe turning. */
.boot-meridian {
  transform-box: fill-box;
  transform-origin: center;
  animation: boot-turn 2.4s ease-in-out infinite;
}
.boot-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: boot-dot 1.2s ease-in-out infinite alternate;
}
#boot.offline .boot-meridian,
#boot.offline .boot-dot {
  animation: none;
}
#boot.offline .boot-globe {
  color: var(--muted);
}
.boot-name {
  font-family: var(--serif);
  font-size: 1.5rem;
}
#boot-text {
  max-width: 300px;
}
#boot-retry {
  margin-top: 8px;
}
@keyframes boot-dot {
  to {
    transform: scale(1.3);
  }
}
@keyframes boot-turn {
  0%,
  100% {
    transform: scaleX(1);
  }
  50% {
    transform: scaleX(0.08);
  }
}

/* Lost the connection while using the app. */
#offline-note {
  position: fixed;
  z-index: 3500;
  bottom: calc(var(--tabbar-h) + 44px);
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.85rem;
  box-shadow: var(--shadow);
  animation: fade-in 0.3s var(--ease) both;
}
@media (min-width: 900px) {
  #offline-note {
    bottom: 24px;
  }
}
