/* 이음플러스 블로그 — 회사 홈페이지(eumplus.kr)와 같은 디자인 토큰을 쓴다. */
:root {
  --bg: #FAF8F5;
  --text: #1C2333;
  --body: #3F4756;
  --muted: #6B7280;
  --faint: #9CA3AF;
  --accent: #E8653A;
  --accent-dark: #D55A31;
  --accent-tint: #FBE9E0;
  --accent-deep: #C94A06;
  --line: #E7E2DB;
  --card: #FFFFFF;
  --dark-hover: #2B3449;
  --max: 1120px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 16px;
  --shadow-hover: 0 12px 32px rgba(28, 35, 51, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Pretendard, "Pretendard Variable", "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans JP", "Hiragino Sans", sans-serif;
  font-size: clamp(16px, 1.2vw, 17px);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
button { font: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.3; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------- 헤더 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  height: 64px;
  background: rgba(250, 248, 245, .86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.brand:hover { color: var(--text); }
.brand svg { flex: none; }
.brand-name { font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.site-nav { display: flex; gap: clamp(4px, 2vw, 28px); font-size: 15px; font-weight: 500; }
.site-nav a { display: flex; align-items: center; min-height: 44px; padding: 0 8px; }

/* 좁은 화면: 메뉴가 글자 단위로 줄바꿈되지 않게 한 줄로 유지하고 간격·글자를 줄인다 */
.brand > span, .site-nav a { white-space: nowrap; }
@media (max-width: 420px) {
  .site-header .wrap { gap: 8px; }
  .brand { gap: 8px; }
  .brand > span { font-size: 17px; }
  .site-nav { gap: 2px; font-size: 14px; }
  .site-nav a { padding: 0 6px; }
}
@media (max-width: 359px) {
  .brand > span { display: none; }
}

/* ---------- 글 목록 ---------- */
.list-page {
  padding-top: clamp(48px, 7vw, 88px);
  padding-bottom: clamp(72px, 10vw, 120px);
  display: flex; flex-direction: column; gap: clamp(40px, 5vw, 64px);
}
.list-hero { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.list-hero h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 700; }
.list-hero p { margin: 0; color: var(--muted); font-size: clamp(16px, 1.4vw, 19px); }

.tag-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.tag-chip {
  min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.tag-chip:hover { border-color: var(--accent); color: var(--accent); }
.tag-chip.is-active { background: var(--text); color: #FFFFFF; border-color: var(--text); }
.tag-chip.is-active:hover { color: #FFFFFF; }
.tag-sep { width: 1px; align-self: stretch; margin: 6px 4px; background: var(--line); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.post-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  overflow: hidden; transition: transform .2s, box-shadow .2s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.post-card[hidden] { display: none; }
.card-link { display: flex; flex-direction: column; flex: 1; color: inherit; }
.card-link:hover { color: inherit; }
.card-cover {
  aspect-ratio: 16 / 10; background: var(--cover, #3F4756);
  display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden;
}
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-text { padding: 24px; color: #FFFFFF; font-size: clamp(28px, 2.6vw, 36px); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; text-wrap: balance; }
.card-body { display: flex; flex-direction: column; gap: 10px; padding: 24px; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.tag-pill { padding: 2px 10px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-deep); font-weight: 600; white-space: nowrap; }
.card-title { font-size: clamp(18px, 1.5vw, 20px); font-weight: 600; line-height: 1.4; }
.card-excerpt {
  margin: 0; color: var(--muted); font-size: 15px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: var(--muted); }
.card-cta { color: var(--accent); font-weight: 600; }
.empty-note { margin: 0; color: var(--muted); }

/* ---------- 글 상세 ---------- */
.post-page {
  max-width: calc(720px + var(--gutter) * 2);
  padding-top: clamp(40px, 6vw, 72px);
  padding-bottom: clamp(72px, 10vw, 120px);
  display: flex; flex-direction: column; gap: 40px;
}
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 15px; color: var(--muted); align-self: flex-start; }
.post-head { display: flex; flex-direction: column; gap: 20px; }
.post-head .tag-pill { align-self: flex-start; padding: 4px 12px; font-size: 13px; }
.post-title { font-size: clamp(28px, 3.6vw, 40px); font-weight: 700; }
.post-author { display: flex; align-items: center; gap: 12px; padding-top: 4px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--text); display: flex; align-items: center; justify-content: center; flex: none; }
.post-author-text { display: flex; flex-direction: column; line-height: 1.4; }
.author-name { font-weight: 600; font-size: 15px; }
.author-meta { font-size: 14px; color: var(--muted); }

.post-hero { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--line); }
.post-hero .media-frame { aspect-ratio: 16 / 9; }
.post-hero img, .post-hero video, .post-hero iframe { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.media-caption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 10px; }

.post-body { display: flex; flex-direction: column; gap: 28px; font-size: clamp(16px, 1.3vw, 18px); line-height: 1.8; }
.post-body p { margin: 0; }
.post-body h2 { font-size: clamp(20px, 1.8vw, 24px); font-weight: 700; line-height: 1.4; padding-top: 8px; }
.post-body h2 + p, .post-body h2 + ul { margin-top: -16px; }
.post-body ul.dot-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; color: var(--body); }
.post-body ul.dot-list li { display: flex; gap: 12px; }
.post-body ul.dot-list li::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-top: 0.72em; }
.post-body ul.dot-list strong { color: var(--text); font-weight: 600; margin-right: 6px; }
.post-body .note { color: var(--muted); font-size: 15px; }
.post-body figure { margin: 0; }
.post-body .body-image img { width: 100%; border-radius: 12px; }
.post-body video, .post-body iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; background: #000; }

/* 링크 미리보기 카드 */
.link-preview-card {
  display: flex; border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow: hidden;
  color: inherit; transition: transform .15s, box-shadow .15s;
}
.link-preview-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); color: inherit; }
.link-preview-image { flex: none; width: 160px; background-size: cover; background-position: center; }
.link-preview-content { padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.link-preview-title { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.4; }
.link-preview-desc { margin: 0; font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.link-preview-url-bar { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--faint); margin-top: 4px; }
@media (max-width: 480px) {
  .link-preview-card { flex-direction: column; }
  .link-preview-image { width: 100%; height: 160px; }
}

/* 자세 사진 + AI 스켈레톤 */
.pose-figure { margin: 0; }
.pose-stage { position: relative; width: 100%; max-width: 480px; margin: 0 auto; border-radius: 12px; overflow: hidden; background: var(--line); }
.pose-stage img { width: 100%; height: 100%; object-fit: cover; }
.pose-skeleton { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke-linecap: round; transition: opacity .25s; }
.pose-skeleton .pose-outline { stroke: rgba(0, 0, 0, .35); }
.pose-skeleton .pose-lines { stroke: var(--pose-color); }
.pose-skeleton .pose-dots { fill: var(--pose-color); stroke: none; }
.pose-figure.skeleton-off .pose-skeleton { opacity: 0; }
.pose-toggle {
  position: absolute; right: 10px; bottom: 10px; padding: 6px 12px; border: 0; border-radius: 999px;
  background: rgba(28, 35, 51, .72); color: #FFFFFF; font-size: 12px; font-weight: 600; cursor: pointer;
}
.pose-toggle::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #8BC34A; }
.pose-toggle[aria-pressed="false"]::before { background: rgba(255, 255, 255, .4); }

/* 앱 안내 카드 */
.app-card { display: flex; flex-direction: column; gap: 20px; padding: clamp(24px, 3vw, 32px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.app-card-head { display: flex; align-items: center; gap: 16px; }
.app-icon { width: 56px; height: 56px; border-radius: 22%; flex: none; object-fit: cover; }
.app-icon-fallback { background: var(--text); display: flex; align-items: center; justify-content: center; }
.app-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.app-card-text strong { font-size: 18px; letter-spacing: -0.02em; line-height: 1.35; }
.app-card-text span { font-size: 14px; color: var(--muted); line-height: 1.5; }
.app-card-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
/* 공식 스토어 배지: 원본 비율 그대로, 웹 버튼과 같은 44px 높이 */
.store-badge { display: inline-flex; border-radius: 8px; transition: opacity .15s, transform .15s; }
.store-badge:hover { opacity: .85; transform: translateY(-1px); }
.store-badge img { height: 44px; width: auto; }
.btn-dark { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 10px; background: var(--text); color: #FFFFFF; font-size: 14px; font-weight: 600; }
.btn-dark:hover { background: var(--dark-hover); color: #FFFFFF; }
.btn-outline { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 14px; font-weight: 500; }
.btn-outline:hover { background: var(--accent-tint); color: var(--text); }

/* 좋아요 · 공유 */
.post-actions { display: flex; gap: 8px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.action-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.action-btn:hover { border-color: var(--accent); }
.action-btn svg { flex: none; }
.like-btn-detail svg { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.like-btn-detail.liked { background: var(--accent-tint); border-color: var(--accent); }
.like-btn-detail.liked svg { fill: var(--accent); }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 16px; }
.faq h2 { font-size: clamp(22px, 2vw, 26px); font-weight: 700; margin-bottom: 8px; }
.faq-item { border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow: hidden; }
.faq-q {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; padding: 14px 20px; font-size: 16px; font-weight: 600; cursor: pointer;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q:hover { color: var(--accent); }
.faq-icon { flex: none; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 20px; line-height: 1; transition: transform .2s; }
.faq-item[open] .faq-icon { transform: rotate(45deg); }
.faq-a { padding: 0 20px 18px; color: var(--body); font-size: 15px; }
.faq-a p { margin: 0; }

/* 리뷰 */
.reviews { display: flex; flex-direction: column; gap: 16px; }
.reviews h2 { font-size: clamp(22px, 2vw, 26px); font-weight: 700; margin-bottom: 8px; }
.review-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.review-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.review-user { display: flex; align-items: center; gap: 10px; }
.review-user img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.review-user-info { display: flex; flex-direction: column; line-height: 1.4; }
.review-user-info strong { font-size: 14px; }
.review-user-info span { font-size: 13px; color: var(--muted); }
.review-rating { color: var(--accent); font-size: 14px; letter-spacing: 1px; }
.review-card p { margin: 0; font-size: 15px; color: var(--body); }

/* ---------- 푸터 ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: auto; }
.site-footer .wrap { padding-top: 40px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 20px; font-size: 14px; color: var(--muted); }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
.footer-brand { display: flex; align-items: center; gap: 8px; }
.footer-brand b { color: var(--text); }
.footer-brand span { color: var(--faint); }
.footer-row { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; padding-top: 16px; }

/* 토스트 */
.toast-notification {
  position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 20px);
  padding: 12px 20px; border-radius: 10px; background: var(--text); color: #FFFFFF; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100% - 40px);
}
.toast-notification.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 600px) {
  .post-actions { flex-wrap: wrap; }
}


/* ---------- 카테고리 허브 네비게이션 ---------- */
.cat-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.cat-link {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font-size: 14px; font-weight: 600; transition: border-color .15s, color .15s, background .15s;
}
.cat-link:hover { border-color: var(--accent); color: var(--accent); }
.cat-link.is-active { background: var(--text); color: #FFFFFF; border-color: var(--text); }
.cat-link.is-active:hover { color: #FFFFFF; }
.cat-count { font-size: 12px; opacity: .72; font-weight: 500; }

/* ---------- 다국어 전환 바 (?lang_code=) ---------- */
.post-head-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lang-switcher { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lang-btn {
  min-height: 32px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s;
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }
.lang-btn.is-active { background: var(--text); color: #FFFFFF; border-color: var(--text); }

/* ---------- 목차 (TOC) ---------- */
.post-toc {
  padding: 20px 24px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); display: flex; flex-direction: column; gap: 10px;
}
.post-toc-title { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.post-toc-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--body); }
.post-toc-list a { color: var(--body); border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; }
.post-toc-list a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- 표 · 콜아웃 · 인용문 (포맷 다변화) ---------- */
.body-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.body-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.55; min-width: 480px; }
.body-table caption { padding: 12px 16px 8px; text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--bg); border-bottom: 1px solid var(--line); }
.body-table th, .body-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.body-table th { background: rgba(28, 35, 51, .035); font-weight: 700; color: var(--text); white-space: nowrap; }
.body-table tbody tr:last-child td { border-bottom: 0; }
.post-body a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }
.post-body .link-preview-card, .post-body .post-toc a { text-decoration: none; color: inherit; }

.callout {
  padding: 18px 22px; border-radius: 12px; border-left: 4px solid var(--accent);
  background: var(--card); border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px; font-size: 15.5px; line-height: 1.65;
}
.callout strong { font-size: 16px; font-weight: 700; color: var(--text); }
.callout p { margin: 0; color: var(--body); }
.callout-summary { border-left-color: #1C2333; background: #F5F6F8; }
.callout-tip { border-left-color: #2E8B57; background: #F2F9F5; }
.callout-warning { border-left-color: #D9480F; background: #FFF5F0; }

.body-quote {
  margin: 4px 0; padding: 18px 24px; border-left: 3px solid var(--text);
  background: rgba(28, 35, 51, .03); border-radius: 0 12px 12px 0;
  font-size: 17px; color: var(--text); font-weight: 500;
}
.body-quote p { margin: 0; }
.body-quote cite { display: block; margin-top: 8px; font-size: 14px; font-style: normal; color: var(--muted); font-weight: 400; }

/* ---------- 작성자 신뢰도 박스 & 관련 글 ---------- */
.author-box {
  display: flex; align-items: flex-start; gap: 16px; padding: 22px 24px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
}
.author-box .avatar { width: 48px; height: 48px; margin-top: 2px; }
.author-box-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.author-box-body strong { font-size: 16px; color: var(--text); }
.author-box-body p { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.6; }
.author-box-link { align-self: flex-start; font-size: 14px; font-weight: 600; color: var(--accent); margin-top: 2px; }

.related-posts { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; }
.related-posts h2 { font-size: clamp(20px, 1.9vw, 24px); font-weight: 700; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.related-card {
  display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); overflow: hidden; transition: transform .18s, box-shadow .18s;
}
.related-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); color: inherit; }
.related-cover { aspect-ratio: 16 / 9; background: var(--line); overflow: hidden; }
.related-cover img { width: 100%; height: 100%; object-fit: cover; }
.related-info { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.related-cat { font-size: 12px; font-weight: 600; color: var(--accent-deep); }
.related-title { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 680px) {
  .related-grid { grid-template-columns: 1fr; }
  .related-card { flex-direction: row; align-items: center; }
  .related-cover { width: 112px; height: 80px; aspect-ratio: auto; flex: none; }
}

/* 다중 앱 추천 카드 그룹 */
.app-card-group { display: flex; flex-direction: column; gap: 14px; }
.app-card-group-title { font-size: 15px; font-weight: 700; color: var(--muted); margin-bottom: -4px; }
