@charset "utf-8";
/* cocPIC 갤러리 스킨 모양 */

/* ---------- 공통: 테두리 없음 (테마의 입력칸·이미지 테두리까지 이김) ---------- */
.cp-ui, .cp-ui *:not(#cp_x1):not(#cp_x2), .cp-ui *::before, .cp-ui *::after {
    box-sizing: border-box;
    border: 0 none !important;
    box-shadow: none !important;
}
.cp-ui input:not(#cp_x1), .cp-ui select:not(#cp_x1), .cp-ui textarea:not(#cp_x1), .cp-ui button:not(#cp_x1) { outline: none !important; }

/* ---------- 목록 ---------- */
#cp_wrap {
    --cp-cols: var(--cp-pc, 3);
    --cp-side: 72px;      /* 오른쪽 아이콘 줄 폭 */
    --cp-key: 60px;       /* 분류 아이콘 크기 60×60 */
    --cp-gap-g: 0px;      /* 분류 사이 여백 */
    --cp-gap-s: 0px;      /* 사진과 아이콘 줄 사이 */
    --cp-accent: currentColor;
    width: 100%;
    max-width: var(--cp-tw, 900px);   /* 게시판 설정의 테이블 가로 폭 */
    margin: 0 auto;
    color: inherit;
}
@media (max-width: 768px) {
    #cp_wrap { --cp-cols: var(--cp-m, 3); --cp-side: 68px; --cp-key: 60px; }   /* 휴대폰도 아이콘 60×60 */
}

.cp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.cp-tools { display: flex; gap: 2px; margin-left: auto; }
/* 사진 올리기·설정: 아이콘만, 배경 없음 */
.cp-ui .cp-tool {
    width: 34px; height: 34px; margin: 0; padding: 0; background: none !important;
    font-size: 16px; line-height: 34px; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.cp-ui .cp-tool:hover, .cp-ui .cp-tool:focus-visible { opacity: 1; }

.cp-ui .cp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 30px; padding: 0 12px; margin: 0;
    font: inherit; font-size: 13px; line-height: 1; cursor: pointer;
}
.cp-ui .cp-btn:hover, .cp-ui .cp-btn:focus-visible { background: #e6e6e6; }
.cp-ui .cp-btn.cp-primary:hover, .cp-ui .cp-btn.cp-primary:focus-visible { background: #333; }
.cp-ui .cp-btn.cp-danger { color: #d0021b; }
.cp-ui .cp-btn[disabled] { opacity: .5; cursor: default; }
.cp-ui .cp-ibtn { width: 34px; padding: 0; }

.cp-group { display: flex; align-items: stretch; gap: var(--cp-gap-s); }
.cp-group + .cp-group { margin-top: var(--cp-gap-g); }
.cp-tile.is-pgoff { display: none !important; }
/* 분류 쪽 번호 */
/* 정렬 모드 */
.cp-ui .cp-tool.is-on { opacity: 1; }
#cp_wrap.is-sort .cp-tile { cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; }
#cp_wrap.is-sort .cp-tile img { -webkit-user-drag: none; pointer-events: none; }
#cp_wrap.is-sort .cp-key { cursor: default; }
#cp_wrap.is-sort .cp-tile.is-dragging { opacity: .25; }
#cp_wrap.is-sort .cp-tile.is-merge::after {   /* 가운데에 놓으면 합치기 */
    content: '+'; position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, .45); color: #fff; font-size: 34px; font-weight: 300;
}
.cp-ghostwrap { position: fixed; left: 0; top: 0; z-index: 2147483000; pointer-events: none; }
.cp-ghostwrap .cp-ghost { position: absolute; left: 0; top: 0; display: block; overflow: hidden; opacity: .85; pointer-events: none; will-change: transform; background: var(--card-bg-color, #ddd); }
#cp_wrap.is-sort .cp-tile.is-merging { opacity: .5; transition: opacity .2s; }   /* 합치는 중 */
.cp-ghostwrap .cp-ghost img { display: block; width: 100%; height: 100%; object-fit: cover; }
html.cp-dragging, html.cp-dragging * { cursor: grabbing !important; }
.cp-body { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.cp-body:not(.is-open) { aspect-ratio: var(--cp-cols) / var(--cp-lr, 1); }   /* 접힘: 설정 '리스트' 줄 수만 */
.cp-body:not(.is-open) .cp-tile.is-coloff { visibility: hidden; }   /* 접힌 줄 아래가 1px 비치지 않게 */
.cp-grid { display: grid; grid-template-columns: repeat(var(--cp-cols), minmax(0, 1fr)); gap: 0; }

.cp-tile { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; -webkit-tap-highlight-color: transparent; }
.cp-tile img { display: block !important; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover; margin: 0 !important; }
.cp-tile:focus-visible img { opacity: .8; }
.cp-src {
    /* 그림자가 칸에 잘리지 않게 안쪽 여백 10px, 그만큼 바깥으로 넓혀 글자 자리는 그대로(오른쪽 5px·아래 4px) */
    position: absolute; right: -5px; bottom: -6px; padding: 10px; max-width: calc(100% + 10px); box-sizing: border-box;
    font-size: 11px; line-height: 1.2;
    /* 밝은·어두운 그림 모두에서 보이게: 글자 = 홈페이지 밝은 바탕색, 둘레 번짐 = 제목 글자색(넓게 4겹) */
    color: color-mix(in srgb, var(--container-bg-color, #fff) 90%, transparent);
    text-shadow: 0 0 1px var(--title-font-color, #333), 0 0 2px var(--title-font-color, #333),
                 0 0 5px color-mix(in srgb, var(--title-font-color, #333) 75%, transparent),
                 0 0 10px color-mix(in srgb, var(--title-font-color, #333) 45%, transparent);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
.cp-none, .cp-empty { grid-column: 1 / -1; margin: 0; padding: 0 12px; display: flex; align-items: center; min-height: 60px; font-size: 13px; color: #999; }
.cp-empty { justify-content: center; padding: 60px 0; }

/* 오른쪽 아이콘 줄과 점선 */
.cp-side { flex: 0 0 var(--cp-side); width: var(--cp-side); display: flex; flex-direction: column; align-items: center; padding-top: 6px; }
.cp-ui .cp-key {
    appearance: none; -webkit-appearance: none; background: none; margin: 0; padding: 4px 2px;
    width: 100%; min-height: var(--cp-key); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: inherit; font: inherit; cursor: pointer; border-radius: 6px; -webkit-tap-highlight-color: transparent;
}
.cp-ui .cp-key:focus-visible { background: rgba(0, 0, 0, .06); }
.cp-key-img { display: block; width: var(--cp-key) !important; height: var(--cp-key) !important; max-width: none !important; object-fit: contain; margin: 0 !important; }
/* 분류 이름: 오른쪽으로 90도 돌림, 9pt, 투명도 70% */
.cp-key-txt {
    writing-mode: vertical-rl; text-orientation: sideways;
    font-size: 9pt; font-weight: 400; line-height: 1.25; opacity: .7;
    white-space: nowrap; max-height: 220px; overflow: hidden; text-overflow: ellipsis;
}
.cp-key:hover .cp-key-img { opacity: .7; }
.cp-key:hover .cp-key-txt { opacity: 1; }
.cp-side { position: relative; }
/* 세로선: 분류와 분류 사이를 늘 실선으로 이음 */
.cp-line {
    position: relative; flex: 1 1 auto; width: 1px; min-height: 0; margin: 4px 0 0;
    --cp-lc: color-mix(in srgb, currentColor 45%, transparent);
    background: var(--cp-lc);   /* 처음부터 실선 */
    transition: opacity .25s;
}
.cp-group + .cp-group .cp-side::before {   /* 위 분류에서 이 분류 아이콘까지(분류 사이 여백 포함) */
    content: ''; position: absolute; left: 50%; top: calc(-1 * var(--cp-gap-g)); width: 1px; height: calc(6px + var(--cp-gap-g));
    background: currentColor; opacity: .45;
}
.cp-group:last-child:not(.is-open) .cp-line { opacity: 0; }   /* 마지막 분류 아래로는 잇지 않음 */
.cp-group.is-open .cp-line { background: var(--cp-lc); }
/* 쪽 동그라미: 세로선 위에 걸림, 지금 쪽은 채움 */
.cp-sdots { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cp-ui .cp-sdot {
    position: relative; width: 20px; height: 14px; margin: 0; padding: 0; background: none; color: inherit; cursor: pointer;
    opacity: 0; transform: translateY(-6px); transition: opacity .25s, transform .25s; transition-delay: calc(var(--i, 0) * 60ms + 120ms);
}
.cp-group.is-open .cp-sdot { opacity: 1; transform: none; }
.cp-ui .cp-sdot::before {   /* 다른 쪽: 작게 */
    content: ''; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%;
    background: currentColor; opacity: .55;
}
.cp-ui .cp-sdot.is-on::before {   /* 지금 쪽: ❊ */
    content: '\274A'; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 0; background: none;
    opacity: 1; font-size: 14px; line-height: 14px; text-align: center; font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Segoe UI Symbol', sans-serif;
}
.cp-ui .cp-sdot:not(.is-on):hover::before, .cp-ui .cp-sdot:not(.is-on):focus-visible::before { transform: scale(1.4); }
@media (prefers-reduced-motion: reduce) { .cp-ui .cp-sdot { transition: none; } }
.cp-nokey .cp-body { aspect-ratio: auto; }



/* ---------- 팝업 공통(업로드·수정·설정) ---------- */
.cp-dlg {
    position: fixed; inset: 0; z-index: 100010; display: flex; align-items: center; justify-content: center;
    padding: 16px; color: #222; font-size: 14px; line-height: 1.5;
}
.cp-dlg { background: rgba(0, 0, 0, 0); transition: background .26s ease; }
.cp-dlg.is-in { background: rgba(0, 0, 0, .45); }
.cp-panel { transform: translateY(100vh); transition: transform .26s cubic-bezier(.2, .8, .2, 1); }
.cp-dlg.is-in .cp-panel { transform: none; }
@media (prefers-reduced-motion: reduce) { .cp-dlg, .cp-panel { transition: none; } }
.cp-panel { width: 450px; max-width: 100%; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.cp-ph { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 16px 6px; min-height: 30px; }
.cp-ph h3 { margin: 0; font-size: 16px; font-weight: 700; }
.cp-pb { flex: 1 1 auto; overflow: auto; padding: 8px 16px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.cp-pf { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 12px 16px 16px; }
.cp-pf .cp-msg { margin-right: auto; }
.cp-msg { font-size: 12px; }
.cp-msg.is-err { color: #d0021b; }
.cp-hint { font-size: 12px; margin: 4px 0 0; }
.cp-lb { display: block; font-size: 12px; font-weight: 600; margin: 12px 0 6px; }
.cp-lb:first-child { margin-top: 4px; }
.cp-ui .cp-in, .cp-ui select.cp-in {
    display: block; width: 100%; height: 30px !important; margin: 0; padding: 0 10px !important;
    background: #f2f2f2 !important; color: #222; border-radius: 0 !important; font: inherit; font-size: 14px; line-height: 28px;
}
.cp-row { display: flex; gap: 8px; align-items: center; }
.cp-row > * { flex: 1 1 0; min-width: 0; }
.cp-row > .cp-btn { flex: 0 0 auto; }
.cp-check { display: inline-flex; align-items: center; font-size: 13px; cursor: pointer; margin-right: 14px; }
.cp-check input { width: 16px; height: 16px; margin: 0; }
@media (max-width: 768px) {
    .cp-dlg { padding: 0; align-items: flex-end; }
    .cp-panel { width: 100%; max-width: none; max-height: 92vh; max-height: 92dvh; border-radius: 0; }
    .cp-ui .cp-in, .cp-ui select.cp-in { font-size: 16px; }   /* 아이폰 입력 시 화면 확대 방지 */
    .cp-pf { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}

/* 업로드 미리보기 */
/* 파일 첨부: 누르거나 끌어 놓기 */
.cp-drop {
    display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 12px; padding: 20px 14px 18px;
    text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.cp-drop:hover, .cp-drop:focus-visible, .cp-drop.is-over { background: #ececec; color: #555; }
.cp-drop-ico { font-size: 28px; line-height: 1; margin-bottom: 4px; }
.cp-drop-txt { font-size: 14px; font-weight: 600; }
.cp-drop-hint { font-size: 11px; opacity: .85; line-height: 1.4; }
/* 분류 + 드롭다운 한 줄(드롭다운 폭 25%) */
.cp-carow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 4px 0 0; }
.cp-carow .cp-lb { margin: 0 !important; flex: 0 0 auto; }
.cp-ui .cp-carow select.cp-casel { width: 100px; min-width: 0; flex: 0 0 auto; }
.cp-prevs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.cp-prevs:empty { display: none; }
@media (max-width: 768px) { .cp-prevs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cp-card { position: relative; min-width: 0; }
.cp-card-img { position: relative; aspect-ratio: 1 / 1; overflow: hidden; }
.cp-card-img img { display: block !important; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover; }
.cp-card-meta { font-size: 11px; margin: 4px 0; line-height: 1.35; min-height: 15px; overflow-wrap: anywhere; }
.cp-card.is-err .cp-card-meta { color: #d0021b; }
.cp-card.is-done { opacity: .45; }
/* 미리보기 오른쪽 위: [교체] [삭제], 오른쪽 아래: 링크(배경 없음) */
.cp-card-acts { position: absolute; top: 4px; right: 4px; display: flex; gap: 4px; }
.cp-card-meta:empty { display: none; }
.cp-card-bot { position: absolute; right: 2px; bottom: 2px; z-index: 2; display: flex; }
.cp-ui .cp-card-link, .cp-ui .cp-card-ico {
    width: 28px; height: 28px; margin: 0; padding: 0;
    background: none !important; color: #fff; font-size: 13px; line-height: 28px; text-align: center; cursor: pointer;
    text-shadow: 0 0 3px rgba(0, 0, 0, .75), 0 0 1px rgba(0, 0, 0, .9); opacity: .7;
}
.cp-ui .cp-card-link:hover, .cp-ui .cp-card-link:focus-visible, .cp-ui .cp-card-link.is-on, .cp-ui .cp-card-ico:hover, .cp-ui .cp-card-ico:focus-visible { opacity: 1; }
.cp-ui .cp-card-btn {
    width: 26px; height: 26px; padding: 0; margin: 0;
    background: rgba(0, 0, 0, .55); color: #fff; border-radius: 50%; font-size: 12px; line-height: 26px; text-align: center; cursor: pointer;
}
.cp-url { margin-top: 6px; }
.cp-url[hidden], .cp-tile[hidden] { display: none !important; }
.cp-card .cp-in { height: 30px !important; font-size: 13px; }

/* 설정: 분류 아이콘 줄 */
.cp-cat { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.cp-cat + .cp-cat { margin-top: 2px; }
.cp-cat-ico { flex: 0 0 60px; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border-radius: 0; font-size: 11px; color: #aaa; overflow: hidden; }
.cp-cat-ico img { display: block !important; width: 60px !important; height: 60px !important; max-width: none !important; object-fit: contain; }
.cp-cat-name { flex: 1 1 auto; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }

/* 알림 한 줄 */
.cp-toast { position: fixed; left: 50%; bottom: 24px; z-index: 100020; transform: translateX(-50%); padding: 10px 16px; font-size: 13px; border-radius: 8px; pointer-events: none; transition: opacity .3s; }

/* ---------- 사진 보기 팝업 ---------- */
.cp-viewer {
    position: fixed; inset: 0; z-index: 100000; overflow: hidden;
    background: rgba(10, 10, 10, .7); color: #fff;   /* 배경 투명도 70% */
    touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
    overscroll-behavior: contain;
}
.cp-slot { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; will-change: transform; }
.cp-fig { display: flex; align-items: stretch; position: relative; }
.cp-zoom { transform-origin: 0 0; will-change: transform; }
.cp-zoom img { display: block !important; max-width: none !important; margin: 0 !important; -webkit-user-drag: none; pointer-events: none; background: rgba(128, 128, 128, .15); }
.cp-capcol { display: flex; flex-direction: column; align-items: center; justify-content: space-between; margin-left: 8px; min-height: 0; transition: opacity .2s; }
.cp-cap {
    writing-mode: vertical-rl; text-orientation: sideways;   /* 글자를 오른쪽으로 90도 돌림 */
    flex: 0 1 auto; min-height: 0; overflow: hidden;
    font-family: 'Pretendard', 'Pretendard Variable', -apple-system, sans-serif; font-weight: 300; font-size: 15px; line-height: 1.3;
    word-break: keep-all; transition: opacity .2s;
}
.cp-fig.is-zoomed .cp-capcol { opacity: 0; pointer-events: none; }
/* 휴대폰: 출처·링크는 파일 오른쪽 아래 안쪽에 가로로(리스트 출처와 같은 글자 모양) */
@media (max-width: 768px) {
    .cp-capcol { position: absolute; right: 6px; bottom: 4px; z-index: 2; flex-direction: row; align-items: center; gap: 4px; margin: 0; max-width: calc(100% - 12px); pointer-events: none; }
    .cp-cap {
        writing-mode: horizontal-tb; font-size: 11px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
        color: color-mix(in srgb, var(--container-bg-color, #fff) 90%, transparent);
        text-shadow: 0 0 1px var(--title-font-color, #333), 0 0 2px var(--title-font-color, #333),
                     0 0 5px color-mix(in srgb, var(--title-font-color, #333) 75%, transparent);
    }
    .cp-vlink { margin-top: 0; pointer-events: auto; color: color-mix(in srgb, var(--container-bg-color, #fff) 90%, transparent) !important; text-shadow: 0 0 2px var(--title-font-color, #333), 0 0 5px var(--title-font-color, #333); }
}
/* 링크 아이콘: 출처와 같은 줄, 사진 아래쪽 끝, 배경 없음 */
.cp-vlink {
    flex: 0 0 auto; margin-top: auto; width: 20px; height: 20px; line-height: 20px; text-align: center;   /* 출처가 없어도 늘 사진 아래 끝 */
    color: inherit !important; background: none !important; font-size: 15px; opacity: .8; text-decoration: none !important; transition: opacity .2s;
}
.cp-vlink:hover, .cp-vlink:focus-visible { opacity: 1; }
.cp-vacts { position: absolute; left: 0; top: 0; z-index: 4; display: flex; transition: opacity .15s; }
.cp-vacts.is-moving { opacity: 0; pointer-events: none; }
.cp-ui .cp-vacts .cp-vbtn { width: auto; height: 36px; padding: 0 10px; line-height: 36px; font-size: 17px; }
.cp-ui .cp-vacts .cp-vbtn:last-child { padding-right: 0; }   /* 닫기 아이콘 오른쪽 = 사진 오른쪽 끝 */
.cp-ui .cp-vbtn { width: 44px; height: 44px; margin: 0; padding: 0; background: none; color: inherit; font-size: 18px; line-height: 44px; cursor: pointer; opacity: .85; }
.cp-ui .cp-vbtn:hover, .cp-ui .cp-vbtn:focus-visible { opacity: 1; }

/* ---------- 빈 분류 + 칸(관리자만) ---------- */
.cp-ui .cp-add {
    display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; width: 100%; margin: 0; padding: 0; color: #fff; font: 300 44px/1 sans-serif; cursor: pointer;
}
.cp-ui .cp-add:hover, .cp-ui .cp-add:focus-visible { background: rgba(128, 128, 128, .45) !important; }

/* ---------- 칸 종류별 모양 ---------- */
.cp-badge {
    position: absolute; top: 5px; right: 5px; padding: 1px 7px; border-radius: 9px;
    background: rgba(0, 0, 0, .45); color: #fff; font-size: 11px; line-height: 17px; pointer-events: none;
}
.cp-play { position: absolute; left: 50%; top: 50%; width: 44px; height: 30px; margin: -15px 0 0 -22px; border-radius: 8px; background: rgba(225, 37, 27, .92); pointer-events: none; }
.cp-play::after { content: ''; position: absolute; left: 18px; top: 8px; border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent #fff; }
.cp-k-yt { background: #1a1a1a; }
.cp-mp3 { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.cp-note { font-size: 44px; line-height: 1; }
.cp-pdf { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 10%; }
.cp-tile .cp-pdf img { object-fit: contain !important; background: #fff; }
.cp-pdf b { font-size: 18px; font-weight: 600; color: #999; }

/* ---------- 업로드·수정 칸 추가 요소 ---------- */
.cp-card-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 26px; color: #fff; pointer-events: none; }
.cp-ck-pdf .cp-card-ph { color: #999; font-size: 18px; font-weight: 600; }
.cp-ck-pdf .cp-card-img img { object-fit: contain !important; background: #fff; }
.cp-ck-yt .cp-card-img { background: #1a1a1a; }
.cp-ui .cp-color { width: 26px; height: 26px; padding: 0; margin: 0; background: none; cursor: pointer; -webkit-appearance: none; appearance: none; }
.cp-ui .cp-color::-webkit-color-swatch-wrapper { padding: 0; }
.cp-ui .cp-color::-webkit-color-swatch { border: 0; border-radius: 50%; }
.cp-ui .cp-color::-moz-color-swatch { border: 0; border-radius: 50%; }
.cp-card.is-del { opacity: .35; }
.cp-card.is-del .cp-card-img::after { content: '삭제 예정'; position: absolute; left: 0; right: 0; bottom: 0; padding: 4px; text-align: center; background: rgba(208, 2, 27, .85); color: #fff; font-size: 11px; }
.cp-ui .cp-isrc[hidden], .cp-ui .cp-card-link[hidden], .cp-common[hidden], [hidden].cp-row, .cp-mode[hidden], .cp-pager[hidden] { display: none !important; }
.cp-checks { display: flex; flex-wrap: wrap; gap: 4px 0; }
.cp-common { display: grid; gap: 6px; margin-top: 8px; }
.cp-ytrow { margin-top: 8px; }
/* '파일 추가' 폭 = 미리보기 한 칸 폭(3열: 간격 12px×2, 휴대폰 2열) */

/* ---------- 보기 팝업: 재생 목록 + 재생 막대 ---------- */
.cp-media { display: flex; align-items: center; justify-content: center; }
.cp-mp {
    width: var(--cp-mpw, 480px); max-height: var(--cp-mph, 600px); display: flex; flex-direction: column; gap: 12px;
    color: var(--title-font-color, #333); font-family: var(--content-font-family, inherit); font-size: 13px; text-align: left;
}
.cp-mp-embed { display: none; flex: 0 0 auto; border-radius: 0; overflow: hidden; background: #000; }
.cp-mp-embed.is-yt { display: block; aspect-ratio: 16 / 9; }   /* 유튜브: 정책상 영상 화면을 보이게 둠 */
.cp-mp-embed.is-sc { display: block; height: 120px; }           /* 사운드클라우드 위젯 */
.cp-mp-ytbox, .cp-mp-scbox, .cp-mp-ytbox > div, .cp-mp-ytbox iframe { width: 100%; height: 100%; }
.cp-mp-frame { display: block; width: 100%; height: 100%; border: 0; }
.cp-mp-panel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 12px 10px 8px; }
.cp-mp-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 4px 6px 8px; font-size: 14px; }
.cp-mp-rows { flex: 1 1 auto; min-height: 0; margin: 0; padding: 0; list-style: none; overflow-y: auto; touch-action: pan-y; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.cp-mp-row { display: flex; align-items: center; gap: 2px; padding-right: 4px; border-radius: 0; }
.cp-mp-row + .cp-mp-row { margin-top: 2px; }
.cp-ui .cp-mp-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; margin: 0; padding: 7px 8px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cp-mp-thumb { position: relative; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.cp-mp-thumb img { display: block !important; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover; margin: 0 !important; }
.cp-mp-note { color: #fff; font-size: 17px; }
.cp-mp-eq { position: absolute; inset: 0; display: none; align-items: flex-end; justify-content: center; gap: 3px; padding-bottom: 12px; background: rgba(0, 0, 0, .35); }
.cp-mp-eq i { display: block; width: 4px; height: 8px; background: #fff; border-radius: 1px; }
.cp-mp-row.is-cur .cp-mp-eq { display: flex; }
.cp-mp-row.is-on .cp-mp-eq i { animation: cp-eq .9s ease-in-out infinite alternate; }
.cp-mp-row.is-on .cp-mp-eq i:nth-child(2) { animation-delay: -.3s; }
.cp-mp-row.is-on .cp-mp-eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes cp-eq { from { height: 4px; } to { height: 18px; } }
@media (prefers-reduced-motion: reduce) { .cp-mp-row.is-on .cp-mp-eq i { animation: none; height: 12px; } }
.cp-mp-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cp-mp-text b, .cp-mp-text span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cp-mp-text b { font-weight: 500; font-size: 14px; }
.cp-mp-text span, .cp-mp-dur, .cp-mp-time, .cp-mp-msg { font-size: 11px; color: #888; }
.cp-mp-dur, .cp-mp-time { font-variant-numeric: tabular-nums; }
.cp-mp-msg:empty { display: none; }
.cp-mp-msg { padding: 6px 8px 0; }
.cp-ui .cp-mpbtn { flex: 0 0 auto; width: 32px; height: 32px; margin: 0; padding: 0; background: none; font-size: 14px; line-height: 32px; text-align: center; cursor: pointer; text-decoration: none !important; }
.cp-ui .cp-mpbtn:hover, .cp-ui .cp-mpbtn:focus-visible { color: #333; }
/* 재생 막대: 표 맨 위, 가로 50% 가운데 */
.cp-mp-bar { flex: 0 0 auto; width: 50%; min-width: 250px; max-width: 100%; margin: 0 auto 10px; padding: 0 0 2px; box-sizing: border-box; background: none; }
.cp-mp-prog { display: flex; align-items: center; gap: 8px; }
/* 진행 막대: 지난 부분 진하게(--p), 손잡이 흰 원 */
.cp-ui input.cp-mp-range {
    flex: 1 1 auto; min-width: 0; height: 18px !important; margin: 0; padding: 0 !important; background: transparent !important; cursor: pointer;
    -webkit-appearance: none; appearance: none;
}
.cp-mp-range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; }
.cp-mp-range::-moz-range-track { height: 4px; border-radius: 2px; }
.cp-mp-range::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border: 0; border-radius: 50%; background: #fff; }
.cp-mp-range::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
.cp-mp-ctl { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; padding: 0; }
.cp-ui .cp-mp-ctl .cp-mpbtn { width: 36px; height: 36px; line-height: 36px; font-size: 14px; }
.cp-ui .cp-mp-shuf, .cp-ui .cp-mp-loop { opacity: .55; }
.cp-ui .cp-mp-shuf.is-on, .cp-ui .cp-mp-loop.is-on { opacity: 1; }
.cp-ui .cp-mp-ctl .cp-mp-play { width: 44px; height: 44px; line-height: 44px; border-radius: 50%; font-size: 17px; }
@media (max-width: 768px) {
    .cp-mp { gap: 8px; }
    .cp-mp-panel { padding: 10px 6px 6px; }
}

/* ---------- 보기 팝업: PDF ---------- */
.cp-pdfcv { display: block; background: #fff; }
.cp-zoom img.is-off, .cp-pdfcv.is-off { display: none !important; }
.cp-fig[data-k="pdf"] .cp-zoom img { background: #fff; }
.cp-under { position: absolute; left: 0; right: 0; bottom: 52px; display: flex; justify-content: center; pointer-events: none; }
.cp-pdfnav { display: flex; align-items: center; gap: 6px; font-size: 13px; pointer-events: auto; }
.cp-pdfnum { min-width: 70px; text-align: center; font-variant-numeric: tabular-nums; }
.cp-pdfdl { margin-left: 8px; color: inherit !important; opacity: .75; font-size: 12px; text-decoration: none; }
.cp-pdfdl:hover { opacity: 1; }

/* ---------- 보기 팝업: 묶음 안 번호 ---------- */
/* 아래: ◀ 이전 · 다음 ▶ 그리고 칸 번호(지금 칸은 굵게 + 밑줄) */
.cp-vfoot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 0 calc(12px + env(safe-area-inset-bottom)); }
.cp-vpn { display: flex; gap: 28px; }
.cp-ui .cp-vpnb { display: inline-flex; align-items: center; gap: 6px; height: 36px; margin: 0; padding: 0 6px; background: none; color: inherit; font: inherit; font-size: 15px; cursor: pointer; opacity: .9; }
.cp-ui .cp-vpnb i { font-size: 20px; }
.cp-ui .cp-vpnb:hover, .cp-ui .cp-vpnb:focus-visible { opacity: 1; }
.cp-ui .cp-vpnb[disabled] { opacity: .3; cursor: default; }
.cp-pager { display: flex; justify-content: center; align-items: center; gap: 4px; flex-wrap: nowrap; }
.cp-pager[hidden] { display: none; }
.cp-ui .cp-pg { position: relative; min-width: 34px; height: 36px; margin: 0; padding: 0 6px; background: none; color: inherit; font: inherit; font-size: 11pt; cursor: pointer; opacity: .55; font-variant-numeric: tabular-nums; }
.cp-ui .cp-pg:hover, .cp-ui .cp-pg:focus-visible { opacity: .9; }
.cp-ui .cp-pg.is-on { opacity: 1; font-weight: 700; }
.cp-ui .cp-pg.is-on::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }   /* 지금 쪽: 숫자 아래 작은 동그라미 */
.cp-pgdot { min-width: 34px; text-align: center; font-size: 13px; letter-spacing: 1px; opacity: .45; }
@media (max-width: 768px) {
    .cp-ui .cp-pg { min-width: 28px; font-size: 11pt; }
    .cp-pgdot { min-width: 22px; }
}
/* 묶음 안 항목: 오른쪽 작은 동그라미 */
.cp-vdots { position: absolute; left: 0; top: 0; z-index: 3; display: flex; flex-direction: row; align-items: center; gap: 2px; transition: opacity .15s; }   /* 자리는 파일 왼쪽 아래(스크립트가 맞춤) */
.cp-vacts.is-moving ~ .cp-vdots { opacity: 0; pointer-events: none; }   /* 넘기는 동안 잠깐 숨김 */
.cp-vdots[hidden] { display: none; }
.cp-ui .cp-dot { position: relative; width: 21px; height: 26px; margin: 0; padding: 0; background: none; color: inherit; cursor: pointer; }
.cp-ui .cp-dot::before {   /* 다른 항목: 작은 점(리스트 쪽 동그라미보다 30% 크게) */
    content: ''; position: absolute; left: 50%; top: 50%; width: 6.5px; height: 6.5px; margin: -3.25px 0 0 -3.25px; border-radius: 50%;
    background: currentColor; opacity: .55; transition: opacity .15s;
}
.cp-ui .cp-dot:hover::before, .cp-ui .cp-dot:focus-visible::before { opacity: .9; }
.cp-ui .cp-dot.is-on::before {   /* 지금 항목: 이미지·링크·음원 모두 ❊ */
    content: '\274A'; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 0; background: none;
    opacity: 1; font-size: 18px; line-height: 18px; text-align: center; font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Segoe UI Symbol', sans-serif;
}
.cp-ui .cp-dot.is-edge::before { width: 4px; height: 4px; margin: -2px 0 0 -2px; }


/* ==========================================================
   사이트 색 맞춤: 홈페이지 테마 변수 사용(없으면 기존 색)
   ========================================================== */
#cp_wrap, .cp-dlg { font-family: var(--content-font-family, inherit); }
/* 목록 */
.cp-tile, .cp-mp3, .cp-pdf { background: var(--card-bg-color, #eee); }
.cp-note { color: var(--secondary-color, #555); }
.cp-ui .cp-add { background: color-mix(in srgb, var(--secondary-color, #808080) 30%, transparent) !important; }
.cp-ui .cp-add:hover, .cp-ui .cp-add:focus-visible { background: color-mix(in srgb, var(--secondary-color, #808080) 45%, transparent) !important; }
.cp-key-txt { color: var(--title-font-color, inherit); }
.cp-line { color: var(--secondary-color, currentColor); }
.cp-ui .cp-tool { color: var(--secondary-color, inherit); opacity: .85; }
.cp-none, .cp-empty { color: var(--secondary-color, #999); }
/* 팝업 창(업로드·수정·설정) */
.cp-panel { background: var(--container-bg-color, #fff); border-radius: 0 !important; color: var(--content-font-color, #222); }   /* 팝업 모서리 각지게 */
.cp-ph h3 { font-family: var(--title-font-family, inherit); color: var(--title-font-color, #222); }
.cp-lb { color: var(--title-font-color, #555); }
.cp-hint, .cp-msg, .cp-card-meta { color: var(--secondary-color, #888); }
.cp-ui .cp-in, .cp-ui select.cp-in { background: var(--form-bg-color, #f2f2f2) !important; color: var(--form-text-color, #222); border-radius: 0 !important; }   /* 입력칸 모서리 각지게 */
#cp_wrap { --cp-rule: color-mix(in srgb, var(--secondary-color, #000) 45%, transparent); }
.cp-ui .cp-in:focus { background: color-mix(in srgb, var(--form-bg-color, #f2f2f2) 88%, #000) !important; }
.cp-ui .cp-in::placeholder { color: var(--form-text-color, #999); opacity: .6; }
.cp-ui .cp-btn { background: var(--btn-secondary-bg, #f2f2f2); color: var(--btn-secondary-text, #222); border-radius: var(--btn-secondary-radius, 6px); }
.cp-ui .cp-btn:hover, .cp-ui .cp-btn:focus-visible { background: color-mix(in srgb, var(--btn-secondary-bg, #f2f2f2) 88%, #000); }
.cp-ui .cp-btn.cp-primary { background: var(--secondary-color, #111); color: #fff; border-radius: var(--btn-primary-radius, 6px); }
.cp-ui .cp-btn.cp-primary:hover, .cp-ui .cp-btn.cp-primary:focus-visible { background: color-mix(in srgb, var(--secondary-color, #111) 85%, #000); }
.cp-drop { background: color-mix(in srgb, var(--card-bg-color, #f2f2f2) 45%, transparent); color: var(--secondary-color, #999); border-radius: 0; }
.cp-drop:hover, .cp-drop:focus-visible { background: color-mix(in srgb, var(--card-bg-color, #f2f2f2) 75%, transparent); }
.cp-drop.is-over { background: var(--card-bg-color, #ececec); }
.cp-card-img, .cp-cat-ico { background: var(--card-bg-color, #f2f2f2); }
.cp-check input { accent-color: var(--secondary-color, #111); }
.cp-toast { background: var(--secondary-color, #111); color: #fff; }
/* 재생 목록 */
.cp-mp-panel { background: var(--container-bg-color, #fff); border-radius: 0; }
.cp-mp-row.is-cur { background: var(--card-bg-color, #eee); border-radius: 0; }
.cp-mp-thumb { background: var(--secondary-color, #999); }
.cp-mp-text span, .cp-mp-dur, .cp-mp-time, .cp-mp-msg, .cp-ui .cp-mpbtn { color: var(--secondary-color, #888); }
.cp-ui .cp-mpbtn:hover, .cp-ui .cp-mpbtn:focus-visible, .cp-ui .cp-mpbtn.is-on, .cp-ui .cp-mp-ctl .cp-mp-play { color: var(--title-font-color, #333); }
.cp-ui .cp-mp-ctl .cp-mp-play { background: color-mix(in srgb, var(--card-bg-color, #f2f2f2) 45%, #fff); }
.cp-mp-range::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--secondary-color, #666) 0 var(--p, 0%), var(--card-bg-color, #ddd) var(--p, 0%) 100%); }
.cp-mp-range::-moz-range-track { background: linear-gradient(to right, var(--secondary-color, #666) 0 var(--p, 0%), var(--card-bg-color, #ddd) var(--p, 0%) 100%); }
/* 배경이 비쳐도 아래 버튼·번호·동그라미가 잘 보이게 */
.cp-ui.cp-viewer .cp-vfoot, .cp-ui.cp-viewer .cp-vacts { text-shadow: 0 0 4px rgba(0, 0, 0, .8); }
.cp-ui.cp-viewer .cp-dot::before { filter: drop-shadow(0 0 2px rgba(0, 0, 0, .8)); }
.cp-ui .cp-btn[hidden] { display: none !important; }
/* 공개 범위: 나만 보기 자물쇠(오른쪽 위), 비밀글 그라데이션 */
.cp-tile .cp-lock {
    position: absolute; top: 6px; right: 7px; z-index: 2; color: #fff; font-size: 13px; line-height: 1;
    text-shadow: 0 0 3px rgba(0, 0, 0, .7), 0 0 1px rgba(0, 0, 0, .9); pointer-events: none;
}
.cp-tile:has(.cp-lock) .cp-badge { right: 24px; }
.cp-tile.cp-locked .cp-grad { position: absolute; inset: 0; }   /* 글 안 색 무작위 위→아래 그라데이션 */
.cp-tile.cp-locked .cp-grad::after {   /* 홈페이지 색의 색상(hue)을 덮어 색감 통일 */
    content: ''; position: absolute; inset: 0; mix-blend-mode: hue; opacity: .55;
    background: linear-gradient(to bottom, var(--secondary-color, #7899ab), var(--title-font-color, #4683a5));
}
.cp-tile.cp-locked .cp-gradph { position: absolute; inset: 0; background: var(--card-bg-color, #ddd); }
.cp-lockbox { margin-bottom: 6px; }
.cp-ui .cp-pw[hidden] { display: none !important; }
.cp-unlock .cp-hint { margin: 0 0 8px; }
/* 공개 범위: [관리자 전용] [비밀글] + 오른쪽 비밀번호 칸 */
.cp-lockrow { display: flex; align-items: center; gap: 8px; min-height: 30px; margin: 0; flex: 1 1 250px; min-width: 0; }   /* 250px 안 되면(휴대폰) 분류 아래 줄로 */
.cp-lockico { font-size: 13px; }
.cp-lockrow .cp-lockbox { flex: 0 0 auto; margin: 0; white-space: nowrap; }
.cp-lockrow .cp-check { margin-right: 8px; }
.cp-lockrow .cp-check:last-child { margin-right: 0; }
.cp-ui .cp-lockrow .cp-pw { flex: 1 1 70px; min-width: 70px; width: auto; }
/* 업로드·수정·설정·비밀번호 창의 입력칸·드롭다운·버튼: 높이 30px, 사이트 테마 규칙보다 우선 */
.cp-ui .cp-in:not(#cp_x1):not(#cp_x2), .cp-ui select.cp-in:not(#cp_x1):not(#cp_x2) {
    height: 30px !important; min-height: 30px !important; max-height: 30px !important; line-height: 28px !important;
    padding-top: 0 !important; padding-bottom: 0 !important; box-sizing: border-box !important;
}
.cp-ui .cp-btn:not(#cp_x1):not(#cp_x2) {
    height: 30px !important; min-height: 30px !important; max-height: 30px !important; line-height: 1 !important;
    padding-top: 0 !important; padding-bottom: 0 !important; box-sizing: border-box !important;
}
/* '추가'·'일괄 입력' 버튼 모서리 각지게 */
.cp-ui .cp-ytrow .cp-btn:not(#cp_x1) { border-radius: 0 !important; }
/* 미리보기 위 작은 버튼(교체·삭제·링크): 테마 버튼 크기 규칙에 안 늘어나게 */
.cp-ui .cp-card-btn:not(#cp_x1):not(#cp_x2) { width: 26px !important; height: 26px !important; min-height: 26px !important; padding: 0 !important; line-height: 26px !important; border-radius: 50% !important; box-sizing: border-box !important; }
.cp-ui .cp-card-link:not(#cp_x1):not(#cp_x2), .cp-ui .cp-card-ico:not(#cp_x1):not(#cp_x2) { width: 28px !important; height: 28px !important; min-height: 28px !important; padding: 0 !important; line-height: 28px !important; box-sizing: border-box !important; }

/* 출처 칸 + 일괄 입력 아이콘(배경 없음) 한 줄 */
.cp-srcrow { display: flex; align-items: center; gap: 0; }
.cp-ui .cp-srcrow .cp-isrc { flex: 1 1 auto; min-width: 0; width: auto; }
.cp-ui .cp-bulk:not(#cp_x1):not(#cp_x2) {
    flex: 0 0 auto; width: 30px !important; height: 30px !important; min-height: 30px !important; margin: 0; padding: 0 !important;
    background: none !important; color: var(--secondary-color, #888); font-size: 13px; line-height: 30px !important; text-align: center; cursor: pointer; opacity: .75; border-radius: 0 !important;
}
.cp-ui .cp-bulk:hover, .cp-ui .cp-bulk:focus-visible { opacity: 1; color: var(--title-font-color, #333); }
/* 게시판 설정: 웹·모바일·분류 열 개수 숫자 칸 한 줄 */
/* 분류 아이콘 첨부·삭제 버튼 모서리 각지게 */
.cp-ui .cp-cat .cp-btn:not(#cp_x1) { border-radius: 0 !important; }
/* 팝업 제목 아이콘(업로드 ＋ · 수정 ✎ · 게시판 설정 ⚙) */
.cp-ph:has(.cp-ph-ico) { justify-content: flex-start; }   /* 제목 아이콘: 왼쪽 위 */
.cp-ph h3.cp-ph-ico { display: flex; align-items: center; height: 30px; margin-left: 0; margin-right: auto; font-size: 26px; line-height: 1; }   /* 17px → 1.5배 */
.cp-sr { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; }
/* 체크박스: 모서리 없는 네모, 스킨 색(빈칸 = 입력칸 색, 체크 = 버튼 색 + 흰 체크) */
.cp-ui input[type="checkbox"]:not(#cp_x1):not(#cp_x2) {
    -webkit-appearance: none; appearance: none; flex: 0 0 auto;
    width: 16px !important; height: 16px !important; min-height: 16px !important; margin: 0 !important; padding: 0 !important;
    border-radius: 0 !important; cursor: pointer; vertical-align: middle;
    background: var(--form-bg-color, #d4d7dc) no-repeat center / 12px 12px !important;
    transition: background-color .12s;
}
.cp-ui input[type="checkbox"]:not(#cp_x1):not(#cp_x2):hover { background-color: color-mix(in srgb, var(--form-bg-color, #d4d7dc) 85%, #000) !important; }
.cp-ui input[type="checkbox"]:not(#cp_x1):not(#cp_x2):checked {
    background-color: var(--secondary-color, #7899ab) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.2 6.2l2.5 2.5 5.1-5.4' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='square'/%3E%3C/svg%3E") !important;
}
.cp-ui input[type="checkbox"]:not(#cp_x1):not(#cp_x2):focus-visible { outline: 2px solid var(--secondary-color, #7899ab) !important; outline-offset: 1px; }
.cp-ui input[type="checkbox"]:not(#cp_x1):not(#cp_x2):disabled { opacity: .5; cursor: default; }
.cp-check { gap: 6px; }
/* 대표 항목 별: 미리보기 왼쪽 위, 배경 없음(★ = 목록 칸에 보일 항목) */
.cp-ui .cp-star:not(#cp_x1):not(#cp_x2) {
    position: absolute; left: 2px; top: 2px; z-index: 2; width: 28px !important; height: 28px !important; min-height: 28px !important;
    margin: 0; padding: 0 !important; background: none !important; border-radius: 0 !important; color: #fff; font-size: 15px; line-height: 28px !important;
    text-align: center; cursor: pointer; opacity: .7; text-shadow: 0 0 3px rgba(0, 0, 0, .75), 0 0 1px rgba(0, 0, 0, .9);
}
.cp-ui .cp-star:hover, .cp-ui .cp-star:focus-visible, .cp-ui .cp-star.is-on { opacity: 1; }

@media (max-width: 768px) {
    .cp-ui .cp-in:not(#cp_x1):not(#cp_x2), .cp-ui select.cp-in:not(#cp_x1):not(#cp_x2) { line-height: 28px !important; font-size: 16px; }
}
/* 분류 아이콘 미리보기 칸·그림, 첨부·삭제 버튼: 테마가 둥글게 해도 각지게 */
.cp-ui .cp-cat-ico:not(#cp_x1):not(#cp_x2),
.cp-ui .cp-cat-ico img:not(#cp_x1):not(#cp_x2),
.cp-ui .cp-cat .cp-btn:not(#cp_x1):not(#cp_x2) { border-radius: 0 !important; }
/* 아이콘 단추(링크 추가·아이콘 첨부·아이콘 삭제): 배경 없음, 30px */
.cp-ui .cp-ibtn2:not(#cp_x1):not(#cp_x2) {
    flex: 0 0 auto; width: 30px !important; height: 30px !important; min-height: 30px !important; margin: 0; padding: 0 !important;
    background: none !important; border-radius: 0 !important; color: var(--secondary-color, #888); font-size: 14px; line-height: 30px !important;
    text-align: center; cursor: pointer; opacity: .8;
}
.cp-ui .cp-ibtn2:hover, .cp-ui .cp-ibtn2:focus-visible { opacity: 1; color: var(--title-font-color, #333); }
.cp-ui .cp-ibtn2[hidden] { display: none !important; }
.cp-cat .cp-ibtn2 + .cp-ibtn2 { margin-left: 2px; }

/* 숫자 칸의 위·아래 화살표(브라우저 기본) 숨김: 숫자를 바로 입력 */
.cp-ui input[type="number"].cp-in { -moz-appearance: textfield; appearance: textfield; }
.cp-ui input[type="number"].cp-in::-webkit-inner-spin-button,
.cp-ui input[type="number"].cp-in::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* 업로드·수정·게시판 설정 창: 모서리 10px (휴대폰은 아래에서 올라와 위쪽만) */
.cp-ui .cp-panel.is-round:not(#cp_x1):not(#cp_x2) { border-radius: 10px !important; }
@media (max-width: 768px) { .cp-ui .cp-panel.is-round:not(#cp_x1):not(#cp_x2) { border-radius: 10px 10px 0 0 !important; } }
/* 분류 아이콘 첨부·삭제 아이콘 30% 크게(14px → 18px) */
.cp-ui .cp-cat .cp-ibtn2:not(#cp_x1):not(#cp_x2) { font-size: 18px; }
/* 게시판 관리(⚙) 링크도 다른 도구 아이콘과 같은 모양 */
.cp-ui a.cp-tool { display: inline-block; text-align: center; text-decoration: none !important; color: var(--secondary-color, inherit) !important; }
/* 맨 위로 · 맨 아래로: 표 바깥 오른쪽 아래, 화면에 고정, 투명도 70% */
/* 맨 위로·맨 아래로: 웹은 아래 50px(휴대폰은 20px로 따로) */
.cp-jump { position: fixed; bottom: 50px; bottom: calc(50px + env(safe-area-inset-bottom)); z-index: 9000; display: flex; flex-direction: column; gap: 8px; }
.cp-jump.is-edge { right: 6px; }
.cp-ui.cp-jump .cp-ibtn2:not(#cp_x1):not(#cp_x2):not(#cp_x3) {   /* 둥근 배경(사이트 주 버튼 색) 60px, 화살표 35px */
    width: 60px !important; height: 60px !important; min-height: 60px !important; line-height: 60px !important; font-size: 35px !important;
    border-radius: 50% !important; color: var(--btn-primary-text, #fff) !important; opacity: 1;
}

/* 게시판을 열 때 부드럽게 나타남 */
@keyframes cp-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
#cp_wrap { animation: cp-in .45s ease-out both; }
@media (prefers-reduced-motion: reduce) { #cp_wrap { animation: none; } }
@media (max-width: 768px) {
    /* 휴대폰: 분류 아이콘 40px, 오른쪽 아이콘 줄 폭 40px, 아이콘 줄 위 여백 없음 */
    #cp_wrap:not(#cp_x1) { --cp-key: 40px; --cp-side: 40px; }
    #cp_wrap:not(#cp_x1) .cp-side { padding-top: 0; }
    .cp-ui .cp-key:not(#cp_x1) { padding: 0; }   /* 분류 아이콘 단추 안쪽 여백 없음 */
    /* 휴대폰: 업로드·정렬·설정 단추를 가운데로(게시판 관리 톱니는 왼쪽 그대로) */
    .cp-head { position: relative; justify-content: center; }
    .cp-head .cp-tools { margin: 0 auto; }
    .cp-head .cp-tool-adm { position: absolute; left: 0; top: 50%; transform: translateY(-50%); }
}
/* 이미지 팝업 오른쪽 위 수정·삭제·닫기: 투명도 70%(마우스 올리면 진하게) */
.cp-ui .cp-vacts .cp-vbtn { opacity: .7; }
.cp-ui .cp-vacts .cp-vbtn:hover, .cp-ui .cp-vacts .cp-vbtn:focus-visible { opacity: 1; }
/* 이미지 팝업 왼쪽 위 개수(예: 03 / 08) 숨김 — 아래 쪽 번호로 위치를 보여 줌 */

/* 휴대폰: 맨 위로·맨 아래로는 2배 확대 없이 45px 원 · 화살표 24px */
@media (max-width: 768px) {
    /* 휴대폰: 아래·오른쪽 여백 20px(아이폰 안전 여백 포함), 단추 사이 8px */
    .cp-jump:not(#cp_x1) { gap: 8px; bottom: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); left: auto !important; right: 20px; right: calc(20px + env(safe-area-inset-right)); }
    .cp-ui.cp-jump .cp-ibtn2:not(#cp_x1):not(#cp_x2):not(#cp_x3):not(#cp_x4) { width: 45px !important; height: 45px !important; min-height: 45px !important; line-height: 45px !important; font-size: 24px !important; }
}

/* 맨 위로·맨 아래로: 평소 투명도 40%, 마우스를 올린 단추만 70% */
.cp-ui.cp-jump .cp-ibtn2:not(#cp_x1):not(#cp_x2) { opacity: .4 !important; transition: opacity .15s; }
.cp-ui.cp-jump .cp-ibtn2:not(#cp_x1):not(#cp_x2):hover,
.cp-ui.cp-jump .cp-ibtn2:not(#cp_x1):not(#cp_x2):focus-visible { opacity: .7 !important; }
/* 맨 위로·맨 아래로: 화살표 아이콘 자체 투명도 70% */
.cp-ui.cp-jump .cp-ibtn2 i { opacity: .7; }
/* 맨 위로·맨 아래로: 배경·테두리 1px 모두 사이트 주 버튼 배경색 */
.cp-ui.cp-jump .cp-ibtn2:not(#cp_x1):not(#cp_x2):not(#cp_x3) {
    background: var(--btn-primary-bg, var(--secondary-color, #7899ab)) !important;
    border: 1px solid var(--btn-primary-bg, var(--secondary-color, #7899ab)) !important;
    box-sizing: border-box !important;
}

/* 펼친 분류가 여러 쪽일 때: '분류 펼침' 행 수만큼 보이는 창, 안의 목록이 한 줄씩 부드럽게 올라감 */
.cp-body.is-open.is-paged { aspect-ratio: var(--cp-cols) / var(--cp-vr, 1); }
.cp-grid { transition: transform .35s ease; will-change: transform; }
@media (prefers-reduced-motion: reduce) { .cp-grid { transition: none; } }
/* 쪽 동그라미: 크기가 커졌다 줄었다 하지 않게(움직임 없음) */
.cp-ui .cp-sdot::before, .cp-ui .cp-sdot.is-on::before { transition: none !important; transform: none !important; }
.cp-ui .cp-sdot:not(.is-on):hover::before, .cp-ui .cp-sdot:not(.is-on):focus-visible::before { transform: none !important; opacity: .9; }
/* 이미지 팝업이 열릴 때 부드럽게: 배경은 서서히, 이미지는 살짝 작은 데서 커지며 나타남 */
@keyframes cp-vfade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cp-vpop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.cp-viewer { animation: cp-vfade .28s ease-out both; }
.cp-viewer .cp-fig { animation: cp-vpop .32s cubic-bezier(.2, .8, .2, 1) both; }
@media (prefers-reduced-motion: reduce) { .cp-viewer, .cp-viewer .cp-fig { animation: none; } }
/* 비밀글 그라데이션 위 SECRET 폴더 그림: 그림 모양(secret.png)을 틀로, 색은 홈페이지 밝은 바탕색 + 제목 글자색 그림자 */
.cp-secret { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; pointer-events: none; opacity: .4;   /* 비밀글 그림 투명도 40% */
    filter: drop-shadow(0 0 1px color-mix(in srgb, var(--title-font-color, #333) 80%, transparent)) drop-shadow(0 0 6px color-mix(in srgb, var(--title-font-color, #333) 45%, transparent)); }
.cp-secret i { display: block; width: 46%; aspect-ratio: 1 / 1; background: var(--container-bg-color, #fff);
    -webkit-mask: url(secret.png) center / contain no-repeat; mask: url(secret.png) center / contain no-repeat; }

/* 정렬 모드 아래쪽 [정렬 완료] 버튼: 정렬 중에만, 화면 아래에 붙어 따라옴 */
.cp-sortdone { display: none; }
#cp_wrap.is-sort .cp-sortdone {
    position: sticky; bottom: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 5;
    display: flex; justify-content: center; margin-top: 20px; pointer-events: none;
}
.cp-ui .cp-sortdone .cp-btn:not(#cp_x1):not(#cp_x2) { pointer-events: auto; padding: 0 28px; border-radius: 8px !important; }   /* 알림 창(정렬 완료 등)과 같은 둥글기 */
.cp-sorting .cp-toast { bottom: 70px; bottom: calc(70px + env(safe-area-inset-bottom)); }
/* 수정 창: 미리보기 그림을 잡고 끌어 순서 바꾸기 */
.cp-prevs.cp-sortable .cp-card-img { cursor: grab; touch-action: none; }
.cp-prevs.cp-sortable .cp-card.is-dragging { opacity: .4; }
.cp-prevs.cp-sortable .cp-card.is-dragging .cp-card-img { cursor: grabbing; }
/* 수정 창: 붙여 보기로 표시한 그림 */
.cp-join-tag { position: absolute; left: 6px; bottom: 6px; z-index: 2; padding: 2px 7px; font-size: 11px; line-height: 16px; background: var(--title-font-color, #333); color: var(--container-bg-color, #fff); pointer-events: none; }
.cp-join-tag[hidden] { display: none; }
/* 보기 팝업: 붙여 보기(줄 안은 같은 높이로 좌우, 줄끼리는 같은 폭으로 위아래) */
.cp-vrow { display: flex; flex-direction: column; align-items: flex-start; }   /* 줄끼리 위아래 */
.cp-vline { display: flex; align-items: flex-start; }   /* 줄 안은 좌우 */
/* 수정 창: 붙여 보기 — 붙인 그림들은 한 칸(한 줄 전체 폭)으로 붙여 보여 줌 */
.cp-card.is-inj { display: none; }   /* 붙인 그림의 낱장 칸(값은 그대로 두고 숨김) */
.cp-jcard { grid-column: 1 / -1; }
.cp-ui .cp-jcard .cp-jart { display: flex; flex-direction: column; align-items: flex-start; aspect-ratio: auto; background: none; overflow: visible; }
.cp-jcard .cp-vline { display: flex; align-items: flex-start; }
.cp-jpiece { position: relative; overflow: hidden; }
.cp-jpiece img { display: block !important; width: 100% !important; height: 100% !important; max-width: none !important; margin: 0 !important; object-fit: cover; pointer-events: none; }
.cp-ui .cp-jbtn { width: 24px; height: 24px; margin: 0; padding: 0; line-height: 24px; text-align: center; background: none; color: #fff; font-size: 13px; cursor: pointer; opacity: .85; filter: drop-shadow(0 0 2px rgba(0, 0, 0, .8)); }
.cp-ui .cp-jbtn:hover, .cp-ui .cp-jbtn:focus-visible, .cp-ui .cp-jbtn.is-on { opacity: 1; }
.cp-jstar { position: absolute; right: 2px; top: 2px; }   /* 그림 하나를 목록 표지로 */
.cp-ui .cp-jall { position: absolute; left: 2px; top: 2px; z-index: 2; width: 30px; height: 30px; line-height: 30px; font-size: 17px; }   /* 붙인 표지 전체를 목록 표지로 */
.cp-jpiece .cp-joinph { position: absolute; inset: 0; }
.cp-jtools { position: absolute; right: 2px; bottom: 2px; display: flex; }
.cp-jcard .cp-srcrow { margin-top: 4px; }
/* 목록 칸: 붙인 묶음 전체 표지 */
.cp-joincv { position: absolute; inset: 0; display: block; }
.cp-joincv img, .cp-joincv .cp-joinph { position: absolute; display: block !important; max-width: none !important; margin: 0 !important; object-fit: cover; }
.cp-joinph { display: flex !important; align-items: center; justify-content: center; font-size: 12px; background: color-mix(in srgb, var(--secondary-color, #999) 25%, transparent); color: var(--secondary-color, #666); }
/* PDF 보기: 두 쪽은 좌우로 붙임, 스크롤은 화면 안에서 위아래로 */
.cp-fig[data-k="pdf"] .cp-zoom { display: flex; align-items: flex-start; }
.cp-pdfscroll { overflow-y: auto; overflow-x: hidden; touch-action: pan-y; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.cp-pdfscroll .cp-pdfcv { margin: 0 auto 8px; }
.cp-pdfscroll .cp-pdfcv:last-child { margin-bottom: 0; }
.cp-pdfv { margin-top: 4px; width: 100%; }
/* 붙인 칸: 왼쪽 위 큰 별 옆 [붙이기] 버튼 */
.cp-ui .cp-jedit { position: absolute; left: 34px; top: 2px; z-index: 2; width: 30px; height: 30px; line-height: 30px; font-size: 15px; }
.cp-ui .cp-card.is-join .cp-join { opacity: 1; color: var(--title-font-color, #333); }
/* 붙이기 창 */
.cp-ui .cp-panel.is-wide { width: 720px; max-width: calc(100vw - 24px); }
.cp-jtray { display: flex; flex-wrap: wrap; gap: 6px; min-height: 70px; padding: 6px; background: color-mix(in srgb, var(--form-bg-color, #ddd) 45%, transparent); transition: background .15s; }
.cp-jtray.is-over, .cp-jnew.is-over { background: color-mix(in srgb, var(--secondary-color, #789) 30%, transparent); }
.cp-jthumb { position: relative; width: 58px; height: 58px; overflow: hidden; cursor: grab; touch-action: none; background: var(--card-bg-color, #eee); }
.cp-jthumb img { display: block !important; width: 100% !important; height: 100% !important; object-fit: cover; pointer-events: none; }
.cp-jthumb.is-focus { outline: 2px solid var(--title-font-color, #333); outline-offset: -2px; }
.cp-jempty { align-self: center; font-size: 12px; opacity: .7; }
.cp-jarea { margin-top: 10px; max-height: 52vh; overflow-y: auto; }
.cp-jgrp { margin-bottom: 12px; }
.cp-jgrp .cp-lb { margin-bottom: 4px; font-size: 12px; }
.cp-jarea .cp-jart { display: flex; flex-direction: column; align-items: flex-start; }
.cp-jarea .cp-vline { display: flex; align-items: flex-start; }
.cp-jdrag { cursor: grab; touch-action: none; }
.cp-jdrag.is-dragging, .cp-jthumb.is-dragging { opacity: .35; }
.cp-jnew { display: flex; align-items: center; justify-content: center; height: 56px; margin-top: 6px; font-size: 12px; background: color-mix(in srgb, var(--form-bg-color, #ddd) 45%, transparent); transition: background .15s; }
/* 끌 때 붙을 면 표시(그림 가장자리 굵은 선) */
.cp-jind { position: absolute; z-index: 3; background: var(--title-font-color, #333); box-shadow: 0 0 0 1px var(--container-bg-color, #fff); pointer-events: none; }
.cp-jind.is-left { left: 0; top: 0; bottom: 0; width: 5px; }
.cp-jind.is-right { right: 0; top: 0; bottom: 0; width: 5px; }
.cp-jind.is-top { left: 0; right: 0; top: 0; height: 5px; }
.cp-jind.is-bottom { left: 0; right: 0; bottom: 0; height: 5px; }
.cp-jghost { position: fixed; left: 0; top: 0; z-index: 2147483000; width: 60px; height: 60px; overflow: hidden; opacity: .8; pointer-events: none; }
.cp-jghost > * { width: 60px !important; height: 60px !important; }
.cp-jghost img { display: block !important; width: 100% !important; height: 100% !important; object-fit: cover; }
/* 게시판 설정 창: 분류 아이콘 미리보기 모서리 = 닫기·저장 버튼과 같은 둥글기 */
.cp-ui .cp-setdlg .cp-cat-ico:not(#cp_x1):not(#cp_x2):not(#cp_x3) { border-radius: var(--btn-secondary-radius, 6px) !important; }
.cp-ui .cp-setdlg .cp-cat-ico img:not(#cp_x1):not(#cp_x2):not(#cp_x3) { border-radius: 0 !important; }
/* 게시판 설정 창: 숫자 칸은 테두리 없이 각지게(테마가 넣는 테두리·초점 테두리·둥근 모서리까지) */
.cp-ui .cp-setdlg .cp-setnum input:not(#cp_x1):not(#cp_x2):not(#cp_x3),
.cp-ui .cp-setdlg .cp-setnum input:not(#cp_x1):not(#cp_x2):not(#cp_x3):focus { border: 0 !important; border-radius: 0 !important; outline: 0 !important; box-shadow: none !important; }
/* 분류 아이콘: 한 줄에 두 분류씩 */
.cp-setdlg .cp-cats { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; }
.cp-setdlg .cp-cats .cp-cat { gap: 8px; min-width: 0; }
.cp-setdlg .cp-cats .cp-cat + .cp-cat { margin-top: 0; }
.cp-setdlg .cp-cats .cp-cat-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
.cp-ui .cp-setdlg .cp-cats .cp-ibtn2:not(#cp_x1):not(#cp_x2):not(#cp_x3) { width: 26px !important; }
/* 열릴 때 버튼·동그라미도 글과 같이 서서히 나타남 */
.cp-viewer.is-shown > .cp-vacts, .cp-viewer.is-shown > .cp-vdots { animation: cp-vfade .32s cubic-bezier(.2, .8, .2, 1) both; }   /* 글(cp-vpop)과 같은 속도 */
.cp-viewer:focus { outline: 0; }
/* 게시판 설정: 테이블 가로(px) / 가로선 / 웹·모바일 줄마다 열 · 행 접힘·펼침 / 가로선 / 분류 아이콘. 칸 높이 25px, 글자 13px */
.cp-setrow { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 13px; }
.cp-setrow .cp-setnum { display: flex; flex-direction: row; align-items: center; gap: 5px; flex: 0 1 auto; min-width: 0; }
.cp-setrow .cp-setnum .cp-lb { margin: 0 !important; font-size: 13px; white-space: nowrap; }
.cp-setname { flex: 0 0 3.4em; font-size: 13px; font-weight: 600; color: var(--title-font-color, inherit); white-space: nowrap; }
.cp-setrow .cp-setsep { flex: 0 0 auto; padding: 0 2px; color: var(--secondary-color, #999); opacity: .7; }
.cp-ui .cp-setdlg .cp-setnum input:not(#cp_x1):not(#cp_x2):not(#cp_x3) { width: 52px; height: 25px !important; min-height: 25px !important; line-height: 25px !important; padding: 0 6px !important; font-size: 13px !important; }
.cp-ui .cp-setdlg .cp-setrow:first-child .cp-setnum input:not(#cp_x1):not(#cp_x2):not(#cp_x3) { width: 80px; }
.cp-sethr { display: block; height: 1px; margin: 10px 0; padding: 0; background: color-mix(in srgb, var(--secondary-color, #999) 45%, transparent); }   /* 1px 실선(hr 대신 일반 칸에 배경으로 그려 테마가 hr을 숨겨도 보임) */
@media (max-width: 768px) {
    /* 휴대폰: 오른쪽 분류 아이콘이 화면에 붙어 따라옴(분류 안을 내려도 아이콘·줄이 보이게). 붙는 높이는 --cp-stick 로 조절 */
    #cp_wrap:not(#cp_x1) .cp-side .cp-key { position: sticky; top: var(--cp-stick, 64px); z-index: 2; background: transparent; }   /* 붙는 높이 64px */
    /* 아이콘·분류명 뒤로 세로선이 비치지 않게: 선 자리만 게시판 뒤 바탕색의 가는 띠로 가림(배경은 투명 그대로). 분류명 아래 10px까지 가려 선과 10px 띄움 */
    #cp_wrap:not(#cp_x1) .cp-side .cp-key::before { content: ''; position: absolute; left: 50%; top: 0; bottom: -10px; width: 5px; transform: translateX(-50%); background: var(--cp-pagebg, #fff); z-index: -1; pointer-events: none; }
    /* 쪽 동그라미도 아이콘·분류명 바로 아래에 붙어 따라옴(분류명과 겹치지 않게) */
    #cp_wrap:not(#cp_x1) .cp-sdots { position: sticky; left: auto; top: calc(var(--cp-stick, 64px) + var(--cp-keyh, 90px) + 22px); width: 0; margin: 22px 0 0; transform: none; }
    .cp-ui .cp-setdlg .cp-setnum input:not(#cp_x1):not(#cp_x2):not(#cp_x3) { width: 44px; padding: 0 4px !important; }
    .cp-setrow { gap: 6px; }
    .cp-setdlg .cp-setrow:not(:first-child) { justify-content: space-between; }   /* 웹·모바일 줄: 양쪽 끝까지(사이 간격이 넓어짐) */
}
.cp-setrow .cp-setpair { gap: 4px; }   /* 행 접힘 · 펼침 [ ][ ] */
.cp-setrow .cp-setpair .cp-lb { margin-right: 2px !important; }
