* {
  box-sizing: border-box;
}

/* 基本スタイル */
.common-style {
  margin: 0;
  padding: 0;
  line-height: 1.6; /* 行間の設定 */
  font-family: "Noto Sans JP", sans-serif; /* Google Fonts */
  font-size: clamp(0.875rem, 2vw + 0.5rem, 1rem); /* 段落: 最小14px、推奨値、最大16px */
  background-color: #fff; /* 背景色を白に設定 */
  color: #444;
  letter-spacing: 0.05rem;
}

.common-style body {
}
.wrap {
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: 100%;
  min-height: 100vh;
}

.common-style a {
  text-decoration: none; /* 下線を消す */
  color: #666;
  font-size: clamp(0.875rem, 2vw + 0.5rem, 1rem); /* 段落: 最小14px、推奨値、最大16px */
}

.common-style a:hover {
  color: rgba(0, 0, 0); /* ホバー時に色を薄くする（黒を例に） */
}

.common-style h1 {
  font-size: clamp(2rem, 5vw + 1rem, 3rem); /* H1: 最小32px、推奨値、最大48px */
}

.common-style h2 {
  font-size: clamp(1.75rem, 4vw + 0.5rem, 2.5rem); /* H2: 最小28px、推奨値、最大40px */
}

.common-style h3 {
  font-size: clamp(1.5rem, 3vw + 0.5rem, 2rem); /* H3: 最小24px、推奨値、最大32px */
}

.common-style h4 {
  font-size: clamp(1.25rem, 2.5vw + 0.25rem, 1.75rem); /* H4: 最小20px、推奨値、最大28px */
}

.common-style h5 {
  font-size: clamp(1rem, 2vw + 0.25rem, 1.5rem); /* H5: 最小16px、推奨値、最大24px */
}

.common-style h6 {
  font-size: clamp(0.875rem, 1.5vw + 0.25rem, 1.25rem); /* H6: 最小14px、推奨値、最大20px */
}

/* 段落のフォントサイズ設定 */
.common-style p {
  font-size: clamp(0.875rem, 2vw + 0.5rem, 1rem); /* 段落: 最小14px、推奨値、最大16px */
  line-height: 1.5; /* 行間を設定 */
  margin-top: 0.5rem; /* 上部のマージンを追加 */
  margin-bottom: 0; /* 下部のマージンをリセット */
}

/* 小さなテキスト */
.small {
  font-size: clamp(0.75rem, 1vw + 0.5rem, 1rem); /* 小さなテキスト: 最小12px、推奨値、最大16px */
}

.icon {
  display: inline-flex;
  vertical-align: sub;
}

.icon img {
  width: 1.2em; /* テキストのサイズに応じてアイコンのサイズを調整 */
  height: 1.2em; /* アスペクト比を維持 */
  margin-right: 0.3em; /* テキストとアイコンの間にスペースを追加 */
  margin-left: 0.3em; /* テキストとアイコンの間にスペースを追加 */
}

.container {
  max-width: 1200px; /* 最大幅を設定 */
  width: 100%;
  margin: 0 auto; /* 左右のマージンを自動で設定 */
  padding: 0 20px; /* 内側のパディングを設定 */
}

/* ヘッダー */
.header {
  position: sticky; /* 追従型 */
  top: 0; /* 上部に固定 */
  background: rgba(255, 255, 255, 0.7); /* すりガラス効果 */
  backdrop-filter: blur(10px); /* 背景ぼかし */
  padding: 10px 0;
  margin: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 影 */
  z-index: 1000; /* 重なり順 */
}

.logo h1 {
  font-size: clamp(1rem, 2vw + 1rem, 2rem); /* 最小16px、推奨値、最大32px */
  margin: 0;
}

@media (max-width: 500px) {
  .logo-text {
    display: none;
  }
}

/* ナビゲーション */
.navbar {
  display: flex;
  justify-content: space-between; /* 左右に配置 */
  align-items: center; /* 垂直中央揃え */
}

.menu {
  list-style: none; /* リストスタイルの削除 */
  display: flex; /* 横並び */
  margin: 0; /* マージンのリセット */
  padding: 0; /* パディングのリセット */
}

.menu li {
  position: relative; /* サブメニューのために相対位置 */
  margin: 0 15px; /* 各メニュー間のマージン */
  font-weight: 700; /* フォント太さ */
}

/* レスポンシブ */
@media (max-width: 768px) {
  .menu-text {
    display: none;
  }
}

/* トップページ用のスタイル */
.hero-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 auto 60px; /* 中央に配置 */
  height: 70vh;
}

.hero-title h1 {
  font-size: clamp(2.5rem, 5vw + 1rem, 3.75rem); /* 最小40px、推奨値、最大60px */

  color: #000;
  display: flex;
  justify-content: center;
  text-align: right;
}

.hero-title p {
  text-align: center; /* 段落を中央揃え */
}

/* カテゴリーリスト */
.categories {
  display: flex;
  flex-direction: column;
  gap: 60px;
  text-align: center;
}

.categories h2 {
  text-align: center;
}

.categories h3 {
  text-align: center;
}

.categories p {
}

.category-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, 250px);
  gap: 20px; /* カード間のスペース */
  padding: 20px;
  margin: 0 auto;
  justify-content: center;
}

.card {
  width: 250px; /* 固定幅 */
  height: 350px; /* 固定高さ */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px; /* 角を丸くする */
  overflow: hidden; /* 子要素がはみ出さないようにする */
  transition: transform 0.3s; /* ホバー時のアニメーション */
  border: #fff 1px solid;
}

.card:hover {
  transform: scale(1.05); /* ホバー時に少し拡大する */
}

.card-image img {
  width: 100%; /* 画像をカードの幅に合わせる */
  height: 150px; /* アスペクト比を維持 */
  max-height: 200px; /* 画像の最大高さ */
  object-fit: cover; /* 画像をカードにフィットさせる */
}

.card-content {
  padding: 15px;
  height: 200px; /* 残りのスペースをコンテンツに割り当て */
  display: flex;
  flex-direction: column; /* 縦並びに */
  justify-content: space-between; /* コンテンツ間にスペースを均等に */
}

.card-date {
  text-align: right;
}

.common-style .card-title {
  font-size: 1.25rem; /* タイトルのサイズ */
  font-weight: 700;
  text-align: left;
  margin: 0; /* マージンをリセット */
}

.card-date {
  font-size: 0.875rem; /* 小さい文字サイズ */
  text-align: right; /* 右揃え */
  color: #999; /* 日付の色 */
}

/* カテゴリーページ */
.category-body {
  text-align: center;
}

.category-body h1 {
  text-align: center;
}

/* 投稿ページスタイル */
.single-body {
  max-width: 960px;
  margin: 0 auto 80px; /* 左右のマージンを自動で設定 */
}

.single-body article {
  max-width: 960px;
  box-sizing: border-box;
  margin: 0 auto; /* 左右のマージンを自動で設定 */
}

.single-body .title {
  color: #f0f0f0;
  background-color: #000;
  border-radius: 20px 5px 20px 5px;
  padding: 10px 10px;
}

.single-body .date {
  text-align: right;
}

.single-body .tags {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 20px;
}

.single-body ul,
ol {
  margin: 1em 0; /* 上下のマージン */
  padding-left: 1.5em; /* 左のパディング */
}

.single-body li {
  margin-bottom: 0.5em; /* 各リストアイテムの下マージン */
}

.single-body blockquote {
  max-width: 100%;
  border-left: 4px solid #ccc; /* 左のボーダー */
  padding-left: 1em; /* 左のパディング */
  margin: 1em 0; /* 上下のマージン */
  font-style: italic; /* 斜体 */
}

.single-body a {
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-decoration: none; /* 下線を削除 */
  border-bottom: 2px dashed black;
}

.single-body img {
  max-width: 100%; /* 幅100%で拡大しない */
  height: auto; /* 高さは自動 */
  display: block; /* ブロック要素 */
  margin: 0.5em 0; /* 上下のマージン */
}

/* コード */
.single-body code,
pre {
  background-color: #f8f8f8; /* 背景色 */
  border-radius: 4px; /* 角を丸く */
  padding: 0.2em 0.4em; /* パディング */
  font-family: monospace; /* 等幅フォント */
}

.single-body pre {
  white-space: pre-wrap; /* 折り返しを許可 */
  overflow: auto; /* オーバーフローを許可 */
  margin: 1em 0; /* 上下のマージン */
}

.single-body .content > * {
  margin-top: 0;
}

.single-body .content > * + * {
  margin-top: 2.5em;
}

.image-404 {
  text-align: center;
  max-width: 100%; /* 幅100%で拡大しない */
  height: auto; /* 高さは自動 */
  display: block; /* ブロック要素 */
  margin: 2em 0; /* 上下のマージン */
}

.body-404 {
  text-align: center;
}

.about {
  text-align: center;
  margin: 80px auto;
}
.about-img {
  display: inline-block;
  border: 4px solid #d7d7d7;
  padding: 1em;
  border-radius: 20px;
  margin-bottom: 40px;
}

.footer {
  text-align: center;
  padding: 20px;
  background-color: #f3f3f3;
}
.like-button-wrapper {
  display: flex;
  justify-content: flex-end; /* ボタンを右寄せ */
  margin: 10px 0; /* 上下に余白を追加 */
}

.like-button {
  display: inline-block;
  padding: 5px 10px;
  background-color: #f6f6f6; /* グレーの背景色 */
  border: none;
  border-radius: 10px; /* 丸みを持たせる */
  cursor: pointer;
  outline: none;
  font-size: 18px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* ボタンに少し立体感を追加 */
  transition: background-color 0.3s ease;
}

.like-button:hover {
  opacity: 0.6; /* ホバー時に少し透明度を下げる */
}

.like-emoji {
  font-size: 24px;
  display: inline-block;
  transition: transform 0.3s ease;
}

.like-button:active .like-emoji {
  transform: scale(1.3); /* 絵文字が一時的に拡大する */
}

.like-ripple {
  position: absolute;
  background: rgba(0, 150, 255, 0.3);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: scale(0);
  z-index: -1;
}

.ripple-1 {
  width: 30px;
  height: 30px;
  background: rgba(255, 0, 0, 0.5); /* 赤色の波紋 */
}

.ripple-2 {
  width: 40px;
  height: 40px;
  background: rgba(0, 255, 0, 0.5); /* 緑色の波紋 */
}

.ripple-3 {
  width: 20px;
  height: 20px;
  background: rgba(0, 0, 255, 0.5); /* 青色の波紋 */
}

.ripple-active {
  animation: ripple-effect 0.6s ease-out forwards;
}

@keyframes ripple-effect {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(3); /* 少し小さめの波紋 */
    opacity: 0;
  }
}
