/* 2026-11-26 사진 바둑판 목록(product-grid.mjs). 색은 dearjessy-theme.css 의 변수(--paper,--ink,--muted,--soft,--line,--accent)를 쓰고,
   공통 디자인이 안 걸린 화면에서도 보이도록 기본값을 함께 둔다. 휴대폰 2칸 · 태블릿 3칸 · PC 5칸. */
.djg-main{--djg-gap:12px;max-width:1260px;margin:0 auto;padding:18px 14px 40px;box-sizing:border-box;background:var(--paper,#fff);color:var(--ink,#17202a);font:15px/1.6 system-ui,sans-serif}
.dj-theme body>main.djg-main{max-width:1260px;padding:20px 16px 40px}
.djg-main *,.djg-main *::before,.djg-main *::after{box-sizing:border-box}
.djg-head h1{margin:0 0 4px;font-size:clamp(22px,4vw,30px);line-height:1.35;letter-spacing:-.02em}
.djg-head p{margin:0 0 14px;color:var(--muted,#46545e);font-size:14px;max-width:760px}
/* 분류 고르기: 휴대폰에서는 옆으로 밀어 보기, 넓은 화면에서는 줄바꿈 */
.djg-filters{margin:0 0 6px}
.djg-chips{display:flex;gap:6px;overflow-x:auto;padding:2px 0 8px;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
.djg-chip{flex:none;display:inline-flex;align-items:center;gap:4px;min-height:36px;padding:6px 12px;border:1px solid var(--line,#d5dadd);border-radius:999px;background:var(--paper,#fff);color:var(--ink,#17202a)!important;text-decoration:none;font-size:14px;white-space:nowrap}
.djg-chip small{color:var(--muted,#46545e);font-size:12px}
.djg-chip:hover{background:var(--soft,#edf0f1)}
.djg-chip[aria-current=page]{background:var(--ink,#17202a);border-color:var(--ink,#17202a);color:var(--paper,#fff)!important;font-weight:700}
.djg-chip[aria-current=page] small{color:inherit;opacity:.8}
.djg-kinds .djg-chip{min-height:32px;font-size:13px;padding:4px 10px}
.djg-more{margin:0 0 8px}
.djg-more summary{cursor:pointer;font-size:14px;color:var(--muted,#46545e);padding:4px 0}
.djg-more .djg-chips{flex-wrap:wrap;overflow:visible}
.djg-count{margin:6px 0 12px;font-size:14px;color:var(--muted,#46545e)}
.djg-count strong{color:var(--ink,#17202a)}
/* 바둑판 */
.djg-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--djg-gap);list-style:none;margin:0;padding:0}
.djg-card{min-width:0;margin:0}
.djg-card a{display:flex;flex-direction:column;height:100%;border:1px solid var(--line,#d5dadd);border-radius:10px;overflow:hidden;background:var(--paper,#fff);color:var(--ink,#17202a)!important;text-decoration:none;transition:box-shadow .15s,border-color .15s}
.djg-card a:hover{border-color:var(--muted,#46545e);box-shadow:0 2px 8px #0000001a}
.djg-card a:focus-visible{outline:3px solid var(--accent,#f5b841);outline-offset:2px}
.djg-photo{display:flex;aspect-ratio:1/1;background:#fff;overflow:hidden}
.djg-photo img{display:block;width:100%;height:100%;min-width:0}
.djg-contain img{object-fit:contain;padding:6px}
.djg-cover img{object-fit:cover}
.djg-pair img{width:50%}
.djg-pair img+img{border-left:1px solid var(--line,#d5dadd)}
.djg-empty{align-items:center;justify-content:center;background:var(--soft,#edf0f1);color:var(--muted,#46545e);font:700 14px Georgia,serif}
.djg-body{display:flex;flex-direction:column;gap:2px;padding:8px 10px 10px;border-top:1px solid var(--soft,#edf0f1)}
.djg-name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;font-size:14px;font-weight:600;line-height:1.45;min-height:2.9em;overflow-wrap:anywhere}
.djg-cat{font-size:12px;color:var(--muted,#46545e);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.djg-meta{font-size:12px;font-weight:700;color:var(--rust,#a8650f)}
/* 쪽 번호 */
.djg-pager{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px;margin:28px 0 0}
.djg-pager a,.djg-pager span{display:inline-grid;place-items:center;min-width:40px;min-height:40px;padding:0 10px;border:1px solid var(--line,#d5dadd);border-radius:8px;color:var(--ink,#17202a)!important;text-decoration:none;font-size:14px}
.djg-pager a:hover{background:var(--soft,#edf0f1)}
.djg-pager a[aria-current=page]{background:var(--ink,#17202a);border-color:var(--ink,#17202a);color:var(--paper,#fff)!important;font-weight:700}
.djg-pager .djg-gap{border:0;min-width:16px;padding:0}
.djg-pager [aria-disabled=true]{opacity:.4}
/* 태블릿 3칸, PC 5칸 */
@media (min-width:640px){.djg-main{--djg-gap:14px}.djg-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (min-width:640px){.djg-chips{flex-wrap:wrap;overflow:visible}}
@media (min-width:1024px){.djg-main{--djg-gap:16px}.djg-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.djg-name{font-size:15px}}
/* 밤 화면(삼선 메뉴의 화면 설정) */
html.dj-theme[data-mode=night] .djg-photo{background:#f4f6f7}
html.dj-theme[data-mode=night] .djg-card a:hover{box-shadow:0 2px 8px #0006}
@media (prefers-reduced-motion:reduce){.djg-card a{transition:none}}
