/* お知らせ（一覧・本文）だけで使う形。本文の文字組みは minirivet.css の .mr-prose。 */

.news-page { padding-top: clamp(40px, 6vw, 80px); }
.news-heading { margin-bottom: clamp(24px, 4vw, 40px); }

/* 一覧 */
.news-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--mr-ink); }
.news-list li { border-bottom: 1px solid var(--mr-line); }
.news-list a { display: grid; grid-template-columns: 7em minmax(0, 1fr) auto; gap: 4px 24px; padding-block: 24px; text-decoration: none; }
.news-list a::after { content: "→"; color: var(--mr-muted); transition: transform var(--mr-ease); }
.news-list a:hover::after { transform: translateX(3px); color: var(--mr-ink); }
.news-list time, .news-date { color: var(--mr-muted); font-size: var(--mr-fs-sm); font-variant-numeric: tabular-nums; }
.news-list-body { display: grid; gap: 6px; }
.news-list-title { font-weight: 600; }
.news-list a:hover .news-list-title { text-decoration: underline; }
.news-list-excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--mr-ink-2); font-size: var(--mr-fs-sm); }
.news-list-attach { color: var(--mr-clogra); font-size: var(--mr-fs-xs); }

/* 本文 */
.news-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 16px; color: var(--mr-ink-2); font-size: var(--mr-fs-sm); text-decoration: none; }
.news-back:hover { color: var(--mr-ink); text-decoration: underline; }
.news-head { margin-bottom: clamp(24px, 4vw, 40px); }
.news-date { display: block; margin-bottom: 8px; }
.news-body { margin-bottom: 40px; }
.news-body > :first-child { margin-top: 0; }
.news-body h4 { margin: 1.6em 0 .5em; }
.news-body blockquote { margin: 0 0 1.4em; padding-left: 1.2em; border-left: 2px solid var(--mr-line-strong); color: var(--mr-ink-2); }
.news-body hr { border: 0; border-top: 1px solid var(--mr-line); margin: 2.4em 0; }
.news-body code { padding: .1em .4em; background: var(--mr-sunk); border-radius: 4px; font-size: .9em; }
.news-body pre { margin: 0 0 1.4em; padding: 14px 16px; overflow-x: auto; background: var(--mr-sunk); border-radius: var(--mr-radius-sm); font-size: var(--mr-fs-sm); line-height: 1.7; }
.news-body pre code { padding: 0; background: none; }
.news-body img { margin: .5em 0 1.4em; border-radius: var(--mr-radius); }
.news-body table { display: block; overflow-x: auto; }

/* 添付: 画像 */
.news-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 40px; }
.news-gallery.is-single { grid-template-columns: minmax(0, 1fr); }
.news-gallery a { display: block; cursor: zoom-in; }
.news-gallery img { max-height: 70vh; object-fit: contain; }
.news-gallery:not(.is-single) img { aspect-ratio: 4 / 3; object-fit: cover; }

/* 添付: PDF をページ内に表示 */
.news-pdf { margin-bottom: 40px; border-top: 1px solid var(--mr-line); }
.news-pdf-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding-block: 8px; }
.news-pdf-head small { margin-left: 10px; color: var(--mr-muted); }
.news-pdf-view { display: block; width: 100%; height: min(82vh, 980px); border: 1px solid var(--mr-line); border-radius: var(--mr-radius); background: var(--mr-sunk); }
.news-pdf-fallback { padding: 24px; color: var(--mr-ink-2); font-size: var(--mr-fs-sm); }

/* 添付ファイルの一覧 */
.news-files { margin-bottom: 40px; }
.news-files h2 { margin-bottom: 8px; font-weight: 600; }
.news-files ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--mr-line); }
.news-files li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; min-height: 56px; padding-block: 10px; border-bottom: 1px solid var(--mr-line); font-size: var(--mr-fs-sm); }
.news-file-kind { flex: none; width: 3.4em; border: 1px solid var(--mr-line-strong); border-radius: var(--mr-radius-sm); color: var(--mr-ink-2); font-size: var(--mr-fs-xs); text-align: center; }
.news-files .news-file-name { flex: 1; min-width: 0; }
.news-file-size { color: var(--mr-muted); font-size: var(--mr-fs-xs); white-space: nowrap; }
.news-file-dl { white-space: nowrap; }

/* 前後のお知らせ */
.news-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding-top: 20px; border-top: 1px solid var(--mr-ink); }
.news-pager a { display: grid; gap: 4px; font-size: var(--mr-fs-sm); line-height: 1.7; text-decoration: none; }
.news-pager a:hover > span { text-decoration: underline; }
.news-pager small { color: var(--mr-muted); }
.news-pager .is-next { text-align: right; }

/* 画像の拡大表示 */
.news-lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 4vh 4vw; background: rgba(16, 32, 26, .92); cursor: zoom-out; }
.news-lightbox[hidden] { display: none; }
.news-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: default; }
.news-lightbox-close { position: absolute; top: 12px; right: 16px; width: 44px; height: 44px; border: 0; background: none; color: var(--mr-paper); font-size: 2rem; line-height: 1; cursor: pointer; }

@media (max-width: 640px) {
  .news-list a { grid-template-columns: minmax(0, 1fr) auto; }
  .news-list time { grid-column: 1 / -1; }
  .news-list a::after { grid-row: 2; grid-column: 2; }
  .news-gallery { grid-template-columns: minmax(0, 1fr); }
  .news-pdf-view { height: 70vh; }
  .news-pager { grid-template-columns: minmax(0, 1fr); }
  .news-pager .is-next { text-align: left; }
}
