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

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

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

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

.animal-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: min(850px, 100%);
  min-height: 208px;
  background: #ffffffe6;
  border-radius: 32px;
  box-shadow: var(--shadow);
  padding: 10px 24px;
}

.animal {
  background: none;
  width: 210px;
  height: 190px;
  padding: 0;
  flex-shrink: 0;
}

.animal img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 8px #3d3a5c20);
}

.word {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.word-space {
  width: 12px;
}

.letter {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 98px;
  background: var(--lav);
  border: 4px solid transparent;
  border-radius: 20px;
}

.letter b {
  font-size: 52px;
  line-height: 1.4;
}

.letter.current {
  border-color: var(--butter-deep);
  background: var(--butter);
  box-shadow: 0 4px 0 var(--butter-deep);
}

.letter.correct {
  background: var(--mint);
  border-color: var(--mint-deep);
  animation: pop-in .24s ease;
}

.letter.wrong {
  animation: shake .4s ease;
}

.letter-hint {
  position: absolute;
  top: 100%;
  padding-top: 4px;
  width: 94px;
  font-size: 18px;
  text-align: center;
  white-space: nowrap;
  color: var(--ink);
  font-weight: 800;
}

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

.keyboard {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px 18px 18px;
  background: #ffffffc9;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.kb-row {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.key {
  width: 64px;
  height: 64px;
  border-radius: 17px;
  background: #fff;
  font-size: 30px;
  font-weight: 800;
  box-shadow: 0 5px 0 #d4d2e6;
}

.key:hover {
  background: var(--sky);
}

.key.pressed, .key:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #d4d2e6;
}

.key.hint {
  background: var(--butter);
  animation: glow 1.4s infinite;
}

.key:focus-visible, .animal:focus-visible {
  outline: 4px solid var(--lav-deep);
  outline-offset: 3px;
}

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

@media (max-height: 730px) {
  .play {
    gap: 8px;
    padding-top: 96px;
  }
  .mascot-box img {
    width: 52px;
  }
  .animal-card {
    min-height: 160px;
  }
  .animal {
    width: 160px;
    height: 140px;
  }
  .letter {
    height: 84px;
  }
  .keyboard {
    padding-top: 8px;
    gap: 8px;
  }
}

@media (max-width: 850px) {
  .animal-card {
    gap: 12px;
  }
  .animal {
    width: 150px;
  }
  .letter {
    width: 60px;
  }
  .letter b {
    font-size: 44px;
  }
  .kb-row {
    gap: 6px;
  }
  .keyboard {
    padding-inline: 8px;
  }
}

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

.play {
  height: 100dvh;
  padding: 100px 24px 20px;
  gap: 12px;
}

.bubble {
  line-height: 1.25;
}

.keyboard {
  max-width: 100%;
  padding: 12px 12px 18px;
}

.kb-row {
  gap: clamp(6px, 0.8vw, 10px);
}

.key {
  width: clamp(56px, 7.3vw, 64px);
  height: clamp(56px, 7.3vw, 64px);
  flex: 0 0 auto;
}

.tip {
  text-align: center;
  font-size: 19px;
}

@media (orientation: portrait) {
  .play {
    gap: clamp(16px, 2.4dvh, 32px);
  }
  .animal-card {
    flex-direction: column;
    gap: 12px;
    padding: 16px 16px 34px;
  }
  .animal {
    width: clamp(170px, 24vw, 240px);
    height: clamp(150px, 22vw, 220px);
  }
  .letter {
    width: clamp(60px, 9vw, 80px);
    height: 98px;
  }
}

@media (orientation: landscape) and (max-height: 800px) {
  .play {
    gap: 10px;
  }
  .mascot-box img {
    width: 56px;
  }
  .animal-card {
    min-height: 164px;
    padding-bottom: 24px;
  }
  .animal {
    width: 160px;
    height: 140px;
  }
  .letter {
    height: 90px;
  }
  .keyboard {
    gap: 8px;
  }
}
