﻿@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght=400;500;700&display=swap');

/* ==============================
   1. Base / Reset
================================= */

/* Variables */
:root {
  --color-bg: #faf8f5;
  --color-surface: #ffffff;
  --color-text: #4a3c31;
  --color-muted: #5f4d42;
  --color-accent: #e5b821;
  --color-accent-red: #c56b58;
  --shadow-soft: 0.25rem 0.25rem 0.75rem rgba(74, 60, 49, 0.1);
  --container-width: 75rem;
  --radius-card: 0.375rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 125%;
  background-color: #faf8f5; /* 防止分頁切換時閃白 */
}

body {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Arial, Helvetica, sans-serif !important;
  background-color: #faf8f5;
  color: #4a3c31;
  line-height: 1.6;
  overflow-x: hidden;
  transition: font-size 0.2s ease;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

.skip-link,
.accesskey-link {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 1000;
  transform: translateY(-160%);
  background: #ffffff;
  color: #4a3c31;
  border: 0.125rem solid #4a3c31;
  border-radius: 0.25rem;
  padding: 0.375rem 0.75rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0.125rem 0.125rem 0 #4a3c31;
}

.accesskey-link {
  width: 0.0625rem;
  height: 0.0625rem;
  overflow: hidden;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.skip-link:focus,
.accesskey-link:focus {
  width: auto;
  height: auto;
  overflow: visible;
  padding: 0.375rem 0.75rem;
  border: 0.125rem solid #4a3c31;
  box-shadow: 0.125rem 0.125rem 0 #4a3c31;
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 0.0625rem;
  height: 0.0625rem;
  padding: 0;
  margin: -0.0625rem;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.1875rem;
}

input:focus {
  border-color: #1f5f3f;
}

/* ==============================
   2. Typography
================================= */

/* ─── 字級切換 ─────────────────────────────────────────────────────────
   實作方式：把 fs-* class 掛到 <html>，改變 root font-size（rem 基準值）
   → 全站所有 rem 值（padding / margin / font-size / border-radius）等比縮放
     → 對使用者體感像「整頁縮放」而非只有字變大變小，符合政府網站無障礙 A/AA 規範
   → 各 .page-* scope 內硬編 rem 的字級也會自動生效，不必逐頁補覆寫
   基準 html font-size 為 125%（見上方 §26 `html { font-size: 125%; }`），
   即瀏覽器預設 16px → 20px；fs-large = 125% × 1.1875 ≈ 148.44%；fs-small = 125% × 0.875 ≈ 109.38%
   ────────────────────────────────────────────────────────────────────
   `body.fs-*` 保留但不再宣告 font-size；JS 同步標上是為了讓仍以 body class 為選擇器的舊規則（下方 issue-slide 已用 em、之後如遇也不需要覆寫）不會漏掉。 */
html.fs-small  { font-size: 109.375%; }             /* 20 × 0.875 ≈ 17.5px */
html.fs-medium { font-size: 125%; }                 /* 20px（同預設，此宣告使 medium 明確化）*/
html.fs-large  { font-size: 148.4375%; }            /* 20 × 1.1875 ≈ 23.75px */

/* Shared Components */

/* 4. 卡片與區塊邊框：細緻的針筆劃質感，邊角半徑減半（0.75rem -> 0.375rem） */
.hand-drawn-border {
  border: 0.09375rem solid #4a3c31;
  border-radius: 0.375rem;
  /* 4. 柔和陰影：溫暖的淡碳褐色陰影，降低透明度，營造層疊立體感 */
  box-shadow: 0.25rem 0.25rem 0.75rem rgba(74, 60, 49, 0.1);
  background-color: #ffffff;
  transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.hand-drawn-border:hover {
  transform: translateY(-0.1875rem);
  box-shadow: 0.375rem 0.5rem 1rem rgba(74, 60, 49, 0.16);
}

/* ==============================
   3. Layout / Container
================================= */

.container {
  max-width: 75rem;
  margin: 0 auto;
  padding: 0 1.25rem;
  position: relative;
  z-index: 2;
}

/* 大標題通用 */
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #4a3c31;
  text-align: center;
  margin-bottom: 1.5rem;
  text-shadow: 0.0625rem 0.0625rem 0 #fff;
  display: block;

}

/* 全民參與、獎項、國際合作、資料庫標題 2rem */
.info-section .section-title,
.participation-section .section-title,
.awards-section .section-title,
.coop-section .section-title,
.db-section .section-title {
  font-size: 2rem;
}

/* ==============================
   4. Header / Navigation
================================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 200;
  background: #ffffff;
  box-shadow: 0 0.125rem 0.625rem rgba(74, 60, 49, 0.12);
  transition: top 0.55s ease-in-out;
  will-change: top;
}

.site-header-placeholder {
  height: 5.5rem;
}

.site-header.site-header--hidden {
  top: var(--site-header-hidden-top, -5.5rem);
  pointer-events: none;
}

.nav {
  background: #ffffff;
  color: #4a3c31;
  border-bottom: 0.09375rem solid #4a3c31;
  padding: 0.625rem 0;
}

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 300;
  min-width: 3rem;
  min-height: 3rem;
  padding: 0.375rem 0.625rem;
  border: 0.09375rem solid #4a3c31;
  border-radius: 50%;
  background: #e5b821;
  color: #4a3c31;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0.125rem 0.125rem 0 rgba(74, 60, 49, 0.75);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.back-to-top:hover {
  background: #fffaeb;
  transform: translateY(-0.125rem);
}

.back-to-top:focus-visible {
  outline: 0.1875rem solid #ffffff;
  outline-offset: 0.1875rem;
  box-shadow: 0 0 0 0.375rem #4a3c31, 0.125rem 0.125rem 0 rgba(74, 60, 49, 0.75);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  margin: 0;
  line-height: 0;
  font-size: 1rem;
  font-weight: inherit;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.test-system-badge {
  display: inline-flex;
  align-items: center;
  padding: .25rem .5rem;
  color: #C0392B;
  font-size: 1.5rem;
  border-radius: .2rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 左側品牌 */
.nav-logo {
  display: flex;
  flex-direction: column;
  color: #4a3c31;
  text-decoration: none;
}

/* 右側區塊 */
.nav-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

/* 上層小字功能列 */
.nav-utility {
  display: flex;
  align-items: center;
  font-size: 0.8125rem;
  gap: 0.75rem;
  color: #4a3c31;
}

.nav-utility a {
  color: #4a3c31;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-utility a:hover {
  color: #8a6c0a;
}

.nav-utility .divider {
  color: #6e5a4c;
  font-size: 0.6875rem;
}

/* 字體大小控制鈕，邊角減半（1.25rem -> 0.625rem） */
.font-size-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(74, 60, 49, 0.05);
  padding: 0.125rem 0.375rem;
  border-radius: 0.625rem;
  border: 0.09375rem solid #4a3c31;
}

.font-size-ctrl span {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #4a3c31;
  margin-right: 0.125rem;
}

.font-size-ctrl button {
  background: transparent;
  border: none;
  color: #4a3c31;
  font-size: 0.6875rem;
  font-weight: 700;
  cursor: pointer;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.font-size-ctrl button.active {
  background: #e5b821;
  /* 1. 稻穗金黃 */
  border: 0.09375rem solid #4a3c31;
  box-shadow: 0.0625rem 0.0625rem 0 #4a3c31;
}

.font-size-ctrl button:hover:not(.active) {
  background: rgba(74, 60, 49, 0.1);
}

/* 社群圖標 */
.nav-socials {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.nav-socials a {
  background: rgba(74, 60, 49, 0.08);
  color: #4a3c31;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s;
  font-size: 0.75rem;
}

.nav-socials a:hover {
  background: #e5b821;
  color: #4a3c31;
  transform: scale(1.1);
}

.lang-en {
  font-weight: 700;
}

/* 下層主選單 */
.nav-links {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

.nav-links a {
  color: #4a3c31;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 700;
  transition: color 0.2s;
  position: relative;
  display: inline-block;
}

.nav-links a:hover {
  color: #8a6c0a;
  /* 1. 稻穗金黃 hover 反饋 */
}

/* 桌機版主選單下拉 */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
  background: none;
  border: 0;
  color: #4a3c31;
  font-family: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.6;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-dropdown-toggle:hover,
.nav-dropdown.is-open .nav-dropdown-toggle {
  color: #8a6c0a;
}

.nav-dropdown-caret {
  flex-shrink: 0;
  font-size: 1.625rem;
  line-height: 1;
  font-weight: 700;
  transition: transform 0.2s ease;
}

.nav-dropdown.is-open .nav-dropdown-caret {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 50%;
  z-index: 2000;
  min-width: 11rem;
  padding: 0.375rem 0;
  list-style: none;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: #ffffff;
  border: 0.0625rem solid #e0d4c0;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1.5rem rgba(74, 60, 49, 0.15);
  transform: translateX(-50%) translateY(-0.375rem);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
}

.nav-dropdown-menu--right {
  right: 0;
  left: auto;
  transform: translateY(-0.375rem);
}

.nav-dropdown.is-open .nav-dropdown-menu {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s;
}

.nav-dropdown.is-open .nav-dropdown-menu--right {
  transform: translateY(0);
}

.nav-dropdown-menu li {
  list-style: none;
}

.nav-dropdown-menu li + li {
  border-top: 0.0625rem solid #f0e8d8;
}

.nav-dropdown-menu li a {
  display: block;
  padding: 0.55rem 1.1rem;
  color: #4a3c31;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.nav-dropdown-menu li a:hover,
.nav-dropdown-menu li a:focus-visible {
  color: #4a3c31;
  background: #f5ead8;
}

.mobile-menu-toggle,
.mobile-menu {
  display: none;
}

.hero-wrapper {
  position: relative;
  height: 29.375rem;
  overflow: hidden;
}

.hero-stage {
  width: 100%;
  height: 100%;
  position: relative;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 1s ease-in-out, visibility 0s linear 1s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem 12.5rem;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

/* 水彩暈染感投影片底圖 (融入原圖大地生態色系) */
.h-bg1 {
  background-image: url("../img/FrontEnd/hero-carousel-1.webp");
  background-size: cover;
  background-position: center;
}

.h-bg2 {
  background-image: url("../img/FrontEnd/hero-carousel-2.webp");
  background-size: cover;
  background-position: center;
}

.h-bg3 {
  background-image: url("../img/FrontEnd/hero-carousel-3.webp");
  background-size: cover;
  background-position: center;
}

.hero-title-art {
  width: min(58vw, 54rem);
  max-height: 100%;
  object-fit: contain;
  position: relative;
  transform: translateY(1.5rem);
  z-index: 2;
  pointer-events: none;
}

/* 3. 搜尋區 (高於主視覺下緣 1.25rem，寬度與高度依先前規範微縮)，邊角減半（0.75rem -> 0.375rem） */
.search-card {
  position: absolute;
  left: 50%;
  bottom: 3.5rem;
  transform: translateX(-50%);
  z-index: 6;
  width: 67.5%;
  max-width: 37.5rem;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(0.5rem);
  padding: 0.75rem 1.25rem;
  z-index: 50;
  border: 0.09375rem solid #4a3c31;
  border-radius: 0.375rem;
  box-shadow: 0.1875rem 0.1875rem 0.625rem rgba(74, 60, 49, 0.1);
}

.search-card h3 {
  font-size: 0.9375rem;
  margin-bottom: 0.375rem;
  color: #4a3c31;
}

/* 深色輪播圖上維持搜尋提示文字辨識度，不產生額外文字副本。 */
.search-text-stroke {
  -webkit-text-stroke: 0.1rem #ffffff;
  paint-order: stroke fill;
}

.search-row {
  display: flex;
  gap: 0.75rem;
}

.search-row input {
  flex: 1;
  height: 2.375rem;
  border: 0.09375rem solid #4a3c31;
  border-radius: 0.25rem;
  /* 0.5rem -> 0.25rem */
  padding: 0 1rem;
  font-size: 0.875rem;
  background: #ffffff;
  outline: 0.1875rem solid transparent;
  color: #4a3c31;
}

.search-row button {
  background: #4A8250;
  color: #ffffff;
  border: 0.09375rem solid #4a3c31;
  border-radius: 0.25rem;
  /* 0.5rem -> 0.25rem */
  padding: 0 1.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0.125rem 0.125rem 0 #4a3c31;
  transition: all 0.2s;
}

.search-row button:hover {
  background: #e5b821;
  color: #4a3c30;
  transform: translate(-0.0625rem, -0.0625rem);
  box-shadow: 0.1875rem 0.1875rem 0 #4a3c31;
}

.hot-tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  align-items: center;
  font-size: 0.75rem;
  color: #6e5a4c;
}

.hot-tag {
  background: #ffffff;
  border: 0.075rem solid #4a3c31;
  border-radius: 0.125rem;
  /* 0.25rem -> 0.125rem */
  padding: 0.0625rem 0.5rem;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  cursor: pointer;
}

.hot-tag:hover,
.hot-tag:focus-visible {
  background: #e5b821;
  color: #4a3c31;
}

.info-section {
  padding: 1.875rem 0;
  position: relative;
  background-color: #ffffff;
  /* 白底區隔 */
}

.info-grid {
  display: flex;
  gap: 1.25rem;
  align-items: stretch;
  position: relative;
  z-index: 2;
}

/* 左側重要活動/影音推廣 */
.left-promo {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.promo-content {
  flex: 0 0 auto;
  aspect-ratio: 800 / 450;
  position: relative;
  overflow: hidden;
  border-radius: 0.25rem;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* YT 縮圖連結 / 播放圖示 */
.yt-thumb-link {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.yt-thumb-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yt-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 4rem;
  height: 4rem;
  background: rgba(0, 0, 0, 0.65);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.yt-play-icon::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0.75rem 0 0.75rem 1.4rem;
  border-color: transparent transparent transparent #ffffff;
  margin-left: 0.2rem;
}

.yt-thumb-link:hover .yt-play-icon {
  background: rgba(200, 0, 0, 0.85);
}

.yt-player-wrap {
  width: 100%;
  height: 100%;
  position: relative;
}

.yt-player-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.yt-error {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: #111;
  color: #fff;
  text-align: center;
  padding: 1rem;
}

.yt-error a {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background: #c00;
  color: #fff;
  border-radius: 0.25rem;
  text-decoration: none;
}

.yt-error a:hover {
  background: #a00;
}

/* 輪播容器 */
.promo-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.promo-slide {
  display: none;
  width: 100%;
  height: 100%;
}

.promo-slide.pc-active {
  display: block;
}

.pc-prev,
.pc-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 0.09375rem solid #4a3c31;
  border-radius: 50%;
  width: 1.875rem;
  height: 1.875rem;
  cursor: pointer;
  font-size: 1.0625rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  color: #4a3c31;
  box-shadow: 0.125rem 0.125rem 0 #4a3c31;
  transition: background 0.2s;
}

.pc-prev {
  left: 0.5rem;
}

.pc-next {
  right: 0.5rem;
}

.pc-prev:hover,
.pc-next:hover {
  background: #e5b821;
}

.pc-dots {
  position: absolute;
  bottom: 0.625rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.375rem;
  z-index: 10;
}

.pc-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: 0.09375rem solid rgba(74, 60, 49, 0.7);
  cursor: pointer;
  transition: background 0.2s;
}

.pc-dot.pc-dot-active {
  background: #e5b821;
  border-color: #4a3c31;
}

/* 右側最新消息標題 */
.news-more-wrap {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.5rem;
}

.news-more-btn {
  display: inline-block;
  padding: 0.375rem 1.125rem;
  background: #ffffff;
  border: 0.09375rem solid #4a3c31;
  border-radius: 0.25rem;
  /* 0.5rem -> 0.25rem */
  font-size: 0.8125rem;
  font-weight: 700;
  color: #4a3c31;
  text-decoration: none;
  box-shadow: 0.125rem 0.125rem 0 #4a3c31;
  transition: all 0.2s;
}

.news-more-btn:hover {
  background: #e5b821;
  transform: translate(-0.0625rem, -0.0625rem);
  box-shadow: 0.1875rem 0.1875rem 0 #4a3c31;
}

/* 活動Banner模擬圖 */
/* 影音推廣模擬播放 */
.video-play-btn {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  background: #e5b821;
  border: 0.09375rem solid #4a3c31;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0.1875rem 0.1875rem 0 #4a3c31;
}

.right-news {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
  min-width: 0;
}

.info-section-title {
  align-self: flex-start;
  margin: 0;
  text-align: left;
}

.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
}

.news-item {
  display: flex;
  align-items: center;
  position: relative;
  padding: 0.25rem 1rem 0.25rem 2.5rem;
  gap: 0.4rem;
  transition: background 0.2s;
  border-bottom: 0.075rem dashed rgba(74, 60, 49, 0.2);
}

.news-item:hover {
  background: #faf4e8;
}

/* Home/Index 置頂圖示；卡片版會在 ExploreNewsList 區段覆蓋定位方式 */
.news-pin-icon {
  width: 0.75rem;
  height: 0.75rem;
  object-fit: contain;
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.news-date {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6e5a4c;
  white-space: nowrap;
}

/* 彩色分類標籤 */
.news-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #4a3c31;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

.news-title:hover,
.news-title:focus-visible {
  color: #2f4f34;
  text-decoration: underline;
  outline: 0.125rem solid #4a6b53;
  outline-offset: 0.125rem;
}

/* 1. 磚瓦橙紅 (Terracotta Red) 作為 New Badge */
.issues-section {
  overflow: hidden;
}

.issues-fullcarousel {
  position: relative;
  height: 25rem;
  overflow: hidden;
}

.issue-slide {
  position: absolute;
  inset: 0;
  background-color: #07396a;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s;
  display: flex;
  align-items: center;
}

.issue-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}


.issue-slide-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.issue-slide-content {
  position: relative;
  z-index: 2;
  max-width: 50%;
  margin: 0 auto;
  color: white;
  text-align: center;
}

.issue-slide-content.food-theme {
  max-width: 60%;
}

.issue-slide-content h2 {
  font-size: 3.4375em;                              /* 用 em 讓字級小/中/大切換能等比放大縮小 */
  font-weight: 700;
  margin-bottom: 0.8rem;
  line-height: 1.3;
  paint-order: stroke fill;
}

#issueSlide1 {
  background-color: #793a10;
}

.issue-slide-content p {
  font-size: 1.125em;                               /* 用 em 讓字級小/中/大切換能等比放大縮小 */
  line-height: 1.4;
  margin-bottom: 1.2rem;
}

.issue-slide-content h2,
.issue-slide-content p {
  color: #ffffff;
}

.issue-slide-content h2.u-inline-07 {
  -webkit-text-stroke: 0.25rem #07396a;
}

.issue-slide-content h2.u-inline-09 {
  -webkit-text-stroke: 0.25rem #793a10;
}

/* 主打專區看更多按鈕：置中對齊 */
.issue-more-btn {
  margin-top: 0;
  display: inline-block;
}

/* 看更多按鈕 */
.cozy-btn {
  display: inline-block;
  background: #ffffff;
  color: #4a3c31;
  font-weight: 700;
  padding: 0.375rem 1.125rem;
  font-size: 0.8125rem;
  border: 0.09375rem solid #4a3c31;
  border-radius: 0.25rem;
  text-decoration: none;
  box-shadow: 0.125rem 0.125rem 0 #4a3c31;
  transition: all 0.2s;
}

.cozy-btn:hover {
  background: #e5b821;
  /* Hover 反饋 */
  transform: translate(-0.0625rem, -0.0625rem);
  box-shadow: 0.1875rem 0.1875rem 0 #4a3c31;
}

/* 兩側大箭頭 */
.issue-arr {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.88);
  border: 0.09375rem solid #4a3c31;
  border-radius: 50%;
  width: 3rem;
  height: 3rem;
  font-size: 1.625rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  color: #4a3c31;
  box-shadow: 0.125rem 0.125rem 0 #4a3c31;
  transition: background 0.2s;
  line-height: 1;
}

.issue-arr:hover {
  background: #e5b821;
}

.issue-arr-prev {
  left: 1.5rem;
}

.issue-arr-next {
  right: 1.5rem;
}

/* 底部輪播點 */
.issue-dotsbar {
  position: absolute;
  bottom: 1.375rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.625rem;
  z-index: 10;
}

.issue-dotbar {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: 0.09375rem solid rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: background 0.2s;
}

.issue-dotbar.active {
  background: #e5b821;
  border-color: #4a3c31;
}

.participation-section {
  padding: 1.875rem 0;
  position: relative;
  background-color: #f5f0e6;
  /* 溫馨沙色底 */
}

.participation-section .section-title::before,
.participation-section .section-title::after {
  content: none;
}

.eight-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  position: relative;
  z-index: 2;
}

.card-8 {
  height: 12.5rem;
  position: relative;
  perspective: 62.5rem;
  cursor: pointer;
}

.card-8-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.card-8:hover .card-8-inner {
  transform: rotateY(180deg);
}

.card-8-front,
.card-8-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

/* 正面：背景圖方式完整顯示，不裁切 */
.card-8-front {
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
}

.card-img-wrap {
  position: relative;
  width: 100%;
  height: 12.5rem;
  flex-shrink: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
}

/* 標籤固定在卡片最下緣（相對 card-8-front 定位） */
.card-8-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  background: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 0.3125rem 0.25rem;
  font-size: 1.375rem;
  font-weight: 700;
  color: #2a3a2a;
  pointer-events: none;
  word-break: break-all;
  line-height: 1.2;
}

/* 背面：置中顯示內容 */
.card-8-back {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.875rem;
  transform: rotateY(180deg);
  background-color: #7fa586;
  color: #ffffff;
  border-radius: 0.375rem;
  border: 0.09375rem solid #4a3c31;
}

/* 卡片正面底色（與背面形成對比） */
.card-8-front.front-blue {
  background-color: #fef6ef;
  /* 極淺暖橘 */
}

.card-8-front.front-green {
  background-color: #f7f2fc;
  /* 極淺薰衣草 */
}

/* 卡片背面底色：藍色群組 */
.card-8-back.bg-blue {
  background-color: #c8dff0;
}

.card-8-back.bg-blue p,
.card-8-back.bg-blue .back-btn {
  color: #1a2a4a;
}

/* 卡片背面底色：綠色群組 */
.card-8-back.bg-green {
  background-color: #c8e6d0;
}

.card-8-back.bg-green p,
.card-8-back.bg-green .back-btn {
  color: #1a3a25;
}

.card-8-front .icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.card-8-front h4 {
  font-size: 1.25rem;
  color: #4a3c31;
}

.card-8-back p {
  font-size: 0.9375rem;
  margin-bottom: 0.625rem;
  line-height: 1.45;
}

.card-8-back .back-btn {
  background: #e5b821;
  color: #4a3c31;
  border: 0.09375rem solid #4a3c31;
  font-size: 0.875rem;
  font-weight: bold;
  padding: 0.3125rem 0.875rem;
  border-radius: 0.1875rem;
  /* 0.375rem -> 0.1875rem */
  text-decoration: none;
  box-shadow: 0.125rem 0.125rem 0 #4a3c31;
}

.awards-section {
  padding: 1.875rem 0 3.125rem;
  background-color: #E0EBAF;
  /* 1. 綠色背景 */
  position: relative;
}

.awards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  position: relative;
  z-index: 2;
}

.card-award {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.award-img-box {
  height: 10rem;
  background-color: #faf8f5;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  border-bottom: 0.09375rem solid #4a3c31;
}

.award-body {
  flex: 1;
  padding: 1.25rem;
  min-height: 12.5rem;
  display: flex;
  flex-direction: column;
}

.award-title {
  font-size: 1.5rem;
  color: #4a3c31;
  margin-bottom: 0.625rem;
}

.award-body p {
  font-size: 1rem;
  color: #6e5a4c;
  line-height: 1.65;
  flex: 1;
  /* 兩端對齊：每行左右貼齊卡片內緣，避免因 line-break 造成第一行結尾空白 */
  text-align: justify;
  text-justify: inter-character;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.award-btn {
  display: inline-block;
  align-self: flex-end;
  margin-top: 0.875rem;
  padding: 0.375rem 1.125rem;
  background: #ffffff;
  color: #4a3c31;
  font-weight: 700;
  font-size: 0.8125rem;
  border: 0.09375rem solid #4a3c31;
  border-radius: 0.25rem;
  text-decoration: none;
  box-shadow: 0.125rem 0.125rem 0 #4a3c31;
  transition: all 0.2s;
}

.award-btn:hover {
  background: #e5b821;
  transform: translate(-0.0625rem, -0.0625rem);
  box-shadow: 0.1875rem 0.1875rem 0 #4a3c31;
}

.card-award:hover {
  transform: translateY(-0.375rem) rotate(0.5deg);
}

.coop-section {
  display: flex;
  flex-direction: column;
  min-height: 23.75rem;
  padding: 0;
}

.coop-section>.container {
  padding-top: 1.875rem;
  padding-bottom: 0.75rem;
}

.coop-img-row {
  display: flex;
  gap: 0;
  flex: 1;
}

.coop-img-card {
  position: relative;
  flex: 1;
  overflow: hidden;
  background-color: #243628;
}

/* 國際合作圖片保留全幅深色遮罩，讓純白文字維持穩定對比。 */
.coop-img-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.58);
  pointer-events: none;
}

/* 圖片填滿整個 card 高度，底緣和區塊底緣切齊 */
.coop-img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 300px;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
}

.coop-img-placeholder.geep {
  background-image: url("../img/FrontEnd/geep.webp");
  background-size: cover;
}

.coop-img-placeholder.aprc {
  background-image: url("../img/FrontEnd/aprc.webp");
  background-size: cover;
}

/* 文字疊加層：全覆蓋 + flex 置中 */
.coop-img-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.75rem 2rem;
  color: white;
}

.coop-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  text-align: center;
}

.coop-img-overlay p {
  font-size: 1rem;
  line-height: 1.5;
  text-align: left;
  margin-bottom: 0.5rem;
}

.coop-title,
.coop-overlay-content p {
  color: #ffffff;
}

.coop-overlay-content {
  max-width: 34.375rem;
  width: 100%;
  text-align: left;
}

.coop-section .section-title {
  margin-bottom: 0.75rem;
}

.coop-section .section-title::before,
.coop-section .section-title::after {
  content: none;
}

/* 5. 國際合作按鈕：寬度完全配合文字 (fit-content) */
.coop-more-btn {
  display: inline-block;
  width: fit-content;
  max-width: max-content;
  align-self: flex-start;
  margin-top: 1.125rem;
  padding: 0.375rem 1.125rem;
  background: #ffffff;
  color: #4a3c31;
  font-weight: 700;
  font-size: 0.8125rem;
  border: 0.09375rem solid #4a3c31;
  border-radius: 0.25rem;
  text-decoration: none;
  box-shadow: 0.125rem 0.125rem 0 #4a3c31;
  transition: all 0.2s;
}

.coop-more-btn:hover {
  background: #e5b821;
  transform: translate(-0.0625rem, -0.0625rem);
  box-shadow: 0.1875rem 0.1875rem 0 #4a3c31;
}

.db-section {
  padding: 1.875rem 0;
  position: relative;
}

.db-section .section-title::before,
.db-section .section-title::after {
  content: none;
}

.db-accordion {
  display: flex;
  flex-direction: column;
  border: 0.09375rem solid #4a3c31;
  border-radius: 0.375rem;
  overflow: hidden;
  max-width: 53.125rem;
  margin: 0 auto;
  background: #ffffff;
  box-shadow: 0.125rem 0.125rem 0.5rem rgba(74, 60, 49, 0.08);
}

.db-acc-item {
  border-bottom: 0.0625rem solid #d9cbb6;
}

.db-acc-item:last-child {
  border-bottom: none;
}

.db-acc-header {
  min-height: 3.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.125rem;
  cursor: pointer;
  background: #fdfaf2;
  transition: background 0.2s, color 0.2s;
  user-select: none;
  width: 100%;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  text-decoration: none;
}

.db-acc-header:hover,
.db-acc-header:focus-visible {
  background: #f5ead8;
}

.db-acc-item.open .db-acc-header {
  background: #e0ebaf;
}

.db-acc-color {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  flex: 0 0 0.75rem;
}

.db-acc-title {
  flex: 1;
  color: #4a3c31;
  font-size: 1.125rem;
  font-weight: 700;
  text-align: left;
}

.db-acc-icon {
  min-width: 1.5rem;
  color: #4a3c31;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.db-acc-body {
  display: none;
  background: #ffffff;
  border-top: 0.0625rem solid #e0d4c0;
}

.db-acc-item.open .db-acc-body {
  display: block;
}

.db-acc-body p {
  font-size: 0.9375rem;
  color: #5c4a42;
  line-height: 1.7;
  margin-bottom: 0.875rem;
}

.db-sub-items {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.db-sub-item {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  padding: 0.625rem 1.125rem 0.625rem 2.625rem;
  background: #ffffff;
  border-bottom: 0.0625rem solid #eee4d6;
  color: #4a3c31;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  white-space: normal;
  overflow-wrap: anywhere;
}

.db-sub-item:last-child {
  border-bottom: none;
}

.db-sub-item:hover,
.db-sub-item:focus-visible {
  background: #f5ead8;
  color: #2f4f34;
}

/* ==============================
   5. Footer
================================= */

.cozy-footer {
  background: #4A8250;
  color: #ffffff;
  padding: 0 0 2.5rem 0;
  position: relative;
  overflow: hidden;
}

/* 3. 背景山脈與樹林線條 SVG Container */
.footer-skylines {
  width: 100%;
  height: 6.875rem;
  margin-top: -0.0625rem;
  /* 貼合 */
  background-color: #faf8f5;
  /* 接續上方的暖米底 */
}

.svg-skyline {
  width: 100%;
  height: 100%;
  display: block;
}

.footer-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
  padding-top: 1.875rem;
}

.footer-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
  text-shadow: 0.0625rem 0.0625rem 0.125rem rgba(74, 60, 49, 0.2);
}

.footer-col p {
  font-size: 0.875rem;
  color: #ffffff;
  line-height: 1.8;
  margin-bottom: 0.2rem;
}

.footer-col a {
  display: block;
  font-size: 0.875rem;
  color: #ffffff;
  text-decoration: none;
  margin-bottom: 0.2rem;
  transition: color 0.2s;
  font-weight: 500;
}

.footer-col a:hover {
  color: #ffffff;
}

/* ==============================
   6. Page-specific Styles
================================= */

.breadcrumb {
  background: #f5ead8;
  border-bottom: 0.0625rem solid #e0d4c0;
  padding: 0.625rem 0;
  font-size: 0.8125rem;
  color: #5f4d42;
}

.breadcrumb ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  list-style: none;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
}

.breadcrumb a {
  color: #4a6b53;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb li>span:first-child {
  margin: 0 0.375rem;
  color: #c4b49a;
}

.page-header {
  background-color: #2e7d52;
  background-image: linear-gradient(135deg, #2e7d52 0%, #4a6b53 60%, #558060 100%);
  padding: 2rem 0 1.75rem;
  color: white;
}

.page-header .page-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.375rem;
  -webkit-text-stroke: 0.1rem #1c3325;
  paint-order: stroke fill;
}

.page-header p {
  font-size: 0.875rem;
  opacity: 1;
  margin: 0;
  -webkit-text-stroke: 0.0625rem #1c3325;
  paint-order: stroke fill;
}

/* Pages: two-column inner layout */
.two-column-page {
  background: #fdfaf2;
  padding: 2rem 0 3rem;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Arial, Helvetica, sans-serif !important;
}

.two-column-layout {
  display: grid;
  grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;

}

/* 單欄滿版：ExploreSubject 子項目只有 1 筆時隱藏左側選單，右框撐滿整個 container 寬度 */
.two-column-layout--single {
  grid-template-columns: minmax(0, 1fr);
}

.side-menu-column {
  position: sticky;
  top: 1.5rem;
}

.side-menu-list {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fdfaf2;
  border: 0.09375rem solid #4a3c31;
  border-radius: 0.75rem;
  box-shadow: 0.25rem 0.25rem 0 rgba(74, 60, 49, 0.16);

}

.side-menu-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.5rem;
  padding: 0.75rem 1rem;
  border: 0;
  border-bottom: 0.0625rem solid #d8cbb6;
  background: #fdfaf2;
  color: #4a3c31;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Arial, Helvetica, sans-serif !important;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  text-decoration: none;
}

.side-menu-tab:last-child {
  border-bottom: 0;
}

.side-menu-tab:hover,
.side-menu-tab:focus-visible {
  background: #e5b821;
  color: #4a3c31;
}

.side-menu-tab.active {
  background: #4A8250;
  color: #FFFFFF;
}

.content-column {
  min-height: 32rem;
  padding: 2.25rem 2.5rem;
  background: rgba(255, 255, 255, 0.82);
  border: 0.09375rem solid #d8cbb6;
  border-radius: 0.75rem;
  box-shadow: 0.125rem 0.125rem 0 rgba(74, 60, 49, 0.08);
}

/* 內容為主的詳細頁（如 EELibDetail），高度由內容決定，取消 32rem 最小高度以避免短內容留大片空白 */
.content-column--auto-height {
  min-height: 0;
}

/* 學習資源詳細資料頁面 */
.eelib-detail-title {
  margin: 0 0 1.25rem;
  padding-left: 0.875rem;
  border-left: 0.3125rem solid #2e7d52;
  color: #2f6f4d;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.35;
}

.eelib-detail-meta {
  margin-bottom: 1rem;
}

.eelib-detail-body {
  font-size: 1rem;
  line-height: 1.85;
  color: #2d3a2e;
  white-space: pre-line;
  margin-bottom: 0.5rem;
}

.eelib-detail-section {
  margin-top: 1.5rem;
}

.eelib-detail-section-heading {
  font-size: 1rem;
  font-weight: 700;
  color: #4A8250;
  margin-bottom: 0.75rem;
}

.eelib-attachment-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.eelib-attachment-item a,
.eelib-attachment-item span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.eelib-attachment-item a {
  color: #1a5e96;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.eelib-attachment-item a:hover {
  color: #0d3d66;
}

.eelib-detail-footer {
  margin-top: 1.75rem;
}

.eelib-copyright {
  font-size: 1rem;
  font-weight: 700;
  color: #2f6f4d;
  margin-bottom: 0.4rem;
}

.eelib-update-date {
  font-size: 0.8rem;
  color: #6b5d52;
  margin: 0;
  text-align: right;
}

/* ==============================
   EELibDetail 繪本相關推薦輪播
   僅 FileQtype=3 且有推薦資料時由 View 輸出
================================= */

/* 推薦區外觀與標題列 */
.eelib-recommendations {
  background: #fdfaf2;
  padding: 2rem 0 3rem;
  border-top: 2px solid #d8cbb6;
  margin-top: 0;
}

.eelib-recommendations-heading {
  font-size: 1.2rem;
  font-weight: 700;
  color: #4a3c31;
  margin: 0;
}

.eelib-rec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* 卡片下方輪播控制列；沒有超出可視範圍時由 JS 加上 hidden */
.eelib-rec-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.eelib-rec-controls[hidden] {
  display: none;
}

/* 左右按鈕沿用 Home/Index 輪播圖示與焦點樣式 */
.eelib-rec-button {
  width: 1.9rem;
  min-width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  color: transparent;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border: 0;
  border-radius: 50%;
  box-shadow: 0.125rem 0.125rem 0 #4a3c31;
  font: inherit;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
}

.eelib-rec-prev {
  background-image: url("../img/FrontEnd/btn-left.webp");
}

.eelib-rec-prev:hover:not(:disabled),
.eelib-rec-prev:focus-visible {
  background-image: url("../img/FrontEnd/btn-left-hover.webp");
}

.eelib-rec-next {
  background-image: url("../img/FrontEnd/btn-right.webp");
}

.eelib-rec-next:hover:not(:disabled),
.eelib-rec-next:focus-visible {
  background-image: url("../img/FrontEnd/btn-right-hover.webp");
}

.eelib-rec-button:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.1875rem;
}

.eelib-rec-button:disabled {
  opacity: 0.4;
  cursor: default;
}

/* 頁籤圓點由 EELibDetail.js 依推薦總數與每頁卡片數動態建立 */
.eelib-rec-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0 0.2rem;
}

.eelib-rec-dot {
  appearance: none;
  width: 0.7rem;
  height: 0.7rem;
  padding: 0;
  background: #fff;
  border: 0.09375rem solid #4a3c31;
  border-radius: 50%;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
}

.eelib-rec-dot:hover,
.eelib-rec-dot:focus-visible,
.eelib-rec-dot.is-active {
  background: #e5b821;
  border-color: #4a3c31;
}

.eelib-rec-dot:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.1875rem;
}

/* 橫向輪播軌道：保留程式控制捲動，隱藏瀏覽器原生捲軸 */
.eelib-rec-carousel {
  overflow: hidden;
}

.eelib-rec-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2.25rem) / 4);
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.1875rem 0.1875rem 0.75rem;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.eelib-rec-grid::-webkit-scrollbar {
  display: none;
}

/* 推薦卡片使用既有 vid-card 結構，僅在推薦區縮小圖片與文字 */
.eelib-rec-grid .vid-card {
  scroll-snap-align: start;
}

.eelib-rec-grid .vid-thumb {
  height: 6rem;
}

.eelib-rec-grid .vid-info {
  padding: 0.625rem 0.75rem 0.75rem;
}

.eelib-rec-grid .vid-title {
  font-size: 0.875rem;
}

.eelib-rec-grid .vid-desc {
  font-size: 0.75rem;
  -webkit-line-clamp: 1;
}

/* 平板每頁 2 張、手機每頁 1 張；桌面預設每頁 4 張 */
@media (max-width: 48rem) {
  .eelib-rec-grid {
    grid-auto-columns: calc((100% - 0.75rem) / 2);
  }
}

@media (max-width: 30rem) {
  .eelib-rec-grid {
    grid-auto-columns: 100%;
  }
}

.sports-panel[hidden] {
  display: none;
}

.sports-panel h2 {
  margin: 0 0 1.25rem;
  padding-left: 0.875rem;
  border-left: 0.3125rem solid #2e7d52;
  color: #2f6f4d;
  font-size: 1.5rem;
  line-height: 1.35;
}

.sports-panel h3 {
  margin: 1.25rem 0 0.75rem;
  color: #4a3c31;
  font-size: 1.125rem;
  line-height: 1.45;
}

.sports-panel p,
.sports-panel li {
  color: #5f4d42;
  font-size: 1rem;
  line-height: 1.9;
}

.sports-panel p {
  margin: 0 0 1rem;
}

/* CMS Html.Raw 內容防爆版：長表格水平捲動、圖片縮放、長網址斷行 */
.sports-panel table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
}

.sports-panel img {
  max-width: 100%;
  height: auto;
}

.sports-panel a {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.content-list,
.download-list {
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
}

.download-list a {
  color: #2e7d52;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.sports-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.sports-info-card {
  padding: 1rem;
  background: #f7f0df;
  border: 0.09375rem solid #d8cbb6;
  border-radius: 0.5rem;
}

.sports-info-card h3 {
  margin-top: 0;
}

.content-action {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.25rem;
  background: #e5b821;
  color: #4a3c31;
  border: 0.15625rem solid #4a3c31;
  border-radius: 0.5rem;
  box-shadow: 0.1875rem 0.1875rem 0 #4a3c31;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.content-action:hover,
.content-action:focus-visible {
  background: #f0c936;
}


.filter-section {
  background: #fdfaf2;
  border-bottom: 0.09375rem solid #e0d4c0;
  padding: 1.25rem 0;
}

.result-section {
  padding: 1.75rem 0 3rem;
}

.result-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.result-count {
  font-size: 0.875rem;
  color: #5f4d42;
}

.result-count strong {
  color: #4a3c31;
}

.vid-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.vid-card {
  background: #ffffff;
  border: 0.09375rem solid #e0d4c0;
  border-radius: 0.375rem;
  overflow: hidden;
  box-shadow: 0.125rem 0.125rem 0 rgba(74, 60, 49, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  position: relative;
}

.vid-title a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.vid-card:hover {
  transform: translateY(-0.1875rem);
  box-shadow: 0.25rem 0.375rem 0.75rem rgba(74, 60, 49, 0.15);
  border-color: #4a6b53;
}

.vid-thumb {
  position: relative;
  height: 8.75rem;
  overflow: hidden;
  background: #f5ead8;
}

.vid-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.vid-info {
  padding: 0.75rem 0.875rem 0.875rem;
}

.vid-title {
  font-size: 1rem;
  font-weight: 700;
  color: #2a3a2a;
  margin-bottom: 0.3125rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vid-title a {
  text-decoration: none;
  color: inherit;
}

.expired-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background: #c0392b;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: 0.25rem;
  margin-right: 0.375rem;
  vertical-align: middle;
}

.vid-date {
  font-size: 0.75rem;
  color: #a09080;
  margin-bottom: 0.375rem;
}

.vid-desc {
  font-size: 0.875rem;
  color: #6c5c50;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

/* ── 分頁列 ── */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 1rem 0 0.5rem;
}

.pg-btn {
  min-width: 5rem;
  height: 2.25rem;
  padding: 0 0.875rem;
  border: 0.09375rem solid #c4b49a;
  border-radius: 0.25rem;
  background: #fdfaf2;
  color: #4a3c31;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.pg-btn:hover:not(:disabled) {
  background: #f5ead8;
  border-color: #4a6b53;
}

.pg-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.hero-page-title {
  margin: 0;
  font-size: inherit;
  line-height: 1;
}

.pg-info {
  font-size: 0.875rem;
  color: #6c5c50;
  padding: 0 0.625rem;
  white-space: nowrap;
}

.pg-jump-input {
  width: 3.125rem;
  height: 2.125rem;
  text-align: center;
  border: 0.09375rem solid #c4b49a;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  color: #4a3c31;
  background: #fff;
  outline: 0.1875rem solid transparent;
}

.pg-jump-input:focus {
  border-color: #4a6b53;
}

.pg-jump-btn {
  padding: 0 0.875rem;
  height: 2.125rem;
  background: #fdfaf2;
  border: 0.09375rem solid #4a3c31;
  border-radius: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #4a3c31;
  cursor: pointer;
  transition: background 0.2s;
}

.pg-jump-btn:hover {
  background: #e5b821;
}

/* Components: extracted inline styles */
.u-inline-01 {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.u-inline-02 {
  width: 100%;
  height: 100%;
  background: #1a1a1a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.u-inline-03 {
  width: 5rem;
  height: 5rem;
  background: rgba(255, 255, 255, 0.15);
  border: 0.1875rem solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.u-inline-04 {
  width: 0;
  height: 0;
  border-top: 1.25rem solid transparent;
  border-bottom: 1.25rem solid transparent;
  border-left: 2rem solid rgba(255, 255, 255, 0.85);
  margin-left: 0.375rem;
}

.u-inline-05 {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9375rem;
  margin: 0;
  letter-spacing: 0.0625rem;
}

/* ?v=YYYYMMDD 為背景圖 cache-bust 版本戳（8 碼，西元年月日，例：20260929）；
   圖片內容若有更新請同步遞增此版本號（並記得於 _Layout.cshtml 的 FrontEnd.css 連結上也遞增版本號），
   使用者不必手動 Ctrl+F5 也能看到新圖。
   註：**長度上限 8 碼**——與母站 EEISWEB 慣例一致；12 碼以上會被資安 WAF 誤判為可疑 payload（曾發生於 2026-09 弱掃）。
   若同一天需要多次 bump，改動內容命名（例：feature-middle-2.webp）或改用 asp-append-version 內建 hash */
.u-inline-06 {
    background-image: url("../img/FrontEnd/feature-middle-1.webp?v=20260929");
    background-size: cover;
    background-position: center;
}

.u-inline-08 {
    background-image: url("../img/FrontEnd/inline-background-02.webp?v=20260929");
    background-size: cover;
    background-position: center;
}

.u-inline-10 {
  background-image: url("../img/FrontEnd/inline-background-03.webp");
}

.u-inline-11 {
  background-image: url("../img/FrontEnd/inline-background-04.webp");
}

.u-inline-12 {
  background-image: url("../img/FrontEnd/inline-background-05.webp");
}

.u-inline-13 {
  background-image: url("../img/FrontEnd/inline-background-06.webp");
}

.u-inline-14 {
  background-image: url("../img/FrontEnd/inline-background-07.webp");
}

.u-inline-15 {
  background-image: url("../img/FrontEnd/inline-background-08.webp");
}

.u-inline-16 {
  background-image: url("../img/FrontEnd/inline-background-09.webp?v=20261015");
}

.u-inline-17 {
  background-image: url("../img/FrontEnd/inline-background-10.webp?v=20261015");
}

.u-inline-18 {
  background-image: url("../img/FrontEnd/inline-background-11.webp");
}

.u-inline-19 {
    background-image: url("../img/FrontEnd/inline-background-12.webp?v=20260929");
}

.u-inline-20 {
  background-image: url("../img/FrontEnd/inline-background-13.webp");
}

.u-inline-21 {
  background: #2e7d52;
}

.u-inline-22 {
  background: #c0392b;
}

.u-inline-23 {
  background: #d4680e;
}

.u-inline-24 {
  background: #1a6fa8;
}

.u-inline-25 {
  display: inline;
  color: #faf4e8;
}

/* 頁尾「或點此留言」避免換行把「點此留言」孤立成一行；
   `.footer-col a` 預設 display:block 會強制 <a> 另起一行，必須在此 scope 內改回 inline */
.footer-nowrap {
  white-space: nowrap;
}
.footer-nowrap a {
  display: inline !important;
  margin: 0 !important;
}

.u-inline-26 {
  background: #4a6b53;
}

.u-inline-27 {
  background: #5c6b73;
}

.u-inline-28 {
  background: #9b4a1a;
}

.u-inline-29 {
  background: #0d4f8c;
}

.u-inline-30 {
  background: #7a3c6e;
}

.u-inline-31 {
  background: #3a6b5c;
}

.u-inline-32 {
  background: #6b3a3a;
}

.u-inline-33 {
  background: #1a5c38;
}

.u-inline-34 {
  background: #8c6b2a;
}

.u-inline-35 {
  background: #2a4a6b;
}

.u-inline-36 {
  background: #6b5c2a;
}

.u-inline-37 {
  background: #3a2a6b;
}

.u-inline-38 {
  background: #5c3a2a;
}

.u-inline-39 {
  background: #2a6b5c;
}

.u-inline-40 {
  background: #6b2a4a;
}

.u-inline-41 {
  background: #3a6b2a;
}

.award-img-pmep {
  background-image: url("../img/FrontEnd/pmep.webp");
}

/* ==============================
   7. Buttons / Controls
================================= */

/* ==============================
   8. Responsive
================================= */

/* Accessibility */
.pc-dot,
.issue-dotbar {
  appearance: none;
  padding: 0;
  line-height: 0;
  font-size: 0;
}

.news-date,
.vid-date,
.result-count,
.pg-info {
  color: #5f4d42;
}

.card-8:focus-within .card-8-inner {
  transform: rotateY(180deg);
}

.hero-control-bar {
  position: absolute;
  left: 50%;
  bottom: 0.75rem;
  transform: translateX(-50%);
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.hero-control-btn {
  width: 1.9rem;
  min-width: 1.9rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border: 0;
  border-radius: 50%;
  box-shadow: 0.125rem 0.125rem 0 #4a3c31;
  cursor: pointer;
  color: transparent;
  font-size: 0;
  line-height: 0;
}

.hero-dot:hover,
.hero-dot.active {
  background: #e5b821;
}

.hero-play-toggle {
  background-image: url("../img/FrontEnd/btn-stop.webp");
}

.hero-play-toggle[aria-pressed="true"] {
  background-image: url("../img/FrontEnd/btn-play.webp");
}

.hero-prev-btn {
  background-image: url("../img/FrontEnd/btn-left.webp");
}

.hero-prev-btn:hover,
.hero-prev-btn:focus-visible {
  background-image: url("../img/FrontEnd/btn-left-hover.webp");
}

.hero-next-btn {
  background-image: url("../img/FrontEnd/btn-right.webp");
}

.hero-next-btn:hover,
.hero-next-btn:focus-visible {
  background-image: url("../img/FrontEnd/btn-right-hover.webp");
}

.hero-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0 0.2rem;
}

.hero-dot {
  appearance: none;
  width: 0.7rem;
  height: 0.7rem;
  padding: 0;
  border: 0.09375rem solid #4a3c31;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  font-size: 0;
  line-height: 0;
}

.promo-control-bar {
  position: absolute;
  left: 50%;
  bottom: 0.75rem;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.promo-control-btn {
  width: 1.9rem;
  min-width: 1.9rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border: 0;
  border-radius: 50%;
  box-shadow: 0.125rem 0.125rem 0 #4a3c31;
  cursor: pointer;
  color: transparent;
  font-size: 0;
  line-height: 0;
}

.promo-control-bar .pc-play-toggle {
  background-image: url("../img/FrontEnd/btn-stop.webp");
}

.promo-control-bar .pc-play-toggle[aria-pressed="true"] {
  background-image: url("../img/FrontEnd/btn-play.webp");
}

.promo-control-bar .pc-prev {
  position: static;
  transform: none;
  background-image: url("../img/FrontEnd/btn-left.webp");
}

.promo-control-bar .pc-prev:hover,
.promo-control-bar .pc-prev:focus-visible {
  background-image: url("../img/FrontEnd/btn-left-hover.webp");
}

.promo-control-bar .pc-next {
  position: static;
  transform: none;
  background-image: url("../img/FrontEnd/btn-right.webp");
}

.promo-control-bar .pc-next:hover,
.promo-control-bar .pc-next:focus-visible {
  background-image: url("../img/FrontEnd/btn-right-hover.webp");
}

.promo-control-bar .pc-dots {
  position: static;
  transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0 0.2rem;
}

.promo-control-bar .pc-dot {
  width: 0.7rem;
  height: 0.7rem;
  padding: 0;
  background: #ffffff;
  border: 0.09375rem solid #4a3c31;
}

.promo-control-bar .pc-dot:hover,
.promo-control-bar .pc-dot.pc-dot-active {
  background: #e5b821;
  border-color: #4a3c31;
}

.issue-control-bar {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.issue-control-btn {
  width: 1.9rem;
  min-width: 1.9rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border: 0;
  border-radius: 50%;
  box-shadow: 0.125rem 0.125rem 0 #4a3c31;
  cursor: pointer;
  color: transparent;
  font-size: 0;
  line-height: 0;
}

.issue-control-bar .issue-play-toggle {
  background-image: url("../img/FrontEnd/btn-stop.webp");
}

.issue-control-bar .issue-play-toggle[aria-pressed="true"] {
  background-image: url("../img/FrontEnd/btn-play.webp");
}

.issue-control-bar .issue-arr-prev {
  position: static;
  transform: none;
  background-image: url("../img/FrontEnd/btn-left.webp");
}

.issue-control-bar .issue-arr-prev:hover,
.issue-control-bar .issue-arr-prev:focus-visible {
  background-image: url("../img/FrontEnd/btn-left-hover.webp");
}

.issue-control-bar .issue-arr-next {
  position: static;
  transform: none;
  background-image: url("../img/FrontEnd/btn-right.webp");
}

.issue-control-bar .issue-arr-next:hover,
.issue-control-bar .issue-arr-next:focus-visible {
  background-image: url("../img/FrontEnd/btn-right-hover.webp");
}

.issue-control-bar .issue-dotsbar {
  position: static;
  transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0 0.2rem;
}

.issue-control-bar .issue-dotbar {
  width: 0.7rem;
  height: 0.7rem;
  padding: 0;
  background: #ffffff;
  border: 0.09375rem solid #4a3c31;
}

.issue-control-bar .issue-dotbar:hover,
.issue-control-bar .issue-dotbar.active {
  background: #e5b821;
  border-color: #4a3c31;
}

@media (max-width: 1200px) {

  .issue-slide-content,
  .issue-slide-content.food-theme {
    max-width: 75%;
  }

  .eight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .nav {
    z-index: 1000;
  }

  .page-download .download-file-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-container {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
  }

  .site-title {
    flex: 1 1 auto;
    min-width: 0;
  }

  .site-logo-img {
    display: block;
    max-width: min(70vw, 17.5rem);
    height: auto;
  }

  .nav-right,
  .font-size-ctrl {
    display: none;
  }

  .mobile-menu-toggle {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3125rem;
    padding: 0;
    background: #ffffff;
    border: 0.09375rem solid #4a3c31;
    border-radius: 0.25rem;
    box-shadow: 0.125rem 0.125rem 0 #4a3c31;
    cursor: pointer;
  }

  .mobile-menu-toggle span {
    width: 1.375rem;
    height: 0.125rem;
    display: block;
    background: #4a3c31;
    border-radius: 999rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(0.4375rem) rotate(45deg);
  }

  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-0.4375rem) rotate(-45deg);
  }

  .mobile-menu {
    flex-basis: 100%;
    width: 100%;
    position: relative;
    z-index: 1001;
    margin-top: 0.5rem;
    padding: 0.75rem 0;
    background: #ffffff;
    border-top: 0.09375rem solid #4a3c31;
    box-shadow: 0 0.375rem 0.75rem rgba(74, 60, 49, 0.14);
  }

  .mobile-menu:not([hidden]) {
    display: flex;
    flex-direction: column;
  }

  .mobile-menu a {
    min-height: 2.75rem;
    display: flex;
    align-items: center;
    color: #4a3c31;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.625rem 0.75rem;
  }

  .mobile-menu a:hover,
  .mobile-menu a:focus-visible {
    background: #f5ead8;
  }

  .nav-dropdown-menu {
    display: none;
  }

  .mobile-nav-group {
    display: flex;
    flex-direction: column;
  }

  .mobile-nav-toggle {
    width: 100%;
    min-height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    background: none;
    border: 0;
    color: #4a3c31;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
  }

  .mobile-nav-toggle:hover,
  .mobile-nav-toggle[aria-expanded="true"] {
    background: #f5ead8;
  }

  .mobile-nav-caret {
    flex-shrink: 0;
    font-size: 0.7rem;
    transition: transform 0.2s ease;
  }

  .mobile-nav-toggle[aria-expanded="true"] .mobile-nav-caret {
    transform: rotate(180deg);
  }

  .mobile-nav-submenu:not([hidden]) {
    display: flex;
    flex-direction: column;
    background: #faf5ec;
    border-top: 0.0625rem solid #ede3d0;
    border-bottom: 0.0625rem solid #ede3d0;
  }

  .mobile-menu .mobile-nav-submenu a {
    padding-left: 1.5rem;
    color: #5f4d42;
    font-size: 0.9375rem;
    font-weight: 500;
    border-bottom: 0.0625rem solid #ede3d0;
  }

  .mobile-menu .mobile-nav-submenu a:last-child {
    border-bottom: 0;
  }

  .mobile-menu .mobile-nav-submenu a:hover,
  .mobile-menu .mobile-nav-submenu a:focus-visible {
    color: #4a3c31;
    background: #f0e6d0;
  }

  .mobile-menu-divider {
    width: calc(100% - 1.5rem);
    margin: 0.5rem auto;
    border: 0;
    border-top: 0.0625rem solid #e0d4c0;
  }

  .mobile-menu-social-row {
    min-height: 2.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
  }

  .mobile-menu-social-row .nav-socials {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }

  .mobile-menu-social-row .nav-socials a {
    width: 2.25rem;
    height: 2.25rem;
    min-height: 2.25rem;
    flex: 0 0 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    font-size: 1rem;
  }

  .mobile-menu-social-row .nav-socials a:hover,
  .mobile-menu-social-row .nav-socials a:focus-visible {
    background: #e5b821;
  }

  .mobile-menu-social-row .divider {
    color: #6e5a4c;
  }

  .mobile-menu-social-row .lang-en {
    min-height: 2.75rem;
    padding: 0 0.5rem;
  }

  .two-column-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .side-menu-column {
    position: static;
  }

  .side-menu-list {
    border-radius: 0.75rem;
  }

  .side-menu-tab {
    min-height: 3rem;
  }

  .vid-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .awards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .info-grid {
    flex-direction: column;
  }

  .left-promo,
  .right-news {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .two-column-page {
    padding: 1.25rem 0 2rem;
  }

    .page-download .download-file-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-download .download-search-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .page-download .download-search-row button {
        width: 100%;
    }

  .two-column-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sports-events-page > .two-column-layout {
    max-width: 82.5rem;
  }

  .content-column {
    padding: 1.25rem;
    min-width: 0;
  }

  .sports-panel h2 {
    font-size: 1.25rem;
  }

  .sports-card-grid {
    grid-template-columns: 1fr;
  }

  .footer-wrap {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .footer-title {
    margin-bottom: 0.2rem;
  }

  .vid-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .eight-grid {
    grid-template-columns: 1fr;
  }

  .awards-grid {
    grid-template-columns: 1fr;
  }

  .hero-slide {
    padding: 2.25rem 1rem 13.5rem;
  }

  .hero-title-art {
    width: min(96vw, 48rem);
    transform: translateY(0.75rem);
  }

  .issues-fullcarousel {
    height: 28rem;
  }

  .issue-slide-content,
  .issue-slide-content.food-theme {
    max-width: 92%;
    padding-bottom: 3rem;
  }

  .issue-slide-content h2 {
    font-size: 3em;                                 /* em 讓小螢幕仍支援字級切換 */
  }

  .coop-img-row {
    flex-direction: column;
  }

  .coop-img-card {
    min-height: 15rem;
  }

  .search-card {
    width: min(90%, 37.5rem);
    bottom: 3.5rem;
  }

  .search-row {
    flex-wrap: wrap;
  }

  .search-row button {
    min-height: 2.375rem;
  }

  .hero-control-bar {
    width: min(90%, 37.5rem);
    gap: 0.5rem;
    justify-content: center;
  }

  .hero-play-toggle {
    flex: 0 0 auto;
  }

}

@media (max-width: 414px) {
  .nav-container {
    gap: 0.5rem;
  }

  .site-title {
    flex: 1 1 0;
  }

  .site-logo-img {
    width: 100%;
    max-width: min(70vw, 17.5rem);
  }

  .mobile-menu-toggle {
    flex: 0 0 2.75rem;
  }

  .hot-tags {
    display: block;
    line-height: 1.4;
  }

  .hot-tags > span,
  .hot-tags > .hot-tag {
    display: inline-block;
    vertical-align: middle;
  }

  .hot-tags > span {
    margin: 0 0.4rem 0.4rem 0;
    white-space: nowrap;
  }

  .hot-tags > .hot-tag {
    margin: 0 0.4rem 0.4rem 0;
    white-space: nowrap;
  }

  /* 惜食圖（u-inline-08）左下有食物視覺重點，手機時 anchor 到 left bottom 讓重點保留；
     體育賽事圖（u-inline-06）中央有為文字預留的灰白色帶，手機要維持 center 讓文字落在灰帶上 */
  .issue-slide-bg {
    background-position: left bottom;
  }
  .issue-slide-bg.u-inline-06 {
    background-position: center;
  }

  .hero-slide {
    padding-bottom: 11.75rem;
  }

  .hero-title-art {
    transform: none;
  }
}

main:focus {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.1875rem;
}

@media (prefers-reduced-motion: reduce) {

  .site-header,
  .back-to-top {
    transition: none;
  }
}

/* Responsive media queries are grouped above from larger to smaller breakpoints. */

/* ==============================
   檔案下載
================================= */

.page-download .download-search-section {
  padding: 1.25rem 0;
  background: #fdfaf2;
  border-bottom: 0.09375rem solid #e0d4c0;
}

.page-download .download-search-label {
  display: block;
  margin-bottom: 0.5rem;
  color: #2a3a2a;
  font-size: 0.9375rem;
  font-weight: 700;
}

/* 搜尋列：參考首頁 .search-row 風格 */
.page-download .download-search-row {
  display: flex;
  gap: 0.75rem;
  max-width: 60rem;
}

.page-download .download-search-input {
  flex: 1;
  min-width: 0;
  height: 2.375rem;
  padding: 0 1rem;
  color: #4a3c31;
  background: #ffffff;
  border: 0.09375rem solid #4a3c31;
  border-radius: 0.25rem;
  font-family: inherit;
  font-size: 0.875rem;
  outline: 0.1875rem solid transparent;
}

.page-download .download-search-btn {
  white-space: nowrap;
  padding: 0 1.5rem;
  color: #ffffff;
  background: #4a8250;
  border: 0.09375rem solid #4a3c31;
  border-radius: 0.25rem;
  box-shadow: 0.125rem 0.125rem 0 #4a3c31;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.page-download .download-search-btn:hover {
  background: #e5b821;
  color: #4a3c30;
  transform: translate(-0.0625rem, -0.0625rem);
  box-shadow: 0.1875rem 0.1875rem 0 #4a3c31;
}

.page-download .download-search-input:focus-visible,
.page-download .download-search-btn:focus-visible,
.page-download .download-card__action:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.1875rem;
}

/* ── _TopCategoryPartial 共用視覺樣式（不綁定特定 .page-xxx；
   任何頁面 include 此 partial 都能直接取得樣式）── */
.download-category-section {
  padding: 1.5rem 0 1.25rem;
  background: #fdfaf2;
  border-bottom: 0.09375rem solid #e0d4c0;
}

.download-category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.download-category-button {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  color: var(--download-category-text);
  background: var(--download-category-bg);
  border: 0.15625rem solid #4a3c31;
  border-radius: 0.5rem;
  box-shadow: 0.1875rem 0.1875rem 0 #4a3c31;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.download-category-count {
  width: 1.75rem;
  height: 1.75rem;
  flex: 0 0 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.0625rem rgba(74, 60, 49, 0.18);
  font-size: 0.8125rem;
  line-height: 1;
}

.download-category-button:hover {
  color: #4a3c31;
  background: #f5ead8;
  transform: translate(-0.0625rem, -0.0625rem);
  box-shadow: 0.25rem 0.25rem 0 #4a3c31;
}

/* 選取中：黃底深色陰影，視覺效果與 hover 明顯區別 */
.download-category-button.is-active {
  color: #4a3c31;
  background: #e5b821;
  transform: translate(-0.0625rem, -0.0625rem);
  box-shadow: 0.25rem 0.25rem 0 #4a3c31;
}
.download-category-button.is-active:hover {
  background: #cfaa1c;
}

.download-category-button:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.1875rem;
}

/* 各分類色彩 */
.page-download .download-category--all {
  --download-category-bg:   #dcebfb;
  --download-category-text: #245985;
}
.page-download .download-category--cert {
  --download-category-bg:   #e7e2f7;
  --download-category-text: #493181;
}
.page-download .download-category--manual {
  --download-category-bg:   #fbe4d2;
  --download-category-text: #8a4510;
}
.page-download .download-category--form {
  --download-category-bg:   #d9f0ef;
  --download-category-text: #17635d;
}
.page-download .download-category--badge {
  --download-category-bg:   #dcefe1;
  --download-category-text: #246642;
}

.page-download .download-results {
  padding: 1.5rem 0 3rem;
}

.page-download .download-results-toolbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.875rem;
  border-bottom: 0.09375rem solid #e0d4c0;
}

/* 標章設計理念介紹（僅「標章下載」頁籤顯示） */
.page-download .download-badge-intro {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  background: #fdf9ef;
  border: 0.0625rem solid #e0d4c0;
  border-left: 0.25rem solid #4a7c59;
  border-radius: 0.5rem;
}
.page-download .download-badge-intro[hidden] { display: none; }
.page-download .download-badge-intro__media {
  flex: 0 0 auto;
}
.page-download .download-badge-intro__media img {
  display: block;
  width: 10rem;
  height: auto;
  max-width: 100%;
}
.page-download .download-badge-intro__text {
  flex: 1 1 auto;
  min-width: 0;
  color: #333;
  line-height: 1.75;
  font-size: 1rem;
}
.page-download .download-badge-intro__text p { margin: 0 0 0.75rem; }
.page-download .download-badge-intro__text p:last-child { margin-bottom: 0; }
.page-download .download-badge-intro__text strong { color: #2a3a2a; }

@media (max-width: 48rem) {
  .page-download .download-badge-intro {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 1.125rem;
  }
  .page-download .download-badge-intro__media {
    align-self: center;
  }
}

.page-download .download-results-toolbar h2,
.page-download .download-results-toolbar p { margin: 0; }

.page-download .download-results-toolbar h2 {
  color: #2a3a2a;
  font-size: 1.375rem;
}

.page-download .download-results-toolbar p {
  color: #5f4d42;
  font-size: 0.875rem;
}

.page-download .download-file-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-download .download-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  border: 0.09375rem solid #e0d4c0;
  border-radius: 0.375rem;
  box-shadow: 0.125rem 0.125rem 0 rgba(74, 60, 49, 0.08);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.page-download .download-card:hover,
.page-download .download-card:focus-within {
  border-color: #4a6b53;
  box-shadow: 0.25rem 0.375rem 0.75rem rgba(74, 60, 49, 0.15);
  transform: translateY(-0.1875rem);
}

.page-download .download-card__category {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  color: var(--download-category-text);
  background: var(--download-category-bg);
  font-size: 0.875rem;
  font-weight: 700;
}

.page-download .download-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1rem 0.875rem;
}

.page-download .download-card__title {
  margin: 0 0 auto;
  padding-bottom: 0.75rem;
  color: #2a3a2a;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.page-download .download-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.625rem;
  margin-bottom: 0.875rem;
  color: #5f4d42;
  font-size: 0.8125rem;
}

.page-download .download-card__link-type {
  padding: 0.125rem 0.375rem;
  background: #f0ece0;
  border-radius: 0.25rem;
  color: #5f4d42;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
}

.page-download .download-card__action {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  color: #2a3a2a;
  background: #f3ecd7;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

/* 下載圖示：僅 DlZone 使用 */
.page-download .download-card__action > span[aria-hidden="true"] {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 1.25rem;
  background: url("../img/FrontEnd/DlZone/dl_download.webp") center / contain no-repeat;
  font-size: 0;
  line-height: 0;
}

.page-download .download-card__action:hover {
  color: #ffffff;
  background: #4a8250;
}

.page-download .download-card__action:hover > span[aria-hidden="true"] {
  background-image: url("../img/FrontEnd/DlZone/dl_download_hover.webp");
}

.page-download .download-empty-message {
  margin: 0;
  padding: 3rem 1rem;
  color: #5f4d42;
  text-align: center;
}

.page-download .download-card[hidden] { display: none; }

/* ==============================
   國家環境教育政策（Home/Resources）
   卡片結構沿用 Home/DlZone，僅調整政策類別色彩與外部連結圖示。
================================= */
/* Resources 卡片不用 DlZone 的 margin-bottom:auto 把 title 撐到頂端；
   title 直接貼近展開按鈕/下載清單，不留空白 */
.page-resources .download-card__title {
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
}

/* 頁面共用的更新日期（位於整頁最右下角），取代原本每卡片的 meta */
.page-resources .resources-page-updated {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 0.0625rem dashed #e0d4c0;
  color: #5f4d42;
  font-size: 0.875rem;
  text-align: right;
}

/* 下載連結清單（title 下方直接列出附件 / AppendUrl / DirectUrl）；
   取代原本的「查看資料」按鈕，讓使用者一眼看到有哪些檔案可下載。
   預設只顯示第一個，其餘以 hidden 隱藏；有多筆時以展開按鈕觸發全部顯示。
   ─────────────────────────────────────────────────── */
.page-resources .resources-download-list {
  margin: 0 0 0.5rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;            /* 連結靠左對齊、以文字自然寬度呈現 */
  gap: 0.25rem;
}

.page-resources .resources-download-link {
  display: inline-flex;
  align-items: flex-start;            /* 多行檔名時仍向頂端對齊 */
  min-height: 1.75rem;                /* WCAG 2.5.5 觸控目標 ≥ 28px */
  padding: 0.125rem 0.25rem;
  color: #1f5f3f;
  text-decoration: underline;
  text-underline-offset: 0.125rem;
  text-decoration-thickness: 0.0625rem;
  word-break: break-word;             /* 長檔名可換行不撐破卡片 */
  border-radius: 0.25rem;
}

.page-resources .resources-download-link__text {
  flex: 1;
  min-width: 0;
  line-height: 1.5;
}

.page-resources .resources-download-link:hover {
  color: #14522e;
  text-decoration-thickness: 0.125rem;
  background: #fdf7ea;
}

.page-resources .resources-download-link:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.125rem;
}

/* 展開/收合按鈕：位於標題下一列（下載清單之前），
   讓收合時不用滑到卡片底部找按鈕；採用檔案總管風格的「› 展開／收合」樣式 */
.page-resources .resources-download-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0 0 0.5rem;
  padding: 0.125rem 0.25rem;
  color: #5f4d42;
  background: transparent;
  border: 0;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 400;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: color 0.2s;
}

.page-resources .resources-download-toggle:hover,
.page-resources .resources-download-toggle:hover .resources-download-toggle__icon {
  color: #1f5f3f;
}

.page-resources .resources-download-toggle:hover .resources-download-toggle__label {
  text-decoration: underline;
  text-underline-offset: 0.125rem;
}

.page-resources .resources-download-toggle:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.125rem;
}

/* 「›」箭頭：預設向右，展開時轉 90 度變向下（檔案總管慣例） */
.page-resources .resources-download-toggle__icon {
  display: inline-block;
  width: 0.875rem;
  color: #1f5f3f;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  transition: transform 0.2s;
}

.page-resources .resources-download-toggle[aria-expanded="true"] .resources-download-toggle__icon {
  transform: rotate(90deg);
}

.page-resources .download-category--outline {
  --download-category-bg: #d9f0ef;
  --download-category-text: #17635d;
}

.page-resources .download-category--plan {
  --download-category-bg: #fbe4d2;
  --download-category-text: #7a3d10;
}

.page-resources .download-category--result {
  --download-category-bg: #dcefe1;
  --download-category-text: #246642;
}

.page-resources .download-category--meeting {
  --download-category-bg: #e7e2f7;
  --download-category-text: #493181;
}

.page-resources .download-category--grant {
  --download-category-bg: #fff0bd;
  --download-category-text: #654d00;
}


/* ==============================
   掃描 QR CODE（Home/QRCode 系列）
   卡片結構沿用 Home/DlZone；額外加篩選列、課程資訊、掃描器與學員清單樣式。
   顏色皆採用 CLAUDE.md「已核可色票」，通過 WCAG AA 對比。
================================= */

/* 篩選列：沿用 ExploreSignUp 的 .signup-search-fields / .signup-field；
   查詢 button 單獨位於 .download-search-row 內無同排 input/select 可撐高度，統一設為 2.5rem。
   .page-qrcode-scanner / .page-qrcode-reissue 兩頁都有 input + button 並排，
   將高度一起以 !important 鎖 2.5rem，並顯式設定 box-sizing / padding / line-height，
   避免瀏覽器 input 預設樣式（每家瀏覽器對 input 內距與行高各自不同）造成的視覺落差。 */
.page-qrcode .download-search-row .download-search-btn { height: 2.5rem; }
.page-qrcode-scanner .signup-search-fields .signup-field .download-search-input,
.page-qrcode-scanner .signup-search-fields .signup-field .download-search-btn,
.page-qrcode-reissue .signup-search-fields .signup-field .download-search-input,
.page-qrcode-reissue .signup-search-fields .signup-field .download-search-btn {
  box-sizing: border-box !important;
  height: 2.5rem !important;
  min-height: 2.5rem !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

/* 課程 meta 顯示（授課地點/時間） */
.page-qrcode .qrcode-course__meta {
  margin: 0.375rem 0;
  color: #333;
  font-size: 0.9375rem;
  line-height: 1.6;
}
.page-qrcode .qrcode-course__label {
  display: inline-block;
  min-width: 5rem;
  color: #5f4d42;
  font-weight: 700;
  margin-right: 0.375rem;
}

/* 卡片動作區（簽到/簽退/補發 3 顆按鈕） */
.page-qrcode .qrcode-course__actions {
  margin-top: 0.875rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* 動作按鈕：primary 綠、secondary 米黃邊 */
.page-qrcode .qrcode-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;                 /* WCAG 2.5.5 觸控目標 ≥ 40px */
  padding: 0.375rem 1rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.page-qrcode .qrcode-action-btn--primary {
  color: #ffffff;
  background: #4a8250;
  border: 0.09375rem solid #4a3c31;
  box-shadow: 0.125rem 0.125rem 0 #4a3c31;
}
.page-qrcode .qrcode-action-btn--primary:hover {
  background: #e5b821;
  color: #4a3c30;
}
.page-qrcode .qrcode-action-btn--secondary {
  color: #1f5f3f;
  background: #ffffff;
  border: 0.09375rem solid #c4b49a;
}
.page-qrcode .qrcode-action-btn--secondary:hover {
  background: #1f5f3f;
  color: #ffffff;
  border-color: #1f5f3f;
}
.page-qrcode .qrcode-action-btn:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.125rem;
}

/* 課程資訊 summary（Scanner / Reissue 頂部） */
.page-qrcode .qrcode-course-summary {
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  background: #ffffff;
  border: 0.09375rem solid #e0d4c0;
  border-radius: 0.5rem;
  box-shadow: 0.125rem 0.125rem 0 rgba(74, 60, 49, 0.08);
}
.page-qrcode .qrcode-course-summary h2 {
  margin: 0 0 0.75rem;
  color: #1a3a52;
  font-size: 1.25rem;
}
.page-qrcode .qrcode-course-summary dl {
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.page-qrcode .qrcode-course-summary dl > div {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}
.page-qrcode .qrcode-course-summary dt {
  min-width: 5rem;
  color: #5f4d42;
  font-weight: 700;
}
.page-qrcode .qrcode-course-summary dd {
  margin: 0;
  color: #333;
}

/* Scanner 相機面板 */
.page-qrcode .qrcode-scanner-panel {
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  background: #fdfaf2;
  border: 0.09375rem solid #e0d4c0;
  border-radius: 0.5rem;
}
.page-qrcode .qrcode-scanner-panel h3 {
  margin: 0 0 0.75rem;
  color: #1a3a52;
  font-size: 1.125rem;
}
.page-qrcode .qrcode-scanner-msg {
  margin: 0 0 0.75rem;
  color: #333;
  font-size: 0.9375rem;
}
.page-qrcode .qrcode-scanner-reader {
  max-width: 30rem;
  margin: 0 auto 0.75rem;
  border-radius: 0.375rem;
  overflow: hidden;
  background: #000;
}
.page-qrcode .qrcode-scanner-hint {
  margin: 0.5rem 0 0;
  color: #5f4d42;
  font-size: 0.875rem;
}

/* 學員清單 */
.page-qrcode .qrcode-members-title {
  margin: 1.5rem 0 0.75rem;
  color: #1a3a52;
  font-size: 1.125rem;
}
.page-qrcode .qrcode-member-search { margin-bottom: 1rem; padding: 1rem; }
.page-qrcode .qrcode-members-count {
  margin: 0.5rem 0 1rem;
  color: #5f4d42;
  font-size: 0.875rem;
}
.page-qrcode .qrcode-member-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.page-qrcode .qrcode-member-item {
  padding: 1rem 1.25rem;
  background: #ffffff;
  border: 0.09375rem solid #e0d4c0;
  border-radius: 0.375rem;
  color: #333;
}
.page-qrcode .qrcode-member-item p {
  margin: 0.25rem 0;
  line-height: 1.6;
}

/* 簽到退狀態徽章 */
.page-qrcode .qrcode-status {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 700;
}
.page-qrcode .qrcode-status--ok       { background: #dcefe1; color: #246642; }
.page-qrcode .qrcode-status--pending  { background: #fce8e8; color: #8a2020; }
.page-qrcode .qrcode-status-sep       { margin: 0 0.375rem; color: #5f4d42; }

/* Reissue：電話欄與發送鈕 */
.page-qrcode .qrcode-reissue-tel {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.page-qrcode .qrcode-reissue-tel__input {
  flex: 1 1 12rem;
  max-width: 14rem;
}
.page-qrcode .qrcode-reissue-tel__hint {
  margin: 0.25rem 0 0;
  color: #5f4d42;
  font-size: 0.8125rem;
}

/* Loading overlay：QRCodeScanner 掃描→登錄時暫停使用者互動 */
.page-qrcode .qrcode-loading {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.125rem;
  z-index: 9999;
}
.page-qrcode .qrcode-loading[hidden] { display: none; }
.page-qrcode .qrcode-loading__spinner {
  width: 2rem;
  height: 2rem;
  margin-right: 0.75rem;
  border: 0.25rem solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: qrcode-spin 0.8s linear infinite;
}
@keyframes qrcode-spin { to { transform: rotate(360deg); } }

/* 響應式 */
@media (max-width: 30rem) {
  .page-qrcode .qrcode-filter-row {
    flex-direction: column;
    align-items: stretch;
  }
  .page-qrcode .qrcode-filter-actions .download-search-btn { width: 100%; }
  .page-qrcode .qrcode-course__actions { flex-direction: column; }
  .page-qrcode .qrcode-course__actions .qrcode-action-btn { width: 100%; }
}


/* ExploreNewsList 置頂消息：以金色邊框區別一般卡片 */
.page-download .download-card--top { border-color: #d4a017; }
.page-download .download-empty-message[hidden]  { display: none; }

/* ========================================================================
   .page-earthday-video 地球日影片頁面樣式
   ========================================================================
   採 two-column-page + _SideMenuPartial 版型（與 ExploreSubject / Allowance 一致）。
   影片以 grid 排列，卡片內含標題 + HTML5 原生 video controls。
   顏色皆採 CLAUDE.md「已核可色票」通過 WCAG AA 對比要求。 */

.page-earthday-video .earthday-video-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 1.25rem;
  padding: 0 0 0.75rem;
  border-bottom: 0.0625rem solid #d9cbb6;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-earthday-video .earthday-video-toolbar__title {
  margin: 0;
  color: #1a3a52;
  font-size: 1.5rem;
  font-weight: 700;
}

.page-earthday-video .earthday-video-toolbar__count {
  margin: 0;
  color: #555;
  font-size: 0.9375rem;
}

/* 影片格線：預設兩欄，寬螢幕上限亦兩欄避免影片被壓縮過小影響觀看體驗 */
.page-earthday-video .earthday-video-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.page-earthday-video .earthday-video-card {
  background: #ffffff;
  border: 0.0625rem solid #d9cbb6;
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0.125rem 0.125rem 0.5rem rgba(74, 60, 49, 0.08);
  display: flex;
  flex-direction: column;
}

.page-earthday-video .earthday-video-card__title {
  margin: 0 0 0.75rem;
  color: #1a3a52;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.45;
}

.page-earthday-video .earthday-video-card__player-wrap {
  /* 16:9 響應式容器；影片以 100% 填滿寬度並保留比例，不會撐破卡片版面 */
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 0.375rem;
  overflow: hidden;
}

.page-earthday-video .earthday-video-card__player {
  width: 100%;
  height: 100%;
  display: block;
}

/* 使用原生 controls 的焦點外框：滿足 WCAG 2.4.7 焦點指示要求（3:1 對比） */
.page-earthday-video .earthday-video-card__player:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.125rem;
}

.page-earthday-video .earthday-video-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: #555;
  background: #fdfaf2;
  border: 0.0625rem dashed #d9cbb6;
  border-radius: 0.5rem;
  margin: 0;
}

.page-earthday-video .earthday-video-vote {
  margin-top: 1.5rem;
  text-align: center;
}

.page-earthday-video .earthday-video-vote__btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: #4a8250;
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 0.375rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.page-earthday-video .earthday-video-vote__btn:hover {
  background: #e5b821;
  color: #4a3c30;
  transform: translate(-0.0625rem, -0.0625rem);
}

.page-earthday-video .earthday-video-vote__btn:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.125rem;
}

/* 平板：兩欄縮為單欄，避免每支影片過窄 */
@media (max-width: 900px) {
  .page-earthday-video .earthday-video-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 手機：工具列標題與計數改上下排列，避免計數被截斷 */
@media (max-width: 480px) {
  .page-earthday-video .earthday-video-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

/* ========================================================================
   .page-earthday-article 地球日圖文頁面樣式
   ========================================================================
   採 two-column-page + _SideMenuPartial 版型（與 ExploreEarthDayVideo / ExploreSubject / Allowance 一致）。
   上方為縣市 tab 按鈕列，下方為 CKEditor 圖文內容區。
   顏色皆採 CLAUDE.md「已核可色票」通過 WCAG AA 對比要求。 */

.page-earthday-article .earthday-article-tabs {
  margin: 0 0 1.5rem;
}

.page-earthday-article .earthday-article-tabs__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.page-earthday-article .earthday-article-tabs__link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #fdfaf2;
  color: #1a3a52;
  border: 0.0625rem solid #d9cbb6;
  border-radius: 0.25rem;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.page-earthday-article .earthday-article-tabs__link:hover {
  background: #e5b821;
  color: #4a3c30;
  border-color: #4a3c30;
}

/* Active tab：深綠底白字（4.57:1 對比通過 AA） */
.page-earthday-article .earthday-article-tabs__link.is-active {
  background: #4a8250;
  color: #ffffff;
  border-color: #4a8250;
  font-weight: 700;
  cursor: default;
}

.page-earthday-article .earthday-article-tabs__link:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.125rem;
}

.page-earthday-article .earthday-article-title {
  margin: 0 0 1.25rem;
  padding: 0 0 0.75rem;
  color: #1a3a52;
  font-size: 1.5rem;
  font-weight: 700;
  border-bottom: 0.0625rem solid #d9cbb6;
}

.page-earthday-article .earthday-article-body {
  color: #333;
  line-height: 1.7;
  font-size: 1rem;
}

/* RichText 圖片、iframe、影片響應式，避免撐破欄寬 */
.page-earthday-article .earthday-article-body img,
.page-earthday-article .earthday-article-body iframe,
.page-earthday-article .earthday-article-body video {
  max-width: 100%;
  height: auto;
}

/* RichText 內連結色票對比 7.6:1 通過 AAA */
.page-earthday-article .earthday-article-body a {
  color: #1f5f3f;
  text-decoration: underline;
}

.page-earthday-article .earthday-article-body a:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.125rem;
}

.page-earthday-article .earthday-article-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: #555;
  background: #fdfaf2;
  border: 0.0625rem dashed #d9cbb6;
  border-radius: 0.5rem;
  margin: 0;
}

/* ========================================================================
   .page-allowance 補（捐）助申請入口頁樣式
   ========================================================================
   採 two-column-page + _SideMenuPartial 版型（與 ExploreSubject 一致）；
   內容區以垂直清單呈現補助類別，狀態以左緣色條 + badge 區隔：
   開放中 = 綠 / 外部系統 = 藍 / 未開放 = 灰。顏色皆採 CLAUDE.md「已核可色票」通過 WCAG AA 對比。 */

.page-allowance .allowance-panel-title {
  margin: 0 0 1.25rem;
  padding-left: 0.875rem;
  border-left: 0.3125rem solid #2e7d52;
  color: #2f6f4d;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.4;
}
.page-allowance .allowance-empty {
  padding: 1.5rem;
  color: #4a3c31;
  text-align: center;
}

/* 類別清單容器：純垂直堆疊卡片，避免與 two-column-layout 內較窄的欄寬衝突 */
.page-allowance .allowance-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.page-allowance .allowance-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;   /* 窄螢幕自動換行讓按鈕落到下一列 */
  gap: 0.75rem 1rem;
  padding: 1.125rem 1.25rem;
  background: #fdfaf2;
  border: 0.09375rem solid #d8cbb6;
  border-left-width: 0.3125rem;
  border-radius: 0.5rem;
  box-shadow: 0.125rem 0.125rem 0 rgba(74, 60, 49, 0.08);
}
/* 依狀態改變左緣色條 */
.page-allowance .allowance-item--open     { border-left-color: #1f5f3f; }
.page-allowance .allowance-item--external { border-left-color: #1f4c7a; }
.page-allowance .allowance-item--closed   { border-left-color: #999999; background: #f7f4ee; }

/* 卡片標頭：類別代碼、標題、狀態 badge 水平排列 */
.page-allowance .allowance-item__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}
.page-allowance .allowance-item__code {
  padding: 0.125rem 0.5rem;
  background: #ede4d0;
  color: #4a3c31;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.page-allowance .allowance-item__title {
  margin: 0;
  color: #2f6f4d;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.45;
}

/* 狀態徽章（沿用先前設計，深底白字通過 AA） */
.page-allowance .allowance-state-badge {
  display: inline-block;
  padding: 0.125rem 0.625rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.page-allowance .allowance-state-badge--open     { background: #1f5f3f; color: #ffffff; }
.page-allowance .allowance-state-badge--external { background: #1f4c7a; color: #ffffff; }
.page-allowance .allowance-state-badge--closed   { background: #e5e5e5; color: #4a3c31; }

.page-allowance .allowance-item__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.page-allowance .allowance-item__label {
  display: inline-block;
  margin-right: 0.375rem;
  color: #6a5a4d;
  font-weight: 700;
}
.page-allowance .allowance-item__period {
  margin: 0;
  color: #4a3c31;
  font-size: 0.9375rem;
}
.page-allowance .allowance-item__intro {
  margin: 0;
  color: #4a3c31;
  line-height: 1.7;
}

/* 動作按鈕：三種狀態不同底色，皆有明確 focus 可見性 */
.page-allowance .allowance-item__action {
  flex: 0 0 auto;   /* 按鈕維持內容寬度，不被 flex 拉伸 */
  padding: 0.5rem 1.25rem;
  border: 0.09375rem solid #4a3c31;
  border-radius: 0.375rem;
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.page-allowance .allowance-item__action--open     { background: #1f5f3f; }
.page-allowance .allowance-item__action--external { background: #1f4c7a; }
.page-allowance .allowance-item__action--closed {
  background: #f0f0f0;
  color: #4a3c31;
  border-color: #999999;
}
.page-allowance .allowance-item__action--open:hover,
.page-allowance .allowance-item__action--open:focus-visible,
.page-allowance .allowance-item__action--external:hover,
.page-allowance .allowance-item__action--external:focus-visible {
  background: #e5b821;
  color: #4a3c30;
  transform: translate(-0.0625rem, -0.0625rem);
}
.page-allowance .allowance-item__action--closed:hover,
.page-allowance .allowance-item__action--closed:focus-visible {
  background: #e0e0e0;
}
.page-allowance .allowance-item__action:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.1875rem;
}

/* ── 補助案件管理登入表單（Allowance/Manager） ──────────────────────
   單欄垂直表單，欄位/按鈕採 .allowance-form__* 命名；風格對齊 .signup-form－
   通過 WCAG AA（label 明確、error 有 role="alert"、focus 可見、對比達標）。 */
.page-allowance-manager .allowance-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 34rem;
}
.page-allowance-manager .allowance-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.page-allowance-manager .allowance-form__label {
  color: #4a3c31;
  font-weight: 700;
  font-size: 0.9375rem;
}
.page-allowance-manager .allowance-form__label--required::after {
  content: " *";
  color: #b32d3d;   /* AA 對比 */
}
.page-allowance-manager .allowance-form__input {
  width: 100%;                /* 撐滿欄位容器，與重設密碼欄位一致 */
  box-sizing: border-box;
  height: 2.5rem;
  padding: 0 0.875rem;
  border: 0.09375rem solid #4a3c31;
  border-radius: 0.375rem;
  background: #ffffff;
  color: #4a3c31;
  font-family: inherit;
  font-size: 0.9375rem;
}
.page-allowance-manager .allowance-form__input--code {
  letter-spacing: 0.125rem;   /* 驗證碼字元間距，方便閱讀 */
  font-variant-numeric: tabular-nums;
}
.page-allowance-manager .allowance-form__input--password {
  padding-right: 2.75rem;     /* 預留右側「小眼睛」按鈕空間 */
}
.page-allowance-manager .allowance-form__input:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.1875rem;
}
.page-allowance-manager .allowance-form__password-wrap {
  position: relative;
  display: block;
  width: 100%;
}
.page-allowance-manager .allowance-form__password-toggle {
  position: absolute;
  top: 50%;
  right: 0.375rem;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 0.25rem;
  color: #4a3c31;
  cursor: pointer;
  padding: 0;
}
.page-allowance-manager .allowance-form__password-toggle:hover {
  color: #1f5f3f;
}
.page-allowance-manager .allowance-form__password-toggle:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.125rem;
}
.page-allowance-manager .allowance-form__error {
  color: #b32d3d;
  font-size: 0.875rem;
  min-height: 1rem;
}
.page-allowance-manager .allowance-form__hint {
  margin: 0.25rem 0 0;
  color: #6a5a4d;
  font-size: 0.8125rem;
  line-height: 1.6;
}
.page-allowance-manager .allowance-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}
.page-allowance-manager .allowance-form__submit {
  padding: 0.625rem 1.5rem;
  border: 0.09375rem solid #4a3c31;
  border-radius: 0.375rem;
  background: #1f5f3f;
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.page-allowance-manager .allowance-form__submit--secondary {
  background: #1f4c7a;   /* 藍色系與主要 submit 綠色區分 */
}
.page-allowance-manager .allowance-form__submit:hover,
.page-allowance-manager .allowance-form__submit:focus-visible {
  background: #e5b821;
  color: #4a3c30;
  transform: translate(-0.0625rem, -0.0625rem);
}
.page-allowance-manager .allowance-form__submit:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.1875rem;
}
.page-allowance-manager .allowance-form__submit:disabled {
  background: #cccccc;
  color: #666666;
  cursor: not-allowed;
  transform: none;
}
.page-allowance-manager .allowance-form__ip {
  margin: 0.5rem 0 0;
  color: #6a5a4d;
  font-size: 0.8125rem;
}

/* ── 補助案件查詢及管理列表（Allowance/ManagerList） ──────────────────────
   單筆案件顯示：兩欄表格式（label / value）+ 底部操作按鈕群。 */
.page-allowance-manager-list .allowance-case-table {
  display: grid;
  grid-template-columns: minmax(7rem, 10rem) minmax(0, 1fr);
  border: 0.09375rem solid #d8cbb6;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #fdfaf2;
  margin-bottom: 1.25rem;
}
.page-allowance-manager-list .allowance-case-table__row {
  display: contents;
}
.page-allowance-manager-list .allowance-case-table__row > * {
  padding: 0.75rem 1rem;
  border-bottom: 0.0625rem solid #ede4d0;
}
.page-allowance-manager-list .allowance-case-table__row:last-child > * {
  border-bottom: 0;
}
.page-allowance-manager-list .allowance-case-table__label {
  background: #f0e8d8;
  color: #4a3c31;
  font-weight: 700;
}
.page-allowance-manager-list .allowance-case-table__value {
  color: #4a3c31;
}
.page-allowance-manager-list .allowance-case-table__value--wrap {
  white-space: pre-wrap;
  word-break: break-word;
}

.page-allowance-manager-list .allowance-case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.page-allowance-manager-list .allowance-case-actions__form {
  display: inline-flex;
  margin: 0;
}

.page-allowance-manager-list .allowance-case-btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border: 0.09375rem solid #4a3c31;
  border-radius: 0.375rem;
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.page-allowance-manager-list .allowance-case-btn--primary   { background: #1f5f3f; }
.page-allowance-manager-list .allowance-case-btn--secondary { background: #1f4c7a; }
.page-allowance-manager-list .allowance-case-btn--danger    { background: #b32d3d; }
.page-allowance-manager-list .allowance-case-btn:hover,
.page-allowance-manager-list .allowance-case-btn:focus-visible {
  background: #e5b821;
  color: #4a3c30;
  transform: translate(-0.0625rem, -0.0625rem);
}
.page-allowance-manager-list .allowance-case-btn:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.1875rem;
}

/* 窄螢幕：表格降級為單欄；label 顯示在上、value 在下 */
@media (max-width: 30rem) {
  .page-allowance-manager-list .allowance-case-table {
    grid-template-columns: minmax(0, 1fr);
  }
  .page-allowance-manager-list .allowance-case-table__label {
    padding-bottom: 0.25rem;
  }
  .page-allowance-manager-list .allowance-case-table__value {
    padding-top: 0.25rem;
  }
}

/* ── 民間團體及學校（Allowance/PublicPlan）新申請頁 ──────────────────────
   風格參考 Home/DlZone 的卡片、色票（#fdfaf2 米白 / #4a3c31 深棕 / #4a8250 綠 /
   #e5b821 黃 / #b32d3d 紅），三張大 card：基本資料 / 申請資料 / 附件與送出。
   欄位採左 label + 右 input 兩欄式 grid，窄螢幕自動降為單欄。 */
.page-allowance-public-plan .pp-card {
  margin-bottom: 1.5rem;
  border: 0.09375rem solid #e0d4c0;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0.125rem 0.125rem 0 rgba(74, 60, 49, 0.08);
}
.page-allowance-public-plan .pp-card__header {
  padding: 0.875rem 1.125rem;
  background: #fdfaf2;
  border-bottom: 0.09375rem solid #e0d4c0;
}
.page-allowance-public-plan .pp-card__title {
  margin: 0 0 0.25rem;
  color: #2a3a2a;
  font-size: 1.0625rem;
  font-weight: 700;
}
.page-allowance-public-plan .pp-card__hint {
  margin: 0;
  color: #5f4d42;
  font-size: 0.8125rem;
  line-height: 1.6;
}
.page-allowance-public-plan .pp-card__body {
  padding: 1rem 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

/* 欄位：label / value 兩欄格 */
.page-allowance-public-plan .pp-field {
  display: grid;
  grid-template-columns: minmax(9rem, 12rem) minmax(0, 1fr);
  gap: 0.5rem 1rem;
  align-items: start;
}
.page-allowance-public-plan .pp-label {
  padding-top: 0.5rem;
  color: #4a3c31;
  font-weight: 700;
  font-size: 0.9375rem;
}
.page-allowance-public-plan .pp-field--required .pp-label::before {
  content: "* ";
  color: #b32d3d;
  font-weight: 700;
}
.page-allowance-public-plan .pp-value {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.page-allowance-public-plan .pp-value--inline {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.75rem;
}
.page-allowance-public-plan .pp-value--grid-address {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) minmax(8rem, 14rem);
  gap: 0.5rem;
}
.page-allowance-public-plan .pp-value--grid-address .pp-input--address,
.page-allowance-public-plan .pp-value--grid-address .pp-error {
  grid-column: 1 / -1;
}

/* 輸入元件（input / select / textarea 共用） */
.page-allowance-public-plan .pp-input {
  width: 100%;
  box-sizing: border-box;
  height: 2.5rem;
  padding: 0 0.75rem;
  border: 0.09375rem solid #4a3c31;
  border-radius: 0.375rem;
  background: #ffffff;
  color: #4a3c31;
  font-family: inherit;
  font-size: 0.9375rem;
}
.page-allowance-public-plan .pp-input--money {
  max-width: 14rem;
}
.page-allowance-public-plan .pp-input--date {
  max-width: 14rem;
}
.page-allowance-public-plan .pp-input--textarea {
  min-height: 8rem;
  height: auto;
  padding: 0.5rem 0.75rem;
  line-height: 1.6;
  resize: vertical;
}
.page-allowance-public-plan .pp-input--file-type {
  max-width: 18rem;
}
.page-allowance-public-plan .pp-input:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.125rem;
}
.page-allowance-public-plan .pp-input:disabled {
  background: #f0ece0;
  color: #888888;
  cursor: not-allowed;
  border-color: #c8bfb0;
}
.page-allowance-public-plan .pp-locked-fieldset {
  border: none;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.page-allowance-public-plan .pp-locked-fieldset input:disabled::placeholder,
.page-allowance-public-plan .pp-locked-fieldset textarea:disabled::placeholder {
  color: transparent;
}
.page-allowance-public-plan .pp-hint {
  margin: 0;
  color: #6a5a4d;
  font-size: 0.8125rem;
}
.page-allowance-public-plan .pp-error {
  color: #b32d3d;
  font-size: 0.8125rem;
  min-height: 1rem;
}
.page-allowance-public-plan .pp-error:empty {
  min-height: 0;
}
.page-allowance-public-plan .pp-unit {
  color: #4a3c31;
  font-weight: 700;
}
.page-allowance-public-plan .pp-total {
  display: inline-block;
  padding: 0.375rem 1rem;
  border: 0.09375rem dashed #e0d4c0;
  border-radius: 0.375rem;
  background: #fdfaf2;
  min-width: 8rem;
  text-align: right;
  color: #2a3a2a;
  font-weight: 700;
}
.page-allowance-public-plan .pp-badge--fixed {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  background: #e7e2f7;
  color: #493181;
  font-size: 0.875rem;
  font-weight: 700;
}

/* 上傳列 + 附件清單 */
.page-allowance-public-plan .pp-upload-row {
  display: grid;
  grid-template-columns: minmax(9rem, 12rem) minmax(0, 1fr);
  gap: 0.5rem 1rem;
  align-items: start;
}
.page-allowance-public-plan .pp-upload-row__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.page-allowance-public-plan .pp-file {
  flex: 1;
  min-width: 12rem;
}
/* 其他政府機關補助本案之經費表格 */
.page-allowance-public-plan .pp-om-table {
  display: grid;
  grid-template-columns: minmax(9rem, 1.2fr) minmax(7rem, 0.8fr) minmax(6rem, 0.6fr) minmax(4rem, 5rem);
  border: 0.09375rem solid #e0d4c0;
  border-radius: 0.375rem;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.page-allowance-public-plan .pp-om-row {
  display: contents;
}
.page-allowance-public-plan .pp-om-row > * {
  padding: 0.5rem 0.75rem;
  background: #ffffff;
  border-top: 0.0625rem solid #f0ece0;
  font-size: 0.9375rem;
}
.page-allowance-public-plan .pp-om-row--head > * {
  background: #fdfaf2;
  border-top: 0;
  color: #4a3c31;
  font-weight: 700;
  font-size: 0.875rem;
}
.page-allowance-public-plan .pp-om-row--head em {
  color: #b32d3d;
  font-style: normal;
  font-weight: 700;
}

.page-allowance-public-plan .pp-file-list {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: minmax(2.5rem, 0.3fr) minmax(7rem, 0.8fr) minmax(9rem, 1.2fr) minmax(5rem, 7rem);
  border: 0.09375rem solid #e0d4c0;
  border-radius: 0.375rem;
  overflow: hidden;
}
/* AllowanceActionsItem 佐證清單：6 欄（序號／檔案類別／檔案名稱／照片說明／個資檢核／操作） */
.page-allowance-public-plan .pp-file-list--proof6 {
  grid-template-columns: minmax(2.5rem, 0.3fr) minmax(7rem, 0.9fr) minmax(9rem, 1.3fr) minmax(5rem, 0.8fr) minmax(5rem, 0.8fr) minmax(4.5rem, 5rem);
}
.page-allowance-public-plan .pp-file-list__row {
  display: contents;
}
.page-allowance-public-plan .pp-file-list__row > * {
  padding: 0.625rem 0.875rem;
  background: #ffffff;
  border-top: 0.0625rem solid #f0ece0;
  color: #2a3a2a;
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}
.page-allowance-public-plan .pp-file-list__row--head > * {
  background: #fdfaf2;
  border-top: 0;
  color: #4a3c31;
  font-weight: 700;
  font-size: 0.875rem;
}
.page-allowance-public-plan .pp-file-list__empty > * {
  grid-column: 1 / -1;
  padding: 1rem;
  text-align: center;
  color: #6a5a4d;
  font-size: 0.875rem;
}

/* 按鈕群（送出 / 重填 / 上傳 / 刪除） */
.page-allowance-public-plan .pp-btn {
  display: inline-block;
  padding: 0.5rem 1.125rem;
  border: 0.09375rem solid #4a3c31;
  border-radius: 0.375rem;
  background: #ffffff;
  color: #4a3c31;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  box-shadow: 0.125rem 0.125rem 0 #4a3c31;
  transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.page-allowance-public-plan .pp-btn:hover,
.page-allowance-public-plan .pp-btn:focus-visible {
  background: #e5b821;
  color: #4a3c30;
  transform: translate(-0.0625rem, -0.0625rem);
  box-shadow: 0.1875rem 0.1875rem 0 #4a3c31;
}
.page-allowance-public-plan .pp-btn:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.1875rem;
}
.page-allowance-public-plan .pp-btn--primary {
  background: #4a8250;
  color: #ffffff;
}
.page-allowance-public-plan .pp-btn--secondary {
  background: #1f4c7a;
  color: #ffffff;
}
.page-allowance-public-plan .pp-btn--danger {
  background: #b32d3d;
  color: #ffffff;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  box-shadow: 0.0625rem 0.0625rem 0 #4a3c31;
}
.page-allowance-public-plan .pp-btn--ghost {
  box-shadow: none;
}
.page-allowance-public-plan .pp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  padding-top: 0.5rem;
}

/* GovPlan Step 2：補助項目列表 6 欄格
   （序號 / 計畫名稱+起訖 / 申請金額 / 檔案類別 / 檔案名稱 / 操作） */
.page-allowance-gov-plan .gov-item-list {
  grid-template-columns:
    minmax(4.5rem, 0.3fr)   /* 序號 */
    minmax(10rem, 1.5fr)    /* 計畫名稱 / 起訖 */
    minmax(6rem, 0.6fr)     /* 申請金額 */
    minmax(7rem, 0.7fr)     /* 檔案類別 */
    minmax(9rem, 1.2fr)     /* 檔案名稱 */
    minmax(5rem, 0.5fr);    /* 操作 */
}
.page-allowance-gov-plan .pp-col--seq {
  white-space: nowrap;
  overflow-wrap: normal;
  min-width: 4.5rem;
  display: flex;
  align-items: center;
}

/* 窄螢幕：label 移到 value 上方 */
@media (max-width: 40rem) {
  .page-allowance-public-plan .pp-field,
  .page-allowance-public-plan .pp-upload-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .page-allowance-public-plan .pp-label {
    padding-top: 0;
  }
  .page-allowance-public-plan .pp-value--grid-address {
    grid-template-columns: minmax(0, 1fr);
  }
  .page-allowance-public-plan .pp-om-table {
    grid-template-columns: minmax(0, 1fr);
  }
  .page-allowance-public-plan .pp-om-row > * {
    grid-column: 1 / -1;
  }
  .page-allowance-public-plan .pp-file-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .page-allowance-public-plan .pp-file-list__row > * {
    grid-column: 1 / -1;
  }
}

@media (max-width: 48rem) {
  .page-download .download-search-row {
    flex-direction: column;
  }
}

@media (max-width: 30rem) {
  .page-download .download-file-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════
   網站搜尋（Home/Search）— 版面參考 DlZone；
   活動 / 成果分類下拉 + 關鍵字輸入 + 熱門標籤 + Google CSE 結果區。
   顏色皆採用 CLAUDE.md「已核可色票」，通過 WCAG AA 對比。
   ═══════════════════════════════════════════════════ */

/* Search 頁整體加寬：.container 預設 75rem，此頁改為 80% 視窗寬度但上限 90rem（1440px），
   避免超寬螢幕（≥1920px）行寬過長影響閱讀（WCAG 1.4.8 建議行寬 ≤ 80 字元）；
   影響：麵包屑、page-header、搜尋列、結果區皆同步變寬 */
.page-search .container {
  max-width: min(80%, 90rem);
}

.page-search .search-filter-section {
  padding: 2rem 0 1.5rem;
  background: #fdfaf2;
  border-bottom: 0.09375rem solid #e0d4c0;
}

.page-search .search-filter-form {
  margin: 0;
}

/* 搜尋欄：input + button 貼合成一個大條，寬度撐滿容器（版型參考 moenv.gov.tw/search） */
.page-search .search-filter-bar {
  display: flex;
  align-items: stretch;
  border: 0.125rem solid #4a3c31;
  border-radius: 0.375rem;
  background: #ffffff;
  overflow: hidden;                                  /* 讓子元素圓角乾淨 */
  box-shadow: 0 0.125rem 0.375rem rgba(74, 60, 49, 0.06);
  transition: border-color 0.15s, box-shadow 0.15s;
}

/* 大型輸入框：貼 reference 的高度＋字級（≥18px 手機不縮放）
   font-size 用 em 讓「字級小/中/大」切換能影響到本欄；min-height 讓字級變大時輸入框自動長高 */
.page-search .search-filter-input {
  flex: 1 1 auto;
  min-width: 0;                                      /* 讓 flex 子項可縮 */
  min-height: 3.5rem;                                /* 56px：AA 觸控目標；用 min-height 讓字級放大時自動長高 */
  padding: 0.5rem 1rem;
  color: #222;
  background: transparent;
  border: 0;                                         /* 邊框由 .search-filter-bar 負責 */
  font-family: inherit;
  font-size: 1.125em;                                /* 相對於 body（隨字級小/中/大切換）*/
  line-height: 1.4;
  outline: none;
}

.page-search .search-filter-input::placeholder {
  color: #6b5d52;                                    /* 對白底 4.86:1 通過 AA */
  opacity: 1;
}

/* 右側方形圖示按鈕 —— 站台深棕 + 白圖示（對比 12.4:1 遠超 AA） */
.page-search .search-filter-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;                                     /* 56x56 觸控目標 */
  height: auto;
  padding: 0;
  color: #ffffff;
  background: #4a3c31;
  border: 0;
  border-left: 0.125rem solid #4a3c31;               /* 與 bar 邊框對齊，形成分隔 */
  border-radius: 0;
  cursor: pointer;
  transition: background 0.15s;
}

.page-search .search-filter-btn__icon {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
}

.page-search .search-filter-btn:hover,
.page-search .search-filter-btn:focus-visible {
  background: #1f5f3f;                               /* hover 換站台深綠 */
}

/* Focus 由 bar 統一處理：input 或 button 得焦皆凸顯整條 */
.page-search .search-filter-bar:focus-within {
  border-color: #1f5f3f;
  box-shadow: 0 0 0 0.1875rem rgba(31, 95, 63, 0.25);
}

.page-search .search-filter-btn:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: -0.25rem;                          /* 內縮避免蓋到 bar 邊框 */
}

.page-search .search-hot-tag:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.1875rem;
}

/* 提示句：位於搜尋欄下方（灰字，供螢幕閱讀器透過 aria-describedby 讀出）
   font-size 用 em 讓字級切換生效 */
.page-search .search-filter-hint {
  margin: 0.75rem 0 0;
  color: #5f4d42;                                    /* 對米色底 6.3:1 通過 AA */
  font-size: 0.9375em;                               /* 相對於 body（隨字級切換）*/
}

/* 熱門關鍵字 */
.page-search .search-hot-tags {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.page-search .search-hot-tags__label {
  color: #1a3a52;
  font-size: 0.9375rem;
  font-weight: 700;
}

.page-search .search-hot-tag {
  min-height: 2rem;                  /* 觸控目標 ≥ 32px（AA 建議 ≥ 24px）*/
  padding: 0.25rem 0.875rem;
  color: #1f5f3f;
  background: #f0ece0;
  border: 0.0625rem solid #c4b49a;
  border-radius: 999rem;             /* pill 造型 */
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.page-search .search-hot-tag:hover {
  background: #1f5f3f;
  color: #ffffff;
  border-color: #1f5f3f;
}

/* Google CSE 結果區 */
.page-search .search-results-section {
  padding: 1.5rem 0 3rem;
}

/* 結果區容器使用全站預設 .container 寬度（75rem / 1200px），與其他頁面視覺一致 */

.page-search .search-empty-message {
  margin: 0;
  padding: 3rem 1rem;
  color: #5f4d42;
  text-align: center;
}

/* ─── Google CSE 樣式覆寫（只調文字色 + 字型，不動任何 layout / 寬度）───
   原則：完全信任 CSE 內部結構，避免因 width / padding 覆寫破壞其排版 */

/* 字型繼承站台（CSE 預設為 arial）；
   font-size: inherit 讓 CSE 根容器不注入自己的 base font-size（原本會塞 13px），
   如此下方各 .gs-* / .gsc-* 用 em 才能等比從 body（字級小/中/大）算起 */
.page-search .gsc-control-cse,
.page-search .gsc-control-wrapper-cse,
.page-search .gsc-wrapper,
.page-search .gsc-results,
.page-search .gsc-webResult,
.page-search .gsc-result,
.page-search .gs-webResult,
.page-search .gs-result,
.page-search .gsc-tabHeader,
.page-search .gsc-result-info,
.page-search .gsc-orderby-container,
.page-search .gs-title,
.page-search .gs-title *,
.page-search .gs-webResult .gs-snippet,
.page-search .gs-visibleUrl,
.page-search .gsc-cursor-page {
  font-family: inherit !important;
  font-size: inherit;                                /* 不加 !important，讓下方特定 em 覆寫值仍可作用 */
}

/* ──────────────────────────────────────────────────────────────────
   Google CSE 搜尋頁籤：覆蓋預設藍色主題，改為底線式分頁（參考 moenv 搜尋頁）
   蓋 Google CSE 預設淡藍底色+圓角填滿 pill 外觀，改成底線式 tab：
   每顆按鈕白底 + 4px 底線（inactive 透明/hover 淡褐/active 深綠），
   讓整列有「所有結果｜教案｜活動」3 顆可按的分頁按鈕感。
   注意：Google CSE 會注入自己的 CSS，部分 selector 用 class 名含 "gsc-tabhActive"／"gsc-tabhInactive"
   必須分別鎖定 inactive 才能完全覆蓋預設底色（否則 .gsc-tabhInactive 的淡藍底還在）。
──────────────────────────────────────────────────────────────────── */
.page-search .gsc-tabsArea,
.page-search .gsc-tabsArea * {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}
.page-search .gsc-tabsArea {
  border: none !important;
  border-bottom: 0.125rem solid #d8cbb6 !important;
  margin-bottom: 1.25rem !important;
  padding: 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.25rem !important;
}
.page-search .gsc-tabHeader,
.page-search .gsc-tabHeader.gsc-tabhInactive,
.page-search .gsc-tabHeader.gsc-tabhActive {
  padding: 0.75rem 1.75rem !important;
  margin: 0 !important;
  margin-bottom: -0.125rem !important;               /* active 底線蓋過區段分隔線 */
  font-size: 1em !important;
  font-weight: 700 !important;
  border: none !important;
  border-bottom: 0.25rem solid transparent !important;
  cursor: pointer !important;
  user-select: none !important;
  transition: color 0.15s, border-bottom-color 0.15s, background-color 0.15s !important;
}
.page-search .gsc-tabHeader,
.page-search .gsc-tabHeader.gsc-tabhInactive {
  color: #5f4d42 !important;
}
.page-search .gsc-tabHeader:hover,
.page-search .gsc-tabHeader.gsc-tabhInactive:hover {
  color: #2e7d52 !important;
  border-bottom-color: #e0d4c0 !important;
  background-color: #faf4e8 !important;             /* hover 淡米底色，強化「可按」感 */
}
.page-search .gsc-tabHeader.gsc-tabhActive {
  color: #1a3a52 !important;
  border-bottom-color: #2e7d52 !important;
}
.page-search .gsc-tabHeader.gsc-tabhActive:hover {
  color: #1a3a52 !important;
  border-bottom-color: #2e7d52 !important;
  background-color: transparent !important;
}

/* ──────────────────────────────────────────────────────────────────
   Google CSE 新版 Refinement 頁籤樣式（class name = gsc-refinement*）— pill 按鈕風
   改成明顯的「膠囊按鈕」外觀：每顆 tab 有外框 + 圓角 + 立體陰影，active 填深綠底白字，
   inactive 米色底 + hover 位移陰影，整體更像可按的按鈕群組（參考 Allowance 類別按鈕風）。
──────────────────────────────────────────────────────────────────── */
.page-search .gsc-refinementsArea,
.page-search .gsc-refinementsArea *,
.page-search .gsc-refinementBlock,
.page-search .gsc-refinementBlock * {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}
.page-search .gsc-refinementsArea {
  border: none !important;
  margin-bottom: 1.5rem !important;
  padding: 0.5rem 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.75rem !important;
}
.page-search .gsc-refinementBlock {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.75rem !important;
  padding: 0 !important;
  margin: 0 !important;
}
.page-search .gsc-refinementHeader,
.page-search .gsc-refinementHeader.gsc-refinementhInactive,
.page-search .gsc-refinementHeader.gsc-refinementhActive {
  display: inline-flex !important;
  align-items: center !important;
  padding: 0.5rem 1.25rem !important;
  margin: 0 !important;
  min-height: 2.5rem !important;
  font-size: 1em !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  border: 0.125rem solid #4a3c31 !important;
  border-radius: 0.5rem !important;
  cursor: pointer !important;
  user-select: none !important;
  text-decoration: none !important;
  transition: color 0.2s, background-color 0.2s, transform 0.2s, box-shadow 0.2s !important;
}
/* 未選中：米底 + 棕字 + 棕色實心陰影（可按感） */
.page-search .gsc-refinementHeader,
.page-search .gsc-refinementHeader.gsc-refinementhInactive {
  color: #4a3c31 !important;
  background-color: #faf4e8 !important;
  box-shadow: 0.1875rem 0.1875rem 0 #4a3c31 !important;
}
/* Hover：黃底 + 微上浮 */
.page-search .gsc-refinementHeader:hover,
.page-search .gsc-refinementHeader.gsc-refinementhInactive:hover {
  color: #4a3c31 !important;
  background-color: #e5b821 !important;
  transform: translate(-0.0625rem, -0.0625rem) !important;
  box-shadow: 0.25rem 0.25rem 0 #4a3c31 !important;
}
/* 選中：深綠底 + 白字 + 棕色實心陰影 */
.page-search .gsc-refinementHeader.gsc-refinementhActive {
  color: #ffffff !important;
  background-color: #2e7d52 !important;
  transform: translate(-0.0625rem, -0.0625rem) !important;
  box-shadow: 0.25rem 0.25rem 0 #4a3c31 !important;
}
.page-search .gsc-refinementHeader.gsc-refinementhActive:hover {
  color: #ffffff !important;
  background-color: #246642 !important;
}
.page-search .gsc-refinementHeader:focus-visible {
  outline: 0.1875rem solid #1f5f3f !important;
  outline-offset: 0.1875rem !important;
}

/* Result info（約有 X 項結果，搜尋時間 Y 秒） + Order by 一列同高 */
.page-search .gsc-above-wrapper-area {
  border-bottom: 0.0625rem solid #e0d4c0 !important;
  padding: 0.5rem 0 !important;
  margin-bottom: 0.75rem !important;
}
.page-search .gsc-result-info {
  color: #5f4d42 !important;
  font-size: 0.9375em !important;                    /* 隨字級切換 */
  padding: 0.25rem 0 !important;
}

/* 結果標題連結：加大字級 + 站台深藍；hover 綠（版型參考 moenv 搜尋結果）
   font-size 用 em 讓字級切換能同步放大 */
.page-search .gs-title,
.page-search .gs-title *,
.page-search .gsc-result .gs-title a.gs-title,
.page-search .gsc-result .gs-title a.gs-title b {
  color: #1a3a52 !important;
  font-size: 1.25em !important;                      /* 隨字級切換（相對於 body）*/
  line-height: 1.4 !important;
  text-decoration: none !important;
}
.page-search .gsc-result .gs-title a.gs-title:hover,
.page-search .gsc-result .gs-title a.gs-title:hover b,
.page-search .gsc-result .gs-title a.gs-title:focus-visible,
.page-search .gsc-result .gs-title a.gs-title:focus-visible b {
  color: #1f5f3f !important;
  text-decoration: underline !important;
}

/* 顯示網址 → 綠色小字（em 隨字級切換）*/
.page-search .gs-webResult div.gs-visibleUrl,
.page-search .gs-imageResult div.gs-visibleUrl {
  color: #196b28 !important;
  font-size: 0.875em !important;
  padding: 0.125rem 0 0.25rem !important;
}

/* 摘要文字：加大 + 行高 1.7 貼近 moenv 閱讀體驗（em 隨字級切換）*/
.page-search .gs-webResult .gs-snippet {
  color: #333 !important;
  font-size: 0.9375em !important;
  line-height: 1.7 !important;
  padding-top: 0.125rem !important;
}

/* 每筆結果之間加白空間，看起來更清爽 */
.page-search .gsc-webResult.gsc-result {
  padding: 1rem 0 !important;
  border-bottom: 0.0625rem solid #f0e8d8 !important;
}

/* 關鍵字高亮：深綠字 + 淡黃底（原本 CSE 是粗黑字，於本站看不清楚）*/
.page-search .gs-webResult .gs-snippet b,
.page-search .gs-webResult .gs-title b {
  color: #14522e !important;
  background: #fdf7ea;
}

/* CSE 結果容器背景改為透明、移除灰色外框，
   讓 body 米色底（#faf8f5）顯示出來，視覺上與 Home/DlZone 結果區一致 */
.page-search .gsc-control-cse,
.page-search .gsc-control-wrapper-cse,
.page-search .gsc-results,
.page-search .gsc-webResult,
.page-search .gsc-result,
.page-search .gsc-above-wrapper-area,
.page-search .gsc-above-wrapper-area-container,
.page-search .gsc-orderby-container {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* 頁籤區與頁籤本身排除於上方 reset：由 .gsc-tabsArea / .gsc-tabHeader 專屬規則控制邊框 */
.page-search .gsc-tabsArea,
.page-search .gsc-tabHeader {
  background: transparent !important;
  box-shadow: none !important;
}

/* CSE 結果內部元素預設有 max-width（thumbnail 版型遺留）造成右側大片空白；
   強制撐滿容器寬度（.container 已限制在 75rem，所以不會過寬） */
.page-search .gsc-control-cse,
.page-search .gsc-control-wrapper-cse,
.page-search .gsc-wrapper,
.page-search .gsc-results,
.page-search .gsc-resultsbox-visible,
.page-search .gsc-resultsRoot,
.page-search .gsc-webResult,
.page-search .gsc-result,
.page-search .gs-webResult,
.page-search .gs-result,
.page-search .gs-webResult .gs-title,
.page-search .gs-webResult .gs-snippet,
.page-search .gs-webResult div.gs-visibleUrl,
.page-search .gsc-thumbnail-inside,
.page-search .gsc-url-top,
.page-search .gsc-table-result,
.page-search .gsc-table-cell-snippet-close {
  max-width: 100% !important;
  width: auto !important;
  box-sizing: border-box !important;
}

/* CSE 結果內部靠 table 排版；讓表格自動 100% 撐開，摘要文字才能佔用整個寬度而不擠在左半邊 */
.page-search .gsc-table-result {
  width: 100% !important;
  table-layout: auto !important;
}

/* 縮圖欄位縮到自然寬度（部分結果沒縮圖時，這個 <td> 會保留大空欄） */
.page-search .gsc-table-cell-thumbnail,
.page-search .gs-web-image-box {
  width: auto !important;
  padding-right: 1rem !important;
}
.page-search .gsc-table-cell-thumbnail:empty {
  display: none !important;
}

/* ─── 分頁列（版型參考 moenv.gov.tw/search，配色沿用站台綠）───
   置中排列、圓形觸控目標、當前頁深綠填底、hover 顯示淡綠底 */
.page-search .gsc-cursor-box {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.375rem 0.5rem;
  padding: 2rem 0 1rem !important;
  margin: 0 !important;
  border: 0 !important;
}

.page-search .gsc-cursor-page {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 2.5rem;                                 /* 40px：AA 觸控目標 */
  min-height: 2.5rem;
  padding: 0 0.75rem;
  color: #1a3a52 !important;                         /* 站台深藍字，對白底 12.6:1 通過 AA */
  background: transparent !important;
  border: 0 !important;
  border-radius: 999rem;                             /* 圓形／膠囊 */
  font-weight: 500;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.page-search .gsc-cursor-page:hover {
  background: #eaf5ec !important;                    /* 淡綠 hover 底（對深藍字 11.5:1）*/
  color: #1a3a52 !important;
}

.page-search .gsc-cursor-current-page {
  background: #1f5f3f !important;                    /* 當前頁：站台深綠填底 */
  color: #ffffff !important;                         /* 對深綠 8.5:1 通過 AA */
  font-weight: 700;
}

.page-search .gsc-cursor-current-page:hover {
  background: #1f5f3f !important;                    /* 當前頁 hover 保持深綠不變 */
  color: #ffffff !important;
}

/* AA 焦點指示 */
.page-search .gsc-webResult a:focus-visible,
.page-search .gsc-tabHeader:focus-visible,
.page-search .gsc-cursor-page:focus-visible {
  outline: 0.1875rem solid #1f5f3f !important;
  outline-offset: 0.125rem !important;
}
/* 響應式：< 48rem 時搜尋列縮小內距，字級用 em 隨字級切換
   （手機建議 ≥ 1em 避免 iOS 自動放大；1em 至少等於 body 16px） */
@media (max-width: 48rem) {
  .page-search .search-filter-input {
    min-height: 3rem;                                /* 48px：仍符合 AA 觸控 */
    font-size: 1em;                                  /* ≥16px 避免 iOS 自動放大；隨字級切換 */
    padding: 0.375rem 0.75rem;
  }
  .page-search .search-filter-btn {
    width: 3rem;
  }
  .page-search .search-filter-btn__icon {
    width: 1.375rem;
    height: 1.375rem;
  }
  .page-search .gs-title,
  .page-search .gs-title *,
  .page-search .gsc-result .gs-title a.gs-title,
  .page-search .gsc-result .gs-title a.gs-title b {
    font-size: 1.125em !important;                   /* 手機略縮；隨字級切換 */
  }
}

/* ═══════════════════════════════════════════════════
   聯絡我們（Home/Contact）— 版面參考 DlZone；
   使用 <dl>/<dt>/<dd> 語意化聯絡資訊；顏色皆採用 CLAUDE.md「已核可色票」，通過 WCAG AA 對比。
   ═══════════════════════════════════════════════════ */

.page-contact .contact-section {
  padding: 2rem 0 3rem;
}

/* 只縮窄內容區 container，避免影響麵包屑（麵包屑 partial 也用 .container）*/
.page-contact .contact-section .container {
  max-width: 50rem;
}

/* 聯絡資訊卡片：白底 + 淡邊框（與 signup-form-card 視覺一致）*/
.page-contact .contact-list {
  margin: 0;
  padding: 1.75rem 2rem;
  background: #ffffff;
  border: 0.09375rem solid #e0d4c0;
  border-radius: 0.5rem;
  box-shadow: 0.125rem 0.125rem 0 rgba(74, 60, 49, 0.08);
}

.page-contact .contact-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  padding: 1rem 0;
  border-bottom: 0.09375rem dashed #ede4d0;
}

.page-contact .contact-item:first-child { padding-top: 0; }
.page-contact .contact-item:last-child  { padding-bottom: 0; border-bottom: none; }

.page-contact .contact-item__label {
  flex: 0 0 auto;
  min-width: 6.25rem;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #1a3a52;
  font-size: 1rem;
  font-weight: 700;
}

.page-contact .contact-item__icon {
  width: 1.5rem;
  color: #1f5f3f;
  font-size: 1.125rem;
  line-height: 1;
  text-align: center;
}

.page-contact .contact-item__value {
  flex: 1;
  min-width: 0;
  margin: 0;
  color: #333;
  font-size: 1rem;
  line-height: 1.7;
}

/* 電話/信箱連結 */
.page-contact .contact-link {
  color: #1f5f3f;
  text-decoration: underline;
  text-underline-offset: 0.125rem;
  word-break: break-all;   /* 長信箱在窄螢幕可換行 */
}

.page-contact .contact-link:hover {
  color: #14522e;
  text-decoration-thickness: 0.125rem;
}

.page-contact .contact-link:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.125rem;
  border-radius: 0.125rem;
}

/* 提醒段落：淡黃底、左邊粗線強調 */
.page-contact .contact-note {
  margin: 1.5rem 0 0;
  padding: 1rem 1.25rem;
  background: #fdf7ea;
  border-left: 0.25rem solid #856404;
  border-radius: 0 0.375rem 0.375rem 0;
  color: #4a3c30;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.page-contact .contact-note > span[aria-hidden="true"] {
  margin-right: 0.375rem;
}

/* 響應式：手機 label 與 value 直式排列 */
@media (max-width: 30rem) {
  .page-contact .contact-list {
    padding: 1.25rem 1rem;
  }
  .page-contact .contact-item {
    flex-direction: column;
    gap: 0.25rem;
  }
  .page-contact .contact-item__label {
    min-width: 0;
  }
}

/* ═══════════════════════════════════════════════════
   FAQ 常見問題（Home/FaqZone）— 版面參考 DlZone；
   使用 <details>/<summary> 原生 accordion，鍵盤及螢幕閱讀器直接支援。
   顏色皆採用 CLAUDE.md「已核可色票」，通過 WCAG AA 對比。
   ═══════════════════════════════════════════════════ */

.page-faq .faq-search-section {
  padding: 1.25rem 0;
  background: #fdfaf2;
  border-bottom: 0.09375rem solid #e0d4c0;
}

.page-faq .faq-search-label {
  display: block;
  margin-bottom: 0.5rem;
  color: #2a3a2a;
  font-size: 0.9375rem;
  font-weight: 700;
}

.page-faq .faq-search-row {
  display: flex;
  gap: 0.75rem;
  max-width: 60rem;
}

.page-faq .faq-search-input {
  flex: 1;
  min-width: 0;
  height: 2.5rem;               /* WCAG 2.5.5：觸控目標 40px */
  padding: 0 1rem;
  color: #222;
  background: #ffffff;
  border: 0.09375rem solid #4a3c31;
  border-radius: 0.25rem;
  font-family: inherit;
  font-size: 1rem;
  outline: 0.1875rem solid transparent;
}

.page-faq .faq-search-btn {
  min-height: 2.5rem;
  white-space: nowrap;
  padding: 0 1.5rem;
  color: #ffffff;
  background: #4a8250;
  border: 0.09375rem solid #4a3c31;
  border-radius: 0.25rem;
  box-shadow: 0.125rem 0.125rem 0 #4a3c31;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.page-faq .faq-search-btn:hover {
  background: #e5b821;
  color: #4a3c30;
  transform: translate(-0.0625rem, -0.0625rem);
  box-shadow: 0.1875rem 0.1875rem 0 #4a3c31;
}

.page-faq .faq-search-input:focus-visible,
.page-faq .faq-search-btn:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.1875rem;
}

/* 結果區塊 */
.page-faq .faq-results {
  padding: 1.5rem 0 3rem;
}

.page-faq .faq-results-toolbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.875rem;
  border-bottom: 0.09375rem solid #e0d4c0;
}

.page-faq .faq-results-toolbar h2,
.page-faq .faq-results-toolbar p { margin: 0; }

.page-faq .faq-results-toolbar h2 {
  color: #2a3a2a;
  font-size: 1.375rem;
}

.page-faq .faq-results-toolbar p {
  color: #5f4d42;
  font-size: 0.875rem;
}

.page-faq .faq-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.page-faq .faq-item {
  min-width: 0;
}

/* 單一 FAQ 卡片（<details>）*/
.page-faq .faq-details {
  background: #ffffff;
  border: 0.09375rem solid #e0d4c0;
  border-radius: 0.5rem;
  box-shadow: 0.125rem 0.125rem 0 rgba(74, 60, 49, 0.08);
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.page-faq .faq-details[open] {
  border-color: #4a6b53;
  box-shadow: 0.125rem 0.25rem 0.75rem rgba(74, 60, 49, 0.14);
}

/* 問題列（summary）*/
.page-faq .faq-summary {
  min-height: 3rem;             /* WCAG 2.5.5：觸控目標 ≥ 48px */
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  cursor: pointer;
  color: #1a3a52;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.6;
  list-style: none;             /* 隱藏預設三角形（下方用 ::-webkit-details-marker 也隱藏）*/
}

.page-faq .faq-summary::-webkit-details-marker { display: none; }

.page-faq .faq-summary:hover {
  background: #fdf7ea;
}

.page-faq .faq-summary:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: -0.1875rem;   /* 內縮避免破壞卡片圓角 */
}

/* 類別標籤：與 _TopCategoryPartial 頁頂按鈕共用 --download-category-* 變數，色系一致。
   qtype 1 / 5 / 6 由全域 .download-category--N 提供；7 / 9 / 10 為 FAQ 專屬（scoped 於 .page-faq）*/
.page-faq .faq-summary__type {
  flex: 0 0 auto;
  padding: 0.125rem 0.625rem;
  background: var(--download-category-bg, #f0ece0);
  color: var(--download-category-text, #4a3c31);
  border-radius: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
}

.page-faq .faq-summary__question {
  flex: 1;
  min-width: 0;
}

/* 展開/收合符號 */
.page-faq .faq-summary__toggle {
  flex: 0 0 auto;
  width: 1.5rem;
  text-align: center;
  color: #1f5f3f;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.2s;
}

.page-faq .faq-details[open] .faq-summary__toggle {
  transform: rotate(45deg);     /* ＋ 轉 ×（視覺提示）*/
}

/* 答覆內容 */
.page-faq .faq-answer {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 0.0625rem solid #ede4d0;
  color: #333;
  font-size: 1rem;
  line-height: 1.8;
}

.page-faq .faq-answer p:first-child { margin-top: 0; }
.page-faq .faq-answer p:last-child  { margin-bottom: 0; }
.page-faq .faq-answer a { color: #1f5f3f; }
.page-faq .faq-answer a:hover { text-decoration: underline; }

.page-faq .faq-answer__updated {
  margin: 1rem 0 0;
  padding-top: 0.75rem;
  border-top: 0.0625rem dashed #ede4d0;
  color: #555;
  font-size: 0.875rem;
  text-align: right;
}

.page-faq .faq-empty-message {
  margin: 0;
  padding: 3rem 1rem;
  color: #5f4d42;
  text-align: center;
}

.page-faq .faq-item[hidden] { display: none; }
.page-faq .faq-empty-message[hidden] { display: none; }

/* FAQ 專屬類別色票（qtype 7 / 9 / 10；1 / 5 / 6 沿用全域 .download-category--N，
   全域最新消息類型只到 --6，此處補齊 FAQ 需要的 7 / 9 / 10）*/
.page-faq .download-category--7  { --download-category-bg: #d9f0ef; --download-category-text: #17635d; }
.page-faq .download-category--9  { --download-category-bg: #e7e2f7; --download-category-text: #493181; }
.page-faq .download-category--10 { --download-category-bg: #fce8e8; --download-category-text: #8a2020; }

/* 響應式：小螢幕 summary 改為直式 */
@media (max-width: 30rem) {
  .page-faq .faq-search-row {
    flex-direction: column;
  }
  .page-faq .faq-search-btn {
    width: 100%;
  }
  .page-faq .faq-summary {
    flex-wrap: wrap;
  }
}

/* ═══════════════════════════════════════════════════
   相關法規（Home/LawZone）— 版面參考 DlZone；
   全部外部連結至環境部主管法規查詢系統，每分區含標題、連結清單與更新日期。
   顏色皆採用 CLAUDE.md「已核可色票」，通過 WCAG AA 對比。
   ═══════════════════════════════════════════════════ */

.page-law-zone .law-zone-results {
  padding: 1.5rem 0 3rem;
}

/* 只縮窄內容區 container，避免影響麵包屑（麵包屑 partial 也用 .container）*/
.page-law-zone .law-zone-results .container {
  max-width: 60rem;
}

/* 分區卡片：白底 + 淡邊框，與 .signup-form-card 視覺一致 */
.page-law-zone .law-zone-section {
  margin-bottom: 1.5rem;
  padding: 1.5rem 1.75rem 1.25rem;
  background: #ffffff;
  border: 0.09375rem solid #e0d4c0;
  border-radius: 0.5rem;
  box-shadow: 0.125rem 0.125rem 0 rgba(74, 60, 49, 0.08);
}

.page-law-zone .law-zone-section:last-child {
  margin-bottom: 0;
}

.page-law-zone .law-zone-section__header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 0.09375rem solid #e0d4c0;
}

/* 分區標題 h3：綠色主色（#1a3a52 於白 11.86:1） */
.page-law-zone .law-zone-section__title {
  margin: 0;
  color: #1a3a52;
  font-size: 1.25rem;
  font-weight: 700;
}

/* 說明段落 */
.page-law-zone .law-zone-section__desc {
  margin: 0 0 1rem;
  color: #333;
  font-size: 1rem;
  line-height: 1.7;
}

/* 連結清單：直式排列，行動裝置也不擠 */
.page-law-zone .law-zone-list {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.page-law-zone .law-zone-list__item {
  min-width: 0;
}

/* 連結卡片：整區可點；hover / focus 樣式參考 DlZone .download-card__action */
.page-law-zone .law-zone-link {
  min-height: 3rem;             /* WCAG 2.5.5 觸控目標 ≥ 44×44px */
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  background: #f3ecd7;
  border: 0.09375rem solid #4a3c31;
  border-radius: 0.375rem;
  color: #2a3a2a;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.page-law-zone .law-zone-link__text {
  flex: 1;
  min-width: 0;
}

/* 外連結圖示：右對齊 */
.page-law-zone .law-zone-link__ext {
  flex: 0 0 auto;
  font-size: 1.125rem;
  line-height: 1;
  color: #1f5f3f;
}

.page-law-zone .law-zone-link:hover {
  background: #4a8250;
  color: #ffffff;
  transform: translate(-0.0625rem, -0.0625rem);
  box-shadow: 0.1875rem 0.1875rem 0 #4a3c31;
}

.page-law-zone .law-zone-link:hover .law-zone-link__ext {
  color: #ffffff;
}

/* Focus-visible：與其他頁面統一的綠色 outline */
.page-law-zone .law-zone-link:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.1875rem;
}

/* 更新日期：右下角、次要資訊 */
.page-law-zone .law-zone-section__updated {
  margin: 0.5rem 0 0;
  color: #555;
  font-size: 0.875rem;
  text-align: right;
}

/* 響應式：手機單欄 */
@media (max-width: 48rem) {
  .page-law-zone .law-zone-list {
    grid-template-columns: 1fr;
  }

  .page-law-zone .law-zone-section {
    padding: 1.25rem 1rem;
  }
}

/* ═══════════════════════════════════════════════════
   最新消息列表（Home/ExploreNewsList）版面參考 DlZone；
   ═══════════════════════════════════════════════════ */

/* ── 消息類型代碼色彩（全域，Index / ExploreNewsList 篩選按鈕 / ExploreNewsDetail 共用）── */
.download-category--all {
  --download-category-bg:   #dcebfb;
  --download-category-text: #245985;
}
.download-category--1 {
  --download-category-bg:   #dcefe1;
  --download-category-text: #246642;
}
.download-category--2 {
  --download-category-bg:   #fbe4d2;
  --download-category-text: #8a4510;
}
.download-category--3 {
  --download-category-bg:   #d9f0ef;
  --download-category-text: #17635d;
}
.download-category--4 {
  --download-category-bg:   #e7e2f7;
  --download-category-text: #493181;
}
.download-category--5 {
  --download-category-bg:   #fce8e8;
  --download-category-text: #8a2020;
}
.download-category--6 {
  --download-category-bg:   #fdfce0;
  --download-category-text: #7a6810;
}

/* 最新消息（ExploreNews）專屬色票覆寫；僅在 Home/Index 右側與 ExploreNewsList 生效，
   不影響 DlZone / Resources / FaqZone 等其他頁用相同 qtype 數值表達不同語意。
   qtype 1=系統公告 淡紅、7=新聞 淡綠、8=新知 淡藍 */
.right-news       .download-category--1,
[data-news-list]  .download-category--1 { --download-category-bg: #fce8e8; --download-category-text: #8a2020; }
.right-news       .download-category--7,
[data-news-list]  .download-category--7 { --download-category-bg: #dcefe1; --download-category-text: #246642; }
.right-news       .download-category--8,
[data-news-list]  .download-category--8 { --download-category-bg: #dcebfb; --download-category-text: #245985; }
/* 全部類別改為中性米色，避免與新知（淡藍）撞色 */
[data-news-list]  .download-category--all { --download-category-bg: #f3eee5; --download-category-text: #4a3c31; }

/* pin 圖示在卡片類別列：覆蓋首頁列表版的 position:absolute，改為 flex 行內排列 */
.download-card__category .news-pin-icon {
  position: static;
  transform: none;
  flex-shrink: 0;
}

/* Home/Index 最新消息類別標籤；色彩由 download-category--N 變數提供 */
.news-type-badge {
  display: inline-block;
  padding: 0.125rem 0.625rem;
  background: var(--download-category-bg, #4a3c31);
  color: var(--download-category-text, #fdfaf2);
  border: 0.075rem solid #4a3c31;
  border-radius: 0.125rem;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ══════════════════════════════════════════════════
   最新消息詳細頁（Home/ExploreNewsDetail）
   ══════════════════════════════════════════════════ */

/* 標題區與內容之間的視覺分隔 */
.news-detail-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 0.09375rem solid #e0d4c0;
}

.news-detail-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.news-detail-title-row .eelib-detail-title {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

/* Facebook 分享連結：與標題同列靠右，圖示即為 share_icon.svg */
.news-share-btn--fb {
  display: inline-flex;
  align-items: center;
  align-self: center;
  flex-shrink: 0;
  margin-left: auto;
  text-decoration: none;
  border-radius: 0.25rem;
}

.news-share-btn--fb:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.1875rem;
}

.news-share-svg {
  display: block;
  height: 1.25rem;
  width: auto;
}

/* ══════════════════════════════════════════════════
   環境講習查詢（Home/PenaltySearch）
   ══════════════════════════════════════════════════ */

.penalty-results {
  padding: 1.5rem 0 3rem;
}

.penalty-result-count {
  margin: 0 0 1rem;
  color: #3d2b1f;
  font-size: 0.9375rem;
}

.penalty-hint {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  color: #5f4d42;
  background: #fdfaf2;
  border: 0.09375rem solid #e0d4c0;
  border-radius: 0.25rem;
  font-size: 0.9375rem;
}

.penalty-empty {
  margin: 2rem 0;
  padding: 2rem 1rem;
  color: #5f4d42;
  text-align: center;
  font-size: 0.9375rem;
}

/* 水平捲動包裝（鍵盤可操作）*/
.penalty-table-wrapper {
  overflow-x: auto;
  border: 0.09375rem solid #c9b99a;
  border-radius: 0.25rem;
}

.penalty-table {
  width: 100%;
  min-width: 44rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.penalty-table caption {
  padding: 0.5rem 0;
  color: #3d2b1f;
  font-weight: 700;
  font-size: 1rem;
  text-align: left;
  caption-side: top;
}

.penalty-table th {
  padding: 0.625rem 0.75rem;
  background: #f5efe6;
  color: #3d2b1f;
  border-bottom: 0.125rem solid #c9b99a;
  text-align: center;
  font-weight: 700;
  white-space: nowrap;
}

.penalty-table td {
  padding: 0.5625rem 0.75rem;
  border-bottom: 0.0625rem solid #e0d4c0;
  color: #3d2b1f;
  text-align: center;
  vertical-align: middle;
}

.penalty-table tbody tr:last-child td {
  border-bottom: none;
}

.penalty-table tbody tr:hover td {
  background: #fdfaf2;
}

.penalty-table tbody tr[hidden] {
  display: none;
}

/* 講習狀態徽章：對比度已驗證 ≥ 4.5:1（AA）*/
.penalty-status {
  display: inline-block;
  padding: 0.125rem 0.625rem;
  border-radius: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
}

/* 已完成 — #1b6b2d on #eaf5ec ≈ 8.2:1 */
.penalty-status--done {
  background: #eaf5ec;
  color: #1b6b2d;
}

/* 未完成 — #8a1515 on #fde8e8 ≈ 10:1 */
.penalty-status--pending {
  background: #fde8e8;
  color: #8a1515;
}

@media (max-width: 48rem) {
  .penalty-table {
    font-size: 0.875rem;
  }
}

/* ══════════════════════════════════════════════════
   探索館報名表（Home/ExploreSignUp）
   ══════════════════════════════════════════════════ */

/* 搜尋列：額滿狀態下拉 + 關鍵字輸入橫排 */
.signup-search-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.signup-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.signup-field--keyword {
  flex: 1 1 16rem;
}

.signup-filter-select {
  height: 2.5rem;
  padding: 0 0.75rem;
  border: 0.0625rem solid #4a3c31;
  border-radius: 0.25rem;
  background: #fff;
  font-size: 0.9375rem;
  color: #3e2e24;
  cursor: pointer;
  min-width: 8rem;
}

.signup-filter-select:focus {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.125rem;
}

/* 報名狀態徽章（inline 小標籤）
   深色實心背景＋白字，確保在任何卡片標頭背景色上均通過 WCAG AA 非文字對比 3:1 */
.signup-status {
  display: inline-flex;
  align-items: center;
  padding: 0.1875rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  color: #fff;
}

/* 報名中 — #fff on #1b6b2d ≈ 11.7:1 */
.signup-status--open   { background: #1b6b2d; }
/* 已截止 — #fff on #5c4f44 ≈ 9.8:1 */
.signup-status--closed { background: #5c4f44; }
/* 額滿 — #fff on #8a1515 ≈ 10.2:1 */
.signup-status--full   { background: #8a1515; }

/* 報名說明摘要（向上靠齊 title，最多 2 行） */
.page-download .signup-card__intro {
  font-size: 0.9375rem;
  color: #3e2e24;
  line-height: 1.55;
  margin: 0.25rem 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 報名期間 */
.page-download .signup-card__period {
  font-size: 0.875rem;
  color: #4a3c31;
  margin-top: 0.5rem;
}

/* 卡片標頭列：在 download-card__category（已含 flex/align-items/gap）上補 space-between */
.page-download .signup-card__header {
  justify-content: space-between;
}

/* 卡片標題：覆寫 download-card__title 的 margin-bottom:auto，讓 intro 緊接 title */
.page-download .signup-card .download-card__title {
  margin-bottom: 0;
  padding-bottom: 0.25rem;
}

/* 卡片底部：狀態徽章（左）+ 查看詳情（右，flex:1 撐滿剩餘寬度） */
.page-download .signup-card__footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
}

/* 查看詳情：flex:1 填滿剩餘空間（text-align/justify-content 已由 download-card__action 提供） */
.page-download .signup-card__action {
  flex: 1;
}

/* 已報名活動/課程 按鈕（登入時顯示於搜尋列，點擊切換「我的報名」模式） */
.page-download .signup-mysignups-btn {
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  padding: 0 0.875rem;
  background: transparent;
  border: 0.0625rem solid #245985;
  border-radius: 0.25rem;
  color: #245985;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

/* hover 與 active（我的報名模式啟用中）：填滿底色 */
.page-download .signup-mysignups-btn:hover,
.page-download .signup-mysignups-btn.is-active {
  background: #245985;
  color: #fff;
}

.page-download .signup-mysignups-btn:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.125rem;
}

/* ═══════════════════════════════════════════════════════════════
   ExploreSignUpDetail  ─  報名表詳細 / 報名頁面
   ═══════════════════════════════════════════════════════════════ */

/* ── 活動資訊 ── */
.signup-detail-section { padding: 1.5rem 0 0; }

.signup-detail-back    { margin-bottom: 1rem; }
.signup-back-link {
  color: #245985;
  font-size: 0.9375rem;
  text-decoration: none;
}
.signup-back-link:hover { text-decoration: underline; }

.signup-info-card {
  background: #fff;
  border: 1px solid #d0dce8;
  border-radius: 0.5rem;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.signup-info-card__header {
  background: #e8f1f8;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.signup-info-card__type {
  font-size: 0.8125rem;
  color: #245985;
  font-weight: 600;
  margin: 0;
}
.signup-info-card__name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a3a52;
  margin: 0 auto 0 0;
}

.signup-info-card__body { padding: 0; margin: 0; }
.signup-info-row {
  display: grid;
  grid-template-columns: 9rem 1fr;
  border-top: 1px solid #e2ecf5;
  padding: 0.625rem 1.25rem;
  gap: 0.5rem;
}
.signup-info-row dt {
  font-weight: 600;
  color: #3a5a72;
  font-size: 0.9rem;
}
.signup-info-row dd { margin: 0; color: #333; line-height: 1.6; }
@media (max-width: 480px) {
  .signup-info-row { grid-template-columns: 1fr; }
}

/* ── 報名表單區 ── */
.signup-result-section { padding: 1.5rem 0 2rem; }

/* 線上報名卡片：同 signup-info-card 尺寸，半透明白色背景讓背景圖透出 */
.signup-form-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #d0dce8;
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.signup-form-heading {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1a3a52;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #245985;
}

/* ── 提示 / 錯誤框 ── */
.signup-alert {
  border-radius: 0.375rem;
  padding: 0.875rem 1.125rem;
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.6;
}
.signup-alert--success { background: #eaf7ed; border: 1px solid #3a9e56; color: #1b5e30; }
.signup-alert--error   { background: #fdecea; border: 1px solid #c0392b; color: #7b1c13; }
.signup-alert--warning { background: #fff8e1; border: 1px solid #e6a817; color: #6b4800; }
.signup-alert--info    { background: #e8f4fb; border: 1px solid #2980b9; color: #174b72; }

.signup-error-list { margin: 0.5rem 0 0 1.25rem; padding: 0; }
.signup-error-list li { margin-bottom: 0.25rem; }

/* ── 必填說明 ── */
.signup-required-note { font-size: 0.875rem; color: #555; margin-bottom: 1rem; }

/* ── 動態欄位 ── */
.signup-form__field {
  margin-bottom: 1.25rem;
}

.signup-form__label {
  display: block;
  font-weight: 600;
  color: #1a3a52;
  margin-bottom: 0.375rem;
  font-size: 0.9375rem;
}
.signup-form__label--required::after {
  content: "（必填）";
  color: #c0392b;
  font-size: 0.875rem;
  font-weight: 400;
  margin-left: 0.25rem;
}

.signup-form__input,
.signup-form__textarea {
  display: block;
  width: 100%;
  max-width: 36rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #4a3c31;
  border-radius: 0.375rem;
  font-size: 1rem;
  color: #222;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.signup-form__input:focus,
.signup-form__textarea:focus {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.125rem;
}
.signup-form__input--date,
.signup-form__input--time { max-width: 14rem; }
.signup-form__input--file  { width: auto; max-width: 100%; padding: 0.375rem 0; border: none; }

.signup-form__textarea { min-height: 7.5rem; resize: vertical; }

/* ── 單選 / 複選 ── */
.signup-form__fieldset {
  border: none;
  margin: 0;
  padding: 0;
}
.signup-form__radio-group,
.signup-form__checkbox-group { display: flex; flex-direction: column; gap: 0.5rem; }

.signup-form__option-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
  color: #222;
  cursor: pointer;
  font-size: 0.9375rem;
}
.signup-form__option-label input { accent-color: #1b6b2d; width: 1rem; height: 1rem; margin: 0; }

/* ── 格式提示 ── */
.signup-form__hint {
  font-size: 0.875rem;
  color: #1f5f3f;
  margin-top: 0.3rem;
  margin-bottom: 0;
}
.signup-form__hint a { color: #1f5f3f; }

/* ── 既有檔案清單 ── */
.signup-existing-files {
  list-style: none;
  margin: 0.375rem 0 0;
  padding: 0;
  font-size: 0.875rem;
}
.signup-existing-files li { margin-bottom: 0.25rem; }
.signup-existing-files a  { color: #1f5f3f; }

/* ── 個人資料聲明 ── */
.signup-policy { margin-top: 1.5rem; }
.signup-policy__hint { font-size: 0.875rem; color: #555; margin-bottom: 0.5rem; }
.signup-policy__box {
  border: 1px solid #4a3c31;
  border-radius: 0.375rem;
  height: 12rem;
  overflow-y: auto;
  padding: 0.875rem 1rem;
  background: #fff;
  font-size: 0.875rem;
  line-height: 1.7;
  color: #333;
  scroll-behavior: smooth;
}
.signup-policy__box:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.125rem;
}
.signup-policy__check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.9375rem;
}
.signup-policy__check input {
  accent-color: #1b6b2d;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
}

/* ── 注意事項 ── */
.signup-form__footer {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid #d0dce8;
}
.signup-form__notice { font-size: 0.875rem; color: #555; margin: 0.5rem 0 0; line-height: 1.7; }

/* ── 送出按鈕列（置中，在頁面最底部）── */
.signup-form__actions {
  text-align: center;
  margin-top: 1.5rem;
}
.signup-form__submit {
  padding: 0.625rem 2rem;
  background: #4a8250;
  color: #ffffff;
  border: 0.09375rem solid #4a3c31;
  border-radius: 0.25rem;
  box-shadow: 0.125rem 0.125rem 0 #4a3c31;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.signup-form__submit:hover:not(:disabled) {
  background: #e5b821;
  color: #4a3c30;
  transform: translate(-0.0625rem, -0.0625rem);
  box-shadow: 0.1875rem 0.1875rem 0 #4a3c31;
}
.signup-form__submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.signup-form__submit:focus-visible {
  outline: 0.1875rem solid #1f5f3f;
  outline-offset: 0.125rem;
}

/* ── 欄位驗證錯誤紅字 ── */
.signup-form__error {
  display: block;
  font-size: 0.85rem;
  color: #c0392b;
  margin-top: 0.2rem;
}

/* ── 密碼區塊（有框線版 fieldset） ── */
.signup-form__fieldset--bordered {
  border: 1px solid #d0dce8;
  border-radius: 0.375rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.signup-form__fieldset--bordered legend {
  font-weight: 600;
  padding: 0 0.5rem;
  font-size: 0.9375rem;
  color: #1a3a52;
}

/* ── 密碼強度即時提示 ── */
.pwd-strength-msg        { display: block; font-size: 0.85rem; margin-top: 0.2rem; }
.pwd-strength-msg:empty  { display: none; }
.pwd-strength--weak      { color: #c0392b; }
.pwd-strength--medium    { color: #856404; }
.pwd-strength--strong    { color: #196b28; }

/* ── 密碼一致性即時提示 ── */
.pwd-match-msg        { display: block; font-size: 0.85rem; margin-top: 0.2rem; }
.pwd-match-msg:empty  { display: none; }
.pwd-match--ok        { color: #196b28; }
.pwd-match--fail      { color: #c0392b; }

/* ── 修改基本資料頁 ── */
.page-member-profile .profile-form-section { padding: 2rem 0 3rem; }
.page-member-profile .profile-form-section .container { max-width: 640px; }

/* ── 忘記密碼頁 ── */
.page-member-forget .forget-form-section { padding: 2rem 0 3rem; }
.page-member-forget .forget-form-section .container { max-width: 640px; }
.page-member-forget .forget-form-desc {
  margin-bottom: 1.5rem;
  color: #333;
  line-height: 1.7;
}
.page-member-forget .forget-form-back {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: #555;
  text-align: center;
}
.page-member-forget .forget-form-back a { color: #1f5f3f; }


/* ── 密碼欄位顯示/隱藏切換（眼睛按鈕） ── */
.signup-form__pwd-wrapper {
  position: relative;
}
.signup-form__pwd-wrapper .signup-form__input {
  padding-right: 2.75rem;
}
.pwd-toggle-btn {
  position: absolute;
  right: 0.375rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  padding: 0.375rem;
  min-width: 1.75rem;   /* WCAG 2.5.5 AAA：觸控目標 ≥ 24×24px */
  min-height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: 0.25rem;
}
.pwd-toggle-btn:hover { color: #1f5f3f; }
.pwd-toggle-btn:focus-visible {
  outline: 2px solid #1f5f3f;
  outline-offset: 1px;
}

/* ── 密碼重設頁 ── */
.page-member-reset-password .reset-pwd-form-section { padding: 2rem 0 3rem; }
.page-member-reset-password .reset-pwd-form-section .container { max-width: 640px; }
.page-member-reset-password .reset-pwd-form-desc {
  margin-bottom: 1.5rem;
  color: #333;
  line-height: 1.7;
}
.page-member-reset-password .reset-pwd-form-desc a { color: #1f5f3f; }

/* ═══════════════════════════════════════════════════
   網站導覽（Home/Sitemap）
   ─ 版面框架參考 CherishFood/Sitemap（h1 左邊界飾條 + 「色帶標題 + 卡片列表」重複區塊）
   ─ 配色沿用 Home 首頁綠色系（page-header 綠漸層 + 已核可綠色連結色）
   AA 驗證：
     h1        #1a3a52 on #fff              → 12.63:1  ✓✓✓
     色帶標題  #fff    on gradient #2e7d52  →  5.03:1  ✓✓
     內文連結  #1f5f3f on #fff              →  7.61:1  ✓✓✓
     hover    #0f3d24 on #eaf5ec           →  9.91:1  ✓✓✓
   ═══════════════════════════════════════════════════ */
.page-sitemap {
  background: #fff;
  min-height: 60vh;
  padding: 2rem 1rem 4rem;
  color: #222;
}
.page-sitemap-container { max-width: 900px; margin: 0 auto; }

/* 頁面主標題：左側綠色飾條，比照 CherishFood 手法但改用 Home 綠 */
.page-sitemap-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a3a52;
  border-left: 0.375rem solid #2e7d52;
  padding-left: 0.875rem;
  margin: 0 0 1.25rem;
  line-height: 1.4;
}

/* 無障礙說明段落 */
.page-sitemap-intro {
  margin: 0.375rem 0;
  color: #333;
  font-size: 1rem;
  line-height: 1.85;
}
.page-sitemap-accesskey {
  margin: 0.75rem 0 1.75rem 1.5rem;
  padding: 0;
  color: #333;
  line-height: 1.9;
  font-size: 1rem;
}
.page-sitemap-accesskey li { margin-bottom: 0.25rem; }
.page-sitemap-accesskey strong {
  color: #1a3a52;
  margin-right: 0.25rem;
}

/* 每個功能區塊 = 色帶標題 + 卡片列表 */
.page-sitemap-section { margin-top: 1.5rem; }

.page-sitemap-section-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #2e7d52 0%, #4a6b53 60%, #558060 100%);
  padding: 0.625rem 1rem;
  border-radius: 0.35rem 0.35rem 0 0;
  margin: 0;
  line-height: 1.5;
}

.page-sitemap-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #fff;
  border: 0.09375rem solid #c8e0cf;
  border-top: none;
  border-radius: 0 0 0.35rem 0.35rem;
}
.page-sitemap-list li { border-bottom: 0.0625rem solid #e0ecdd; }
.page-sitemap-list li:last-child { border-bottom: none; }

.page-sitemap-list a {
  display: block;
  padding: 0.65rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  color: #1f5f3f;
  transition: background 0.15s, color 0.15s;
}
.page-sitemap-list a:hover,
.page-sitemap-list a:focus-visible {
  background: #eaf5ec;
  color: #0f3d24;
  outline: 0.125rem solid #2e7d52;
  outline-offset: -0.125rem;
}
.page-sitemap-list a[aria-current="page"] {
  background: #f0f4f5;
  color: #1a3a52;
  cursor: default;
}
.page-sitemap-list a[aria-current="page"]:hover,
.page-sitemap-list a[aria-current="page"]:focus-visible {
  outline: none;
  background: #f0f4f5;
  color: #1a3a52;
}

/* 手機版微調 */
@media (max-width: 640px) {
  .page-sitemap { padding: 1.25rem 0.75rem 2.5rem; }
  .page-sitemap-title { font-size: 1.5rem; }
  .page-sitemap-section-title { font-size: 1rem; padding: 0.5rem 0.85rem; }
  .page-sitemap-list a { padding: 0.6rem 0.85rem; }
}

/* ═══════════════════════════════════════════════════
   錯誤頁面（Shared/Error.cshtml；500 例外 + 404/403/410 共用）
   ─ 配色沿用 Home 首頁綠色系；卡片式版面；符合 WCAG 2.1 AA
   AA 驗證：
     status 大字   #2e7d52 on #fdfdfb  →  5.34:1  ✓✓
     h1 標題      #1a3a52 on #fdfdfb  → 12.19:1  ✓✓✓
     內文        #333    on #fdfdfb  → 12.13:1  ✓✓✓
     連結        #1f5f3f on #fdfdfb  →  7.35:1  ✓✓✓
   ═══════════════════════════════════════════════════ */
.page-error {
  background: #fff;
  min-height: 60vh;
  padding: 3rem 1rem 4rem;
  color: #222;
}
.page-error-container { max-width: 640px; margin: 0 auto; }

.page-error-card {
  padding: 2rem 1.75rem 2.25rem;
  border: 0.125rem solid #c8e0cf;
  border-radius: 0.75rem;
  background: #fdfdfb;
  text-align: center;
  box-shadow: 0 0.125rem 0.5rem rgba(46, 125, 82, 0.08);
}

.page-error-status {
  font-size: 4rem;
  font-weight: 800;
  color: #2e7d52;
  margin: 0;
  line-height: 1;
  letter-spacing: 0.05em;
}

.page-error-title {
  font-size: 1.75rem;
  color: #1a3a52;
  margin: 0.75rem 0 1rem;
  line-height: 1.4;
}

.page-error-message {
  font-size: 1.0625rem;
  color: #333;
  line-height: 1.85;
  margin: 0 0 1.5rem;
}

.page-error-meta {
  display: inline-block;
  text-align: left;
  margin: 0.5rem 0 1.5rem;
  padding: 0.75rem 1rem;
  background: #f5f9f4;
  border: 0.0625rem solid #d0e0d3;
  border-radius: 0.375rem;
  font-size: 0.9375rem;
  color: #333;
  line-height: 1.7;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.page-error-meta-row { margin-bottom: 0.25rem; }
.page-error-meta-row:last-child { margin-bottom: 0; }
.page-error-meta-label {
  display: inline-block;
  color: #1a3a52;
  font-weight: 700;
  min-width: 5rem;
  margin-right: 0.5rem;
}
.page-error-meta-value {
  font-family: "Consolas", "Menlo", "Courier New", monospace;
  color: #1f5f3f;
  background: #fff;
  padding: 0.0625rem 0.375rem;
  border-radius: 0.1875rem;
  border: 0.0625rem solid #d0e0d3;
  font-size: 0.875rem;
}

.page-error-contact {
  font-size: 0.9375rem;
  color: #333;
  margin: 0 0 1.5rem;
  line-height: 1.7;
}
.page-error-contact a {
  color: #1f5f3f;
  text-decoration: underline;
  text-underline-offset: 0.125rem;
}
.page-error-contact a:hover,
.page-error-contact a:focus-visible {
  color: #0f3d24;
  text-decoration-thickness: 0.125rem;
}

.page-error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
.page-error-btn {
  display: inline-block;
  min-width: 8rem;
  padding: 0.625rem 1.25rem;
  color: #1f5f3f;
  background: #fff;
  border: 0.125rem solid #2e7d52;
  border-radius: 0.375rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.page-error-btn:hover,
.page-error-btn:focus-visible {
  background: #eaf5ec;
  color: #0f3d24;
  outline: 0.125rem solid #2e7d52;
  outline-offset: 0.125rem;
}
.page-error-btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #2e7d52 0%, #558060 100%);
  border-color: #2e7d52;
}
.page-error-btn--primary:hover,
.page-error-btn--primary:focus-visible {
  color: #fff;
  background: linear-gradient(135deg, #256a44 0%, #4a7057 100%);
  outline-color: #1a3a52;
}

@media (max-width: 640px) {
  .page-error { padding: 1.75rem 0.75rem 2.5rem; }
  .page-error-card { padding: 1.5rem 1.25rem; }
  .page-error-status { font-size: 3rem; }
  .page-error-title { font-size: 1.375rem; }
  .page-error-message { font-size: 1rem; }
  .page-error-btn { flex: 1 1 100%; min-width: 0; }
}

/* ── 探索館問卷首頁彈窗（commit #296）：固定置中，點插圖連到 Home/ExploreSurvey；24h 內只彈一次 ── */
.survey-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1200;
}
.survey-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 2rem);
  max-width: 30rem;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.25);
  z-index: 1210;
  overflow: hidden;
}
.survey-modal__close {
  position: absolute;
  top: 0.375rem;
  right: 0.5rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  background: transparent;
  border: none;
  color: #4a3c31;
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}
.survey-modal__close:hover,
.survey-modal__close:focus-visible {
  color: #c0392b;
  outline: 0.1875rem solid rgba(192, 57, 43, 0.3);
  outline-offset: 0.125rem;
  border-radius: 0.25rem;
}
.survey-modal__link {
  display: block;
  line-height: 0;
}
.survey-modal__link:focus-visible {
  outline: 0.1875rem solid #2e7d52;
  outline-offset: -0.1875rem;
}
.survey-modal__img {
  display: block;
  width: 100%;
  height: auto;
}

/* ── 探索館問卷送出鈕（landing 開始 + Detail 送出）；視覺與 Home/Index 搜尋按鈕一致 ── */
.survey-submit-btn {
  background: #4A8250;
  color: #ffffff;
  border: 0.09375rem solid #4a3c31;
  border-radius: 0.25rem;
  padding: 0.625rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0.125rem 0.125rem 0 #4a3c31;
  transition: all 0.2s;
}
.survey-submit-btn:hover,
.survey-submit-btn:focus-visible {
  background: #e5b821;
  color: #4a3c30;
  transform: translate(-0.0625rem, -0.0625rem);
  box-shadow: 0.1875rem 0.1875rem 0 #4a3c31;
  outline: 0.1875rem solid rgba(74, 60, 49, 0.25);
  outline-offset: 0.125rem;
}

/* ==============================
   環境歡樂探索前導頁（Home/GamePreview）
   以 .page-download 為容器沿用頁首/麵包屑樣式；卡片格線以 .page-gamepreview scope 客製
   每張卡片整塊為可點擊連結（提升觸控目標、無障礙）
================================= */

.page-gamepreview .game-grid-section {
  padding: 2rem 0 3rem;
}

.page-gamepreview .game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.5rem;
  max-width: 60rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.page-gamepreview .game-card {
  background: #ffffff;
  border: 0.0625rem solid #d0dce8;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.page-gamepreview .game-card:hover {
  transform: translateY(-0.25rem);
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.1);
}

/* WCAG 2.4.7 焦點指示：box-shadow 替代 outline 以避開 overflow:hidden 裁切問題；
   綠色實線 0.25rem + 米黃內襯 0.125rem，於白底 / 深底 / 圖片覆蓋情況下皆明顯可見 */
.page-gamepreview .game-card:focus-within {
  transform: translateY(-0.25rem);
  box-shadow:
    0 0 0 0.125rem #fdfaf2,
    0 0 0 0.3125rem #1f5f3f,
    0 0.25rem 1rem rgba(0, 0, 0, 0.1);
  outline: none;
}

/* 整張卡片為一個 <a> 連結 */
.page-gamepreview .game-card__link {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.page-gamepreview .game-card__link:hover,
.page-gamepreview .game-card__link:focus-visible {
  text-decoration: none;
  color: inherit;
}

/* 內層連結的 outline 關掉，交由父層 .game-card:focus-within 的 box-shadow 處理 */
.page-gamepreview .game-card__link:focus-visible {
  outline: none;
}

.page-gamepreview .game-card__thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f5efe0;
  overflow: hidden;
}

.page-gamepreview .game-card__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.page-gamepreview .game-card__title {
  margin: 0;
  padding: 1rem 1.5rem 1.25rem;
  color: #1a3a52;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}
