html {
  scroll-behavior: smooth;
}

details > summary::-webkit-details-marker {
  display: none;
}

img {
  max-width: 100%;
}

/* ===== 모바일 가독성 (세부페이지 공통) ===== */
article p, article li { word-break: keep-all; overflow-wrap: break-word; }

@media (max-width: 639px) {
  main > section > div.relative,
  main > article,
  footer > div { padding-left: 1.75rem !important; padding-right: 1.75rem !important; }
  main > article { padding-top: 2rem !important; padding-bottom: 3rem !important; }

  /* 본문 글자 키우고 줄간격 넓히기 */
  main > article p,
  main > article li { font-size: 1rem !important; line-height: 1.9 !important; letter-spacing: -0.01em !important; }
  main > article p + p { margin-top: 1.25rem !important; }
  main > article > p:first-child { font-size: 1.0625rem !important; line-height: 1.95 !important; }

  /* 섹션 간격 */
  main > article > section { margin-top: 3.25rem !important; }
  main > article h2 { font-size: 1.375rem !important; line-height: 1.5 !important; margin-bottom: 1.25rem !important; }

  /* 목록 */
  main > article ul { padding-left: 1.25rem !important; }
  main > article li + li { margin-top: 0.75rem !important; }

  /* 인용·카드 */
  main > article blockquote { padding-left: 1.25rem !important; }
  main > article blockquote p.font-serif { font-size: 1.25rem !important; line-height: 1.7 !important; }
  main > article section .p-5 { padding: 1.5rem !important; }

  /* 표 */
  main > article table { font-size: 0.9375rem !important; line-height: 1.7 !important; }
  main > article table th, main > article table td { padding-top: 0.875rem !important; padding-bottom: 0.875rem !important; padding-right: 0.75rem !important; }

  /* FAQ */
  main > article details { padding-top: 1.25rem !important; padding-bottom: 1.25rem !important; }
  main > article details summary { font-size: 1rem !important; line-height: 1.6 !important; }
  main > article details p { margin-top: 0.875rem !important; }

  /* 히어로 */
  main > section h1 { line-height: 1.35 !important; word-break: keep-all; }
}

/* 모바일: 3열 이상 표는 행마다 카드형으로 쌓아서 표시 */
@media (max-width: 639px) {
  main > article table:has(td[data-label]) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  main > article table:has(td[data-label]),
  main > article table:has(td[data-label]) tbody,
  main > article table:has(td[data-label]) tr,
  main > article table:has(td[data-label]) td { display: block !important; width: 100%; }
  main > article table:has(td[data-label]) tr { border: 1px solid #E4DACE !important; padding: 0.5rem 1.25rem; margin-bottom: 1rem; background: #fff; }
  main > article table:has(td[data-label]) td { border: 0 !important; padding: 0.625rem 0 !important; font-size: 1rem !important; line-height: 1.7 !important; }
  main > article table:has(td[data-label]) td + td { border-top: 1px dashed #E4DACE !important; }
  main > article table:has(td[data-label]) td::before { content: attr(data-label); display: block; font-size: 0.75rem; letter-spacing: .08em; color: #7C2D42; margin-bottom: 0.125rem; }
}

/* 상품 카드(모바일): 라벨은 작게 유지, 이름·가격은 읽기 편하게 */
@media (max-width: 639px) {
  main > article .not-prose p { line-height: 1.6 !important; }
  main > article .not-prose p.uppercase { font-size: 0.6875rem !important; line-height: 1.4 !important; }
  main > article .not-prose p.font-serif { font-size: 1rem !important; }
  main > article .not-prose > div:first-child { width: 6rem; }
}

/* 모바일: 모든 영역(헤더·본문·푸터·하단 고정바) 좌우 여백 28px로 통일 */
@media (max-width: 639px) {
  .mx-auto[class*="px-"],
  header > div,
  footer > div,
  .nano-floating { padding-left: 1.75rem !important; padding-right: 1.75rem !important; }
  footer p, footer li, footer a { word-break: keep-all; }
}
