/* 삼정원 팝업 전용: 기존 테마/게시판의 h2, button 규칙과 분리한다. */
#sj-popup {position:fixed;inset:0;z-index:2147483000;overflow:auto;overscroll-behavior:contain;font-family:var(--font-main, "Malgun Gothic", sans-serif);color:#203848}
#sj-popup[hidden], #sj-popup [hidden] {display:none !important}
#sj-popup, #sj-popup * {box-sizing:border-box}
#sj-popup .sj-popup__backdrop {position:fixed;inset:0;background:rgba(17,35,48,.46)}
#sj-popup[data-backdrop="blur"] .sj-popup__backdrop {background:rgba(17,35,48,.28);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
#sj-popup[data-backdrop="none"] .sj-popup__backdrop {background:transparent}
#sj-popup .sj-popup__stage {position:relative;display:flex;align-items:center;justify-content:center;min-height:100%;padding:16px;pointer-events:none}
#sj-popup .sj-popup__card {position:relative;display:flex;flex-direction:column;width:var(--sj-width,450px);max-width:100%;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow:hidden;border:1px solid rgba(255,255,255,.6);border-radius:22px;background:#fff;box-shadow:0 24px 90px rgba(7,29,44,.28);pointer-events:auto}
#sj-popup .sj-popup__header {display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0;min-height:60px;padding:10px 16px 10px 22px;border-bottom:1px solid #edf2f5}
#sj-popup .sj-popup__title {position:static;overflow:hidden;display:block;margin:0;font-size:15px;font-weight:600;line-height:1.5;color:#29485c;text-overflow:ellipsis;white-space:nowrap}
#sj-popup button {font:inherit;cursor:pointer;touch-action:manipulation}
#sj-popup button:focus-visible, #sj-popup a:focus-visible, #sj-popup .sj-popup__content:focus-visible {outline:3px solid #168fce;outline-offset:-3px}
#sj-popup .sj-popup__x {display:flex;align-items:center;justify-content:center;flex-shrink:0;width:40px;height:40px;padding:0;border:0;border-radius:50%;background:#f1f6f9;color:#38566a;font-size:26px;line-height:1}
#sj-popup .sj-popup__content {min-height:0;max-height:var(--sj-height,500px);overflow:auto;overscroll-behavior:contain;background:#fff;overflow-wrap:anywhere;scrollbar-width:thin}
#sj-popup .sj-popup__content img {max-width:100%;height:auto}
#sj-popup .sj-popup__content h2 {position:static;font-size:1.5em;line-height:1.5;overflow:visible}
#sj-popup .sj-popup__content.is-image {display:flex;justify-content:center;align-items:center;flex-shrink:1;overflow:hidden}
#sj-popup[data-mode="slider"] .sj-popup__content.is-image {touch-action:pan-y pinch-zoom}
#sj-popup .sj-popup__content.is-image > a {display:flex;align-items:center;justify-content:center;max-width:100%;max-height:100%}
#sj-popup .sj-popup__content.is-image img {display:block;width:auto !important;height:auto !important;max-width:100% !important;max-height:min(var(--sj-height,500px),calc(100vh - 224px)) !important;max-height:min(var(--sj-height,500px),calc(100dvh - 224px)) !important;object-fit:contain;margin:0 !important}
#sj-popup .sj-popup__nav {display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0;padding:8px 18px;border-top:1px solid #edf2f5;background:#fff}
#sj-popup .sj-popup__arrow {display:flex;align-items:center;justify-content:center;width:36px;height:36px;border:1px solid #dce7ee;border-radius:50%;background:#fff;color:#26485c;font-size:22px}
#sj-popup .sj-popup__counter {font-size:13px;letter-spacing:2px;color:#506b7d;font-variant-numeric:tabular-nums}
#sj-popup .sj-popup__footer {display:flex;align-items:center;justify-content:space-between;gap:10px;flex-shrink:0;padding:12px 16px;border-top:1px solid #e4edf3;background:#f6fafc}
#sj-popup .sj-popup__reject {min-height:44px;min-width:0;padding:8px 6px;border:0;border-radius:8px;background:transparent;color:#526b7b;font-size:12px;text-align:left;word-break:keep-all}
#sj-popup .sj-popup__close {min-height:44px;flex-shrink:0;padding:10px 20px;border:0;border-radius:10px;background:#146ea6;color:#fff;font-size:13px;font-weight:600}
#sj-popup .sj-popup__close:hover {background:#0e5a87}
#sj-popup .sj-popup__reject:hover, #sj-popup .sj-popup__arrow:hover {background:#e8f2f8}
#sj-popup .sj-popup__content.is-entering {animation:sj-popup-enter .18s ease-out}
#sj-popup[data-mode="individual"] .sj-popup__stage {display:block;min-height:100%;padding:16px}
#sj-popup[data-mode="individual"] .sj-popup__card {position:absolute;top:var(--sj-top,16px);left:var(--sj-left,16px);max-width:calc(100vw - 32px);margin-bottom:16px}
#sj-popup .sj-popup__all-close {position:fixed;top:12px;right:12px;z-index:1;min-height:44px;padding:10px 16px;border:1px solid #dae5ec;border-radius:24px;background:#fff;color:#29485c;box-shadow:0 4px 20px #172f4826;pointer-events:auto}
@keyframes sj-popup-enter {from{opacity:.55;transform:translateX(10px)}to{opacity:1;transform:translateX(0)}}
@media (max-width:767px) {
  #sj-popup .sj-popup__card {border-radius:18px}
  #sj-popup .sj-popup__header {padding-left:16px}
  #sj-popup[data-mode="individual"] .sj-popup__stage {padding-top:68px}
  #sj-popup[data-mode="individual"] .sj-popup__card {position:relative;top:auto;left:auto;margin:0 auto 16px}
}
@media (prefers-reduced-motion:reduce) {#sj-popup .sj-popup__content.is-entering {animation:none}}
