/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;700;800&family=Noto+Sans+JP:wght@400;500;700;900&display=swap');

html, body {
  font-family: 'Plus Jakarta Sans', 'Noto Sans JP', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-tap-highlight-color: transparent;
}

/* スクロールバー非表示 */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* アクティブな気分ボタン */
.craving-btn.active {
  background-color: #047857 !important;
  color: #ffffff !important;
  border-color: #047857 !important;
  box-shadow: 0 4px 6px -1px rgba(4, 120, 87, 0.25);
}

.craving-btn.active span {
  color: #ffffff !important;
}

/* アイテムカードアニメーション */
.meal-item {
  transition: all 0.2s ease-in-out;
}

.meal-item:hover {
  transform: translateY(-1px);
}

/* チェック済みアイテム */
.item-checked {
  text-decoration: line-through;
  opacity: 0.5;
}

/* スキャンレーザー */
.scan-laser {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #2dd4bf, #14b8a6, transparent);
  box-shadow: 0 0 12px #2dd4bf;
  animation: scanMove 1.5s ease-in-out infinite alternate;
}

@keyframes scanMove {
  0% {
    top: 5%;
  }
  100% {
    top: 95%;
  }
}

/* モーダルの安全な表示 */
#photoModal:not(.hidden) {
  display: flex !important;
}

#shoppingModal:not(.hidden) {
  display: flex !important;
}

#profileModal:not(.hidden) {
  display: flex !important;
}

/* スマホでのボタンの押し心地 */
button:active {
  opacity: 0.85;
}

/* AIマスコット「モグ丸」アニメーション & スマホ最適化サイズ */
#mascotCompanionCard {
  min-height: 48px;
  max-height: 58px;
}

#mascotAvatar {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  flex: 0 0 42px !important;
}

#mascotAvatar svg {
  width: 42px !important;
  height: 42px !important;
  max-width: 42px !important;
  max-height: 42px !important;
  display: block;
}

.mascot-container {
  animation: mascotFloat 3.2s ease-in-out infinite;
  transform-origin: center bottom;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.mascot-bounce {
  animation: mascotBounce 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.mascot-eye {
  animation: mascotBlink 4.5s infinite;
}

.mascot-sprout {
  transform-origin: 50px 15px;
  animation: sproutSway 3s ease-in-out infinite;
}

@keyframes mascotFloat {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-4px) rotate(1deg);
  }
}

@keyframes mascotBounce {
  0% {
    transform: scale(1, 1) translateY(0);
  }
  25% {
    transform: scale(1.18, 0.82) translateY(3px);
  }
  50% {
    transform: scale(0.88, 1.15) translateY(-16px) rotate(-3deg);
  }
  75% {
    transform: scale(1.06, 0.95) translateY(-2px) rotate(2deg);
  }
  100% {
    transform: scale(1, 1) translateY(0);
  }
}

@keyframes mascotBlink {
  0%, 88%, 94%, 100% {
    transform: scaleY(1);
  }
  91% {
    transform: scaleY(0.1);
  }
}

@keyframes sproutSway {
  0%, 100% {
    transform: rotate(0deg);
  }
  30% {
    transform: rotate(10deg);
  }
  70% {
    transform: rotate(-8deg);
  }
}

/* マスコットタップ時のパーティクル */
.mascot-particle {
  position: absolute;
  pointer-events: none;
  animation: floatUpFade 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  font-size: 16px;
  user-select: none;
  z-index: 30;
}

@keyframes floatUpFade {
  0% {
    transform: translate(0, 0) scale(0.6);
    opacity: 0;
  }
  30% {
    opacity: 1;
    transform: translate(calc(var(--rand-x, 0) * 1px), -12px) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--rand-x, 0) * 2px), -36px) scale(0.9);
  }
}