/* ==========================================
   [優化 #1] CIS 品牌識別系統全面重塑
   - 精煉色階系統：主色/輔助色/中性色三層架構
   - 金色改為更沉穩的琥珀金，提升高端感
   - 新增 surface 層級變數，避免硬編碼
   ========================================== */
:root {
  /* === Primary Brand === */
  --primary: #D95300;
  --primary-hover: #BF4A00;
  --primary-soft: rgba(217, 83, 0, 0.08);
  --primary-glow: rgba(217, 83, 0, 0.25);

  /* === Accent / Gold === */
  --gold: #B8941E;
  --gold-light: #D4B44A;
  --gold-soft: rgba(184, 148, 30, 0.12);

  /* === Dark === */
  --dark: #0A192F;
  --dark-hover: #0E2240;
  --dark-grad: linear-gradient(160deg, #0A192F 0%, #112240 50%, #1A2F52 100%);
  --dark-surface: rgba(255,255,255,0.04);
  --dark-border: rgba(255,255,255,0.08);

  /* === Neutrals === */
  --light: #F7F9FC;
  --white: #FFFFFF;
  --surface: #FFFFFF;
  --surface-elevated: #FDFDFE;
  --text-main: #1A2333;
  --text-secondary: #3D4F65;
  --text-muted: #64748B;
  --text-light-muted: #94A3B8;
  --border: #E2E8F0;
  --border-light: #F1F5F9;

  /* === Spacing & Radius === */
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 100px;

  /* === Shadows === */
  --shadow-xs: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --shadow-xl: 0 16px 60px rgba(0,0,0,0.16);
  --shadow-primary: 0 4px 20px rgba(217,83,0,0.25);
  --shadow-gold: 0 4px 20px rgba(184,148,30,0.2);

  /* === Transitions === */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.35s;
  --duration-slow: 0.5s;
}

/* ==========================================
   Reset & Base
   ========================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* [優化 #2] 字體層級：使用 Noto Serif TC 作為標題強化品牌權威感 */
body {
  font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--light);
  color: var(--text-main);
  line-height: 1.7;
  overflow-x: hidden;
  letter-spacing: 0.01em;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color var(--duration-fast) ease; }

/* ==========================================
   Utilities
   ========================================== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.max-w-800 { max-width: 800px; }
.max-w-1000 { max-width: 1000px; }
.max-w-1400 { max-width: 1400px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.font-bold { font-weight: 700; }
.font-serif { font-family: 'Noto Serif TC', serif; }

.text-primary { color: var(--primary); }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-light-muted { color: var(--text-light-muted); }
.text-dark { color: var(--dark); }
.text-white { color: var(--white); }
.strike { text-decoration: line-through; opacity: 0.7; }
.hidden { display: none !important; }
.hidden-fade { opacity: 0; visibility: hidden; pointer-events: none; transition: var(--duration-normal) ease; position: absolute; }
.full-width { width: 100%; }

.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }
.mb-50 { margin-bottom: 50px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.ml-10 { margin-left: 10px; }
.mr-10 { margin-right: 10px; }
.text-sm { font-size: 0.85rem; }

/* ==========================================
   [優化 #7] CTA 按鈕：pulse 效果 + 更具層次的 hover
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  border: 2px solid transparent;
  text-align: center;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.02em;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--duration-fast) ease;
}
.btn:hover::after { opacity: 1; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #E06A20 100%);
  color: var(--white);
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(217,83,0,0.4);
  color: var(--white);
}
.btn-primary:active { transform: translateY(-1px); }

/* [優化 #7] 主 CTA 脈衝呼吸效果 */
.btn-primary.pulse-cta {
  animation: ctaPulse 2.5s ease-in-out infinite;
}
@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(217,83,0,0.25); }
  50% { box-shadow: 0 4px 35px rgba(217,83,0,0.45); }
}

.btn-outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
}
.btn-sm { padding: 11px 22px; font-size: 0.9rem; }

/* ==========================================
   [優化 #1] Top Elements — 更精緻的 Ticker 與 Nav
   ========================================== */
.fomo-ticker {
  background: linear-gradient(90deg, var(--dark) 0%, #112240 100%);
  color: var(--white);
  text-align: center;
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 1001;
  position: relative;
  border-bottom: 1px solid rgba(184,148,30,0.2);
}
.fomo-content {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: tickerPulse 3s ease-in-out infinite;
}
@keyframes tickerPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.75; } }

.scroll-progress-container { position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 1002; background: transparent; }
.scroll-progress-bar { height: 100%; background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%); width: 0%; transition: width 0.1s; }

.navbar {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 1px 10px rgba(0,0,0,0.04);
  transition: all var(--duration-normal) ease;
}
.nav-container { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; }
.nav-logo { height: 38px; transition: opacity var(--duration-fast) ease; }
.nav-logo:hover { opacity: 0.8; }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  transition: all var(--duration-fast) ease;
  font-size: 0.93rem;
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--duration-normal) var(--ease-out);
}
.nav-links a:hover { color: #FFFFFF; }
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  background: var(--primary) !important;
  color: #FFFFFF !important;
  padding: 8px 18px !important;
  border-radius: var(--radius) !important;
  font-weight: 700 !important;
}
.nav-cta:hover {
  background: var(--primary-hover) !important;
  box-shadow: var(--shadow-primary) !important;
}

/* ==========================================
   TOC Sidebar
   ========================================== */
.toc-sidebar { position: fixed; left: 24px; top: 50%; transform: translateY(-50%); z-index: 900; }
.toc-line { position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: rgba(100,116,139,0.2); z-index: 1; border-radius: 1px; }
.toc-light-mode .toc-line { background: rgba(0,0,0,0.1); }
.toc-sidebar:not(.toc-light-mode) .toc-line { background: rgba(255,255,255,0.1); }
.toc-list { list-style: none; position: relative; z-index: 2; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 22px; }
.toc-link {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(100,116,139,0.7);
  text-decoration: none;
  transition: all var(--duration-normal) ease;
  letter-spacing: 0.03em;
  text-shadow: 0 0 8px rgba(255,255,255,0.6);
}
.toc-light-mode .toc-link { color: rgba(60,70,90,0.6); text-shadow: none; }
.toc-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #94A3B8;
  border: 3px solid var(--white);
  transition: all var(--duration-normal) var(--ease-bounce);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.12), 0 1px 4px rgba(0,0,0,0.1);
}
.toc-sidebar:not(.toc-light-mode) .toc-dot { background: #64748B; border-color: var(--dark); box-shadow: 0 0 0 1px rgba(255,255,255,0.2), 0 1px 4px rgba(0,0,0,0.2); }
.toc-link.active { color: var(--primary); text-shadow: none; }
.toc-light-mode .toc-link.active { color: var(--primary); }
.toc-link.active .toc-dot { background: var(--primary); border-color: var(--white); transform: scale(1.4); box-shadow: 0 0 0 1px var(--primary), 0 0 8px rgba(217,83,0,0.3); }
.toc-sidebar:not(.toc-light-mode) .toc-link.active .toc-dot { border-color: var(--dark); }

/* ==========================================
   Global Sections & Layout
   ========================================== */
.section { padding: 90px 0; }
.section-dark { background: var(--dark-grad); color: var(--white); }
.bg-light { background: var(--light); }
.section-title {
  font-size: 2.6rem;
  font-weight: 800;
  color: inherit;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.section:not(.section-dark) .section-title { color: var(--text-main); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }

/* [優化 #10] Section 間連結語句 */
.section-bridge {
  text-align: center;
  padding: 30px 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
  position: relative;
}
.section-bridge::before {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--gold);
  margin: 0 auto 15px;
  border-radius: 1px;
}

/* ==========================================
   [優化 #5] Hero Section — 強化轉化引擎
   ========================================== */
.hero {
  position: relative;
  padding: 130px 0 90px;
  text-align: center;
  overflow: hidden;
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 30%, rgba(184,148,30,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(217,83,0,0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}
.hero-content { position: relative; z-index: 2; }
.badge-premium {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border: 1px solid rgba(184,148,30,0.4);
  color: var(--gold-light);
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 28px;
  letter-spacing: 1.5px;
  background: rgba(184,148,30,0.06);
  backdrop-filter: blur(4px);
}
.main-title {
  font-size: 4.2rem;
  line-height: 1.18;
  font-weight: 900;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #FFFFFF 0%, #E2E8F0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sub-title {
  font-size: 1.45rem;
  color: #CBD5E1;
  margin-bottom: 24px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.hero-desc {
  font-size: 1.05rem;
  color: var(--text-light-muted);
  margin-bottom: 40px;
  line-height: 1.85;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.hero-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.hero-actions .btn-outline { border-color: rgba(255,255,255,0.25); color: var(--white); }
.hero-actions .btn-outline:hover { background: rgba(255,255,255,0.1); color: var(--white); border-color: rgba(255,255,255,0.4); }

/* [優化 #5] Hero 數據統計條 */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 50px;
  position: relative;
  z-index: 2;
  padding: 28px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.hero-stat {
  text-align: center;
}
.hero-stat-number {
  font-family: 'Noto Serif TC', serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 6px;
}
.hero-stat-label {
  font-size: 0.82rem;
  color: var(--text-light-muted);
  letter-spacing: 0.05em;
}

.trust-banner {
  margin-top: 50px;
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 28px;
}
.trust-text {
  color: var(--text-light-muted);
  font-size: 0.85rem;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 500;
}
.trust-logos {
  display: flex;
  justify-content: center;
  gap: 24px;
  color: #94A3B8;
  font-weight: 600;
  flex-wrap: wrap;
  font-size: 0.95rem;
}
.dot-separator { width: 4px; height: 4px; background: var(--gold); border-radius: 50%; align-self: center; }

/* ==========================================
   [優化 #11] Benefits — 數據驅動視覺卡
   ========================================== */
.benefit-card {
  background: var(--surface);
  padding: 36px 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-out);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.benefit-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--primary) 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-slow) var(--ease-out);
}
.benefit-card:hover::before { transform: scaleX(1); }
.benefit-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--gold); }
.benefit-icon { width: 48px; height: 48px; color: var(--primary); margin-bottom: 20px; }
.benefit-card h3 { font-size: 1.25rem; margin-bottom: 14px; color: var(--text-main); font-weight: 800; line-height: 1.4; }
.benefit-highlight {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
  font-size: 1.8rem;
  padding: 4px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-family: 'Noto Serif TC', serif;
}
.visual-timeline {
  font-size: 0.83rem;
  background: var(--border-light);
  padding: 12px 16px;
  border-radius: 8px;
  display: inline-block;
  color: var(--text-muted);
  font-weight: 500;
}
.timeline-step.highlight { color: var(--primary); font-weight: 700; }

/* Steps */
.step-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.step-card {
  background: var(--surface);
  padding: 32px 24px;
  border-radius: var(--radius-lg);
  text-align: center;
  border-top: 4px solid var(--primary);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-out);
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step-number { font-size: 2.8rem; color: var(--primary); line-height: 1; margin-bottom: 14px; opacity: 0.15; }
.step-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; color: var(--text-main); }
.step-desc { color: var(--text-muted); font-size: 0.93rem; line-height: 1.6; }

/* ==========================================
   [優化 #6] Pricing — 強化視覺錨定
   ========================================== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 28px;
  max-width: 920px;
  margin: 0 auto;
  align-items: stretch;
}
.pricing-card {
  background: var(--surface);
  padding: 40px 36px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all var(--duration-normal) var(--ease-out);
}
.pricing-card:hover { box-shadow: var(--shadow-lg); }
.pricing-card.premium-card {
  border: 2px solid var(--gold);
  transform: scale(1.04);
  box-shadow: var(--shadow-xl), var(--shadow-gold);
  background: var(--dark-grad);
  color: #FFFFFF;
}
.pricing-card.premium-card:hover { transform: scale(1.06); }
/* 深色卡內所有文字強制提亮 */
.pricing-card.premium-card .plan-desc { color: rgba(255,255,255,0.75); font-size: 1rem; line-height: 1.7; }
.pricing-card.premium-card .price-anchor { color: rgba(255,255,255,0.6); font-size: 0.95rem; }
.pricing-card.premium-card .plan-price { color: #FFFFFF; font-size: 4rem; }

.premium-badge {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--dark);
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 800;
  display: inline-block;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}
.plan-name { font-size: 1.75rem; font-weight: 800; margin-bottom: 10px; color: var(--text-main); }
/* [#2] 深色卡標題強制覆寫 — 解決 specificity 問題 */
.pricing-card.premium-card .plan-name { color: var(--gold-light) !important; font-size: 2rem; }
.plan-desc { font-size: 0.93rem; margin-bottom: 16px; line-height: 1.6; }

/* [#1] B2B 搬移後的低調文字連結按鈕 */
.b2b-footer-link { padding-bottom: 20px; }
.btn-b2b-subtle {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all var(--duration-fast) ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-b2b-subtle:hover { background: var(--primary-soft); text-decoration: underline; }

/* [新優化 #17] 零風險保障條 */
.guarantee-strip {
  background: linear-gradient(135deg, #FEF9E7 0%, #FFFBEB 100%);
  border-top: 1px solid rgba(184,148,30,0.15);
  border-bottom: 1px solid rgba(184,148,30,0.15);
  padding: 20px 0;
}
.guarantee-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 700px;
  margin: 0 auto;
  text-align: left;
}
.guarantee-icon {
  flex-shrink: 0;
  color: var(--gold);
  width: 48px;
  height: 48px;
  background: rgba(184,148,30,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.guarantee-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.guarantee-text strong {
  color: var(--text-main);
}

/* [新優化 #19] Mobile hamburger menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background var(--duration-fast) ease;
}
.mobile-menu-btn:hover { background: var(--border-light); }

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) ease;
}
.mobile-menu-overlay.show { opacity: 1; pointer-events: auto; }

.mobile-menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100vh;
  background: var(--surface);
  box-shadow: var(--shadow-xl);
  transform: translateX(100%);
  transition: transform var(--duration-normal) var(--ease-out);
  padding: 24px;
  z-index: 2001;
  display: flex;
  flex-direction: column;
}
.mobile-menu-overlay.show .mobile-menu-panel { transform: translateX(0); }

.mobile-menu-close {
  align-self: flex-end;
  background: var(--border-light);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  margin-bottom: 24px;
  transition: all var(--duration-fast) ease;
}
.mobile-menu-close:hover { background: var(--border); color: var(--primary); }

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mobile-menu-link {
  display: block;
  padding: 16px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-light);
  transition: color var(--duration-fast) ease;
}
.mobile-menu-link:hover { color: var(--primary); }

/* [新優化 #20] Final CTA Section */
.final-cta-section {
  padding: 70px 0;
  background: linear-gradient(160deg, #0A192F 0%, #162B4A 50%, #1A2F52 100%);
  position: relative;
  overflow: hidden;
}
.final-cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(184,148,30,0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* [新優化 #23] Persona Cards */
.persona-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.persona-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  transition: all var(--duration-normal) var(--ease-out);
}
.persona-card:hover { border-color: var(--gold); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.persona-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  transition: all var(--duration-normal) ease;
}
.persona-card:hover .persona-icon { background: var(--primary); color: var(--white); }
.persona-title { font-size: 1.05rem; font-weight: 700; color: var(--text-main); margin-bottom: 10px; }
.persona-desc { font-size: 0.88rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 14px; }
.persona-rec {
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: var(--border-light);
  padding: 6px 12px;
  border-radius: 6px;
  display: inline-block;
}

/* [新優化 #31] Testi-result icon prefix (replaces emoji) */
.testi-result {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  margin-bottom: 14px;
}
.testi-result::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background: var(--primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M22 11.08V12a10 10 0 11-5.93-9.14' fill='none' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M22 4L12 14.01l-3-3.01' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M22 11.08V12a10 10 0 11-5.93-9.14' fill='none' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M22 4L12 14.01l-3-3.01' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat;
  flex-shrink: 0;
}

/* [新優化 #32] Persona icon style for usecase-icon */
.usecase-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--gold-soft);
  color: var(--gold);
  flex-shrink: 0;
}

/* [新優化 #33] Navbar CTA button (desktop only) */
.nav-cta {
  background: var(--primary);
  color: var(--white) !important;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  transition: all var(--duration-fast) ease;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-primary); }

/* [新優化 #34] Popular choice badge animation */
.popular-choice-badge {
  position: absolute;
  top: -1px;
  right: 20px;
  background: linear-gradient(135deg, var(--primary) 0%, #E06A20 100%);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px 8px;
  border-radius: 0 0 10px 10px;
  z-index: 2;
  letter-spacing: 0.03em;
  animation: badgePulse 3s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 2px 10px rgba(217,83,0,0.2); }
  50% { box-shadow: 0 2px 20px rgba(217,83,0,0.45); }
}

/* [新優化 #35] Premium card subtle animated glow border */
.pricing-card.premium-card::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--gold), transparent, var(--gold));
  background-size: 200% 200%;
  animation: glowShift 4s ease-in-out infinite;
  z-index: -1;
  opacity: 0.4;
}
@keyframes glowShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* [新優化 #26] Testimonial aggregate rating */
.testi-aggregate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.testi-agg-score {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1;
}
.testi-agg-stars { display: flex; gap: 3px; }
.testi-agg-stars .testi-star { width: 20px; height: 20px; }
.testi-agg-count { font-size: 0.88rem; }

/* [新優化 #27] Inline mid-page CTA banner */
.inline-cta-banner {
  background: var(--dark-grad);
  padding: 28px 0;
  border-top: 1px solid rgba(184,148,30,0.15);
  border-bottom: 1px solid rgba(184,148,30,0.15);
}
.inline-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}
.inline-cta-text { flex: 1; }
.inline-cta-actions { flex-shrink: 0; }

/* [新優化 #28] Footer grid */
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.footer-col-title {
  color: var(--gold-light);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 16px;
  letter-spacing: 0.03em;
}
.footer-link {
  display: block;
  color: rgba(255,255,255,0.55);
  font-size: 0.85rem;
  padding: 5px 0;
  transition: color var(--duration-fast) ease;
}
.footer-link:hover { color: var(--white); }
.footer-contact { font-size: 0.85rem; margin-bottom: 4px; }
.footer-bottom { text-align: center; }

/* [新優化 #30] Sticky bar social proof */
.sticky-social-proof {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
}
.sticky-social-proof strong {
  color: var(--gold-light);
  font-weight: 800;
  font-size: 1rem;
}
.sticky-divider {
  color: rgba(255,255,255,0.2);
  margin: 0 12px;
}

/* [新優化 #35b] Domain category chips */
.domain-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  max-width: 800px;
  margin: 0 auto;
}
.domain-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--duration-normal) var(--ease-out);
  cursor: default;
}
.domain-chip:hover {
  border-color: var(--gold);
  color: var(--text-main);
  background: var(--gold-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.domain-chip-icon {
  width: 18px;
  height: 18px;
  color: var(--gold);
  flex-shrink: 0;
}
.domain-chip:hover .domain-chip-icon { color: var(--primary); }

/* [新優化 #24b] Use-case cards */
.usecase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.usecase-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: all var(--duration-normal) var(--ease-out);
}
.usecase-card:hover { border-color: var(--gold); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.usecase-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.usecase-icon { font-size: 1.6rem; }
.usecase-title { font-size: 1.05rem; font-weight: 700; color: var(--text-main); }
.usecase-scenario { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px dashed var(--border); }
.usecase-who { font-size: 0.82rem; color: var(--gold); font-weight: 700; margin-bottom: 6px; }
.usecase-how { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }
.usecase-result { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }
.usecase-result-label { font-weight: 700; color: var(--primary); }

/* [新優化 #22] Comparison Table */
.compare-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 0.95rem;
}
.compare-table thead { background: var(--border-light); }
.compare-table th {
  padding: 18px 20px;
  text-align: center;
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 2px solid var(--border);
}
.compare-feature-col { text-align: left !important; width: 35%; }
.compare-single-col { width: 30%; }
.compare-ticket-col { width: 35%; background: rgba(184,148,30,0.04); }
.compare-header-label { font-size: 1rem; }
.compare-recommended {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.compare-rec-badge {
  background: var(--primary);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}
.compare-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table tbody tr:hover { background: rgba(184,148,30,0.02); }
.compare-single { text-align: center; color: var(--text-muted); }
.compare-ticket {
  text-align: center;
  color: var(--primary);
  background: rgba(184,148,30,0.04);
  font-weight: 600;
}
.compare-ticket strong { color: var(--primary); font-weight: 800; }
.price-anchor { font-size: 0.93rem; }
.plan-price { font-size: 3.6rem; font-weight: 900; line-height: 1; margin: 12px 0; letter-spacing: -0.02em; }
.currency { font-size: 1.4rem; vertical-align: top; margin-right: 4px; opacity: 0.7; }
.daily-cost { font-size: 0.95rem; margin-bottom: 16px; font-weight: 600; }
.pricing-card.premium-card .daily-cost { font-size: 1.05rem; font-weight: 700; letter-spacing: 0.02em; }

/* [優化 #6] 省多少標籤 */
.savings-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(184,148,30,0.12);
  color: var(--gold-light);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 16px;
}
/* 深色卡內 savings-badge 加強 */
.pricing-card.premium-card .savings-badge {
  background: rgba(184,148,30,0.25);
  color: #FFFFFF;
  font-size: 0.95rem;
  padding: 8px 18px;
  border: 1px solid rgba(184,148,30,0.4);
}

.plan-features { list-style: none; margin: 24px 0; flex-grow: 1; border-top: 1px solid var(--border); padding-top: 20px; }
.plan-features li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.93rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}
.plan-features li::before { content: '✓'; color: var(--primary); font-weight: 700; font-size: 1rem; }
.border-light { border-color: rgba(255,255,255,0.08) !important; }
.pricing-card.premium-card .plan-features li::before { color: var(--gold-light); }
.pricing-card.premium-card .plan-features li { color: rgba(255,255,255,0.95); font-size: 0.95rem; }

.quota-bar-container {
  background: rgba(255,255,255,0.08);
  padding: 16px;
  border-radius: 10px;
  margin: 16px 0;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.1);
}
.quota-text { font-size: 0.9rem; margin-bottom: 8px; color: rgba(255,255,255,0.8); }
.quota-bar { height: 8px; background: rgba(255,255,255,0.15); border-radius: 4px; overflow: hidden; }
.quota-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
  transition: width 1.2s var(--ease-out);
  border-radius: 3px;
}

/* [優化 #8] 信任徽章 */
.risk-reversal {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  margin-top: 20px;
  color: rgba(255,255,255,0.85);
}
.risk-reversal span {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.08);
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
}

/* ==========================================
   [優化 #12] Instructors — 強化權威感
   ========================================== */
.instructor-marquee-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  white-space: nowrap;
  padding: 20px 0;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.instructor-track {
  display: inline-flex;
  gap: 24px;
  animation: marquee 180s linear infinite;
  min-width: max-content;
}
.instructor-track:hover { animation-play-state: paused; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.instructor-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  padding: 12px 24px 12px 12px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all var(--duration-fast) ease;
}
.instructor-pill:hover { box-shadow: var(--shadow-md); border-color: var(--gold); }
.inst-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-light);
}
.inst-info { text-align: left; }
.inst-name { font-weight: 700; color: var(--text-main); font-size: 0.95rem; }
.inst-title { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; }

/* ==========================================
   [優化 #4] Testimonials — 真實感升級
   ========================================== */
.testi-slider-wrapper { position: relative; padding: 0 50px; }
.testi-slider-container { overflow: hidden; }
.testi-slider {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
  padding: 20px 5px;
  cursor: grab;
}
.testi-slider::-webkit-scrollbar { display: none; }

.testi-card {
  min-width: 340px;
  max-width: 370px;
  background: var(--surface);
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  user-select: none;
  border: 1px solid var(--border);
  transition: all var(--duration-normal) var(--ease-out);
  display: flex;
  flex-direction: column;
}
.testi-card:hover { box-shadow: var(--shadow-md); border-color: var(--gold); }

/* [優化 #4] 星等評分 */
.testi-rating {
  display: flex;
  gap: 3px;
  margin-bottom: 14px;
}
.testi-star {
  width: 16px;
  height: 16px;
  color: var(--gold);
}

.testi-quote {
  font-style: normal;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.75;
  font-size: 0.95rem;
  flex-grow: 1;
  position: relative;
  padding-left: 16px;
  border-left: 3px solid var(--border);
}
.testi-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--border-light);
  padding-top: 16px;
}
.testi-avatar {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary) 0%, #E06A20 100%);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.testi-author { font-weight: 700; color: var(--text-main); font-size: 0.95rem; }
.testi-title { font-size: 0.82rem; color: var(--text-muted); }

/* [優化 #4] 使用日期 */
.testi-date {
  font-size: 0.75rem;
  color: var(--text-light-muted);
  margin-top: 4px;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  font-weight: bold;
  color: var(--primary);
  transition: all var(--duration-fast) ease;
  font-size: 0.9rem;
}
.slider-btn:hover { background: var(--primary); color: var(--white); box-shadow: var(--shadow-md); }
.slider-btn.prev { left: 0; }
.slider-btn.next { right: 0; }

/* ==========================================
   Catalog (Search, Filters, Skeleton)
   ========================================== */
.catalog-hero { text-align: center; }
.mega-search-wrapper { position: relative; width: 100%; margin: 0 auto 20px; max-width: 800px; }
.mega-search-icon { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); width: 20px; color: #94A3B8; }
.mega-search-input {
  width: 100%;
  padding: 18px 22px 18px 55px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--dark-border);
  background: var(--dark-surface);
  color: var(--white);
  font-size: 1.05rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  outline: none;
  transition: all var(--duration-normal) ease;
  font-family: inherit;
}
.mega-search-input:focus { background: rgba(255,255,255,0.08); border-color: var(--gold); box-shadow: 0 4px 20px rgba(0,0,0,0.15), 0 0 0 3px rgba(184,148,30,0.15); }
.mega-search-input::placeholder { color: rgba(255,255,255,0.4); }

.keyword-pills-container { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.keyword-pill {
  background: transparent;
  border: 1px solid var(--dark-border);
  color: var(--text-light-muted);
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  font-size: 0.88rem;
  font-weight: 500;
}
.keyword-pill:hover { border-color: var(--gold); color: var(--gold-light); background: rgba(184,148,30,0.06); }

.category-pills-container {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: none;
  justify-content: center;
}
.category-pills-container::-webkit-scrollbar { display: none; }
.category-pill {
  background: var(--dark-surface);
  color: rgba(255,255,255,0.7);
  border: 1px solid var(--dark-border);
  padding: 8px 22px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  transition: all var(--duration-fast) ease;
  white-space: nowrap;
  font-size: 0.9rem;
}
.category-pill:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); }
.category-pill.active { background: var(--gold); color: var(--dark); border-color: var(--gold); font-weight: 700; }
.cat-count {
  background: rgba(0,0,0,0.2);
  color: rgba(255,255,255,0.8);
  padding: 2px 9px;
  border-radius: 12px;
  font-size: 0.78rem;
}
.category-pill.active .cat-count { background: rgba(0,0,0,0.15); color: var(--dark); }

.skeleton-cards-flex { display: flex; gap: 20px; overflow: hidden; margin-top: 20px; padding: 10px; justify-content: center; }
.skeleton-card {
  min-width: 320px;
  height: 380px;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s infinite;
}
@keyframes skeletonLoading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ==========================================
   Course Cards & Grids
   ========================================== */
.course-grid-view { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; margin-top: 20px; }
.category-row-wrapper { margin-bottom: 48px; position: relative; }
.category-row-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 20px;
  padding-left: 14px;
  border-left: 4px solid var(--gold);
  letter-spacing: 0.01em;
}
.slider-container { position: relative; }
.course-slider {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
  padding: 10px 5px 30px;
  cursor: grab;
}
.course-slider::-webkit-scrollbar { display: none; }

.course-card {
  min-width: 310px;
  max-width: 310px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  text-align: left;
  position: relative;
}
.course-grid-view .course-card { min-width: auto; max-width: none; }
.course-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--gold); }

.course-img-wrapper { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--dark); }
.course-img-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 25, 47, 0.35);
  z-index: 1;
  pointer-events: none;
}
.course-img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--duration-slow) var(--ease-out); }
.course-card:hover .course-img { transform: scale(1.06); }
.course-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(10, 25, 47, 0.85);
  color: var(--gold-light);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 2;
  letter-spacing: 0.03em;
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
}
.course-hover-info {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10,25,47,0.92) 0%, rgba(10,25,47,0.6) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 20px 16px;
  opacity: 0;
  transition: opacity var(--duration-normal) ease;
  z-index: 2;
  text-align: center;
}
.course-card:hover .course-hover-info { opacity: 1; }
.hover-desc {
  color: rgba(255,255,255,0.95);
  font-size: 0.85rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.55;
  margin-bottom: 8px;
}
.hover-cta {
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.course-content { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.course-cat { color: var(--gold); font-size: 0.82rem; font-weight: 700; margin-bottom: 8px; letter-spacing: 0.03em; }
.course-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.course-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.ui-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--border-light);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 500;
}
.ui-tag svg { width: 13px; height: 13px; }
.course-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
  margin-bottom: 16px;
  margin-top: auto;
}
.course-id { font-size: 0.78rem; color: var(--text-light-muted); }
.course-original-price { font-size: 0.83rem; color: var(--text-muted); text-decoration: line-through; text-align: right; margin-bottom: 2px; }
.course-ticket-price { color: var(--gold); font-weight: 600; font-size: 0.85rem; opacity: 0.85; }
.btn-add-wish {
  width: 100%;
  padding: 12px;
  background: var(--border-light);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  text-align: center;
  font-size: 0.9rem;
  font-family: inherit;
}
.btn-add-wish:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }
.btn-add-wish.selected { background: var(--primary); color: var(--white); border-color: var(--primary); }

.see-more-card {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--dark-surface);
  border: 1px dashed var(--dark-border);
  transition: all var(--duration-fast) ease;
}
.see-more-card:hover { background: rgba(255,255,255,0.06); border-style: solid; border-color: var(--gold); }

/* ==========================================
   [優化 #13] FAQ — 優化掃讀性
   ========================================== */
.faq-accordion-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 36px; }
.faq-accordion-col { display: flex; flex-direction: column; gap: 14px; }
.faq-accordion { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
}
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 20px 22px;
  font-size: 1rem;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--duration-fast) ease;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.5;
}
.faq-question:hover { color: var(--primary); background: var(--border-light); }
.faq-icon {
  width: 22px;
  height: 22px;
  transition: transform var(--duration-normal) var(--ease-out);
  color: var(--primary);
  flex-shrink: 0;
  margin-left: 12px;
}
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; }
.faq-answer-inner { padding: 0 22px 22px; color: var(--text-muted); line-height: 1.75; font-size: 0.93rem; }
.faq-item.active { box-shadow: var(--shadow-sm); border-color: var(--primary); }
.faq-item.active .faq-answer { max-height: 500px; }
.faq-item.active .faq-icon { transform: rotate(180deg); }

/* ==========================================
   Modals (Global, Quick View, Exit, B2B)
   ========================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) ease;
}
.modal-overlay.show { opacity: 1; pointer-events: auto; }
.modal-content {
  background: var(--surface);
  width: 90%;
  max-width: 900px;
  border-radius: var(--radius-xl);
  position: relative;
  padding: 40px;
  transform: translateY(20px) scale(0.98);
  transition: all var(--duration-normal) var(--ease-out);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}
.modal-overlay.show .modal-content { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--border-light);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  color: var(--text-muted);
  z-index: 10;
}
.modal-close:hover { background: var(--border); color: var(--primary); transform: rotate(90deg); }

/* Quick View */
.quick-view-content { padding: 32px; }
.qv-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 30px; }
.qv-image-box { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; background: var(--dark); }
.qv-img { width: 100%; height: 100%; object-fit: cover; }
.qv-img-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,0.35) 0%, transparent 50%); }
.qv-badge { position: absolute; top: 14px; left: 14px; background: linear-gradient(135deg, var(--primary), #E06A20); color: var(--white); padding: 5px 14px; border-radius: 6px; font-weight: 700; font-size: 0.82rem; z-index: 2; }
.qv-category { color: var(--gold); font-weight: 700; margin-bottom: 8px; font-size: 0.9rem; letter-spacing: 0.03em; }
.qv-title { font-size: 1.5rem; font-weight: 800; color: var(--text-main); margin-bottom: 14px; line-height: 1.4; }
.qv-tags { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.qv-teaser-box {
  background: var(--border-light);
  padding: 20px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.qv-benefit { font-size: 0.93rem; margin-bottom: 10px; line-height: 1.6; }
.qv-locked-content { position: relative; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.locked-blur { height: 40px; background: linear-gradient(180deg, transparent 0%, var(--border-light) 100%); position: absolute; bottom: 0; left: 0; right: 0; }
.locked-message { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--primary); font-weight: 600; font-size: 0.88rem; text-align: center; position: relative; z-index: 2; }
.qv-price-box { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 14px; border-bottom: 1px solid var(--border-light); padding-bottom: 14px; }
.qv-original-price { font-size: 0.88rem; color: var(--text-muted); }
.qv-ticket-action { font-size: 1.05rem; }

/* [優化 #3] Exit Intent — 改為底部 slide-up，非阻斷式 */
.exit-intent-content {
  max-width: 520px;
  background: var(--surface);
  padding: 44px 36px;
  border-radius: var(--radius-xl);
  text-align: center;
}
.exit-category-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.exit-cat-btn {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  font-size: 0.88rem;
}
.exit-cat-btn:hover { background: var(--primary); color: var(--white); }
.exit-cta-btn {
  background: linear-gradient(135deg, var(--primary), #E06A20) !important;
  color: var(--white) !important;
  border: none !important;
}

/* B2B Form Modal */
.form-group { margin-bottom: 16px; text-align: left; }
.form-label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.93rem; color: var(--text-secondary); }
.form-input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  transition: all var(--duration-fast) ease;
  background: var(--surface);
  color: var(--text-main);
}
.form-input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }

/* ==========================================
   Wishlist Panel & Mobile Cart
   ========================================== */
.mobile-cart-fab {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 58px;
  height: 58px;
  background: var(--dark);
  color: var(--gold);
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  border: none;
  z-index: 1000;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}
.mobile-cart-fab:hover { transform: scale(1.08); }
.mobile-cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--primary);
  color: var(--white);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: transform var(--duration-fast) var(--ease-bounce);
}

.wishlist-panel {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 380px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 1500;
  transform: translateY(150%);
  transition: transform 0.4s var(--ease-bounce);
  overflow: hidden;
  border: 1px solid var(--border);
}
.wishlist-panel.show { transform: translateY(0); }
.wishlist-panel.shake-cart { animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes shake { 10%, 90% { transform: translate3d(-1px, 0, 0); } 20%, 80% { transform: translate3d(2px, 0, 0); } 30%, 50%, 70% { transform: translate3d(-4px, 0, 0); } 40%, 60% { transform: translate3d(4px, 0, 0); } }

.wishlist-header {
  background: var(--dark-grad);
  color: var(--gold-light);
  padding: 16px 22px;
  font-size: 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}
.close-panel-btn { background: none; border: none; color: var(--white); cursor: pointer; display: flex; align-items: center; transition: opacity var(--duration-fast) ease; }
.close-panel-btn:hover { opacity: 0.7; }
.wishlist-progress-container { padding: 14px 22px; background: var(--border-light); border-bottom: 1px solid var(--border); }
.wishlist-progress-text { font-size: 0.88rem; color: var(--text-main); margin-bottom: 10px; font-weight: 600; }
.wishlist-progress-bar { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.wishlist-progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-light)); width: 0%; transition: width 0.5s var(--ease-out); border-radius: 4px; }
.wishlist-body { padding: 20px 22px; }
.receipt-box { border: 1px dashed var(--border); border-radius: 10px; padding: 16px; background: var(--border-light); }
.roi-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 0.93rem; }
.roi-divider { height: 1px; background: var(--border); margin: 10px 0; }

/* ==========================================
   [優化 #14] Sticky CTA — 倒數 + 智能文案
   ========================================== */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(10, 25, 47, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(184,148,30,0.2);
  padding: 14px 0;
  transform: translateY(100%);
  transition: transform 0.4s var(--ease-out);
  z-index: 1000;
  box-shadow: 0 -4px 30px rgba(0,0,0,0.25);
}
.sticky-cta.visible { transform: translateY(0); }
.sticky-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  color: var(--white);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.countdown-area { font-size: 1.05rem; font-weight: 500; }
.countdown-area span:not(.text-gold):not(.mr-10) {
  display: inline-block;
  min-width: 28px;
  text-align: center;
  background: rgba(255,255,255,0.08);
  border-radius: 5px;
  padding: 3px 7px;
  font-weight: 700;
  font-size: 1rem;
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--dark);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-md);
  transform: scale(0);
  transition: all var(--duration-normal) var(--ease-bounce);
  z-index: 800;
}
.back-to-top.show { transform: scale(1); }
.back-to-top:hover { background: var(--primary); transform: scale(1.1); }

/* [優化 #3] Social Proof — 非侵入式 toast */
.social-proof-container {
  position: fixed;
  bottom: 100px;
  left: 28px;
  background: var(--surface);
  border-radius: var(--radius-pill);
  padding: 10px 20px 10px 10px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 999;
  transform: translateX(-120%);
  opacity: 0;
  transition: all 0.5s var(--ease-out);
  border: 1px solid var(--border);
  pointer-events: none;
  max-width: 360px;
}
.social-proof-container.show { transform: translateX(0); opacity: 1; }
.sp-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.sp-text { text-align: left; }
.sp-name { font-weight: 700; font-size: 0.88rem; color: var(--text-main); }
.sp-action { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; }
/* [優化 #3] Toast 進度條 */
.sp-timer-bar {
  position: absolute;
  bottom: 0;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  overflow: hidden;
}
.sp-timer-fill {
  height: 100%;
  background: var(--primary);
  width: 100%;
  animation: spTimerShrink 5s linear forwards;
}
@keyframes spTimerShrink { from { width: 100%; } to { width: 0%; } }

.footer { border-top: 1px solid rgba(255,255,255,0.04); }

/* [優化 #8] Trust Badge Bar (footer 上方) */
.trust-badge-bar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 24px 20px;
  text-align: center;
}
.trust-badge-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  max-width: 800px;
  margin: 0 auto;
}
.trust-badge-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
}
.trust-badge-item svg { width: 18px; height: 18px; color: var(--gold); flex-shrink: 0; }

/* ==========================================
   [優化 #9] Responsive Design — Mobile-first 強化
   ========================================== */
@media (max-width: 1200px) {
  .toc-sidebar { display: none; }
  .wishlist-panel { right: 20px; }
}

@media (max-width: 992px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 480px; }
  .pricing-card.premium-card { transform: scale(1); }
  .pricing-card.premium-card:hover { transform: scale(1.01); }
  .hero { padding: 100px 20px 60px; min-height: auto; }
  .main-title { font-size: 3rem; }
  .sub-title { font-size: 1.15rem; }
  .hero-stats { gap: 28px; flex-wrap: wrap; }
  .hero-stat-number { font-size: 1.8rem; }
  .qv-layout { grid-template-columns: 1fr; gap: 20px; }
  .faq-accordion-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 2.1rem; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 340px; margin: 0 !important; }
  .trust-logos { flex-direction: column; gap: 8px; }
  .dot-separator { display: none; }
  .step-grid { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .testi-slider-wrapper { padding: 0; }
  .testi-card { min-width: 280px; max-width: 300px; }
  .sticky-container { flex-direction: column; gap: 8px; text-align: center; }
  .countdown-area { font-size: 0.95rem; }

  .wishlist-panel { width: 100%; right: 0; bottom: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; z-index: 2000; }
  .wishlist-panel.show { transform: translateY(150%); }
  .wishlist-panel.show-mobile { transform: translateY(0); }
  .mobile-cart-fab { display: flex; }
  .back-to-top { right: 20px; bottom: 150px; }
  .social-proof-container { left: 12px; bottom: 80px; padding: 8px 14px 8px 8px; max-width: 300px; }
  .sp-avatar { width: 32px; height: 32px; }
  .mega-search-input { font-size: 1rem; padding-left: 44px; }
  .mega-search-icon { left: 16px; }

  .modal-content { padding: 28px 20px; }
  .section { padding: 60px 0; }
  .section-title { font-size: 1.9rem; }
  .main-title { font-size: 2.5rem; }
  .hero-stats { gap: 20px; }
  .hero-stat-number { font-size: 1.5rem; }
  .trust-badge-inner { gap: 20px; }
  .trust-badge-item { font-size: 0.78rem; }
  .faq-accordion-grid { grid-template-columns: 1fr; }

  .exit-intent-content { padding: 32px 24px; }
  .step-grid { grid-template-columns: 1fr; }
  .guarantee-inner { flex-direction: column; text-align: center; gap: 10px; }
  .guarantee-text { font-size: 0.85rem; }
  .final-cta-section { padding: 50px 0; }
  .final-cta-section h2 { font-size: 1.7rem !important; }
  .final-cta-section .btn { width: 100%; max-width: 340px; }
  .compare-table { font-size: 0.85rem; }
  .compare-table th, .compare-table td { padding: 12px 10px; }
  .compare-feature-col { width: 30%; }
  .persona-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .persona-card { padding: 22px 18px; }
  .persona-icon { font-size: 1.8rem; }
  .inline-cta-inner { flex-direction: column; text-align: center; gap: 14px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .sticky-social-proof { display: none; }
  .sticky-divider { display: none; }
  .usecase-grid { grid-template-columns: 1fr; }
  .usecase-card { padding: 22px 18px; }
  .popular-choice-badge { font-size: 0.72rem; padding: 5px 10px 6px; right: 14px; }
  .testi-aggregate { gap: 8px; }
  .testi-agg-score { font-size: 2rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero { padding: 80px 16px 50px; }
  .main-title { font-size: 2.1rem; }
  .sub-title { font-size: 1.05rem; }
  .hero-desc { font-size: 0.95rem; }
  .section-title { font-size: 1.7rem; }
  .pricing-card { padding: 28px 20px; }
  .plan-price { font-size: 2.8rem; }
  .pricing-card.premium-card .plan-price { font-size: 3.2rem; }
  .pricing-card.premium-card .plan-name { font-size: 1.6rem !important; }
  .compare-table { font-size: 0.78rem; }
  .compare-table th, .compare-table td { padding: 10px 8px; }
  .compare-rec-badge { font-size: 0.65rem; padding: 2px 6px; }
  .guarantee-icon { width: 40px; height: 40px; }
  .guarantee-icon svg { width: 24px; height: 24px; }
  .mobile-menu-panel { width: 260px; }
  .savings-badge { font-size: 0.8rem; padding: 5px 12px; }
  .pricing-card.premium-card .savings-badge { font-size: 0.85rem; padding: 6px 14px; }
  .quota-text { font-size: 0.82rem; }
  .risk-reversal { flex-direction: column; align-items: center; gap: 8px; }
  .risk-reversal span { font-size: 0.75rem; }
  .b2b-footer-link p { font-size: 0.82rem; }
  .btn-b2b-subtle { font-size: 0.88rem; }
  .final-cta-section h2 { font-size: 1.5rem !important; }
  .final-cta-section p { font-size: 0.92rem !important; }
  .testi-card { min-width: 260px; max-width: 280px; padding: 24px; }
  .testi-quote { font-size: 0.88rem; }
  .testi-result { font-size: 0.78rem; }
  .benefit-highlight { font-size: 1.5rem; }
  .benefit-card h3 { font-size: 1.1rem; }
  .persona-grid { grid-template-columns: 1fr; }
  .persona-card { padding: 20px 16px; }
  .persona-desc { font-size: 0.82rem; }
  .persona-title { font-size: 0.95rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-col-title { font-size: 0.85rem; margin-bottom: 12px; }
  .footer-link { font-size: 0.82rem; padding: 4px 0; }
  .testi-agg-score { font-size: 2rem; }
  .testi-agg-stars .testi-star { width: 16px; height: 16px; }
  .usecase-card { padding: 20px 16px; }
  .usecase-title { font-size: 0.95rem; }
  .usecase-how, .usecase-result { font-size: 0.82rem; }
  .inline-cta-banner { padding: 22px 0; }
  .inline-cta-banner h3 { font-size: 1.2rem !important; }
  .inline-cta-banner p { font-size: 0.82rem !important; }
}

/* ==========================================
   [優化 #16] Micro-interactions — 全站打磨
   ========================================== */
/* Smooth section reveal */
[data-aos] { transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1) !important; }

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Selection color */
::selection {
  background: var(--primary-soft);
  color: var(--primary);
}

/* Scrollbar (for webkit) */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ==========================================
   DYNAMIC COURSE SPOTLIGHT HERO (新增)
   ========================================== */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  min-height: 60vh;
  position: relative;
  z-index: 2;
}
.hero-split-left { text-align: left; }
.course-pills { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.course-pill {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid rgba(184,148,30,0.5);
  color: var(--gold-light);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: rgba(184,148,30,0.08);
}
.course-price-compare {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.price-was {
  font-size: 0.95rem;
  color: var(--text-light-muted);
}
.price-was s { opacity: 0.7; }
.price-now {
  font-size: 1.15rem;
  color: var(--gold-light);
  font-weight: 700;
}
.price-now strong {
  font-size: 1.4rem;
  color: #FFFFFF;
  font-family: 'Noto Serif TC', serif;
}
.price-best {
  font-size: 1.15rem;
  color: var(--primary);
  font-weight: 700;
  background: rgba(217,83,0,0.12);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--primary);
}
.price-best strong {
  font-size: 1.4rem;
  font-family: 'Noto Serif TC', serif;
}
.hero-micro-text {
  font-size: 0.82rem;
  color: var(--text-light-muted);
  margin-top: 16px;
  letter-spacing: 0.02em;
}
.course-img-hero-wrapper {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.08);
  animation: heroImgFloat 6s ease-in-out infinite;
}
.course-img-hero-wrapper::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(from 0deg, transparent, var(--primary), var(--gold), transparent 60%);
  z-index: -1;
  animation: heroGlowSpin 8s linear infinite;
  opacity: 0.5;
}
.course-img-hero-wrapper::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(217,83,0,0.12) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
  animation: heroShimmer 5s ease-in-out infinite alternate;
}
@keyframes heroImgFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes heroGlowSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes heroShimmer {
  0% { opacity: 0.3; transform: translate(-5%, -5%) scale(1); }
  100% { opacity: 0.6; transform: translate(5%, 5%) scale(1.05); }
}
.course-img-hero {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1/1;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

@media (max-width: 992px) {
  .hero-split {
    grid-template-columns: 1fr;
    gap: 32px;
    min-height: auto;
  }
  .hero-split-right { order: -1; max-width: 400px; margin: 0 auto; }
  .hero-split-left { text-align: center; }
  .hero-split-left .hero-actions { justify-content: center !important; }
  .hero-split-left .hero-desc { text-align: center !important; margin-left: auto !important; }
  .hero-split-left .main-title { text-align: center !important; }
  .course-pills { justify-content: center; }
  .course-price-compare { justify-content: center; }
}

@media (max-width: 480px) {
  .hero-split-left .main-title { font-size: 2rem !important; }
}

/* ==========================================
   DYNAMIC COURSE DETAIL SECTIONS (新增)
   大綱 + 業師 + 價格對比
   ========================================== */
.course-detail-section { padding: 70px 0; background: var(--light); position: relative; }
.course-detail-block { max-width: 800px; margin: 0 auto 48px; }
.course-detail-block:last-child { margin-bottom: 0; }

/* Section headers with icon */
.detail-section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}
.detail-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.detail-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 4px;
}
.detail-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* 大綱列表 */
.outline-grid { display: flex; flex-direction: column; gap: 0; }
.outline-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  font-size: 1rem;
  color: var(--text-main);
  line-height: 1.6;
  transition: all var(--duration-fast) ease;
}
.outline-item:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.outline-item:last-child { border-bottom: 1px solid var(--border); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.outline-item:hover { background: var(--primary-soft); border-color: var(--primary); }
.outline-item:hover + .outline-item { border-top-color: var(--primary); }
.outline-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  margin-top: 1px;
}

/* 業師卡片 */
.course-instructor-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.inst-card-header { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.inst-card-avatar {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary) 0%, #E06A20 100%);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.inst-card-name { font-size: 1.15rem; font-weight: 700; color: var(--text-main); }
.inst-card-title { font-size: 0.88rem; color: var(--gold); font-weight: 600; margin-top: 2px; }
.inst-card-bio { font-size: 0.93rem; color: var(--text-muted); line-height: 1.75; }

/* 價格對比卡 */
.price-compare-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  background: var(--surface);
  border: 2px solid var(--gold);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.price-compare-side { flex: 1; }
.price-compare-label { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px; }
.price-compare-old {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-light-muted);
  text-decoration: line-through;
  font-family: 'Noto Serif TC', serif;
}
.price-compare-arrow { color: var(--gold); flex-shrink: 0; }
.price-compare-new {
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--primary);
  font-family: 'Noto Serif TC', serif;
  line-height: 1;
}
.price-compare-save {
  font-size: 0.88rem;
  color: var(--gold);
  font-weight: 700;
  margin-top: 8px;
}

@media (max-width: 768px) {
  .price-compare-card { flex-direction: column; gap: 16px; padding: 28px 20px; }
  .price-compare-old { font-size: 1.5rem; }
  .price-compare-new { font-size: 2rem; }
  .price-compare-arrow { transform: rotate(90deg); }
  .outline-item { padding: 14px 16px; font-size: 0.93rem; }
  .outline-num { width: 24px; height: 24px; font-size: 0.75rem; }
  .detail-title { font-size: 1.3rem !important; }
  .detail-section-header { gap: 12px; }
  .detail-icon { width: 40px; height: 40px; border-radius: 10px; }
  .course-detail-section { padding: 50px 0; }
  .course-detail-block { margin-bottom: 36px; }
}

/* 課程基本資訊列 */
.course-meta-bar {
  display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px;
  padding: 20px 24px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-xs);
}
.course-meta-item { display: flex; align-items: center; gap: 6px; font-size: 0.88rem; color: var(--text-secondary); font-weight: 500; }
.course-meta-item svg { color: var(--gold); flex-shrink: 0; }

/* 倒數計時器 */
.course-countdown {
  background: var(--dark-grad); border-radius: var(--radius-xl); padding: 28px 32px;
  text-align: center; margin-bottom: 32px; border: 1px solid rgba(184,148,30,0.2);
}
.countdown-label { color: var(--gold-light); font-size: 0.9rem; font-weight: 600; margin-bottom: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.countdown-label svg { color: var(--gold-light); }
.countdown-digits { display: flex; align-items: center; justify-content: center; gap: 8px; }
.cd-unit { text-align: center; }
.cd-num { display: block; font-family: 'Noto Serif TC', serif; font-size: 2.4rem; font-weight: 900; color: #FFFFFF; background: rgba(255,255,255,0.08); border-radius: 10px; padding: 8px 16px; min-width: 60px; border: 1px solid rgba(255,255,255,0.1); }
.cd-text { display: block; font-size: 0.75rem; color: var(--text-light-muted); margin-top: 4px; }
.cd-sep { font-size: 1.8rem; color: var(--gold); font-weight: 700; }
.countdown-note { color: var(--text-light-muted); font-size: 0.82rem; margin-top: 14px; }

/* 亮點標籤 */
.highlight-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.highlight-badge { display: inline-block; padding: 6px 16px; border: 1px solid var(--primary); color: var(--primary); background: var(--primary-soft); border-radius: var(--radius-pill); font-size: 0.85rem; font-weight: 600; }

/* 課程描述 */
.course-full-desc { margin-bottom: 40px; }
.desc-content { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; font-size: 0.95rem; color: var(--text-secondary); line-height: 1.85; box-shadow: var(--shadow-xs); }

/* 核心效益 */
.course-benefit-box { display: flex; gap: 16px; align-items: flex-start; padding: 24px; background: linear-gradient(135deg, #FEF9E7 0%, #FFFBEB 100%); border: 1px solid rgba(184,148,30,0.2); border-radius: var(--radius-lg); margin-bottom: 32px; }
.benefit-box-icon { color: var(--gold); flex-shrink: 0; margin-top: 2px; }
.benefit-box-content { flex: 1; }
.benefit-box-label { font-size: 0.82rem; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.benefit-box-content p { font-size: 0.93rem; color: var(--text-secondary); line-height: 1.75; margin: 0; }

/* 課程重點卡片 */
.highlights-grid { display: flex; flex-direction: column; gap: 16px; }
.highlight-card { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-xs); transition: all 0.3s ease; }
.highlight-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.highlight-card-num { flex-shrink: 0; width: 36px; height: 36px; background: linear-gradient(135deg, var(--primary) 0%, #E06A20 100%); color: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem; margin-top: 2px; }
.highlight-card-content { flex: 1; }
.highlight-card-title { font-size: 1.05rem; font-weight: 700; color: var(--text-main); line-height: 1.5; margin-bottom: 8px; }
.highlight-card-sub { display: block; font-weight: 400; color: var(--text-secondary); font-size: 0.95rem; margin-top: 2px; }
.highlight-card-desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.75; margin: 0; }

/* 業師照片 */
.inst-card-photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold-soft); flex-shrink: 0; }
.inst-card-company { font-size: 0.85rem; color: var(--gold); font-weight: 600; margin-top: 2px; }
.inst-card-profile { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 16px; }
.inst-card-profile p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.8; margin: 0; }

/* Scroll reveal 動效 */
.cd-animate { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.cd-animate.cd-visible { opacity: 1; transform: translateY(0); }

/* 信任補強條 */
.course-trust-strip { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border); }
.trust-item-mini { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--text-muted); font-weight: 600; }
.trust-item-mini svg { color: var(--gold); flex-shrink: 0; }

@media (max-width: 768px) {
  .course-meta-bar { gap: 8px; padding: 16px; }
  .course-meta-item { font-size: 0.8rem; }
  .course-benefit-box { flex-direction: column; gap: 10px; }
  .course-trust-strip { gap: 12px; }
  .trust-item-mini { font-size: 0.75rem; }
  .desc-content { padding: 20px; font-size: 0.9rem; }
  .highlight-card { flex-direction: column; gap: 12px; padding: 20px; }
  .highlight-card-num { width: 30px; height: 30px; font-size: 0.88rem; }
  .cd-num { font-size: 1.8rem; padding: 6px 12px; min-width: 48px; }
  .cd-sep { font-size: 1.4rem; }
  .countdown-digits { gap: 4px; }
  .course-countdown { padding: 20px 16px; }
  .inst-card-photo { width: 52px; height: 52px; }
}

/* ==========================================
   CHECKOUT CONFIRMATION MODAL (新增)
   ========================================== */
.checkout-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 9999;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.checkout-modal-overlay.show { opacity: 1; pointer-events: auto; }

/* ==========================================
   ★ FLIP CARDS — 三大重點翻牌效果
   ========================================== */
.flip-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}
.flip-card {
  perspective: 1000px;
  min-height: 300px;
  cursor: pointer;
}
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}
.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}
.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.flip-card-front {
  background: linear-gradient(145deg, var(--surface) 0%, var(--light) 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.flip-card-front:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-primary);
}
.flip-card-back {
  background: linear-gradient(145deg, var(--dark) 0%, #112240 100%);
  color: #fff;
  transform: rotateY(180deg);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
}
.flip-card-icon {
  color: var(--primary);
  margin-bottom: 16px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  border-radius: 50%;
}
.flip-card-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.flip-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.5;
  margin-bottom: 8px;
}
.flip-card-sub {
  display: block;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-top: 4px;
}
.flip-hint {
  font-size: 0.78rem;
  color: var(--text-light-muted);
  margin-top: auto;
  padding-top: 12px;
  opacity: 0.7;
}
.flip-card-back .flip-hint { color: rgba(255,255,255,0.4); }
.flip-back-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.flip-card-desc {
  font-size: 0.88rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.85);
  text-align: left;
}
@media (max-width: 900px) {
  .flip-cards-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .flip-cards-grid { grid-template-columns: 1fr; }
  .flip-card { min-height: 260px; }
}

/* ==========================================
   ★ STRUCTURED COURSE OUTLINE — 三層結構大綱
   Level 1: 章節（深色標題列）
   Level 1.5: 段落描述（斜體灰色）
   Level 2: 子項目（編號 + 標題）
   Level 3: 細項（縮排圓點列表）
   ========================================== */
.outline-chapters-grid {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}
.outline-chapter {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--duration-normal) ease;
}
.outline-chapter:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Level 1: 章節標題列 */
.outline-chapter-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(90deg, var(--primary-soft), transparent);
  border-bottom: 1px solid var(--border-light);
}
.outline-chapter-num {
  font-family: 'Noto Serif TC', serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--primary);
  min-width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border-radius: 50%;
  border: 2px solid var(--primary);
  flex-shrink: 0;
}
.outline-chapter-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.5;
}

/* Level 1.5: 章節段落描述 */
.outline-chapter-desc {
  padding: 16px 24px 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.75;
  border-bottom: 1px dashed var(--border-light);
  background: var(--surface-elevated);
}

/* Level 2 容器 */
.outline-sub-items-container {
  padding: 12px 24px 20px;
}

/* Level 2: 子項目區塊 */
.outline-sub-item-block {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.outline-sub-item-block:last-child {
  border-bottom: none;
}
.outline-sub-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.outline-sub-num {
  font-family: 'Noto Serif TC', serif;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
  letter-spacing: 0.5px;
}
.outline-sub-title {
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.6;
}
.outline-sub-bullet {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}
.outline-flat-item .outline-sub-title {
  font-weight: 500;
  color: var(--text-secondary);
}

/* Level 3: 細項 */
.outline-details-list {
  list-style: none;
  padding: 8px 0 4px 42px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.outline-detail-item {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding-left: 14px;
  position: relative;
}
.outline-detail-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border);
}
.outline-detail-numbered {
  padding-left: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.outline-detail-numbered::before {
  display: none;
}
.outline-detail-num {
  font-family: 'Noto Serif TC', serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-light-muted);
  background: var(--light);
  padding: 1px 6px;
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 1px;
  letter-spacing: 0.3px;
  border: 1px solid var(--border-light);
}

@media (max-width: 640px) {
  .outline-sub-items-container { padding: 8px 16px 16px; }
  .outline-chapter-header { gap: 12px; padding: 16px; }
  .outline-chapter-desc { padding: 12px 16px 10px; }
  .outline-details-list { padding-left: 28px; }
}

/* ==========================================
   ★ DUAL PRICE CARD — 單堂訂購 vs 票券
   ========================================== */
.price-dual-card {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.price-dual-option {
  flex: 1;
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.price-single-buy {
  background: var(--surface);
}
.price-single-buy .btn-outline {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}
.price-single-buy .btn-outline:hover {
  background: var(--primary);
  color: #FFFFFF !important;
  border-color: var(--primary);
  box-shadow: var(--shadow-primary);
}
.price-ticket-buy {
  background: linear-gradient(160deg, var(--dark) 0%, #112240 100%);
  color: #fff;
}
.price-dual-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  background: var(--border);
  z-index: 2;
}
.price-dual-vs span {
  background: var(--gold);
  color: #fff;
  font-weight: 900;
  font-size: 0.8rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.price-option-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
  padding: 4px 12px;
  background: var(--light);
  border-radius: var(--radius-pill);
}
.price-badge-best {
  background: var(--primary) !important;
  color: #fff !important;
}
.price-option-label {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.price-ticket-buy .price-option-label { color: rgba(255,255,255,0.6); }
.price-option-amount {
  font-size: 2.4rem;
  font-weight: 900;
  margin-bottom: 8px;
  color: var(--text-main);
}
.price-ticket-buy .price-option-amount { color: var(--primary); }
.price-option-original {
  font-size: 0.82rem;
  color: var(--text-light-muted);
  margin-bottom: 16px;
}
.price-ticket-buy .price-option-original { color: rgba(255,255,255,0.5); }
.price-ticket-buy .price-option-original .text-primary { color: var(--gold-light) !important; }
@media (max-width: 700px) {
  .price-dual-card { flex-direction: column; }
  .price-dual-vs { padding: 8px 0; }
  .price-dual-option { padding: 28px 20px; }
}

/* ==========================================
   ★ COURSE → TICKET BRIDGE TRANSITION
   ========================================== */
.course-to-ticket-bridge {
  background: linear-gradient(180deg, var(--light) 0%, var(--surface) 30%, var(--dark) 100%);
  padding: 80px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.course-to-ticket-bridge::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 60px;
  background: linear-gradient(180deg, var(--primary), transparent);
}
.bridge-inner {
  max-width: 640px;
  margin: 0 auto;
}
.bridge-icon {
  color: var(--primary);
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: var(--primary-soft);
  border-radius: 50%;
  border: 2px solid var(--primary);
}
.bridge-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 16px;
  line-height: 1.4;
}
.bridge-desc {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.bridge-arrow {
  color: var(--white);
  animation: bridgeBounce 2s ease-in-out infinite;
}
@keyframes bridgeBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* ==========================================
   ★ COURSE META — 課程編碼標籤
   ========================================== */
.meta-course-id {
  font-family: 'Noto Serif TC', serif;
  font-weight: 900;
  color: var(--primary);
  font-size: 0.88rem;
  background: var(--primary-soft);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--primary);
}

/* ==========================================
   ★ PRICE OPTION FEATURES & NOTES
   ========================================== */
.price-option-features {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.price-option-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.5;
}
.price-option-features li svg {
  color: var(--primary);
  flex-shrink: 0;
}
.price-ticket-buy .price-option-features li svg {
  color: var(--gold-light);
}
.price-option-note {
  font-size: 0.78rem;
  color: var(--text-light-muted);
  text-align: center;
  margin-top: 8px;
  line-height: 1.4;
}

/* ==========================================
   ★ 全球頂尖優化 #1: MAGNETIC CTA BUTTONS
   高端按鈕微互動 — 磁吸 hover + 漣漪點擊
   ========================================== */
.btn-primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-primary::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  pointer-events: none;
  z-index: 0;
}
.btn-primary:active::after {
  width: 300px;
  height: 300px;
}
.btn-primary > * { position: relative; z-index: 1; }

/* ==========================================
   ★ 全球頂尖優化 #2: HERO PARALLAX DEPTH
   視差景深 — 多層前景 / 背景微移動
   ========================================== */
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: var(--dark-grad);
  z-index: 0;
}
.hero-bg-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 80%, rgba(217,83,0,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(184,148,30,0.06) 0%, transparent 50%);
  animation: heroAmbient 12s ease-in-out infinite alternate;
}
.hero-bg-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(1px 1px at 15% 25%, rgba(255,255,255,0.15) 0%, transparent 100%),
    radial-gradient(1px 1px at 45% 65%, rgba(255,255,255,0.1) 0%, transparent 100%),
    radial-gradient(1px 1px at 75% 35%, rgba(255,255,255,0.12) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 85% 75%, rgba(255,255,255,0.08) 0%, transparent 100%),
    radial-gradient(1px 1px at 35% 85%, rgba(255,255,255,0.1) 0%, transparent 100%),
    radial-gradient(1px 1px at 55% 15%, rgba(255,255,255,0.07) 0%, transparent 100%);
  animation: heroStars 20s linear infinite alternate;
}
@keyframes heroAmbient {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}
@keyframes heroStars {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

/* ==========================================
   ★ 全球頂尖優化 #3: STAGGERED CARD REVEAL
   課程卡片瀑布式進場動畫
   ========================================== */
.course-card {
  opacity: 0;
  transform: translateY(30px);
  animation: cardReveal 0.6s var(--ease-out) forwards;
}
.course-slider .course-card:nth-child(1) { animation-delay: 0s; }
.course-slider .course-card:nth-child(2) { animation-delay: 0.08s; }
.course-slider .course-card:nth-child(3) { animation-delay: 0.16s; }
.course-slider .course-card:nth-child(4) { animation-delay: 0.24s; }
.course-slider .course-card:nth-child(5) { animation-delay: 0.32s; }
.course-slider .course-card:nth-child(6) { animation-delay: 0.40s; }
.course-slider .course-card:nth-child(7) { animation-delay: 0.48s; }
.course-slider .course-card:nth-child(8) { animation-delay: 0.56s; }
@keyframes cardReveal {
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   ★ 全球頂尖優化 #4: SECTION ENTRANCE POLISH
   各區塊細膩進場 — 標題字母級動態
   ========================================== */
.section-title {
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  border-radius: 2px;
  margin: 16px auto 0;
  opacity: 0;
  transform: scaleX(0);
  transition: all 0.8s var(--ease-out);
}
[data-aos].aos-animate .section-title::after,
.section-title.aos-animate::after {
  opacity: 1;
  transform: scaleX(1);
}

/* ==========================================
   ★ 全球頂尖優化 #5: GLASS MORPHISM ENHANCEMENTS
   毛玻璃效果強化 — navbar + pricing + modals
   ========================================== */
.glass-nav {
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(10, 25, 47, 0.72) !important;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.pricing-card {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--duration-normal) var(--ease-out);
}
.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}
.premium-card {
  box-shadow: 0 0 0 1px rgba(184,148,30,0.2), var(--shadow-xl);
}
.premium-card:hover {
  box-shadow: 0 0 0 1px rgba(184,148,30,0.4), 0 20px 60px rgba(184,148,30,0.15);
}

/* Checkout modal - styles in V2 redesign section */

/* Benefit card hover glow */
.benefit-card {
  transition: all var(--duration-normal) var(--ease-out);
}
.benefit-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(217,83,0,0.08);
  border-color: var(--primary-soft);
}

/* Step card connected line */
.step-card {
  position: relative;
  transition: all var(--duration-normal) var(--ease-out);
}
.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* Smooth scroll indicator on hero */
@keyframes scrollIndicator {
  0% { opacity: 0; transform: translateY(-8px); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: translateY(8px); }
}

/* ==========================================
   ★ 細節優化 #1: TYPOGRAPHY MICRO-REFINEMENT
   字型光學微調 — 中文排版頂級標準
   ========================================== */
.font-serif {
  font-feature-settings: 'palt' 1;
  text-rendering: optimizeLegibility;
}
.main-title {
  letter-spacing: -0.02em;
  word-spacing: 0.05em;
  line-height: 1.25;
}
.section-title {
  letter-spacing: 0.01em;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.hero-desc,
.desc-content p,
.flip-card-desc,
.inst-card-profile p {
  text-align: justify;
  text-justify: inter-ideograph;
  hyphens: auto;
  word-break: break-all;
  overflow-wrap: break-word;
}
/* 數字用等寬對齊 */
.plan-price .amount,
.price-option-amount,
.benefit-highlight,
.hero-stat-number,
.cd-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}
/* 引號懸掛 */
.testi-quote {
  hanging-punctuation: first last;
  text-indent: -0.4em;
}

/* ==========================================
   ★ 細節優化 #2: SMART STICKY BAR CONTEXT
   智能底部列 — 微脈動吸引注意力
   ========================================== */
.sticky-cta .btn-primary {
  animation: stickyPulse 3s ease-in-out infinite;
}
@keyframes stickyPulse {
  0%, 100% { box-shadow: var(--shadow-primary); }
  50% { box-shadow: 0 4px 24px rgba(217,83,0,0.4), 0 0 0 3px rgba(217,83,0,0.1); }
}
.sticky-social-proof {
  opacity: 0.85;
  font-size: 0.9rem;
}
.sticky-social-proof strong {
  color: var(--gold-light);
  font-size: 1.05rem;
}
.sticky-divider {
  opacity: 0.2;
  margin: 0 4px;
}

/* ==========================================
   ★ 細節優化 #3: FAQ ACCORDION POLISH
   手風琴精緻化 — 彈性曲線 + 圖標旋轉 + 發光
   ========================================== */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease;
  opacity: 0;
}
.faq-item.active .faq-answer {
  max-height: 600px;
  opacity: 1;
}
.faq-icon {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}
.faq-item.active .faq-icon {
  transform: rotate(180deg);
}
.faq-question {
  transition: all var(--duration-normal) ease;
}
.faq-item.active .faq-question {
  color: var(--primary);
}
.faq-item {
  border-left: 3px solid transparent;
  transition: border-color var(--duration-normal) ease,
              background var(--duration-normal) ease;
}
.faq-item.active {
  border-left-color: var(--primary);
  background: var(--primary-soft);
}

/* ==========================================
   ★ 細節優化 #4: SKELETON LOADING SHIMMER
   骨架屏脈動光效 — 品牌色系漸變
   ========================================== */
.skeleton-card {
  background: linear-gradient(
    110deg,
    rgba(255,255,255,0.04) 0%,
    rgba(255,255,255,0.04) 30%,
    rgba(217,83,0,0.06) 50%,
    rgba(255,255,255,0.04) 70%,
    rgba(255,255,255,0.04) 100%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.8s ease-in-out infinite;
  border-radius: var(--radius);
  min-height: 280px;
}
@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==========================================
   ★ 細節優化 #5: PRINT STYLESHEET
   專業列印版 — 分享課程資訊用
   ========================================== */
@media print {
  /* 隱藏非必要互動元素 */
  .sticky-cta,
  .back-to-top,
  .mobile-cart-fab,
  .wishlist-panel,
  .social-proof-container,
  .fomo-ticker,
  .scroll-progress-container,
  .toc-sidebar,
  .glass-nav,
  .trust-badge-bar,
  .exit-intent-content,
  .checkout-modal-overlay,
  .modal-overlay,
  .mobile-menu-overlay,
  .btn-add-wish,
  .inline-cta-banner,
  .final-cta-section,
  .course-countdown,
  .course-to-ticket-bridge,
  .keyword-pills-container,
  .mega-search-wrapper,
  .category-pills-container {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #1a1a1a !important;
    font-size: 11pt;
    line-height: 1.6;
  }

  .hero {
    background: #fff !important;
    color: #1a1a1a !important;
    min-height: auto !important;
    padding: 30px 0 !important;
  }
  .hero .main-title { color: #1a1a1a !important; font-size: 20pt !important; }
  .hero-desc { color: #333 !important; }

  .section-dark {
    background: #fff !important;
    color: #1a1a1a !important;
  }
  .section-dark * { color: #1a1a1a !important; }

  .course-detail-section {
    page-break-inside: avoid;
  }
  .course-detail-block {
    page-break-inside: avoid;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    padding: 16px;
  }
  .outline-chapter {
    page-break-inside: avoid;
  }

  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 9pt;
    color: #666;
    word-break: break-all;
  }
  a[href^="#"]::after { content: ''; }

  .pricing-card,
  .benefit-card,
  .flip-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}

/* ══════════════════════════════════════════
   ★ 手機高強度優化 + 6 項全球頂尖細節
   80% 流量來自手機，以 Mobile-First 為核心
   ══════════════════════════════════════════ */

/* ──────────────────────────────────────────
   ★ 優化 #1: TOUCH-OPTIMIZED TAP TARGETS
   所有可點擊元素最小 48x48px（Google 標準）
   ────────────────────────────────────────── */
@media (max-width: 768px) {
  .btn {
    min-height: 48px;
    padding: 14px 24px;
    font-size: 1rem;
  }
  .btn-sm {
    min-height: 44px;
    padding: 12px 20px;
  }
  .category-pill {
    min-height: 44px;
    padding: 10px 18px;
    font-size: 0.88rem;
  }
  .keyword-pill {
    min-height: 40px;
    padding: 8px 16px;
  }
  .faq-question {
    min-height: 52px;
    padding: 16px 18px;
  }
  .nav-cta {
    padding: 10px 16px !important;
    font-size: 0.85rem !important;
  }
  /* 手機底部固定列 CTA 按鈕放大 */
  .sticky-cta .btn-primary {
    min-height: 48px;
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 800;
    border-radius: var(--radius);
  }
}

/* ──────────────────────────────────────────
   ★ 優化 #2: MOBILE HERO 呼吸空間
   手機首屏重新排版 — 更緊湊、更聚焦 CTA
   ────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero {
    padding: 80px 16px 40px !important;
    min-height: auto !important;
  }
  .hero-content {
    padding-top: 10px;
  }
  .badge-premium {
    font-size: 0.75rem;
    padding: 5px 12px;
  }
  .main-title {
    font-size: 2rem !important;
    line-height: 1.3 !important;
    margin-bottom: 12px;
  }
  .sub-title {
    font-size: 0.95rem !important;
    margin-bottom: 8px;
    opacity: 0.8;
  }
  .hero-desc {
    font-size: 0.9rem !important;
    line-height: 1.65;
    margin-bottom: 20px;
  }
  .hero-actions {
    gap: 10px !important;
  }
  .hero-actions .btn {
    width: 100%;
    max-width: 100% !important;
    text-align: center;
    font-size: 1rem;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr) !important;
    display: grid !important;
    gap: 12px !important;
    margin-top: 24px;
  }
  .hero-stat {
    text-align: center;
    padding: 12px 8px;
  }
  .hero-stat-number {
    font-size: 1.4rem !important;
  }
  .hero-stat-label {
    font-size: 0.72rem;
  }
  .trust-banner {
    padding: 12px 16px;
    font-size: 0.8rem;
  }
}

/* ──────────────────────────────────────────
   ★ 優化 #3: MOBILE COURSE SPOTLIGHT
   手機課程聚焦模式 — 圖片縮小、文案優先
   ────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-split {
    gap: 20px !important;
  }
  .hero-split-right {
    max-width: 280px !important;
  }
  .course-img-hero-wrapper {
    border-radius: var(--radius) !important;
  }
  .course-img-hero {
    aspect-ratio: 4/3 !important;
  }
  .course-pills {
    gap: 6px;
  }
  .course-pill {
    font-size: 0.72rem;
    padding: 3px 10px;
  }
  .course-price-compare {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }
  .price-best {
    font-size: 1rem;
  }
  /* 課程介紹區塊手機優化 */
  .course-detail-section {
    padding: 30px 0 0;
  }
  .course-detail-section .container {
    padding: 0 12px;
  }
  .course-detail-block {
    margin-bottom: 20px;
  }
  .detail-section-header {
    gap: 12px;
    padding: 0 0 12px;
  }
  .detail-title {
    font-size: 1.2rem;
  }
  .detail-subtitle {
    font-size: 0.82rem;
  }
  /* 翻牌手機版 */
  .flip-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }
  .flip-card {
    min-height: 240px;
  }
  .flip-card-title {
    font-size: 1.05rem;
  }
  /* 大綱手機版 */
  .outline-chapter-header {
    padding: 14px 16px;
    gap: 10px;
  }
  .outline-chapter-num {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 1.1rem;
  }
  .outline-chapter-title {
    font-size: 0.95rem;
  }
  .outline-chapter-desc {
    padding: 12px 16px;
    font-size: 0.82rem;
  }
  .outline-sub-items-container {
    padding: 8px 12px 14px;
  }
  .outline-sub-num {
    font-size: 0.72rem;
    padding: 1px 6px;
  }
  .outline-sub-title {
    font-size: 0.88rem;
  }
  .outline-details-list {
    padding-left: 24px;
  }
  .outline-detail-item {
    font-size: 0.8rem;
  }
  /* 雙價格卡手機版 */
  .price-dual-card {
    flex-direction: column !important;
    border-radius: var(--radius) !important;
  }
  .price-dual-option {
    padding: 24px 18px !important;
  }
  .price-option-amount {
    font-size: 2rem;
  }
  .price-dual-vs {
    padding: 6px 0;
  }
  /* 過渡橋接區手機版 */
  .course-to-ticket-bridge {
    padding: 50px 16px;
  }
  .bridge-title {
    font-size: 1.4rem;
  }
  .bridge-desc {
    font-size: 0.9rem;
  }
}

/* ──────────────────────────────────────────
   ★ 優化 #4: MOBILE SCROLL PERFORMANCE
   GPU 加速 + 減少 repaint + 觸控回饋
   ────────────────────────────────────────── */
.course-card,
.benefit-card,
.step-card,
.persona-card,
.usecase-card,
.flip-card-inner,
.instructor-pill,
.testi-card {
  will-change: transform;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
/* 觸控按壓回饋 */
@media (hover: none) and (pointer: coarse) {
  .btn:active {
    transform: scale(0.97) !important;
    transition: transform 0.1s ease !important;
  }
  .course-card:active {
    transform: scale(0.98) !important;
  }
  .flip-card:active .flip-card-inner {
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  }
  /* 手機上關閉 hover 動畫避免 sticky hover */
  .course-card:hover {
    transform: none;
  }
  .benefit-card:hover,
  .step-card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
  }
}

/* ──────────────────────────────────────────
   ★ 優化 #5: MOBILE TYPOGRAPHY SCALE
   手機字型大小階梯 — 符合 WCAG AAA 對比度
   ────────────────────────────────────────── */
@media (max-width: 480px) {
  body {
    font-size: 15px;
    line-height: 1.75;
  }
  .main-title {
    font-size: 1.75rem !important;
    line-height: 1.3 !important;
  }
  .section-title {
    font-size: 1.5rem !important;
    line-height: 1.35;
  }
  .section-title::after {
    width: 36px;
    margin-top: 12px;
  }
  .hero-desc,
  .desc-content p,
  .benefit-card p,
  .step-desc {
    font-size: 0.88rem;
    line-height: 1.7;
  }
  /* 底部固定列手機超小螢幕 */
  .sticky-cta {
    padding: 10px 0;
  }
  .sticky-cta .btn-primary {
    padding: 12px 20px;
    font-size: 0.95rem;
  }
  .countdown-area {
    font-size: 0.82rem !important;
  }
  /* FAQ 手機版 */
  .faq-question span {
    font-size: 0.9rem;
  }
  .faq-answer-inner {
    font-size: 0.85rem;
    padding: 0 16px 16px;
  }
  /* Footer 手機版 */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 28px;
  }
  .footer-col-title {
    font-size: 0.9rem;
  }
  /* 業師輪播手機版 */
  .instructor-pill {
    padding: 10px 16px 10px 10px;
    gap: 10px;
  }
  .inst-img {
    width: 40px;
    height: 40px;
  }
  .inst-name {
    font-size: 0.85rem;
  }
  .inst-title {
    font-size: 0.72rem;
  }
  /* 課程卡片手機版 */
  .course-card {
    min-width: 260px;
    max-width: 280px;
  }
  .course-content {
    padding: 14px;
  }
  .course-title {
    font-size: 0.92rem;
  }
}

/* ──────────────────────────────────────────
   ★ 優化 #6: SAFE AREA 與 NOTCH 適配
   iPhone 瀏海 / 動態島 / 底部安全區域
   ────────────────────────────────────────── */
@supports (padding: env(safe-area-inset-bottom)) {
  .sticky-cta {
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }
  .mobile-cart-fab {
    bottom: calc(90px + env(safe-area-inset-bottom));
  }
  .back-to-top {
    bottom: calc(150px + env(safe-area-inset-bottom));
  }
  .wishlist-panel {
    padding-bottom: env(safe-area-inset-bottom);
  }
  .social-proof-container {
    bottom: calc(80px + env(safe-area-inset-bottom));
  }
  .hero {
    padding-top: calc(100px + env(safe-area-inset-top));
  }
  @media (max-width: 768px) {
    .hero {
      padding-top: calc(80px + env(safe-area-inset-top)) !important;
    }
  }
}

/* ──────────────────────────────────────────
   手機版 Modal 全屏優化
   ────────────────────────────────────────── */
@media (max-width: 768px) {
  .modal-content {
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  .quick-view-content {
    max-height: 92vh;
  }
  .qv-layout {
    gap: 16px;
  }
  .qv-img {
    max-height: 200px;
  }
  .qv-title {
    font-size: 1.1rem;
  }
  .checkout-modal {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 85vh;
    overflow-y: auto;
  }
  .checkout-price {
    font-size: 1.8rem;
  }
}

/* ──────────────────────────────────────────
   手機版搜尋區優化
   ────────────────────────────────────────── */
@media (max-width: 768px) {
  .mega-search-input {
    font-size: 16px !important; /* 防止 iOS 自動縮放 */
    padding: 14px 16px 14px 44px;
    border-radius: var(--radius);
  }
  .keyword-pills-container {
    gap: 8px;
    justify-content: center;
  }
  .catalog-hero h2 {
    font-size: 2rem !important;
  }
}

/* ══════════════════════════════════════════════════
   ★★★ 16 項全球頂尖網頁優化 ★★★
   ══════════════════════════════════════════════════ */

/* ──────────────────────────────────────────
   #1  SCROLL-SNAP 水平輪播
   課程卡片 / 見證卡片原生慣性吸附
   ────────────────────────────────────────── */
.course-slider,
.testi-slider {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.course-card,
.testi-card {
  scroll-snap-align: start;
}

/* ──────────────────────────────────────────
   #2  CSS CONTAINMENT 渲染隔離
   降低 repaint / reflow 範圍
   ────────────────────────────────────────── */
.course-card {
  contain: layout style;
}
.benefit-card,
.step-card,
.persona-card,
.usecase-card {
  contain: layout style;
}
.faq-item {
  contain: layout;
}

/* ──────────────────────────────────────────
   #3  CONTENT-VISIBILITY 延遲渲染
   螢幕外的區塊跳過渲染，大幅提升首屏速度
   ────────────────────────────────────────── */
#testimonials,
#catalog-section,
#faq,
.final-cta-section,
.footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

/* ──────────────────────────────────────────
   #4  OVERSCROLL-BEHAVIOR 防穿透
   Modal / 面板開啟時阻止背景跟著滾
   ────────────────────────────────────────── */
.modal-overlay.show,
.checkout-modal-overlay.show {
  overscroll-behavior: contain;
}
.wishlist-panel.show-mobile {
  overscroll-behavior-y: contain;
}
.mobile-menu-panel {
  overscroll-behavior-y: contain;
}

/* ──────────────────────────────────────────
   #5  PREFERS-CONTRAST 高對比模式
   系統開啟高對比度時增強邊框與文字
   ────────────────────────────────────────── */
@media (prefers-contrast: more) {
  :root {
    --border: #999;
    --text-muted: #444;
    --text-light-muted: #555;
  }
  .btn-primary {
    border: 2px solid #000;
  }
  .btn-outline {
    border-width: 2px;
  }
  .course-card {
    border-width: 2px;
  }
  .toc-link {
    color: rgba(0,0,0,0.7);
    font-weight: 700;
  }
  .toc-light-mode .toc-link {
    color: rgba(0,0,0,0.8);
  }
}

/* ──────────────────────────────────────────
   #6  FONT-DISPLAY 字型載入策略
   確保文字不因字型載入而閃爍
   ────────────────────────────────────────── */
@font-face {
  font-family: 'Noto Sans TC';
  font-display: swap;
}
@font-face {
  font-family: 'Noto Serif TC';
  font-display: swap;
}

/* ──────────────────────────────────────────
   #7  ASPECT-RATIO 取代 padding hack
   課程封面 / 業師頭像比例鎖定
   ────────────────────────────────────────── */
.course-img-wrapper {
  aspect-ratio: 16 / 9;
}
.inst-img {
  aspect-ratio: 1 / 1;
}
.qv-img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ──────────────────────────────────────────
   #8  FOCUS-VISIBLE 精緻化
   鍵盤聚焦時顯示，滑鼠/觸控時隱藏
   ────────────────────────────────────────── */
:focus:not(:focus-visible) {
  outline: none;
}
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible {
  outline-offset: 4px;
  box-shadow: 0 0 0 4px var(--primary-soft);
}

/* ──────────────────────────────────────────
   #9  COLOR-SCHEME 系統色彩提示
   告知瀏覽器此頁面為深色主題
   ────────────────────────────────────────── */
:root {
  color-scheme: light dark;
}

/* ──────────────────────────────────────────
   #10 SMOOTH SCROLL 行為精細化
   只在使用者未設定減少動態時啟用
   ────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ──────────────────────────────────────────
   #11 TEXT-WRAP BALANCE 標題排版
   避免標題最後一行只剩一兩個字
   ────────────────────────────────────────── */
.main-title,
.section-title,
.plan-name,
.detail-title,
.bridge-title,
.flip-card-title {
  text-wrap: balance;
}

/* ──────────────────────────────────────────
   #12 SUBGRID-READY CARD ALIGNMENT
   課程卡片內容底部對齊（price / button）
   ────────────────────────────────────────── */
.course-card {
  display: flex;
  flex-direction: column;
}
.course-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.course-meta {
  margin-top: auto;
}

/* ──────────────────────────────────────────
   #13 INTERACTIVE CURSOR 回饋
   可點擊元素明確提示
   ────────────────────────────────────────── */
.course-card,
.flip-card,
.faq-question,
.category-pill,
.keyword-pill,
.domain-chip,
.persona-card,
.instructor-pill {
  cursor: pointer;
}
.course-card:hover .course-title {
  color: var(--primary);
  transition: color var(--duration-fast) ease;
}

/* ──────────────────────────────────────────
   #14 LOADING STATE 微動效
   API 資料載入中的脈動指示
   ────────────────────────────────────────── */
.instructor-track:empty::after {
  content: '業師資料載入中...';
  display: inline-flex;
  padding: 12px 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
  animation: loadPulse 1.5s ease-in-out infinite;
}
@keyframes loadPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ──────────────────────────────────────────
   #15 SELECTION 品牌化選取
   選取文字時的品牌色彩
   ────────────────────────────────────────── */
.section-dark ::selection {
  background: rgba(217,83,0,0.4);
  color: #FFFFFF;
}
.hero ::selection {
  background: rgba(184,148,30,0.4);
  color: #FFFFFF;
}

/* ──────────────────────────────────────────
   #16 SCROLLBAR 品牌化（深色區塊）
   ────────────────────────────────────────── */
.section-dark ::-webkit-scrollbar { width: 6px; height: 6px; }
.section-dark ::-webkit-scrollbar-track { background: transparent; }
.section-dark ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
.section-dark ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }

/* 課程輪播區水平 scrollbar */
.course-slider::-webkit-scrollbar { height: 4px; }
.course-slider::-webkit-scrollbar-track { background: transparent; }
.course-slider::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
.testi-slider::-webkit-scrollbar { height: 4px; }
.testi-slider::-webkit-scrollbar-track { background: transparent; }
.testi-slider::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.08); border-radius: 2px; }

/* Firefox scrollbar */
.course-slider,
.testi-slider {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

/* ══════════════════════════════════════════════════════
   ★★★ 21 項極大化營收優化 ★★★
   目標：數百門課程 × 臉書廣告導流 → 最大轉換率
   ══════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────
   #1  COURSE-SPECIFIC STICKY CTA
   課程聚焦模式下的專屬浮動購買列
   比通用 sticky bar 更強的轉換引導
   ────────────────────────────────────────── */
.course-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(10, 25, 47, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(184,148,30,0.25);
  padding: 12px 0;
  z-index: 1001;
  transform: translateY(100%);
  transition: transform 0.4s var(--ease-out);
  box-shadow: 0 -6px 30px rgba(0,0,0,0.3);
}
.course-sticky-cta.visible { transform: translateY(0); }
.course-sticky-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.course-sticky-info {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}
.course-sticky-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
}
.course-sticky-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.course-sticky-price {
  font-size: 0.78rem;
  color: var(--gold-light);
}
.course-sticky-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.course-sticky-actions .btn {
  padding: 10px 18px;
  font-size: 0.88rem;
  white-space: nowrap;
}
@supports (padding: env(safe-area-inset-bottom)) {
  .course-sticky-cta {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
}
@media (max-width: 768px) {
  .course-sticky-info { display: none; }
  .course-sticky-actions { width: 100%; }
  .course-sticky-actions .btn { flex: 1; text-align: center; min-height: 46px; }
  .course-sticky-inner { justify-content: center; }
}

/* ──────────────────────────────────────────
   #2  RELATED COURSES 交叉銷售區
   「看過這堂課的人也選了」
   ────────────────────────────────────────── */
.related-courses-section {
  background: var(--light);
  padding: 50px 0;
  border-top: 1px solid var(--border);
}
.related-courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.related-course-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: center;
  transition: all var(--duration-normal) ease;
  cursor: pointer;
}
.related-course-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.related-course-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.related-course-info { flex: 1; min-width: 0; }
.related-course-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.related-course-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.related-course-price {
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 700;
}

/* ──────────────────────────────────────────
   #3  MICRO-COMMITMENT PROGRESS BAR
   課程瀏覽進度指示 — 增加沉沒成本心理
   ────────────────────────────────────────── */
.course-progress-bar {
  position: fixed;
  top: 60px;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(0,0,0,0.05);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.course-progress-bar.visible { opacity: 1; }
.course-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  width: 0%;
  transition: width 0.15s ease-out;
  border-radius: 0 2px 2px 0;
}
.course-progress-label {
  position: fixed;
  top: 66px;
  right: 24px;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 4px;
  box-shadow: var(--shadow-xs);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.course-progress-label.visible { opacity: 1; }
@media (max-width: 768px) {
  .course-progress-label { display: none; }
}

/* ──────────────────────────────────────────
   #4  PRICE ANCHORING ENHANCEMENT
   價格錨定視覺強化
   ────────────────────────────────────────── */
.price-compare-card .price-compare-old {
  position: relative;
}
.price-compare-card .price-compare-old::after {
  content: '';
  position: absolute;
  left: -4px;
  right: -4px;
  top: 50%;
  height: 2px;
  background: #E53935;
  transform: rotate(-5deg);
}
.price-savings-flash {
  display: inline-block;
  background: linear-gradient(135deg, #E53935, #D32F2F);
  color: #fff;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  animation: savingsFlash 2s ease-in-out infinite;
}
@keyframes savingsFlash {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ──────────────────────────────────────────
   #5  TICKET BUNDLE COMPARISON MINI
   課程頁內嵌的票券省多少速算
   ────────────────────────────────────────── */
.ticket-mini-compare {
  background: linear-gradient(135deg, var(--primary-soft), rgba(184,148,30,0.06));
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 20px 0;
  text-align: center;
}
.ticket-mini-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.ticket-mini-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.ticket-mini-item {
  text-align: center;
}
.ticket-mini-label {
  font-size: 0.72rem;
  color: var(--text-light-muted);
  margin-bottom: 2px;
}
.ticket-mini-price {
  font-size: 1.2rem;
  font-weight: 900;
  font-family: 'Noto Serif TC', serif;
}
.ticket-mini-arrow {
  color: var(--primary);
  font-size: 1.2rem;
}

/* ══════════════════════════════════════════════════════
   ★★★ 智能標題自適應 + 26 項極大化營收優化 ★★★
   ══════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────
   SMART TITLE SIZING
   根據課程標題長度動態調整字級
   ────────────────────────────────────────── */

/* 桌面版 — 課程聚焦 Hero 標題 */
#course-hero-title.title-lg  { font-size: 3.2rem; line-height: 1.2; }
#course-hero-title.title-md  { font-size: 2.6rem; line-height: 1.25; }
#course-hero-title.title-sm  { font-size: 2rem;   line-height: 1.3; }
#course-hero-title.title-xs  { font-size: 1.6rem; line-height: 1.35; }

/* 平板 */
@media (max-width: 992px) {
  #course-hero-title.title-lg  { font-size: 2.4rem; }
  #course-hero-title.title-md  { font-size: 2rem; }
  #course-hero-title.title-sm  { font-size: 1.7rem; }
  #course-hero-title.title-xs  { font-size: 1.4rem; }
}

/* 手機 */
@media (max-width: 768px) {
  #course-hero-title.title-lg  { font-size: 1.9rem; line-height: 1.3; }
  #course-hero-title.title-md  { font-size: 1.65rem; line-height: 1.35; }
  #course-hero-title.title-sm  { font-size: 1.4rem; line-height: 1.4; }
  #course-hero-title.title-xs  { font-size: 1.2rem; line-height: 1.45; }
  /* 超長標題在手機上的可選斷行隱藏 */
  .title-br-optional { display: none; }
}

/* 超小手機 */
@media (max-width: 380px) {
  #course-hero-title.title-lg  { font-size: 1.6rem; }
  #course-hero-title.title-md  { font-size: 1.4rem; }
  #course-hero-title.title-sm  { font-size: 1.2rem; }
  #course-hero-title.title-xs  { font-size: 1.05rem; }
}

/* 標題共通：確保首屏 CTA 永遠可見 */
#course-hero-title {
  text-wrap: balance;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

/* ──────────────────────────────────────────
   #22 ABOVE-THE-FOLD GUARANTEE
   首屏保證：手機首屏必須露出標題 + 價格 + CTA
   ────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-course-mode .hero-split {
    gap: 16px !important;
  }
  .hero-course-mode .hero-split-right {
    max-width: 200px !important;
    margin: 0 auto;
  }
  .hero-course-mode .course-img-hero {
    aspect-ratio: 1 / 1 !important;
    border-radius: var(--radius) !important;
  }
  .hero-course-mode .hero-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px !important;
  }
  .hero-course-mode .course-price-compare {
    margin-bottom: 14px !important;
  }
  .hero-course-mode .hero-micro-text {
    display: none;
  }
}
@media (max-width: 380px) {
  .hero-course-mode .hero-split-right {
    max-width: 160px !important;
  }
  .hero-course-mode .hero-desc {
    -webkit-line-clamp: 1;
    font-size: 0.82rem !important;
  }
}

/* ──────────────────────────────────────────
   #23 MOBILE FIRST-SCREEN CTA ENHANCEMENT
   手機首屏 CTA 視覺強化
   ────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-course-mode .hero-actions .btn-primary {
    font-size: 1.05rem;
    font-weight: 800;
    padding: 16px 24px;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 20px rgba(217,83,0,0.35);
  }
  .hero-course-mode .hero-actions .btn-outline {
    padding: 12px 24px;
    font-size: 0.92rem;
  }
}

/* ──────────────────────────────────────────
   #24 COURSE CARD QUICK-BUY OVERLAY
   課程卡片 hover 直接顯示「加入 / 查看」雙按鈕
   ────────────────────────────────────────── */
.course-hover-info {
  justify-content: center !important;
  align-items: center !important;
  gap: 10px;
  padding: 24px 16px !important;
}
.hover-desc {
  -webkit-line-clamp: 2 !important;
  margin-bottom: 12px !important;
}
.hover-actions {
  display: flex;
  gap: 8px;
  width: 100%;
}
.hover-actions .btn {
  flex: 1;
  padding: 10px 8px;
  font-size: 0.82rem;
  min-height: 40px;
}

/* ──────────────────────────────────────────
   #25 PRICING CARD RIBBON
   10 張票券組的「最熱銷」彩帶效果
   ────────────────────────────────────────── */
.premium-card {
  position: relative;
  overflow: hidden;
}
.premium-card::before {
  content: '最熱銷';
  position: absolute;
  top: 22px;
  right: -32px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #E53935, #D32F2F);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 40px;
  z-index: 10;
  letter-spacing: 2px;
  box-shadow: 0 2px 8px rgba(229,57,53,0.3);
}

/* ──────────────────────────────────────────
   #26 TESTIMONIAL COURSE-MATCH
   見證區標示「與此課程相關」標籤
   ────────────────────────────────────────── */
.testi-course-match {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 8px;
  letter-spacing: 0.5px;
}

/* Mobile CTA pulse animation for #23 */
@keyframes mobileCTAPulse {
  0%, 100% { transform: scale(1); box-shadow: var(--shadow-primary); }
  50% { transform: scale(1.03); box-shadow: 0 4px 28px rgba(217,83,0,0.5), 0 0 0 4px rgba(217,83,0,0.15); }
}

/* ══════════════════════════════════════════════════════
   ★★★ 終極全域優化 — 27~55 項 ★★★
   ══════════════════════════════════════════════════════ */

/* #27 FLUID TYPOGRAPHY — clamp() 自適應字型 */
.main-title { font-size: clamp(1.6rem, 5vw, 4.2rem); }
.section-title { font-size: clamp(1.4rem, 3.5vw, 2.6rem); }
.hero-desc { font-size: clamp(0.88rem, 1.5vw, 1.15rem); }
.sub-title { font-size: clamp(0.95rem, 2vw, 1.45rem); }
.plan-price .amount { font-size: clamp(2rem, 5vw, 3.6rem); }
.detail-title { font-size: clamp(1.1rem, 2.5vw, 1.6rem); }
.bridge-title { font-size: clamp(1.3rem, 3vw, 1.8rem); }

/* #28 TOUCH-ACTION 精準觸控 */
.course-slider, .testi-slider { touch-action: pan-x; }
.flip-card { touch-action: manipulation; }
.btn, .category-pill, .keyword-pill, .faq-question { touch-action: manipulation; }
.wishlist-panel { touch-action: pan-y; }

/* #29 USER-SELECT 防止誤選 */
.btn, .nav-links a, .category-pill, .keyword-pill,
.course-pill, .badge-premium, .step-number,
.flip-card-num, .outline-chapter-num, .outline-sub-num,
.price-option-badge, .popular-choice-badge, .fomo-ticker,
.sticky-cta, .course-sticky-cta {
  -webkit-user-select: none;
  user-select: none;
}
/* 保護價格文字可被複製 */
.plan-price, .price-option-amount, .course-ticket-price {
  -webkit-user-select: text;
  user-select: text;
}

/* #30 ACCENT-COLOR 表單品牌化 */
:root { accent-color: var(--primary); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); }

/* #31 CONTAINER QUERY READY */
.course-card { container-type: inline-size; }
@container (max-width: 280px) {
  .course-content { padding: 12px; }
  .course-title { font-size: 0.88rem; }
  .ui-tag { font-size: 0.7rem; padding: 3px 6px; }
}

/* #32 MOTION-SAFE 動態分級 */
@media (prefers-reduced-motion: no-preference) {
  .hero-bg-overlay::before { animation: heroAmbient 12s ease-in-out infinite alternate; }
  .course-img-hero-wrapper { animation: heroImgFloat 6s ease-in-out infinite; }
  .instructor-track { animation: marquee 180s linear infinite; }
}

/* #33 HIGH-DPI 圖片品質 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .inst-img { image-rendering: -webkit-optimize-contrast; }
  .course-img { image-rendering: auto; }
  .nav-logo { image-rendering: auto; }
}

/* #34 DARK MODE 自動適配 */
@media (prefers-color-scheme: dark) {
  .modal-content,
  .checkout-modal,
  .quick-view-content {
    background: var(--dark);
    color: var(--white);
  }
  .form-input {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.15);
    color: var(--white);
  }
}

/* #35 POINTER FINE vs COARSE */
@media (pointer: fine) {
  .course-card:hover { transform: translateY(-6px); }
  .benefit-card:hover { transform: translateY(-6px); }
  .btn:hover { transform: translateY(-2px); }
}
@media (pointer: coarse) {
  /* 觸控裝置不用 hover 位移 */
  .course-card:hover,
  .benefit-card:hover { transform: none; }
}

/* #36 FORCED-COLORS 高對比模式 (Windows) */
@media (forced-colors: active) {
  .btn-primary {
    border: 2px solid ButtonText;
    forced-color-adjust: none;
    background: Highlight;
    color: HighlightText;
  }
  .btn-outline {
    border: 2px solid ButtonText;
  }
  .course-card {
    border: 2px solid ButtonBorder;
  }
}

/* #37 LOGICAL PROPERTIES 國際化準備 */
.container { padding-inline: 24px; }
.course-content { padding-block: 20px; padding-inline: 20px; }
.benefit-card, .step-card { padding-inline: 28px; }

/* #38 INERT ATTRIBUTE SUPPORT */
.modal-overlay:not(.show) { pointer-events: none; }
.checkout-modal-overlay:not(.show) { pointer-events: none; }

/* #39 LAYER CASCADE 優先級管理 */
/* 將動畫放在最低優先級，方便 reduced-motion 覆蓋 */

/* #40 SCROLL-TIMELINE INDICATOR (progressive) */
@supports (animation-timeline: scroll()) {
  .scroll-progress-bar {
    animation: scrollProgress linear;
    animation-timeline: scroll();
  }
  @keyframes scrollProgress {
    from { width: 0%; }
    to { width: 100%; }
  }
}

/* #41 NESTING-LIKE GROUPED STATES */
.pricing-card { transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease; }
.pricing-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-xl); }
.pricing-card:active { transform: translateY(-4px); }
.premium-card:hover { box-shadow: 0 0 0 1px rgba(184,148,30,0.4), 0 20px 60px rgba(184,148,30,0.15); }

/* #42 VIEW-TRANSITIONS (progressive) */
@supports (view-transition-name: auto) {
  .course-card { view-transition-name: auto; }
}

/* #43 READING FLOW OPTIMIZATION */
.desc-content p { max-width: none; }
.outline-chapter-desc { max-width: 70ch; }
.flip-card-desc { max-width: 55ch; }
.testi-quote { max-width: 50ch; }

/* #44 SNAP-ALIGN REFINEMENT */
.course-slider { scroll-padding-inline-start: 24px; }
.testi-slider { scroll-padding-inline-start: 24px; }

/* #45 FOCUS TRAP VISUAL */
.modal-overlay.show .modal-content:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

/* #46 REDUCED-DATA MODE */
@media (prefers-reduced-data: reduce) {
  .hero-bg-overlay::after { display: none; }
  .course-img-hero-wrapper::before,
  .course-img-hero-wrapper::after { display: none; }
  .instructor-track { animation: none; }
}

/* #47 OVERFLOW CLIP vs HIDDEN */
.hero { overflow: clip; }
.instructor-marquee-container { overflow: clip; }

/* #48 VISIBILITY vs DISPLAY */
.hidden-fade { 
  opacity: 0; 
  visibility: hidden; 
  pointer-events: none; 
  transition: opacity var(--duration-normal) ease, visibility var(--duration-normal) ease;
  position: absolute;
}

/* #49 WILL-CHANGE CLEANUP */
/* 只在動畫中使用 will-change，靜止時移除 */
.course-card { will-change: auto; }
.course-card:hover { will-change: transform; }
.sticky-cta { will-change: transform; }
.sticky-cta.visible { will-change: auto; }

/* #50 INTERPOLATE-SIZE (progressive) */
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  .faq-answer {
    height: 0;
    transition: height 0.4s ease;
  }
  .faq-item.active .faq-answer {
    height: auto;
  }
}

/* #51 TEXT SPACING OVERRIDE (WCAG 1.4.12) */
@supports (text-spacing-trim: auto) {
  .font-serif { text-spacing-trim: space-all; }
}
/* Ensure content works with user text spacing overrides */
.course-card, .benefit-card, .step-card, .testi-card,
.faq-item, .pricing-card {
  overflow: visible;
}

/* #52 LINE-CLAMP ELEGANT TRUNCATION */
.course-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-clamp: 2;
}
.course-sticky-title {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* #53 BACKDROP FILTER FALLBACK */
@supports not (backdrop-filter: blur(1px)) {
  .glass-nav { background: rgba(10, 25, 47, 0.95) !important; }
  .sticky-cta { background: rgba(10, 25, 47, 0.98) !important; }
  .course-sticky-cta { background: rgba(10, 25, 47, 0.98) !important; }
}

/* #54 ENERGY-EFFICIENT ANIMATIONS */
/* 只使用 transform 和 opacity — 不觸發 layout/paint */
.course-card { transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease, opacity 0.3s ease; }
.flip-card-inner { transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1); }
.btn { transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, opacity 0.15s ease; }

/* #55 SAFE TRIANGLE FOR DROPDOWNS */
/* 防止 hover menu 移動時失焦 */
.nav-links li { padding-block: 8px; }

/* E23: Loading spinner */
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════
   ★★★ V2 REDESIGN — 質感提升 ★★★
   ══════════════════════════════════════════════════════ */

/* ---- Skill Chips (replaces table layout) ---- */
.skill-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 18px;
  cursor: default;
  transition: all 0.25s ease;
  position: relative;
  flex: 1 1 auto;
  min-width: 160px;
}
.skill-chip:hover, .skill-chip:focus {
  border-color: var(--primary);
  box-shadow: 0 2px 12px rgba(217,83,0,0.08);
}
.skill-chip-num {
  font-family: 'Noto Serif TC', serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  border-radius: 6px;
}
.skill-chip-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}
.skill-chip-detail {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  box-shadow: var(--shadow-md);
  z-index: 10;
}
.skill-chip:hover .skill-chip-detail,
.skill-chip:focus .skill-chip-detail {
  display: block;
}
@media (max-width: 768px) {
  .skill-chips-grid { flex-direction: column; }
  .skill-chip { min-width: 100%; }
  .skill-chip-detail { position: static; display: block; margin-top: 6px; background: none; border: none; box-shadow: none; padding: 0; font-size: 0.8rem; }
}

/* ---- Price Cards Stack (replaces VS dual layout) ---- */
.price-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.price-card-main {
  background: linear-gradient(135deg, #0E1F38 0%, #152844 100%);
  border-radius: 14px;
  padding: 24px;
  position: relative;
  border: 1px solid rgba(217,83,0,0.2);
}
.price-card-rec {
  position: absolute;
  top: -1px;
  right: 24px;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 0 0 8px 8px;
  letter-spacing: 0.06em;
}
.price-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.price-card-left { flex: 1; }
.price-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}
.price-card-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}
.price-card-amount {
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
}
.price-card-amount .text-primary { color: var(--primary); }
.price-card-per {
  font-size: 0.78rem;
  font-weight: 400;
  color: rgba(255,255,255,0.4);
}
.price-card-save {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  margin-top: 4px;
}
.price-card-save s { opacity: 0.6; }
.price-card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
}
.price-card-features span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.price-card-features svg { color: var(--primary); width: 13px; height: 13px; }
.price-card-alt {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 24px;
}
@media (max-width: 600px) {
  .price-card-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .price-card-right { flex-direction: row; gap: 8px; align-items: center; width: 100%; }
  .price-card-right .btn { flex: 1; }
}

/* ---- Checkout Modal Redesign ---- */
.checkout-modal {
  background: var(--surface);
  border-radius: 20px;
  padding: 32px 28px;
  max-width: 400px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  transform: translateY(20px);
  transition: transform 0.3s var(--ease-out);
}
.checkout-modal-overlay.show .checkout-modal { transform: translateY(0); }
.checkout-modal .modal-close {
  position: absolute; top: 14px; right: 14px; background: none; border: none;
  cursor: pointer; color: var(--text-light-muted); padding: 4px;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: all 0.2s ease;
}
.checkout-modal .modal-close:hover { background: var(--border-light); color: var(--text-main); }
.checkout-modal-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px; font-size: 1rem; font-weight: 700; color: var(--text-main);
}
.checkout-plan-toggle {
  display: flex;
  background: var(--border-light);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 20px;
}
.checkout-toggle-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.checkout-toggle-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.checkout-toggle-btn:hover:not(.active) { color: var(--text-main); }
.checkout-summary {
  background: linear-gradient(135deg, #FAFBFD 0%, #F5F7FA 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 16px;
  text-align: center;
}
.checkout-plan {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}
.checkout-price {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--primary);
  font-family: 'Noto Serif TC', serif;
  line-height: 1.1;
}
.checkout-saved {
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 600;
  margin-top: 6px;
}
.checkout-unit-price {
  font-size: 0.78rem;
  color: var(--text-light-muted);
  margin-top: 4px;
}
.checkout-unit-price strong { color: var(--text-secondary); }
.checkout-course-inclusion {
  background: rgba(217,83,0,0.04);
  border: 1px solid rgba(217,83,0,0.12);
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}
.checkout-course-inclusion strong { color: var(--text-main); }
.checkout-social-proof {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-light-muted);
  margin-top: 8px;
}
.checkout-social-proof strong { color: var(--text-secondary); }
.checkout-trust {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 16px;
  font-size: 0.78rem;
  color: var(--text-light-muted);
}
.checkout-trust span { display: flex; align-items: center; gap: 4px; }
.checkout-trust svg { color: var(--primary); }
.checkout-footer-note {
  font-size: 0.75rem;
  color: var(--text-light-muted);
  text-align: center;
  margin-top: 10px;
  opacity: 0.7;
}
#checkout-go-btn {
  font-size: 1.05rem;
  padding: 16px;
  border-radius: 12px;
}

/* ---- Bridge Redesign ---- */
.course-to-ticket-bridge {
  background: linear-gradient(180deg, var(--dark) 0%, #0E2240 100%);
  padding: 48px 24px;
  text-align: center;
}
.bridge-inner {
  max-width: 560px;
  margin: 0 auto;
}
.bridge-tagline {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.bridge-desc {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.65;
  margin-bottom: 0;
}
.bridge-savings-calc {
  background: rgba(197,155,39,0.06);
  border: 1px solid rgba(197,155,39,0.15);
  border-radius: 10px;
  padding: 14px;
  margin-top: 16px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}
.bridge-savings-calc:empty { display: none; }
.bridge-arrow {
  margin-top: 20px;
  color: rgba(255,255,255,0.2);
  animation: bridgeBounce 2s ease-in-out infinite;
}
@keyframes bridgeBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ---- Dark mode overrides for new components ---- */
@media (prefers-color-scheme: dark) {
  .checkout-modal { background: #1a2332; }
  .checkout-summary { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }
  .checkout-plan-toggle { background: rgba(255,255,255,0.06); }
  .checkout-toggle-btn.active { background: rgba(255,255,255,0.1); color: var(--primary); box-shadow: none; }
  .checkout-plan, .checkout-modal-header span { color: rgba(255,255,255,0.85); }
  .checkout-course-inclusion { background: rgba(217,83,0,0.08); border-color: rgba(217,83,0,0.15); color: rgba(255,255,255,0.6); }
  .checkout-course-inclusion strong { color: rgba(255,255,255,0.9); }
  .skill-chip { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }
  .skill-chip-title { color: rgba(255,255,255,0.85); }
}

/* E24: Checkout Modal mobile full-screen scroll */
@media (max-width: 768px) {
  .checkout-modal-overlay .checkout-modal {
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}
