/* 집사자 글 목록(카테고리·태그·검색) — 카드형 */
body.jj-list{
  --jl-ink:#0B0B0C; --jl-body:#4A504B; --jl-muted:#7A807A; --jl-line:#E4E6E1; --jl-soft:#F5F7F2;
  --jl-lime:#C8FF3D; --jl-lime-soft:#EEFFC2;
}
body.jj-list main{font-family:"Gothic A1","Apple SD Gothic Neo","Malgun Gothic",sans-serif; word-break:keep-all}

/* ---------- 머리 부분 ---------- */
body.jj-list .jj-arch-head{display:flex; flex-direction:column; align-items:flex-start; gap:14px; text-align:left; margin-bottom:8px}
body.jj-list .jj-arch-head .wp-block-query-title{
  margin:6px 0 0!important; font-size:clamp(2rem,1.4rem + 2.4vw,3rem)!important; font-weight:900; letter-spacing:-.03em;
  line-height:1.2; color:var(--jl-ink); text-align:left;
}
body.jj-list .jj-arch-count{margin:0; font-size:14px; font-weight:700; color:var(--jl-muted)}
body.jj-list .jj-arch-tabs,body.jj-list .jj-arch-subtabs{display:flex; flex-wrap:wrap; gap:8px}
body.jj-list .jj-tab{
  padding:8px 16px; border-radius:99px; border:1.5px solid var(--jl-line); background:#FFFFFF;
  color:var(--jl-ink); font-size:14px; font-weight:800; text-decoration:none; line-height:1.3;
}
body.jj-list .jj-tab:hover{border-color:var(--jl-ink)}
body.jj-list .jj-tab.is-on{background:var(--jl-ink); border-color:var(--jl-ink); color:var(--jl-lime)}
body.jj-list .jj-sub{font-size:14px; font-weight:700; color:var(--jl-muted); text-decoration:none; padding:2px 0; margin-right:10px; border-bottom:2px solid transparent}
body.jj-list .jj-sub:hover{color:var(--jl-ink)}
body.jj-list .jj-sub.is-on{color:var(--jl-ink); border-bottom-color:var(--jl-lime)}
body.jj-list .wp-block-term-description{color:var(--jl-body); text-align:left; margin-top:4px}
/* 제목 블록만 있고 머리 묶음이 없는 화면(태그·검색)도 왼쪽 정렬 */
body.jj-list main > .wp-block-query-title{text-align:left; font-weight:900; letter-spacing:-.03em}

/* ---------- 폭 맞추기: 머리 부분과 카드 목록을 같은 폭(최대 1200px)으로 ---------- */
body.jj-list .jj-arch-head,
body.jj-list main > .wp-block-query-title,
body.jj-list .wp-block-term-description,
body.jj-list .wp-block-query,
body.jj-list .wp-block-post-template,
body.jj-list .wp-block-query-pagination,
body.jj-list .wp-block-query-no-results{
  box-sizing:border-box; width:100%; max-width:1200px!important; margin-left:auto!important; margin-right:auto!important;
}
body.jj-list main{padding-left:24px; padding-right:24px}
body.jj-list .wp-block-query{padding-left:0!important; padding-right:0!important}

/* ---------- 카드 목록 (테마와 관계없이 격자) ---------- */
body.jj-list .wp-block-post-template{
  display:grid!important; grid-template-columns:repeat(auto-fill,minmax(300px,1fr))!important;
  gap:20px!important; margin-top:28px!important; padding:0!important; list-style:none;
}
/* 카드 안의 테마 여백·정렬 초기화 */
body.jj-list .wp-block-post-template > li *:is(.alignfull,.alignwide),
body.jj-list .wp-block-post-template > li.is-layout-constrained > *,
body.jj-list .wp-block-post-template > li .is-layout-constrained > *{
  max-width:none!important; width:auto; margin-left:0!important; margin-right:0!important;
}
body.jj-list .wp-block-post-template > li *{text-align:left}
body.jj-list .wp-block-post-template > li{
  position:relative; display:flex; flex-direction:column; gap:0;
  background:#FFFFFF; border:1px solid var(--jl-line); border-radius:18px; padding:22px 22px 24px;
  transition:border-color .15s, box-shadow .15s, transform .15s; margin:0!important; min-width:0;
}
body.jj-list .wp-block-post-template > li:hover{border-color:var(--jl-ink); box-shadow:0 12px 30px rgb(0 0 0 / .07); transform:translateY(-2px)}
body.jj-list .wp-block-post-template > li > *{margin-block:0!important}
body.jj-list .wp-block-post-template > li .wp-block-group{padding:0!important; margin:0!important; gap:0!important}
body.jj-list .wp-block-post-template .wp-block-post-featured-image{margin:-22px -22px 18px!important; border-radius:18px 18px 0 0; overflow:hidden}

/* 카테고리 · 날짜 · NEW */
body.jj-list .jj-card-meta{display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:0 0 12px; font-size:13px; line-height:1.4}
body.jj-list .jj-card-cat{padding:4px 10px; border-radius:99px; background:var(--jl-ink); color:var(--jl-lime); font-weight:800; font-size:12px}
body.jj-list .jj-card-date{color:var(--jl-muted); font-weight:600; font-variant-numeric:tabular-nums}
body.jj-list .jj-card-new{padding:2px 7px; border-radius:6px; background:var(--jl-lime); color:var(--jl-ink); font-weight:900; font-size:11px; letter-spacing:.04em}
/* 테마가 따로 넣은 날짜·작성자는 겹치니 숨기기 */
body.jj-list .wp-block-post-template .wp-block-post-date,
body.jj-list .wp-block-post-template .wp-block-post-author,
body.jj-list .wp-block-post-template .wp-block-post-author-name,
body.jj-list .wp-block-post-template .wp-block-post-terms{display:none}

/* 제목: 카드 전체가 눌리도록 */
body.jj-list .wp-block-post-template .wp-block-post-title{
  font-family:inherit; font-size:1.15rem!important; font-weight:800; line-height:1.45; letter-spacing:-.02em; margin:0!important;
}
body.jj-list .wp-block-post-template .wp-block-post-title a{color:var(--jl-ink); text-decoration:none}
body.jj-list .wp-block-post-template .wp-block-post-title a::after{content:""; position:absolute; inset:0; border-radius:18px}
body.jj-list .wp-block-post-template > li:hover .wp-block-post-title a{text-decoration:underline; text-decoration-color:var(--jl-lime); text-decoration-thickness:3px; text-underline-offset:4px}

/* 요약: 3줄까지 */
body.jj-list .wp-block-post-template .wp-block-post-excerpt{margin-top:10px!important; font-size:15px; line-height:1.7; color:var(--jl-body)}
body.jj-list .wp-block-post-template .wp-block-post-excerpt__excerpt{
  margin:0; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}
body.jj-list .wp-block-post-template .wp-block-post-excerpt__more-text{margin-top:12px}
body.jj-list .wp-block-post-template li::after{
  content:"읽어보기 →"; margin-top:auto; padding-top:16px; font-size:14px; font-weight:800; color:var(--jl-ink);
}

/* 페이지 번호 */
body.jj-list .wp-block-query-pagination{margin-top:36px!important; gap:6px; font-weight:800}
body.jj-list .wp-block-query-pagination a,
body.jj-list .wp-block-query-pagination .page-numbers{padding:6px 12px; border-radius:10px; text-decoration:none; color:var(--jl-ink)}
body.jj-list .wp-block-query-pagination .page-numbers.current{background:var(--jl-ink); color:var(--jl-lime)}

/* 글이 없을 때 */
body.jj-list .wp-block-query-no-results{padding:40px 24px; border:1.5px dashed var(--jl-line); border-radius:18px; text-align:center; color:var(--jl-muted)}

@media (max-width:640px){
  body.jj-list main{padding-left:16px; padding-right:16px}
  body.jj-list .wp-block-post-template{grid-template-columns:minmax(0,1fr)!important}
}
@media (prefers-reduced-motion:reduce){
  body.jj-list .wp-block-post-template > li{transition:none}
  body.jj-list .wp-block-post-template > li:hover{transform:none}
}
