/* ============================================================
   尚音音樂藝術教育中心 Sonance Music & Art
   設計系統 — 「紙與舞台 Paper & Stage」
   ------------------------------------------------------------
   概念：學生作品是彩色的，所以網站必須是中性而溫潤的畫布。
   紙白承載閱讀，墨黑承載舞台感，黃銅金只用在該被看見的地方。
   全站零依賴、零建置，可直接部署到任何靜態主機。
   ============================================================ */

/* ---------- 1. 設計權杖 Design tokens ---------- */
:root {
  /* 墨與紙 */
  --ink:        #14161A;
  --ink-2:      #2A2E34;
  --ink-soft:   #565C64;
  --ink-mute:   #838A93;
  --paper:      #FBF8F3;
  --paper-2:    #F4EFE7;
  --paper-3:    #EBE4D9;
  --white:      #FFFFFF;
  --line:       rgba(20, 22, 26, .12);
  --line-soft:  rgba(20, 22, 26, .07);
  --line-dark:  rgba(246, 242, 234, .16);

  /* 黃銅金 —— 唯一的彩色，用於重點與行動 */
  --gold:       #A8813C;
  --gold-deep:  #8A6929;
  --gold-soft:  #D9BC7A;
  --gold-wash:  rgba(168, 129, 60, .10);

  /* 舞台（深色區塊） */
  --stage:      #14161A;
  --stage-2:    #1D2026;
  --on-stage:   #F6F2EA;
  --on-stage-2: rgba(246, 242, 234, .68);

  /* 狀態 */
  --ok:         #2F6B4F;

  /* 字
     設計上不用 CJK 網頁字型（實測首頁會多出 12 個字型請求、約 1.1 MB）。
     標題走系統襯線：macOS 宋體、Windows 宋體，各有正式感；
     若要跨裝置完全一致，見 tools/build.js 的 LOAD_CJK_WEBFONT。 */
  /* 襯線字堆疊刻意把「拉丁襯線」排在 CJK 字型前面。
     瀏覽器逐字回退（per-glyph fallback），所以拉丁字母會用 Iowan／Palatino，
     中文字才落到昭源宋體→宋體。混排標題（例：「視唱練耳 Aural」）因此兩邊都好看。
     這招借鏡自 Nailong-Universe 把 --serif-lat 與 --serif 分開的做法。 */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
           "Chiron Sung HK", "昭源宋體", "Songti TC", "Songti SC",
           "Noto Serif TC", "STSong", "Hiragino Mincho ProN", "SimSun", serif;
  --sans:  "Noto Sans TC", "Source Han Sans TC", "PingFang TC", "Hiragino Sans CNS",
           -apple-system, BlinkMacSystemFont, "Microsoft JhengHei", "Heiti TC",
           "Segoe UI", sans-serif;
  --mono:  ui-monospace, "SF Mono", Menlo, monospace;

  /* 版面 */
  --wrap:   1180px;
  --wrap-n: 760px;
  --gut:    clamp(20px, 5vw, 40px);
  --sect:   clamp(64px, 9vw, 132px);
  --r-sm:   6px;
  --r:      12px;
  --r-lg:   20px;

  /* 陰影 */
  --sh-1: 0 1px 2px rgba(20,22,26,.04), 0 8px 24px -12px rgba(20,22,26,.14);
  --sh-2: 0 2px 6px rgba(20,22,26,.05), 0 24px 48px -20px rgba(20,22,26,.22);

  /* 動效 */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur:  .55s;

  --header-h: 72px;
}

/* ---------- 2. 基礎重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(15.5px, .55vw + 14px, 17px);
  line-height: 1.85;
  font-weight: 400;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;

  /* 中文排版（依 w3c/clreq）：
     text-spacing-trim 擠壓全形標點前後的過多空白，避免「，」後面出現一個空洞。
     支援的瀏覽器（Chromium 123+）生效，其餘忽略，不影響可讀性。 */
  text-spacing-trim: space-first;
  line-break: strict;
  word-break: normal;
  hanging-punctuation: allow-end;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  text-spacing-trim: space-first;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: .005em;
  margin: 0 0 .6em;
  text-wrap: balance;
}

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }

img, svg, video { max-width: 100%; display: block; }

img { height: auto; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
li { margin-bottom: .4em; }

strong { font-weight: 700; }

::selection { background: var(--gold-soft); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- 3. 版面工具 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}
.wrap-n { max-width: var(--wrap-n); }

.section { padding-block: var(--sect); position: relative; }
.section--tight { padding-block: clamp(44px, 6vw, 80px); }
.section--paper2 { background: var(--paper-2); }
.section--paper3 { background: var(--paper-3); }
.section--stage { background: var(--stage); color: var(--on-stage); }
.section--flush-top { padding-top: 0; }

.skip-link {
  position: absolute; left: 50%; top: -100px; transform: translateX(-50%);
  z-index: 999; background: var(--ink); color: var(--paper);
  padding: 12px 22px; border-radius: 0 0 var(--r) var(--r);
  font-size: .9rem; transition: top .2s;
}
.skip-link:focus { top: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 4. 標題元件 ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.1em;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: currentColor;
  flex: none;
  opacity: .7;
}
.section--stage .eyebrow { color: var(--gold-soft); }

.h-display {
  font-size: clamp(2.1rem, 5.2vw + .4rem, 4.1rem);
  letter-spacing: -.015em;
  line-height: 1.16;
}
.h-sect {
  font-size: clamp(1.6rem, 2.4vw + .7rem, 2.65rem);
  letter-spacing: -.01em;
}
.h-sub {
  font-size: clamp(1.12rem, .8vw + .9rem, 1.42rem);
  font-weight: 600;
}

.lede {
  font-size: clamp(1rem, .5vw + .92rem, 1.16rem);
  color: var(--ink-soft);
  line-height: 1.9;
  max-width: 62ch;
}
.section--stage .lede { color: var(--on-stage-2); }

.sect-head { max-width: 68ch; margin-bottom: clamp(34px, 4vw, 56px); }
.sect-head--center { margin-inline: auto; text-align: center; }
.sect-head--center .eyebrow { justify-content: center; }
.sect-head--center .lede { margin-inline: auto; }

/* 標記分隔線（尚音琴鍵母題） */
.mark-rule {
  display: flex; align-items: center; gap: 10px;
  color: var(--gold);
  margin: 0 0 1.5em;
}
.mark-rule svg { height: 15px; width: auto; }
.mark-rule::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, currentColor, transparent);
  opacity: .38;
}

/* ---------- 5. 按鈕 ---------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 26px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.3;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background-color .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--sh-1); }
.btn:active { transform: translateY(0); }
.btn svg { width: 17px; height: 17px; flex: none; }

.btn--gold   { --btn-bg: var(--gold); --btn-fg: #fff; }
.btn--gold:hover { --btn-bg: var(--gold-deep); }
.btn--ghost  { --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--line); }
.btn--ghost:hover { --btn-bg: var(--ink); --btn-fg: var(--paper); border-color: var(--ink); }
.btn--onstage{ --btn-bg: var(--on-stage); --btn-fg: var(--ink); }
.btn--wa     { --btn-bg: #1FA855; --btn-fg: #fff; }
.btn--wa:hover { --btn-bg: #178f47; }
.btn--wide   { width: 100%; }
.btn--lg     { padding: 17px 34px; font-size: 1rem; }

.btn-row {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: clamp(24px, 3vw, 36px);
}

/* 文字連結 */
.tlink {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 600; font-size: .93rem;
  color: var(--gold-deep);
  border-bottom: 1px solid var(--gold-soft);
  padding-bottom: 2px;
  transition: gap .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.tlink:hover { gap: 12px; border-color: var(--gold-deep); }
.tlink svg { width: 15px; height: 15px; }

/* ---------- 6. 頁首 ---------- */
.header {
  position: sticky; top: 0; z-index: 120;
  height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(251, 248, 243, .82);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background-color .3s;
}
.header.is-stuck { border-bottom-color: var(--line-soft); }
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; width: 100%;
}

.brand { display: inline-flex; align-items: center; gap: 11px; flex: none; }
.brand__mark { height: 26px; width: auto; color: var(--ink); flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__zh {
  font-family: var(--serif); font-weight: 700;
  font-size: 1.06rem; letter-spacing: .1em;
}
.brand__en {
  font-size: .55rem; letter-spacing: .3em;
  text-transform: uppercase; color: var(--ink-mute); font-weight: 600;
}

.nav { display: flex; align-items: center; gap: clamp(6px, 1.4vw, 20px); }
.nav a {
  font-size: .9rem; font-weight: 500; color: var(--ink-soft);
  padding: 8px 4px; position: relative; white-space: nowrap;
  transition: color .2s;
}
.nav a::after {
  content: ""; position: absolute; left: 4px; right: 4px; bottom: 2px;
  height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

.header__cta { display: flex; align-items: center; gap: 10px; flex: none; }
.header__cta .btn { padding: 11px 20px; font-size: .88rem; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px; flex: none;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line);
  border-radius: 50%; cursor: pointer; color: var(--ink);
}
.nav-toggle span {
  display: block; width: 17px; height: 1.5px; background: currentColor;
  position: relative; transition: background-color .2s;
}
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 17px; height: 1.5px;
  background: currentColor; transition: transform .3s var(--ease), top .3s var(--ease);
}
.nav-toggle span::before { top: -5.5px; }
.nav-toggle span::after  { top: 5.5px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

/* 手機抽屜 */
.drawer {
  position: fixed; inset: var(--header-h) 0 0; z-index: 110;
  background: var(--paper);
  padding: 30px var(--gut) 130px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .4s var(--ease);
  visibility: hidden;
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer nav { display: flex; flex-direction: column; }
.drawer nav a {
  font-family: var(--serif); font-size: 1.35rem; font-weight: 600;
  padding: 17px 0; border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between;
}
.drawer nav a span { color: var(--gold); font-size: .9rem; }
.drawer__foot { margin-top: 30px; display: grid; gap: 12px; }
.drawer__meta {
  margin-top: 26px; font-size: .9rem; color: var(--ink-soft); line-height: 2;
}
body.is-locked { overflow: hidden; }

/* ---------- 7. Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(56px, 9vw, 118px) clamp(60px, 8vw, 110px);
  overflow: hidden;
}
.hero--stage {
  background: var(--stage);
  color: var(--on-stage);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, .84fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero__title {
  /* 標題用 <br> 手動斷行，因此字級必須保證「最長一行」在任何寬度都放得下。
     最長行 8 個全形字，故 vw 係數保守取值，並在 900px 以下另計。 */
  font-size: clamp(1.95rem, 3.6vw + .5rem, 4.15rem);
  line-height: 1.16;
  letter-spacing: -.02em;
  margin-bottom: .5em;
}
.hero__title em {
  font-style: normal;
  color: var(--gold-soft);
  position: relative;
  white-space: nowrap;
}
/* 燙金漸層：借鏡 Nailong-Universe 以 background-clip:text 做金字的手法。
   用 @supports 包住，不支援的瀏覽器會保留上面的純色，不會變成隱形文字。 */
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .hero__title em,
  .section--stage .h-sect em {
    background-image: linear-gradient(100deg, #EFD79B 0%, #C9A24B 46%, #A8813C 72%, #E3C787 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}
.hero--stage .lede { color: var(--on-stage-2); }
.hero__note {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  margin-top: 26px; padding-top: 22px;
  border-top: 1px solid var(--line-dark);
  font-size: .87rem; color: var(--on-stage-2);
}
.hero__note span { display: inline-flex; align-items: center; gap: 8px; }
.hero__note b { color: var(--on-stage); font-weight: 600; }

.hero__grid > * { min-width: 0; }

/* Hero 視覺：三張真實學生作品錯位堆疊 */
.hero__art {
  position: relative;
  aspect-ratio: 1 / 1.02;
  min-height: 340px;
}
.hero__art figure {
  position: absolute; margin: 0;
  background: var(--white);
  padding: 9px 9px 30px;
  border-radius: 3px;
  box-shadow: var(--sh-2);
  transition: transform .6s var(--ease);
}
.hero__art img { width: 100%; height: 100%; object-fit: cover; border-radius: 1px; }
.hero__art figure:nth-child(1) {
  inset: 3% 30% 30% 0; transform: rotate(-3.2deg); z-index: 1;
}
.hero__art figure:nth-child(2) {
  inset: 22% 0 8% 26%; transform: rotate(2.4deg); z-index: 2;
}
.hero__art figure:nth-child(3) {
  inset: 58% 42% 0 6%; transform: rotate(-1.4deg); z-index: 3;
  padding-bottom: 22px;
}
.hero__art figure img { aspect-ratio: 4/3; }
.hero__art figure:nth-child(2) img { aspect-ratio: 3/4; }
.hero__art:hover figure:nth-child(1) { transform: rotate(-4.6deg) translateY(-7px); }
.hero__art:hover figure:nth-child(2) { transform: rotate(3.4deg) translateY(-7px); }
.hero__art:hover figure:nth-child(3) { transform: rotate(-2.2deg) translateY(-7px); }
.hero__art figcaption {
  position: absolute; left: 12px; bottom: 7px;
  font-size: .68rem; letter-spacing: .06em; color: var(--ink-mute);
}

/* 舞台光暈 */
.hero--stage::before {
  content: ""; position: absolute;
  width: 62vw; height: 62vw; max-width: 780px; max-height: 780px;
  top: -26%; right: -14%;
  background: radial-gradient(circle, rgba(217, 188, 122, .16) 0%, transparent 64%);
  pointer-events: none;
}
.hero--stage::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, var(--line-dark) 0 1px, transparent 1px 46px);
  opacity: .5; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 40%, transparent);
}
.hero__grid, .hero .wrap { position: relative; z-index: 1; }

/* ---------- 8. 信任錨點 ---------- */
.trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border-block: 1px solid var(--line-soft);
}
.trust__item {
  background: var(--paper);
  padding: clamp(26px, 3.4vw, 44px) clamp(20px, 2.4vw, 34px);
  text-align: center;
}
.trust__num {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.2vw + .6rem, 2.2rem);
  font-weight: 700; line-height: 1.2;
  color: var(--ink); margin-bottom: .28em;
}
.trust__num small {
  font-size: .46em; font-weight: 600; color: var(--gold-deep);
  margin-left: .34em; letter-spacing: .04em;
}
.trust__label {
  font-size: .84rem; color: var(--ink-soft); line-height: 1.7;
}

/* ---------- 9. 卡片格 ---------- */
.grid { display: grid; gap: clamp(16px, 2vw, 26px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* 課程卡 */
.ccard {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease),
              border-color .35s var(--ease);
  height: 100%;
}
.ccard:hover {
  transform: translateY(-5px);
  box-shadow: var(--sh-2);
  border-color: rgba(168, 129, 60, .34);
}
.ccard__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--paper-2);
  overflow: hidden;
}
.ccard__media img, .ccard__media svg {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .7s var(--ease);
}
.ccard:hover .ccard__media img { transform: scale(1.045); }
.ccard__tag {
  position: absolute; top: 12px; left: 12px;
  background: rgba(251, 248, 243, .94);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: var(--ink);
  font-size: .68rem; font-weight: 700; letter-spacing: .1em;
  padding: 5px 11px; border-radius: 999px;
}
.ccard__tag--gold { background: var(--gold); color: #fff; }
/* 標籤若改為靜態定位（flex 子項），需自行靠左，否則會被拉伸成整條 */
.ccard__body > .ccard__tag { align-self: flex-start; }
.ccard__body {
  padding: clamp(18px, 2vw, 26px);
  display: flex; flex-direction: column; flex: 1;
}
.ccard__title {
  font-family: var(--serif); font-size: 1.22rem; font-weight: 700;
  margin: 0 0 .5em;
}
.ccard__meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  font-size: .8rem; color: var(--ink-mute);
  margin-bottom: .9em;
}
.ccard__meta span { display: inline-flex; align-items: center; gap: 5px; }
.ccard__text {
  font-size: .9rem; color: var(--ink-soft); line-height: 1.8;
  margin-bottom: 1.3em;
}
.ccard__foot { margin-top: auto; }

/* 課程卡的抽象視覺（無照片時用） */
.ccard__pattern {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.ccard__pattern::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    0deg, rgba(20,22,26,.055) 0 1px, transparent 1px 13px);
}
.ccard__pattern span {
  font-family: var(--serif); font-size: 2.6rem; font-weight: 700;
  color: rgba(20, 22, 26, .17); position: relative; letter-spacing: .1em;
}

/* 特色卡（成果/缺口） */
.fcard {
  background: var(--paper-2);
  border-radius: var(--r);
  padding: clamp(24px, 2.8vw, 38px);
  border: 1px solid var(--line-soft);
  height: 100%;
}
.fcard__icon {
  width: 42px; height: 42px; margin-bottom: 1.1em;
  color: var(--gold);
}
.fcard__icon svg { width: 100%; height: 100%; }
.fcard h3 { font-size: 1.14rem; margin-bottom: .5em; }
.fcard p { font-size: .91rem; color: var(--ink-soft); line-height: 1.82; }

/* ---------- 10. 成果藝廊 ----------
   用統一方格而非 CSS columns 瀑布流：columns 遇到直幅圖會被迫換欄，
   留下難看的大空洞（實測於 17 張作品時特別明顯）。
   方格藝廊比較整齊，也更像畫廊掛牆。 */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 1.2vw, 16px);
}
.gallery figure {
  margin: 0;
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--paper-3);
  cursor: zoom-in;
}
.gallery img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.gallery figure:hover img { transform: scale(1.045); }
.gallery figcaption {
  position: absolute; inset: auto 0 0 0;
  padding: 30px 14px 12px;
  background: linear-gradient(transparent, rgba(20,22,26,.78));
  color: #fff; font-size: .78rem; line-height: 1.5;
  opacity: 0; transform: translateY(8px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.gallery figure:hover figcaption { opacity: 1; transform: none; }

/* 燈箱 */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(12, 13, 15, .94);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 4vw, 60px);
  opacity: 0; visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: 100%; max-height: 88vh;
  border-radius: 4px; box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.lightbox__close {
  position: absolute; top: 18px; right: 20px;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22);
  color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background-color .25s;
}
.lightbox__close:hover { background: rgba(255,255,255,.2); }

/* ---------- 11. 列表 / 內文元件 ---------- */
.checks { list-style: none; padding: 0; display: grid; gap: 11px; }
.checks li {
  position: relative; padding-left: 30px; margin: 0;
  font-size: .93rem; color: var(--ink-soft); line-height: 1.75;
}
.checks li::before {
  content: ""; position: absolute; left: 4px; top: .55em;
  width: 12px; height: 7px;
  border-left: 1.7px solid var(--gold);
  border-bottom: 1.7px solid var(--gold);
  transform: rotate(-45deg);
}
.section--stage .checks li { color: var(--on-stage-2); }

.spec {
  width: 100%; border-collapse: collapse; font-size: .92rem;
  margin-bottom: 1.4em;
}
.spec th, .spec td {
  text-align: left; padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.spec th {
  width: 30%; min-width: 108px;
  font-weight: 600; color: var(--ink);
  background: var(--paper-2);
  font-family: var(--sans);
  white-space: nowrap;
}
.spec td { color: var(--ink-soft); }
.spec tr:first-child th, .spec tr:first-child td { border-top: 1px solid var(--line-soft); }

.note {
  background: var(--gold-wash);
  border-left: 3px solid var(--gold);
  padding: 16px 20px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: .89rem;
  color: var(--ink-2);
  line-height: 1.8;
}
.note--plain { background: var(--paper-2); border-left-color: var(--ink-mute); }

/* 折疊 */
.acc { border-top: 1px solid var(--line-soft); }
.acc__item { border-bottom: 1px solid var(--line-soft); }
.acc__q {
  width: 100%; text-align: left; background: none; border: 0;
  padding: 22px 44px 22px 0;
  font-family: var(--serif); font-size: 1.04rem; font-weight: 600;
  color: var(--ink); cursor: pointer; position: relative;
  line-height: 1.6;
  transition: color .25s;
}
.acc__q:hover { color: var(--gold-deep); }
.acc__q::after {
  content: ""; position: absolute; right: 8px; top: 50%;
  width: 11px; height: 11px; margin-top: -7px;
  border-right: 1.6px solid var(--gold); border-bottom: 1.6px solid var(--gold);
  transform: rotate(45deg);
  transition: transform .3s var(--ease);
}
.acc__item.is-open .acc__q::after {
  transform: rotate(-135deg); margin-top: -3px;
}
.acc__a {
  overflow: hidden; height: 0;
  transition: height .35s var(--ease);
}
.acc__a > div {
  padding: 0 clamp(20px, 6vw, 90px) 24px 0;
  font-size: .92rem; color: var(--ink-soft); line-height: 1.9;
}
.acc__a p:last-child { margin-bottom: 0; }

/* ---------- 12. 位置 / 地圖 ---------- */
.map-frame {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: var(--paper-2);
  aspect-ratio: 16 / 11;
}
.map-frame iframe {
  width: 100%; height: 100%; border: 0; display: block;
  filter: grayscale(.32) contrast(1.04);
  transition: filter .4s;
}
.map-frame:hover iframe { filter: none; }

.info-list { display: grid; gap: 0; }
.info-list__row {
  display: grid; grid-template-columns: 108px 1fr;
  gap: 14px; padding: 15px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: .92rem;
}
.info-list__row dt {
  color: var(--ink-mute); font-size: .82rem;
  font-weight: 600; letter-spacing: .06em; padding-top: 2px;
}
.info-list__row dd { margin: 0; color: var(--ink-2); line-height: 1.75; }

/* ---------- 13. CTA 區 ---------- */
.cta-band {
  background: var(--stage);
  color: var(--on-stage);
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 90% at 78% 50%,
              rgba(217,188,122,.17), transparent 62%);
  pointer-events: none;
}
.cta-band .wrap { position: relative; z-index: 1; }
.cta-band__inner {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(30px, 4vw, 60px); align-items: center;
}

/* ---------- 14. 頁尾 ---------- */
.footer {
  background: var(--stage-2);
  color: var(--on-stage-2);
  padding-block: clamp(48px, 6vw, 76px) 0;
  font-size: .9rem;
}
.footer a { transition: color .2s; }
.footer a:hover { color: var(--gold-soft); }
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: clamp(26px, 3.4vw, 50px);
  padding-bottom: clamp(34px, 4vw, 54px);
}
.footer__brand .brand__mark { color: var(--on-stage); }
.footer__brand .brand__zh { color: var(--on-stage); }
.footer__brand .brand__en { color: var(--on-stage-2); }
.footer__about {
  margin-top: 16px; font-size: .86rem; line-height: 1.85;
  max-width: 34ch; color: var(--on-stage-2);
}
.footer h4 {
  font-family: var(--sans); font-size: .76rem;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold-soft); font-weight: 700;
  margin: 0 0 1.2em;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer__contact { display: grid; gap: 12px; font-size: .87rem; line-height: 1.7; }
.footer__contact a, .footer__contact span { display: flex; gap: 9px; align-items: flex-start; }
.footer__contact svg {
  width: 15px; height: 15px; flex: none; margin-top: .34em; color: var(--gold-soft);
}
.footer__bottom {
  border-top: 1px solid var(--line-dark);
  padding-block: 24px;
  display: flex; flex-wrap: wrap; gap: 10px 26px;
  justify-content: space-between; align-items: center;
  font-size: .8rem; color: rgba(246,242,234,.5);
}

/* ---------- 15. 手機常駐 CTA ---------- */
.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 130;
  display: none;
  gap: 1px;
  background: var(--line-dark);
  border-top: 1px solid rgba(20,22,26,.1);
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -8px 28px -14px rgba(20,22,26,.4);
}
.mobile-cta a {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 15px 10px;
  font-size: .9rem; font-weight: 600;
  background: var(--paper);
  color: var(--ink);
}
.mobile-cta a svg { width: 17px; height: 17px; flex: none; }
.mobile-cta a:first-child { background: #1FA855; color: #fff; flex: 1.5; }
.mobile-cta a:active { filter: brightness(.95); }

/* ---------- 16. 捲動進場 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .09s; }
.reveal[data-d="2"] { transition-delay: .18s; }
.reveal[data-d="3"] { transition-delay: .27s; }
.reveal[data-d="4"] { transition-delay: .36s; }
.reveal[data-d="5"] { transition-delay: .45s; }

/* ---------- 17. 內頁標頭 ---------- */
.page-head {
  padding-block: clamp(40px, 5vw, 76px) clamp(30px, 4vw, 52px);
  background: var(--paper-2);
  border-bottom: 1px solid var(--line-soft);
  position: relative;
  overflow: hidden;
}
.page-head::after {
  content: ""; position: absolute; right: -30px; bottom: -30px;
  width: 240px; height: 200px;
  background: radial-gradient(circle, rgba(168,129,60,.13), transparent 68%);
  pointer-events: none;
}
.crumbs {
  font-size: .78rem; color: var(--ink-mute);
  margin-bottom: 1.3em; display: flex; flex-wrap: wrap; gap: 7px;
  align-items: center;
}
.crumbs a:hover { color: var(--gold-deep); }
.crumbs span[aria-hidden] { opacity: .45; }
.page-head h1 { font-size: clamp(1.85rem, 3.4vw + .5rem, 3rem); margin-bottom: .4em; }
.page-head .lede { margin-bottom: 0; }

/* 課程頁雙欄 */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(30px, 4.4vw, 68px);
  align-items: start;
}
.split > * { min-width: 0; }
.aside-card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: clamp(22px, 2.4vw, 32px);
  box-shadow: var(--sh-1);
  position: sticky;
  top: calc(var(--header-h) + 22px);
}
.aside-card h3 {
  font-size: 1.06rem; margin-bottom: .9em;
  padding-bottom: .8em; border-bottom: 1px solid var(--line-soft);
}
.aside-card .btn + .btn { margin-top: 10px; }
.aside-card__meta {
  margin-top: 1.3em; padding-top: 1.2em; border-top: 1px solid var(--line-soft);
  font-size: .84rem; color: var(--ink-soft); line-height: 1.9;
}

/* 文章排版 */
.prose h2 {
  font-size: clamp(1.35rem, 1.8vw + .7rem, 1.85rem);
  margin-top: 2em;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.16rem; margin-top: 1.6em; }
.prose ul { color: var(--ink-soft); font-size: .95rem; }
.prose > p { color: var(--ink-soft); }

/* 步驟 */
.steps { counter-reset: s; display: grid; gap: 0; }
.steps__item {
  counter-increment: s;
  display: grid; grid-template-columns: 52px 1fr; gap: 18px;
  padding: 24px 0; border-bottom: 1px solid var(--line-soft);
  align-items: start;
}
.steps__item:first-child { border-top: 1px solid var(--line-soft); }
.steps__item::before {
  content: counter(s, decimal-leading-zero);
  font-family: var(--serif); font-size: 1.3rem; font-weight: 700;
  color: var(--gold); line-height: 1.5;
}
.steps__item h3 { font-size: 1.02rem; margin-bottom: .34em; }
.steps__item p { font-size: .9rem; color: var(--ink-soft); margin: 0; }

/* ---------- 18. 響應式 ---------- */
@media (max-width: 1080px) {
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .nav, .header__cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  /* 單欄後可用整頁寬度，標題可以放大 */
  .hero__title { font-size: clamp(2rem, 8.2vw, 3.1rem); }
  .hero__art { max-width: 460px; margin-inline: auto; width: 100%; }
  .split { grid-template-columns: 1fr; }
  .aside-card { position: static; }
  .cta-band__inner { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust { grid-template-columns: 1fr; }
  .mobile-cta { display: flex; }
  body { padding-bottom: 56px; }
  .footer { padding-bottom: 0; }
}

@media (max-width: 620px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1fr; }
  .spec th { width: auto; display: block; border-bottom: 0; padding-bottom: 4px; }
  .spec td { display: block; padding-top: 0; }
  .spec tr { display: block; border-bottom: 1px solid var(--line-soft); padding: 12px 0; }
  .spec th, .spec td { border: 0; padding-left: 0; padding-right: 0; background: none; }
  .spec tr:first-child th, .spec tr:first-child td { border-top: 0; }
  .info-list__row { grid-template-columns: 1fr; gap: 4px; }
  .steps__item { grid-template-columns: 38px 1fr; gap: 12px; }
  .hero__art figure:nth-child(3) { display: none; }
  .btn { padding: 13px 22px; }
}

/* ---------- 19. 偏好與列印 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .header, .mobile-cta, .drawer, .hero__art, .lightbox { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section, .section--stage { background: #fff !important; color: #000 !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}

/* ============================================================
   20. 第二輪新增：依競品實測與 UX 研究補強的元件
   （來源見 docs/02-藝術教育網站設計調查.md）
   ============================================================ */

/* 20.1 待填標記 —— 上線前必須由業主補齊的真實資料。
     刻意做得顯眼，避免「示範資料」被誤當成可發布內容。 */
.todo {
  display: inline-block;
  background: #FDF3D7;
  border: 1px dashed #C99A2E;
  border-radius: 3px;
  padding: 0 6px;
  color: #8A6929;
  font-size: .88em;
  font-weight: 600;
  letter-spacing: .02em;
}
.todo::before { content: "待填 "; font-size: .82em; opacity: .75; }

.todo-block {
  border: 1px dashed #C99A2E;
  background: #FDFBF4;
  border-radius: var(--r-sm);
  padding: 18px 22px;
  font-size: .88rem;
  line-height: 1.85;
  color: var(--ink-2);
}
.todo-block strong { color: #8A6929; }

/* 20.2 信任徽章列（澳門本地訊號：持續進修、電子消費卡、持牌） */
.badges {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 22px;
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px 8px 12px;
  font-size: .82rem; font-weight: 600; color: var(--ink-2);
}
.badge svg { width: 15px; height: 15px; color: var(--gold); flex: none; }
.badge--todo { border-style: dashed; border-color: #C99A2E; background: #FDFBF4; color: #8A6929; }

/* 20.3 收費方式與上課時間
   政策：不列出金額（業主不希望同業看到價目）。
   改為公開「計價方式」與「包含／不包含項目」——這是家長真正在意的
   「會不會有隱藏收費」，也是不公開金額時仍能維持信任的關鍵。 */
.fee-list {
  list-style: none; padding: 0; margin: 0 0 18px;
  display: grid; gap: 10px;
}
.fee-list li {
  position: relative; padding-left: 20px; margin: 0;
  font-size: .87rem; color: var(--ink-soft); line-height: 1.7;
}
.fee-list li::before {
  content: ""; position: absolute; left: 2px; top: .58em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold-soft);
}
.fee-list strong { color: var(--ink); font-weight: 600; }

.fee-terms {
  background: var(--paper-2);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.fee-terms p {
  margin: 0; font-size: .85rem; color: var(--ink-2); line-height: 1.8;
}
.fee-terms p + p { margin-top: 4px; }

.fee-why {
  font-size: .83rem; color: var(--ink-mute); line-height: 1.85;
  margin: 0 0 20px;
  padding-left: 13px;
  border-left: 2px solid var(--line);
}
.fee-why strong { color: var(--ink-2); }

.fee-actions { margin-bottom: 4px; }
.fee-actions .btn + .btn { margin-top: 10px; }

/* 上課時間：每天營業時間 */
.aside-card__h3 {
  margin-top: 26px; padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}
.hours { margin: 0; display: grid; gap: 0; }
.hours > div {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; padding: 12px 0;
}
.hours dt {
  font-size: .85rem; color: var(--ink-soft); font-weight: 600;
}
.hours dd {
  margin: 0;
  font-family: var(--serif); font-size: 1.18rem; font-weight: 700;
  color: var(--ink); font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}

/* 20.5 師資卡（研究：每位導師要有姓名、學歷、年資、專長、可教級別） */
.tgrid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: clamp(16px,2vw,24px); }
.teacher {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: 24px;
  height: 100%;
  transition: box-shadow .35s var(--ease), transform .35s var(--ease);
}
.teacher:hover { box-shadow: var(--sh-1); transform: translateY(-4px); }
.teacher__avatar {
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--paper-3);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 1.4rem; font-weight: 700;
  color: var(--ink-mute); margin-bottom: 16px;
  overflow: hidden;
}
.teacher__avatar img { width: 100%; height: 100%; object-fit: cover; }
.teacher h3 { font-size: 1.04rem; margin-bottom: .18em; }
.teacher__role {
  font-size: .78rem; letter-spacing: .1em; color: var(--gold-deep);
  font-weight: 700; text-transform: uppercase; margin-bottom: .9em;
}
.teacher dl { margin: 0; font-size: .84rem; }
.teacher dt {
  color: var(--ink-mute); font-size: .74rem; letter-spacing: .06em;
  margin-top: .7em;
}
.teacher dd { margin: 2px 0 0; color: var(--ink-2); line-height: 1.7; }

/* 20.6 影片版位（自架 MP4 + poster，不用 YouTube iframe） */
.videobox {
  position: relative; border-radius: var(--r); overflow: hidden;
  background: var(--ink); aspect-ratio: 16/9;
}
.videobox video, .videobox img { width: 100%; height: 100%; object-fit: cover; }
.videobox__play {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center;
  background: rgba(20,22,26,.35); cursor: pointer; border: 0;
  transition: background-color .3s;
}
.videobox__play:hover { background: rgba(20,22,26,.5); }
.videobox__play span {
  width: 62px; height: 62px; border-radius: 50%;
  background: rgba(251,248,243,.94); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; padding-left: 4px;
}

/* 20.7 成果統計（考級佳績用可驗證的年份／級別／科目） */
.awards { display: grid; gap: 0; }
.award {
  display: grid; grid-template-columns: 74px 1fr auto;
  gap: 16px; align-items: baseline;
  padding: 15px 0; border-bottom: 1px solid var(--line-soft);
  font-size: .91rem;
}
.award:first-child { border-top: 1px solid var(--line-soft); }
.award__year {
  font-family: var(--mono); font-size: .82rem; color: var(--ink-mute);
  letter-spacing: .04em;
}
.award__what { color: var(--ink-2); }
.award__what b { color: var(--ink); font-weight: 600; }
.award__grade {
  font-weight: 700; color: var(--gold-deep); font-size: .86rem;
  white-space: nowrap;
}

/* 20.8 對照提示（把「競品都缺什麼」化成給業主的內部提示，僅出現在文件中） */
.pill {
  display: inline-block; border-radius: 999px;
  padding: 3px 11px; font-size: .72rem; font-weight: 700;
  letter-spacing: .08em; background: var(--gold-wash); color: var(--gold-deep);
}

/* 20.9 麵包屑與頁尾留白（手機黏性條不遮內容） */
@media (max-width: 900px) {
  .tgrid { grid-template-columns: 1fr; }
  .award { grid-template-columns: 64px 1fr; }
  .award__grade { grid-column: 2; }
}
@media (max-width: 620px) {
}

/* 20.10 示範模式註記（由 tools/build.js 的 MODE 決定是否輸出）
   目的：讓「還沒填完真實資料」的版本一眼看得出來，避免被誤當成正式網站。 */
.demo-note strong { color: var(--gold-soft); }
.demo-note code {
  font-family: var(--mono);
  font-size: .92em;
  background: rgba(246, 242, 234, .1);
  padding: 1px 6px;
  border-radius: 3px;
}

/* 20.11 <picture> 包裝：讓 picture 不產生任何盒子，
   內部的 img 仍直接受 .gallery img / .ccard__media img 等既有選擇器控制。 */
picture { display: contents; }

/* 20.12 地圖外框（facade：點擊才載入第三方 iframe）
   預設只顯示地址與按鈕，載入後才換成互動地圖。
   這樣 3 個有地圖的頁面在未點擊前，第三方請求數為 0。 */
.map-frame__facade {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  gap: 14px;
  padding: clamp(22px, 4vw, 40px);
  background:
    radial-gradient(circle at 50% 34%, rgba(168,129,60,.10), transparent 62%),
    var(--paper-2);
}
.map-frame { position: relative; }
.map-frame__icon {
  width: 34px; height: 34px;
  color: var(--gold);
  flex: none;
}
.map-frame__addr {
  margin: 0; font-size: .88rem; line-height: 1.85;
  color: var(--ink-soft); max-width: 30ch;
}
.map-frame__addr strong {
  display: block; font-family: var(--serif);
  font-size: 1.02rem; color: var(--ink);
  margin-bottom: .35em; font-weight: 700;
}
.map-frame .btn { padding: 11px 22px; font-size: .88rem; }
.map-frame.is-live .map-frame__facade { display: none; }

/* ============================================================
   21. 招生檔期（可換內容、可整區關閉）
   報告指出同業 9 月一個月就佔全年廣告量 61%，建議提前 3–4 週起跑。
   因此這一區的內容放在 tools/build.js 的 ENROLLMENT 物件裡，
   換檔期只改資料，不動版面；設為 null 就整區消失。
   ============================================================ */
.enroll {
  background: var(--paper-3);
  border-block: 1px solid var(--line-soft);
  position: relative;
  overflow: hidden;
}
.enroll::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--gold);
}
.enroll__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(22px, 3vw, 48px);
  align-items: center;
  padding-block: clamp(28px, 3.6vw, 44px);
}
.enroll__head {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 10px 14px; margin-bottom: .7em;
}
.enroll__status {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--gold); color: #fff;
  font-size: .74rem; font-weight: 700; letter-spacing: .12em;
  padding: 5px 13px; border-radius: 999px;
}
.enroll__status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #fff; animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .45; transform: scale(.7); }
}
.enroll__term {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(1.16rem, 1.5vw + .8rem, 1.62rem);
  color: var(--ink); letter-spacing: .01em;
}
.enroll__meta {
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  font-size: .87rem; color: var(--ink-soft); margin-bottom: .9em;
}
.enroll__meta span { display: inline-flex; align-items: center; gap: 7px; }
/* 用間隔點分隔「報名至／開課／名額」三項，避免整行讀成一句 */
.enroll__meta span + span { position: relative; padding-left: 18px; }
.enroll__meta span + span::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 3px; height: 3px; margin-top: -1.5px;
  border-radius: 50%; background: var(--ink-mute); opacity: .55;
}
.enroll__meta b { color: var(--ink); font-weight: 600; }
.enroll__courses { display: flex; flex-wrap: wrap; gap: 7px; }
.enroll__courses span {
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: .8rem; color: var(--ink-2);
}
.enroll__cta { flex: none; }
.enroll__cta .btn + .btn { margin-top: 9px; }
@media (max-width: 860px) {
  .enroll__inner { grid-template-columns: 1fr; }
  .enroll__cta { width: 100%; }
}

/* ============================================================
   22. 家長見證
   研究建議的首頁區塊。內容同樣放在 tools/build.js 的 TESTIMONIALS。
   ⚠ 只放真實、並取得家長同意的引述——不放捏造的評語。
   ============================================================ */
.quotes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 26px);
}
.quote {
  position: relative;
  margin: 0;
  padding: clamp(24px, 2.8vw, 34px);
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  display: flex; flex-direction: column;
  height: 100%;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.quote:hover { transform: translateY(-4px); box-shadow: var(--sh-1); }
.quote::before {
  content: "\201C";
  position: absolute; top: 6px; right: 20px;
  font-family: var(--serif); font-size: 4.4rem; line-height: 1;
  color: var(--gold-soft); opacity: .28;
  pointer-events: none;
}
.quote blockquote { margin: 0 0 auto; position: relative; z-index: 1; }
.quote blockquote p {
  font-family: var(--serif);
  font-size: 1.01rem; line-height: 1.9;
  color: var(--ink-2); margin: 0;
}
.quote figcaption {
  margin-top: 22px; padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: .84rem; line-height: 1.7;
}
.quote figcaption strong {
  display: block; color: var(--ink); font-weight: 600;
}
.quote figcaption span { color: var(--ink-mute); }
@media (max-width: 900px) { .quotes { grid-template-columns: 1fr; } }

/* ============================================================
   23. 導師卡補充樣式（2026-10-03 加入真實導師資料後）
   ============================================================ */
.teacher__avatar {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 1.32rem;
  letter-spacing: .02em;
}
.teacher__en {
  font-family: var(--sans);
  font-size: .62em;
  font-weight: 500;
  color: var(--ink-mute);
  letter-spacing: .04em;
  margin-left: .3em;
  white-space: nowrap;
}
/* 卡片內的「尚音教學」用襯線強調，其餘欄位維持輕量 */
.teacher dl dd strong {
  font-family: var(--serif);
  font-size: 1.04em;
  color: var(--ink);
}
/* 關於頁的導師分組標題 */
.tgroup {
  font-size: .78rem;
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-deep);
  padding-bottom: .7em;
  margin-bottom: 1.5em;
  border-bottom: 1px solid var(--line-soft);
}
/* 課程頁的導師區塊：與上方內容留出距離 */
.prose .tgrid { margin-top: 6px; }

/* 23b. 導師照片（2026-10-04 加入；同日改用新版肖像）
   來源：source/導師介紹卡/ 的 1254×1254 正方形肖像，
   由 tools/make-teacher-photos.py 產生 560×560 的 webp + jpg。
   來源本身已是正方形且構圖良好，所以不需要偏移對焦。 */
.teacher__avatar {
  width: 80px; height: 80px;
  padding: 0;
  overflow: hidden;
  background: var(--paper-2);
}
.teacher__avatar picture { display: block; width: 100%; height: 100%; }
.teacher__avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* 23c. 佳績列表補充（2026-10-04） */
.awards-stat {
  font-size: .88rem; color: var(--ink-soft);
  margin: 0 0 1.1em;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.awards-stat strong { color: var(--ink); font-family: var(--serif); font-size: 1.12em; }
.awards-stat span { color: var(--ink-mute); }
/* 比賽冠軍用金色標示，與考級成績區隔 */
.award__grade--win {
  background: var(--gold-wash);
  color: var(--gold-deep);
  border-radius: 999px;
  padding: 2px 12px;
}

/* ============================================================
   24. 演出影片（2026-10-04）
   兩段影片來源比例不同（4:3 與 16:9），統一用 16:9 外框 +
   object-fit:contain，避免格線高度不齊或裁掉畫面。
   ============================================================ */
.videos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(18px, 2.4vw, 30px);
}
@media (max-width: 820px) { .videos { grid-template-columns: 1fr; } }

.video { margin: 0; }
.video video {
  display: block;
  width: 100%;
  height: auto;              /* 必須：否則 HTML 的 height 屬性會蓋掉 aspect-ratio */
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
  border-radius: var(--r);
  border: 1px solid rgba(255,255,255,.14);
}
.video figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: .75em;
  font-size: .88rem;
  color: var(--on-stage-2);
}
.video figcaption span { font-size: .82em; color: var(--ink-mute); font-variant-numeric: tabular-nums; }

/* 深色區塊裡的影片說明與連結要看得清楚 */
.section--stage .h-sect { color: var(--on-stage); }
.section--stage a { color: var(--gold-soft); }

/* ============================================================
   25. 藝術課程的五個班別（2026-10-04）
   ============================================================ */
.tracks {
  list-style: none;
  margin: 0 0 1.6em;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  overflow: hidden;
}
.tracks li {
  display: grid;
  grid-template-columns: 8.5em 1fr;
  gap: 1.2em;
  align-items: baseline;
  background: var(--white);
  padding: .85em 1.1em;
}
.tracks strong {
  font-family: var(--serif);
  font-size: 1.06em;
  color: var(--ink);
  font-weight: 600;
}
.tracks span { font-size: .94rem; color: var(--ink-soft); line-height: 1.6; }
@media (max-width: 560px) {
  .tracks li { grid-template-columns: 1fr; gap: .2em; }
}

/* 四則見證（2026-10-04）：寬螢幕 4 欄，中螢幕 2×2 */
@media (min-width: 1080px) { .quotes { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 640px) and (max-width: 1079px) { .quotes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 五則見證（2026-10-04）：3 欄，第一則跨 2 欄 → 兩列都填滿，不會留下空缺 */
@media (min-width: 1080px) {
  .quotes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quote:first-child { grid-column: span 2; }
}

/* 主視覺沒有照片時（2026-10-04 學生作品先下架）：
   文字獨占整行，並限制行長避免過寬難讀。 */
.hero__grid--solo { grid-template-columns: minmax(0, 1fr); }
.hero__grid--solo > div:first-child { max-width: 62ch; }

/* ============================================================
   26. 藝術班別圖卡（2026-10-04 改為六班並加配圖）
   ============================================================ */
.tracks--cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;   /* 六張卡等高，不會因為描述長短而參差 */
  gap: clamp(16px, 2vw, 26px);
  background: none;
  border: 0;
  border-radius: 0;
  overflow: visible;
}
.tracks--cards li {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  overflow: hidden;
}
.tracks__media { aspect-ratio: 16 / 10; background: var(--paper-2); overflow: hidden; }
.tracks__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tracks__media--blank {
  display: grid; place-items: center;
  background: repeating-linear-gradient(135deg, var(--paper-2) 0 12px, var(--paper-3) 12px 24px);
}
.tracks__media--blank span {
  font-family: var(--serif); font-size: 1.4rem; color: var(--ink-mute);
  letter-spacing: .08em;
}
.tracks__body { padding: 1.05em 1.2em 1.25em; display: grid; gap: .35em; }
.tracks__body strong { font-family: var(--serif); font-size: 1.1em; color: var(--ink); }
.tracks__body span { font-size: .92rem; color: var(--ink-soft); line-height: 1.65; }

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

/* ============================================================
   27. 首頁第一屏改版（2026-10-04）
   由「兒童音樂」定位改為「音樂＋藝術」母品牌定位。
   ============================================================ */
.hero__brand {
  font-family: var(--serif);
  font-size: clamp(.95rem, 1.1vw + .5rem, 1.12rem);
  letter-spacing: .1em;
  color: var(--gold-soft);
  margin: 0 0 .7em;
}
.hero__subjects {
  font-size: clamp(.92rem, .9vw + .5rem, 1.02rem);
  line-height: 1.95;
  color: var(--on-stage-2);
  margin: 0 0 1.3em;
  letter-spacing: .02em;
}
.hero__lede2 { margin-top: -.55em; }
.hero__claim {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.2vw + .5rem, 1.32rem);
  color: var(--on-stage);
  letter-spacing: .06em;
  margin: .2em 0 1.5em;
  padding-left: .85em;
  border-left: 2px solid var(--gold-soft);
}
.hero__grid--solo > div:first-child { max-width: 68ch; }
@media (max-width: 900px) {
  .hero__subjects { line-height: 1.8; }
  .hero__subjects br { display: none; }
}

/* ============================================================
   28. 近期活動卡（2026-10-04）
   ============================================================ */
.events { background: var(--paper-2); }
.ecard {
  position: relative;
  margin: 0;
  padding: clamp(24px, 2.6vw, 34px);
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  border-top: 3px solid var(--gold);
  display: flex; flex-direction: column; gap: .55em;
}
.ecard--art  { border-top-color: var(--gold); }
.ecard--music{ border-top-color: var(--ink); }
.ecard__kind {
  font-size: .74rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold-deep); margin: 0;
}
.ecard--music .ecard__kind { color: var(--ink-mute); }
.ecard__title {
  font-family: var(--serif); font-size: clamp(1.4rem, 2vw + .4rem, 1.95rem);
  margin: 0; color: var(--ink);
}
.ecard__date {
  font-family: var(--serif); font-size: 1.05rem; color: var(--gold-deep);
  margin: 0; letter-spacing: .02em;
}
.ecard--music .ecard__date { color: var(--ink-2); }
.ecard__text { margin: 0 0 .6em; color: var(--ink-soft); line-height: 1.8; }
.ecard .btn { align-self: flex-start; margin-top: auto; }

/* 分隔式兩欄版面（藝術學博士帶隊） */
.section--paper3 { background: var(--paper-3); }

/* 家長見證的使用聲明 */
.quotes__note {
  max-width: 62ch; margin: clamp(22px,2.6vw,32px) auto 0;
  text-align: center; font-size: .82rem; line-height: 1.85;
  color: var(--ink-mute);
}

/* 師資區的小標（保留創辦理念作為其中一層） */
.h-sub {
  font-family: var(--serif);
  font-size: clamp(1.12rem, 1.1vw + .6rem, 1.42rem);
  color: var(--ink); margin: 1.8em 0 .7em;
  padding-left: .8em; border-left: 3px solid var(--gold);
}

/* ============================================================
   29. 課程分類標題（音樂課程／藝術課程）
   ============================================================ */
.cgroup {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.4vw + .7rem, 1.66rem);
  color: var(--ink);
  margin: clamp(34px,4vw,54px) 0 1.1em;
  padding-bottom: .5em;
  border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: .7em;
}
.cgroup:first-of-type { margin-top: 0; }
.cgroup::before {
  content: ""; width: 22px; height: 2px; background: var(--gold); flex: none;
}
.cgroup--lg { margin-top: clamp(44px,5vw,70px); }
.cgroup__note {
  margin: -0.6em 0 1.6em; color: var(--ink-soft); font-size: .95rem;
}

/* 頁尾的課程分組標籤 */
.footer__sep {
  margin-top: .9em;
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-soft); opacity: .8;
}

/* 關於頁的引言（音樂有聲，藝術有形） */
.pullquote {
  font-family: var(--serif);
  font-size: clamp(1.08rem, 1.1vw + .6rem, 1.34rem);
  line-height: 1.9; color: var(--ink);
  margin: 1.8em 0; padding: .9em 0 .9em 1.1em;
  border-left: 3px solid var(--gold);
  background: linear-gradient(90deg, var(--paper-2), transparent 70%);
}

/* ============================================================
   30. 藝術教育方向領隊卡（藝術學博士帶隊）
   ============================================================ */
.leadcard {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(20px, 2.6vw, 36px);
  align-items: center;
  padding: clamp(22px, 2.4vw, 32px);
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  border-left: 4px solid var(--gold);
}
.leadcard__photo { aspect-ratio: 1; border-radius: var(--r); overflow: hidden; background: var(--paper-2); }
.leadcard__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.leadcard__ph {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: repeating-linear-gradient(135deg, var(--paper-2) 0 12px, var(--paper-3) 12px 24px);
}
.leadcard__ph span { font-family: var(--serif); color: var(--ink-mute); letter-spacing: .1em; font-size: .92rem; }
.leadcard__name { font-family: var(--serif); font-size: clamp(1.3rem, 1.6vw + .6rem, 1.72rem); margin: 0 0 .35em; color: var(--ink); }
.leadcard__desc { margin: 0 0 1em; color: var(--ink-soft); line-height: 1.85; }
@media (max-width: 640px) { .leadcard { grid-template-columns: 1fr; } .leadcard__photo { max-width: 180px; } }
.leadcard__ph { display: grid; place-items: center; gap: .5em; align-content: center; }
.leadcard__ph svg { width: 40px; height: 40px; color: var(--gold); opacity: .75; }
.leadcard__ph span { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; }

/* ============================================================
   31. 藝術成果清單（成果頁）
   ============================================================ */
.artres { list-style: none; margin: 0 0 1.8em; padding: 0; display: grid; gap: 1.1em; }
.artres li {
  padding: .95em 1.15em;
  background: var(--paper-2);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--r) var(--r) 0;
}
.artres__title {
  font-family: var(--serif); font-size: 1.08rem; margin: 0 0 .3em; color: var(--ink);
}
.artres__desc { margin: 0; color: var(--ink-soft); line-height: 1.8; font-size: .95rem; }
/* 學生作品區的科目列 */
.subjects-line {
  font-size: .88rem; letter-spacing: .06em; color: var(--ink-mute);
  margin: -.5em 0 0;
}
.tracks__body .tlink { margin-top: .5em; font-size: .88rem; }
.leadcard__en {
  font-size: .82rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-mute); margin: -.15em 0 .5em;
}

/* 只有兩個班別時用兩欄，卡片放大、不留空格 */
.tracks--cards.tracks--duo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .tracks--cards.tracks--duo { grid-template-columns: 1fr; } }

/* 領隊卡：職銜與三段式學歷／負責範圍（2026-10-04 依業主格式） */
.leadcard__title {
  font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  color: var(--gold-deep); margin: 0 0 .5em;
}
.leadcard__creds { list-style: none; margin: .9em 0 1em; padding: 0; display: grid; gap: .6em; }
.leadcard__creds li {
  display: flex; align-items: flex-start; gap: .7em;
  font-size: .96rem; color: var(--ink-2); line-height: 1.7;
}
.leadcard__creds svg {
  width: 22px; height: 22px; flex: none; margin-top: .2em;
  color: var(--gold); opacity: .9;
}
.leadcard__creds li:first-child span { font-weight: 700; color: var(--ink); }
