/* HBR 共讀小聚｜樣式表
   色系：第一版（取自 2026.09 共讀簡報：紙白、深藍、薰衣草灰、沙色、重點紅）；字體為思源黑體（Noto Sans TC）。
   行動優先：基礎樣式為手機，@media (min-width: 768px) 為平板、(min-width: 1024px) 為桌機。 */

/* =========================================================
   1. Design tokens（第一版色系）
   ========================================================= */
:root {
  /* 品牌與強調 */
  --color-ink: #303870;            /* 深藍：標題、主要按鈕、識別元素（取自簡報側邊色帶） */
  --color-ink-hover: #232A5C;
  --color-ink-pressed: #1B2150;
  --color-accent: #B42235;         /* HBR 紅：小標、日期、報名倒數、現省、「進入會議連結」按鈕 */
  --color-accent-hover: #941B2B;
  --color-accent-pressed: #7A1623;
  /* LINE 提醒按鈕：沿用 LINE 的綠色系讓人一眼認出；LINE 原色 #06C755 配白字對比只有 2.3:1，改用較深的綠（白字 5.1:1） */
  --color-line: #037F35;
  --color-line-hover: #036F2E;
  --color-line-pressed: #025E27;

  /* 背景 */
  --color-page: #FFFCF8;           /* 紙白：全站底色 */
  --color-section: #F6F1EA;        /* 淺沙：注意事項等穿插區塊、圖片佔位 */
  --color-sand: #E6DBCF;           /* 沙色：對話泡泡陰影 */
  --color-lav: #E0E1ED;            /* 薰衣草灰：首屏背景圓、hover */
  --color-lav-soft: #EFEFF6;       /* 淡薰衣草：歷屆回顧區背景、會議資訊框 */
  --color-surface: #FFFFFF;        /* 卡片 */
  --color-border: #D6D5E2;         /* 分隔線、卡片邊框 */

  /* 文字 */
  --color-text-primary: #262A40;
  --color-text-secondary: #575C75;
  --color-text-inverse: #FFFFFF;

  /* 訂閱方案（沿用 HBR 既有方案元件配色） */
  --color-plan: #142B47;
  --color-plan-tag: #3A6FAE;

  --focus: var(--color-accent);

  /* 全站統一使用思源黑體：本機已安裝 Source Han Sans TC 者優先使用，其餘載入 Noto Sans TC（同一套字） */
  --font-sans: "Source Han Sans TC", "思源黑體 TC", "思源黑體", "Noto Sans TC", "Noto Sans CJK TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;

  /* 字級：行動優先，以 clamp() 流體放大 */
  --fs-body: clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);
  --fs-small: 0.875rem;
  --fs-lead: clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem);
  --fs-h3: clamp(1.375rem, 1.15rem + 0.9vw, 1.875rem);
  --fs-h2: clamp(1.75rem, 1.3rem + 1.9vw, 2.75rem);
  --fs-h1: clamp(2.625rem, 1.6rem + 4.4vw, 5.25rem);

  --space-section: clamp(4rem, 2.5rem + 6vw, 8rem);
  --gutter: clamp(1.25rem, 0.6rem + 2.6vw, 3rem);
  --wrap: 1240px;
  --header-h: 64px;
  --mbar-h: 76px;

  /* 動效 tokens（知識庫 D） */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 450ms;
}
@media (min-width: 1024px) { :root { --header-h: 72px; } }

/* =========================================================
   2. Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-page);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.75;
  letter-spacing: 0.03em;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  padding-bottom: calc(var(--mbar-h) + env(safe-area-inset-bottom));
}
@media (min-width: 1024px) { body { padding-bottom: 0; } }
h1, h2, h3, h4, h5 { font-family: var(--font-sans); color: var(--color-ink); margin: 0; line-height: 1.35; letter-spacing: 0.04em; font-weight: 700; }
p, ol, ul, dl, dd, figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; letter-spacing: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
section[id], [id="state-panel"] { scroll-margin-top: calc(var(--header-h) + 16px); }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.nb { display: inline-block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--color-ink); color: var(--color-text-inverse); padding: 12px 16px; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* 按鈕 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0 1.5em;
  border-radius: 4px; border: 1.5px solid var(--color-ink);
  font-weight: 700; font-size: 1rem; letter-spacing: 0.08em; text-decoration: none; text-align: center; line-height: 1.3;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn-primary:active { background: var(--color-ink-pressed); border-color: var(--color-ink-pressed); }
.btn-primary { background: var(--color-ink); color: var(--color-text-inverse); }
.btn-secondary { background: transparent; color: var(--color-ink); }
.btn-quiet { border-color: var(--color-border); background: var(--color-surface); color: var(--color-ink); font-weight: 700; min-height: 44px; padding: 0 1em; font-size: 0.9375rem; letter-spacing: 0.04em; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }
@media (hover: hover) {
  .btn-primary:hover { background: var(--color-ink-hover); border-color: var(--color-ink-hover); }
  .btn-secondary:hover { background: var(--color-lav-soft); }
  .btn-quiet:hover { background: var(--color-lav-soft); }
}
/* 「進入會議連結」：已報名的有效訂戶最重要的行動，用 HBR 紅與其他深藍按鈕區隔。
   報名區、頁首、手機底部列的按鈕都帶 data-meeting-link，會議連結未就緒時 main.js 會移除此屬性、改回一般樣式 */
.btn[data-meeting-link] { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-text-inverse); }
.btn[data-meeting-link]:active { background: var(--color-accent-pressed); border-color: var(--color-accent-pressed); }
@media (hover: hover) {
  .btn[data-meeting-link]:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); }
}
/* 「綁定 LINE，活動開始前提醒我」：實心綠底，在報名成功區塊中僅次於紅色的「進入會議連結」 */
.btn-line { background: var(--color-line); border-color: var(--color-line); color: var(--color-text-inverse); }
.btn-line:active { background: var(--color-line-pressed); border-color: var(--color-line-pressed); }
@media (hover: hover) {
  .btn-line:hover { background: var(--color-line-hover); border-color: var(--color-line-hover); }
}
/* 鈴鐺在區塊出現後輕搖一次（只動 transform）；使用者設定減少動態時不搖 */
@media (prefers-reduced-motion: no-preference) {
  .btn-line svg { transform-origin: 50% 8%; animation: bell-ring 900ms var(--ease-out) 600ms both; }
  @keyframes bell-ring {
    0%, 100% { transform: rotate(0); }
    15% { transform: rotate(16deg); }
    30% { transform: rotate(-14deg); }
    45% { transform: rotate(10deg); }
    60% { transform: rotate(-6deg); }
    75% { transform: rotate(3deg); }
  }
}
.btn[aria-busy="true"] { opacity: 0.7; cursor: progress; }

/* =========================================================
   3. Header
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--color-page) 94%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease-out);
}
@supports (backdrop-filter: blur(8px)) { .site-header { backdrop-filter: blur(8px); } }
.site-header.is-scrolled { border-bottom-color: var(--color-border); }
.header-inner { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--color-ink); min-height: 44px; white-space: nowrap; }
.brand-logo { height: 26px; width: auto; }
@media (min-width: 1024px) { .brand-logo { height: 32px; } }
.site-nav { margin-left: auto; }
.nav-list { list-style: none; padding: 0; display: flex; gap: 4px; }
.nav-list a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; text-decoration: none; color: var(--color-text-primary); font-weight: 400; font-size: 0.9375rem; }
@media (hover: hover) { .nav-list a:hover { color: var(--color-ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1.5px; } }
.header-account { white-space: nowrap; display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-size: 0.9375rem; color: var(--color-ink); font-weight: 400; text-decoration: none; }
.header-cta { display: none; }
.menu-btn {
  margin-left: auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 10px; white-space: nowrap;
  background: transparent; border: 1.5px solid var(--color-ink); border-radius: 4px; color: var(--color-ink); font-weight: 700; cursor: pointer;
}
.menu-btn svg { width: 18px; height: 18px; }
@media (max-width: 419.98px) { .menu-btn .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
/* 手機：導覽收進下拉面板 */
@media (max-width: 1023.98px) {
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--color-page); border-bottom: 1px solid var(--color-border); margin: 0;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), visibility 0s linear var(--dur-base); }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav-list { flex-direction: column; padding: 8px var(--gutter) 16px; }
  .nav-list a { font-size: 1.0625rem; padding: 0; border-bottom: 1px solid var(--color-border); min-height: 52px; }
  .header-account { order: 2; }
  .menu-btn { order: 3; margin-left: 0; }
  .brand { margin-right: auto; }
}
@media (min-width: 1024px) {
  .menu-btn { display: none; }
  .header-cta { display: inline-flex; min-height: 44px; }
}

/* =========================================================
   4. HERO
   ========================================================= */
.hero { position: relative; padding-block: clamp(2.5rem, 1rem + 5vw, 6rem) clamp(2.5rem, 1.5rem + 3vw, 4.5rem); overflow: hidden;
  /* 【可替換】品牌底圖：設定 --hero-image: url(...)，文字為 HTML 不壓在圖上 */
  --hero-image: none;
  background-image: var(--hero-image); background-size: cover; background-position: center;
}
.hero-grid { display: grid; gap: 32px; grid-template-areas: "copy" "strip" "bubbles"; }
.hero-copy { grid-area: copy; }
.bubbles { grid-area: bubbles; }
.season-strip { grid-area: strip; }
.hero-copy { display: grid; gap: 20px; align-content: start; }
.hero-kicker { font-family: var(--font-sans); font-weight: 700; color: var(--color-accent); font-size: clamp(0.9375rem, 0.88rem + 0.25vw, 1.0625rem); letter-spacing: 0.14em; display: flex; align-items: center; gap: 12px; margin-bottom: -6px; }
.hero-kicker::before { content: ""; width: 28px; height: 1.5px; background: currentColor; }
.hero h1 { font-size: var(--fs-h1); font-weight: 900; letter-spacing: 0.06em; line-height: 1.12; }
.hero-lead { font-family: var(--font-sans); font-weight: 400; color: var(--color-ink); font-size: var(--fs-lead); line-height: 1.6; max-width: 20em; text-wrap: balance; }
.hero-desc { color: var(--color-text-secondary); max-width: 31em; }
.hero-tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-tags li { background: transparent; border: 1px solid color-mix(in srgb, var(--color-ink) 28%, transparent); color: var(--color-text-secondary); border-radius: 999px; padding: 3px 13px; font-size: 0.8125rem; font-weight: 400; }
.hero-actions { padding-top: 4px; }

/* 桌機：前導標語直排，呼應「閱讀」的書頁感 */
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "copy bubbles" "strip strip"; gap: 48px; align-items: center; }
}

/* 招牌互動①：歷屆職場難題對話泡泡（內容取自歷屆副標，非虛構） */
.bubbles { position: relative; display: flex; flex-direction: column; gap: 18px; padding: 8px 4px 0; }
.bubbles::before { /* 簡報薰衣草色的背景圓 */
  content: ""; position: absolute; z-index: 0; width: min(78vw, 420px); aspect-ratio: 1; border-radius: 50%;
  background: var(--color-lav); opacity: 0.6; right: -18%; top: -6%; }
.bubble {
  position: relative; z-index: 1; width: fit-content; max-width: 17em;
  font-family: var(--font-sans); font-weight: 400; font-size: 0.9375rem; line-height: 1.55; color: var(--color-ink);
  background: var(--color-page); border: 1.5px solid var(--color-ink); border-radius: 22px; padding: 12px 18px;
  box-shadow: 5px 5px 0 var(--color-sand);
  transform: rotate(var(--r, 0deg));
}
.bubble::after { /* 對話框尾巴 */
  content: ""; position: absolute; bottom: -8px; left: var(--tail, 28px); width: 14px; height: 14px;
  background: inherit; border-right: 1.5px solid var(--color-ink); border-bottom: 1.5px solid var(--color-ink);
  transform: rotate(45deg);
}
.bubble small { display: block; font-family: var(--font-sans); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; opacity: 0.85; margin-bottom: 2px; }
.bubble--now { background: var(--color-ink); color: var(--color-text-inverse); box-shadow: 5px 5px 0 var(--color-lav); }
.bubble--now::after { border-color: var(--color-ink); }
.bubble:nth-child(2) { align-self: flex-end; --r: 1.5deg; --tail: calc(100% - 44px); }
.bubble:nth-child(1) { --r: -1.5deg; }
.bubble:nth-child(3) { --r: -1deg; margin-left: 8%; }
.bubbles-caption { position: relative; z-index: 1; font-size: 0.8125rem; color: var(--color-text-secondary); padding-top: 6px; }

@media (min-width: 768px) and (max-width: 1023.98px) { .hero-grid { grid-template-areas: "copy" "bubbles" "strip"; } }
@media (min-width: 768px) {
  .bubbles { min-height: 300px; display: block; }
  .bubble { position: absolute; font-size: 1rem; }
  .bubble:nth-child(1) { top: 0; left: 0; }
  .bubble:nth-child(2) { top: 32%; right: 0; }
  .bubble:nth-child(3) { top: 62%; left: 6%; margin: 0; }
  .bubbles-caption { position: absolute; bottom: -8px; left: 0; }
  .bubbles::before { right: 4%; top: 4%; width: 320px; }
}
@media (min-width: 1024px) {
  .bubbles { min-height: 400px; }
  .bubbles::before { width: 360px; right: 2%; top: 8%; }
  .bubble { font-size: 1.0625rem; }
  .bubble:nth-child(1) { top: 4%; left: 0; }
  .bubble:nth-child(2) { top: 34%; right: -2%; }
  .bubble:nth-child(3) { top: 64%; left: 4%; }
  .bubbles-caption { bottom: 0; }
}
/* 載入時依序浮現：只動 transform／opacity，文字本身不延遲 LCP（LCP 為 H1） */
@media (prefers-reduced-motion: no-preference) {
  .js .bubble { animation: bubble-in 640ms var(--ease-out) both; animation-delay: calc(240ms + var(--i, 0) * 140ms); }
  @keyframes bubble-in {
    from { opacity: 0; transform: translateY(14px) scale(0.94) rotate(var(--r, 0deg)); }
    to   { opacity: 1; transform: translateY(0) scale(1) rotate(var(--r, 0deg)); }
  }
  @media (hover: hover) {
    .bubble { transition: transform var(--dur-base) var(--ease-out); }
    .bubbles:hover .bubble { animation: none; }
    .bubble:hover { transform: translateY(-3px) rotate(0deg); }
  }
}

/* 首屏下緣：本季重點資訊卡（暖白卡片＋細框，日期與狀態不藏到第二屏） */
.season-strip {
  display: grid; gap: 12px 32px;
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 6px;
  box-shadow: 0 8px 24px rgba(48,56,112,.06);
  padding: 20px 24px;
}
.strip-label { font-size: 0.875rem; color: var(--color-text-secondary); font-weight: 400; }
.strip-topic { font-family: var(--font-sans); font-weight: 700; color: var(--color-ink); font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem); line-height: 1.45; }
.strip-meta { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 0.9375rem; }
.strip-meta strong { color: var(--color-ink); font-weight: 700; }
.strip-status { color: var(--color-accent); font-weight: 700; }
@media (min-width: 1024px) {
  .season-strip { grid-template-columns: 1fr auto; align-items: center; padding: 22px 32px; }
  .strip-meta { justify-content: flex-end; text-align: right; flex-direction: column; gap: 2px; }
}

/* =========================================================
   5. 區塊共用
   ========================================================= */
.section { padding-block: var(--space-section); }
.section-head { display: grid; gap: 12px; margin-bottom: clamp(2rem, 1.2rem + 2.5vw, 3.5rem); max-width: 46rem; }
.section-head h2 { font-size: var(--fs-h2); }
.section-lead { font-family: var(--font-sans); font-weight: 400; color: var(--color-ink); font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem); }
.section-intro { color: var(--color-text-secondary); }
.section-intro + .section-intro { margin-top: -4px; }

/* =========================================================
   6. 02 本季共讀小聚
   ========================================================= */
.season-quarter { font-size: 0.9375rem; color: var(--color-accent); font-weight: 700; letter-spacing: 0.08em; margin-top: 8px; }
.season-topic { font-size: var(--fs-h3); line-height: 1.45; }
.season-grid { display: grid; gap: 40px; }
.season-aside { display: grid; gap: 0; align-content: start; background: var(--color-surface); border: 1px solid var(--color-border); border-left: 6px solid var(--color-ink); }
.event-info { display: grid; grid-template-columns: 1fr 1fr; padding: 20px 20px 4px; gap: 16px 20px; }
.event-info > div { display: grid; gap: 2px; }
.event-info > div:nth-child(-n+2) { grid-column: 1 / -1; }
.event-info dt { font-size: 0.8125rem; color: var(--color-text-secondary); font-weight: 400; letter-spacing: 0.08em; }
.event-info dd { color: var(--color-ink); font-weight: 700; line-height: 1.5; }
.event-info dd small { display: block; font-weight: 400; color: var(--color-text-secondary); font-size: 0.8125rem; }
.event-info dd.is-big { font-family: var(--font-sans); font-size: 1.25rem; }

.state-panel { padding: 20px; border-top: 1px dashed var(--color-border); margin-top: 16px; display: grid; gap: 14px; }
.state-panel h4 { font-size: 1.25rem; line-height: 1.45; }
.state-panel h4:focus { outline: none; }
.state-panel p { color: var(--color-text-primary); text-wrap: pretty; } /* 避免段落最後一行只剩一兩個字（不支援的瀏覽器維持原樣） */
.panel-note { font-size: var(--fs-small); color: var(--color-text-secondary) !important; line-height: 1.65; }
/* 紙本訂戶的 LINE 人工報名入口：虛線與主要行動區隔，表示這是給特定讀者的另一條路 */
.panel-help { font-size: var(--fs-small); color: var(--color-text-secondary) !important; line-height: 1.65; padding-top: 12px; border-top: 1px dashed var(--color-border); }
.text-link { color: var(--color-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
@media (hover: hover) { .text-link:hover { color: var(--color-accent); } }
.notes-group li { text-wrap: pretty; } /* 注意事項同樣避免最後一行只剩一兩個字 */
.panel-help .text-link { white-space: nowrap; } /* 報名區的連結整段不拆行，放不下就整段換到下一行 */
/* 內文中的連結：只允許在「透過 LINE」與「由專人協助報名」之間換行（inline-block 不會繼承底線，需各自加上） */
.text-link .nb { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.panel-actions { display: grid; gap: 10px; }
/* 非訂戶報名區：訂閱方案與感恩祭優惠（淡底小卡，與主要按鈕區隔；優惠用暖色底） */
.offer { display: grid; gap: 8px; padding: 14px 16px; border-radius: 6px; background: var(--color-lav-soft); }
.offer-promo { background: var(--color-section); }
.state-panel .offer-title { display: flex; gap: 6px; align-items: baseline; font-weight: 700; color: var(--color-ink); font-size: 0.9375rem; line-height: 1.55; }
.offer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--fs-small); line-height: 1.6; color: var(--color-text-primary); }
.offer-list li { position: relative; padding-left: 1.15em; text-wrap: pretty; }
.offer-list li::before { content: "▸"; position: absolute; left: 0; color: var(--color-accent); }
.offer-list strong { color: var(--color-ink); font-weight: 700; }
/* 卡片窄時（手機、桌機右側窄欄）：標籤與說明分兩行，避免說明從中間斷開（例：「商管選／讀好書」）
   依卡片實際寬度判斷；不支援容器查詢的瀏覽器至少在手機寬度套用 */
.offer { container-type: inline-size; }
@media (max-width: 767.98px) {
  .offer-list li strong { display: block; }
  .offer-list .sep { display: none; }
}
@container (max-width: 389.98px) {
  .offer-list li strong { display: block; }
  .offer-list .sep { display: none; }
}
/* API 回應前的載入狀態 */
.panel-loading { display: flex; align-items: center; gap: 10px; min-height: 48px; color: var(--color-text-secondary); font-size: 0.9375rem; }
.panel-loading::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--color-border); border-top-color: var(--color-ink); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.panel-success { display: grid; gap: 10px; }
.success-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--color-ink); color: var(--color-text-inverse); display: grid; place-items: center; }
.success-icon svg { width: 22px; height: 22px; }
/* 非訂戶報名未完成的提示列（淡紅底＋HBR 紅字，白底對比 5.7:1） */
.state-panel .panel-alert { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 6px;
  background: color-mix(in srgb, var(--color-accent) 8%, #fff); color: var(--color-accent); font-weight: 700; font-size: 0.9375rem; line-height: 1.5; }
.panel-alert:focus { outline: none; }
.alert-icon { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--color-accent); color: var(--color-text-inverse);
  display: grid; place-items: center; font-size: 0.8125rem; font-weight: 900; line-height: 1; }
.join { display: grid; gap: 16px; padding: 16px; background: var(--color-lav-soft); }
.join .btn { padding-inline: 1em; letter-spacing: 0.04em; font-size: 0.9375rem; }
.join h5 { font-family: var(--font-sans); font-size: 0.8125rem; color: var(--color-text-secondary); font-weight: 400; letter-spacing: 0.08em; margin-bottom: 6px; }
.cal-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cal-row .btn { flex: 1 1 auto; }
.meeting-meta { display: grid; gap: 8px; margin-top: 10px; }
.meeting-meta > div { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "dt btn" "dd btn"; align-items: center; column-gap: 8px; background: var(--color-surface); border: 1px solid var(--color-border); padding: 6px 6px 6px 14px; }
.meeting-meta dt { grid-area: dt; font-size: 0.75rem; color: var(--color-text-secondary); line-height: 1.4; }
.meeting-meta dd { grid-area: dd; font-weight: 700; color: var(--color-ink); letter-spacing: 0.06em; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.5; }
.meeting-meta .copy-btn { grid-area: btn; }
.copy-btn { min-height: 44px; min-width: 56px; padding: 0 12px; border: 0; border-radius: 3px; background: var(--color-lav-soft); color: var(--color-ink); font-weight: 700; cursor: pointer; }
@media (hover: hover) { .copy-btn:hover { background: var(--color-lav); } }
.locked-row { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--color-section); border: 1px dashed var(--color-text-secondary); font-size: 0.9375rem; }
.locked-row svg { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--color-ink); }

.season-article { display: grid; gap: 20px; align-content: start; }
.season-article h4 { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); margin-top: 8px; }
.season-article p { max-width: 34em; }
/* 本季活動 BANNER（1200×630）：固定比例，圖片未載入前先以底色佔位，避免版面跳動 */
.season-banner { aspect-ratio: 1200 / 630; background: var(--color-section); border: 1px solid var(--color-border); overflow: hidden; }
.season-banner img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 768px) {
  .event-info { grid-template-columns: repeat(3, 1fr); padding: 24px 28px 4px; }
  .state-panel { padding: 24px 28px 28px; }
  .panel-actions { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}
@media (min-width: 1024px) {
  .season-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; }
  .season-article { grid-column: 1; grid-row: 1; }
  .season-aside { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--header-h) + 24px); }
  .event-info { grid-template-columns: 1fr 1fr; }
  .panel-actions { grid-template-columns: 1fr; }
}

/* 非活動期間（B） */
.off-grid { display: grid; gap: 32px; }
.off-copy { display: grid; gap: 16px; max-width: 34em; }
.off-copy .off-question { font-family: var(--font-sans); font-weight: 900; color: var(--color-ink); font-size: clamp(4rem, 2rem + 8vw, 8rem); line-height: 1; }
.off-panel { background: var(--color-surface); border: 1px solid var(--color-border); border-left: 6px solid var(--color-ink); }
.off-panel .state-panel { border-top: 0; margin-top: 0; }
@media (min-width: 1024px) { .off-grid { grid-template-columns: 7fr 5fr; gap: 56px; align-items: start; } }

/* 訂閱方案（內容取自文案檔附圖） */
.plans { margin-top: clamp(3rem, 2rem + 3vw, 4.5rem); padding-top: clamp(2rem, 1.5rem + 2vw, 3rem); border-top: 1px solid var(--color-border); }
.plans-head { display: grid; gap: 6px; margin-bottom: 24px; }
.plans-head h3 { font-size: var(--fs-h3); }
.plans-head p { color: var(--color-text-secondary); }
.plan-list { list-style: none; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: min(84%, 320px); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
.plan { scroll-snap-align: start; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 6px; padding: 24px; display: grid; gap: 12px; align-content: start; grid-template-rows: auto auto 1fr auto auto; }
.plan--featured { border: 2px solid var(--color-ink); }
.plan-cycle { justify-self: start; background: var(--color-plan-tag); color: var(--color-text-inverse); font-size: 0.8125rem; font-weight: 700; border-radius: 999px; padding: 3px 12px; }
.plan h4 { font-family: var(--font-sans); font-size: 1.5rem; color: var(--color-plan); font-weight: 700; }
.plan-desc { font-size: 0.9375rem; color: var(--color-text-secondary); line-height: 1.65; }
.plan-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; color: var(--color-plan); }
.plan-price .cur { font-size: 0.875rem; align-self: flex-start; padding-top: 0.6em; }
.plan-price strong { font-size: 2.75rem; line-height: 1.1; font-weight: 700; letter-spacing: 0; }
.plan-price .per { font-size: 0.9375rem; }
.plan-price .save { color: var(--color-accent); font-weight: 700; font-size: 0.9375rem; }
.plan-price s { color: var(--color-text-secondary); font-size: 0.9375rem; }
.plan .btn { background: var(--color-plan); border-color: var(--color-plan); color: var(--color-text-inverse); }
@media (hover: hover) { .plan .btn:hover { background: var(--color-ink-hover); border-color: var(--color-ink-hover); } }
.promo-slot { margin-top: 32px; }
/* 促銷 BANNER：手機 2:1、768px 以上 6:1，圖片以 <picture> 依斷點切換 */
.promo { display: block; width: 100%; aspect-ratio: 2 / 1; background: var(--color-section); overflow: hidden; }
.promo img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 768px) { .promo { aspect-ratio: 6 / 1; } }
.plans-scroll-hint { font-size: 0.8125rem; color: var(--color-text-secondary); margin-top: 4px; }
@media (min-width: 768px) {
  .plan-list { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; margin-inline: 0; padding-inline: 0; }
  .plans-scroll-hint { display: none; }
  .plan { padding: 22px; }
  .plan-price strong { font-size: 2.5rem; }
}
@media (min-width: 1024px) { .plan { padding: 28px; } .plan-price strong { font-size: 3rem; } .plan--featured { transform: translateY(-10px); } }

/* =========================================================
   7. 03 歷屆共讀小聚
   ========================================================= */
.archive { background: var(--color-lav-soft); }
.access-note { display: grid; gap: 12px; padding: 20px; background: var(--color-surface); border: 1px solid var(--color-border); margin-bottom: 28px; }
.access-note h3 { font-size: 1.125rem; }
.access-note p { color: var(--color-text-secondary); font-size: 0.9375rem; }
@media (min-width: 768px) { .access-note { grid-template-columns: 1fr auto; align-items: center; gap: 8px 32px; padding: 20px 28px; } .access-note .btn { grid-row: 1 / span 2; grid-column: 2; } }

.year-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--color-border); margin-bottom: 32px; overflow-x: auto; }
.year-tab {
  position: relative; background: none; border: 0; cursor: pointer;
  min-height: 48px; min-width: 72px; padding: 0 18px;
  font-family: var(--font-sans); font-weight: 700; font-size: 1.25rem; color: var(--color-text-secondary); letter-spacing: 0.06em;
}
.year-tab::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; background: var(--color-ink); transform: scaleX(0); transition: transform var(--dur-base) var(--ease-out); }
.year-tab[aria-selected="true"] { color: var(--color-ink); }
.year-tab[aria-selected="true"]::after { transform: scaleX(1); }
.year-tab .count { font-family: var(--font-sans); font-size: 0.75rem; font-weight: 400; margin-left: 4px; color: var(--color-text-secondary); }
.archive-caption { font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem); font-weight: 700; color: var(--color-ink); margin-bottom: 8px; }

.talks { display: grid; gap: 24px; }
.talk { background: var(--color-surface); border: 1px solid var(--color-border); display: flex; flex-direction: column; }
.talk-cover { position: relative; aspect-ratio: 16 / 9; background: var(--color-page); border-bottom: 1px solid var(--color-border); overflow: hidden; }
.talk-cover img { width: 100%; height: 100%; object-fit: cover; }
.talk-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.talk-date { font-family: var(--font-sans); font-weight: 700; color: var(--color-accent); font-size: 0.9375rem; letter-spacing: 0.1em; }
.talk h3 { font-size: var(--fs-h3); }
.talk-sub { font-family: var(--font-sans); font-weight: 400; color: var(--color-text-secondary); font-size: 1.0625rem; line-height: 1.5; }
.talk-issue { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--color-border); display: grid; gap: 6px; }
/* 無底色小標＋短線：讓封面與標題成為卡片焦點 */
.talk-issue h4 { display: flex; align-items: center; gap: 8px; font-family: var(--font-sans); font-size: 0.8125rem; font-weight: 700; color: var(--color-ink); letter-spacing: 0.08em; }
.talk-issue h4::before { content: ""; width: 16px; height: 1.5px; background: currentColor; }
.talk-issue p { font-size: 0.9375rem; line-height: 1.75; color: var(--color-text-secondary); }
.talk-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 8px; }
.talk-actions .btn { flex: 1 1 160px; }
.lock-ico { display: none; }
.is-locked .lock-ico { display: inline-block; }

@media (min-width: 768px) {
  .talks { grid-template-columns: 1fr 1fr; }
  .talk--feature { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .talks { gap: 32px; }
  .talk--feature { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  /* 最新一場：簡報封面完整呈現，像一份放在桌上的講義 */
  .talk--feature .talk-cover { aspect-ratio: auto; display: grid; place-items: center; padding: 32px; background: var(--color-surface); border-bottom: 0; border-right: 1px solid var(--color-border); }
  .talk--feature .talk-cover img { height: auto; box-shadow: 0 10px 28px rgba(48,56,112,.10); border: 1px solid var(--color-border); }
  .talk--feature .talk-body { padding: 32px; }
  .talk-body { padding: 24px 28px 28px; }
}
@media (prefers-reduced-motion: no-preference) {
  .tabpanel.is-entering { animation: panel-in var(--dur-slow) var(--ease-out) both; }
  @keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}


/* =========================================================
   8. 04 活動流程
   ========================================================= */
.steps { list-style: none; padding: 0; display: grid; gap: 0; position: relative; }
.step { position: relative; display: grid; gap: 6px; padding: 0 0 32px 64px; }
.step::before { /* 直向連接線（手機） */
  content: ""; position: absolute; left: 21px; top: 44px; bottom: 0; width: 1.5px; background: var(--color-ink); opacity: 0.35; }
.step:last-child::before { display: none; }
.step-no { position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--color-ink); background: var(--color-page); display: grid; place-items: center; font-family: var(--font-sans); font-weight: 700; color: var(--color-ink); font-size: 1rem; letter-spacing: 0.04em; }
.step-name { color: var(--color-accent); font-weight: 700; font-size: 0.9375rem; letter-spacing: 0.1em; padding-top: 8px; }
.step h3 { font-size: clamp(1.1875rem, 1.05rem + 0.5vw, 1.375rem); line-height: 1.5; }
.step p:last-child { color: var(--color-text-secondary); font-size: 0.9375rem; }
.fine { font-size: var(--fs-small); color: var(--color-text-secondary); margin-top: 24px; }
@media (min-width: 768px) { .fine { margin-top: 40px; } }
@media (min-width: 768px) {
  .steps { grid-template-columns: 1fr 1fr; gap: 40px 32px; }
  .step { padding: 64px 0 0; }
  .step::before { left: 56px; right: 0; top: 21px; bottom: auto; width: auto; height: 1.5px; }
  .step:nth-child(2)::before { display: none; }
  .step-name { padding-top: 0; }
}
@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 32px; }
  .step:nth-child(2)::before { display: block; }
  .step-no { width: 56px; height: 56px; font-size: 1.25rem; }
  .step { padding-top: 80px; }
  .step::before { left: 68px; right: -20px; top: 27px; }
}

/* =========================================================
   9. 05 活動注意事項
   ========================================================= */
.notes { background: var(--color-section); }
.notes-grid { display: grid; gap: 32px; }
.notes-aside { display: grid; gap: 16px; align-content: start; }
.notes-aside h2 { font-size: var(--fs-h2); }
.notes-aside p { color: var(--color-text-secondary); }
.notes-groups { display: grid; gap: 28px; }
.notes-group h3 { font-size: 1.125rem; padding-bottom: 10px; border-bottom: 1.5px solid var(--color-ink); margin-bottom: 4px; }
.notes-group ol { list-style: none; padding: 0; counter-reset: n var(--start); }
.notes-group li { counter-increment: n; position: relative; padding: 12px 0 12px 44px; border-bottom: 1px solid var(--color-border); }
.notes-group li::before { content: counter(n); position: absolute; left: 0; top: 12px; width: 28px; height: 28px; border-radius: 50%; background: var(--color-ink); color: var(--color-text-inverse); font-family: var(--font-sans); font-weight: 700; font-size: 0.875rem; display: grid; place-items: center; line-height: 1; letter-spacing: 0; }
@media (min-width: 1024px) {
  .notes-grid { grid-template-columns: 4fr 8fr; gap: 64px; }
  .notes-aside { position: sticky; top: calc(var(--header-h) + 24px); }
}

/* =========================================================
   10. Footer
   ========================================================= */
.site-footer { background: var(--color-ink); color: #E4E5F0; --focus: #FFD27A; padding-block: clamp(3.5rem, 2rem + 5vw, 6rem); text-align: center; }
.footer-quote { font-family: var(--font-sans); font-weight: 700; color: var(--color-page); font-size: clamp(1.375rem, 1.1rem + 1.2vw, 2rem); line-height: 1.5; max-width: 22em; margin-inline: auto; text-wrap: balance; }
.footer-sub { margin-top: 12px; }
.footer-info { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.25); font-size: 0.875rem; line-height: 1.8; display: grid; gap: 4px; justify-items: center; }
.footer-info a { color: #FFFFFF; text-underline-offset: 3px; }
.footer-contact { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; column-gap: 0; }
.footer-contact li { width: 100%; }
.footer-copy { margin-top: 12px; color: #C9CBDD; font-size: 0.8125rem; }
@media (min-width: 768px) {
  .footer-contact li { width: auto; }
  .footer-contact li + li::before { content: "|"; margin: 0 0.75em; opacity: 0.6; }
}

/* =========================================================
   11. 手機底部固定 CTA（拇指區）
   ========================================================= */
.mbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px;
  min-height: var(--mbar-h); padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--color-page); border-top: 1px solid var(--color-border); box-shadow: 0 -6px 20px rgba(48,56,112,.08);
  transition: transform var(--dur-base) var(--ease-out);
}
.mbar.is-hidden { transform: translateY(110%); }
.mbar-info { display: grid; line-height: 1.4; font-size: 0.8125rem; color: var(--color-text-secondary); }
.mbar-info strong { color: var(--color-ink); font-size: 0.9375rem; }
.mbar .btn { min-width: 9.5em; }
/* 360px 級手機：按鈕文字較長時（例如「解鎖訂戶專屬席次」）縮小左右留白，避免左側日期被擠成三行、底部列變高 */
@media (max-width: 374.98px) { .mbar .btn { padding-inline: 1em; letter-spacing: 0.04em; } }
@media (min-width: 1024px) { .mbar { display: none; } }

/* =========================================================
   12. 對話框、提示、示意狀態面板
   ========================================================= */
.gate { border: 0; padding: 0; width: min(92vw, 480px); background: var(--color-surface); color: var(--color-text-primary); border-left: 6px solid var(--color-ink); box-shadow: 0 24px 60px rgba(35,42,92,.25); }
.gate::backdrop { background: rgba(35,42,92,.45); }
.gate-inner { padding: 28px; display: grid; gap: 14px; }
.gate h2 { font-size: 1.375rem; }
.gate p { color: var(--color-text-secondary); }
.gate-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.gate-actions .btn { flex: 1 1 140px; }
@media (prefers-reduced-motion: no-preference) {
  .gate[open] { animation: gate-in var(--dur-base) var(--ease-out); }
  @keyframes gate-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
  .state-panel.is-updated > * { animation: panel-in var(--dur-slow) var(--ease-out) both; }
  .state-panel.is-updated > *:nth-child(2) { animation-delay: 60ms; }
  .state-panel.is-updated > *:nth-child(3) { animation-delay: 120ms; }
  .state-panel.is-updated .success-icon, .state-panel.is-updated .alert-icon { animation: pop 520ms var(--ease-out) both; }
  @keyframes pop { 0% { opacity: 0; transform: scale(.5); } 70% { opacity: 1; transform: scale(1.08); } 100% { transform: scale(1); } }
}

.toast { position: fixed; left: 50%; top: calc(var(--header-h) + 12px); z-index: 60; transform: translate(-50%, -8px); opacity: 0; pointer-events: none;
  background: var(--color-ink-hover); color: var(--color-text-inverse); padding: 12px 18px; font-size: 0.875rem; max-width: min(92vw, 520px); line-height: 1.6;
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); }
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* 示意用：上線前移除整個 .demo 區塊 */
.demo { position: fixed; z-index: 55; right: 12px; bottom: calc(var(--mbar-h) + 12px + env(safe-area-inset-bottom)); font-size: 0.875rem; }
@media (min-width: 1024px) { .demo { bottom: 16px; right: 16px; } }
.demo-toggle { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0; background: #1B1F3B; color: var(--color-text-inverse); font-weight: 700; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.2); --focus: #FFD27A; display: inline-flex; align-items: center; gap: 8px; }
.demo-toggle .dot { width: 8px; height: 8px; border-radius: 50%; background: #FFD27A; }
.demo-body { position: absolute; right: 0; bottom: 52px; width: min(88vw, 320px); max-height: 70vh; overflow: auto; background: var(--color-surface); border: 1px solid var(--color-border); box-shadow: 0 16px 40px rgba(0,0,0,.18); padding: 16px; display: grid; gap: 12px; }
.demo-body p { color: var(--color-text-secondary); font-size: 0.8125rem; line-height: 1.5; }
.demo fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 2px; }
.demo legend { font-weight: 700; color: var(--color-ink); margin-bottom: 4px; }
.demo label { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; padding: 0 6px; border-radius: 4px; }
.demo label:has(input:checked) { background: var(--color-lav-soft); }
.demo label:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.demo input { width: 18px; height: 18px; accent-color: var(--color-ink); }

/* 減少動態：全域關閉（知識庫 D） */
@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; }
}
