/*
 * The page around the canvas. Compose draws everything inside #gymbuddy; this only has to make
 * the wait before it does look like the app, in the same two grounds the app itself uses.
 */
:root {
  color-scheme: light dark;
  --host-background: #ececf2;
  --host-content: #1b1c28;
  --host-accent: #7a6bd0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --host-background: #131420;
    --host-content: #e9e9ed;
    --host-accent: #9184d9;
  }
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--host-background);
  color: var(--host-content);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/*
 * A phone-shaped column, centred. The app is laid out for a phone, and stretched across a laptop
 * screen every row becomes a metre of empty card with a number at each end.
 */
#gymbuddy {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  width: min(100%, 480px);
  transform: translateX(-50%);
  isolation: isolate;
  touch-action: none;
}

.app-loader {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.875rem;
  padding: 0 2rem;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
}

.app-loader__ring {
  width: 2.5rem;
  height: 2.5rem;
  border: 0.2rem solid color-mix(in srgb, var(--host-accent) 25%, transparent);
  border-top-color: var(--host-accent);
  border-radius: 50%;
  animation: app-loader-spin 0.85s linear infinite;
}

@keyframes app-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-loader__ring {
    animation: none;
  }
}
