:root {
  --primary: #1d7359;
  --dark: #4c5270;
  --page: #f1f0f1;
  --card: #fdf6ea;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: #000;
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.branding {
  padding: 16px 20px;
  display: flex;
  align-items: baseline;
}
.branding .kidwiz { font-weight: 700; font-size: 18px; color: var(--primary); }
.branding .app { font-size: 14px; color: var(--dark); margin-left: 6px; }

main { flex: 1; display: flex; flex-direction: column; }

.center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
}
.message { margin: 16px 0 0; font-weight: 700; color: var(--dark); }
.alert {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border: 4px solid #9e9e9e;
  border-radius: 50%;
  color: #9e9e9e;
  font-size: 36px;
  font-weight: 700;
  line-height: 56px;
}

.spinner { display: flex; gap: 8px; }
.spinner span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 1s infinite ease-in-out;
}
.spinner span:nth-child(2) { animation-delay: 0.15s; }
.spinner span:nth-child(3) { animation-delay: 0.3s; }
@keyframes pulse { 0%, 80%, 100% { opacity: 0.2; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .spinner span { animation: none; } }

.viewer {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  touch-action: pan-y;
}
.viewer img {
  display: block;
  width: 100%;
  max-width: 500px;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 15px;
}

.dots { display: flex; justify-content: center; padding: 8px 0; }
.dot {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.dot::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ccc;
  transition: background-color 0.2s;
}
.dot[aria-current="true"]::after { background: var(--primary); }

.details { padding: 0 16px 24px; }
.card {
  max-width: 500px;
  margin: 0 auto;
  padding: 16px;
  background: var(--card);
  border-radius: 18px;
}
.name { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.description { font-size: 13px; color: var(--dark); white-space: pre-wrap; overflow-wrap: anywhere; }

/* Quiet, and out of the picture's way: it is there to be found, not read. */
.footer {
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 13px;
  color: #6b7280;
}

.footer a {
  color: inherit;
}

.footer p {
  margin: 3px 0;
}

