#ywPopupZone, #ywPopupZone * { box-sizing: border-box; }
#ywPopupZone[hidden], #ywPopupZone [hidden] { display: none !important; }
#ywPopupZone { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(0,0,0,.70); }
#ywPopupZone .pz-panel { width: 100%; max-width: 1600px; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 40px 60px 30px; background: transparent; border: none; box-shadow: none; color: #fff; }
#ywPopupZone .pz-panel, #ywPopupZone .pz-panel:hover, #ywPopupZone .pz-panel:focus { border: none !important; outline: none !important; box-shadow: none !important; }
/* 링크가 있는 공지에 마우스를 올릴 때만 테두리 표시 */
#ywPopupZone .pz-card.pz-linked { outline: 2px solid transparent; outline-offset: 4px; transition: outline-color .2s ease; }
#ywPopupZone .pz-card.pz-linked:hover { outline-color: #4b96d1; }
#ywPopupZone .pz-title { margin: 0 0 36px; color: #fff; font-size: 42px; font-weight: 700; text-align: center; }
#ywPopupZone .pz-slider { position: relative; }
#ywPopupZone .pz-grid { display: grid; grid-template-columns: repeat(4,minmax(0,350px)); justify-content: center; align-items: start; gap: 26px; }
#ywPopupZone .pz-card { min-width: 0; background: transparent; }
#ywPopupZone .pz-subject { margin: 0; padding: 10px; font-size: 17px; text-align: center; overflow-wrap: anywhere; }
#ywPopupZone .pz-content { width: 100%; aspect-ratio: 1 / 1; overflow: auto; background: transparent; overflow-wrap: anywhere; }
#ywPopupZone .pz-content p { margin: 0; }
#ywPopupZone .pz-content img { max-width: 100% !important; height: auto !important; }
#ywPopupZone .pz-content table { max-width: 100%; }
/* 이미지 한 장인 본문만 정사각형 영역에 맞춤 */
#ywPopupZone .pz-image-only { display: flex; align-items: center; justify-content: center; }
#ywPopupZone .pz-image-only > p, #ywPopupZone .pz-image-only > a, #ywPopupZone .pz-image-only > p > a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; margin: 0; }
#ywPopupZone .pz-image-only img { display: block; width: 100% !important; height: 100% !important; max-height: 100%; object-fit: contain; margin: 0 auto; }
#ywPopupZone button { font-family: inherit; cursor: pointer; }
#ywPopupZone button:focus-visible, #ywPopupZone a:focus-visible { outline: 3px solid #ffce54; outline-offset: 3px; }
#ywPopupZone .pz-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 32px; }
#ywPopupZone .pz-prev { left: -52px; } #ywPopupZone .pz-next { right: -52px; }
#ywPopupZone .pz-dots { display: flex; justify-content: center; gap: 10px; margin-top: 28px; }
#ywPopupZone .pz-dot { width: 16px; height: 16px; padding: 0; border: 1px solid #fff; border-radius: 50%; background: transparent; }
#ywPopupZone .pz-dot[aria-current="true"] { background: #fff; }
#ywPopupZone .pz-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 16px; margin-top: 24px; }
#ywPopupZone .pz-actions button { min-height: 52px; padding: 12px 30px; border: 2px solid #fff; border-radius: 30px; background: transparent; color: #fff; font-size: 16px; font-weight: 700; }
#ywPopupZone .pz-actions .pz-close { border-color: #222; background: #222; }
@media (max-width:1100px) { #ywPopupZone .pz-grid { grid-template-columns: repeat(2,minmax(0,350px)); gap: 24px; } }
@media (max-width:600px) {
    #ywPopupZone { padding: 12px; }
    #ywPopupZone .pz-panel { padding: 24px 40px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
    #ywPopupZone .pz-title { font-size: 28px; margin-bottom: 24px; }
    #ywPopupZone .pz-grid { grid-template-columns: minmax(0,350px); gap: 0; }
    #ywPopupZone .pz-arrow { width: 34px; height: 34px; font-size: 24px; }
    #ywPopupZone .pz-prev { left: -36px; } #ywPopupZone .pz-next { right: -36px; }
    #ywPopupZone .pz-actions { justify-content: center; gap: 10px; }
    #ywPopupZone .pz-actions button { padding: 10px 18px; font-size: 14px; }
}

/* 두 장씩 이동, 페이지 점은 화면당 표시 수 기준으로 계산 */
#ywPopupZone .pz-slider { max-width: 1490px; margin: 0 auto; }
#ywPopupZone .pz-viewport { overflow: hidden; padding: 6px; }
#ywPopupZone .pz-grid { display: flex; justify-content: flex-start; gap: 26px; transition: transform .55s ease; will-change: transform; }
#ywPopupZone .pz-card { flex: 0 0 var(--pz-card-width,350px); width: var(--pz-card-width,350px); }
