/* Parque y deportes: objetos, objetivos, marcador y layout de los modos de juego. */
.play-world {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.world-celebration {
  position: absolute;
  inset: 0;
  z-index: 8;
  overflow: hidden;
  pointer-events: none;
}
.world-reward-coin {
  position: absolute;
  width: 58px;
  height: 58px;
  animation: world-coin-rise 1.45s ease-out both;
  will-change: transform, opacity;
}
.world-reward-coin svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 3px 3px #a8762833);
}
@keyframes world-coin-rise {
  0% {
    opacity: 0;
    transform: translate(-50%, -30%) scale(0.55);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -60%) scale(1.12);
  }
  35% {
    opacity: 1;
    transform: translate(-50%, -70%) scale(1);
  }
  75% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -145%) scale(0.95);
  }
}
.world-balloon {
  position: absolute;
  bottom: 12%;
  width: clamp(30px, 5vw, 48px);
  opacity: 0;
  animation: world-balloon-rise 2.1s var(--delay) ease-out both;
  will-change: transform, opacity;
}
.world-balloon svg {
  display: block;
  width: 100%;
}
.world-celebration[data-finale="true"] .world-balloon {
  width: clamp(38px, 6vw, 60px);
}
@keyframes world-balloon-rise {
  0% {
    opacity: 0;
    transform: translateY(24px) rotate(-6deg);
  }
  14% {
    opacity: 0.9;
  }
  75% {
    opacity: 0.85;
  }
  100% {
    opacity: 0;
    transform: translate(var(--sway), -260px) rotate(8deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .world-reward-coin {
    transform: translate(-50%, -50%);
    animation: world-balloon-still 1.45s ease-out both;
    will-change: opacity;
  }

  .world-balloon {
    bottom: 35%;
    animation: world-balloon-still 1.6s ease-out both;
    will-change: opacity;
  }
}
html[data-calm="true"] .world-reward-coin {
  transform: translate(-50%, -50%);
  animation: world-balloon-still 1.45s ease-out both;
  will-change: opacity;
}
html[data-calm="true"] .world-balloon {
  bottom: 35%;
  animation: world-balloon-still 1.6s ease-out both;
  will-change: opacity;
}
@keyframes world-balloon-still {
  0%,
  100% {
    opacity: 0;
  }
  15%,
  80% {
    opacity: 0.85;
  }
}
.play-world-active #egg {
  z-index: 1;
  pointer-events: none;
}
.play-world-active #effects {
  z-index: 7;
}
.play-world-active .playground > .dpad {
  z-index: 10;
}
.play-world-active .lesson-dock {
  display: none;
}
.play-world-active .hint {
  visibility: hidden;
}
.world-header {
  position: absolute;
  left: 10px;
  right: 10px;
  z-index: 9;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 6px;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid #c7dfd7;
  border-radius: 14px;
  background: #fbfff9f5;
  color: #365f60;
  box-shadow: 0 3px 12px #52725b12;
  pointer-events: auto;
}
.world-header strong {
  display: block;
  font-size: calc(13px * var(--text-scale, 1));
  line-height: 1.2;
  color: #2b6d5b;
}
.world-header [role="status"] {
  display: block;
  font-size: calc(12px * var(--text-scale, 1));
  line-height: 1.3;
  margin-top: 2px;
}
.world-header button {
  min-height: 32px;
  padding: 4px 9px;
  font: inherit;
  font-size: calc(12px * var(--text-scale, 1));
  border: 1px solid #aed3be;
  border-radius: 10px;
  background: #e2f2e7;
  color: #316e5b;
  box-shadow: none;
  white-space: nowrap;
}
.world-map {
  position: absolute;
  z-index: 0;
  overflow: visible;
  filter: drop-shadow(0 2px 4px #4267440d);
}
.world-map.is-portrait-world {
  overflow: hidden;
  border-radius: 24px;
}
.world-targets {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.world-aim-surface {
  position: absolute;
  z-index: 2;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 20px;
  background: transparent !important;
  box-shadow: none !important;
  pointer-events: auto;
  cursor: pointer;
  transform: none !important;
}
.world-object {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  width: 58px;
  min-height: 58px;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  touch-action: none;
  cursor: pointer;
}
.world-object svg {
  display: block;
  width: 52px;
  height: 52px;
  filter: drop-shadow(0 3px 2px #45634b25);
}
.world-object span {
  display: block;
  font-size: calc(10px * var(--text-scale, 1));
  line-height: 1.15;
  white-space: nowrap;
  border-radius: 7px;
  color: #385f6c;
}
.world-object:hover svg {
  filter: drop-shadow(0 0 4px #438f74aa);
}
.world-object:active:not(:disabled) {
  transform: translate(-50%, -50%);
  transition: none;
}
.world-object:focus-visible {
  outline: 3px solid #418e7a;
  outline-offset: 3px;
  border-radius: 14px;
}
.world-object:disabled {
  opacity: 1;
  pointer-events: none;
}
.world-object[data-world-object="goal"],
.world-object[data-world-object="hoop"] {
  width: 86px;
}
.world-object[data-world-object="goal"] svg,
.world-object[data-world-object="hoop"] svg {
  width: 80px;
  height: 80px;
}
.world-object[data-world-object="ball"] {
  width: 54px;
  min-height: 54px;
}
.world-object[data-world-object="ball"] svg {
  width: 42px;
  height: 42px;
}
.world-object[data-world-object="ball"] span {
  display: none;
}
.world-carry {
  position: absolute;
  left: var(--carry-x);
  top: var(--carry-y);
  height: 30px;
  transform: translate(-50%, -50%);
  z-index: 5;
}
.world-delivery {
  position: absolute;
  z-index: 5;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
}
.world-delivery svg {
  width: 100%;
  height: 100%;
}
html[data-appearance="dark"] .world-header {
  background: #243d43f5;
  border-color: #4f786c;
  color: #e2f0e6;
}
html[data-appearance="dark"] .world-header strong {
  color: #a5dbc1;
}
html[data-appearance="dark"] .world-header .world-primary {
  background: #315e50;
  border-color: #619c83;
  color: #e7fff1;
}
@media (max-width: 360px) {
  .world-header {
    left: 6px;
    right: 6px;
    padding: 5px;
    gap: 3px;
    grid-template-columns: minmax(0, 1fr) auto 26px;
  }

  .world-header strong {
    font-size: calc(12px * var(--text-scale, 1));
  }

  .world-header [role="status"],
  .world-header .world-primary {
    font-size: calc(10px * var(--text-scale, 1));
  }

  .world-object {
    width: 46px;
    min-height: 46px;
  }

  .world-object svg {
    width: 42px;
    height: 42px;
  }
}
@media (max-width: 850px), (pointer: coarse) and (max-width: 1100px) {
  .play-world-active .panel .control-section {
    display: none !important;
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  .world-header {
    padding: 4px 6px;
  }

  .world-header strong {
    font-size: calc(11px * var(--text-scale, 1));
  }

  .world-header [role="status"] {
    font-size: calc(10px * var(--text-scale, 1));
  }

  .world-object svg {
    width: 38px;
    height: 38px;
  }

  .world-object span {
    font-size: calc(9px * var(--text-scale, 1));
  }

  .world-object[data-world-object="goal"] svg,
  .world-object[data-world-object="hoop"] svg {
    width: 54px;
    height: 54px;
  }
}
.play-world[data-kind="park"] .world-objectives {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  min-height: 17px;
  font-size: calc(10.5px * var(--text-scale, 1));
  line-height: 1.3;
}
.play-world[data-kind="park"] .world-objectives:empty {
  display: none;
}
.world-objectives [data-collected="true"] {
  color: #3a825b;
  font-weight: 700;
}
.world-carry {
  display: flex;
  gap: 3px;
  width: max-content;
  max-width: 64px;
}
.world-carry svg {
  width: 28px;
  height: 28px;
  flex: none;
}
html[data-appearance="dark"] .world-objectives [data-collected="true"] {
  color: #a4dfb6;
}
.play-world:not([data-kind="park"]):not([data-kind="soccer"]):not([data-kind="basketball"])
  .world-objectives {
  display: none;
}
.world-header .world-repeat {
  padding: 0;
  width: 32px;
  font-size: 20px;
  background: transparent;
}
.play-world[data-kind="soccer"] .world-objectives {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  flex-wrap: wrap;
}
.world-goal-progress {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1px solid #c4d9ce;
  border-radius: 50%;
  font-size: 12px;
  color: #7b9587;
  background: var(--color-surface);
}
.world-goal-progress[data-collected="true"] {
  background: #fae9ad;
  border-color: #d6ad52;
  color: #765a1c;
}
.world-soccer-help {
  font-size: calc(10px * var(--text-scale, 1));
  margin-left: 4px;
}
.world-soccer-goal {
  width: 84px;
}
.world-soccer-goal svg {
  width: 76px;
  height: 76px;
}
.world-soccer-goal span {
  font-weight: 700;
  font-size: calc(11px * var(--text-scale, 1));
}
.world-shot-guide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
  overflow: visible;
}
.world-corner-flag {
  width: 38px;
  min-height: 44px;
}
.world-corner-flag svg {
  width: 32px;
  height: 38px;
}
/* Play uses the field and its real controls; vocabulary belongs to Explore.
   Keep the game switcher below the field on wide layouts. */
body.play-world-active main {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(190px, 1fr) auto;
}
body.play-world-active .playground {
  grid-column: 1;
  grid-row: 1;
}
body.play-world-active .panel {
  display: flex;
  grid-column: 1;
  grid-row: 2;
  align-self: stretch;
}
body.play-world-active .panel-content {
  display: none;
}
@media (orientation: landscape) and (max-height: 500px) and (max-width: 1100px) {
  body.play-world-active .mobile-controls {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    width: calc(100% - 16px);
    margin: 0 8px 8px;
  }

  body:is(.soccer-world-active, .basketball-world-active) .stage-toolbar {
    display: none !important;
  }
}
@media (max-width: 360px), (orientation: landscape) and (max-height: 500px) {
  .world-soccer-goal {
    width: 66px;
  }

  .world-soccer-goal svg {
    width: 58px;
    height: 58px;
  }

  .world-soccer-help {
    flex-basis: 100%;
    margin-left: 0;
  }
}
.play-world[data-kind="basketball"] .world-objectives {
  display: block;
  margin-top: 2px;
  line-height: 1.3;
}
@media (max-width: 850px), (pointer: coarse) and (max-width: 1100px) {
  body.basketball-world-active .stage-toolbar {
    display: none !important;
  }
}
/* Header controls flow after the text: [repeat] [?] [primary] [×]; hidden controls take no column. */
.world-header,
.play-world[data-kind] .world-header {
  grid-template-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  grid-auto-columns: max-content;
}
.world-header :is(.world-info-toggle, .world-video) {
  width: 32px;
  padding: 0;
  border-radius: 50%;
  font-weight: 800;
  font-size: calc(15px * var(--text-scale, 1));
  background: var(--color-surface);
  border-color: #aed3be;
}
.world-header :is(.world-info-toggle, .world-video):focus-visible {
  outline: 3px solid #418e7a;
  outline-offset: 2px;
}
html[data-appearance="dark"] .world-header :is(.world-info-toggle, .world-video) {
  background: #243d43;
  color: #e2f0e6;
  border-color: #619c83;
}
@media (max-width: 360px) {
  .world-header :is(.world-info-toggle, .world-video),
  .world-header .world-repeat {
    width: 40px;
  }
}
/* How to play: one short line per rule, bilingual, with keyboard help only for keyboards. */
.world-info {
  width: min(440px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 18px;
  border: 2px solid #9fcfb5;
  border-radius: 22px;
  background: #f6fff8;
  color: #2f5f55;
  box-shadow: 0 18px 60px #24415b40;
  font-size: calc(14px * var(--text-scale, 1));
}
.world-info::backdrop {
  background: #254a6b55;
  backdrop-filter: blur(2px);
}
.world-info-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.world-info h2 {
  margin: 0;
  font-size: calc(22px * var(--text-scale, 1));
  color: #2b6d5b;
}
/* Opening help focuses its heading for reading, not as an interactive control. */
.world-info h2:focus {
  outline: none;
}
.world-info-heading p {
  margin: 3px 0 0;
  font-size: calc(13px * var(--text-scale, 1));
  color: #56806f;
}
:is(.world-info-close, .world-video-close) {
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #b9dcc8;
  border-radius: 12px;
  background: var(--color-surface);
  color: #4c7768;
  font-size: 24px;
}
.world-info ul {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.world-info li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid #cfe7d8;
  border-radius: 14px;
  background: var(--color-surface);
}
.world-info li > span:first-child {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #e2f2e7;
  font-size: 21px;
}
.world-info li strong,
.world-info li small {
  display: block;
  line-height: 1.3;
}
.world-info li strong {
  font-size: calc(14px * var(--text-scale, 1));
}
.world-info li small {
  margin-top: 2px;
  font-size: calc(12px * var(--text-scale, 1));
  color: #56806f;
}
:is(.world-info-ok, .world-video-ok) {
  display: block;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background: #2f7a5f;
  color: var(--color-surface);
  font-size: calc(16px * var(--text-scale, 1));
  font-weight: 700;
  box-shadow: 0 4px 0 #23594a;
}
:is(.world-info-ok, .world-info-close, .world-video-ok, .world-video-close):focus-visible {
  outline: 3px solid #f0b545;
  outline-offset: 2px;
}
html[data-appearance="dark"] .world-info {
  background: #21394f;
  border-color: #5f9a79;
  color: #e2f0e6;
}
html[data-appearance="dark"] .world-info h2 {
  color: #a5dbc1;
}
html[data-appearance="dark"] :is(.world-info-heading p, .world-info li small) {
  color: #b8d6c6;
}
html[data-appearance="dark"] .world-info li,
html[data-appearance="dark"] :is(.world-info-close, .world-video-close) {
  background: #2b455c;
  border-color: #4f786c;
  color: #e2f0e6;
}
html[data-appearance="dark"] .world-info li > span:first-child {
  background: #315e50;
}
/* Sports: a sweeping direction arrow, then a power bar with a green zone. */
.world-shot-trail {
  stroke: #f08a3c;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 2 11;
}
.world-shot-head {
  fill: #f08a3c;
  stroke: var(--color-surface);
  stroke-width: 2;
  stroke-linejoin: round;
}
.world-shot-guide[data-phase="power"] .world-shot-trail {
  stroke: #2f8a63;
  stroke-dasharray: none;
  stroke-width: 5;
}
.world-shot-guide[data-phase="power"] .world-shot-head {
  fill: #2f8a63;
}
.world-power {
  position: absolute;
  z-index: 6;
  width: 24px;
  height: 90px;
  transform: translate(-50%, -100%);
  border: 2px solid var(--color-surface);
  border-radius: 10px;
  background: #dfe7e3;
  box-shadow: 0 2px 8px #23463a40;
  overflow: visible;
  pointer-events: none;
}
.world-power-zone {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--lo) * 100%);
  height: calc((var(--hi) - var(--lo)) * 100%);
  background: #7fcf98;
  border-block: 3px solid #2f8a63;
}
.world-power-fill {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: calc(var(--p) * 100%);
  border-radius: 6px;
  background: linear-gradient(#f6c453, #ee7a48);
  opacity: 0.9;
}
.world-power[data-zone="true"] .world-power-fill {
  background: linear-gradient(#5fcf89, #2f8a63);
}
.world-power small {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  padding: 1px 5px;
  border-radius: 6px;
  background: #fffffff0;
  color: #2f5f55;
  font-size: calc(10px * var(--text-scale, 1));
  font-weight: 700;
  white-space: nowrap;
}
.world-ball-shadow {
  position: absolute;
  z-index: 3;
  width: 36px;
  height: 11px;
  border-radius: 50%;
  background: #2c4a3a;
  pointer-events: none;
  filter: blur(1.5px);
}
.world-object[data-world-object="ball"] {
  z-index: 5;
  transition: none;
}
.world-object[data-world-object="ball"].is-returning svg {
  animation: world-ball-return 0.35s ease-out;
}
@keyframes world-ball-return {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.world-header .world-primary[data-phase="power"] {
  background: #2f7a5f;
  border-color: #23594a;
  color: var(--color-surface);
  font-weight: 700;
}
/* Floating result text where the ball lands. */
.world-pop {
  position: absolute;
  z-index: 8;
  display: grid;
  justify-items: center;
  transform: translate(-50%, -50%);
  padding: 4px 10px;
  border-radius: 12px;
  background: #fffffff2;
  color: #a0522d;
  box-shadow: 0 3px 10px #2a4a3a30;
  pointer-events: none;
  animation: world-pop 1.4s ease-out both;
}
.world-pop[data-good="true"] {
  color: #2b6d4b;
}
.world-pop strong {
  font-size: calc(18px * var(--text-scale, 1));
  line-height: 1.1;
}
.world-pop small {
  font-size: calc(11px * var(--text-scale, 1));
}
@keyframes world-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -30%) scale(0.7);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -55%) scale(1.08);
  }
  75% {
    opacity: 1;
    transform: translate(-50%, -75%);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -95%);
  }
}
/* The goal net or hoop shakes when the ball goes in. */
.world-object.is-scored svg {
  animation: world-net-shake 0.5s ease-out;
}
@keyframes world-net-shake {
  0%,
  100% {
    transform: none;
  }
  25% {
    transform: scale(1.08, 0.94);
  }
  50% {
    transform: scale(0.96, 1.05);
  }
  75% {
    transform: scale(1.03, 0.98);
  }
}
@media (prefers-reduced-motion: reduce) {
  .world-pop {
    animation: none;
  }

  .world-object.is-scored svg,
  .world-object[data-world-object="ball"].is-returning svg {
    animation: none;
  }
}
html[data-calm="true"] .world-pop {
  animation: none;
}
html[data-calm="true"]
  :is(.world-object.is-scored svg, .world-object[data-world-object="ball"].is-returning svg) {
  animation: none;
}
html[data-appearance="dark"] .world-pop {
  background: #243d43f2;
  color: #ffc9a8;
}
html[data-appearance="dark"] .world-pop[data-good="true"] {
  color: #a5dbc1;
}
html[data-appearance="dark"] .world-power small {
  background: #243d43f0;
  color: #e2f0e6;
}
/* Easy mode switch in How to play. */
.world-info-easy {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  margin: 0 0 12px;
  padding: 9px 10px;
  text-align: left;
  border: 1px dashed #9fcfb5;
  border-radius: 14px;
  background: var(--color-surface);
  color: inherit;
}
.world-info-easy[hidden] {
  display: none;
}
.world-info-easy > span:first-child {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #fff3cf;
  font-size: 21px;
}
.world-info-easy strong,
.world-info-easy small {
  display: block;
  line-height: 1.3;
}
.world-info-easy small {
  color: #56806f;
  font-size: calc(12px * var(--text-scale, 1));
}
.world-info-easy::after {
  content: "Off";
  padding: 4px 10px;
  border-radius: 999px;
  background: #e3ece7;
  color: #4c7768;
  font-weight: 700;
  font-size: calc(12px * var(--text-scale, 1));
}
.world-info-easy[aria-pressed="true"] {
  border-style: solid;
  border-color: #3f9a68;
  background: #eefaf2;
}
.world-info-easy[aria-pressed="true"]::after {
  content: "On";
  background: #2f7a5f;
  color: var(--color-surface);
}
.world-info-easy:focus-visible {
  outline: 3px solid #f0b545;
  outline-offset: 2px;
}
html[data-appearance="dark"] .world-info-easy {
  background: #2b455c;
  border-color: #5f9a79;
}
html[data-appearance="dark"] .world-info-easy[aria-pressed="true"] {
  background: #29463a;
}
html[data-appearance="dark"] .world-info-easy small {
  color: #b8d6c6;
}
/* A fixed, player-scaled basket at the back of a half court. The SVG's rim is at y=70/240. */
.play-world[data-kind="basketball"] .world-object[data-world-object="hoop"] {
  width: var(--basket-hoop-width);
  height: var(--basket-hoop-height);
  min-height: 0;
  display: block;
  transform: translate(-50%, -29.166667%);
  z-index: 4;
}
.play-world[data-kind="basketball"] .world-object[data-world-object="hoop"] svg {
  width: 100%;
  height: 100%;
}
.play-world[data-kind="basketball"] .world-object[data-world-object="hoop"] > span {
  position: absolute;
  top: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%);
  font-size: calc(10px * var(--text-scale, 1));
}
.play-world[data-kind="basketball"] .world-object[data-world-object="ball"] {
  width: var(--basket-ball-size);
  min-height: var(--basket-ball-size);
  height: var(--basket-ball-size);
}
.play-world[data-kind="basketball"] .world-object[data-world-object="ball"] svg {
  width: 100%;
  height: 100%;
}
.play-world[data-kind="basketball"] .world-ball-shadow {
  width: calc(var(--basket-ball-size) * 0.8);
  height: 6px;
}
.play-world[data-kind="basketball"] .world-map path:first-of-type {
  display: initial;
}
.basket-shot-spots {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.basket-shot-spot {
  position: absolute;
  display: grid;
  place-items: center;
  width: 32px;
  height: 18px;
  transform: translate(-50%, -50%);
  border: 2px solid #fff4d8;
  border-radius: 50%;
  background: #c48c4e55;
  color: #90633b;
  font-size: 12px;
  font-weight: 700;
}
.basket-shot-spot[data-active="true"] {
  width: 42px;
  height: 24px;
  background: #fff0a1;
  border-color: #be8336;
  color: #765023;
  box-shadow: 0 0 0 5px #ffe5a755;
}
.basket-shot-spot[data-complete="true"] {
  background: #a4cfaa;
  border-color: #578768;
  color: #365d45;
}
.play-world[data-kind="basketball"] .world-object.is-scored[data-world-object="hoop"] svg {
  animation: none;
}
.play-world[data-kind="basketball"] .world-object.is-scored .basket-net {
  transform-origin: 60px 70px;
  animation: basket-net-swish 0.5s ease-out;
}
@keyframes basket-net-swish {
  0%,
  100% {
    transform: scale(1);
  }
  35% {
    transform: scale(0.88, 1.16);
  }
  65% {
    transform: scale(1.05, 0.96);
  }
}
@media (prefers-reduced-motion: reduce) {
  .play-world[data-kind="basketball"] .world-object.is-scored .basket-net {
    animation: none;
  }
}
html[data-calm="true"] .play-world[data-kind="basketball"] .world-object.is-scored .basket-net {
  animation: none;
}
.play-world[data-kind="basketball"] .world-objectives {
  min-height: calc(15px * var(--text-scale, 1));
}
.play-world[data-kind="basketball"] .world-header [role="status"] {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
/* A single game header owns back (first, at the left), the objective, game actions and view controls. */
.play-world[data-kind] .world-header {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-auto-flow: row;
  gap: 10px;
  padding: 10px 12px;
}
/* Sports keep the scoreboard close to the field without shrinking touch controls. */
@media (min-width: 851px) {
  .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-header {
    padding-block: 6px;
  }
}
.world-summary {
  min-width: 0;
}
.world-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}
.world-header .world-actions button {
  min-height: 44px;
}
.world-header .world-actions :is(.world-repeat, .world-info-toggle, .world-video) {
  width: 44px;
  flex: none;
}
.play-world[data-kind] .world-header #stage-toolbar {
  position: static;
  display: flex !important;
  min-width: 0;
  gap: 0;
  z-index: auto;
  align-self: center;
  padding-right: 10px;
  border-right: 1px solid #c7dfd7;
}
.play-world[data-kind]
  .world-header
  #stage-toolbar
  :is(#motion-status, #practice-bar, #play-entry) {
  display: none;
}
.world-header .stage-toolbar :is(.zoom-controls, .mobile-zoom) {
  margin: 0;
  box-shadow: none;
  background: #edf7f1;
  border-color: #c7dfd7;
}
.world-header .stage-toolbar .zoom-controls {
  padding: 2px;
}
.world-header .stage-toolbar :is(.zoom-controls, .mobile-zoom) button {
  min-height: 34px;
  height: 34px;
  width: 34px;
  border: 0;
  background: transparent;
  color: #316e5b;
}
.world-header .stage-toolbar output {
  color: #316e5b;
}
html[data-appearance="dark"] .world-header #stage-toolbar {
  border-color: #4f786c;
}
html[data-appearance="dark"] .world-header .stage-toolbar :is(.zoom-controls, .mobile-zoom) {
  background: #315348;
  border-color: #4f786c;
}
html[data-appearance="dark"] .world-header .stage-toolbar :is(button, output) {
  color: #e2f0e6;
}
@media (max-width: 700px) {
  .play-world[data-kind] .world-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: 9px;
  }

  .world-summary {
    grid-column: 2/-1;
    grid-row: 1;
  }

  .world-header #stage-toolbar {
    grid-column: 1/3;
    grid-row: 2;
    justify-self: start;
  }

  .play-world[data-kind] .world-header #stage-toolbar {
    border: 0;
    padding: 0;
  }

  .world-actions {
    grid-column: 3;
    grid-row: 2;
    gap: 5px;
  }

  .world-header .world-actions :is(.world-repeat, .world-info-toggle, .world-video) {
    width: 36px;
  }

  .world-header .world-actions button {
    min-height: 40px;
  }

  .world-header .stage-toolbar .mobile-zoom {
    width: max-content;
    height: auto;
    gap: 4px;
    padding-inline: 4px;
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  .play-world[data-kind] .world-header {
    gap: 6px;
    padding: 5px 8px;
  }




  .world-header .world-actions button {
    min-height: 36px;
  }
}
/* Keep zoom and game actions separate when one row cannot fit on a narrow phone. */
@media (max-width: 360px) {
  .world-header .world-actions {
    grid-column: 1/-1;
    grid-row: 3;
    justify-self: end;
  }
}
body.play-world-active #practice-bar {
  display: none;
}
/* Playground worlds share the bright illustrated language of the activity cards. */
.world-art {
  display: none;
  object-fit: contain;
  pointer-events: none;
}
.world-object .world-art.is-ready {
  display: block;
  width: 54px;
  height: 54px;
  filter: drop-shadow(0 4px 2px #315d792b);
}
.world-art.is-ready + svg {
  display: none;
}
.world-carry .world-art.is-ready,
.world-delivery .world-art.is-ready {
  display: block;
  width: 100%;
  height: 100%;
}
.world-object[data-world-object="ball"] .world-art.is-ready {
  width: 42px;
  height: 42px;
}
.play-world[data-kind="basketball"] .world-object[data-world-object="ball"] .world-art.is-ready {
  width: 100%;
  height: 100%;
}
.world-object span {
  border: 1px solid #d9e7e5;
  box-shadow: 0 2px 0 #4b796c15;
  font-weight: 700;
  padding: 2px 5px;
  background: #fffffff5;
}
.world-object[data-world-object="ball"].is-returning .world-art {
  animation: world-ball-return 0.35s ease-out;
}
.play-world .world-map {
  filter: drop-shadow(0 3px 0 #43867522);
}
.play-world[data-kind="park"] .world-header {
  background: #f6fffaf5;
  border-color: #8bc9b2;
  box-shadow:
    inset 0 2px 0 var(--color-surface),
    0 3px 0 #b4dacb;
}
.play-world[data-kind="soccer"] .world-header {
  background: #f1fff8f5;
  border-color: #81bfa5;
  box-shadow:
    inset 0 2px 0 var(--color-surface),
    0 3px 0 #9dd1b5;
}
.play-world[data-kind="basketball"] .world-header {
  background: #fff9ecf5;
  border-color: #dbb580;
  box-shadow:
    inset 0 2px 0 var(--color-surface),
    0 3px 0 #e3c495;
}
.play-world[data-kind="basketball"] .world-header strong {
  color: #85522e;
}
@media (max-width: 600px) {
  .world-object .world-art.is-ready {
    width: 44px;
    height: 44px;
  }
}
@media (max-height: 500px) {
  .world-object .world-art.is-ready {
    width: 38px;
    height: 38px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .world-object[data-world-object="ball"].is-returning .world-art {
    animation: none;
  }
}
html[data-calm="true"] .world-object[data-world-object="ball"].is-returning .world-art {
  animation: none;
}
html[data-appearance="dark"] .play-world .world-header {
  background: #243d43f5;
  border-color: #6eaa96;
  box-shadow: 0 3px 0 #173932;
}
html[data-appearance="dark"] .play-world[data-kind="basketball"] .world-header strong {
  color: #f3d9ac;
}
/* Only the current mission and carried item sit in front of the hero. */
.play-world[data-kind="park"] .world-targets {
  z-index: auto;
}
.play-world[data-kind="park"] .world-object {
  z-index: 0;
}
.play-world[data-kind="park"] .world-object[data-mission="true"] {
  z-index: 3;
}
.world-defenders {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.world-defender {
  position: absolute;
  display: block;
  transform: translate(-50%, -100%);
}
.world-defender svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 3px 1px #34665725);
}
.world-defender.is-hit svg {
  transform-origin: 50% 94%;
  animation: defender-hit 0.45s ease-out;
}
@keyframes defender-hit {
  25% {
    transform: rotate(12deg);
  }
  60% {
    transform: rotate(-7deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .world-defender.is-hit svg {
    animation: none;
  }
}
html[data-calm="true"] .world-defender.is-hit svg {
  animation: none;
}
.world-header .world-primary {
  box-shadow:
    inset 0 2px 0 #ffffff60,
    0 3px 0 #4d795f;
}

/* A finished round puts its next action where children are looking. */
.play-world[data-finished="true"] .world-objectives {
  display: none;
}
.play-world[data-finished="true"] .world-header .world-primary {
  position: fixed;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  z-index: 1;
  width: max-content;
  max-width: calc(100vw - 48px);
  min-height: 76px;
  padding: 18px 28px;
  border-width: 2px;
  border-radius: 22px;
  font-size: calc(22px * var(--text-scale, 1));
  font-weight: 800;
  line-height: 1.25;
  white-space: normal;
}

/* Games own their compact grid: field, controller (park), then game switcher. */
@media (max-width: 850px), (pointer: coarse) and (max-width: 1100px) {
  body.play-world-active main {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(252px, 1fr) 42px auto !important;
  }

  body.play-world-active .playground {
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: stretch;
    height: auto;
    max-height: none;
  }

  body.play-world-active main > .panel {
    grid-column: 1 !important;
    grid-row: 3 !important;
    min-height: 0;
    height: auto !important;
    align-self: stretch;
  }

  body.play-world-active:is(.soccer-world-active, .basketball-world-active) main {
    grid-template-rows: minmax(252px, 1fr) auto !important;
  }

  body.play-world-active:is(.soccer-world-active, .basketball-world-active) main > .panel {
    grid-row: 2 !important;
  }
}
@media (max-width: 850px) and (orientation: landscape) and (max-height: 500px),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) and (max-height: 500px) {
  body.play-world-active main {
    grid-template-rows: minmax(190px, 1fr) 42px auto !important;
  }

  body.play-world-active:is(.soccer-world-active, .basketball-world-active) main {
    grid-template-rows: minmax(190px, 1fr) auto !important;
  }
}

/* The game footer shares the viewport with the field on desktop, too. */
@media (min-width: 851px) and (pointer: fine), (min-width: 1101px) {
  body.play-world-active main {
    min-height: 0;
  }
  body.play-world-active .playground {
    position: relative;
    top: auto;
    align-self: stretch;
    height: auto;
    max-height: none;
  }
}

/* A compact toy dartboard, with its own aim surface above the hero canvas. */
.darts-game {
  position: absolute;
  z-index: 4;
  text-align: center;
  color: #214958;
}
.darts-target {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: crosshair;
  pointer-events: auto;
  touch-action: manipulation;
  border-radius: 50%;
}
.darts-target svg {
  display: block;
  width: 100%;
  overflow: visible;
}
.darts-target:disabled {
  opacity: 1;
  cursor: default;
}
.darts-target:focus-visible {
  outline: 4px solid #326580;
  outline-offset: 2px;
}
.darts-feedback {
  margin: 4px 0;
  min-height: 2.5em;
  font-weight: 800;
  font-size: calc(clamp(11px, 1.5vw, 15px) * var(--text-scale, 1));
  line-height: 1.25;
}
.darts-scoreboard {
  position: absolute;
  /* The left edge is set by darts-view.js: the scores sit at the far left, out of the darts' way. */
  top: 8px;
  padding: 8px;
  border: 2px solid #88afa2;
  border-radius: 12px;
  background: #f8f4df;
  box-shadow: 0 3px 0 #284b5a22;
}
.darts-score-heading {
  display: grid;
  gap: 3px;
  font-size: 11px;
  margin-bottom: 6px;
}
.darts-total {
  font-weight: 900;
  color: #26654e;
  white-space: nowrap;
}
.darts-results {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.darts-results > div {
  display: grid;
  border-radius: 6px;
  border: 1px solid #c4cfb8;
  background: #fffdf3;
  overflow: hidden;
}
.darts-results small {
  background: #e1e9db;
  font-size: 9px;
  padding: 1px;
}
.darts-results strong {
  font-size: 15px;
  padding: 3px 0;
}
.darts-results [data-scored="true"] {
  background: #f6dba3;
  border-color: #b88a53;
}
body.darts-world-active .world-aim-surface {
  display: none;
}
body.darts-world-active .mobile-controls {
  display: none !important;
}
@media (orientation: landscape) and (max-height: 500px) {
  .darts-scoreboard {
    position: absolute;
    top: 8px;
    width: 150px;
  }
  .darts-feedback {
    min-height: 0;
    position: absolute;
    right: calc(100% + 16px);
    top: 4px;
    width: 160px;
    font-size: calc(13px * var(--text-scale, 1));
  }
}
body:is(.darts-world-active, .panel-world-active) #movement-menu {
  display: none;
}

.darts-power {
  margin: 4px 8px 8px;
  font-size: 12px;
  font-weight: 800;
}
.darts-power-track {
  position: relative;
  height: 16px;
  margin: 6px 0;
  border: 2px solid #214958;
  border-radius: 9px;
  background: #e7c78c;
}
.darts-power-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  background: #41816a;
}
.darts-power-pointer {
  position: absolute;
  top: -5px;
  bottom: -5px;
  width: 4px;
  transform: translateX(-50%);
  background: #183d50;
  border: 1px solid #fff8df;
  border-radius: 3px;
}
.darts-power small {
  font-size: 10px;
}
@media (orientation: landscape) and (max-height: 500px) {
  .darts-power {
    position: absolute;
    right: calc(100% + 16px);
    top: 58px;
    width: 160px;
    margin: 0;
  }
}

.darts-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin-bottom: 6px;
}
.darts-modes button {
  pointer-events: auto;
  padding: 5px 2px;
  border: 1px solid #9db7a5;
  border-radius: 6px;
  background: #fffdf4;
  color: #31575c;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  min-height: 28px;
  cursor: pointer;
}
.darts-modes button[aria-pressed="true"] {
  background: #3f7865;
  color: #fff8e6;
  border-color: #315e50;
}
.darts-modes button:focus-visible {
  outline: 3px solid #e7b544;
  outline-offset: 2px;
}
@media (orientation: landscape) and (max-height: 500px) {
  .darts-scoreboard {
    padding: 5px;
  }
  .darts-modes {
    margin-bottom: 3px;
  }
  .darts-modes button {
    min-height: 24px;
    padding: 3px 1px;
  }
  .darts-score-heading {
    gap: 1px;
    margin-bottom: 3px;
  }
  .darts-results strong {
    padding: 2px 0;
  }
}

/* One moving axis per step; the dashed line keeps the previous choice visible. */
.darts-target[data-aiming="true"]::before,
.darts-target[data-aiming="true"]::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 1;
  background: #214958;
  box-shadow: 0 0 0 1.5px #fff8df;
  border-radius: 2px;
}
.darts-target::before {
  left: var(--aim-x);
  top: 10%;
  bottom: 10%;
  width: 3px;
  transform: translateX(-50%);
}
.darts-target::after {
  top: var(--aim-y);
  left: 10%;
  right: 10%;
  height: 3px;
  transform: translateY(-50%);
}
.darts-target[data-phase="aim"]::after {
  display: none;
}
.darts-target[data-phase="focus"]::before,
.darts-target[data-phase="power"]::before {
  background: repeating-linear-gradient(to bottom, #36745c 0 7px, transparent 7px 12px);
}
.darts-target[data-phase="power"]::after {
  background: repeating-linear-gradient(to right, #36745c 0 7px, transparent 7px 12px);
}

.darts-steps {
  list-style: none;
  padding: 0;
  margin: 6px 0;
  display: grid;
  gap: 2px;
  text-align: left;
  font-size: 10px;
  line-height: 1.3;
}
.darts-steps li {
  padding: 3px 4px;
  border-radius: 4px;
}
.darts-steps [aria-current="step"] {
  background: #214958;
  color: #fff8df;
  font-weight: 800;
}
.darts-steps [data-complete="true"] {
  color: #36745c;
}

/* Keep the landscape darts score strip secondary to the board. */
@media (orientation: landscape) and (min-width: 900px) and (min-height: 501px) {
  .play-world[data-kind="darts"] .world-header {
    padding: 2px 8px;
    gap: 8px;
    border-radius: 10px;
  }
  .play-world[data-kind="darts"] .world-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 10px;
  }
  .play-world[data-kind="darts"] .world-header [role="status"] {
    margin-top: 0;
  }
}

/* Tablets have room for readable controls beside the board. */
@media (orientation: landscape) and (min-width: 900px) and (min-height: 501px),
  (orientation: portrait) and (min-width: 600px) and (min-height: 800px) {
  .darts-scoreboard {
    padding: 12px;
  }
  .darts-modes {
    gap: 6px;
  }
  .darts-modes button {
    min-height: 44px;
    font-size: calc(12px * var(--text-scale, 1));
  }
  .darts-steps {
    gap: 4px;
    margin: 10px 0;
    font-size: calc(13px * var(--text-scale, 1));
  }
  .darts-steps li {
    padding: 6px;
  }
  .darts-score-heading {
    gap: 6px;
    font-size: calc(14px * var(--text-scale, 1));
    margin-bottom: 10px;
  }
  .darts-results small {
    font-size: 12px;
  }
  .darts-results strong {
    font-size: 20px;
    padding: 5px 0;
  }
  .darts-power {
    font-size: calc(14px * var(--text-scale, 1));
  }
  .darts-power small {
    font-size: calc(12px * var(--text-scale, 1));
  }
}

/* A single pad floats on the field at every viewport, leaving no extra grid row. */
body.play-world-active:is(.soccer-world-active, .basketball-world-active) main {
  grid-template-rows: minmax(190px, 1fr) auto !important;
}
body.play-world-active:is(.soccer-world-active, .basketball-world-active) main > .panel {
  grid-row: 2 !important;
}
body:is(.soccer-world-active, .basketball-world-active) #movement-menu {
  display: none;
}
body:is(.soccer-world-active, .basketball-world-active) .playground > .mobile-controls {
  --sports-key-size: clamp(44px, 4vw, 52px);
  display: grid;
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 12;
  width: max-content;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 8px;
  grid-template-columns: auto;
  grid-template-rows: auto;
  border: 1px solid var(--ad-line);
  border-radius: 18px;
  background: var(--ad-paper);
  box-shadow: 0 3px 0 var(--ad-base);
  cursor: default;
}
body:is(.soccer-world-active, .basketball-world-active)
  .playground
  > .mobile-controls
  .movement-block {
  display: contents;
}
body:is(.soccer-world-active, .basketball-world-active)
  .playground
  > .mobile-controls
  :is(.mobile-tools, .touch-label) {
  display: none;
}
body:is(.soccer-world-active, .basketball-world-active)
  .playground
  > .mobile-controls
  .mobile-dpad {
  position: static;
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-columns: repeat(3, var(--sports-key-size));
  grid-template-rows: repeat(2, var(--sports-key-size));
  gap: 5px;
}
body:is(.soccer-world-active, .basketball-world-active)
  .playground
  > .mobile-controls
  .mobile-dpad
  button {
  width: var(--sports-key-size);
  height: var(--sports-key-size);
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--tile-edge);
  border-radius: 12px;
  font-size: calc(24px * var(--text-scale, 1));
}
body:is(.soccer-world-active, .basketball-world-active)
  .playground
  > .mobile-controls
  #mobile-center {
  grid-column: 1;
  grid-row: 1;
  font-size: calc(11px * var(--text-scale, 1));
}
body:is(.soccer-world-active, .basketball-world-active)
  .playground
  > .mobile-controls
  #mobile-clean {
  grid-column: 3;
  grid-row: 1;
  font-size: calc(11px * var(--text-scale, 1));
}
body:is(.soccer-world-active, .basketball-world-active)
  .playground
  > .mobile-controls
  [data-direction="ArrowUp"] {
  grid-column: 2;
  grid-row: 1;
}
body:is(.soccer-world-active, .basketball-world-active)
  .playground
  > .mobile-controls
  [data-direction="ArrowLeft"] {
  grid-column: 1;
  grid-row: 2;
}
body:is(.soccer-world-active, .basketball-world-active)
  .playground
  > .mobile-controls
  [data-direction="ArrowDown"] {
  grid-column: 2;
  grid-row: 2;
}
body:is(.soccer-world-active, .basketball-world-active)
  .playground
  > .mobile-controls
  [data-direction="ArrowRight"] {
  grid-column: 3;
  grid-row: 2;
}
@media (orientation: landscape) and (max-height: 500px) {
  body:is(.soccer-world-active, .basketball-world-active) .playground > .mobile-controls {
    right: 6px;
    bottom: 6px;
    padding: 4px;
  }
}

/* Portrait tablets use the available space for readable play instructions and touch targets. */
@media (orientation: portrait) and (min-width: 600px) and (min-height: 800px) {
  .play-world[data-kind] .world-header {
    padding: 12px;
    gap: 10px;
  }
  .play-world[data-kind] .world-header strong {
    font-size: calc(18px * var(--text-scale, 1));
  }
  .play-world[data-kind] .world-header [role="status"] {
    font-size: calc(16px * var(--text-scale, 1));
    line-height: 1.4;
  }
  .play-world[data-kind] .world-header button {
    min-height: 48px;
    font-size: calc(16px * var(--text-scale, 1));
    padding-inline: 12px;
  }
  .play-world[data-kind] .world-header :is(.world-info-toggle, .world-video, .world-repeat) {
    min-width: 48px;
    width: 48px;
    padding-inline: 0;
  }
  #stage .play-world[data-kind] .world-header .world-close {
    min-height: 48px;
  }
  .play-world[data-kind="park"] .world-objectives {
    font-size: calc(14px * var(--text-scale, 1));
    gap: 10px;
  }
  .world-soccer-goal {
    width: 104px;
  }
  .world-soccer-goal svg {
    width: 96px;
    height: 96px;
  }
  .play-world[data-kind="park"] .world-object {
    width: 76px;
    min-height: 76px;
  }
  .play-world[data-kind="park"] .world-object :is(svg, .world-art.is-ready) {
    width: 72px;
    height: 72px;
  }
  .play-world[data-kind] .world-object span {
    font-size: calc(14px * var(--text-scale, 1));
  }
  body:is(.soccer-world-active, .basketball-world-active) .playground > .mobile-controls {
    --sports-key-size: 56px;
  }
  .darts-feedback {
    font-size: calc(17px * var(--text-scale, 1));
  }
  .world-soccer-help {
    font-size: calc(14px * var(--text-scale, 1));
  }
  .darts-steps,
  .darts-score-heading {
    font-size: calc(16px * var(--text-scale, 1));
  }
  .darts-modes button,
  .darts-results small {
    font-size: calc(14px * var(--text-scale, 1));
  }
  .darts-results strong {
    font-size: calc(24px * var(--text-scale, 1));
  }
}

/* Game header for young children: the main action is unmistakable and progress is shown as balls.
   Larger controls only where the header has room; phones keep their compact metrics. */
.play-world[data-kind] .world-header .world-actions .world-primary:not([data-phase="done"]) {
  border-color: #e08e00;
  border-bottom-width: 4px;
  background: #ffc857;
  color: #5a2b00;
  font-weight: 800;
}
.play-world[data-kind] .world-header .world-actions .world-primary[data-phase="aim"]::before {
  content: "✋ ";
}
.play-world[data-kind] .world-header .world-actions .world-primary[data-phase="power"] {
  border-color: #23594a;
  background: #2f7a5f;
  color: var(--color-surface);
}
.play-world[data-kind] .world-header .world-actions .world-primary:disabled {
  opacity: 0.6;
}
.play-world[data-kind] .world-goal-progress {
  width: 24px;
  height: 24px;
  border: 0;
  background: none;
  font-size: 20px;
  filter: grayscale(1);
  opacity: 0.3;
}
.play-world[data-kind] .world-goal-progress[data-collected="true"] {
  filter: none;
  opacity: 1;
  animation: goal-ball-pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1);
}
@keyframes goal-ball-pop {
  from {
    transform: scale(0.4);
  }
  to {
    transform: scale(1);
  }
}
@media (min-width: 701px) {
  .play-world[data-kind] .world-header strong {
    font-size: calc(18px * var(--text-scale, 1));
  }
  .play-world[data-kind] .world-header [role="status"] {
    font-size: calc(16px * var(--text-scale, 1));
    font-weight: 700;
    text-wrap: balance;
  }
  .play-world[data-kind] .world-header .world-actions .world-primary:not([data-phase="done"]) {
    min-width: 120px;
    font-size: calc(17px * var(--text-scale, 1));
  }
  .play-world[data-kind]
    .world-header
    .world-actions
    :is(.world-repeat, .world-info-toggle, .world-video) {
    font-size: calc(18px * var(--text-scale, 1));
    font-weight: 800;
  }
}
@media (prefers-reduced-motion: reduce) {
  .play-world[data-kind] .world-goal-progress[data-collected="true"] {
    animation: none;
  }
}

/* Compact games retain the global menu and release the footer row for the field. */
@media (max-width: 850px), (pointer: coarse) and (max-width: 1100px) {
  body.play-world-active main,
  body.play-world-active:is(.soccer-world-active, .basketball-world-active) main {
    grid-template-rows: minmax(190px, 1fr) !important;
  }

  body.play-world-active main > .panel {
    display: none !important;
  }
}

/* Phones: one mission line above the actions; the numeric score already counts the balls.
   Keep the full heading and guidance available to assistive technology. */
@media (max-width: 599px), (max-width: 850px) and (max-height: 500px) {
  .play-world[data-kind] .world-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 7.4px;
    padding: 6px;
  }

  .world-header .world-summary {
    grid-column: 2/-1;
    grid-row: 1;
  }

  .world-header #stage-toolbar {
    grid-column: 1/3;
    grid-row: 2;
    justify-self: start;
  }

  .play-world[data-kind] .world-header strong,
  .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-objectives {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .play-world[data-kind] .world-header [role="status"] {
    display: block;
    min-height: 0;
    margin: 0;
    line-height: 1.35;
  }

  .world-header .world-actions {
    grid-column: 3;
    grid-row: 2;
    gap: 6px;
  }

  .world-header .world-actions :is(.world-repeat, .world-info-toggle, .world-video) {
    width: 32px;
    min-width: 32px;
  }

  .play-world[data-kind] .world-header .stage-toolbar .mobile-zoom {
    gap: 4px;
    min-height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .world-header .stage-toolbar .mobile-zoom div {
    display: none;
  }

  .world-header .world-actions :is(.world-info-toggle, .world-video) {
    border-radius: 11px;
  }

  body.play-world-active main {
    padding-top: 1px;
    padding-bottom: 11px;
  }

  body:is(.soccer-world-active, .basketball-world-active) .playground > .mobile-controls {
    box-shadow:
      0 2px 0 var(--ad-base),
      0 3px 12px #24415b20;
  }

  body:is(.soccer-world-active, .basketball-world-active) .playground > .mobile-controls {
    --sports-key-size: 37.4px;
  }

  body:is(.soccer-world-active, .basketball-world-active)
    .playground
    > .mobile-controls
    .mobile-dpad
    button {
    min-height: var(--sports-key-size);
    font-size: calc(20.4px * var(--text-scale, 1));
  }

  body:is(.soccer-world-active, .basketball-world-active)
    .playground
    > .mobile-controls
    :is(#mobile-center, #mobile-clean) {
    font-size: calc(10px * var(--text-scale, 1));
  }
}

/* Editing the hero belongs to Explore; game movement keeps only directions. */
body.play-world-active :is(#mobile-center, #mobile-clean, #desktop-center, #desktop-clean) {
  display: none;
}
@media (max-width: 599px), (max-width: 850px) and (max-height: 500px) {
  body:is(.soccer-world-active, .basketball-world-active)
    .playground
    > .mobile-controls
    .mobile-dpad {
    grid-template-rows: var(--sports-key-size);
  }

  body:is(.soccer-world-active, .basketball-world-active)
    .playground
    > .mobile-controls
    [data-direction] {
    grid-row: 1;
  }

  body:is(.soccer-world-active, .basketball-world-active)
    .playground
    > .mobile-controls
    [data-direction="ArrowLeft"] {
    grid-column: 1;
  }
  body:is(.soccer-world-active, .basketball-world-active)
    .playground
    > .mobile-controls
    [data-direction="ArrowUp"] {
    grid-column: 2;
  }
  body:is(.soccer-world-active, .basketball-world-active)
    .playground
    > .mobile-controls
    [data-direction="ArrowDown"] {
    grid-column: 3;
  }
  body:is(.soccer-world-active, .basketball-world-active)
    .playground
    > .mobile-controls
    [data-direction="ArrowRight"] {
    grid-column: 4;
  }
}

.world-finished-action {
  display: none;
}

/* Landscape phones: back, goal, zoom and actions share one row so the stage keeps its height. */
@media (orientation: landscape) and (max-height: 500px) {
  .play-world[data-kind] .world-header {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
  }

  .world-header .world-summary {
    grid-column: 2;
  }

  .world-header #stage-toolbar {
    grid-column: 3;
    grid-row: 1;
  }

  .world-header .world-actions {
    grid-column: 4;
    grid-row: 1;
  }
}

/* Phone sports: an on-court scoreboard and a full-width dock for both thumbs. */
@media (max-width: 599px), (max-width: 850px) and (max-height: 500px) {
  .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-header {
    display: contents;
  }

  .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-summary {
    position: absolute;
    top: 14px;
    left: 22px;
    right: 22px;
    z-index: 9;
    padding: 6px 10px;
    border: 1px solid #ffffff80;
    border-radius: 10px;
    background: #194b40ed;
    color: #fff;
    box-shadow: 0 2px 4px #17393225;
    pointer-events: none;
  }

  .play-world[data-kind="basketball"] .world-summary {
    background: #6c431fed;
  }

  .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-header #stage-toolbar,
  .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-repeat {
    display: none !important;
  }

  .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-actions {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 21px;
    z-index: 13;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px;
    grid-template-rows: 40px 37.4px;
    gap: 8px;
    justify-self: stretch;
    pointer-events: none;
  }

  .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-actions button {
    pointer-events: auto;
  }

  .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-actions .world-primary {
    grid-column: 1;
    grid-row: 1;
  }

  .play-world:is([data-kind="soccer"], [data-kind="basketball"])
    .world-actions
    .world-finished-action:not([hidden]) {
    display: block;
    grid-column: 1;
    grid-row: 1;
    border-color: #d6b66b;
    background: #f4e5b8;
    color: #79653b;
    font-weight: 700;
    opacity: 0.65;
    box-shadow: none;
  }

  .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-actions .world-info-toggle {
    grid-column: 2;
    grid-row: 1;
  }

  /* Phone sports: the thumb dock's second slot, under help, plays the how-to-play video. Back left the
     dock at the user's request (2026-11-08): the header egg and the system back already leave the game. */
  #stage .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-close {
    display: none;
  }

  .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-actions .world-video {
    grid-column: 2;
    grid-row: 2;
    width: 32px;
    min-height: 37.4px;
    height: 37.4px;
  }

  body:is(.soccer-world-active, .basketball-world-active) .playground > .mobile-controls {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    padding: 56px 9px 8px;
    border-radius: 18px;
    background: var(--ad-paper);
  }

  body:is(.soccer-world-active, .basketball-world-active)
    .playground
    > .mobile-controls
    .mobile-dpad {
    width: calc(100% - 40px);
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-items: stretch;
  }
}

@media (max-width: 599px), (max-width: 850px) and (max-height: 500px) {
  body:is(.soccer-world-active, .basketball-world-active)
    .playground
    > .mobile-controls
    .mobile-dpad
    button {
    width: 100%;
  }
}

/* The hero's picnic: an order card, four foods, the basket and Ready, beside the hero. */
.picnic-game,
.pizza-game,
.zoo-game,
.shop-game,
.dress-game {
  position: absolute;
  z-index: 4;
  display: grid;
  gap: 8px;
  box-sizing: border-box;
  padding: 10px;
  overflow: auto;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: #5a3a1e;
  box-shadow: none;
  pointer-events: auto;
}
/* Only the family is inherited: each control sets its own size. */
.picnic-game button,
.pizza-game button,
.zoo-game button,
.shop-game button,
.dress-game button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
}
.picnic-game button:focus-visible,
.pizza-game button:focus-visible,
.zoo-game button:focus-visible,
.shop-game button:focus-visible,
.dress-game button:focus-visible {
  outline: 4px solid #326580;
  outline-offset: 2px;
}
.picnic-game :is(strong, small),
.pizza-game :is(strong, small),
.zoo-game :is(strong, small),
.shop-game :is(strong, small),
.dress-game :is(strong, small) {
  display: block;
}
.picnic-game small,
.pizza-game small,
.zoo-game small,
.shop-game small,
.dress-game small {
  font-size: calc(12px * var(--text-scale, 1));
  font-weight: 600;
}
/* Illustrated foods paint the icon's own box, so the box takes the size of its button's font. */
.picnic-game .choice-icon,
.picnic-ghost .choice-icon,
.pizza-game .choice-icon,
.pizza-ghost .choice-icon,
.zoo-game .choice-icon,
.shop-game .choice-icon,
.dress-game .choice-icon,
.zoo-ghost .choice-icon,
.shop-ghost .choice-icon,
.dress-ghost .choice-icon {
  display: inline-block;
  font-size: inherit;
  width: 1.15em;
  height: 1.15em;
  line-height: 1.15em;
  text-align: center;
  vertical-align: middle;
}
/* Show me and Ready share the bottom row; Ready takes the rest of it (all of it when Show me is hidden). */
.picnic-actions,
.pizza-actions,
.zoo-actions,
.shop-actions,
.dress-actions {
  display: flex;
  gap: 8px;
}
:is(.picnic-actions, .pizza-actions, .zoo-actions, .shop-actions, .dress-actions) > :last-child {
  flex: 1;
}
.picnic-hint,
.pizza-hint,
.zoo-hint,
.shop-hint,
.dress-hint {
  min-height: 52px;
  padding: 4px 12px;
  border: 2px solid #e3c25b;
  border-radius: 14px;
  background: #fff4c4;
  font-size: calc(14px * var(--text-scale, 1));
  text-align: start;
}
.picnic-hint[aria-pressed="true"],
.pizza-hint[aria-pressed="true"],
.zoo-hint[aria-pressed="true"],
.shop-hint[aria-pressed="true"],
.dress-hint[aria-pressed="true"] {
  background: #ffe58a;
}
/* The answer Show me gives, in Show me's own place and colours: the pictures of the order and how many. */
.picnic-reveal,
.pizza-reveal,
.zoo-reveal,
.shop-reveal,
.dress-reveal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 10px;
  min-height: 52px;
  margin: 0;
  padding: 4px 12px;
  box-sizing: border-box;
  border: 2px solid #e3c25b;
  border-radius: 14px;
  background: #ffe58a;
  font-size: calc(22px * var(--text-scale, 1));
}
.picnic-reveal-item b,
.pizza-reveal-item b,
.zoo-reveal-item b,
.shop-reveal-item b,
.dress-reveal-item b {
  margin-inline-start: 4px;
  font-size: calc(15px * var(--text-scale, 1));
}
.picnic-pantry,
.pizza-pantry,
.zoo-pantry,
.shop-pantry,
.dress-pantry {
  padding: 8px;
  border: 2px solid #f3d58c;
  border-radius: 24px;
  background: #fff7dc;
  box-shadow: 0 4px 0 #b6894a44;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.picnic-food,
.pizza-food,
.zoo-food,
.shop-food,
.dress-food {
  display: grid;
  place-items: center;
  min-height: 64px;
  padding: 4px;
  border: 3px solid #e6cfae;
  border-radius: 16px;
  background: #fff;
  font-size: 44px;
  touch-action: none;
  box-shadow: 0 3px 0 #d9bf9a;
}
.picnic-food[aria-pressed="true"],
.pizza-food[aria-pressed="true"],
.zoo-food[aria-pressed="true"],
.shop-food[aria-pressed="true"],
.dress-food[aria-pressed="true"] {
  border-color: #3c9a6c;
  background: #e5f7ea;
  box-shadow: 0 3px 0 #3c9a6c;
}
.picnic-basket-zone,
.pizza-basket-zone,
.zoo-basket-zone,
.shop-basket-zone,
.dress-basket-zone {
  position: relative;
  display: grid;
  justify-items: center;
  padding: 6px;
  border: 3px dashed #fff7d6;
  border-radius: 45% 45% 24px 24px;
  background: radial-gradient(ellipse at center, #fff8dcdd, #fff8dc44 70%);
}
.picnic-basket-zone.is-drop,
.pizza-basket-zone.is-drop,
.zoo-basket-zone.is-drop,
.shop-basket-zone.is-drop,
.dress-basket-zone.is-drop {
  border-color: #3c9a6c;
  background: #e5f7ea;
}
.picnic-contents,
.pizza-contents,
.zoo-contents,
.shop-contents,
.dress-contents {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  min-height: 44px;
  margin-bottom: -10px;
}
.picnic-item,
.pizza-item,
.zoo-item,
.shop-item,
.dress-item {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #ffffffcc;
  font-size: 28px;
}
.picnic-basket,
.pizza-basket,
.zoo-basket,
.shop-basket,
.dress-basket {
  width: min(160px, 70%);
  padding: 0;
  border: 0;
  background: transparent;
}
.picnic-basket svg,
.pizza-basket svg,
.zoo-basket svg,
.shop-basket svg,
.dress-basket svg {
  display: block;
  width: 100%;
  height: auto;
}
.picnic-food[data-problem="true"],
.picnic-item[data-problem="true"],
.pizza-food[data-problem="true"],
.pizza-item[data-problem="true"],
.zoo-food[data-problem="true"],
.shop-food[data-problem="true"],
.dress-food[data-problem="true"],
.zoo-item[data-problem="true"],
.shop-item[data-problem="true"],
.dress-item[data-problem="true"] {
  border-color: #d9773f;
  animation: picnic-nudge 0.5s ease-in-out 2;
}
@keyframes picnic-nudge {
  25% {
    transform: rotate(-6deg);
  }
  75% {
    transform: rotate(6deg);
  }
}
html[data-calm="true"] .picnic-game [data-problem="true"],
html[data-calm="true"] .pizza-game [data-problem="true"],
html[data-calm="true"] .zoo-game [data-problem="true"],
html[data-calm="true"] .shop-game [data-problem="true"],
html[data-calm="true"] .dress-game [data-problem="true"] {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .picnic-game [data-problem="true"],
  .pizza-game [data-problem="true"],
  .zoo-game [data-problem="true"],
  .shop-game [data-problem="true"],
  .dress-game [data-problem="true"] {
    animation: none;
  }
}
.picnic-feedback,
.pizza-feedback,
.zoo-feedback,
.shop-feedback,
.dress-feedback {
  padding: 8px 12px;
  border-radius: 18px;
  background: #fffaf0;
  box-shadow: 0 2px 0 #b6894a33;
  min-height: 2.6em;
  margin: 0;
  font-size: calc(15px * var(--text-scale, 1));
  text-align: center;
}
.picnic-feedback[data-kind="correct"],
.pizza-feedback[data-kind="correct"],
.zoo-feedback[data-kind="correct"],
.shop-feedback[data-kind="correct"],
.dress-feedback[data-kind="correct"] {
  color: #2f7d55;
}
.picnic-ready,
.pizza-ready,
.zoo-ready,
.shop-ready,
.dress-ready {
  min-height: 52px;
  border: 1px solid #28664f;
  border-radius: 14px;
  background: var(--color-action-confirm);
  color: var(--color-surface) !important;
  font-size: calc(17px * var(--text-scale, 1));
  font-weight: 800;
  box-shadow: 0 3px 0 #20553f;
}
.picnic-game button:disabled,
.pizza-game button:disabled,
.zoo-game button:disabled,
.shop-game button:disabled,
.dress-game button:disabled {
  cursor: default;
  opacity: 0.55;
}
.picnic-ghost,
.pizza-ghost,
.zoo-ghost,
.shop-ghost,
.dress-ghost {
  position: fixed;
  z-index: 50;
  font-size: 44px;
  pointer-events: none;
  transform: translate(-50%, -60%);
}
body.panel-world-active .world-aim-surface {
  display: none;
}
@media (max-width: 599px), (max-width: 850px) and (max-height: 500px) {
  .picnic-game,
  .pizza-game,
  .zoo-game,
  .shop-game,
  .dress-game {
    gap: 6px;
    padding: 8px;
  }
  .picnic-item,
  .pizza-item,
  .zoo-item,
  .shop-item,
  .dress-item {
    width: 36px;
    height: 36px;
    font-size: 24px;
  }
  .picnic-pantry,
  .pizza-pantry,
  .zoo-pantry,
  .shop-pantry,
  .dress-pantry {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .picnic-food,
  .pizza-food,
  .zoo-food,
  .shop-food,
  .dress-food {
    min-height: 52px;
    font-size: 34px;
  }
  .picnic-game small,
  .pizza-game small,
  .zoo-game small,
  .shop-game small,
  .dress-game small {
    display: none;
  }
}
/* Short landscape screens: foods, basket and the order with Ready side by side. */
@media (orientation: landscape) and (max-height: 500px) {
  .picnic-game,
  .pizza-game,
  .zoo-game,
  .shop-game,
  .dress-game {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 0.9fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    grid-template-areas:
      "pantry basket feedback"
      "pantry basket ready";
    align-items: start;
  }
  .picnic-pantry,
  .pizza-pantry,
  .zoo-pantry,
  .shop-pantry,
  .dress-pantry {
    grid-area: pantry;
  }
  .picnic-basket-zone,
  .pizza-basket-zone,
  .zoo-basket-zone,
  .shop-basket-zone,
  .dress-basket-zone {
    grid-area: basket;
    padding: 2px;
  }
  .picnic-feedback,
  .pizza-feedback,
  .zoo-feedback,
  .shop-feedback,
  .dress-feedback {
    grid-area: feedback;
    min-height: 0;
    padding: 4px 10px;
    line-height: 1.15;
    font-size: calc(12px * var(--text-scale, 1));
  }
  .picnic-actions,
  .pizza-actions,
  .zoo-actions,
  .shop-actions,
  .dress-actions {
    grid-area: ready;
  }
  :is(.picnic-actions, .pizza-actions, .zoo-actions, .shop-actions, .dress-actions) > * {
    min-height: 44px;
  }
  .picnic-food,
  .pizza-food,
  .zoo-food,
  .shop-food,
  .dress-food {
    min-height: 44px;
    font-size: 26px;
  }
  .picnic-basket,
  .pizza-basket,
  .zoo-basket,
  .shop-basket,
  .dress-basket {
    width: min(96px, 90%);
  }
  .picnic-contents,
  .pizza-contents,
  .zoo-contents,
  .shop-contents,
  .dress-contents {
    min-height: 32px;
  }
}

/* The tidy house: one room whose objects keep their place, the hero's hands and Undo. */
.house-game {
  position: absolute;
  z-index: 4;
  display: grid;
  gap: 8px;
  box-sizing: border-box;
  padding: 10px;
  overflow: auto;
  border: 3px solid #c9a07a;
  border-radius: 20px;
  background: #fff8ee;
  color: #4d3420;
  box-shadow: 0 4px 0 #b78b6155;
  pointer-events: auto;
}
.house-game button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
}
.house-game button:focus-visible {
  outline: 4px solid #326580;
  outline-offset: 2px;
}
.house-game :is(strong, small) {
  display: block;
}
.house-game small {
  font-size: calc(12px * var(--text-scale, 1));
  font-weight: 600;
}
.house-game .choice-icon {
  display: inline-block;
  font-size: inherit;
  width: 1.15em;
  height: 1.15em;
  line-height: 1.15em;
  text-align: center;
  vertical-align: middle;
}
.house-tools {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.house-undo,
.house-hint {
  min-height: 40px;
  padding: 4px 12px;
  border-radius: 14px;
  font-size: calc(14px * var(--text-scale, 1));
  text-align: start;
}
.house-undo {
  border: 2px solid #b9c7d3;
  background: #f1f6fa;
}
.house-undo[data-suggest="true"] {
  border-color: #d9773f;
  background: #ffe9d6;
}
.house-hint {
  border: 2px solid #e3c25b;
  background: #fff4c4;
}
.house-hint[aria-pressed="true"] {
  background: #ffe58a;
}
.house-reveal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  margin: 0;
  padding: 6px 8px;
  border-radius: 12px;
  background: #fff1c9;
  font-size: calc(22px * var(--text-scale, 1));
}
.house-reveal small {
  flex-basis: 100%;
}
.house-reveal-step b {
  margin-inline-end: 4px;
  font-size: calc(15px * var(--text-scale, 1));
}
/* The room dims with the lamp off; the wall stays readable in both states. */
.house-room {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas:
    "shelf lamp hook"
    "floor floor box";
  gap: 8px;
  padding: 8px;
  border-radius: 16px;
  background: linear-gradient(#fbe3c2 0 55%, #e2b27f 55%);
  transition: filter 0.3s;
}
.house-room[data-light="off"] {
  filter: brightness(0.82) saturate(0.85);
}
.house-place,
.house-lamp,
.house-object,
.house-hands {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 64px;
  padding: 4px;
  border: 3px solid #e6cfae;
  border-radius: 16px;
  background: #fffdf8;
  font-size: 36px;
  box-shadow: 0 3px 0 #d9bf9a;
}
.house-place[data-area="shelf"] {
  grid-area: shelf;
}
.house-place[data-area="hook"] {
  grid-area: hook;
}
.house-place[data-area="box"] {
  grid-area: box;
}
.house-lamp {
  grid-area: lamp;
}
.house-lamp[data-on="true"] {
  border-color: #f0c64a;
  background: #fff3b8;
  box-shadow:
    0 3px 0 #e0b23a,
    0 0 18px #ffe58a;
}
.house-hook-art {
  display: block;
  width: 1.6em;
}
.house-hook-art svg {
  display: block;
  width: 100%;
}
.house-floor {
  grid-area: floor;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 64px;
}
.house-object {
  min-width: 64px;
}
.house-hands {
  justify-self: center;
  min-width: 120px;
  border-style: dashed;
  font-size: 32px;
}
.house-hands-label {
  font-size: 24px;
}
.house-game [data-hint="true"] {
  border-color: #3c9a6c;
  box-shadow: 0 3px 0 #3c9a6c;
}
.house-feedback {
  min-height: 2.6em;
  margin: 0;
  font-size: calc(15px * var(--text-scale, 1));
  text-align: center;
}
.house-feedback[data-kind="correct"] {
  color: #2f7d55;
}
.house-game button:disabled {
  cursor: default;
  opacity: 0.55;
}
.house-hands:disabled {
  opacity: 0.8;
}
@media (max-width: 599px), (max-width: 850px) and (max-height: 500px) {
  .house-game {
    gap: 6px;
    padding: 8px;
  }
  .house-game small {
    display: none;
  }
  .house-place,
  .house-lamp,
  .house-object,
  .house-hands {
    min-height: 50px;
    font-size: 28px;
  }
  .house-object {
    min-width: 50px;
  }
}
/* Short landscape screens: the room beside the tools, hands and feedback. */
@media (orientation: landscape) and (max-height: 500px) {
  .house-game {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    grid-template-areas:
      "room tools"
      "room reveal"
      "room hands"
      "room feedback";
    align-items: start;
  }
  .house-room {
    grid-area: room;
    gap: 4px;
    padding: 4px;
  }
  .house-tools {
    grid-area: tools;
    flex-direction: column;
  }
  .house-hands {
    grid-area: hands;
  }
  .house-feedback {
    grid-area: feedback;
    min-height: 0;
    font-size: calc(12px * var(--text-scale, 1));
  }
  .house-reveal {
    grid-area: reveal;
    gap: 2px 8px;
    padding: 4px;
    font-size: calc(16px * var(--text-scale, 1));
  }
  .house-place,
  .house-lamp,
  .house-object,
  .house-hands {
    min-height: 42px;
    font-size: 24px;
  }
}
/* Brush your teeth: an open mouth in two arches of three tooth groups; each group gets cleaner with every stroke. */
.brush-game {
  position: absolute;
  z-index: 4;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  box-sizing: border-box;
  padding: 10px;
  overflow: auto;
  border: 3px solid #f5fcff;
  border-radius: 26px;
  background: linear-gradient(145deg, #edf9ff, #d2edff);
  color: #103c77;
  box-shadow: 0 0 0 2px #83c9f0, 0 5px 0 #68acd0;
  pointer-events: auto;
}
.brush-game > .brush-tools { grid-row: 2; }
.brush-game > .brush-reveal { grid-row: 1; }
.brush-game > .brush-mouth { grid-row: 2; }
.brush-game > .brush-legend { grid-row: 3; }
.brush-game > .brush-feedback { grid-row: 4; }
.brush-game button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
}
.brush-game button:focus-visible {
  outline: 4px solid #326580;
  outline-offset: 2px;
}
.brush-game :is(strong, small) {
  display: block;
}
.brush-game small {
  font-size: calc(12px * var(--text-scale, 1));
  font-weight: 600;
}
.brush-game .choice-icon {
  display: inline-block;
  font-size: inherit;
  width: 1.15em;
  height: 1.15em;
  line-height: 1.15em;
  text-align: center;
  vertical-align: middle;
}
.brush-tools {
  display: flex;
  grid-column: 1;
  align-self: start;
  justify-self: end;
  z-index: 2;
}
.brush-hint {
  min-height: 44px;
  padding: 4px 14px;
  border: 2px solid #e3c25b;
  border-radius: 14px;
  background: linear-gradient(#fffbed, #ffe58a);
  box-shadow: 0 3px 0 #ce9a25;
  font-size: calc(14px * var(--text-scale, 1));
  text-align: start;
}
.brush-hint[aria-pressed="true"] {
  background: #ffe58a;
}
.brush-reveal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 0;
  padding: 6px 8px;
  border-radius: 12px;
  background: #fff1c9;
  font-size: calc(22px * var(--text-scale, 1));
}
.brush-reveal small {
  flex-basis: 100%;
}
/* An open mouth: red lips around a dark inside, with the tongue between the two rows of teeth. */
.brush-mouth {
  position: relative;
  touch-action: none;
  user-select: none;
  display: grid;
  grid-template-columns: 27.77fr 4.08fr 36.3fr 4.08fr 27.77fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  align-self: stretch;
  grid-column: 1;
  min-width: 0;
  min-height: 0;
  row-gap: 9%;
  padding: 5% 6% 4%;
  align-content: center;
  box-sizing: border-box;
}
.brush-mouth > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0 5px 5px #853f5b40);
}
.brush-zone {
  position: relative;
  z-index: 1;
  display: block;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
}
/* Stagger the upper and lower groups so the rear crowns have room to round out. */
.brush-zone[data-brush-zone="tl"] { grid-area: 1 / 1 / 2 / 2; }
.brush-zone[data-brush-zone="tf"] { grid-area: 1 / 2 / 2 / 5; }
.brush-zone[data-brush-zone="tr"] { grid-area: 1 / 5 / 2 / 6; }
.brush-zone[data-brush-zone="bl"] { grid-area: 2 / 1 / 3 / 3; }
.brush-zone[data-brush-zone="bf"] { grid-area: 2 / 3 / 3 / 4; }
.brush-zone[data-brush-zone="br"] { grid-area: 2 / 4 / 3 / 6; }
.brush-teeth {
  display: block;
  width: 100%;
  height: 100%;
}
.brush-teeth svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.brush-crown {
  stroke: #b88479;
  stroke-width: .75;
  filter: drop-shadow(0 1.5px 1.5px #641e2c80);
}
/* Bottom teeth stand on the gum: the same drawing, upside down. */
.brush-zone[data-row="bottom"] .brush-teeth svg {
  transform: scaleY(-1);
}
/* Plaque: two spots per tooth with two strokes left, one with a single stroke, none when clean. */
.brush-plaque {
  fill: #a47133;
  opacity: .86;
}
.brush-zone[data-dirt="1"] .brush-plaque {
  opacity: .52;
}
.brush-zone[data-dirt="1"] .brush-plaque[data-n="1"],
.brush-zone[data-dirt="0"] .brush-plaque {
  display: none;
}
.brush-zone[data-dirt="0"] {
  filter: drop-shadow(0 0 5px #fff6b8);
}
/* Words of the orders under the mouth. */
.brush-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.brush-word {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 7px;
  border: 2px solid #a9cfee;
  background: #f6fbff;
  box-shadow: 0 2px 0 #a9cfee;
  border-radius: 12px;
  font-size: calc(12px * var(--text-scale, 1));
}
.brush-word[data-active="true"] {
  border-color: #3c9a6c;
  background: #d5fad9;
  box-shadow: 0 2px 0 #64ba7b;
}
.brush-mini {
  display: block;
  width: clamp(34px, 4vw, 56px);
  flex: none;
}
.brush-mini svg {
  display: block;
  width: 100%;
}
.brush-mini path {
  fill: #ead7da;
}
.brush-mini .is-marked {
  fill: #7bf2a7;
}
.brush-word :is(strong, small) {
  line-height: 1.1;
}
/* Trace the actual crowns so the hint points at teeth, even where the groups meet. */
.brush-zone[data-hint="true"] .brush-crown {
  stroke: #44e881;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 2px #39cf72);
}
.brush-sparkle {
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 22px;
  pointer-events: none;
}
.brush-brush {
  position: absolute;
  right: -2px;
  bottom: -6px;
  font-size: 34px;
  pointer-events: none;
  filter: drop-shadow(0 2px 1px #2d4a5766);
}
.brush-zone.is-brushing .brush-brush {
  animation: brush-scrub 0.45s ease-in-out;
}
@keyframes brush-scrub {
  0%,
  100% {
    transform: translateX(0) rotate(0);
  }
  25% {
    transform: translateX(-10px) rotate(-14deg);
  }
  75% {
    transform: translateX(6px) rotate(10deg);
  }
}
html[data-calm="true"] .brush-zone.is-brushing .brush-brush {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .brush-zone.is-brushing .brush-brush {
    animation: none;
  }
}
.brush-feedback {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 2.6em;
  margin: 0;
  padding: 6px 8px;
  border: 2px solid #f5fcff;
  border-radius: 16px;
  background: linear-gradient(#def5ff, #b6e4fc);
  font-size: calc(17px * var(--text-scale, 1));
  text-align: center;
}
@media (orientation: landscape) and (min-width: 900px) and (min-height: 501px) {
  .brush-game > .brush-legend {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .brush-word {
    justify-content: center;
  }
  .brush-word:last-child {
    grid-column: 2 / 4;
    justify-self: center;
  }
}
.brush-feedback[data-kind="correct"] {
  color: #2f7d55;
}
.brush-feedback[data-kind="wrong"] {
  color: #b5532a;
}
.brush-game button:disabled {
  cursor: default;
  opacity: 0.8;
}
@media (max-width: 599px), (max-width: 850px) and (max-height: 500px) {
  .brush-game {
    gap: 6px;
    padding: 8px;
  }
  .brush-game small {
    display: none;
  }
  .brush-game > .brush-mouth {
    row-gap: 8px;
  }
  .brush-word {
    padding: 2px;
  }
  .brush-mini {
    width: 28px;
  }
  .brush-brush {
    font-size: 26px;
  }
}
/* Short landscape screens: the mouth beside the hint and the feedback. */
@media (orientation: landscape) and (max-height: 500px) {
  .brush-game {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    grid-template-areas:
      "mouth tools"
      "mouth reveal"
      "mouth feedback";
    align-items: start;
  }
  .brush-mouth {
    grid-area: mouth;
    align-self: stretch;
  }
  .brush-game > .brush-tools {
    grid-area: tools;
  }
  .brush-game > .brush-reveal {
    grid-area: reveal;
    gap: 2px 6px;
    padding: 4px;
    font-size: calc(16px * var(--text-scale, 1));
  }
  .brush-game > .brush-feedback {
    grid-area: feedback;
    min-height: 0;
    font-size: calc(12px * var(--text-scale, 1));
  }
  .brush-legend {
    display: none;
  }
}
/* Phone game controls keep their drawn size; an invisible margin brings every touch target to about 44 px, and the smallest labels grow. */
@media (max-width: 599px) {
  :where(.mobile-controls [data-direction], .world-info-toggle, .world-video, .world-primary) {
    position: relative;
  }
  :is(
    .mobile-controls [data-direction],
    .world-info-toggle,
    .world-video,
    .world-primary,
    .world-close
  )::after {
    content: "";
    position: absolute;
    inset: -4px -3px;
  }
  .world-header :is(.world-info-toggle, .world-video)::after {
    inset: -4px -7px;
  }
}
.world-corner-flag span {
  font-size: calc(11px * var(--text-scale, 1));
}
.world-soccer-goal span,
.world-soccer-help {
  font-size: max(12px, calc(11px * var(--text-scale, 1)));
}
@media (max-width: 599px) {
  .world-close::after {
    inset: -6px -8px;
  }
}
/* Darts on a phone: the scoreboard and prompts were 9–11 px, too small for a child to read. */
@media (max-width: 599px) {
  body.darts-world-active .darts-modes button {
    min-height: 40px;
  }
  body.darts-world-active .darts-steps li,
  body.darts-world-active .darts-total,
  body.darts-world-active .darts-power strong {
    font-size: calc(12px * var(--text-scale, 1));
  }
  body.darts-world-active .darts-results small {
    font-size: calc(11px * var(--text-scale, 1));
  }
  body.darts-world-active .darts-feedback {
    font-size: calc(13px * var(--text-scale, 1));
  }
}
/* The words under the objects are what the game teaches: never below 12 px on a phone. */
@media (max-width: 599px) {
  .play-world[data-kind] .world-object:not(.world-corner-flag) span {
    font-size: max(12px, calc(10px * var(--text-scale, 1)));
  }
}
/* The goal the prompt asks for pulses, so the target is visible without reading. */
.world-soccer-goal.is-target svg {
  filter: drop-shadow(0 0 8px #ffd34d);
  animation: goal-target 1s ease-in-out infinite;
}
@keyframes goal-target {
  50% {
    transform: scale(1.08);
    filter: drop-shadow(0 0 14px #ffb300);
  }
}
html[data-calm="true"] .world-soccer-goal.is-target svg {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .world-soccer-goal.is-target svg {
    animation: none;
  }
}
/* The pizzeria shares the picnic panel; its pantry holds eight toppings and its basket is a round pizza. */
.pizza-game .pizza-pantry,
.zoo-game .zoo-pantry,
.shop-game .shop-pantry,
.dress-game .dress-pantry {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.pizza-game .pizza-food,
.zoo-game .zoo-food,
.shop-game .shop-food,
.dress-game .dress-food {
  min-height: 52px;
  font-size: 34px;
}
.pizza-zone,
.zoo-zone,
.shop-zone,
.dress-zone {
  position: relative;
  display: block;
  width: min(168px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 0;
  border: 3px dashed #fff7d6;
  border-radius: 50%;
  background: none;
}
.pizza-zone.is-drop,
.zoo-zone.is-drop,
.shop-zone.is-drop,
.dress-zone.is-drop {
  border-color: #3c9a6c;
  background: #e5f7ea;
}
.pizza-board,
.zoo-board,
.shop-board,
.dress-board {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.pizza-contents,
.zoo-contents,
.shop-contents,
.dress-contents {
  position: absolute;
  inset: 0;
  display: block;
  min-height: 0;
  margin: 0;
  pointer-events: none;
}
.pizza-item,
.zoo-item,
.shop-item,
.dress-item {
  position: absolute;
  width: 40px;
  height: 40px;
  border-color: transparent;
  background: transparent;
  /* Centred with margins, not a transform: the global :active press style replaces transform and would move the item out from under the finger. */
  margin: -20px 0 0 -20px;
  pointer-events: auto;
  filter: drop-shadow(0 2px 1px #4a2a1255);
}
.pizza-zone[data-baked="true"],
.zoo-zone[data-baked="true"],
.shop-zone[data-baked="true"],
.dress-zone[data-baked="true"] {
  border-style: solid;
  border-color: #ffd23f;
  box-shadow: 0 0 18px #ffb300aa;
}
.dress-contents .dress-item {
  pointer-events: none;
}
.dress-removals {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}
.dress-removals[hidden] {
  display: none;
}
.dress-game .dress-remove {
  min-width: 48px;
  min-height: 44px;
  padding: 4px 8px;
  border: 2px solid #c6dced;
  border-radius: 12px;
  background: var(--color-surface);
  font-size: 22px;
}
.dress-remove .choice-icon {
  width: 28px;
  height: 28px;
}
@media (orientation: landscape) and (min-width: 768px) and (min-height: 640px) {
  .dress-game .dress-remove {
    min-width: 88px;
    min-height: 88px;
  }
  .dress-remove .choice-icon {
    width: 48px;
    height: 48px;
  }
}
@media (max-width: 599px), (max-width: 850px) and (max-height: 500px) {
  .pizza-game .pizza-pantry,
  .zoo-game .zoo-pantry,
  .shop-game .shop-pantry,
  .dress-game .dress-pantry {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .pizza-game .pizza-food,
  .zoo-game .zoo-food,
  .shop-game .shop-food,
  .dress-game .dress-food {
    min-height: 44px;
    font-size: 28px;
  }
  .pizza-zone,
  .zoo-zone,
  .shop-zone,
  .dress-zone {
    width: min(150px, 100%);
  }
  .pizza-item,
  .zoo-item,
  .shop-item,
  .dress-item {
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    font-size: 22px;
  }
}
.pizza-served,
.zoo-served,
.shop-served,
.dress-served {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 64px;
  pointer-events: none;
  opacity: 0;
}
.pizza-served.is-on,
.zoo-served.is-on,
.shop-served.is-on,
.dress-served.is-on {
  animation: pizza-served 1.1s ease-out;
}
@keyframes pizza-served {
  0% {
    opacity: 0;
    transform: scale(0.4) rotate(-20deg);
  }
  25% {
    opacity: 1;
    transform: scale(1.25) rotate(8deg);
  }
  70% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-30px) scale(1);
  }
}
html[data-calm="true"] .pizza-served.is-on,
html[data-calm="true"] .zoo-served.is-on,
html[data-calm="true"] .shop-served.is-on,
html[data-calm="true"] .dress-served.is-on {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .pizza-served.is-on,
  .zoo-served.is-on,
  .shop-served.is-on,
  .dress-served.is-on {
    animation: none;
  }
}
/* Feeding the animals: a wide board with the hungry animal above a bowl. */
.zoo-zone ,
/* Feeding the animals: a wide board with the hungry animal above a bowl. */
.shop-zone,
.dress-zone {
  width: min(220px, 100%);
  aspect-ratio: 4 / 3;
  border-radius: 24px;
}
.zoo-board svg,
.shop-board svg,
.dress-board svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.zoo-animal,
.shop-animal {
  position: absolute;
  left: 0;
  right: 0;
  top: 2%;
  font-size: 72px;
  line-height: 1;
  text-align: center;
}
.zoo-animal.illustrated-icon,
.shop-animal.illustrated-icon {
  left: 50%;
  right: auto;
  width: 72px;
  height: 72px;
  margin-left: -36px;
}
@media (max-width: 599px), (max-width: 850px) and (max-height: 500px) {
  .zoo-zone,
  .shop-zone,
  .dress-zone {
    width: min(170px, 100%);
  }
  .zoo-animal.illustrated-icon,
  .shop-animal.illustrated-icon {
    width: 56px;
    height: 56px;
    margin-left: -28px;
  }
}
/* Portrait phones: a two-line hint fits its box instead of spilling over Ready. */
@media (max-width: 599px) and (orientation: portrait) {
  .picnic-feedback,
  .pizza-feedback,
  .zoo-feedback,
  .shop-feedback,
  .dress-feedback {
    padding: 6px 12px;
    line-height: 1.2;
  }
  .picnic-game,
  .pizza-game,
  .zoo-game,
  .shop-game,
  .dress-game {
    gap: 4px;
    padding: 6px;
  }
}

/* Getting dressed: a square board with the hero; each piece of clothing sits in its own place and the weather shows in the corner. */
.dress-zone {
  width: min(190px, 100%);
  aspect-ratio: 1;
  border-radius: 24px;
}
.dress-weather {
  position: absolute;
  left: 4%;
  top: 4%;
  width: 36px;
  height: 36px;
  font-size: 32px;
  line-height: 1;
  pointer-events: none;
}
.dress-weather.illustrated-icon {
  width: 36px;
  height: 36px;
}
@media (max-width: 599px), (max-width: 850px) and (max-height: 500px) {
  .dress-zone {
    width: min(150px, 100%);
  }
  .dress-weather {
    width: 28px;
    height: 28px;
    font-size: 24px;
  }
}

.world-hear-icon {
  display: none;
}
@media (max-width: 600px) {
  .play-world[data-kind] .world-header .world-actions .world-primary:has(.world-hear-icon) {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    padding-inline: 6px;
    font-size: 22px;
  }
  .world-hear-icon {
    display: inline;
  }
  .world-primary:has(.world-hear-icon) .world-primary-label {
    display: none;
  }
}

/* The English action and three steps already explain the phone darts controls. */
@media (max-width: 599px) {
  body.darts-world-active :is(.darts-game, .world-primary) .es-half {
    display: none;
  }
  body.darts-world-active .darts-modes button {
    font-size: calc(10px * var(--text-scale, 1));
  }
}

@media (max-width: 599px) {
  .world-info[open] {
    display: grid;
    box-sizing: border-box;
    max-height: calc(100dvh - 16px);
    padding: 12px;
    overflow: hidden;
  }
  .world-info-heading {
    margin-bottom: 8px;
  }
  .world-info-close {
    width: 44px;
    height: 44px;
  }
  .world-info ul {
    min-height: 0;
    overflow-y: auto;
    margin-bottom: 8px;
  }
  .world-info li {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 6px;
    padding: 8px;
  }
  /* The steps are three short lines, so their Spanish fits on phones too. */
  .world-info li small {
    font-size: calc(12px * var(--text-scale, 1));
  }
}

/* How to play motion demo: one 7.5 s loop in three beats of 2.5 s. Each step of the list lights up during its
   beat (--step × 2.5 s), so the moving picture and the words say the same thing at the same time. */
.world-info-demo {
  --demo-cycle: 7.5s;
  position: relative;
  container-type: inline-size;
  height: 108px;
  margin: 0 0 10px;
  overflow: hidden;
  border: 1px solid #cfe7d8;
  border-radius: 16px;
  background:
    radial-gradient(circle at 20% 0%, #ffffffcc, transparent 60%),
    linear-gradient(180deg, #dff3ff 0%, #eefaf1 62%, #cdeccf 62%, #bfe5c3 100%);
}
.world-info-demo > span {
  position: absolute;
  display: grid;
  place-items: center;
  line-height: 1;
  animation: var(--demo-cycle) ease-in-out infinite both;
}
.world-info-demo .demo-target {
  left: 72%;
  top: 22px;
  font-size: 44px;
}
.world-info-demo .demo-item {
  left: 10%;
  bottom: 14px;
  font-size: 34px;
}
.world-info-demo .demo-finger {
  z-index: 3;
  font-size: 30px;
  opacity: 0;
  filter: drop-shadow(0 2px 2px #24415b55);
}
.world-info-demo .demo-spark {
  z-index: 2;
  left: 74%;
  top: 10px;
  font-size: 34px;
  opacity: 0;
  animation-name: demo-spark;
}
.world-info-demo .demo-sound {
  left: calc(50% - 18px);
  top: 8px;
  font-size: 28px;
  animation-name: demo-sound;
}
/* Basketball draws its hoop: a backboard with an orange rim. */
.world-info-demo .demo-hoop {
  width: 46px;
  height: 34px;
  border: 3px solid #fff;
  border-radius: 4px;
  background: #ffffff88;
  box-shadow: 0 0 0 1px #9fb7c9;
}
.world-info-demo .demo-hoop::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -6px;
  height: 7px;
  border: 3px solid #f08a3c;
  border-radius: 0 0 10px 10px;
}
/* Shots and darts: an aiming line and a power bar with its green zone. */
.world-info-demo .demo-aim {
  left: calc(10% + 30px);
  bottom: 34px;
  width: 92px;
  height: 4px;
  border-radius: 4px;
  background: #f08a3c;
  transform-origin: 0 50%;
  animation-name: demo-sweep;
}
.world-info-demo .demo-aim::after {
  content: "";
  position: absolute;
  right: -8px;
  top: -5px;
  border: 7px solid transparent;
  border-left: 10px solid #f08a3c;
}
.world-info-demo .demo-power {
  left: 44%;
  bottom: 12px;
  width: 14px;
  height: 70px;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 8px;
  background: linear-gradient(0deg, #e9eef2 0 60%, #74c785 60% 82%, #e9eef2 82%);
  box-shadow: 0 0 0 1px #9fb7c9;
}
.world-info-demo .demo-power::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #f08a3cb0;
  transform-origin: 50% 100%;
  animation: demo-power var(--demo-cycle) ease-in-out infinite both;
}
.world-info-demo[data-demo="shot"] .demo-item {
  animation-name: demo-fly;
}
.world-info-demo[data-demo="shot"] .demo-finger {
  animation-name: demo-finger-shot;
}
/* Darts: the board in the middle, a side line, then a height line, then the power. */
.world-info-demo[data-demo="darts"] .demo-target {
  left: calc(50% - 30px);
  top: 18px;
  font-size: 64px;
}
.world-info-demo[data-demo="darts"] .demo-aim {
  left: 50%;
  top: 10px;
  bottom: 10px;
  width: 3px;
  height: auto;
  transform-origin: 50% 50%;
  animation-name: demo-line-x;
}
.world-info-demo[data-demo="darts"] .demo-aim-y {
  left: calc(50% - 50px);
  right: calc(50% - 50px);
  top: 50%;
  bottom: auto;
  width: auto;
  height: 3px;
  animation-name: demo-line-y;
}
.world-info-demo[data-demo="darts"] :is(.demo-aim)::after {
  display: none;
}
.world-info-demo[data-demo="darts"] .demo-power {
  left: auto;
  right: 12%;
}
.world-info-demo[data-demo="darts"] .demo-power::after {
  animation-name: demo-power-late;
}
.world-info-demo[data-demo="darts"] .demo-spark {
  left: calc(50% - 6px);
  top: 26px;
  animation-name: demo-spark-late;
}
.world-info-demo[data-demo="darts"] .demo-finger {
  animation-name: demo-finger-darts;
}
/* Carry games: tap a thing, tap where it goes, it travels there. */
.world-info-demo[data-demo="drag"] .demo-item {
  animation-name: demo-carry;
}
.world-info-demo[data-demo="drag"] .demo-finger {
  animation-name: demo-finger-carry;
}
/* Brushing: two taps on the same tooth, then it shines. */
.world-info-demo[data-demo="tap"] .demo-target {
  display: none;
}
.world-info-demo[data-demo="tap"] .demo-item {
  left: calc(50% - 22px);
  bottom: 18px;
  font-size: 46px;
  animation-name: demo-clean;
}
.world-info-demo[data-demo="tap"] .demo-spark {
  left: calc(50% + 12px);
  top: 22px;
}
.world-info-demo[data-demo="tap"] .demo-finger {
  animation-name: demo-finger-tap;
}
/* Park: tap a place and the hero walks to it. */
.world-info-demo[data-demo="walk"] .demo-item {
  animation-name: demo-walk;
}
.world-info-demo[data-demo="walk"] .demo-finger {
  animation-name: demo-finger-walk;
}
.world-info li {
  animation: demo-step var(--demo-cycle, 7.5s) ease-in-out infinite;
  animation-delay: calc(var(--step, 0) * 2.5s);
}
@keyframes demo-step {
  0%,
  30% {
    border-color: #74c785;
    background: #eaf8ee;
    box-shadow: 0 0 0 2px #74c78566;
  }
  34%,
  100% {
    box-shadow: none;
  }
}
@keyframes demo-sound {
  0%,
  6%,
  18%,
  30% {
    opacity: 1;
    transform: scale(1);
  }
  12%,
  24% {
    opacity: 1;
    transform: scale(1.2);
  }
  34%,
  100% {
    opacity: 0;
    transform: scale(0.8);
  }
}
@keyframes demo-spark {
  0%,
  80% {
    opacity: 0;
    transform: scale(0.4) rotate(-20deg);
  }
  86% {
    opacity: 1;
    transform: scale(1.3) rotate(10deg);
  }
  96% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
  100% {
    opacity: 0;
  }
}
@keyframes demo-spark-late {
  0%,
  90% {
    opacity: 0;
    transform: scale(0.4);
  }
  94% {
    opacity: 1;
    transform: scale(1.3);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes demo-sweep {
  0% {
    transform: rotate(-38deg);
  }
  9% {
    transform: rotate(14deg);
  }
  18% {
    transform: rotate(-38deg);
  }
  27%,
  66% {
    transform: rotate(-18deg);
    opacity: 1;
  }
  72%,
  100% {
    transform: rotate(-18deg);
    opacity: 0;
  }
}
@keyframes demo-power {
  0%,
  34% {
    transform: scaleY(0);
  }
  46% {
    transform: scaleY(1);
  }
  54% {
    transform: scaleY(0.2);
  }
  61%,
  100% {
    transform: scaleY(0.7);
  }
}
@keyframes demo-power-late {
  0%,
  67% {
    transform: scaleY(0);
  }
  78% {
    transform: scaleY(1);
  }
  84% {
    transform: scaleY(0.3);
  }
  90%,
  100% {
    transform: scaleY(0.7);
  }
}
@keyframes demo-fly {
  0%,
  66% {
    transform: none;
    opacity: 1;
  }
  76% {
    transform: translate(31cqw, -62px) scale(0.85);
  }
  84% {
    transform: translate(calc(62cqw + 6px), -40px) scale(0.7);
    opacity: 1;
  }
  92%,
  100% {
    transform: translate(calc(62cqw + 6px), -40px) scale(0.7);
    opacity: 0;
  }
}
@keyframes demo-line-x {
  0% {
    transform: translateX(-70px);
  }
  10% {
    transform: translateX(70px);
  }
  20% {
    transform: translateX(-70px);
  }
  28%,
  100% {
    transform: translateX(6px);
  }
}
@keyframes demo-line-y {
  0%,
  33% {
    transform: translateY(-34px);
    opacity: 0;
  }
  34% {
    opacity: 1;
  }
  43% {
    transform: translateY(34px);
  }
  52% {
    transform: translateY(-34px);
  }
  61%,
  100% {
    transform: translateY(-4px);
    opacity: 1;
  }
}
@keyframes demo-carry {
  0%,
  36% {
    transform: none;
  }
  40%,
  54% {
    transform: translateY(-14px) scale(1.15);
  }
  64%,
  100% {
    transform: translate(calc(62cqw + 4px), -18px) scale(0.8);
  }
}
@keyframes demo-clean {
  0%,
  44% {
    filter: sepia(0.8) brightness(0.8);
  }
  46% {
    transform: scale(0.94);
  }
  50% {
    filter: sepia(0.4) brightness(0.9);
    transform: none;
  }
  56% {
    transform: scale(0.94);
  }
  60%,
  100% {
    filter: none;
    transform: none;
  }
}
@keyframes demo-walk {
  0%,
  40% {
    transform: none;
  }
  45% {
    transform: translate(14cqw, -6px);
  }
  50% {
    transform: translate(28cqw, 0);
  }
  55% {
    transform: translate(42cqw, -6px);
  }
  62%,
  100% {
    transform: translate(128cqw, 0);
  }
}
/* The finger comes in, presses (scales down) on each tap, and leaves. Positions follow each scene. */
@keyframes demo-finger-shot {
  0%,
  16% {
    opacity: 0;
    transform: translate(calc(10cqw + 40px), 80px);
  }
  22% {
    opacity: 1;
    transform: translate(calc(10cqw + 40px), 70px);
  }
  26% {
    transform: translate(calc(10cqw + 40px), 70px) scale(0.8);
  }
  30% {
    transform: translate(calc(10cqw + 40px), 70px);
  }
  50% {
    opacity: 1;
    transform: translate(calc(44cqw - 4px), 70px);
  }
  58% {
    transform: translate(calc(44cqw - 4px), 70px) scale(0.8);
  }
  62% {
    opacity: 1;
    transform: translate(calc(44cqw - 4px), 70px);
  }
  68%,
  100% {
    opacity: 0;
    transform: translate(calc(44cqw - 4px), 90px);
  }
}
@keyframes demo-finger-darts {
  0%,
  16% {
    opacity: 0;
    transform: translate(calc(50cqw - 10px), 80px);
  }
  22% {
    opacity: 1;
    transform: translate(calc(50cqw - 10px), 66px);
  }
  27% {
    transform: translate(calc(50cqw - 10px), 66px) scale(0.8);
  }
  31%,
  56% {
    opacity: 1;
    transform: translate(calc(50cqw - 10px), 66px);
  }
  60% {
    transform: translate(calc(50cqw - 10px), 66px) scale(0.8);
  }
  64%,
  84% {
    opacity: 1;
    transform: translate(calc(50cqw - 10px), 66px);
  }
  89% {
    transform: translate(calc(50cqw - 10px), 66px) scale(0.8);
  }
  93%,
  100% {
    opacity: 0;
    transform: translate(calc(50cqw - 10px), 86px);
  }
}
@keyframes demo-finger-carry {
  0%,
  30% {
    opacity: 0;
    transform: translate(calc(10cqw + 4px), 96px);
  }
  36% {
    opacity: 1;
    transform: translate(calc(10cqw + 4px), 76px);
  }
  39% {
    transform: translate(calc(10cqw + 4px), 76px) scale(0.8);
  }
  42% {
    transform: translate(calc(10cqw + 4px), 76px);
  }
  52% {
    transform: translate(calc(72cqw + 4px), 60px);
  }
  55% {
    transform: translate(calc(72cqw + 4px), 60px) scale(0.8);
  }
  58% {
    opacity: 1;
    transform: translate(calc(72cqw + 4px), 60px);
  }
  66%,
  100% {
    opacity: 0;
    transform: translate(calc(72cqw + 4px), 90px);
  }
}
@keyframes demo-finger-tap {
  0%,
  34% {
    opacity: 0;
    transform: translate(calc(50cqw + 4px), 96px);
  }
  40% {
    opacity: 1;
    transform: translate(calc(50cqw + 4px), 70px);
  }
  45% {
    transform: translate(calc(50cqw + 4px), 70px) scale(0.8);
  }
  50% {
    transform: translate(calc(50cqw + 4px), 70px);
  }
  55% {
    transform: translate(calc(50cqw + 4px), 70px) scale(0.8);
  }
  60% {
    opacity: 1;
    transform: translate(calc(50cqw + 4px), 70px);
  }
  66%,
  100% {
    opacity: 0;
    transform: translate(calc(50cqw + 4px), 96px);
  }
}
@keyframes demo-finger-walk {
  0%,
  30% {
    opacity: 0;
    transform: translate(calc(72cqw + 6px), 96px);
  }
  36% {
    opacity: 1;
    transform: translate(calc(72cqw + 6px), 60px);
  }
  40% {
    transform: translate(calc(72cqw + 6px), 60px) scale(0.8);
  }
  44% {
    opacity: 1;
    transform: translate(calc(72cqw + 6px), 60px);
  }
  52%,
  100% {
    opacity: 0;
    transform: translate(calc(72cqw + 6px), 90px);
  }
}
html[data-appearance="dark"] .world-info-demo {
  border-color: #4f786c;
  background: linear-gradient(180deg, #2b4a66 0%, #2c4d5f 62%, #2f5f4c 62%, #2a5444 100%);
}
html[data-appearance="dark"] .world-info li {
  animation-name: demo-step-dark;
}
@keyframes demo-step-dark {
  0%,
  30% {
    border-color: #74c785;
    background: #315e50;
    box-shadow: 0 0 0 2px #74c78566;
  }
  34%,
  100% {
    box-shadow: none;
  }
}
@media (max-width: 599px) {
  .world-info[open] {
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  }
  .world-info-demo {
    height: 96px;
    margin-bottom: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .world-info-demo > span,
  .world-info-demo .demo-power::after,
  .world-info li {
    animation: none;
  }
}
.world-info-demo[data-demo="tap"] .demo-sound {
  left: calc(50% - 70px);
}
/* The how-to-play video of the sports worlds: the recorded phone game, as large as the screen allows. */
.world-video-dialog {
  box-sizing: border-box;
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 14px;
  border: 2px solid #9fcfb5;
  border-radius: 22px;
  background: #f6fff8;
  color: #2f5f55;
  box-shadow: 0 18px 60px #24415b40;
}
.world-video-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
}
.world-video-dialog::backdrop {
  background: #254a6b88;
  backdrop-filter: blur(2px);
}
.world-video-dialog .world-info-heading {
  margin: 0;
}
.world-video-dialog h2 {
  margin: 0;
  font-size: calc(22px * var(--text-scale, 1));
  color: #2b6d5b;
}
.world-video-dialog h2 + p {
  margin: 3px 0 0;
  font-size: calc(13px * var(--text-scale, 1));
  color: #56806f;
}
.world-video-clip {
  justify-self: center;
  width: auto;
  max-width: 100%;
  height: 100%;
  max-height: calc(100dvh - 190px);
  border-radius: 16px;
  /* The poster is also the background, so the box shows the game before the first frame decodes. */
  background: #dfeee6 center / cover no-repeat;
  box-shadow: 0 0 0 1px #cfe7d8;
  object-fit: contain;
}
.world-header .world-video {
  color: #b2416a;
  border-color: #e7a9bf;
  font-size: calc(13px * var(--text-scale, 1));
}
html[data-appearance="dark"] .world-video-dialog {
  background: #21394f;
  border-color: #5f9a79;
  color: #e2f0e6;
}
html[data-appearance="dark"] .world-video-dialog h2 {
  color: #a5dbc1;
}
html[data-appearance="dark"] .world-video-dialog h2 + p {
  color: #b8d6c6;
}
html[data-appearance="dark"] .world-header .world-video {
  color: #f3a9c4;
}

/* The colour word of the soccer prompt: tinted text on the phone scoreboard, a marker pill when wide. */
.play-world .world-color {
  background: none;
  color: inherit;
  font-weight: 800;
}
.play-world .world-color[data-color="yellow"] {
  color: #ffe46b;
}
.play-world .world-color[data-color="red"] {
  color: #ffb3bd;
}
.play-world .world-color[data-color="blue"] {
  color: #b9d6ff;
}

/* Sports header redesign (2026-11-08, user's mockup), tablets and desktop: two floating rows above the
   field. Row 1 tells what is happening (back, game, count, balls, the prompt with its colour marked, hear
   again and help); row 2 holds the tools (zoom on the left, the video and the big Stop on the right).
   Phones keep their thumb dock; landscape phones (max-height 500px) keep their single row. */
@media (min-width: 600px) and (min-height: 501px) {
  #stage .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-header {
    isolation: isolate;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-rows: auto auto;
    grid-template-areas:
      "back summary summary info"
      "tools tools video primary";
    align-items: center;
    gap: 14px 10px;
    padding: 8px 12px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  /* The two rows are drawn as pills behind the controls. */
  #stage .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-header::before,
  #stage .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-header::after {
    content: "";
    z-index: -1;
    grid-column: 1 / -1;
    align-self: stretch;
    margin: -5px -4px;
    border: 1px solid #ffffffd9;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #eef6fd 100%);
    box-shadow:
      0 4px 0 #cfe0ef,
      0 8px 18px #24415b1f;
  }
  #stage .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-header::before {
    grid-row: 1;
  }
  #stage .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-header::after {
    grid-row: 2;
  }
  #stage
    .play-world:is([data-kind="soccer"], [data-kind="basketball"])
    .world-header
    .world-actions {
    display: contents;
  }
  #stage .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-header .world-close {
    grid-area: back;
    min-height: 48px;
    padding-inline: 14px 18px;
    border: 2px solid #f1b3c6;
    border-radius: 999px;
    background: linear-gradient(180deg, #fff 0%, #fdeef3 100%);
    color: #a33a5f;
    font-weight: 800;
    box-shadow: 0 3px 0 #efc2d1;
  }
  /* Title · count · balls · prompt, on one line that wraps only when it must. */
  #stage
    .play-world:is([data-kind="soccer"], [data-kind="basketball"])
    .world-header
    .world-summary {
    grid-area: summary;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    min-width: 0;
    padding-left: 14px;
    border-left: 2px solid #d7e5f1;
  }
  #stage .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-summary > strong {
    order: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #234f78;
    font-size: calc(24px * var(--text-scale, 1));
    font-weight: 800;
  }
  #stage .play-world[data-kind="soccer"] .world-summary > strong::before {
    content: "⚽";
  }
  #stage .play-world[data-kind="basketball"] .world-summary > strong::before {
    content: "🏀";
  }
  #stage
    .play-world:is([data-kind="soccer"], [data-kind="basketball"])
    .world-summary
    [role="status"] {
    display: contents;
    font-size: calc(17px * var(--text-scale, 1));
  }
  #stage .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-count {
    order: 2;
    padding: 5px 14px;
    border: 2px solid #d7e5f1;
    border-radius: 999px;
    background: #fff;
    color: #2d5578;
    font-size: calc(16px * var(--text-scale, 1));
    font-weight: 800;
    white-space: nowrap;
  }
  #stage .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-objectives {
    order: 3;
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin: 0;
  }
  #stage .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-goal-progress {
    width: 26px;
    height: 26px;
    font-size: 22px;
  }
  #stage .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-soccer-help {
    display: none;
  }
  #stage .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-prompt {
    order: 4;
    padding-left: 14px;
    border-left: 2px solid #d7e5f1;
    color: #234f78;
    font-size: calc(18px * var(--text-scale, 1));
    font-weight: 700;
  }
  /* The " · " text node between count and prompt is not needed when they are separate pills. */
  #stage
    .play-world:is([data-kind="soccer"], [data-kind="basketball"])
    .world-summary
    [role="status"] {
    color: transparent;
  }
  #stage
    .play-world:is([data-kind="soccer"], [data-kind="basketball"])
    .world-summary
    [role="status"]
    > * {
    color: #234f78;
  }
  #stage .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-color {
    padding: 0 6px;
    border-radius: 6px;
    color: inherit;
    font-weight: 800;
  }
  #stage .play-world .world-color[data-color="yellow"] {
    background: #ffe46b;
    color: #234f78;
  }
  #stage .play-world .world-color[data-color="red"] {
    background: #ffc4cc;
    color: #234f78;
  }
  #stage .play-world .world-color[data-color="blue"] {
    background: #cfe2ff;
    color: #234f78;
  }
  /* Hear again sits just left of help, both at the right end of the first row. */
  #stage
    .play-world:is([data-kind="soccer"], [data-kind="basketball"])
    .world-header
    .world-repeat {
    grid-area: info;
    justify-self: end;
    margin-right: 60px;
  }
  #stage
    .play-world:is([data-kind="soccer"], [data-kind="basketball"])
    .world-header
    .world-info-toggle {
    grid-area: info;
    justify-self: end;
  }
  #stage
    .play-world:is([data-kind="soccer"], [data-kind="basketball"])
    .world-header
    :is(.world-repeat, .world-info-toggle, .world-video) {
    width: 50px;
    min-width: 50px;
    height: 50px;
    min-height: 50px;
    padding: 0;
    border: 2px solid #bcd4ea;
    border-radius: 50%;
    background: linear-gradient(180deg, #fff 0%, #e9f2fb 100%);
    color: #234f78;
    font-size: calc(22px * var(--text-scale, 1));
    font-weight: 800;
    box-shadow: 0 3px 0 #c7d9ea;
  }
  #stage .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-header .world-video {
    grid-area: video;
    border-color: #f1b3c6;
    background: linear-gradient(180deg, #fff 0%, #fdeef3 100%);
    color: #b2416a;
    box-shadow: 0 3px 0 #efc2d1;
  }
  #stage
    .play-world:is([data-kind="soccer"], [data-kind="basketball"])
    .world-header
    #stage-toolbar {
    grid-area: tools;
    justify-self: start;
  }
  #stage
    .play-world:is([data-kind="soccer"], [data-kind="basketball"])
    .world-header
    .world-primary,
  #stage
    .play-world:is([data-kind="soccer"], [data-kind="basketball"])
    .world-header
    .world-finished-action:not([hidden]) {
    grid-area: primary;
    min-width: 200px;
    min-height: 54px;
    padding-inline: 22px;
    border-radius: 999px;
    font-size: calc(20px * var(--text-scale, 1));
    font-weight: 800;
  }
  #stage
    .play-world:is([data-kind="soccer"], [data-kind="basketball"])
    .world-header
    .world-primary {
    position: relative;
    margin-left: 6px;
  }
  /* A thin divider between the video and the big button, as in the mockup. */
  #stage
    .play-world:is([data-kind="soccer"], [data-kind="basketball"])
    .world-header
    .world-primary::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    border-radius: 2px;
    background: #d7e5f1;
  }
  html[data-appearance="dark"]
    #stage
    .play-world:is([data-kind="soccer"], [data-kind="basketball"])
    .world-header::before,
  html[data-appearance="dark"]
    #stage
    .play-world:is([data-kind="soccer"], [data-kind="basketball"])
    .world-header::after {
    border-color: #4f6f8c;
    background: linear-gradient(180deg, #2b455c 0%, #233a4f 100%);
    box-shadow: 0 4px 0 #1a2d3e;
  }
  html[data-appearance="dark"]
    #stage
    .play-world:is([data-kind="soccer"], [data-kind="basketball"])
    :is(.world-summary > strong, .world-prompt, .world-summary [role="status"] > *) {
    color: #e2f0e6;
  }
  html[data-appearance="dark"]
    #stage
    .play-world:is([data-kind="soccer"], [data-kind="basketball"])
    .world-count {
    background: #21394f;
    border-color: #4f6f8c;
  }
  html[data-appearance="dark"] #stage .play-world .world-color {
    color: #234f78;
  }
}

/* The Spanish line under a game's instruction (the English stays the main text). */
.world-status-es {
  display: block;
  margin-top: 1px;
  color: #56806f;
  font-size: calc(13px * var(--text-scale, 1));
  font-weight: 600;
  line-height: 1.25;
}
.world-status-es[hidden] {
  display: none;
}
html[data-appearance="dark"] .world-status-es {
  color: #b8d6c6;
}
/* Wide sports header: the Spanish line closes the first row, under the English prompt. */
@media (min-width: 600px) and (min-height: 501px) {
  #stage .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-status-es {
    order: 5;
    flex-basis: 100%;
    margin: -2px 0 0;
    padding-left: 2px;
    color: #4a6f88;
    font-size: calc(14px * var(--text-scale, 1));
  }
}
/* Phone sports scoreboard and phone-landscape rows sit on a dark chip: a light Spanish line. */
@media (max-width: 599px), (max-width: 850px) and (max-height: 500px) {
  .play-world:is([data-kind="soccer"], [data-kind="basketball"]) .world-status-es {
    color: #cfe9dc;
    font-size: calc(12px * var(--text-scale, 1));
  }
}

/* Every Play world's top card is blue-edged, with the Spanish line in blue and the help, video and hear buttons in
   soft blue, pink and gold. The rest of this block is the Little shop's own look: a bright room with a raised goods
   tray, a dashed counter, a speech bubble from the hero and a green Ready pill. The other panel games keep the
   shared look below the card. */
.play-world[data-kind] .world-header {
  border: 2px solid var(--refresh-line);
  background: linear-gradient(#f4faff, #e5f1ff);
  box-shadow: 0 4px 0 var(--refresh-cfe2f2);
}
.play-world[data-kind] .world-header :is(strong, [role="status"]) {
  color: var(--refresh-ink);
}
.play-world[data-kind] .world-header .world-status-es {
  color: #3b78c4;
}
#stage .play-world[data-kind] .world-header button.world-close {
  border-color: var(--refresh-line-strong);
  background: linear-gradient(var(--refresh-white), var(--refresh-sky-soft));
  box-shadow: 0 3px 0 var(--refresh-cfe2f2);
  color: var(--refresh-ink);
}
.play-world[data-kind] .world-header .world-info-toggle {
  border-color: var(--refresh-line-strong);
  background: linear-gradient(var(--refresh-white), var(--refresh-sky-soft));
  box-shadow: 0 3px 0 var(--refresh-cfe2f2);
  color: var(--refresh-ink);
}
.play-world[data-kind] .world-header .world-video {
  border-color: #f2a6c2;
  background: linear-gradient(#fff, #ffe6ef);
  box-shadow: 0 3px 0 #f6cddd;
  color: #3b2f5a;
}
.shop-pantry {
  border: 3px solid #f6dc9a;
  border-radius: 28px;
  background: linear-gradient(#fff8e2, #ffeec4);
  box-shadow:
    0 6px 0 #e8c874,
    0 12px 18px rgb(120 90 40 / 0.16);
}
.shop-food {
  border: 3px solid #b9d6f5;
  border-radius: 18px;
  background: linear-gradient(var(--refresh-white), #e9f4ff);
  box-shadow: 0 4px 0 #9fc0e6;
}
.shop-food[aria-pressed="true"] {
  border-color: #4cbb7f;
  background: linear-gradient(#f2fff7, #d9f5e5);
  box-shadow:
    0 4px 0 #3c9a6c,
    0 0 0 4px rgb(76 187 127 / 0.28);
}
.shop-basket-zone {
  border: 3px dashed #a9c8ee;
  border-radius: 30px;
  background: rgb(255 255 255 / 0.42);
}
.shop-basket-zone.is-drop {
  border-color: #4cbb7f;
  background: rgb(217 245 229 / 0.75);
}
/* The hero talks: a white bubble with a tail toward the hero, on the left of the panel. */
.shop-feedback {
  position: relative;
  border: 3px solid #bfe3cf;
  border-radius: 24px;
  background: var(--refresh-white);
  box-shadow: 0 4px 0 #d3ecdd;
  color: var(--refresh-ink);
  font-weight: 800;
}
.shop-feedback::before {
  content: "";
  position: absolute;
  inset-inline-start: -9px;
  bottom: 14px;
  width: 14px;
  height: 14px;
  background: var(--refresh-white);
  border-inline-start: 3px solid #bfe3cf;
  border-bottom: 3px solid #bfe3cf;
  transform: rotate(45deg);
}
.shop-feedback[data-kind="correct"] {
  color: #1f7a4d;
}
.shop-ready {
  min-height: 52px;
  border: 3px solid var(--refresh-white);
  border-radius: 999px;
  background: linear-gradient(var(--refresh-green-high), var(--refresh-green-low));
  box-shadow:
    0 0 0 2px var(--refresh-green-rim),
    0 4px 0 var(--refresh-green-base);
  text-shadow: 0 1px 0 rgb(30 90 25 / 0.35);
}
html[data-appearance="dark"] .shop-feedback {
  background: #2b455c;
  border-color: #4f786c;
  color: #e2f0e6;
}

/* Phones (portrait): every Play world's top card has exactly two lines. The first holds the way back and the English
   instruction across the rest of the width; the second holds the Spanish on the left and the game's buttons on the
   right. The button's second word ("again") is dropped so the Spanish keeps its room. */
@media (max-width: 599px) and (orientation: portrait) {
  .play-world[data-kind]:not([data-kind="soccer"], [data-kind="basketball"]) .world-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 3px 8px;
    padding: 6px 9px 8px;
    align-items: center;
  }
  #stage .play-world[data-kind]:not([data-kind="soccer"], [data-kind="basketball"]) .world-header .world-close {
    grid-column: 1;
    grid-row: 1;
    min-height: 38px;
    height: 38px;
    padding-block: 0;
  }
  .play-world[data-kind]:not([data-kind="soccer"], [data-kind="basketball"]) .world-header .world-actions {
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
    gap: 5px;
  }
  .play-world[data-kind]:not([data-kind="soccer"], [data-kind="basketball"]) .world-header .world-actions button {
    min-height: 38px;
  }
  .play-world[data-kind]:not([data-kind="soccer"], [data-kind="basketball"]) .world-header .world-primary-more {
    display: none;
  }
  .play-world[data-kind]:not([data-kind="soccer"], [data-kind="basketball"]) .world-header .world-actions :is(.world-info-toggle, .world-video) {
    min-width: 34px;
    width: 34px;
    padding-inline: 0;
  }
  .play-world[data-kind]:not([data-kind="soccer"], [data-kind="basketball"]) .world-header .world-summary {
    display: contents;
  }
  .play-world[data-kind]:not([data-kind="soccer"], [data-kind="basketball"]) .world-header .world-summary > [role="status"] {
    grid-column: 2 / -1;
    grid-row: 1;
    min-width: 0;
  }
  .play-world[data-kind]:not([data-kind="soccer"], [data-kind="basketball"]) .world-header .world-summary > .world-status-es {
    grid-column: 1 / 3;
    grid-row: 2;
    min-width: 0;
  }
  /* Without the back pill (the header egg is the way back) the buttons rise next to the English line. */
  .play-world[data-kind]:not([data-kind="soccer"], [data-kind="basketball"]) .world-header:has(> .world-close[data-back-to="missions"]) .world-actions {
    grid-row: 1;
  }
  .play-world[data-kind]:not([data-kind="soccer"], [data-kind="basketball"]) .world-header:has(> .world-close[data-back-to="missions"]) .world-summary > [role="status"] {
    grid-column: 1 / 3;
    align-self: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .play-world[data-kind]:not([data-kind="soccer"], [data-kind="basketball"]) .world-header:has(> .world-close[data-back-to="missions"]) .world-summary > .world-status-es {
    grid-column: 1 / -1;
  }
  /* The zoom tools live below the stage on a phone: nothing of them is left in the card to add a row. */
  .play-world[data-kind] .world-header #stage-toolbar {
    grid-column: 1 / -1;
    grid-row: 2;
    height: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
  }
}

/* A finished game shows the results card (Play again, next game, way back) a moment after the balloons: the old
   centered "Play again" and "Finished" buttons of the header no longer flash before it. */
.play-world[data-finished="true"] .world-header .world-primary,
.play-world[data-finished="true"] .world-header .world-finished-action {
  display: none !important;
}
