:root {
  --color-primary: #2a9d8f;
  --color-primary-dark: #21867a;
  --color-accent: #e76f51;
  --color-bg: #f4f7f6;
  --color-bg-card: #ffffff;
  --color-text: #2d3436;
  --color-text-light: #636e72;
  --color-border: #e0e0e0;
  --font-sans: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  --max-width: 1100px;
  --radius: 10px;

  --cat-basics:   #0984e3;
  --cat-food:     #00b894;
  --cat-life:     #6c5ce7;
  --cat-workout:  #e17055;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-sans); background: var(--color-bg); color: var(--color-text); line-height: 1.8; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ── Layout ── */
.site-wrap { display: flex; flex-direction: column; min-height: 100vh; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; width: 100%; }

.content-area {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  padding: 40px 0;
}

/* ── Header ── */
.site-header {
  background: #fff;
  border-bottom: 3px solid var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.site-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.site-logo img { height: 40px; width: auto; }

.nav-toggle { display: none; }

.site-nav { display: flex; gap: 6px; }
.site-nav a {
  font-size: .85rem;
  color: var(--color-text);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.site-nav a:hover { background: var(--color-primary); color: #fff; text-decoration: none; }

/* ── Hero ── */
.site-hero {
  background: linear-gradient(135deg, #1b6b60 0%, var(--color-primary) 45%, #264653 100%);
  color: #fff;
  text-align: center;
  padding: 80px 20px 72px;
  position: relative;
  overflow: hidden;
}
.site-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(255,255,255,.07) 0%, transparent 60%);
  pointer-events: none;
}
.site-hero::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 40px;
  background: var(--color-bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.site-hero h1 {
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: -.02em;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.site-hero p {
  font-size: 1.1rem;
  opacity: .92;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ── Article Card ── */
.article-card {
  background: var(--color-bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
  border-top: 4px solid var(--color-border);
}
.article-card.cat-diet-basics { border-top-color: var(--cat-basics); }
.article-card.cat-diet-food   { border-top-color: var(--cat-food); }
.article-card.cat-lifestyle   { border-top-color: var(--cat-life); }
.article-card.cat-workout     { border-top-color: var(--cat-workout); }

.article-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.article-card a { color: inherit; }
.article-card a:hover { text-decoration: none; }

.card-thumb { aspect-ratio: 16/9; overflow: hidden; background: #e0e0e0; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.article-card:hover .card-thumb img { transform: scale(1.05); }

.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card-category { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.card-title { font-size: 1rem; font-weight: 700; line-height: 1.5; margin-bottom: 10px; }
.card-desc { font-size: .875rem; color: var(--color-text-light); line-height: 1.6; flex: 1; }

/* ── Post grid ── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  font-size: .9rem;
  font-weight: 600;
  border: 2px solid var(--color-border);
  color: var(--color-text);
}
.pagination a:hover { border-color: var(--color-primary); color: var(--color-primary); text-decoration: none; }
.pagination .current { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* ── Sidebar ── */
.sidebar-widget { background: var(--color-bg-card); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; box-shadow: 0 2px 10px rgba(0,0,0,.07); }
.widget-title { font-size: 1rem; font-weight: 700; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 3px solid var(--color-primary); color: var(--color-text); }
.category-list { list-style: none; }
.category-list li { padding: 7px 0; border-bottom: 1px solid var(--color-border); }
.category-list li:last-child { border-bottom: none; }
.category-list a { font-size: .9rem; display: flex; justify-content: space-between; align-items: center; }
.category-list a:hover { color: var(--color-primary); text-decoration: none; }
.category-list .count { background: #f0f0f0; color: var(--color-text-light); font-size: .75rem; padding: 2px 8px; border-radius: 10px; }

.recent-list { list-style: none; }
.recent-list li { padding: 6px 0; border-bottom: 1px solid var(--color-border); }
.recent-list li:last-child { border-bottom: none; }
.recent-list a { font-size: .875rem; line-height: 1.5; display: block; }
.recent-list a:hover { color: var(--color-primary); text-decoration: none; }

/* ── Article page ── */
.post-header { margin-bottom: 32px; }
.post-category-badge {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-size: .75rem;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  font-weight: 700;
  letter-spacing: .04em;
}
.post-title { font-size: 1.9rem; line-height: 1.4; font-weight: 900; }
.post-meta { font-size: .875rem; color: var(--color-text-light); }
.post-hero { border-radius: var(--radius); overflow: hidden; margin-bottom: 32px; aspect-ratio: 16/9; box-shadow: 0 4px 20px rgba(0,0,0,.1); }
.post-hero img { width: 100%; height: 100%; object-fit: cover; }

.post-body { font-size: 1rem; line-height: 1.9; }
.post-body h2 { font-size: 1.4rem; margin: 2em 0 .8em; padding: .6em 1em; border-left: 4px solid var(--color-primary); background: #f0faf8; border-radius: 0 var(--radius) var(--radius) 0; }
.post-body h3 { font-size: 1.15rem; margin: 1.6em 0 .6em; padding-bottom: .3em; border-bottom: 2px solid var(--color-border); }
.post-body p { margin-bottom: 1.2em; }
.post-body ul, .post-body ol { margin: 1em 0 1.2em 1.5em; }
.post-body li { margin-bottom: .4em; }
.post-body img { border-radius: var(--radius); margin: 1.5em auto; box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.post-body table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.post-body th, .post-body td { padding: .6em 1em; border: 1px solid var(--color-border); }
.post-body th { background: #f0faf8; font-weight: 700; }
.post-body blockquote { border-left: 4px solid var(--color-primary); padding: 1em 1.5em; background: #f5f5f5; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5em 0; color: var(--color-text-light); }
.post-body strong { color: var(--color-text); }

/* ── Breadcrumb ── */
.breadcrumb { font-size: .85rem; color: var(--color-text-light); margin-bottom: 20px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.breadcrumb a { color: var(--color-text-light); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb span { opacity: .5; }

/* ── Tags ── */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tag { display: inline-block; background: #f0f0f0; color: var(--color-text-light); font-size: .8rem; padding: 4px 12px; border-radius: 20px; transition: background .2s; }
.tag:hover { background: var(--color-primary); color: #fff; text-decoration: none; }

/* ── Related posts ── */
.related-posts { margin-top: 48px; }
.related-posts h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 3px solid var(--color-primary); }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }

/* ── Footer ── */
.site-footer {
  background: linear-gradient(135deg, #1e2a28 0%, #2d3436 100%);
  color: #b2bec3;
  text-align: center;
  padding: 48px 20px;
  margin-top: auto;
}
.site-footer a { color: #b2bec3; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 20px; flex-wrap: wrap; font-size: .9rem; }
.footer-copy { font-size: .85rem; opacity: .6; }

/* ── Section title ── */
.section-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 24px; display: flex; align-items: center; gap: 10px; }
.section-title::before { content: ''; display: block; width: 5px; height: 1.4rem; background: linear-gradient(to bottom, var(--color-primary), var(--color-primary-dark)); border-radius: 3px; }

/* ── Category label colors ── */
.category-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; }
.cat-diet-basics { color: var(--cat-basics); }
.cat-diet-food   { color: var(--cat-food); }
.cat-lifestyle   { color: var(--cat-life); }
.cat-workout     { color: var(--cat-workout); }

/* ── Responsive ── */
@media (max-width: 768px) {
  /* ハンバーガーボタン */
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
  }
  .nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* ドロップダウンナビ */
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-top: 1px solid var(--color-border);
    box-shadow: 0 8px 16px rgba(0,0,0,.1);
    z-index: 200;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a {
    font-size: .95rem;
    padding: 14px 20px;
    border-radius: 0;
    border-bottom: 1px solid var(--color-border);
  }
  .site-nav a:last-child { border-bottom: none; }
  .site-nav a:hover { background: #f0faf8; color: var(--color-primary); }

  .site-header { position: sticky; top: 0; }

  .site-hero { padding: 56px 20px 52px; }
  .site-hero h1 { font-size: 1.9rem; }
  .site-hero p { font-size: .95rem; }

  .content-area { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
  .post-title { font-size: 1.5rem; }
}
