/* The plan's rounds for the child (js/screens/play.js, home.js, results.js,
   levels.js): the worked example before a brand-new skill ("Watch me!", then
   "Got it ▶"), a pre-reader's big ▶ stop on Home, the skill's name and its
   "is solid!" cheer on the results, the grown-ups' link after a first round,
   and the 📌 on a level the plan is working on. The colors come from the
   world's own variables, so Speedy Town gets its own. Class prefix .sk-. */

/* ——— I do: the worked example ——— */
.sk-watch {
  position: absolute;
  top: 46px;
  left: 50%;
  translate: -50% 0;
  z-index: 2;
  padding: 3px 14px;
  border-radius: 999px;
  border: 3px solid #fff;
  background: var(--gold);
  color: #6b4300;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 3px 0 var(--gold-deep);
}
.sk-watch:not([hidden]) { animation: pop-in 0.4s var(--bounce); }
/* Room for the "Watch me!" ribbon under the round's name. */
.play.sk-showing .card { padding-top: 78px; }
.play.sk-showing .speed-spark { display: none; }
.sk-intro { display: flex; justify-content: center; padding-bottom: 6px; }
.sk-got {
  min-width: min(320px, 100%);
  animation: pop-in 0.45s var(--bounce) 0.5s backwards, sk-nudge 1.6s ease-in-out 1.4s infinite;
}
/* The worked example's right answer glows in the choices; the rest wait. */
.play.sk-showing .option:not(.right) { opacity: 0.55; }
.play.sk-showing .option.right { border-color: var(--mint); background: #e2fbf2; }

/* ——— Home: a pre-reader's big ▶ ——— */
.sk-go {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  padding: 0.2em 0.55em 0.2em 0.35em;
  border: 4px solid #fff;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--pink), var(--pink-deep));
  color: #fff;
  font: inherit;
  font-size: max(34px, 3.6cqw);
  line-height: 1;
  box-shadow: 0 6px 0 var(--outline), var(--shadow);
  cursor: pointer;
  animation: pop-in 0.5s var(--bounce) 0.3s backwards, sk-nudge 1.6s ease-in-out 1.2s infinite;
}
.sk-go:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--outline), var(--shadow); }
.sk-go-icon { display: grid; place-items: center; width: 1.45em; height: 1.45em; border-radius: 50%; background: #fff; font-size: 0.8em; }
.sk-go-play { font-size: 1.05em; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.18); }
.sk-point {
  position: absolute;
  left: 50%;
  bottom: 88%;
  translate: -50% 0;
  font-size: 0.9em;
  filter: drop-shadow(0 3px 2px rgba(60, 30, 80, 0.3));
  animation: sk-point 0.9s ease-in-out infinite;
  pointer-events: none;
}
/* The finger points down at the ▶ from beside it when there's no room above. */
@container (max-width: 520px) {
  .sk-point { left: auto; right: -0.9em; bottom: auto; top: -0.15em; translate: 0 0; rotate: -30deg; }
}

/* ——— Results ——— */
.sk-skill { margin-top: 4px; font-size: 18px; font-weight: 600; color: var(--ink-soft); }
/* A skill that just became solid, right under the title (in the first screen
   on a phone, above the chest and the sticky buttons). */
.sk-skill.sk-solid {
  width: fit-content;
  margin-top: 8px;
  padding: 3px 14px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: #fff5d6;
  color: #6b4300;
  font-size: 19px;
  font-weight: 700;
  box-shadow: 0 3px 0 var(--gold-deep);
}
.sk-solid:not([hidden]) { animation: pop-in 0.5s var(--bounce) 0.9s backwards; }
/* The grown-ups' link sits with the text too, small and calm. */
.link-btn.sk-grown { margin: 8px 0 0; font-size: 15px; }

/* ——— The level picker ——— */
.sk-plan {
  margin-top: -2px;
  padding: 1px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--lilac-deep);
  font-size: 13px;
  font-weight: 600;
}

@keyframes sk-nudge { 0%, 70%, 100% { transform: scale(1); } 80% { transform: scale(1.06); } 90% { transform: scale(0.98); } }
@keyframes sk-point { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

@media (max-width: 760px) {
  .sk-watch { top: 42px; font-size: 14px; }
  .play.sk-showing .card { padding-top: 70px; }
  .sk-got { min-width: 0; width: 100%; }
}
/* Where the buddy peeks over the card's corner right under Back (phones,
   phones on their side, tablets held tall), "Watch me first!" goes beside the
   buddy, below the top bar, instead of above it under Back and the hearts. */
@media (max-width: 1000px) {
  .play.sk-showing .play-mascot .mascot-bubble {
    left: 90%;
    top: 12px;
    bottom: auto;
    z-index: 7;
    max-width: min(220px, calc(100vw - 112px)); /* one line on a 320 px phone, never past the edge */
    transform-origin: 0 50%;
  }
  .play.sk-showing .play-mascot .mascot-bubble::after { left: -11px; top: calc(50% - 8px); bottom: auto; transform: rotate(135deg); }
}
@media (max-width: 640px) {
  .sk-skill.sk-solid, .link-btn.sk-grown { margin-inline: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .sk-go, .sk-got, .sk-point, .sk-watch:not([hidden]), .sk-solid:not([hidden]) { animation: none; }
}
