/* ================================
   TsumTsum Kakeibo Step5 Badges
   ================================ */

/* グリッド全体 */
.tsumk5-badge-grid {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  grid-template-columns: repeat(5, 1fr);
}
@media (min-width: 768px) {
  .tsumk5-badge-grid { grid-template-columns: repeat(8, 1fr); }
}
@media (min-width: 1200px) {
  .tsumk5-badge-grid { grid-template-columns: repeat(10, 1fr); }
}

/* バッジ */
.tsumk5-badge {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  transition: transform 0.2s ease;
}
.tsumk5-badge:hover { transform: scale(1.05); }

.tsumk5-badge img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}

/* 未解除 */
.tsumk5-badge.locked { pointer-events: none; }
.tsumk5-badge.locked img { opacity: 0.3; filter: grayscale(100%); }

/* ===== モーダル ===== */

#tsumk5-badge-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999; /* 背景とモーダルをまとめて最前面へ */
}

#tsumk5-badge-modal .modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10000; /* ← 背景 */
}

#tsumk5-badge-modal .modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  max-width: 400px;
  width: 90%;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  z-index: 10001; /* ← 背景より上！ここが重要 */
}



/* 閉じるボタン */
/* 閉じるボタン */
#tsumk5-badge-modal .modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 20px;
  cursor: pointer;
  border: none;
  background: none;
}

