.word-shuffle-letter {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: clamp(56px, 8vw, 78px);
  height: clamp(58px, 8vw, 80px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%) rotate(var(--rot));
  border: 0;
  border-radius: 21px;
  background: linear-gradient(145deg, #ff8a1c, #ef4444);
  color: #fff;
  font-size: clamp(30px, 4.2vw, 44px);
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
  box-shadow:
    0 18px 28px rgba(0, 0, 0, 0.22),
    inset 0 3px 0 rgba(255, 255, 255, 0.28),
    inset 0 -8px 0 rgba(0, 0, 0, 0.16);
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: box-shadow 0.16s ease;
  will-change: transform;
}

.word-shuffle-letter--tone-0 {
  background: linear-gradient(145deg, #ff8a1c, #ef4444);
}

.word-shuffle-letter--tone-1 {
  background: linear-gradient(145deg, #00c8ff, #2563eb);
}

.word-shuffle-letter--tone-2 {
  background: linear-gradient(145deg, #22c55e, #15803d);
}

.word-shuffle-letter--tone-3 {
  background: linear-gradient(145deg, #a855f7, #7c3aed);
}

.word-shuffle-letter.is-dragging {
  z-index: 1000;
  cursor: grabbing;
  box-shadow:
    0 30px 52px rgba(15, 23, 42, 0.34),
    inset 0 3px 0 rgba(255, 255, 255, 0.32),
    inset 0 -8px 0 rgba(0, 0, 0, 0.12);
}

.word-shuffle-letter.is-wrong {
  animation: wordShuffleWrong 0.32s ease;
}

.word-shuffle-letter.is-used {
  opacity: 0;
  pointer-events: none;
}

.word-shuffle-letter.is-in-slot {
  position: static;
  width: 100%;
  height: 100%;
  min-width: 0;
  transform: none;
  border-radius: 16px;
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.28),
    inset 0 -6px 0 rgba(0, 0, 0, 0.14);
  opacity: 1;
  pointer-events: auto;
}

.word-shuffle-letter.is-in-slot.is-dragging {
  position: fixed;
  min-width: 0;
}

@media (max-width: 900px) {
  .word-shuffle-letter {
    width: clamp(44px, 13vw, 58px);
    height: clamp(46px, 13vw, 60px);
    border-radius: 16px;
    font-size: clamp(24px, 8vw, 31px);
  }
}

@media (min-width: 901px) {
  .word-shuffle-letter {
    width: clamp(66px, 5.2vw, 96px);
    height: clamp(68px, 5.3vw, 98px);
    border-radius: 24px;
    font-size: clamp(36px, 3.3vw, 56px);
  }
}
