/* babyweb — one stylesheet for the whole site. No external fonts or network. */
:root {
  --ink: #22303f;
  --muted: #5d6f83;
  --paper: #fffdf6;
  --line: #e3e9f1;
  --c1: #ff8a3d;
  --c2: #2fbfa0;
  --c3: #7a6cff;
  --c4: #ff5d8f;
  --c5: #ffc53d;
  --c6: #4fa3ff;
  --r: 18px;
  --shadow: 0 5px 0 rgba(34, 48, 63, .09), 0 14px 26px -14px rgba(34, 48, 63, .45);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 18px/1.55 "Schoolbell", "Fredoka", "Comic Sans MS", "Chalkboard SE", cursive, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
/* the play-mat: the welcome art, fixed behind every page so nothing shifts under the content */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("/assets/learning-world.webp") center / cover no-repeat;
}
a { color: #1665c0; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.5rem); margin: .1em 0 .15em; }
h2 { font-size: 1.15rem; margin: 1.6em 0 .3em; }
p { margin: .5em 0; }
.wrap { max-width: 62rem; margin: 0 auto; padding: clamp(1rem, 3.5vw, 2rem) clamp(1rem, 4vw, 2rem) 1rem; }
.lede { color: var(--muted); font-size: 1.05rem; max-width: 34rem; }
.tip { color: var(--muted); font-size: .9rem; margin-top: 1rem; }

/* the bar: translucent over the page, blurred, so the wash stays visible behind it */
.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem clamp(1rem, 4vw, 2rem);
  background: rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 2px solid var(--line);
}
.logo {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
}
.logo::before { content: "🎈"; font-size: 1.35rem; }
.bar nav { margin-left: auto; display: flex; gap: .25rem; }
.bar nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 .8rem;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.bar nav a:hover, .bar nav a:focus-visible, .bar nav a[aria-current] { background: rgba(122, 108, 255, .13); }
.curriculum-menu { position: relative; }
.curriculum-menu summary {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 .8rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.curriculum-menu summary::-webkit-details-marker { display: none; }
.curriculum-menu summary::after { content: " ▾"; margin-left: .25rem; }
.curriculum-menu summary:hover, .curriculum-menu summary:focus-visible, .curriculum-menu summary[aria-current] { background: rgba(122, 108, 255, .13); }
.curriculum-menu div {
  position: absolute;
  left: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .3rem;
  padding: .45rem;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.curriculum-menu div a {
  display: grid;
  place-items: center;
  min-width: 2.6rem;
  min-height: 2.5rem;
  padding: 0 .5rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  border-radius: 999px;
}
.curriculum-menu div a:hover, .curriculum-menu div a:focus-visible { background: rgba(122, 108, 255, .13); }
.curriculum-menu div a[aria-current] { color: #fff; background: var(--c3); }
.curriculum-menu:not([open]) div { display: none; }
.mute {
  min-width: 2.75rem;
  min-height: 2.75rem;
  margin-left: .25rem;
  font-size: 1.1rem;
  line-height: 1;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}
.mute[aria-pressed="true"] { color: var(--muted); background: #f3f5f9; }

/* the roster of games on the front page */
.games {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  padding: 0;
  margin: 1.5rem 0 0;
  list-style: none;
}
.tile {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: 1.05rem 1.15rem;
  color: inherit;
  text-decoration: none;
  background: #fff;
  border: 2px solid var(--line);
  border-left: 9px solid var(--c, var(--c3));
  border-radius: var(--r);
  box-shadow: var(--shadow);
  transition: transform .12s ease;
}
.tile:hover, .tile:focus-visible { transform: translateY(-3px); }
.tile .icon { font-size: 2.1rem; line-height: 1.1; }
.tile b { font-size: 1.12rem; }
.tile span { color: var(--muted); font-size: .93rem; }
.tile .age { margin-top: .5rem; font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); opacity: .72; }
.a1 { --c: var(--c1); } .a2 { --c: var(--c2); } .a3 { --c: var(--c3); }
.a4 { --c: var(--c4); } .a5 { --c: var(--c5); } .a6 { --c: var(--c6); }

/* controls: thumbs and keyboards, never a hover-only target */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 3rem;
  padding: .55rem 1.3rem;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--c, var(--c3));
  border: 0;
  border-radius: 999px;
  box-shadow: 0 4px 0 rgba(34, 48, 63, .22);
  cursor: pointer;
}
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(34, 48, 63, .22); }
.btn.ghost { color: var(--ink); background: #fff; border: 2px solid var(--line); box-shadow: none; }
.btn.is-wrong { background: #e9edf3; color: var(--muted); box-shadow: none; }

.hud { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: .9rem; font-weight: 700; color: var(--muted); }
.hud b { color: var(--ink); font-variant-numeric: tabular-nums; }
.stage {
  position: relative;
  margin-top: .9rem;
  padding: clamp(.75rem, 2.5vw, 1.25rem);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.board { display: grid; gap: .5rem; touch-action: manipulation; }

/* memory */
.board.memory { grid-template-columns: repeat(4, 1fr); max-width: 30rem; margin: 0 auto; }
.flip {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-size: clamp(1.3rem, 5.5vw, 2.2rem);
  background: var(--c3);
  color: #fff;
  border: 2px solid #6a5cf0;
  border-radius: 14px;
  cursor: pointer;
}
.flip.is-open { background: #fff; color: var(--ink); }
.flip.is-matched { background: #d9f7ee; border-color: var(--c2); }

/* whack-a-mole */
.board.whack { grid-template-columns: repeat(3, 1fr); gap: .7rem; max-width: 28rem; margin: 0 auto; }
.hole {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-size: clamp(1.8rem, 9vw, 2.8rem);
  background: #f1f6fc;
  border: 3px dashed var(--line);
  border-radius: 50%;
  cursor: default;
}
.hole .mole { visibility: hidden; }
.hole.is-up { border-style: solid; border-color: #ffd9a8; background: #fff5e6; cursor: pointer; }
.hole.is-up .mole { visibility: visible; animation: pop .18s ease-out; }
@keyframes pop { from { transform: scale(.4); } }

/* bubbles */
.board.bubbles { grid-template-columns: none; }
.field {
  position: relative;
  height: min(56vh, 24rem);
  overflow: hidden;
  background: linear-gradient(#eaf7ff, #f8fcff);
  border-radius: 14px;
}
.bubble {
  position: absolute;
  width: var(--s);
  height: var(--s);
  padding: 0;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .85), transparent 58%),
    var(--c, var(--c6));
  border: 0;
  border-radius: 50%;
  box-shadow: inset 0 -6px 12px rgba(34, 48, 63, .16);
  cursor: pointer;
  animation: bob 2.6s ease-in-out infinite alternate;
}
@keyframes bob { to { transform: translateY(-10px); } }
.bubble.is-pop { transform: scale(1.7); opacity: 0; transition: transform .16s ease, opacity .16s ease; animation: none; }

/* snake */
.board.snake {
  grid-template-columns: repeat(var(--n), 1fr);
  gap: 2px;
  max-width: 30rem;
  margin: 0 auto;
  padding: 3px;
  background: #dde8f1;
  border-radius: 12px;
}
.cell { aspect-ratio: 1; background: #fff; border-radius: 4px; }
.cell.is-snake { background: var(--c2); }
.cell.is-head { background: #1c9e83; border-radius: 40%; }
.cell.is-food { background: var(--c1); border-radius: 50%; }
.gameover { text-align: center; padding: 1rem 0; }
.gameover p { font-weight: 800; font-size: 1.3rem; }

/* tic-tac-toe */
.board.ttt { grid-template-columns: repeat(3, 1fr); gap: .45rem; max-width: 21rem; margin: 0 auto; }
.cell-btn {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font: inherit;
  font-size: clamp(2rem, 11vw, 3.2rem);
  font-weight: 800;
  background: #f6f9fd;
  border: 3px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
}
.cell-btn[data-mark="X"] { color: var(--c3); }
.cell-btn[data-mark="O"] { color: var(--c4); }
.cell-btn:disabled { cursor: default; }

/* counting */
.count-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  font-size: clamp(2rem, 9vw, 3.2rem);
  line-height: 1.3;
  min-height: 2.5em;
  align-content: center;
}
.answers { display: grid; grid-template-columns: repeat(4, 1fr); gap: .55rem; max-width: 26rem; margin: 1.1rem auto 0; }
.answers .btn { font-size: 1.35rem; }

/* round-over / congratulations panel */
.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border-radius: var(--r);
}
.overlay[hidden] { display: none; }
.overlay p { font-weight: 800; font-size: 1.35rem; margin: 0 0 .6rem; }

.foot { padding: 2.5rem 1rem 3rem; text-align: center; color: var(--muted); font-size: .85rem; }
.foot a { color: var(--muted); }

/* the rooms on the front page: the same tiles as the games, wider, because there are four of them
   across the whole site and they are what a grown-up is looking for */
.rooms {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  padding: 0;
  margin: 1.5rem 0 0;
  list-style: none;
}

/* school: the row of ages, then one year at a time */
.ages { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.2rem 0 .5rem; }
.ages a {
  display: grid;
  place-items: center;
  min-width: 3.6rem;
  min-height: 2.9rem;
  padding: 0 .6rem;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 999px;
}
.ages a:hover, .ages a:focus-visible { border-color: var(--c3); }
.ages a.is-here { color: #fff; background: var(--c3); border-color: #6a5cf0; }
.year-head h2 { margin: 1.2rem 0 0; font-size: clamp(1.3rem, 3.4vw, 1.7rem); }
.grades { color: var(--muted); font-size: .9rem; margin: 0; }
.aim { font-weight: 700; }
.lesson { padding: .8rem 1rem 1rem; background: #fff; border: 2px solid var(--line); border-left: 9px solid var(--c2); border-radius: var(--r); }
.lesson ol { margin: .5rem 0 0; padding-left: 1.2rem; }
.lesson li { margin-bottom: .3rem; }
.pathway { margin-top: 1.5rem; }
.pathway .intro { color: var(--muted); margin: .3rem 0 0; }
.pathway .lesson { margin-top: .8rem; }
.pathway .lesson h4 { margin: 0; font-size: 1.04rem; }
.pathway .lesson p { margin: .5rem 0; }
.pathway .check { color: #216451; }
.pathway .ready { color: var(--muted); }
ul.resources { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .55rem; }
ul.resources li { padding: .7rem 1rem; background: #fff; border: 2px solid var(--line); border-radius: var(--r); }
ul.resources .what { display: block; color: var(--muted); font-size: .9rem; }

/* radio: one station playing at a time, on a screen above the list */
.player { display: grid; gap: .8rem; justify-items: center; margin-top: 1rem; }
.player[hidden] { display: none; }
.now { color: var(--muted); font-size: .95rem; font-weight: 700; margin: 0; text-align: center; }
.screen { width: 100%; max-width: 46rem; aspect-ratio: 16 / 9; overflow: hidden; background: #12202e; border-radius: var(--r); }
.screen iframe { width: 100%; height: 100%; border: 0; }
.stations { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.station { display: grid; gap: .35rem; align-content: start; padding: 1rem 1.1rem; background: #fff; border: 2px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.station .what { color: var(--muted); font-size: .9rem; }
.station-play { justify-self: start; }
.station-play[aria-pressed="true"] { background: var(--c2); }
.station-link { font-size: .9rem; }
.station-group { margin: 1.8rem 0 0; }
.station-group + .lede { margin-top: .2rem; }

/* the channel list: the same tile as a game, but it leaves the site */
.channels { list-style: none; padding: 0; margin: .8rem 0 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.channels li { display: flex; }
.channels .tile { flex: 1; }
.channels .tile .age { color: var(--muted); opacity: 1; }

/* five rooms in the bar is too many for a phone held sideways: let it wrap rather than spill */
.bar { flex-wrap: wrap; }
.bar nav { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 30rem) {
  .bar nav a { padding: 0 .55rem; font-size: .95rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.brand { display: flex; flex-direction: column; line-height: 1.1; }
.ver { font-size: .7rem; opacity: .7; padding-left: 1.9rem; }
/* kid font, bundled so the site still loads nothing from the network */
@font-face { font-family: "Fredoka"; src: url("/assets/fredoka.ttf") format("truetype"); font-weight: 300 700; font-display: swap; }
/* sign-in gate: everything but the title waits until a name is set (site.js adds .signed-in) */
.desk { position: relative; width: min(100%, 1100px); }
.desk-bg { width: 100%; display: block; border-radius: 1rem; }
.desk a { position: absolute; bottom: 30%; transition: transform .2s; }
.desk a:hover, .desk a:focus { transform: scale(1.08); }
.desk a img { width: 100%; display: block; }
body:not(.signed-in) :is(.bar nav, .bar .mute, main, .foot) { display: none; }
.gate { max-width: 22rem; margin: 12vh auto; padding: 1.5rem; text-align: center; border-radius: 1.5rem; background: rgba(255, 255, 255, .55); backdrop-filter: blur(12px); }
.gate input, .gate button { font: inherit; display: block; width: 100%; margin-top: .6rem; padding: .6rem 1rem; border-radius: 999px; border: 2px solid #7a6cff; }
.gate button { background: #7a6cff; color: #fff; cursor: pointer; }
@font-face { font-family: "Comic Neue"; src: url("/assets/comicneue.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Baloo 2"; src: url("/assets/baloo2.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Patrick Hand"; src: url("/assets/patrickhand.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Andika"; src: url("/assets/andika.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Schoolbell"; src: url("/assets/schoolbell.ttf") format("truetype"); font-display: swap; }
.pick { background: rgba(255,255,255,.7); border-radius: 16px; padding: 12px 20px; margin-top: 16px; }
.pick-row { display: flex; gap: 12px; flex-wrap: wrap; }
.pick figure { margin: 0; text-align: center; font-weight: 700; }
.pick img { width: 110px; height: 110px; border-radius: 16px; }
.pick p { font-size: 22px; margin: 6px 0; }
.signout { font: inherit; border: 0; border-radius: 999px; padding: .3rem .8rem; background: #7a6cff; color: #fff; cursor: pointer; }
.home-logo{display:block;max-width:min(320px,80%);height:auto;margin:0 0 1rem}
.brand .logo::before{content:none}
.bar-logo{display:block;height:2.6rem;width:auto}
