/* 全站點擊彈窗：尺寸由 inc/config.php 決定，預設 340 × 820。
   視窗放不下時等比縮小，保證整塊內容完整可見、不被裁切。 */

.site-popup {
  position: fixed;
  inset: 0;
  z-index: 2147483647; /* 蓋過頁面所有圖層 */
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .55);
  -webkit-tap-highlight-color: transparent;
}

.site-popup.is-open {
  display: flex;
}

.site-popup-panel {
  position: relative;
  width: 340px;              /* JS 會用 data-popup-width 覆蓋 */
  height: 820px;             /* JS 會用 data-popup-height 覆蓋 */
  flex: 0 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .45);
  transform-origin: center center;
}

.site-popup-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.site-popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .35);
  color: #fff;
  font-size: 18px;
  line-height: 28px;
  text-align: center;
  cursor: pointer;
}

.site-popup-close:hover {
  background: rgba(0, 0, 0, .6);
}

body.site-popup-open {
  overflow: hidden;
}
