/* サイト全体のスタイル（スマートフォン版のテイスト基準）
   参考テイスト: 白背景、装飾のない1カラム、グレーの日付、
   太字のタイトル、細い区切り線、控えめな余白 */

:root {
  --text: #222222;
  --body-text: #333333;
  --muted: #8c8c8c;
  --line: #e6e6e6;
  --accent: #2f7f79;
  --thumb-bg: #e8efee;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: #ffffff;
  color: var(--body-text);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans",
    "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  font-size: 15px;
  line-height: 1.85;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 18px;
}

/* ---------- ヘッダー ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.avatar {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--thumb-bg);
  color: #5b7a76;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
}
.site-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
.site-title a {
  color: var(--text);
}
.site-title a:hover {
  text-decoration: none;
}
/* サブテキストはソースに残し、表示はしない */
.site-subtitle {
  display: none;
}

/* ---------- ハンバーガーメニュー ---------- */
.hamburger {
  margin-left: auto;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 10px 9px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 90;
}
.drawer-overlay.show {
  opacity: 1;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(78vw, 300px);
  height: 100%;
  background: #ffffff;
  box-shadow: -2px 0 12px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 100;
  padding: 14px 20px;
}
.drawer.open {
  transform: translateX(0);
  opacity: 1;
}
.drawer-close {
  display: block;
  margin-left: auto;
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 6px;
}
.drawer-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}
.drawer-list li {
  border-bottom: 1px solid var(--line);
}
.drawer-list a {
  display: block;
  padding: 13px 2px;
  color: var(--text);
  font-size: 15.5px;
}
.drawer-list a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ---------- 記事一覧 ---------- */
a.list-entry {
  display: block;
  padding: 20px 0 18px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
a.list-entry:hover {
  text-decoration: none;
  background: #fafafa;
}
a.list-entry:hover .list-title {
  color: var(--accent);
}
.list-date {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.03em;
}
.list-title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}
.list-title a {
  color: var(--text);
}
.list-title a:hover {
  color: var(--accent);
  text-decoration: none;
}
.list-excerpt-row {
  display: flex;
  gap: 14px;
}
.list-thumb {
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
  border-radius: 6px;
  background: var(--thumb-bg);
  color: #5b7a76;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
img.list-thumb {
  object-fit: cover;
  display: block;
}
.list-excerpt {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--body-text);
}
.list-ago {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.pager {
  text-align: center;
  padding: 18px 0 6px;
  font-size: 14.5px;
}

/* ---------- 記事詳細 ---------- */
.breadcrumb {
  padding: 14px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}
.entry-date {
  margin: 18px 0 6px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.03em;
}
.entry-title {
  margin: 0 0 16px;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text);
}
.about-title {
  margin-top: 18px;
}
/* ---------- 目次 ---------- */
.toc {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fcfcfc;
  padding: 12px 16px;
  margin: 0 0 22px;
}
.toc-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.toc-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 2px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.toc-toggle::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.toc-accordion.open .toc-toggle::after {
  transform: rotate(-135deg);
}
.toc-list {
  margin: 6px 0 4px;
  padding-left: 1.3em;
  font-size: 14px;
  line-height: 1.7;
}
.toc-list li {
  margin-bottom: 3px;
}
.toc-list .toc-sub {
  margin-left: 1em;
  font-size: 13.5px;
}
.toc-list a {
  color: var(--body-text);
}
.toc-list a:hover {
  color: var(--accent);
}

.entry-body p {
  margin: 0 0 1.1em;
}
/* 本文中の外部リンクはアンダーラインで示す */
.entry-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* 本文中の画像は1カラムいっぱいに表示する */
.entry-body figure {
  margin: 1.6em 0;
}
.entry-body figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.entry-body figcaption {
  margin-top: 7px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}
.entry-body h3 {
  font-size: 17.5px;
  margin: 1.5em 0 0.5em;
  color: var(--text);
}
.entry-body h4 {
  font-size: 15.5px;
  margin: 1.4em 0 0.4em;
  color: var(--text);
}
.entry-body ul {
  margin: 0 0 1.1em;
  padding-left: 1.4em;
}
.entry-meta {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.related {
  margin-top: 34px;
  border-top: 1px solid var(--line);
}
.related h2 {
  font-size: 15px;
  margin: 18px 0 4px;
  color: var(--text);
}
.related .list-entry {
  padding: 14px 0;
}
.related .list-title {
  font-size: 17px;
  margin-bottom: 6px;
}

.entry-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

/* ---------- 下部セクション（プロフィール等） ---------- */
.modules {
  margin-top: 40px;
  border-top: 1px solid var(--line);
}
.module {
  padding: 20px 0 4px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.module h2 {
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 12px;
}
.profile-name {
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 6px;
  color: var(--text);
}
.profile-text {
  margin: 0 0 14px;
}
.search-form {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}
.search-form input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 14px;
}
.search-form button {
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: #f7f7f7;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}
.latest-list,
.archive-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}
.latest-list li {
  margin-bottom: 10px;
  line-height: 1.5;
}
.latest-list .l-date {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
}
.archive-list details {
  margin-bottom: 4px;
}
.archive-list summary {
  cursor: pointer;
}
.archive-list ul {
  list-style: none;
  margin: 4px 0 6px;
  padding-left: 16px;
}
.archive-list .count {
  color: var(--muted);
  font-size: 12px;
}

/* ---------- 上に戻るボタン ---------- */
.to-top {
  position: fixed;
  right: 16px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 50;
}
.to-top.show {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- フッター ---------- */
.site-footer {
  padding: 26px 18px 34px;
  text-align: center;
}
.site-footer .f-title {
  margin: 0 0 2px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}
.site-footer .f-note {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
