/* ===== 스마트폰 해결백과 — 중장년 친화 디자인 =====
   큰 글씨, 높은 대비, 넉넉한 터치 영역을 기본으로 합니다. */
:root {
  --max: 1100px;
  --text: #1a1a1a;
  --muted: #555;
  --line: #e4e4e7;
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --brand: #1d4ed8;
  --brand-dark: #1e3a8a;
  --warn-bg: #fff7ed;
  --warn-bd: #fdba74;
  --tip-bg: #eff6ff;
  --tip-bd: #93c5fd;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(0,0,0,.06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", system-ui, sans-serif;
  font-size: 19px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  word-break: keep-all;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 18px; }

/* ===== 헤더 ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 14px; padding: 12px 18px; max-width: var(--max); margin: 0 auto; }
.logo { font-size: 22px; font-weight: 800; color: var(--brand-dark); white-space: nowrap; }
.logo span { color: var(--brand); }
.header-spacer { flex: 1; }
.search-btn, .menu-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 9px 14px; font-size: 16px; cursor: pointer; color: var(--text);
}
.search-btn:hover, .menu-btn:hover { background: var(--bg-soft); }
.menu-btn { display: none; }

/* ===== 내비게이션 ===== */
.main-nav { border-top: 1px solid var(--line); background: #fff; }
.main-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 8px 18px; max-width: var(--max); margin: 0 auto; flex-wrap: wrap; }
.main-nav a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 16px; border-radius: 999px; font-weight: 700; color: var(--text);
  font-size: 17px;
}
.main-nav a:hover { background: var(--bg-soft); text-decoration: none; }
.main-nav a.active { background: var(--brand); color: #fff; }

/* ===== 히어로 ===== */
.hero { background: linear-gradient(135deg, #1e3a8a, #2563eb); color: #fff; padding: 54px 0; text-align: center; }
.hero h1 { font-size: 36px; margin: 0 0 12px; font-weight: 800; }
.hero p { font-size: 20px; margin: 0 auto 26px; max-width: 640px; opacity: .95; }
.hero-search { max-width: 560px; margin: 0 auto; display: flex; gap: 8px; }
.hero-search input { flex: 1; padding: 16px 18px; font-size: 18px; border: none; border-radius: 12px; }
.hero-search button { padding: 0 24px; font-size: 18px; font-weight: 700; border: none; border-radius: 12px; background: #f59e0b; color: #1a1a1a; cursor: pointer; }
.hero-search button:hover { background: #fbbf24; }

/* ===== 섹션 제목 ===== */
.section { padding: 44px 0; }
.section h2 { font-size: 27px; margin: 0 0 6px; font-weight: 800; }
.section .sub { color: var(--muted); margin: 0 0 24px; font-size: 17px; }

/* ===== 카테고리 카드 ===== */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 16px; }
.cat-card {
  display: block; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line);
  background: #fff; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0,0,0,.1); text-decoration: none; }
.cat-card .ico { font-size: 34px; }
.cat-card h3 { margin: 10px 0 6px; font-size: 21px; color: var(--text); }
.cat-card p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.cat-card .count { display: inline-block; margin-top: 12px; font-size: 14px; color: var(--brand); font-weight: 700; }

/* ===== 글 목록 ===== */
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 16px; }
.post-card {
  display: flex; flex-direction: column; padding: 20px; border-radius: var(--radius);
  border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0,0,0,.1); text-decoration: none; }
.post-card .badge { align-self: flex-start; font-size: 13px; font-weight: 700; color: #fff; padding: 4px 11px; border-radius: 999px; margin-bottom: 10px; }
.post-card h3 { margin: 0 0 8px; font-size: 19px; color: var(--text); line-height: 1.45; }
.post-card p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.6; flex: 1; }
.post-card .meta { margin-top: 14px; font-size: 14px; color: #888; }

/* ===== 본문(글) ===== */
.article-layout { display: grid; grid-template-columns: 1fr 280px; gap: 40px; padding: 30px 0 60px; }
.breadcrumb { font-size: 15px; color: var(--muted); margin: 18px 0; }
.breadcrumb a { color: var(--muted); }
.article h1 { font-size: 31px; line-height: 1.35; margin: 6px 0 16px; font-weight: 800; }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 15px; color: var(--muted); padding-bottom: 18px; border-bottom: 2px solid var(--line); margin-bottom: 8px; }
.article-meta .device { background: var(--bg-soft); padding: 3px 10px; border-radius: 999px; }
.article section.block { padding: 26px 0; border-bottom: 1px solid var(--line); }
.article h2.block-title { font-size: 24px; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; font-weight: 800; }
.article h2.block-title .num { background: var(--brand); color: #fff; width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.article p { margin: 0 0 14px; }
.article ul.steps-list { list-style: none; padding: 0; margin: 0 0 10px; }
.article ul.steps-list li { position: relative; padding: 6px 0 6px 30px; }
.article ul.steps-list li::before { content: "›"; position: absolute; left: 6px; top: 5px; color: var(--brand); font-weight: 800; font-size: 22px; line-height: 1.3; }
.step-card { background: var(--bg-soft); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 16px; border: 1px solid var(--line); }
.step-card h3 { margin: 0 0 10px; font-size: 19px; color: var(--brand-dark); }
.callout { border-radius: 12px; padding: 14px 16px; margin: 12px 0; font-size: 17px; }
.callout.tip { background: var(--tip-bg); border: 1px solid var(--tip-bd); }
.callout.warn { background: var(--warn-bg); border: 1px solid var(--warn-bd); }
.callout b { margin-right: 4px; }

/* 스크린샷 이미지 */
.shot { margin: 16px 0; text-align: center; }
.shot img { border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); max-height: 560px; }
.shot figcaption { margin-top: 8px; font-size: 15px; color: var(--muted); }
.shot.placeholder .ph-inner {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  border: 2px dashed var(--brand); background: var(--tip-bg);
  border-radius: 12px; padding: 26px 18px; color: var(--brand-dark);
}
.shot.placeholder .ph-ico { font-size: 38px; }
.shot.placeholder b { font-size: 17px; }
.shot.placeholder .ph-cap { color: #444; font-size: 15.5px; }
.shot.placeholder code { background: #fff; border: 1px solid var(--tip-bd); padding: 3px 9px; border-radius: 6px; font-size: 13.5px; color: #555; }

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; background: #fff; overflow: hidden; }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 700; font-size: 18px; list-style: none; display: flex; gap: 10px; align-items: flex-start; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q"; color: var(--brand); font-weight: 800; }
.faq details[open] summary { background: var(--bg-soft); }
.faq .answer { padding: 4px 18px 18px 18px; color: #333; }
.faq .answer::before { content: "A "; color: #dc2626; font-weight: 800; }

.summary-box { background: #f0f7ff; border: 1px solid var(--tip-bd); border-radius: var(--radius); padding: 20px 22px; }
.summary-box h2 { margin: 0 0 10px; font-size: 21px; }
.summary-box ul { margin: 0; padding-left: 22px; }
.summary-box li { margin-bottom: 8px; }

/* ===== 사이드바 ===== */
.sidebar .widget { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 20px; box-shadow: var(--shadow); }
.sidebar h3 { margin: 0 0 12px; font-size: 18px; }
.toc { position: sticky; top: 80px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 7px; }
.related-list { list-style: none; padding: 0; margin: 0; }
.related-list li { border-bottom: 1px solid var(--line); }
.related-list li:last-child { border-bottom: none; }
.related-list a { display: block; padding: 11px 0; font-size: 16px; color: var(--text); line-height: 1.45; }
.related-list a:hover { color: var(--brand); }

/* 관련글(본문 하단) */
.related-bottom { padding: 30px 0; }
.related-bottom h2 { font-size: 23px; margin: 0 0 18px; }

/* ===== 광고 슬롯 ===== */
.ad-slot { margin: 26px 0; text-align: center; min-height: 1px; }
.ad-label { font-size: 12px; color: #aaa; letter-spacing: 1px; }

/* ===== 정적 페이지 ===== */
.page { max-width: 800px; padding: 36px 0 60px; }
.page h1 { font-size: 30px; margin: 0 0 8px; }
.page h2 { font-size: 22px; margin: 30px 0 10px; }
.page p, .page li { font-size: 18px; }
.page .updated { color: var(--muted); font-size: 15px; margin-bottom: 24px; }
.contact-box { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }

/* ===== 검색 ===== */
.search-page { padding: 30px 0 60px; }
#search-input { width: 100%; padding: 16px 18px; font-size: 19px; border: 2px solid var(--brand); border-radius: 12px; }
#search-results { margin-top: 24px; }
.search-hint { color: var(--muted); }

/* ===== 푸터 ===== */
.site-footer { background: #111827; color: #cbd5e1; padding: 40px 0 30px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.site-footer h4 { color: #fff; font-size: 17px; margin: 0 0 12px; }
.site-footer a { color: #cbd5e1; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid #374151; margin-top: 26px; padding-top: 18px; font-size: 14px; color: #94a3b8; }
.disclaimer { font-size: 13.5px; color: #94a3b8; margin-top: 8px; line-height: 1.6; }

/* ===== 모바일 ===== */
@media (max-width: 860px) {
  body { font-size: 18px; }
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
  .toc { position: static; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 17px; }
  .footer-grid { grid-template-columns: 1fr; gap: 18px; }
  .menu-btn { display: inline-block; }
  .main-nav ul { gap: 4px; }
  .main-nav a { padding: 9px 13px; font-size: 16px; }
}
