/* アメコミのブログ：読みやすさと速さ優先。外の部品・フォントは使わない */
:root {
  --text: #23262b;
  --muted: #6b7078;
  --line: #e3e4e6;
  --bg: #f4f4f2;
  --paper: #ffffff;
  --soft: #f7f7f5;
  --accent: #c0262d;      /* 見出しの差し色（アメコミらしさはここだけ） */
  --accent-soft: #fbeceb;
  --link: #1f5fa8;
  --marker: #fff09a;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
a { color: var(--link); }
a:hover { text-decoration: none; }
img { max-width: 100%; height: auto; }

/* ---- ヘッダー ---- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 780px; margin: 0 auto; padding: 12px 16px 0; }
.site-name {
  display: inline-flex; align-items: center; gap: .5em;
  color: var(--text); text-decoration: none;
  font-size: 1.25rem; font-weight: 800; letter-spacing: .02em;
}
.site-name::before {
  content: ""; width: .7em; height: .7em; border-radius: 2px;
  background: var(--accent); transform: rotate(45deg);
}
.cat-nav ul {
  display: flex; gap: 4px; margin: 6px -16px 0; padding: 0 16px;
  list-style: none; overflow-x: auto; white-space: nowrap; scrollbar-width: none;
}
.cat-nav ul::-webkit-scrollbar { display: none; }
.cat-nav a {
  display: block; padding: 8px 12px; color: var(--muted);
  font-size: .9rem; font-weight: 600; text-decoration: none;
  border-bottom: 3px solid transparent;
}
.cat-nav a:hover, .cat-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

/* ---- 枠組み ---- */
.site-main { max-width: 780px; margin: 0 auto; padding: 0 0 32px; }
.breadcrumb { padding: 10px 16px 0; font-size: .8rem; color: var(--muted); }
.breadcrumb ol { display: flex; flex-wrap: nowrap; margin: 0; padding: 0; list-style: none; overflow: hidden; }
.breadcrumb li { white-space: nowrap; }
.breadcrumb li + li::before { content: "›"; margin: 0 .5em; }
.breadcrumb li:last-child { overflow: hidden; text-overflow: ellipsis; }
.breadcrumb a { color: var(--muted); }

.post, .post-list, .related {
  background: var(--paper);
  margin-top: 12px;
  padding: 20px 16px 28px;
}
@media (min-width: 700px) {
  .site-main { padding: 0 16px 48px; }
  .breadcrumb { padding-left: 0; padding-right: 0; }
  .post, .post-list, .related { border-radius: 10px; padding: 32px 40px 40px; border: 1px solid var(--line); }
  body { font-size: 17px; }
}

/* ---- 記事の頭 ---- */
.ad-notice {
  display: inline-block; margin: 0 0 10px; padding: 1px 8px;
  border: 1px solid var(--line); border-radius: 4px;
  color: var(--muted); background: var(--soft); font-size: .75rem; line-height: 1.7;
}
.post-title { margin: 0 0 12px; font-size: 1.45rem; line-height: 1.5; font-weight: 800; }
@media (min-width: 700px) { .post-title { font-size: 1.8rem; } }
.post-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: .8rem; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.post-cats a {
  display: inline-block; margin-right: 4px; padding: 0 8px; border-radius: 3px;
  background: var(--accent); color: #fff; font-weight: 700; text-decoration: none;
}
.post-dates span + span { margin-left: 10px; }

/* ---- 本文 ---- */
.entry-content { margin-top: 20px; }
.entry-content > :first-child { margin-top: 0; }
.entry-content p { margin: 0 0 1.1em; }
.entry-content h2 {
  margin: 2.6em 0 1em; padding: .55em .8em;
  font-size: 1.3rem; line-height: 1.5;
  background: var(--soft); border-left: 6px solid var(--accent); border-radius: 0 6px 6px 0;
}
.entry-content h3 {
  position: relative; margin: 2.2em 0 .9em; padding: 0 0 .35em;
  font-size: 1.15rem; line-height: 1.55; border-bottom: 2px solid var(--line);
}
.entry-content h3::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 4em; height: 2px; background: var(--accent);
}
.entry-content h4 { margin: 1.8em 0 .7em; font-size: 1.05rem; line-height: 1.6; color: var(--accent); }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em; padding-left: 1.5em; }
.entry-content li { margin: .2em 0; }
.entry-content del { color: var(--muted); }
.entry-content iframe { max-width: 100%; }
/* YouTube は横幅いっぱい・16:9 */
.entry-content iframe[src*="youtube.com/embed"], .entry-content iframe[src*="youtube-nocookie.com/embed"] {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0;
}
.entry-content blockquote:not(.instagram-media):not(.twitter-tweet) {
  margin: 1.5em 0; padding: 1em 1.1em; background: var(--soft);
  border-left: 4px solid #cfd2d6; color: #3d4148; font-size: .95em;
}
.entry-content blockquote > :last-child { margin-bottom: 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .92em; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: .5em .7em; }

/* 前のテーマの飾り */
.keikou { background: linear-gradient(transparent 58%, var(--marker) 58%); }
.topic-box {
  margin: 1.8em 0; padding: 1em 1.1em .3em;
  border: 2px solid #e6c3c1; border-radius: 8px; background: var(--paper);
}
.topic-title {
  display: inline-block; margin: -.2em 0 .8em; padding: .1em .8em;
  background: var(--accent); color: #fff; font-weight: 700; border-radius: 4px; font-size: .95em;
}
.enclose {
  margin: 1.5em 0; padding: 1em 1.1em .2em;
  border: 1px solid #d6d8db; border-radius: 6px; background: var(--soft);
}
.surround {
  margin: 1.5em 0; padding: 1em 1.1em .2em; border-radius: 6px;
  border: 2px solid #d6d8db; background: var(--soft);
}
.surround.yellow { border-color: #ecd36a; background: #fffbe8; }

/* 本文に入っている目次 */
#toc_container {
  margin: 1.8em 0; padding: 1em 1.2em; display: block;
  background: var(--soft); border: 1px solid var(--line); border-radius: 8px; font-size: .95em;
}
#toc_container .toc_title { margin: 0 0 .5em; text-align: center; font-weight: 700; }
#toc_container ul { list-style: none; margin: 0; padding: 0; }
#toc_container ul ul { padding-left: 1.4em; font-size: .95em; }
#toc_container li { margin: .25em 0; line-height: 1.6; }
#toc_container a { display: block; padding-left: 2.1em; text-indent: -2.1em; color: var(--text); text-decoration: none; }
#toc_container a:hover { color: var(--link); text-decoration: underline; }
#toc_container .toc_number { display: inline-block; min-width: 1.8em; margin-right: .3em; text-indent: 0; color: var(--accent); font-weight: 700; }
#toc_container .toc_depth_2 { color: var(--muted); font-weight: 600; }

/* インスタ・X の埋め込み（スマホの狭い画面でもはみ出さない） */
.entry-content .instagram-media { min-width: 0 !important; max-width: 540px !important; width: 100% !important; margin: 1.5em auto !important; }
.entry-content iframe.instagram-media { min-width: 0 !important; }
.entry-content blockquote.twitter-tweet { margin: 1.5em 0; padding: 1em; border: 1px solid var(--line); border-radius: 10px; font-size: .9em; }
.entry-content .twitter-tweet-rendered { margin-left: auto; margin-right: auto; }

/* もしもアフィリエイトの商品リンク */
.entry-content [id^="msmaflink-"] { margin: 1em 0 1.5em; }

/* ---- 記事の下 ---- */
.post-footer { margin-top: 2em; padding-top: 1em; border-top: 1px solid var(--line); }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.post-tags a {
  display: inline-block; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); font-size: .8rem; text-decoration: none; background: var(--soft);
}
.post-tags a::before { content: "#"; margin-right: 1px; }
.post-tags a:hover { color: var(--text); border-color: #c9ccd0; }

.related-title, .list-title {
  margin: 0 0 .6em; font-size: 1.15rem; line-height: 1.5;
  padding-left: .6em; border-left: 5px solid var(--accent);
}
.list-page { margin-left: .4em; color: var(--muted); font-size: .85em; font-weight: 600; }
.list-lead { margin: 0 0 1em; color: var(--muted); font-size: .9rem; }

/* ---- 記事の一覧 ---- */
.cards { margin: 0; padding: 0; list-style: none; }
.card { border-bottom: 1px solid var(--line); }
.card:last-child { border-bottom: 0; }
.card-link { display: block; padding: 14px 0; color: var(--text); text-decoration: none; }
.card-link:hover .card-title { color: var(--link); text-decoration: underline; }
.card-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .75rem; }
.card-cat { color: var(--accent); font-weight: 700; }
.card-title { display: block; margin: 2px 0 4px; font-size: 1.02rem; font-weight: 700; line-height: 1.55; }
.card-excerpt { display: block; color: var(--muted); font-size: .85rem; line-height: 1.7; }

.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 24px; }
.pager a, .pager span {
  min-width: 2.4em; padding: .35em .7em; text-align: center;
  border: 1px solid var(--line); border-radius: 6px; font-size: .9rem; text-decoration: none; color: var(--text);
}
.pager a:hover { border-color: var(--accent); }
.pager [aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.pager .pager-gap { border-color: transparent; color: var(--muted); }

/* ---- 固定ページ ---- */
.page .entry-content h2 { font-size: 1.15rem; margin-top: 2em; }

/* ---- フッター ---- */
.site-footer { background: #2a2d33; color: #c9ccd1; font-size: .85rem; }
.footer-inner { max-width: 780px; margin: 0 auto; padding: 24px 16px 28px; }
/* 特集（前のサイトのフッターにあった固定ページへの案内） */
.footer-feature { margin: 0 0 16px; padding-bottom: 14px; border-bottom: 1px solid #3c4048; }
.footer-heading { margin: 0 0 4px; color: #9aa0a8; font-size: .75rem; font-weight: 700; letter-spacing: .08em; }
.footer-feature ul { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; list-style: none; }
.footer-feature a { color: #e6e8eb; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0 0 12px; padding: 0; list-style: none; }
.footer-links a { color: #e6e8eb; }
.copyright { margin: 0; color: #9aa0a8; font-size: .8rem; }
