/* Estilos comunes de la suite de minijuegos */
:root {
  --bg: #fff7ec;
  --card: #ffffff;
  --ink: #3b2f5c;
  --muted: #8a7fa8;
  --accent: #ff7aa2;
  --accent2: #6cc4ff;
  --green: #7bd88f;
  --yellow: #ffd23f;
  --cell: #fdf3ff;
  --cell-border: #eadcf5;
  --shadow: 0 6px 0 rgba(59,47,92,.12);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  background-image: radial-gradient(#ffe3c2 2px, transparent 2px);
  background-size: 28px 28px;
  color: var(--ink);
  font-family: "Fredoka", "Comic Sans MS", system-ui, sans-serif;
  user-select: none; -webkit-user-select: none;
  overflow-x: hidden;
}
button { font-family: inherit; cursor: pointer; border: none; color: inherit; }

.screen {
  display: none; min-height: 100vh; min-height: 100dvh; flex-direction: column; align-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}
.screen.active { display: flex; }

.title { font-size: clamp(36px, 9vw, 64px); margin: 12px 0 4px; text-align: center; line-height: 1.05; }
.title span:nth-child(odd) { color: var(--accent); }
.title span:nth-child(even) { color: var(--accent2); }
.subtitle { color: var(--muted); font-size: 20px; margin-bottom: 20px; text-align: center; }

.topbar { width: 100%; max-width: 620px; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.round-btn {
  background: var(--card); width: 54px; height: 54px; border-radius: 50%; font-size: 26px; box-shadow: var(--shadow);
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.round-btn:active, .btn:active, .card-btn:active, .pill:active { transform: translateY(3px); }
.suite-back {
  align-self: flex-start; background: var(--card); color: var(--ink); text-decoration: none;
  border-radius: 16px; padding: 8px 14px; font-size: 18px; font-weight: 600; box-shadow: var(--shadow);
}

.btn { display: block; width: 100%; padding: 14px; border-radius: 20px; font-size: 24px; font-weight: 700; margin-top: 10px; box-shadow: var(--shadow); color: #fff; }
.btn.primary { background: var(--accent); }
.btn.secondary { background: var(--accent2); }
.btn.ghost { background: #eee6f6; color: var(--ink); }

.card-btn {
  background: var(--card); border-radius: 24px; padding: 18px 10px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; gap: 6px; border: 3px solid transparent;
  text-decoration: none; color: var(--ink);
}
.card-btn.selected { border-color: var(--accent); background: #fff0f5; }

.pill { background: var(--card); border-radius: 18px; padding: 10px 16px; font-size: 20px; font-weight: 600; box-shadow: var(--shadow); border: 3px solid transparent; }
.pill.selected { border-color: var(--accent); background: #fff0f5; }

.overlay { position: fixed; inset: 0; background: rgba(59,47,92,.45); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 10; }
.overlay.active { display: flex; }
.pop-card { background: var(--card); border-radius: 32px; padding: 28px 24px; text-align: center; max-width: 400px; width: 100%; animation: pop .5s; }
@keyframes pop { 50% { transform: scale(1.12); } }

.confetti { position: fixed; top: -40px; font-size: 28px; pointer-events: none; z-index: 20; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
