/* マイクラMODメモ（九条へいしの開発ノート）— 2026-10 作り直し版の共通スタイル */
:root {
  --bg: #f6f1e7;
  --paper: #fffdf8;
  --ink: #2a2620;
  --muted: #6d6558;
  --line: #e4dccb;
  --accent: #3f7d3a;
  --accent-soft: #e5f0dc;
  --accent2: #b5652b;
  --link: #2f6b9a;
  --code-bg: #f1ebdd;
  --todo-bg: #fff3c4;
  --todo-line: #e0b84a;
  --shadow: 0 1px 2px rgba(60, 45, 20, .06), 0 6px 18px rgba(60, 45, 20, .07);
  --grass: #5c9e3f;
  --dirt: #8a5a34;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171a16;
    --paper: #1f231e;
    --ink: #ebe7dc;
    --muted: #a8a294;
    --line: #343a31;
    --accent: #8fd46a;
    --accent-soft: #263321;
    --accent2: #e0995a;
    --link: #8cc4f2;
    --code-bg: #2a2f27;
    --todo-bg: #3a3315;
    --todo-line: #a88a2c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
  }
}
:root[data-theme="dark"] {
  --bg: #171a16; --paper: #1f231e; --ink: #ebe7dc; --muted: #a8a294; --line: #343a31;
  --accent: #8fd46a; --accent-soft: #263321; --accent2: #e0995a; --link: #8cc4f2;
  --code-bg: #2a2f27; --todo-bg: #3a3315; --todo-line: #a88a2c;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.9 "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  letter-spacing: .01em;
}
a { color: var(--link); }
img { max-width: 100%; height: auto; }

/* ---------- ヘッダー ---------- */
.site-head {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.site-head::after { /* 草と土の細い帯 */
  content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 5px;
  background: linear-gradient(var(--grass) 0 2px, var(--dirt) 2px 5px);
  opacity: .85;
}
.site-head .inner {
  max-width: 1080px; margin: 0 auto; padding: 14px 16px 12px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px;
}
.brand { text-decoration: none; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 6px; flex: none;
  background:
    linear-gradient(var(--grass) 0 38%, var(--dirt) 38% 100%);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.12);
  image-rendering: pixelated;
}
.brand .name { font-weight: 800; font-size: 18px; line-height: 1.2; display: block; }
.brand .sub { font-size: 12px; color: var(--muted); display: block; line-height: 1.3; }
.gnav { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-left: auto; }
.gnav a {
  text-decoration: none; color: var(--ink); font-size: 14px;
  padding: 6px 10px; border-radius: 6px;
}
.gnav a:hover, .gnav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }

/* ---------- パンくず ---------- */
.crumbs { max-width: 1080px; margin: 18px auto 0; padding: 0 16px; font-size: 13px; color: var(--muted); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs li + li::before { content: "›"; margin: 0 6px 0 2px; color: var(--muted); }
.crumbs a { color: var(--muted); }

/* ---------- 記事 ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.post {
  max-width: 760px; margin: 14px auto 0;
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 28px 30px 36px;
}
.post-pillar {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 10px;
  text-decoration: none;
}
.post h1 { font-size: 27px; line-height: 1.45; margin: 12px 0 8px; letter-spacing: .01em; }
.post .byline { font-size: 13px; color: var(--muted); margin: 0 0 18px; }
.post .hero { margin: 0 0 22px; }
.post .hero img { width: 100%; border-radius: 8px; display: block; border: 1px solid var(--line); }
.post .summary {
  border-left: 4px solid var(--accent); background: var(--accent-soft);
  padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 0 0 24px; font-size: 15px;
}
.post .summary p { margin: 0; }
.post .summary ul { margin: 6px 0 0; padding-left: 1.2em; }
.toc { border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin: 0 0 28px; font-size: 14px; }
.toc strong { display: block; margin-bottom: 4px; font-size: 13px; color: var(--muted); }
.toc ol { margin: 0; padding-left: 1.4em; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.post h2 {
  font-size: 21px; line-height: 1.5; margin: 40px 0 14px; padding: 0 0 8px;
  border-bottom: 2px solid var(--line); position: relative;
}
.post h2::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 72px; height: 2px; background: var(--accent); }
.post h3 { font-size: 17px; margin: 26px 0 8px; }
.post p { margin: 0 0 1.1em; }
.post ul, .post ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.post li { margin: .25em 0; }
.post figure { margin: 22px 0; }
.post figure img, .post figure video { width: 100%; display: block; border-radius: 8px; border: 1px solid var(--line); background: #000; }
.post figure.narrow { max-width: 360px; margin-left: auto; margin-right: auto; }
.post figure.mid { max-width: 560px; margin-left: auto; margin-right: auto; }
.post figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.post .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 22px 0; }
.post .pair figure { margin: 0; }
.post .trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 22px 0; }
.post .trio figure { margin: 0; }
.post blockquote { margin: 1em 0; padding: 4px 16px; border-left: 3px solid var(--line); color: var(--muted); }
.post code { font-family: Consolas, "Courier New", monospace; font-size: .9em; background: var(--code-bg); padding: 1px 5px; border-radius: 4px; }
.post pre { background: var(--code-bg); border-radius: 8px; padding: 12px 14px; overflow-x: auto; font-size: 13.5px; line-height: 1.6; }
.post pre code { background: none; padding: 0; }
.post table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 16px 0 22px; display: block; overflow-x: auto; }
.post th, .post td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
.post th { background: var(--accent-soft); white-space: nowrap; }
.post .point {
  border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 12px 16px; margin: 18px 0;
}
.post .point > strong:first-child { display: block; color: var(--accent2); font-size: 14px; margin-bottom: 4px; }
.post .point p:last-child, .post .point ul:last-child { margin-bottom: 0; }
.todo {
  background: var(--todo-bg); border: 1px dashed var(--todo-line); border-radius: 6px;
  padding: 2px 8px; font-size: 14px; display: inline-block; margin: 2px 0;
}
p.todo, div.todo { display: block; padding: 10px 14px; margin: 14px 0; }
.todo::before { content: "✎ ここは本人が書き足す："; font-weight: 700; }
.post .after {
  margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted);
}

/* 関連・前後 */
.related { max-width: 760px; margin: 22px auto 0; }
.related h2 { font-size: 16px; margin: 0 0 10px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.card {
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  box-shadow: var(--shadow); transition: transform .15s, border-color .15s;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card .thumb { aspect-ratio: 16 / 9; background: var(--code-bg) center / cover no-repeat; }
.card .body { padding: 12px 14px 14px; }
.card .tag { font-size: 11px; font-weight: 700; color: var(--accent); }
.card h3 { font-size: 15.5px; line-height: 1.5; margin: 4px 0 6px; }
.card p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pager { max-width: 760px; margin: 18px auto 0; display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.pager a { text-decoration: none; max-width: 48%; }

/* ---------- トップ・柱のページ ---------- */
.hero-top {
  max-width: 1080px; margin: 20px auto 0; padding: 0 16px;
}
.hero-top .box {
  position: relative; border-radius: 14px; overflow: hidden; min-height: 300px;
  background: #222 center / cover no-repeat; color: #fff; display: flex; align-items: flex-end;
  box-shadow: var(--shadow);
}
.hero-top .box::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.72)); }
.hero-top .txt { position: relative; padding: 26px 28px; max-width: 720px; }
.hero-top h1 { font-size: 28px; line-height: 1.4; margin: 0 0 8px; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.hero-top p { margin: 0; font-size: 15px; line-height: 1.8; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.section { max-width: 1080px; margin: 36px auto 0; padding: 0 16px; }
.section > h2 { font-size: 20px; margin: 0 0 6px; }
.section > .desc { color: var(--muted); font-size: 14.5px; margin: 0 0 16px; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pillar {
  display: block; text-decoration: none; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow);
}
.pillar .thumb { aspect-ratio: 16 / 9; background: #333 center / cover no-repeat; }
.pillar .body { padding: 14px 16px 16px; }
.pillar .num { font-size: 12px; font-weight: 800; color: var(--accent2); }
.pillar h3 { margin: 2px 0 6px; font-size: 17px; line-height: 1.5; }
.pillar p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.pillar:hover { border-color: var(--accent); }
.intro-page { max-width: 760px; margin: 14px auto 0; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 26px 30px; box-shadow: var(--shadow); }
.intro-page h1 { font-size: 26px; margin: 0 0 10px; line-height: 1.45; }
.intro-page p { margin: 0 0 1em; }
.list-articles { max-width: 760px; margin: 18px auto 0; display: grid; gap: 14px; }
.row-card {
  display: grid; grid-template-columns: 200px 1fr; gap: 0; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow);
}
.row-card .thumb { background: #333 center / cover no-repeat; min-height: 120px; }
.row-card .body { padding: 12px 16px 14px; }
.row-card .step { font-size: 12px; color: var(--accent2); font-weight: 800; }
.row-card h2 { font-size: 16.5px; line-height: 1.5; margin: 2px 0 6px; }
.row-card p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.row-card:hover { border-color: var(--accent); }
.tool-box {
  max-width: 1080px; margin: 36px auto 0; padding: 0 16px;
}
.tool-box .inner { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; box-shadow: var(--shadow); }
.tool-box h2 { font-size: 17px; margin: 0 0 6px; }
.tool-box p { margin: 0 0 6px; font-size: 14.5px; }
.plain { max-width: 760px; margin: 14px auto 0; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 26px 30px; box-shadow: var(--shadow); }
.plain h1 { font-size: 25px; margin: 0 0 12px; }
.plain h2 { font-size: 18px; margin: 28px 0 8px; }

/* ---------- フッター ---------- */
.site-foot { margin-top: 56px; background: var(--paper); border-top: 1px solid var(--line); }
.site-foot .inner { max-width: 1080px; margin: 0 auto; padding: 22px 16px 30px; font-size: 13px; color: var(--muted); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; }
.site-foot a { color: var(--muted); }
.site-foot .disc { font-size: 12px; line-height: 1.7; margin: 8px 0 0; }

/* ---------- スマホ ---------- */
@media (max-width: 760px) {
  body { font-size: 15.5px; line-height: 1.85; }
  .post, .intro-page, .plain { padding: 20px 16px 28px; border-radius: 0; border-left: 0; border-right: 0; margin-left: -16px; margin-right: -16px; }
  .post h1 { font-size: 22px; }
  .post h2 { font-size: 18.5px; margin-top: 32px; }
  .pillars { grid-template-columns: 1fr; }
  .row-card { grid-template-columns: 1fr; }
  .row-card .thumb { aspect-ratio: 16 / 9; min-height: 0; }
  .hero-top .box { min-height: 240px; }
  .hero-top h1 { font-size: 22px; }
  .hero-top .txt { padding: 18px 18px; }
  .gnav { margin-left: 0; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .gnav a { white-space: nowrap; padding: 5px 8px; font-size: 13.5px; }
  .post .trio { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .post .pair { grid-template-columns: 1fr; }
}
