:root {
  --bg-top: #e0f2fe;
  --bg-bottom: #fde68a;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Baloo 2", "Comic Sans MS", "Chalkboard SE", system-ui, -apple-system, sans-serif;
  color: #0f172a;
  background: linear-gradient(170deg, var(--bg-top), var(--bg-bottom));
  background-attachment: fixed;
  -webkit-user-select: none;
  user-select: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.topbar {
  text-align: center;
  padding: 28px 16px 8px;
}

.logo {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3.5rem);
  font-weight: 800;
  letter-spacing: 1px;
  color: #0c4a6e;
  text-shadow: 0 2px 0 #fff, 0 4px 12px rgba(0, 0, 0, 0.12);
}

.logo-dots {
  font-size: 0.5em;
  vertical-align: middle;
  color: #f97316;
  letter-spacing: 3px;
}

main {
  padding: 8px 20px 40px;
}

.grid {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1100px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: clamp(16px, 3vw, 28px);
}

.tile {
  margin: 0;
}

.tile-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18), inset 0 2px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  overflow: hidden;
}

.tile-link:active {
  transform: scale(0.95);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

/* Gentle hover lift on laptops with a mouse */
@media (hover: hover) {
  .tile-link:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22), inset 0 2px 0 rgba(255, 255, 255, 0.3);
  }
}

.tile-art {
  font-size: clamp(5rem, 16vw, 8rem);
  line-height: 1;
  filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.18));
  animation: float 3.5s ease-in-out infinite;
}

.tile-name {
  margin-top: 14px;
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 800;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 1.3rem;
  color: #334155;
  padding: 40px;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

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