• Updated 3 Dec, 05:00 UTC
  • Next run 4 Dec, 05:17 UTCNext 4 Dec 05:17
  • Last 7 days: 4 new models · 73 runs7 d: 4 models · 73 runs
Seasons drawn for a 9-year-old

GLM 5.4Z.ai

Chat

my 9 year old asked why we have summer and winter. can you draw it so she gets it?

What a great question from your kid — and it's the perfect age to nail down the #1 science misconception (it's the 23.5° tilt, not distance from the Sun). I built a single-file page she can actually play with: drag the Earth around the Sun and watch the seasons change, tilt a flashlight to feel why leaning matters, bust the "closer = warmer" myth, and earn a "Seasons Scientist" badge in a 3-question quiz.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Why Do We Have Summer and Winter? — for curious kids</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@400;600;800&display=swap" rel="stylesheet">
<style>
:root{
  --paper:#FFF6E7;
  --card:#FFFDF6;
  --ink:#3A322A;
  --ink-soft:#6E6355;
  --night:#191E42;
  --gold:#FFC53D;
  --gold-deep:#E8A417;
  --coral:#FF6B57;
  --leaf:#57B95C;
  --sky:#79C7EF;
  --ice:#BFDCF0;
  --pink:#F7A8C4;
}
*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  font-family:'Nunito',sans-serif;
  font-weight:600;
  color:var(--ink);
  background-color:var(--paper);
  background-image:radial-gradient(#EADFC9 1.3px, transparent 1.4px);
  background-size:26px 26px;
  line-height:1.6;
  font-size:17px;
}
h1,h2,h3,.f{font-family:'Fredoka',sans-serif}
.wrap{max-width:1080px;margin:0 auto;padding:0 22px}

/* ---------- header ---------- */
header{padding:56px 0 10px;position:relative}
.kicker{
  display:inline-block;font-family:'Fredoka';font-weight:600;font-size:.82rem;
  letter-spacing:.14em;text-transform:uppercase;background:#fff;
  border:2.5px solid var(--ink);border-radius:999px;padding:5px 16px;
  transform:rotate(-2deg);box-shadow:3px 3px 0 var(--ink);margin-bottom:20px;
}
h1{font-size:clamp(2.1rem,4.8vw,3.15rem);font-weight:600;line-height:1.12;max-width:640px}
h1 .hl{border-radius:6px;padding:0 4px}
h1 .hl-summer{background:#FFE3A3}
h1 .hl-winter{background:#D9EAF6}
.lede{max-width:600px;margin-top:16px;font-size:1.08rem;color:var(--ink-soft)}
.lede strong{color:var(--ink)}
.earth-sticker{position:absolute;right:22px;top:44px;transform:rotate(6deg)}
@media(max-width:760px){.earth-sticker{display:none}}

/* ---------- section chrome ---------- */
.sec{padding:70px 0 0}
.sec-head{margin-bottom:26px}
h2{font-size:clamp(1.5rem,3.2vw,2.05rem);font-weight:600;line-height:1.2}
.squiggle{display:block;margin-top:8px}
.sec-intro{max-width:620px;color:var(--ink-soft);margin-top:14px;font-size:1.05rem}
.sec-intro strong{color:var(--ink)}

/* ---------- playground ---------- */
.stage-grid{display:grid;grid-template-columns:1.55fr minmax(290px,.92fr);gap:22px;align-items:stretch}
.stage-card{position:relative}
.stage-tools{display:flex;flex-wrap:wrap;align-items:center;gap:14px;margin-bottom:14px}
.btn{
  font-family:'Fredoka';font-weight:600;font-size:1.02rem;color:var(--ink);
  background:var(--gold);border:2.5px solid var(--ink);border-radius:999px;
  padding:9px 20px;cursor:pointer;box-shadow:0 4px 0 var(--ink);
  display:inline-flex;align-items:center;gap:9px;transition:transform .08s;
}
.btn:hover{transform:translateY(-1px)}
.btn:active{transform:translateY(3px);box-shadow:0 1px 0 var(--ink)}
.btn svg{width:16px;height:16px}
.seg{display:inline-flex;border:2.5px solid var(--ink);border-radius:999px;background:#fff;overflow:hidden;box-shadow:3px 3px 0 rgba(58,50,42,.15)}
.seg button{
  font-family:'Fredoka';font-weight:500;font-size:.95rem;border:none;background:transparent;
  color:var(--ink);padding:8px 16px;cursor:pointer;
}
.seg button.on{background:var(--coral);color:#fff}
.tool-hint{font-size:.9rem;color:var(--ink-soft);font-style:italic}
.stage-frame{position:relative;border:3px solid var(--ink);border-radius:26px;overflow:hidden;background:var(--night);box-shadow:6px 7px 0 rgba(58,50,42,.18)}
#space{display:block;width:100%;height:clamp(380px,56vh,560px);touch-action:none;cursor:grab;outline-offset:4px}
#space:active{cursor:grabbing}
.grab-hint{
  position:absolute;pointer-events:none;background:#fff;border:2.5px solid var(--ink);
  border-radius:999px;padding:5px 14px;font-family:'Fredoka';font-weight:600;font-size:.9rem;
  display:flex;align-items:center;gap:7px;box-shadow:3px 3px 0 rgba(0,0,0,.35);
  transform:translate(-50%,-115%) rotate(-4deg);animation:wiggle 1.6s ease-in-out infinite;white-space:nowrap;
}
.grab-hint svg{width:15px;height:15px}
@keyframes wiggle{0%,100%{transform:translate(-50%,-115%) rotate(-5deg)}50%{transform:translate(-50%,-125%) rotate(2deg)}}
.legend{display:flex;flex-wrap:wrap;gap:8px 22px;margin-top:12px;font-size:.9rem;color:var(--ink-soft)}
.legend span{display:inline-flex;align-items:center;gap:8px}
.dot{width:13px;height:13px;border-radius:50%;border:2px solid var(--ink);display:inline-block}
.dot.warm{background:#FFB13D}.dot.cold{background:#7FB6D9}
.dashline{width:26px;border-top:3px dashed rgba(58,50,42,.7);display:inline-block}

/* ---------- backyard card ---------- */
.yard-card{background:var(--card);border:3px solid var(--ink);border-radius:24px;padding:18px;box-shadow:6px 7px 0 rgba(58,50,42,.18);display:flex;flex-direction:column;gap:14px}
.yard-title{display:flex;align-items:center;gap:9px;font-family:'Fredoka';font-weight:600;font-size:1.12rem}
.yard-title svg{width:19px;height:19px}
.yard-frame{border:2.5px solid var(--ink);border-radius:16px;overflow:hidden;background:#8ED4F2}
#yard{display:block;width:100%;height:auto}
.chip-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.chip{
  font-family:'Fredoka';font-weight:600;border:2.5px solid var(--ink);border-radius:999px;
  padding:6px 16px;display:inline-flex;align-items:center;gap:8px;font-size:1.05rem;
}
.chip svg{width:17px;height:17px}
.chip.s0{background:var(--gold)}
.chip.s1{background:#F5A65B}
.chip.s2{background:#D9EAF6}
.chip.s3{background:#B7E3AE}
.chip.month{background:#fff;font-size:.95rem}
.hemi-line{font-size:.95rem;color:var(--ink-soft)}
.hemi-line b{color:var(--ink)}
.explain{font-size:.98rem;min-height:6.2em}
.explain b{background:#FFE9C2;border-radius:4px;padding:0 3px}
.dist-note{font-size:.85rem;color:var(--ink-soft);border-top:2px dashed #D8CCB6;padding-top:10px;margin-top:auto}
.dist-note svg{width:14px;height:14px;vertical-align:-2px;margin-right:4px}
.dist-note b{color:var(--ink)}

/* ---------- flashlight ---------- */
.flash-grid{display:grid;grid-template-columns:1.35fr .8fr;gap:22px;align-items:start}
.flash-card{background:var(--card);border:3px solid var(--ink);border-radius:24px;padding:18px;box-shadow:6px 7px 0 rgba(58,50,42,.18)}
#flash{display:block;width:100%;height:auto;touch-action:none;cursor:grab}
#flash:active{cursor:grabbing}
.flash-cap{margin-top:12px;font-family:'Fredoka';font-weight:500;font-size:1.02rem;min-height:3.2em}
.flash-cap b{background:#FFE9C2;border-radius:4px;padding:0 3px}
.aside-note{background:#fff;border:2.5px dashed var(--ink);border-radius:20px;padding:16px 18px;font-size:.96rem;margin-top:18px}
.aside-note .f{font-weight:600;display:flex;align-items:center;gap:8px;margin-bottom:6px}
.aside-note svg{width:17px;height:17px}
.tie-line{margin-top:16px;font-size:1rem}
.tie-line b{background:#FFE9C2;border-radius:4px;padding:0 3px}

/* ---------- myth ---------- */
.myth-grid{display:grid;grid-template-columns:.9fr 1.1fr;gap:22px;align-items:center}
.myth-diagram{background:var(--night);border:3px solid var(--ink);border-radius:24px;padding:8px;box-shadow:6px 7px 0 rgba(58,50,42,.18)}
.myth-diagram svg{display:block;width:100%;height:auto}
.myth-copy p{margin-bottom:14px;font-size:1.03rem}
.myth-copy b{background:#FFE9C2;border-radius:4px;padding:0 3px}
.myth-points{list-style:none;margin-top:6px}
.myth-points li{display:flex;gap:12px;align-items:flex-start;margin-bottom:12px}
.myth-points .ic{
  flex:0 0 38px;height:38px;border:2.5px solid var(--ink);border-radius:12px;
  display:flex;align-items:center;justify-content:center;background:#fff;box-shadow:2px 3px 0 rgba(58,50,42,.18);
}
.myth-points .ic svg{width:19px;height:19px}
.myth-points .ic.gold{background:var(--gold)}
.myth-points .ic.ice{background:#D9EAF6}

/* ---------- quiz ---------- */
.stars{display:flex;gap:8px;margin-bottom:20px}
.stars svg{width:30px;height:30px;color:#D8CCB6}
.stars svg.earned{color:var(--gold);animation:pop .4s ease}
@keyframes pop{0%{transform:scale(.4)}70%{transform:scale(1.25)}100%{transform:scale(1)}}
.q-card{background:var(--card);border:3px solid var(--ink);border-radius:22px;padding:22px;box-shadow:5px 6px 0 rgba(58,50,42,.18);margin-bottom:18px}
.q-card h3{font-weight:600;font-size:1.15rem;margin-bottom:14px}
.opts{display:flex;flex-direction:column;gap:10px}
.opt{
  text-align:left;font-family:'Nunito';font-weight:700;font-size:1rem;color:var(--ink);
  background:#fff;border:2.5px solid var(--ink);border-radius:14px;padding:11px 16px;
  cursor:pointer;display:flex;align-items:center;gap:12px;transition:transform .1s;
}
.opt .letter{
  flex:0 0 27px;height:27px;border:2px solid var(--ink);border-radius:50%;
  font-family:'Fredoka';font-weight:600;display:flex;align-items:center;justify-content:center;font-size:.85rem;background:var(--paper);
}
.opt:hover{transform:translateX(4px)}
.opt.is-correct{background:var(--leaf);color:#fff;border-color:var(--ink)}
.opt.is-correct .letter{background:#fff;color:var(--ink)}
.opt.is-wrong{background:#FFD9D2;animation:shake .4s ease}
.opt:disabled{cursor:default;opacity:.55}
.opt.is-correct:disabled{opacity:1}
@keyframes shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-6px)}50%{transform:translateX(6px)}75%{transform:translateX(-4px)}}
.feedback{margin-top:12px;font-family:'Fredoka';font-weight:500;font-size:.98rem;min-height:1.4em}
.feedback.good{color:#2E7D36}
.feedback.bad{color:#C24A38}
.badge{
  display:none;background:var(--gold);border:3px solid var(--ink);border-radius:24px;
  padding:28px;text-align:center;box-shadow:6px 7px 0 rgba(58,50,42,.2);margin-top:8px;
}
.badge.show{display:block;animation:pop .5s ease}
.badge svg{width:52px;height:52px;margin-bottom:8px}
.badge h3{font-size:1.5rem;font-weight:600}
.badge p{font-size:1rem;margin-top:6px}

/* ---------- footer ---------- */
footer{padding:64px 0 40px;font-size:.9rem;color:var(--ink-soft)}
footer p{max-width:640px}
footer b{color:var(--ink)}
footer svg{width:14px;height:14px;vertical-align:-2px}

/* ---------- backyard particle animations ---------- */
.leaf{animation:leafFall 4.2s linear infinite;transform-box:fill-box;transform-origin:center}
.leaf:nth-of-type(2){animation-delay:1.4s}
.leaf:nth-of-type(3){animation-delay:2.7s}
@keyframes leafFall{
  0%{transform:translate(0,0) rotate(0deg);opacity:0}
  8%{opacity:1}
  30%{transform:translate(-10px,32px) rotate(80deg)}
  60%{transform:translate(9px,66px) rotate(160deg)}
  90%{transform:translate(-6px,96px) rotate(230deg);opacity:.9}
  100%{transform:translate(4px,110px) rotate(280deg);opacity:0}
}
.flake{animation:snowFall linear infinite}
.flake:nth-of-type(1){animation-duration:5.2s}
.flake:nth-of-type(2){animation-duration:6.8s;animation-delay:1s}
.flake:nth-of-type(3){animation-duration:4.6s;animation-delay:2.2s}
.flake:nth-of-type(4){animation-duration:7.4s;animation-delay:.6s}
.flake:nth-of-type(5){animation-duration:5.8s;animation-delay:3s}
.flake:nth-of-type(6){animation-duration:6.2s;animation-delay:1.7s}
@keyframes snowFall{0%{transform:translateY(-8px);opacity:0}10%{opacity:1}85%{opacity:.9}100%{transform:translateY(215px);opacity:0}}
.petal{animation:petalFall 5s ease-in-out infinite;transform-box:fill-box;transform-origin:center}
.petal:nth-of-type(2){animation-delay:1.6s}
.petal:nth-of-type(3){animation-delay:3.1s}
.petal:nth-of-type(4){animation-delay:.8s}
@keyframes petalFall{
  0%{transform:translate(0,0) rotate(0);opacity:0}
  12%{opacity:1}
  50%{transform:translate(14px,40px) rotate(120deg)}
  100%{transform:translate(-8px,84px) rotate(240deg);opacity:0}
}
#yCloud{animation:cloudDrift 26s ease-in-out infinite alternate}
@keyframes cloudDrift{from{transform:translateX(0)}to{transform:translateX(70px)}}
#ySunRays{animation:raysSpin 40s linear infinite;transform-box:fill-box;transform-origin:center}
@keyframes raysSpin{to{transform:rotate(360deg)}}

/* ---------- confetti ---------- */
#confetti{position:fixed;inset:0;pointer-events:none;z-index:60}

/* ---------- responsive ---------- */
@media(max-width:960px){
  .stage-grid,.flash-grid,.myth-grid{grid-template-columns:1fr}
  .myth-diagram{order:2}
  #space{height:min(62vw,420px)}
  .explain{min-height:0}
}
@media(max-width:520px){
  body{font-size:16px}
  header{padding-top:40px}
}

/* ---------- reduced motion ---------- */
@media(prefers-reduced-motion:reduce){
  .leaf,.flake,.petal,#yCloud,#ySunRays,.grab-hint{animation:none !important}
  html{scroll-behavior:auto}
}
</style>
</head>
<body>

<!-- reusable icons (hand-drawn, one consistent stroke style) -->
<svg width="0" height="0" style="position:absolute" aria-hidden="true">
  <defs>
    <symbol id="i-sun" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4.5" fill="currentColor" stroke="none"/><g stroke="currentColor" stroke-width="2.2" stroke-linecap="round" fill="none"><path d="M12 2.5v3M12 18.5v3M2.5 12h3M18.5 12h3M5 5l2.1 2.1M16.9 16.9L19 19M19 5l-2.1 2.1M7.1 16.9L5 19"/></g></symbol>
    <symbol id="i-snow" viewBox="0 0 24 24"><g stroke="currentColor" stroke-width="2.2" stroke-linecap="round" fill="none"><path d="M12 2v20M3.3 7l17.4 10M20.7 7L3.3 17"/><path d="M12 5.5l-2.2-2M12 5.5l2.2-2M12 18.5l-2.2 2M12 18.5l2.2 2"/></g></symbol>
    <symbol id="i-leaf" viewBox="0 0 24 24"><path d="M4 20C4 10 10 4 20 4c0 10-6 16-16 16z" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linejoin="round"/><path d="M4 20C8 14 12 10 17 7" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"/></symbol>
    <symbol id="i-blossom" viewBox="0 0 24 24"><g fill="currentColor" stroke="none"><circle cx="12" cy="6.5" r="3.4"/><circle cx="18.2" cy="11" r="3.4"/><circle cx="15.8" cy="18.2" r="3.4"/><circle cx="8.2" cy="18.2" r="3.4"/><circle cx="5.8" cy="11" r="3.4"/></g><circle cx="12" cy="12.5" r="3" fill="#FFF6E7"/></symbol>
    <symbol id="i-play" viewBox="0 0 24 24"><path d="M7 4.5v15l13-7.5z" fill="currentColor"/></symbol>
    <symbol id="i-pause" viewBox="0 0 24 24"><rect x="6" y="4.5" width="4" height="15" rx="1.2" fill="currentColor"/><rect x="14" y="4.5" width="4" height="15" rx="1.2" fill="currentColor"/></symbol>
    <symbol id="i-orbit" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"><circle cx="12" cy="12" r="3.2" fill="currentColor" stroke="none"/><path d="M20.5 10.5A9 9 0 0 0 5 6.5M3.5 13.5A9 9 0 0 0 19 17.5"/><path d="M5 3.5v3h3M19 20.5v-3h-3"/></g></symbol>
    <symbol id="i-star" viewBox="0 0 24 24"><path d="M12 2.8l2.8 5.8 6.3.9-4.6 4.4 1.1 6.3L12 17.2l-5.6 3 1.1-6.3L2.9 9.5l6.3-.9z" fill="currentColor"/></symbol>
    <symbol id="i-check" viewBox="0 0 24 24"><path d="M4.5 12.5l5 5 10-11" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></symbol>
    <symbol id="i-home" viewBox="0 0 24 24"><path d="M4 11l8-7 8 7v9a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 4 20z" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linejoin="round"/><path d="M10 21v-6h4v6" fill="none" stroke="currentColor" stroke-width="2.2"/></symbol>
    <symbol id="i-spark" viewBox="0 0 24 24"><path d="M12 2l2.2 7.8L22 12l-7.8 2.2L12 22l-2.2-7.8L2 12l7.8-2.2z" fill="currentColor"/></symbol>
    <symbol id="i-globe" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9" fill="none" stroke="currentColor" stroke-width="2.2"/><path d="M3.5 12h17M12 3c-5 5.5-5 12.5 0 18M12 3c5 5.5 5 12.5 0 18" fill="none" stroke="currentColor" stroke-width="2.2"/></symbol>
  </defs>
</svg>

<header>
  <div class="wrap">
    <span class="kicker">Great question!</span>
    <h1>Why do we have <span class="hl hl-summer">summer</span> and <span class="hl hl-winter">winter</span>?</h1>
    <p class="lede">Short answer: the Earth is <strong>tilted</strong> — like a spinning top that leans a little and never straightens up. Drag our planet around the Sun below and watch what that lean does.</p>
    <!-- little tilted-Earth sticker -->
    <svg class="earth-sticker" width="120" height="120" viewBox="0 0 120 120" aria-hidden="true">
      <g transform="rotate(23.5 60 62)">
        <line x1="60" y1="18" x2="60" y2="106" stroke="#3A322A" stroke-width="2.5" stroke-dasharray="4 5"/>
        <circle cx="60" cy="62" r="30" fill="#3585C0" stroke="#3A322A" stroke-width="2.5"/>
        <path d="M45 52q6-10 16-7t8 10q-2 9-13 9t-11-12z" fill="#57B95C"/>
        <path d="M52 74q8-2 12 3t-3 8q-9 1-9-11z" fill="#57B95C"/>
        <circle cx="60" cy="14" r="7" fill="#FFF6E7" stroke="#3A322A" stroke-width="2"/>
      </g>
      <text x="60" y="12" text-anchor="middle" font-family="Fredoka" font-weight="600" font-size="12" fill="#3A322A">N</text>
      <text x="98" y="112" text-anchor="middle" font-family="Fredoka" font-weight="600" font-size="14" fill="#3A322A" transform="rotate(-8 98 112)">23.5° lean!</text>
    </svg>
  </div>
</header>

<main>

<!-- ============ 1. THE PLAYGROUND ============ -->
<section class="sec">
  <div class="wrap">
    <div class="sec-head">
      <h2>One year, going around the Sun</h2>
      <svg class="squiggle" width="200" height="12" viewBox="0 0 200 12" aria-hidden="true"><path d="M3 8Q22 2 42 7T82 7T122 7T162 7T197 6" fill="none" stroke="#FF6B57" stroke-width="3.5" stroke-linecap="round"/></svg>
      <p class="sec-intro">See the dashed line through the Earth? That's its <strong>lean</strong> — and it always points the same way in space, toward the <strong>North Star</strong>. So as the Earth travels, sometimes your half of the world leans <strong>toward</strong> the Sun, and sometimes it leans <strong>away</strong>.</p>
    </div>

    <div class="stage-grid">
      <div class="stage-card">
        <div class="stage-tools">
          <button class="btn" id="playBtn" aria-pressed="false">
            <svg id="playIco"><use href="#i-play"/></svg>
            <svg id="pauseIco" style="display:none"><use href="#i-pause"/></svg>
            <span id="playLbl">Watch a whole year</span>
          </button>
          <span class="tool-hint">…or grab the Earth and drag it anywhere!</span>
        </div>
        <div class="stage-frame">
          <canvas id="space" tabindex="0" aria-label="The Earth orbiting the Sun. Drag the Earth, or use the left and right arrow keys, to move through the year."></canvas>
          <div class="grab-hint" id="grabHint"><svg style="color:#3A322A"><use href="#i-orbit"/></svg>Drag me!</div>
        </div>
        <div class="legend">
          <span><span class="dot warm"></span>leaning toward the Sun = warm &amp; bright</span>
          <span><span class="dot cold"></span>leaning away = slanted, weaker sunshine</span>
          <span><span class="dashline"></span>Earth's lean (it never changes direction)</span>
        </div>
      </div>

      <aside class="yard-card">
        <div class="yard-title"><svg style="color:#3A322A"><use href="#i-home"/></svg>My backyard</div>
        <div class="yard-frame">
          <!-- the four-season scene; colors are blended live as the Earth moves -->
          <svg id="yard" viewBox="0 0 340 230" role="img" aria-label="A backyard scene that changes with the seasons">
            <rect id="ySky" width="340" height="230" fill="#8ED4F2"/>
            <g id="ySun" transform="translate(264,48)">
              <g id="ySunRays" stroke="#FFB020" stroke-width="3" stroke-linecap="round" opacity=".8">
                <line x1="0" y1="-25" x2="0" y2="-31"/><line x1="0" y1="25" x2="0" y2="31"/>
                <line x1="-25" y1="0" x2="-31" y2="0"/><line x1="25" y1="0" x2="31" y2="0"/>
                <line x1="-18" y1="-18" x2="-22" y2="-22"/><line x1="18" y1="18" x2="22" y2="22"/>
                <line x1="-18" y1="18" x2="-22" y2="22"/><line x1="18" y1="-18" x2="22" y2="-22"/>
              </g>
              <circle r="17" fill="#FFC53D" stroke="#3A322A" stroke-width="2.5"/>
            </g>
            <g id="yCloud" fill="#FFFFFF" opacity=".92">
              <ellipse cx="84" cy="42" rx="27" ry="14"/>
              <ellipse cx="112" cy="49" rx="21" ry="11"/>
            </g>
            <path id="yHill" d="M0 170 Q85 140 170 160 T340 154 L340 230 L0 230 Z" fill="#6FBF63"/>
            <!-- flowers -->
            <g id="yFlowers" opacity="0">
              <g transform="translate(72,182)"><line x1="0" y1="0" x2="0" y2="-9" stroke="#3E7C3A" stroke-width="2"/><circle r="4.5" cy="-12" fill="#F26D9C" stroke="#3A322A" stroke-width="1.6"/><circle r="1.6" cy="-12" fill="#FFC53D"/></g>
              <g transform="translate(214,190)"><line x1="0" y1="0" x2="0" y2="-8" stroke="#3E7C3A" stroke-width="2"/><circle r="4" cy="-11" fill="#FFC53D" stroke="#3A322A" stroke-width="1.6"/></g>
              <g transform="translate(110,196)"><line x1="0" y1="0" x2="0" y2="-7" stroke="#3E7C3A" stroke-width="2"/><circle r="3.6" cy="-10" fill="#F26D9C" stroke="#3A322A" stroke-width="1.6"/></g>
            </g>
            <!-- tree -->
            <g transform="translate(148,164)">
              <path d="M0 -34 L-15 -52 M0 -34 L14 -50 M0 -46 L-8 -60 M0 -46 L9 -62" stroke="#7A5230" stroke-width="3.5" stroke-linecap="round" fill="none"/>
              <path d="M-6 4 L-4 -38 L4 -38 L6 4 Z" fill="#8A5A36" stroke="#3A322A" stroke-width="2.4" stroke-linejoin="round"/>
              <g id="yCanopy" fill="#4FAE5C" stroke="#3A322A" stroke-width="2.4">
                <circle cx="-17" cy="-54" r="16"/><circle cx="15" cy="-52" r="15"/>
                <circle cx="0" cy="-70" r="17"/><circle cx="-1" cy="-50" r="15"/>
              </g>
              <g id="yBlossoms" fill="#F7A8C4" opacity="0">
                <circle cx="-19" cy="-56" r="3.4"/><circle cx="8" cy="-66" r="3.4"/><circle cx="16" cy="-50" r="3.2"/>
                <circle cx="-6" cy="-48" r="3"/><circle cx="-8" cy="-72" r="3"/><circle cx="5" cy="-54" r="2.8"/>
              </g>
            </g>
            <!-- falling leaves (autumn) -->
            <g id="yLeaves" opacity="0">
              <g class="leaf" transform="translate(132,100)"><path d="M0 0 Q7 -5 12 0 Q7 5 0 0 Z" fill="#E8843D" stroke="#3A322A" stroke-width="1.6"/></g>
              <g class="leaf" transform="translate(158,112)"><path d="M0 0 Q7 -5 12 0 Q7 5 0 0 Z" fill="#D96A2E" stroke="#3A322A" stroke-width="1.6"/></g>
              <g class="leaf" transform="translate(172,95)"><path d="M0 0 Q7 -5 12 0 Q7 5 0 0 Z" fill="#F0A03C" stroke="#3A322A" stroke-width="1.6"/></g>
            </g>
            <!-- snow (winter) -->
            <g id="ySnow" fill="#FFFFFF" opacity="0">
              <circle class="flake" cx="40" cy="6" r="2.6"/><circle class="flake" cx="105" cy="0" r="2"/>
              <circle class="flake" cx="180" cy="10" r="2.8"/><circle class="flake" cx="238" cy="2" r="2.2"/>
              <circle class="flake" cx="300" cy="8" r="2.6"/><circle class="flake" cx="70" cy="14" r="2"/>
            </g>
            <!-- petals (spring) -->
            <g id="yPetals" fill="#F7A8C4" opacity="0">
              <circle class="petal" cx="140" cy="92" r="3"/><circle class="petal" cx="162" cy="100" r="2.6"/>
              <circle class="petal" cx="150" cy="86" r="2.4"/><circle class="petal" cx="174" cy="92" r="2.8"/>
            </g>
            <!-- snowman (winter) -->
            <g id="ySnowman" transform="translate(258,178)" opacity="0">
              <line x1="-14" y1="-20" x2="-27" y2="-30" stroke="#7A5230" stroke-width="3" stroke-linecap="round"/>
              <line x1="14" y1="-20" x2="27" y2="-30" stroke="#7A5230" stroke-width="3" stroke-linecap="round"/>
              <circle cx="0" cy="-8" r="15" fill="#FFFFFF" stroke="#3A322A" stroke-width="2.2"/>
              <circle cx="0" cy="-31" r="10" fill="#FFFFFF" stroke="#3A322A" stroke-width="2.2"/>
              <circle cx="-3.5" cy="-33" r="1.4" fill="#3A322A"/><circle cx="3.5" cy="-33" r="1.4" fill="#3A322A"/>
              <path d="M0 -29 L9 -27 L0 -25 Z" fill="#F08A3C" stroke="#3A322A" stroke-width="1.2" stroke-linejoin="round"/>
            </g>
          </svg>
        </div>
        <div class="chip-row">
          <span class="chip s0" id="seasonChip"><svg><use id="seasonIco" href="#i-sun"/></svg><span id="seasonLbl">Summer</span></span>
          <span class="chip month">like <b id="monthLbl">&nbsp;June</b></span>
        </div>
        <div class="tool-hint" style="margin:2px 0 10px">
          Where I live:
          <span class="seg" style="display:inline-flex;vertical-align:middle;margin-left:6px">
            <button id="hemN" class="on" aria-pressed="true">Top half</button>
            <button id="hemS" aria-pressed="false">Bottom half</button>
          </span>
        </div>
        <p class="hemi-line" id="hemiLine"></p>
        <p class="explain" id="explain"></p>
        <p class="dist-note"><svg style="color:#3A322A"><use href="#i-sun"/></svg>Distance to the Sun right now: <b id="distLbl">~150 million km</b>. It barely ever changes — so distance can't be the secret!</p>
      </aside>
    </div>
  </div>
</section>

<!-- ============ 2. THE FLASHLIGHT ============ -->
<section class="sec">
  <div class="wrap">
    <div class="sec-head">
      <h2>Why does leaning make sunshine weaker?</h2>
      <svg class="squiggle" width="200" height="12" viewBox="0 0 200 12" aria-hidden="true"><path d="M3 8Q22 2 42 7T82 7T122 7T162 7T197 6" fill="none" stroke="#FF6B57" stroke-width="3.5" stroke-linecap="round"/></svg>
      <p class="sec-intro">Think of sunshine as a <strong>flashlight beam</strong>. Point it straight down and all the light piles into one small spot — toasty! Tilt it, and the <strong>same light</strong> gets smeared across a big area, so each patch of ground gets less. Drag the flashlight and watch the warmth meter.</p>
    </div>

    <div class="flash-grid">
      <div class="flash-card">
        <svg id="flash" viewBox="0 0 520 320" role="img" aria-label="A flashlight you can tilt to see how the light spot on the ground spreads out."></svg>
        <p class="flash-cap" id="flashCap"></p>
      </div>
      <div>
        <div class="aside-note">
          <div class="f"><svg style="color:#3A322A"><use href="#i-spark"/></svg>How this maps to Earth</div>
          In <b>summer</b>, your half of Earth is like the ground under a <b>straight</b> flashlight: sunshine lands almost head-on, so it's strong and warm.<br><br>
          In <b>winter</b>, your half leans away — the <b>same sunshine</b> slides in at a slant, stretched thin. Nothing changed about the Sun. Only the angle did.
        </div>
        <div class="aside-note">
          <div class="f"><svg style="color:#3A322A"><use href="#i-sun"/></svg>Bonus: longer days too</div>
          The lean also gives summer <b>longer days</b> — more hours for the Sun to warm the ground — and winter <b>shorter days</b>. Double trouble for winter!
        </div>
      </div>
    </div>
  </div>
</section>

<!-- ============ 3. THE MYTH ============ -->
<section class="sec">
  <div class="wrap">
    <div class="sec-head">
      <h2>Plot twist: it's <em>not</em> about being closer!</h2>
      <svg class="squiggle" width="200" height="12" viewBox="0 0 200 12" aria-hidden="true"><path d="M3 8Q22 2 42 7T82 7T122 7T162 7T197 6" fill="none" stroke="#FF6B57" stroke-width="3.5" stroke-linecap="round"/></svg>
    </div>
    <div class="myth-grid">
      <div class="myth-diagram">
        <svg viewBox="0 0 300 220" role="img" aria-label="Earth's nearly circular orbit. The closest point to the Sun is in January, and the farthest is in July.">
          <circle cx="150" cy="110" r="72" fill="none" stroke="rgba(255,246,231,.5)" stroke-width="2" stroke-dasharray="5 7"/>
          <circle cx="150" cy="110" r="16" fill="#FFC53D"/>
          <g stroke="#FFB020" stroke-width="2.5" stroke-linecap="round">
            <line x1="150" y1="88" x2="150" y2="82"/><line x1="150" y1="132" x2="150" y2="138"/>
            <line x1="128" y1="110" x2="122" y2="110"/><line x1="172" y1="110" x2="178" y2="110"/>
          </g>
          <!-- closest point: early January (bottom-right of orbit in this picture) -->
          <g transform="translate(212,74)">
            <circle r="8" fill="#D9EAF6" stroke="#FFF6E7" stroke-width="2"/>
            <text x="14" y="4" font-family="Fredoka" font-weight="600" font-size="12" fill="#FFF6E7">Closest!</text>
            <text x="14" y="20" font-family="Nunito" font-weight="700" font-size="11" fill="#9FB2D8">early January</text>
          </g>
          <!-- farthest: early July -->
          <g transform="translate(88,146)">
            <circle r="8" fill="#FFC53D" stroke="#FFF6E7" stroke-width="2"/>
            <text x="-104" y="4" font-family="Fredoka" font-weight="600" font-size="12" fill="#FFF6E7">Farthest!</text>
            <text x="-104" y="20" font-family="Nunito" font-weight="700" font-size="11" fill="#9FB2D8">early July</text>
          </g>
          <text x="150" y="210" text-anchor="middle" font-family="Nunito" font-weight="700" font-size="12" fill="rgba(255,246,231,.65)">Earth's orbit is almost a circle — the distance hardly changes</text>
        </svg>
      </div>
      <div class="myth-copy">
        <p>Lots of grown-ups think summer happens because Earth gets <b>closer</b> to the Sun. Here's the surprise:</p>
        <ul class="myth-points">
          <li>
            <span class="ic ice"><svg style="color:#3A322A"><use href="#i-snow"/></svg></span>
            <span>Earth is actually <b>closest</b> to the Sun in early <b>January</b> — the middle of winter in the top half of the world!</span>
          </li>
          <li>
            <span class="ic gold"><svg style="color:#3A322A"><use href="#i-sun"/></svg></span>
            <span>At any moment, the top and bottom halves are the <b>same distance</b> from the Sun — yet one has summer while the other has winter. Distance can't explain that!</span>
          </li>
        </ul>
        <p>So what <em>is</em> different for the two halves? Only one thing: the direction each one <b>leans</b>. That's the whole secret — <b>23.5° of tilt</b>.</p>
      </div>
    </div>
  </div>
</section>

<!-- ============ 4. THE QUIZ ============ -->
<section class="sec">
  <div class="wrap">
    <div class="sec-head">
      <h2>Quick quiz: are you a Seasons Scientist?</h2>
      <svg class="squiggle" width="200" height="12" viewBox="0 0 200 12" aria-hidden="true"><path d="M3 8Q22 2 42 7T82 7T122 7T162 7T197 6" fill="none" stroke="#FF6B57" stroke-width="3.5" stroke-linecap="round"/></svg>
    </div>
    <div class="stars" id="stars" aria-label="Quiz progress">
      <svg><use href="#i-star"/></svg><svg><use href="#i-star"/></svg><svg><use href="#i-star"/></svg>
    </div>
    <div id="quiz"></div>
    <div class="badge" id="badge">
      <svg style="color:#3A322A"><use href="#i-spark"/></svg>
      <h3>You're officially a Seasons Scientist!</h3>
      <p>Now go tell someone the secret: the Earth leans <b>23.5°</b>, always toward the North Star — and that lean gives us summer and winter.</p>
    </div>
  </div>
</section>

</main>

<footer>
  <div class="wrap">
    <p><b>Grown-ups, note:</b> the pictures are simplified but the science is real — axial tilt (23.5°), not distance, drives the seasons, and the orbit here keeps the true timing (perihelion in January). Everything runs right in this page, no internet needed after it loads. Made for curious kids. <svg style="color:#FF6B57"><use href="#i-spark"/></svg></p>
  </div>
</footer>

<canvas id="confetti" aria-hidden="true"></canvas>

<script>
(function(){
"use strict";
const TAU=Math.PI*2, RAD=Math.PI/180, TILT=23.5*RAD;
const RM = matchMedia('(prefers-reduced-motion: reduce)').matches;
const mod=(a,n)=>((a%n)+n)%n;
const clamp=(v,a,b)=>Math.max(a,Math.min(b,v));
const lerp=(a,b,t)=>a+(b-a)*t;
function hex2rgb(h){h=h.replace('#','');return [parseInt(h.slice(0,2),16),parseInt(h.slice(2,4),16),parseInt(h.slice(4,6),16)];}
function mix(c1,c2,t){const a=hex2rgb(c1),b=hex2rgb(c2);return `rgb(${Math.round(lerp(a[0],b[0],t))},${Math.round(lerp(a[1],b[1],t))},${Math.round(lerp(a[2],b[2],t))})`;}
// pick a color from 4 keyframes (summer, fall, winter, spring) with wrap-around blending
function mix4(arr,s){const i=Math.floor(mod(s,4)),f=mod(s,4)-i;return mix(arr[i],arr[(i+1)%4],f);}
function num4(arr,s){const i=Math.floor(mod(s,4)),f=mod(s,4)-i;return lerp(arr[i],arr[(i+1)%4],f);}
// bell curve around a season position (used for particle opacities)
function bell(s,c){const d=Math.abs(mod(s-c+2,4)-2);return Math.exp(-3*d*d);}

/* ================== STATE ================== */
const state = { phi:200*RAD, target:200*RAD, playing:false, hem:'N', moved:false };
const MONTHS=['June','July','August','September','October','November','December','January','February','March','April','May'];
const SEASONS=['Summer','Fall','Winter','Spring'];
const SEASON_ICON=['#i-sun','#i-leaf','#i-snow','#i-blossom'];
const SEASON_EXPLAIN=[
  'Your half of Earth is leaning <b>toward the Sun</b>, so sunshine lands almost straight-on — strong and warm. The days are extra long, too!',
  'Your half is halfway between leaning toward and away. The sunshine keeps arriving more slanted — the air is cooling off.',
  'Your half is leaning <b>away from the Sun</b>. The very same sunshine arrives at a slant, stretched thin — and the days are short. Brrr!',
  'Halfway again — but now your half leans <b>toward the Sun a little more each week</b>. The sunshine is getting straighter and stronger!'
];

/* ================== ORBIT STAGE (canvas) ================== */
const cv=document.getElementById('space'), ctx=cv.getContext('2d');
let W=0,H=0,DPR=1,stars=[];
function resize(){
  DPR=Math.min(window.devicePixelRatio||1,2);
  W=cv.clientWidth;H=cv.clientHeight;
  cv.width=W*DPR;cv.height=H*DPR;
  ctx.setTransform(DPR,0,0,DPR,0,0);
  stars=[];
  for(let i=0;i<70;i++)stars.push({x:Math.random()*W,y:Math.random()*H,r:.7+Math.random()*1.4,p:Math.random()*TAU,s:.5+Math.random()*1.5});
}
window.addEventListener('resize',resize);

let shoot=null,nextShoot=performance.now()+4000;

function earthPos(phi){
  const cx=W/2, cy=H/2, Rb=Math.min(W,H)/2-58;
  const R=Rb*(1-0.018*Math.cos(phi-30*RAD));      // real orbit is slightly closer in January
  return {x:cx+R*Math.cos(phi), y:cy-R*Math.sin(phi), cx,cy,Rb};
}

function drawStage(now){
  ctx.clearRect(0,0,W,H);
  const t=now/1000;
  // stars
  for(const s of stars){
    const a=RM?0.5:0.35+0.4*Math.sin(t*s.s+s.p);
    ctx.globalAlpha=a;ctx.fillStyle='#FFF6E7';
    ctx.beginPath();ctx.arc(s.x,s.y,s.r,0,TAU);ctx.fill();
  }
  ctx.globalAlpha=1;
  // shooting star
  if(!RM){
    if(!shoot&&now>nextShoot){shoot={x:W*(0.1+Math.random()*0.5),y:H*(0.05+Math.random()*0.25),vx:5+Math.random()*3,vy:2+Math.random()*1.5,life:0.75};}
    if(shoot){
      shoot.x+=shoot.vx;shoot.y+=shoot.vy;shoot.life-=0.016;
      if(shoot.life<=0){shoot=null;nextShoot=now+5000+Math.random()*6000;}
      else{
        ctx.strokeStyle=`rgba(255,246,231,${shoot.life})`;ctx.lineWidth=2;ctx.lineCap='round';
        ctx.beginPath();ctx.moveTo(shoot.x,shoot.y);ctx.lineTo(shoot.x-shoot.vx*7,shoot.y-shoot.vy*7);ctx.stroke();
      }
    }
  }

  const e=earthPos(state.phi);
  const {cx,cy}=e;

  // orbit path (sampled so the slight eccentricity is honest)
  ctx.strokeStyle='rgba(255,246,231,.45)';ctx.lineWidth=2;ctx.setLineDash([5,8]);
  ctx.beginPath();
  for(let i=0;i<=120;i++){const p=i/120*TAU,q=earthPos(p);const R=q.Rb*(1-0.018*Math.cos(p-30*RAD));const x=cx+R*Math.cos(p),y=cy-R*Math.sin(p);i?ctx.lineTo(x,y):ctx.moveTo(x,y);}
  ctx.stroke();ctx.setLineDash([]);
  // 12 month ticks + 4 labels
  ctx.font='600 13px Fredoka';ctx.fillStyle='rgba(255,246,231,.85)';ctx.textAlign='center';ctx.textBaseline='middle';
  for(let m=0;m<12;m++){
    const a=m*30*RAD, R=e.Rb+4;
    const x=cx+(e.Rb-4)*Math.cos(a), y=cy-(e.Rb-4)*Math.sin(a);
    ctx.strokeStyle='rgba(255,246,231,.5)';ctx.lineWidth=2;
    ctx.beginPath();ctx.moveTo(x,y);ctx.lineTo(cx+(e.Rb+4)*Math.cos(a),cy-(e.Rb+4)*Math.sin(a));ctx.stroke();
  }
  const LBL=[['June',180],['September',270],['December',0],['March',90]];
  for(const [name,deg] of LBL){
    const a=deg*RAD;
    ctx.fillText(name,cx+(e.Rb+30)*Math.cos(a),cy-(e.Rb+30)*Math.sin(a));
  }

  // the Sun
  const sunR=clamp(Math.min(W,H)*0.075,22,34);
  const halo=ctx.createRadialGradient(cx,cy,sunR*.4,cx,cy,sunR*3);
  halo.addColorStop(0,'rgba(255,190,60,.4)');halo.addColorStop(1,'rgba(255,190,60,0)');
  ctx.fillStyle=halo;ctx.beginPath();ctx.arc(cx,cy,sunR*3,0,TAU);ctx.fill();
  ctx.strokeStyle='#FFB020';ctx.lineWidth=3;ctx.lineCap='round';
  const rot=RM?0:t*0.15;
  for(let i=0;i<10;i++){
    const a=rot+i*TAU/10;
    ctx.beginPath();
    ctx.moveTo(cx+(sunR+6)*Math.cos(a),cy+(sunR+6)*Math.sin(a));
    ctx.lineTo(cx+(sunR+13)*Math.cos(a),cy+(sunR+13)*Math.sin(a));
    ctx.stroke();
  }
  ctx.fillStyle='#FFC53D';ctx.beginPath();ctx.arc(cx,cy,sunR,0,TAU);ctx.fill();
  ctx.strokeStyle='#E8A417';ctx.lineWidth=2.5;ctx.beginPath();ctx.arc(cx,cy,sunR,0,TAU);ctx.stroke();
  // a friendly little face
  ctx.strokeStyle='#8A5A00';ctx.lineWidth=2;ctx.lineCap='round';
  ctx.beginPath();ctx.arc(cx-8,cy-4,3.5,Math.PI*1.1,Math.PI*1.9);ctx.stroke();
  ctx.beginPath();ctx.arc(cx+8,cy-4,3.5,Math.PI*1.1,Math.PI*1.9);ctx.stroke();
  ctx.beginPath();ctx.arc(cx,cy+3,7,Math.PI*0.15,Math.PI*0.85);ctx.stroke();
  ctx.fillStyle='rgba(255,246,231,.8)';ctx.fillText('the Sun',cx,cy+sunR+26);

  // sunshine arrows aimed at Earth (parallel = sunlight arriving)
  const phi=state.phi;
  const sd={x:-Math.cos(phi),y:Math.sin(phi)};       // Earth -> Sun
  const perp={x:-sd.y,y:sd.x};
  const r=clamp(Math.min(W,H)*0.052,18,28);
  ctx.strokeStyle='rgba(255,211,77,.9)';ctx.lineWidth=2.5;ctx.lineCap='round';
  for(const o of [-11,0,11]){
    const sx=e.x+sd.x*r*2.4+perp.x*o, sy=e.y+sd.y*r*2.4+perp.y*o;
    const ex2=e.x+sd.x*r*1.25+perp.x*o, ey2=e.y+sd.y*r*1.25+perp.y*o;
    ctx.beginPath();ctx.moveTo(sx,sy);ctx.lineTo(ex2,ey2);ctx.stroke();
    // arrowhead
    const ang=Math.atan2(ey2-sy,ex2-sx);
    for(const da of [2.6,-2.6]){
      ctx.beginPath();ctx.moveTo(ex2,ey2);
      ctx.lineTo(ex2+7*Math.cos(ang+da),ey2+7*Math.sin(ang+da));ctx.stroke();
    }
  }

  // which hemisphere leans sunward? dot of north-axis with sun direction
  const dot=-Math.sin(TILT+phi);                      // + means north leans toward the Sun
  const warmth=clamp((dot/0.399+1)/2,0,1);            // 1 = north warm, 0 = north cold

  // faint dashed line: the pole always points at the North Star
  const axisN={x:Math.sin(TILT),y:-Math.cos(TILT)};
  const P={x:e.x+axisN.x*r*1.45,y:e.y+axisN.y*r*1.45};
  const m=16;let tExit=1e9;
  if(axisN.x>1e-6)tExit=Math.min(tExit,(W-m-P.x)/axisN.x);
  if(axisN.x<-1e-6)tExit=Math.min(tExit,(m-P.x)/axisN.x);
  if(axisN.y>1e-6)tExit=Math.min(tExit,(H-m-P.y)/axisN.y);
  if(axisN.y<-1e-6)tExit=Math.min(tExit,(m-P.y)/axisN.y);
  tExit=Math.max(tExit,r*2.5);
  const S={x:P.x+axisN.x*tExit,y:P.y+axisN.y*tExit};
  ctx.strokeStyle='rgba(255,246,231,.22)';ctx.lineWidth=1.5;ctx.setLineDash([4,7]);
  ctx.beginPath();ctx.moveTo(P.x,P.y);ctx.lineTo(S.x,S.y);ctx.stroke();ctx.setLineDash([]);
  // the North Star itself
  ctx.fillStyle='#FFF6E7';
  ctx.beginPath();
  ctx.moveTo(S.x,S.y-7);ctx.quadraticCurveTo(S.x+1.5,S.y-1.5,S.x+7,S.y);ctx.quadraticCurveTo(S.x+1.5,S.y+1.5,S.x,S.y+7);
  ctx.quadraticCurveTo(S.x-1.5,S.y+1.5,S.x-7,S.y);ctx.quadraticCurveTo(S.x-1.5,S.y-1.5,S.x,S.y-7);ctx.fill();
  ctx.font='500 11px Fredoka';ctx.fillStyle='rgba(255,246,231,.7)';
  const toC={x:cx-S.x,y:cy-S.y},L=Math.hypot(toC.x,toC.y)||1;
  ctx.fillText('North Star',clamp(S.x+toC.x/L*38,40,W-40),clamp(S.y+toC.y/L*26,16,H-10));

  // ---------- EARTH ----------
  ctx.save();
  ctx.translate(e.x,e.y);
  ctx.rotate(TILT);                                   // the fixed lean: everything below is drawn tilted
  // ocean
  ctx.fillStyle='#3585C0';ctx.beginPath();ctx.arc(0,0,r,0,TAU);ctx.fill();
  // continents
  const blobs=[
    ['M-0.7 -0.4 Q-0.45 -0.75 -0.15 -0.6 Q-0.25 -0.35 -0.4 -0.25 Q-0.6 -0.2 -0.7 -0.4','#58B368'],
    ['M-0.35 0.05 Q-0.15 0.1 -0.2 0.4 Q-0.3 0.65 -0.4 0.4 Q-0.5 0.15 -0.35 0.05','#4CA05C'],
    ['M0.15 -0.5 Q0.45 -0.55 0.55 -0.25 Q0.6 0.05 0.35 0.2 Q0.2 0.35 0.15 0.05 Q0.05 -0.25 0.15 -0.5','#58B368'],
    ['M0.45 0.38 Q0.62 0.32 0.68 0.45 Q0.62 0.58 0.45 0.52 Q0.4 0.45 0.45 0.38','#4CA05C']
  ];
  for(const [d,c] of blobs){
    ctx.fillStyle=c;
    const p=new Path2D();p.addPath(new Path2D(),new DOMMatrix().scale(r)); // build scaled path
    const scaled=new Path2D();scaled.addPath(new Path2D(d),new DOMMatrix([r,0,0,r,0,0]));
    ctx.fill(scaled);
  }
  // equator
  ctx.strokeStyle='rgba(255,255,255,.75)';ctx.lineWidth=1.5;ctx.setLineDash([3,4]);
  ctx.beginPath();ctx.moveTo(-r,0);ctx.lineTo(r,0);ctx.stroke();ctx.setLineDash([]);
  // axis line + N/S badges
  ctx.strokeStyle='rgba(255,246,231,.85)';ctx.lineWidth=2;
  ctx.beginPath();ctx.moveTo(0,-r*1.35);ctx.lineTo(0,r*1.35);ctx.stroke();
  for(const [yy,lbl] of [[-r*1.35,'N'],[r*1.35,'S']]){
    ctx.fillStyle='#FFF6E7';ctx.beginPath();ctx.arc(0,yy,6.5,0,TAU);ctx.fill();
    ctx.strokeStyle='#3A322A';ctx.lineWidth=1.5;ctx.beginPath();ctx.arc(0,yy,6.5,0,TAU);ctx.stroke();
    ctx.fillStyle='#3A322A';ctx.font='600 9px Fredoka';ctx.textAlign='center';ctx.fillText(lbl,0,yy+0.5);
  }
  ctx.restore();

  // night side (the half facing away from the Sun)
  ctx.save();
  ctx.beginPath();ctx.arc(e.x,e.y,r,0,TAU);ctx.clip();
  const g=ctx.createLinearGradient(e.x+sd.x*r,e.y+sd.y*r,e.x-sd.x*r,e.y-sd.y*r);
  g.addColorStop(0,'rgba(13,16,44,0)');g.addColorStop(.48,'rgba(13,16,44,.04)');
  g.addColorStop(.6,'rgba(13,16,44,.45)');g.addColorStop(.82,'rgba(13,16,44,.74)');g.addColorStop(1,'rgba(13,16,44,.85)');
  ctx.fillStyle=g;ctx.fillRect(e.x-r,e.y-r,r*2,r*2);
  ctx.restore();
  // rim
  ctx.strokeStyle='rgba(255,246,231,.55)';ctx.lineWidth=2;
  ctx.beginPath();ctx.arc(e.x,e.y,r,0,TAU);ctx.stroke();

  // warm / cold brackets over the two halves
  ctx.save();ctx.translate(e.x,e.y);ctx.rotate(TILT);
  ctx.lineWidth=3.5;ctx.lineCap='round';
  ctx.strokeStyle=mix('#7FB6D9','#FFB13D',warmth);
  ctx.beginPath();ctx.arc(0,0,r+7,-145*RAD,-35*RAD);ctx.stroke();
  ctx.strokeStyle=mix('#7FB6D9','#FFB13D',1-warmth);
  ctx.beginPath();ctx.arc(0,0,r+7,35*RAD,145*RAD);ctx.stroke();
  ctx.restore();

  return {e,r};
}

/* ---------- backyard + readout ---------- */
const $=id=>document.getElementById(id);
const ySky=$('ySky'),yHill=$('yHill'),yCanopy=$('yCanopy'),ySun=$('ySun'),ySunRays=$('ySunRays');
const yLeaves=$('yLeaves'),ySnow=$('ySnow'),yPetals=$('yPetals'),yBlossoms=$('yBlossoms'),ySnowman=$('ySnowman'),yFlowers=$('yFlowers');
const KF={
  sky:['#8ED4F2','#F5C98B','#CBD9E2','#9FD9EF'],
  ground:['#6FBF63','#B99B5E','#EDF3F8','#8CC96F'],
  canopy:['#4FAE5C','#E8843D','#4FAE5C','#7AC877'],
  sunY:[46,72,96,62]
};
let lastYard=-99,lastKey='';
function seasonIdx(){return mod((state.phi/RAD-180)/90,4);}     // 0 summer(N) … 3 spring(N)
function updateReadout(){
  const phiDeg=mod(state.phi/RAD,360);
  const mi=mod(Math.round((phiDeg-180)/30),12);
  const sN=seasonIdx(), sS=mod(sN+2,4);
  const kidS=state.hem==='N'?sN:sS;
  const kidSeason=Math.round(kidS)%4;
  const otherSeason=(kidSeason+2)%4;

  const key=mi+'|'+kidSeason+'|'+state.hem;
  if(key!==lastKey){
    lastKey=key;
    $('monthLbl').textContent='\u00A0'+MONTHS[mi];
    const chip=$('seasonChip');
    chip.className='chip s'+kidSeason;
    $('seasonIco').setAttribute('href',SEASON_ICON[kidSeason]);
    $('seasonLbl').textContent=SEASONS[kidSeason];
    $('hemiLine').innerHTML=`Right now: <b>Top half — ${state.hem==='N'?SEASONS[kidSeason]:SEASONS[otherSeason]}</b> · <b>Bottom half — ${state.hem==='N'?SEASONS[otherSeason]:SEASONS[kidSeason]}</b>`;
    $('explain').innerHTML=`In <b>${MONTHS[mi]}</b>, ${SEASON_EXPLAIN[kidSeason].replace('Your half',state.hem==='N'?'the <b>top half</b> (yours!)':'the <b>bottom half</b> (yours!)')}`;
  }
  const d=150.4-2.5*Math.cos((phiDeg-30)*RAD);
  $('distLbl').textContent='~'+Math.round(d)+' million km';

  // continuous backyard blending
  if(Math.abs(kidS-lastYard)>0.004){
    lastYard=kidS;
    ySky.setAttribute('fill',mix4(KF.sky,kidS));
    yHill.setAttribute('fill',mix4(KF.ground,kidS));
    yCanopy.setAttribute('fill',mix4(KF.canopy,kidS));
    yCanopy.setAttribute('opacity',(1-0.92*bell(kidS,2)).toFixed(3));
    ySun.setAttribute('transform',`translate(264,${num4(KF.sunY,kidS).toFixed(1)})`);
    ySunRays.setAttribute('opacity',(0.4+0.55*bell(kidS,0)).toFixed(2));
    yLeaves.setAttribute('opacity',(bell(kidS,1)*0.95).toFixed(2));
    ySnow.setAttribute('opacity',bell(kidS,2).toFixed(2));
    ySnowman.setAttribute('opacity',bell(kidS,2).toFixed(2));
    yPetals.setAttribute('opacity',bell(kidS,3).toFixed(2));
    yBlossoms.setAttribute('opacity',bell(kidS,3).toFixed(2));
    yFlowers.setAttribute('opacity',Math.max(bell(kidS,3)*0.9,bell(kidS,0)*0.7).toFixed(2));
  }
}

/* ---------- grab hint ---------- */
const hint=$('grabHint');
function placeHint(e,r){
  if(state.moved){hint.style.display='none';return;}
  hint.style.left=e.x+'px';hint.style.top=(e.y-r-6)+'px';
}

/* ---------- main loop ---------- */
let last=performance.now();
function frame(now){
  const dt=Math.min(0.05,(now-last)/1000);last=now;
  if(state.playing)state.phi=mod(state.phi+dt*TAU/22+TAU,TAU);
  else{
    // ease toward the drag target along the shortest way around
    let d=((state.target-state.phi+Math.PI*3)%TAU)-Math.PI;
    state.phi+=d*Math.min(1,dt*10);
  }
  const {e,r}=drawStage(now);
  placeHint(e,r);
  updateReadout();
  requestAnimationFrame(frame);
}

/* ---------- input: canvas ---------- */
function angleFromPointer(ev){
  const rect=cv.getBoundingClientRect();
  const px=ev.clientX-rect.left, py=ev.clientY-rect.top;
  const cx=W/2, cy=H/2;
  return Math.atan2(-(py-cy),px-cx);
}
cv.addEventListener('pointerdown',ev=>{
  state.moved=true;setPlaying(false);
  state.target=state.phi=angleFromPointer(ev);
  cv.setPointerCapture(ev.pointerId);
  ev.preventDefault();
});
cv.addEventListener('pointermove',ev=>{if(ev.buttons)state.target=angleFromPointer(ev);});
cv.addEventListener('keydown',ev=>{
  if(ev.key==='ArrowLeft'){state.moved=true;setPlaying(false);state.phi=state.target=mod(state.phi+5*RAD+TAU,TAU);ev.preventDefault();}
  if(ev.key==='ArrowRight'){state.moved=true;setPlaying(false);state.phi=state.target=mod(state.phi-5*RAD+TAU,TAU);ev.preventDefault();}
});

/* ---------- play button + hemisphere toggle ---------- */
function setPlaying(on){
  state.playing=on;
  $('playIco').style.display=on?'none':'';
  $('pauseIco').style.display=on?'':'none';
  $('playLbl').textContent=on?'Pause':'Watch a whole year';
  $('playBtn').setAttribute('aria-pressed',on);
  if(on){state.moved=true;}
}
$('playBtn').addEventListener('click',()=>setPlaying(!state.playing));
function setHem(h){
  state.hem=h;
  $('hemN').className=h==='N'?'on':'';$('hemS').className=h==='S'?'on':'';
  $('hemN').setAttribute('aria-pressed',h==='N');$('hemS').setAttribute('aria-pressed',h==='S');
  lastKey='';lastYard=-99; // force refresh
}
$('hemN').addEventListener('click',()=>setHem('N'));
$('hemS').addEventListener('click',()=>setHem('S'));

/* ================== FLASHLIGHT ================== */
const FSVG=document.getElementById('flash');
const NS='http://www.w3.org/2000/svg';
function el(tag,attrs,parent){const n=document.createElementNS(NS,tag);for(const k in attrs)n.setAttribute(k,attrs[k]);(parent||FSVG).appendChild(n);return n;}
// static scenery
el('rect',{x:0,y:0,width:520,height:320,fill:'#FDF1DC',rx:14});
el('rect',{x:0,y:250,width:520,height:70,fill:'#8CC96F'});
el('line',{x1:0,y1:250,x2:520,y2:250,stroke:'#3A322A','stroke-width':2.5});
for(const [x,s] of [[60,1],[150,.8],[400,.9],[480,.7]]){
  el('path',{d:`M${x} 250 q2 ${-8*s} 4 0 M${x+6} 250 q2 ${-6*s} 4 0`,stroke:'#5F9E4C','stroke-width':2,fill:'none','stroke-linecap':'round'});
}
const beam=el('polygon',{fill:'#FFE58A',opacity:.2});
const spotOuter=el('ellipse',{fill:'#FFD84D',opacity:.5});
const spotInner=el('ellipse',{fill:'#FFF3C4',opacity:.8});
const waves=el('g',{stroke:'#F08A3C','stroke-width':2.5,fill:'none','stroke-linecap':'round',opacity:0});
for(const dx of [-14,0,14])el('path',{d:`M${270+dx} 236 q4 -7 0 -12 q-4 -5 0 -11`,},waves);
// flashlight group
const fl=el('g',{});
el('rect',{x:-17,y:6,width:34,height:58,rx:9,fill:'#FFC53D',stroke:'#3A322A','stroke-width':2.5},fl);
el('rect',{x:-17,y:6,width:34,height:14,rx:7,fill:'#E8A417',stroke:'#3A322A','stroke-width':2.5},fl);
el('line',{x1:-17,y1:34,x2:17,y2:34,stroke:'#3A322A','stroke-width':2},fl);
el('path',{d:'M-17 64 L-26 92 L26 92 L17 64 Z',fill:'#F0A03C',stroke:'#3A322A','stroke-width':2.5,'stroke-linejoin':'round'},fl);
el('ellipse',{cx:0,cy:92,rx:26,ry:6,fill:'#FFF3C4',stroke:'#3A322A','stroke-width':2.5},fl);
// thermometer
el('rect',{x:470,y:56,width:16,height:140,rx:8,fill:'#FFFDF6',stroke:'#3A322A','stroke-width':2.5});
const merc=el('rect',{x:473,y:150,width:10,height:60,rx:5,fill:'#FF6B57'});
const bulb=el('circle',{cx:478,cy:202,r:13,fill:'#FF6B57',stroke:'#3A322A','stroke-width':2.5});
el('text',{x:478,y:230,'text-anchor':'middle','font-family':'Fredoka','font-weight':600,'font-size':12,fill:'#3A322A'}).textContent='warmth';
for(let y=76;y<=176;y+=25)el('line',{x1:458,y1:y,x2:465,y2:y,stroke:'#3A322A','stroke-width':2,'stroke-linecap':'round'});
el('text',{x:30,y:300,'font-family':'Nunito','font-weight':700,'font-size':12,fill:'#6E6355'}).textContent='← drag the flashlight up, down, or sideways';

const FP={x:270,y:74};                 // flashlight pivot
let fTheta=55*RAD;                     // angle from straight-down
function updateFlash(){
  const th=fTheta,c=Math.abs(Math.cos(th));
  const H={x:FP.x-Math.sin(th)*92,y:FP.y+Math.cos(th)*92};
  fl.setAttribute('transform',`translate(${FP.x},${FP.y}) rotate(${th/RAD})`);
  const beta=9*RAD;
  const edge=(a)=>{const dx=-Math.sin(a),dy=Math.cos(a);const t=(250-H.y)/dy;return H.x+dx*t;};
  const xL=edge(th-beta),xR=edge(th+beta);
  beam.setAttribute('points',`${H.x},${H.y} ${xL},250 ${xR},250`);
  beam.setAttribute('opacity',(0.10+0.24*c).toFixed(3));
  const cx=(xL+xR)/2,rx=(xR-xL)/2;
  spotOuter.setAttribute('cx',cx);spotOuter.setAttribute('cy',250);spotOuter.setAttribute('rx',rx);spotOuter.setAttribute('ry',Math.max(4,rx*0.16));
  spotOuter.setAttribute('opacity',(0.25+0.55*c).toFixed(2));
  spotInner.setAttribute('cx',cx);spotInner.setAttribute('cy',250);spotInner.setAttribute('rx',rx*0.55);spotInner.setAttribute('ry',Math.max(2.5,rx*0.09));
  spotInner.setAttribute('opacity',(0.15+0.75*c).toFixed(2));
  waves.setAttribute('transform',`translate(${cx-270},0)`);
  waves.setAttribute('opacity',clamp((c-0.72)/0.28,0,1).toFixed(2));
  const h=14+96*c;
  merc.setAttribute('y',196-h);merc.setAttribute('height',h+8);
  const mc=mix('#8FBFDA','#FF6B57',c);
  merc.setAttribute('fill',mc);bulb.setAttribute('fill',mc);
  const cap=$('flashCap');
  if(c>0.85)cap.innerHTML='A <b>small, super-bright spot</b> — all the sunshine piles up in one place. Maximum warmth! This is your half of Earth in <b>summer</b>.';
  else if(c>0.45)cap.innerHTML='Tilted! The same light now covers a <b>bigger, dimmer patch</b> — each bit of ground gets less warmth.';
  else cap.innerHTML='<b>Brrr!</b> The light is smeared way out and weak. Same flashlight, same sunshine — just very slanted. This is your half in <b>winter</b>.';
}
function flashAngle(ev){
  const rect=FSVG.getBoundingClientRect();
  const sc=520/rect.width;
  const px=(ev.clientX-rect.left)*sc, py=(ev.clientY-rect.top)*sc;
  fTheta=clamp(Math.atan2(-(px-FP.x),py-FP.y),-75*RAD,75*RAD);
  updateFlash();
}
FSVG.addEventListener('pointerdown',ev=>{FSVG.setPointerCapture(ev.pointerId);flashAngle(ev);ev.preventDefault();});
FSVG.addEventListener('pointermove',ev=>{if(ev.buttons)flashAngle(ev);});
updateFlash();

/* ================== QUIZ ================== */
const QUIZ=[
  {q:'What causes summer and winter?',
   opts:['Earth\u2019s lean toward or away from the Sun','Earth getting closer to or farther from the Sun','The Sun getting hotter and colder'],
   a:0,yes:'Yes! The 23.5\u00B0 lean is the whole secret.'},
  {q:'When it\u2019s summer in the top half of the world, what\u2019s the bottom half having?',
   opts:['Summer too','The same season','Winter'],
   a:2,yes:'Exactly — the two halves take turns leaning toward the Sun.'},
  {q:'Which sunshine warms the ground the most?',
   opts:['Light that arrives at a slant','Light that hits straight on','Both are exactly the same'],
   a:1,yes:'Right — straight-on light packs the same sunshine into a smaller, warmer spot.'}
];
let solved=0;
const quizBox=$('quiz');
QUIZ.forEach((item,qi)=>{
  const card=document.createElement('div');card.className='q-card';
  card.innerHTML=`<h3>Q${qi+1}. ${item.q}</h3><div class="opts"></div><p class="feedback"></p>`;
  const opts=card.querySelector('.opts'),fb=card.querySelector('.feedback');
  item.opts.forEach((txt,oi)=>{
    const b=document.createElement('button');b.className='opt';
    b.innerHTML=`<span class="letter">${'ABC'[oi]}</span>${txt}`;
    b.addEventListener('click',()=>{
      if(oi===item.a){
        b.classList.add('is-correct');
        b.insertAdjacentHTML('beforeend','<svg style="width:18px;height:18px;margin-left:auto"><use href="#i-check"/></svg>');
        opts.querySelectorAll('button').forEach(o=>o.disabled=true);
        fb.textContent=item.yes;fb.className='feedback good';
        const st=$('stars').children[solved];st.classList.add('earned');
        solved++;
        if(solved===3){$('badge').classList.add('show');if(!RM)confettiBurst();}
      }else{
        b.classList.add('is-wrong');
        fb.textContent='Not quite — think about the lean! Try again.';
        fb.className='feedback bad';
        setTimeout(()=>b.classList.remove('is-wrong'),500);
      }
    });
    opts.appendChild(b);
  });
  quizBox.appendChild(card);
});

/* ================== CONFETTI ================== */
const CF=document.getElementById('confetti'),cctx=CF.getContext('2d');
let pieces=[],cfRun=false;
function confettiBurst(){
  CF.width=innerWidth;CF.height=innerHeight;
  const colors=['#FFC53D','#FF6B57','#57B95C','#79C7EF','#F7A8C4'];
  const r=$('badge').getBoundingClientRect();
  const ox=r.left+r.width/2,oy=r.top+r.height/2;
  pieces=[];
  for(let i=0;i<130;i++){
    const a=Math.random()*TAU,v=4+Math.random()*7;
    pieces.push({x:ox,y:oy,vx:Math.cos(a)*v,vy:Math.sin(a)*v-5,rot:Math.random()*TAU,vr:(Math.random()-.5)*.3,
      w:5+Math.random()*6,h:8+Math.random()*7,c:colors[i%colors.length],round:Math.random()<.3,life:1});
  }
  if(!cfRun){cfRun=true;cfLoop();}
}
function cfLoop(){
  cctx.clearRect(0,0,CF.width,CF.height);
  let alive=false;
  for(const p of pieces){
    if(p.life<=0)continue;alive=true;
    p.vy+=0.22;p.x+=p.vx;p.y+=p.vy;p.rot+=p.vr;p.life-=0.008;p.vx*=0.99;
    cctx.save();cctx.translate(p.x,p.y);cctx.rotate(p.rot);
    cctx.globalAlpha=Math.min(1,p.life*2);cctx.fillStyle=p.c;
    if(p.round){cctx.beginPath();cctx.arc(0,0,p.w/2,0,TAU);cctx.fill();}
    else cctx.fillRect(-p.w/2,-p.h/2,p.w,p.h);
    cctx.restore();
  }
  if(alive)requestAnimationFrame(cfLoop);
  else{cfRun=false;cctx.clearRect(0,0,CF.width,CF.height);}
}

/* ================== GO ================== */
resize();
requestAnimationFrame(frame);
})();
</script>
</body>
</html>

How it teaches the idea (and why it's built this way):

  • The playground is the heart of it. The Earth is drawn with a visible tilted axis that always points at the North Star — the single most important (and most often missed) fact. As your daughter drags the Earth (or hits "Watch a whole year"), the night-side shading, the sunshine arrows, and the warm/cold brackets over each hemisphere all update live.
  • "My backyard" makes it personal. A little scene next to the orbit smoothly morphs through summer → fall → snowman-winter → blossoming spring as the Earth moves, and a toggle lets her pick which half of the world she lives in — which is exactly what proves seasons are opposite on each side.
  • The flashlight is the "aha" toy. Kids struggle with "slanted light is weaker" as an abstraction, so she can drag a real flashlight and watch the same beam smear into a big dim patch — with a warmth thermometer doing the storytelling.
  • The myth gets busted explicitly. The page shows Earth is actually closest to the Sun in January — the killer counterexample — then a 3-question quiz (with a confetti "Seasons Scientist" badge) lets her prove she got it.

Everything runs offline in one file — just save it as seasons.html and open it in any browser. Best experienced together: let her drag the Earth first, and ask her "which way is the lean pointing now?" before reading any words.

Catch: The Earth is closest to the sun in early January, in the northern winter: the seasons come from its tilt.

Run details

Model
z-ai/glm-5.4
Route
OpenRouter API
Served by
Modal
Effort
max (OpenRouter default)
Limits
60 min · 681,818 output tokens ($3.00 cap at $4.40/M)
Date
2 Dec 2026
Time
2 min 55 s
Words
3,934
Tokens
34 in, 41,063 out (21,848 thinking)
List price
$0.18 at today's price ($1.40 in / $4.40 out per M)
Paid
$0.18

Raw: output · meta.json

Prompt

my 9 year old asked why we have summer and winter. can you draw it so she gets it?

Other Everyday runs