.playground {
  max-width: 1050px;
  display: grid;
  align-content: start;
  gap: 22px;
  padding-top: 26px;
}

.playground-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}

.playground-heading h1 {
  font-size: clamp(28px, 4vw, 42px);
  padding-inline: 4px;
}

.playground-hero {
  isolation: isolate;
  position: relative;
  display: grid;
  align-items: center;
  overflow: hidden;
  gap: 24px;
  padding: 32px clamp(20px, 5vw, 56px);
  border: 2px solid #a1bd83;
  border-radius: 28px;
  background: radial-gradient(ellipse at 17% 115%, #9ec779 0 33%, transparent 33.3%),
              radial-gradient(ellipse at 88% 124%, #b6d98b 0 42%, transparent 42.3%),
              linear-gradient(#a8ddf1 55%, #e0efbf 100%);
  box-shadow: 0 6px 0 #d6e2bc;
}

.hero-sheet {
  position: absolute; width: 54%; max-width: 150px; aspect-ratio: 4 / 5;
  left: 0; top: 8%; transform: rotate(-12deg);
  background: #fff9e6; border: 2px solid #c5aa77; border-radius: 9px;
  box-shadow: 3px 5px 0 #4c663d25;
}
.hero-sheet img { position: absolute; left: 8%; bottom: 7%; width: 64%; image-rendering: pixelated; }
.heart-sticker, .star-sticker {
  position: absolute; font: bold clamp(27px, 4.5vw, 54px)/1 system-ui, sans-serif;
  paint-order: stroke fill; -webkit-text-stroke: 6px white; filter: drop-shadow(0 2px 1px #6e714d50);
}
.heart-sticker { top: 9%; left: 12%; color: #c35a54; }
.star-sticker { top: 28%; right: 11%; color: #f3b443; }
.sky-cloud {
  position: absolute;
  z-index: -1;
  width: clamp(38px, 10%, 102px);
  height: 28px;
  background: #fffcec;
  border-radius: 100px 100px 15px 15px;
}
.sky-cloud::before {
  content: '';
  position: absolute;
  width: 49%; aspect-ratio: 1;
  left: 23%; bottom: 25%;
  background: inherit; border-radius: 50%;
}
.cloud-left { left: 13%; top: 35%; }
.cloud-right { right: 13%; top: 25%; }
.duck-play { position: relative; display: grid; justify-items: end; width: min(100%, 330px); justify-self: center; }
.duck-touch {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: clamp(160px, 26vw, 220px);
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 32px;
  touch-action: manipulation;
}
.duck-touch img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.duck-body { clip-path: inset(24% 0 0); }
.duck-sprout {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 76%);
  transform-origin: 49% 24%;
}
.duck-shadow {
  position: absolute; bottom: 5px; right: 8%; width: 44%; height: 13px;
  border-radius: 50%; background: #31561e36;
}
.duck-sparkles {
  position: absolute;
  top: 1%; right: 12%;
  color: #fffbe0;
  text-shadow: 0 2px 0 #658f42;
  font: 30px/1 Jua, sans-serif;
}
.duck-touch:hover .duck-sparkles { color: #ffec91; }
.duck-touch.taking-off { animation: duck-hop 760ms ease-in-out; }
.taking-off .duck-sprout { animation: sprout-turn 190ms ease-in-out 4; }
.taking-off .duck-sparkles { animation: sprout-spin 380ms linear 2; }
@keyframes duck-hop {
  0%, 100% { transform: none; }
  18% { transform: translateY(3px) scale(1.04, .96); }
  52% { transform: translateY(-25px) rotate(-8deg); }
  74% { transform: translateY(-15px) rotate(5deg); }
}
@keyframes sprout-spin { to { transform: rotate(360deg) scale(1.3); } }
@keyframes sprout-turn { 50% { transform: scaleX(.22); } }

.play-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.play-card {
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  border: 2px solid var(--card-border);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 5px 0 var(--card-border);
}
.play-card:hover, .story-link:hover { filter: brightness(1.035); }
.play-card:active, .story-link:active { transform: translateY(3px); }
.card-label {
  word-break: keep-all;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-height: 49px;
  padding: 5px clamp(12px, 4vw, 30px);
  font: clamp(21px, 4.5vw, 30px) Jua, sans-serif;
}
.card-label span { font-size: .78em; }
.card-scene { position: relative; overflow: hidden; display: grid; place-items: center; height: clamp(108px, 19vw, 163px); }
.card-scene img { position: absolute; height: 82%; width: auto; image-rendering: pixelated; }
.draw-card { --card-border: #dbc17d; }
.draw-card .card-scene { background: #ffe9af; }
.draw-card img { right: 12%; bottom: 5%; }
.draw-paper {
  position: absolute; top: 13%; left: 18%; height: 72%; aspect-ratio: 1.12;
  border: 2px solid #e6cc92; border-radius: 9px;
  background: #fffdf3; transform: rotate(-10deg);
}
.draw-mark {
  position: absolute; left: 25%; top: 19%;
  color: #b64f47; font-size: clamp(28px, 7vw, 51px); transform: rotate(-10deg);
}
.draw-crayon { position: absolute; left: 23%; bottom: 7%; font-size: clamp(23px, 5vw, 37px); }
.run-card { --card-border: #92af86; }
.run-card .card-scene { background: #ccebf1; }
.run-card img { height: 77%; left: 24%; top: 3%; transform: rotate(-12deg); }
.run-trail {
  position: absolute; inset: auto 0 0; height: 26%;
  border-top: 6px solid #91bd70;
  background: repeating-linear-gradient(118deg, #ead195 0 24px, #e0bf80 24px 27px);
}
.run-rock {
  position: absolute; bottom: 19%; right: 19%; width: 20%; height: 39%;
  clip-path: polygon(0 100%, 10% 54%, 36% 12%, 72% 5%, 95% 50%, 100% 100%);
  background: linear-gradient(155deg, #b6a794 58%, #877968 59%);
}
.shop-card { --card-border: #d6aa79; }
.shop-card .card-scene { background: #f9dfbb; }
.shop-display {
  position: absolute;
  width: min(85%, 270px);
  height: 68%;
  border: 2px solid #debb94;
  border-radius: 12px;
  background: repeating-linear-gradient(135deg, #fff8e8 0 14px, #ffefda 14px 28px);
}
.shop-card .shop-front { left: 49%; bottom: 6%; transform: rotate(12deg); }
.shop-card .shop-side { right: 51%; bottom: 11%; height: 71%; transform: rotate(-14deg); }
.make-card { --card-border: #a5b683; }
.make-card .card-scene { background: #e7efcd; }
.make-sheet {
  position: absolute;
  display: grid;
  place-items: center;
  grid-template-columns: 1fr .55fr;
  grid-template-rows: 1fr 1fr;
  height: 75%;
  aspect-ratio: 1.34;
  border: 2px dashed #a7b785;
  border-radius: 10px;
  background: #fffdf1;
  transform: translateX(-8%) rotate(-10deg);
}
.make-sheet img { position: static; grid-row: span 2; height: auto; width: 100%; }
.make-sheet span { color: #be655b; font: clamp(15px, 4vw, 27px) Jua, sans-serif; }
.make-sheet span:last-child { color: #7a9c4a; }
.make-scissors { position: absolute; left: 65%; bottom: 6%; font-size: clamp(25px, 5vw, 45px); }
.story-link {
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(10px, 3vw, 22px);
  min-height: 136px; padding: 12px clamp(12px, 3vw, 24px);
  border: 2px solid #c6bbd1; border-radius: 16px;
  background: #f4edf8; box-shadow: 0 3px 0 #e0d5e9;
  font: clamp(22px, 3.5vw, 32px) Jua, sans-serif;
}
.story-link-art {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 min(36%, 264px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid #c6bbd1;
  border-radius: 12px;
  background: #e9dff2;
}
.story-preview {
  position: absolute;
  inset: 0;
  background: #d8edf2;
}
.story-preview canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.story-link-art img { width: 70%; height: 90%; position: absolute; object-fit: contain; image-rendering: pixelated; }
.story-link-copy { display: grid; gap: 4px; margin-inline-end: auto; }
.story-link-description {
  color: #594866;
  font: 15px/1.45 system-ui, sans-serif;
  word-break: keep-all;
}

@media (max-width: 760px) {
  .playground { gap: 12px; padding-top: 12px; }
  .playground-hero { grid-template-columns: 1fr; gap: 14px; border-radius: 20px; padding: 20px; }
  .duck-play { width: 230px; max-width: 100%; }
  .duck-touch { width: 142px; }
  .hero-sheet { width: 90px; }
  .play-choices { gap: 10px; }
  .play-card { border-radius: 15px; }
  .card-label { font-size: max(16px, 4.5vw); padding-inline: 10px; }
  .draw-card img { right: 3%; }
  .draw-paper { left: 9%; }
  .draw-mark { left: 20%; }
  .draw-crayon { left: 15%; }
}
@media (prefers-reduced-motion: reduce) {
  .duck-touch.taking-off { animation: duck-highlight 650ms ease; }
  .taking-off .duck-sprout { animation: none; }
  .taking-off .duck-sparkles { animation: none; color: #ffdf52; }
  @keyframes duck-highlight { 50% { filter: brightness(1.17); } }
}
