/* 팝업 — 관리자 「홈페이지 관리 > 팝업」(admin/site-popups.php)에 켜 둔 팝업을 창 하나에 모아 보여준다. 2026-11-11
   마크업은 ko/api/_site.php site_popups_inject 가 쪽마다 </body> 앞에 넣는다(팝업이 있을 때만 이 파일도 붙는다).
   2026-11-20 사용자 「팝업 형식은 리노보(renovobusan.com) 팝업처럼」 → 위 = 알약 탭 줄(여러 장이면 양옆 ‹ ›) ·
   가운데 = 그림 카드(모서리 20px) · 카드 아래 흰 띠 = □ 오늘 하루 보지 않기 + X · 바탕은 어둡게 + 흐리게 · 장 넘김 = 옆으로 밀기.
   앞 판(그림 위 X · 아래 칸 탭 · 회색 띠) = ~/backup/popup-20261120/.
   창 비율 --djp-ar · --djp-ar-mo = 가장 세로로 긴 장. 다른 비율의 장은 잘리지 않고 빈자리에 어두운 띠. 1023px 이하는 휴대폰 그림(없으면 PC 그림). */
.djp { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: none; overflow: hidden; }
.djp[open] { display: grid; place-items: center; }
.djp::backdrop { background: rgba(0, 0, 0, .5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.djp:focus { outline: none; }
html.djp-lock, html.djp-lock body { overflow: hidden; }
.djp-box { width: min(500px, 100vw - 64px, (100dvh - 150px) * var(--djp-ar)); font-family: var(--kr, "Pretendard", sans-serif); letter-spacing: -0.0275em; }

/* 탭 줄 */
.djp-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.djp-arw {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 0;
  color: #fff; background: rgba(24, 24, 24, .8); border: 0; border-radius: 50%; cursor: pointer;
}
.djp-arw svg { width: 14px; height: 14px; }
.djp-arw:hover { background: #000; }
[dir="rtl"] .djp-arw svg { transform: scaleX(-1); }
.djp-tabs { position: relative; flex: 1; min-width: 0; display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.djp-tabs::-webkit-scrollbar { display: none; }
.djp-nav.is-one .djp-tabs { justify-content: center; }
.djp-tab {
  flex: none; max-width: 180px; padding: 6px 14px;
  font: inherit; font-size: 13px; font-weight: 600; line-height: 1.2; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(255, 255, 255, .2); border: 1.5px solid transparent; border-radius: 999px; cursor: pointer;
}
.djp-tab:hover { background: rgba(255, 255, 255, .3); }
.djp-tab[aria-selected="true"] { background: rgba(0, 0, 0, .35); border-color: #fff; }
.djp-nav.is-one .djp-tab { max-width: 100%; }   /* 한 장이면 이름을 자르지 않는다 */

/* 그림 카드 */
.djp-card { border-radius: 20px; overflow: hidden; background: #fff; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.djp-panels { position: relative; aspect-ratio: var(--djp-ar); overflow: hidden; background: #222; }
.djp-track { display: flex; height: 100%; transition: transform .5s cubic-bezier(.25, .8, .25, 1); }
.djp-panel { flex: none; width: 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) { .djp-track { transition: none; } }
.djp-link, .djp picture { display: block; width: 100%; height: 100%; }
.djp img { display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; }
.djp-link:focus:not(:focus-visible) { outline: none; }

/* 아래 흰 띠 */
.djp-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 52px; padding: 0 12px 0 22px; background: #fff; }
.djp-today { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 15px; color: #6f6f6f; cursor: pointer; }
.djp-today input {
  appearance: none; flex: none; width: 22px; height: 22px; margin: 0; cursor: pointer;
  border: 1.5px solid #c4c4c4; border-radius: 4px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23a3a3a3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.djp-today input:checked { border-color: var(--pink, #f173ac); }
.djp-x { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; color: #9a9a9a; background: none; border: 0; cursor: pointer; }
.djp-x:hover { color: #333; }
.djp-x svg { width: 22px; height: 22px; }

@media (max-width: 1023px) {
  .djp-box { width: min(420px, 100vw - 64px, (100dvh - 150px) * var(--djp-ar-mo)); }
  .djp-panels { aspect-ratio: var(--djp-ar-mo); }
  .djp-nav { gap: 6px; margin-bottom: 12px; }
  .djp-tab { max-width: 140px; padding: 5px 11px; font-size: 12px; }
  .djp-foot { height: 48px; padding-left: 18px; }
  .djp-today { font-size: 14px; }
}
