/*
Theme Name: Diet Original
Theme URI: https://diet.ymd33.com
Author: yamada
Description: アラフィフ仙人飯ダイエット日記のための、シンプルで温かみのあるオリジナルブログテーマ。
Version: 2.1.4
Requires at least: 5.9
Requires PHP: 7.4
Text Domain: diet-original
*/

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --ink-soft: #767676;
  --line: #e4e4e4;
  --accent: #1a1a1a;
  --accent-soft: #f2f2f2;
  --accent-deep: #000000;
  --max-width: 1040px;
  --content-width: 720px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.9;
  font-size: 16px;
}

a {
  color: var(--ink);
  text-decoration: none;
}

a:hover {
  color: var(--ink-soft);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 40px 20px 0;
}

.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.site-title {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  font-family: "Shippori Mincho", serif;
}

.site-title a {
  color: var(--ink);
}

.site-description {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.05em;
  line-height: 1.7;
}

.site-nav {
  margin-top: 28px;
  font-size: 14px;
  position: relative;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
  justify-content: center;
  flex-wrap: wrap;
}

.site-nav li {
  position: relative;
}

.site-nav a {
  color: var(--ink);
  padding: 12px 18px;
  display: inline-block;
}

.site-nav > ul > li.current-cat > a,
.site-nav > ul > li:hover > a {
  background: var(--accent-soft);
}

.site-nav ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  flex-direction: column;
  gap: 0;
  min-width: 200px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 6px 0;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  z-index: 20;
  text-align: left;
}

.site-nav li:hover > ul,
.site-nav li:focus-within > ul {
  display: flex;
}

.site-nav ul ul li {
  width: 100%;
}

.site-nav ul ul a {
  display: block;
  width: 100%;
  padding: 8px 16px;
  white-space: nowrap;
}

.site-nav ul ul a:hover {
  background: var(--accent-soft);
}

.site-nav ul ul ul {
  display: block;
  position: static;
  border: none;
  box-shadow: none;
  padding: 0 0 4px 16px;
  max-height: none;
  overflow: visible;
  min-width: 0;
}

.site-nav ul ul ul a {
  font-size: 12px;
  color: var(--ink-soft);
  padding: 6px 16px;
}

/* ---------- Layout ---------- */

.site-main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 50px 20px 90px;
}

.site-main.has-grid {
  max-width: var(--max-width);
}

/* ---------- Eyebrow / section label ---------- */

.eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  text-transform: uppercase;
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 22px;
}

.eyebrow::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 2px;
  background: var(--ink);
}

/* ---------- Posts grid (list views) ---------- */

.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 44px 32px;
}

.post-card {
  padding: 0;
  margin: 0;
}

.post-meta {
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-meta a {
  color: var(--ink-soft);
}

.post-title {
  margin: 12px 0 10px;
  font-size: 18px;
  line-height: 1.6;
  font-weight: 700;
  font-family: "Shippori Mincho", serif;
}

.post-title a {
  color: var(--ink);
}

.card-thumb {
  margin: 0 0 16px;
  overflow: hidden;
  background: var(--accent-soft);
}

.card-thumb img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  margin: 0;
}

.post-excerpt {
  color: var(--ink-soft);
  font-size: 14px;
}

.post-excerpt p {
  margin: 0;
}

.read-more {
  display: inline-block;
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
}

/* ---------- Single post ---------- */

.entry-header {
  margin-bottom: 30px;
}

.entry-title {
  font-size: 28px;
  line-height: 1.55;
  font-weight: 700;
  margin: 14px 0 0;
  font-family: "Shippori Mincho", serif;
}

.entry-header .post-thumb {
  margin-top: 26px;
}

.entry-content {
  font-size: 16px;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content h2 {
  font-size: 20px;
  font-weight: 700;
  border-top: 2px solid var(--ink);
  padding-top: 14px;
  margin: 44px 0 20px;
  font-family: "Shippori Mincho", serif;
}

.entry-content h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 30px 0 14px;
}

.entry-content blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 20px;
  border-left: 2px solid var(--ink);
  color: var(--ink-soft);
}

.entry-footer {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-soft);
}

.entry-footer a {
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}

.entry-footer a:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  font-size: 13px;
}

.post-nav > div {
  flex: 1;
  min-width: 0;
}

.post-nav a {
  display: block;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: break-word;
  word-break: break-word;
}

.post-nav a:hover {
  border-color: var(--ink);
}

.post-nav .next {
  text-align: right;
}

/* ---------- Breadcrumb ---------- */

.breadcrumb {
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  margin-bottom: 22px;
}

.breadcrumb a {
  color: var(--ink-soft);
}

.breadcrumb a:hover {
  color: var(--ink);
}

/* ---------- Related posts ---------- */

.related-posts {
  margin-top: 50px;
}

.related-posts h2 {
  font-size: 11px;
  font-weight: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  position: relative;
  padding-bottom: 12px;
  margin: 0 0 22px;
}

.related-posts h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 2px;
  background: var(--ink);
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px;
}

.related-post-card {
  display: block;
  color: var(--ink);
}

.related-post-card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  background: var(--accent-soft);
  margin: 0;
}

.related-post-card .rp-title {
  display: block;
  padding: 10px 0 0;
  font-size: 12px;
  line-height: 1.6;
}

/* ---------- Pagination ---------- */

.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
  font-size: 13px;
}

.pagination a,
.pagination span {
  padding: 10px 15px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.pagination a:hover {
  border-color: var(--ink);
}

.pagination .current {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* ---------- Page (static) ---------- */

.page .entry-content {
  margin-top: 20px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 20px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.05em;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .posts-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .site-title {
    font-size: 20px;
  }

  .entry-title {
    font-size: 22px;
  }
}


/* ---------- Recording index (year / month / weight grid) ---------- */

.recording-index {
  margin: 0 0 44px;
  border-top: 1px solid var(--line);
}

.recording-index-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.recording-index-year {
  font-weight: 700;
  min-width: 84px;
  flex-shrink: 0;
}

.recording-index-months {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.recording-index-months a {
  font-size: 13px;
  color: var(--ink-soft);
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.recording-index-months a:hover {
  background: var(--accent-soft);
  color: var(--ink);
}
