:root {
  --bg: #eef4ff;
  --card: #ffffff;
  --ink: #1e2a4a;
  --muted: #6b7593;
  --line: #dde5f5;
  --blue: #3b82f6;
  --green: #22c55e;
  --yellow: #facc15;
  --pink: #ec4899;
  --red: #ef4444;
  --wall: #4f46e5;
  --radius: 18px;
  --font: 'Fredoka', system-ui, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  /* Tablet-friendly: no grey tap flash, no double-tap zoom, no text selection on long press. */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
select { -webkit-user-select: auto; user-select: auto; }

a { color: inherit; }

.btn {
  font: inherit;
  font-weight: 600;
  font-size: 1.05rem;
  border: none;
  cursor: pointer;
  border-radius: 14px;
  padding: 12px 20px;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .15);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .15); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.btn.green { background: var(--green); }
.btn.pink { background: var(--pink); }
.btn.light { background: #e8eefc; color: var(--ink); }

/* ---------- Inicio ---------- */
.home { max-width: 980px; margin: 0 auto; padding: 40px 16px 60px; }

.hero { text-align: center; }
.hero .logo { font-size: 4.5rem; display: inline-block; animation: float 3s ease-in-out infinite; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 3.8rem); margin: 4px 0 0; color: var(--wall); }
.hero p { font-size: 1.25rem; color: var(--muted); margin: 8px 0 0; }
@keyframes float { 50% { transform: translateY(-10px); } }

.section-title { font-size: 1.7rem; text-align: center; margin: 44px 0 18px; }

.ideas {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 26px;
  display: grid;
  gap: 14px;
  box-shadow: 0 4px 0 var(--line);
}
.idea { display: flex; gap: 14px; align-items: center; font-size: 1.12rem; line-height: 1.4; }
.idea .emoji { font-size: 2rem; flex: none; }

.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.game-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--line);
  border-top: 8px solid var(--blue);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform .15s;
}
@media (hover: hover) { a.game-card:hover { transform: translateY(-4px); } }
a.game-card:active { transform: scale(.98); }
.game-card .icon { font-size: 2.8rem; }
.game-card h3 { margin: 0; font-size: 1.5rem; }
.game-card p { margin: 0; color: var(--muted); line-height: 1.4; }
.game-card .cta { margin-top: auto; padding-top: 10px; font-weight: 700; color: var(--blue); font-size: 1.15rem; }
.game-card.pink { border-top-color: var(--pink); }
.game-card.pink .cta { color: var(--pink); }
.game-card.green { border-top-color: var(--green); }
.game-card.green .cta { color: #16a34a; }
.game-card .learn { align-self: flex-start; background: #eef2ff; color: var(--wall); border-radius: 999px; padding: 3px 12px; font-size: .95rem; }

.credits {
  margin: 50px auto 0;
  max-width: 520px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 4px 0 var(--line);
  border-top: 8px solid #0b7a3b; /* Colegio Lagomar green */
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.credits img { flex: none; width: 96px; height: 96px; object-fit: contain; }
.credits p { margin: 0; }
.credits .by { color: var(--muted); font-size: 1rem; }
.credits .names { font-size: 1.35rem; font-weight: 700; line-height: 1.25; margin: 2px 0 4px; }
.credits .school { font-size: 1.1rem; }
.credits .school b { color: #0b7a3b; }
