/* ==========================================
   모바일 가상 키보드 및 고정 레이아웃 전용 스타일 (Mobile Virtual Keyboard & Fixed Layout CSS)
   ========================================== */

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

/* 헤더 및 배경, 메시지 캔버스 모바일 화면 상단 고정 */
.forest-bg,
.whisper-container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  height: 100dvh !important;
  overflow: hidden !important;
  pointer-events: none;
}

.header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 30 !important;
  pointer-events: none;
}

.listener-badge {
  position: fixed !important;
  top: 14px !important;
  right: 16px !important;
  z-index: 100 !important;
}

.input-bar {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 50 !important;
  will-change: transform;
  transition: transform 0.1s ease-out;
}

/* iOS Safari 입력창 자동 확대를 방지하기 위해 모바일 font-size 16px 이상으로 고정 */
@media (max-width: 768px) {
  .whisper-input {
    font-size: 16px !important; /* Prevent iOS Safari auto-zoom on input focus */
  }

  .listener-badge {
    top: 12px !important;
    right: 12px !important;
  }
}

/* ==========================================
   카운트다운 쿨타임 배지 (입력 상자 좌측 상단)
   ========================================== */
.cooldown-badge {
  position: absolute;
  top: -14px;
  left: 18px;
  background: rgba(10, 35, 22, 0.92);
  border: 1px solid rgba(74, 222, 128, 0.6);
  color: #a7f3d0;
  font-family: var(--font-global);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 8px rgba(74, 222, 128, 0.25);
  pointer-events: none;
  user-select: none;
  z-index: 60;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cooldown-badge.hidden {
  opacity: 0;
  transform: translateY(4px) scale(0.9);
  pointer-events: none;
}
