:root {
  --bg: #f8f5f2;
  --card-bg: #ffffff;
  --primary: #c4737f;
  --primary-light: #f5ebed;
  --text: #333333;
  --text-light: #666666;
  --border: #ede9e4;
  --max-width: 720px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Hiragino Kaku Gothic ProN', 'ヒラギノ角ゴ ProN W3',
    'Noto Sans JP', 'Meiryo', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-size: 16px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== Header ========== */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 28px 0 24px;
  text-align: center;
}

.site-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: 0.05em;
}

.site-tagline {
  color: var(--text-light);
  font-size: 0.82rem;
  margin-top: 6px;
}

/* ========== Main ========== */
main {
  padding: 36px 0 60px;
}

/* ========== Post cards (index) ========== */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.post-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.15s;
}

.post-card:hover {
  border-color: var(--primary);
}

.post-card.pinned {
  border-left: 3px solid var(--primary);
  background: var(--primary-light);
}

.post-card-badge {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--primary);
  background: #fff;
  border: 1px solid var(--primary);
  border-radius: 3px;
  padding: 1px 7px;
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}

.post-card-title {
  font-size: 1.05rem;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 7px;
  line-height: 1.5;
}

.post-card-desc {
  color: var(--text-light);
  font-size: 0.88rem;
  line-height: 1.65;
}

.post-card-meta {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 12px;
}

/* ========== Article (post page) ========== */
.article-hero {
  margin-bottom: 32px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.article-hero-image {
  width: 100%;
  height: auto;
  display: block;
}

.article-header {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.article-title {
  font-size: 1.55rem;
  font-weight: bold;
  line-height: 1.45;
  margin-bottom: 10px;
  color: var(--text);
}

.article-date {
  color: var(--text-light);
  font-size: 0.83rem;
}

.article-body {
  line-height: 1.95;
}

.article-body h2 {
  font-size: 1.15rem;
  font-weight: bold;
  margin: 36px 0 14px;
  padding: 10px 14px;
  background: var(--primary-light);
  border-left: 3px solid var(--primary);
  border-radius: 0 4px 4px 0;
  line-height: 1.5;
}

.article-body h3 {
  font-size: 1.05rem;
  font-weight: bold;
  margin: 28px 0 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.article-body p {
  margin-bottom: 18px;
}

.article-body a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-body ul,
.article-body ol {
  padding-left: 1.6em;
  margin-bottom: 18px;
}

.article-body li {
  margin-bottom: 6px;
}

.article-body strong {
  font-weight: bold;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 18px;
  font-size: 0.92rem;
}

.article-body th,
.article-body td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}

.article-body th {
  background: var(--primary-light);
  font-weight: bold;
}

/* Back link */
.back-link {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--text-light);
  font-size: 0.88rem;
  text-decoration: none;
}

.back-link:hover {
  color: var(--primary);
}

/* ========== Author box ========== */
.author-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--primary-light);
  border: 1px solid #e8c9ce;
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 36px;
}

.author-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.2rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-name {
  font-weight: bold;
  font-size: 0.95rem;
  margin-bottom: 5px;
}

.author-age {
  font-weight: normal;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-left: 6px;
}

.author-bio {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.7;
  margin-bottom: 0;
}

/* ========== Related Posts ========== */
.related-posts {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

.related-posts h3 {
  font-size: 1.15rem;
  font-weight: bold;
  margin-bottom: 24px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

.related-posts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-post-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.2s;
}

.related-post-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(196, 115, 127, 0.1);
}

.related-post-card h4 {
  font-size: 0.98rem;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.5;
}

.related-post-card p {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ========== Footer ========== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
  color: var(--text-light);
  font-size: 0.78rem;
  background: #fff;
}

/* ========== Responsive ========== */
@media (max-width: 600px) {
  .article-title {
    font-size: 1.3rem;
  }

  .post-card {
    padding: 16px 18px;
  }
}
