/* 台北寰宇AI倫理學會：全站共用樣式（首頁、宣言、組織架構、推薦閱讀都引用這一份）。
   不依賴任何外部 CDN。第 1～9 段原本內嵌在 index.html，「推薦閱讀」一段原本內嵌在 reading.html。 */
/* =========================================================
   1. 基礎重置與色彩變數 (Light / Dark Theme)
   ========================================================= */
:root {
  --bg-page: #FBF9F4;
  --bg-card: #FFFFFF;
  --bg-card-subtle: #F4EFE6;
  --bg-hero: linear-gradient(180deg, #F5F0E4 0%, #FBF9F4 100%);
  --text-main: #1D1E22;
  --text-muted: #5A5D66;
  --text-light: #878A94;
  --border-color: #E6DFD3;
  --border-accent: #C73B2E;
  --vermilion: #B83226;
  --vermilion-light: #FBF0EE;
  --vermilion-hover: #9B241A;
  --amber-gold: #B88232;
  --amber-light: #FDF7EC;
  --indigo-slate: #1F2937;
  --seal-red: #C73B2E;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.1);
  --font-serif: "Noto Serif TC", "Source Han Serif TC", "Songti TC", "PMingLiU", "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

[data-theme="dark"] {
  --bg-page: #0C0F14;
  --bg-card: #151A22;
  --bg-card-subtle: #1C232E;
  --bg-hero: linear-gradient(180deg, #121720 0%, #0C0F14 100%);
  --text-main: #EDEAE4;
  --text-muted: #A3A8B5;
  --text-light: #6C7280;
  --border-color: #242D3B;
  --border-accent: #D8A057;
  --vermilion: #E05345;
  --vermilion-light: #2A1715;
  --vermilion-hover: #F06A5C;
  --amber-gold: #D8A057;
  --amber-light: #261E13;
  --indigo-slate: #E5E7EB;
  --seal-red: #D8A057;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-serif);
  line-height: 1.85;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 頂部進度條 */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--vermilion), var(--amber-gold));
  width: 0%;
  z-index: 999;
  transition: width 0.1s ease-out;
}

/* =========================================================
   2. 導航列 Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 249, 244, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s ease, border-color 0.3s ease;
}
[data-theme="dark"] .site-header {
  background: rgba(12, 15, 20, 0.92);
}

.header-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

/* 協會專屬標誌 Logo */
.header-logo-img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1.5px solid var(--border-color);
  background: #FFFFFF;
  transition: transform 0.2s ease;
}
.brand-box:hover .header-logo-img {
  transform: scale(1.05);
}
.colophon-logo-img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.25rem;
  display: block;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border: 2px solid var(--border-color);
  background: #FFFFFF;
}

.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-main);
}
.brand-sub {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-icon {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.btn-icon:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

.btn-read {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--vermilion);
  color: #FFF !important;
  border: none;
  padding: 0.55rem 1.15rem;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(184, 50, 38, 0.25);
}
.btn-read:hover {
  background: var(--vermilion-hover);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .header-container {
    height: 60px;
    padding: 0 1rem;
  }
  .brand-box {
    gap: 0.6rem;
  }
  .header-logo-img {
    width: 38px;
    height: 38px;
  }
  .brand-title {
    font-size: 0.92rem;
    white-space: nowrap;
  }
  .brand-sub {
    display: block;
    font-size: 0.55rem;
    letter-spacing: 0.03em;
    white-space: nowrap;
    transform: scale(0.92);
    transform-origin: left center;
  }
  .header-actions {
    gap: 0.45rem;
  }
  .btn-icon {
    width: 34px;
    height: 34px;
  }
  .btn-print {
    display: none; /* 手機端隱藏列印鍵，釋放空間 */
  }
  .btn-read {
    padding: 0.45rem 0.8rem;
    font-size: 0.78rem;
  }
  .btn-read-text {
    display: none; /* 極窄屏僅留圖示，一般手機由下方再微調 */
  }
}
@media (min-width: 480px) and (max-width: 640px) {
  .btn-read-text {
    display: inline;
  }
}

/* 分頁列（宣言／推薦閱讀），樣式與 reading.html 一致，修改時兩邊一起改 */
.page-tabs {
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-color);
}
.page-tabs-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  gap: 0.25rem;
}
.page-tab {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.7rem 0.9rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.page-tab:hover {
  color: var(--vermilion);
}
.page-tab.active {
  color: var(--vermilion);
  border-bottom-color: var(--vermilion);
}
[data-theme="dark"] .page-tab:hover,
[data-theme="dark"] .page-tab.active {
  color: var(--amber-gold);
}
[data-theme="dark"] .page-tab.active {
  border-bottom-color: var(--amber-gold);
}
@media (max-width: 640px) {
  .page-tabs-inner {
    padding: 0 0.5rem;
  }
}

/* 學會識別區：首頁最上方的會徽與學會名稱，讓人第一眼知道這是哪個學會的網站 */
.society-masthead {
  background: var(--bg-hero);
  text-align: center;
  padding: 3.25rem 1.5rem 2.75rem;
}
.masthead-logo {
  display: block;
  width: 140px;
  height: 140px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  object-fit: cover;
  background: #FFFFFF;
  border: 2px solid var(--border-color);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}
.masthead-name {
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: 0.1em;
  padding-left: 0.1em; /* 抵銷最後一個字後面的字距，讓整行視覺置中 */
  color: var(--text-main);
}
.masthead-name-en {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.24em;
  padding-left: 0.24em;
  color: var(--amber-gold);
  margin-top: 0.6rem;
}
.masthead-rule {
  width: 56px;
  height: 3px;
  margin: 1.5rem auto 0;
  border-radius: 2px;
  background: var(--vermilion);
}
[data-theme="dark"] .masthead-rule {
  background: var(--amber-gold);
}
@media (max-width: 640px) {
  .society-masthead {
    padding: 2.25rem 1rem 1.75rem;
  }
  .masthead-logo {
    width: 108px;
    height: 108px;
    margin-bottom: 1.1rem;
  }
  .masthead-name {
    font-size: 1.85rem;
    letter-spacing: 0.06em;
    padding-left: 0.06em;
  }
  .masthead-name-en {
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    padding-left: 0.14em;
    margin-top: 0.45rem;
  }
  .masthead-rule {
    width: 44px;
    margin-top: 1.1rem;
  }
}
@media (max-width: 360px) {
  .masthead-name { font-size: 1.6rem; }
  .masthead-name-en { font-size: 0.62rem; letter-spacing: 0.1em; padding-left: 0.1em; }
}

/* =========================================================
   3. 典雅莊嚴的 Hero 巨幅區塊
   ========================================================= */
.hero-section {
  background: var(--bg-hero);
  padding: 4.5rem 1.5rem 5rem;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  position: relative;
}
@media (max-width: 640px) {
  .hero-section {
    padding: 2.75rem 1rem 3.5rem;
  }
}

.hero-inner {
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  background: var(--vermilion-light);
  border: 1px solid rgba(184, 50, 38, 0.25);
  color: var(--vermilion);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 1.75rem;
}
[data-theme="dark"] .hero-badge {
  background: rgba(216, 160, 87, 0.12);
  border-color: rgba(216, 160, 87, 0.3);
  color: var(--amber-gold);
}
@media (max-width: 480px) {
  .hero-badge {
    font-size: 0.76rem;
    padding: 0.3rem 0.85rem;
    margin-bottom: 1.25rem;
  }
}

.hero-title {
  font-size: 2.85rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1.25;
  margin-bottom: 0.6rem;
  color: var(--text-main);
}
@media (max-width: 640px) {
  .hero-title { font-size: 1.85rem; letter-spacing: 0.01em; }
}
@media (max-width: 380px) {
  .hero-title { font-size: 1.65rem; }
}

.hero-english {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber-gold);
  font-weight: 600;
  margin-bottom: 1.5rem;
}
@media (max-width: 640px) {
  .hero-english {
    font-size: 0.92rem;
    letter-spacing: 0.08em;
    margin-bottom: 1.2rem;
  }
}

.hero-slogan {
  display: inline-block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  padding: 0.5rem 1.5rem;
  border-top: 2px solid var(--border-color);
  border-bottom: 2px solid var(--border-color);
  letter-spacing: 0.12em;
  margin-bottom: 2.25rem;
}
@media (max-width: 640px) {
  .hero-slogan {
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    padding: 0.4rem 0.8rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
  }
}

.hero-meta-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 2.5rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-family: var(--font-sans);
}
.meta-item strong {
  color: var(--text-main);
}
@media (max-width: 640px) {
  .hero-meta-grid {
    gap: 0.6rem 1.25rem;
    font-size: 0.82rem;
    margin-bottom: 1.75rem;
  }
}

/* 快捷入口卡片 (四大支柱) */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
  text-align: left;
}
@media (max-width: 860px) {
  .pillar-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .pillar-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin-top: 1.25rem;
  }
}

.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--amber-gold);
}
.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--vermilion);
  opacity: 0.8;
}
.pillar-card:nth-child(2)::before { background: var(--amber-gold); }
.pillar-card:nth-child(3)::before { background: #2E7D32; }
.pillar-card:nth-child(4)::before { background: #1976D2; }

.pillar-num {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 0.35rem;
}
.pillar-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}
.pillar-desc {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

/* =========================================================
   4. 主要雙欄閱讀版型 (Sidebar + Content)
   ========================================================= */
.main-wrapper {
  max-width: 1240px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3.5rem;
}
@media (max-width: 980px) {
  .main-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* 側邊欄導航 */
.sidebar-toc {
  position: sticky;
  top: 96px;
  height: fit-content;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 980px) {
  .sidebar-toc { display: none; }
}

.toc-header {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.toc-item a {
  display: block;
  font-size: 0.85rem;
  font-family: var(--font-sans);
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  line-height: 1.4;
  transition: all 0.2s ease;
}
.toc-item a:hover {
  background: var(--bg-card-subtle);
  color: var(--vermilion);
}
.toc-item a.active {
  background: var(--vermilion-light);
  color: var(--vermilion);
  font-weight: 700;
}
[data-theme="dark"] .toc-item a.active {
  background: rgba(216, 160, 87, 0.15);
  color: var(--amber-gold);
}

/* =========================================================
   5. 宣言正文排版
   ========================================================= */
.content-area {
  max-width: 820px;
}

.doc-section {
  margin-bottom: 4.5rem;
  scroll-margin-top: 100px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--vermilion);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
[data-theme="dark"] .section-tag {
  color: var(--amber-gold);
}

.section-title {
  font-size: 1.95rem;
  font-weight: 900;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-color);
}
@media (max-width: 640px) {
  .section-title { font-size: 1.55rem; }
}

.doc-paragraph {
  font-size: 1.15rem;
  line-height: 2;
  margin-bottom: 1.4rem;
  text-align: justify;
  color: var(--text-main);
}
@media (max-width: 640px) {
  .doc-paragraph { font-size: 1.05rem; }
}

/* 首字下沉效果 */
.drop-cap::first-letter {
  float: left;
  font-size: 3.6rem;
  line-height: 0.85;
  padding: 0.1rem 0.6rem 0 0;
  font-weight: 900;
  color: var(--vermilion);
}
[data-theme="dark"] .drop-cap::first-letter {
  color: var(--amber-gold);
}

/* 提問與重點引文卡片 */
.callout-box {
  margin: 2rem 0;
  padding: 1.75rem 2rem;
  border-radius: 14px;
  background: var(--bg-card);
  border-left: 5px solid var(--vermilion);
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .callout-box {
  border-left-color: var(--amber-gold);
}

.callout-lead {
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.6;
  color: var(--vermilion);
  margin-bottom: 0.6rem;
}
[data-theme="dark"] .callout-lead {
  color: var(--amber-gold);
}

.callout-body {
  font-size: 1.15rem;
  line-height: 1.85;
  color: var(--text-main);
}

/* 主張與列表項裝飾 */
.claim-list {
  list-style: none;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.claim-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--bg-card);
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  font-size: 1.1rem;
  line-height: 1.8;
}

.claim-bullet {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--vermilion-light);
  color: var(--vermilion);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.2rem;
  font-weight: 900;
  font-size: 0.85rem;
}
[data-theme="dark"] .claim-bullet {
  background: rgba(216, 160, 87, 0.15);
  color: var(--amber-gold);
}

/* 六大問責徽章網格 */
.badge-grid-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}
@media (max-width: 600px) {
  .badge-grid-6 { grid-template-columns: repeat(2, 1fr); }
}
.badge-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1rem 0.75rem;
  border-radius: 10px;
  text-align: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s;
}
.badge-pill:hover {
  border-color: var(--amber-gold);
}

/* 核心公理大型旗幟 */
.axiom-banner {
  margin: 2.5rem 0;
  padding: 2.5rem 2rem;
  background: #11141A;
  color: #FFFFFF;
  border-radius: 16px;
  text-align: center;
  border: 1px solid #283141;
  box-shadow: var(--shadow-md);
  position: relative;
}
.axiom-tag {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #D8A057;
  margin-bottom: 0.75rem;
  font-weight: 700;
}
.axiom-quote {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #FFFFFF;
  margin-bottom: 0.8rem;
}
.axiom-sub {
  font-size: 1.05rem;
  color: #B5BAC7;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.75;
}

/* 八大排比卡片 (結語) */
.pledge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
  margin: 2rem 0;
}
@media (max-width: 600px) {
  .pledge-grid { grid-template-columns: 1fr; }
}
.pledge-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.pledge-item::before {
  content: '◆';
  color: var(--vermilion);
  font-size: 0.75rem;
}

/* 四大守護宣告 */
.vision-cards {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 1.75rem 0;
}
.vision-card {
  padding: 1.15rem 1.4rem;
  background: var(--bg-card-subtle);
  border-radius: 10px;
  border-left: 4px solid var(--amber-gold);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.7;
}

/* =========================================================
   6. 官方發起機構聲明 (Official Colophon)
   ========================================================= */
.colophon-card {
  margin-top: 4.5rem;
  padding: 3rem 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  position: relative;
}
@media (max-width: 640px) {
  .colophon-card { padding: 2rem 1.25rem; }
}

.colophon-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--vermilion-light);
  color: var(--vermilion);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
}
[data-theme="dark"] .colophon-badge {
  background: rgba(216, 160, 87, 0.15);
  color: var(--amber-gold);
}

.colophon-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}
.colophon-sub {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-bottom: 1.5rem;
}
.colophon-desc {
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.85;
  text-align: justify;
}

/* =========================================================
   7. 頁尾 Footer
   ========================================================= */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 4rem 1.5rem 2.5rem;
  margin-top: auto;
  font-family: var(--font-sans);
}
.footer-container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
}
.footer-org {
  max-width: 480px;
}
.footer-org-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}
.footer-org-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.footer-links {
  display: flex;
  gap: 2.5rem;
}
.footer-col h5 {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.footer-col a {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
}
.footer-col a:hover {
  color: var(--vermilion);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1.75rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-light);
}
/* =========================================================
   8. 學會活動紀實 Gallery
   ========================================================= */
.gallery-section {
  margin-top: 4.5rem;
  padding-top: 3rem;
  border-top: 2px solid var(--border-color);
}
.gallery-section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.gallery-section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--vermilion);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
[data-theme="dark"] .gallery-section-tag {
  color: var(--amber-gold);
}
.gallery-section-title {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}
.gallery-section-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.gallery-group-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.gallery-group-title:first-of-type {
  margin-top: 0;
}
.gallery-group-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--vermilion);
  flex-shrink: 0;
}
[data-theme="dark"] .gallery-group-dot {
  background: var(--amber-gold);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

.gallery-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.25s ease;
}
.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--amber-gold);
}

.gallery-item-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 75%;
  overflow: hidden;
}
.gallery-item-img-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.gallery-item:hover .gallery-item-img-wrap img {
  transform: scale(1.05);
}

.gallery-item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 0.75rem 0.6rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}
.gallery-item-overlay span {
  color: #fff;
  font-size: 0.78rem;
  font-family: var(--font-sans);
  font-weight: 600;
}

.gallery-item-caption {
  padding: 0.7rem 0.85rem;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  color: var(--text-muted);
  line-height: 1.45;
  font-weight: 600;
}

.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.88);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lightbox-overlay.active {
  display: flex;
}
.lightbox-overlay img {
  max-width: 90%;
  max-height: 88vh;
  border-radius: 10px;
  box-shadow: 0 16px 60px rgba(0,0,0,0.5);
  object-fit: contain;
}
.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10000;
}
.lightbox-close:hover {
  background: rgba(255,255,255,0.3);
}
.lightbox-caption {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.85);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  max-width: 80%;
}
/* =========================================================
   9. 首頁首屏動態輪播 Hero Carousel — 精緻卡片式水平滾動版
   ========================================================= */
.hero-carousel-section {
  width: 100%;
  background: var(--bg-hero);
  padding: 1.25rem 1rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}
@media (max-width: 640px) {
  .hero-carousel-section {
    padding: 0.75rem 0.5rem;
  }
}

.carousel-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  height: 380px;
  overflow: hidden;
  border-radius: 14px;
  background: #000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
}
@media (max-width: 768px) {
  .carousel-container {
    height: 280px;
    border-radius: 10px;
  }
}
@media (max-width: 480px) {
  .carousel-container {
    height: 215px; /* 緊湊單屏手機黃金視角 */
    border-radius: 8px;
  }
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
}

.carousel-img-wrap {
  width: 100%;
  height: 100%;
  position: relative;
}
.carousel-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s;
}
.carousel-btn:hover {
  background: var(--vermilion);
  border-color: var(--vermilion);
}
.carousel-prev { left: 0.75rem; }
.carousel-next { right: 0.75rem; }
@media (max-width: 480px) {
  .carousel-btn {
    width: 28px;
    height: 28px;
  }
  .carousel-prev { left: 0.4rem; }
  .carousel-next { right: 0.4rem; }
}

.carousel-dots {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}
@media (max-width: 480px) {
  .carousel-dots {
    bottom: 0.5rem;
    gap: 0.35rem;
  }
}
.carousel-dot {
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}
@media (max-width: 480px) {
  .carousel-dot {
    width: 16px;
    height: 2.5px;
  }
}
.carousel-dot.active {
  background: var(--amber-gold);
  width: 36px;
}
@media (max-width: 480px) {
  .carousel-dot.active {
    width: 26px;
  }
}

/* =========================================================
   4. 推薦閱讀
   ========================================================= */
.page-head {
  background: var(--bg-hero);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  padding: 3rem 1.5rem 2.5rem;
}
.page-head-tag {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--vermilion);
  margin-bottom: 0.5rem;
}
[data-theme="dark"] .page-head-tag {
  color: var(--amber-gold);
}
.page-head-title {
  font-size: 2.3rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1.3;
  color: var(--text-main);
}

.topic-nav {
  max-width: 860px;
  margin: 1.75rem auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.topic-nav a {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--bg-card);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.topic-nav a:hover {
  color: var(--vermilion);
  border-color: var(--vermilion);
}
[data-theme="dark"] .topic-nav a:hover {
  color: var(--amber-gold);
  border-color: var(--amber-gold);
}

.reading-main {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0.5rem 1.5rem 5rem;
}

.reading-group {
  margin-top: 3rem;
  scroll-margin-top: 92px;
}
.reading-group-title {
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.4;
  color: var(--text-main);
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--border-color);
}

.reading-group-intro {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin-top: 0.9rem;
}

.reading-list {
  list-style: none;
}
.reading-item {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-sans);
  line-height: 1.5;
}
.reading-title {
  font-size: 1.04rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-main);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.reading-title:hover {
  color: var(--vermilion);
  text-decoration: underline;
  text-underline-offset: 3px;
}
[data-theme="dark"] .reading-title:hover {
  color: var(--amber-gold);
}
.reading-trans {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.reading-meta {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-top: 0.3rem;
}
.reading-desc {
  font-size: 0.93rem;
  line-height: 1.75;
  color: var(--text-main);
  margin-top: 0.45rem;
}
.reading-related {
  list-style: none;
  margin-top: 0.6rem;
  padding-left: 0.85rem;
  border-left: 2px solid var(--border-color);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.reading-related a {
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-color: var(--border-color);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.reading-related a:hover {
  color: var(--vermilion);
  text-decoration-color: currentColor;
}
[data-theme="dark"] .reading-related a:hover {
  color: var(--amber-gold);
}

@media (max-width: 640px) {
  .page-head {
    padding: 2.25rem 1rem 2rem;
  }
  .page-head-title {
    font-size: 1.75rem;
  }
  .topic-nav {
    margin-top: 1.25rem;
    gap: 0.4rem;
  }
  .topic-nav a {
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
  }
  .reading-main {
    padding: 0 1rem 3.5rem;
  }
  .reading-group {
    margin-top: 2.25rem;
    scroll-margin-top: 76px;
  }
  .reading-group-title {
    font-size: 1.25rem;
  }
  .reading-title {
    font-size: 0.98rem;
  }
}

/* =========================================================
   10. 改版新增：分頁列橫向捲動、頁尾英文名、首頁成立說明、組織架構
   ========================================================= */
.page-tabs-inner {
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.page-tabs-inner::-webkit-scrollbar { display: none; }
.page-tab { flex-shrink: 0; }

.footer-org-en {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* 首頁：成立說明與各頁入口 */
.home-section {
  max-width: 860px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 0;
}
.home-section:last-of-type { padding-bottom: 4.5rem; }
.home-section .doc-section { margin-bottom: 0; }
.home-section .gallery-section { margin-top: 0; }
.about-key {
  font-weight: 700;
  padding: 1.1rem 1.4rem;
  border-left: 4px solid var(--vermilion);
  background: var(--bg-card-subtle);
  border-radius: 0 12px 12px 0;
}
[data-theme="dark"] .about-key { border-left-color: var(--amber-gold); }
.about-sign {
  margin-top: 2.25rem;
  text-align: right;
  line-height: 1.8;
}
.about-sign-name {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text-main);
}
.about-sign-date {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--text-muted);
}
.home-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}
.home-link {
  display: block;
  text-align: center;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.1rem 1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.home-link:hover {
  color: var(--vermilion);
  border-color: var(--vermilion);
  transform: translateY(-2px);
}
[data-theme="dark"] .home-link:hover { color: var(--amber-gold); border-color: var(--amber-gold); }
@media (max-width: 640px) {
  .home-section { padding: 2.5rem 1rem 0; }
  .home-section:last-of-type { padding-bottom: 3rem; }
  .home-links { grid-template-columns: 1fr; gap: 0.7rem; margin-top: 1.75rem; }
  .about-key { padding: 0.9rem 1rem; }
}

/* 組織架構 */
.org-main {
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  padding: 1rem 1.5rem 5rem;
}
.org-block { margin-top: 3rem; }
.org-block-title {
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.4;
  color: var(--text-main);
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 1.5rem;
}
.org-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
}
.org-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
}
.org-node {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.6rem 1.2rem;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}
.org-node.is-main {
  background: var(--vermilion);
  border-color: var(--vermilion);
  color: #FFF;
}
.org-node.is-side {
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card-subtle);
  box-shadow: none;
}
.org-link, .org-arrow {
  font-size: 1rem;
  line-height: 1;
  color: var(--text-light);
}
.org-committees {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  width: 100%;
  max-width: 640px;
}
.org-committees .org-node { text-align: center; font-weight: 600; }
.org-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.org-item {
  font-family: var(--font-sans);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}
.org-item-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
}
.org-item-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  margin-left: 0.4rem;
}
.org-item-desc {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin-top: 0.3rem;
}
.org-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}
.org-num {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--vermilion);
  margin-bottom: 0.15rem;
}
[data-theme="dark"] .org-num { color: var(--amber-gold); }
@media (max-width: 640px) {
  .org-main { padding: 0 1rem 3.5rem; }
  .org-block { margin-top: 2.25rem; }
  .org-block-title { font-size: 1.25rem; }
  .org-grid { grid-template-columns: 1fr; }
  .org-committees { grid-template-columns: 1fr; }
  .org-node { font-size: 0.92rem; padding: 0.5rem 0.9rem; }
}
