/* ==========================================================================
   築雲 BYOC 前台設計系統（所有樣板共用）
   各樣板只要覆寫下方的設計變數，再加上自己的主視覺與區塊設計。
   原則：中文長文易讀（字級 16px、行高 1.8）、流動字級（clamp）、8 的倍數間距、
   無障礙（對比、鍵盤焦點、減少動態）、手機優先、內容少的時候也好看。
   ========================================================================== */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f4f6;
  --text: #15161a;
  --muted: #5c6068;
  --border: #e4e5ea;
  --accent: #4f46e5;
  --accent-2: #06b6d4;
  --accent-ink: #ffffff;
  --danger: #b42318;

  --font-body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --font-display: var(--font-body);
  --font-latin: var(--font-display);

  --radius: 18px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --container: 1240px;
  --narrow: 760px;
  --gutter: clamp(20px, 4.5vw, 56px);
  --section: clamp(59px, 8.2vw, 125px);
  --header-h: 76px;

  --shadow-sm: 0 1px 2px rgba(16, 18, 27, .06), 0 1px 1px rgba(16, 18, 27, .04);
  --shadow: 0 10px 30px -12px rgba(16, 18, 27, .18), 0 2px 6px rgba(16, 18, 27, .05);
  --shadow-lg: 0 40px 80px -30px rgba(16, 18, 27, .35);

  --ease: cubic-bezier(.22, .8, .2, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --dur: .6s;

  --fs-display: clamp(36px, 6.2vw, 89px);
  --fs-h1: clamp(31px, 4.3vw, 58px);
  --fs-h2: clamp(24px, 2.9vw, 41px);
  --fs-h3: clamp(16px, 1.4vw, 20px);
  --fs-lead: clamp(15px, 1.2vw, 18px);
}

/* ---------- 基本設定 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.8 var(--font-body);
  letter-spacing: .015em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "palt" 0;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.22; letter-spacing: -.005em; margin: 0 0 .55em; font-weight: 800; text-wrap: balance; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.4; }
h4 { font-size: 18px; }
p { margin: 0 0 1.1em; text-wrap: pretty; }
small { font-size: .86em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
code { font-size: .9em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 8px; text-decoration: none; transition: top .2s; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 版面 ---------- */
.site-main { min-height: 60vh; }
.wrap { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.wrap > .block:first-child { margin-top: clamp(40px, 6vw, 88px); }
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: var(--narrow); margin-left: auto; margin-right: auto; }
.block { margin: var(--section) 0; }
.section { padding: calc(var(--section) / 2) 0; }
.section:first-child, .section.is-full { padding: var(--section) 0; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: clamp(16px, 2vw, 28px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.section-head { max-width: 780px; margin: 0 0 clamp(32px, 4.5vw, 64px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2, .section-head h1 { margin: 0; }
.section-head h1 { font-size: var(--fs-h2); }
.section-head p { margin: 16px 0 0; color: var(--muted); font-size: var(--fs-lead); }
.section-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(32px, 4.5vw, 64px); }
.section-head-row .section-head { margin: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 700 13px/1 var(--font-latin); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.lead { font-size: var(--fs-lead); color: var(--muted); }
.muted { color: var(--muted); }

/* ---------- 按鈕 ---------- */
.btn {
  --btn-bg: var(--accent); --btn-fg: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: 12px 26px; border-radius: var(--radius-pill);
  background: var(--btn-bg); color: var(--btn-fg); border: 1.5px solid var(--btn-bg);
  font: 700 16px/1.2 var(--font-body); letter-spacing: .04em; text-decoration: none; cursor: pointer;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .25s, color .25s, border-color .25s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { color: var(--btn-fg); transform: translateY(-2px); box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--btn-bg) 80%, transparent); }
.btn:active { transform: translateY(0); }
.btn::after { content: "→"; font-family: system-ui, sans-serif; transition: transform .35s var(--ease); }
.btn:hover::after { transform: translateX(4px); }
.btn.no-arrow::after, .btn-sm::after, button.btn::after, .btn-secondary::after { display: none; }
.btn-secondary { --btn-bg: transparent; --btn-fg: var(--text); border-color: color-mix(in srgb, var(--text) 25%, transparent); }
.btn-secondary:hover { --btn-fg: var(--text); border-color: var(--text); box-shadow: none; }
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: 15px; }
.btn-lg { min-height: 58px; padding: 16px 34px; font-size: 17px; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.link-button { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
.text-link { font-weight: 700; color: var(--accent); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.text-link::after { content: "→"; transition: transform .3s var(--ease); }
.text-link:hover::after { transform: translateX(4px); }

/* ---------- 卡片、標籤、提示 ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(22px, 2.6vw, 36px); }
.card > :last-child { margin-bottom: 0; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; line-height: 1.4; padding: 4px 12px; border-radius: var(--radius-pill); background: var(--surface-2); color: var(--text); font-weight: 600; letter-spacing: .03em; }
.tag.waitlist { background: #fff4e0; color: #8a4b00; }
.tag.full { background: #fde9e8; color: var(--danger); }
.flash-success, .flash-error { padding: 14px 18px; border-radius: var(--radius-sm); margin: 0 0 18px; font-size: 15px; line-height: 1.7; }
.flash-success { background: #e9f8ef; color: #0c5c34; border: 1px solid #b6e6c8; }
.flash-error { background: #fdeceb; color: #9f1d14; border: 1px solid #f5c2bd; }
.empty-state { text-align: center; padding: 48px 24px; color: var(--muted); border: 1.5px dashed var(--border); border-radius: var(--radius); }

/* ---------- 表單 ---------- */
label { display: block; font-weight: 700; font-size: 15px; margin: 20px 0 8px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=url], input[type=search], select, textarea {
  width: 100%; min-height: 50px; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: 400 16px/1.6 var(--font-body);
  transition: border-color .2s, box-shadow .2s, background-color .2s; appearance: none;
}
textarea { min-height: 120px; resize: vertical; }
select { background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
input[readonly] { background: var(--surface-2); color: var(--muted); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; flex: 0 0 auto; }
input[type=file] { font: inherit; font-size: 15px; }
form button[type=submit]:not(.btn):not(.link-button) { font: inherit; }
.form-section-label { font: 700 13px/1 var(--font-latin); letter-spacing: .14em; color: var(--accent); margin: 28px 0 4px; text-transform: uppercase; }
.form-divider { border: 0; border-top: 1px solid var(--border); margin: 28px 0 8px; }

/* ---------- 活動報名頁：場次清單 ---------- */
.session-item { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; padding: 20px 24px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 12px; transition: border-color .25s, box-shadow .25s, transform .3s var(--ease); }
.session-item:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--shadow); transform: translateY(-2px); }
.session-item strong { font-size: 18px; }
.session-item > div:last-child { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { font-weight: 700; color: var(--muted); font-size: 13px; letter-spacing: .06em; }

/* ---------- 頁首 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: transform .45s var(--ease), background-color .3s, border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }
.site-header.is-hidden { transform: translateY(-100%); }
.header-bar { height: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; margin-right: auto; }
.brand:hover { color: inherit; }
.brand-logo { height: 42px; width: auto; max-width: 160px; object-fit: contain; border-radius: 8px; }
.brand-mark { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font: 800 20px/1 var(--font-display); }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font: 800 18px/1.25 var(--font-display); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-tagline { font-size: 12.5px; line-height: 1.4; color: var(--muted); letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a { position: relative; padding: 8px 14px; font-size: 15.5px; font-weight: 500; text-decoration: none; letter-spacing: .04em; border-radius: var(--radius-pill); white-space: nowrap; transition: color .2s; }
.site-nav a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.site-nav a:hover { color: var(--accent); }
.site-nav a:hover::after, .site-nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
.site-nav a.is-active { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; position: relative; width: 46px; height: 46px; border: 1.5px solid var(--border); border-radius: 50%; background: var(--surface); cursor: pointer; padding: 0; color: var(--text); }
.nav-toggle span { position: absolute; left: 13px; right: 13px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .4s var(--ease), top .4s var(--ease); }
.nav-toggle span:first-child { top: 18px; }
.nav-toggle span:last-child { top: 25px; }
.nav-open .nav-toggle span:first-child { top: 21.5px; transform: rotate(45deg); }
.nav-open .nav-toggle span:last-child { top: 21.5px; transform: rotate(-45deg); }
@media (max-width: 1100px) { .site-nav a { padding: 8px 10px; font-size: 15px; } .site-nav a::after { left: 10px; right: 10px; } }
@media (max-width: 980px) {
  .site-nav { display: none; }
  .nav-toggle { display: block; }
  :root { --header-h: 68px; }
}
@media (max-width: 480px) {
  .header-cta { display: none; }
  .brand-tagline { display: none; }
  .brand-name { font-size: 16.5px; }
  .brand-mark, .brand-logo { height: 38px; } .brand-mark { width: 38px; }
}

/* 手機選單（全螢幕） */
.mobile-menu { position: fixed; inset: 0; z-index: 55; padding: calc(var(--header-h) + 24px) var(--gutter) 32px; background: var(--bg); display: flex; flex-direction: column; justify-content: space-between; opacity: 0; transform: translateY(-12px); transition: opacity .35s var(--ease), transform .45s var(--ease); overflow-y: auto; }
.mobile-menu.is-open { opacity: 1; transform: none; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a { font: 800 clamp(26px, 7vw, 40px)/1.25 var(--font-display); text-decoration: none; padding: 12px 0; border-bottom: 1px solid var(--border); opacity: 0; transform: translateY(12px); transition: opacity .5s var(--ease), transform .5s var(--ease); transition-delay: calc(var(--i, 0) * 45ms + 80ms); }
.mobile-menu.is-open nav a { opacity: 1; transform: none; }
.mobile-menu nav a.is-active { color: var(--accent); }
.mobile-menu-foot { display: flex; flex-direction: column; gap: 10px; padding-top: 28px; font-size: 16px; }
.mobile-menu-foot .btn { align-self: flex-start; }
.mobile-menu-foot a:not(.btn) { color: var(--muted); text-decoration: none; }
body.nav-open { overflow: hidden; }
body.nav-open .site-header { background: var(--bg); border-bottom-color: var(--border); }

/* ---------- 頁尾 ---------- */
.site-footer { margin-top: var(--section); border-top: 1px solid var(--border); font-size: 15px; }
.footer-cta { padding: clamp(52px, 7.4vw, 105px) var(--gutter); text-align: center; background: var(--surface-2); }
.footer-cta-inner { max-width: 820px; margin: 0 auto; }
.footer-cta-eyebrow { font: 700 13px/1 var(--font-latin); letter-spacing: .2em; color: var(--accent); margin-bottom: 18px; }
.footer-cta-title { font-size: clamp(26px, 3.8vw, 50px); margin-bottom: 32px; }
.footer-main { max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: clamp(48px, 6vw, 88px) var(--gutter) 40px; display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer-org { font: 800 22px/1.3 var(--font-display); margin-bottom: 6px; }
.footer-tagline { color: var(--muted); margin-bottom: 14px; }
.footer-about { color: var(--muted); font-size: 14.5px; max-width: 420px; }
.footer-heading { font: 700 12.5px/1 var(--font-latin); letter-spacing: .18em; color: var(--muted); margin-bottom: 18px; text-transform: uppercase; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { text-decoration: none; }
.footer-bottom { max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 24px var(--gutter) 40px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; border-top: 1px solid var(--border); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { text-decoration: none; }
@media (max-width: 800px) { .footer-main { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-main { grid-template-columns: 1fr; } }

/* ---------- 內頁標題 ---------- */
.page-hero { padding: clamp(46px, 6.6vw, 98px) 0 clamp(26px, 3.3vw, 46px); }
.page-hero h1 { margin: 0; max-width: 18em; }
.page-hero .lead { margin: 18px 0 0; max-width: 40em; }
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { text-decoration: none; }

/* ---------- 文章內文（消息、自訂頁面、關於我們） ---------- */
.prose { font-size: 18px; line-height: 1.95; max-width: 46em; }
.prose h3 { font-size: clamp(18px, 1.7vw, 22px); margin: 2em 0 .6em; }
.prose ul { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose a { color: var(--accent); }
.prose img { border-radius: var(--radius); margin: 1.5em 0; }

/* ---------- 共用元件：組織架構、相簿、評分 ---------- */
.custom-page h2 { font-size: var(--fs-h1); }
.custom-page-gallery img { transition: transform .6s var(--ease); }
.custom-page-gallery a { overflow: hidden; border-radius: var(--radius-sm); display: block; }
.custom-page-gallery a:hover img { transform: scale(1.04); }
.rating-opt { border-radius: var(--radius-sm) !important; transition: border-color .2s, background-color .2s; }

/* ---------- 捲動淡入 ---------- */
.js [data-reveal] { opacity: 0; transform: translate3d(0, 28px, 0); transition: opacity .9s var(--ease), transform 1s var(--ease); transition-delay: var(--reveal-delay, 0ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
img[data-fade] { opacity: 0; transition: opacity .8s var(--ease); }
img[data-fade].is-loaded { opacity: 1; }

/* ---------- 列印 ---------- */
@media print {
  .site-header, .mobile-menu, .site-footer, .skip-link { display: none !important; }
  body { font-size: 12pt; }
}

/* ---------- 減少動態效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js [data-reveal], img[data-fade] { opacity: 1 !important; transform: none !important; }
}

/* ==========================================================================
   共用元件版型（各樣板再調整外觀）
   ========================================================================== */

/* ---------- 數據 ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; margin: 0; }
.stat { display: flex; flex-direction: column-reverse; gap: 6px; padding: clamp(20px, 2.4vw, 32px); }
.stat-num { margin: 0; font: 700 clamp(34px, 4.2vw, 60px)/1 var(--font-latin); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 14.5px; color: var(--muted); letter-spacing: .06em; }

/* ---------- 跑馬燈（合作夥伴） ---------- */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { flex: 0 0 auto; padding: 0 clamp(24px, 3vw, 44px); white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; } .marquee-item[aria-hidden] { display: none; } }

/* ---------- 便當格（服務特色） ---------- */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); }
.bento.has-mission { grid-template-columns: 1.25fr 1fr 1fr; }
.bento.has-mission .mission { grid-row: span 2; }
/* 依卡片數量排版，不留空格：f-N 是服務特色的數量 */
.bento.f-1:not(.has-mission) { grid-template-columns: 1fr; }
.bento.f-2:not(.has-mission), .bento.f-4:not(.has-mission) { grid-template-columns: 1fr 1fr; }
.bento.has-mission.f-1 { grid-template-columns: 1.25fr 1fr; }
.bento.has-mission.f-1 .mission { grid-row: auto; }
.bento.has-mission.f-2 .bento-card:not(.mission) { grid-column: span 2; }
.bento.has-mission.f-3 .bento-card:last-child { grid-column: span 2; }
.bento.has-mission.f-0 { grid-template-columns: 1fr; }
.bento.has-mission.f-0 .mission { grid-row: auto; }
.bento-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: clamp(24px, 2.6vw, 36px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); min-height: 220px; isolation: isolate; transition: transform .5s var(--ease), border-color .3s, box-shadow .5s var(--ease); }
.bento-card::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%); }
.bento-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.bento-card:hover::before { opacity: 1; }
.bento-card h3 { margin: 0; }
.bento-card p { margin: 0; color: var(--muted); }
.bento-card .text-link { margin-top: auto; }
.bento-icon { font-size: 26px; line-height: 1; }
.bento-num { position: absolute; top: clamp(20px, 2.4vw, 32px); right: clamp(22px, 2.4vw, 32px); font: 600 14px/1 var(--font-latin); color: var(--muted); letter-spacing: .1em; }
@media (max-width: 900px) { .bento, .bento.has-mission { grid-template-columns: 1fr 1fr; } .bento.has-mission .mission { grid-column: 1 / -1; grid-row: auto; } }
@media (max-width: 560px) {
  .bento, .bento.has-mission, .bento[class*="f-"] { grid-template-columns: 1fr !important; }
  .bento .bento-card { grid-column: auto !important; grid-row: auto !important; min-height: 0; }
}
@media (min-width: 561px) and (max-width: 900px) {
  .bento.has-mission .bento-card:not(.mission) { grid-column: auto !important; }
  .bento.has-mission.f-1 .bento-card:not(.mission), .bento.has-mission.f-3 .bento-card:last-child { grid-column: 1 / -1 !important; }
}

/* ---------- 活動 ---------- */
.events { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); }
.event-card.is-feature { grid-column: 1 / -1; }
.event-link { position: relative; display: flex; gap: clamp(18px, 2vw, 28px); height: 100%; padding: clamp(20px, 2.4vw, 32px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: inherit; transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .3s; }
.event-link:hover { color: inherit; transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.event-date { flex: 0 0 auto; width: 84px; align-self: flex-start; display: flex; flex-direction: column; align-items: center; padding: 12px 0 10px; border-radius: 14px; background: var(--surface-2); line-height: 1.1; }
.event-month { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .08em; }
.event-day { font: 700 38px/1.05 var(--font-latin); letter-spacing: -.02em; }
.event-weekday { font-size: 12.5px; color: var(--muted); }
.event-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; flex: 1; }
.event-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.event-badge { font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); letter-spacing: .06em; }
.event-badge.is-past { background: var(--surface-2); color: var(--muted); }
.event-badge.is-planned { background: transparent; border: 1px dashed currentColor; }
.event-price { font-size: 14px; font-weight: 700; color: var(--muted); }
.event-title { font: 800 clamp(20px, 1.8vw, 24px)/1.35 var(--font-display); }
.event-when { font-size: 15px; color: var(--muted); }
.event-desc { color: var(--muted); font-size: 15.5px; }
.event-cta { margin-top: auto; padding-top: 8px; font-weight: 700; color: var(--accent); display: inline-flex; gap: 8px; }
.event-cta::after { content: "→"; transition: transform .35s var(--ease); }
.event-link:hover .event-cta::after { transform: translateX(5px); }
.event-card.is-feature .event-title { font-size: clamp(22px, 2.6vw, 34px); }
.event-card.is-feature .event-date { width: 104px; }
.event-card.is-feature .event-day { font-size: 50px; }
.event-card.is-feature.has-image .event-link { display: grid; grid-template-columns: minmax(0, 1.1fr) auto minmax(0, 1fr); align-items: start; }
.event-image { display: block; overflow: hidden; border-radius: calc(var(--radius) - 6px); aspect-ratio: 16 / 10; background: var(--surface-2); }
.event-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.event-link:hover .event-image img { transform: scale(1.05); }
.event-card.is-past .event-link { opacity: .78; }
.events.is-single { grid-template-columns: 1fr; }
.events-empty { text-align: center; padding: clamp(48px, 7vw, 96px) 24px; border-radius: var(--radius); border: 1.5px dashed var(--border); }
.events-empty-title { font: 800 clamp(22px, 2.4vw, 30px)/1.3 var(--font-display); margin-bottom: 8px; }
@media (max-width: 760px) {
  .events { grid-template-columns: 1fr; }
  .event-card.is-feature.has-image .event-link { grid-template-columns: auto minmax(0, 1fr); }
  .event-card.is-feature.has-image .event-image { grid-column: 1 / -1; }
  .event-date { width: 68px; } .event-day { font-size: 30px; }
  .event-card.is-feature .event-date { width: 76px; } .event-card.is-feature .event-day { font-size: 36px; }
}

/* ---------- 活動頁（報名） ---------- */
.event-page { padding-top: clamp(32px, 5vw, 72px); }
.event-hero { display: grid; grid-template-columns: 1fr; gap: clamp(28px, 4vw, 64px); align-items: center; margin-bottom: clamp(40px, 6vw, 88px); }
.event-hero.has-image { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.event-hero h1 { font-size: clamp(29px, 4.3vw, 58px); margin-bottom: 28px; }
.event-hero-image { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-2); }
.event-hero-image img { width: 100%; height: 100%; object-fit: cover; }
.event-facts { display: grid; gap: 0; margin: 0 0 32px; border-top: 1px solid var(--border); max-width: 640px; }
.event-facts > div { display: grid; grid-template-columns: 72px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.event-facts dt { font: 700 13px/1.9 var(--font-latin); letter-spacing: .14em; color: var(--muted); }
.event-facts dd { margin: 0; font-weight: 600; }
.event-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.event-section + .event-section { margin-top: clamp(40px, 5vw, 72px); }
.event-section-title { font-size: clamp(19px, 1.9vw, 24px); margin-bottom: 20px; }
.session-item.is-selected { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.session-item.is-past { opacity: .6; }
.event-aside { position: sticky; top: calc(var(--header-h) + 20px); }
.register-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(24px, 2.6vw, 36px); box-shadow: var(--shadow); }
.register-title { font-size: clamp(21px, 2.1vw, 26px); margin-bottom: 8px; }
.register-note { color: var(--muted); font-size: 15px; margin-bottom: 4px; }
.register-card label:first-of-type { margin-top: 16px; }
.field-hint { font-size: 13.5px; color: var(--muted); margin: 6px 0 0; }
label.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; line-height: 1.7; margin: 22px 0 20px; color: var(--muted); }
label.consent input { margin-top: 4px; }
.btn-block { width: 100%; }
.register-foot { font-size: 13.5px; color: var(--muted); text-align: center; margin: 12px 0 0; }
@media (max-width: 960px) {
  .event-hero.has-image { grid-template-columns: 1fr; }
  .event-hero.has-image .event-hero-image { order: -1; }
  .event-layout { grid-template-columns: 1fr; }
  .event-aside { position: static; }
}

/* ---------- 大型引言 ---------- */
.big-quote { position: relative; margin: 0; max-width: 980px; }
.big-quote p { font: 700 clamp(24px, 3.4vw, 46px)/1.5 var(--font-display); letter-spacing: .01em; margin: 0 0 28px; text-wrap: balance; }
.big-quote p::before { content: "\201C"; display: block; font: 700 clamp(80px, 10vw, 140px)/.6 Georgia, serif; color: var(--accent); margin-bottom: 18px; }
.big-quote footer { font-size: 16px; color: var(--muted); letter-spacing: .06em; }
.big-quote footer::before { content: "— "; }

/* ---------- 首頁消息卡片 ---------- */
.news-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.news-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; }
.news-card:hover { color: inherit; }
.news-card-media { display: block; overflow: hidden; aspect-ratio: 16 / 10; border-radius: var(--radius); background: var(--surface-2); margin-bottom: 8px; }
.news-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.news-card-media.is-placeholder { display: grid; place-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 85%, #000), var(--accent-2)); color: rgba(255, 255, 255, .9); font: 800 72px/1 var(--font-display); }
.news-card:hover .news-card-media img { transform: scale(1.05); }
.news-card time { font: 600 14px/1 var(--font-latin); color: var(--muted); letter-spacing: .06em; }
.news-card-title { font: 800 clamp(18px, 1.6vw, 22px)/1.45 var(--font-display); transition: color .25s; }
.news-card:hover .news-card-title { color: var(--accent); }
@media (max-width: 900px) { .news-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .news-cards { grid-template-columns: 1fr; } }

/* ---------- 消息列表頁 ---------- */
.news-list { border-top: 1px solid var(--border); }
.news-item { border-bottom: 1px solid var(--border); }
.news-link { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(16px, 3vw, 48px); padding: clamp(24px, 3vw, 40px) 0; text-decoration: none; color: inherit; align-items: center; }
.news-item.has-cover .news-link { grid-template-columns: minmax(160px, 300px) minmax(0, 1fr); }
.news-link:hover { color: inherit; }
.news-cover { display: block; overflow: hidden; border-radius: var(--radius-sm); aspect-ratio: 16 / 10; background: var(--surface-2); }
.news-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.news-link:hover .news-cover img { transform: scale(1.05); }
.news-body { display: flex; flex-direction: column; gap: 8px; }
.news-date { font: 600 14px/1 var(--font-latin); color: var(--muted); letter-spacing: .08em; }
.news-title { font: 800 clamp(20px, 2.2vw, 30px)/1.4 var(--font-display); transition: color .25s; }
.news-link:hover .news-title { color: var(--accent); }
.news-summary { color: var(--muted); }
.news-more { font-weight: 700; color: var(--accent); font-size: 15px; }
.news-more::after { content: " \2192"; }
.news-item.is-lead .news-title { font-size: clamp(22px, 2.9vw, 38px); }
.news-item.is-lead.has-cover .news-link { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
@media (max-width: 700px) { .news-item.has-cover .news-link, .news-item.is-lead.has-cover .news-link { grid-template-columns: 1fr; } }

/* ---------- 文章 ---------- */
.article { max-width: 880px; margin: 0 auto; padding-top: clamp(40px, 6vw, 88px); }
.article-head { margin-bottom: clamp(28px, 4vw, 48px); }
.article-date { display: block; font: 600 15px/1 var(--font-latin); color: var(--accent); letter-spacing: .1em; margin-bottom: 18px; }
.article-head h1 { font-size: clamp(28px, 4vw, 52px); }
.article-cover { margin: 0 0 clamp(32px, 4vw, 56px); overflow: hidden; border-radius: var(--radius); }
.article-cover img { width: 100%; }
.article-body { margin: 0 auto; }
.article-foot { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--border); }

/* ---------- 聯絡我們 ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.contact-grid.no-map { grid-template-columns: 1fr; max-width: 820px; }
.contact-list { border-top: 1px solid var(--border); }
.contact-row { display: flex; flex-direction: column; gap: 6px; padding: 26px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.contact-row:hover { color: var(--accent); }
.contact-label { font: 700 13px/1 var(--font-latin); letter-spacing: .16em; color: var(--muted); }
.contact-value { font: 800 clamp(20px, 2.4vw, 30px)/1.4 var(--font-display); word-break: break-word; }
.contact-map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 4 / 3; background: var(--surface-2); }
.contact-map iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- 關於我們 ---------- */
.about-intro { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; margin-bottom: var(--section); }
.about-intro.no-aside { grid-template-columns: 1fr; }
.about-first { font-size: clamp(17px, 1.7vw, 22px); line-height: 1.75; font-weight: 500; }
.mission-card { position: sticky; top: calc(var(--header-h) + 24px); padding: clamp(28px, 3vw, 44px); border-radius: var(--radius); background: var(--text); color: var(--bg); }
.mission-card .eyebrow { color: var(--accent-2); }
.mission-card .mission-title { font-size: clamp(21px, 2.2vw, 29px); margin-bottom: 14px; }
.mission-card p { opacity: .82; margin: 0; }
.mission-icon { font-size: 30px; display: block; margin-bottom: 18px; }
@media (max-width: 860px) { .about-intro { grid-template-columns: 1fr; } .mission-card { position: static; } }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; max-width: 860px; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), var(--accent-2)); opacity: .35; }
.timeline-item { position: relative; padding: 0 0 clamp(28px, 3.4vw, 44px) 52px; }
.timeline-item::before { content: ""; position: absolute; left: 3px; top: 8px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
.timeline-item h3 { margin: 0 0 6px; font-size: clamp(17px, 1.7vw, 22px); }
.timeline-item p { margin: 0; color: var(--muted); }

.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(16px, 2vw, 28px); }
.value-card { padding: clamp(24px, 2.6vw, 36px); border-top: 2px solid var(--text); }
.value-num { font: 600 14px/1 var(--font-latin); color: var(--accent); letter-spacing: .12em; display: block; margin-bottom: 18px; }
.value-card p { color: var(--muted); margin: 0; }
.about-quote .big-quote { margin: 0 auto; text-align: center; }
.about-quote .big-quote p::before { margin-left: auto; margin-right: auto; }

/* 只有一個活動時：右側放大的報名按鈕 */
.events.is-single .event-card.is-feature:not(.has-image) .event-link { align-items: center; }
.events.is-single .event-card.is-feature:not(.has-image) .event-cta { position: relative; align-self: flex-start; margin-top: 10px; padding: 12px 24px; border-radius: var(--radius-pill); background: var(--accent); color: var(--accent-ink); }

/* 沒有封面的消息：用日期做排版圖塊 */
.news-card-media.is-placeholder .ph-date { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.news-card-media.is-placeholder .ph-date b { font: 700 clamp(40px, 4.4vw, 64px)/1 var(--font-latin); letter-spacing: -.02em; }
.news-card-media.is-placeholder .ph-date small { font: 700 12px/1 var(--font-latin); letter-spacing: .3em; opacity: .7; }
@media (max-width: 560px) {
  .news-cards { gap: 0; border-top: 1px solid var(--border); }
  .news-card { padding: 18px 0; border-bottom: 1px solid var(--border); }
  .news-card-media.is-placeholder { display: none; }
  .news-card time { order: -1; }
}

/* 活動沒有圖片時：大日期海報 */
.event-poster { aspect-ratio: 4 / 3; border-radius: var(--radius); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; background: linear-gradient(150deg, var(--accent), var(--accent-2)); color: var(--accent-ink); position: relative; overflow: hidden; isolation: isolate; }
.event-poster::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 60% at 80% 10%, rgba(255, 255, 255, .28), transparent 60%), radial-gradient(50% 50% at 10% 100%, rgba(0, 0, 0, .18), transparent 60%); }
.event-poster-month { font: 700 clamp(16px, 1.6vw, 20px)/1 var(--font-latin); letter-spacing: .2em; opacity: .9; }
.event-poster-day { font: 700 clamp(110px, 14vw, 220px)/.9 var(--font-latin); letter-spacing: -.04em; }
.event-poster-meta { font-size: clamp(14px, 1.4vw, 17px); font-weight: 700; letter-spacing: .1em; opacity: .9; }
@media (max-width: 960px) { .event-poster { aspect-ratio: 16 / 9; } }

/* 學員登入／註冊／忘記密碼：標題跟表單一起置中 */
.page-member_login .section-head, .page-member_register .section-head, .page-member_forgot_password .section-head, .page-member_reset_password .section-head { text-align: center; margin-left: auto; margin-right: auto; }
.page-member_login .section-head h1, .page-member_register .section-head h1 { font-size: var(--fs-h1); }

/* ==========================================================================
   旅遊行程＋影片（所有樣板共用的版面；配色、圓角、字體由各樣板 CSS 變數與覆寫決定）
   ========================================================================== */
.tours { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 32px); }
.tours.count-1 { grid-template-columns: minmax(0, 1fr); }
.tours.count-1 .tour { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.tours.count-2, .tours.count-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tour { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.tour:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tour-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: color-mix(in srgb, var(--accent) 10%, var(--surface-2)); }
.tour-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.tour:hover .tour-media img { transform: scale(1.05); }
.tour-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--accent);
  background: radial-gradient(circle at 80% 15%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 55%), radial-gradient(circle at 10% 90%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 60%); }
.tour-ph-no { position: absolute; top: 16px; left: 20px; font: 700 13px/1 var(--font-latin); letter-spacing: .14em; opacity: .7; }
.tour-route { position: absolute; left: 10%; right: 10%; top: 28%; width: 80%; height: 34%; overflow: visible; }
.tour-route path { fill: none; stroke: currentColor; stroke-width: 2; stroke-dasharray: 6 7; opacity: .55; }
.tour-route circle { fill: currentColor; }
.tour-ph-days { position: absolute; bottom: 18px; left: 20px; right: 20px; font: 800 clamp(26px, 2.6vw, 36px)/1.1 var(--font-display); color: var(--text); }
.tour-body { display: flex; flex-direction: column; gap: 10px; padding: clamp(20px, 2.2vw, 28px); flex: 1; }
.tour-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.tour-days, .tour-price { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 700; }
.tour-days { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.tour-price { border: 1px solid var(--border); color: var(--text); }
.tour-title { font-size: var(--fs-h3); margin: 4px 0 0; }
.tour-desc { color: var(--muted); margin: 0; font-size: 15.5px; line-height: 1.8; }
.tour-link { margin-top: auto; padding-top: 6px; }
@media (max-width: 900px) { .tours, .tours.count-2, .tours.count-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .tours, .tours.count-2, .tours.count-4 { grid-template-columns: 1fr; } .tours.count-1 .tour { grid-template-columns: 1fr; } }

.videos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 32px); }
.videos.count-1 { grid-template-columns: minmax(0, 1fr); max-width: 980px; margin-inline: auto; }
.videos.count-2, .videos.count-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.videos.count-3 .video.is-feature, .videos.count-5 .video.is-feature, .videos.count-6 .video.is-feature { grid-column: span 2; grid-row: span 2; }
.video { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.video.is-feature .video-frame { flex: 1; min-height: 0; }
.video-frame iframe, .video-play { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play { padding: 0; cursor: pointer; background: #000; display: block; }
.video-play img { width: 100%; height: 100%; object-fit: cover; opacity: .88; transition: opacity .4s, transform 1s var(--ease); }
.video-play:hover img { opacity: 1; transform: scale(1.03); }
.video-icon { position: absolute; left: 50%; top: 50%; width: clamp(56px, 6vw, 76px); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 88%, transparent); color: var(--accent-ink); box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 22%, transparent); transition: transform .35s var(--ease), box-shadow .35s; }
.video-icon svg { width: 42%; height: 42%; fill: currentColor; margin-left: 6%; }
.video-play:hover .video-icon, .video-play:focus-visible .video-icon { transform: translate(-50%, -50%) scale(1.08); box-shadow: 0 0 0 16px color-mix(in srgb, var(--accent) 18%, transparent); }
.video figcaption { display: grid; gap: 4px; }
.video-title { font-size: 17px; font-weight: 700; }
.video.is-feature .video-title { font-size: clamp(15px, 1.4vw, 19px); }
.video-desc { color: var(--muted); font-size: 14.5px; }
@media (max-width: 760px) { .videos, .videos.count-2, .videos.count-4 { grid-template-columns: 1fr; } .videos .video.is-feature { grid-column: auto !important; grid-row: auto !important; } }
/* YouTube 封面圖本身是 4:3 加黑邊，框維持 16:9 讓 cover 剛好裁掉黑邊；沒照片的行程封面已經有天數大字，不重複顯示天數標籤 */
.video.is-feature .video-frame { flex: none; }
.videos .video { align-self: start; }
.tour:not(.has-image) .tour-days { display: none; }

/* ==========================================================================
   活動列表頁（搜尋、篩選、月曆）、分享按鈕、Cookie 說明
   ========================================================================== */
.ev-filter { display: grid; gap: 14px; margin: 0 0 clamp(24px, 3vw, 40px); }
.ev-search { display: flex; gap: 10px; max-width: 640px; }
.ev-search input { flex: 1; min-width: 0; padding: 13px 18px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); color: var(--text); font: inherit; }
.ev-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.ev-chips { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.ev-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.ev-chip { display: inline-flex; align-items: center; padding: 7px 14px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; transition: border-color .2s, background .2s, color .2s; }
.ev-chip:hover { border-color: var(--accent); }
.ev-chip.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ev-select { padding: 7px 34px 7px 14px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; }
.ev-active { margin: 0; font-size: 14px; color: var(--muted); }
.ev-count { margin: 0 0 16px; font-size: 14px; color: var(--muted); }
.events.is-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.events-more { margin: 28px 0 0; text-align: center; }

.ev-cal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(16px, 2.4vw, 28px); }
.ev-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ev-cal-head h2 { margin: 0; font-size: clamp(17px, 1.9vw, 24px); }
.ev-cal-nav { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: 22px; line-height: 1; }
.ev-cal-nav:hover { border-color: var(--accent); color: var(--accent); }
.ev-cal-grid { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.ev-cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; }
.ev-cal-dow span { background: var(--surface-2); padding: 8px; text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.ev-cal-cell { background: var(--surface); min-height: 108px; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.ev-cal-cell.is-empty { background: var(--surface-2); }
.ev-cal-day { font-size: 13px; font-weight: 700; color: var(--muted); }
.ev-cal-cell.is-today .ev-cal-day { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.ev-cal-item { display: block; padding: 4px 6px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--text); text-decoration: none; font-size: 12.5px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ev-cal-item:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.ev-cal-item time { font-weight: 700; color: var(--accent); }
.ev-cal-item.is-past { opacity: .55; }
.ev-agenda { display: none; list-style: none; margin: 0; padding: 0; }
.ev-cal-empty { margin: 14px 0 0; }
@media (max-width: 720px) {
  .ev-cal-grid { display: none; }
  .ev-agenda { display: grid; gap: 10px; }
  .ev-agenda li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
  .ev-agenda-date { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); padding: 6px 0; }
  .ev-agenda-date b { font-size: 22px; line-height: 1; }
  .ev-agenda-date small { font-size: 12px; }
  .ev-agenda-items { display: grid; gap: 6px; align-content: center; }
  .ev-agenda-items a { color: var(--text); text-decoration: none; font-weight: 600; }
  .ev-agenda-items a.is-past { opacity: .55; }
  .ev-agenda-items time { color: var(--accent); margin-right: 4px; }
  .ev-search .btn { padding-inline: 18px; }
}

.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.share-label { font-size: 13px; font-weight: 700; color: var(--muted); margin-right: 2px; }
.share-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px 7px 10px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font: 600 13.5px/1 var(--font-body); cursor: pointer; transition: border-color .2s, transform .2s var(--ease); }
.share-btn:hover { transform: translateY(-1px); }
.share-btn svg { width: 18px; height: 18px; fill: currentColor; }
.share-line { color: #06a648; } .share-line:hover { border-color: #06c755; }
.share-fb { color: #1877f2; } .share-fb:hover { border-color: #1877f2; }
.share-copy:hover { border-color: var(--accent); }
.article-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.article-foot .share-bar { margin-top: 0; }

.cookie-note { position: fixed; z-index: 80; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin-inline: auto; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-size: 14px; }
.cookie-note p { margin: 0; flex: 1; line-height: 1.6; }
.cookie-note a { color: var(--accent); }
.cookie-note .btn { flex: none; }
@media (max-width: 480px) { .cookie-note { flex-direction: column; align-items: stretch; } }
[hidden] { display: none !important; }

/* 手機版 Cookie 說明：縮成底部細條，不遮住學習進度等內容 */
@media (max-width: 600px) {
    .cookie-note { left: 8px; right: 8px; bottom: 8px; flex-direction: row; align-items: center; gap: 10px; padding: 8px 12px; font-size: 12px; }
    .cookie-note p { line-height: 1.45; }
    .cookie-note .btn { padding: 6px 10px; font-size: 12px; }
    .cookie-note .cookie-long { display: none; }
}
