/* =========================================================
   Publcode v4 Bottom Sheet + Popup Contents (FIXED)
   - ✅ @media 닫힘 누락 수정
   - ✅ bottom var fallback 추가
   - ✅ body.pl-lock 셀렉터 수정
   - ✅ close 버튼 기준(헤더 relative) 추가
   - ✅ 중첩 스크롤 최소화(내부 overflow 정리)
   ========================================================= */


/* =========================
   팝업 띄우기 (Bottom Sheet)
========================= */
.publcode_v4 .pl-sheet{
  position:fixed;
  inset:0;
  z-index:9999;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .18s ease, visibility 0s linear .18s;
}

.publcode_v4 .pl-sheet.is-open{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transition:opacity .18s ease;
}

.publcode_v4 .pl-sheet__dim{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.45);
  opacity:0;
  transition:opacity .28s cubic-bezier(.2,.8,.2,1);
}

.publcode_v4 .pl-sheet__panel{
  position:absolute;
  left:0; right:0;

  /* ✅ bottom 중복 제거 + 기본값(fallback) 추가 */
  bottom: calc(var(--bottom-nav, 0px) + env(safe-area-inset-bottom));

  width:100%;
  max-height:88vh;
  background:#fff;
  border-radius:18px 18px 0 0;
  box-shadow:0 -18px 50px rgba(0,0,0,.22);
  overflow:hidden;

  transform:translate3d(0, 100%, 0);
  will-change: transform;
  transition:transform .46s cubic-bezier(.22,1,.36,1);

  /* ✅ 헤더/바디 레이아웃 고정 */
  display:flex;
  flex-direction:column;
}

.publcode_v4 .pl-sheet.is-open .pl-sheet__dim{ opacity:1; }
.publcode_v4 .pl-sheet.is-open .pl-sheet__panel{ transform:translate3d(0,0,0); }

.publcode_v4 .pl-sheet__txt{
  font-size:clamp(18px, 2.2vw, 22px);
  padding:clamp(10px, 3vw, 28px) 14px 20px;
}
.publcode_v4 .pl-sheet__txt h3{
  font-weight:700;
  color:#000;
  line-height:35px;
}
.publcode_v4 .pl-sheet__txt span{
  font-size:clamp(14px, 2.2vw, 22px);
}

.publcode_v4 .pl-sheet__handle{
  width:44px;
  height:5px;
  border-radius:999px;
  background:#d1d5db;
  margin:10px auto 6px;
  flex:0 0 auto;
}

.publcode_v4 .pl-sheet__titles{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}

.publcode_v4 .pl-sheet__sub{
  margin:0;
  font-size:12px;
  line-height:1.35;
  color:#6b7280;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.publcode_v4 .pl-sheet__head{
  gap:10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 14px 12px;
  border-bottom:1px solid #eef0f4;
  flex:0 0 auto;

  /* ✅ close absolute 기준 */
  position:relative;
}

.publcode_v4 .pl-sheet__title{
  margin:0;
  font-size:16px;
}

.publcode_v4 .pl-sheet__close{
  position:absolute;
  top:1px;
  right:0;
  width:46px;
  height:55px;
  border:0;
  background:transparent;
  font-size:28px;
  cursor:pointer;
  line-height:1;
}

.publcode_v4 .pl-sheet__body{
  /* ✅ 바디만 스크롤 담당 */
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  font-size:14px;
  line-height:1.6;
  flex:1 1 auto;
  min-height:0;

  /* 필요 시 여백 */
  padding-bottom:40px;
}

/* ✅ body 락: selector 수정 */
body.pl-lock{
  overflow:hidden;
  touch-action:none;
}

/* =========================
   팝업 내용 (Pop Menu)
========================= */
.publcode_v4 .publcode_popmenu_{
  /* ✅ 중첩 스크롤 방지: 내부 overflow 제거/완화 */
  overflow:auto;

  --max: 980px;
  --bg: #f3f4f6;
  --card: #ffffff;
  --line: rgba(0,0,0,.10);
  --text: #111;
  --muted: #5b5f66;
  --hero: #eaf6ff;
  --radius: 22px;
  --shadow: 0 12px 30px rgba(0,0,0,.08);

  background:var(--bg);
  color:var(--text);
  padding:clamp(18px, 3vw, 28px) 14px 80px;
}

.publcode_v4 .publcode_popmenu___wrap{
  max-width:var(--max);
  margin:0 auto;
}

.publcode_v4 .publcode_popmenu___pageTitle{
  margin:0 0 14px;
  font-size:clamp(14px, 2.2vw, 22px);
}

/* Hero */
.publcode_v4 .publcode_popmenu_Hero{
  border-radius:12px;
  background-image:url(/service_s7/order/share/img/publogcode_ban.jpg);
  background-repeat:no-repeat;
  background-position:center;
  background-size:cover;
}

.publcode_v4 .publcode_popmenu_Hero__inner{
  display:grid;
  grid-template-columns:1.05fr .95fr;
  align-items:center;
  padding:clamp(18px, 3.2vw, 26px);
}

.publcode_v4 .publcode_popmenu_Hero__eyebrow{
  font-size:clamp(16px, 2.1vw, 22px);
}

.publcode_v4 .publcode_popmenu_Hero__headline{
  margin:0;
  font-weight:900;
  font-size:clamp(16px, 3.2vw, 34px);
  line-height:25px;
  letter-spacing:-0.03em;
}

.publcode_v4 .publcode_popmenu_Hero__art{
  display:flex;
  justify-content:flex-end;
}

.publcode_v4 .publcode_popmenu_Hero__art img{
  width:min(420px, 100%);
  height:auto;
  display:block;
  border-radius:16px;
  box-shadow:0 10px 26px rgba(0,0,0,.10);
}

/* 섹션 타이틀 */
.publcode_v4 .publcode_popmenu___sectionTitle{
  margin:18px 0 14px;
  font-size:clamp(14px, 2.2vw, 22px);
}

/* 리스트 */
.publcode_v4 .publcode_popmenu_List{
  display:grid;
  gap:14px;
}

/* 카드 */
.publcode_v4 .publcode_popmenu_Card{
  display:grid;
  grid-template-columns:84px 1fr 26px;
  align-items:center;
  gap:16px;
  padding:clamp(14px, 2.6vw, 18px);
  background:var(--card);
  border:1px solid var(--line);
  border-radius:26px;
  box-shadow:0 10px 24px rgba(0,0,0,.06);
  text-decoration:none;
  color:inherit;
  min-height:106px;
  transition:transform .12s ease, box-shadow .12s ease;
}

.publcode_v4 .publcode_popmenu_Card:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 30px rgba(0,0,0,.09);
}
.publcode_v4 .publcode_popmenu_Card:active{
  transform:translateY(0);
}

.publcode_v4 .publcode_popmenu_Card__icon{
  width:74px;
  height:74px;
  border-radius:22px;
  display:grid;
  place-items:center;
  background:#7a7a7a;
  color:#fff;
}
.publcode_v4 .publcode_popmenu_Card__icon--dark{
  background:#222450;
}
.publcode_v4 .publcode_popmenu_Card__icon img{
  width:35%;
}

.publcode_v4 .publcode_popmenu_Card__body{
  display:grid;
  gap:6px;
  min-width:0;
}

.publcode_v4 .publcode_popmenu_Card__title{
  font-weight:900;
  font-size:clamp(18px, 2.6vw, 30px);
  letter-spacing:-0.03em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.publcode_v4 .publcode_popmenu_Card__desc{
  font-size:clamp(14px, 1.7vw, 18px);
  color:var(--muted);
  letter-spacing:-0.01em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.publcode_v4 .publcode_popmenu_Card__chev{
  display:grid;
  place-items:center;
  color:#222;
}

/* 포커스 접근성 */
.publcode_v4 .publcode_popmenu_Card:focus-visible{
  outline:3px solid rgba(29,161,242,.45);
  outline-offset:3px;
}

/* =========================
   모바일 최적화
========================= */
@media (max-width: 720px){
  .publcode_v4 .publcode_popmenu_Hero__inner{
    grid-template-columns:1fr;
    text-align:left;
  }

  .publcode_v4 .publcode_popmenu_Hero__art{
    justify-content:center;
  }

  .publcode_v4 .publcode_popmenu_Card{
    grid-template-columns:74px 1fr 22px;
    min-height:96px;
    border-radius:22px;
  }

  .publcode_v4 .publcode_popmenu_Card__icon{
    width:64px;
    height:64px;
    border-radius:20px;
  }

  .publcode_v4 .publcode_popmenu_Card__title,
  .publcode_v4 .publcode_popmenu_Card__desc{
    white-space:normal; /* 모바일 줄바꿈 허용 */
  }

} /* ✅ @media 닫힘 추가 */




  /* 팝업내용 배경 - pop.share_v4_share.asp */
  .publcode_v4 .point_wrap{
    background:#f3f3f3 !important;
  }
.publcode_v4 .content_ul li .num2 .setup_btn {
    left: 0;
    position: relative;
    top: 110px;
    margin-left: 0px;
    width: 100%;
    display: flex;
    justify-content: flex-start;
}

.publcode_v4 .content_ul li .num2 .setup_btn span.freetag {
    border: 1px solid #f3f3f3;
    padding: 2px 5px;
    margin-right: 10px;
}

.publcode_v4 .content_ul li .num2 .thumb_box {
    display: flex;
    align-items: center;
}

.publcode_v4 .content_ul li .num2 .thumb_box .thumb {
	display: flex;
    justify-content: center;
    flex-direction: column;
}

.publcode_v4 .content_ul li .num2 .thumb {
overflow: hidden;
    position: relative;
    width: 30%;
    height: 30%;
    padding: 5px;
    display: flex;
    background: #f8f9fa;
    box-sizing: border-box;
    flex-wrap: wrap;
}