/* 퍼스널라미 다섯 지면 공통 레이어 — 셸이 퍼스널라미 묶음 지면에만 싣는다.
   지면별 레이어(pl3-main·pl3-compare·pl3-color·pl3-zero·pl3-oneday)보다 앞서도록 #main 을 낀다.
   공통 셸(헤더·푸터·하단 상담바·우측 퀵바·상담창)은 건드리지 않는다. */

/* ── 1. 우측 퀵바 자리 ─────────────────────────────
   퀵바는 1025px 이상에서 화면 오른쪽(오른끝에서 16~84px)에 떠 있다.
   본문 상자가 그 밑으로 들어가지 않게, 퀵바가 겹치는 폭 구간에만 좌우 여백을 100px 로 넓힌다.
   1400px 이상은 1200px 본문의 바깥 여백이 이미 100px 이상이라 손대지 않는다(시안 1920 그대로). */
@media (min-width: 1025px) and (max-width: 1399px) {
  :root { --sec-gutter: 100px; }
  #main :is(.pl3-in, .pc3-inner, .plc .plc-inner, .plz .plz-inner, .pod .pod-inner) {
    width: auto;
    max-width: min(1200px, calc(100% - 200px));
    margin-left: auto;
    margin-right: auto;
  }
}
/* 1280~1399 는 지면별 레이어가 아직 1200 고정 치수로 그리는 구간이다(각 지면의 유동 규칙은 1279 이하).
   본문 상자가 위에서 1080~1199 로 줄었으므로 고정 폭 칸을 상자 안으로 맞춘다.
   값은 각 지면 레이어의 1279 이하 규칙과 같다 — 그쪽을 바꾸면 여기도 같이 본다. */
@media (min-width: 1280px) and (max-width: 1399px) {
  #main .pl3-point__word { left: auto; right: 0; }
  #main .plz .plz-pair__item, #main .plz .plz-col { flex: 1 1 0; min-width: 0; }
  #main .plz .plz-pair__img { width: 100%; height: auto; aspect-ratio: 3 / 2; }
  #main .plz .plz-col__img { width: 100%; height: auto; aspect-ratio: 59 / 40; }
  #main .plz .plz-pair__text { white-space: normal; }
  #main .plz .plz-concept__word, #main .pod .pod-for__word { display: none; }
  #main .pod .pod-card, #main .pod .pod-for__item, #main .pod .pod-eq__col { flex: 1 1 0; min-width: 0; }
  #main .pod .pod-card__img { width: 100%; height: auto; aspect-ratio: 392 / 300; }
  #main .pod .pod-card:nth-child(3) .pod-card__body { height: auto; }
  #main .pod .pod-card__text br { display: none; }
  #main .pod .pod-for__img { width: 100%; height: auto; aspect-ratio: 590 / 301; }
  #main .pod .pod-eq__img { width: 100%; height: auto; aspect-ratio: 586 / 470; }
  #main .pod .pod-eq__chips li { white-space: normal; height: auto; min-height: 46px; }
  #main .pod .pod-note__btn { margin: 44px auto 0; }
}
/* 하루 흐름 시간표는 좌표로 그린 그림이라 칸을 풀지 않고 본문 폭(화면 - 200px)에 맞춰 비율로 줄인다.
   10px 마다 그 구간의 가장 좁은 본문 폭에 맞춘 값이다(뒤 줄이 앞 줄을 덮는다) — 상자를 넘지 않는다 */
@media (min-width: 1280px) and (max-width: 1399.98px) { #main .pod .pod-line { zoom: 0.9; } }
@media (min-width: 1290px) and (max-width: 1399.98px) { #main .pod .pod-line { zoom: 0.9083; } }
@media (min-width: 1300px) and (max-width: 1399.98px) { #main .pod .pod-line { zoom: 0.9167; } }
@media (min-width: 1310px) and (max-width: 1399.98px) { #main .pod .pod-line { zoom: 0.925; } }
@media (min-width: 1320px) and (max-width: 1399.98px) { #main .pod .pod-line { zoom: 0.9333; } }
@media (min-width: 1330px) and (max-width: 1399.98px) { #main .pod .pod-line { zoom: 0.9417; } }
@media (min-width: 1340px) and (max-width: 1399.98px) { #main .pod .pod-line { zoom: 0.95; } }
@media (min-width: 1350px) and (max-width: 1399.98px) { #main .pod .pod-line { zoom: 0.9583; } }
@media (min-width: 1360px) and (max-width: 1399.98px) { #main .pod .pod-line { zoom: 0.9667; } }
@media (min-width: 1370px) and (max-width: 1399.98px) { #main .pod .pod-line { zoom: 0.975; } }
@media (min-width: 1380px) and (max-width: 1399.98px) { #main .pod .pod-line { zoom: 0.9833; } }
@media (min-width: 1390px) and (max-width: 1399.98px) { #main .pod .pod-line { zoom: 0.9917; } }
/* 이런 분께 카드 줄은 본문 상자보다 넓게 펼쳐진다 — 같은 기준으로 오른끝을 퀵바 앞에 둔다 */
@media (min-width: 1025px) and (max-width: 1919px) {
  #main .pl3-who__row { max-width: calc(100% - 200px); }
}
/* 1920 이상 — 시안 구도(카드 줄이 화면 오른쪽으로 흐른다)는 두되 줄을 퀵바 왼끝(화면 오른끝 - 84px)에서 끊는다.
   줄 시작점을 시안보다 48px 왼쪽에 두어 다섯 번째 카드의 글자는 끊는 선 앞에서 끝난다.
   넓은 화면(약 2110px 이상)에서는 줄이 퀵바 앞에서 이미 끝나 잘리지 않는다 */
@media (min-width: 1920px) {
  #main .pl3-who__row { margin-left: calc(50% - 1006px - 48px); width: min(2012px, calc(50% + 970px)); overflow: hidden; }
}
/* 제로·네츄럴 배경 낱말은 화면 오른끝에 붙는다 — 퀵바 앞에서 끝나게 */
@media (min-width: 1025px) {
  #main .plz .plz-concept__word--natural { right: max(calc(50% - 841px), 100px); }
}

/* ── 2. 자주 묻는 질문 머리 — 메인 지면 양식(라벨 FAQ · 제목 · 서브) ──
   공통 FAQ 레이어(newn-v3.css)가 라벨을 :root:root body #main 로 눌러 두어 한 단계 더 세게 적는다 */
#main .dn-geo-content__block:has(> h2.dn-faq__title) {
  --sec-faq-head-gap: 6px;
}
html:root body #main .dn-geo-content__block > .dn-faq__eyebrow {
  display: block;
  margin: 0 0 16px !important;
  font-size: 12px !important;
  line-height: 14.32px !important;
  font-weight: 600 !important;
  letter-spacing: 3px !important;
  text-transform: uppercase;
  text-align: center !important;
  color: #1f5f57 !important;
}
html:root body #main .dn-geo-content__block > .dn-faq__lead {
  margin: 0 0 50px !important;
  font-size: 17px !important;
  line-height: 28px !important;
  font-weight: 400 !important;
  letter-spacing: -0.27px !important;
  color: #888888 !important;
  text-align: center !important;
  word-break: keep-all;
  text-wrap: pretty;
}
@media (max-width: 767px) {
  :root { --sec-faq-title-ls: -0.6px; }
  html:root body #main .dn-geo-content__block > .dn-faq__eyebrow { margin-bottom: 12px !important; line-height: 1.7 !important; }
  html:root body #main .dn-geo-content__block > .dn-faq__lead { margin-bottom: 32px !important; font-size: 15px !important; line-height: 1.7 !important; }
}

/* ── 3. 서명·고지 — 문장 시작선을 본문 좌측선(각 지면 본문 상자)에 맞춘다 ──
   본문 상자 폭: 모바일 화면-40 · 768~1279 화면-80 · 1025~1399 화면-200 · 그 위 1200 */
html body #main .dn-author-signature { max-width: none !important; padding-left: 0 !important; padding-right: 0 !important; border-top: 0; }
html body #main .dn-author-signature > .dn-container { width: 1200px; max-width: calc(100% - 40px); margin: 0 auto; padding: 32px 0 0 !important; border-top: 1px solid var(--dn-border); }
html body #main .dn-author-signature { padding-top: 0 !important; }
html body #main .dn-author-signature .dn-author-signature__text { word-break: keep-all; text-wrap: pretty; }
@media (min-width: 768px) and (max-width: 1279px) {
  html body #main .dn-author-signature > .dn-container { max-width: calc(100% - 80px); }
}
@media (min-width: 1025px) and (max-width: 1399px) {
  html body #main .dn-author-signature > .dn-container { max-width: min(1200px, calc(100% - 200px)); }
}

/* ── 4. 모바일(767 이하) — 섹션 상하 여백 한 벌(64/64) · FAQ 질문 끝줄 한 어절 막기 ── */
#main .dn-geo-content__block > details > summary { text-wrap: pretty; }
@media (max-width: 767px) {
  :root { --sec-faq-pad: 64px 0 64px; }
  #main :is(.pl3-sec:not(.pl3-hero), .pc3-struct, .pc3-compare, .pc3-principle, .plc-sec:not(.plc-hero), .plz-sec:not(.plz-hero), .pod-sec:not(.pod-hero)) { padding-top: 64px !important; padding-bottom: 64px !important; }
  /* 히어로 높이 한 벌(318) — 리드가 한 줄로 줄어드는 폭(약 520 이상)에서도 같은 높이 */
  #main :is(.pc3-hero, .plc-hero, .plz-hero, .pod-hero) { min-height: 318px; }
  /* 섹션 라벨 행간 1.7 — 셸의 모바일 행간 규칙(760 이하)이 닿지 않는 761~767 에서도 같게 */
  #main :is(.pl3-head__eb, .pc3-sechead__eyebrow, .plc-head__label, .plz-head__label, .pod-head__label) { line-height: 1.7 !important; }
}

/* ── 5. 하위 4지면(비교·형태컬러·제로·원데이) 히어로 아래 간격 — 글자 끝에서 첫 섹션까지 한 값 ──
   글자 묶음을 히어로 아래쪽에 붙이고(남는 높이는 위로) 하단 여백 + 첫 섹션 위 여백을 폭마다 고정한다.
   히어로 높이 하한(모바일 318 · 태블릿 508)과 1024 이상 시안 구도는 그대로 둔다. */
@media (max-width: 1023px) {
  #main :is(.pc3-hero, .plc-hero, .plz-hero, .pod-hero) { display: flex; flex-direction: column; justify-content: flex-end; }
  #main .pc3-hero__frame { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: flex-end; }
  /* 비교 지면 히어로 아래 페이드는 다음 섹션(연민트) 배경색으로 끝낸다 — 이음새 띠가 안 보이게 */
  #main .pc3 .pc3-hero__g2 { background: linear-gradient(180deg, rgba(247, 251, 250, 0) 0%, #f7fbfa 100%); }
}
@media (min-width: 768px) and (max-width: 1023px) {
  #main :is(.pc3-hero, .plc-hero, .plz-hero, .pod-hero) { min-height: 508px; }
  #main :is(.pc3-hero__head, .plc-hero__body, .plz-hero__body, .pod-hero__body) { padding-bottom: 60px; }
  /* 원데이 리드는 위로 12px 당겨 그려져(자리는 그대로) 아래 여백을 그만큼 덜어 같은 값에 맞춘다 */
  #main .pod-hero__body { padding-bottom: 48px; }
  #main :is(.pc3-hero, .plc-hero, .plz-hero, .pod-hero) + section { padding-top: 80px !important; }
}
@media (max-width: 767px) {
  #main :is(.pc3-hero__head, .plc-hero__body, .plz-hero__body, .pod-hero__body) { padding-bottom: 36px; }
}

/* ── 페이지 이동 탭 — 퍼스널라미 다섯 지면 위쪽 ── */
#main .pl-tabs { background: #ffffff; border-bottom: 1px solid #e3e8e7; }
#main .pl-tabs__in { display: flex; justify-content: center; gap: 8px; width: 1200px; max-width: calc(100% - 40px); margin: 0 auto; padding: 14px 0; }
#main .pl-tabs__a { display: inline-flex; align-items: center; flex: 0 0 auto; height: 44px; padding: 0 20px; border: 1px solid #cdcdcd; border-radius: 999px; background: #ffffff; font-size: 16px; line-height: 1; font-weight: 500; letter-spacing: -0.2px; color: #6b6b6b; white-space: nowrap; text-decoration: none; }
#main .pl-tabs__a:hover { border-color: #2c6b65; color: #2c6b65; }
#main .pl-tabs__a.is-on, #main .pl-tabs__a.is-on:hover { border-color: #2c6b65; background: #2c6b65; color: #ffffff; font-weight: 600; }
#main .pl-tabs__a:focus-visible { outline: 3px solid #0a0a0a; outline-offset: 2px; }
@media (max-width: 767px) {
  #main .pl-tabs__in { justify-content: flex-start; width: auto; max-width: none; margin: 0; padding: 10px 20px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  #main .pl-tabs__in::-webkit-scrollbar { display: none; }
  #main .pl-tabs__a { height: 44px; padding: 0 16px; font-size: 15px; }
}

/* 퍼스널라미 등록상표 한 줄 — 서명 아래 */
html body #main .pl3-tm-note > .dn-container { width: 1200px; max-width: calc(100% - 40px); margin: 0 auto; padding: 8px 0 40px; }
html body #main .pl3-tm-note__text { margin: 0; font-size: 13px; line-height: 20px; letter-spacing: -.2px; color: #6b6b6b; word-break: keep-all; }
@media (min-width: 768px) and (max-width: 1279px) { html body #main .pl3-tm-note > .dn-container { max-width: calc(100% - 80px); } }
@media (min-width: 1025px) and (max-width: 1399px) { html body #main .pl3-tm-note > .dn-container { max-width: min(1200px, calc(100% - 200px)); } }
