/* =========================================================
   個人插畫作品集 · 全站共用樣式
   ---------------------------------------------------------
   目錄：
   1. 設計變量（配色 / 字體 / 間距）
   2. 基礎重置 & 全局排版
   3. 通用組件（按鈕、區塊標題、占位框、卡片）
   4. 導航欄（含移動端菜單）
   5. 頁腳
   6. 各頁面專屬樣式
   7. 滾動淡入動畫
   8. 響應式適配
   ========================================================= */

/* ---------- 1. 設計變量：想換配色，只改這裡即可 ---------- */
:root {
  --bg:          #fbf8ef;   /* 頁面底色：奶油白 */
  --bg-soft:     #f7f0dd;   /* 次底色：淡向日葵黃 */
  --surface:     #fffdf8;   /* 卡片底色：暖白 */
  --ink:         #38332a;   /* 主文字：深棕 */
  --ink-soft:    #736c5c;   /* 次文字：暖灰棕 */
  --sage:        #8a9a7b;   /* 主強調色：鼠尾草綠（約 50%） */
  --sage-dark:   #62734f;   /* 深綠（hover / 激活） */
  --sage-pale:   #e7ecdf;   /* 淺綠 */
  --sun-pale:    #f6e6ad;   /* 淡黃（約 20%） */
  --sun:         #e6b73f;   /* 向日葵黃 */
  --sun-deep:    #c98c22;   /* 深黃 */
  --brown:       #8a5c38;   /* 棕色：點綴 */
  --brown-soft:  #b98b5e;   /* 淺棕 */
  --brown-pale:  #efe0c8;   /* 淡棕 */
  --clay:        #c9947f;   /* 陶土粉：保留為點綴 */
  --lavender:    #a99bb0;   /* 霧紫：保留為極少點綴 */
  --line:        #e2d9c2;   /* 描邊色 */
  --line-dash:   #b8bd9b;   /* 虛線占位框描邊：綠偏黃 */

  --shadow-sm:   0 4px 16px rgba(72, 60, 42, 0.06);
  --shadow-md:   0 14px 36px rgba(72, 60, 42, 0.10);
  --shadow-lg:   0 22px 50px rgba(72, 60, 42, 0.14);

  --radius:      18px;      /* 卡片圓角 */
  --radius-sm:   12px;
  --maxw:        1180px;    /* 內容最大寬度 */

  --font-display: Georgia, "Songti SC", "STSong", "Times New Roman", serif;
  --font-body:    "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;

  --ease:        cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 2. 基礎重置 & 全局排版 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* 背景裝飾：極淡的色塊，純 CSS，不是圖片 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(560px 560px at 6% 2%,  rgba(138,154,123,0.14), transparent 70%),
    radial-gradient(480px 480px at 96% 18%, rgba(246,230,173,0.34), transparent 70%),
    radial-gradient(520px 520px at 82% 92%, rgba(201,140,34,0.10), transparent 70%),
    radial-gradient(620px 620px at 12% 100%, rgba(138,92,56,0.09), transparent 70%);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}

p { margin: 0 0 1em; }

::selection { background: var(--sage-pale); color: var(--ink); }

/* 統一內容容器 */
.container {
  width: min(100% - 48px, var(--maxw));
  margin-inline: auto;
}

/* 區塊通用間距 */
.section { padding: 100px 0; }
.section--tight { padding: 64px 0; }

/* 區塊標題 */
.section-head { margin-bottom: 48px; }
.section-head h2 {
  font-size: clamp(30px, 4.2vw, 46px);
  letter-spacing: 0.02em;
}
.section-head p {
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0;
}

/* 小標簽（眉題） */
.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: 14px;
}

/* ---------- 3. 通用組件 ---------- */

/* 按鈕 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid var(--sage);
  font-size: 14px;
  letter-spacing: 0.04em;
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
              transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.btn--primary {
  background: var(--sage);
  color: #fff;
}
.btn--primary:hover {
  background: var(--sage-dark);
  border-color: var(--sage-dark);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover {
  background: var(--sun-pale);
  border-color: var(--sun-deep);
}
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* 占位框：所有圖片位置都用這個類
   【此處替換圖片】把 .placeholder 整個 div 換成 <img> 即可 */
.placeholder {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 2px dashed var(--line-dash);
  border-radius: var(--radius-sm);
  background:
    repeating-linear-gradient(45deg, transparent, transparent 12px,
      rgba(201,140,34,0.05) 12px, rgba(201,140,34,0.05) 24px),
    var(--bg-soft);
  color: var(--ink-soft);
  text-align: center;
  padding: 20px;
  overflow: hidden;
  transition: border-color 0.35s var(--ease), background 0.35s var(--ease);
}
.placeholder::before {
  /* 占位框裡的小圖標：一個簡約的“圖片”符號 */
  content: "";
  width: 30px;
  height: 24px;
  border: 1.5px solid var(--line-dash);
  border-radius: 4px;
  position: relative;
}
.placeholder::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-dash);
  top: calc(50% - 24px);
  left: calc(50% + 4px);
}
.placeholder strong {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--sage-dark);
  font-weight: 600;
}
.placeholder span { font-size: 12px; line-height: 1.5; }

/* 方形占位（用於頭像、小圖） */
.placeholder--square { aspect-ratio: 1 / 1; }
/* 寬幅占位（用於橫幅） */
.placeholder--wide { aspect-ratio: 16 / 9; }

/* 圖片畫框：鎖定比例，裡面放占位框或 <img> 都不會變形
   【此處替換圖片】保留外層 .media，只把裡面的 .placeholder 換成 <img> 即可 */
.media { position: relative; width: 100%; overflow: hidden; }
.media--3-4  { aspect-ratio: 3 / 4; }
.media--1-1  { aspect-ratio: 1 / 1; }
.media--4-3  { aspect-ratio: 4 / 3; }
.media--16-9 { aspect-ratio: 16 / 9; }
.media--9-16 { aspect-ratio: 9 / 16; }
.media > .placeholder {
  height: 100%;
  aspect-ratio: auto;
  border-width: 1.5px;
  border-radius: 0;
}
.media > img,
.media > video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 插畫原圖：外層已設為原圖比例，這裡讓圖片完整顯示、不裁切不拉伸 */
.media--original > img,
.media--original > video {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.work-video__player { background: var(--bg-soft); }

/* 作品圖片可點擊放大：hover 提示 */
.media { cursor: zoom-in; }
.media.work-video { cursor: default; }
.media::after {
  content: "點擊看大圖";
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(63, 66, 55, 0.72);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  pointer-events: none;
}
.media:hover::after { opacity: 1; transform: none; }
.media.work-video::after { content: none; }

/* 一張作品放多張圖：主圖自動占整行，附圖兩兩排列 */
.work-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.work-gallery > .media:first-child { grid-column: 1 / -1; }

/* 卡片基礎：作品 / 價格都複用 */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease),
              border-color 0.4s var(--ease);
}
.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--sage);
}
.card:hover .placeholder {
  border-color: var(--sage);
  background-color: var(--sage-pale);
}
.card__body { padding: 24px 24px 28px; }
.card__meta {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: 10px;
}
.card h3 { font-size: 21px; margin-bottom: 8px; }
.card p {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 0;
}
.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.tag {
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink-soft);
}

/* 網格 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}
.grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ---------- 4. 導航欄 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 248, 239, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.logo span { color: var(--sage-dark); }

.logo-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* 左上角頭像：全站統一的靜態圓形頭像 */
.logo__avatar-img {
  width: 40px;
  height: 40px;
  flex: none;
  display: block;
  border: 1.5px dashed var(--line-dash);
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-soft);
}

.nav__links { display: flex; align-items: center; gap: clamp(16px, 2.6vw, 36px); }
.nav__links a {
  position: relative;
  font-size: 14px;
  letter-spacing: 0.03em;
  padding: 6px 0;
  color: var(--ink-soft);
  transition: color 0.3s var(--ease);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1.5px;
  background: var(--sage-dark);
  transition: width 0.35s var(--ease);
}
.nav__links a:hover,
.nav__links a.is-active { color: var(--ink); }
.nav__links a:hover::after,
.nav__links a.is-active::after { width: 100%; }

/* 漢堡按鈕（僅移動端顯示） */
.nav__toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav__toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav__toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- 5. 頁腳 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  margin-top: 40px;
  color: var(--ink-soft);
  font-size: 13px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a:hover { color: var(--sage-dark); }

.footer-brand { display: flex; flex-direction: column; gap: 12px; }

/* 頁面頂部貼紙 / 小圖標 / 小圖片槽位（每個頁面都有）
   【此處替換圖片】把 <span> 換成 <img src="images/xxx.png" alt=""> 即可 */
.top-stickers {
  position: relative;
  height: 92px;
  width: min(100% - 48px, var(--maxw));
  margin: 0 auto;
  z-index: 5;
  pointer-events: none;
}
.top-sticker {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 55px;
  height: 55px;
  border: 1.5px dashed var(--line-dash);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
  font-style: normal;
  font-size: 10px;
  color: var(--ink-soft);
  pointer-events: none;
  object-fit: contain;
}
.top-sticker::after { content: "貼紙"; }
.top-sticker img { width: 100%; height: auto; display: block; }
/* 已放入透明 PNG 的貼紙：去掉佔位框，像貼紙一樣直接貼在頁面上 */
img.top-sticker {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.10));
}
.top-sticker--1 { top: 16px; left: 0; width: 58px; transform: rotate(-11deg); }
.top-sticker--2 { top: 46px; left: 90px; width: 40px; transform: rotate(13deg); border-radius: 50%; }
.top-sticker--3 { top: 22px; right: 105px; width: 45px; transform: rotate(9deg); border-radius: 50%; }
.top-sticker--4 { top: 42px; right: 5px; width: 60px; transform: rotate(-8deg); }

/* 首頁限定：更多貼紙從頁首一路旋轉飄落到 CTA */
.top-stickers--fall { --fall-distance: 260vh; }
@keyframes sticker-leaf-fall {
  0%   { translate: 0 -40px; rotate: 0deg; opacity: 0; }
  6%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { translate: 0 var(--fall-distance); rotate: 360deg; opacity: 0; }
}
@keyframes sticker-leaf-sway {
  0%, 100% { margin-left: -14px; }
  50%      { margin-left: 14px; }
}
.top-stickers--fall .fall-item {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: auto;
  transform: none;
  pointer-events: none;
  opacity: 0;
  animation:
    sticker-leaf-fall var(--fd) linear infinite,
    sticker-leaf-sway var(--sw) ease-in-out infinite alternate;
  animation-delay: var(--d), var(--sd);
}
@media (prefers-reduced-motion: reduce) {
  .top-stickers--fall .fall-item {
    animation: none;
    translate: none;
    rotate: none;
    margin-left: 0;
    opacity: 1;
  }
}

/* ---------- 6. 各頁面專屬樣式 ---------- */

/* 首頁 Hero：大標題 + 柔和裝飾（呼應參考視頻的大字排版） */
.hero {
  position: relative;
  min-height: min(82vh, 760px);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero__inner { position: relative; z-index: 1; padding: 80px 0; }
.hero h1 {
  font-size: clamp(52px, 9vw, 116px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
}
.hero h1 em {
  font-style: italic;
  color: var(--sage-dark);
  display: block;
}
.hero p {
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--ink-soft);
  max-width: 480px;
  margin-bottom: 36px;
}
/* 首頁背景層：後期放圖片或短視頻都兼容
   【此處替換圖片/視頻】把 .hero__bg-placeholder 換成 <img> 或 <video> 即可 */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(90deg,
    rgba(251, 248, 239, 0.82),
    rgba(251, 248, 239, 0.30) 58%,
    rgba(251, 248, 239, 0.62));
}
.hero__bg img,
.hero__bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;   /* 想完整顯示圖片可改成 contain */
  display: block;
  opacity: 0.28;       /* 背景不搶文字，按需調整 */
}
/* 1:1 背景圖：用 cover 自然裁剪填滿視口，比例不變、構圖不漂移 */
.hero__bg-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: url("../images/hero-bg.jpg") center 38% / cover no-repeat;
  opacity: 0.34;
}

/* 首頁預覽區 */
.preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.slideshow__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
  transition: opacity 0.45s var(--ease);
}
.slideshow.is-changing .slideshow__img { opacity: 0; }
.self-portrait {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--bg-soft);
}

/* 全站回到頂部 */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--sage-dark);
  border-radius: 50%;
  background: var(--sage);
  color: var(--surface);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease),
              visibility 0.3s var(--ease), background 0.3s var(--ease);
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--sage-dark); transform: translateY(-3px); }
.back-to-top__icon { width: 22px; height: 22px; }
.back-to-top__arrow {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.back-to-top__spark { fill: var(--sun); stroke: none; }

/* 內頁統一頁頭 */
.page-hero {
  padding: 88px 0 56px;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 {
  font-size: clamp(42px, 6.5vw, 76px);
  line-height: 1.05;
  margin: 0 0 16px;
}
.page-hero p { color: var(--ink-soft); max-width: 600px; margin: 0; }

/* 頁頭右側插畫（透明底）：價目頁限定 */
.page-hero--art { --art-w: min(30vw, 300px); }
.page-hero--art .container { position: relative; }
.page-hero--art .container > :not(.page-hero__art) {
  position: relative;
  z-index: 1;
  max-width: calc(100% - var(--art-w) - 32px);
}
.page-hero__art {
  position: absolute;
  right: 0;
  top: 0;
  width: var(--art-w);
  height: auto;
  object-fit: contain;
  pointer-events: none;
  z-index: 0;
}

/* 作品頁：篩選按鈕 */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.filter-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.04em;
  transition: all 0.3s var(--ease);
}
.filter-btn:hover { border-color: var(--sage); color: var(--ink); }
.filter-btn.is-active {
  background: var(--sage);
  border-color: var(--sage);
  color: #fff;
}

/* 作品頁網格：列更寬，適合橫版插畫 */
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 32px; }
/* 橫版重點作品可加 .card--feature，橫跨兩列 */
.card--feature { grid-column: span 2; }

/* 作品頁：瀏覽方式切換 */
.works-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 36px;
}
.works-toolbar .filters { margin-bottom: 0; }
.view-toggle {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease);
}
.view-toggle:hover { border-color: var(--sage); background: var(--bg-soft); transform: translateY(-2px); }
.view-toggle[aria-pressed="true"] { background: var(--sage); border-color: var(--sage-dark); }
.view-toggle__icon { width: 34px; height: 34px; }
.view-toggle__frame { display: none; }
.view-toggle__frame--single { display: block; }
.view-toggle[aria-pressed="true"] .view-toggle__frame--single { display: none; }
.view-toggle[aria-pressed="true"] .view-toggle__frame--grid { display: block; }
.view-toggle__card,
.view-toggle__tile { fill: none; stroke: var(--sage-dark); stroke-width: 2.6; }
.view-toggle__dot { fill: var(--sun); }
.view-toggle__tile--accent { fill: var(--sun-pale); stroke: var(--sun-deep); }
.view-toggle[aria-pressed="true"] .view-toggle__card,
.view-toggle[aria-pressed="true"] .view-toggle__tile { stroke: var(--surface); }
.view-toggle[aria-pressed="true"] .view-toggle__dot { fill: var(--sun); }
.view-toggle[aria-pressed="true"] .view-toggle__tile--accent { fill: var(--sun); stroke: var(--sun); }

/* 緊湊多列預覽：手機兩列、電腦四列，只顯示圖片 */
.work-grid.is-compact {
  display: block;
  column-count: 4;
  column-gap: 12px;
}
.work-grid.is-compact .card {
  display: inline-block;
  width: 100%;
  margin: 0 0 12px;
  break-inside: avoid;
  page-break-inside: avoid;
  border-radius: 10px;
}
.work-grid.is-compact .card__body { display: none; }
.work-grid.is-compact .media::after { display: none; }
.work-grid.is-compact .media { border-radius: 10px; }
.work-grid.is-compact .card:hover { transform: none; }

/* 價格卡片特殊排版 */
.price-card { display: flex; flex-direction: column; }
.price-card .card__body { display: flex; flex-direction: column; flex: 1; }
.price-value {
  font-family: var(--font-display);
  font-size: 38px;
  color: var(--brown);
  line-height: 1;
  margin: 4px 0 18px;
}
.price-value small { font-size: 14px; color: var(--ink-soft); font-family: var(--font-body); }
.price-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}
.price-list li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.price-list li:last-child { border-bottom: 0; }

/* 委託頁：兩欄 + iframe */
.commission-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 56px;
  align-items: start;
}
.commission-info h2 { font-size: clamp(28px, 3.6vw, 40px); }
.commission-info p { color: var(--ink-soft); }
.info-block { margin-bottom: 32px; }
.info-block h3 { font-size: 19px; }
.commission-reference {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.form-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-md);
}
.form-note { font-size: 12px; color: var(--ink-soft); margin: 12px 4px 4px; }

/* 關於頁 */
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 64px;
  align-items: center;
}
.profile-photo {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(56, 51, 42, 0.10));
}
.about-text h2 { font-size: clamp(30px, 4vw, 44px); }
.about-text p { color: var(--ink-soft); }
.skill-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* 關於頁：向我匿名提問（二維碼 1:1 + 說明） */
.ask-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 64px;
  align-items: center;
}
.ask-qr { max-width: 320px; margin-inline: auto; }
.ask-qr .placeholder {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.ask-qr img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.ask-qr-caption {
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 14px;
}
.ask-copy h3 { font-size: clamp(24px, 3vw, 32px); }
.ask-copy p { color: var(--ink-soft); }
.ask-steps {
  list-style: none;
  counter-reset: ask;
  padding: 0;
  margin: 26px 0;
}
.ask-steps li {
  counter-increment: ask;
  position: relative;
  padding: 12px 0 12px 46px;
  border-bottom: 1px dashed var(--line);
  color: var(--ink-soft);
  font-size: 14px;
}
.ask-steps li::before {
  content: counter(ask);
  position: absolute;
  left: 0;
  top: 12px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--sun-pale);
  color: var(--brown);
  font-size: 12px;
  font-family: var(--font-body);
}
.ask-note {
  display: inline-block;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  font-size: 13px;
}

/* 關於頁：更多联系方式（左右卡片 + 圓角圖標） */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
              border-color 0.35s var(--ease);
}
.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--sage);
}
.contact-card__icon {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.contact-card__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.contact-card__platform {
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--sage-dark);
  margin-bottom: 2px;
}
.contact-card__id {
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  word-break: break-all;
}

/* 底部 CTA 帶 */
.cta-band {
  background: linear-gradient(115deg, var(--sun-pale), var(--bg-soft) 55%, var(--sage-pale));
  border-radius: var(--radius);
  padding: 64px 40px;
  text-align: center;
}
.cta-band h2 { font-size: clamp(28px, 4vw, 42px); }
.cta-band p { color: var(--ink-soft); margin-bottom: 28px; }

/* 圖片燈箱：點擊作品圖彈出大圖預覽 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 48px 24px;
  background: rgba(28, 30, 25, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__stage {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  transform: scale(0.96);
  transition: transform 0.3s var(--ease);
}
.lightbox.is-open .lightbox__img { transform: scale(1); }
.lightbox__video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.lightbox__img[hidden],
.lightbox__video[hidden],
.lightbox__placeholder[hidden] { display: none; }
.lightbox__placeholder {
  width: min(70vw, 620px);
  aspect-ratio: 4 / 5;
  border: 2px dashed rgba(255, 255, 255, 0.55);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
}
.lightbox__placeholder strong { color: #fff; }
.lightbox__placeholder span { color: rgba(255, 255, 255, 0.75); }
.lightbox__close,
.lightbox__nav {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.lightbox__close {
  position: absolute;
  top: 22px;
  right: 24px;
  font-size: 28px;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255, 255, 255, 0.24); transform: scale(1.08); }
.lightbox__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  letter-spacing: 0.05em;
  pointer-events: none;
}
body.lightbox-open { overflow: hidden; }

/* ---------- 7. 滾動淡入動畫 ---------- */
/* JS 會給進入視口的元素加上 .is-visible */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* 卡片依次進入的延遲（用內聯 style="--d: 1" 控制） */
.reveal[style*="--d"] { transition-delay: calc(var(--d) * 0.09s); }

/* ---------- 8. 響應式適配 ---------- */
@media (max-width: 900px) {
  .section { padding: 72px 0; }
  .preview-grid { grid-template-columns: repeat(2, 1fr); }
  .commission-layout,
  .about-layout,
  .grid--two { grid-template-columns: 1fr; gap: 36px; }
  .commission-layout { gap: 40px; }
  .ask-layout { grid-template-columns: 1fr; gap: 36px; }
  .ask-qr { max-width: 300px; }
  .contact-grid { grid-template-columns: 1fr; gap: 14px; }
  .page-hero--art { --art-w: min(34vw, 170px); }
}

@media (max-width: 720px) {
  .container { width: min(100% - 32px, var(--maxw)); }
  .top-stickers--fall .fall-item:nth-child(n + 7) { display: none; }
  .page-hero--art { --art-w: min(33vw, 145px); }
  .page-hero--art .container > :not(.page-hero__art) {
    max-width: calc(100% - var(--art-w) - 16px);
  }

  /* 移動端導航：折疊菜單 */
  .nav__toggle { display: flex; }
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease), padding 0.4s var(--ease);
  }
  .nav__links.is-open { max-height: 420px; padding: 12px 20px 22px; }
  .nav__links a { width: 100%; padding: 11px 0; font-size: 15px; }

  .hero { min-height: 70vh; }
  .hero h1 { font-size: clamp(46px, 13vw, 72px); }
  .hero__bg-placeholder { background-position: center 32%; opacity: 0.30; }

  .page-hero { padding: 64px 0 40px; }
  .preview-grid { grid-template-columns: 1fr; }
  .grid, .work-grid { grid-template-columns: 1fr; gap: 20px; }
  .card--feature { grid-column: span 1; }
  .works-toolbar { gap: 12px; margin-bottom: 24px; }
  .back-to-top { right: 16px; bottom: 16px; width: 42px; height: 42px; }
  .work-grid.is-compact { column-count: 2; column-gap: 8px; }
  .work-grid.is-compact .card { margin-bottom: 8px; }
  .work-grid.is-compact .card,
  .work-grid.is-compact .media { border-radius: 8px; }
  .section-head { margin-bottom: 32px; }
  .cta-band { padding: 44px 22px; }
  .form-wrap { padding: 6px; }
  .btn-row .btn { flex: 1 1 auto; }

  .top-stickers { height: 78px; width: min(100% - 32px, var(--maxw)); }
  .top-sticker--1 { width: 45px; top: 10px; }
  .top-sticker--2 { left: 65px; width: 33px; top: 38px; }
  .top-sticker--3 { right: 75px; width: 35px; top: 14px; }
  .top-sticker--4 { width: 48px; top: 34px; }

  .lightbox { padding: 60px 12px 56px; gap: 8px; }
  .lightbox__nav { width: 36px; height: 36px; font-size: 20px; }
  .lightbox__close { top: 14px; right: 14px; width: 38px; height: 38px; }
  .lightbox__placeholder { width: 78vw; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* 天使信箱頁：單欄說明 + 橫幅二維碼 */
.mailbox-body { width: min(100%, 670px); margin-inline: auto; }
.mailbox-block + .mailbox-block { margin-top: 36px; }
.mailbox-block h3 { font-size: 20px; margin-bottom: 12px; }
.mailbox-block p { color: var(--ink-soft); }
.mailbox-qr {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 48px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.mailbox-caption {
  margin-top: 14px;
  font-size: 12px;
  color: var(--ink-soft);
  text-align: center;
}
.mailbox-note {
  margin-top: 64px;
  font-size: 12px;
  line-height: 1.9;
  color: var(--ink-soft);
}
.mailbox-note + .mailbox-note { margin-top: 18px; }
.mailbox-entry { padding-bottom: 80px; text-align: center; }
.mailbox-entry a {
  font-size: 14px;
  color: var(--sage-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 1024px) {
  .mailbox-body { max-width: none; }
}

@media (max-width: 720px) {
  .nav__links.is-open { max-height: 460px; }
  .nav__links a { padding: 9px 0; font-size: 14px; }
  .mailbox-block + .mailbox-block { margin-top: 28px; }
  .mailbox-qr { margin-top: 36px; }
  .mailbox-note { margin-top: 44px; }
  .mailbox-entry { padding-bottom: 56px; }
}

/* 天使信箱頁：洞洞板便籤牆 */
.letter-wall-section { padding-top: 8px; padding-bottom: 72px; }
.letter-wall-title { font-size: 20px; margin-bottom: 8px; }
.letter-wall-note { font-size: 12px; color: var(--ink-soft); margin-bottom: 24px; }
.mailbox-info-section { padding: 56px 0 100px; }
.pegboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 32px;
  border: 1px solid rgba(138, 92, 56, 0.16);
  border-radius: 10px;
  background-color: #f4f0e4;
  background-image:
    radial-gradient(circle, rgba(92, 98, 63, 0.24) 0 2.5px, transparent 3px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.16), rgba(201, 140, 34, 0.04));
  background-size: 28px 28px, 100% 100%;
  background-position: 0 0, 0 0;
  box-shadow: inset 0 2px 16px rgba(63, 66, 55, 0.08), 0 12px 26px rgba(63, 66, 55, 0.10);
}
.letter-note {
  position: relative;
  min-height: 220px;
  padding: 30px 20px 22px;
  border-radius: 6px;
  box-shadow: 0 5px 12px rgba(63, 66, 55, 0.10);
  transform: rotate(-1deg);
}
.letter-note:nth-child(even) { transform: rotate(1deg); }
.letter-note:nth-child(3n + 1) { background: #fffaf0; }
.letter-note:nth-child(3n + 2) { background: #f1f2dc; }
.letter-note:nth-child(3n) { background: #f6ead6; }
.letter-pin {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5c623f;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.55), 0 1px 2px rgba(0, 0, 0, 0.18);
}
.letter-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}
.letter-text {
  margin: 8px 0 14px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
}
.letter-divider {
  display: block;
  height: 1px;
  margin: 14px 0;
  background: rgba(92, 98, 63, 0.32);
}
.letter-sign {
  display: block;
  margin-top: 18px;
  text-align: right;
  font-size: 10px;
  color: var(--ink-soft);
}

@media (max-width: 1024px) {
  .pegboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .letter-wall-section { padding-top: 0; padding-bottom: 48px; }
  .letter-wall-note { margin-bottom: 18px; }
  .pegboard { grid-template-columns: 1fr; gap: 18px; padding: 20px; }
  .mailbox-info-section { padding: 40px 0 72px; }
}
