.play {
  height: 100%;
  display: flex;
  align-items: stretch;
  gap: 16px;
  padding: 92px 20px 16px;
}

.side {
  width: clamp(170px, 19vw, 250px);
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.side .bubble {
  margin-bottom: 0;
  max-width: 100%;
  text-align: center;
  cursor: pointer;
}

.side .bubble::after {
  left: 50%;
  bottom: -12px;
  margin-left: -12px;
  border: 12px solid transparent;
  border-top-color: var(--card);
  border-bottom: 0;
}

.owl {
  width: clamp(90px, 12vw, 150px);
  animation: bob 2.6s ease-in-out infinite;
  filter: drop-shadow(0 8px 10px rgba(61, 58, 92, 0.18));
  cursor: pointer;
}

.stage {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.round-dots {
  display: flex;
  gap: 10px;
  flex: none;
}

.round-dots i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
}

.round-dots i.now {
  box-shadow: 0 0 0 4px var(--butter-deep);
}

.round-dots i.ok {
  background: var(--butter-deep);
}

.item-wrap {
  --thing: min(44vw, 28vh, 240px);
  flex: 1;
  min-height: 0;
  width: 100%;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.thing {
  position: relative;
  z-index: 5;
  width: var(--thing);
  height: var(--thing);
  max-height: 100%;
  aspect-ratio: 1;
  padding: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.78);
  border: 6px solid #fff;
  border-radius: 50%;
  box-shadow: var(--shadow);
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
}

.thing.go {
  transition: transform 0.48s cubic-bezier(0.3, 0.9, 0.4, 1), opacity 0.48s ease;
}

.thing.dragging {
  cursor: grabbing;
  pointer-events: none;
  z-index: 20;
}

.thing.gone {
  opacity: 0;
}

.thing img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 6px 6px rgba(61, 58, 92, 0.18));
}

.thing img.pop {
  animation: pop-in 0.4s cubic-bezier(0.2, 1.4, 0.4, 1);
}

body:not([data-phase="play"]) .thing {
  cursor: default;
}

.baskets {
  flex: none;
  width: 100%;
  max-width: 980px;
  height: clamp(130px, 27vh, 230px);
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 14px;
}

.basket {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px 8px;
  background: var(--tone);
  border: 6px solid #fff;
  border-bottom: 16px solid var(--deep);
  border-radius: 44px 44px 56px 56px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.2s ease, background 0.2s ease;
}

@media (hover: hover) {
  .basket:hover {
    transform: translateY(-4px);
  }
}

.basket:active {
  transform: translateY(3px);
}

.basket .emblem {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.basket .emblem svg {
  height: 100%;
  max-height: 130px;
  aspect-ratio: 1;
}

.basket .label {
  flex: none;
  max-width: 100%;
  font-size: clamp(18px, 3.2vw, 34px);
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
  text-wrap: balance;
  color: var(--ink);
  pointer-events: none;
}

.basket.nope {
  animation: shake 0.45s ease;
  border-color: var(--peach);
  border-bottom-color: var(--peach-deep);
}

.basket.hint {
  animation: side-glow 1.1s ease-in-out infinite;
}

.basket.win {
  background: #f3fff8;
  border-color: var(--mint-deep);
  border-bottom-color: var(--mint-deep);
  transform: scale(1.03);
}

body:not([data-phase="play"]) .baskets .basket {
  cursor: default;
}

body:not([data-phase="play"]) .baskets .basket:not(.win):hover,
body:not([data-phase="play"]) .baskets .basket:not(.win):active {
  transform: none;
}

@keyframes side-glow {
  0%,
  100% {
    box-shadow: var(--shadow), 0 0 0 0 rgba(247, 201, 72, 0.85);
  }
  50% {
    box-shadow: var(--shadow), 0 0 0 18px rgba(247, 201, 72, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .thing.go {
    transition: none;
  }
}

@media (orientation: portrait) {
  .play {
    flex-direction: column;
    gap: clamp(8px, 1.6vh, 20px);
    padding: 92px 16px 20px;
  }
  .side {
    width: auto;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 22px;
  }
  .side .bubble {
    max-width: min(62vw, 520px);
    font-size: clamp(20px, 3.2vw, 30px);
  }
  .side .bubble::after {
    left: -12px;
    bottom: 18px;
    margin-left: 0;
    border: 12px solid transparent;
    border-right-color: var(--card);
    border-left: 0;
  }
  .owl {
    width: clamp(84px, 14vw, 140px);
  }
  .stage {
    gap: clamp(10px, 2vh, 28px);
  }
  .basket {
    border-radius: 36px 36px 48px 48px;
  }
}

@media (max-width: 600px) and (orientation: portrait) {
  .play {
    gap: 8px;
    padding: 72px 12px 12px;
  }
  .side {
    gap: 14px;
    min-height: 64px;
  }
  .side .bubble {
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 18px;
    line-height: 1.25;
  }
  .owl {
    width: 60px;
  }
  .play .stage {
    flex: 1;
    min-height: 0;
    gap: 8px;
  }
  .baskets {
    gap: 8px;
  }
  .basket {
    padding: 8px 3px 6px;
    border-width: 5px;
    border-bottom-width: 14px;
    border-radius: 28px 28px 38px 38px;
  }
  .basket .label {
    font-size: 17px;
  }
  .round-dots {
    gap: 8px;
  }
  .round-dots i {
    width: 16px;
    height: 16px;
  }
}
