/*
Theme Name: Yamada Lifelog 2026
Description: ヤマダライフログ新テーマ（マガジン型）。写真そのものを見せ、文字はHTML側で出す。2026-08-12大改修で新規制作。
Author: Soichiro Yamada
Version: 2.0.0
*/

/* ============ トークン ============ */
:root {
  --bg: #ffffff;
  --bg-soft: #faf9f7;
  --ink: #16150f;
  --ink-soft: #6f6c63;
  --line: #e6e3dc;
  --accent: #7a5c3e;
  --maxw: 1180px;
  --readw: 720px;
  --sans: "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  --serif: "Shippori Mincho", "Hiragino Mincho ProN", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.75;
  font-feature-settings: "palt";
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap-read { max-width: var(--readw); margin: 0 auto; padding: 0 24px; }

/* ============ ヘッダー ============ */
.site-header { border-bottom: 1px solid var(--line); padding: 20px 0; }
.hd-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-title { font-size: 1.35rem; font-weight: 600; letter-spacing: .14em; }
.site-tagline { font-size: .72rem; color: var(--ink-soft); letter-spacing: .05em; margin-top: 2px; }
.hd-search input {
  border: 1px solid var(--line); border-radius: 20px; padding: 7px 16px;
  font-size: .8rem; width: 190px; background: var(--bg-soft); color: var(--ink);
}
.site-nav { border-bottom: 1px solid var(--line); }
.site-nav ul {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  list-style: none; display: flex; gap: 32px;
}
.site-nav a { display: block; padding: 13px 0; font-size: .88rem; font-weight: 500; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav .current-menu-item > a { border-bottom-color: var(--ink); }

/* ============ ヒーロー ============ */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 38px; padding: 40px 0 44px; align-items: start; }
.hero .h-media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 2px; }
.hero h2 { font-size: 2rem; font-weight: 700; line-height: 1.42; margin: 16px 0 14px; }
.hero h2 a:hover { color: var(--accent); }
.hero .ex { color: var(--ink-soft); font-size: .92rem; }
.hero .date { color: var(--ink-soft); font-size: .78rem; margin-top: 26px; }

/* ============ カテゴリラベル ============ */
.cat { font-size: .74rem; font-weight: 500; border-bottom: 1px solid var(--ink); padding-bottom: 1px; }
.cat:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ============ グリッド ============ */
.section-label { font-size: .8rem; font-weight: 600; letter-spacing: .16em; padding: 10px 0 18px; border-top: 2px solid var(--ink); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 28px; padding-bottom: 52px; }
.card .thumb img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 2px; }
.card .thumb.noimg {
  aspect-ratio: 16/10; background: #f2efe9; border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
}
.card .thumb.noimg span { font-size: .8rem; color: #b5aea1; letter-spacing: .2em; }
.card-body { padding-top: 11px; }
.card h3 { font-size: 1rem; font-weight: 600; line-height: 1.55; margin: 9px 0 6px; }
.card h3 a:hover { color: var(--accent); }
.card .ex { font-size: .82rem; color: var(--ink-soft); line-height: 1.7; }
.card .date { font-size: .74rem; color: var(--ink-soft); margin-top: 8px; }

.archive-title { font-size: 1.5rem; font-weight: 700; padding: 36px 0 6px; }
.archive-title span { color: var(--ink-soft); font-size: .85rem; font-weight: 400; margin-left: 10px; }

/* ============ 記事ページ ============ */
.single-main { padding: 40px 0 60px; }
.entry-hero { max-width: var(--maxw); margin: 0 auto 34px; padding: 0 24px; }
.entry-hero img { width: 100%; max-height: 520px; object-fit: cover; border-radius: 2px; }
.entry-header { margin-bottom: 30px; }
.entry-header .date { font-size: .78rem; color: var(--ink-soft); letter-spacing: .04em; }
.entry-title { font-size: 1.85rem; font-weight: 700; line-height: 1.45; margin: 12px 0; }

.entry-content { font-size: 1rem; line-height: 1.95; }
.entry-content > * + * { margin-top: 1.5em; }
.entry-content h2 {
  font-size: 1.3rem; font-weight: 700; line-height: 1.55;
  margin-top: 2.8em; padding-bottom: .45em; border-bottom: 2px solid var(--ink);
}
.entry-content h3 { font-size: 1.1rem; font-weight: 600; margin-top: 2.2em; }
.entry-content blockquote { border-left: 3px solid var(--line); padding: .2em 0 .2em 1.2em; color: var(--ink-soft); }
.entry-content figure { margin: 2em 0; }
.entry-content figcaption { font-size: .78rem; color: var(--ink-soft); text-align: center; margin-top: .6em; }
.entry-content img { border-radius: 2px; margin-left: auto; margin-right: auto; }
.entry-content table { border-collapse: collapse; width: 100%; font-size: .9rem; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: .55em .9em; }
.entry-content th { background: var(--bg-soft); font-weight: 600; }
.entry-content ul, .entry-content ol { padding-left: 1.5em; }
.entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ============ 目次 ============ */
.ylog-toc { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 4px; padding: 20px 24px; margin: 2.2em 0; font-size: .88rem; }
.ylog-toc .toc-label { font-weight: 600; font-size: .76rem; color: var(--ink-soft); letter-spacing: .16em; }
.ylog-toc ol { list-style: none; margin-top: 10px; padding: 0; }
.ylog-toc li { padding: 3px 0; }
.ylog-toc a { text-decoration: none; }
.ylog-toc a:hover { color: var(--accent); }

/* ============ 広告枠 ============ */
.ylog-ad { margin: 2.6em 0; text-align: center; }
.ylog-ad .ad-label { display: block; font-size: .66rem; color: var(--ink-soft); letter-spacing: .18em; margin-bottom: 6px; }

/* ============ 筆者カード・前後記事 ============ */
.author-card { display: flex; gap: 16px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 4px; padding: 22px; margin-top: 48px; font-size: .85rem; }
.author-card .author-name { font-weight: 600; font-size: .9rem; }
.author-card .author-bio { color: var(--ink-soft); margin-top: 5px; line-height: 1.75; }
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 36px; font-size: .85rem; color: var(--ink-soft); }
.post-nav a:hover { color: var(--accent); }

/* ============ 関連記事 ============ */
.related { padding: 54px 0 0; }
.related .grid { padding-bottom: 0; }

/* ============ フッター・その他 ============ */
.site-footer { border-top: 1px solid var(--line); padding: 30px 0 50px; font-size: .8rem; color: var(--ink-soft); }
.site-footer .footer-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 14px; }
.site-footer a:hover { color: var(--accent); }
.searchform { display: flex; gap: 8px; margin: 20px 0 30px; }
.searchform input[type="search"] { flex: 1; padding: 10px 14px; border: 1px solid var(--line); border-radius: 4px; font-size: .9rem; background: var(--bg-soft); color: var(--ink); }
.searchform button { padding: 10px 20px; border: none; border-radius: 4px; background: var(--ink); color: #fff; font-size: .85rem; cursor: pointer; }
.nothing-found { padding: 50px 0 70px; color: var(--ink-soft); }
.pagination { display: flex; gap: 8px; justify-content: center; padding: 6px 0 56px; font-size: .85rem; }
.pagination .page-numbers { padding: 7px 13px; border: 1px solid var(--line); border-radius: 3px; color: var(--ink-soft); }
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ============ レスポンシブ ============ */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 20px; }
  .hero h2 { font-size: 1.5rem; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
  .entry-title { font-size: 1.5rem; }
}
@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .grid { grid-template-columns: 1fr; }
  .hd-search { display: none; }
  .site-nav ul { gap: 20px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .entry-title { font-size: 1.35rem; }
}
