/* 💖 いいねボタン 全体 */
.like-widget {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 1rem;
  justify-content: center;
  position: relative;
}

.like-widget-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  gap: 4px;
}

.like-button-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#likeButton {
  font-size: 1.2rem;
  padding: 0.4rem 1.2rem;
  border: none;
  border-radius: 30px;
  background-color: rgba(233, 30, 99, 0.2);
  color: white;
  cursor: pointer;
  height: 40px;
  line-height: 40px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

#likeButton:hover {
  transform: scale(1.05);
}

/* 💥 ハートアニメーション */
.flying-heart {
  position: absolute;
  font-size: 1.5rem;
  animation: floatUp 1s ease-out forwards;
  top: -10px;
  pointer-events: none;
  opacity: 0;
}

@keyframes floatUp {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateY(-20px) scale(1.4);
  }
  100% {
    opacity: 0;
    transform: translateY(-60px) scale(0.8);
  }
}

/* 🏷️ バッジ（1000, 素数） */
.like-badge {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  background: gold;
  color: #000;
  border-radius: 20px;
  font-size: 0.8rem;
  z-index: 9999;
  display: none;
  white-space: nowrap;
}

.like-badge.show {
  display: inline-block !important;
}

.like-badge.prime {
  background: #00785a;
  color: white;
  border: 1px solid white;
}

.like-badge a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

/* 💬 吹き出しコメント */
.like-caption {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  width: 240px;
  max-width: 80vw;
  text-align: center;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  white-space: normal;
  z-index: 100;
  display: none;
}

.like-caption::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #fff;
}

/* PC：hover時に表示 */
@media (hover: hover) and (pointer: fine) {
  .like-widget-inline:hover .like-caption {
    display: block;
  }
}

/* スマホ：？ボタンで表示 */
@media (hover: none), (pointer: coarse) {
  .like-caption {
    display: none;
  }

  .like-help {
    display: inline-block;
  }
}

/* ❓ ？ボタン */
.like-help {
  font-size: 1.2rem;
  color: white;
  background-color: rgba(255, 255, 255, 0.2);
  border: 1px solid white;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  text-align: center;
  line-height: 30px;
  cursor: pointer;
  user-select: none;
  display: none;
}

.stop-music {
  margin-top: 8px;
  padding: 6px 12px;
  font-size: 0.85rem;
  border: none;
  border-radius: 6px;
  background-color: #e91e63;
  color: white;
  cursor: pointer;
  display: inline-block;
  z-index: 10000;
}
.stop-music.hidden {
  display: none;
}

#stopMusicBtn {
  position: fixed;
  bottom: 80px; /* SNSフッターより少し上に配置 */
  right: 20px;
  z-index: 99999; /* フッターや他要素より上に */
  background-color: rgba(0, 0, 0, 0.7);
  border: none;
  color: white;
  font-size: 1.5rem;
  border-radius: 50%;
  padding: 0.5em 0.6em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  cursor: pointer;
  display: none;
}

#stopMusicBtn.show {
  display: inline-block;
}

#stopMusicBtn.hidden {
  display: none;
}