/* =====================================================
   법정 공시 팝업 (윤리경영 / 인권경영 / ESG경영)
   — 미디어 블로그 상세페이지와 동일한 타이포그래피 적용
   ===================================================== */
.lm-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lm-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

dialog.lm-overlay {
  height: 100dvh;
  overflow: hidden;
}

.lm-bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  cursor: zoom-out;
}

.lm-panel {
  position: relative;
  z-index: 1;
  width: min(880px, 92vw);
  height: min(86vh, 980px);
  height: min(86dvh, 980px);
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(16px);
  transition: transform 0.25s ease;
}

.lm-overlay.is-open .lm-panel {
  transform: translateY(0);
}

.lm-modal-header {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 14px 20px;
  border-bottom: 1px solid #eee;
  background: #fff;
}

.lm-modal-title {
  min-width: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: #111;
}

.lm-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  border: none;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s;
}

.lm-modal-header .lm-close {
  position: relative;
  top: auto;
  right: auto;
  flex: 0 0 36px;
}

.lm-close:hover { background: rgba(0, 0, 0, 0.12); }

/* 탭 네비게이션 */
.lm-tabs {
  flex: none;
  display: flex;
  gap: 4px;
  padding: 0 20px;
  border-bottom: 1px solid #eee;
}

.lm-tab {
  padding: 12px 16px;
  font-size: 14.5px;
  font-weight: 600;
  color: #999;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}

.lm-tab:hover { color: #555; }

.lm-tab.is-active {
  color: #111;
  border-bottom-color: #e30f1c;
}

/* 스크롤 콘텐츠 영역 */
.lm-body {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 36px 40px 60px;
}

/* 탭이 없는 단일 문서형 팝업 (예: 개인정보처리방침) */
.lm-panel--notabs .lm-body {
  padding-top: 24px;
}

.lm-panel--notabs .lm-pane > .lm-tag,
.lm-panel--notabs .lm-pane > .lm-h2 { display: none; }

.lm-pane { display: none; }
.lm-pane.is-active { display: block; }

/* ===== 블로그 상세와 동일한 타이포그래피 ===== */
.lm-tag {
  display: inline-block;
  padding: 4px 12px;
  background: #111;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}

.lm-h2 {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 700;
  color: #111;
  line-height: 1.4;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}

.lm-lead {
  font-size: 15px;
  color: #555;
  line-height: 1.8;
  border-left: 3px solid #e30f1c;
  padding-left: 16px;
  margin: 0 0 28px;
}

.lm-divider { border: none; border-top: 1px solid #eee; margin: 28px 0; }

.lm-pane p {
  font-size: 15px;
  color: #333;
  line-height: 1.85;
  margin: 0 0 18px;
}

.lm-sign {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px dashed #e2e2e2;
  text-align: right;
  font-size: 14px;
  color: #555;
}

/* 목차 */
.lm-toc {
  background: #f7f7f7;
  border-radius: 12px;
  padding: 20px 22px;
  margin: 0 0 28px;
}

.lm-toc h3 {
  font-size: 13px;
  font-weight: 700;
  color: #999;
  margin: 0 0 12px;
  letter-spacing: 0.04em;
}

.lm-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  gap: 8px 48px;
}

.lm-toc-list a {
  font-size: 13.5px;
  color: #444;
  text-decoration: none;
  white-space: nowrap;
}

.lm-toc-list a:hover { color: #e30f1c; }

/* 장(chapter) / 조(article) */
.lm-chap { margin-bottom: 36px; scroll-margin-top: 20px; }

.lm-chap h3 {
  font-size: 18px;
  font-weight: 700;
  color: #111;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #111;
}

.lm-chap h4 {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  margin: 20px 0 8px;
}

.lm-chap > p, .lm-chap .lm-art-intro {
  font-size: 14px;
  color: #444;
  line-height: 1.8;
  margin: 0 0 10px;
}

.lm-pane ol, .lm-pane ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

.lm-pane ol > li, .lm-pane ul > li {
  font-size: 14px;
  color: #444;
  line-height: 1.8;
  margin-bottom: 8px;
}

.lm-pane .lm-toc-list { margin: 0; padding: 0; }
.lm-pane .lm-toc-list > li { margin: 0; }
.lm-toc-list a { display: block; line-height: 1.7; }

.lm-pane ul.lm-plain {
  list-style: none;
  padding-left: 0;
}

.lm-pane ul.lm-charter > li {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  line-height: 1.7;
  margin-bottom: 10px;
}

.lm-pane ul.lm-charter > li strong { color: #e30f1c; margin-right: 4px; }

.lm-pane ul ul, .lm-pane ol ul {
  margin: 6px 0 6px 4px;
}

.lm-pane ul ul li, .lm-pane ol ul li {
  font-size: 13.5px;
  color: #555;
}

.lm-note {
  font-size: 13.5px;
  color: #777;
  font-weight: 600;
  margin: 10px 0;
}

/* 원칙(principle) 섹션 공통 */
.lm-principle { margin-bottom: 30px; }
.lm-principle h3 {
  font-size: 16.5px;
  font-weight: 700;
  color: #111;
  margin: 0 0 12px;
}

/* 이미지 블록 */
.lm-img-block {
  margin: 16px 0 24px;
  border-radius: 0;
  overflow: hidden;
  background: #f5f5f5;
}
.lm-img-block img { width: 100%; height: auto; display: block; }

@media (max-width: 767px) {
  dialog.lm-overlay {
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }
  .lm-panel { width: 100%; height: 100%; border-radius: 14px; }
  .lm-modal-header { min-height: 60px; padding: 12px 16px; }
  .lm-tabs { padding: 0 12px; overflow-x: auto; }
  .lm-tab { flex-shrink: 0; padding: 12px; }
  .lm-body, .lm-panel--notabs .lm-body { padding: 20px 18px 28px; }
  .lm-toc { padding: 16px; margin-bottom: 24px; }
  .lm-toc-list { grid-template-columns: 1fr; justify-content: stretch; }
  .lm-toc-list a { white-space: normal; }
}
