/* ============================================================
   _category.css — Category page (list / breadcrumb / pagination)
   theme-agnostic, var() only
   出典: cms-design A-default _category.css
   ※ subcats / sort / tagcloud は CMS で未使用のため移植しない
   ============================================================ */

/* breadcrumb */
.crumb{
  border-bottom:1px solid var(--line);
  background:#fff;
}
.crumb-inner{
  max-width:1180px; margin:0 auto;
  padding:14px 32px;
  font-size:11.5px; color:var(--muted); letter-spacing:0.06em;
}
.crumb-inner a{color:var(--muted); text-decoration:none;}
.crumb-inner a:hover{color:var(--ink);}
.crumb-inner .sep{margin:0 8px; color:var(--muted-2);}
.crumb-inner .current{color:var(--ink);}
@media (max-width:760px){.crumb-inner{padding:12px 22px;}}

/* header */
.cat-header{
  border-bottom:1px solid var(--line);
  background:var(--lp-header-bg);
}
.cat-header-inner{
  max-width:1180px; margin:0 auto;
  padding:40px 32px 36px;
  display:flex; align-items:flex-end; justify-content:space-between; gap:32px; flex-wrap:wrap;
}
.cat-header h1{
  margin:0 0 8px; font-size:28px; font-weight:700; letter-spacing:0.03em;
}
.cat-header .lab{
  font-size:11px; color:var(--muted); letter-spacing:0.18em; margin-bottom:6px;
}
.cat-header p{
  margin:6px 0 0; font-size:13.5px; color:var(--muted); line-height:1.85;
  max-width:560px;
}
.cat-stats{
  font-size:12px; color:var(--muted); letter-spacing:0.06em;
  text-align:right;
}
.cat-stats b{font-size:22px; font-weight:700; color:var(--ink); letter-spacing:0; margin-right:6px;}
.cat-stats .updated{margin-top:4px; font-size:11px; letter-spacing:0.1em;}

/* スマホ: cat-stats を h1 直下に小さく1行で並べる
   "3記事 · 最終更新 2026.04.06" の形式 */
@media (max-width:760px){
  .cat-header-inner{
    flex-direction:column;
    align-items:flex-start;
    gap:12px;
    padding:32px 22px 24px;
  }
  .cat-stats{
    text-align:left;
    display:flex;
    align-items:baseline;
    flex-wrap:wrap;
    gap:0;
    font-size:11.5px;
    letter-spacing:0.04em;
    color:var(--muted);
  }
  .cat-stats > div{
    display:inline-flex;
    align-items:baseline;
  }
  .cat-stats b{
    font-size:14px;
    font-weight:700;
    margin-right:3px;
  }
  .cat-stats .updated{
    margin-top:0;
    font-size:11px;
    letter-spacing:0.04em;
  }
  /* 2つ目以降の div の前に中点 separator を挿入 */
  .cat-stats > div + div::before{
    content:"·";
    margin:0 8px;
    color:var(--muted-2);
  }
}

/* subcats — 全カテゴリ横移動ナビ（cms-design 由来）
   /articles/ では「すべて」が active、各 /category/{slug}/ では現在のカテゴリが active */
.subcats {
  border-bottom: 1px solid var(--line);
  background: #fff;
  overflow-x: auto;
  scrollbar-width: none;
}
.subcats::-webkit-scrollbar {
  display: none;
}
.subcats-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  gap: 0;
}
.subcats a {
  padding: 14px 18px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.04em;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}
.subcats a:hover {
  color: var(--ink);
}
.subcats a.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
  font-weight: 500;
}
@media (max-width: 760px) {
  .subcats-inner { padding: 0 22px; }
}

/* toolbar (CMS は新着順固定なので件数表示のみ) */
.toolbar{
  display:flex; align-items:center; justify-content:space-between;
  margin:12px 0 12px;
  flex-wrap:wrap; gap:10px;
}
.toolbar .ct{font-size:12px; color:var(--muted); letter-spacing:0.04em;}
.toolbar .ct b{color:var(--ink); font-weight:700; font-size:14px; margin-right:2px;}

/* list */
.list{display:flex; flex-direction:column;}
.list .row{
  display:grid; grid-template-columns: 200px 1fr;
  gap:24px;
  padding:24px 0;
  border-bottom:1px solid var(--line);
  text-decoration:none; color:inherit;
  transition:background .15s ease;
}
.list .row:first-child{border-top:1px solid var(--line);}
.list .row:hover{background:var(--soft);}
.list .row .img{
  aspect-ratio:5/3; border-radius:var(--radius-sm);
  background:repeating-linear-gradient(135deg, var(--placeholder-1) 0 12px, var(--placeholder-2) 12px 24px);
  position:relative; overflow:hidden;
}
.list .row .img img{ width:100%; height:100%; object-fit:cover; display:block; }
.list .row .tag{
  position:absolute; top:8px; left:8px;
  background:#fff; color:var(--ink);
  font-size:10px; padding:3px 7px; border-radius:var(--radius-sm);
  letter-spacing:0.08em; border:1px solid var(--line);
  z-index:2;
}
.list .row .body{display:flex; flex-direction:column; justify-content:center;}
.list .row .meta{
  display:flex; gap:10px; align-items:center;
  font-size:11px; color:var(--muted); letter-spacing:0.06em; margin-bottom:8px;
}
.list .row .meta .cat{
  border:1px solid var(--line); padding:2px 8px; border-radius:999px;
  color:var(--ink-2); font-size:10.5px; letter-spacing:0.08em;
}
.list .row .ttl{
  font-size:17px; font-weight:700; line-height:1.6;
  margin:0 0 8px; letter-spacing:0.02em;
  text-wrap:pretty;
}
.list .row .desc{
  margin:0; font-size:13px; color:var(--muted); line-height:1.85;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
@media (max-width:600px){
  .list .row{grid-template-columns:120px 1fr; gap:14px; padding:18px 0;}
  .list .row .ttl{font-size:14.5px; margin-bottom:6px;}
  .list .row .desc{display:none;}
}

/* pagination (Top と category 共通) */
.pager{
  display:flex; justify-content:center; align-items:center; gap:6px;
  flex-wrap:wrap;
  margin:48px 0 16px;
}
.pager a, .pager span{
  width:36px; height:36px;
  display:inline-flex; align-items:center; justify-content:center;
  border:1px solid var(--line); border-radius:var(--radius-sm);
  text-decoration:none; color:var(--ink-2);
  font-size:13px; font-weight:500;
  transition:all .15s ease;
  white-space:nowrap;
  flex-shrink:0;
}
.pager a:hover{border-color:var(--ink); color:var(--ink);}
.pager .on{background:var(--ink); color:#fff; border-color:var(--ink);}
.pager .nav{width:auto; padding:0 14px; font-size:12px; letter-spacing:0.06em; color:var(--muted);}
.pager .ellipsis{border:none; color:var(--muted-2);}

/* ============== 子カテゴリ一覧（親カテゴリページのみ表示） ============== */
/* 1行ヘッダー＋インラインピル型。スカスカ感を出さず、1個でも複数でも自然に収まる */
.cat-children{
  max-width:1100px; margin:0 auto; padding:18px 24px 4px;
}
.cat-children-inner{
  /* 背景・枠・大padding は廃止し、線1本で軽く区切る */
  display:flex; align-items:baseline; flex-wrap:wrap;
  gap:10px 18px;
  padding:0 0 14px;
  border-bottom:1px dashed var(--line);
}
.cat-children-head{
  display:inline-flex; align-items:baseline; gap:10px;
  flex-shrink:0;
}
.cat-children-label{
  font-family:'JetBrains Mono', ui-monospace, monospace;
  font-size:10px; font-weight:500;
  letter-spacing:0.22em;
  color:var(--muted);
  text-transform:uppercase;
}
.cat-children-title{
  font-size:13px; font-weight:600;
  color:var(--ink); margin:0;
  letter-spacing:0.02em;
}
.cat-children-list{
  list-style:none; margin:0; padding:0;
  display:flex; flex-wrap:wrap;
  gap:8px;
}
.cat-children-item a{
  display:inline-flex; align-items:baseline; gap:8px;
  padding:6px 14px;
  background:transparent;
  border:1px solid var(--line);
  border-radius:999px;
  text-decoration:none;
  color:var(--ink);
  font-size:13px; font-weight:500;
  line-height:1.5;
  transition:border-color .15s, color .15s, background .15s;
}
.cat-children-item a:hover{
  border-color:var(--ink);
  background:var(--paper, #fafafa);
}
.cat-children-name{}
.cat-children-count{
  font-size:11px;
  color:var(--muted);
  font-variant-numeric:tabular-nums;
}
.cat-children-count::before{
  content:"·"; margin-right:4px; color:var(--muted-2, #c8c8c8);
}
