/* ================================
   Base Theme (Unified)
   ================================ */
:root{
  --bg:#f7f7f8;
  --paper:#ffffff;
  --ink:#121314;
  --muted:#6b7280;
  --line:#e5e7eb;
  --accent:#2563eb;
  --accent-ink:#fafcff;
  --radius:16px;
  --shadow:0 10px 25px rgba(0,0,0,.06);
  --max:1100px;

  /* 補完（各ページ断片で使われていたが未定義のもの） */
  --soft:#f6f7f9;
  --border:#e3e7ee;
}

*{box-sizing:border-box}
html,body{margin:0}
body{
  background:var(--bg);
  color:var(--ink);
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;
  line-height:1.65;
}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%;display:block}

/* ================================
   Layout
   ================================ */
.container{max-width:var(--max);margin:auto;padding:0 20px}
.container--narrow{max-width:840px} /* 記事詳細などで使用可 */

.site-header{
  background:var(--paper);
  border-bottom:1px solid var(--line);
}
.site-header .inner{
  display:flex;align-items:center;gap:24px;padding:16px 0;
}
.brand{
  font-weight:700;
  font-size:clamp(18px,2.4vw,24px);
  letter-spacing:.2px;
}
.site-nav{margin-left:auto;display:flex;gap:14px;flex-wrap:wrap}
.site-nav a{
  padding:8px 12px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;color:#111;
}
.site-nav a:hover{background:#f2f5ff;border-color:#c7d2fe}

.site-footer{
  border-top:1px solid var(--line);
  color:var(--muted);
  padding:20px 0;
  margin-top:32px;
  background:#fff;
  font-size:13px;
}

/* 共通ユーティリティ */
.section-head{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:12px}
.section-head h2{margin:0;font-size:clamp(18px,2.6vw,22px)}
.meta{font-size:12px;color:var(--muted)} /* カード/記事で共通 */
.btn{
  display:inline-block;
  background:var(--accent);color:var(--accent-ink);
  padding:10px 14px;border-radius:10px;border:1px solid #1d4ed8;
}
.btn:hover{filter:brightness(1.05);text-decoration:none}
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ================================
   Hero (Top)
   ================================ */
.hero{padding:42px 0 28px}
.hero-box{
  background:linear-gradient(180deg,#eaf1ff,#ffffff);
  border:1px solid #e5eeff;
  border-radius:var(--radius);
  padding:28px;
  box-shadow:var(--shadow);
}
.hero h1{margin:0 0 6px;font-size:clamp(22px,4vw,32px)}
.hero p{margin:0;color:var(--muted)}

/* ================================
   Main 2-Column
   ================================ */
.main{display:grid;gap:24px;grid-template-columns:1fr;margin:28px 0 48px}
@media (min-width:960px){.main{grid-template-columns:1fr 320px}}

/* ================================
   Cards Grid (Top)
   ================================ */
.grid{display:grid;gap:18px;grid-template-columns:1fr}
@media (min-width:560px){.grid{grid-template-columns:repeat(2,1fr)}}
@media (min-width:980px){.grid{grid-template-columns:repeat(3,1fr)}}
.card{
  background:var(--paper);border:1px solid var(--line);border-radius:14px;overflow:hidden;
  transition:transform .15s ease, box-shadow .15s ease;
}
.card:hover{transform:translateY(-2px);box-shadow:var(--shadow)}
.card-thumb{aspect-ratio:16/9;background:#dfe6f5;overflow:hidden}
.card-thumb img{width:100%;height:100%;object-fit:cover}
.card-body{padding:14px}
.card-title{margin:0 0 6px;font-weight:700;font-size:16.5px;line-height:1.4}
.excerpt{color:#40454f;font-size:14px}

/* ================================
   Sidebar
   ================================ */
.sidebar .widget{
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:14px;
  padding:16px;
  margin-bottom:16px;
}
.widget h3{margin:0 0 10px;font-size:15px}
.cat-list,.tag-list{display:flex;flex-wrap:wrap;gap:8px}
.cat-list a,.tag-list a{
  border:1px solid var(--line);border-radius:999px;padding:6px 10px;background:#fff;color:#111;font-size:13px
}
.cat-list a:hover,.tag-list a:hover{background:#f9fbff}

/* ================================
   Breadcrumb / Page Head
   ================================ */
.breadcrumb{font-size:13px;color:var(--muted);margin-top:0;margin-bottom:18px;}
.breadcrumb a{color:inherit;text-decoration:underline}
.page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;margin:10px 0 18px}
.page-head h1{margin:0;font-size:clamp(20px,3.6vw,28px)}
.desc{color:var(--muted);margin:0}

/* ================================
   List Page (Index of Posts)
   ================================ */
.list{display:grid;gap:0;margin:0 0 28px}
.item{
  background:var(--paper);border:1px solid var(--line);border-radius:14px;overflow:hidden;
  display:grid;grid-template-columns:1fr;gap:0;margin-bottom:18px;
}
@media (min-width:760px){.item{grid-template-columns:280px 1fr}}
.thumb{background:#dfe6f5;aspect-ratio:16/9}
.thumb img{width:100%;height:100%;object-fit:cover}
.body{padding:14px 16px}
.title{margin:0 0 6px;font-weight:700;font-size:18px;line-height:1.45}
.actions{display:flex;gap:10px;align-items:center}
.actions .btn{padding:8px 12px} /* ボタン小さめ */

.pagination{
  display:flex;gap:8px;justify-content:center;margin:26px 0 40px
}
.pagination a,.pagination span{
  min-width:40px;height:40px;display:inline-grid;place-items:center;
  background:#fff;border:1px solid var(--line);border-radius:10px;color:#111;padding:0 10px
}
.pagination .current{background:#eef2ff;border-color:#c7d2fe}

/* ================================
   Article (Post Detail)
   ================================ */
.article{
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:16px;
  padding:22px;
  box-shadow:var(--shadow);
  margin:8px 0 24px;
}
.article h1{margin:0 0 6px;font-size:clamp(22px,4.2vw,32px);line-height:1.3}
.cover img{width:100%;height:auto;object-fit:cover;border-radius:12px}

.post-content h2{font-size:clamp(18px,3.2vw,24px);margin:20px 0 6px}
.post-content h3{font-size:clamp(16px,2.8vw,20px);margin:16px 0 6px}
.post-content p{margin:0 0 12px}
.post-content ul{margin:0 0 12px 18px}
blockquote{background:#f9fafb;border-left:4px solid #c7d2fe;padding:12px 14px;border-radius:10px}

.post-meta-bar{
  display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;
  border-top:1px solid var(--line);padding-top:14px;margin-top:18px
}
.tags{display:flex;gap:8px;flex-wrap:wrap}
.tag{border:1px solid var(--line);border-radius:999px;padding:6px 10px;background:#fff;color:#111;font-size:13px}
.share{display:flex;gap:8px}

.author{
  display:grid;grid-template-columns:56px 1fr;gap:12px;align-items:center;
  background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px;margin:18px 0
}
.author img{width:56px;height:56px;border-radius:50%;object-fit:cover}
.author .name{font-weight:700}

.post-nav{display:flex;justify-content:space-between;gap:10px;margin:16px 0}
.post-nav a{display:block;border:1px solid var(--line);border-radius:12px;background:#fff;padding:12px}
.related{margin:12px 0}
.related h3{margin:0 0 10px;font-size:18px}
.related-grid{display:grid;gap:12px;grid-template-columns:1fr}
@media (min-width:700px){.related-grid{grid-template-columns:repeat(3,1fr)}}
.related a{display:block;border:1px solid var(--line);border-radius:12px;background:#fff;padding:12px}

/* ================================
   Profile (Author Page)
   ================================ */
.profile-card{
  background:var(--soft);
  border:1px solid var(--border);
  border-radius:12px;
  padding:20px;
  display:flex;gap:20px;align-items:center
}
.profile-card img{
  width:120px;height:120px;border-radius:50%;
  object-fit:cover;border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.08)
}
.profile-card h1{margin:0;font-size:22px}
.profile-card p{margin:4px 0 0;font-size:14px;color:var(--muted)}
