.play {
  height: 100%;
  padding: 100px 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.mascot-box {
  width: min(800px, 100%);
  align-items: center;
  justify-content: center;
}

.mascot-box img {
  width: 64px;
}

.bubble {
  margin: 0;
  max-width: 640px;
  font-size: 23px;
  padding: 10px 20px;
}

.puzzle-area {
  display: flex;
  align-items: center;
  gap: 30px;
}

.board {
  display: grid;
  grid-template-columns: repeat(4, 80px);
  gap: 5px;
  background: var(--lav-deep);
  border: 8px solid var(--lav-deep);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.cell {
  position: relative;
  width: 80px;
  height: 80px;
  background: #fff;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 36px;
  font-weight: 800;
  color: var(--ink-soft);
  border: 4px solid transparent;
}

.cell:nth-child(4n+2) {
  margin-right: 4px;
}

.cell:nth-child(n+5):nth-child(-n+8) {
  margin-bottom: 4px;
}

.cell.fixed {
  background: var(--lav);
}

.cell.filled {
  background: var(--mint);
}

.cell img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  pointer-events: none;
}

.cell.selected {
  border-color: var(--butter-deep);
  box-shadow: inset 0 0 0 2px var(--ink);
}

.cell:focus-visible, .fruit-choice:focus-visible {
  outline: 4px solid var(--ink);
  outline-offset: 3px;
}

.cell.hint {
  background: var(--peach);
}

.cell.wrong {
  animation: shake .45s ease;
}

.fruit-pad {
  display: grid;
  grid-template-columns: repeat(2, 118px);
  gap: 18px;
}

.fruit-choice {
  width: 118px;
  min-height: 126px;
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
}

.fruit-choice img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.fruit-choice:hover {
  background: var(--butter);
  transform: translateY(-3px);
}

.fruit-choice:active {
  transform: translateY(3px);
}

.tip {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  background: #ffffffd9;
  border-radius: 18px;
  padding: 4px 18px;
}

.progress {
  font-size: 23px;
  font-weight: 800;
  padding: 4px 22px;
  background: var(--butter);
  border-radius: 24px;
}

@media (max-height: 710px) {
  .play {
    gap: 8px;
    padding-top: 96px;
  }
  .mascot-box img {
    width: 60px;
  }
  .board {
    grid-template-columns: repeat(4, 76px);
  }
  .cell {
    width: 76px;
    height: 76px;
  }
  .cell img {
    width: 58px;
    height: 58px;
  }
}

@media (max-width: 740px) {
  .puzzle-area {
    gap: 14px;
  }
  .fruit-pad {
    grid-template-columns: 92px;
    gap: 8px;
  }
  .fruit-choice {
    width: 92px;
    min-height: 76px;
    font-size: 17px;
  }
  .fruit-choice img {
    width: 44px;
    height: 44px;
  }
  .tip {
    font-size: 16px;
  }
}

.tip, .progress {
  line-height: 1.25;
}

.cell .rejected {
  position: absolute;
  animation: reject-fruit .65s ease forwards;
}

@keyframes reject-fruit {
  0% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
  35% {
    transform: scale(1.1) rotate(-12deg);
  }
  65% {
    transform: rotate(12deg);
  }
  100% {
    opacity: 0;
    transform: translateY(15px) scale(.7);
  }
}

.play {
  height: 100dvh;
  padding: 104px 24px 20px;
  gap: clamp(10px, 2dvh, 22px);
}

.puzzle-area {
  max-width: 100%;
}

.bubble {
  line-height: 1.25;
}

.fruit-choice span {
  font-size: 19px;
}

@media (orientation: portrait) {
  .puzzle-area {
    flex-direction: column;
    gap: 24px;
  }
  .board {
    grid-template-columns: repeat(4, clamp(80px, 11vw, 108px));
  }
  .cell {
    width: clamp(80px, 11vw, 108px);
    height: clamp(80px, 11vw, 108px);
  }
  .cell img {
    width: 76%;
    height: 76%;
  }
  .fruit-pad {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }
  .fruit-choice {
    width: clamp(118px, 17vw, 156px);
    min-height: 126px;
  }
  .tip {
    text-align: center;
    font-size: 19px;
  }
}

@media (hover: none) {
  .fruit-choice:hover {
    transform: none;
  }
}
