/* お知らせのページ（/news/。tools/lib/render.mjs が作る）の見た目。沼の演出は持ち込まず、404.html と同じくらい軽くする。
   色と文字はトップ（index.html）と同じ。一覧の1行の形も、トップのお知らせ欄と同じ */
:root {
  --cream: #fff5dc;
  --orange: #ff5a14;
  --ink: #08090a;
  --line: rgba(255, 245, 220, .2);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: #0e0c08; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(#2d6f5f, #123e39 28rem, #0b1714 60rem, #0e0c08 90rem) no-repeat, #0e0c08;
  color: var(--cream);
  font-family: "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", Meiryo, system-ui, sans-serif;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
html[data-lang="ja"] [data-l="en"], html[data-lang="en"] [data-l="ja"] { display: none !important; }
html:not([data-lang]) .lang { display: none; }
a { color: inherit; text-decoration-color: var(--orange); text-decoration-thickness: .1em; text-underline-offset: .25em; }
a:hover { text-decoration-color: var(--cream); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--cream); outline-offset: 2px; border-radius: .2rem; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* 手元のプレビューだけに出る帯 */
.preview-bar { margin: 0; padding: .4rem 16px; background: var(--orange); color: var(--ink); font-size: .8125rem; font-weight: 700; text-align: center; }

/* ───────── 上: ロゴ（トップへ）と言語 */
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px 0 16px; }
.home { display: block; padding: 4px 0; border-radius: .3rem; }
.home img { display: block; width: auto; height: 44px; }
.lang { display: flex; gap: 4px; }
.lang button {
  display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: .4rem;
  background: none; cursor: pointer; opacity: .55;
}
.lang button:hover { opacity: .85; }
.lang button[aria-pressed="true"] { opacity: 1; background: rgba(255, 245, 220, .16); }
.lang svg { display: block; height: 20px; width: auto; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .4); }

main { flex: 1; width: min(100%, 44rem); margin: 0 auto; padding: 1.5rem 16px 3rem; }
h1 { margin: 0 0 1rem; font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.75rem); font-weight: 900; line-height: 1.4; letter-spacing: .02em; }
h1 .sub { display: block; font-size: .6em; font-weight: 700; opacity: .8; }

/* ───────── 一覧（トップのお知らせ欄と同じ形） */
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.tags a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 .8rem;
  border: 1px solid rgba(255, 245, 220, .4); border-radius: 999px;
  font-size: .875rem; text-decoration: none;
}
.tags a:hover { border-color: var(--cream); }
.tags a[aria-current="page"] { background: var(--cream); border-color: var(--cream); color: var(--ink); font-weight: 700; }

.news { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.news li { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.news time { font-weight: 700; font-variant-numeric: tabular-nums; }
.news p { margin: 0; }
.news .sum { margin-top: .2rem; font-size: .875rem; opacity: .85; }
.news .go { font-weight: 700; }
.news .ext { display: inline-block; margin-left: .35em; color: var(--orange); vertical-align: -.15em; }
.news .ext:hover { color: var(--cream); }
.news .ext svg { display: block; width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.news .go svg { display: inline-block; width: 1em; height: 1em; margin-left: .3em; vertical-align: -.12em; fill: none; stroke: var(--orange); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.empty { opacity: .8; }
@media (max-width: 30rem) {
  .news li { grid-template-columns: 1fr; gap: .1rem; }
}

/* 分類・タイトル・印（一覧と詳細で同じ） */
.meta { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0 0 .2rem; font-size: .75rem; line-height: 1.5; }
.cat, .tag, .flag { padding: 0 .45rem; border: 1px solid rgba(255, 245, 220, .4); border-radius: .25rem; }
.tag { background: rgba(255, 245, 220, .12); }
.pin { border-color: var(--orange); color: var(--orange); font-weight: 700; }
.flag.preview { border-color: var(--orange); background: var(--orange); color: var(--ink); font-weight: 700; }

/* ───────── 詳細ページ */
article .meta { margin-bottom: .5rem; }
article h1 { margin-bottom: .25rem; }
.date { margin: 0 0 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; opacity: .85; }
.ended { margin: 0 0 1.25rem; padding: .6rem .9rem; border-left: 3px solid var(--orange); background: rgba(8, 9, 10, .35); }
.hero { margin: 0 0 1.5rem; }
figure img { display: block; width: 100%; height: auto; border-radius: .5rem; background: rgba(8, 9, 10, .3); }
.lead { margin: 0 0 1.5rem; font-size: 1.0625rem; font-weight: 700; }
.body { line-height: 1.9; }
.body h2 { margin: 2rem 0 .6rem; padding-bottom: .3rem; border-bottom: 1px solid var(--line); font-size: 1.25rem; line-height: 1.5; }
.body h3 { margin: 1.5rem 0 .4rem; font-size: 1.0625rem; line-height: 1.5; }
.body p, .body ul { margin: 0 0 1rem; }
.body ul { padding-left: 1.4em; }
.body li + li { margin-top: .2rem; }
.body strong { color: #fff; }
.body figure { margin: 1.5rem 0; }
.button { margin: 1.25rem 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .4rem 1.4rem;
  border: 2px solid var(--orange); border-radius: .5rem;
  font-weight: 700; text-decoration: none;
}
.btn:hover { background: var(--orange); color: var(--ink); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 3rem 0 1rem; }
.pager a { display: block; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: .5rem; text-decoration: none; font-size: .875rem; }
.pager a:hover { border-color: var(--cream); }
.pager .prev { text-align: right; }
.pager .dir { display: block; margin-bottom: .2rem; font-size: .75rem; opacity: .75; }
@media (max-width: 30rem) {
  .pager { grid-template-columns: 1fr; }
  .pager .prev { text-align: left; }
}
.back { margin: 0; }
.back a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: 1rem 16px 1.5rem; border-top: 1px solid var(--line); font-size: .875rem; }
footer a { display: inline-flex; align-items: center; min-height: 44px; }
