.kotoha-popup {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
}

/* キャラ画像：前面に出て吹き出しに軽くかぶる */
.kotoha-popup .character {
  width: 163px;  /* 実際の画像サイズ */
  height: auto;
  position: relative;
  z-index: 2;
  margin-right: -17px;  /* 吹き出しにかぶせる */
  margin-bottom: -30px;
  
}

/* 吹き出し本体 */
.kotoha-popup .bubble {
  background: #fff6fb;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-width: 280px;
  position: relative;
  z-index: 1;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  color: #333;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 50px;
}

.kotoha-popup.hide .character {
  transform: translateY(60px) scale(0.9);
  opacity: 0;
  transition: all 0.5s ease-in-out;
}



/* テキスト内リンク */
#kotoha-link {
  display: inline-block;
  margin-top: 8px;
  color: #ff2fa3;
  font-weight: bold;
  text-decoration: underline dotted #ff2fa3 2px;
  text-underline-offset: 3px;
  font-size: 17px;
}

/* トグルボタン */
#kotoha-toggle {
  position: fixed;
  bottom: 120px;
  right: 20px;
  z-index: 9999;
  background-color: #ff2fa3;
  color: white;
  padding: 10px 18px;
  border-radius: 9999px;
  font-size: 16px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
    margin-bottom: -110px;
}
.kotoha-popup.hide .bubble {
  display: none;
}

.kotoha-link {
  animation: float 1.5s ease-in-out infinite;
  display: inline-block;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.kotoha-link.visible {
  opacity: 1;
}


@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}