/* ============================================================
   말집 - 한국 경조사 문구 모음
   ============================================================ */

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: #faf8f3;
  color: #1a1a1a;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; text-decoration: none; }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 28px 80px;
}

/* ===== 브랜드 헤더 ===== */
.brand { margin-bottom: 36px; }
.brand .logo {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1;
  margin: 0;
}
.brand .logo .dot { color: #b88a1d; }
.brand .tagline {
  font-size: 14px;
  color: #7a7a7a;
  margin-top: 8px;
}

/* ===== 검색 ===== */
.search { margin-bottom: 24px; }
.search input {
  width: 100%;
  padding: 14px 18px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  border: 1px solid #e5e0d3;
  border-radius: 4px;
  outline: none;
  transition: border-color .15s;
}
.search input:focus { border-color: #1a1a1a; }
.search input::placeholder { color: #b0a999; }

/* ===== 카테고리 칩 ===== */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 36px;
}
.chip {
  padding: 6px 12px;
  font-size: 13px;
  color: #7a7a7a;
  cursor: pointer;
  border-radius: 3px;
  user-select: none;
  border: none;
  background: transparent;
  font-family: inherit;
}
.chip:hover { color: #1a1a1a; }
.chip.active {
  color: #1a1a1a;
  font-weight: 700;
  background: rgba(184, 138, 29, 0.12);
}

/* ===== 안내 ===== */
.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 2px 12px;
  border-bottom: 1px solid #1a1a1a;
  margin-bottom: 4px;
}
.meta-row .count { font-size: 13px; color: #7a7a7a; }
.meta-row .count b { color: #1a1a1a; }

/* ===== 그리드 (바둑판) ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.card {
  background: #fff;
  border: 1px solid #e5e0d3;
  border-radius: 4px;
  padding: 18px 18px 16px;
  cursor: pointer;
  transition: all .12s;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 110px;
}
.card:hover {
  border-color: #1a1a1a;
  transform: translateY(-1px);
}
.card-cat {
  font-size: 10px;
  color: #b88a1d;
  letter-spacing: 0.1em;
  font-weight: 700;
  text-transform: uppercase;
}
.card-views {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 11px;
  color: #8a8a8a;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  pointer-events: none;
}
.card { position: relative; }
.post-views {
  font-size: 13px;
  color: #8a8a8a;
  font-weight: 500;
  margin: 8px 0 0;
  font-variant-numeric: tabular-nums;
}
.post-views .pv-num { color: #1f3a5f; font-weight: 700; }
.card-title {
  font-size: 15px;
  color: #1a1a1a;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
  letter-spacing: -0.01em;
}
.card-desc {
  font-size: 12.5px;
  color: #7a7a7a;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== 광고 — AdSense 승인 전까지 숨김 (활성화 시 display 줄 삭제) ===== */
.ad {
  display: none;
  margin: 32px 0;
  padding: 14px 18px;
  background: rgba(255,255,255,0.5);
  border: 1px dashed #d8d2c2;
  border-radius: 4px;
  text-align: center;
  font-size: 11px;
  color: #b0a999;
  letter-spacing: 0.1em;
}

/* ===== 빈 상태 ===== */
.empty {
  padding: 60px 0;
  text-align: center;
  color: #b0a999;
  font-size: 14px;
}

/* ===== 푸터 네비 (SEO 내부 링크) ===== */
.footer-nav {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #e5e0d3;
}
.footer-nav h3 {
  font-size: 12px;
  color: #b88a1d;
  letter-spacing: 0.15em;
  font-weight: 700;
  margin: 0 0 10px;
  text-transform: uppercase;
}
.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.footer-nav a {
  font-size: 13px;
  color: #5a5a5a;
}
.footer-nav a:hover {
  color: #b88a1d;
}

/* ===== 푸터 ===== */
.footer {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid #e5e0d3;
  text-align: center;
  font-size: 12px;
  color: #a0998a;
}
.footer a {
  margin: 0 6px;
  color: #7a7a7a;
}

/* ============================================================
   콘텐츠 상세 페이지
   ============================================================ */

.post-back {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 13px;
  color: #7a7a7a;
}
.post-back:hover { color: #1a1a1a; }

.post-head {
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e0d3;
  margin-bottom: 32px;
}
.post-head .cat-tag {
  display: inline-block;
  font-size: 11px;
  color: #b88a1d;
  letter-spacing: 0.08em;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.post-head h1 {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin: 0 0 14px;
}
.post-head .meta-line {
  font-size: 12px;
  color: #a0998a;
  display: flex;
  gap: 14px;
}
.post-head .meta-line .dot-sep::before {
  content: "·";
  margin-right: 14px;
  color: #ccc;
}

.post-intro {
  font-size: 16px;
  color: #2a2a2a;
  line-height: 1.85;
  margin-bottom: 32px;
  padding: 18px 22px;
  background: #fffbf2;
  border-left: 3px solid #b88a1d;
  border-radius: 2px;
}

.section-block { margin: 32px 0; }
.section-block h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-block h2 .tag {
  font-size: 10px;
  background: #1a1a1a;
  color: #fff;
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.example {
  background: #fff;
  border: 1px solid #e5e0d3;
  border-radius: 4px;
  padding: 16px 18px;
  margin: 8px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.example .num {
  background: #1a1a1a;
  color: #fff;
  min-width: 24px;
  height: 24px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.example .text {
  flex: 1;
  font-size: 15px;
  line-height: 1.7;
  color: #1a1a1a;
  white-space: pre-wrap;
}
.example .copy-btn {
  background: #f5f1ea;
  border: 1px solid #d8d2c2;
  color: #5a5a5a;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
  flex-shrink: 0;
}
.example .copy-btn:hover {
  background: #b88a1d;
  color: #fff;
  border-color: #b88a1d;
}
.example .copy-btn.copied {
  background: #2d5a3d;
  color: #fff;
  border-color: #2d5a3d;
}

.tips-box {
  background: #f3f1ea;
  border-radius: 6px;
  padding: 18px 22px;
  margin: 32px 0;
}
.tips-box .label {
  font-size: 11px;
  color: #b88a1d;
  letter-spacing: 0.15em;
  font-weight: 700;
  margin-bottom: 8px;
}
.tips-box ul {
  margin: 0;
  padding-left: 20px;
}
.tips-box li {
  font-size: 14px;
  color: #2a2a2a;
  line-height: 1.7;
  margin-bottom: 5px;
}

.related-box {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #e5e0d3;
}
.related-box h3 {
  font-size: 13px;
  font-weight: 700;
  color: #7a7a7a;
  letter-spacing: 0.05em;
  margin: 0 0 12px;
}
.related-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.related-list li {
  padding: 10px 0;
  border-bottom: 1px dashed #e5e0d3;
  font-size: 14px;
}
.related-list li:last-child { border-bottom: none; }
.related-list a {
  color: #2a2a2a;
  display: block;
}
.related-list a:hover { color: #b88a1d; }

/* ===== TL;DR 박스 ===== */
.tldr {
  background: #1a1a1a;
  color: #f5f1ea;
  border-radius: 6px;
  padding: 16px 20px;
  margin: 0 0 24px;
}
.tldr-label {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: #b88a1d;
  font-weight: 700;
  margin-bottom: 6px;
}
.tldr p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: #f5f1ea;
  white-space: pre-wrap;
}

/* ===== FAQ 자주 묻는 질문 ===== */
.faq-section {
  margin: 40px 0;
  padding-top: 24px;
  border-top: 1px solid #e5e0d3;
}
.faq-section h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 14px;
}
.faq-item {
  background: #fff;
  border: 1px solid #e5e0d3;
  border-radius: 4px;
  margin-bottom: 8px;
  padding: 0;
}
.faq-item summary {
  cursor: pointer;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 36px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: #b88a1d;
  font-weight: 700;
  transition: transform .15s;
}
.faq-item[open] summary::after {
  content: "−";
}
.faq-answer {
  padding: 0 18px 16px;
  font-size: 14.5px;
  color: #2a2a2a;
  line-height: 1.75;
  white-space: pre-wrap;
}

/* ===== 본문 article footer ===== */
.article-foot {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px dashed #e5e0d3;
}
.cite-note {
  font-size: 12px;
  color: #a0998a;
  margin: 0;
  line-height: 1.6;
}

/* ===== 반응형 ===== */
@media (max-width: 720px) {
  .wrap { padding: 28px 18px 60px; }
  .brand .logo { font-size: 26px; }
  .grid { grid-template-columns: 1fr; gap: 8px; }
  .card { min-height: auto; padding: 14px 16px; }
  .card-title { font-size: 14.5px; }
  .post-head h1 { font-size: 24px; }
  .post-intro { padding: 14px 16px; font-size: 15px; }
  .example { flex-wrap: wrap; gap: 10px; padding: 14px 16px; }
  .example .text { width: 100%; order: 2; }
  .example .num { order: 1; }
  .example .copy-btn { order: 3; margin-left: auto; }
}
