/* 木ごとのページ（/:lang/trees/:id）。地図の画面のパネルと同じ色と並びで、1列の読み物にする */
:root {
  --ink: #2f3a2c;
  --ink-soft: #66705f;
  --paper: #fbf8ef;
  --paper-edge: #e6dfca;
  --leaf: #4f8f4a;
  --leaf-deep: #2f6a35;
  --water: #3d86c6;
  --merit: #3f8a52;
  --demerit: #b0573e;
  --mist: #dfe6e0;
  --radius: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--mist); color: var(--ink);
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  line-height: 1.7;
}
a { color: var(--leaf-deep); }

header.site, footer.site { max-width: 720px; margin: 0 auto; padding: 16px; }
.logo { font-size: 24px; font-weight: 700; letter-spacing: 0.04em; color: var(--leaf-deep); text-decoration: none; }
footer.site { font-size: 13px; color: var(--ink-soft); padding-bottom: 40px; }
footer.site p { margin: 0 0 6px; }

.tree-page {
  max-width: 720px; margin: 0 auto; padding: 24px 28px 28px;
  background: var(--paper); border: 1px solid var(--paper-edge); border-radius: var(--radius);
}
.path { font-size: 13px; color: var(--ink-soft); }
h1 { font-size: 26px; line-height: 1.5; margin: 8px 0 20px; }

.steps-block h2 { font-size: 14px; color: var(--leaf-deep); margin: 0 0 10px; }
.steps { margin: 0 0 20px; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 10px; }
.steps li {
  counter-increment: step; position: relative; padding-left: 36px;
  font-size: 17px; font-weight: 700; line-height: 1.6;
}
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 2px;
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--leaf); color: #fff; font-size: 13px;
}

.open-map {
  display: inline-block; padding: 8px 20px; border-radius: 999px;
  background: var(--water); color: #fff; font-weight: 700; text-decoration: none;
}
.open-map:hover { filter: brightness(1.08); }
.water { margin: 8px 0 20px; font-size: 14px; color: var(--water); font-weight: 700; }

.block { border-radius: 10px; padding: 12px 16px; margin: 0 0 12px; }
.block h2 { margin: 0 0 6px; display: grid; gap: 2px; }
.block .label { font-size: 12px; font-weight: 700; }
.block .heading { font-size: 17px; line-height: 1.5; }
.block p { margin: 0; font-size: 15px; line-height: 1.9; text-align: justify; }
.plain { background: #f1ecdc; }
.plain .label { color: var(--leaf-deep); }
.merit { background: #eaf3e6; }
.merit .label { color: var(--merit); }
.demerit { background: #f6e9e2; }
.demerit .label { color: var(--demerit); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--ink-soft); margin: 16px 0; }
.tag { background: #fff; border: 1px solid var(--paper-edge); border-radius: 999px; padding: 1px 10px; }

.related h2 { font-size: 14px; margin: 20px 0 6px; }
.related ul { list-style: none; margin: 0; padding: 0; }
.related li { padding: 6px 0; border-bottom: 1px dotted var(--paper-edge); }
.related li a { text-decoration: none; color: var(--ink); }
.related li a:hover { color: var(--leaf-deep); text-decoration: underline; }
.related small { display: block; font-size: 11px; color: var(--ink-soft); }

/* シェアとコーヒー */
.share { margin: 24px 0 0; padding-top: 16px; border-top: 1px dotted var(--paper-edge); }
.share h2 { font-size: 14px; margin: 0 0 8px; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.share-buttons a, .share-buttons button {
  font: inherit; font-size: 13px; font-weight: 700; line-height: 1.4;
  padding: 6px 14px; border-radius: 999px; cursor: pointer; text-decoration: none;
  border: 1px solid var(--paper-edge); background: #fff; color: var(--ink);
}
.share-buttons a:hover, .share-buttons button:hover { border-color: var(--leaf); color: var(--leaf-deep); }
.share-buttons [hidden] { display: none; }
.share-native { background: var(--leaf) !important; border-color: var(--leaf) !important; color: #fff !important; }

.support { margin: 20px 0 0; padding: 14px 16px; border-radius: 10px; background: #fbf1dc; text-align: center; }
.support-button {
  display: inline-block; padding: 8px 22px; border-radius: 999px;
  background: #e0a33a; color: #fff; font-weight: 700; text-decoration: none;
}
.support-button:hover { filter: brightness(1.06); }
.support p { margin: 6px 0 0; font-size: 12px; color: var(--ink-soft); }

.ai-note { font-size: 12px; color: var(--ink-soft); margin: 20px 0 10px; }

/* わたしのマニフェスト：木ごとのページの「入れる」ボタン */
.manifesto-add { margin: 24px 0 0; padding: 14px 16px; border-radius: 10px; background: #f1ecdc; }
.manifesto-add p { margin: 8px 0 0; font-size: 12px; color: var(--ink-soft); }
.manifesto-btn {
  font: inherit; font-size: 15px; font-weight: 700; line-height: 1.4; cursor: pointer;
  padding: 7px 18px; border-radius: 999px; border: 2px solid var(--leaf); background: #fff; color: var(--leaf-deep);
}
.manifesto-btn.on { background: var(--leaf); color: #fff; }
.manifesto-btn:disabled { border-color: #c9c0a5; color: var(--ink-soft); cursor: default; }
.manifesto-view { display: inline-block; margin: 6px 0 0 12px; font-size: 14px; font-weight: 700; }

/* わたしのマニフェストのページ */
.manifesto-page .lead { margin: -8px 0 20px; color: var(--ink-soft); }
.manifesto-list { list-style: none; margin: 0; padding: 0; counter-reset: m; display: grid; gap: 20px; }
.manifesto-list li { counter-increment: m; position: relative; padding-left: 44px; }
.manifesto-list li::before {
  content: counter(m); position: absolute; left: 0; top: 2px;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--leaf); color: #fff; font-size: 14px; font-weight: 700;
}
.m-title { display: block; font-size: 19px; font-weight: 700; line-height: 1.5; color: var(--ink); text-decoration: none; }
.m-title:hover { color: var(--leaf-deep); text-decoration: underline; }
.m-path { display: block; font-size: 11px; color: var(--ink-soft); }
.m-demerit {
  display: grid; gap: 2px; margin: 8px 0 0; padding: 10px 14px; border-radius: 10px;
  background: #f6e9e2; font-size: 15px; line-height: 1.6;
}
.m-demerit .label { font-size: 12px; font-weight: 700; color: var(--demerit); }
.m-remove, .make-image, .image-actions button, .image-actions a {
  font: inherit; font-size: 13px; font-weight: 700; line-height: 1.4; cursor: pointer; text-decoration: none;
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--paper-edge); background: #fff; color: var(--ink);
}
.m-remove { margin-top: 6px; padding: 2px 12px; font-size: 12px; color: var(--ink-soft); }
.make-image:hover, .image-actions button:hover, .image-actions a:hover { border-color: var(--leaf); color: var(--leaf-deep); }
.image-share { background: var(--leaf) !important; border-color: var(--leaf) !important; color: #fff !important; }
.manifesto-image { margin: 24px 0 0; }
.manifesto-image figure { margin: 0 0 10px; }
.manifesto-image img { display: block; width: 100%; max-width: 420px; border: 1px solid var(--paper-edge); border-radius: 10px; }
.image-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.manifesto-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 24px 0 0; }
.manifesto-mine { font-weight: 700; }
.empty { color: var(--ink-soft); }

/* 生成方針のページ（/:lang/about） */
.about-page .lead { margin: -8px 0 20px; font-size: 16px; }
.about-block { margin: 0 0 24px; }
.about-block h2 { font-size: 18px; color: var(--leaf-deep); margin: 0 0 8px; }
.about-block p { margin: 0 0 8px; font-size: 15px; line-height: 1.9; }
.about-block ul { margin: 0 0 8px; padding-left: 1.3em; display: grid; gap: 6px; font-size: 15px; line-height: 1.8; }
.about-block code { font-size: 13px; background: #f1ecdc; border-radius: 4px; padding: 0 4px; }
.about-block.caution { background: #f6e9e2; border-radius: 10px; padding: 12px 16px; }
.about-block.caution h2 { color: var(--demerit); }
.about-block .updated { font-size: 12px; color: var(--ink-soft); }
.prompt summary { cursor: pointer; font-weight: 700; color: var(--leaf-deep); }
.prompt pre {
  margin: 8px 0 0; padding: 12px 14px; border-radius: 10px; background: #f1ecdc;
  font: inherit; font-size: 13px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere;
}
.ai-note a { color: var(--ink-soft); margin-left: 0.4em; }

/* スマホ */
@media (max-width: 760px) {
  .tree-page { margin: 0 16px; padding: 20px 18px; }
  h1 { font-size: 22px; }
  .open-map { display: block; text-align: center; padding: 10px 12px; font-size: 15px; }
}
