/* ==========================================================================
   リセット & ベーススタイル
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  background-color: #fdf8f4;
  color: #4a3b32;
  transition: background-color 0.8s ease;
}

[hidden] {
  display: none !important;
}

/* ==========================================================================
   開発用デバッグ情報インジケーター (DEBUG時表示)
   ========================================================================== */
.debug-indicator {
  position: fixed;
  top: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.88);
  color: #ffd166;
  font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.72rem;
  padding: 6px 10px;
  border-radius: 8px;
  z-index: 100;
  pointer-events: none;
  border: 1px solid rgba(255, 209, 102, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.3;
}

.debug-line {
  display: block;
}

/* ==========================================================================
   ゲーム全体レイアウト (375pxスマホ完全対応)
   ========================================================================== */
.cat-game {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  padding: 12px 14px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: filter 0.8s ease;
}

/* 隠しイベント発生時の静かな雰囲気 */
body.is-secret-mode {
  background-color: #12131a;
}

body.is-secret-mode .cat-game {
  filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.6));
}

.game-header {
  text-align: center;
  margin-bottom: 8px;
  width: 100%;
}

.game-title {
  font-size: 1.35rem;
  color: #5c3b28;
  margin-bottom: 2px;
  letter-spacing: 0.02em;
}

body.is-secret-mode .game-title {
  color: #e2e8f0;
}

.game-subtitle {
  font-size: 0.85rem;
  color: #8c7365;
  margin-bottom: 6px;
}

body.is-secret-mode .game-subtitle {
  color: #94a3b8;
}

.debug-controls {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.debug-toggle-btn {
  font-size: 0.72rem;
  padding: 4px 12px;
  min-height: 28px;
  border-radius: 999px;
  border: 1px solid #d4c0b4;
  background-color: #f7eee7;
  color: #6d584c;
  cursor: pointer;
  transition: all 0.2s ease;
}

.debug-toggle-btn:hover {
  background-color: #ede0d6;
}

.cat-game.debug .debug-toggle-btn {
  background-color: #e056fd;
  border-color: #be2edd;
  color: #ffffff;
  font-weight: bold;
}

/* ==========================================================================
   ごきげんゲージ & なかよしMAX演出
   ========================================================================== */
.mood-container {
  width: 100%;
  background-color: #ffffff;
  border-radius: 14px;
  padding: 8px 14px;
  box-shadow: 0 2px 8px rgba(110, 80, 60, 0.06);
  border: 1px solid #f0e2d5;
  transition: all 0.4s ease;
}

body.is-secret-mode .mood-container {
  background-color: #1e2430;
  border-color: #334155;
}

/* なかよしMAX時のゲージコンテナ発光 */
.mood-container.is-max {
  border-color: #ff80bf;
  box-shadow: 0 0 16px rgba(255, 128, 191, 0.4);
  background-color: #fff9fc;
}

.mood-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: bold;
}

.mood-title {
  color: #634330;
  display: flex;
  align-items: center;
  gap: 4px;
}

body.is-secret-mode .mood-title {
  color: #cbd5e1;
}

.mood-title::before {
  content: '😺';
}

/* なかよしMAXタグ */
.max-mood-tag {
  font-size: 0.76rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #ff4081, #ff79b0);
  padding: 2px 8px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(255, 64, 129, 0.4);
  animation: popTag 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), glowTag 1.5s infinite alternate;
}

@keyframes popTag {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes glowTag {
  from { box-shadow: 0 2px 6px rgba(255, 64, 129, 0.3); }
  to { box-shadow: 0 2px 14px rgba(255, 64, 129, 0.7); }
}

.mood-value {
  color: #e84393;
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}

.mood-bar-bg {
  width: 100%;
  height: 14px;
  background-color: #f1e4d8;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

body.is-secret-mode .mood-bar-bg {
  background-color: #334155;
}

.mood-bar-fill {
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, #ff7675, #fab1a0, #ff7675);
  border-radius: 999px;
  transition: width 0.35s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.3s ease;
}

.mood-bar-fill.is-high {
  background: linear-gradient(90deg, #fd79a8, #ff7675);
}

/* なかよしMAX時のバー光沢アニメーション */
.mood-bar-fill.is-max {
  background: linear-gradient(90deg, #ff3366, #ff758c, #ff7eb3);
  box-shadow: 0 0 12px rgba(255, 105, 180, 0.85);
  animation: shineMood 1.8s infinite linear;
  background-size: 200% 100%;
}

@keyframes shineMood {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.mood-bar-fill.is-mid {
  background: linear-gradient(90deg, #fdcb6e, #e17055);
}

.mood-bar-fill.is-low {
  background: linear-gradient(90deg, #d63031, #e17055);
}

/* ==========================================================================
   猫ステージ（画像 & タップ領域）
   ========================================================================== */
.stage-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 6px;
}

.cat-stage {
  position: relative;
  width: 100%;
  display: inline-block;
  user-select: none;
  touch-action: manipulation;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(90, 60, 40, 0.1);
  background-color: #f5ebe1;
  transition: box-shadow 0.6s ease;
}

body.is-secret-mode .cat-stage {
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.8);
}

/* 猫画像 */
.cat-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  pointer-events: none;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.5s ease;
  will-change: transform;
}

/* なかよしMAX時の猫拡大アニメーション */
.cat-image.is-max-mood {
  animation: catMaxSurprise 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes catMaxSurprise {
  0% { transform: scale(1); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* 隠しイベント時の猫ズーム演出 */
.cat-image.is-secret-focused {
  transform: scale(1.04);
  filter: brightness(0.95) contrast(1.05);
}

/* ゲームオーバー時の猫画像（立ち去った演出） */
.cat-image.is-escaped {
  filter: grayscale(90%) opacity(0.35) blur(1px);
  transform: scale(0.96);
}

/* リアクション時の猫画像アニメーション */
.cat-image.is-love {
  animation: catPulse 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cat-image.is-dislike {
  animation: catShake 0.45s ease-in-out;
}

@keyframes catPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

@keyframes catShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px) rotate(-1deg); }
  40% { transform: translateX(8px) rotate(1deg); }
  60% { transform: translateX(-5px) rotate(-0.5deg); }
  80% { transform: translateX(5px) rotate(0.5deg); }
}

/* ==========================================================================
   隠しイベント オーバーレイ (暗転・メッセージ・ボタン)
   ========================================================================== */
.secret-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 12, 18, 0.75);
  backdrop-filter: blur(4px);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: secretFadeIn 0.8s ease-out forwards;
}

.secret-dialog {
  background: rgba(22, 27, 34, 0.95);
  border: 1px solid rgba(255, 209, 102, 0.35);
  padding: 22px 20px;
  border-radius: 18px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  max-width: 88%;
  width: 320px;
  animation: popSecret 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.secret-cat-eye {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 8px;
  animation: eyeBlink 3s infinite;
}

.secret-text-first {
  font-size: 0.98rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
  animation: textFadeIn 0.6s ease-out;
}

.secret-text-second {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffd166;
  margin-top: 4px;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
  animation: textFadeIn 0.6s ease-out;
}

.secret-dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  animation: popSecret 0.4s ease-out;
}

.secret-confirm-btn {
  display: inline-block;
  width: 100%;
  max-width: 220px;
  background: linear-gradient(135deg, #ffd166, #ff9f43);
  color: #1a1a1a;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 10px 20px;
  min-height: 44px;
  line-height: 24px;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(255, 209, 102, 0.4);
  transition: all 0.2s ease;
}

.secret-confirm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 209, 102, 0.6);
}

.secret-confirm-btn:active {
  transform: translateY(1px);
}

/* 共通 𝕏 ポストボタン */
.share-x-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  max-width: 220px;
  min-height: 42px;
  padding: 8px 16px;
  background-color: #0f1419;
  color: #ffffff;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
}

.share-x-btn:hover {
  background-color: #272c30;
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.35);
}

.share-x-btn:active {
  transform: translateY(1px);
}

.share-x-btn.secret-x-btn {
  background-color: #000000;
  border-color: rgba(255, 209, 102, 0.3);
  color: #ffd166;
}

.share-x-btn.secret-x-btn:hover {
  background-color: #171b22;
  border-color: #ffd166;
}


@keyframes secretFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes textFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes popSecret {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes eyeBlink {
  0%, 90%, 100% { opacity: 1; }
  95% { opacity: 0.3; }
}

/* ==========================================================================
   ゲームオーバー オーバーレイ
   ========================================================================== */
.gameover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(60, 40, 30, 0.65);
  backdrop-filter: blur(3px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInOverlay 0.4s ease-out forwards;
}

.gameover-dialog {
  background-color: #ffffff;
  padding: 20px 24px;
  border-radius: 18px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  max-width: 85%;
  animation: popDialog 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.gameover-cat-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 6px;
}

.gameover-message {
  font-size: 1.05rem;
  font-weight: bold;
  color: #c0392b;
  margin-bottom: 14px;
  line-height: 1.4;
}

.restart-btn {
  background: linear-gradient(135deg, #e84393, #fd79a8);
  color: #ffffff;
  border: none;
  padding: 10px 26px;
  min-height: 44px;
  font-size: 0.95rem;
  font-weight: bold;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(232, 67, 147, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.restart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(232, 67, 147, 0.45);
}

.restart-btn:active {
  transform: translateY(1px);
}

/* ==========================================================================
   コンプリート モーダル オーバーレイ
   ========================================================================== */
.complete-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(45, 30, 20, 0.68);
  backdrop-filter: blur(4px);
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInOverlay 0.4s ease-out forwards;
}

.complete-dialog {
  background: linear-gradient(145deg, #ffffff, #fffaf3);
  padding: 22px 22px 18px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  max-width: 86%;
  width: 310px;
  border: 2px solid #ffd32a;
  animation: popDialog 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.complete-dialog-stars {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 4px;
  animation: starPulse 1.2s infinite alternate ease-in-out;
}

.complete-dialog-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #795548;
  margin-bottom: 4px;
  letter-spacing: 0.03em;
}

.complete-dialog-subtitle {
  font-size: 0.88rem;
  color: #8d6e63;
  margin-bottom: 18px;
  font-weight: 600;
}

.complete-dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.complete-restart-btn {
  width: 100%;
  max-width: 220px;
  background: linear-gradient(135deg, #ff9f1a, #ff793f);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  min-height: 44px;
  font-size: 0.95rem;
  font-weight: bold;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 121, 63, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.complete-restart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 121, 63, 0.5);
}

.complete-restart-btn:active {
  transform: translateY(1px);
}

.complete-close-btn {
  background: transparent;
  color: #a08271;
  border: none;
  font-size: 0.8rem;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 999px;
  transition: color 0.2s ease;
}

.complete-close-btn:hover {
  color: #5c3b28;
  text-decoration: underline;
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}


@keyframes popDialog {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   透明タップ判定領域 (hit-area: %指定でレスポンシブ追従)
   ========================================================================== */
.hit-area {
  position: absolute;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  z-index: 10;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

.hit-area:disabled {
  cursor: not-allowed;
  pointer-events: none;
}

/* 各部位の位置・サイズ (%指定) */
.hit-area.part-head {
  top: 16%;
  left: 74%;
  width: 16%;
  height: 21%;
  border-radius: 45% 45% 40% 40%;
}

.hit-area.part-chin {
  top: 36%;
  left: 75%;
  width: 13%;
  height: 13%;
  border-radius: 45%;
}

.hit-area.part-back {
  top: 29%;
  left: 27%;
  width: 46%;
  height: 18%;
  border-radius: 35px 35px 15px 15px;
}

.hit-area.part-belly {
  top: 46%;
  left: 33%;
  width: 33%;
  height: 17%;
  border-radius: 12px 12px 30px 30px;
}

.hit-area.part-frontLeg {
  top: 55%;
  left: 62%;
  width: 14%;
  height: 29%;
  border-radius: 20px;
}

.hit-area.part-hindLeg {
  top: 56%;
  left: 29%;
  width: 18%;
  height: 28%;
  border-radius: 24px;
}

.hit-area.part-tail {
  top: 41%;
  left: 5%;
  width: 25%;
  height: 26%;
  border-radius: 50% 20% 50% 30%;
  transform: rotate(-10deg);
}

/* デバッグ表示モード */
.cat-game.debug .hit-area {
  background: rgba(235, 77, 75, 0.45);
  border: 2px dashed rgba(192, 57, 43, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: bold;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.cat-game.debug .hit-area::after {
  content: attr(aria-label);
  pointer-events: none;
}

/* ==========================================================================
   リアクション演出用エフェクトレイヤー
   ========================================================================== */
.reaction-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 20;
}

.effect-icon {
  position: absolute;
  pointer-events: none;
  transform: translate(-50%, -50%);
  line-height: 1;
  user-select: none;
}

/* love: ハートが猫の周辺からふわっと上に飛ぶ */
.effect-icon.effect-love {
  font-size: 2.8rem;
  animation: floatUpLove 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* like: 小さなハートが1つ出る */
.effect-icon.effect-like {
  font-size: 1.8rem;
  animation: floatUpLike 0.7s ease-out forwards;
}

/* dislike: 怒り記号を表示 */
.effect-icon.effect-dislike {
  font-size: 2.5rem;
  animation: angerPop 0.65s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

/* コンプリート・なかよし時のキラキラ */
.effect-icon.effect-sparkle {
  font-size: 2.2rem;
  animation: floatSparkle 1.1s ease-out forwards;
}

@keyframes floatUpLove {
  0% {
    opacity: 0;
    transform: translate(-50%, 0%) scale(0.4);
  }
  25% {
    opacity: 1;
    transform: translate(-50%, -40%) scale(1.25);
  }
  70% {
    opacity: 0.9;
    transform: translate(-50%, -90%) scale(1.05);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -140%) scale(0.9);
  }
}

@keyframes floatUpLike {
  0% {
    opacity: 0;
    transform: translate(-50%, -10%) scale(0.5);
  }
  40% {
    opacity: 1;
    transform: translate(-50%, -60%) scale(1.1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -110%) scale(0.8);
  }
}

@keyframes angerPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2) rotate(-15deg);
  }
  30% {
    opacity: 1;
    transform: translate(-50%, -60%) scale(1.3) rotate(10deg);
  }
  60% {
    opacity: 1;
    transform: translate(-50%, -65%) scale(1) rotate(-5deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -80%) scale(0.9) rotate(0deg);
  }
}

@keyframes floatSparkle {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.3); }
  50% { opacity: 1; transform: translate(-50%, -40px) scale(1.2); }
  100% { opacity: 0; transform: translate(-50%, -80px) scale(0.8); }
}

/* ==========================================================================
   リアクション・メッセージ表示パネル
   ========================================================================== */
.reaction-panel {
  width: 100%;
  margin-top: 10px;
  background-color: #ffffff;
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 3px 12px rgba(110, 80, 60, 0.06);
  text-align: center;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  border: 2px solid transparent;
  position: relative;
}

body.is-secret-mode .reaction-panel {
  background-color: #1e2430;
  border-color: #334155;
}

.reaction-panel.rating-love {
  border-color: #ff9bb2;
  background-color: #fff9fa;
}

.reaction-panel.rating-like {
  border-color: #ffd180;
  background-color: #fffcf5;
}

.reaction-panel.rating-neutral {
  border-color: #d1d8e0;
  background-color: #fafbfc;
}

.reaction-panel.rating-dislike {
  border-color: #ff7675;
  background-color: #fff5f5;
}

.part-indicator {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #9c7a65;
  background-color: #f3eae3;
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 4px;
}

body.is-secret-mode .part-indicator {
  background-color: #334155;
  color: #cbd5e1;
}

.reaction-message-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
}

.rating-badge {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.reaction-text-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.reaction-text {
  font-size: 1.02rem;
  font-weight: bold;
  color: #3b2c24;
  line-height: 1.4;
}

body.is-secret-mode .reaction-text {
  color: #f1f5f9;
}

/* なかよしMAX時の行動ヒントサブテキスト */
.hint-subtext {
  margin-top: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #b33939;
  background-color: #fff0f3;
  border: 1px dashed #ffb8b8;
  padding: 6px 12px;
  border-radius: 8px;
  line-height: 1.5;
  white-space: pre-line;
  animation: hintFadeIn 0.8s ease-out;
}

@keyframes hintFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.mood-delta-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 4px;
  animation: popDelta 0.3s ease-out;
}

.mood-delta-badge.delta-plus {
  background-color: #ffeaa7;
  color: #d63031;
}

.mood-delta-badge.delta-minus {
  background-color: #ff7675;
  color: #ffffff;
}

.mood-delta-badge.delta-zero {
  background-color: #dfe6e9;
  color: #636e72;
}

@keyframes popDelta {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   コンプリートバナー (演出強化: 少し大きく表示 + キラキラ)
   ========================================================================= */
.complete-banner {
  width: 100%;
  margin-top: 10px;
  background: linear-gradient(135deg, #ffd32a, #ff9f1a);
  border-radius: 16px;
  padding: 14px 16px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(255, 159, 26, 0.4);
  animation: bannerFadeIn 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.complete-stars {
  font-size: 1.6rem;
  display: block;
  animation: starPulse 1.2s infinite alternate ease-in-out;
}

.complete-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #573b18;
  margin: 4px 0 2px;
  letter-spacing: 0.03em;
}

.complete-subtitle {
  font-size: 0.85rem;
  color: #5c4120;
  font-weight: 600;
}

@keyframes bannerFadeIn {
  0% { opacity: 0; transform: translateY(-10px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes starPulse {
  from { transform: scale(1); }
  to { transform: scale(1.12); }
}

/* ==========================================================================
   お触りマップ（触った場所の記録）
   ========================================================================== */
.map-section {
  width: 100%;
  margin-top: 12px;
  background-color: #ffffff;
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 3px 12px rgba(110, 80, 60, 0.06);
  border: 1px solid #f0e2d5;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

body.is-secret-mode .map-section {
  background-color: #1e2430;
  border-color: #334155;
}

.map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #eedacf;
}

body.is-secret-mode .map-header {
  border-bottom-color: #334155;
}

.map-title {
  font-size: 0.95rem;
  color: #5c3b28;
}

body.is-secret-mode .map-title {
  color: #e2e8f0;
}

.map-count {
  font-size: 0.82rem;
  font-weight: bold;
  color: #8c7365;
  background-color: #f7ede5;
  padding: 2px 8px;
  border-radius: 999px;
}

body.is-secret-mode .map-count {
  background-color: #334155;
  color: #cbd5e1;
}

.map-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.map-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.82rem;
  background-color: #f8f6f3;
  color: #8a7a70;
  border: 1px solid #f0eae4;
  transition: all 0.25s ease;
}

.map-item-name {
  font-weight: 600;
}

.map-item-status {
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 3px;
}

/* 未調査状態 */
.map-item.is-undiscovered {
  background-color: #f4f2ef;
  color: #b3a59b;
  border-style: dashed;
}

body.is-secret-mode .map-item.is-undiscovered {
  background-color: #171c26;
  border-color: #334155;
  color: #64748b;
}

/* 調査済み状態 */
.map-item.rating-love {
  background-color: #fff0f3;
  border-color: #ffccd5;
  color: #d63384;
}

.map-item.rating-like {
  background-color: #fff9eb;
  border-color: #ffeaa7;
  color: #d35400;
}

.map-item.rating-neutral {
  background-color: #f1f3f5;
  border-color: #e9ecef;
  color: #495057;
}

.map-item.rating-dislike {
  background-color: #fff5f5;
  border-color: #ffc9c9;
  color: #c92a2a;
}

.map-item.is-just-discovered {
  animation: popItem 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popItem {
  0% { transform: scale(0.92); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* ==========================================================================
   フッター (NNN)
   ========================================================================== */
.game-footer {
  width: 100%;
  margin-top: 20px;
  text-align: center;
  padding: 8px 0 4px;
}

.footer-brand {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: #b09a8c;
  user-select: none;
  transition: color 0.4s ease;
}

body.is-secret-mode .footer-brand {
  color: #475569;
}
