@charset "UTF-8";

/* @import 必須放在 @charset 之後、所有規則之前，否則會被瀏覽器忽略（原本寫在 :root 後面，字型都沒載入） */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&family=Noto+Serif+TC:wght@300;400;500;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@400;500;600;700;900&display=swap");
/* 主題店店家資訊的英數字（電話、時間、門牌）用 Poppins，與原設計圖一致 */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400&display=swap");

/*---- common ----*/
:root {
  --color-popup: #1fd0d8;
}

*,
a,
span {
  font-family: "Noto Sans TC", Arial, Helvetica, sans-serif;
}

a {
  text-decoration: none !important;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  cursor: pointer;
}

a:hover {
  transform: scale(1.05) rotate(-6deg);
}

/*====卷軸===*/
/* 細捲軸開始 */
::-webkit-scrollbar {
  height: 5px;
  overflow: visible;
  width: 5px;
}

/* 捲軸顏色取自頁面主色：平常咖啡 #6a3a22（說明文字）、hover 黃 #f8b830（店家資訊標籤）、按住紅 #b42018（遊戲下載按鈕） */
::-webkit-scrollbar-thumb {
  background-color: #6a3a22;
  background-clip: padding-box;
  border: solid transparent;
  border-width: 0 0 0 0px;
  min-height: 28px;
  padding: 100px 0 0;
  border-radius: 50px;
  box-shadow:
    inset 1px 1px 0 rgba(0, 0, 0, 0),
    inset 0 -1px 0 rgba(0, 0, 0, 0);
}

::-webkit-scrollbar-thumb:hover {
  background-color: #f8b830;
  box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0);
  border-radius: 50px;
}

::-webkit-scrollbar-thumb:active {
  background-color: #b42018;
  box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0);
  border-radius: 50px;
}

::-webkit-scrollbar-track {
  background-color: transparent;
  border-radius: 50px;
}

/* 細捲軸結束 */
html,
body {
  margin: 0;
  padding: 0;
  overflow: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  background: #000000;
}

.main {
  background-size: 100% auto;
  position: relative;
}

.fullpage {
  padding-top: 0;
  width: 100%;
  position: relative;
}

.fullpage .section {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-direction: column;
  color: #fff;
}

.fullpage .section .title_box {
  width: 80%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
}

.fullpage .section.header {
  /* KV 分層組成（與開場動畫共用圖片）：背景 opening/bg.webp（2560x1440，取上方 1427）＋ .header_kv 裡的人物、效果、底板 */
  background: url(../images/opening/bg.webp) center top / 100% auto no-repeat;
  position: relative;
  aspect-ratio: 2560/1427;
}

/* 人物位置依 KV 比對（PC 五人皆縮放 0.915）：--x / --y / --w 為 KV 2560x1427 上的左上角與寬度（px） */
.fullpage .section.header .header_kv {
  --fw: 2560;
  --fh: 1427;
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.fullpage .section.header .header_kv .kv_pp {
  position: absolute;
  left: calc(var(--x) / var(--fw) * 100%);
  top: calc(var(--y) / var(--fh) * 100%);
  width: calc(var(--w) / var(--fw) * 100%);
  height: auto;
}

.fullpage .section.header .header_kv .kv_pp_1 { --x: 1538; --y: 73; --w: 700; }
.fullpage .section.header .header_kv .kv_pp_2 { --x: 189; --y: 159; --w: 636; }
.fullpage .section.header .header_kv .kv_pp_3 { --x: 1221; --y: 152; --w: 756; }
.fullpage .section.header .header_kv .kv_pp_4 { --x: 724; --y: 132; --w: 391; }
.fullpage .section.header .header_kv .kv_pp_5 { --x: 1053; --y: 210; --w: 458; }

/* 效果（柔光暈＋格紋）與底板（底部拱形），皆與 KV 同框 */
.fullpage .section.header .header_kv .kv_eff,
.fullpage .section.header .header_kv .kv_cover {
  position: absolute;
  inset: 0;
  background: url(../images/bg/header_bg_cover_eff.webp) center top / 100% 100% no-repeat;
}

.fullpage .section.header .header_kv .kv_cover {
  background-image: url(../images/bg/header_bg_cover.webp);
}

.fullpage .section.header .logo {
  position: absolute;
  top: 0;
  left: 0.5vw;
  width: 25vw;
  aspect-ratio: 848/323;
  z-index: 1;
}

.fullpage .section.header .logo img {
  width: 100%;
}

.fullpage .section.header .title_box {
  width: 100%;
  height: 18vw;
  position: absolute;
  bottom: 7.8vw;
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-direction: row;
}

.fullpage .section.header .title_box .header_title_wrap {
  position: relative;
  width: auto;
  height: 100%;
  aspect-ratio: 1167/594;
  background-color: rgba(255, 0, 0, 0);
}

.fullpage .section.header .title_box .header_title_wrap .header_title {
  width: auto;
  height: 100%;
  display: block;
}

.fullpage .section.header .title_box .header_title_wrap .header_title_pop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  animation: header_pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: 1.2s;
  animation-fill-mode: both;
}

/* 手機版才出現的第二張彈出圖 */
.fullpage .section.header .title_box .header_title_wrap .header_title_pop_2 {
  display: none;
}

@keyframes header_pop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }

  60% {
    transform: scale(1.08);
    opacity: 1;
  }

  80% {
    transform: scale(0.97);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.fullpage .section.header .title_box .btn_box {
  width: auto;
  aspect-ratio: 1094/594;
  margin: 0;
  height: 100%;
  background-color: rgba(0, 0, 255, 0);
  background-size: 100% 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.3vw;
}

/* 雪碧圖按鈕：圖 510x400 上下兩格(一般 / hover)，單格 510x200；以高度 + 比例決定大小 */
.fullpage .section.header .title_box .btn_box .btn {
  display: block;
  position: relative;
  top: 3vw;
  height: 5.25vw;
  width: auto;
  aspect-ratio: 510/200;
  padding: 0;
  border: none;
  background-color: transparent;
  background-repeat: no-repeat;
  background-size: 100% 200%;
  background-position: 0 0;
  cursor: pointer;
  transition: none;
}

.fullpage .section.header .title_box .btn_box .btn:hover {
  background-color: transparent;
  background-position: 0 100%;
  transform: none;
}

.fullpage .section.header .title_box .btn_box .btn_entry {
  background-image: url(../images/header/btn_entry.webp);
}

.fullpage .section.header .title_box .btn_box .btn_dl {
  background-image: url(../images/header/btn_dl.webp);
}

.fullpage .section.header .title_box .btn_box .btn_camera {
  background-image: url(../images/header/btn_camera.webp);
}

/* header title_box：PC 依燒肉設計稿重新排版（設計稿 2560 寬，數值 = 設計稿 px ÷ 25.6）
   標題 1037x463 置中在上（距 header 頂 645px）→ 下方三顆按鈕一列置中（按鈕 669x250 顯示 440 寬，間距 60）
   按鈕左上角花朵 btn_deco（上紅、下金）：棕色按鈕配紅花、紅色按鈕配金花，hover 換色時花一起換。
   只作用在 PC，手機版維持原本規則。 */
@media only screen and (min-width: 769px) {
  /* 左上角 LOGO：設計稿為原尺寸 575x160，左上角在 (80, 50)；依需求上移至 top 10（2560 寬） */
  .fullpage .section.header .logo {
    top: 0.3906vw;
    left: 3.125vw;
    width: 22.46vw;
    aspect-ratio: 575/160;
  }

  .fullpage .section.header .title_box {
    top: 25.2vw;
    bottom: auto;
    height: auto;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }

  .fullpage .section.header .title_box .header_title_wrap {
    width: 40.51vw;
    height: auto;
    aspect-ratio: 1037/463;
  }

  .fullpage .section.header .title_box .header_title_wrap .header_title {
    width: 100%;
    height: auto;
  }

  .fullpage .section.header .title_box .btn_box {
    width: auto;
    height: auto;
    aspect-ratio: auto;
    margin-top: 2.73vw;
    gap: 2.34vw;
    align-items: flex-start;
  }

  .fullpage .section.header .title_box .btn_box .btn {
    top: 0;
    width: 17.19vw;
    height: auto;
    aspect-ratio: 669/250;
  }

  .fullpage .section.header .title_box .btn_box .btn::before {
    content: "";
    position: absolute;
    left: 0.2vw;
    top: -0.35vw;
    width: 2.1vw;
    aspect-ratio: 107/100;
    background: url(../images/header/btn_deco.webp) no-repeat 0 0 / 100% 200%;
    pointer-events: none;
    transition: transform 0.6s ease;
  }

  /* hover 按鈕時花朵轉一圈（移開時轉回） */
  .fullpage .section.header .title_box .btn_box .btn:hover::before {
    transform: rotate(360deg);
  }

  .fullpage .section.header .title_box .btn_box .btn:hover::before,
  .fullpage .section.header .title_box .btn_box .btn_dl::before {
    background-position: 0 100%;
  }

  .fullpage .section.header .title_box .btn_box .btn_dl:hover::before {
    background-position: 0 0;
  }

  /* KV 下拉提示三個倒三角（純 CSS）：依 v2 設計稿，三角 48x24、間距 40，整組置中、頂端 y=1125（header 2560x1427）。
     顏色 #ed706a，設計稿中間深、兩側約 50% 透明；動畫讓三個依序由左到右亮起，循環提示往下捲。 */
  .fullpage .section.header .scroll_hint {
    display: flex;
    justify-content: space-between;
    position: absolute;
    left: 50%;
    top: calc(1125 / 1427 * 100%);
    width: calc(224 / 2560 * 100%);
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 1;
  }

  .fullpage .section.header .scroll_hint span {
    display: block;
    width: calc(48 / 224 * 100%);
    aspect-ratio: 2/1;
    background: #ed706a;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    opacity: 0.5;
    animation: scroll_hint 1.8s ease-in-out infinite;
  }

  .fullpage .section.header .scroll_hint span:nth-child(2) {
    animation-delay: 0.3s;
  }

  .fullpage .section.header .scroll_hint span:nth-child(3) {
    animation-delay: 0.6s;
  }

  @keyframes scroll_hint {
    0%, 60%, 100% { opacity: 0.5; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(25%); }
  }

  /* 區塊一：EVENT.01 / EVENT.02 整列切圖＋按鈕，依 v2 設計稿量測（區塊 2560x1281，位置以區塊百分比表示）。
     camera 1965x317 於 (278,17)、yts 2011x808 於 (259,408)，原尺寸 1:1；
     按鈕雪碧圖 508x400（上半一般、下半 hover），設計稿縮為 62%（寬 316），於 (418,188)、(418,1099)。 */
  .fullpage .section.section1 .event_img {
    display: block;
    position: absolute;
    height: auto;
    pointer-events: none;
    user-select: none;
  }

  /* EVENT.01 拆成標題＋STEP 1~3（由 camera.webp 1965x317 切出，位置換算回區塊座標）：
     標題 568x162 於 (278,17)；STEP 卡 428x258 於 (893,76)、(1355,76)、(1816,76) */
  .fullpage .section.section1 .event_camera {
    left: calc(278 / 2560 * 100%);
    top: calc(17 / 1281 * 100%);
    width: calc(568 / 2560 * 100%);
  }

  .fullpage .section.section1 .event_step {
    top: calc(76 / 1281 * 100%);
    width: calc(428 / 2560 * 100%);
  }

  .fullpage .section.section1 .event_step1 {
    left: calc(893 / 2560 * 100%);
  }

  .fullpage .section.section1 .event_step2 {
    left: calc(1355 / 2560 * 100%);
  }

  .fullpage .section.section1 .event_step3 {
    left: calc(1816 / 2560 * 100%);
  }

  /* STEP 進場：由右往左淡入滑進，1→2→3 依序（進入畫面時 main.js 加 .is-in，只播一次） */
  .fullpage .section.section1 .event_step {
    opacity: 0;
    transform: translateX(30%);
    transition:
      opacity 0.6s ease-out,
      transform 0.6s ease-out;
  }

  .fullpage .section.section1 .event_step.is-in {
    opacity: 1;
    transform: none;
  }

  .fullpage .section.section1 .event_step2 {
    transition-delay: 0.15s;
  }

  .fullpage .section.section1 .event_step3 {
    transition-delay: 0.3s;
  }

  /* EVENT.02 拆成標題（含立牌）＋STEP 1~3（由 yts.webp 2011x808 切出，位置換算回區塊座標）：
     標題 604x230 於 (259,408)、立牌 458x418 於 (350,656)；
     STEP 1 428x766 於 (893,451)、STEP 2 428x750 於 (1354,451)、STEP 3 478x740 於 (1792,451) */
  .fullpage .section.section1 .event_yts {
    left: calc(259 / 2560 * 100%);
    top: calc(408 / 1281 * 100%);
    width: calc(604 / 2560 * 100%);
  }

  .fullpage .section.section1 .event_yts_stand {
    left: calc(350 / 2560 * 100%);
    top: calc(656 / 1281 * 100%);
    width: calc(458 / 2560 * 100%);
  }

  .fullpage .section.section1 .yts_step {
    top: calc(451 / 1281 * 100%);
    width: calc(428 / 2560 * 100%);
    /* 進場方向改為由下往上（覆寫 .event_step 的由右往左） */
    transform: translateY(15%);
  }

  .fullpage .section.section1 .yts_step1 {
    left: calc(893 / 2560 * 100%);
  }

  .fullpage .section.section1 .yts_step2 {
    left: calc(1354 / 2560 * 100%);
    transition-delay: 0.15s;
  }

  .fullpage .section.section1 .yts_step3 {
    left: calc(1792 / 2560 * 100%);
    width: calc(478 / 2560 * 100%);
    transition-delay: 0.3s;
  }

  .fullpage .section.section1 .event_btn {
    display: block;
    position: absolute;
    left: calc(418 / 2560 * 100%);
    width: calc(316 / 2560 * 100%);
    aspect-ratio: 508/200;
    background: no-repeat 0 0 / 100% 200%;
    cursor: pointer;
    /* 覆寫全域 a 的 transition，hover 時雪碧圖直接切換、不滑動 */
    transition: none;
    z-index: 1;
  }

  /* hover 只換雪碧圖下半，覆寫全域 a:hover 的放大傾斜 */
  .fullpage .section.section1 .event_btn:hover {
    background-position: 0 100%;
    transform: none;
  }

  /* 按鈕進場：與 KV 日期條相同的 header_pop 彈出（縮小透明 → 放大 → 回彈）。
     進入畫面時 main.js 加 .is-pop，延遲 0.6 秒讓它在上方標題翻牌後才彈出；彈出前不可點 */
  .fullpage .section.section1 .event_btn {
    opacity: 0;
    pointer-events: none;
  }

  .fullpage .section.section1 .event_btn.is-pop {
    pointer-events: auto;
    animation: header_pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s both;
  }

  .fullpage .section.section1 .event_btn_camera {
    top: calc(188 / 1281 * 100%);
    background-image: url(../images/section1/btn_camera.webp);
  }

  .fullpage .section.section1 .event_btn_yts {
    top: calc(1099 / 1281 * 100%);
    background-image: url(../images/section1/btn_yts.webp);
  }

  /* 區塊二：限定周邊，依 v2 設計稿量測（區塊 2560x1900，位置以區塊百分比表示）。
     title 545x133 於 (1007,155)，原尺寸 1:1；
     說明文字兩行置中，字高 35、行距 55、#6a3a22 粗體，第一行字頂 y=335。字級用 cqw 以區塊寬度換算。 */
  .fullpage .section.section2 {
    container-type: inline-size;
  }

  .fullpage .section.section2 .s2_title {
    display: block;
    position: absolute;
    left: calc(1007 / 2560 * 100%);
    top: calc(155 / 1900 * 100%);
    width: calc(545 / 2560 * 100%);
    height: auto;
    pointer-events: none;
    user-select: none;
  }

  /* 贈品面板三張（1:1，新版素材裁到卡片外框，不含圖示）：section2_1 925x590 於 (336,504)、section2_2 925x590 於 (1290,504)、
     section2_3 1882x590 於 (334,1127)（設計稿位置再依需求下移 40）。
     每張面板與其右上角圖示包在 .s2_panel，滑鼠移到面板上時圖示由靜態 webp 換成 gif 動畫。 */
  .fullpage .section.section2 .s2_panel {
    display: block;
    position: absolute;
  }

  .fullpage .section.section2 .s2_panel_1 {
    left: calc(336 / 2560 * 100%);
    top: calc(504 / 1900 * 100%);
    width: calc(925 / 2560 * 100%);
  }

  .fullpage .section.section2 .s2_panel_2 {
    left: calc(1290 / 2560 * 100%);
    top: calc(504 / 1900 * 100%);
    width: calc(925 / 2560 * 100%);
  }

  .fullpage .section.section2 .s2_panel_3 {
    left: calc(334 / 2560 * 100%);
    top: calc(1127 / 1900 * 100%);
    width: calc(1882 / 2560 * 100%);
  }

  .fullpage .section.section2 .s2_gifts {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
    user-select: none;
  }

  .fullpage .section.section2 .s2_desc {
    position: absolute;
    left: 0;
    width: 100%;
    top: calc(323 / 1900 * 100%);
    margin: 0;
    text-align: center;
    font-size: calc(35 / 2560 * 100cqw);
    line-height: calc(55 / 2560 * 100cqw);
    font-weight: 700;
    color: #6a3a22;
  }

  /* 區塊二：面板右上角圖示（deco/camera、ytb、food，186x146），依 v2 設計稿 1:1，位置以所在面板百分比表示：
     camera 區塊座標 (1058,471)＝面板一內 (722,-33)；ytb (2008,469)＝面板二內 (718,-35)；food (2008,1101)＝面板三內 (1674,-26)；圖示凸出面板上緣。
     平常顯示靜態 webp，hover 面板時切換成 gif（兩張疊在一起、只切換透明度，gif 事先載入，切換不閃） */
  .fullpage .section.section2 .s2_icon {
    display: block;
    position: absolute;
    height: auto;
    pointer-events: none;
    user-select: none;
    z-index: 1;
  }

  .fullpage .section.section2 .s2_icon_gif {
    opacity: 0;
  }

  .fullpage .section.section2 .s2_panel:hover .s2_icon_gif {
    opacity: 1;
  }

  .fullpage .section.section2 .s2_panel:hover .s2_icon_static {
    opacity: 0;
  }

  /* 贈品面板進場：面板 1→2→3 依序淡入（不滑動），每個淡入後右上角 gif 從頭播一輪（.is-playing）再換回 webp，
     接著才換下一個面板；順序由 main.js 控制 */
  .fullpage .section.section2 .s2_panel {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease-out;
  }

  .fullpage .section.section2 .s2_panel.is-in {
    opacity: 1;
    pointer-events: auto;
  }

  .fullpage .section.section2 .s2_panel.is-playing .s2_icon_gif {
    opacity: 1;
  }

  .fullpage .section.section2 .s2_panel.is-playing .s2_icon_static {
    opacity: 0;
  }

  .fullpage .section.section2 .s2_panel_1 .s2_icon {
    left: calc(722 / 925 * 100%);
    top: calc(-33 / 590 * 100%);
    width: calc(186 / 925 * 100%);
  }

  .fullpage .section.section2 .s2_panel_2 .s2_icon {
    left: calc(718 / 925 * 100%);
    top: calc(-35 / 590 * 100%);
    width: calc(186 / 925 * 100%);
  }

  .fullpage .section.section2 .s2_panel_3 .s2_icon {
    left: calc(1674 / 1882 * 100%);
    top: calc(-26 / 590 * 100%);
    width: calc(186 / 1882 * 100%);
  }

  /* 區塊三：聯名套餐，依 v2 設計稿量測（區塊 2560x1103，位置以區塊百分比表示）。
     title 545x185（含副標）1:1 於 (1007,124)；套餐卡 set_A／set_B 1117x740 在設計稿縮為 1022x677（約 91.5%），
     於 (255,315)、(1289,315)。白雲已畫在背景圖。 */
  .fullpage .section.section3 .s3_title,
  .fullpage .section.section3 .s3_set {
    display: block;
    position: absolute;
    height: auto;
    pointer-events: none;
    user-select: none;
  }

  .fullpage .section.section3 .s3_title {
    left: calc(1007 / 2560 * 100%);
    top: calc(124 / 1103 * 100%);
    width: calc(545 / 2560 * 100%);
  }

  .fullpage .section.section3 .s3_set {
    top: calc(315 / 1103 * 100%);
    width: calc(1022 / 2560 * 100%);
  }

  .fullpage .section.section3 .s3_set_a {
    left: calc(255 / 2560 * 100%);
  }

  .fullpage .section.section3 .s3_set_b {
    left: calc(1289 / 2560 * 100%);
  }

  /* 套餐卡進場：由下往上淡入滑進，左邊（0.6 秒）滑完再換右邊（延遲 0.6 秒）；
     左邊進入畫面 30% 時 main.js 兩張一起加 .is-in，只播一次 */
  .fullpage .section.section3 .s3_set {
    opacity: 0;
    transform: translateY(15%);
    transition:
      opacity 0.6s ease-out,
      transform 0.6s ease-out;
  }

  .fullpage .section.section3 .s3_set.is-in {
    opacity: 1;
    transform: none;
  }

  .fullpage .section.section3 .s3_set_b {
    transition-delay: 0.6s;
  }

  /* 區塊四：合作分店，依 PCv2 設計稿（11/03 版）量測（區塊 2560x1664，位置以區塊百分比表示）。
     title 545x133 1:1 於 (1007,152)；副標、分店清單為文字（見 .s4_sub、.s4_branch）；
     店名牌 store_title_1／_2（主題店-台北內湖店／主題店-高雄台鋁店）561x86 1:1 於 (537,1025)、(1437,1025)，
     中間分隔線 store_line 10x270 於 (1275,1016)（與手機版共用）；
     照片 store_1~4 846x482 在設計稿縮為 819x467，兩張並排於 (443,504)、(1298,504)，間距 36；
     輪播可視範圍 x=443~2117（寬 1674），照片尺寸與位移用可視範圍寬度（cqw）換算。
     左右箭頭見下方 .s4_arrow。 */
  .fullpage .section.section4 .s4_title,
  .fullpage .section.section4 .s4_name,
  .fullpage .section.section4 .s4_line {
    display: block;
    position: absolute;
    height: auto;
    pointer-events: none;
    user-select: none;
  }

  .fullpage .section.section4 .s4_title {
    left: calc(1007 / 2560 * 100%);
    top: calc(152 / 1664 * 100%);
    width: calc(545 / 2560 * 100%);
  }

  /* 副標「◆ 全台18家分店同步參與 ◆」：字級 35 粗體 #f8b830，置中，字頂 y=303（文字 x=1103~1455，菱形 17 寬、與文字間距約 13）；
     分店清單：設計稿字級 22 在網頁上太小，放大為 27、行距 1.4，置中三行，在副標與照片之間置中（box 頂 y=363）；
     最小 11px，窄螢幕不會小到看不清；加深咖啡色陰影，壓到右側月亮時也看得清楚。副標 top 已扣掉行高與字型上緣的留白 */
  .fullpage .section.section4 .s4_sub,
  .fullpage .section.section4 .s4_branch {
    position: absolute;
    left: 0;
    width: 100%;
    margin: 0;
    text-align: center;
    white-space: nowrap;
    font-family: "Noto Sans TC", Arial, sans-serif;
  }

  /* flex 置中：左右菱形跟文字行高垂直置中 */
  .fullpage .section.section4 .s4_sub {
    display: flex;
    justify-content: center;
    align-items: center;
    top: calc(296.5 / 1664 * 100%);
    font-size: calc(35 / 2560 * 100cqw);
    line-height: calc(44 / 2560 * 100cqw);
    font-weight: 700;
    color: #f8b830;
  }

  .fullpage .section.section4 .s4_sub::before,
  .fullpage .section.section4 .s4_sub::after {
    content: "◆";
    display: block;
    font-size: 0.6em;
    line-height: 1;
    margin: 0 0.35em;
  }

  .fullpage .section.section4 .s4_branch {
    top: calc(363 / 1664 * 100%);
    font-size: max(11px, calc(27 / 2560 * 100cqw));
    line-height: 1.4;
    text-shadow: 0 0.06em 0.12em #3a2016, 0 0 0.3em rgba(58, 32, 22, 0.8);
    color: #f0d8c8;
  }

  .fullpage .section.section4 .s4_name {
    top: calc(1025 / 1664 * 100%);
    width: calc(561 / 2560 * 100%);
  }

  .fullpage .section.section4 .s4_name_1 {
    left: calc(537 / 2560 * 100%);
  }

  .fullpage .section.section4 .s4_name_2 {
    left: calc(1437 / 2560 * 100%);
  }

  .fullpage .section.section4 .s4_line {
    left: calc(1275 / 2560 * 100%);
    top: calc(1016 / 1664 * 100%);
    width: calc(10 / 2560 * 100%);
  }

  /* 店家資訊文字（原本畫在 store.webp，改為 HTML；店名牌與分隔線另切成 store_title_1／_2、store_line）。
     依原圖量測：標籤字級 32 粗體 #f8b830（Noto Sans TC）、內容字級 30.5 #f0d8c8（英數 Poppins、中文 Noto Sans TC），
     行距 55.5，內容從標籤起點 +148 開始；
     第一行字頂在區塊 y=1136，左店文字起點 x=539、右店 x=1488。字級用 cqw 以區塊寬度換算。 */
  .fullpage .section.section4 {
    container-type: inline-size;
  }

  .fullpage .section.section4 .s4_info {
    position: absolute;
    top: calc(1124.5 / 1664 * 100%);
    font-size: calc(30.5 / 2560 * 100cqw);
    line-height: calc(55.5 / 2560 * 100cqw);
    color: #f0d8c8;
    white-space: nowrap;
    z-index: 1;
  }

  .fullpage .section.section4 .s4_info_1 {
    left: calc(539 / 2560 * 100%);
  }

  .fullpage .section.section4 .s4_info_2 {
    left: calc(1488 / 2560 * 100%);
  }

  /* 字型要直接設在 p／a 上：全域 * 規則會蓋掉從容器繼承的 font-family。每行固定高度，避免混用字型撐開行距 */
  .fullpage .section.section4 .s4_info p,
  .fullpage .section.section4 .s4_info a {
    font-family: "Poppins", "Noto Sans TC", Arial, sans-serif;
  }

  .fullpage .section.section4 .s4_info p {
    margin: 0;
    height: calc(55.5 / 2560 * 100cqw);
  }

  .fullpage .section.section4 .s4_label {
    display: inline-block;
    font-family: "Noto Sans TC", Arial, sans-serif;
    font-size: calc(32em / 30.5);
    width: 4em;
    margin-right: calc(20em / 32);
    color: #f8b830;
    font-weight: 700;
  }

  /* 電話連結：維持文字原樣，覆寫全域 a 的 hover 放大傾斜與過場 */
  .fullpage .section.section4 .s4_info a,
  .fullpage .section.section4 .s4_info a:hover {
    color: inherit;
    transform: none;
    transition: none;
  }

  .fullpage .section.section4 .s4_gallery {
    display: block;
    position: absolute;
    left: calc(443 / 2560 * 100%);
    top: calc(504 / 1664 * 100%);
    width: calc(1674 / 2560 * 100%);
    aspect-ratio: 1674/467;
    overflow: hidden;
    container-type: inline-size;
  }

  .fullpage .section.section4 .s4_track {
    position: relative;
    height: 100%;
  }

  /* 每張照片各自依 --slot 定位（一格 = 照片寬 819 + 間距 36 = 855）：slot 0、1 為可視的兩格，
     -1 在左側畫面外、2 以後在右側畫面外；切換時各張照片自己滑動，軌道本身不動（由 main.js 設定 --slot） */
  .fullpage .section.section4 .s4_photo {
    --slot: 0;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: calc(819 / 1674 * 100cqw);
    height: 100%;
    transform: translateX(calc(var(--slot) * 855 / 1674 * 100cqw));
    transition: transform 0.5s ease;
    pointer-events: none;
    user-select: none;
  }

  /* 左右箭頭 section4/arrow.webp（90x90，左箭頭；右邊水平翻轉），依 v2 設計稿 1:1：
     左 (317,692)、右 (2154,692)；hover 放大 1.1 */
  .fullpage .section.section4 .s4_arrow {
    display: block;
    position: absolute;
    top: calc(692 / 1664 * 100%);
    width: calc(90 / 2560 * 100%);
    aspect-ratio: 1;
    padding: 0;
    border: none;
    background: url(../images/section4/arrow.webp) no-repeat center / 100% 100%;
    cursor: pointer;
    transition: transform 0.2s ease;
    z-index: 2;
  }

  .fullpage .section.section4 .s4_prev {
    left: calc(317 / 2560 * 100%);
  }

  .fullpage .section.section4 .s4_next {
    left: calc(2154 / 2560 * 100%);
    transform: scaleX(-1);
  }

  .fullpage .section.section4 .s4_prev:hover {
    transform: scale(1.1);
  }

  .fullpage .section.section4 .s4_next:hover {
    transform: scaleX(-1) scale(1.1);
  }

  /* 區塊二：雲朵裝飾（deco/red_wind 534x100、yellow_wind 331x61），依 v2 設計稿 1:1、疊在贈品面板上：
     紅雲 (80,1655) 面板左下、黃雲 (2019,1256) 面板右側（隨面板下移 40） */
  .fullpage .section.section2 .s2_wind {
    display: block;
    position: absolute;
    height: auto;
    pointer-events: none;
    user-select: none;
    z-index: 1;
  }

  .fullpage .section.section2 .s2_wind_red {
    left: calc(80 / 2560 * 100%);
    top: calc(1655 / 1900 * 100%);
    width: calc(534 / 2560 * 100%);
    animation: wind_drift 6s ease-in-out infinite alternate;
  }

  .fullpage .section.section2 .s2_wind_yellow {
    left: calc(2019 / 2560 * 100%);
    top: calc(1256 / 1900 * 100%);
    width: calc(331 / 2560 * 100%);
    /* 與紅雲錯開：較慢、反向起步 */
    animation: wind_drift 7.5s ease-in-out -3s infinite alternate-reverse;
  }

  /* 雲朵淡入淡出＋微微左右搖擺（位移以雲朵自身寬度百分比，隨畫面縮放） */
  @keyframes wind_drift {
    0% { opacity: 1; transform: translateX(-4%); }
    50% { opacity: 0.35; }
    100% { opacity: 1; transform: translateX(4%); }
  }
}

/* 手機版專用的斷行與花（PC 不顯示；手機版規則見檔尾 SP 區塊） */
.sp_br,
.fullpage .section .flower_s4_3 {
  display: none;
}

/* 區塊五（邀約對象）：完成任務獲得獎勵 ---------------------------------------------------- */
.fullpage .section.section5 {
  /* PC 背景與比例在 PC media 區塊；手機版另有背景與比例 */
  background-size: 100% 100%;
  width: 100%;
  margin-top: -2px;
  position: relative;
}

/* 區塊一：TWITCH 直播列表 ---------------------------------------------------- */
.fullpage .section.section1 {
  background: url(../images/bg/section1_bg.webp) center top no-repeat;
  background-size: 100% 100%;
  width: 100%;
  margin-top: -2px;
  aspect-ratio: 2560/1281;
  position: relative;
}

/* 769~1199px：字級下限生效時收緊行距、放寬注意事項文字區，避免文字超出 caption 框、desc_box 被撐高拉伸背景 */

/* 開獎前後切換 ---------------------------------------------------- */
/* 開獎名單表格 ---------------------------------------------------- */
/* 區塊三 ---------------------------------------------------- */
.fullpage .section.section3 {
  background: url(../images/bg/section3_bg.webp) center top no-repeat;
  background-size: 100% 100%;
  width: 100%;
  margin-top: -2px;
  aspect-ratio: 2560/1103;
  position: relative;
}

/* 區塊二～五（PC）：區塊二、四目前只有 PC 素材，手機版尚無對應圖，先限定 PC 寬度，避免影響手機版 */
@media only screen and (min-width: 769px) {
  /* PC 區塊高度嚴格依背景圖比例：aspect-ratio 預設會被較高的內容撐開（背景被拉伸），
     min-height: 0 取消這個自動撐高。只作用在 PC，手機版維持原本行為。 */
  .fullpage .section.section1,
  .fullpage .section.section2,
  .fullpage .section.section3,
  .fullpage .section.section4,
  .fullpage .section.section5 {
    min-height: 0;
  }

  /* 裝飾花朵（deco/red_flower、yellow_flower，1103x1070）：大小、位置、角度依 v2 設計稿量測。
     位置以所在區塊背景的百分比表示（left/width 對區塊寬、top 對區塊高），跨到下一區塊的花用 z-index 疊在上層。 */
  .fullpage .section .deco_flower {
    display: block;
    position: absolute;
    aspect-ratio: 1103/1070;
    background: no-repeat center / 100% 100%;
    pointer-events: none;
    z-index: 2;
  }

  .fullpage .section .deco_flower_red {
    background-image: url(../images/deco/red_flower.webp);
  }

  .fullpage .section .deco_flower_yellow {
    background-image: url(../images/deco/yellow_flower.webp);
  }

  /* 花朵緩慢旋轉：進入畫面才轉（main.js 加 .is-visible），離開畫面暫停。
     用獨立的 rotate 屬性，與各花朵 transform 的設計稿角度疊加，不會蓋掉原角度。 */
  .fullpage .section .deco_flower {
    animation: flower_spin 24s linear infinite paused;
  }

  .fullpage .section .deco_flower.is-visible {
    animation-play-state: running;
  }

  @keyframes flower_spin {
    from { rotate: 0deg; }
    to { rotate: 360deg; }
  }

  /* 每朵花轉速、方向各不相同（reverse＝逆時針），同區塊或相鄰的花錯開 */
  .fullpage .section .flower_s1_1 { animation-duration: 22s; }
  .fullpage .section .flower_s2_1 { animation-duration: 30s; animation-direction: reverse; }
  .fullpage .section .flower_s2_2 { animation-duration: 18s; }
  .fullpage .section .flower_s3_1 { animation-duration: 26s; animation-direction: reverse; }
  .fullpage .section .flower_s3_2 { animation-duration: 20s; }
  .fullpage .section .flower_s4_1 { animation-duration: 16s; animation-direction: reverse; }
  .fullpage .section .flower_s4_2 { animation-duration: 34s; }

  /* 黃花 94x91，設計稿 (2305, 2662)，旋轉 15° */
  .fullpage .section .flower_s1_1 {
    left: 90.039%;
    top: 96.409%;
    width: 3.672%;
    transform: rotate(15deg);
  }

  /* 紅花 151x146，設計稿 (2169, 2742)，旋轉 -33° */
  .fullpage .section .flower_s2_1 {
    left: 84.727%;
    top: 1.789%;
    width: 5.898%;
    transform: rotate(-33deg);
  }

  /* 黃花 114x111，設計稿 (191, 4538)，旋轉 -15° */
  .fullpage .section .flower_s2_2 {
    left: 7.461%;
    top: 96.316%;
    width: 4.453%;
    transform: rotate(-15deg);
  }

  /* 紅花 176x171，設計稿 (284, 4634)，旋轉 33° */
  .fullpage .section .flower_s3_1 {
    left: 11.094%;
    top: 2.357%;
    width: 6.875%;
    transform: rotate(33deg);
  }

  /* 黃花 110x107，設計稿 (1962, 4817)，旋轉 24° */
  .fullpage .section .flower_s3_2 {
    left: 76.641%;
    top: 18.948%;
    width: 4.297%;
    transform: rotate(24deg);
  }

  /* 紅花 93x90，區塊四內 (2360, 350)（PCv2 11/03 版，區塊高 1664） */
  .fullpage .section .flower_s4_1 {
    left: 92.188%;
    top: calc(350 / 1664 * 100%);
    width: 3.633%;
  }

  /* 黃花 115x112，區塊四內 (124, 669) */
  .fullpage .section .flower_s4_2 {
    left: 4.844%;
    top: calc(669 / 1664 * 100%);
    width: 4.492%;
  }

  /* 手機版才有的第三朵花 */
  .fullpage .section .flower_s4_3 {
    display: none;
  }

  /* 區塊五：邀約對象 2560x602，上方 247px 為透明。PCv2（11/03 版）區塊五頂端在區塊四內 y=1359，
     與區塊四（高 1664）重疊 305px，往上疊 305+2px。
     用 % 計算（以容器寬度為準，不含捲軸寬），避免 vw 含捲軸造成誤差 */
  .fullpage .section.section5 {
    background: url(../images/bg/section5_bg.webp) center top no-repeat;
    background-size: 100% 100%;
    aspect-ratio: 2560/602;
    margin-top: calc(-307 / 2560 * 100%);
  }

  /* 區塊五：角色跑馬燈（chara_1~5 477x597），依 v2 設計稿量測：
     可視範圍 x=347~2213（寬 1866、置中），卡片 456x570、間距 10px，卡片頂端在區塊五頂端下方 8px（PCv2 11/03 版）。
     尺寸以可視範圍寬度（cqw）換算，隨網頁寬度等比縮放；軌道放兩份角色，移動 -50% 後無縫循環，滑鼠移上去暫停。 */
  .fullpage .section.section5 .chara_marquee {
    display: block;
    position: absolute;
    left: calc(347 / 2560 * 100%);
    width: calc(1866 / 2560 * 100%);
    top: calc(8 / 602 * 100%);
    height: calc(570 / 602 * 100%);
    overflow: hidden;
    container-type: inline-size;
    z-index: 1;
    /* 左右兩側各 10% 由 100% 漸變淡出至 0%，中間 80% 維持不透明 */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
  }

  .fullpage .section.section5 .chara_track {
    display: flex;
    width: max-content;
    height: 100%;
    /* 起始畫面與設計稿相同：最左邊的零(女)露出右半部 */
    margin-left: calc(-225 / 1866 * 100cqw);
    animation: chara_marquee 30s linear infinite;
  }

  .fullpage .section.section5 .chara_marquee:hover .chara_track {
    animation-play-state: paused;
  }

  .fullpage .section.section5 .chara_card {
    display: block;
    flex: none;
    width: calc(456 / 1866 * 100cqw);
    height: 100%;
    margin-right: calc(10 / 1866 * 100cqw);
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
  }

  @keyframes chara_marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
  }

  /* 主題店（輪播＋箭頭＋店家資訊）、角色跑馬燈進場：由下往上淡入滑進 0.6 秒，各組進入畫面 30% 時 main.js 加 .is-in，只播一次。
     位移用獨立的 translate 屬性（同組統一 3vw），不影響箭頭的 scaleX 翻轉／hover 放大與跑馬燈軌道的 transform。 */
  .fullpage .section.section4 .s4_gallery,
  .fullpage .section.section4 .s4_name,
  .fullpage .section.section4 .s4_line,
  .fullpage .section.section4 .s4_info,
  .fullpage .section.section5 .chara_marquee {
    opacity: 0;
    translate: 0 3vw;
    transition:
      opacity 0.6s ease-out,
      translate 0.6s ease-out;
  }

  .fullpage .section.section4 .s4_arrow {
    opacity: 0;
    translate: 0 3vw;
    pointer-events: none;
    transition:
      opacity 0.6s ease-out,
      translate 0.6s ease-out,
      transform 0.2s ease;
  }

  .fullpage .section.section4 .is-in,
  .fullpage .section.section5 .chara_marquee.is-in {
    opacity: 1;
    translate: none;
  }

  .fullpage .section.section4 .s4_arrow.is-in {
    pointer-events: auto;
  }

  /* 區塊二：限定周邊 2560x1900（手機版尚無素材） */
  .fullpage .section.section2 {
    background: url(../images/bg/section2_bg.webp) center top no-repeat;
    background-size: 100% 100%;
    width: 100%;
    margin-top: -2px;
    aspect-ratio: 2560/1900;
    position: relative;
  }

  .fullpage .section.section4 {
    background: url(../images/bg/section4_bg.webp) center top no-repeat;
    background-size: 100% 100%;
    width: 100%;
    margin-top: -2px;
    aspect-ratio: 2560/1664;
    position: relative;
  }
}

/* 浮動按鈕 flex_btn ---------------------------------------------------- */
.flex_btn {
  /* flex.webp 292x423，依 v2 設計稿 1:1（2560 寬時寬 292）、貼齊右側 */
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: calc(292 / 2560 * 100vw);
  height: auto;
  aspect-ratio: 292/423;
  background: url(../images/flex.webp) no-repeat center;
  background-size: 100% 100%;
  z-index: 99;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.4s,
    visibility 0.4s,
    transform 0.4s;
  transform: translateY(-50%) scale(0.85);
}

.flex_btn:hover {
  transform: translateY(-50%) scale(1.05);
}

.flex_btn.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

@media only screen and (max-width: 768px) {
  .flex_btn {
    position: fixed;
    bottom: 0;
    left: 0;
    right: auto;
    top: auto;
    transform: none;
    width: 100%;
    height: auto;
    /* flex_sp.webp 1091x276，寬度貼齊畫面、高度依原圖比例 */
    aspect-ratio: 1091/276;
    background-image: url(../images/flex_sp.webp);
    border-radius: 0;
  }

  .flex_btn:hover {
    transform: none;
  }

  .flex_btn.show {
    transform: none;
  }

  /* 頁尾下方預留一條懸浮按鈕高度（1091x276 依畫面寬換算）的空間：捲到最底時懸浮按鈕停在這塊空白上，
     不會蓋住跑馬燈與 footer 文字 */
  .footer_box {
    padding-bottom: calc(276 / 1091 * 100%);
    background: #140a18;
  }
}

/* DEMO 彈窗測試按鈕 ---------------------------------------------------- */

.footer_box {
  width: 100%;
  position: relative;
}

.footer_box .footer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  width: 100%;
  padding: 2vw 1vw;
  color: #f3ede9;
  text-align: center;
  background: #140a18;
}

.footer_box .footer img {
  margin: 0 8px;
}

.footer_box .footer .container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
}

.footer_box .footer .container .copyright {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  margin-right: 50px;
  line-height: 20px;
  font-size: 0.8rem;
}

.footer_box .footer .container .copyright .company {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-right: 8px;
}

.footer_box .footer .container .copyright p {
  margin-bottom: 0;
  text-align: left;
}

.footer_box .footer .container .copyright p a {
  color: #ffffff;
  transition: 0.3s ease;
}

.footer_box .footer .container .copyright p a:hover {
  color: #e51737;
  transition: 0.3s ease;
}

.footer_box .footer .container .grading {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  gap: 12px;
}

.footer_box .footer .container .grading img {
  height: 3rem;
  width: auto;
  flex-shrink: 0;
}

.footer_box .footer .container .grading ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.75rem;
  line-height: 1.7;
  text-align: left;
}

/* 跳窗---------------------------------------------------- */
.modal-dialog {
  width: 96%;
  max-width: 800px;
}

.modal-dialog .modal-content {
  height: 700px;
  border-radius: 20px;
}

/* 當前抽獎次數 */

/* 通用 */

@media only screen and (max-width: 1200px) {
  .fullpage {
    padding-top: 0;
  }

  .fullpage .section {
    /* header---------------------------------------------------- */
    /* 活動時間---------------------------------------------------- */
    /* 活動獎勵---------------------------------------------------- */
    /* 參與方式---------------------------------------------------- */
    /* 鑒定師投票---------------------------------------------------- */
  }

  .fullpage .section .title_box img {
    width: 44.06vw;
  }

  .footer_box {
    height: auto;
  }

  .footer_box .footer {
    height: auto;
  }

  .footer_box .footer .container {
    flex-direction: column;
  }

  .footer_box .footer .container .copyright {
    flex-direction: column;
    margin-right: 0;
  }

  .footer_box .footer .container .copyright p {
    text-align: center;
    margin: 10px auto 0;
  }

  .footer_box .footer .container .grading {
    margin-top: 16px;
  }
}

@media only screen and (max-width: 820px) {
  .footer_box {
    height: auto;
    position: relative;
    bottom: 0vw;
  }

  .footer_box .footer {
    height: auto;
    position: relative;
    transform: translateY(0%);
    padding: 5vw 1vw;
  }

  .footer_box .footer .container {
    flex-direction: column;
  }

  .footer_box .footer .container .copyright {
    flex-direction: column;
    margin-right: 0;
  }

  .footer_box .footer .container .copyright p {
    text-align: center;
    margin: 10px auto 0;
  }

  .footer_box .footer .container .grading {
    align-items: flex-start;
    margin-top: 12px;
  }

  .footer_box .footer .container .grading img {
    height: 2.5rem;
    width: auto;
  }

  .footer_box .footer .container .grading ul {
    font-size: 0.6rem;
    line-height: 1.3;
  }

  .footer_box .footer {
    padding: 5vw 4vw;
  }

}

/* ==========================================================================
   手機版（SP）：依 阿佩_燒肉網頁_SP.jpg（1080x16544）排版，只在 768px 以下生效，PC 規則不受影響。
   座標與 PC 相同寫法：left/width 以區塊寬 1080 換算、top 以各區塊高度換算；字級用 cqw。
   各區塊在設計稿的範圍（背景由 bg_sp.webp 1080x16117 依此裁切，q90、每張 800KB 以下）：
   header 0~1660（1660）、section1 1660~8490（6830，拆上下兩張各 3415）、section2 8490~12160（3670）、
   section3 12160~14150（1990）、section4 14150~16117（1967，到 bg_sp 底）、section5 15914~16544（630，上方透明、往上疊 203）。
   ※ 區塊四、五依 11/03 版手機稿（1080x16763）更新：section4 14157~16312（2155，section4_bg_sp 另出）、section5 16133~16763（往上疊 179）。
   ※ 區塊一依 11/12 版手機稿 阿佩_燒肉網頁_SPv2.jpg（1080x14992）改版：section1 1660~6719（5059，section1_bg_sp 一張），以下各區塊內容不變、整體上移 1771。
   section5_bg_sp 與其餘 _sp 切圖目前是 PC 圖的複本（佔位），由美術替換；要換成手機版的 <img> 在 HTML 用 <picture> 切換。
   ========================================================================== */
@media only screen and (max-width: 768px) {
  .fullpage {
    padding: 0;
    margin: 0;
    overflow: hidden;
  }

  .fullpage .section {
    position: relative;
    min-height: 0;
  }

  /* 共用：絕對定位的切圖 */
  .fullpage .section.section1 .event_img,
  .fullpage .section.section2 .s2_title,
  .fullpage .section.section2 .s2_wind,
  .fullpage .section.section3 .s3_title,
  .fullpage .section.section3 .s3_set,
  .fullpage .section.section4 .s4_title,
  .fullpage .section.section4 .s4_name {
    display: block;
    position: absolute;
    height: auto;
    pointer-events: none;
    user-select: none;
  }

  /* 店名牌中間的分隔線只有 PC 有 */
  .fullpage .section.section4 .s4_line {
    display: none;
  }

  .fullpage .section .sp_br {
    display: inline;
  }

  /* 只在 PC 斷行的 br（例：區塊四分店清單），手機版不斷 */
  .fullpage .section .pc_br {
    display: none;
  }

  /* header（1080x1660）---------------------------------------------------- */
  /* 同 PC 分層：背景 opening/bg_sp.webp＋人物＋效果 header_bg_cover_eff_sp＋底板 header_bg_cover_sp（皆 1080x1660）；
     人物位置依手機版 KV 比對（每人縮放不同） */
  .fullpage .section.header {
    background: url(../images/opening/bg_sp.webp) center top / 100% 100% no-repeat;
    aspect-ratio: 1080/1660;
    height: auto;
  }

  .fullpage .section.header .header_kv {
    --fw: 1080;
    --fh: 1660;
  }

  .fullpage .section.header .header_kv .kv_pp_1 { --x: 636; --y: 315; --w: 517; }
  .fullpage .section.header .header_kv .kv_pp_2 { --x: -55; --y: 342; --w: 442; }
  .fullpage .section.header .header_kv .kv_pp_3 { --x: 454; --y: 339; --w: 562; }
  .fullpage .section.header .header_kv .kv_pp_4 { --x: 192; --y: 285; --w: 316; }
  .fullpage .section.header .header_kv .kv_pp_5 { --x: 430; --y: 346; --w: 370; }

  .fullpage .section.header .header_kv .kv_eff {
    background-image: url(../images/bg/header_bg_cover_eff_sp.webp);
  }

  .fullpage .section.header .header_kv .kv_cover {
    background-image: url(../images/bg/header_bg_cover_sp.webp);
  }

  /* LOGO 569x158 於 (63,36) */
  .fullpage .section.header .logo {
    top: calc(36 / 1660 * 100%);
    left: calc(63 / 1080 * 100%);
    width: calc(569 / 1080 * 100%);
    aspect-ratio: 575/160;
  }

  .fullpage .section.header .title_box {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    display: block;
  }

  /* 標題 header_title 1037x463 縮為 923 寬，於 (75,1002) */
  .fullpage .section.header .title_box .header_title_wrap {
    position: absolute;
    left: calc(75 / 1080 * 100%);
    top: calc(1002 / 1660 * 100%);
    width: calc(923 / 1080 * 100%);
    height: auto;
    aspect-ratio: 1037/463;
    margin: 0;
  }

  .fullpage .section.header .title_box .header_title_wrap .header_title {
    width: 100%;
    height: auto;
  }

  /* 日期 header_title_pop 在手機稿縮得比標題小：871 寬，於 (102,1025)＝標題框內 (27,23) */
  .fullpage .section.header .title_box .header_title_wrap .header_title_pop {
    left: calc(27 / 923 * 100%);
    top: calc(23 / 412 * 100%);
    width: calc(871 / 923 * 100%);
  }

  /* 三顆按鈕 669x250 縮為 308 寬，一列於 x=60~1020、y=1432，左右貼齊 */
  .fullpage .section.header .title_box .btn_box {
    position: absolute;
    left: calc(60 / 1080 * 100%);
    top: calc(1432 / 1660 * 100%);
    width: calc(960 / 1080 * 100%);
    height: auto;
    aspect-ratio: auto;
    margin: 0;
    padding: 0;
    gap: 0;
    justify-content: space-between;
    align-items: flex-start;
    background-image: none;
  }

  .fullpage .section.header .title_box .btn_box .btn {
    flex: none;
    top: 0;
    width: calc(308 / 960 * 100%);
    height: auto;
    aspect-ratio: 669/250;
  }

  /* 按鈕左上角花朵（比例同 PC：按鈕寬 440 時花寬 53.76、左 5.12、上 -8.96） */
  .fullpage .section.header .title_box .btn_box .btn::before {
    content: "";
    position: absolute;
    left: calc(5.12 / 440 * 100%);
    top: calc(-8.96 / 164.4 * 100%);
    width: calc(53.76 / 440 * 100%);
    aspect-ratio: 107/100;
    background: url(../images/header/btn_deco.webp) no-repeat 0 0 / 100% 200%;
    pointer-events: none;
  }

  .fullpage .section.header .title_box .btn_box .btn_dl::before {
    background-position: 0 100%;
  }

  /* 下拉提示三角：整組寬 224、置中，頂端 y=1595 */
  .fullpage .section.header .scroll_hint {
    display: flex;
    justify-content: space-between;
    position: absolute;
    left: 50%;
    top: calc(1595 / 1660 * 100%);
    width: calc(224 / 1080 * 100%);
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 1;
  }

  .fullpage .section.header .scroll_hint span {
    display: block;
    width: calc(48 / 224 * 100%);
    aspect-ratio: 2/1;
    background: #ed706a;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    opacity: 0.5;
    animation: scroll_hint_sp 1.8s ease-in-out infinite;
  }

  .fullpage .section.header .scroll_hint span:nth-child(2) {
    animation-delay: 0.3s;
  }

  .fullpage .section.header .scroll_hint span:nth-child(3) {
    animation-delay: 0.6s;
  }

  @keyframes scroll_hint_sp {
    0%, 60%, 100% { opacity: 0.5; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(25%); }
  }

  /* 區塊一：EVENT.01／02（1080x5059，依 阿佩_燒肉網頁_SPv2.jpg）---------------------------------------------------- */
  .fullpage .section.section1 {
    background: url(../images/bg/section1_bg_sp.webp) center top / 100% 100% no-repeat;
    aspect-ratio: 1080/5059;
  }

  /* EVENT.01 標題 568x162 放大為 837 寬，於 (122,37) */
  .fullpage .section.section1 .event_camera {
    left: calc(122 / 1080 * 100%);
    top: calc(37 / 5059 * 100%);
    width: calc(837 / 1080 * 100%);
  }

  /* STEP 卡（與 PC 共用 camera_step1~3）寬 704，x=189，y=590、1106、1622 */
  .fullpage .section.section1 .event_step {
    left: calc(189 / 1080 * 100%);
    width: calc(704 / 1080 * 100%);
  }

  .fullpage .section.section1 .event_step1 {
    top: calc(590 / 5059 * 100%);
  }

  .fullpage .section.section1 .event_step2 {
    top: calc(1106 / 5059 * 100%);
  }

  .fullpage .section.section1 .event_step3 {
    top: calc(1622 / 5059 * 100%);
  }

  /* EVENT.02 標題 604x230 放大為 888 寬，於 (97,2159)；立牌（與 PC 共用 yts_stand）寬 696 於 (210,2792) */
  .fullpage .section.section1 .event_yts {
    left: calc(97 / 1080 * 100%);
    top: calc(2159 / 5059 * 100%);
    width: calc(888 / 1080 * 100%);
  }

  .fullpage .section.section1 .event_yts_stand {
    left: calc(210 / 1080 * 100%);
    top: calc(2792 / 5059 * 100%);
    width: calc(696 / 1080 * 100%);
  }

  /* STEP 卡（手機專用 yts_step1~3_sp 702x424，HTML 用 <picture> 切換）1:1，x=189，y=3500、4015、4530 */
  .fullpage .section.section1 .yts_step {
    left: calc(189 / 1080 * 100%);
    width: calc(702 / 1080 * 100%);
  }

  .fullpage .section.section1 .yts_step1 {
    top: calc(3500 / 5059 * 100%);
  }

  .fullpage .section.section1 .yts_step2 {
    top: calc(4015 / 5059 * 100%);
  }

  .fullpage .section.section1 .yts_step3 {
    top: calc(4530 / 5059 * 100%);
  }

  /* STEP 進場：EVENT.01 由右往左、EVENT.02 由下往上，1→2→3 依序（同 PC） */
  .fullpage .section.section1 .event_step {
    opacity: 0;
    transform: translateX(30%);
    transition:
      opacity 0.6s ease-out,
      transform 0.6s ease-out;
  }

  .fullpage .section.section1 .yts_step {
    transform: translateY(10%);
  }

  .fullpage .section.section1 .event_step.is-in {
    opacity: 1;
    transform: none;
  }

  .fullpage .section.section1 .event_step2 {
    transition-delay: 0.15s;
  }

  .fullpage .section.section1 .event_step3 {
    transition-delay: 0.3s;
  }

  /* 參加打卡／我要投稿：雪碧圖 508x400 縮為 464 寬，置中於標題下方 (309,324)、(309,2559)；進場彈出同 PC */
  .fullpage .section.section1 .event_btn {
    display: block;
    position: absolute;
    left: calc(309 / 1080 * 100%);
    width: calc(464 / 1080 * 100%);
    aspect-ratio: 508/200;
    background: no-repeat 0 0 / 100% 200%;
    transition: none;
    z-index: 1;
    opacity: 0;
    pointer-events: none;
  }

  .fullpage .section.section1 .event_btn:hover {
    background-position: 0 100%;
    transform: none;
  }

  .fullpage .section.section1 .event_btn.is-pop {
    pointer-events: auto;
    animation: header_pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s both;
  }

  .fullpage .section.section1 .event_btn_camera {
    top: calc(324 / 5059 * 100%);
    background-image: url(../images/section1/btn_camera.webp);
  }

  .fullpage .section.section1 .event_btn_yts {
    top: calc(2559 / 5059 * 100%);
    background-image: url(../images/section1/btn_yts.webp);
  }

  /* 區塊二：限定周邊（1080x3670）---------------------------------------------------- */
  .fullpage .section.section2 {
    background: url(../images/bg/section2_bg_sp.webp) center top no-repeat;
    background-size: 100% 100%;
    width: 100%;
    margin-top: -2px;
    aspect-ratio: 1080/3670;
    container-type: inline-size;
  }

  /* 標題 545x133 1:1 於 (267,155) */
  .fullpage .section.section2 .s2_title {
    left: calc(267 / 1080 * 100%);
    top: calc(155 / 3670 * 100%);
    width: calc(545 / 1080 * 100%);
  }

  /* 說明文字四行置中：字級 34、行距 52、#6a3a22 粗體，第一行頂 y=334 */
  .fullpage .section.section2 .s2_desc {
    position: absolute;
    left: 0;
    width: 100%;
    top: calc(334 / 3670 * 100%);
    margin: 0;
    text-align: center;
    font-size: calc(34 / 1080 * 100cqw);
    line-height: calc(52 / 1080 * 100cqw);
    font-weight: 700;
    color: #6a3a22;
  }

  /* 贈品面板 925 寬直排，x=78，y=582、1226、1874（1:1）；第一、二張與 PC 共用，第三張用直式 section2_3_sp 925x1599；
     進場依序淡入（同 PC） */
  .fullpage .section.section2 .s2_panel {
    display: block;
    position: absolute;
    left: calc(78 / 1080 * 100%);
    width: calc(925 / 1080 * 100%);
    container-type: inline-size;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease-out;
  }

  .fullpage .section.section2 .s2_panel_1 {
    top: calc(582 / 3670 * 100%);
  }

  .fullpage .section.section2 .s2_panel_2 {
    top: calc(1226 / 3670 * 100%);
  }

  .fullpage .section.section2 .s2_panel_3 {
    top: calc(1874 / 3670 * 100%);
  }

  .fullpage .section.section2 .s2_panel.is-in {
    opacity: 1;
    pointer-events: auto;
  }

  .fullpage .section.section2 .s2_gifts {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
    user-select: none;
  }

  /* 面板右上角圖示 186x146（1:1），面板內 (722,-33)／(720,-34)／(720,-28)，以面板寬（cqw）換算 */
  .fullpage .section.section2 .s2_icon {
    display: block;
    position: absolute;
    left: calc(720 / 925 * 100cqw);
    top: calc(-34 / 925 * 100cqw);
    width: calc(186 / 925 * 100cqw);
    height: auto;
    pointer-events: none;
    user-select: none;
    z-index: 1;
  }

  .fullpage .section.section2 .s2_panel_1 .s2_icon {
    left: calc(722 / 925 * 100cqw);
    top: calc(-33 / 925 * 100cqw);
  }

  .fullpage .section.section2 .s2_panel_3 .s2_icon {
    top: calc(-28 / 925 * 100cqw);
  }

  .fullpage .section.section2 .s2_icon_gif {
    opacity: 0;
  }

  .fullpage .section.section2 .s2_panel.is-playing .s2_icon_gif {
    opacity: 1;
  }

  .fullpage .section.section2 .s2_panel.is-playing .s2_icon_static {
    opacity: 0;
  }

  /* 雲朵：手機版的雲已畫在 bg_sp 背景裡，不另外疊 */
  .fullpage .section.section2 .s2_wind {
    display: none;
  }

  /* 區塊三：聯名套餐（1080x1990）---------------------------------------------------- */
  .fullpage .section.section3 {
    background: url(../images/bg/section3_bg_sp.webp) center top no-repeat;
    background-size: 100% 100%;
    aspect-ratio: 1080/1990;
  }

  /* 標題 545x185 1:1 於 (267,154)；套餐卡 set_A／set_B 1117x740 縮為 1016 寬，於 (62,389)、(62,1090) */
  .fullpage .section.section3 .s3_title {
    left: calc(267 / 1080 * 100%);
    top: calc(154 / 1990 * 100%);
    width: calc(545 / 1080 * 100%);
  }

  .fullpage .section.section3 .s3_set {
    left: calc(62 / 1080 * 100%);
    width: calc(1016 / 1080 * 100%);
    opacity: 0;
    transform: translateY(15%);
    transition:
      opacity 0.6s ease-out,
      transform 0.6s ease-out;
  }

  .fullpage .section.section3 .s3_set_a {
    top: calc(389 / 1990 * 100%);
  }

  .fullpage .section.section3 .s3_set_b {
    top: calc(1090 / 1990 * 100%);
    transition-delay: 0.6s;
  }

  .fullpage .section.section3 .s3_set.is-in {
    opacity: 1;
    transform: none;
  }

  /* 區塊四：合作分店（1080x2155，11/03 版手機稿）---------------------------------------------------- */
  .fullpage .section.section4 {
    background: url(../images/bg/section4_bg_sp.webp) center top no-repeat;
    background-size: 100% 100%;
    width: 100%;
    margin-top: -2px;
    aspect-ratio: 1080/2155;
    container-type: inline-size;
  }

  /* 標題 545x133 1:1 於 (267,128) */
  .fullpage .section.section4 .s4_title {
    left: calc(267 / 1080 * 100%);
    top: calc(128 / 2155 * 100%);
    width: calc(545 / 1080 * 100%);
  }

  /* 副標：字級 36 粗體 #f8b830，字頂 y=280；分店清單：字級 29.5 #f0d8c8、行距 49，置中五行，第一行字頂 y=346（top 已扣掉字型上緣留白） */
  .fullpage .section.section4 .s4_sub,
  .fullpage .section.section4 .s4_branch {
    position: absolute;
    left: 0;
    width: 100%;
    margin: 0;
    text-align: center;
    white-space: nowrap;
    font-family: "Noto Sans TC", Arial, sans-serif;
  }

  .fullpage .section.section4 .s4_sub {
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    color: #f8b830;
    top: calc(274 / 2155 * 100%);
    font-size: calc(36 / 1080 * 100cqw);
    line-height: calc(44 / 1080 * 100cqw);
  }

  .fullpage .section.section4 .s4_sub::before,
  .fullpage .section.section4 .s4_sub::after {
    content: "◆";
    display: block;
    font-size: 0.6em;
    line-height: 1;
    margin: 0 0.35em;
  }

  .fullpage .section.section4 .s4_branch {
    color: #f0d8c8;
    top: calc(335.5 / 2155 * 100%);
    font-size: calc(29.5 / 1080 * 100cqw);
    line-height: calc(49 / 1080 * 100cqw);
  }

  /* 輪播一次一張：照片 846x482 放大為 888 寬，於 (95,620)；可視範圍＝一張照片寬。
     main.js 一樣排兩格（slot 0、1），slot 1 落在可視範圍外被裁掉，所以不用改 JS。 */
  .fullpage .section.section4 .s4_gallery {
    display: block;
    position: absolute;
    left: calc(95 / 1080 * 100%);
    top: calc(620 / 2155 * 100%);
    width: calc(888 / 1080 * 100%);
    aspect-ratio: 888/506;
    overflow: hidden;
    container-type: inline-size;
  }

  .fullpage .section.section4 .s4_track {
    position: relative;
    height: 100%;
  }

  .fullpage .section.section4 .s4_photo {
    --slot: 0;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100cqw;
    height: 100%;
    transform: translateX(calc(var(--slot) * 928 / 888 * 100cqw));
    transition: transform 0.5s ease;
    pointer-events: none;
    user-select: none;
  }

  /* 左右箭頭 90x90 縮為 86，於 (41,831)、(953,831) */
  .fullpage .section.section4 .s4_arrow {
    display: block;
    position: absolute;
    top: calc(831 / 2155 * 100%);
    width: calc(86 / 1080 * 100%);
    aspect-ratio: 1;
    padding: 0;
    border: none;
    background: url(../images/section4/arrow.webp) no-repeat center / 100% 100%;
    cursor: pointer;
    z-index: 2;
  }

  .fullpage .section.section4 .s4_prev {
    left: calc(41 / 1080 * 100%);
  }

  .fullpage .section.section4 .s4_next {
    left: calc(953 / 1080 * 100%);
    transform: scaleX(-1);
  }

  /* 店名牌（與 PC 共用 store_title_1／_2 561x86），手機稿放大 1.2 倍為 673 寬，於 (205,1203)、(205,1605) */
  .fullpage .section.section4 .s4_name {
    left: calc(205 / 1080 * 100%);
    width: calc(673 / 1080 * 100%);
  }

  .fullpage .section.section4 .s4_name_1 {
    top: calc(1203 / 2155 * 100%);
  }

  .fullpage .section.section4 .s4_name_2 {
    top: calc(1605 / 2155 * 100%);
  }

  /* 店家資訊：兩店上下排，標籤起點 x=184、內容起點 x=372，每行 84，
     字級同 PC（標籤 32 粗體 #f8b830、內容 30.5 #f0d8c8），第一行字頂 y=1330、1731（box 頂 1304、1705） */
  .fullpage .section.section4 .s4_info {
    position: absolute;
    left: calc(184 / 1080 * 100%);
    font-size: calc(30.5 / 1080 * 100cqw);
    line-height: calc(84 / 1080 * 100cqw);
    color: #f0d8c8;
    white-space: nowrap;
    z-index: 1;
  }

  .fullpage .section.section4 .s4_info_1 {
    top: calc(1304 / 2155 * 100%);
  }

  .fullpage .section.section4 .s4_info_2 {
    top: calc(1705 / 2155 * 100%);
  }

  .fullpage .section.section4 .s4_info p,
  .fullpage .section.section4 .s4_info a {
    font-family: "Poppins", "Noto Sans TC", Arial, sans-serif;
  }

  .fullpage .section.section4 .s4_info p {
    margin: 0;
    height: calc(84 / 1080 * 100cqw);
  }

  .fullpage .section.section4 .s4_label {
    display: inline-block;
    font-family: "Noto Sans TC", Arial, sans-serif;
    font-size: calc(32em / 30.5);
    width: 4em;
    margin-right: calc(60em / 32);
    color: #f8b830;
    font-weight: 700;
  }

  .fullpage .section.section4 .s4_info a,
  .fullpage .section.section4 .s4_info a:hover {
    color: inherit;
    transform: none;
    transition: none;
  }

  /* 區塊五：角色跑馬燈（1080x630）---------------------------------------------------- */
  /* section5_bg_sp 1080x630，上方 174px 透明（同 PC 做法）：11/03 版手機稿在 y=16133~16763，
     與區塊四底部（到 16312）重疊 179px，往上疊 179px（再加原本的 2px） */
  .fullpage .section.section5 {
    background: url(../images/bg/section5_bg_sp.webp) center top no-repeat;
    background-size: 100% 100%;
    aspect-ratio: 1080/630;
    margin-top: calc(-179 / 1080 * 100% - 2px);
  }

  /* 卡片 477x597 縮為 453x567、間距 7，頂端 y=1（區塊五內）；可視範圍為整個畫面寬（手機稿兩側沒有淡出）。
     起始畫面同手機稿：曳爾沐（第 4 張）在 x=368 → 軌道左移 368 - 3 x 460 = -1012 */
  .fullpage .section.section5 .chara_marquee {
    display: block;
    position: absolute;
    left: 0;
    width: 100%;
    top: calc(1 / 630 * 100%);
    height: calc(567 / 630 * 100%);
    overflow: hidden;
    container-type: inline-size;
    z-index: 1;
  }

  .fullpage .section.section5 .chara_track {
    display: flex;
    width: max-content;
    height: 100%;
    margin-left: calc(-1012 / 1080 * 100cqw);
    animation: chara_marquee_sp 30s linear infinite;
  }

  .fullpage .section.section5 .chara_card {
    display: block;
    flex: none;
    width: calc(453 / 1080 * 100cqw);
    height: 100%;
    margin-right: calc(7 / 1080 * 100cqw);
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
  }

  @keyframes chara_marquee_sp {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
  }

  /* 主題店、跑馬燈進場：由下往上淡入（同 PC） */
  .fullpage .section.section4 .s4_gallery,
  .fullpage .section.section4 .s4_name,
  .fullpage .section.section4 .s4_info,
  .fullpage .section.section5 .chara_marquee {
    opacity: 0;
    translate: 0 6vw;
    transition:
      opacity 0.6s ease-out,
      translate 0.6s ease-out;
  }

  .fullpage .section.section4 .s4_arrow {
    opacity: 0;
    translate: 0 6vw;
    pointer-events: none;
    transition:
      opacity 0.6s ease-out,
      translate 0.6s ease-out;
  }

  .fullpage .section.section4 .is-in,
  .fullpage .section.section5 .chara_marquee.is-in {
    opacity: 1;
    translate: none;
  }

  .fullpage .section.section4 .s4_arrow.is-in {
    pointer-events: auto;
  }

  /* 裝飾花朵：區塊一～三的花畫在 bg_sp 背景裡，不另外疊；主題店的花由 CSS 疊上並旋轉（同 PC）。
     依手機稿量測：紅花 92 寬於 (922,235)、黃花 50 寬於 (62,1005)、黃花 95 寬於 (890,1528)（區塊四座標） */
  .fullpage .section .deco_flower {
    display: none;
    position: absolute;
    aspect-ratio: 1103/1070;
    background: no-repeat center / 100% 100%;
    pointer-events: none;
    z-index: 2;
    animation: flower_spin 24s linear infinite paused;
  }

  .fullpage .section .deco_flower.is-visible {
    animation-play-state: running;
  }

  .fullpage .section .deco_flower_red {
    background-image: url(../images/deco/red_flower.webp);
  }

  .fullpage .section .deco_flower_yellow {
    background-image: url(../images/deco/yellow_flower.webp);
  }

  .fullpage .section .flower_s4_1,
  .fullpage .section .flower_s4_2,
  .fullpage .section .flower_s4_3 {
    display: block;
    transform: none;
  }

  .fullpage .section .flower_s4_1 {
    left: calc(922 / 1080 * 100%);
    top: calc(235 / 2155 * 100%);
    width: calc(92 / 1080 * 100%);
    animation-duration: 16s;
    animation-direction: reverse;
  }

  .fullpage .section .flower_s4_3 {
    left: calc(62 / 1080 * 100%);
    top: calc(1005 / 2155 * 100%);
    width: calc(50 / 1080 * 100%);
    animation-duration: 20s;
  }

  .fullpage .section .flower_s4_2 {
    left: calc(890 / 1080 * 100%);
    top: calc(1517 / 2155 * 100%);
    width: calc(95 / 1080 * 100%);
    animation-duration: 34s;
  }

  @keyframes flower_spin {
    from { rotate: 0deg; }
    to { rotate: 360deg; }
  }
}

@media only screen and (max-width: 500px) {
  .footer_box .footer .container .copyright .company img {
    width: 22vw;
    height: auto;
  }
}

/* 下載彈窗 #download（參考 BlackBird 活動頁）---------------------------------------
   原頁以 rem 排版：reset.js 設 1rem = min(視窗寬/25.6, 視窗高/14.4) px（2560x1440 設計稿 = 100px）。
   本頁沒有 rem 縮放，改用 --r 代替 1rem，數值與原頁 popup.css 的 rem 數字一一對應。 */
#download {
  --r: min(3.90625vw, 6.9444vh);
}

#download .modal-dialog {
  width: calc(var(--r) * 15);
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

#download .modal-content {
  height: auto;
  background: transparent;
  border: 0;
  border-radius: 0;
}

#download .popup {
  position: relative;
}

#download .pop-bg4 {
  position: relative;
  width: 100%;
  aspect-ratio: 1514/624;
  background: url(../images/popup/download/download_bg.webp) no-repeat center;
  background-size: 100% 100%;
}

#download .closePop {
  position: absolute;
  top: calc(var(--r) * -0.8);
  right: calc(var(--r) * -0.8);
  width: calc(var(--r) * 0.75);
  height: calc(var(--r) * 0.75);
  padding: 0;
  border: 0;
  background: url(../images/popup/download/close_btn.webp) no-repeat center;
  background-size: 100% 100%;
  cursor: pointer;
  z-index: 1;
}

#download .download_box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: calc(var(--r) * 0.9);
}

#download .download_tt {
  width: calc(var(--r) * 10);
  height: auto;
  margin-bottom: calc(var(--r) * 0.3);
}

#download .gameInfo {
  display: flex;
  gap: calc(var(--r) * 0.5);
  align-items: center;
  justify-content: center;
  width: 100%;
}

#download .gameInfo .qrcode {
  width: calc(var(--r) * 2.2);
  flex-shrink: 0;
}

#download .gameInfo .qrcode img {
  width: 100%;
  display: block;
}

#download .gameInfo .store {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: calc(var(--r) * 0.2);
  align-items: center;
}

#download .gameInfo .store a {
  display: block;
  position: relative;
}

#download .gameInfo .store a img {
  width: calc(var(--r) * 3);
  height: auto;
  display: block;
}

#download .gameInfo .store a.store-google-play-games img {
  width: calc(var(--r) * 3.5);
}

#download .store-windows {
  grid-column: 1;
  grid-row: 1;
}

#download .store-ps5 {
  grid-column: 2;
  grid-row: 1;
}

#download .store-steam {
  grid-column: 1;
  grid-row: 2;
}

#download .store-epic {
  grid-column: 2;
  grid-row: 2;
}

#download .store-app-store {
  grid-column: 1;
  grid-row: 3;
}

#download .store-google-play {
  grid-column: 2;
  grid-row: 3;
}

#download .store-google-play-games {
  grid-column: 3;
  grid-row: 3;
}

#download .macTip {
  position: absolute;
  top: 105%;
  left: 50%;
  transform: translateX(-50%);
  width: calc(var(--r) * 1.8);
  height: calc(var(--r) * 0.3);
  background: url(../images/popup/download/app_store_tt.webp) no-repeat center;
  background-size: contain;
}

/* 手機版三行標題：PC 不顯示 */
#download .download_tt_m {
  display: none;
}

/* 手機：直式底板 download_bg_m（985x1517），--u = 彈窗寬的 1% */
@media only screen and (max-width: 768px) {
  #download {
    --r: min(6vw, 12vh);
    --w: min(90vw, 59vh);
    --u: calc(var(--w) / 100);
  }

  #download .modal-dialog {
    width: var(--w);
  }

  #download .pop-bg4 {
    aspect-ratio: 985/1517;
    background-image: url(../images/popup/download/download_bg_m.webp);
  }

  #download .closePop {
    top: calc(var(--u) * 5);
    right: calc(var(--u) * 5);
    width: calc(var(--u) * 10);
    height: calc(var(--u) * 10);
  }

  #download .download_box {
    padding-top: calc(var(--u) * 13.5);
  }

  /* 標題：手機版改用三行圖 download_tt_m（891x202） */
  #download .download_tt {
    display: none;
  }

  #download .download_tt_m {
    display: block;
    width: calc(var(--u) * 88);
    height: auto;
    margin-bottom: calc(var(--u) * 6);
  }

  /* QR code 置中在上，按鈕兩欄在下 */
  #download .gameInfo {
    flex-direction: column;
    gap: calc(var(--u) * 5);
  }

  #download .gameInfo .qrcode {
    width: calc(var(--u) * 32);
  }

  #download .gameInfo .store {
    grid-template-columns: repeat(2, auto);
    column-gap: calc(var(--u) * 5);
    row-gap: calc(var(--u) * 4);
  }

  #download .gameInfo .store a img {
    width: calc(var(--u) * 39);
  }

  #download .gameInfo .store a.store-google-play-games img {
    width: calc(var(--u) * 46);
  }

  /* Google Play Games 獨立一列置中 */
  #download .store-google-play-games {
    grid-column: 1 / span 2;
    grid-row: 4;
    justify-self: center;
  }

  /* 手機版不顯示「支援Apple Mac」 */
  #download .macTip {
    display: none;
  }
}

/* 彈窗開關時頁面寬度不變 ----------------------------------------------------
   本頁捲軸長在 html（上方 html, body 都設 overflow:auto），但 Bootstrap 開彈窗時只把 body 設成 overflow:hidden，
   並替 body、.modal 補上「捲軸寬度」的 padding-right。結果捲軸沒消失、內容卻多被擠 5px，關閉時再彈回去。
   改成：捲軸空間永遠保留（scrollbar-gutter），開彈窗時鎖 html 的捲動，並取消 Bootstrap 的 padding 補償。 */
html {
  scrollbar-gutter: stable;
}

html:has(body.modal-open) {
  overflow: hidden;
}

body.modal-open,
.modal {
  padding-right: 0 !important;
}

/*# sourceMappingURL=main.css.map */
