body {
  font-family: sans-serif;
  background-color: #ffffff;
  padding: 1.5em;
  font-size: 14px;
  color: #222;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ★追加: タイトルと更新ボタンを囲むコンテナ */
.title-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em; /* タイトルとボタンの間隔 */
  margin-bottom: 1em; /* h1からマージンを移動 */
}

/* ★変更: h1からマージンとテキスト揃えを削除 */
h1 {
  font-size: 1.3em;
  margin: 0; /* マージンをコンテナ側で管理 */
}

/* ★追加: 更新ボタンのスタイル */
#refreshBtn {
  background: none;
  border: none;
  font-size: 1.5em; /* アイコンのサイズ */
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s;
}

#refreshBtn:hover {
  opacity: 1;
}

.search-container {
  position: relative;
  width: 100%;
  max-width: 600px;
}

input[type="text"] {
  width: 100%;
  padding: 0.5em;
  margin-bottom: 1em;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding-right: 2.5em;
  box-sizing: border-box;
}

#clearSearchBtn {
  position: absolute;
  right: 8px;
  top: calc(0.5em + 1px);
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #888;
  display: none;
  padding: 4px;
}

#articleList {
  width: 100%;
  max-width: 1000px;
}

.article {
  display: flex;
  padding: 0.2em 0;
  border-bottom: 1px solid #eee;
  align-items: baseline;
}

.date {
  width: 105px;
  flex-shrink: 0;
  color: #777;
  font-size: 14px;
  padding-right: 1em;
}

.title-content {
  flex-grow: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.title-content strong {
  font-weight: bold;
  color: #222;
}

.domain {
  font-size: 12px;
  color: #555;
  margin-left: 0.4em;
}

.article:hover {
  background-color: #eef5f7;
}

.new-mark {
  color: #8bc3ca;
  font-size: 9px;
  margin-right: 0.4em;
}

.divider {
  border: none;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
}

#tagFilters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 1em;
  max-width: 1000px;
}

.tag-button {
  background-color: #f0f0f0;
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s;
  color: black;
}

.tag-button:hover {
  filter: brightness(95%);
}

.tag-button.active {
  border: 2px solid #333;
  font-weight: bold;
}

.tag-button-Vulnerability, .tag-button-脆弱性 { background-color: #FFB6C1; }
.tag-button-Threat, .tag-button-脅威 { background-color: #cddc39; }
.tag-button-Incident, .tag-button-インシデント { background-color: #90EE90; }
.tag-button-Situation, .tag-button-情勢 { background-color: #cacaff; }
.tag-button-Service, .tag-button-サービス { background-color: #FFDAB9; }
.tag-button-Report, .tag-button-レポート { background-color: #AFEEEE; }

mark {
  padding: 0.1em 0;
}

.mark-Vulnerability { background-color: #FFB6C1; color: black; }
.mark-Threat { background-color: #cddc39; color: black; }
.mark-Incident { background-color: #90EE90; color: black; }
.mark-Situation { background-color: #cacaff; color: black; }
.mark-Service { background-color: #FFDAB9; color: black; }
.mark-Report { background-color: #AFEEEE; color: black; }
.mark-other { background-color: yellow; color: black; }

#scrollToTopBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #555;
  color: white;
  border: none;
  font-size: 20px;
  cursor: pointer;
  z-index: 1000;
  opacity: 0.7;
  transition: opacity 0.2s;
}

#scrollToTopBtn:hover {
  opacity: 1;
}

.article.google-news {
  background-color: #ffffe0;
}
/* ★追加: event.htmlの概要文スタイル */
.title-content .content {
  font-weight: normal;
  color: #888;
  font-size: 14px;
  margin-left: 0.5em;
}

/* ★変更: ヒットしなかった記事のスタイル（opacity指定を削除） */
.unmatched-article {
  
}

.unmatched-article:hover {
  
}

/* ★追加: セカンダリ検索窓のスタイル */
.secondary-search-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 1.5em auto 1em auto; /* 上下のマージンを調整 */
}

.secondary-search-container input[type="text"] {
  width: 100%;
  padding: 0.5em;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding-right: 2.5em;
  box-sizing: border-box;
}

.secondary-search-container button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #888;
  display: none;
  padding: 4px;
}

/* --- レスポンシブ対応：ここから追加 --- */

/* 画面幅が768px以下の場合に適用されるスタイル */
@media screen and (max-width: 768px) {
  .article {
    /* 日付とタイトルが縦に並ぶように調整 */
    flex-direction: column;
    align-items: flex-start; /* 左揃えにする */
    padding: 0.5em 0; /* 少し余白を調整 */
  }

  .date {
    width: auto; /* 幅の固定を解除 */
    padding-right: 0;
    margin-bottom: 0.2em; /* タイトルとの間に少し間隔をあける */
    font-size: 13px; /* 少しフォントサイズを調整 */
  }

  .title-content {
    /* テキストの折り返しを許可し、全文表示する */
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
}