/* 西北訓犬學苑｜前台樣式
   色彩：深林綠（主色）、冠軍金（強調）、暖白（背景）。字體用系統字，速度優先。 */

:root {
  --green: #1F3A2E;
  --green-2: #2C5140;
  --green-soft: #E7EDE8;
  --gold: #C49A3A;
  --gold-dark: #7E5F18;      /* 金色文字：在米白、淺褐、白底都 ≥ 4.5:1 */
  --gold-btn: #D4AA4A;       /* 金色按鈕底，搭配深綠字 5.67:1 */
  --gold-btn-hover: #DDB65A;
  --paper: #F7F4EE;
  --tint: #EFEAE0;
  --white: #fff;
  --ink: #1B1B1B;
  --ink-2: #4A4A4A;
  --mute: #625E57;
  --line: #DDD6C8;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(31, 58, 46, .08);
  --wrap: 1160px;
  --header-h: 72px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Heiti TC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: clip; background: var(--paper); color: var(--ink); font: 17px/1.8 var(--font); letter-spacing: .02em; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--gold-dark); }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .5em; letter-spacing: .03em; }
h1 { font-size: clamp(30px, 4.6vw, 46px); }
h2, .h2 { font-size: clamp(24px, 3vw, 32px); }
h3, .h3 { font-size: 20px; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 8px 16px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.env-badge { position: fixed; left: 12px; bottom: 12px; z-index: 100; pointer-events: none; background: #8a2a1d; color: #fff;
  font-size: 11px; padding: 3px 12px; border-radius: 999px; opacity: .9; white-space: nowrap; }

.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-sm { width: 16px; height: 16px; }
.ic-lg { width: 36px; height: 36px; }

/* ---- 按鈕 ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: 999px;
  font-weight: 700; font-size: 16px; text-decoration: none; border: 2px solid transparent; line-height: 1.3; transition: .15s; white-space: nowrap; }
.btn-lg { padding: 14px 28px; font-size: 17px; }
.btn-block { width: 100%; margin-top: 10px; }
.btn-gold { background: var(--gold-btn); color: var(--green); }
.btn-gold:hover { background: var(--gold-btn-hover); color: var(--green); }
.btn-outline { border-color: var(--green); color: var(--green); background: transparent; }
.btn-outline:hover { background: var(--green); color: #fff; }
.btn-ghost-light { border-color: rgba(255,255,255,.8); color: #fff; }
.btn-ghost-light:hover { background: #fff; color: var(--green); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row-center { justify-content: center; }
.link-more { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; text-decoration: none; margin-top: 8px; }

/* ---- 頁首 ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247,244,238,.96); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--green); }
.logo-mark { width: 34px; height: 34px; fill: var(--gold); stroke: var(--gold); stroke-width: 1; }
.logo span { font-weight: 800; font-size: 21px; line-height: 1.1; letter-spacing: .08em; }
.logo small { display: block; font-size: 9.5px; letter-spacing: .14em; color: var(--mute); font-weight: 600; margin-top: 3px; }
.main-nav { flex: 1; }
.main-nav > ul { display: flex; gap: 4px; list-style: none; justify-content: center; }
.main-nav a { display: flex; align-items: center; gap: 2px; padding: 8px 12px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15.5px; border-radius: 8px; }
.main-nav a:hover, .main-nav .is-active > a { color: var(--green); background: var(--green-soft); }
.main-nav .nav-extra { display: none; }
.has-sub { position: relative; }
.sub { display: none; position: absolute; top: 100%; left: 0; min-width: 160px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); padding: 6px; list-style: none; }
.has-sub:hover .sub, .has-sub:focus-within .sub { display: block; }
.burger { display: none; margin-left: auto; background: none; border: 0; padding: 8px; color: var(--green); }
.burger .ic { width: 28px; height: 28px; }

/* ---- Hero ----
   左文右圖：文字放在深綠底上、不壓在照片上，任何照片（包含之後重拍的）都不會被文字擋住主體。 */
.hero { position: relative; min-height: min(78vh, 680px); min-height: min(78svh, 680px); display: flex; align-items: center; color: #fff; overflow: hidden; background: var(--green); }
.hero-media { position: absolute; top: 0; right: 0; bottom: 0; width: 60%; }
.hero-media img, .hero-media .img-missing { width: 100%; height: 100%; object-fit: cover; object-position: 22% 60%; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--green) 0%, rgba(31,58,46,.45) 8%, rgba(31,58,46,0) 22%); }
.hero-copy { position: relative; z-index: 1; padding-top: 64px; padding-bottom: 64px; }
/* 主視覺輪播：只有照片切換，標題與按鈕固定 */
.hero-slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .9s ease; }
.hero-slide.is-active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slide figcaption { position: absolute; right: 20px; bottom: 64px; z-index: 2; font-size: 13px; color: #fff; background: rgba(15,30,23,.55); padding: 4px 12px; border-radius: 999px; }
.hero-carousel::after { z-index: 1; pointer-events: none; }
.hero-controls { position: absolute; right: 20px; bottom: 18px; z-index: 3; display: flex; align-items: center; gap: 10px; }
.hero-arrow { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(15,30,23,.55); color: #fff; display: grid; place-items: center; }
.hero-arrow:hover { background: rgba(15,30,23,.8); }
.hero-dots { display: flex; gap: 2px; }
.hero-dot { width: 24px; height: 24px; border: 0; background: none; padding: 0; display: grid; place-items: center; }   /* 觸控目標 24px */
.hero-dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.55); transition: .2s; }
.hero-dot.is-active::before { background: #fff; width: 22px; border-radius: 999px; }
.hero-copy > * { max-width: 520px; }
.hero h1 { font-size: clamp(30px, 3.6vw, 46px); }
.hero-lead { font-size: clamp(16px, 1.6vw, 18px); opacity: .95; margin-bottom: 28px; }

/* ---- 區塊 ---- */
.section { padding: 80px 0; }
.section-flush { padding-top: 0; }
.section-tint { background: var(--tint); }
.section-dark { background: var(--green); color: #fff; }
.section-dark a:not(.btn) { color: #fff; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head-row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.section-title { margin-bottom: 12px; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .22em; color: var(--gold-dark); margin: 0 0 8px; }
.eyebrow-light { color: var(--gold); }
.lead { font-size: 18px; color: var(--ink-2); }
.section-dark .lead { color: rgba(255,255,255,.85); }
.note-small { font-size: 14px; color: var(--mute); margin-top: 20px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }

/* 信任數字 */
.stats { background: var(--green); color: #fff; padding: 32px 0; border-top: 1px solid rgba(255,255,255,.08); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center; }
.stat strong { display: block; font-size: clamp(30px, 3.6vw, 42px); color: var(--gold); line-height: 1.2; letter-spacing: .02em; }
.stat span { font-size: 15px; opacity: .9; }

/* 問題卡片 */
.problem-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.problem { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 24px 12px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: .15s; }
.problem:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.problem-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; }
.problem-icon .ic { width: 26px; height: 26px; }
.problem strong { font-size: 17px; }
.problem span:not(.problem-icon) { font-size: 14px; color: var(--mute); line-height: 1.6; }

/* 流程 */
.steps { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; counter-reset: s; }
.step { position: relative; padding-top: 8px; }
.step-num { width: 44px; height: 44px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 800; margin-bottom: 14px; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 30px; left: 56px; right: -12px; border-top: 2px dashed var(--line); }
.step strong { display: block; font-size: 17px; margin-bottom: 4px; }
.step p { font-size: 15px; color: var(--ink-2); line-height: 1.7; }

/* 課程卡片 */
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.course-card { overflow: hidden; display: flex; flex-direction: column; }
.course-card.is-featured { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.course-card-img { display: block; aspect-ratio: 16/10; overflow: hidden; background: var(--tint); }
.cover, .img-missing { width: 100%; height: 100%; object-fit: cover; }
.img-missing { background: var(--tint) repeating-linear-gradient(45deg, transparent 0 12px, rgba(0,0,0,.03) 12px 24px); min-height: 120px; }
.course-card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.course-card-body h2, .course-card-body h3 { margin-bottom: 6px; }
.course-card-body h2 a, .course-card-body h3 a { color: var(--ink); text-decoration: none; }
.course-card-body .btn, .course-card-body .link-more { margin-top: auto; align-self: flex-start; }
.course-step { font-size: 13px; font-weight: 800; letter-spacing: .12em; color: var(--gold-dark); margin-bottom: 6px; }
.course-suitable { font-size: 14px; color: var(--mute); margin-bottom: 8px; }
.course-goal { flex: 1; }
.price { font-size: 26px; font-weight: 800; color: var(--green); margin: 4px 0 14px; }
.price small { font-size: 15px; font-weight: 600; color: var(--mute); }

/* 學苑簡介（事實區塊：方便搜尋引擎與 AI 擷取） */
.split-text { grid-template-columns: 1.2fr 1fr; align-items: start; }
.fact-box { margin: 0; padding: 8px 24px; display: grid; }
.fact-box > div { display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.fact-box > div:last-child { border-bottom: 0; }
.fact-box dt { font-weight: 800; color: var(--green); font-size: 15px; }
.fact-box dd { margin: 0; font-size: 15.5px; }
.answer-box { background: var(--green-soft); border-left: 4px solid var(--green); border-radius: 0 12px 12px 0; padding: 16px 20px; margin-bottom: 24px; }
.answer-box-title { font-weight: 800; color: var(--green); margin-bottom: 4px; }
.answer-box p:last-child { margin: 0; }
.page-updated { font-size: 13px; margin: 14px 0 0; }
.page-head .page-updated { opacity: .8; }   /* 只在深綠標頭降低亮度；淺色背景沿用 --mute 以符合對比度 */

/* 比較表 */
.table-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.compare { width: 100%; border-collapse: collapse; min-width: 640px; }
.compare th, .compare td { padding: 14px 18px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 15.5px; }
.compare thead th { background: var(--green); color: #fff; }
.compare tbody th { width: 120px; color: var(--mute); font-weight: 700; }
.compare tr:last-child > * { border-bottom: 0; }

/* 訓練環境 */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.photo-mosaic { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 150px; gap: 10px; }
.photo-mosaic figure { margin: 0; border-radius: 12px; overflow: hidden; }
.photo-mosaic figure:first-child { grid-column: span 2; grid-row: span 2; }
.photo-mosaic figure:nth-child(5):last-child { grid-column: span 2; }
.check-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; margin: 8px 0 28px; }
.check-list li { display: flex; gap: 8px; align-items: flex-start; }
.check-list .ic { color: var(--gold); margin-top: 5px; }

/* 師資 */
.teacher-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.teacher-card { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 24px; align-items: start; }
.teacher-photo { display: block; aspect-ratio: 4/5; border-radius: 12px; overflow: hidden; background: var(--tint); }
.teacher-card h3 { margin-bottom: 2px; }
.teacher-card h3 a { color: var(--ink); text-decoration: none; }
.teacher-title { color: var(--gold-dark); font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.award-list { list-style: none; display: grid; gap: 8px; }
.award-list li { display: flex; gap: 8px; font-size: 15px; line-height: 1.6; }
.award-list .ic { color: var(--gold); margin-top: 4px; }
.profile { display: grid; grid-template-columns: 420px 1fr; gap: 56px; align-items: start; }
.profile-reverse { grid-template-columns: 1fr 420px; }
.profile-reverse .profile-photo { order: 2; }
.profile-photo { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/5; background: var(--tint); position: sticky; top: calc(var(--header-h) + 20px); }
.profile h3 { margin-top: 28px; font-size: 18px; }
.timeline-mini { list-style: none; display: grid; gap: 6px; margin-bottom: 12px; font-size: 15px; }
.timeline-mini b { display: inline-block; width: 48px; color: var(--green); }

/* 見證、影片 */
.story-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: start; }
.quote-stack { display: grid; gap: 16px; }
.quote { margin: 0; padding: 22px 24px; }
.quote p { font-size: 16px; }
.quote footer { font-size: 14px; color: var(--mute); }
.video { margin: 0; }
.video-facade { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: #000; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .88; }
.video-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-file video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.video-play { position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%; border: 0; background: var(--gold-btn); color: var(--green);
  display: grid; place-items: center; box-shadow: 0 6px 24px rgba(0,0,0,.35); transition: .15s; }
.video-play:hover { transform: scale(1.08); }
.video-play .ic { width: 28px; height: 28px; stroke: none; margin-left: 4px; }
.video figcaption { font-size: 15px; margin-top: 10px; color: var(--ink-2); }
.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.testimonial-grid { columns: 3 300px; column-gap: 20px; }
.testimonial { break-inside: avoid; margin-bottom: 20px; overflow: hidden; }
.testimonial-img { display: block; }
.testimonial-body { padding: 18px 20px; }
.testimonial-body h3 { font-size: 17px; margin-bottom: 4px; }

/* 文章卡片 */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card { overflow: hidden; display: flex; flex-direction: column; }
.post-card-img { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--tint); }
.post-card-body { padding: 18px 22px 22px; }
.post-card h3 { font-size: 18px; margin-bottom: 6px; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card p:last-child { font-size: 15px; color: var(--ink-2); margin: 0; }
.meta { font-size: 14px; color: var(--mute); margin-bottom: 6px; }

/* FAQ */
.faq-list details { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; }
.faq-list summary { list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 16px 20px; font-weight: 700; cursor: pointer; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary .ic { transition: .2s; color: var(--gold-dark); }
.faq-list details[open] summary .ic { transform: rotate(180deg); }
.faq-answer { padding: 0 20px 18px; color: var(--ink-2); }

/* 聯絡區塊 */
.contact-block { padding: 80px 0; background: var(--white); border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: stretch; }
.contact-list { margin: 0 0 28px; display: grid; gap: 14px; }
.contact-list > div { display: grid; grid-template-columns: 84px 1fr; gap: 8px; }
.contact-list dt { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--green); }
.contact-list dd { margin: 0; }
.contact-list dd a { display: inline-block; margin-right: 16px; font-weight: 700; font-size: 18px; text-decoration: none; }
.map-facade { border-radius: var(--radius); overflow: hidden; min-height: 360px; position: relative;
  background: var(--green-soft) linear-gradient(135deg, rgba(31,58,46,.06) 25%, transparent 25%, transparent 50%, rgba(31,58,46,.06) 50%, rgba(31,58,46,.06) 75%, transparent 75%) 0 0/40px 40px; }
.map-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-load { position: absolute; inset: 0; width: 100%; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--green); }
.map-load .ic-lg { color: var(--gold); }
.map-load span { color: var(--ink-2); font-size: 15px; }
.map-load .map-load-cta { margin-top: 10px; padding: 8px 18px; background: #fff; border-radius: 999px; border: 1px solid var(--line); font-weight: 700; color: var(--green); }

/* 內頁標頭 */
.page-head { background: var(--green); color: #fff; padding: 40px 0 48px; }
.page-head h1 { margin-bottom: 10px; }
.h1-sub { display: block; font-size: .56em; font-weight: 700; opacity: .9; margin-top: 6px; letter-spacing: .02em; }
.page-head .eyebrow { color: var(--gold); }
.page-intro { font-size: 18px; max-width: 760px; opacity: .92; margin: 0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; margin-bottom: 18px; opacity: .85; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.breadcrumbs a { color: #fff; }

/* 文章內文 */
.prose { font-size: 17px; }
.prose h2 { font-size: 24px; margin: 1.8em 0 .6em; }
.prose h3 { font-size: 20px; margin: 1.5em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.4em; margin-bottom: 1em; }
.prose li { margin-bottom: .3em; }
.prose img { border-radius: 12px; margin: 1.2em 0; }
.prose figure { margin: 1.6em 0; }
.prose figure img { margin: 0; width: 100%; max-height: 540px; object-fit: cover; object-position: 50% 30%; }
.prose figcaption { font-size: 14px; color: var(--mute); margin-top: 8px; }
.prose blockquote { margin: 1.4em 0; padding: 12px 20px; border-left: 4px solid var(--gold); background: var(--tint); border-radius: 0 10px 10px 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 15.5px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose th { background: var(--tint); }
.prose > :first-child { margin-top: 0; }
.article { padding-bottom: 64px; }
.article-meta { margin: 24px 0 20px; }
.article-cover { margin: 0 0 24px; border-radius: var(--radius); overflow: hidden; }
.article-summary { font-size: 17.5px; padding: 18px 22px; background: var(--green-soft); border-left: 4px solid var(--green); border-radius: 0 12px 12px 0; margin-bottom: 28px; }
.article-summary p:last-child { margin: 0; }
.author-box { display: grid; grid-template-columns: 96px 1fr; gap: 20px; padding: 22px; margin: 40px 0 24px; }
.author-photo { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--tint); }
.author-name { font-weight: 700; margin-bottom: 4px; }
.cta-box { background: var(--green); color: #fff; border-radius: var(--radius); padding: 28px; }
.cta-title { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.preview-bar { background: #8a2a1d; color: #fff; text-align: center; padding: 8px; font-size: 14px; }

/* 課程細節 */
.course-detail { display: grid; grid-template-columns: 1fr 340px; gap: 48px; align-items: start; }
.course-hero { margin: 0 0 24px; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; }
.item-list { list-style: none; counter-reset: it; display: grid; gap: 10px; margin-bottom: 40px; }
.item-list li { counter-increment: it; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px 14px 58px; position: relative; }
.item-list li::before { content: counter(it); position: absolute; left: 16px; top: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-weight: 800; font-size: 14px; display: grid; place-items: center; }
.item-list strong { display: block; }
.item-list span { color: var(--ink-2); font-size: 15.5px; }
.sticky-card { position: sticky; top: calc(var(--header-h) + 20px); padding: 24px; }
.facts { margin: 12px 0 8px; display: grid; gap: 10px; }
.facts dt { font-size: 13px; color: var(--mute); font-weight: 700; }
.facts dd { margin: 0; font-size: 15.5px; }
.facts .price { margin: 0; }
.course-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.course-pager a { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; text-decoration: none; }

/* 冠軍紀錄 */
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 16px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.chip.is-active { background: var(--green); border-color: var(--green); color: #fff; }
a.chip { text-decoration: none; }
a.chip:hover { border-color: var(--green); color: var(--green); }
.timeline-year { display: grid; grid-template-columns: 100px 1fr; gap: 24px; padding: 20px 0; border-top: 1px solid var(--line); }
.timeline-label { font-size: 28px; color: var(--green); margin: 0; }
.timeline-year ul { list-style: none; display: grid; gap: 10px; }
.timeline-year li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.timeline-year li small { color: var(--mute); }
.tag { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--tint); color: var(--ink-2); }
.tag-world { background: var(--gold-btn); color: var(--green); }
.tag-overseas { background: var(--green-soft); color: var(--green); }
.press-list { list-style: none; display: grid; gap: 12px; }
.press-list li { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.press-list time { color: var(--mute); font-size: 15px; }
.press-list a { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }

.section-flush-bottom { padding-bottom: 0; }
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0; }
.stat-strip > div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.stat-strip dt { font-size: 14px; color: var(--mute); font-weight: 700; }
.stat-strip dd { margin: 0; font-size: 24px; font-weight: 800; color: var(--green); }
@media (max-width: 900px) { .stat-strip { grid-template-columns: repeat(2, 1fr); } .stat-strip dd { font-size: 20px; white-space: nowrap; } }
.profile .fact-box { margin: 8px 0 20px; }

/* 相簿、燈箱 */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.gallery figure { margin: 0; }
.gallery a { display: block; aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; background: var(--tint); }
.gallery figcaption { font-size: 14px; color: var(--mute); margin-top: 6px; }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(10,15,12,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.lightbox img { max-height: 82vh; width: auto; border-radius: 8px; }
.lightbox p { color: #fff; margin-top: 12px; }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); border: 0; color: #fff; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; }
.lightbox .lb-close { top: 16px; right: 16px; }
.lightbox .lb-prev { left: 16px; top: 50%; }
.lightbox .lb-next { right: 16px; top: 50%; }

.pager { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.pager a, .pager span { min-width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: #fff; text-decoration: none; font-weight: 700; }
.pager span { background: var(--green); color: #fff; border-color: var(--green); }
.empty { padding: 36px; text-align: center; max-width: 640px; margin: 0 auto; }
.upcoming { list-style: none; display: grid; gap: 6px; margin: 0 0 16px; color: var(--ink-2); }

.faq-q { font-size: inherit; margin: 0; line-height: 1.5; font-weight: 700; }
.faq-group { margin-bottom: 40px; scroll-margin-top: calc(var(--header-h) + 16px); }
.related-links { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; padding-top: 20px; border-top: 1px solid var(--line); }
.related-links .meta { margin: 0; width: 100%; }
.related-links a { font-weight: 700; }
.article-faq { margin-top: 40px; }
.article-faq h2 { font-size: 24px; }

/* 頁尾 */
.site-footer { background: #15241D; color: rgba(255,255,255,.75); padding: 48px 0 40px; font-size: 15px; }
.site-footer a { color: rgba(255,255,255,.9); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1.4fr 1fr; gap: 40px; }
.footer-brand { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: .08em; }
.footer-links { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 16px; }
.footer-links a { text-decoration: none; display: inline-block; padding: 6px 0; min-height: 24px; }   /* 觸控目標至少 24px */
.social { display: flex; gap: 10px; margin-bottom: 16px; }
.social a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); }
.social a:hover { background: var(--gold-btn); color: var(--green); }
.copyright { font-size: 13px; opacity: .7; }

/* 手機底部固定列、電話選單 */
.mobile-bar { display: none; }
.call-sheet { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; }
.call-sheet[hidden] { display: none; }
.call-sheet-panel { background: #fff; width: 100%; max-width: 440px; border-radius: 18px 18px 0 0; padding: 18px 18px calc(24px + env(safe-area-inset-bottom)); }
@media (min-width: 601px) { .call-sheet { align-items: center; } .call-sheet-panel { border-radius: 18px; } }
.call-sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.call-sheet-head p { margin: 0; font-weight: 800; }
.call-sheet-close { background: none; border: 0; padding: 6px; color: var(--mute); }
.call-sheet-num { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; padding: 16px; border: 1.5px solid var(--line); border-radius: 12px;
  font-size: 22px; font-weight: 800; text-decoration: none; letter-spacing: .04em; }
.call-sheet-num:hover { border-color: var(--gold); }
.call-sheet-note { font-size: 14px; color: var(--mute); text-align: center; margin: 14px 0 0; }

/* ---- 響應式 ---- */
@media (max-width: 1080px) {
  .main-nav a { padding: 8px 8px; font-size: 15px; }
  .header-call { padding: 10px 14px; }
  .problem-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); row-gap: 32px; }
  .step::after { display: none; }
  .teacher-card { grid-template-columns: 130px 1fr; }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }
  body { font-size: 16px; }
  .burger { display: block; }
  .header-call { display: none; }
  /* backdrop-filter 會讓 fixed 的選單以頁首為定位基準，手機版拿掉 */
  .site-header { backdrop-filter: none; background: var(--paper); }
  .main-nav { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; background: var(--paper); padding: 12px 20px 120px; overflow-y: auto;
    opacity: 0; transform: translateY(-8px); visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s; }
  .main-nav.is-open { opacity: 1; transform: none; visibility: visible; }
  .main-nav > ul { flex-direction: column; gap: 0; }
  .main-nav a { padding: 14px 4px; font-size: 18px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .main-nav .nav-extra { display: block; }
  .main-nav .has-sub > a .ic { display: none; }
  .sub { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 0 16px; background: none; }
  .sub a { font-size: 16px; color: var(--ink-2); }
  body.nav-open { overflow: hidden; }

  .section { padding: 56px 0; }
  .hero { flex-direction: column; align-items: stretch; min-height: 0; }
  .hero-media { position: relative; width: 100%; height: auto; aspect-ratio: 3 / 2; }
  .hero-media::after { background: linear-gradient(180deg, rgba(31,58,46,0) 60%, var(--green) 100%); }
  .hero-controls { right: 12px; bottom: 12px; }
  .hero-arrow { display: none; }
  .hero-toggle { display: grid; width: 30px; height: 30px; }   /* 手機只留暫停鍵與圓點 */
  .hero-slide figcaption { display: none; }
  .hero-copy { padding-top: 8px; padding-bottom: 40px; }
  .hero-copy > * { max-width: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 20px; }
  .problem-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .steps { grid-template-columns: 1fr; gap: 18px; }
  .step { display: grid; grid-template-columns: 44px 1fr; column-gap: 16px; padding: 0; }
  .step-num { grid-row: span 2; margin: 0; }
  .step p { margin: 0; }
  .course-grid, .post-grid, .teacher-grid, .video-grid, .story-grid, .split, .contact-grid, .course-detail, .footer-grid { grid-template-columns: 1fr; }
  .split { gap: 32px; }
  .fact-box > div { grid-template-columns: 64px 1fr; }
  .check-list { grid-template-columns: 1fr; }
  .teacher-card { grid-template-columns: 110px 1fr; gap: 16px; padding: 18px; }
  .profile, .profile-reverse { grid-template-columns: 1fr; gap: 28px; }
  .profile-reverse .profile-photo { order: 0; }
  .profile-photo { position: static; max-width: 420px; }
  .sticky-card { position: static; }
  .course-aside { order: -1; }
  .timeline-year { grid-template-columns: 1fr; gap: 8px; }
  .press-list li { grid-template-columns: 1fr; gap: 2px; }
  .section-head-row { align-items: flex-start; flex-direction: column; }
  .map-facade { min-height: 280px; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
  .site-footer { padding-bottom: 110px; }

  .mobile-bar { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: rgba(255,255,255,.97);
    border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); transform: translateY(110%); transition: transform .25s; }
  .mobile-bar.is-visible, body:not(.is-home) .mobile-bar { transform: none; }
  .mobile-bar .btn { flex: 1; padding: 12px 10px; }
  .env-badge { bottom: 86px; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .hero h1 { font-size: min(6.2vw, 30px); letter-spacing: 0; }
  .hero-copy { padding-bottom: 40px; }
  .btn-lg { padding: 13px 22px; font-size: 16px; }
  .hero .btn-row .btn { flex: 1 1 100%; }
  .photo-mosaic { grid-auto-rows: 110px; }
  .contact-list > div { grid-template-columns: 1fr; gap: 0; }
  .author-box { grid-template-columns: 64px 1fr; }
  .author-photo { width: 64px; height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
.story-grid-solo { grid-template-columns: 1fr; max-width: 820px; margin-inline: auto; }
