.toys-root {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  color: #f7f3ff;
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-user-select: none;
  user-select: none;
}
.toys-root *, .toys-root *::before, .toys-root *::after { box-sizing: border-box; }
.toys-root button {
  color: inherit;
  font: inherit;
  cursor: pointer;
  border: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
.toys-root button:focus-visible { outline: 4px solid #fff; outline-offset: 5px; }
.toys-bubble-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 3vw, 26px);
  padding: 18px 3px 12px;
  max-width: 490px;
  margin: auto;
}
.toys-bubble {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: 100%;
  min-width: 70px;
  min-height: 70px;
  max-height: 148px;
  padding: 7px;
  border-radius: 50%;
  background: transparent;
  isolation: isolate;
}
.toys-bubble:active { transform: none; }
.toys-orb {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: block;
  border-radius: 50%;
  background: var(--toys-colour);
  box-shadow: inset -5px -7px 0 var(--toys-shadow), inset 4px 4px 0 #ffffff40, 0 9px 20px #03081930;
  animation: toys-float 4.6s ease-in-out infinite;
  animation-delay: var(--toys-delay);
  transition: opacity 140ms ease-out;
  pointer-events: none;
}
.toys-orb::before {
  content: "";
  position: absolute;
  width: 22%;
  height: 11%;
  top: 18%;
  left: 18%;
  border-radius: 50%;
  transform: rotate(-36deg);
  background: #fff9;
}
.toys-orb::after {
  content: "";
  position: absolute;
  width: 9%;
  height: 9%;
  top: 31%;
  left: 15%;
  border-radius: 50%;
  background: #fff6;
}
.toys-bubble.toys-popped .toys-orb { opacity: 0; animation: none; }
.toys-bubble.toys-popped::after {
  content: "";
  position: absolute;
  inset: 15%;
  border: 2px dashed #ffffff25;
  border-radius: 50%;
}
.toys-burst { position: absolute; inset: 0; pointer-events: none; }
.toys-burst i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 11px;
  margin: -5px;
  border-radius: 50%;
  background: var(--toys-colour);
  opacity: 0;
}
.toys-popped .toys-burst i { animation: toys-pop 400ms ease-out both; }
.toys-colour-word {
  margin: 12px 0 8px;
  min-height: 40px;
  text-align: center;
  color: #ded3ff;
  font-weight: 800;
  font-size: clamp(26px, 6vw, 34px);
  line-height: 1.2;
}
.toys-music-stage {
  position: relative;
  display: grid;
  place-items: center;
  height: 84px;
  overflow: hidden;
}
.toys-stage-note {
  display: block;
  color: #c7a6ff;
  font-size: 65px;
  line-height: 1;
  transform: rotate(-8deg);
  transition: transform 160ms ease-out;
}
.toys-stage-playing .toys-stage-note { transform: rotate(8deg) scale(1.16); }
.toys-floating-note {
  position: absolute;
  top: 48%;
  font-size: 28px;
  pointer-events: none;
  animation: toys-note-rise 650ms ease-out both;
}
.toys-keyboard {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 9px;
}
.toys-key {
  display: flex;
  grid-column: span 2;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  min-width: 70px;
  min-height: 108px;
  padding: 12px 4px;
  border-radius: 23px;
  background: var(--toys-colour);
  box-shadow: 0 7px 0 var(--toys-shadow), inset 0 2px 0 #ffffff60;
  transition: transform 80ms ease-out, box-shadow 80ms ease-out;
}
.toys-key:nth-child(n + 4) { grid-column: span 3; }
.toys-key.toys-key-playing, .toys-key:active {
  transform: translateY(5px);
  box-shadow: 0 2px 0 var(--toys-shadow), inset 0 2px 0 #ffffff60;
  transition: none;
}
.toys-key-symbol { color: #23304c; font-size: 44px; font-weight: 750; line-height: 1; }
.toys-key-label { color: #23304c; font-size: 18px; font-weight: 800; }
.toys-melody {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 70px;
  width: min(100%, 240px);
  margin: 19px auto 0;
  padding: 12px 20px;
  border-radius: 22px;
  background: #c8b7f42b;
  box-shadow: inset 0 0 0 1px #dacfff40;
  font-size: 18px !important;
  font-weight: 700 !important;
}
.toys-melody > span:first-child { font-size: 22px; color: #d5c4ff; }
.toys-melody.toys-melody-playing { background: #c8b7f44a; }
@keyframes toys-float { 0%, 100% { transform: translateY(2px); } 50% { transform: translateY(-3px); } }
@keyframes toys-pop {
  0% { transform: rotate(var(--toys-angle)) translateX(20px) scale(.6); opacity: 1; }
  75% { opacity: .9; }
  100% { transform: rotate(var(--toys-angle)) translateX(53px) scale(.2); opacity: 0; }
}
@keyframes toys-note-rise {
  0% { transform: translateY(9px) rotate(-10deg); opacity: 1; }
  100% { transform: translateY(-48px) rotate(16deg); opacity: 0; }
}
@media (min-width: 560px) {
  .toys-keyboard { grid-template-columns: repeat(5, minmax(70px, 1fr)); }
  .toys-key, .toys-key:nth-child(n + 4) { grid-column: auto; min-height: 176px; }
  .toys-music-stage { height: 108px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .toys-root { max-width: 720px; }
  .toys-bubble-board { grid-template-columns: repeat(6, minmax(70px, 1fr)); max-width: 720px; gap: 10px; padding-top: 8px; }
  .toys-colour-word { margin-top: 3px; }
  .toys-music-stage { height: 43px; }
  .toys-stage-note { font-size: 38px; }
  .toys-keyboard { grid-template-columns: repeat(5, minmax(70px, 1fr)); }
  .toys-key, .toys-key:nth-child(n + 4) { grid-column: auto; min-height: 78px; padding: 6px; }
  .toys-key-symbol { font-size: 32px; }
  .toys-key-label { font-size: 15px; }
  .toys-melody { margin-top: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .toys-root *, .toys-root *::before, .toys-root *::after { animation: none !important; transition: none !important; }
  .toys-floating-note { display: none; }
  .toys-stage-playing .toys-stage-note { transform: none; }
}
