/* ==========================================================================
   속초교회 공통 스타일
   규칙: max-width 미디어쿼리만 사용.
   [1] 기본 (1681px 이상) → [2] @media(max-width:1680px) → [3] @media(max-width:750px)
   레이아웃: .sk_frame 최대 1680px(좌우 25px 여백 포함), .sk_inner 1090px
   ========================================================================== */

/* ===== [1] 기본 (1681px 이상) ===== */

:root {
    --sk-blue: #2d6ff7;
    --sk-blue-dark: #1d54c8;
    --sk-text: #1b1b1b;
    --sk-gray: #767c86;
    --sk-line: #e5e7eb;
    --sk-dark: #15181d;
    --sk-hd-h: 80px;
}

html, body { background: #fff; }
body { font-family: 'Pretendard Variable', 'Pretendard', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; color: var(--sk-text); }
img { max-width: 100%; height: auto; }
br.mo { display: none; } /* 모바일 전용 줄바꿈 (≤750에서 노출) */
br.pc { display: inline; } /* PC 전용 줄바꿈 (≤750에서 숨김) */

.sk_frame { max-width: 1680px; margin: 0 auto; padding-left: 25px; padding-right: 25px; }
/* 100%폭 섹션(배경 풀블리드) 안에서 가운데 정렬되는 1090 컨텐츠 영역. 좌우 25px 여백 포함(box-sizing:border-box 전역) */
.sk_inner { max-width: 1140px; margin: 0 auto; padding-left: 25px; padding-right: 25px; }

#skip_to_container a { z-index: 100000; position: absolute; top: 0; left: 0; width: 1px; height: 1px; font-size: 0; line-height: 0; overflow: hidden; }
#skip_to_container a:focus, #skip_to_container a:active { width: 100%; height: 75px; background: #21272e; color: #fff; font-size: 20px; font-weight: 700; text-align: center; line-height: 75px; }

/* ----- 헤더 ----- */
#sk_hd { position: relative; z-index: 1000; background: #fff; }
/* z-index: 메가메뉴 열림 시 닫기 레이어(#sk_mega_bg 890)·패널(900) 위에 두어 1차 메뉴 클릭 가능 */
.sk_hd_in { position: relative; z-index: 910; display: flex; align-items: center; height: var(--sk-hd-h); gap: 30px; }

#sk_logo { flex: 0 0 auto; margin: 0; }
#sk_logo a { display: flex; align-items: center; gap: 20px; text-decoration: none; color: var(--sk-text); }
#sk_logo img { width: auto; height: 42px; } /* 로고 이미지에 교회명 텍스트 포함 */

#sk_gnb { flex: 1 1 auto; }
#sk_gnb > ul { display: flex; justify-content: center; gap: 0; margin: 0; padding: 0; list-style: none; }
/* 각 1차 메뉴 = 고정폭 슬롯 (2차 드롭다운이 겹치지 않고 1차 아래 정렬되도록) */
#sk_gnb .sk_gnb_li { position: relative; width: 140px; text-align: center; } /* 1차메뉴 슬롯 폭 = 메뉴 간 간격. 152 → 140 으로 축소(2026-08-11) */
.sk_gnb_1a { position: relative; display: inline-block; padding: 0 14px; line-height: var(--sk-hd-h); font-size: 18px; font-weight: 600; color: var(--sk-text); text-decoration: none; }
.sk_gnb_1a:hover, .sk_gnb_1a:focus { color: var(--sk-blue); }
/* active/hover 밑줄 — 1차 a의 폭과 동일 (left:0 right:0) */
.sk_gnb_1a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--sk-blue); opacity: 0; transition: opacity .15s; }
#sk_gnb .sk_gnb_li.sk_on .sk_gnb_1a::after, #sk_gnb .sk_gnb_li.sk_hover .sk_gnb_1a::after { opacity: 1; }
#sk_gnb .sk_gnb_li.sk_on > .sk_gnb_1a { color: var(--sk-blue); }
/* 100주년 기념(code 60): 상시 파랑 글자만(밑줄 없음) */
#sk_gnb .sk_gnb_li[data-code="60"] > .sk_gnb_1a { color: var(--sk-blue); }
#sk_gnb .sk_gnb_li[data-code="60"] .sk_gnb_1a::after { display: none; }

.sk_hd_util { flex: 0 0 auto; display: flex; align-items: center; gap: 20px; }
/* 로그인 / 관리자 / 새가족 안내 — 동일한 텍스트 링크 스타일 (#000) */
.sk_hd_util .sk_util_login, .sk_hd_util .sk_util_admin, .sk_hd_util .sk_util_mypage, .sk_util_newcomer { font-size: 15px; font-weight: 500; color: #000; text-decoration: none; }
.sk_hd_util .sk_util_login:hover, .sk_hd_util .sk_util_admin:hover, .sk_hd_util .sk_util_mypage:hover, .sk_util_newcomer:hover { color: var(--sk-blue); }

/* 삼선 버튼 — 열리면 X로 전환 (CSS 애니메이션) */
.sk_menu_btn { position: relative; display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; padding: 8px; border: 0; background: none; cursor: pointer; }
.sk_menu_btn span { display: block; height: 2px; background: var(--sk-text); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; transform-origin: center; }
body.sk_mega_open .sk_menu_btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.sk_mega_open .sk_menu_btn span:nth-child(2) { opacity: 0; }
body.sk_mega_open .sk_menu_btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== PC 메가메뉴: 각 1차 메뉴 아래로 2차 드롭다운 (헤더와 같은 세로 라인 정렬) ===== */
.sk_gnb_drop { display: none; position: absolute; top: 100%; left: 0; width: 140px; z-index: 920; padding-top: 34px; }
body.sk_mega_open .sk_gnb_li .sk_gnb_drop { display: block; }
.sk_gnb_drop ul { margin: 0; padding: 0; list-style: none; }
.sk_gnb_drop li { margin-bottom: 4px; }
.sk_gnb_drop li a { display: block; padding: 6px 14px; font-size: 16px; line-height: 1.4; color: #4b5563; white-space: nowrap; text-decoration: none; }
.sk_gnb_drop li a:hover, .sk_gnb_drop li a:focus, .sk_gnb_drop li a.sk_on { color: var(--sk-blue); font-weight: 600; } /* 호버 + 현재 2차뎁스 active */

/* 메가메뉴 배경 패널 + 우측 배너 */
#sk_gnb_panel { display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 900; min-height: 360px; background: rgba(255,255,255,0.95); border-bottom: 1px solid var(--sk-line); box-shadow: 0 18px 30px rgba(0,0,0,.08); border-top: 1px solid #eee;}
body.sk_mega_open #sk_gnb_panel { display: block; }
#sk_gnb_panel .sk_frame { position: relative; height: 100%; }
.sk_gnb_banner { position: absolute; top: 40px; right: 25px; display: block; width: 368px; }
.sk_gnb_banner img { display: block; width: 368px; height: 207px; object-fit: cover; border: 1px solid var(--sk-line); border-radius: 8px; } /* 메가메뉴 패널과 배너 경계 구분용 1px 라인 (2026-09-17) */

/* 바깥 클릭으로 닫기용 투명 레이어 (PC/모바일 공용) */
#sk_mega_bg { display: none; position: fixed; inset: 0; z-index: 890; background: transparent; }
body.sk_mega_open #sk_mega_bg { display: block; }

/* ===== 모바일 전용 전체화면 메뉴 (#sk_mega) — PC에서는 숨김 ===== */
#sk_mega { display: none; position: fixed; inset: 0; z-index: 1050; overflow-y: auto; background: #fff; }
.sk_mega_in { display: flex; flex-direction: column; padding: 70px 16px 40px; }
.sk_mega_member { display: flex; justify-content: center; gap: 10px; margin-bottom: 28px; }
.sk_mega_member a { display: inline-block; min-width: 42vw; padding: 2vw 0; border-radius: 50px; text-align: center; font-size: 17px; text-decoration: none; } /* 모바일 메뉴 버튼: vw로 길다랗게 */
.sk_mega_join { background: #eef0f3; color: #555; }
.sk_mega_login_btn { background: var(--sk-blue); color: #fff; font-weight: 600; }
.sk_mega_cols { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.sk_mega_col { padding: 22px 0; border-top: 1px solid var(--sk-line); text-align: center; }
.sk_mega_col:first-child { border-top: 0; } /* 첫 그룹은 상단 구분선 없음 */
.sk_mega_d1 { display: block; margin-bottom: 14px; font-size: 25px; font-weight: 500; color: var(--sk-text); text-decoration: none; }
.sk_mega_col_single .sk_mega_d1 { color: var(--sk-blue); }
.sk_mega_d2 { margin: 0; padding: 0; list-style: none; }
.sk_mega_d2 li { margin: 0 0 12px; }
.sk_mega_d2 a { font-size: 20px; color: #4b5563; text-decoration: none; }
.sk_mega_d2 a:hover, .sk_mega_d2 a.sk_on { color: var(--sk-blue); } /* 현재 화면 2뎁스 active = 파랑(호버색) */
.sk_mega_banner { margin-top: 26px; text-align: center; }
.sk_mega_banner img { max-width: 320px; border: 1px solid var(--sk-line); border-radius: 8px; } /* 메가메뉴와 배너 경계 구분용 1px 라인 (2026-09-17) */
.sk_mega_close { position: absolute; top: 18px; right: 16px; width: 36px; height: 36px; border: 0; background: none; cursor: pointer; }
.sk_mega_close span { position: absolute; top: 50%; left: 4px; right: 4px; height: 2px; background: var(--sk-text); }
.sk_mega_close span:first-child { transform: rotate(45deg); }
.sk_mega_close span:last-child { transform: rotate(-45deg); }

/* ----- 플로팅 퀵메뉴 ----- */
#sk_quick { position: fixed; right: 24px; top: 30%; z-index: 800; }
.sk_quick_toggle { display: none; }
.sk_quick_box { width: 118px; }
.sk_quick_menu { margin: 0 0 30px; padding: 16px 0; list-style: none; background: rgba(69,69,69,.7); border-radius: 60px; }
.sk_quick_menu li:last-child { border-bottom: 0; }
.sk_quick_menu a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 10px; min-height: 92px; color: #fff; font-size: 18px; line-height: 1.3; text-align: center; text-decoration: none; }
.sk_quick_menu a img { display: block; width: auto; }
.sk_quick_menu a:hover { color: #cfe0ff; }
#sk_top_btn { display: flex; align-items: center; justify-content: center; width: 118px; height: 118px; margin: 0; border: 1px solid #cfcfcf; border-radius: 50%; background: #fff; color: #1b1b1b; cursor: pointer; }
#sk_top_btn:hover { background: #f5f5f5; }
#sk_top_btn svg { width: 38px; height: 38px; fill: currentColor; }

/* ----- bbs(게시판/회원/컨텐츠) 영역 보정: default.css 고정폭 가변화 ----- */
#hd, #wrapper, #ft { min-width: 0; } /* default.css:48 의 min-width:1200px 해제 (반응형 핵심) */
#wrapper { width: auto; }
#container_wr { float: none; width: auto; max-width: 1680px; margin: 0 auto; padding: 0 25px; }
#container { float: none; width: 100% !important; min-height: unset; margin: 0; } /* default.css의 min-height:500px 해제 — 짧은 콘텐츠에서 푸터가 내려가 사진이 안 붙는 문제 방지 */
/* 메인 페이지: #container_wr 폭 제한 해제 → 각 섹션이 #wrapper(브라우저) 전폭. 내부 컨텐츠만 .sk_frame(1680)/.sk_inner(1090)로 가운데 정렬 */
#container_wr.sk_main_wr { max-width: none; padding: 0; }
#container_title { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; } /* 제목은 서브비주얼이 표시 */
#aside { display: none; }
.tbl_wrap { overflow-x: auto; }

/* ----- 푸터 ----- */
#sk_ft { background: #f5f5f5; color: #000; }
.sk_ft_in { padding-top: 70px; padding-bottom: 70px; }
/* 1줄: 우측 정렬 링크 */
.sk_ft_links { display: flex; justify-content: flex-end; gap: 26px; }
.sk_ft_links a { font-size: 14px; font-weight: 500; color: #000; text-decoration: none; }
.sk_ft_links a:hover { color: var(--sk-blue); }
/* 2줄: 구분선 */
.sk_ft_line { height: 2px; margin: 14px 0 0; background: #000; }
/* 3줄: 로고+교회명 / 주소 / 유튜브 */
.sk_ft_main { display: flex; align-items: center; gap: 30px; padding: 10px 0 14px; }
.sk_ft_logo { display: flex; align-items: center; gap: 12px; margin: 0; }
.sk_ft_logo img { height: 42px; width: auto; } /* 로고 이미지에 교회명 텍스트 포함(헤더 로고와 동일 크기) */
.sk_ft_addr { margin: 0; font-size: 20px; color: #000; font-weight:300; letter-spacing:-0.5px;}
.sk_ft_info { display: flex; flex-direction: column; gap: 5px; } /* 주소 / 전화·팩스 / 온라인 헌금계좌 */
.sk_ft_tel, .sk_ft_account { margin: 0; font-size: 15px; color: #333; font-weight: 300; letter-spacing: -0.3px; }
.sk_ft_youtube { margin-left: auto; display: inline-flex; align-items: center; }
.sk_ft_youtube img { width: 23px; height: auto; display: block; }
.sk_ft_youtube:hover { opacity: .7; }
/* 4줄: 카피라이트 */
.sk_ft_copy { margin: 0; font-size: 14px; color: #000; font-weight:500;}

/* ----- 유튜브 모달 ----- */
#sk_video_modal { display: none; position: fixed; inset: 0; z-index: 1100; }
#sk_video_modal.sk_open { display: block; }
#sk_video_modal .sk_modal_bg { position: absolute; inset: 0; background: rgba(0,0,0,.75); }
#sk_video_modal .sk_modal_body { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: min(960px, calc(100vw - 50px)); }
.sk_video_frame { position: relative; padding-top: 56.25%; background: #000; }
.sk_video_frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sk_modal_close { position: absolute; top: -44px; right: 0; width: 34px; height: 34px; border: 0; background: none; cursor: pointer; }
.sk_modal_close span { position: absolute; top: 50%; left: 2px; right: 2px; height: 2px; background: #fff; }
.sk_modal_close span:first-child { transform: rotate(45deg); }
.sk_modal_close span:last-child { transform: rotate(-45deg); }

/* ===== [2] 중단 (1680px 이하) — PC(1680) 기준 vw 비례 축소 (1px ≒ 0.0595vw, 1680에서 PC와 동일) ===== */
@media (max-width: 1680px) {
    /* 컨텐츠 폭도 화면폭에 비례 (.sk_inner 1140→67.857vw) */
    .sk_frame { max-width: none; }
    .sk_inner { max-width: 67.857vw; padding-left: 1.488vw; padding-right: 1.488vw; }
    /* 서브 #container_wr 좌우 여백도 vw화 (메인은 .sk_main_wr이 우선, 모바일은 [3]에서 재정의) */
    #container_wr { padding: 0 1.488vw; }

    /* 헤더 (1차메뉴 6슬롯 overflow 방지 위해 폭도 vw) */
    :root { --sk-hd-h: 4.762vw; }
    .sk_hd_in { gap: 1.786vw; }
    #sk_logo a { gap: 1.190vw; }
    #sk_logo img { height: 2.5vw; }
    #sk_gnb .sk_gnb_li { width: 8.333vw; } /* 1680px 기준 140px */
    .sk_gnb_1a { padding: 0 0.833vw; font-size: 1.071vw; }
    .sk_hd_util { gap: 1.190vw; }
    .sk_hd_util .sk_util_login, .sk_hd_util .sk_util_admin, .sk_hd_util .sk_util_mypage, .sk_util_newcomer { font-size: 0.893vw; }

    /* 메가메뉴 (PC 드롭다운 + 우측 배너) */
    .sk_gnb_drop { width: 8.333vw; padding-top: 2.024vw; }
    .sk_gnb_drop li a { padding: 0.357vw 0.833vw; font-size: 0.952vw; }
    #sk_gnb_panel { min-height: 21.429vw; }
    .sk_gnb_banner { top: 2.381vw; right: 1.488vw; width: 21.905vw; }
    .sk_gnb_banner img { width: 21.905vw; height: 12.321vw; }

    /* 플로팅 퀵메뉴 */
    #sk_quick { right: 1.429vw; }
    .sk_quick_box { width: 7.024vw; }
    .sk_quick_menu { margin: 0 0 1.786vw; padding: 0.952vw 0; }
    .sk_quick_menu a { gap: 0.536vw; padding: 0.595vw; min-height: 5.476vw; font-size: 1.071vw; }
    /* 아이콘 자연너비 비례(1680=자연px, 이하 PC와 동일 비율 축소): img01(35)/img02(36)/img03(59)/img04(53) */
    .sk_quick_menu a img { width: 2.083vw; }
    .sk_quick_menu li:nth-child(2) a img { width: 2.143vw; }
    .sk_quick_menu li:nth-child(3) a img { width: 3.512vw; }
    .sk_quick_menu li:nth-child(4) a img { width: 3.155vw; }
    #sk_top_btn { width: 7.024vw; height: 7.024vw; }
    #sk_top_btn svg { width: 2.262vw; height: 2.262vw; }

    /* 푸터 */
    .sk_ft_in { padding-top: 4.167vw; padding-bottom: 4.167vw; }
    .sk_ft_links { gap: 1.548vw; }
    .sk_ft_links a { font-size: 0.833vw; }
    .sk_ft_line { margin-top: 0.833vw; }
    .sk_ft_main { gap: 1.786vw; padding: 0.595vw 0 0.833vw; }
    .sk_ft_logo img { height: 2.5vw; }
    .sk_ft_addr { font-size: 1.190vw; }
    .sk_ft_tel, .sk_ft_account { font-size: 0.893vw; }
    .sk_ft_youtube img { width: 1.369vw; }
    .sk_ft_copy { font-size: 0.833vw; }
}

/* ===== [3] 모바일 (750px 이하) ===== */
@media (max-width: 750px) {
    :root { --sk-hd-h: 60px; }
    br.mo { display: inline; } /* 모바일 전용 줄바꿈 노출 */
    br.pc { display: none; } /* PC 전용 줄바꿈 숨김 */

    .sk_frame { padding-left: 16px; padding-right: 16px; }
    .sk_inner { max-width: none; padding-left: 16px; padding-right: 16px; } /* [2] vw 폭 리셋 */

    /* 헤더 */
    .sk_hd_in { gap: 12px; }
    #sk_logo a { gap: 10px; } /* base 20px → 모바일 축소 */
    #sk_logo img { width: auto; height: 34px; } /* 로고(텍스트 포함) 모바일 축소 */
    #sk_gnb { display: none; } /* 1차메뉴는 전체메뉴(삼선)로 대체 */
    .sk_hd_util { margin-left: auto; gap: 12px; }
    .sk_hd_util .sk_util_login, .sk_hd_util .sk_util_admin, .sk_hd_util .sk_util_mypage, .sk_util_newcomer { display: none; } /* 좁은 폭 + 긴 교회명 → 메가메뉴/푸터에서 제공 */

    /* 메가메뉴: 모바일은 전체화면 #sk_mega 사용, PC 드롭다운/패널은 숨김 */
    /* 열림 시 배경(body) 완전 고정 → 메뉴 뒤 컨텐츠 스크롤 차단(JS가 top으로 현재 위치 보존) */
    body.sk_mega_open { overflow: hidden; position: fixed; left: 0; right: 0; width: 100%; }
    #sk_mega { overscroll-behavior: contain; } /* 메뉴 내부 스크롤이 배경으로 체이닝되지 않게 */
    #sk_gnb_panel { display: none !important; } /* PC 배경 패널 숨김 */
    body.sk_mega_open #sk_mega { display: block; } /* 모바일 전체화면 메뉴 노출 */
    /* 펼침 시 헤더(로고+삼선버튼)를 메뉴 위에 유지 → '하나의 삼선버튼'이 X로 애니메이션 + 헤더 하단 회색 라인 */
    body.sk_mega_open #sk_hd { position: fixed; top: 0; left: 0; right: 0; z-index: 1100; border-bottom: 1px solid var(--sk-line); }
    .sk_mega_in { padding-top: calc(var(--sk-hd-h) + 24px); } /* 헤더 아래부터 메뉴 시작 */

    /* 퀵메뉴: 우하단 — 토글(∧/∨) 위, 위로가기 아래. 둘 다 56px·같은 라인(가운데 축) */
    #sk_quick { top: auto; right: 16px; bottom: 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
    .sk_quick_toggle { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border: 0; border-radius: 50%; background: var(--sk-blue); cursor: pointer; } /* 그림자 제거 */
    .sk_quick_toggle .sk_quick_chev { width: 30px; height: 30px; fill: none; stroke: #fff; transition: transform .25s; } /* ∧, 열리면 180° → ∨ (선 길게) */
    #sk_quick.sk_open .sk_quick_toggle .sk_quick_chev { transform: rotate(180deg); }
    /* 메뉴: 토글과 같은 폭(56). 닫힘=토글로 스르륵+fadeOut / 열림=토글에서 스르륵+fadeIn */
    .sk_quick_box { position: absolute; right: 0; bottom: calc(100% + 10px); width: 56px; opacity: 0; visibility: hidden; transform: translateY(16px) scale(.9); transform-origin: bottom center; transition: opacity .25s ease, transform .25s ease, visibility .25s; }
    #sk_quick.sk_open .sk_quick_box { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
    .sk_quick_menu { padding: 10px 0; }
    .sk_quick_menu a { min-height: 0; gap: 6px; font-size: 10px; padding: 8px 3px; }
    /* 반응형과 동일 비율 유지: 이미지별 개별 폭(모바일 박스 56px 기준으로 환산) */
    .sk_quick_menu a img { width: 17px; }
    .sk_quick_menu li:nth-child(2) a img { width: 17px; }
    .sk_quick_menu li:nth-child(3) a img { width: 28px; }
    .sk_quick_menu li:nth-child(4) a img { width: 25px; }
    #sk_top_btn { width: 56px; height: 56px; } /* 토글과 동일 크기·같은 라인 */
    #sk_top_btn svg { width: 26px; height: 26px; }

    /* bbs 보정 */
    #container_wr { padding: 30px 16px 60px; }

    /* 푸터 */
    .sk_ft_in { padding-top: 10vw; padding-bottom: 42vw; }
    .sk_ft_links { justify-content: flex-end; gap: 16px; } /* 모바일도 우측 정렬 */
    .sk_ft_links a { font-size: 13px; }
    .sk_ft_line { margin-top: 10px; } /* [2] vw 리셋 */
    .sk_ft_main { flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px 0 12px; }
    .sk_ft_logo img { height: 34px; } /* [2] vw 리셋 */
    .sk_ft_addr { font-size: 14px; line-height: 1.6; }
    .sk_ft_tel, .sk_ft_account { font-size: 13px; line-height: 1.5; }
    .sk_ft_youtube { display: none; } /* 모바일에선 유튜브 아이콘 감춤 */
    .sk_ft_copy { font-size: clamp(9px, 2.667vw, 10px); } /* 10px@375, 상한 clamp */
}

/* ===== 메인 팝업레이어 (#1230 고객요청, 2026-08-28) =====
   bbs/newwin.inc.php 기본 마크업을 재스타일. 관리자 등록값(left/top/width/height)과
   무관하게 화면 중앙 모달로 고정한다 — 운영 담당자가 위치·크기 숫자를 몰라도 안 깨지게.
   그래서 인라인 style 을 !important 로 덮는다. 배경 딤(.sk-pop-dim)은 sokcho-ui.js 가 만든다.
   이미지 원본 1000px 폭 기준 → 표시 최대 520px(레티나 2배). */
#hd_pop { position: relative; z-index: 99000; height: 0; }
.sk-pop-dim { position: fixed; inset: 0; z-index: 98990; background: rgba(15, 18, 24, .55); touch-action: none; /* 딤에서 시작한 터치가 배경 페이지를 스크롤하지 않게 (#1318) */ }
.hd_pops {
    position: fixed !important; top: 50% !important; left: 50% !important;
    transform: translate(-50%, -50%); z-index: 99000;
    width: min(520px, 100vw - 28px); max-height: calc(100vh - 40px);
    display: flex; flex-direction: column;
    border: 2px solid #fff; border-radius: 14px; overflow: hidden; background: #fff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
    touch-action: none; /* 드래그 이동(sokcho-ui.js)용 — 팝업 위 터치가 페이지 스크롤로 새지 않게 */
    -webkit-user-select: none; user-select: none; /* 드래그 중 텍스트 선택 방지 (#1299 — 선택 드래그가 확장프로그램 UI 를 부르는 것도 차단) */
}
.hd_pops.sk-dragging, .hd_pops.sk-dragging .hd_pops_con { cursor: grabbing; }
/* touch-action 은 터치된 요소에서 '가장 가까운 스크롤 컨테이너'까지만 보고 결정된다 — overflow:auto 인
   이 요소가 기본값(auto)이면 조상 .hd_pops 의 none 이 무시되고, 넘칠 내용이 없으면 팬 제스처가
   배경 페이지 스크롤로 체이닝된다(#1318 모바일 증상). 그래서 여기에도 none 을 준다.
   내용이 넘치는 예외 상황은 데스크톱 휠로만 스크롤 가능(팝업 이미지는 규격상 화면 안에 들어옴) */
.hd_pops_con { width: auto !important; height: auto !important; overflow: auto; cursor: grab; touch-action: none; }
.hd_pops_con img { display: block; width: 100%; height: auto; -webkit-user-drag: none; /* 이미지 네이티브 드래그 차단 (#1299) */ }
/* 구분선은 왼쪽 문구 버튼에만 — footer 전체에 주면 검정 닫기 버튼 위에 밝은 선(1~2px 뜬 틈)으로 보인다 */
.hd_pops_footer { display: flex; align-items: stretch; background: #fff; padding: 0; }
.hd_pops_footer button { appearance: none; border: 0; background: none; font: inherit; cursor: pointer; }
.hd_pops_footer .hd_pops_reject { flex: 1; text-align: left; padding: 13px 16px; font-size: 13.5px; color: #666e7a; background: #fff; border-top: 1px solid #e5e8ee; }
/* 닫기: default.css 의 .hd_pops_close(배경 #393939·absolute)를 전부 덮어야 한다 — 검정 배경 + 흰 글자로 대비 확보.
   흰색 윗선 2px(#1293 고객요청): 팝업 외곽 보더와 같은 선을 버튼 위에 얹는다.
   이미지 하단이 소수점 픽셀로 끝나며 흰 배경이 비치던 틈도 이 흰 선에 흡수된다(이전 margin-top -1px 겹침 불필요) */
.hd_pops_footer .hd_pops_close { position: static; border-top: 2px solid #fff; padding: 13px 18px; font-size: 14px; font-weight: 600; color: #fff; background: #1b1b1b; }
.hd_pops_footer .hd_pops_close .fa { margin-left: 4px; }
@media (max-width: 640px) {
    .hd_pops_footer .hd_pops_reject { font-size: 12.5px; padding: 12px 14px; }
    .hd_pops_footer .hd_pops_close { font-size: 13px; padding: 12px 16px; }
}
