body {
  background: #f6f9fc;
  color: #222;
  font-family: "Noto Sans JP", "Meiryo", Arial, sans-serif;
  margin: 0;
  padding: 0;
}

/* --- ヘッダー（見出しのズレ修正込） --- */
header {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  padding: 40px 0 20px 0;
  margin-bottom: 0;           /* デフォルトで余白があればゼロ */
  padding-bottom: 0;
}
.header-inner {
  max-width: 850px;
  margin: 0 auto;
  padding: 0 15px;
}
.page-title {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8em;
  font-weight: bold;
  color: #007bff;
  margin: 0;
}
.page-title i {
  margin-right: 12px;
  color: #4faaf4;
}
/* テキストを真ん中に寄せるための調整 */
.page-title::after {
  content: "";
  display: block;
  width: 1.2em;
  margin-left: 12px;
}

/* --- リスト全体のレイアウト --- */
.column-list-section {
  max-width: 850px;
  margin: 0 auto;
  padding: 0 15px 60px 15px;
}
.column-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.column-item {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  margin-bottom: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.column-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,123,255,0.1);
}
.column-link {
  display: flex; /* サムネイルとメイン記事を横に並べる */
  padding: 20px;
  text-decoration: none;
  color: inherit;
  align-items: flex-start;
}

/* サムネイル */
.column-thumbnail {
  flex: 0 0 80px; /* 幅を固定 */
  height: 80px;
  margin-right: 20px;
  border-radius: 8px;
  overflow: hidden;
  background: #eee;
}
.column-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- 記事メイン（ここが重要！） --- */
.column-main {
  flex: 1;
  display: flex;
  flex-direction: column; /* 中身を縦に並べる（これで隙間が消えます） */
  gap: 8px; /* 要素間の間隔 */
}

.column-title {
  font-size: 1.2em;
  font-weight: bold;
  color: #0056b3;
  line-height: 1.4;
}
.column-summary {
  font-size: 0.95em;
  color: #555;
  line-height: 1.6;
}

/* メタ情報（日付・タグ） */
.column-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 5px;
}
.column-date {
  font-size: 0.85em;
  color: #999;
}
.column-date::after {
  content: "|";
  margin-left: 10px;
  color: #ddd;
}
.column-cat {
  background: #eef5ff;
  color: #007bff;
  font-size: 0.8em;
  padding: 2px 10px;
  border-radius: 20px;
  border: 1px solid #d0e3ff;
}
.column-cat::before {
  content: "#";
  margin-right: 2px;
}

/* 戻るボタン */
.btn-container {
  text-align: center;
  margin-top: 40px;
}
.back-btn {
  background: #fff;
  color: #007bff;
  border: 1px solid #007bff;
  padding: 10px 30px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s;
}
.back-btn:hover {
  background: #007bff;
  color: #fff;
}

/* モバイル対応 */
@media (max-width: 600px) {
  .column-link {
    padding: 15px;
  }
  .column-thumbnail {
    flex: 0 0 60px;
    height: 60px;
    margin-right: 15px;
  }
  .column-title {
    font-size: 1.05em;
  }
}
.tag-btn {
  margin: 2px 4px;
  padding: 3px 8px;
  cursor: pointer;
  background: #e9f3ff;
  border: 1px solid #90c4eb;
  border-radius: 5px;
  font-size: 0.95em;
}
.tag-btn:hover, .tag-btn.tag-btn-all:hover {
  background: #b9e1ff;
}
.tag-btn-all {
  background: #ffffff;
  border: 1px solid #cccccc;
  margin-right: 10px;
}
.tag-filter-section {
  margin: 1.2em 0 0.6em 0;  /* 下だけやや控えめ */
  padding: 0.7em 1em 0.7em 1em; 
}
.tag-filter-section {
  margin: 2em 0 2.5em 0;
  padding: 1em;
  background: linear-gradient(90deg,#f8fafd 70%,#e4f1f7 100%);
  border-radius: 12px;
  box-shadow: 0 2px 8px #d1e3ee3c;
  display: flex;
  flex-direction: column;
  align-items: center;         /* 横方向中央揃え */
  justify-content: center;     /* 縦方向も中央（flex-direction:column時） */
  width: 100%;
}

.tag-filter-label {
  font-weight: bold;
  font-size: 1.08em;
  margin-bottom: 12px;
  color: #256195;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: center;    /* この1行で中央に */
  width: 100%;
  text-align: center;         /* 小画面対策 */
}
.tag-filter-label i { margin-right: 7px; }

#tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;   /* タグボタンも中央に寄せる */
  width: 100%;
}

.tag-btn {
  background: linear-gradient(90deg,#fff,#e6f2fb 90%);
  color: #2671b7;
  border: none;
  border-radius: 20px;
  padding: 6px 17px;
  font-size: 1em;
  font-weight: 500;
  margin: 0 0 2px 0;
  transition: all 0.15s;
  box-shadow: 0 1px 2.5px #b1c7dd48;
  cursor: pointer;
  outline: none;
}
.tag-btn:hover, .tag-btn.active {
  background: linear-gradient(90deg,#2671b7 60%,#56b0fa 100%);
  color: #fff;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 3px 12px #7dbdff2c;
}

.tag-btn-all {
  background: #fdf8ee;
  color: #a98241;
  border: none;
  font-weight: normal;
}
.tag-btn-all:hover, .tag-btn-all.active {
  background: linear-gradient(90deg,#ffecbc 70%,#ffe4a2 100%);
  color: #824b00;
}

@media (max-width: 700px) {
  .tag-filter-section { flex-direction: column; align-items: flex-start; }
  #tag-list { gap: 4px; margin-top: 6px; }
  .tag-filter-label { margin-bottom: 4px; }
}






/* --- ダークモード対応 --- */
@media (prefers-color-scheme: dark) {
  body {
    background: #121212; /* 真っ黒すぎない深いグレー */
    color: #e0e0e0;
  }

  header {
    background: #1e1e1e;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  }

  .page-title {
    color: #4faaf4; /* 少し明るめの青に */
  }

  /* 記事カード */
  .column-item {
    background: #1e1e1e;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  }
  .column-item:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    background: #252525;
  }

  .column-thumbnail {
    background: #333;
  }

  .column-title {
    color: #90caf9; /* ダーク背景で見やすい明るい青 */
  }

  .column-summary {
    color: #b0b0b0;
  }

  /* 日付とタグ */
  .column-date {
    color: #888;
  }
  .column-date::after {
    color: #444;
  }
  .column-cat {
    background: #1a2733;
    color: #4faaf4;
    border-color: #2c3e50;
  }

  /* タグフィルターセクション */
  .tag-filter-section {
    background: linear-gradient(90deg, #1a1a1a 70%, #1e2b36 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  }

  .tag-filter-label {
    color: #90caf9;
  }

  /* タグボタン */
  .tag-btn {
    background: linear-gradient(90deg, #2a2a2a, #333 90%);
    color: #90caf9;
    box-shadow: 0 1px 2.5px rgba(0,0,0,0.5);
  }
  .tag-btn:hover, .tag-btn.active {
    background: linear-gradient(90deg, #1976d2 60%, #42a5f5 100%);
    color: #fff;
  }

  /* 「すべて」ボタン */
  .tag-btn-all {
    background: #2c251a;
    color: #dcb67a;
  }
  .tag-btn-all:hover, .tag-btn-all.active {
    background: linear-gradient(90deg, #5d4037 70%, #6d4c41 100%);
    color: #ffe0b2;
  }

  /* 戻るボタン */
  .back-btn {
    background: transparent;
    color: #4faaf4;
    border-color: #4faaf4;
  }
  .back-btn:hover {
    background: #4faaf4;
    color: #121212;
  }
}