/* ===============================
履歴ページ全体
=============================== */
.history-page {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 16px 32px;
  box-sizing: border-box;
}

.history-hero {
  text-align: center;
  margin-bottom: 22px;
}

.history-hero h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.history-hero p {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===============================
履歴リスト
=============================== */
.history-list {
  display: grid;
  gap: 18px;
}

/* ===============================
履歴カード
=============================== */
.history-card {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

/* 画像 */
.history-image-wrap {
  width: 100%;
  height: 240px;
  background: #f2f2f2;
  overflow: hidden;
}

.history-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* 本文 */
.history-content {
  padding: 18px;
  text-align: center;
}

.history-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.history-genre {
  display: inline-block;
  max-width: 75%;
  padding: 5px 11px;
  border-radius: 999px;
  background: #fff2df;
  color: #ff7a00;
  font-size: 0.78rem;
  font-weight: bold;
  line-height: 1.4;
}

.history-date {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: #888;
}

.history-content h3 {
  font-size: 1.2rem;
  margin: 0 0 10px;
  line-height: 1.5;
  
}

.history-copy,
.history-address,
.history-distance,
.history-duration {
  font-size: 0.92rem;
  color: #444;
  line-height: 1.7;
  margin: 0 0 8px;
  
}

.history-card-actions {
  display: flex;
  justify-content: center; /* ←これが本命 */
  margin-top: 16px;
}

.history-map-btn,
.back-spot-btn,
.clear-history-btn,
.empty-history button {
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  font-size: 0.95rem;
}

.history-map-btn,
.back-spot-btn,
.empty-history button {
  background: linear-gradient(45deg, #ff8a00, #ffb347);
  color: #fff;
}

.history-map-btn {
  display: inline-block;
  min-width: 170px;
}

.clear-history-btn {
  background: #eee;
  color: #555;
}

.history-actions {
  width: 100%;
  max-width: 760px;
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* 空状態 */
.empty-history {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  background: #fff;
  padding: 28px 18px;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.empty-history p {
  margin-bottom: 8px;
}

/* ===============================
PC：少しリッチに
=============================== */
@media (min-width: 900px) {
  .history-card {
    max-width: 820px;
  }

  .history-image-wrap {
    height: 260px;
  }

  .history-content {
    padding: 22px 24px 24px;
  }
}

/* ===============================
スマホ最適化
=============================== */
@media (max-width: 600px) {
  .history-page {
    padding: 16px 12px 28px;
  }

  .history-hero h2 {
    font-size: 1.3rem;
  }

  .history-card {
    max-width: 100%;
    border-radius: 18px;
  }

  .history-image-wrap {
    height: 190px;
  }

  .history-content {
    padding: 16px;
  }

  .history-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .history-genre {
    max-width: 100%;
    font-size: 0.76rem;
  }

  .history-date {
    font-size: 0.78rem;
  }

  .history-content h3 {
    font-size: 1.1rem;
  }

  .history-map-btn {
    width: 100%;
  }

  .history-card-actions {
    width: 100%;
  }

  .history-actions {
    grid-template-columns: 1fr;
  }
}

.history-delete-btn {
  border: none;
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: bold;
  cursor: pointer;
  background: #eee;
  color: #555;
}

.history-card-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
