/* ブログのテーマ。スマホで読むことを先に考える（狭い画面が基本で、広い画面は幅を絞るだけ）。
   外部のフォントは読まない（読む人の情報を外に送らないため）。文字は端末にある日本語のフォントを使う。
   このファイルはそのまま公開されるので、コメントに運営者やチャンネルのことを書かない。 */

:root {
  --text: #1d1d1b;
  --muted: #5d5d58;
  --bg: #fbfaf6;
  --line: #d9d7cf;
  --accent: #4f6d29; /* 緑 #6B8F3B を、白地の文字で読める濃さに下げた */
  --accent-soft: #eef2e6;
  --note-bg: #fff6d6;
  --note-line: #d8b23c;
  --pr-bg: #fff0f0;
  --pr-line: #c0392b;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e8e6df;
    --muted: #a9a79f;
    --bg: #171816;
    --line: #3a3b37;
    --accent: #a3c46e;
    --accent-soft: #232a1b;
    --note-bg: #3a3218;
    --note-line: #b8952c;
    --pr-bg: #3b1d1b;
    --pr-line: #e0675a;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", sans-serif;
  font-size: 1.0625rem; /* 17px。スマホで拡大しなくても読める大きさ */
  line-height: 1.85;
  overflow-wrap: anywhere; /* 長い URL（出典）で横にはみ出さない */
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

.site-header,
.site-main,
.site-footer {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.1rem;
}

.site-header {
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.site-name {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.site-main {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

.site-footer {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin: 0 0 0.8rem;
  padding: 0;
  list-style: none;
}

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

.article-title {
  margin: 0 0 0.4rem;
  font-size: 1.5rem;
  line-height: 1.45;
}

.article-meta {
  margin: 0 0 1.6rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.article-body h2 {
  margin: 2.4rem 0 0.8rem;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid var(--accent);
  font-size: 1.25rem;
  line-height: 1.5;
}

.article-body h3 {
  margin: 1.8rem 0 0.6rem;
  font-size: 1.1rem;
}

.article-body p,
.article-body ul,
.article-body ol {
  margin: 0 0 1.1rem;
}

.article-body ul,
.article-body ol {
  padding-left: 1.4rem;
}

.article-body li + li {
  margin-top: 0.3rem;
}

/* 表は横に広いことが多いので、表だけを横に動かせるようにする（ページ全体を横に揺らさない） */
.article-body table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  margin: 0 0 1.3rem;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.6;
}

.article-body th,
.article-body td {
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.article-body th {
  background: var(--accent-soft);
  white-space: nowrap;
}

.article-body img {
  max-width: 100%;
  height: auto;
}

.article-body blockquote {
  margin: 0 0 1.1rem;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 3px solid var(--line);
  color: var(--muted);
}

/* --- 動画 --- */

.video {
  margin: 1.4rem 0 1.6rem;
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--accent-soft);
  border: 2px dashed var(--accent);
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

.video-placeholder p {
  margin: 0;
}

.video-credit {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* --- PR 表記（ステマ規制 Q&A の Q13：はっきりわかる大きさと色） --- */

.pr-notice {
  margin: 0 0 1.4rem;
  padding: 0.7rem 0.9rem;
  border: 2px solid var(--pr-line);
  background: var(--pr-bg);
  font-weight: 700;
  font-size: 1rem;
}

/* --- 記事の一覧 --- */

.list-title {
  margin: 0 0 1rem;
  font-size: 1.2rem;
}

.post-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-list li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.post-link {
  display: block;
  font-weight: 700;
  line-height: 1.55;
}

.post-list time {
  color: var(--muted);
  font-size: 0.85rem;
}

.post-summary {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.not-found {
  padding: 2rem 0;
}

/* --- 確認用のビルドだけで出るもの --- */

.preview-banner {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 0.4rem 1rem;
  background: var(--note-line);
  color: #1d1d1b;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

.preview-only {
  margin-top: 2.5rem;
}

.draft-label,
.memo {
  margin: 0 0 1rem;
  padding: 0.5rem 0.8rem;
  border-left: 4px solid var(--note-line);
  background: var(--note-bg);
  font-size: 0.9rem;
}

.badge {
  display: inline-block;
  padding: 0 0.45rem;
  border: 1px solid var(--note-line);
  border-radius: 0.3rem;
  background: var(--note-bg);
  color: var(--text);
  font-size: 0.75rem;
  white-space: nowrap;
}
