/**
 * DX_CARDFEED 게시판 스킨 — cardfeed.css v1.0.0
 * Copyright © DesignOneX — designonex.com · All Rights Reserved.
 * License: DesignOneX License 1.0 (https://designonex.com/notice/view/1787577858493247)
 * style.css 뒤에 불러와 목록을 직각 벤토 격자로 바꿉니다. 그림자 없음, 둥근 모서리 없음.
 */

/* ── 직각 : 이 스킨 안의 모든 요소 ── */
.nb *, .nb *::before, .nb *::after { border-radius: 0 !important; }
.nb .nb-btn, .nb .nb-icon-btn, .nb .nb-pager a { border-color: var(--nb-ink); }
.nb .nb-sort button, .nb .dx-sort-btn { border-radius: 0 !important; }

/* ── 격자 ── */
.nb .gl55-grid.dxcf { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); grid-auto-rows: 132px; grid-auto-flow: dense; gap: 14px; padding: 8px 0; }
.nb .dxcf .dxcf-card { padding: 0 !important; margin: 0 !important; position: relative; min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--nb-ink); background: var(--nb-card); color: var(--nb-ink); transition: none; }
.dxcf .is-b { grid-column: span 2; grid-row: span 3; }
.dxcf .is-m { grid-row: span 2; }
.dxcf .is-s { grid-row: span 1; }
.nb .dxcf a.dxcf-in { flex: 1; min-height: 0; display: flex; flex-direction: column; color: inherit; }
.dxcf .dxcf-card:hover { outline: 2px solid var(--nb-ink); outline-offset: -2px; }
.dxcf .dxcf-card.is-cur { outline: 3px solid var(--nb-acid); outline-offset: -3px; }

/* 종이 색 (글 번호로 정해짐) */
.dxcf .t-text.p-0 { background: #d7f64f; color: #20231f; }
.dxcf .t-text.p-1 { background: #e6e4da; color: #20231f; }
.dxcf .t-text.p-2 { background: #20231f; color: #fff; }
.dxcf .t-text.p-3 { background: #f0d9c8; color: #20231f; }
.dxcf .t-text.p-4 { background: #fffefa; color: #20231f; }
.dxcf .t-photo.p-0 .dxcf-pic { background: #cfe3d4; }
.dxcf .t-photo.p-1 .dxcf-pic { background: #f0d9c8; }
.dxcf .t-photo.p-2 .dxcf-pic { background: #d9dff0; }
.dxcf .t-photo.p-3 .dxcf-pic { background: #e6e4da; }
.dxcf .t-photo.p-4 .dxcf-pic { background: #cfe3d4; }

/* 사진 카드 */
.dxcf .dxcf-pic { position: relative; flex: 1; min-height: 0; display: block; overflow: hidden; }
.dxcf .dxcf-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.dxcf .dxcf-cat { position: absolute; left: 10px; top: 10px; z-index: 1; padding: 3px 9px; background: #fffefa; color: #20231f; border: 1px solid #20231f; font-style: normal; font-size: 11px; font-weight: 800; }
.dxcf .dxcf-hot { position: absolute; right: 10px; top: 10px; z-index: 1; padding: 2px 8px; background: #d7f64f; color: #20231f; border: 1px solid #20231f; font-style: normal; font-size: 10px; font-weight: 900; }
.dxcf .dxcf-band { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 11px 14px 12px; background: #fffefa; color: #20231f; border-top: 1px solid #20231f; }
.dxcf .dxcf-band .dxcf-title { font-size: 14px; line-height: 1.4; font-weight: 800; letter-spacing: -.03em; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dxcf .is-b .dxcf-band .dxcf-title { font-size: 20px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dxcf .dxcf-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; color: #5f635a; }
.dxcf .dxcf-meta b { color: #20231f; font-weight: 800; }
.dxcf .dxcf-meta .r, .dxcf .dxcf-foot .r { margin-left: auto; white-space: nowrap; }

/* 문장 카드 */
.dxcf .t-text .dxcf-in { padding: 16px 18px 14px; gap: 10px; }
.dxcf .dxcf-top { flex: none; display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.dxcf .t-text .dxcf-cat { position: static; padding: 2px 8px; background: transparent; color: inherit; border-color: currentColor; letter-spacing: 0; }
.dxcf .t-text .dxcf-hot { position: static; margin-left: auto; }
.dxcf .dxcf-quote { flex: 1; min-height: 0; overflow: hidden; font-size: 14px; line-height: 1.45; font-weight: 800; letter-spacing: -.04em; word-break: keep-all; overflow-wrap: anywhere; }
.dxcf .is-m .dxcf-quote { font-size: 17px; }
.dxcf .is-b .dxcf-quote { font-size: 24px; }
.dxcf .dxcf-foot { flex: none; display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid currentColor; font-size: 11px; font-weight: 700; }
.dxcf .dxcf-foot .dxcf-title { min-width: 0; flex: 1; font-size: 12px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dxcf .gl55-new { display: inline-block; margin-right: 6px; padding: 0 6px; background: #d7f64f; color: #20231f; font-size: 11px; font-weight: 900; line-height: 18px; vertical-align: 1px; }

/* 관리자 체크 */
.dxcf .dxcf-chk { position: absolute; right: 8px; bottom: 8px; z-index: 3; display: flex; padding: 6px; background: #fffefa; border: 1px solid #20231f; }
.dxcf .dxcf-chk input { width: 16px; height: 16px; accent-color: #20231f; margin: 0; }

/* 실시간 새 글 */
.dxcf .dxcf-card.nb-live-in { animation: dxcfIn .7s ease-out; }
@keyframes dxcfIn { from { outline: 4px solid #d7f64f; outline-offset: -4px; } to { outline: 0 solid transparent; } }
@media (prefers-reduced-motion: reduce) { .dxcf .dxcf-card.nb-live-in { animation: none; } }

/* 고정 공지 */
.dxcf-pins { margin: 6px 0 14px; border: 1px solid var(--nb-ink); background: var(--nb-card); }
.dxcf-pins-h { display: flex; align-items: center; gap: 8px; padding: 12px 18px 9px; font-size: 12px; font-weight: 900; letter-spacing: .06em; }
.nb a.dxcf-pin { display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-top: 1px solid var(--nb-line); }
.nb a.dxcf-pin:hover { background: var(--nb-hover); }
.dxcf-pin-tag { flex: none; padding: 3px 9px; background: var(--nb-ink); color: var(--nb-bg); font-size: 11px; font-weight: 800; }
.dxcf-pin-t { flex: 1; min-width: 0; font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dxcf-pin-t em { font-style: normal; color: var(--nb-mute); font-weight: 700; }
.dxcf-pin-d { flex: none; font-size: 12px; font-weight: 700; color: var(--nb-mute); }

/* 상세 아래 목록: 조금 작게 */
.nb-view-list .gl55-grid.dxcf { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); grid-auto-rows: 104px; gap: 10px; }
.nb-view-list .dxcf .is-b { grid-column: span 1; grid-row: span 2; }
.nb-view-list .dxcf .dxcf-hot { display: none; }
.nb-view-list .dxcf .is-b .dxcf-quote { font-size: 17px; }
.nb-view-list .dxcf .is-b .dxcf-band .dxcf-title { font-size: 14px; white-space: nowrap; display: block; }

/* 다크 모드 : 색종이는 밝은 면 그대로, 글자색 고정 */
html body.dark .dxcf .dxcf-card { border-color: #fffefa; }
html body.dark .dxcf .t-text.p-0, html body.dark .dxcf .t-text.p-1, html body.dark .dxcf .t-text.p-3, html body.dark .dxcf .t-text.p-4 { color: #20231f !important; }
html body.dark .dxcf .t-text.p-2 { background: #0e1117; color: #fff !important; }
html body.dark .dxcf .dxcf-band, html body.dark .dxcf .dxcf-meta b { color: #20231f !important; }
html body.dark .dxcf .dxcf-meta { color: #5f635a !important; }
html body.dark .dxcf .dxcf-cat, html body.dark .dxcf .dxcf-hot, html body.dark .dxcf .gl55-new { color: #20231f !important; }
html body.dark .dxcf .t-text .dxcf-cat { color: inherit !important; background: transparent !important; }
html body.dark .dxcf .t-text .dxcf-hot { background: #d7f64f !important; color: #20231f !important; }
html body.dark .dxcf-pins { border-color: var(--nb-strong); }
html body.dark .dxcf-pin-tag { background: #fff; color: #20231f; }
html body.dark .dxcf .dxcf-chk { background: #20231f; border-color: #fffefa; }

/* 모바일 : 2열 */
@media (max-width: 720px) {
  .nb .gl55-grid.dxcf { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 92px; gap: 10px; }
  .dxcf .is-b { grid-column: span 2; grid-row: span 2; }
  .dxcf .is-m, .dxcf .is-s { grid-row: span 2; }
  .dxcf .dxcf-cat { left: 6px; top: 6px; padding: 2px 6px; font-size: 10px; }
  .dxcf .dxcf-hot { right: 6px; top: 6px; }
  .dxcf .dxcf-band { padding: 8px 10px 9px; gap: 3px; }
  .dxcf .dxcf-band .dxcf-title { font-size: 12px; }
  .dxcf .is-b .dxcf-band .dxcf-title { font-size: 15px; }
  .dxcf .dxcf-meta { font-size: 10px; gap: 6px; }
  .dxcf .dxcf-meta span:nth-child(2) { display: none; }
  .dxcf .t-text .dxcf-in { padding: 12px 12px 10px; gap: 6px; }
  .dxcf .dxcf-top { font-size: 10px; }
  .dxcf .dxcf-quote, .dxcf .is-m .dxcf-quote { font-size: 13px; }
  .dxcf .is-b .dxcf-quote { font-size: 18px; }
  .dxcf .dxcf-foot { padding-top: 6px; font-size: 10px; }
  .dxcf .dxcf-foot .r { display: none; }
  .dxcf-pins-h { padding: 12px 14px 8px; }
  .nb a.dxcf-pin { padding: 11px 14px; }
  .dxcf-pin-d { display: none; }
  .nb-view-list .gl55-grid.dxcf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
