@charset "UTF-8";
/* みるまど - 単一ファイル CSS。外部フォント・外部 CDN は読み込みません。 */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f6f8;
  --bg-sunken: #eceef2;
  --text: #16191f;
  --text-muted: #5a6270;
  --border: #d9dde4;
  --border-strong: #b6bdc9;
  --link: #0a5ad6;
  --link-visited: #6b3fb5;
  --accent: #0a5ad6;
  --accent-contrast: #ffffff;
  --fresh-bg: #e6f4ea;
  --fresh-text: #17612f;
  --ad-bg: #fff6d8;
  --ad-border: #d99b00;
  --ad-text: #6b4a00;
  --ad-badge-bg: #b47800;
  --pr-bg: #f1f3f7;
  --radius: 10px;
  --wrap: 42em;
  --font: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --bg-soft: #1c1f25;
    --bg-sunken: #23272e;
    --text: #e8eaee;
    --text-muted: #a4acba;
    --border: #333943;
    --border-strong: #4a515d;
    --link: #78b4ff;
    --link-visited: #c4a8ff;
    --accent: #78b4ff;
    --accent-contrast: #12151a;
    --fresh-bg: #14351f;
    --fresh-text: #8fe0aa;
    --ad-bg: #3a2f10;
    --ad-border: #d9a520;
    --ad-text: #ffe8a8;
    --ad-badge-bg: #a87a00;
    --pr-bg: #21252c;
    color-scheme: dark;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.8;
  letter-spacing: 0.01em;
  word-break: normal;
  overflow-wrap: anywhere;
  line-break: strict;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.15rem;
}

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

img, svg { max-width: 100%; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 0.6rem 1rem;
  z-index: 10;
}
.skip-link:focus { left: 0; }

/* ---------------- ヘッダ ---------------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}

.site-header__top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0 0.6rem;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  letter-spacing: 0.02em;
}
.site-title:visited { color: var(--text); }
.site-title::before {
  content: "";
  display: inline-block;
  width: 0.72em; height: 0.72em;
  margin-right: 0.42em;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0.16em var(--bg), 0 0 0 0.3em var(--accent);
  vertical-align: 0.02em;
}

.searchbox {
  display: flex;
  gap: 0.4rem;
  flex: 1 1 15rem;
  min-width: 12rem;
}
.searchbox input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-size: 16px;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}
.searchbox button,
.search-page__row button {
  font: inherit;
  font-size: 0.95rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-contrast);
  cursor: pointer;
  white-space: nowrap;
}

.site-nav {
  padding-bottom: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  justify-content: space-between;
}
.site-nav__cats,
.site-nav__pages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  font-size: 0.9rem;
}
.site-nav__pages { color: var(--text-muted); }
.site-nav a { text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }
.site-nav__cats a { font-weight: 600; }
.site-nav__pages a { color: var(--text-muted); }

/* ---------------- パンくず ---------------- */

.breadcrumb { font-size: 0.85rem; color: var(--text-muted); margin: 1rem 0 0.4rem; }
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.4rem;
  margin: 0; padding: 0;
}
.breadcrumb li { display: flex; align-items: center; gap: 0.4rem; }
.breadcrumb li + li::before {
  content: "›";
  color: var(--border-strong);
}
.breadcrumb [aria-current="page"] {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 22ch;
}

/* ---------------- トップページ ---------------- */

.hero {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 1.6rem 0 1.4rem;
}
.hero h1 { font-size: 1.6rem; margin: 0 0 0.4rem; line-height: 1.5; }
.hero__tagline { margin: 0 0 0.7rem; font-size: 1.02rem; }
.hero__note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--pr-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem 0.6rem;
  display: inline-block;
}

.section { padding: 1.7rem 0 0.4rem; }
.section > .wrap > h2 {
  font-size: 1.18rem;
  margin: 0 0 0.9rem;
  padding-left: 0.6rem;
  border-left: 5px solid var(--accent);
  line-height: 1.5;
}

.entry-points,
.cat-cards,
.cards,
.plain-list { list-style: none; margin: 0; padding: 0; }

.entry-points { display: grid; gap: 0.65rem; }
.entry-point a {
  display: grid;
  grid-template-columns: 2.1rem 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.7rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  text-decoration: none;
  color: var(--text);
}
.entry-point a:hover { background: var(--bg-soft); }
.entry-point .icon { grid-row: 1 / 3; }
.entry-point__label {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.entry-point__note { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

.icon { display: block; width: 2.1rem; height: 2.1rem; }
.icon svg { display: block; width: 100%; height: 100%; }
.icon svg circle:first-child { fill: var(--accent); }
.icon svg .fg { fill: var(--accent-contrast); }
.icon svg .stroke {
  fill: none;
  stroke: var(--accent-contrast);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cat-cards { display: grid; gap: 0.7rem; }
.cat-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  background: var(--bg-soft);
}
.cat-card h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.cat-card p { margin: 0; font-size: 0.88rem; color: var(--text-muted); line-height: 1.7; }
.cat-card__count { margin-top: 0.35rem !important; font-variant-numeric: tabular-nums; }

.cards { display: grid; gap: 0.75rem; }
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  background: var(--bg);
}
.card__cat { margin: 0 0 0.2rem; font-size: 0.78rem; }
.card__cat a {
  display: inline-block;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: var(--bg-sunken);
  color: var(--text-muted);
  text-decoration: none;
}
.card__title { margin: 0 0 0.35rem; font-size: 1.05rem; line-height: 1.6; }
.card__desc { margin: 0; font-size: 0.88rem; color: var(--text-muted); line-height: 1.75; }
.card__meta {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.empty { color: var(--text-muted); }

/* ---------------- 一覧・静的ページ ---------------- */

.page-header { margin: 0.8rem 0 1.3rem; }
.page-header h1 { font-size: 1.5rem; line-height: 1.5; margin: 0 0 0.4rem; }
.page-header p { margin: 0 0 0.3rem; color: var(--text-muted); font-size: 0.95rem; }
.page-header__count { font-size: 0.85rem !important; font-variant-numeric: tabular-nums; }

.plain-list { display: grid; gap: 0.45rem; margin: 0.6rem 0 1.5rem; }
.plain-list li {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.45rem;
}

.section-inline { margin: 2rem 0 1rem; }
.section-inline h2 { font-size: 1.1rem; margin: 0 0 0.5rem; }

/* ---------------- 記事 ---------------- */

.article { margin-bottom: 2rem; }

.article__header { margin: 0.5rem 0 1.4rem; }
.article__cat { margin: 0 0 0.4rem; font-size: 0.82rem; }
.article__cat a {
  display: inline-block;
  padding: 0.08rem 0.6rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-contrast);
  text-decoration: none;
  font-weight: 600;
}
.article h1 {
  font-size: 1.55rem;
  line-height: 1.55;
  margin: 0 0 0.6rem;
  letter-spacing: 0;
}
.article__lead {
  margin: 0 0 0.9rem;
  color: var(--text-muted);
  font-size: 0.96rem;
}

.article__dates {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.9rem;
  margin: 0 0 0.8rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.article__updated {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.article__updated-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.05rem 0.45rem;
  margin-right: 0.35rem;
  border-radius: 4px;
  background: var(--accent);
  color: var(--accent-contrast);
  vertical-align: 0.12em;
}
.article__fresh {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: var(--fresh-bg);
  color: var(--fresh-text);
  vertical-align: 0.12em;
}
.article__published {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.pr-label {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--pr-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem 0.65rem;
}

/* 目次 */
.toc {
  margin: 0 0 1.6rem;
  padding: 0.9rem 1.1rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.toc h2 {
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
  letter-spacing: 0.06em;
}
.toc ol { margin: 0; padding-left: 1.4rem; }
.toc > ol { counter-reset: toc; list-style: none; padding-left: 0; }
.toc > ol > li {
  counter-increment: toc;
  margin-bottom: 0.35rem;
  padding-left: 1.9rem;
  position: relative;
  line-height: 1.7;
}
.toc > ol > li::before {
  content: counter(toc);
  position: absolute;
  left: 0;
  top: 0.28em;
  width: 1.4rem;
  height: 1.4rem;
  line-height: 1.4rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  font-variant-numeric: tabular-nums;
}
.toc > ol > li > ol {
  list-style: disc;
  margin: 0.25rem 0 0.5rem;
  padding-left: 1.2rem;
  font-size: 0.92rem;
}
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* 本文 */
.article__body { font-size: 1rem; }
.article__body > * { margin: 0 0 1.35rem; }
.article__body h2 {
  font-size: 1.28rem;
  line-height: 1.55;
  margin: 2.4rem 0 1rem;
  padding: 0.35rem 0 0.35rem 0.7rem;
  border-left: 6px solid var(--accent);
  scroll-margin-top: 1rem;
}
.article__body h3 {
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 1.9rem 0 0.8rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--border);
  scroll-margin-top: 1rem;
}
.article__body h4 {
  font-size: 1rem;
  margin: 1.5rem 0 0.6rem;
  scroll-margin-top: 1rem;
}
.article__body p { margin: 0 0 1.35rem; }
.article__body ul,
.article__body ol { margin: 0 0 1.4rem; padding-left: 1.5rem; }
.article__body li { margin-bottom: 0.5rem; }
.article__body li:last-child { margin-bottom: 0; }
.article__body strong { font-weight: 700; }
.article__body blockquote {
  margin: 0 0 1.4rem;
  padding: 0.7rem 1rem;
  border-left: 4px solid var(--border-strong);
  background: var(--bg-soft);
  color: var(--text-muted);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.article__body blockquote p { margin: 0; }

/* 出典への上付き参照 */
.src-ref {
  font-size: 0.68em;
  line-height: 0;
  vertical-align: super;
  margin-left: 0.1em;
  font-variant-numeric: tabular-nums;
}
.src-ref a { text-decoration: none; padding: 0 0.1em; }
.src-ref a:hover { text-decoration: underline; }

/* テーブル（スマホは横スクロール） */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.table-wrap:focus-visible { outline: 3px solid var(--accent); }
.article__body table {
  border-collapse: collapse;
  width: 100%;
  min-width: 30rem;
  font-size: 0.92rem;
  line-height: 1.7;
}
.article__body th,
.article__body td {
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
}
.article__body th:last-child,
.article__body td:last-child { border-right: 0; }
.article__body thead th {
  background: var(--bg-sunken);
  font-weight: 700;
  white-space: nowrap;
}
.article__body tbody th { background: var(--bg-soft); font-weight: 600; }
.article__body tbody tr:last-child th,
.article__body tbody tr:last-child td { border-bottom: 0; }

/* ---------------- 広告（本番・タグ挿入済み） ---------------- */
/* ASP のタグをそのまま出す枠。控えめな枠線と「広告」ラベルだけを添える。
   ラベルはステマ規制・ASP の表記要件のため必須。消さないこと。 */

.ad-unit {
  margin: 1.8rem 0;
  padding: 0.7rem 0.9rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.ad-unit__label {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-muted, #666);
}
.ad-unit__body { margin: 0; line-height: 1.8; }
.ad-unit__body img[width="1"] { display: none; }

/* ---------------- 広告枠プレースホルダ（--drafts のときだけ出る） ---------------- */

.ad-slot {
  margin: 1.8rem 0;
  padding: 0.9rem 1rem 1rem;
  border: 3px dashed var(--ad-border);
  border-radius: var(--radius);
  background: var(--ad-bg);
  color: var(--ad-text);
  font-size: 0.92rem;
  line-height: 1.7;
}
.ad-slot p { margin: 0 0 0.35rem; }
.ad-slot p:last-child { margin-bottom: 0; }
.ad-slot__label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.ad-slot__badge {
  display: inline-block;
  padding: 0.1rem 0.6rem;
  border-radius: 4px;
  background: var(--ad-badge-bg);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.ad-slot code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  background: rgba(0, 0, 0, 0.08);
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
}
.ad-slot__program {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.6;
}
.ad-slot__note { font-size: 0.85rem; }
.ad-slot__todo {
  margin-top: 0.55rem !important;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--ad-border);
  font-size: 0.82rem;
  font-weight: 700;
}
.ad-slot__todo::before { content: "▶ "; }

/* ---------------- 出典・関連 ---------------- */

.sources {
  margin: 2.4rem 0 0;
  padding: 1rem 1.1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  font-size: 0.92rem;
}
.sources h2 { font-size: 1.02rem; margin: 0 0 0.6rem; }
.sources__list { margin: 0 0 0.9rem; padding-left: 1.6rem; }
.sources__list li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
  scroll-margin-top: 1rem;
}
.sources__list li:target {
  background: var(--fresh-bg);
  border-radius: 4px;
  box-shadow: 0 0 0 0.35rem var(--fresh-bg);
}
.sources__note { color: var(--text-muted); font-size: 0.85em; }
.fact-check {
  margin: 0;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.75;
}
.sources > .fact-check:first-child { border-top: 0; padding-top: 0; }

.related { margin: 2.4rem 0 1rem; }
.related h2 {
  font-size: 1.12rem;
  margin: 0 0 0.8rem;
  padding-left: 0.6rem;
  border-left: 5px solid var(--accent);
}

/* ---------------- 検索ページ ---------------- */

.search-page__form { margin: 0 0 1.2rem; }
.search-page__form label { display: block; font-size: 0.88rem; font-weight: 700; margin-bottom: 0.3rem; }
.search-page__row { display: flex; gap: 0.5rem; }
.search-page__row input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-size: 16px;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}
.search-status { margin: 0 0 0.9rem; font-size: 0.9rem; color: var(--text-muted); }
.notice {
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-soft);
  font-size: 0.92rem;
}
mark {
  background: #ffe9a8;
  color: inherit;
  padding: 0 0.1em;
  border-radius: 2px;
}
@media (prefers-color-scheme: dark) {
  mark { background: #5c4a12; }
}

/* ---------------- フッタ ---------------- */

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 1.5rem 0 2rem;
  font-size: 0.88rem;
}
.site-footer__disclosure {
  margin: 0 0 1.2rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.75;
}
.site-footer__cols { display: grid; gap: 1.2rem; }
.site-footer h2 { font-size: 0.85rem; margin: 0 0 0.4rem; letter-spacing: 0.08em; color: var(--text-muted); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.site-footer__copy { margin: 1.4rem 0 0; color: var(--text-muted); font-size: 0.8rem; }

/* ---------------- 画面幅が広いとき ---------------- */

@media (min-width: 40em) {
  body { font-size: 17px; }
  .hero h1 { font-size: 1.9rem; }
  .article h1 { font-size: 1.8rem; }
  .entry-points { grid-template-columns: 1fr 1fr; }
  .cat-cards { grid-template-columns: 1fr 1fr; }
  .site-footer__cols { grid-template-columns: 1fr 1fr; }
  .article__body table { min-width: 0; }
}

@media print {
  .site-header, .site-footer, .toc, .breadcrumb, .related, .searchbox { display: none; }
  body { font-size: 11pt; }
  .ad-slot { border-color: #999; background: #fff; }
  .ad-unit { border-color: #999; background: #fff; }
}

/* /policy/ ・ /about/ の出典・注記（本文より一段小さく、控えめな色にする） */
.article__body p.note {
  color: var(--text-muted);
  font-size: 0.85em;
  line-height: 1.8;
  word-break: break-all;
}
.article__body p.note a { word-break: break-all; }
