/* === Phase 12-5: 법적 문서 페이지 (terms / privacy) === */

.legal-body {
  background: #faf7f0;
  color: #2a2622;
  font-family: 'Pretendard', -apple-system, sans-serif;
  margin: 0;
  line-height: 1.7;
}

/* 헤더 */
.legal-header {
  background: #3a3530;
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

.legal-header__inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.legal-header__logo {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.legal-header__nav { display: flex; gap: 4px; }

.legal-header__link {
  padding: 6px 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s ease;
}
.legal-header__link:hover { color: #fff; background: rgba(255,255,255,0.08); }
.legal-header__link--active {
  color: #fff;
  background: rgba(255,255,255,0.12);
  font-weight: 600;
}

/* 메인 */
.legal-main {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.legal-container {
  background: #fff;
  border-radius: 16px;
  padding: 48px 56px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  border: 1px solid #f3ebd9;
}

.legal-title {
  font-size: 28px;
  font-weight: 800;
  color: #2a2622;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.legal-meta {
  font-size: 13px;
  color: #8a7b5c;
  margin: 0 0 32px;
}

.legal-intro {
  background: #faf7f0;
  border-left: 4px solid #c8a060;
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 32px;
  font-size: 14px;
  color: #3a3530;
}
.legal-intro p { margin: 0 0 8px; }
.legal-intro p:last-child { margin-bottom: 0; }

/* 목차 */
.legal-toc {
  background: #faf7f0;
  border: 1px solid #eae3d2;
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 32px;
}

.legal-toc__title {
  font-size: 14px;
  font-weight: 700;
  color: #3a3530;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.legal-toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 32px;
  font-size: 13px;
}

.legal-toc li { margin-bottom: 6px; break-inside: avoid; }

.legal-toc a {
  color: #6b6158;
  text-decoration: none;
  transition: color 0.15s ease;
}
.legal-toc a:hover { color: #c8a060; }

/* 섹션 */
.legal-section {
  margin: 36px 0;
  scroll-margin-top: 80px;
}

.legal-section h2 {
  font-size: 18px;
  font-weight: 700;
  color: #2a2622;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #eae3d2;
}

.legal-section p {
  font-size: 14px;
  color: #3a3530;
  margin: 0 0 12px;
}

.legal-section ol,
.legal-section ul {
  font-size: 14px;
  color: #3a3530;
  padding-left: 22px;
  margin: 0 0 12px;
}

.legal-section li {
  margin-bottom: 8px;
}

.legal-section ol > li > ul,
.legal-section ol > li > ol,
.legal-section ul > li > ul {
  margin-top: 8px;
  padding-left: 18px;
  list-style-type: disc;
  color: #6b6158;
}

.legal-section strong { color: #2a2622; }

.legal-section a {
  color: #c8a060;
  text-decoration: underline;
  text-decoration-color: rgba(200,160,96,0.4);
}
.legal-section a:hover { text-decoration-color: #c8a060; }

/* 강조 섹션 (AI 동의 / 처리 위탁 등 핵심 조항) */
.legal-section--highlight {
  background: linear-gradient(135deg, #fff8e8 0%, #fff4d6 100%);
  border: 1px solid #f0e0b0;
  border-radius: 12px;
  padding: 24px 28px;
}

.legal-section--highlight h2 {
  border-bottom-color: #f0e0b0;
  color: #8a5a0b;
}

.legal-section__intro {
  background: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  border-left: 4px solid #d48a1c;
  font-size: 13px !important;
  margin-bottom: 14px !important;
}

/* 표 */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 13px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #eae3d2;
}

.legal-table th,
.legal-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #f3ebd9;
  vertical-align: top;
}

.legal-table th {
  background: #faf7f0;
  font-weight: 700;
  color: #2a2622;
  font-size: 12px;
}

.legal-table tbody tr:last-child td { border-bottom: none; }
.legal-table tbody tr:hover { background: #faf7f0; }

/* 카드형 박스 */
.legal-card {
  background: #faf7f0;
  border: 1px solid #eae3d2;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 12px 0;
}

/* Footer note */
.legal-footer-note {
  background: #f5efe3;
  border-radius: 12px;
  padding: 20px 24px;
  margin-top: 48px;
  text-align: center;
}
.legal-footer-note p { margin: 0 0 4px; font-size: 13px; }
.legal-footer-note p:last-child { margin-bottom: 0; }
.legal-footer-note a { color: #c8a060; text-decoration: none; font-weight: 600; }

/* Footer bar */
.legal-footer-bar {
  background: #2a2622;
  color: rgba(255,255,255,0.6);
  padding: 24px 0;
  font-size: 12px;
}

.legal-footer-bar__inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.legal-footer-bar a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  margin: 0 2px;
}
.legal-footer-bar a:hover { color: #fff; }

/* 모바일 */
@media (max-width: 700px) {
  .legal-container { padding: 28px 22px; border-radius: 10px; }
  .legal-title { font-size: 22px; }
  .legal-section h2 { font-size: 16px; }
  .legal-toc ol { columns: 1; }
  .legal-table { font-size: 12px; }
  .legal-table th, .legal-table td { padding: 8px 10px; }
  .legal-main { padding: 20px 14px 60px; }
  .legal-header__inner { padding: 0 16px; }
  .legal-footer-bar__inner {
    flex-direction: column;
    text-align: center;
  }
}

/* 인쇄 친화 */
@media print {
  .legal-header, .legal-footer-bar { display: none; }
  .legal-container { box-shadow: none; border: none; }
  body { background: #fff; }
  .legal-section { page-break-inside: avoid; }
}
