.cat-game {
  margin: 40px 0 24px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.cat-game__title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--H-color, #223527);
  text-align: center;
}

.cat-game__flappy-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-bottom: 12px;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--H-color, #223527);
  justify-content: center;
}

.cat-game__flappy-stats strong {
  font-weight: 600;
}

.cat-game__flappy-wrap {
  position: relative;
  width: 400px;
  max-width: 100%;
  margin: 0 auto;
  border: none;
  border-radius: 8px;
  overflow: hidden;
  line-height: 0;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  contain: layout paint;
  box-shadow: 0 1px 3px var(--scorpion5, #0000004d);
  aspect-ratio: 400 / 534;
}

.cat-game__mode-switch {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 2;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
  line-height: normal;
}

.cat-game__mode-switch--hidden {
  display: none;
}

.cat-game__mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 52px;
  padding: 6px 4px 4px;
  border: 2px solid #8b6914;
  border-radius: 8px;
  background: #deb75d;
  cursor: pointer;
  box-shadow: 0 2px 0 #8b6914;
  transition: transform 0.1s ease, background-color 0.15s ease;
}

.cat-game__mode-btn:hover {
  background: #e8c56a;
}

.cat-game__mode-btn:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 #8b6914;
}

.cat-game__mode-btn--active {
  background: #73bf2e;
  border-color: #4a7c24;
  box-shadow: 0 2px 0 #4a7c24;
}

.cat-game__mode-btn--active:hover {
  background: #7fcc35;
}

.cat-game__mode-icon {
  width: 32px;
  height: 24px;
  display: block;
  pointer-events: none;
}

.cat-game__mode-label {
  font-size: 11px;
  font-weight: 700;
  color: #543847;
  line-height: 1;
  pointer-events: none;
}

.cat-game__mode-btn--active .cat-game__mode-label {
  color: #fff;
  text-shadow: 0 1px 0 #4a7c24;
}

.cat-game__mode-btn--voice {
  padding-bottom: 17px;
}

.cat-game__mode-btn--voice.cat-game__mode-btn--active {
  animation: cat-game__voice-pulse 1.6s ease-in-out infinite;
}

@keyframes cat-game__voice-pulse {
  0%, 100% {
    box-shadow: 0 2px 0 #4a7c24, 0 0 0 0 rgba(115, 191, 46, 0.55);
  }
  50% {
    box-shadow: 0 2px 0 #4a7c24, 0 0 0 6px rgba(115, 191, 46, 0);
  }
}

.cat-game__toast {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  max-width: 84%;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  border-radius: 6px;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s ease;
  line-height: 1.3;
}

.cat-game__toast--hidden {
  opacity: 0;
  visibility: hidden;
}

#flappyCanvas {
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.cat-game__mute-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 6px;
  padding: 0 12px;
}

.cat-game__mute-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.cat-game__mute-btn:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.cat-game__mute-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cat-game__mute-icon svg {
  width: 100%;
  height: 100%;
}

.cat-game__mute-icon svg path {
  fill: var(--H-color, #223527);
}

.cat-game__mute-icon--on {
  display: flex;
}

.cat-game__mute-icon--off {
  display: none;
}

.cat-game__mute-btn.muted .cat-game__mute-icon--on {
  display: none;
}

.cat-game__mute-btn.muted .cat-game__mute-icon--off {
  display: flex;
}

@media (max-width: 744px) {
  .cat-game__mute-btn {
    padding: 1px;
    margin-left: 4px;
  }
}

.cat-game__flappy-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  background: #4ec0ca;
}

@media (max-width: 744px) {
  .cat-game {
    margin: 32px 0 20px;
  }

  .cat-game__title {
    font-size: 1.125rem;
  }
}
