/* 固定ナビの状態別スタイル（Tailwind のユーティリティでは書きにくい部分） */
.site-header { color: #2d2219; }
.site-header[data-scrolled="true"],
.site-header.menu-open {
  background: rgb(251 248 242 / 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgb(45 34 25 / 0.08);
}
.site-header[data-overlay="true"][data-scrolled="false"]:not(.menu-open) { color: #f7f2e8; }
.site-header .nav-link { position: relative; }
.site-header .nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transition: transform .25s;
}
.site-header .nav-link:hover::after { transform: scaleX(1); }

/* 記事本文（エディタで書いた HTML） */
.post-body { font-size: 1.0625rem; line-height: 2; color: #2d2219; }
.post-body > * + * { margin-top: 1.4em; }
.post-body h2 {
  font-family: "Shippori Mincho", serif; font-size: 1.6rem; font-weight: 700; line-height: 1.5;
  margin-top: 2.4em; padding-bottom: .4em; border-bottom: 1px solid rgb(45 34 25 / .12);
}
.post-body h3 { font-family: "Shippori Mincho", serif; font-size: 1.3rem; font-weight: 700; margin-top: 2em; }
.post-body a { color: #7a4a2a; text-decoration: underline; text-underline-offset: 3px; }
.post-body ul { list-style: disc; padding-left: 1.5em; }
.post-body ol { list-style: decimal; padding-left: 1.5em; }
.post-body li + li { margin-top: .3em; }
.post-body li p { margin: 0; }
.post-body blockquote {
  border-left: 3px solid #c8963e; padding: .2em 0 .2em 1.2em; color: #6f6253; font-style: normal;
}
.post-body img { border-radius: 1rem; width: 100%; height: auto; }
.post-body hr { border: 0; border-top: 1px solid rgb(45 34 25 / .15); margin: 3em 0; }
.post-body strong { font-weight: 700; }

/* PHILOSOPHY の詳細モーダル（<dialog>） */
.doc-modal {
  width: min(46rem, calc(100vw - 2rem)); max-width: none; max-height: calc(100dvh - 2rem);
  margin: auto; padding: 0; border: 0; border-radius: 1.5rem;
  background: #fbf8f2; color: #2d2219;
  overflow-y: auto; overscroll-behavior: contain;
  box-shadow: 0 30px 80px rgb(45 34 25 / .35);
}
.doc-modal[open] { animation: doc-modal-in .35s cubic-bezier(.2, .8, .2, 1); }
.doc-modal[open]::backdrop { animation: doc-backdrop-in .35s ease; }
.doc-modal::backdrop {
  background: rgb(45 34 25 / .6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
html:has(.doc-modal[open]) { overflow: hidden; scrollbar-gutter: stable; }
@keyframes doc-modal-in { from { opacity: 0; transform: translateY(24px); } }
@keyframes doc-backdrop-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .doc-modal[open], .doc-modal[open]::backdrop { animation: none; }
}
/* スマホでは下から出るシート状にする */
@media (max-width: 639px) {
  .doc-modal {
    width: 100%; max-height: 92dvh; margin: auto 0 0;
    border-radius: 1.5rem 1.5rem 0 0;
  }
}

/* 本文をスクロールしても閉じるボタンを残す。高さ 0 にして写真に重ねる */
.doc-modal__bar {
  position: sticky; top: 0; z-index: 10; height: 0;
  display: flex; justify-content: flex-end;
}
.doc-modal__close {
  display: flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; margin: .75rem;
  border-radius: 9999px; cursor: pointer; color: #2d2219;
  background: rgb(251 248 242 / .92);
  box-shadow: 0 2px 10px rgb(45 34 25 / .25);
  transition: transform .2s;
}
.doc-modal__close:hover { transform: rotate(90deg); }

/* 本文の装飾 */
.doc-lead::first-letter {
  float: left; margin: .15em .2em 0 0;
  font-family: "Shippori Mincho", serif; font-size: 3.2em; font-weight: 700; line-height: 1;
  color: #7a4a2a;
}
.doc-figure { margin-top: 1.75rem; }
.doc-figure img { box-shadow: 14px 14px 0 rgb(200 150 62 / .18); }
.doc-figure--alt img { box-shadow: -14px 14px 0 rgb(200 150 62 / .18); }
.doc-figure figcaption { margin-top: 1.5rem; }
.doc-ornament {
  display: flex; align-items: center; gap: 1rem; margin-top: 3rem; color: #c8963e;
}
.doc-ornament::before, .doc-ornament::after {
  content: ""; flex: 1; height: 1px; background: rgb(200 150 62 / .45);
}
.doc-quote {
  position: relative; margin-top: 2.5rem; padding: 0 .5rem; text-align: center;
  font-family: "Shippori Mincho", serif; font-size: 1.25rem; font-weight: 700; line-height: 1.9;
  color: #5b341d;
}
.doc-pager {
  display: inline-flex; align-items: center; gap: .5rem; padding: .625rem 1rem;
  border-radius: 9999px; font-size: .8125rem; font-weight: 500; color: #7a4a2a;
  border: 1px solid rgb(122 74 42 / .25); transition: background-color .2s;
}
.doc-pager:hover { background: rgb(200 150 62 / .12); }
