/* ═══════════════════════════════════════════════
   多特瑞 萬人抹油活動 — 共用樣式表 v2
   「柔霧薰衣草」配色：低飽和、高明度、暈染式陰影
   ─────────────────────────────────────────────
   兩頁差異樣式以 body class 區分：
   <body class="page-home">   → index.html
   <body class="page-photos"> → rules.html
═══════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════
   CSS VARIABLES — 柔霧薰衣草 × 乾燥玫瑰
═══════════════════════════════════════════════ */
:root {
  /* 石岩灰藍系（取自主視覺「10,000」數字與書法字墨色，取代霧紫） */
  --pu-deep: #47535d; /* 深石岩灰藍：footer / 深色元素 */
  --pu-main: #6b7b8a; /* 主色灰藍：按鈕 / 強調（主視覺數字＋「萬人抹油挑戰」書法字原色） */
  --pu-mid: #93a2ac; /* 中灰藍：hover / 邊框 */
  --pu-light: #bcc4ca; /* 淺灰藍：連結 / 標籤 */
  --pu-pale: #f4f1e9; /* 極淡暖米：卡片底色 */

  /* 大地暖棕系（取自主視覺服裝／木質色調，取代玫瑰粉） */
  --rose: #c9986f; /* 暖棕陶土：裝飾漸層 */
  --rose-cta: #b87a4e; /* CTA 按鈕漸層起點（白字可讀） */
  --rose-deep: #9c6339; /* CTA 按鈕漸層尾端（白字可讀） */
  --rose-light: #e4c9ae; /* 淡陶土：hover */

  --lavender: #e6e0d2; /* 暖石灰：分隔線 */
  --gold: #eaca21; /* 芥末金：數字 / 里程碑（取自主視覺「萬人抹油挑戰」反白色塊） */

  --soft-white: #fbf9f5; /* 帶暖調米白底 */
  --soft-gray: #efeae0; /* 帶暖調灰 */
  --text-dark: #585858; /* 炭灰文字（取自主視覺標題色） */
  --text-mid: #6e6a63; /* 中暖灰文字 */
  --text-light: #a39c8e; /* 淡暖灰次要文字 */

  /* 陰影統一色源：暈染感而非投影感 */
  --shadow-soft: rgba(74, 66, 54, 0.1);
  --shadow-mid: rgba(74, 66, 54, 0.16);
  --shadow-rose: rgba(156, 99, 57, 0.35);
}

/* ═══════════════════════════════════════════════
   BASE
═══════════════════════════════════════════════ */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

:target {
  scroll-margin-top: 60px;
}

body {
  font-family: "Noto Sans TC", sans-serif;
  color: var(--text-dark);
  overflow-x: hidden;
  background-image: url("../images/back.jpg");
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* iOS Safari 不支援 fixed 背景且會造成滾動卡頓，手機改用 scroll */
@media (max-width: 767px) {
  body {
    background-attachment: scroll;
  }
}

/* 文字選取也走柔色調 */
::selection {
  background: var(--pu-light);
  color: var(--pu-deep);
}

/* 鍵盤操作的柔和焦點框（無障礙） */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--pu-light);
  outline-offset: 2px;
  border-radius: 2rem;
}

/* ═══════════════════════════════════════════════
   NAVBAR — 恆定柔紫毛玻璃
   （不做透明→實底的模式翻轉，滾動時只加深陰影）
═══════════════════════════════════════════════ */
/* sticky 必須放在掛載點上（body 直接子元素），
   放在被包住的 .site-nav 上會因父容器高度不足而失效 */
#siteHeader {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 60px; /* header.js 注入前預留高度，避免載入時版面跳動 */
}

.site-nav {
  position: relative; /* 供手機下拉選單定位 */
  background: rgba(251, 249, 244, 0.8);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-bottom: 1px solid rgba(71, 83, 93, 0.08);
  transition:
    background 0.35s ease,
    box-shadow 0.35s ease;
}

/* 滾動後：微增不透明度＋浮起陰影，色彩不翻轉 */
.site-nav.scrolled {
  background: rgba(251, 249, 244, 0.92);
  box-shadow: 0 8px 30px rgba(71, 83, 93, 0.12);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 60px;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ── 一般連結：安靜的文字層級 ── */
.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-mid);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  border-radius: 2rem;
  transition:
    color 0.25s ease,
    background 0.25s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--pu-deep);
  background: rgba(188, 196, 202, 0.22);
}

/* 當前頁：深色加粗＋漸層小底線（比實心藥丸更輕盈） */
.nav-links a.active {
  color: var(--pu-deep);
  font-weight: 700;
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 1px;
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--pu-main), var(--rose));
}

/* ── 次要按鈕：描邊 ghost（得獎公布）── */
.nav-links a.nav-ghost {
  border: 1.5px solid rgba(107, 123, 138, 0.45);
  background: rgba(255, 255, 255, 0.55);
  color: #56646e;
  font-weight: 700;
  padding: 0.42rem 1rem;
}

.nav-links a.nav-ghost:hover {
  background: var(--pu-pale);
  border-color: var(--pu-main);
  color: var(--pu-deep);
}

/* ── 主要 CTA：全站唯一實心（上傳相片）── */
.nav-links a.nav-cta {
  background: linear-gradient(135deg, var(--rose-cta), var(--rose-deep));
  color: white;
  font-weight: 700;
  padding: 0.45rem 1.1rem;
  box-shadow: 0 4px 14px var(--shadow-rose);
  transition:
    background 0.25s ease,
    transform 0.2s ease,
    box-shadow 0.25s ease;
}

.nav-links a.nav-cta:hover {
  background: linear-gradient(135deg, #d9ae85, var(--rose-cta));
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 7px 20px var(--shadow-rose);
}

/* ── 漢堡選單按鈕（桌機隱藏，手機顯示）── */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 0.38rem 0.75rem;
  border: 1px solid rgba(107, 123, 138, 0.35);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.6);
  color: var(--pu-deep);
  cursor: pointer;
  transition:
    background 0.25s ease,
    border-color 0.25s ease;
}

.nav-toggle:hover,
.nav-toggle.open {
  background: var(--pu-pale);
  border-color: var(--pu-mid);
}

.nav-toggle-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 18px;
  height: 14px;
}

.nav-toggle-icon span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

/* 開啟時三條線變成 ✕ */
.nav-toggle.open .nav-toggle-icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.open .nav-toggle-icon span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open .nav-toggle-icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-toggle-text {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1;
}

/* ── 手機版：懸浮卡片式選單 ── */
@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0.75rem;
    right: 0.75rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    padding: 0.6rem;
    background: rgba(253, 251, 246, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(188, 196, 202, 0.5);
    border-radius: 1.25rem;
    box-shadow: 0 20px 50px rgba(71, 83, 93, 0.22);
  }

  .nav-links.open {
    display: flex;
    animation: menuDrop 0.3s cubic-bezier(0.2, 0.8, 0.3, 1.1);
  }

  @keyframes menuDrop {
    from {
      opacity: 0;
      transform: translateY(-10px) scale(0.98);
    }

    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  /* 選項逐一淡入，有節奏感 */
  .nav-links.open li {
    animation: menuItemIn 0.35s ease both;
  }

  .nav-links.open li:nth-child(1) {
    animation-delay: 0.03s;
  }
  .nav-links.open li:nth-child(2) {
    animation-delay: 0.08s;
  }
  .nav-links.open li:nth-child(3) {
    animation-delay: 0.13s;
  }
  .nav-links.open li:nth-child(4) {
    animation-delay: 0.18s;
  }

  @keyframes menuItemIn {
    from {
      opacity: 0;
      transform: translateY(-6px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* 一般連結：左對齊、大點擊範圍 */
  .nav-links a {
    justify-content: flex-start;
    font-size: 0.95rem;
    padding: 0.7rem 1rem;
    border-radius: 0.9rem;
  }

  /* 手機版 active：淡紫底＋左側漸層短籤，取消桌機底線 */
  .nav-links a.active {
    background: var(--pu-pale);
  }

  .nav-links a.active::after {
    left: 0;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    background: linear-gradient(180deg, var(--pu-main), var(--rose));
  }

  /* 按鈕群組與一般連結之間以細線分隔 */
  .nav-links li:nth-last-child(2) {
    margin-top: 0.4rem;
    padding-top: 0.55rem;
    border-top: 1px solid var(--lavender);
  }

  /* 兩顆按鈕在面板內置中滿版 */
  .nav-links a.nav-cta,
  .nav-links a.nav-ghost {
    justify-content: center;
    border-radius: 0.9rem;
  }
}

/* ═══════════════════════════════════════════════
   HERO 主視覺區（首頁 — 滿版圖片）
═══════════════════════════════════════════════ */
.hero-section {
  line-height: 0; /* 消除 img 底部縫隙 */
  min-height: 120px; /* 圖片尚未放置時仍保留柔色帶 */
  background: linear-gradient(135deg, var(--pu-pale), var(--lavender));
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ═══════════════════════════════════════════════
   SECTIONS — 柔紫毛玻璃
═══════════════════════════════════════════════ */
.section-block {
  padding: 3rem 0;
}

/* 首頁：blur 較強、底色較實 */
.page-home .section-block:nth-child(odd) {
  background: rgba(250, 247, 240, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.page-home .section-block:nth-child(even) {
  background: rgba(255, 253, 248, 0.86);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* 照片牆頁：blur 較弱、底色較透 */
.page-photos .section-block:nth-child(odd) {
  background: rgba(250, 247, 240, 0.82);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}

.page-photos .section-block:nth-child(even) {
  background: rgba(255, 253, 248, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.section-title {
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--pu-deep);
  margin-bottom: 0.25rem;
}

.section-title span {
  font-weight: 900;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 首頁標題強調字：霧紫 → 乾燥玫瑰 */
.page-home .section-title span {
  background-image: linear-gradient(135deg, var(--pu-main), var(--rose));
}

/* 照片牆頁標題強調字：蜂蜜金 → 乾燥玫瑰 */
.page-photos .section-title span {
  background-image: linear-gradient(135deg, var(--gold), var(--rose));
}

.section-sub {
  font-size: 1.125rem;
  color: var(--text-mid);
  line-height: 1.7;
  font-weight: 700;
  margin-bottom: 2rem;
  margin-top: 2rem;
}

.divider {
  width: 44px;
  height: 3px;
  background: linear-gradient(90deg, var(--pu-light), var(--rose-light));
  border-radius: 2px;
  margin: 0.5rem auto 1.5rem;
}

.tag-pill {
  display: inline-block;
  background: linear-gradient(
    135deg,
    rgba(107, 123, 138, 0.1),
    rgba(201, 152, 111, 0.1)
  );
  color: var(--pu-main);
  border-radius: 2rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.85rem;
  margin-bottom: 0.4rem;
  border: 1px solid rgba(107, 123, 138, 0.25);
}

/* ═══════════════════════════════════════════════
   MAP SECTION（首頁 — 7 大區架構）
═══════════════════════════════════════════════ */
.map-wraper {
  position: relative;
  max-width: 380px;
  margin: 0 auto;
}

.map-base-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 1rem;
}

.map-svg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.map-tooltip {
  position: absolute;
  background: var(--pu-deep);
  color: white;
  padding: 0.4rem 0.85rem;
  border-radius: 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  white-space: nowrap;
  z-index: 10;
  box-shadow: 0 6px 20px var(--shadow-mid);
}

.map-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--pu-deep);
}

.region-path {
  cursor: pointer;
  pointer-events: all;
  fill: transparent;
  stroke-width: 0;
  transition:
    fill 0.3s ease,
    filter 0.3s ease;
}

/* 7 大區 Hover — 粉彩版亮色與柔光 */
#svgTaipei:hover {
  fill: rgba(91, 184, 172, 0.28);
  filter: drop-shadow(0 0 10px rgba(91, 184, 172, 0.45));
}

#svgThm:hover {
  fill: rgba(163, 201, 126, 0.28);
  filter: drop-shadow(0 0 10px rgba(163, 201, 126, 0.45));
}

#svgCct:hover {
  fill: rgba(242, 192, 120, 0.3);
  filter: drop-shadow(0 0 10px rgba(242, 192, 120, 0.45));
}

#svgYcn:hover {
  fill: rgba(237, 160, 122, 0.3);
  filter: drop-shadow(0 0 10px rgba(237, 160, 122, 0.45));
}

#svgKp:hover {
  fill: rgba(111, 163, 207, 0.28);
  filter: drop-shadow(0 0 10px rgba(111, 163, 207, 0.45));
}

#svgYhd:hover {
  fill: rgba(124, 198, 232, 0.28);
  filter: drop-shadow(0 0 10px rgba(124, 198, 232, 0.45));
}

#svgIslands:hover {
  fill: rgba(163, 201, 126, 0.28);
  filter: drop-shadow(0 0 10px rgba(163, 201, 126, 0.45));
}

/* 7 大區卡片網格容器 */
.region-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.85rem;
  margin-top: 0;
}

@media (max-width: 576px) {
  .region-cards-container {
    grid-template-columns: repeat(3, 1fr); /* 行動版維持雙排排版 */
  }
}

.region-card {
  border-radius: 1.25rem;
  padding: 1rem 0.75rem 0.85rem;
  text-align: center;
  border: 1.5px solid transparent;
  cursor: default;
  background: rgba(255, 255, 255, 0.92);
  transition:
    box-shadow 0.3s ease,
    transform 0.3s ease,
    border-color 0.3s ease;
}

/* 各區粉彩邊框色與淡底色 */
.region-card.r-taipei {
  border-color: rgba(91, 184, 172, 0.35);
  background: rgba(240, 250, 248, 0.92);
}

.region-card.r-thm {
  border-color: rgba(163, 201, 126, 0.35);
  background: rgba(247, 251, 241, 0.92);
}

.region-card.r-cct {
  border-color: rgba(242, 192, 120, 0.4);
  background: rgba(253, 248, 240, 0.92);
}

.region-card.r-ycn {
  border-color: rgba(237, 160, 122, 0.4);
  background: rgba(253, 245, 240, 0.92);
}

.region-card.r-kp {
  border-color: rgba(111, 163, 207, 0.35);
  background: rgba(240, 246, 252, 0.92);
}

.region-card.r-yhd {
  border-color: rgba(124, 198, 232, 0.35);
  background: rgba(240, 249, 253, 0.92);
}

.region-card.r-islands {
  border-color: rgba(163, 201, 126, 0.35);
  background: rgba(247, 251, 241, 0.92);
}

/* 高亮聯動樣式（上浮幅度縮小、光暈柔化） */
.region-card.highlighted {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--shadow-soft);
}

.region-card.r-taipei.highlighted {
  border-color: #5bb8ac;
  box-shadow: 0 0 0 4px rgba(91, 184, 172, 0.14);
}

.region-card.r-thm.highlighted {
  border-color: #a3c97e;
  box-shadow: 0 0 0 4px rgba(163, 201, 126, 0.14);
}

.region-card.r-cct.highlighted {
  border-color: #f2c078;
  box-shadow: 0 0 0 4px rgba(242, 192, 120, 0.16);
}

.region-card.r-ycn.highlighted {
  border-color: #eda07a;
  box-shadow: 0 0 0 4px rgba(237, 160, 122, 0.16);
}

.region-card.r-kp.highlighted {
  border-color: #6fa3cf;
  box-shadow: 0 0 0 4px rgba(111, 163, 207, 0.14);
}

.region-card.r-yhd.highlighted {
  border-color: #7cc6e8;
  box-shadow: 0 0 0 4px rgba(124, 198, 232, 0.14);
}

.region-card.r-islands.highlighted {
  border-color: #a3c97e;
  box-shadow: 0 0 0 4px rgba(163, 201, 126, 0.14);
}

.region-card .r-icon {
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
}

.region-card .r-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-mid);
  letter-spacing: 0.03em;
}

.region-card .r-count {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
  background: linear-gradient(135deg, var(--pu-main), var(--rose));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.region-card .r-unit {
  font-size: 0.7rem;
  color: var(--text-light);
}

/* ═══════════════════════════════════════════════
   STATS SUMMARY（首頁 — 累計人數與達成率）
   每週更新請改 data/counts.json，本區塊由 index.js 自動渲染
═══════════════════════════════════════════════ */
.thermo-summary {
  max-width: 420px;
  margin: 0 auto 2rem;
  text-align: center;
}

.thermo-big-num {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--pu-deep), var(--pu-main));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.thermo-big-num span {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--rose), var(--pu-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.thermo-pct {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--rose-deep);
  margin: 0.25rem 0;
}

.thermo-goal {
  font-size: 0.95rem;
  color: var(--text-mid);
}

.progress-bar-custom {
  width: 100%;
  height: 12px;
  background: var(--soft-gray);
  border-radius: 999px;
  overflow: hidden;
  margin: 1rem 0;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--pu-main), var(--rose), var(--gold));
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── 達標慶祝：100% 時轉蜂蜜金 ──
   （.goal-reached 由 index.js 在達標時自動加上）*/
.thermo-summary.goal-reached .thermo-big-num {
  background-image: linear-gradient(135deg, #a8791c, var(--gold));
}

.thermo-summary.goal-reached .thermo-big-num span {
  background-image: linear-gradient(135deg, var(--gold), var(--rose));
}

.thermo-summary.goal-reached .thermo-pct {
  color: #8c6018; /* 金褐色，白底對比 4.54:1 */
}

.thermo-summary.goal-reached .progress-fill {
  background: linear-gradient(90deg, var(--gold), #c9a61c);
}

/* ═══════════════════════════════════════════════
   RULE CARDS + 注意事項（首頁 — 活動規則）
═══════════════════════════════════════════════ */
.rule-card-lg {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 1.4rem;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 6px 24px var(--shadow-soft);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.rule-card-lg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--pu-light), var(--rose-light));
}

.rule-card-lg:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px var(--shadow-mid);
}

.rule-card-lg .rc-num {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--pu-main), var(--rose));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.rule-card-lg .rc-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
}

.rule-card-lg .rc-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pu-deep);
  margin-bottom: 0.6rem;
}

.rule-card-lg .rc-text {
  font-size: 0.88rem;
  color: var(--text-dark);
  line-height: 1.85;
}

.notice-block {
  background: rgba(244, 241, 233, 0.92);
  border-radius: 1.4rem;
  padding: 1.75rem;
  border-left: 4px solid var(--pu-light);
  box-shadow: 0 6px 22px var(--shadow-soft);
  margin-top: 2rem;
}

.notice-block h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--pu-deep);
  margin-bottom: 1rem;
}

.notice-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.notice-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.88rem;
  color: var(--text-dark);
  line-height: 1.75;
}

.notice-list li::before {
  content: "•";
  color: var(--pu-main);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.5;
  flex-shrink: 0;
}

.rules-page-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
}

@media (min-width: 640px) {
  .rules-page-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .rules-page-grid {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
}

/* ═══════════════════════════════════════════════
   RULES INTRO（首頁 — 活動內容介紹，置中文案）
═══════════════════════════════════════════════ */
.rules-intro {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.rules-intro-title {
  font-size: clamp(1.1rem, 2.6vw, 1.4rem);
  font-weight: 700;
  color: var(--pu-deep);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.rules-intro-quote {
  font-size: 0.92rem;
  font-style: italic;
  color: var(--text-mid);
  line-height: 1.9;
  margin-bottom: 1.25rem;
}

.rules-intro-date {
  background: var(--pu-pale);
  color: var(--pu-deep);
  font-weight: 700;
  font-size: 1.125rem;
  padding: 0.4rem 1.2rem;
  border-radius: 2rem;
  margin-bottom: 0.5rem;
}

.rules-block-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--pu-deep);
  margin: 3rem 0 3rem;
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.rules-block-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 32px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--pu-light), var(--rose-light));
}

.rules-text {
  text-align: left;
  font-size: 0.9rem;
  color: var(--text-dark);
  line-height: 1.85;
  margin-bottom: 0.9rem;
}

.rules-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.rules-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.rules-list-text {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  color: var(--text-dark);
  line-height: 1.85;
}

.rules-notice-list .rules-list-text {
  font-size: 0.85rem;
  color: var(--text-mid);
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pu-main), var(--rose));
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.step-badge-notice {
  background: linear-gradient(135deg, var(--gold), #c9a61c);
}

.rules-list-text a {
  color: var(--pu-main);
  font-weight: 700;
  text-decoration: underline;
  word-break: break-all;
}

.rules-list-text a:hover {
  color: var(--rose-deep);
}

/* ═══════════════════════════════════════════════
   UPLOAD GALLERY（首頁 — 上傳圖片區塊）
═══════════════════════════════════════════════ */
.upload-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-top: 0.5rem;
}

@media (min-width: 640px) {
  .upload-gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.1rem;
  }
}

.upload-gallery-item {
  border-radius: 1.1rem;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--soft-gray);
  box-shadow: 0 6px 22px var(--shadow-soft);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.upload-gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px var(--shadow-mid);
}

.upload-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.upload-gallery-cta {
  margin-top: 2rem;
}

/* ═══════════════════════════════════════════════
   愛的小手 TABLE（首頁 — 志工名單表格）
═══════════════════════════════════════════════ */
.helper-table-wrap {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 1.4rem;
  padding: 0.5rem;
  box-shadow: 0 6px 24px var(--shadow-soft);
  overflow-x: auto;
}
.helper-table-wrap1 {
  background: rgba(221, 232, 234, 0.54);
  border-radius: 1.4rem;
  padding: 0.5rem;
  box-shadow: 0 6px 24px var(--shadow-soft);
  overflow-x: auto;
}

.helper-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.helper-table thead th {
  background: linear-gradient(135deg, var(--pu-main), var(--rose));
  color: white;
  font-weight: 700;
  text-align: center;
  padding: 0.75rem 1rem;
  white-space: nowrap;
}

.helper-table thead th:first-child {
  border-top-left-radius: 1rem;
}

.helper-table thead th:last-child {
  border-top-right-radius: 1rem;
}

.helper-table tbody td {
  text-align: center;
  padding: 0.65rem 1rem;
  color: var(--text-dark);
  border-bottom: 1px solid var(--lavender);
}

.helper-table tbody tr:nth-child(even) {
  background: var(--pu-pale);
}

.helper-table tbody tr:hover {
  background: rgba(188, 196, 202, 0.28);
}

.helper-table tbody tr:last-child td {
  border-bottom: none;
}

/* ═══════════════════════════════════════════════
   芳名錄（首頁 — 置中導連圖片）
═══════════════════════════════════════════════ */
.honor-roll-wrap {
  margin-top: 0.5rem;
}

.honor-roll-img {
  max-width: 100%;
  width: 100%;
  height: auto;
  border-radius: 1.4rem;
  box-shadow: 0 8px 28px var(--shadow-mid);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.honor-roll-wrap a {
  display: inline-block;
  max-width: 640px;
}

.honor-roll-wrap a:hover .honor-roll-img {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px var(--shadow-rose);
}

/* ═══════════════════════════════════════════════
   UPLOAD BANNER（照片牆頁）
═══════════════════════════════════════════════ */
.upload-banner {
  background-color: rgba(255, 255, 255, 0.55);
  background-image: linear-gradient(
    135deg,
    rgba(107, 123, 138, 0.08),
    rgba(201, 152, 111, 0.06)
  );
  border: 1.5px dashed var(--pu-mid);
  border-radius: 1.4rem;
  padding: 2rem 1.5rem;
  text-align: center;
  margin-bottom: 2rem;
}

.upload-banner p {
  color: var(--text-mid);
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.btn-upload {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--rose-cta), var(--rose-deep));
  color: white !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.65rem 2rem;
  border-radius: 2rem;
  box-shadow: 0 5px 16px var(--shadow-rose);
  transition: all 0.3s ease;
}

.btn-upload:hover {
  background: linear-gradient(135deg, #d9ae85, var(--rose-cta));
  transform: translateY(-1px);
  box-shadow: 0 8px 22px var(--shadow-rose);
}

/* ═══════════════════════════════════════════════
   MASONRY 瀑布流（照片牆頁）
═══════════════════════════════════════════════ */
.masonry-grid {
  column-count: 2;
  column-gap: 0.85rem;
  margin-top: 0.5rem;
}

@media (min-width: 480px) {
  .masonry-grid {
    column-count: 3;
  }
}

@media (min-width: 768px) {
  .masonry-grid {
    column-count: 4;
  }
}

@media (min-width: 1100px) {
  .masonry-grid {
    column-count: 5;
  }
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 0.85rem;
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--soft-gray);
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease,
    box-shadow 0.3s ease;
}

.masonry-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.masonry-item:hover {
  box-shadow: 0 10px 30px var(--shadow-mid);
}

.masonry-item:hover img {
  transform: scale(1.03);
}

.masonry-item .m-overlay {
  position: absolute;
  inset: 0;
  background: rgba(71, 83, 93, 0);
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.masonry-item:hover .m-overlay {
  background: rgba(71, 83, 93, 0.26);
}

.masonry-item .m-zoom {
  color: white;
  font-size: 1.6rem;
  opacity: 0;
  transform: scale(0.85);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.masonry-item:hover .m-zoom {
  opacity: 1;
  transform: scale(1);
}

.load-more-wrap {
  text-align: center;
  margin-top: 1.75rem;
}

.btn-load-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid var(--pu-mid);
  color: var(--pu-main);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.65rem 1.85rem;
  border-radius: 3rem;
  cursor: pointer;
  transition:
    background 0.3s ease,
    color 0.3s ease,
    transform 0.2s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 4px 14px var(--shadow-soft);
}

.btn-load-more:hover {
  background: var(--pu-main);
  border-color: var(--pu-main);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(107, 123, 138, 0.35);
}

.btn-load-more:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-load-more .spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.photo-count-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: var(--text-light);
}

.photo-count-bar strong {
  color: var(--pu-main);
  font-weight: 700;
}

/* ═══════════════════════════════════════════════
   LIGHTBOX 燈箱（照片牆頁）
═══════════════════════════════════════════════ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(46, 40, 34, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox.show {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: 1rem;
  box-shadow: 0 24px 70px rgba(46, 40, 34, 0.5);
  animation: fadeZoom 0.35s ease;
}

@keyframes fadeZoom {
  from {
    opacity: 0;
    transform: scale(0.94);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(188, 196, 202, 0.2);
  border: 1px solid rgba(188, 196, 202, 0.45);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease;
  z-index: 100000;
}

.lightbox-close:hover {
  background: rgba(188, 196, 202, 0.4);
}

/* 燈箱左右切換按鈕 */
.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(188, 196, 202, 0.2);
  border: 1px solid rgba(188, 196, 202, 0.45);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease;
  z-index: 100000;
}

.lightbox-nav:hover {
  background: rgba(188, 196, 202, 0.4);
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

/* 燈箱張數指示 */
.lightbox-counter {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  background: rgba(71, 83, 93, 0.45);
  padding: 0.25rem 0.9rem;
  border-radius: 2rem;
  z-index: 100000;
}

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
footer {
  color: rgba(230, 224, 212, 0.75);
  text-align: center;
  padding: 1.75rem 1rem;
  font-size: 0.8rem;
  background: linear-gradient(135deg, var(--pu-deep), #34404a);
}

footer span {
  color: var(--pu-light);
  font-weight: 700;
}

/* ═══════════════════════════════════════════════
   STICKY BOTTOM BAR（兩頁共用，僅行動版顯示）
═══════════════════════════════════════════════ */
.sticky-bottom-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: rgba(71, 83, 93, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1.5px solid rgba(188, 196, 202, 0.35);
  box-shadow: 0 -6px 28px rgba(71, 83, 93, 0.3);
  transform: translateY(110%);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
}

.sticky-bottom-bar.visible {
  transform: translateY(0);
  pointer-events: auto;
}

@media (min-width: 768px) {
  .sticky-bottom-bar {
    display: none;
  }
}

.sticky-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--rose-cta), var(--rose-deep));
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.75rem 2.5rem;
  border-radius: 3rem;
  box-shadow: 0 5px 20px var(--shadow-rose);
  transition:
    background 0.25s ease,
    transform 0.2s ease;
  width: 100%;
  max-width: 340px;
  text-align: center;
}

.sticky-btn:active {
  background: linear-gradient(135deg, #d9ae85, var(--rose-cta));
  color: white;
  transform: scale(0.97);
  opacity: 0.9;
}

/* ═══════════════════════════════════════════════
   ACCESSIBILITY
═══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .nav-links.open,
  .nav-links.open li {
    animation: none;
  }

  .nav-toggle-icon span {
    transition: none;
  }

  .region-path,
  .region-card,
  .rule-card-lg,
  .masonry-item {
    transition: none;
  }
}
