/*
 * ハブサイト: 青・水色基調。外部フォント・外部画像・インライン style なし（CSP: style-src 'self'）。
 * 動きは控えめ（CSS のみ + static/js）。prefers-reduced-motion では動きを止める。ダークモードは OS の設定に従う。
 * 色: 主 #0a6cc6 / 濃 #084e92 / 薄い青 #e8f2fd / 水色 #cfe6fb / アクセント #38a9f0 / 背景 #f7f9fc / 文字 #1c2a3a
 */
:root {
  --fg: #1c2a3a;
  --muted: #475a6f;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --panel: #e8f2fd;
  --line: #d3deeb;
  --primary: #0a6cc6;
  --primary-deep: #084e92;
  --sky: #cfe6fb;
  --accent: #38a9f0;
  --link: #0a6cc6;
  --btn-bg: #0a6cc6;
  --btn-fg: #ffffff;
  --eyebrow: #084e92;
  --bar: #0a6cc6;
  --hero-a: #084e92;
  --hero-b: #0a6cc6;
  --hero-fg: #ffffff;
  --footer-bg: #0b2f55;
  --footer-fg: #e8f2fd;
  --footer-link: #cfe6fb;
  --ok-bg: #e3f4ea;
  --ok-fg: #1e5c3a;
  --ng-bg: #fdecea;
  --ng-fg: #8e2a1f;
  --pr-bg: #fff4e5;
  --pr-line: #b8691a;
  --ai-bg: #e8f2fd;
  --focus: #0a6cc6;
  --shadow: 0 1px 2px rgba(8, 78, 146, 0.08);
  --shadow-up: 0 8px 18px rgba(8, 78, 146, 0.14);
  /* カテゴリのラベルの色（青の濃淡。1=薄い〜4=濃い。文字との対は試験でコントラストを検査） */
  --cat1-bg: #e8f2fd;
  --cat1-fg: #084e92;
  --cat2-bg: #cfe6fb;
  --cat2-fg: #073f78;
  --cat3-bg: #0a6cc6;
  --cat3-fg: #ffffff;
  --cat4-bg: #084e92;
  --cat4-fg: #ffffff;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e6eef7;
    --muted: #a9bdd3;
    --bg: #0c1a2b;
    --surface: #12263d;
    --panel: #17314f;
    --line: #26405c;
    --primary: #38a9f0;
    --primary-deep: #bfdcf8;
    --sky: #1f4a78;
    --accent: #38a9f0;
    --link: #7cc0f8;
    --btn-bg: #38a9f0;
    --btn-fg: #04121f;
    --eyebrow: #7cc0f8;
    --bar: #38a9f0;
    --hero-a: #0a3a6e;
    --hero-b: #0f5aa6;
    --footer-bg: #081321;
    --footer-fg: #e6eef7;
    --footer-link: #7cc0f8;
    --ok-bg: #173324;
    --ok-fg: #8fd8ae;
    --ng-bg: #3a1c19;
    --ng-fg: #f3a79e;
    --pr-bg: #3a2a14;
    --pr-line: #e0a35a;
    --ai-bg: #17314f;
    --focus: #7cc0f8;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-up: 0 8px 18px rgba(0, 0, 0, 0.4);
    --cat1-bg: #17314f;
    --cat1-fg: #bfdcf8;
    --cat2-bg: #1f4a78;
    --cat2-fg: #e6eef7;
    --cat3-bg: #38a9f0;
    --cat3-fg: #04121f;
    --cat4-bg: #7cc0f8;
    --cat4-fg: #04121f;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--fg);
  background: var(--bg);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Noto Sans JP", "Noto Sans CJK JP", Meiryo, system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.8;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
  word-break: normal;
  line-break: strict;
}

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--btn-bg); color: var(--btn-fg); padding: 0.5rem 1rem; z-index: 2000; }
.skip:focus { left: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1rem; }
main.wrap { padding-top: 0.5rem; padding-bottom: 3rem; }
.home-body { padding-bottom: 3rem; }

/* ヘッダ */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.5rem; padding-top: 0.5rem; padding-bottom: 0.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 800; font-size: 1.15rem; letter-spacing: 0.04em; color: var(--fg); text-decoration: none; }
.brand-mark { width: 0.8rem; height: 0.8rem; border-radius: 50%; background: var(--primary); box-shadow: 0.35rem 0.2rem 0 -0.1rem var(--accent); }
.nav { display: flex; flex-wrap: wrap; gap: 0.1rem 1.1rem; list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--fg); text-decoration: none; padding: 0.3rem 0; display: inline-block; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--primary); }
.nav-menu { position: relative; }
.nav-menu summary { cursor: pointer; padding: 0.3rem 0; }
.nav-menu ul { list-style: none; margin: 0.25rem 0 0; padding: 0.4rem 0.8rem; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow-up); position: absolute; z-index: 20; min-width: 14rem; }
.nav-menu li { padding: 0.15rem 0; }

/* 見出し・英語ラベル */
h1, h2, h3, .hero-copy { font-feature-settings: "palt"; }
h1 { font-size: 1.9rem; font-weight: 800; line-height: 1.4; letter-spacing: 0.04em; margin: 0.4rem 0 0.75rem; }
h2 { position: relative; font-size: 1.35rem; font-weight: 800; line-height: 1.45; letter-spacing: 0.04em; margin: 2.2rem 0 0.8rem; padding-bottom: 0.45rem; border-bottom: 2px solid var(--sky); }
h2::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 3.5rem; height: 2px; background: var(--primary); }
h3 { font-size: 1.1rem; font-weight: 700; line-height: 1.5; margin: 1.5rem 0 0.4rem; }
.eyebrow { margin: 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.18em; color: var(--eyebrow); line-height: 1.6; }
.eyebrow::before { content: ""; display: inline-block; width: 1.6rem; height: 2px; margin-right: 0.6rem; vertical-align: middle; background: var(--accent); }
.page-head { padding: 1.5rem 0 0.25rem; }
.page-head h1 { margin-top: 0.2rem; }
.sec { margin-top: 3rem; }
.sec-head { margin-bottom: 1rem; }
.sec-head h2 { margin: 0.1rem 0 0; }
.more { margin: 1rem 0 0; text-align: right; font-weight: 600; }
.more a::after { content: " →"; }

p { margin: 0.75rem 0; }
.lead { color: var(--muted); font-size: 1.05rem; max-width: 44rem; }
.small { font-size: 0.875rem; color: var(--muted); }
.meta { color: var(--muted); font-size: 0.875rem; margin: 0.25rem 0; }
.prose { max-width: 42rem; }
.prose h2 { font-size: 1.3rem; margin-top: 2.6rem; }
.prose ul, .prose ol { padding-left: 1.5rem; }
.prose li { margin: 0.3rem 0; }
.prose p { margin: 1rem 0; }
.prose blockquote, blockquote { margin: 1rem 0; padding: 0.1rem 1rem; border-left: 4px solid var(--accent); color: var(--muted); background: var(--panel); border-radius: 0 6px 6px 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; background: var(--panel); padding: 0.1em 0.35em; border-radius: 4px; }
pre { background: var(--panel); border: 1px solid var(--line); padding: 0.75rem 1rem; overflow-x: auto; border-radius: 6px; line-height: 1.5; }
pre code { background: none; padding: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
img { max-width: 100%; height: auto; }

/* 表 */
.table-wrap { overflow-x: auto; margin: 1rem 0; -webkit-overflow-scrolling: touch; background: var(--surface); border-radius: 6px; }
table { border-collapse: collapse; width: 100%; min-width: 28rem; font-size: 0.93rem; line-height: 1.6; }
th, td { border: 1px solid var(--line); padding: 0.5rem 0.7rem; text-align: left; vertical-align: top; }
th { background: var(--panel); font-weight: 700; }
.al-r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td time { white-space: nowrap; }
.al-c { text-align: center; }

/* パンくず・目次 */
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-top: 0.75rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "›"; margin: 0 0.5rem; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 0.6rem 0.8rem; margin: 1rem 0; max-width: 42rem; font-size: 0.93rem; }
.toc-title { font-weight: 700; margin: 0.25rem 0.3rem; font-size: 0.8rem; letter-spacing: 0.14em; color: var(--eyebrow); }
.toc ol { list-style: none; margin: 0.25rem 0; padding: 0; }
.toc li { margin: 0; }
.toc a { display: block; padding: 0.3rem 0.5rem; border-left: 3px solid transparent; color: var(--fg); text-decoration: none; line-height: 1.55; }
.toc a:hover { background: var(--panel); }
.toc a.is-active { border-left-color: var(--primary); background: var(--panel); font-weight: 700; color: var(--primary-deep); }

/* 注記・バッジ */
.notice { padding: 0.6rem 0.9rem; border-radius: 6px; margin: 0.9rem 0; font-size: 0.93rem; line-height: 1.7; max-width: 42rem; }
.notice.ai { background: var(--ai-bg); border: 1px solid var(--line); }
.notice.pr { background: var(--pr-bg); border: 1px solid var(--pr-line); }
.badge { display: inline-block; font-size: 0.75rem; font-weight: 700; line-height: 1.5; padding: 0.05rem 0.5rem; border-radius: 4px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); vertical-align: middle; white-space: nowrap; }
.badge.ok, .badge.st-published { background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok-fg); }
.badge.ng { background: var(--ng-bg); color: var(--ng-fg); border-color: var(--ng-fg); }
.badge.pr { background: var(--pr-bg); border-color: var(--pr-line); }
.badge.st-pending { border-style: dashed; }
.badge.st-developing { border-style: dotted; }

/* カード（画像 → タイトル → 説明 → タグ の同じ型） */
.cards { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.5rem), 1fr)); counter-reset: card; }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); counter-increment: card; transition: translate 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.card::before { content: ""; position: absolute; z-index: 3; left: 0; right: 0; top: 0; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.25s ease; pointer-events: none; }
.card-media { position: relative; aspect-ratio: 1280 / 670; background: var(--panel); overflow: hidden; }
.card-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-media::after { content: counter(card, decimal-leading-zero); position: absolute; left: 0.6rem; top: 0.6rem; background: var(--btn-bg); color: var(--btn-fg); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; line-height: 1.6; padding: 0 0.5rem; border-radius: 4px; }
.card-media-ph { display: grid; place-items: center; background: linear-gradient(135deg, var(--sky), var(--panel)); }
.card-media-ph span { color: var(--primary-deep); font-weight: 800; font-size: 1.4rem; letter-spacing: 0.2em; opacity: 0.7; }
.card-body { padding: 0.7rem 1rem 1rem; display: flex; flex-direction: column; flex: 1; }
.card h3, .card h4 { margin: 0.1rem 0 0.3rem; font-size: 1.05rem; line-height: 1.55; }
.card h3 a, .card h4 a { color: var(--fg); text-decoration: none; }
.card h3 a::after, .card h4 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card h3 a:focus-visible, .card h4 a:focus-visible { outline: none; }
.card h3 a:focus-visible::after, .card h4 a:focus-visible::after { outline: 3px solid var(--focus); outline-offset: -3px; border-radius: 8px; }
.card .meta { margin: 0; }
.card-desc { margin: 0.2rem 0 0.6rem; font-size: 0.92rem; line-height: 1.7; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .tags { position: relative; z-index: 2; margin: auto 0 0; }
.tags { margin: 0.4rem 0; }
.tag { display: inline-block; font-size: 0.8rem; line-height: 1.6; border-radius: 4px; padding: 0.1rem 0.6rem; margin: 0.1rem 0.2rem 0.1rem 0; text-decoration: none; color: var(--primary-deep); background: var(--panel); border: 1px solid transparent; }
a.tag:hover { border-color: var(--primary); }

/* カテゴリ: ラベル（英語ラベル＋日本語名。濃淡は tone 1〜4）、タブ（件数つき）、ページ送り、AI ニュースの日付 */
.cat-label { display: inline-flex; align-items: baseline; gap: 0.45rem; font-size: 0.8rem; line-height: 1.6; font-weight: 700; padding: 0.05rem 0.6rem; border-radius: 4px; text-decoration: none; border: 1px solid transparent; vertical-align: middle; }
.cat-label .cat-en { font-size: 0.7rem; letter-spacing: 0.12em; opacity: 0.85; }
.cat-tone-1 { background: var(--cat1-bg); color: var(--cat1-fg); border-color: var(--line); }
.cat-tone-2 { background: var(--cat2-bg); color: var(--cat2-fg); }
.cat-tone-3 { background: var(--cat3-bg); color: var(--cat3-fg); }
.cat-tone-4 { background: var(--cat4-bg); color: var(--cat4-fg); }
a.cat-label:hover { border-color: var(--primary-deep); }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.6rem; }
.card .card-meta .cat-label { position: relative; z-index: 2; }
.date-strong { font-size: 1.05rem; font-weight: 800; color: var(--primary-deep); letter-spacing: 0.02em; }
.cat-row { margin: 0.4rem 0 0; }
.news-date { margin: 0.5rem 0 0; padding-left: 0.7rem; border-left: 4px solid var(--accent); font-size: 1.5rem; font-weight: 800; line-height: 1.4; color: var(--primary-deep); letter-spacing: 0.02em; }
.page-no { font-size: 0.6em; font-weight: 700; color: var(--muted); }
.cat-tabs ul { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 1rem 0 0.25rem; padding: 0; }
.cat-tab { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.75rem; padding: 0.3rem 0.9rem; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); text-decoration: none; font-size: 0.9rem; transition: background-color 0.15s ease, border-color 0.15s ease; }
.cat-tab .cat-en { font-size: 0.68rem; letter-spacing: 0.12em; color: var(--eyebrow); font-weight: 700; }
.cat-tab .cat-count { color: var(--muted); font-size: 0.85rem; }
.cat-tab:hover { border-color: var(--primary); }
.cat-tab[aria-current] { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); font-weight: 700; }
.cat-tab[aria-current] .cat-en, .cat-tab[aria-current] .cat-count { color: var(--btn-fg); }
.pager ul { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 1.5rem 0 0.5rem; padding: 0; }
.pager a, .pager-cur { display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.75rem; padding: 0.2rem 0.8rem; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); text-decoration: none; }
.pager a:hover { border-color: var(--primary); }
.pager-cur { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); font-weight: 700; }

/* メディア型のトップ: 直近1週間の更新・日付別のニュース・カテゴリから探す・読了目安・関連サービス（PR） */
.head-links { margin-left: auto; }
.head-links ul { display: flex; gap: 0.2rem 0.5rem; list-style: none; margin: 0; padding: 0; font-size: 0.875rem; }
.head-links a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.7rem; border: 1px solid var(--line); border-radius: 6px; color: var(--fg); text-decoration: none; font-weight: 700; letter-spacing: 0.06em; }
.head-links a:hover { border-color: var(--primary); }
.read-time { font-size: 0.8rem; color: var(--muted); }
.read-time::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.35rem; border: 2px solid var(--accent); border-radius: 50%; vertical-align: -0.05em; }
.week { margin: 1.5rem 0 0; padding: 0.9rem 1.2rem; background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--primary); border-radius: 8px; }
.week-count { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; margin: 0; font-weight: 800; color: var(--primary-deep); }
.week-label { font-size: 1.15rem; letter-spacing: 0.04em; }
.week-num { font-size: 2.6rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.week-unit { font-size: 1.15rem; }
.week-rest .week-label { font-size: 1.1rem; }
.week-range { margin: 0.2rem 0 0; }
.news-day { margin-top: 1.6rem; }
.news-day-head { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 0.2rem; padding-left: 0.7rem; border-left: 4px solid var(--accent); font-size: 1.3rem; font-weight: 800; line-height: 1.4; color: var(--primary-deep); letter-spacing: 0.02em; }
.news-day .cards { margin-top: 0.6rem; }

/* ニュース速報（data/news/）: 日付ごとの短い項目。1項目ごとのページは無く、日付のまとめページに並べる */
.news-day-head a { color: inherit; text-decoration: none; }
.news-day-head a:hover { text-decoration: underline; }
.news-count { font-size: 0.85rem; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.news-day-more { margin: 0 0 0.3rem 1.1rem; }
.news-list { list-style: none; padding: 0; margin: 0.6rem 0 1rem; display: grid; gap: 0.9rem; }
.news-item { padding: 0.8rem 1rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: 8px; box-shadow: var(--shadow); }
.news-item .meta { margin: 0 0 0.2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.6rem; }
.news-vendor { font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.news-title { margin: 0.1rem 0 0.3rem; font-size: 1.05rem; line-height: 1.55; }
.news-summary { margin: 0.2rem 0 0.5rem; font-size: 0.95rem; line-height: 1.75; }
.news-src { margin: 0.2rem 0; color: var(--muted); }
.news-correction { margin: 0.4rem 0; padding: 0.4rem 0.7rem; border-left: 4px solid var(--pr-line); background: var(--pr-bg); font-size: 0.9rem; line-height: 1.7; }
.news-item .tags { margin: 0.4rem 0 0; }
.badge.unconfirmed { background: var(--pr-bg); border-color: var(--pr-line); border-style: dashed; }
.news-notice { margin: 0.6rem 0; }
.news-flash-title { margin: 1.2rem 0 0.2rem; font-size: 1.05rem; color: var(--muted); letter-spacing: 0.04em; }
.news-articles { margin-top: 1.6rem; }
.news-archive-list { list-style: none; padding: 0; margin: 0.6rem 0; display: grid; gap: 0.3rem 1.2rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.news-archive-list li { display: flex; gap: 0.6rem; align-items: baseline; }
button.cat-tab { font: inherit; font-size: 0.9rem; cursor: pointer; }
.cat-grid { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }
.cat-card { display: flex; flex-direction: column; gap: 0.3rem; height: 100%; padding: 0.8rem 1rem; border: 1px solid var(--line); border-left: 6px solid var(--primary); border-radius: 8px; background: var(--surface); color: var(--fg); text-decoration: none; box-shadow: var(--shadow); }
.cat-card:hover { border-color: var(--primary); }
.cat-card-1 { border-left-color: var(--sky); }
.cat-card-2 { border-left-color: var(--accent); }
.cat-card-4 { border-left-color: var(--primary-deep); }
.cat-card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.5rem; font-weight: 800; }
.cat-card .cat-en { font-size: 0.68rem; letter-spacing: 0.12em; color: var(--eyebrow); }
.cat-card .cat-count { color: var(--muted); font-size: 0.9rem; font-weight: 600; }
.cat-card-desc { font-size: 0.85rem; line-height: 1.6; color: var(--muted); }
.affiliate { margin-top: 2rem; padding: 0.1rem 1rem 0.8rem; border: 1px solid var(--pr-line); border-radius: 6px; background: var(--pr-bg); max-width: 42rem; }
.affiliate h2 { margin-top: 0.4rem; font-size: 1.05rem; border-bottom: 0; padding-bottom: 0; }
.affiliate h2::after { display: none; }
.aff-label { margin: 0.7rem 0 0; }
.affiliate ul { list-style: none; margin: 0.4rem 0 0; padding: 0; }
.affiliate li { margin: 0.5rem 0; font-weight: 700; }
.affiliate li p { margin: 0.1rem 0 0; font-weight: 400; font-size: 0.93rem; }

/* タグでの絞り込み（JS があるときだけ表示される） */
.filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 0.25rem; }
.filter-btn { font: inherit; font-size: 0.875rem; min-height: 2.5rem; padding: 0.3rem 0.9rem; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; transition: background-color 0.15s ease, border-color 0.15s ease; }
.filter-btn:hover { border-color: var(--primary); }
.filter-btn[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); font-weight: 700; }

.facts { margin: 1rem 0; border-top: 1px solid var(--line); }
.facts > div { display: grid; grid-template-columns: 8rem 1fr; gap: 0.5rem; border-bottom: 1px solid var(--line); padding: 0.5rem 0; }
.facts dt { font-weight: 700; color: var(--muted); }
.facts dd { margin: 0; }

/* ボタン */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.9rem; background: var(--btn-bg); color: var(--btn-fg); padding: 0.5rem 1.4rem; border: 2px solid var(--btn-bg); border-radius: 6px; text-decoration: none; font-weight: 700; letter-spacing: 0.04em; transition: translate 0.2s ease, box-shadow 0.2s ease; }
.button:hover { text-decoration: none; box-shadow: var(--shadow-up); translate: 0 -2px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.4rem 0 0.6rem; }

.sources, .note-link, .related { margin-top: 2rem; padding: 0.1rem 1rem 0.8rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); max-width: 42rem; }
.sources h2, .note-link h2, .related h2 { margin-top: 0.8rem; font-size: 1.05rem; border-bottom: 0; padding-bottom: 0; }
.sources h2::after, .note-link h2::after, .related h2::after { display: none; }

.failure { border-top: 1px solid var(--line); }

/* 運営実録のグラフ（SVG。色は CSS で付ける） */
.chart { width: 100%; max-width: 36rem; height: auto; display: block; margin: 0.5rem 0; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--primary); stroke-width: 2; }
.chart .dot { fill: var(--primary); }
.chart .tick { fill: var(--muted); font-size: 11px; }

/* ヒーロー（トップだけ。青い大きな面。背景の淡い図形はゆっくり動く: CSS のみ） */
.hero { position: relative; overflow: hidden; color: var(--hero-fg); background: linear-gradient(160deg, var(--hero-a), var(--hero-b)); --focus: #ffffff; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-bg span { position: absolute; will-change: transform; }
.hero-bg span:nth-child(1) { width: 26rem; height: 26rem; right: -7rem; top: -11rem; border-radius: 50%; background: rgba(255, 255, 255, 0.08); animation: drift-a 40s ease-in-out infinite alternate; }
.hero-bg span:nth-child(2) { width: 13rem; height: 13rem; left: -4rem; bottom: -6rem; border-radius: 50%; background: rgba(56, 169, 240, 0.2); animation: drift-b 48s ease-in-out infinite alternate; }
.hero-bg span:nth-child(3) { width: 9rem; height: 9rem; right: 34%; bottom: 1.2rem; border-radius: 38% 62% 55% 45% / 52% 40% 60% 48%; background: rgba(255, 255, 255, 0.06); animation: drift-c 54s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate3d(-2.2rem, 1.6rem, 0) rotate(8deg); } }
@keyframes drift-b { to { transform: translate3d(2.4rem, -1.4rem, 0) rotate(-6deg); } }
@keyframes drift-c { to { transform: translate3d(-1.6rem, -1rem, 0) rotate(14deg); } }
.hero-in { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 0 1rem; padding-top: 3.2rem; }
.hero-text { padding-bottom: 3rem; }
.hero .eyebrow { color: var(--hero-fg); }
.hero .eyebrow::before { background: var(--hero-fg); }
.hero h1 { font-size: 1rem; letter-spacing: 0.3em; margin: 0.4rem 0 0.2rem; font-weight: 700; }
.hero-copy { margin: 0.2rem 0 0.8rem; font-size: 2.1rem; font-weight: 800; line-height: 1.5; letter-spacing: 0.04em; }
.ph { display: inline-block; }
.hero-sub { margin: 0.6rem 0; max-width: 36rem; font-size: 0.95rem; line-height: 1.8; }
.hero-note { margin: 0.4rem 0 0; font-size: 0.875rem; }
.hero .button { background: #ffffff; color: #084e92; border-color: #ffffff; }
.hero .button.ghost { background: transparent; color: #ffffff; border-color: #ffffff; }
.hero .button.ghost:hover { background: rgba(255, 255, 255, 0.14); }
.hero .oage-hero { align-self: end; line-height: 0; }
.hero .oage-img { height: 10rem; width: auto; animation: bob 7s ease-in-out infinite alternate; }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-2px); } }

/* オープニング（トップだけ。JS が付ける html.op-on のときだけ表示。約1.1秒。CSS だけでも自分で消える） */
.opening { display: none; }
html.op-on .opening { display: block; position: fixed; inset: 0; z-index: 1000; cursor: pointer; animation: op-hold 1.15s linear both; }
html.op-on.op-done .opening { display: none; }
.opening-panel { position: absolute; left: 0; right: 0; height: 50.5%; background: #0a6cc6; }
.opening-top { top: 0; animation: op-up 1.15s cubic-bezier(0.7, 0, 0.25, 1) both; }
.opening-bottom { bottom: 0; animation: op-down 1.15s cubic-bezier(0.7, 0, 0.25, 1) both; }
.opening-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; color: #ffffff; animation: op-name 1.15s ease both; }
.opening-center img { height: 8rem; width: auto; }
.opening-name { font-size: 1.8rem; font-weight: 800; letter-spacing: 0.3em; text-indent: 0.3em; }
@keyframes op-hold { 0%, 99% { visibility: visible; } 100% { visibility: hidden; pointer-events: none; } }
@keyframes op-up { 0%, 48% { transform: translateY(0); } 100% { transform: translateY(-101%); } }
@keyframes op-down { 0%, 48% { transform: translateY(0); } 100% { transform: translateY(101%); } }
@keyframes op-name { 0% { opacity: 0; transform: translateY(8px); } 28% { opacity: 1; transform: none; } 48% { opacity: 1; } 64%, 100% { opacity: 0; } }

/* スクロールで、ふわっと表示（1回だけ。JS が動くときだけ初期状態を隠す。動かなくても3秒後には表示する） */
html.js .reveal { opacity: 0; transform: translateY(8px); transition: opacity 0.5s ease, transform 0.5s ease, translate 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
html.js .reveal.is-in { opacity: 1; transform: none; }
html.js .reveal:not(.is-in) { animation: reveal-failsafe 0s linear 3s forwards; }
@keyframes reveal-failsafe { to { opacity: 1; transform: none; } }

/* カードのホバー・タップ・フォーカス: わずかに浮く／青のアクセント */
.card:active { translate: 0 -2px; border-color: var(--primary); }
.card:active::before, .card:focus-within::before { transform: scaleX(1); }
@media (hover: hover) {
  .card:hover { translate: 0 -3px; box-shadow: var(--shadow-up); border-color: var(--primary); }
  .card:hover::before { transform: scaleX(1); }
}

/* 記事: 読書の進み具合（細い青線）。本文は動かさない */
.read-progress { position: fixed; z-index: 60; top: 0; left: 0; right: 0; height: 3px; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: var(--bar); transform: scaleX(var(--read, 0)); transform-origin: 0 50%; }
.article-head { padding-top: 1rem; }
.article-head h1 { margin-top: 0.2rem; }
.article-body { margin: 0.5rem 0; }
.prose h2, .prose h3 { scroll-margin-top: 1rem; }
@media (min-width: 64rem) {
  .article-body { display: grid; grid-template-columns: minmax(0, 42rem) 15rem; gap: 2rem; align-items: start; }
  .article-body > .prose { grid-column: 1; grid-row: 1; }
  .article-body > .toc { grid-column: 2; grid-row: 1; position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; margin-top: 0; }
}

/* フッタ */
.site-footer { background: var(--footer-bg); color: var(--footer-fg); padding: 1.2rem 0 2rem; margin-top: 2rem; --focus: #ffffff; }
.site-footer a { color: var(--footer-link); }
.foot-grid { display: grid; gap: 1rem 2rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.site-footer h2 { font-size: 0.85rem; letter-spacing: 0.12em; border: 0; padding: 0; margin: 0.5rem 0 0.25rem; color: var(--footer-fg); }
.site-footer h2::after { display: none; }
.site-footer ul { list-style: none; margin: 0; padding: 0; font-size: 0.9rem; line-height: 1.8; }
.site-footer .small { color: var(--footer-fg); }

/* 運営実録: ページの上のおあげ（画像だけ） */
.ops-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.5rem 1.5rem; }
.ops-head .page-head { flex: 1 1 20rem; }

@media (max-width: 36rem) {
  body { font-size: 1.0625rem; }
  h1 { font-size: 1.55rem; }
  h2 { font-size: 1.25rem; }
  .facts > div { grid-template-columns: 1fr; gap: 0; }
  .nav-menu ul { position: static; box-shadow: none; }
  table { font-size: 0.88rem; }
  .hero-in { grid-template-columns: 1fr; padding-top: 2.2rem; }
  .hero-text { padding-bottom: 0.5rem; }
  .hero-copy { font-size: 5.1vw; }
  .hero .oage-hero { justify-self: end; margin-top: -0.5rem; }
  .hero .oage-img { height: 8rem; }
  .button { flex: 1 1 100%; }
  .head-links { margin-left: 0; }
  .week-num { font-size: 2.2rem; }
}

@media print {
  .site-header, .site-footer, .skip, .opening, .read-progress, .hero-bg, .filter, .cat-tabs, .pager { display: none; }
  body { color: #000; background: #fff; }
  html.js .reveal { opacity: 1; transform: none; }
}

/* キャラクター「おあげ」（ポーズ画像・静止画。法務などのページには出ない: 許可リストは src/lib/character.js） */
.oage-img { display: block; }
.oage-home, .oage-404, .oage-about, .oage-note { display: flex; align-items: center; gap: 1rem; max-width: 42rem; margin: 1.5rem 0; padding: 0.7rem 1rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 0.95rem; line-height: 1.7; box-shadow: var(--shadow); }
.oage-home .oage-img { height: 7.5rem; width: auto; flex: none; }
.oage-404 .oage-img { height: 6.5rem; width: auto; flex: none; }
.oage-about .oage-img { height: 8.5rem; width: auto; flex: none; }
.oage-note .oage-img { height: 5.5rem; width: auto; flex: none; }
.oage p { margin: 0.15rem 0; }
.oage-label { font-size: 0.82rem; color: var(--muted); }
.oage-note { margin-top: 2rem; }
.oage-ops .oage-img { height: auto; width: 8rem; }
.oage-ops-end { margin: 2rem 0 0; display: flex; justify-content: flex-end; }
.oage-ops-top { line-height: 0; }

/* 記事の画像（【画像: 名前｜説明】 -> figure） */
.prose figure.fig { margin: 1.5rem 0; }
.prose figure.fig img { display: block; margin: 0 auto; border: 1px solid var(--line); border-radius: 6px; }
.prose figure.fig figcaption { margin-top: 0.35rem; font-size: 0.85rem; color: var(--muted); text-align: center; }

/* 動きを減らす設定: すべての動きを止め、内容をそのまま見せる（このブロックは最後に置く） */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  html.js .reveal { opacity: 1 !important; transform: none !important; }
  .opening { display: none !important; }
  .card:hover, .card:active, .button:hover { translate: none; }
}
