.omikuji-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 400px;
  flex-wrap: wrap; /* スマホ対策！ */
  gap: 15px; /* 間はgapで作る */
  position: relative;
}

.omikuji-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 24px;
  height: 210px;
  width: 50px;
  padding: 0;
  border: 2px solid #f6f5f5;
  background: #dd221f;
  cursor: pointer;
  color: rgb(249, 248, 248);
  font-weight: bold;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  transition: transform 0.3s ease-in-out, background 0.3s, color 0.3s;
  margin: 0;
  z-index: 0;
  overflow: hidden; /* はみ出し防止 */
}

.omikuji-button:hover {
  transform: scale(1.3);
  background: #ffffff;
  color: #dd221f;
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);
  border-color: #dd221f;
  z-index: 1;
}


/* スマホ用 */
@media screen and (max-width: 768px) {
  .omikuji-button {
    font-size: 18px;
    height: 180px;
    width: 50px;
  }

  .omikuji-text {
    transform: translateY(-18%); /* ← スマホだけ、さらにちょっと下にずらす！ */
  }
}

.omikuji-button:hover {
  transform: scale(1.3);
  background: #ffffff;
  color: #dd221f;
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);
  border-color: #dd221f;
}

.omikuji-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 10px;
  width: 100%;
  background: white;
  border-radius: 5px;
  border: 1px solid #ddd;
  box-sizing: border-box; /* パディングとボーダーを含めてサイズを計算 */
}

/* おみくじの履歴アイテム */
.omikuji-item {
  padding: 8px;
  border-bottom: 1px solid #ddd;
  font-size: 1rem;
}

.omikuji-item:last-child {
  border-bottom: none;
}

/* 結果の文字 */
.omikuji-result {
  font-weight: bold;
  color: #ff4500;
}

/* 説明の文字 */
.omikuji-description {
  font-size: 0.9rem;
  color: #333;
}

/* 日付 */
.omikuji-date {
  font-size: 0.8rem;
  color: #666;
  display: block;
  margin-top: 5px;
}

.omikuji-reshuffle {
  opacity: 0;
  transition: opacity 1s ease;
}

.omikuji-reshuffle.visible {
  opacity: 1;
}
