@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400..900&family=Lora:ital,wght@0,400..700;1,400..700&family=Noto+Sans+JP:wght@100..900&family=Noto+Serif+TC:wght@200..900&family=Noto+Serif:ital,wght@0,100..900;1,100..900&family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');
/*.lora-<uniquifier> {
  font-family: "Lora", serif;
  font-optical-sizing: auto;
  font-weight: <weight>;
  font-style: normal;
}*/

/*
Bickham Script Pro 3 Regular
font-family: "bickham-script-pro-3", sans-serif;
font-weight: 400;
font-style: normal;
Bickham Script Pro 3 Bold
font-family: "bickham-script-pro-3", sans-serif;
font-weight: 700;
font-style: normal;
*/
.Bickham-Script-Pro-3-Regular{
font-family: "bickham-script-pro-3", sans-serif;
font-weight: 400;
font-style: normal;
}
.lora-Regular{
  font-family: "Lora", serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

body,
html {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    position: relative;
    width: 100%;
    height: auto;
    min-height: 100%;
    margin: 0;
    padding: 0;
    --vw-base: calc(100vw / 1920);
    background-color: #f3eee7;
    cursor: none;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    padding: 0;
}

a:link,
a:visited,
a:hover,
a:active {
    text-decoration: none;
}

button,
input,
textarea,
select,
option {
    margin: 0;
    padding: 0;
    -webkit-appearance: none;
    -webkit-border-radius: 0px;
    border-radius: 0;
    -moz-appearance: none;
    appearance: none;
    outline: none;
}
ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
video {
    object-fit: cover;
    width: 100%;
    height: 100%;
    position: relative;
    display: block;
}

/* ============================================================
   AOS 文字修正：保留 scaleX(0.95) 並確保進場動畫正常
   ============================================================ */

/* 1. 初始狀態：我們只負責位移與縮放，透明度交給 AOS 處理 */
[data-aos="fade-up"].m1-cent-title,
[data-aos="fade-up"].m1-cent-detail,
[data-aos="fade-up"].m1-cent-des {
    /* 這裡必須包含 AOS 原生的 translate，並加上你的 scaleX */
    transform: translate3d(0, 30px, 0) scaleX(0.95);
    /* 移除手寫的 opacity: 0，避免跟 AOS 衝突 */
}

/* 2. 進場後：當 AOS 加上 .aos-animate 時，回到原位 (0) 並保持縮放 */
[data-aos="fade-up"].m1-cent-title.aos-animate,
[data-aos="fade-up"].m1-cent-detail.aos-animate,
[data-aos="fade-up"].m1-cent-des.aos-animate {
    /* 強制維持縮放，位移歸零 */
    transform: translate3d(0, 0, 0) scaleX(0.95) !important;
}

/* 3. 額外保險：確保文字原本的定義裡沒有會打架的 transform */
.m1-cent-title, .m1-cent-detail, .m1-cent-des {
    /* 原本標籤內的 transform 建議移除，統一由上面的 AOS 邏輯管理 */
    opacity: 1; 
}


.container {
    width: 100%;
    height: auto;
    position: relative;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease;
}

.no-scroll {
    overflow: hidden;
    /* 禁止滚动条 */
    touch-action: none;
    /* 禁止移动端触摸滚动 */
    position: fixed;
    /* 防止页面跳动 */
    width: 100%;
    height: 100vh;
}
.opacity {
    opacity: 1;
    position: relative;
    visibility: visible;
}

/*影片區*/
.main1 {
    position: relative;
    width: 100%;
    min-height: calc(950 * var(--vw-base));
    overflow: hidden;
    background-color: #f3eee7;
}
.m1-line1{
    width: 1px;
    height: 0%;
    background-color:rgba(137,126,121,0.5);
    position: absolute;
    left: 12.7vw;
    top: 0vw;
    overflow: hidden; 
    z-index: 10;
    opacity: 0;
}
.m1-line1.active{
    animation: m1-1-line 1s linear;
    animation-delay: 0s;
    animation-fill-mode: forwards;
}
.m1-line2{
    width: 1px;
    height: 0%;
    background-color:rgba(137,126,121,0.5);
    position: absolute;
    left: 69vw;
    bottom: 0vw;
    overflow: hidden;
    z-index: 10;
    opacity: 0;
}
.m1-line2.active{
    animation: m1-2-line 1s linear;
    animation-delay: 0.5s;
    animation-fill-mode: forwards;
}

.m1-line3{
    width: 1px;
    height: 0%;
    background-color:rgba(137,126,121,0.5);
    position: absolute;
    left: 86.5vw;
    top: 0vw;
    overflow: hidden;
    z-index: 5;
    opacity: 0;
}
.m1-line3.active{
    animation: m1-3-line 1s linear;
    animation-delay: 1s;
    animation-fill-mode: forwards;
}

/* 修正後的 Keyframes */
@keyframes m1-1-line { 
    from { height: 0; opacity: 0; } 
    to { height: 100%; opacity: 1; } 
}
@keyframes m1-2-line { 
    from { height: 0; opacity: 0; } 
    to { height: 100%; opacity: 1; } /* 🚀 這裡原本是 0 */
}
@keyframes m1-3-line { 
    from { height: 0%; opacity: 0; } 
    to { height: 100%; opacity: 1; } /* 🚀 這裡原本是 0 */
}

.m1-cent-box{
    width: calc(1016 * var(--vw-base));
    margin: 10vw 0 10vw 12.7vw;
    position: relative;
    overflow: hidden;
}
.m1-cent-img {
  position: relative;
  width: calc(1016 * var(--vw-base));
  height: calc(465 * var(--vw-base));
  overflow: hidden; /* 確保切掉外面模糊的邊緣 */
  transition: clip-path 0.8s cubic-bezier(.16,1,.3,1);
  background-color: #000;
  
  /* 關鍵修正：讓父層原圖尺寸歸零，防止邊緣滲漏 */
  background-size: 0 !important;
  margin: 2vw auto; 
}

.m1-cent-img:before {
  content: "";
  position: absolute;
  /* 關鍵修正：將範圍擴大，確保模糊的半透明邊緣在容器外 */
  inset: -20px; 
  background-image: inherit; 
  background-repeat: no-repeat !important;
  background-size: 200% 200%;
  background-position: center center;
  /* 模糊度 */
  filter: blur(8px); 
  /* 遮罩感 */
  background-color: rgba(0, 0, 0, 0.6);
  background-blend-mode: multiply;
  
  z-index: 1;
  /* 確保沒有 transition 影響縮放，或是維持與父層一致 */
  pointer-events: none; 
}
/* 確保獎狀圖片不受模糊影響 */
.m1-cent-img img {
  position: absolute;
  top: 50%; 
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  transition: transform 0.6s ease;
  /* 防止圖片邊緣也出現奇怪的採樣 */
  backface-visibility: hidden;
}
.m1-cent-img img.imgH { height: 100.5%; width: auto; }
.m1-cent-img img.imgW { width: 100.5%; height: auto; }

.m1-cent-title{
    color: #756b66;
    line-height: calc(35 * var(--vw-base));
    font-size: calc(27 * var(--vw-base));
    font-family: 'Noto Serif TC', sans-serif;
    letter-spacing: 0.05em;
    font-weight: 600;
    display: block;
    transform: scaleX(0.95);
    transform-origin: left center;
    padding: 0vw 3vw;
}
.m1-cent-detail{
  color: #c5a583;
  line-height: calc(25 * var(--vw-base));
  font-size: calc(18 * var(--vw-base));
  font-family: 'Noto Serif TC', sans-serif;
  letter-spacing: 0.05em;
  font-weight: 600;
  display: block;
  transform: scaleX(0.95);
  transform-origin: left center;
  padding: 1vw 3vw;
}
.m1-cent-des{
  color: #756b66;
  line-height: calc(40 * var(--vw-base));
  font-size: calc(20 * var(--vw-base));
  font-family: 'Noto Serif TC', sans-serif;
  letter-spacing: 0.05em;
  font-weight: normal;
  display: block;
  transform: scaleX(0.95);
  transform-origin: left center;
  padding: 0 3vw;
}


/*main2*/
#main2{
    position: relative;
    width: 100%;
    min-height: calc(430 * var(--vw-base));
    overflow: hidden;
    background-color: #f3eee7;
}
.m2-line1{
    width: 1px;
    height: 100%;
    background-color:rgba(137,126,121,0.5);
    position: absolute;
    left: 12.7vw;
    top: 0vw;
    overflow: hidden; 
    z-index: 10;
    opacity: 1;
}
.m2-line1.active{
    animation: m2-1-line 1s linear;
    animation-delay: 0s;
    animation-fill-mode: forwards;
}
.m2-line2{
    width: 1px;
    height: 100%;
    background-color:rgba(137,126,121,0.5);
    position: absolute;
    left: 69vw;
    bottom: 0vw;
    overflow: hidden;
    z-index: 10;
    opacity: 1;
}
.m2-line2.active{
    animation: m2-1-line 1s linear;
    animation-delay: 0.5s;
    animation-fill-mode: forwards;
}

.m2-line3{
    width: 1px;
    height: 100%;
    background-color:rgba(137,126,121,0.5);
    position: absolute;
    left: 86.5vw;
    top: 0vw;
    overflow: hidden;
    z-index: 5;
    opacity: 1;
}
.m2-line3.active{
    animation: m2-1-line 1s linear;
    animation-delay: 0.3s;
    animation-fill-mode: forwards;
}

@keyframes m2-1-line { 
    from { height: 100%; opacity: 1; } 
    to { height: 100%; opacity: 1; } 
}


.m2-line4{
    width: 0%;
    height: 1px;
    background-color:rgba(137,126,121,0.5);
    position: absolute;
    left: 0vw;
    top: 0vw;
    overflow: hidden;
    z-index: 5;
    opacity: 0;
}
.m2-line4.active{
    animation: m2-4-line 1s linear;
    animation-delay: 0s;
    animation-fill-mode: forwards;
}

.m2-line5{
    width: 0%;
    height: 1px;
    background-color:rgba(137,126,121,0.5);
    position: absolute;
    right: 0vw;
    bottom: 0vw;
    overflow: hidden;
    z-index: 5;
    opacity: 0;
}
.m2-line5.active{
    animation: m2-5-line 1s linear;
    animation-delay: 0s;
    animation-fill-mode: forwards;
}

/* 修正後的 Keyframes */
@keyframes m2-4-line { 
    from { width: 0; opacity: 0; } 
    to { width: 69vw; opacity: 1; } 
}
@keyframes m2-5-line { 
    from { width: 0; opacity: 0; } 
    to { width: 100%; opacity: 1; } 
}


/* =========================================
   相關連結區域 (Related Links)
========================================= */

/* 1. 外部容器：確保與你的背景色一致 */
.related-links-section {
    width: 100%;
    background-color: #f3eee7;
    position: relative;
    overflow: hidden;

    /* 核心置中設定 */
    display: flex;          /* 啟用 Flexbox */
    align-items: center;    /* 垂直居中 */
    justify-content: center; /* 水平居中 (若內容未滿 100% 寬度時有效) */
    
    /* 高度設定 */
    min-height: calc(430 * var(--vw-base)); /* 或是設定為 100vh */
    padding: 0;        /* 增加上下呼吸空間，防止小螢幕時內容貼邊 */
}

/* 2. 主排版容器：關鍵在於 align-items: stretch */
.m-link-container {
    display: flex;
    width: 68vw; /* 限制最大寬度保持質感 */
    margin: 0 auto 0 0;
    align-items: stretch; 
    position: relative;
}

/* 3. 左側標題區：垂直線的來源 */
.m-link-left {
    flex: 0 0 20vw; /* 佔寬 30% */
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 1vw;
    /* 這條線會隨著右側內容高度自動延伸 */
    border-right: 1px solid rgba(137, 126, 121, 0.5); 
}

.m-link-label {
    color: #756b66;
    font-family: 'Noto Serif TC', sans-serif;
    font-size: calc(22 * var(--vw-base));
    letter-spacing: 0.1em;
    font-weight: 600;
    line-height: calc(30 * var(--vw-base));
    /* 保持文字略微壓扁的設計感 (選用) */
    transform: scaleX(0.95);
    transform-origin: right center;
}

/* 4. 右側列表區 */
.m-link-list {
    flex: 1;
    padding-left: 1vw;
    display: flex;
    flex-direction: column;
    justify-content: center; /* 讓連結在高度中垂直居中 */
    gap: 1vw; /* 每個連結之間的垂直間距 */
}

/* 5. 連結文字樣式與滑入反應 */
.m-link-item {
    list-style: none;
    position: relative;
}

.m-link-anchor {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1; /* 這裡設定：超過 2 行就出現 ... */
    overflow: hidden;
    text-overflow: ellipsis;

    /* 以下是你原本的樣式 */
    color: #897e79;
    font-family: 'Noto Serif TC', sans-serif;
    font-size: calc(16 * var(--vw-base));
    line-height: calc(30 * var(--vw-base));
    text-decoration: none;
    letter-spacing: 0.1em;
    transition: all 0.5s ease;
    transform: scaleX(0.95);
    transform-origin: left center;
}

.m-link-anchor:hover {
    color: #c5a583;
}








/* =========================================
   MAIN4（完整整理版）
========================================= */

/* main4 容器 */
.main4{
  position: relative;
  width: 100%;
  height: calc(950*var(--vw-base));
  overflow: hidden;
  background-color: #eae0d7;
  z-index: 10;
}
.main4 > img{
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 標題區 */
.m4-txt{
    position: absolute;
    top: 0vw;
    left: 0;
    width: 50vw;
    z-index: 105;
}
.m4-txt-title{
    position: absolute;
    left: 10.5vw;
    top: 3.5vw;
    width: calc(287 * var(--vw-base));
    height: calc(365 * var(--vw-base));
    transition: all .35s ease-in-out;
    opacity: 0;
}
.m4-txt-title .t1{
    color:#b6aaa0;
    font-family: "Lora", serif;
    font-weight: 600;
    font-size:calc(48 * var(--vw-base));
    line-height:3vw;
    letter-spacing:0.08em;
    writing-mode:vertical-rl;
  display:block;
  transform: scaleX(0.95);
  transform-origin: left center;
}
.m4-txt-title .t2{
    position: absolute;
    left: -7.1vw;
    top: 8vw;
    color: #b6aaa0;
    width: 10vw;
    text-align: right;
    line-height: 3vw;
    font-size: calc(22 * var(--vw-base));
    font-family: 'Noto Serif TC', sans-serif;
    letter-spacing: 0.08em;
    font-weight: 600;
  display:block;
  transform: scaleX(0.95);
  transform-origin: left center;
}
.m4-txt-title.active{
    animation: m4-title 1.5s ease;
    animation-delay: 1s;
    animation-fill-mode: forwards;
}
@keyframes m4-title {
    0% {
        opacity: 0;
        left: 9.5vw;
    }
    100% {
        opacity: 1;
        left: 10.5vw;
    }
}


.m4-txt-title img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.m4-txt-line{
  width: 0vw;
  height: 1px;
  background-color: rgba(89, 80, 76, 1);
  position: absolute;
  left: 9.8vw;
  top: 0.45vw;
  transition: all .5s ease-in-out;
}
.m4-txt-line.active{
  animation: m4-line 1s linear;
  animation-delay: 1s;
  animation-fill-mode: forwards;
}
@keyframes m4-line {
  0% { width: 0vw; }
  100% { width: 4.5vw; }
}

/* 左側遮罩圖 */
.m4-mask{
  width: calc(260*var(--vw-base));
  height: calc(950*var(--vw-base));
  z-index: 90;
  position: absolute;
  left: 0;
  top: 0;
}

/* 分隔線（你原本三條線） */
.m4-line1,
.m4-line2,
.m4-line3{
  width: 1px;
  height: calc(0*var(--vw-base));
  background-color:rgba(137,126,121,0.5);
  position: absolute;
  overflow: hidden;
  z-index: 100;
}
.m4-line1{ left: 12.7vw; top: 0; }
.m4-line2{ left: 69vw; bottom: 0; }
.m4-line3{ left: 86.5vw; top: 0; }

.m4-line1.active{
  animation: m4-1-line 2s linear;
  animation-fill-mode: forwards;
}
.m4-line2.active{
  animation: m4-2-line 2s linear;
  animation-delay: 0.5s;
  animation-fill-mode: forwards;
}
.m4-line3.active{
  animation: m4-3-line 2s linear;
  animation-delay: 1s;
  animation-fill-mode: forwards;
}

@keyframes m4-1-line { from{ height:0 } to{ height: calc(1950*var(--vw-base)); } }
@keyframes m4-2-line { from{ height:0 } to{ height: calc(1950*var(--vw-base)); } }
@keyframes m4-3-line { from{ height:0 } to{ height: calc(1950*var(--vw-base)); } }


/* ===============================
   M4 基本版型
================================ */
:root{
  /* ===== 等比系統（照你站的慣例） ===== */
  --vw-base: calc(100vw / 1920);

  --bg:#eae0d7;
  --ink:#111;
  --muted: rgba(0,0,0,.55);
  --line: rgba(0,0,0,.18);

  /* ===== 線位置（照圖） ===== */
  --line2: 69vw;
  --line3: 86.5vw;

  /* ===== 卡片尺寸（照圖：正方形） ===== */
  --cardW: calc(336 * var(--vw-base));
  --imgH:  calc(336 * var(--vw-base));

  /* 向上長的高度 */
  --imgGrow: calc(50 * var(--vw-base));

  /* ===== 關鍵：間距（照圖偏大） =====
     設計稿 px(@1920)，JS 會換算成 px */
  --gapDesign: 185;

  /* ===== 關鍵：讓第 3 張落在兩線中間 =====
     這個值我已經用「目標 band 中心」反推過，參考圖會很接近 */
  --stageLeft: calc(283 * var(--vw-base));

  /* ===== 右邊露出第四張 ===== */
  --peek: calc(230 * var(--vw-base));
}
/* ✅ 裁切到「線3 + peek」：只露一點點第四張 */
.m4-clip{
  position:relative;
  width: calc(var(--line3) + var(--peek));
  max-width: 100vw;
  overflow:visible;
  margin-top: calc(150 * var(--vw-base));
  z-index: 80;
}


/* Swiper */
#m4Swiper{
  width:100%;
  overflow:visible;
}
#m4Swiper .swiper-wrapper{
  display:flex;
  flex-wrap:nowrap;
  align-items:flex-start;
  padding-left: var(--stageLeft);
}
#m4Swiper .swiper-slide{
  width: var(--cardW) !important;
  flex: 0 0 auto !important;
  margin-right: 0; /* 間距交給 spaceBetween */
}
#m4Swiper{
  position: relative;
  /* ✅ 讓 Swiper 容器本身覆蓋你想要可拖的整塊高度
     你可以依你的版型調大一點 */
  padding-bottom: calc(120 * var(--vw-base)); 
}

#m4Swiper .m4-drag-layer{
  position: absolute;
  inset: 0;
  z-index: 0;            /* ✅ 在背後 */
  background: transparent;
}

/* ✅ slides / scrollbar 在上層 */
#m4Swiper .swiper-wrapper,
#m4Swiper .swiper-scrollbar{
  position: relative;
  z-index: 2;
}

/* 游標手勢（可選） */
.m4-clip{ cursor: grab; }
.m4-clip:active{ cursor: grabbing; }


/* 卡片 */
.m4-card{
  display:block;
  text-decoration:none;
  color:inherit;
  user-select:none;
}
/* ✅ 1) thumb 永遠固定「最大高度」 */
.m4-thumb{
  position: relative;
  width: 100%;
  height: calc(var(--imgH) + var(--imgGrow)); /* ✅ 最大高度 */
  overflow: hidden;
  background: #000;

  /* ✅ 預設裁切：只顯示 imgH（從上裁掉 grow 的量） */
  clip-path: inset(var(--imgGrow) 0 0 0);
  transition: clip-path 0.8s cubic-bezier(.16,1,.3,1);
  will-change: clip-path;
}

/* ✅ 2) 圖片：底部對齊（很重要） */
.m4-thumb img{
  position:absolute;
  left:0;
  right:0;
  bottom:0;        /* ✅ 貼底 */
  top:auto;        /* ✅ 不要 top:0 */
  width:100%;
  height:100%;
  object-fit: cover;
  object-position: center bottom; /* ✅ 取景偏底 */
  display:block;
}

/* ✅ 3) 遮色片：預設開 */
.m4-thumb::after{
  content:"";
  position:absolute;
  inset:0;
  background-color:#59504c;
  opacity:0.5;
  z-index:2;
  pointer-events:none;
  transition: opacity 0.55s cubic-bezier(.2,.8,.2,1);
  will-change: opacity;
}


.m4-sline{
    width: 1vw;
    height: 1px;
    position: relative;
    margin: 1vw 0.5vw 0 0.5vw;
    padding: 0;
    background-color: #897e79;
}
.m4-meta{
  width: 100%;
  position: relative;
  padding-top: 10px;
}
.m4-date{
  font-size: calc(22 * var(--vw-base));
  line-height: calc(30 * var(--vw-base));
  letter-spacing: .2em;
  color: #897e79;
  margin: 0;
  font-family: "Lora", serif;
  font-weight: 600;
  padding: 0 10px;
}
.m4-title{
  letter-spacing: .2em;
  margin: 0;
  color: #897e79;
  font-size: calc(22 * var(--vw-base));
  line-height: calc(22 * var(--vw-base));
  font-family: "Noto Serif TC";
  font-weight: 700;
  padding: 0 10px;
}
.m4-sline{
    width: 1vw;
    height: 1px;
    position: relative;
    margin: 1vw 0.5vw 0 0.5vw;
    padding: 0;
    background-color: #897e79;
}
.m4-desc{
  letter-spacing: .2em;
  margin: 0;
  color: #897e79;
  font-size: calc(16 * var(--vw-base));
  font-family: "Noto Serif TC";
  line-height: calc(30 * var(--vw-base));
  opacity: 0;
  transition: opacity 0.55s cubic-bezier(.2,.8,.2,1);
  will-change: opacity;
  text-align: justify;
  text-align-last: left;
  text-justify: inter-ideograph;
  padding: 20px 10px;
}
.m4-date,
.m4-title,
.m4-desc{
  display:block;
  transform: scaleX(0.95);
  transform-origin: left center;
}
#m4-news-swiper .swiper-slide.is-focus .m4-desc{
  opacity: 1;
}

/* slot4 首屏隱藏 */
#m4-news-swiper .swiper-slide.is-slot4.is-hidden{
  opacity: 0;
}
/* ✅ focus：遮色片關 + desc 顯示（你原本保留） */
.swiper-slide.is-focus .m4-thumb::after{ opacity:0;}
/* ===============================
   scrollbar
================================ */
#m4-scroll{
  position: absolute !important;
  left: 15vw !important;
  right: auto !important;
  top: 37vw !important;
  bottom: auto !important;
  height: 3px !important;
  margin: 0 !important;
  background: transparent !important;
  overflow: hidden !important;
  border-radius: 0 !important;
  z-index: 10;
}
#m4-scroll{
  cursor: pointer;
}

#m4-scroll .m4-scrollbar-bg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 3px;
  background-image: url(../img/m4-barbg.png);
  background-position: 100% 50%;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 0;
}
#m4-scroll  .swiper-scrollbar-drag{
  height: 1px !important;
  width: 100%;
  position: relative;
  background: rgba(89, 80, 76, 1);
  border-radius: 0;
  left: 0;
  top: 0;
}
/* 這是那個關鍵的「右側特別圖案」 */
.m4-special-pattern {
  position: absolute;
  right: 0;
  top: 0;
  width: 19px; 
  height: 3px;
  background-image: url(../img/m4-barbgafdot.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: right center;
  
  opacity: 0; /* 預設隱藏 */
  transition: opacity 0.3s ease-out 0.1s;
  z-index: 3; /* 確保在 drag 之上或之下，視設計而定 */
  pointer-events: none;
}

/* 當 JS 判定到最右邊時，切換此 Class */
#m4-scroll.is-at-end .m4-special-pattern {
  opacity: 1;
}


/* ✅ focus：永遠是兩線中間那張 */
.swiper-slide.is-focus .m4-thumb::after{ opacity:0; }
.swiper-slide.is-focus .m4-desc{ opacity:1; }


/* 1) clip 當定位容器，避免 absolute 層亂飛 */
#main4 .m4-clip{
  position: relative;
}

/* 2) 裝飾層永遠不吃事件（避免偶發蓋住 swiper） */
#main4 .m4-drag-layer,
#main4 .m4-mask{
  pointer-events: none;
}

/* 3) Shield：預設完全穿透；只有 is-on 才擋 */
#main4 .m4-hover-shield{
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 20;           /* 只要高於卡片即可，不要亂拉到 999 */
  pointer-events: none !important;
}

#main4 .m4-hover-shield.is-on{
  pointer-events: auto;  /* 開啟時才擋 */
}

/* 4) 確保 swiper / 卡片層在 shield 底下（或同層） */
#main4 #m4Swiper{
  position: relative;
  z-index: 10;
}

/* 如果你的 .m4-card 有自己的 z-index，可補強一下 */
#main4 .m4-card{
  position: relative;
  z-index: 11;
}


/* ✅ 只要在滑動/拖曳狀態，一律保持低（不管 hover 不 hover） */
#main4.is-dragging-m4 #m4Swiper .m4-thumb{
  clip-path: inset(var(--imgGrow) 0 0 0) !important;
}

/* ✅ 只有「視覺鎖定」那張，滑到圖片才變高 */
#m4Swiper .swiper-slide.is-focus-lock .m4-thumb:hover,
#m4Swiper .swiper-slide.is-focus-lock .m4-thumb:focus-within{
  clip-path: inset(0 0 0 0);
}

/* 遮色片/desc 也只在「focus-lock + hover 到圖片」才出現變化 */
.m4-thumb::after{ opacity:.5; transition: opacity .55s cubic-bezier(.2,.8,.2,1); }
.m4-desc{ opacity:0; transition: opacity .55s cubic-bezier(.2,.8,.2,1); }

#m4Swiper .swiper-slide.is-focus-lock .m4-thumb:hover::after,
#m4Swiper .swiper-slide.is-focus-lock .m4-thumb:focus-within::after{ opacity:0; }

#m4Swiper .swiper-slide.is-focus-lock .m4-thumb:hover ~ .m4-meta .m4-desc,
#m4Swiper .swiper-slide.is-focus-lock .m4-thumb:focus-within ~ .m4-meta .m4-desc{ opacity:1; }

/* ✅ 拖曳中完全禁止 hover 展開（防抖） */
#main4.is-dragging-m4 .m4-thumb:hover{
  clip-path: inset(var(--imgGrow) 0 0 0) !important;
}
#main4.is-dragging-m4 .m4-thumb:hover::after{ opacity:.5 !important; }
#main4.is-dragging-m4 .m4-thumb:hover ~ .m4-meta .m4-desc{ opacity:0 !important; }





/* =========================================
   Share Buttons 定位與樣式
========================================= */

.m1-share-wrapper {
    position: fixed;
    left: 10.8vw;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    opacity: 0;           /* 預設隱藏 */
    pointer-events: none; /* 隱藏時不可點擊 */
    transition: opacity 0.5s ease; /* 淡入淡出動畫 */
}

.m1-share-wrapper.is-visible {
    opacity: 1;
    pointer-events: auto;
}


/* 垂直分隔線 */
.share-sep-line {
    width: 0.8vw;
    height: 1px;       /* 線條長度 */
    background-color: #756b66; /* 使用你的品牌色（灰褐色） */
    opacity: 1;
    margin: 0.7vw auto;
}
/* 修改原本的 .share-item 讓它能容納疊加的圖片（如果需要絕對定位）
   但這裡建議用最簡單的 display 切換即可 */
.share-item {
    width: 1.5vw;
    height: 1.5vw;
    cursor: pointer;
    display: block; /* 確保連結撐開 */
    position: relative;
}
.share-item img {
    width: 100%;
    height: auto;
    display: block;
    /* 設定過渡時間 */
    transition: opacity 0.4s ease; 
}

.share-item .img-normal {
    opacity: 1;
}
.share-item .img-hover {
    opacity: 0;
    position: absolute;
    inset: 0;
}
.share-item:hover .img-normal {
    opacity: 0;
}
.share-item:hover .img-hover {
    opacity: 1;
}
