/* ==========================================================================
   Jiayan Sun, pianist — 全站樣式

   目錄
     1. 字型
     2. 設計代幣
     3. 基礎與無障礙
     4. 共用工具類別
     5. 版面骨架：背景層、Header／導覽、行動選單、主內容、Footer
     6. 首頁
     7. 文字頁（About、简历）
     8. Performance 頁
     9. 404 頁
    10. 行動版（max-width: 979px）
    11. 手機寬度補充（max-width: 750px）

   版面基準：桌面 980px 置中格線（區塊高度固定 px）／行動 320 邏輯寬（文件流）。
   ========================================================================== */

/* ==========================================================================
   1. 字型（3 個 woff2：Work Sans 200／300、Bitter；全部為 SIL OFL 1.1，授權條文見 assets/fonts/OFL.txt）
   ========================================================================== */
@font-face {
  font-family: 'worksans-extralight';
  src: url('../assets/fonts/worksans-extralight.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'work-sans-v2';
  src: url('../assets/fonts/worksans-300.woff2') format('woff2');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'bitter-v2';
  src: url('../assets/fonts/bitter.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

/* ==========================================================================
   2. 設計代幣
   ========================================================================== */
:root {
  /* 色彩 */
  --peach: rgb(255, 222, 207);
  --teal-dark: rgb(3, 27, 35);
  --footer-black: rgb(1, 1, 1);
  --home-backdrop: rgb(123, 80, 59);
  --white: #fff;
  /* 首頁雙欄與行動選單的雙色垂直漸層 */
  --tex-warm: rgb(89, 46, 30);
  --tex-dark: rgb(38, 38, 38);
  /* Performance 頁導覽列後方的暖黑舞台色 */
  --stage-dark: rgb(16, 12, 8);

  /* 字型 */
  --ff-light: 'worksans-extralight', 'work sans', sans-serif;
  --ff-body: 'work-sans-v2', sans-serif;
  --ff-serif: 'bitter-v2', serif;

  /* 版面 */
  --grid-w: 980px;
  --header-h: 110px;
  --header-h-mobile: 70px;
  --mobile-col: min(100% - 40px, 560px);   /* 行動版內容欄寬（320 寬時 = 280） */
  --ease-fade: cubic-bezier(.445, .05, .55, .95);

  /* 層級 */
  --z-bg: 0;
  --z-main: 1;
  --z-header: 50;
  --z-menu: 200;
  --z-menu-btn: 210;
}

/* ==========================================================================
   3. 基礎與無障礙
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}
body {
  min-width: var(--grid-w);
  background: var(--teal-dark);
  font-family: var(--ff-light);
  position: relative;   /* 讓捲動式頁面背景以整頁（而非視口）為包含區塊 */
  overflow-y: scroll;   /* 恆保留捲軸位；頁面不足一屏時版面才不會右移 */
}
img { display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
h1, h2, h3 { font-weight: 400; }
iframe { border: 0; }

/* 鍵盤焦點：全站統一的可見焦點框（只在鍵盤操作時出現） */
:focus-visible {
  outline: 2px solid var(--peach);
  outline-offset: 3px;
}
button:focus-visible { outline-offset: 2px; }

/* 減少動態：關閉進場動畫、圖片模糊轉場、選單與導覽的轉場；捲動連動效果由 JS 一併處理 */
@media (prefers-reduced-motion: reduce) {
  .anim-fade, .anim-fade-nav { animation: none; }
  .blurup { transition: none; }
  .site-nav a,
  .menu-btn .bars span { transition: none; }
}

/* ==========================================================================
   4. 共用工具類別
   ========================================================================== */
/* 只給輔助科技讀、不佔版面 */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
/* 模糊→清晰的漸進式圖片載入（只動 filter 以免覆蓋定位 transform）。
   只在 <html class="js">（head 內的啟動腳本加上）時套用，無 JS 時圖片直接清晰 */
.js .blurup { filter: blur(14px); transition: filter .6s ease; }
.js .blurup.loaded { filter: none; }
/* 保險：main.js 載入失敗或出錯時，3 秒後仍自動解除模糊 */
@keyframes blurup-timeout { to { filter: none; } }
.js .blurup:not(.loaded) { animation: blurup-timeout 0s linear 3s forwards; }

/* 進場動畫：fadeIn 600ms，標題延遲 200ms、導覽列 400ms */
@keyframes motion-fadeIn { from { opacity: 0; } to { opacity: 1; } }
.anim-fade     { animation: motion-fadeIn 600ms var(--ease-fade) 200ms backwards; }
.anim-fade-nav { animation: motion-fadeIn 600ms var(--ease-fade) 400ms backwards; }

/* ==========================================================================
   5. 版面骨架
   ========================================================================== */
/* ---- 頁面背景層 ---- */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: var(--z-bg);
  overflow: hidden;
  background: var(--teal-dark);   /* 圖片後方另有一層底色 */
}
.page-bg.bg-home  { background: var(--home-backdrop); }
.page-bg.bg-stage { background: var(--stage-dark); }
.page-bg.bg-scroll {              /* About、简历：只在導覽列後方露出照片頂部一條，隨頁面捲動 */
  position: absolute;
  inset: 0 0 auto 0;
  height: var(--header-h);        /* 搭配 hero-strip.jpg（照片頂部 44%），不必載入整張主視覺 */
}
.page-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.page-bg.bg-top img { object-position: top center; }

/* ---- Header／導覽 ---- */
.site-header {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  min-width: var(--grid-w);
  height: var(--header-h);
  z-index: var(--z-header);
}
/* 導覽文字壓在主視覺高光上時對比不足，加一層由上而下淡出的暗色漸層墊底 */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
  pointer-events: none;
}
.menu-open .site-header::before { display: none; }   /* 行動選單開啟時 header 疊在選單上，不讓漸層壓暗選單頂部 */
.site-nav {
  position: absolute;
  top: 48px;
  left: min(64px, calc((100% - var(--grid-w)) / 2));   /* 格線置中時貼齊格線，窄時最多 64px */
  padding-left: 5px;
}
.site-nav ul { display: flex; }
.site-nav li { margin-right: 10px; }
.site-nav a {
  display: block;
  padding: 0 10px;
  font: 400 16px/36px var(--ff-light);
  color: var(--peach);
  white-space: nowrap;
  transition: color .4s ease;
}
.site-nav li.current a { color: var(--white); }

/* ---- 行動版漢堡鍵與全螢幕選單（桌面隱藏，樣式見第 10 節） ---- */
.menu-btn, .mobile-menu { display: none; }

/* ---- 主內容與格線 ---- */
main { position: relative; z-index: var(--z-main); }
main.pad-header { padding-top: var(--header-h); }
.grid { width: var(--grid-w); margin: 0 auto; position: relative; }

/* ---- Footer：Facebook 圖示置中 ---- */
.site-footer {
  position: relative;
  z-index: var(--z-main);
  height: 83px;
  background: var(--footer-black);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fb-link { display: block; width: 24px; height: 24px; }
.fb-link svg { width: 24px; height: 24px; display: block; }

/* ==========================================================================
   6. 首頁
   ========================================================================== */
.s-hero {
  position: relative;
  height: 1098px;          /* header 110 + 區塊 988 */
}
.hero-title {
  position: absolute;
  top: 380px; left: 0; right: 0;
  text-align: center;
  color: var(--white);
}
.hero-title .en {
  font: 400 48px var(--ff-light);
  letter-spacing: 7.2px;
}
.hero-title .zh {
  font: 400 44px var(--ff-serif);
  letter-spacing: 7.2px;
}
.hero-sub {
  position: absolute;
  top: 481px; left: 0; right: 0;
  text-align: center;
  font: 400 22px/35.2px var(--ff-light);
  letter-spacing: 3.3px;
  color: var(--white);
}

/* 第二區：50/50 雙欄，欄內元素固定尺寸水平置中 */
.s-two {
  position: relative;
  height: 1133px;
  overflow: hidden;
}
.s-two .col {
  position: absolute;
  top: 0; bottom: 0;
  width: 50%;
}
.s-two .col.l { left: 0; }
.s-two .col.r { left: 50%; }
/* 兩欄底圖：雙色垂直漸層，桌面版由 JS 隨捲動淡入 */
.s-two .col > .tex {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
}
.s-two .col.l > .tex { background: linear-gradient(var(--tex-warm), var(--tex-dark)); }
.s-two .col.r > .tex { background: linear-gradient(var(--tex-dark), var(--tex-warm)); }

/* 影片小工具：直接內嵌 YouTube 播放器 */
.vwidget {
  position: absolute;
  top: 195px; left: 50%;
  transform: translateX(-50%);
  width: 480px; height: 270px;
  background: #000;
  overflow: hidden;
}
.vwidget iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}

.quotes {
  position: absolute;
  top: 507px; left: 50%;
  transform: translateX(-50%);
  width: 452px;
}
.quotes p {
  font: 300 16px/22.4px var(--ff-body);
  color: var(--white);
  margin-bottom: 22.4px;
}

.col-zh-title {
  position: absolute;
  top: 175px; left: 0; right: 0;
  text-align: center;
  font: 400 28px var(--ff-serif);
  color: var(--white);
}
.portrait {
  position: absolute;
  top: 267px; left: 50%;
  transform: translateX(-50%);
  width: 490px; height: 490px;
  object-fit: cover;
}
.col-zh-text {
  position: absolute;
  top: 796px; left: 50%;
  transform: translateX(-50%);
  width: 468px;           /* 區塊寬 468（非文字最寬行的 464.4），寬度差會改變中文斷行 */
  font: 300 16px/32px var(--ff-body);
  color: var(--white);
}

/* ==========================================================================
   7. 文字頁（About、简历）
   .s-feature：色帶＋跨區塊照片；.s-prose：標題＋段落。
   About 為固定高度與絕對定位；简历加上 .s-prose--flow 走文件流（段落長度不固定）。
   ========================================================================== */
.s-feature {
  position: relative;
  height: 703px;
  background: var(--teal-dark);
}
.s-feature .strip {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 446px;
  /* 暗室舞台色帶：左下角一池暖光（徑向漸層，峰值約 x 18% / y 84%），
     底層再疊上暗→暖的縱向層次。行動版此色帶為 320×200 全寬顯示。 */
  background:
    radial-gradient(ellipse 52% 58% at 18% 84%,
      rgba(255, 208, 140, .52) 0%, rgba(196, 134, 72, .24) 42%,
      rgba(70, 46, 28, .07) 70%, transparent 86%),
    linear-gradient(rgb(9, 7, 6) 0%, rgb(12, 9, 7) 58%, rgb(26, 18, 12) 100%);
  overflow: hidden;
}
.feature-photo {
  position: absolute;
  top: 190px; left: 50%;
  transform: translateX(-50%);
  width: 980px; height: 498px;
  object-fit: cover;
  z-index: 2;
}

/* 文字段落走文件流：標題 top 56、首段 top 140（標題高 44 + 間距 40）、段距一行 22.4px，
   與固定定位的量測值相同，但字型回退或文字增減時不會重疊 */
.s-prose {
  position: relative;
  min-height: 908px;
  padding: 56px 0 51px;
  background: var(--teal-dark);
}
.s-prose .section-title {
  margin: 0 0 40px 28px;
  width: 933px;
  font: 400 38px var(--ff-light);
  color: var(--white);
}
.s-prose .bio {
  margin-left: 28px;
  width: 769px;
  font: 400 16px/22.4px var(--ff-light);
  color: var(--white);
}
.s-prose .bio + .bio { margin-top: 22.4px; }

/* 简历變體。中文由系統字型 fallback 渲染；標題用 serif 與首頁「孙嘉言, 钢琴家」一致 */
.s-prose--flow { min-height: 0; padding: 56px 0 72px; }
.s-prose--flow .section-title {
  width: auto;
  margin: 0 28px 36px;
  font: 400 38px var(--ff-serif);
}
.s-prose--flow .bio {
  margin: 0 28px;
  font: 300 16px/32px var(--ff-body);   /* 與首頁中文段落相同 */
  text-align: justify;
}
.s-prose--flow .bio + .bio { margin-top: 32px; }   /* 段距＝一行 */

/* ==========================================================================
   8. Performance 頁
   原設計為三欄模型 [30% | 35% | 35%]：左欄起點 30% + 104px、右欄起點 65% + 91px，
   影片固定 526×293。該公式在視窗窄於 1766px 時右欄會超出區塊被裁切、兩欄甚至重疊，
   因此加上兩道保護，其餘維持原公式：
     - 欄位左緣取「原公式」與「貼齊右側（留 40px 邊距與 40px 欄距）」的較小值；
     - 視窗窄於 1172px（兩欄 + 三段 40px 放不下）時影片等比縮小。
   ≥1766px 的位置與原設計完全相同。
   每支影片一個「槽位」（l1–l4、r1–r3），標題與播放器各有固定 top。
   ========================================================================== */
.s-videos {
  position: relative;
  height: 1868px;
  background: var(--teal-dark);
  overflow: hidden;
  --gutter: 40px;
  --vid-w: min(526px, calc((100% - 3 * var(--gutter)) / 2));
  --col-l: min(calc(30% + 104px), calc(100% - 2 * var(--vid-w) - 2 * var(--gutter)));
  --col-r: min(calc(65% + 91px), calc(100% - var(--vid-w) - var(--gutter)));
}
.pcell {
  position: absolute;
  z-index: 3;
  width: calc(var(--vid-w) + 11px);   /* 原設計標題框 537 = 影片 526 + 11 */
}
.pcell h2 {
  font: 400 20px/28px var(--ff-light);
  color: var(--white);
}
/* 每欄第一支影片的標題行高不同，照設計保留。此列標題到影片只有 45px，
   窄桌面（<1177px）字級隨視口縮小，確保最長的標題維持單行不壓到影片 */
.pcell.lh-n h2 { line-height: normal; font-size: clamp(16px, 1.7vw, 20px); }
.pvid {
  position: absolute;
  width: var(--vid-w);
  aspect-ratio: 526 / 293;
  background: #000;
  z-index: 2;
}
.pcell.colL, .pvid.colL { left: var(--col-l); }
.pcell.colR, .pvid.colR { left: var(--col-r); }

.pcell.l1 { top: 96px; }    .pvid.l1 { top: 141px; }
.pcell.l2 { top: 511px; }   .pvid.l2 { top: 588px; }
.pcell.l3 { top: 958px; }   .pvid.l3 { top: 1007px; }
.pcell.l4 { top: 1377px; }  .pvid.l4 { top: 1454px; }
.pcell.r1 { top: 96px; }    .pvid.r1 { top: 160px; }
.pcell.r2 { top: 518px; }   .pvid.r2 { top: 590px; }
.pcell.r3 { top: 948px; }   .pvid.r3 { top: 1020px; }

/* ==========================================================================
   9. 404 頁（連結一律用根路徑，因為主機會對任意深度的網址回這一頁）
   ========================================================================== */
.s-notfound { position: relative; min-height: 560px; }
.s-notfound .grid { padding: 76px 23px; }
.s-notfound h1 { font: 400 56px var(--ff-light); color: var(--white); }
.s-notfound p {
  margin-top: 28px;
  max-width: 560px;
  font: 300 16px/1.6 var(--ff-body);
  color: var(--white);
}
.s-notfound a { color: var(--peach); text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   10. 行動版（斷點 979px）
   版面回到正常文件流：欄寬 var(--mobile-col)、區塊高度自適應、
   字級 clamp(設計值, 設計值/320 × 100vw, 設計值 × 1.3)，約 416px 封頂。
   斷點取 979 而非 751：桌面格線需要 980px，751–979 在桌面版面下只會產生水平捲軸
   （iPad 直立 768px 正落在此區間）。≥980px 完全不受本區塊影響。
   ========================================================================== */
@media (max-width: 979px) {

  /* ---- 基礎 ---- */
  body { min-width: 0; }
  .grid { width: auto; }

  /* ---- Header／漢堡鍵 ---- */
  .site-header { min-width: 0; height: var(--header-h-mobile); z-index: var(--z-menu-btn); }
  .site-nav { display: none; }
  main.pad-header { padding-top: var(--header-h-mobile); }
  .page-bg.bg-scroll { height: var(--header-h-mobile); }

  /* 無 JS 時沒有漢堡鍵可用：改把導覽列以可換行的靜態列放在頁首 */
  html:not(.js) .site-header { position: static; height: auto; }
  html:not(.js) .site-header::before { content: none; }
  html:not(.js) .site-nav { display: block; position: static; padding: 14px 10px 0; }
  html:not(.js) .site-nav ul { flex-wrap: wrap; }
  html:not(.js) .menu-btn { display: none; }
  html:not(.js) main.pad-header { padding-top: 0; }

  /* 漢堡鍵固定在視口右上，捲到頁尾仍可開啟選單 */
  .menu-btn {
    display: block;
    position: fixed;
    top: 10px; right: 5px;
    width: 50px; height: 50px;
    background: none; border: 0;
    cursor: pointer;
  }
  .menu-btn .bars {
    position: relative;
    display: block;
    width: 22px; height: 20px;
    margin: auto;
  }
  .menu-btn .bars span {
    position: absolute;
    left: 0;
    width: 100%; height: 2px;
    border-radius: 2px;
    background: var(--white);
    transition: transform .25s ease-in-out, opacity .25s ease-in-out;
  }
  .menu-btn .bars span:nth-child(1) { top: 0; }
  .menu-btn .bars span:nth-child(2) { top: 9px; }
  .menu-btn .bars span:nth-child(3) { top: 18px; }
  /* 同一顆按鈕就地變形成 X，沒有另一個關閉鍵 */
  .menu-btn.open .bars span:nth-child(1) { transform: translateY(9px) rotate(-45deg); }
  .menu-btn.open .bars span:nth-child(2) { opacity: 0; }
  .menu-btn.open .bars span:nth-child(3) { transform: translateY(-9px) rotate(45deg); }

  /* ---- 全螢幕選單面板（直接顯示，無淡入） ---- */
  .mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--tex-dark) linear-gradient(var(--tex-warm), var(--tex-dark));
    z-index: var(--z-menu);
    overflow-y: auto;
  }
  .mobile-menu.open { display: block; }
  /* 置中放在可捲動容器「內層」的 ul：橫向短視口下選單比視口高時會自然往下長並可捲動 */
  .mobile-menu ul {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 20px;
  }
  .mobile-menu a {
    display: block;
    padding: 11.5px 0;   /* 11.5×2 + 行高 33 = 56px 列距 */
    font: 400 clamp(22px, 6.875vw, 29px)/1.5 var(--ff-light);
    text-align: center;
    color: var(--peach);
  }
  .mobile-menu li.current a { color: var(--white); }

  .site-footer { height: 64px; }

  /* ---- 首頁 ---- */
  .s-hero {
    height: 100vh;
    height: 100svh;
    min-height: 520px;
  }
  .hero-title {
    top: 54.8%;
    font-size: clamp(20px, 6.25vw, 26px);
  }
  .hero-title .en,
  .hero-title .zh {
    font-size: inherit;
    letter-spacing: .15em;
  }
  .hero-sub {
    top: 64.4%;
    font: 400 clamp(14px, 4.375vw, 18px)/1.6 var(--ff-light);
    letter-spacing: .15em;
  }

  /* 第二區：左右兩欄 → 上下堆疊（上：語錄＋影片，下：中文簡介） */
  .s-two { height: auto; overflow: visible; }
  .s-two .col {
    position: relative;
    top: auto; bottom: auto;
    width: auto;
    display: flex;
    flex-direction: column;
  }
  .s-two .col.l { left: auto; padding: 70px 0 46px; }
  .s-two .col.r { left: auto; padding: 67px 0 29px; }
  .s-two .col > .tex { z-index: 0; }
  .quotes,
  .vwidget,
  .col-zh-title,
  .portrait,
  .col-zh-text { position: relative; z-index: 1; }

  /* DOM 順序是「影片→語錄」，行動版設計是「語錄→影片」 */
  .quotes {
    order: 1;
    top: auto; left: auto;
    transform: none;
    width: var(--mobile-col);
    margin: 0 auto;
  }
  .quotes p {
    font-size: clamp(12px, 3.75vw, 16px);
    line-height: 1.4;
    margin-bottom: 1.4em;
  }
  .vwidget {
    order: 2;
    top: auto; left: auto;
    transform: none;
    width: min(100%, 560px);
    height: auto;
    aspect-ratio: 320 / 250;
    margin: 16px auto 0;
  }
  .col-zh-title {
    top: auto;
    font-size: clamp(16px, 5vw, 21px);
    margin-bottom: 20px;
  }
  .portrait {
    top: auto; left: auto;
    transform: none;
    width: var(--mobile-col);
    height: auto;
    aspect-ratio: 280 / 294;
    margin: 0 auto;
  }
  .col-zh-text {
    top: auto; left: auto;
    transform: none;
    width: var(--mobile-col);
    margin: 20px auto 0;
    font-size: clamp(12px, 3.75vw, 16px);
    line-height: 2;
  }

  /* ---- 文字頁：照片在上、色帶在下（桌面靠絕對定位交錯） ---- */
  .s-feature {
    height: auto;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
  }
  .feature-photo {
    position: static;
    order: 1;
    transform: none;
    width: 100%; height: auto;
    aspect-ratio: 320 / 200;
  }
  .s-feature .strip {
    position: static;
    order: 2;
    height: auto;
    aspect-ratio: 320 / 200;
  }
  .s-prose { min-height: 0; padding: 61px 0 33px; }
  .s-prose .grid {
    width: var(--mobile-col);
    margin: 0 auto;
  }
  .s-prose .section-title {
    width: auto;
    margin: 0 0 23px;
    font-size: clamp(30px, 9.375vw, 39px);
  }
  .s-prose .bio {
    margin-left: 0;
    width: calc(100% - 5px);   /* 內文框比標題窄 5px，差這 5px 會改變換行 */
    font-size: clamp(14px, 4.375vw, 18px);
    line-height: 1.4;
  }
  .s-prose .bio + .bio { margin-top: 1.4em; }
  /* 文件流變體（简历） */
  .s-prose--flow { padding: 61px 0 40px; }
  .s-prose--flow .section-title { margin: 0 0 23px; font-size: clamp(26px, 8.125vw, 34px); }
  .s-prose--flow .bio {
    margin: 0;
    width: 100%;
    font-size: clamp(14px, 4.375vw, 17px);
    line-height: 1.85;
  }
  .s-prose--flow .bio + .bio { margin-top: 1.85em; }

  /* ---- Performance：兩欄 → 單欄，依 DOM 順序流排 ---- */
  .s-videos { height: auto; overflow: visible; padding: 66px 0 58px; }
  .pcell, .pvid {
    position: static;
    width: var(--mobile-col);
    margin: 0 auto;
  }
  .pcell { margin-top: 101px; }   /* 上一支影片底部到下一個標題 */
  .pcell:first-of-type { margin-top: 0; }
  .pcell h2 {
    width: auto;
    font-size: clamp(12px, 3.75vw, 16px);
    line-height: 1.4;
  }
  .pcell.lh-n h2 { line-height: normal; font-size: clamp(12px, 3.75vw, 16px); }
  .pvid {
    display: block;
    height: auto;
    aspect-ratio: 16 / 9;
    margin-top: 18px;
  }

  /* ---- 404 ---- */
  .s-notfound { min-height: 0; padding: 30px 0 68px; }
  .s-notfound .grid { width: var(--mobile-col); margin: 0 auto; padding: 0; }
  .s-notfound h1 { font-size: clamp(32px, 10vw, 42px); line-height: 1.4; }
  .s-notfound p { font-size: clamp(14px, 4.375vw, 17px); }
}

/* ==========================================================================
   11. 手機寬度補充
   首頁行動版背景：contain＋頂端對齊，下方露出棕色底色。
   只在手機寬度套用——主視覺是直式圖，平板寬度下 contain 會改以高度貼合、
   兩側留下大片底色，故 751–979 維持預設的 cover。
   ========================================================================== */
@media (max-width: 750px) {
  .page-bg.bg-home img { object-fit: contain; object-position: 50% 0%; }
}
