html, body { background: #ffe9a8; }
#game { background: radial-gradient(circle at 20% 10%, #fff6cf, #ffe9a8 60%, #ffd98a); }

/* progress row */
#slots { position: absolute; z-index: 10; top: 1.5vh; left: 3vw; right: 12vh; display: flex; gap: 1.2vh; justify-content: center;
  align-items: center; height: 8vh; pointer-events: none; }
.slot { width: 6vh; height: 6vh; }
.slot svg { width: 100%; height: 100%; overflow: visible; }
.slot.on { animation: pop .5s; }
@keyframes pop { 40% { transform: scale(1.6) rotate(-10deg); } }

/* layout: piece on the left, board on the right (landscape) */
#stage { position: absolute; left: 3vw; right: 3vw; top: 12vh; bottom: 10vh; display: flex; gap: 3vw; align-items: stretch; }
#pieceArea { position: relative; z-index: 5; flex: 0 0 30%; display: flex; align-items: center; justify-content: center; }
#piece { cursor: pointer; filter: drop-shadow(0 1vh .8vh #0003); animation: bob 2s ease-in-out infinite alternate; }
#piece svg { width: 100%; height: 100%; overflow: visible; display: block; }
@keyframes bob { to { translate: 0 -1.2vh; } }
#piece.wiggle svg { animation: wiggle .5s; }
@keyframes wiggle { 25% { transform: rotate(-10deg); } 50% { transform: rotate(9deg); } 75% { transform: rotate(-5deg); } }

#board { flex: 1; border-radius: 4vh; padding: 2vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: repeating-linear-gradient(95deg, #e0b070 0 7vh, #d9a566 7vh 7.6vh, #e3b878 7.6vh 14vh);
  box-shadow: inset 0 .5vh 0 #ffffff55, 0 1.2vh 0 #a9733a, 0 2vh 2vh #0004; }
.row { display: flex; justify-content: center; }
.hole { cursor: pointer; flex: none; }
.hole svg { width: 100%; height: 100%; overflow: visible; display: block; }
.hole.shake { animation: shake .5s; }
@keyframes shake { 20%,60% { transform: translateX(-1.2vh); } 40%,80% { transform: translateX(1.2vh); } }
.hole.flash { animation: flash .6s; }
@keyframes flash { 40% { transform: scale(1.12); filter: brightness(1.5); } }
.hole.hint { animation: glow .8s ease-in-out infinite alternate; z-index: 3; }
@keyframes glow { from { transform: scale(1); filter: drop-shadow(0 0 1vh #fff) drop-shadow(0 0 2vh #ffeb3b); }
                  to   { transform: scale(1.1); filter: drop-shadow(0 0 2vh #fff) drop-shadow(0 0 4vh #ffeb3b); } }
.spark { position: absolute; z-index: 6; width: 2vh; height: 2vh; border-radius: 50%; pointer-events: none; }

#doneShapes { display: flex; flex-wrap: wrap; gap: 1.5vh; justify-content: center; max-width: 80vw; }
#doneShapes svg { width: 9vh; height: 9vh; overflow: visible; animation: bounce 1s ease-in-out infinite alternate; }
#doneShapes svg:nth-child(odd) { animation-delay: .25s; }
@keyframes bounce { to { transform: translateY(-1.5vh) rotate(6deg); } }

/* portrait phones: piece on top, board beneath */
@media (max-aspect-ratio: 1/1) {
  #slots { top: 2vw; right: 18vw; height: 13vw; gap: 1.2vw; }
  .slot { width: 9vw; height: 9vw; }
  #stage { flex-direction: column; top: 17vw; bottom: 17vw; gap: 3vw; }
  #pieceArea { flex: 0 0 28%; }
  #board { padding: 3vw; border-radius: 6vw; }
  #doneShapes svg { width: 15vw; height: 15vw; }
}
