/* =========================================================
   個人作品集網站 — 共用樣式
   ========================================================= */

:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-muted: #6b6b6b;
  --color-line: #e6e6e6;
  --color-accent: #1a1a1a;
  --color-pink: #e75c7a;
  --color-mauve: #b38590;
  --max-width: 1200px;
  --gap: 20px;


  /* 測試用：副標 + 全站社群 icon */
  --color-subtitle-test: #d56f86;
}


@font-face {
  font-family: "GenWanMin";
  src: url("../fonts/GenWanMin-TW-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image: url("../texture.png");
  background-repeat: repeat;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  cursor: url("../cursor/default.png") 16 16, auto;
  padding-top: var(--nav-height, 160px);
}

/* 首頁沒有固定導覽列，不需要預留上方空間 */
body.home-page { padding-top: 0; }

a, button { cursor: url("../cursor/hover.png") 16 16, pointer !important; }

.nav-icons a,
.nav-icons button,
.share-btn {
  cursor: pointer !important;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 固定頂部選單(單排：頭像+品牌 / 選單 / 社群圖示+漢堡；有外框效果) ---------- */

.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: none;
  padding: 40px 16px 16px;
  pointer-events: none;
}

.nav-bar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  border: 1px solid var(--color-pink);
  padding: 16px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  overflow: visible;
  background-color: #ffffff;
  background-image: url("../texture.png");
  background-repeat: repeat;
  box-shadow: 0 10px 24px rgba(0,0,0,0.1);
  pointer-events: auto;
}

/* 左側：圓形頭像(疊在外框線上，底部對齊副標文字) + 品牌名稱／副標 */
.brand-block {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-shrink: 0;
}

.brand-avatar {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  margin-top: -40px;
  background: #fff;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--color-pink);
}

.brand-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--color-pink);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.brand-avatar:hover::after {
  opacity: 0.7;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  display: inline-block;
  font-family: "Californian FB", "GenWanMin", Georgia, serif;
  font-size: 23px;
  font-weight: 400;
  letter-spacing: 4px;
  color: var(--color-pink);
}

.brand-subtitle-inline {
  font-family: "Californian FB", "GenWanMin", Georgia, serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: var(--color-mauve);
  margin-top: 5px;
}

/* 中間：選單 */
.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.main-nav > ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
}

.main-nav > ul > li {
  position: relative;
}

.main-nav a {
  display: block;
  padding: 11px 16px;
  font-size: 15px;
  letter-spacing: 0.4px;
  border-radius: 4px;
  white-space: nowrap;
  color: var(--color-pink);
}

.main-nav > ul > li > a:hover,
.main-nav > ul > li.active > a {
  color: var(--color-text);
  background: #f4f4f4;
}

/* 下拉選單 */
.main-nav .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: 6px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  text-align: center;
}

.main-nav li:hover .dropdown,
.main-nav li.open .dropdown {
  display: block;
}

.main-nav .dropdown a {
  padding: 8px 12px;
  font-size: 13px;
  color: #606060;
}

.main-nav .dropdown a:hover {
  background: #f4f4f4;
  color: var(--color-text);
}

/* 右側：IG / Mail / Share + 手機漢堡，依序靠右 */
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.nav-icons {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-icons a {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
}

.nav-icons a:hover { opacity: 1; }
.nav-icons svg { width: 17px; height: 17px; fill: currentColor; display: block; }

.share-btn {
  display: inline-flex;
  align-items: center;
  height: 18px;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.4px;
  color: inherit;
  opacity: 0.7;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  /* 手機瀏覽器(尤其 iOS Safari)會給 <button> 加上一些看不見的預設樣式
     (內建 padding、最小高度等)，就算已經寫了 padding:0 也不一定會完全
     蓋掉，導致 Share 文字沒辦法跟旁邊的 IG / Mail icon 對齊在同一條線上。
     加上 appearance:none 把瀏覽器預設的按鈕外觀整個關掉，才能讓
     height/line-height 這些設定真正生效、跟旁邊的 icon 對齊。 */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.share-btn:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }

/* 手機漢堡選單按鈕 */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  position: relative;
  transition: 0.2s;
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }

/* 手機全螢幕選單的關閉按鈕，桌機版預設不顯示 */
.nav-close { display: none; }

@media (max-width: 860px) {
  body { padding-top: var(--nav-height, 76px); }

  .nav-toggle { display: block; }

  /* 首頁手機版：完全拿掉左側的裝飾按鈕選單(不是移動位置)，只留右上角漢堡 icon，
     高度對齊頭貼上緣(跟 IG/Mail/Share 那排圖示錯開，不會疊在一起) */
  .home-nav { display: none !important; }

  .home-top .nav-toggle {
    position: absolute;
    top: 68px;
    right: 20px;
  }

  /* 手機版：拿掉外框卡片浮動感，整條導覽列變成單一扁平色塊，貼齊視窗頂端固定，滑動時不再有「一塊壓上來」的分層感 */
  .nav-bar {
    padding: 0;
    background-color: #ffffff;
    background-image: url("../texture.png");
    background-repeat: repeat;
    border-bottom: 1px solid var(--color-pink);
  }

  .nav-bar-inner {
    padding: 16px 16px;
    gap: 10px;
    border: none;
    box-shadow: none;
    background: none;
  }

  /* 手機版：頭像跟品牌名字縮小，改成一般行內排列，不再疊出外框上緣 */
  .brand-block { gap: 8px; }

  .brand-text { margin-top: 0; }

  .brand-avatar {
    width: 42px;
    height: 42px;
    margin-top: 0;
  }

  .brand-name {
    font-size: 15px;
    letter-spacing: 2.5px;
  }

  .brand-subtitle-inline {
    font-size: 10px;
    margin-top: 4px;
  }

  .nav-right { gap: 10px; }
  .nav-icons { gap: 12px; }

  /* 手機版選單：全螢幕淡出/淡入效果 */
  .main-nav {
    position: fixed;
    inset: 0;
    z-index: 1500;
    background: #fff;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 96px 24px 60px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease;
  }

  .main-nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .main-nav > ul {
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 10px;
  }

  /* 手機全螢幕選單：字放大，一目了然；母分類用明體+黑色 */
  .main-nav > ul > li {
    width: 100%;
    text-align: center;
  }

  .main-nav > ul > li > a {
    display: block;
    width: 100%;
    text-align: center;
    font-family: "GenWanMin", "Noto Serif TC", Georgia, serif;
    font-size: 22px;
    padding: 10px 16px;
    color: var(--color-pink);
  }

  .main-nav .dropdown {
    display: block;
    position: static;
    box-shadow: none;
    border: none;
    transform: none;
    padding-left: 0;
    text-align: center;
    margin-top: 4px;
  }

  /* 子分類：明體，深灰字，跟母分類的黑色做出層級區隔 */
  .main-nav .dropdown a {
    font-family: "GenWanMin", "Noto Serif TC", Georgia, serif;
    font-size: 16px;
    padding: 8px 12px;
    color: #4d4d4d;
  }

  /* 選單右上角的關閉按鈕(X)：固定在畫面右上角，不隨內容捲動 */
  .nav-close {
    display: block;
    position: fixed;
    top: 18px;
    right: 20px;
    z-index: 1600;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 30px;
    line-height: 1;
    color: var(--color-text);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .nav-close.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* 漢堡選單開啟時，變成 X */
  .nav-toggle.is-active span {
    background: transparent;
  }
  .nav-toggle.is-active span::before {
    top: 0;
    transform: rotate(45deg);
  }
  .nav-toggle.is-active span::after {
    top: 0;
    transform: rotate(-45deg);
  }
}

/* ---------- 首頁大橫幅 Slider(精選2~3張圖，自動輪播；固定 1880:1403 比例) ---------- */

.hero-slider {
  width: 100%;
}

.hero-slider-stage {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1880 / 1403;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #f4f4f4;
}

/* 小圓點指示器先隱藏起來，不透露總共有幾張圖(標記留著，之後想恢復隨時打開) */
.hero-dots {
  display: none;
}

.hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--color-line);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-dot:hover { background: #bbb; }

.hero-dot.is-active {
  background: var(--color-text);
  transform: scale(1.3);
}

/* ---------- 首頁：上排是圓形大頭貼 + 標題/副標 + 簡介文字 + 社群圖示橫向排開，
   下排左側是一整排像便條紙一樣散落、微微傾斜的按鈕(取代固定導覽列，不會跟著
   捲動)，右側是縮小、靠右、多加一層外框的大圖輪播 ---------- */

.home-top {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px 28px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 44px 40px 0;
}

.home-portrait {
  position: relative;
  z-index: 3;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-line);
}

.home-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 游標移過去：疊一層粉色 */
.home-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--color-pink);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.home-portrait:hover::after { opacity: 0.72; }

.home-title-block {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  margin-left: 12px;
}

.home-title-block .brand-name { font-size: 30px; }

.home-title-block .brand-subtitle-inline {
  display: block;
  margin-top: 6px;
  font-size: 15px;
}

/* 簡介文字＋社群圖示整組靠右對齊；圖示排在文字上方 */
.home-intro {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  max-width: 340px;
  text-align: right;
}

.home-intro-text {
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.75;
}

.home-intro-icons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.home-intro-icons a {
  display: flex;
  align-items: center;
  height: 18px;
}

.home-intro-icons a svg { width: 18px; height: 18px; fill: var(--color-muted); display: block; }

.home-body {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  max-width: var(--max-width);
  margin: 4px auto 0;
  padding: 0 40px 40px;
}

/* 按鈕變得細長(高度壓縮、寬度加寬)，並且跟圖片距離拉近 */
.home-nav {
  display: flex;
  flex-direction: column;
  gap: 25px;
  flex-shrink: 0;
  width: 170px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.home-nav a {
  display: inline-block;
  padding: 3px 36px;
  border: 1px solid var(--color-pink);
  background: #fff;
  color: var(--color-pink);
  font-size: 14px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.home-nav a:hover {
  transform: rotate(var(--rot, 0deg)) translateY(-4px);
  background: var(--color-pink);
  color: #fff;
}

/* 大圖輪播縮小、靠右，外面多加一層邊框把圖片框住，框跟圖片之間盡量不留空隙 */
.home-hero-frame {
  flex: 1 1 auto;
  min-width: 0;
  margin-left: auto;
  padding: 0px;
  border: 1px solid var(--color-pink);
}

/* 首頁裡的 .main-nav 只是手機版漢堡選單用的全螢幕選單，
   桌機版不需要顯示(桌機版選單已經是左側那排裝飾按鈕) */
.home-top .main-nav { display: none; }

@media (max-width: 860px) {
  /* 手機版改成 grid：左欄是頭貼，右欄疊放主標/副標/說明文字，
     三段文字才會「一起」貼在頭貼右邊，而不是各自散開 */
  .home-top {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 16px;
    row-gap: 6px;
    align-items: start;
    padding: 68px 20px 0;
  }

  /* 手機版：恢復顯示，這裡才是漢堡點開後的全螢幕選單 */
  .home-top .main-nav { display: flex; }

  .home-portrait {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 130px;
    height: 130px;
  }

  .home-title-block {
    grid-column: 2;
    grid-row: 1;
    margin-left: 0;
  }

  /* 主標(fengyin) > 副標(illustrator | 茵 Yin) > 說明文字，三段字級遞減 */
  .home-title-block .brand-name { font-size: 25px; }
  .home-title-block .brand-subtitle-inline { font-size: 14px; }

  /* 手機版：說明文字接在標題正下方，同一欄、靠左對齊 */
  .home-intro {
    grid-column: 2;
    grid-row: 2;
    margin-left: 0;
    align-items: flex-start;
    text-align: left;
    max-width: none;
  }

  .home-intro-text { font-size: 13px; }

  /* 手機版：IG / Mail / Share 都收到右上角 */
  .home-intro-icons {
    position: absolute;
    top: 20px;
    right: 20px;
    justify-content: flex-end;
  }

  .home-body { display: none; }
}

/* ---------- 頁面共用區塊 ---------- */

.page-hero {
  padding: 20px 0 40px;
  text-align: center;
}

.page-hero h1 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 14px;
}

.page-hero p {
  color: var(--color-muted);
  max-width: 560px;
  margin: 0 auto;
  font-size: 15px;
}

/* 細字體標題(Zine 系列 / Commercial Work / About) */
.heading-thin {
  font-weight: 300;
  letter-spacing: 1.5px;
}

/* ---------- 圖片畫廊(自動讀取編號圖片) ----------
   採用「多欄位(column)」排版，橫向固定 3 欄，圖片保留原始比例，
   欄內一張接一張排列，欄與欄之間不需要底部對齊(類似 Pinterest 的排法)。
*/

.gallery {
  column-count: 3;
  column-gap: 14px;
  padding: 30px 12.5% 20px;   /* 左右留白 ≈ 半張圖片欄寬 */
}

/* Illustration 子分類頁：不顯示標題，圖片直接從選單下方開始，多留一點空間 */
.gallery.gallery-flush {
  padding-top: 0px;
}

.gallery img {
  width: 100%;
  height: auto;           /* 保留原始比例，不裁切 */
  display: block;
  margin-bottom: 14px;    /* 圖片之間的間距，跟欄距一致 */
  border-radius: 2px;
  cursor: pointer;        /* 手指游標 */
  transition: opacity 0.2s;
  background: #f4f4f4;
  break-inside: avoid;    /* 避免一張圖被欄位截斷成兩半 */
}

.gallery img:hover { opacity: 0.85; }

@media (max-width: 900px) {
  .gallery { column-count: 2; padding-left: 16.6%; padding-right: 16.6%; }
}

@media (max-width: 560px) {
  .gallery { column-count: 2; padding-left: 20px; padding-right: 20px; }
}

/* ---------- Zine:細字體標題 + 文字說明 + 分隔線 + 畫廊 ---------- */

.zine-intro {
  max-width: 680px;
  margin: 0 auto;
  padding: 60px 0 0;
  text-align: center;
}

.zine-intro h1 {
  font-size: 30px;
  margin-bottom: 20px;
}

.zine-intro .zine-text {
  color: var(--color-muted);
  font-size: 15px;
  white-space: pre-line;
}

.zine-divider {
  border: none;
  border-top: 1px solid var(--color-line);
  width: 64px;
  margin: 32px auto;
}

/* 內頁封面：置中展示 */
.zine-cover {
  max-width: 380px;
  margin: 0 auto;
  padding: 0 24px;
}

.zine-cover img {
  width: 100%;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

/* ---------- Zine 總覽：封面去背成一本本書，像放在桌面上排開一樣。
   桌面版用「固定高度、寬度依照圖片比例自動調整」，讓每本書看起來
   高度一致(比較符合書本並排的感覺)，不會因為某張圖片比例較扁就
   顯得比較小本。影子用 filter: drop-shadow 沿著 PNG 去背後的實際
   輪廓投影(不是圖片的矩形外框)。滑鼠移過去時：封面本身不動、內頁圖
   疊上來蓋住封面，輪廓陰影同時轉成粉色、放大，書本微微被「拿起來」
   偏移。手機版改成兩本一排的格狀排列。 ---------- */

.zine-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 90px 110px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 50px 24px 130px;
  background-image: url("../texture.png");
  background-repeat: repeat;
}

.zine-reader-book {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  background: #fff;
  box-shadow:
    0 10px 24px rgba(0,0,0,0.06),
    0 1px 4px rgba(0,0,0,0.04);
  overflow: hidden;
  transform: none;
}

.zine-book:nth-child(3n+1) { --rotate: -3deg; }
.zine-book:nth-child(3n+2) { --rotate: 2deg; }
.zine-book:nth-child(3n+3) { --rotate: -1.5deg; }

/* :hover 規則獨立包在 @media (hover:hover) 裡，只給滑鼠裝置看到。
   手機這種觸控裝置一律回報 hover:none，完全不會套用到 :hover 規則——
   這是關鍵：只要頁面上同一個連結「同時」有 :hover 樣式，iOS Safari
   就會把第一下點擊當成「先觸發 hover 效果」，要點兩下才會真的跳轉。
   拿掉觸控裝置看得到的 :hover，只留 :active / .is-touched(手機用 JS
   加上)，點一下就會直接進入頁面。 ---------- */
@media (hover: hover) {
  .zine-book:hover {
    transform: rotate(var(--rotate, 0deg)) translate(-6px, -14px);
  }
}

.zine-book:active,
.zine-book.is-touched {
  transform: rotate(var(--rotate, 0deg)) translate(-6px, -14px);
}

.zine-book-stack {
  position: relative;
  display: block;
  height: 300px;
  touch-action: manipulation;
}

.zine-book-cover,
.zine-book-inside {
  display: block;
}


/* ---------- 只取消單本 Zine 閱讀器的傾斜，不影響 Zine 母分類書本旋轉 ---------- */

.zine-reader-page .zine-reader,
.zine-reader-page .zine-page,
.zine-reader-page .zine-page-current,
.zine-reader-page .zine-page-next,
.zine-reader-page .zine-page img {
  transform: none !important;
  rotate: 0deg !important;
}




/* 封面本身一直維持完整不透明，同時身兼「影子的來源」：用 drop-shadow
   沿著 PNG 去背後的實際邊緣(而不是整張圖片的矩形)投影，平常是淡淡的
   灰色，滑過去變成粉色、範圍更大更明顯。高度固定、寬度依圖片比例自動
   調整，讓每本書視覺上一樣高 */
.zine-book-cover {
  position: relative;
  z-index: 1;
  height: 100%;
  width: auto;
  filter: none;
  transition: filter 0.4s ease;
  /* 手機瀏覽器對 <img> 有自己的手勢判斷(雙擊縮放、長按另存圖片/預覽、
     拖曳圖片)，這些判斷會讓瀏覽器多等一下才確定使用者是不是要點擊連結，
     點標題文字卻不會有這個延遲，因為文字沒有這些圖片專屬手勢。
     乾脆讓圖片本身完全不接收點擊/觸控事件(pointer-events: none)，
     這樣不管是滑鼠點擊還是手指觸碰，都會直接落在外層的 <a class="zine-book">
     連結上，不會被圖片的手勢判斷卡住，點一下就能像點標題一樣立刻跳轉。
     下面這些手機瀏覽器的圖片專屬手勢(長按選單、拖曳預覽、雙擊縮放)也一併
     關掉，保險起見。 */
  touch-action: manipulation;
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  user-select: none;
}

@media (hover: hover) {
  .zine-book:hover .zine-book-cover {
    filter: drop-shadow(13px 14px 8px rgba(231, 92, 122, 0.6));
  }
}

.zine-book:active .zine-book-cover,
.zine-book.is-touched .zine-book-cover {
  filter: drop-shadow(13px 14px 8px rgba(231, 92, 122, 0.6));
}


/* 內頁圖疊在封面正上方，平常完全透明看不到，滑過去才淡入蓋住封面；
   陰影是封面自己的 drop-shadow，不會被蓋住 */
.zine-book-inside {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: transparent;
  opacity: 0;
  touch-action: manipulation;
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  user-select: none;
  transition: opacity 0.4s ease;
}

@media (hover: hover) {
  .zine-book:hover .zine-book-inside {
    opacity: 1;
  }
}

.zine-book:active .zine-book-inside,
.zine-book.is-touched .zine-book-inside {
  opacity: 1;
}

.zine-book-title {
  display: block;
  margin-top: 25px;
  text-align: center;
  font-family: "GenWanMin", "Noto Serif TC", Georgia, serif;
  font-size: 16px;
  letter-spacing: 0.5px;
  color: var(--color-text);
}

/* 手機版：改成固定寬度、兩本一排的格狀排列(不再用「固定高度」，
   避免較寬的封面在窄欄位裡被撐爆) */
@media (max-width: 900px) {
  .zine-grid {
    display: grid;
    grid-template-columns: 1fr; /* 手機版一本排一排、置中，不再兩本並排 */
    align-items: start;
    justify-items: center;
    gap: 56px 0;
    padding: 36px 24px 100px;
  }

  .zine-book { width: 100%; max-width: 300px; } /* 少了並排的寬度限制，書本可以放大一點 */
  .zine-book-stack { height: auto; }
  .zine-book-cover { height: auto; width: 100%; }
}

@media (max-width: 560px) {
  .zine-grid { gap: 46px 0; padding: 28px 24px 80px; }
  .zine-book { max-width: 240px; }
  .zine-book-title { font-size: 14.5px; margin-top: 22px; }
}

/* ---------- 分類總覽卡片(Illustration 首頁：圖片式卡片，滑鼠移過去反黑顯示分類名稱) ---------- */

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 60px 12.5% 80px;
}

@media (max-width: 900px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); padding-left: 16.6%; padding-right: 16.6%; }
}

@media (max-width: 560px) {
  .category-grid { grid-template-columns: 1fr; padding: 40px 20px 60px; gap: 6px; }
}

.category-card {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f4f4f4;
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.category-card:hover img,
.category-card.is-touched img { transform: scale(1.05); }

.category-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(231, 92, 122, 0);
  transition: background 0.3s ease;
}

.category-card:hover .category-card-overlay,
.category-card.is-touched .category-card-overlay {
  background: rgba(231, 92, 122, 0.75);
}

.category-card-title {
  color: #fff;
  font-family: "GenWanMin", "Noto Serif TC", Georgia, serif;
  font-size: 20px;
  letter-spacing: 1.5px;
  text-align: center;
  padding: 0 16px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.category-card:hover .category-card-title,
.category-card.is-touched .category-card-title {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Illustration 總覽頁：可篩選的作品列表 ----------
   上方是分類篩選列(All / General Work / Inktober / Caricature / Characters /
   Mobile Wallpaper)，每個分類文字前面都有一個小圓框。預設(未選取)是空心圓框，
   選取後變成實心圓；圓框裡的圖案可以自己上傳圖檔覆蓋(見
   images/illustration/badges/放圖片說明.txt)，找不到圖檔時就直接顯示上述
   空心/實心圓的預設樣式，不會出現破圖或影響版面(跟底紋/游標圖片是同一種
   「找不到就優雅地退回預設樣式」的做法)。下方圖片沿用既有的 .gallery
   瀑布流排版，只是多了「依分類淡出/淡入切換顯示」的效果。 ---------- */

.illustration-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 24px;
  max-width: 1100px; /* 比圖庫本身的置中寬度再寬一點，讓六個分類在桌機版盡量排成一排 */
  margin: 0 auto;
  padding: 40px 24px 6px;
}

.filter-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: none;
  padding: 6px 2px;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.4px;
  color: var(--color-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.filter-item:hover { color: var(--color-pink); }

.filter-item.is-active {
  color: var(--color-pink);
  font-weight: 600;
}

.filter-badge {
  display: inline-block;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--color-pink);
  background-color: transparent;
  background-size: cover;
  background-position: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

/* 平常：手繪空心圖 */
.filter-badge {
  width: 19px;
  height: 19px;
  display: inline-block;
  flex: 0 0 auto;

  border: none;
  border-radius: 0;
  background-color: transparent;
  background-image: url("../ui/filter-dot-empty.png");
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  box-shadow: none;
}

/* 如果之前有 ::before / ::after 畫造型，也關掉 */
.filter-badge::before,
.filter-badge::after {
  display: none;
}

/* 選到時：只換成填滿版手繪圖，不另外上底色 */
.filter-item.is-active .filter-badge {
  background-color: transparent;
  background-image: url("../ui/filter-dot-active.png");
  box-shadow: none;
}

/* 各分類自己的圓框圖案(找不到圖檔就退回上面純色空心/實心圓) */
.filter-badge-all              { background-image: url("../../images/illustration/badges/all.png"); }
.filter-item.is-active .filter-badge-all              { background-image: url("../../images/illustration/badges/all-active.png"); }

.filter-badge-general-work     { background-image: url("../../images/illustration/badges/general-work.png"); }
.filter-item.is-active .filter-badge-general-work     { background-image: url("../../images/illustration/badges/general-work-active.png"); }

.filter-badge-inktober-series  { background-image: url("../../images/illustration/badges/inktober-series.png"); }
.filter-item.is-active .filter-badge-inktober-series  { background-image: url("../../images/illustration/badges/inktober-series-active.png"); }

.filter-badge-caricature       { background-image: url("../../images/illustration/badges/caricature.png"); }
.filter-item.is-active .filter-badge-caricature       { background-image: url("../../images/illustration/badges/caricature-active.png"); }

.filter-badge-characters       { background-image: url("../../images/illustration/badges/characters.png"); }
.filter-item.is-active .filter-badge-characters       { background-image: url("../../images/illustration/badges/characters-active.png"); }

.filter-badge-mobile-wallpaper { background-image: url("../../images/illustration/badges/mobile-wallpaper.png"); }
.filter-item.is-active .filter-badge-mobile-wallpaper { background-image: url("../../images/illustration/badges/mobile-wallpaper-active.png"); }

@media (max-width: 900px) {
  .illustration-filters { padding-left: 16px; padding-right: 16px; gap: 10px 18px; }
}

@media (max-width: 560px) {
  .illustration-filters { padding: 28px 20px 4px; gap: 8px 16px; }
  .filter-item { font-size: 13px; }
}

/* 切換分類時，圖片一張一張淡出/淡入；.is-hidden 讓被篩掉的圖片完全退出瀑布流版面 */
.gallery img { transition: opacity 0.32s ease; }
.gallery img.is-fading { opacity: 0; }
.gallery img.is-hidden { display: none; }

/* ---------- Commercial Work 列表 ---------- */

.commercial-wrap .page-hero h1 {
  font-family: "GenWanMin", "Noto Serif TC", Georgia, serif;
}

.commercial-wrap .page-hero p {
  max-width: 720px;
  font-size: 14px;
  line-height: 1.9;
  white-space: pre-line;
  text-align: left;
  margin-left: auto;
  margin-right: auto;
}


/* ============================================================
   Commercial：用 position: sticky 讓每個區塊依序「貼」在視窗頂端，
   下一個區塊往上捲動時會直接蓋住還貼著頂端的上一個區塊，做出真正
   會動的堆疊層次感(不是只有邊緣重疊一點點的靜態效果)。

   排列邏輯：[滿版大圖(01)] → [底紋+兩張作品卡(02+03)]
   → [滿版大圖(04)] → [底紋+一張作品卡(05)]

   每一段都用 .layer-1 ~ .layer-4 指定「嚴格遞增」的 z-index，
   確保捲動到下一段時，一定能蓋住緊接在它前面的那一段。
   ============================================================ */

.commercial-projects {
  position: relative;
}

.layer-1 { z-index: 1; }
.layer-2 { z-index: 2; }
.layer-3 { z-index: 3; }
.layer-4 { z-index: 4; }

/* 滿版大圖區塊(第 01、04 個案例)：貼在視窗頂端固定不動，
   直到被下一段(z-index 更高的底紋+作品卡)捲上來蓋住 */
.project-feature {
  display: block;
  position: sticky;
  top: var(--nav-height, 160px);
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: calc(100vh - var(--nav-height, 160px));
  cursor: pointer;
}

.project-feature-media {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #eee;
}

.project-feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.project-feature:hover .project-feature-media img { transform: scale(1.03); }

.project-feature-tag {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 34px 60px;
  background: var(--color-pink);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.project-feature-name {
  font-family: "GenWanMin", "Noto Serif TC", Georgia, serif;
  font-size: 30px;
  font-weight: 400;
  color: #fff;
  letter-spacing: 1px;
  white-space: nowrap;
}

.project-feature-more {
  display: inline-block;
  padding: 9px 32px;
  border: none;
  background: #fff;
  color: var(--color-pink);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.project-feature:hover .project-feature-more { opacity: 0.8; }

/* 底紋 + 作品卡區塊(第 02+03、05 個案例)：一樣貼在視窗頂端，z-index
   比前一個滿版大圖高，捲動時會完整蓋住它；裡面的作品圖必須完整顯示，
   不會被任何背景/大圖蓋住(它自己的不透明底紋背景會蓋住下層的大圖，
   而不是反過來) */
.project-pair {
  position: sticky;
  top: var(--nav-height, 160px);
  width: 100vw;
  margin-left: calc(50% - 50vw);
  min-height: calc(100vh - var(--nav-height, 160px));
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-bg);
  background-image: url("../texture.png");
  background-repeat: repeat;
  box-shadow: 0 -26px 44px rgba(0, 0, 0, 0.12);
  padding: 70px 24px;
}

@media (max-width: 860px) {
  .home-mobile-stack .project-pair {
    align-items: flex-start;
    padding-top: 170px;
    padding-bottom: 40px;
  }
}


@media (max-width: 860px) {
  .home-mobile-stack .project-pair {
    min-height: 60vh;
    padding: 36px 20px;
    align-items: center;
  }
}


@media (max-width: 860px) {
  .home-mobile-stack {
    margin-top: 38px;
  }
}


@media (max-width: 860px) {
  .home-mobile-stack .project-feature {
    height: auto;
    min-height: 0;
  }

  .home-mobile-stack .project-feature-media {
    height: auto;
    overflow: visible;
  }

  .home-mobile-stack .project-feature-media .hero-slider-stage {
    aspect-ratio: 1880 / 1403;
    height: auto;
  }

  .home-mobile-stack .hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}

@media (max-width: 640px) {
  .commercial-wrap .project-pair {
    align-items: flex-start;
    padding-top: 170px;
    padding-bottom: 40px;
  }
}

.project-pair-inner {
  max-width: 880px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 300px));
  justify-content: center;
  gap: 40px 60px;
}

.project-pair-inner.is-solo {
  grid-template-columns: minmax(0, 360px);
}

.project-card { cursor: pointer; }

/* 目前作品圖是 4:5 直式，區塊比例跟著拉高，確保完整顯示不裁切 */
.project-card-media {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #eee;
}

.project-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.project-card:hover .project-card-media img { transform: scale(1.04); }

.project-card-title {
  display: block;
  margin-top: 16px;
  font-family: "GenWanMin", "Noto Serif TC", Georgia, serif;
  font-size: 15px;
  letter-spacing: 0.5px;
  text-align: center;
  color: var(--color-text);
}

@media (max-width: 640px) {
  .project-feature-tag { padding: 22px 34px; gap: 12px; }
  .project-feature-name { font-size: 19px; white-space: normal; }
  .project-pair { padding: 40px 16px; }
  /* 手機版維持左右並排(不要疊成上下兩排)：疊成上下會讓整個區塊變得比一個
     螢幕還高，但 sticky 效果只會固定在第一個螢幕的高度範圍內，超出範圍
     的內容(例如下面那張作品卡)就會直接被下一層蓋住、永遠看不到。並排
     可以讓整個區塊維持在一個螢幕高度內，才不會被卡住。 */
  .project-pair-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }
  .project-pair-inner.is-solo { grid-template-columns: minmax(0, 220px); }
  .project-card-title { font-size: 13px; margin-top: 10px; }
}

/* ---------- 首頁手機版：拿掉桌機版的「按鈕 + 輪播」排版(.home-body)，
   改成沿用 Commercial 頁面的滿版捲動堆疊樣式，當作手機版瀏覽全站的入口。
   桌機版完全不受影響(.home-mobile-stack 預設不顯示)。 ---------- */
.home-mobile-stack { display: none; }

@media (max-width: 860px) {
  .home-body { display: none; }
  .home-mobile-stack { display: block; }
}

/* 首頁沒有固定導覽列，堆疊層不用預留導覽列高度 */
.home-mobile-stack .commercial-projects { --nav-height: 0px; }

/* 第一層借用大橫幅輪播元件，但要填滿整個 project-feature-media，
   不能沿用它自己原本固定的長寬比例 */
.project-feature-media .hero-slider-stage {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

/* 第一層輪播圖上直接壓字「茵 Yin」，不用色塊；游標移過去(桌機)
   或手指點一下(手機，靠 main.js 加上 .is-touched)都反成粉色 */
.project-feature-overlay {
  position: absolute;
  left: 28px;
  bottom: 28px;
  z-index: 2;
  font-family: "GenWanMin", "Noto Serif TC", Georgia, serif;
  font-size: 20px;
  letter-spacing: 3px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  transition: color 0.25s ease;
  pointer-events: none;
}

.project-feature:hover .project-feature-overlay,
.project-feature.is-touched .project-feature-overlay {
  color: var(--color-pink);
}

/* 首頁手機版第三層 Commercial：拿掉粉色色塊，文字直接壓在圖片上，
   效果同上(hover / is-touched 都反成粉色)。只鎖定在首頁手機堆疊區塊，
   不影響 Commercial 頁面本身既有的 .project-feature-tag 樣式 */
.home-mobile-stack .project-feature-tag {
  top: auto;
  left: 28px;
  bottom: 28px;
  transform: none;
  background: none;
  box-shadow: none;
  padding: 0;
  gap: 0;
}

.home-mobile-stack .project-feature-name {
  font-size: 20px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  transition: color 0.25s ease;
}

.home-mobile-stack .project-feature:hover .project-feature-name,
.home-mobile-stack .project-feature.is-touched .project-feature-name {
  color: var(--color-pink);
}

/* Illustration / Zine / Shop 卡片標題(首頁手機堆疊區塊限定)：字放大、
   改成標題粉色，specificity 比全站 .project-card-title 和 640px 版本都高，
   不影響 Commercial 頁面本身的卡片標題 */
.home-mobile-stack .project-card-title {
  font-size: 17px;
  font-weight: 500;
  color: var(--color-pink);
}

/* 專案詳細內容彈窗：沿用 Quick View 彈窗外觀(.quickview-*)，內容改成案例文案 */
.work-modal-info h3 {
  font-family: "GenWanMin", "Noto Serif TC", Georgia, serif;
  font-weight: 400;
}

.work-modal-title-en {
  display: block;
  font-family: "GenWanMin", "Noto Serif TC", Georgia, serif;
  font-size: 13px;
  font-style: italic;
  color: var(--color-muted);
  letter-spacing: 0.3px;
  margin-top: 4px;
}

.work-modal-meta {
  font-size: 12px;
  color: var(--color-muted);
  letter-spacing: 0.3px;
}

.work-modal-text {
  font-size: 14px;
  line-height: 1.9;
  color: var(--color-text);
  white-space: pre-line;
  margin: 0;
}

.work-modal-link {
  font-size: 12px;
  letter-spacing: 0.4px;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-top: auto;
  color: var(--color-pink);
}

/* ---------- Shop：五欄圖庫式展示 + Quick View ---------- */

.shop-grid {
  column-count: 5;
  column-gap: 14px;
  padding: 8px 12.5% 80px;
}

@media (max-width: 1100px) {
  .shop-grid { column-count: 4; }
}

@media (max-width: 900px) {
  .shop-grid { column-count: 3; padding-left: 16.6%; padding-right: 16.6%; }
}

@media (max-width: 560px) {
  .shop-grid { column-count: 2; padding-left: 20px; padding-right: 20px; }
}

.shop-card {
  position: relative;
  margin-bottom: 14px;
  break-inside: avoid;
  border-radius: 2px;
  overflow: hidden;
  background: #f4f4f4;
}

.shop-card img {
  width: 100%;
  height: auto;
  display: block;
}

.quickview-btn {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translate(-50%, 8px);
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-text);
  border: none;
  border-radius: 2px;
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.shop-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.shop-card:hover::after { opacity: 1; }
.shop-card:hover .quickview-btn {
  opacity: 1;
  transform: translate(-50%, 0);
}

.shop-note {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  color: var(--color-muted);
  font-size: 13px;
  padding-bottom: 10px;
}

/* ---------- Quick View 彈窗 ---------- */

.quickview-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.quickview-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.quickview-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.quickview-panel {
  position: relative;
  background: #fff;
  max-width: 820px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  transform: scale(0.97);
  transition: transform 0.3s ease;
}

.quickview-modal.is-open .quickview-panel { transform: scale(1); }

.quickview-image {
  flex: 1 1 340px;
  min-width: 0; /* 避免縮圖列(overflow-x:auto)撐開寬度，導致左右版面被擠成上下堆疊 */
  background: #f4f4f4;
  display: flex;
  flex-direction: column;
}

.qv-image-wrap {
  position: relative;
  flex: 1;
  min-height: 260px;
  overflow: hidden;
}

.qv-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
}

.qv-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.qv-image-wrap:hover .qv-nav { opacity: 1; }
.qv-prev { left: 10px; }
.qv-next { right: 10px; }
.qv-nav.is-hidden { display: none; }

.qv-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px;
  overflow-x: auto;
}

.qv-thumbs.is-hidden { display: none; }

.qv-thumbs img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 2px;
  cursor: pointer;
  opacity: 0.55;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.qv-thumbs img:hover { opacity: 0.85; }

.qv-thumbs img.active {
  opacity: 1;
  outline: 2px solid var(--color-text);
  outline-offset: 1px;
}

.quickview-info {
  flex: 1 1 300px;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.quickview-info .btn {
  align-self: flex-end;
  margin-top: auto;
  display: inline-block;
  padding: 12px 28px;
  background: var(--color-text);
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.4px;
  text-align: center;
  transition: opacity 0.2s ease;
}

.quickview-info .btn:hover { opacity: 0.85; }

.quickview-info .btn.is-disabled {
  background: #ccc;
  color: #888;
  cursor: not-allowed;
  pointer-events: none;
}

.quickview-info .btn.is-disabled:hover { opacity: 1; }

.quickview-info h3 { margin: 0; font-size: 20px; }

.qv-stock {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
}

.qv-stock.on-stock { background: #eaf3ec; color: #2f7a4d; }
.qv-stock.sold-out { background: #f3eaea; color: #a13d3d; }
.qv-stock.mixed { background: #f6f0e0; color: #96751f; }

.quickview-info p {
  color: var(--color-muted);
  font-size: 14px;
  margin: 0;
  white-space: pre-line;
}

.qv-price { font-size: 16px; font-weight: 500; }

.qv-note {
  margin: -8px 0 0; /* 跟上面的 .quickview-info 有 gap:14px，這裡往上拉一點，讓它更貼近價格，看起來像價格下方的附註 */
  font-size: 12px;
  color: var(--color-muted);
}

.qv-note.is-hidden { display: none; }

.quickview-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

/* ---------- About ---------- */

.about-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 0 80px;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.about-wrap img {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
}

.about-text { flex: 1; min-width: 260px; }
.about-text h1 { font-size: 26px; margin-top: 0; margin-bottom: 16px; }
.about-text .heading-thin { font-family: "GenWanMin", "Noto Serif TC", Georgia, serif; }
.about-text p { white-space: pre-line; font-size: 14px; line-height: 1.9; }

.about-name {
  display: inline-block;
  font-family: "GenWanMin", "Noto Serif TC", Georgia, serif;
  font-size: 18px;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

/* ---------- About：個人插畫創作 / 合作案例 / 展覽紀錄 ---------- */

.about-lower {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 24px 100px;
}

.about-practice {
  margin: 0 0 50px;
  line-height: 1.9;
  font-size: 14px;
  color: var(--color-text);
  white-space: pre-line;
}

.about-practice-title {
  display: block;
  font-family: "GenWanMin", "Noto Serif TC", Georgia, serif;
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.about-row {
  display: flex;
  gap: 60px;
  padding: 36px 0;
  border-top: 1px solid var(--color-line);
}

.about-row:last-child {
  border-bottom: 1px solid var(--color-line);
}

.about-row-label {
  flex: 0 0 170px;
  font-family: "GenWanMin", "Noto Serif TC", Georgia, serif;
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0.5px;
}

.about-row-label-en {
  display: block;
  font-family: "GenWanMin", "Noto Serif TC", Georgia, serif;
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 6px;
  letter-spacing: 0.5px;
  font-style: italic;
}

.about-row-list {
  flex: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.about-row-list li {
  font-size: 13px;
  line-height: 1.8;
  color: var(--color-text);
}

.about-row-list li + li {
  margin-top: 16px;
}

.about-row-list .about-year {
  font-weight: 600;
  margin-right: 4px;
}

.about-row-list .about-en {
  display: block;
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 3px;
}

@media (max-width: 720px) {
  .about-row { flex-direction: column; gap: 10px; padding: 28px 0; }
  .about-row-label { flex: none; }
}

/* ---------- Contact ---------- */

.contact-wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 20px 0 80px;
}

.contact-wrap form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

.contact-wrap label {
  font-size: 13px;
  color: var(--color-muted);
  margin-bottom: 4px;
  display: block;
}

.contact-wrap input,
.contact-wrap textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-line);
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
}

.contact-wrap textarea { min-height: 140px; resize: vertical; }

.contact-wrap button {
  padding: 12px 20px;
  background: var(--color-text);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  align-self: flex-start;
}

.contact-wrap button:hover { opacity: 0.85; }

/* ---------- 燈箱 Lightbox(相簿瀏覽模式) ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 3500;
  padding: 40px 40px 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease;
  touch-action: manipulation; /* 允許雙指縮放與拖曳，僅關閉雙擊縮放；相容性比 pinch-zoom 關鍵字更好(含 iOS Safari) */
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-stage {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image-wrap {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image-wrap img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 4px;
  transform: scale(0.96);
  transition: transform 0.35s ease;
  user-select: none;
  -webkit-user-drag: none;
  cursor: default;
}

.lightbox.is-open .lightbox-image-wrap img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  color: #fff;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  z-index: 2;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 1;
}

.lightbox-nav:hover { background: rgba(255, 255, 255, 0.3); }
.lightbox-prev { left: 4px; }
.lightbox-next { right: 4px; }
.lightbox-nav.is-hidden { display: none; }

@media (max-width: 720px) {
  .lightbox-nav { width: 38px; height: 38px; font-size: 19px; }
  .lightbox-prev { left: -4px; }
  .lightbox-next { right: -4px; }
}

.lightbox-thumbs {
  display: flex;
  gap: 8px;
  padding: 16px 4px 0;
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: thin;
}

.lightbox-thumbs.is-hidden { display: none; }

.lightbox-thumbs img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 2px;
  cursor: pointer;
  opacity: 0.5;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.lightbox-thumbs img:hover { opacity: 0.8; }

.lightbox-thumbs img.active {
  opacity: 1;
  outline: 2px solid #fff;
  outline-offset: 1px;
}

/* ---------- 頁尾 ---------- */

.site-footer {
  border-top: 1px solid var(--color-line);
  padding: 30px 0;
  text-align: center;
  color: var(--color-muted);
  font-size: 13px;
}

.site-footer .footer-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.site-footer .footer-icons a { opacity: 0.7; }
.site-footer .footer-icons a:hover { opacity: 1; }
.site-footer .footer-icons svg { width: 18px; height: 18px; fill: currentColor; display: block; }
.site-footer .share-btn { font-size: 13px; }




/* ---------- 手機版首頁：大頭圖、標題、icon、文字全部置中 ---------- */
@media (max-width: 860px) {
  .home-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;

    padding: 56px 20px 0;
    gap: 0;
    text-align: center;
  }

  .home-portrait {
    width: 138px;
    height: 138px;
    margin: 0 auto 16px;

    grid-column: auto;
    grid-row: auto;
  }

  .home-title-block {
    display: flex;
    flex-direction: column;
    align-items: center;

    margin-left: 0;
    margin-bottom: 12px;

    grid-column: auto;
    grid-row: auto;
  }

  .home-title-block .brand-name {
    font-size: 27px;
    letter-spacing: 4px;
    text-align: center;
  }

.home-title-block .brand-subtitle-inline {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  text-align: center;
}

  .home-intro {
    display: flex;
    flex-direction: column;
    align-items: center;

    margin-left: 0;
    max-width: 320px;
    width: 100%;

    text-align: center;

    grid-column: auto;
    grid-row: auto;
  }

  .home-intro-icons {
    position: static;
    display: flex;
    justify-content: center;
    align-items: center;

    gap: 16px;
    margin-bottom: 14px;
  }

  .home-intro-text {
    width: 100%;
    margin: 0;
    font-size: 13px;
    line-height: 1.8;
    text-align: center;
  }

  /* 如果首頁有漢堡選單，仍然固定在右上，不要跟置中內容一起排 */
  .home-top .nav-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
  }
}



/* ---------- 手機版：內頁文字左右留白 ---------- */
@media (max-width: 720px) {
  .page-hero {
    padding-left: 24px;
    padding-right: 24px;
  }

  .commercial-wrap .page-hero p {
    max-width: none;
    width: 100%;
  }

  .about-wrap {
    padding: 48px 24px 64px;
  }

  .about-lower {
    padding: 20px 24px 80px;
  }

  .contact-wrap {
    padding: 20px 24px 80px;
  }
}

/* ---------- 手機版首頁：第一張輪播 / Commercial 改成整張圖粉色透明覆蓋 ---------- */
@media (max-width: 860px) {
  /* 讓滿版圖片區塊可以放 ::after 遮罩 */
  .home-mobile-stack .project-feature {
    position: sticky;
    overflow: hidden;
  }

  /* 整張圖片的粉色透明遮罩，平常透明 */
  .home-mobile-stack .project-feature::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: rgba(231, 92, 122, 0);
    transition: background 0.3s ease;
    pointer-events: none;
  }

  /* hover / 手機點擊時，整張圖片蓋上透明粉色 */
  .home-mobile-stack .project-feature:hover::after,
  .home-mobile-stack .project-feature.is-touched::after {
    background: rgba(231, 92, 122, 0.75);
  }

  /* 第一張輪播的「茵 Yin」置中，白字，平常先隱藏 */
  .home-mobile-stack .project-feature-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);

    z-index: 3;
    display: block;

    color: #fff;
    background: none;
    box-shadow: none;
    padding: 0;

    font-family: "GenWanMin", "Noto Serif TC", Georgia, serif;
    font-size: 22px;
    letter-spacing: 3px;
    white-space: nowrap;
    text-align: center;
    text-shadow: none;

    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
  }

  /* Commercial 的外層不要粉色色塊，只負責置中 */
  .home-mobile-stack .project-feature-tag {
    position: absolute;
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);

    z-index: 3;
    display: block;

    background: none;
    box-shadow: none;
    padding: 0;
    gap: 0;
    text-align: center;

    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
  }

  .home-mobile-stack .project-feature-name {
    color: #fff;
    font-size: 22px;
    letter-spacing: 2px;
    white-space: nowrap;
    text-shadow: none;
  }

  /* hover / 手機點擊時，白字淡入 */
  .home-mobile-stack .project-feature:hover .project-feature-overlay,
  .home-mobile-stack .project-feature.is-touched .project-feature-overlay,
  .home-mobile-stack .project-feature:hover .project-feature-tag,
  .home-mobile-stack .project-feature.is-touched .project-feature-tag {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}


@media (max-width: 860px) {
  .home-mobile-stack .project-feature-overlay,
  .home-mobile-stack .project-feature-name {
    color: #fff !important;
  }

  .home-mobile-stack .project-feature:hover .project-feature-overlay,
  .home-mobile-stack .project-feature.is-touched .project-feature-overlay,
  .home-mobile-stack .project-feature:hover .project-feature-name,
  .home-mobile-stack .project-feature.is-touched .project-feature-name {
    color: #fff !important;
  }
}




/* ---------- 全站 IG / Mail / Share 改成副標同色 ---------- */

/* 首頁上方 */
.home-intro-icons,
.home-intro-icons a,
.home-intro-icons button,
.home-intro-icons .share-btn {
  color: var(--color-mauve) !important;
}

.home-intro-icons svg {
  fill: var(--color-mauve) !important;
}

/* 其他頁面固定導覽列 */
.nav-icons,
.nav-icons a,
.nav-icons button,
.nav-icons .share-btn {
  color: var(--color-mauve) !important;
}

.nav-icons svg {
  fill: var(--color-mauve) !important;
}

/* 頁尾 */
.site-footer .footer-icons,
.site-footer .footer-icons a,
.site-footer .footer-icons button,
.site-footer .footer-icons .share-btn {
  color: var(--color-mauve) !important;
}

.site-footer .footer-icons svg {
  fill: var(--color-mauve) !important;
}



/* ---------- 副標 + 全站 IG / Mail / Share 顏色測試 ---------- */

/* 副標 illustrator | 茵 Yin */
.brand-subtitle-inline,
.home-title-block .brand-subtitle-inline {
  color: var(--color-subtitle-test) !important;
}

/* 首頁上方 IG / Mail / Share */
.home-intro-icons,
.home-intro-icons a,
.home-intro-icons button,
.home-intro-icons .share-btn {
  color: var(--color-subtitle-test) !important;
}

.home-intro-icons svg,
.home-intro-icons svg path {
  fill: var(--color-subtitle-test) !important;
}

/* 其他頁面固定導覽列 IG / Mail / Share */
.nav-icons,
.nav-icons a,
.nav-icons button,
.nav-icons .share-btn {
  color: var(--color-subtitle-test) !important;
}

.nav-icons svg,
.nav-icons svg path {
  fill: var(--color-subtitle-test) !important;
}

/* 頁尾 IG / Mail / Share */
.site-footer .footer-icons,
.site-footer .footer-icons a,
.site-footer .footer-icons button,
.site-footer .footer-icons .share-btn {
  color: var(--color-subtitle-test) !important;
}

.site-footer .footer-icons svg,
.site-footer .footer-icons svg path {
  fill: var(--color-subtitle-test) !important;

}

/* ---------- 手機版漢堡選單改成副標測試色 ---------- */
@media (max-width: 860px) {
  .nav-toggle span,
  .nav-toggle span::before,
  .nav-toggle span::after {
    background: var(--color-subtitle-test);
  }

  .nav-toggle.is-active span {
    background: transparent;
  }

  .nav-close {
    color: var(--color-subtitle-test);
  }
}


/* ---------- 電腦版導覽列 hover / active 改成淡粉 ---------- */
@media (min-width: 861px) {
  .main-nav > ul > li > a:hover,
  .main-nav > ul > li.active > a {
    color: var(--color-subtitle-test);
    background: rgba(213, 111, 134, 0.14);
  }

  .main-nav .dropdown a:hover {
    color: var(--color-subtitle-test);
    background: rgba(213, 111, 134, 0.12);
  }
}


/* Illustration 篩選選單與圖片距離 */
.illustration-filters {
  margin-bottom: 24px;
}





/* ---------- Illustration filter stagger fade ---------- */

#illustrationGallery img {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}

#illustrationGallery img.is-filter-hidden {
  display: none;
}

#illustrationGallery img.is-filter-enter {
  opacity: 0;
  transform: translateY(18px);
}

#illustrationGallery img.is-filter-visible {
  opacity: 1;
  transform: translateY(0);
}





/* ---------- Illustration 圖片切換：一張一張淡入 ---------- */

#illustrationGallery img {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}

#illustrationGallery img.is-fading {
  opacity: 0;
  transform: translateY(18px);
}

#illustrationGallery img.is-hidden {
  display: none;
}








/* ---------- Illustration 分類選項：手繪圖片版 ---------- */

.filter-badge {
  width: 23px;
  height: 23px;
  display: inline-block;
  flex: 0 0 auto;

  border: none;
  border-radius: 0;
  background: url("../ui/filter-dot-empty.png") center / contain no-repeat;
  transform: none;
}

.filter-badge::before,
.filter-badge::after {
  display: none;
}

.filter-item.is-active .filter-badge {
  background-image: url("../ui/filter-dot-active.png");
}


/* ---------- Zine 詳細頁：回到 Zine 書架的連結 ---------- */

.zine-back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: 12.5px;
  letter-spacing: 0.5px;
  color: var(--color-subtitle-test, #d56f86);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

@media (hover: hover) {
  .zine-back-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

.zine-back-link:active {
  opacity: 0.65;
}

/* ---------- Zine 詳細頁：標題層級 ---------- */

.zine-intro-detail {
  max-width: 620px;
  padding: 46px 24px 0;
  text-align: center;
}

.zine-title-main {
  margin: 0;
  font-family: "GenWanMin", "Noto Serif TC", Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 3.8px;
  line-height: 1.4;
  color: var(--color-text);
}

.zine-title-sub {
  margin-top: 5px;
  font-family: "GenWanMin", "Noto Serif TC", Georgia, serif;
  font-size: 14px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: var(--color-muted);
}

.zine-meta {
  margin-top: 18px;
  font-size: 13px;
  letter-spacing: 0.8px;
  color: var(--color-subtitle-test, #d56f86);
}

.zine-intro-detail .zine-text {
  max-width: 520px;
  margin: 18px auto 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: 13px;
  line-height: 1.9;
  letter-spacing: 0.3px;
  color: var(--color-muted);
  white-space: pre-line;
  text-align: center;
}

@media (max-width: 560px) {
  .zine-intro-detail {
    padding: 34px 24px 10;
  }

.zine-intro-detail .zine-title-main {
  margin: 0;
  font-family: "GenWanMin", "Noto Serif TC", Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 1.8px;
  line-height: 1.4;
  color: var(--color-text);
}
  .zine-title-sub {
    font-size: 12px;
  }

  .zine-intro-detail .zine-text {
    font-size: 12.5px;
    line-height: 1.65;
  }
}


/* 手機版 lightbox：減少左右留白 */
@media (max-width: 740px) {
  .lightbox {
    padding: 48px 4px 28px;
  }

  .lightbox-stage {
    width: 100%;
  }

  .lightbox-image-wrap {
    width: 100%;
  }

  .lightbox-image-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }

  .lightbox-thumbs {
    padding-left: 4px;
    padding-right: 4px;
  }
}



/* ---------- 全站捲軸顏色 ---------- */

/* Chrome / Edge / Safari */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(213, 111, 134, 0.08);
}

::-webkit-scrollbar-thumb {
  background: var(--color-subtitle-test, #d56f86);
  border-radius: 999px;
  border: 2px solid #fff;
}

::-webkit-scrollbar-thumb:hover {
  background: #c85f78;
}

/* Firefox */
html {
  scrollbar-color: var(--color-subtitle-test, #d56f86) rgba(213, 111, 134, 0.08);
  scrollbar-width: thin;
}



/* ---------- 移除全站橫向捲軸 ----------
   注意：html/body 不能設 overflow-x:hidden！只要祖先層(一路到視窗)裡有任何
   一個 overflow 不是 visible，底下所有 position:sticky 元素都會直接失效，
   Commercial 頁面跟首頁手機版那個「往上捲動時，下一段內容整層蓋上來」的
   堆疊效果就是因為這樣才不見的。改用 scrollbar-gutter 保留捲軸空間，
   避免電腦版捲軸寬度造成的橫向跑版，同時不影響 sticky。 ---------- */
html {
  max-width: 100%;
  scrollbar-gutter: stable;
}


/* ---------- 手機版 Zine：書本觸碰效果 ----------
   陰影還是用跟桌機版同一套 filter: drop-shadow()，沿著 PNG 去背後的實際
   輪廓投影，不是另外畫矩形/橢圓形色塊模擬。手機上只拿掉桌機版「旋轉+
   左右位移」的動作，改成單純上移，避免觸碰時外框旋轉變寬、頂到螢幕邊緣。

   陰影本身的「往右下」偏移量(x/y offset)在手機版縮小一點：桌機版書本兩側
   留白很寬，13px 的右偏移完全沒問題；但手機版單欄置中排列時，書本兩側
   留白比較窄，同樣的右偏移量在窄螢幕上就可能剛好頂到畫面邊緣被切掉。
   下方留白空間本來就比較多(下一本書之間的間距)，所以只有右邊會被切、
   下面不會，就是這個原因。 ---------- */
@media (max-width: 900px) {
  .zine-book:active,
  .zine-book.is-touched {
    transform: translateY(-8px);
  }

  .zine-book:active .zine-book-cover,
  .zine-book.is-touched .zine-book-cover {
    filter: drop-shadow(6px 10px 6px rgba(231, 92, 122, 0.6));
  }
}

/* 視窗夠窄「但同時是滑鼠裝置」(例如縮小視窗寬度的桌機瀏覽器)才套用 :hover，
   純觸控裝置(手機/平板)一律不會有 hover:hover，不會被判定成需要點兩下 */
@media (max-width: 900px) and (hover: hover) {
  .zine-book:hover {
    transform: translateY(-8px);
  }

  .zine-book:hover .zine-book-cover {
    filter: drop-shadow(6px 10px 6px rgba(231, 92, 122, 0.6));
  }
}

