.modal {
  display: none; /* ?設?? */
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 9999;
}
.modal.show {
  display: block;
}

.modal-wrapper {
  position: absolute;
	width: 400px;
  height: 300px;
	box-sizing: border-box; 
  padding: 10px;
  background: #fff; /* ?????陰影??????*/
  padding: 8px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
	display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
}

.modal-img {
  display: block;
  width: 100%;
  height: 100%;
	object-fit: contain;
}

/* ???? (X) 移到??角????*/
.close-btn {
  position: absolute;
  top: -12px;
  right: -12px;
  background-color: #333;
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  text-align: center;
  line-height: 26px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.trigger-btn {
  font-weight: 500;
  cursor: pointer;
	margin: 0 3px;
  
  /* 常?顯示??底? */
  text-decoration: underline dotted #000000; 
  text-underline-offset: 4px; /* 讓?線???保??適距離 */
  text-decoration-thickness: 0.08em; /* 讓?線?微?一點???機????*/
	-webkit-hyphens: auto;
	-ms-hyphens: auto;
	hyphens: auto;
	word-break: break-word;
}

.trigger-btn:active {
  background-color: rgba(201, 0, 0, 0.1); /* ???給一?淡淡??景???*/
  border-radius: 4px;
}
/* --- ????(例? 768px 以?)：螢幕正中央 --- */
@media (max-width: 767px) {
  .modal {
    background-color: rgba(0, 0, 0, 0.6); /* ????上?顯??透?黑??罩 */
  }
  .modal-wrapper {
    /* 強制置中，並?? !important ???JS ???樣式???*/
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
    width: 85vw; /* ?????????滿 */
	  height: auto;
    max-height: 80vh;
  }
  .modal-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}
	/* =========================================
   ? ??：自訂????影??(@keyframes)
   ========================================= */

/* 1. ?景?罩?淡????*/
@keyframes bgFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 2. ??容器?浮????(??度??+ 從???15px ??上?) */
@keyframes wrapperSlideUp {
  from {
    opacity: 0;
    margin-top: 15px; 
  }
  to {
    opacity: 1;
    margin-top: 0; 
  }
}

/* =========================================
   ? 將????到彈跳窗?
   ========================================= */

/* ??JS ?? .show 類別??觸發?景淡入 */
.modal.show {
  display: block;
  animation: bgFadeIn 0.25s ease-out forwards;
}

/* ??觸發??容器?浮????*/
.modal.show .modal-wrapper {
  animation: wrapperSlideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  /* cubic-bezier ?產??種「快??????平?減速?住」?高?彈性???*/
}