.review-section {
  background-color: #fdf4ab;
  background-image: repeating-linear-gradient(135deg,
      #fff6c2,
      #fff6c2 5px,
      #feeb76 5px,
      #feeb76 10px);
  padding: 1rem 2rem 2rem;
  font-family: 'Hiragino Sans', 'ヒラギノ角ゴシック', 'Yu Gothic',
    'メイリオ', sans-serif;
}

.review-header {
  text-align: center;
  margin-bottom: 1rem;
}

.review-title {
  position: relative;
  display: inline-block;
  font-family: '游丸ゴシック体', 'Yu Maru Gothic', 'Yu Maru Gothic Medium',
    'ヒラギノ丸ゴ Pro', 'Hiragino Maru Gothic Pro', sans-serif;
  font-size: clamp(3rem, 4vw, 4rem);
  font-style: italic;
  letter-spacing: 0.2px;
  font-weight: 900;
  color: transparent;
  background: linear-gradient(135deg, #ef460b, #fba514);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  padding: 0.5em 0.75em;
  margin: 0;
}

.review-container {
  padding: 1.5rem 1rem 2rem;
  max-width: 800px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.review-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 48rem;
  /* レビュー3つ分程度の高さ想定 */
  display: block;
  /* スタック表示 */
  overflow-y: scroll;
  /* 常時表示 */
  scrollbar-gutter: stable;
  /* レイアウトの揺れ防止（対応ブラウザ） */
}

.review-item {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.review-item:first-child {
  border-top: none;
}

.review-item:last-child {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.review-main {
  padding: 1.5rem 0.5rem;
}

.review-info {
  display: grid;
  grid-template-columns: auto auto auto auto;
  justify-content: left;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.review-rating-label,
.review-author-label {
  font-size: 14px;
  color: #666;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.review-rating {
  display: flex;
  align-items: center;
  margin-inline-start: initial;
  margin-block: 0;
}

.stars {
  color: #ffc107;
  font-size: 18px;
  font-weight: bold;
}

.review-author {
  font-weight: 600;
  color: #333;
  font-size: 16px;
  margin-inline-start: initial;
  margin-block: 0;
}

.review-text {
  line-height: 1.6;
  position: relative;
  max-height: 4.8em;
  overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.4s ease;
}

.review-text.expanded {
  max-height: 40em;
}

.review-content {
  margin: 0;
}

:is(ol, ul).review-content li {
  font-size: 16px;
  list-style-position: inside !important;
  text-indent: -1em !important;
  padding-left: 1em;
}

ol.review-content li {
  list-style: decimal;
}

ul.review-content li {
  list-style: disc;
}

.review-content+.review-content {
  margin-top: 1em;
}

/* グラデーションによる隠し効果 */
.review-text::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to bottom,
      transparent,
      rgba(255, 255, 255, 0.9));
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 展開時はグラデーションを非表示 */
.review-text.expanded::after {
  opacity: 0;
}

/* シンプルなボタンスタイル */
.review-toggle-btn {
  background: #fff;
  color: #ef460b;
  border: 2px solid #ef460b;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-left: auto;
  height: 40px;
  width: min(120px, 100%);
  margin: 1em 0 0 auto
}

.review-toggle-btn:hover {
  background: #ef460b;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(239, 70, 11, 0.3);
}

.review-toggle-btn:focus {
  outline: 2px solid #ef460b;
  outline-offset: 2px;
}

.review-toggle-btn:active {
  transform: translateY(0);
}

.btn-icon {
  transition: transform 0.2s ease;
  font-size: 0.7rem;
}

.review-toggle-btn[aria-expanded='true'] .btn-icon {
  transform: rotate(180deg);
}

/* ボタンテキストの動的変更はJavaScriptで処理 */

/* アニメーション */
@keyframes fadeInText {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
  .review-section {
    padding: 1.5rem 0.5rem 2rem;
  }

  .review-main {
    padding: 1rem;
  }

  .review-title {
    font-size: 20px;
  }

  .review-rating-label,
  .review-author-label {
    font-size: 10px;
  }

  .review-toggle-btn {
    padding: 0.4rem 0.8rem;
  }
}

/* 口コミチェックボタンのスタイル */
.review-check-btn-container {
  text-align: center;
  margin-top: 2rem;
}

.review-check-btn {
  display: inline-block;
  background-color: #ef8622;
  color: #fff;
  border: 2px solid #ef8622;
  border-radius: 25px;
  padding: 0.75rem 2rem;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(239, 134, 34, 0.2);
}

.review-check-btn:hover {
  background-color: #fff;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 134, 34, 0.3);
}

.review-check-btn:focus {
  outline: 2px solid #ef8622;
  outline-offset: 2px;
}

.review-check-btn:active {
  transform: translateY(0);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
  .review-check-btn {
    padding: 0.6rem 1.5rem;
  }
}

/* アニメーション用のキーフレーム */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.review-item {
  animation: fadeInUp 0.6s ease-out;
}

.review-item:nth-child(2) {
  animation-delay: 0.1s;
}

.review-item:nth-child(3) {
  animation-delay: 0.2s;
}
