/* Base reset */
*, *::before, *::after { box-sizing: border-box; }

/* Bold text for emphasis */
strong, b {
  font-weight: bold;
}
html, body { height: 100%; }

/* Bold text for emphasis */
strong, b {
  font-weight: bold;
}
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, "Apple Color Emoji", sans-serif;
  line-height: 1.6;
  color: #37352f;
  background: #ffffff;
  padding-bottom: 56px; /* add breathing room at the very bottom */
}

/* Bold text for emphasis */
strong, b {
  font-weight: bold;
}

/* Layout: each top-level section takes up 90% of the viewport width and centers */
header, nav, main, footer, section#easy-intro {
  width: 90vw;              /* 90% of the full screen */
  max-width: 1200px;        /* optional cap for huge screens; adjust if needed */
  margin-left: auto;
  margin-right: auto;
}

/* Ensure bottom breathing room inside main content area */
main#content {
  padding-bottom: 96px; /* prevents margin-collapsing at page bottom */
}

/* Bold text for emphasis */
strong, b {
  font-weight: bold;
}

/* Header */
header h1 {
  margin: 16px 0 8px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(22px, 3vw, 32px);
}

/* Bold text for emphasis */
strong, b {
  font-weight: bold;
}

/* TOC (목차) - 2열 그리드, 구분선 */
#toc {
  width: 90vw !important;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
  padding: 16px 0;
  margin: 16px 0;
}

/* Bold text for emphasis */
strong, b {
  font-weight: bold;
}
#toc h2 {
  margin: 0 0 12px 0;
  font-size: 1.2em;
  font-weight: 600;
}

/* Bold text for emphasis */
strong, b {
  font-weight: bold;
}
#toc .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  padding-left: 0;
}

/* Bold text for emphasis */
strong, b {
  font-weight: bold;
}
#toc .container > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Bold text for emphasis */
strong, b {
  font-weight: bold;
}
#toc a {
  display: block;
  padding: 8px 12px;
  text-decoration: none;
  color: inherit;
  border-radius: 4px;
  font-size: 1em;
}

/* Bold text for emphasis */
strong, b {
  font-weight: bold;
}
#toc a:hover {
  background: #f5f5f5;
}

/* Bold text for emphasis */
strong, b {
  font-weight: bold;
}
@media (max-width: 640px) {
  #toc .container {
    grid-template-columns: 1fr 1fr;
  }

/* Bold text for emphasis */
strong, b {
  font-weight: bold;
}
}

/* Bold text for emphasis */
strong, b {
  font-weight: bold;
}
/* Easy intro block */
#easy-intro .intro {
  margin: 0 0 8px 0;
  font-size: clamp(14px, 1.8vw, 18px);
}

/* Bold text for emphasis */
strong, b {
  font-weight: bold;
}
#easy-intro #easy-link {
  display: block;
}

/* Bold text for emphasis */
strong, b {
  font-weight: bold;
}
#easy-intro #easy-link img {
  display: block;
  max-width: 25%;
  height: auto;
}

/* Bold text for emphasis */
strong, b {
  font-weight: bold;
}

/* Content section headers - same size as TOC title */
#content h2 {
  margin: 24px 0 12px 0 !important;
  font-size: 1.2em !important;
  font-weight: 600 !important;
}

/* Bold text for emphasis */
strong, b {
  font-weight: bold;
}

/* Intro text section */
#intro-text {
  width: 90vw;
  max-width: 1200px;
  margin: 16px auto;
  padding: 16px 0;
}

/* Bold text for emphasis */
strong, b {
  font-weight: bold;
}
#intro-text p {
  margin: 0;
  line-height: 1.6;
  font-size: 1em;
}

/* Bold text for emphasis */
strong, b {
  font-weight: bold;
}

/* Content section h3 headers */
#content h3 {
  margin: 16px 0 8px 0;
  font-size: 1em;
  font-weight: bold;
}
/* Indent only sub-items like a), b), c) etc */
#content h3 {
  padding-left: 20px;
}
/* Remove indent and bold for section-1 h3 headers */
#section-1 h3 {
  padding-left: 0;
  font-weight: normal;
}
/* Remove indent for main numbered sections */
#content h3.main-section {
  padding-left: 0;
}

/* Bold text for emphasis */
strong, b {
  font-weight: bold;
}

/* List styling for bullet points */
#content ul {
  margin: 8px 0;
  padding-left: 20px;
}
#content li {
  margin: 4px 0;
  line-height: 1.6;
}

/* Indent paragraphs under numbered sections */
#content h3 + p {
  padding-left: 20px;
}
/* Remove indent for section-1 h3 + p */
#section-1 h3 + p {
  padding-left: 0;
}

/* Additional indentation for content under h3 in section-2 */
/* Indent content under a), b), c) etc headers */
#section-2 h3:not(.main-section) + p,
#section-2 h3:not(.main-section) + ul {
  padding-left: 40px;
}

/* Improved list styling */
#section-2 ul {
  margin: 8px 0;
  padding-left: 20px;
}
#section-2 li {
  margin: 4px 0;
  line-height: 1.6;
  list-style-type: disc;
}

/* Indent paragraphs that follow ul in section-2 */
#section-2 ul + p {
  padding-left: 40px;
}


/* Remove indentation for specific paragraphs */
#section-2 p.no-indent {
  padding-left: 0 !important;
}

/* Fix double indentation for specific paragraph */
#section-2 p:contains("당근은 다음의 개인정보 항목을 「개인정보 보호법」 제15조 제1항 제4호") {
  padding-left: 20px !important;
}

/* Fix 79번 p태그 - remove double indentation */
#section-2 ul + p {
  padding-left: 20px !important;
}

/* Indentation classes */
#section-2 p.indent-1 {
  padding-left: 20px !important;
}
#section-2 ul.indent-2 {
  padding-left: 40px !important;
}

/* Reduce line spacing in section-2 */
#section-2 h3 {
  margin: 8px 0 4px 0;
}
#section-2 p {
  margin: 2px 0;
}
#section-2 ul {
  margin: 2px 0;
}

/* Remove bold from section-3 h3 headers */
#section-3 h3 {
  font-weight: normal;
}

/* Remove indentation from section-3 h3 headers */
#section-3 h3 {
  padding-left: 0 !important;
}

/* Add extra indentation to section-3 ul tags */
#section-3 ul {
  padding-left: 40px !important;
}

/* Add extra indentation to section-3 li tags */
#section-3 li {
  margin-left: 20px;
  padding-left: 0;
}

/* Reduce line spacing in section-3 */
#section-3 h3 {
  margin: 8px 0 4px 0;
}
#section-3 p {
  margin: 8px 0 !important;
}
#section-3 ul {
  margin: 2px 0;
}

/* Fix section-3 line spacing and add indent-2 class */
#section-3 p {
  margin: 4px 0;
}

.indent-2 {
  padding-left: 20px;
}

/* Reduce line spacing in section-5 */
#section-5 p {
  margin: 4px 0;
}

/* Style for internal links in content */
section a {
  color: inherit;
  text-decoration: underline;
}

section a:hover {
  color: #666;
  text-decoration: underline;
}

/* Make table columns equal width in section-6 */
#section-6 table {
  table-layout: fixed;
  width: 100%;
}

#section-6 th,
#section-6 td {
  width: 25%;
}

/* Style section-6 table with borders, colors, alignment and padding */
#section-6 table {
  border-collapse: collapse;
  border: 0.5px solid #ddd;
}

#section-6 th,
#section-6 td {
  border: 0.5px solid #ddd;
  padding: 8pt;
}

#section-6 th {
  background-color: #f5f5f5;
  text-align: center;
}

#section-6 td:first-child {
  text-align: center;
}

/* Make content after ※ symbol smaller in section-6 table */


/* Style small text in section-6 table */
#section-6 small {
  font-size: 0.9em;
}

/* Add indentation for numbered paragraphs in section-6 */
#section-6 p {
  text-indent: 0;
  padding-left: 0;
}

#section-6 p {
  text-indent: -20px;
  padding-left: 20px;
}

/* Reduce line spacing in section-6 */
#section-6 p {
  margin: 4px 0;
}

#section-6 ul {
  margin: 4px 0;
}

/* Adjust image size in section-8 */
#section-8 img {
  max-width: 25%;
  height: auto;
}


/* Make section-9 image same size as other images */
#section-9 img {
  max-width: 25%;
  height: auto;
}

/* Adjust line spacing in section-10 */
#section-10 p {
  margin: 2px 0;
}

#section-10 p:has(li) {
  margin-top: 8px;
  margin-bottom: 2px;
}

/* Mobile responsive image sizes */
@media (max-width: 768px) {
  #easy-intro #easy-link img,
  #section-8 img,
  #section-9 img {
    max-width: 90% !important;
  }
}

/* Fix hanging indentation for li tags in section-11 */
#section-11 li {
  text-indent: -20px;
  padding-left: 20px;
}

/* Cookie Popup Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background-color: #fefefe;
  margin: 3% auto;
  padding: 25px;
  border: 1px solid #888;
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden; /* 이미지가 가로로 넘치지 않도록 차단 */
  box-sizing: border-box; /* 패딩 포함 폭 계산 */
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
}

.cookie-methods h4 {
  margin: 15px 0 5px 0;
  color: #333;
}

.cookie-methods p {
  margin: 5px 0 10px 0;
  padding-left: 10px;
  color: #666;
}

/* Cookie popup image styles */
.browser-method {
  margin: 20px 0;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: #f9f9f9;
}

.browser-method h5 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 16px;
}

.browser-method p {
  margin: 5px 0 15px 0;
  color: #666;
  font-size: 14px;
}

.cookie-image {
  width: 100%;
  max-width: 400px;
  height: auto;
  border: none;
  border-radius: 5px;
  display: block;
  margin: 10px auto;
}

.cookie-methods h4 {
  margin: 25px 0 15px 0;
  color: #333;
  font-size: 18px;
  border-bottom: 2px solid #007bff;
  padding-bottom: 5px;
}

/* Make cookie1 and cookie2 images larger */
img[src*="cookie1.png"],
img[src*="cookie2.png"],
img[src*="cookie4.png"] {
  max-width: 800px !important;
}

img[src*="cookie3.png"],
img[src*="cookie5.png"] {
  max-width: 300px !important;
}

/* Remove underline from cookie popup link */
a[onclick*="showCookiePopup"] {
  text-decoration: none;
}

a[onclick*="showCookiePopup"]:hover {
  text-decoration: underline;
}

/* Apply same table styles to section-11 as section-6 */
#section-11 table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
  border: 0.5px solid #ddd;
}

#section-11 th,
#section-11 td {
  width: 20%;
  border: 0.5px solid #ddd;
  padding: 8pt;
}

#section-11 th {
  background-color: #f5f5f5;
  text-align: center;
}

#section-11 td:first-child {
  text-align: center;
}

/* Ad popup styles (match cookie popup look & feel) */
.ad-methods h4 {
  margin: 20px 0 10px 0;
  color: #333;
  font-size: 16px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
}

.ad-methods p {
  margin: 5px 0 15px 0;
  color: #666;
  font-size: 14px;
  padding-left: 10px;
}

.platform-method {
  margin: 20px 0;            /* cookie의 .browser-method와 동일 */
  padding: 15px;             /* 동일 패딩 */
  border: 1px solid #ddd;    /* 동일 보더 */
  border-radius: 5px;        /* 동일 라운드 */
  background-color: #f9f9f9; /* 동일 배경 */
  width: 100%;
  max-width: 100%;
  overflow: hidden;          /* 내부 요소 넘침 방지 */
  box-sizing: border-box;
}

.ad-image {
  width: 100%;              /* cookie-image와 동일하게 박스에 맞춤 */
  max-width: 800px;         /* cookie와 유사한 기본 최대폭(필요 시 600~800으로 조절 가능) */
  height: auto;
  border: none;
  border-radius: 5px;
  display: block;
  margin: 10px auto;
  box-sizing: border-box;
  object-fit: contain;
}

/* 플랫폼 박스 내부에서도 넘침 방지 */
.platform-method {
  overflow: hidden;
  box-sizing: border-box;
}

/* Remove underline from ad popup link */
a[onclick*="showAdPopup"] {
  text-decoration: none;
}

a[onclick*="showAdPopup"]:hover {
  text-decoration: underline;
}

/* Make ad popup responsive */
@media (max-width: 768px) {
  .ad-image {
    max-width: 100% !important;
    width: 100% !important;
  }
  
  .platform-method {
    margin: 15px 0;
    padding: 10px;
  }
  
  .ad-methods h4 {
    font-size: 14px;
  }
  
  .ad-methods p {
    font-size: 12px;
  }
}

/* Apply indent-2 to li tags in section-11 */
#section-11 li.indent-2 {
  padding-left: 20px !important;
  margin-left: 20px;
}

/* Additional indentation for ul in section-12 */
#section-12 ul.indent-2 {
  padding-left: 40px !important;
  margin-left: 20px !important;
}

/* Hanging indent for li in section-12 */
#section-12 li {
  text-indent: -20px !important;
  padding-left: 20px !important;
  margin: 6px 0 !important;
}

/* Section-14 table styles (reuse section-6/11 styles) */
#section-14 table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
  border: 0.5px solid #ddd;
}

#section-14 th,
#section-14 td {
  border: 0.5px solid #ddd;
  padding: 8pt;
}

#section-14 th {
  background-color: #f5f5f5;
  text-align: center;
}

#section-14 th:first-child,
#section-14 td:first-child {
  width: 30%;
  text-align: center;
}

#section-14 th:nth-child(2),
#section-14 td:nth-child(2) {
  width: 70%;
}

#section-14 p,
#section-14 ul {
  margin: 4px 0;
}

/* Extra indentation for lists in section-14 */
#section-14 ul.indent-2 {
  padding-left: 30px !important;
  margin-left: 0 !important;
}

#section-14 ul.indent-2 > li {
  padding-left: 0 !important;      /* prevent double indent */
  text-indent: 0 !important;       /* rely on UL padding for wrap alignment */
  list-style-type: disc !important;
  list-style-position: outside !important;
}

#section-14 li {
  text-indent: -20px;
  padding-left: 20px;
}

/* Adjust line spacing between p and ul in section-12 */
#section-12 p {
  margin: 4px 0 !important;
}

#section-12 ul {
  margin: 4px 0 !important;
}

/* Make table of contents display in order on mobile */
@media (max-width: 768px) {
}

/* Reduce spacing between paragraphs inside list items in section-15 */
#section-15 li p {
  margin: 2px 0 !important;
}

/* Adjust spacing between p and ul in section-16 */
#section-16 p {
  margin: 4px 0 !important;
}

#section-16 ul {
  margin: 4px 0 !important;
}

/* Slightly reduce spacing between paragraphs in section-17 */
#section-17 p {
  margin: 4px 0 !important;
}

/* Combo box styles below section-17 */
.policy-version-select {
  margin: 8px 0 16px 0; /* tighten bottom to align with right box */
  display: flex;
  align-items: center;
  gap: 8px;
}

.policy-version-select label {
  display: inline-block;
  margin-right: 8px;
  font-weight: 600;
}

.policy-version-select select {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
}

/* Right-aligned previous policy box */
.policy-actions {
  display: flex;
  align-items: center;
  justify-content: space-between; /* left: combo, right: button */
  gap: 16px;
}

/* Responsive: stack and stretch on mobile */
@media (max-width: 640px) {
  .policy-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .policy-version-select {
    width: 100%;
  }

  .policy-version-select select {
    width: 100%;
  }

  .prev-policy {
    width: 100%;
    justify-content: space-between;
  }

  .prev-policy .prev-title {
    flex: 1;
  }
}

.prev-policy {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fafafa;
}

.prev-policy .prev-title {
  font-weight: 600;
}

.prev-policy .prev-link {
  color: inherit;            /* 기본 텍스트 색 */
  text-decoration: none;     /* 밑줄 제거 */
}

.prev-policy .prev-link:hover {
  color: #888888;            /* 마우스 오버 시 연한 회색 */
  text-decoration: none;
}

.notice-url-label {
  font-size: 14px;
}

#notice-url {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 260px;
}

.prev-link.disabled {
  opacity: 0.6;
  pointer-events: none;
}