/* お知らせ（トップ・重要なお知らせ一覧・お知らせ一覧で共通）。js/news.js が生成する要素のスタイル */
.news-list { border-top: 2px solid var(--ink); }
.news-item { border-bottom: 1px solid var(--line); }
.news-item__btn {
  width: 100%; display: grid; grid-template-columns: auto auto 1fr 24px; align-items: start; gap: 6px 16px;
  text-align: left; padding: 18px 8px; min-height: 64px; position: relative;
  transition: background-color .2s, padding .25s var(--ease);
}
.news-item__btn:hover { background: var(--surface); padding-left: 16px; }
.news-item__date { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .04em; padding-top: 2px; white-space: nowrap; }
.news-item__tag { align-self: start; margin-top: 1px; }
.news-item__title { color: var(--ink); font-weight: 500; line-height: 1.7; min-width: 0; }
.news-item__text { transition: color .2s; }
.news-item__btn:hover .news-item__text { color: var(--red-dark); }
.news-item__badges { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: 10px; vertical-align: middle; }
.news-item__chev { width: 10px; height: 10px; margin-top: 10px; border-top: 2px solid #aab0b6; border-right: 2px solid #aab0b6; transform: rotate(45deg); justify-self: end; transition: transform .25s var(--ease), border-color .2s; }
.news-item__btn:hover .news-item__chev { border-color: var(--red); transform: translateX(3px) rotate(45deg); }
.news-badge { display: inline-block; font-size: 11px; font-weight: 700; line-height: 1.5; padding: 0 8px; border-radius: 4px; color: #fff; letter-spacing: .04em; }
.news-badge--new { background: var(--red); }
.news-badge--image { background: #1b5fa8; }
.news-badge--pdf { background: #b04a00; }
@media (max-width: 640px) {
  .news-item__btn { grid-template-columns: auto 1fr 20px; padding: 16px 4px; }
  .news-item__title { grid-column: 1 / -1; grid-row: 2; }
  .news-item__chev { grid-column: 3; grid-row: 1; margin-top: 6px; }
  .news-item__date { grid-column: 1; }
  .news-item__tag { grid-column: 2; justify-self: start; }
  .news-item__badges { margin-left: 8px; }
}

/* 読み込み中・0件・通信失敗 */
.news-state { padding: 36px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.news-list:not([hidden]) + .news-state { border-bottom: 0; }
.news-state--loading { flex-direction: row; justify-content: center; }
.news-state--error { color: var(--ink); background: #fff7f8; border: 1px solid #f1c3cb; border-radius: var(--radius-sm); margin-top: 8px; }
.news-state--error strong { color: #8d0f25; }
.news-spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid #e1e3e6; border-top-color: var(--red); animation: spin 1s linear infinite; }
html[data-motion="off"] .news-spinner { animation: none; border-top-color: #e1e3e6; border-right-color: var(--red); }
.news-more { text-align: center; padding-top: 28px; }
.news-tools { margin-bottom: 24px; padding: 20px 20px 4px; background: var(--surface); border-radius: var(--radius); }
.news-tools__row { display: grid; gap: 4px 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.news-tools .field { margin-bottom: 16px; }
.news-count { padding-bottom: 14px; }

/* 詳細ダイアログ */
.news-body__text { line-height: 2; }
.news-link { color: var(--red-dark); text-decoration: underline; text-underline-offset: 3px; word-break: break-all; }
.news-attach { margin-top: 28px; display: grid; gap: 28px; }
.news-attach:empty { display: none; }
.news-attach__title { font-size: 15px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.news-stage { position: relative; background: #f1f2f3; border-radius: var(--radius-sm); min-height: 180px; display: grid; place-items: center; overflow: hidden; }
.news-stage img { max-height: min(62vh, 640px); width: auto; max-width: 100%; margin-inline: auto; object-fit: contain; }
.news-stage.is-loading img { opacity: .3; }
.news-stage.is-loading::after { content: ""; position: absolute; width: 28px; height: 28px; border-radius: 50%; border: 3px solid #d9dcdf; border-top-color: var(--red); animation: spin 1s linear infinite; }
.news-stage.is-error img { display: none; }
.news-stage__status { padding: 24px; color: #8d0f25; font-weight: 700; text-align: center; }
.news-stage__status:empty { display: none; }
.news-gallery__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 12px; }
.news-gallery__count { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; min-width: 4em; text-align: center; }
.news-gallery__bar .link-arrow { margin-left: auto; }
.news-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.news-thumb { width: 72px; height: 72px; border-radius: 8px; overflow: hidden; border: 3px solid transparent; opacity: .7; transition: opacity .2s, border-color .2s; background: #eee; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-thumb:hover, .news-thumb[aria-current="true"] { opacity: 1; }
.news-thumb[aria-current="true"] { border-color: var(--red); }
.news-files { display: grid; gap: 12px; }
.news-file { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.news-file__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.news-file__icon { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: #fff; background: #b04a00; border-radius: 6px; padding: 5px 9px; }
.news-file__name { flex: 1 1 200px; min-width: 0; font-weight: 700; color: var(--ink); word-break: break-all; }
.news-file__actions { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.news-file__preview { margin-top: 14px; }
.news-file__preview iframe { width: 100%; height: min(60vh, 560px); border: 1px solid var(--line); border-radius: 8px; background: #f1f2f3; }
@media (max-width: 640px) {
  .news-thumb { width: 60px; height: 60px; }
  .news-gallery__bar .link-arrow { margin-left: 0; width: 100%; }
  .news-file__actions { width: 100%; }
  .news-file__actions .btn { flex: 1 1 auto; width: auto; }
}

.news-other { margin-top: 40px; text-align: right; }
