:root {
  --sky: #e8f6ff;
  --ink: #22334d;
  --soft: #5b6b8c;
  --sun: #ffd166;
  --pink: #ff7a7a;
  --card: #ffffff;
  --hero: #bfe6ff;
  --ghost: #e6ebf2;
  --wrong: #c0392b;
  color-scheme: light;
}

/* Night mode: follows the device unless the family picks with the moon button. */
:root[data-theme="dark"] {
  --sky: #0f1a2e;
  --ink: #eef3ff;
  --soft: #a9b6d3;
  --card: #1b2944;
  --hero: #23345a;
  --ghost: #2a3a5c;
  --wrong: #ff8a80;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Nunito", "Segoe UI", system-ui, "Noto Sans", "Noto Sans Devanagari", "Noto Sans Arabic", "Noto Sans SC", sans-serif;
  background: var(--sky);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.5;
}

.hero {
  text-align: center;
  padding: 32px 16px 24px;
  background: linear-gradient(180deg, var(--hero), var(--sky));
  position: relative;
}
.mascot { animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .mascot { animation: none; } }

h1 { font-size: 2.6rem; margin: 8px 0 0; }
.tagline { margin: 4px 0 16px; color: var(--soft); }

.langs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.langs button {
  min-height: 48px; padding: 8px 16px; border: 3px solid transparent;
  border-radius: 999px; background: var(--card); color: var(--ink);
  font: inherit; cursor: pointer;
}
.langs button[aria-pressed="true"] { border-color: var(--ink); font-weight: 700; }

main { max-width: 960px; margin: 0 auto; padding: 16px; }
h2 { font-size: 1.6rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 24px 16px; border: 0; border-radius: 24px; background: var(--card);
  color: var(--ink); font: inherit; text-align: center; cursor: pointer;
  box-shadow: 0 6px 0 rgba(34, 51, 77, .12);
}
.card:disabled { cursor: default; opacity: .85; }
.card .bubble {
  width: 96px; height: 96px; border-radius: 50%;
  display: grid; place-items: center; font-size: 2.4rem; font-weight: 800; color: #fff;
}
.card .title { font-weight: 700; font-size: 1.2rem; }
.card .soon { background: var(--sun); color: #22334d; border-radius: 999px; padding: 2px 12px; font-size: .9rem; }

.parents { margin-top: 32px; padding: 24px; background: var(--card); border-radius: 24px; }
.privacy { color: var(--soft); font-size: .95rem; }
.link { border: 0; background: none; color: var(--ink); text-decoration: underline; font: inherit; cursor: pointer; padding: 0; }

dialog { background: var(--card); color: var(--ink); border: 0; border-radius: 24px; padding: 24px; max-width: min(92vw, 900px); width: 100%; }
dialog::backdrop { background: rgba(34, 51, 77, .6); }
.frame { position: relative; aspect-ratio: 16 / 9; }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 12px; }

.big {
  min-height: 56px; min-width: 120px; margin-top: 16px; padding: 8px 24px;
  border: 0; border-radius: 999px; background: var(--pink); color: #fff;
  font: inherit; font-weight: 700; cursor: pointer;
}
.big.ghost { background: var(--ghost); color: var(--ink); }
.row { display: flex; gap: 12px; justify-content: center; }
#gate { max-width: 420px; text-align: center; }
#gate label { display: block; font-size: 1.3rem; }
#gate input { display: block; margin: 12px auto 0; width: 120px; font: inherit; font-size: 1.6rem; text-align: center; padding: 8px; border-radius: 12px; border: 2px solid var(--soft); background: var(--sky); color: var(--ink); }
.wrong { color: var(--wrong); }

.theme {
  position: absolute; top: 16px; inset-inline-end: 16px;
  width: 56px; height: 56px; border: 0; border-radius: 50%;
  background: var(--card); color: var(--ink); font-size: 1.6rem; cursor: pointer;
  box-shadow: 0 4px 0 rgba(34, 51, 77, .15);
}
