
  * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  html, body { margin:0; padding:0; }
  body {
    font-family: "Comic Sans MS", "Chalkboard SE", "Arial Rounded MT Bold", Arial, sans-serif;
    background: linear-gradient(180deg, #87ceeb 0%, #b8e6ff 45%, #fff3b0 100%);
    min-height: 100vh; color:#25324a; overflow-x:hidden;
    touch-action: manipulation; user-select:none; -webkit-user-select:none;
  }
  #app { max-width: 900px; margin: 0 auto; padding: 10px 12px 30px; }
  header { display:flex; align-items:center; gap:10px; padding:6px 2px 10px; }
  #homeBtn {
    font-size:34px; width:64px; height:64px; border-radius:20px; border:4px solid #fff;
    background:#ff8fab; cursor:pointer; box-shadow:0 4px 0 rgba(0,0,0,.15); display:none;
  }
  h1 { font-size: clamp(26px, 5vw, 40px); margin:0; color:#25324a; letter-spacing:.5px; flex:1; text-align:center; }
  #starBox { font-size:24px; background:#fff; border-radius:999px; padding:8px 14px; border:3px solid #ffd166; min-width:86px; text-align:center; }
  .speakBtn {
    font-size:30px; width:64px; height:64px; border-radius:50%; border:4px solid #fff;
    background:#06d6a0; cursor:pointer; box-shadow:0 4px 0 rgba(0,0,0,.15); flex:none;
  }
  .speakBtn:active, button:active { transform: scale(.95); }

  /* ---------- Home ---------- */
  #welcomeBar { display:flex; align-items:center; gap:12px; background:#ffffffcc; border-radius:24px; padding:10px 14px; margin-bottom:14px; }
  #welcomeBar p { font-size: clamp(19px, 3.4vw, 25px); margin:0; font-weight:bold; }
  .tileGrid { display:grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap:14px; }
  .tile {
    border:5px solid #fff; border-radius:26px; padding:16px 8px 12px; cursor:pointer;
    text-align:center; box-shadow:0 5px 0 rgba(0,0,0,.13); background:#fff;
  }
  .tile .art { font-size:56px; line-height:1.15; display:block; }
  .tile .tname { font-size:21px; font-weight:bold; display:block; margin-top:4px; }
  .tile .tstars { font-size:16px; display:block; min-height:20px; }
  .tile.soon { opacity:.55; cursor:default; filter:saturate(.4); }
  .tile.soon .tname { font-size:18px; }
  .soonBadge { display:inline-block; background:#8d99ae; color:#fff; border-radius:999px; font-size:13px; padding:2px 10px; margin-top:4px; }
  @keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }
  .shake { animation: shake .3s ease 2; }
  #grownupNote { margin-top:18px; background:#ffffffa8; border-radius:16px; padding:10px 14px; font-size:14px; color:#43506b; }

  /* ---------- Topic ---------- */
  #picker { display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin-bottom:12px; }
  .pick {
    width:74px; height:74px; border-radius:20px; border:4px solid #fff; background:#fff;
    font-size:36px; cursor:pointer; box-shadow:0 3px 0 rgba(0,0,0,.12); display:flex; align-items:center; justify-content:center; padding:4px;
  }
  .pick.on { border-color:#ffd166; background:#fff7d6; transform:scale(1.07); }
  .pick svg { width:52px; height:52px; }
  #modeBar { display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin: 12px 0; }
  .modeBtn {
    font-family:inherit; font-size:21px; font-weight:bold; border-radius:999px; border:4px solid #fff;
    padding:12px 20px; cursor:pointer; background:#cdb4f6; color:#25324a; box-shadow:0 4px 0 rgba(0,0,0,.13);
  }
  .modeBtn.on { background:#ffd166; }
  #stage {
    background:#ffffffd9; border-radius:30px; border:5px solid #fff; min-height:340px;
    padding:18px; text-align:center; position:relative; box-shadow:0 6px 0 rgba(0,0,0,.08);
  }
  .bigLetter { font-size: clamp(110px, 26vw, 190px); font-weight:bold; line-height:1; }
  .bigEmoji { font-size: clamp(90px, 22vw, 150px); line-height:1.2; }
  .bigWord { font-size: clamp(28px, 6vw, 42px); font-weight:bold; margin-top:6px; }
  .bigShape svg { width: clamp(150px, 34vw, 220px); height: clamp(150px, 34vw, 220px); }
  .stageRow { display:flex; align-items:center; justify-content:center; gap:16px; flex-wrap:wrap; }
  .hintLine { font-size:20px; margin-top:10px; min-height:26px; }

  /* Find */
  .choiceRow { display:flex; gap:14px; justify-content:center; flex-wrap:wrap; margin-top:14px; }
  .choice {
    width:150px; height:150px; border-radius:26px; border:5px solid #dfe7f3; background:#fff; cursor:pointer;
    display:flex; align-items:center; justify-content:center; font-size:78px; font-weight:bold; padding:8px;
  }
  .choice svg { width:104px; height:104px; }
  .choice.right { border-color:#2ec4b6; background:#d9fbeF; background:#d9fbef; }
  .choice.wrong { border-color:#ffb703; background:#fff3d6; }
  .bigPlay { font-family:inherit; font-size:23px; font-weight:bold; border-radius:999px; border:4px solid #fff;
    padding:14px 28px; cursor:pointer; background:#06d6a0; color:#123; box-shadow:0 4px 0 rgba(0,0,0,.14); }

  /* Trace */
  #traceWrap { display:flex; flex-direction:column; align-items:center; gap:8px; }
  #traceSvg { width:min(370px, 86vw); height:min(370px, 86vw); background:#fff; border-radius:24px; border:4px dashed #b8c7dd; touch-action:none; }
  .guideStroke { fill:none; stroke:#dbe4f0; stroke-width:30; stroke-linecap:round; stroke-linejoin:round; }
  .todoStroke { fill:none; stroke:#ffb703; stroke-width:7; stroke-linecap:round; stroke-linejoin:round; stroke-dasharray:10 9; }
  .doneStroke { fill:none; stroke:#06d6a0; stroke-width:21; stroke-linecap:round; stroke-linejoin:round; }
  .startDot { fill:#ef476f; stroke:#fff; stroke-width:3; }

  /* Say it */
  #micBtn { font-size:52px; width:120px; height:120px; border-radius:50%; border:6px solid #fff; background:#ef476f; cursor:pointer; box-shadow:0 6px 0 rgba(0,0,0,.16); }
  #micBtn.rec { background:#d90429; animation:pulse 1s infinite; }
  @keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.08)} }
  .sayBtns { display:flex; gap:14px; justify-content:center; margin-top:16px; flex-wrap:wrap; }
  .sayBtn { font-family:inherit; font-size:21px; font-weight:bold; border-radius:999px; border:4px solid #fff; padding:13px 22px; cursor:pointer; box-shadow:0 4px 0 rgba(0,0,0,.13); background:#4cc9f0; }
  .sayBtn.star { background:#ffd166; }
  .sayBtn[disabled] { opacity:.45; cursor:default; }

  .burst { position:absolute; font-size:34px; pointer-events:none; animation:burst 1s ease-out forwards; }
  @keyframes burst { 0%{opacity:1; transform:translate(0,0) scale(.6)} 100%{opacity:0; transform:translate(var(--dx), var(--dy)) scale(1.3)} }
  .countBadges { display:flex; gap:12px; justify-content:center; margin-top:10px; flex-wrap:wrap; }
  .badge { font-family:inherit; font-size:22px; font-weight:bold; background:#ffd166; border:3px solid #fff; border-radius:999px; padding:8px 18px; box-shadow:0 3px 0 rgba(0,0,0,.12); }
  .altRow { display:flex; gap:12px; justify-content:center; margin-top:12px; flex-wrap:wrap; }
  .chipBtn { font-family:inherit; font-size:20px; font-weight:bold; border-radius:999px; border:4px solid #fff; padding:10px 18px; cursor:pointer; background:#cdb4f6; box-shadow:0 3px 0 rgba(0,0,0,.13); }
  .starPop { display:inline-flex; align-items:center; justify-content:center; width:42px; height:42px; background:#fff; border-radius:50%; border:3px solid #b8860b; font-size:25px; box-shadow:0 2px 0 rgba(0,0,0,.3); margin-right:6px; vertical-align:middle; }
  .countBox { position:relative; width:min(320px, 82vw); aspect-ratio:1; margin:6px auto 0; }
  .countBox svg { width:100%; height:100%; }
  #countTargets { position:absolute; inset:0; }
  .countDot { position:absolute; width:48px; height:48px; transform:translate(-50%,-50%); border-radius:50%; background:rgba(255,255,255,.55); border:3px dashed rgba(37,50,74,.45); cursor:pointer; font-size:23px; font-weight:bold; color:#fff; padding:0; }
  .countDot.got { background:#06d6a0; border:3px solid #fff; }
  .countDot:active { transform:translate(-50%,-50%) scale(.92); } /* keep the centering translate while pressed: the global button:active scale would replace it and the spot jumps out from under the finger mid-tap, so the release lands off the spot and no click ever fires (real-browser bug found 2026-11-08; jsdom cannot see :active transforms) */
  .hidden { display:none !important; }

  /* ---------- Site additions ---------- */
  a.tile { text-decoration:none; color:inherit; display:block; }
  .swatch { width:150px; height:150px; border-radius:26px; border:5px solid #dfe7f3; margin:0 auto; }
  .swatchPick { width:52px; height:52px; border-radius:12px; border:3px solid #dfe7f3; }
  .swatchChoice { width:104px; height:104px; border-radius:18px; border:4px solid #dfe7f3; }
  .bigNum { font-size: clamp(100px, 24vw, 170px); font-weight:bold; line-height:1; }
  .numWord { font-size: clamp(26px, 5.4vw, 38px); font-weight:bold; margin-top:2px; }
  .dotsBox { margin:8px auto 0; }
  .pick .miniNum { font-size:34px; font-weight:bold; }
  .choice .miniNum { font-size:64px; font-weight:bold; }
  .wordCard { display:flex; flex-direction:column; align-items:center; gap:2px; }
  .wordCard .wcEmoji { font-size:64px; line-height:1.1; }
  .wordCard .wcWord { font-size:24px; font-weight:bold; }
  .pick .wcEmoji { font-size:34px; }
  .pairRow { display:flex; gap:18px; justify-content:center; align-items:flex-start; flex-wrap:wrap; }
  .pairSide { text-align:center; }
  .objGrid { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; max-width:560px; margin:10px auto 0; }
  .objBtn { font-size:52px; width:76px; height:76px; border-radius:20px; border:4px solid #fff; background:#fff; cursor:pointer; box-shadow:0 3px 0 rgba(0,0,0,.12); padding:0; }
  .objBtn.got { background:#d9fbef; border-color:#2ec4b6; opacity:.75; }
  .objBtn:active { transform:scale(.95); }
  .tenRow { display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin-top:12px; }
  .tenCard { font-family:inherit; font-size:30px; font-weight:bold; min-width:76px; padding:14px 10px; border-radius:18px; border:4px solid #fff; background:#a9d6e5; cursor:pointer; box-shadow:0 3px 0 rgba(0,0,0,.12); }
  .tenCard.got { background:#06d6a0; color:#fff; }
  .binRow { display:flex; gap:16px; justify-content:center; flex-wrap:wrap; margin-top:10px; }
  .binBox { width:min(240px, 42vw); min-height:150px; border-radius:24px; border:5px dashed #8d99ae; background:#ffffffa8; padding:10px; cursor:pointer; text-align:center; }
  .binBox .binName { font-size:24px; font-weight:bold; display:block; margin-bottom:6px; }
  .binBox .binItems { font-size:34px; line-height:1.3; }
  .cardRow { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; margin-top:14px; min-height:96px; }
  .sortCard { font-size:54px; width:88px; height:88px; border-radius:20px; border:4px solid #fff; background:#fff; cursor:pointer; box-shadow:0 3px 0 rgba(0,0,0,.12); display:flex; align-items:center; justify-content:center; padding:4px; }
  .sortCard svg { width:64px; height:64px; }
  .sortCard.sel { border-color:#ffd166; background:#fff7d6; transform:scale(1.08); }
  .sortCard:active { transform:scale(.95); }
  .sortCard.sel:active { transform:scale(1.02); }
  .beadRow { display:flex; gap:10px; justify-content:center; align-items:center; flex-wrap:wrap; margin:16px 0 6px; }
  .bead { font-size:56px; width:84px; height:84px; display:flex; align-items:center; justify-content:center; background:#fff; border-radius:50%; border:4px solid #dfe7f3; }
  .bead svg { width:58px; height:58px; }
  .bead.q { font-size:44px; font-weight:bold; color:#ef476f; border-style:dashed; }
  .seqDone { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; min-height:64px; margin-bottom:8px; }
  .seqCard { font-family:inherit; font-size:21px; font-weight:bold; padding:12px 16px; border-radius:16px; border:4px solid #fff; background:#cdb4f6; cursor:pointer; box-shadow:0 3px 0 rgba(0,0,0,.12); }
  .seqCard.placed { background:#06d6a0; color:#fff; cursor:default; }
  .seqPick { display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin-top:10px; }
  .bigChoiceBtn { font-family:inherit; font-size:26px; font-weight:bold; border-radius:20px; border:4px solid #fff; padding:16px 26px; cursor:pointer; background:#ffd166; box-shadow:0 4px 0 rgba(0,0,0,.13); }
  .groupLabel { font-size:19px; font-weight:bold; color:#43506b; width:100%; text-align:center; margin-top:4px; }
  .pickWord { font-size:15px; font-weight:bold; line-height:1.05; }
  .blendBig { font-size: clamp(80px, 20vw, 140px); font-weight:bold; line-height:1; letter-spacing:2px; }
  #homeBtn { display:flex; align-items:center; justify-content:center; text-decoration:none; }
  .countBox .bigShape svg { width:100%; height:100%; }
