@charset "utf-8";
    .gallery {
      display: flex;
      gap: 16px;
      align-items: flex-start;
      flex-wrap: wrap;
    }

    /* 縮圖：固定寬度，高度依比例自動 */
    .thumbnail {
      width: 180px;
      height: auto;
      cursor: pointer;
      border-radius: 5px;
      display: block;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
      transition: transform 0.2s ease;
      margin:0 auto;
    }

    .thumbnail:hover {
      transform: scale(1.03);
    }

    /* Modal */
    .custom-popup-modal {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.7);
      z-index: 999;
      justify-content: center;
      align-items: center;
      padding: 20px;
    }

    .custom-popup-modal.is-active {
      display: flex;
    }

    .custom-popup-content {
      position: relative;
      display: inline-block;
    }

    /* 原圖保持比例 */
    .custom-popup-content img {
      display: block;
      max-width: 90vw;
      max-height: 90vh;
      width: auto;
      height: auto;
      border-radius: 5px;
      box-shadow: 0 6px 24px rgba(0,0,0,0.35);
    }

    .close-btn {
      position: absolute;
      top: -14px;
      right: -14px;
      width: 36px;
      height: 36px;
      border: none;
      border-radius: 50%;
      background: #fff;
      font-size: 22px;
      font-weight: bold;
      cursor: pointer;
      box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    }


