/* ==========================================
   お知らせ一覧（/news/）・お知らせ詳細（/news/3）
   共通部分は base.css、透かし・拡大表示・絞り込みボタンは postcard.css
   ========================================== */

.news-page {
  max-width: 1040px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 32px;
  padding-bottom: 96px;
}

.news-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 24px;
}
.news-page .page-title {
  margin: 0;
  font-weight: 400;
  font-size: 44px;
  letter-spacing: 0.1em;
}
.news-count { margin: 0; font-family: var(--font-hand); font-size: 20px; }
.news-message { margin: 0; padding: 32px 0; color: var(--paper-soft); }
.news-message[hidden] { display: none; }

.news-categories { display: flex; flex-wrap: wrap; gap: 10px; }
.news-categories[hidden] { display: none; }

.news-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 10px;
  border: 1px solid var(--mist);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.news-badge[hidden] { display: none; }

/* カテゴリの色分け（塗りつぶし・枠線・明るさの組み合わせで見分ける） */
.news-badge[data-cat="Info"]    { border-color: var(--mist); }
.news-badge[data-cat="Illust"]  { border-color: var(--lamp); background: var(--lamp); color: var(--paper); }
.news-badge[data-cat="Video"]   { border-color: var(--sea); background: var(--sea); color: var(--paper); }
.news-badge[data-cat="Graphic"] { border-color: var(--lamp); }
.news-badge[data-cat="Code"]    { border-color: var(--paper); background: var(--paper); color: var(--night); }
/* 紙の上（お知らせ詳細）では、紙色の Code に黒い枠を付ける */
.news-letter .news-badge[data-cat="Code"] { border-color: var(--night); }

/* 絞り込みボタンの色の目印 */
.cat-mark {
  width: 14px;
  height: 14px;
  margin-right: 8px;
  padding: 0;
}
.chip.is-active .cat-mark[data-cat="Code"] { border-color: var(--night); }

/* ---------- 一覧（年ごと） ---------- */
.news-years { display: flex; flex-direction: column; gap: 16px; }
.news-years[hidden] { display: none; }
.news-year {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 40px;
  padding-top: 16px;
  min-width: 0;
}
.news-year-title {
  flex: 0 0 110px;
  margin: 0;
  font-family: var(--font-hand);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.2;
  color: rgba(244, 241, 248, 0.9);
}
.news-rows {
  flex: 1 1 520px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.news-row { border-bottom: 1px dotted var(--mist); }
.news-row a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
}
.news-row-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.news-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.news-row-meta time { font-family: var(--font-hand); font-size: 17px; color: rgba(244, 241, 248, 0.86); }
.news-row-title { font-size: 18px; }
.news-row-excerpt {
  overflow: hidden;
  font-size: 14px;
  color: rgba(244, 241, 248, 0.72);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.news-page .news-new {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--lamp);
  border-radius: 50%;
  font-size: 13px;
  transform: rotate(-12deg);
}

.news-more {
  align-self: center;
  margin-top: 24px;
  min-height: 52px;
  padding: 0 32px;
  background: transparent;
  border: 1px solid var(--paper);
  color: var(--paper);
  font-size: 16px;
  letter-spacing: 0.08em;
}
.news-more[hidden] { display: none; }

.news-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 72px 24px;
  border: 1px dotted var(--mist);
  text-align: center;
}
.news-empty[hidden] { display: none; }
.news-empty img { width: 72px; height: auto; opacity: 0.85; }
.news-empty-title { margin: 0; font-weight: 400; font-size: 20px; }
.news-empty-text { margin: 0; font-family: var(--font-hand); font-size: 16px; color: var(--paper-soft); }
.news-empty-reset {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 28px;
  background: var(--lamp);
  letter-spacing: 0.08em;
}

/* ---------- 詳細（手紙） ---------- */
.news-letter {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 44px 48px 40px;
  background: var(--paper);
  color: var(--night);
  transform: rotate(-0.4deg);
}
.news-letter[hidden] { display: none; }
.news-letter a { color: var(--night); }
.news-letter-stamp {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 64px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--lamp);
}
.news-letter-stamp img { width: 54px; height: 54px; object-fit: contain; }
.news-letter-meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.news-letter-meta time { font-family: var(--font-hand); font-size: 17px; }
.news-letter-title {
  margin: 0;
  padding-right: 80px;
  font-weight: 400;
  font-size: 30px;
  line-height: 1.5;
}
.news-letter-body {
  margin: 0;
  font-size: 16px;
  line-height: 2.1;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.news-letter-sign { margin: 0; text-align: right; font-family: var(--font-hand); font-size: 18px; }

.news-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
  gap: 12px;
}
.news-gallery[hidden] { display: none; }
.news-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--sea);
  cursor: zoom-in;
}
.news-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

.news-links { display: flex; flex-wrap: wrap; gap: 10px; }
.news-links[hidden] { display: none; }
.news-letter .news-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  background: var(--lamp);
  color: var(--paper);
}

.news-article-more {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px dotted var(--mist);
}
.news-article-more[hidden] { display: none; }
.news-pager {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 14px;
}
.news-pager:empty { display: none; }
.news-pager-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--mist);
}
.news-pager-older { grid-column: -2 / -1; text-align: right; }
.news-pager-dir { font-size: 12px; color: var(--paper-soft); }
.news-back {
  align-self: center;
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 32px;
  border: 1px solid var(--paper);
  letter-spacing: 0.08em;
}

/* ---------- スマホ（768px以下） ---------- */
@media (max-width: 768px) {
  .news-page .page-title { font-size: 30px; }
  .news-year { flex-direction: column; }
  .news-year-title { flex: none; font-size: 28px; }
  .news-rows { flex: none; width: 100%; }
  .news-letter { padding: 24px 20px; }
  .news-letter-title { font-size: 22px; padding-right: 72px; }
  .news-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-pager-older { grid-column: auto; }
}
