/* 이용약관 · 개인정보처리방침의 본문 모양과, 그것을 띄우는 팝업.
 *
 * 한 파일에 둔 이유 — 같은 글이 두 자리에 나옵니다: 화면 그대로(terms.html · privacy.html)와
 * 가입 화면의 팝업(js/legal-modal.js). 규칙을 나눠 적으면 한쪽만 고쳐 같은 약관이 자리마다
 * 다르게 보입니다(2026-09-21). 두 화면은 <link> 로, 팝업 쪽은 js/auth.js 가 싣습니다.
 */

/* ── 본문 ─────────────────────────────────────────────────────────────── */
/* 길게 읽는 글이라 폭을 묶고 줄 간격을 넓힌다. */
.cc-legal { max-width: 860px; }
.cc-legal-meta {
  font-size: 0.86rem; color: var(--gray-500); background: var(--mint-100);
  border-radius: 10px; padding: 0.85rem 1.1rem; margin-bottom: 2.2rem; word-break: keep-all;
}
.cc-legal-meta strong { color: var(--green-900); }
.cc-legal h2 {
  font-size: 1.05rem; font-weight: 700; color: var(--green-900);
  margin: 2.3rem 0 0.7rem; padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-200); word-break: keep-all;
}
.cc-legal h2:first-of-type { margin-top: 0; }
.cc-legal h3 { font-size: 0.95rem; font-weight: 700; color: var(--charcoal); margin: 1.3rem 0 0.4rem; word-break: keep-all; }
.cc-legal p, .cc-legal li { font-size: 0.93rem; line-height: 1.85; color: var(--gray-600); word-break: keep-all; }
.cc-legal p { margin-bottom: 0.45rem; }
.cc-legal ol, .cc-legal ul { margin: 0.3rem 0 0.9rem; padding-left: 1.35rem; }
.cc-legal li { margin-bottom: 0.25rem; }
/* 「1.」 처럼 번호를 글에 직접 적는 목록. 번호가 줄바꿈 뒤에도 들여쓰기로 남는다. */
.cc-legal ol.cc-legal-plain { list-style: none; padding-left: 0; }
.cc-legal ol.cc-legal-plain > li { padding-left: 1.5rem; text-indent: -1.5rem; }
/* 좁은 화면에서는 표만 옆으로 민다. 문서 전체가 밀리면 글을 읽을 수가 없다. */
.cc-legal-table { overflow-x: auto; margin: 0.5rem 0 1.1rem; }
.cc-legal table { width: 100%; min-width: 460px; border-collapse: collapse; font-size: 0.88rem; }
.cc-legal th, .cc-legal td {
  border: 1px solid var(--gray-200); padding: 0.55rem 0.7rem;
  text-align: left; vertical-align: top; word-break: keep-all; line-height: 1.6;
}
.cc-legal th { background: var(--mint-100); color: var(--green-900); font-weight: 700; white-space: nowrap; }
.cc-legal-note { font-size: 0.85rem; color: var(--gray-500); margin-top: -0.5rem; }
@media (max-width: 575.98px) {
  .cc-legal h2 { font-size: 1rem; }
  .cc-legal p, .cc-legal li { font-size: 0.89rem; }
}

/* ── 팝업 ─────────────────────────────────────────────────────────────── */
.cc-legal-modal { position: fixed; inset: 0; z-index: 1080; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.cc-legal-modal[hidden] { display: none; }
.cc-legal-modal-backdrop { position: absolute; inset: 0; background: rgba(9, 34, 28, 0.55); }
.cc-legal-modal-panel {
  position: relative; display: flex; flex-direction: column;
  width: min(760px, 100%); max-height: min(720px, 100%);
  background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.cc-legal-modal-panel:focus { outline: none; }
.cc-legal-modal-head {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--gray-200); flex-shrink: 0;
}
.cc-legal-modal-title { flex: 1; min-width: 0; margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--green-900); }
.cc-legal-modal-x {
  flex-shrink: 0; width: 2rem; height: 2rem; line-height: 1; font-size: 1.5rem;
  background: none; border: none; color: var(--gray-500); cursor: pointer; border-radius: 50%;
}
.cc-legal-modal-x:hover { background: var(--off-white); color: var(--charcoal); }
/* 글이 길어 여기만 굴린다 — 뒤 화면이 함께 굴러가지 않게 body 도 잠근다(.cc-legal-modal-open). */
.cc-legal-modal-body { flex: 1; min-height: 0; overflow-y: auto; padding: 1.25rem; }
.cc-legal-modal-body:focus { outline: none; }
/* 팝업 안에서는 칸 폭을 그대로 쓴다(화면에서는 860px 로 묶어 읽기 좋게 둔다). */
.cc-legal-modal-body.cc-legal { max-width: none; }
.cc-legal-modal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.85rem 1.25rem; border-top: 1px solid var(--gray-200); flex-shrink: 0;
}
.cc-legal-modal-open { font-size: 0.85rem; font-weight: 600; color: var(--green-700); text-decoration: underline; }
.cc-legal-modal-ok {
  background: var(--green-600); color: #fff; border: none; border-radius: 50px;
  padding: 0.5rem 1.4rem; font-size: 0.9rem; font-weight: 700; cursor: pointer;
}
.cc-legal-modal-ok:hover { background: var(--green-900); }
body.cc-legal-modal-open { overflow: hidden; }
@media (max-width: 575.98px) {
  /* 휴대폰에서는 화면을 꽉 채운다 — 여백을 두면 글 칸이 손바닥만 해진다. */
  .cc-legal-modal { padding: 0; }
  .cc-legal-modal-panel { width: 100%; max-height: 100%; height: 100%; border-radius: 0; }
  .cc-legal-modal-body { padding: 1rem; }
}
