/* dadjob 블로그 스타일 — 읽기 중심, 모바일 우선. 앱(styles.css) 토큰과 조화. */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --ink: #16181c;
  --ink-secondary: #5b616e;
  --brand: #2563eb;
  --border: #e5e7eb;
  --radius: 14px;
  --maxw: 720px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Pretendard Variable", Pretendard, -apple-system, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 헤더 / 푸터 */
.site-hdr {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 16px 20px;
}
.site-brand { font-weight: 700; color: var(--ink); font-size: 1.05rem; }
.site-brand span { color: var(--ink-secondary); font-weight: 500; }
.site-cta {
  font-size: 0.9rem; font-weight: 600; color: #fff; background: var(--brand);
  padding: 7px 14px; border-radius: 999px;
}
.site-cta:hover { text-decoration: none; opacity: 0.9; }
.site-ftr {
  max-width: var(--maxw); margin: 48px auto 32px; padding: 24px 20px;
  border-top: 1px solid var(--border); color: var(--ink-secondary); font-size: 0.85rem;
}
.site-ftr p { margin: 0 0 8px; }
.site-ftr nav { margin: 0 0 12px; line-height: 1.9; }
.site-ftr nav a { color: var(--ink-secondary); }
.site-ftr__brand { display: inline-block; margin-bottom: 10px; }
.site-ftr__brand img { display: block; height: 28px; width: auto; }
.site-ftr__fine { font-size: 0.78rem; line-height: 1.6; }
.site-ftr__fine a { color: var(--ink-secondary); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 8px 20px 0; }

/* 목록 */
.hero-blog { padding: 16px 0 8px; }
.hero-blog h1 { font-size: 1.7rem; margin: 0 0 10px; letter-spacing: -0.02em; }
.hero-blog p { color: var(--ink-secondary); margin: 0; }
.post-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.post-list li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: box-shadow 0.15s, transform 0.15s; }
.post-list li:hover { box-shadow: 0 6px 20px rgba(16,24,40,0.08); transform: translateY(-1px); }
.post-list a { display: block; padding: 18px 20px; color: inherit; }
.post-list a:hover { text-decoration: none; }
.post-list h2 { font-size: 1.15rem; margin: 0 0 6px; letter-spacing: -0.01em; }
.post-list p { margin: 0 0 10px; color: var(--ink-secondary); font-size: 0.95rem; }
.post-list-meta { font-size: 0.8rem; color: var(--ink-secondary); }

/* 글 */
.crumb { font-size: 0.85rem; color: var(--ink-secondary); margin: 8px 0 16px; }
.crumb a { color: var(--ink-secondary); }
.post h1 { font-size: 1.75rem; line-height: 1.35; letter-spacing: -0.02em; margin: 0 0 10px; }
.post-meta { color: var(--ink-secondary); font-size: 0.85rem; margin: 0 0 24px; }
.tag { color: var(--brand); }
.post-body { font-size: 1.03rem; }
.post-body h2 { font-size: 1.3rem; margin: 36px 0 12px; letter-spacing: -0.01em; padding-top: 8px; border-top: 1px solid var(--border); }
.post-body h3 { font-size: 1.1rem; margin: 24px 0 8px; }
.post-body h4 { font-size: 1rem; margin: 20px 0 6px; }
.post-body p { margin: 0 0 16px; }
.post-body ul { margin: 0 0 16px; padding-left: 20px; }
.post-body li { margin: 4px 0; }
.post-body strong { font-weight: 700; }
.post-body code { background: #eef0f3; padding: 2px 6px; border-radius: 5px; font-size: 0.9em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.post-body blockquote {
  margin: 0 0 20px; padding: 12px 18px; background: #eef3ff;
  border-left: 3px solid var(--brand); border-radius: 0 10px 10px 0;
  color: #1e3a5f; font-size: 0.95rem;
}
.post-body blockquote p { margin: 0; }
.post-body hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.callout { margin: 0 0 20px; padding: 14px 18px; border-radius: 12px; font-size: 0.95rem; line-height: 1.65; }
.callout--tip { background: #eef3ff; border: 1px solid #d4e2ff; color: #1e3a5f; }
.callout--warn { background: #fff6ed; border: 1px solid #ffe0c2; color: #7a3e00; }
.callout--note { background: #f3f4f6; border: 1px solid var(--border); color: #374151; }
.table-wrap { overflow-x: auto; margin: 0 0 20px; -webkit-overflow-scrolling: touch; }
.post-body table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.post-body th, .post-body td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.post-body th { background: #f0f2f5; font-weight: 600; white-space: nowrap; }

/* 관련 글 / 네비 */
.related { margin: 40px 0 0; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.related h2 { font-size: 1.05rem; margin: 0 0 10px; border: none; padding: 0; }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.back { margin: 32px 0 0; }

/* 광고 슬롯 */
.ad { margin: 24px 0; min-height: 1px; text-align: center; }

@media (min-width: 640px) {
  .hero-blog h1 { font-size: 2rem; }
  .post h1 { font-size: 2.1rem; }
}

/* ── 쿠키 동의 배너 (analytics.js가 생성) ── */
.cookiebar {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: min(680px, calc(100% - 24px)); z-index: 2000;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  padding: 14px 18px; border-radius: 16px;
  background: #111827; color: #f3f4f6; font-size: 0.9rem; line-height: 1.5;
  box-shadow: 0 12px 32px rgba(0,0,0,0.28);
}
.cookiebar__txt { flex: 1 1 240px; }
.cookiebar__txt a { color: #93c5fd; text-decoration: underline; }
.cookiebar__btns { display: flex; gap: 8px; margin-left: auto; }
.cookiebar__btn { border: none; border-radius: 10px; padding: 9px 18px; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.cookiebar__btn--no { background: transparent; color: #9ca3af; border: 1px solid #374151; }
.cookiebar__btn--yes { background: #2563eb; color: #fff; }

/* 블로그 → 앱 유입 게이트 */
.cta-inline { margin: 28px 0; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.cta-inline p { margin: 0 0 8px; font-size: 15px; color: var(--ink-secondary); }
.cta-inline a { font-weight: 600; }
.cta-end { display: flex; gap: 16px; align-items: center; margin: 36px 0 8px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.cta-end img { flex: 0 0 auto; width: 96px; height: 96px; object-fit: contain; }
.cta-end__title { margin: 0; font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.cta-end__sub { margin: 6px 0 12px; font-size: 14px; color: var(--ink-secondary); line-height: 1.5; }
.cta-end__btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 12px; background: var(--brand); color: var(--surface); font-weight: 600; }
.cta-end__btn:hover { text-decoration: none; filter: brightness(0.95); }
@media (max-width: 420px) { .cta-end { flex-direction: column; text-align: center; } }

/* 본문 사진 */
.photo { margin: 28px 0; }
.photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); background: var(--surface); }
.photo figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-secondary); line-height: 1.5; }
