/* 草湖國小 70 週年校慶網站 — 共用樣式
   色彩：許願藤紫、福星黃、草湖綠、奶油白 */
:root {
  --wisteria: #6b3fa0;
  --wisteria-deep: #45266e;
  --wisteria-soft: #f1e9fa;
  --lilac: #b996e0;
  --sun: #f5c33b;
  --sun-soft: #fff4d1;
  --grass: #2f7d4a;
  --grass-soft: #e5f3e8;
  --gold: #b88a2c;
  --cream: #fffaf2;
  --paper: #ffffff;
  --ink: #2a2233;
  --muted: #6c6377;
  --line: #e8dff2;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(69, 38, 110, .10);
  --max: 1120px;
  --serif: "Noto Serif TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; display: block; }
a { color: var(--wisteria); }
a:hover { color: var(--wisteria-deep); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }

/* ---------- 頁首（照校方主視覺示意圖） ---------- */
.kv-top { position: relative; background: #fcf6fd; }
.kv-top-link { display: block; max-width: 1672px; margin-inline: auto; }
.kv-top-wide { width: 100%; height: auto; }
.kv-top-narrow { display: none; }

.nav-toggle {
  display: none; border: 1px solid #d9c6ea; background: #fff;
  border-radius: 10px; padding: 8px 14px; font: inherit; font-weight: 700; color: var(--wisteria-deep); cursor: pointer;
}
.site-nav { background: linear-gradient(180deg, #8150a0, #7b4395 55%, #723c8d); box-shadow: 0 2px 0 rgba(0, 0, 0, .06); }
.site-nav ul {
  list-style: none; display: flex; justify-content: center; align-items: center;
  max-width: 1672px; margin: 0 auto; padding: 0 8px;
}
.site-nav li { display: flex; align-items: center; }
.site-nav li + li::before { content: ""; width: 1.5px; height: 18px; background: rgba(255, 255, 255, .55); }
.site-nav a {
  display: flex; align-items: center; gap: 6px;
  padding: clamp(9px, .85vw, 14px) clamp(8px, 1.15vw, 22px);
  text-decoration: none; color: #fff; font-weight: 500;
  font-size: clamp(14px, 1.2vw, 20px); letter-spacing: .03em; white-space: nowrap;
}
.site-nav a svg { width: 1.3em; height: 1.3em; }
.site-nav a:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.site-nav a[aria-current="page"] { background: rgba(255, 255, 255, .2); box-shadow: inset 0 -3px 0 var(--sun); color: #fff; }

@media (max-width: 1023px) {
  .kv-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 16px; background: #fff; }
  .kv-top-link { margin: 0; flex: 1 1 auto; max-width: 340px; }
  .kv-top-wide { display: none; }
  .kv-top-narrow { display: block; width: 100%; height: auto; }
  .nav-toggle { display: block; flex: none; }
  .site-nav { display: none; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 6px 0 10px; }
  .site-nav li + li::before { display: none; }
  .site-nav a { padding: 12px 20px; font-size: 16px; border-top: 1px solid rgba(255, 255, 255, .12); }
}

/* ---------- 首頁主視覺（示意圖＋真實倒數與連結） ---------- */
.kv { background: #fbf5fd; }
.kv-stage { position: relative; max-width: 1672px; margin-inline: auto; container-type: inline-size; }
.kv-stage > picture img { width: 100%; height: auto; }
.kv-num {
  position: absolute; top: 50.25%; height: 7.05%; width: 3.83%;
  display: grid; place-items: center;
  background: linear-gradient(180deg, #8a4fa6, #7a4197 70%, #6f3a8b);
  border-radius: .55cqw; color: #fff;
  font-weight: 700; font-size: 2.05cqw; line-height: 1; font-variant-numeric: tabular-nums;
  box-shadow: 0 .15cqw .3cqw rgba(80, 30, 110, .25);
}
.kv-num[data-countdown-part="d"] { left: 75.60%; }
.kv-num[data-countdown-part="h"] { left: 80.74%; }
.kv-num[data-countdown-part="m"] { left: 85.83%; }
.kv-num[data-countdown-part="s"] { left: 90.97%; }
.kv-count-link { position: absolute; left: 74.2%; top: 37.4%; width: 22.6%; height: 22.3%; border-radius: 1.2cqw; }
.kv-cards { list-style: none; margin: 0; padding: 0; }
.kv-cards a { position: absolute; top: 66.12%; height: 18.89%; border-radius: 1.1cqw; transition: box-shadow .15s, background-color .15s; }
.kv-cards a img { display: none; }
.kv-cards a:hover, .kv-count-link:hover { background: rgba(255, 255, 255, .16); box-shadow: 0 0 0 .25cqw rgba(123, 67, 149, .55), 0 .6cqw 1.4cqw rgba(80, 30, 110, .18); }
.kv-cards li:nth-child(1) a { left: 4.19%; width: 11.48%; }
.kv-cards li:nth-child(2) a { left: 16.51%; width: 11.12%; }
.kv-cards li:nth-child(3) a { left: 28.35%; width: 10.65%; }
.kv-cards li:nth-child(4) a { left: 39.71%; width: 10.29%; }
.kv-cards li:nth-child(5) a { left: 50.60%; width: 10.53%; }
.kv-cards li:nth-child(6) a { left: 61.72%; width: 10.77%; }
.kv-cards li:nth-child(7) a { left: 73.09%; width: 11.12%; }
.kv-cards li:nth-child(8) a { left: 84.81%; width: 11.24%; }
.kv-mobile { display: none; }

@media (max-width: 899px) {
  .kv-num, .kv-count-link { display: none; }
  .kv-mobile { display: block; padding: 16px 16px 4px; }
  .kv-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 12px 16px 20px; }
  .kv-cards li:nth-child(n) a { position: static; width: auto; height: auto; display: block; border-radius: 14px; overflow: hidden; box-shadow: 0 4px 12px rgba(80, 30, 110, .10); }
  .kv-cards a img { display: block; width: 100%; height: auto; }
}
@media (max-width: 559px) { .kv-cards { grid-template-columns: repeat(2, 1fr); } }

.kv-countdown {
  background: #fff; border-radius: 18px; padding: 16px 18px; text-align: center;
  box-shadow: 0 8px 22px rgba(80, 30, 110, .12); border: 1px solid #efe3f6;
}
.kv-countdown .t { display: flex; justify-content: center; align-items: center; gap: 8px; font-weight: 700; color: #3c2a4d; }
.kv-countdown .t svg { width: 22px; height: 22px; color: #7b4395; }
.kv-countdown .d { font-weight: 700; font-size: 22px; color: #2d2340; margin: 2px 0 10px; }
.kv-countdown .d small { font-size: 15px; font-weight: 500; }
.kv-countdown .boxes { display: flex; justify-content: center; align-items: end; gap: 6px; }
.kv-countdown .boxes b {
  min-width: 48px; padding: 6px 4px; border-radius: 10px; color: #fff; font-size: 26px; line-height: 1.1;
  background: linear-gradient(180deg, #8a4fa6, #7a4197 70%, #6f3a8b); font-variant-numeric: tabular-nums;
}
.kv-countdown .boxes span { font-size: 13px; color: #3c2a4d; margin-right: 4px; }

/* ---------- 頁面標頭 ---------- */
.page-head {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--wisteria-deep), var(--wisteria) 60%, #8a5cc0);
  color: #fff; padding: 48px 0 56px;
}
.page-head h1 { font-family: var(--serif); font-size: clamp(28px, 5vw, 44px); margin: 6px 0 8px; letter-spacing: .06em; }
.page-head p { margin: 0; max-width: 40em; opacity: .92; }
.eyebrow { display: inline-block; font-size: 13px; letter-spacing: .2em; color: var(--sun); font-weight: 700; }
.page-head .vine, .hero .vine { position: absolute; top: 0; right: 4%; width: 180px; opacity: .9; pointer-events: none; z-index: 0; }
.page-head .wrap, .hero .wrap { position: relative; z-index: 1; }
@media (max-width: 640px) {
  .page-head .vine, .hero .vine { width: 110px; right: 0; opacity: .45; }
}

/* ---------- 首頁主視覺 ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    linear-gradient(100deg, rgba(55, 28, 92, .92) 0%, rgba(84, 46, 130, .78) 42%, rgba(84, 46, 130, .15) 78%),
    url("img/campus.jpg") center 40% / cover no-repeat;
  padding: clamp(56px, 10vw, 112px) 0 clamp(64px, 10vw, 120px);
}
.hero h1 {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(38px, 8vw, 76px); line-height: 1.15;
  margin: 10px 0 14px; letter-spacing: .06em;
  text-shadow: 0 4px 24px rgba(0, 0, 0, .25);
}
.hero h1 .dot { color: var(--sun); }
.hero .lead { font-size: clamp(17px, 2.4vw, 21px); margin: 0 0 6px; }
.hero .sub { opacity: .88; margin: 0 0 28px; }
.badge-70 {
  display: inline-flex; align-items: baseline; gap: 8px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .35);
  padding: 6px 16px; border-radius: 999px; font-size: 14px; letter-spacing: .12em;
}
.badge-70 b { font-family: var(--serif); color: var(--sun); font-size: 22px; letter-spacing: 0; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 700; text-decoration: none;
  border: 0; cursor: pointer; font: inherit; font-weight: 700;
}
.btn-sun { background: var(--sun); color: var(--wisteria-deep); }
.btn-sun:hover { background: #ffd35e; color: var(--wisteria-deep); }
.btn-ghost { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .5); }
.btn-ghost:hover { background: rgba(255, 255, 255, .24); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- 倒數 ---------- */
.countdown-card {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  border-top: 5px solid var(--sun);
}
.countdown-card .label { font-weight: 700; color: var(--wisteria-deep); }
.countdown-card .label small { display: block; font-weight: 400; color: var(--muted); }
.countdown { display: flex; gap: 10px; }
.countdown div {
  min-width: 68px; text-align: center; background: var(--wisteria-soft);
  border-radius: 14px; padding: 8px 6px;
}
.countdown b { display: block; font-family: var(--serif); font-size: 32px; line-height: 1.1; color: var(--wisteria); font-variant-numeric: tabular-nums; }
.countdown span { font-size: 13px; color: var(--muted); }
.countdown-done { font-family: var(--serif); font-size: 22px; color: var(--wisteria); font-weight: 700; }
.lift { margin-top: -44px; position: relative; z-index: 2; }

/* ---------- 區塊 ---------- */
section.block { padding: 56px 0; }
section.block.tint { background: var(--wisteria-soft); }
section.block.sun { background: var(--sun-soft); }
.block-title { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.block-title h2 { font-family: var(--serif); font-size: clamp(24px, 3.6vw, 32px); margin: 0; letter-spacing: .05em; }
.block-title h2::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--sun); margin-right: 12px; vertical-align: middle; box-shadow: 16px 0 0 var(--lilac); margin-right: 30px; }
.block-title p { margin: 4px 0 0; color: var(--muted); }
.more { font-weight: 700; text-decoration: none; white-space: nowrap; }

/* ---------- 快捷入口 ---------- */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.quick a {
  display: grid; gap: 6px; padding: 22px; border-radius: var(--radius);
  background: var(--paper); text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); transition: transform .15s, box-shadow .15s;
}
.quick a:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.quick .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.quick .ic svg { width: 24px; height: 24px; }
.quick strong { font-size: 17px; }
.quick small { color: var(--muted); }
@media (max-width: 860px) { .quick { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .quick a { padding: 16px; } }

/* ---------- 消息列表 ---------- */
.news-list { display: grid; gap: 12px; }
.news-item {
  display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: start;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px;
}
.news-item.has-img { grid-template-columns: 120px 1fr 160px; }
.news-date { font-family: var(--serif); color: var(--wisteria); font-weight: 700; }
.news-date small { display: block; font-family: var(--sans); font-weight: 400; color: var(--muted); font-size: 12px; }
.news-item h3 { margin: 0 0 4px; font-size: 18px; }
.news-item p { margin: 0; color: var(--muted); white-space: pre-line; }
.news-item .pin { display: inline-block; background: var(--sun); color: var(--wisteria-deep); font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 6px; margin-right: 8px; vertical-align: 2px; }
.news-item img { border-radius: 10px; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.news-item .link { display: inline-block; margin-top: 6px; font-weight: 700; }
@media (max-width: 640px) {
  .news-item, .news-item.has-img { grid-template-columns: 1fr; gap: 6px; }
  .news-item.has-img img { order: -1; }
}
.empty { text-align: center; color: var(--muted); padding: 32px; background: var(--paper); border-radius: 14px; border: 1px dashed var(--line); }

/* ---------- 七喜卡片 ---------- */
.joys { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.joy {
  position: relative; background: var(--paper); border-radius: var(--radius); padding: 24px 22px 22px;
  border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; overflow: hidden;
}
.joy::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--c, var(--wisteria)); }
.joy .num {
  font-family: var(--serif); font-weight: 900; font-size: 15px; letter-spacing: .1em;
  color: var(--c, var(--wisteria));
}
.joy h3 { margin: 0; font-family: var(--serif); font-size: 22px; }
.joy .when { font-size: 14px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.joy p { margin: 4px 0 0; }
.joy .detail { color: var(--muted); font-size: 15px; }
.joy-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.joy-strip a {
  flex: 0 0 180px; scroll-snap-align: start; text-decoration: none; color: var(--ink);
  background: var(--paper); border-radius: 16px; padding: 18px; border: 1px solid var(--line);
  border-top: 5px solid var(--c);
}
.joy-strip a:hover { box-shadow: var(--shadow); color: var(--ink); }
@media (min-width: 1000px) {
  .joy-strip { display: grid; grid-template-columns: repeat(7, 1fr); overflow: visible; }
  .joy-strip a { padding: 16px 14px; }
}
.joy-strip .num { font-family: var(--serif); font-weight: 900; color: var(--c); font-size: 14px; }
.joy-strip strong { display: block; font-family: var(--serif); font-size: 19px; margin: 2px 0; }
.joy-strip small { color: var(--muted); }

/* ---------- 時間軸 ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 86px; top: 8px; bottom: 8px; width: 3px; background: var(--line); border-radius: 3px; }
.timeline li { display: grid; grid-template-columns: 72px 1fr; gap: 34px; padding: 10px 0; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 80px; top: 20px; width: 15px; height: 15px; border-radius: 50%; background: var(--paper); border: 3px solid var(--wisteria); }
.timeline li.key::before { background: var(--sun); border-color: var(--gold); }
.timeline time { font-family: var(--serif); font-weight: 700; color: var(--wisteria); font-size: 18px; text-align: right; font-variant-numeric: tabular-nums; }
.timeline .ev { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.timeline .ev strong { display: block; font-size: 17px; }
.timeline .ev span { color: var(--muted); font-size: 15px; }
@media (max-width: 520px) {
  .timeline::before { left: 62px; }
  .timeline li { grid-template-columns: 52px 1fr; gap: 26px; }
  .timeline li::before { left: 56px; }
  .timeline time { font-size: 15px; }
}

/* ---------- 一般卡片 / 版面 ---------- */
.grid-2 { display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; align-items: start; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.card h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 20px; }
.card p { margin: 0; }
.card + .card { margin-top: 16px; }
.tag { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--grass-soft); color: var(--grass); }
.tag.purple { background: var(--wisteria-soft); color: var(--wisteria); }
.invite { border-radius: var(--radius); box-shadow: var(--shadow); border: 6px solid var(--paper); }
.pre-events { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.pre-events .card time { font-family: var(--serif); font-weight: 700; color: var(--wisteria); font-size: 18px; }

.service-group { margin-bottom: 32px; }
.service-group h2 { font-family: var(--serif); font-size: 24px; margin: 0 0 14px; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.service-grid .card p { white-space: pre-line; color: var(--muted); }

/* ---------- 對聯 ---------- */
/* 迎賓門：橫批在上、上聯在右、下聯在左，中間是校園照片 */
.gate {
  --gate-h: clamp(340px, 56vw, 600px);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "top top top" "left door right"; align-items: center;
  gap: clamp(8px, 2vw, 22px); max-width: 1000px; margin: 0 auto;
}
/* 對聯直接使用學校提供的原圖，不另外排字 */
.gate-line {
  display: block; height: var(--gate-h); width: auto; max-width: none;
  border-radius: 4px; box-shadow: 0 10px 24px rgba(143, 22, 34, .25);
}
/* 門楣：顏色與花飾取自對聯原圖 */
.gate-top {
  grid-area: top; position: relative; display: flex; align-items: center; justify-content: center;
  gap: clamp(14px, 5vw, 64px); min-height: clamp(58px, 8vw, 92px); padding: 6px clamp(52px, 10vw, 120px);
  background: url("img/couplet-flower.png") left center / auto 100% no-repeat,
              url("img/couplet-flower.png") right center / auto 100% no-repeat,
              linear-gradient(180deg, #cc1226, #b80f24);
  border: 3px solid #d9b25c; border-radius: 4px; box-shadow: 0 10px 24px rgba(143, 22, 34, .25);
}
.gate-top span, .gate-top b {
  font-family: var(--serif); font-weight: 900; color: #120404; line-height: 1;
  -webkit-text-stroke: 1px #e2c27a; paint-order: stroke fill;
  text-shadow: 0 0 2px #e2c27a;
}
.gate-top span { font-size: clamp(20px, 3.6vw, 40px); letter-spacing: .12em; }
.gate-top b {
  font-size: clamp(36px, 6.4vw, 72px); letter-spacing: 0;
  color: #f5cf63; -webkit-text-stroke: 1.5px #7a4b06; text-shadow: 0 3px 6px rgba(0, 0, 0, .25);
}
.gate-right { grid-area: right; }
.gate-left { grid-area: left; }
.gate-door {
  grid-area: door; position: relative; height: calc(var(--gate-h) * .9);
  border-radius: 14px; overflow: hidden; box-shadow: 0 14px 32px rgba(70, 40, 100, .22);
}
.gate-door img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gate-door::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(60, 30, 90, .05) 30%, rgba(60, 30, 90, .78));
}
.gate-text {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; color: #fff;
  padding: clamp(16px, 3vw, 32px); text-align: center;
}
.gate-eyebrow { font-size: 12px; letter-spacing: .25em; color: var(--sun); font-weight: 700; }
.gate-text strong { display: block; font-family: var(--serif); font-size: clamp(26px, 4.4vw, 44px); letter-spacing: .12em; margin: 4px 0 6px; }
.gate-text p { margin: 0 0 14px; font-size: clamp(14px, 1.8vw, 17px); opacity: .95; }
@media (max-width: 560px) {
  .gate-text .btn { padding: 8px 14px; font-size: 14px; }
  .gate { --gate-h: 360px; gap: 8px; }
  .gate-top { padding: 4px 48px; gap: 10px; min-height: 52px; background-size: 44px auto, 44px auto, auto; }
  .gate-top span { letter-spacing: .04em; font-size: 17px; }
  .gate-top b { font-size: 32px; }
}

/* ---------- 活動海報 ---------- */
.posters { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.posters a, .joy-posters a { display: block; color: var(--ink); text-decoration: none; }
.posters img, .joy-posters img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top;
  border-radius: 10px; box-shadow: var(--shadow); transition: transform .2s;
}
.posters a:hover img, .joy-posters a:hover img { transform: translateY(-3px); }
.posters span { display: block; margin-top: 8px; font-size: 15px; font-weight: 700; }
.joy-posters { display: flex; gap: 10px; margin-top: 12px; }
.joy-posters a { width: 92px; }
.joy-posters span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.card-poster { display: block; margin: -4px 0 12px; }
.card-poster img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; border-radius: 10px; }
#soon-poster img { aspect-ratio: auto; max-width: 420px; }

/* ---------- 七十年・草湖故事（時間軸） ---------- */
.story-line { list-style: none; margin: 0 auto; padding: 0; max-width: 860px; position: relative; }
.story-line::before { content: ""; position: absolute; left: 118px; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: linear-gradient(var(--wisteria), var(--sun), var(--grass)); }
.story-item { display: grid; grid-template-columns: 96px 1fr; gap: 40px; margin-bottom: 26px; position: relative; }
.story-item::before { content: ""; position: absolute; left: 111px; top: 10px; width: 17px; height: 17px; border-radius: 50%; background: var(--sun); border: 3px solid var(--wisteria); box-sizing: border-box; }
.story-year { font-family: var(--serif); font-weight: 900; color: var(--wisteria); font-size: 18px; text-align: right; line-height: 1.3; padding-top: 4px; word-break: keep-all; }
.story-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.story-card > div { padding: 16px 20px; }
.story-card h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 21px; }
.story-card p { margin: 0; color: var(--muted); white-space: pre-line; }
.story-card img { width: 100%; max-height: 420px; object-fit: cover; display: block; }
@media (max-width: 560px) {
  .story-line::before { left: 8px; }
  .story-item { grid-template-columns: 1fr; gap: 6px; padding-left: 30px; }
  .story-item::before { left: 1px; top: 6px; }
  .story-year { text-align: left; }
}

/* ---------- 幸福藝廊 ---------- */
.album { margin-bottom: 36px; }
.album h2 { font-family: var(--serif); font-size: clamp(22px, 3vw, 28px); margin: 0 0 14px; }
.album h2 small { font-family: var(--sans, inherit); font-size: 14px; color: var(--muted); font-weight: 400; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.album-grid a { display: block; border-radius: 10px; overflow: hidden; background: #eee; }
.album-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s; }
.album-grid a:hover img { transform: scale(1.04); }
@media (max-width: 560px) { .album-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; } }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 94vh; overflow: visible; }
.lightbox::backdrop { background: rgba(20, 8, 30, .85); }
.lightbox img { max-width: 100%; max-height: 84vh; border-radius: 8px; display: block; margin: 0 auto; }
.lb-cap { color: #fff; text-align: center; margin: 10px 0 0; }
.lb-close { position: absolute; top: -44px; right: 0; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #fff; font-size: 26px; line-height: 1; cursor: pointer; }

/* ---------- 篩選按鈕 ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filters button {
  font: inherit; border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  border-radius: 999px; padding: 6px 16px; cursor: pointer;
}
.filters button[aria-pressed="true"] { background: var(--wisteria); border-color: var(--wisteria); color: #fff; }

/* ---------- 頁尾 ---------- */
.site-footer { background: var(--wisteria-deep); color: #e9defa; padding: 40px 0 28px; margin-top: 24px; }
.site-footer .wrap { display: grid; gap: 12px; }
.site-footer strong { color: #fff; font-family: var(--serif); font-size: 18px; letter-spacing: .05em; }
.site-footer a { color: var(--sun); }
.site-footer .slogan { color: var(--sun); letter-spacing: .1em; }
.site-footer small { opacity: .75; }

.note { font-size: 14px; color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* 後台「網站文字」有換行時保留換行 */
.pre { white-space: pre-line; }

/* 專區頁按鈕；深色頁首裡的連結用亮色 */
.page-head p a { color: var(--sun); text-decoration: underline; word-break: break-all; }
.section-actions { margin-top: 18px; }
.btn-line { background: #fff; color: var(--wisteria); border: 2px solid var(--wisteria); }
.btn-line:hover { background: var(--wisteria); color: #fff; }
.invite-link { display: block; }

/* 加了 hidden 的元素一律隱藏（避免被 display 規則蓋掉） */
[hidden] { display: none !important; }

/* ---------- 草湖熊繪本 ---------- */
.book-entry {
  display: grid; gap: 4px; max-width: 860px; margin: 0 auto 36px; padding: 22px 26px; border-radius: var(--radius);
  background: linear-gradient(120deg, #fff6d9, #f3ebfb); border: 2px solid var(--sun); color: var(--ink); text-decoration: none;
  box-shadow: var(--shadow); transition: transform .2s;
}
.book-entry:hover { transform: translateY(-2px); color: var(--ink); }
.book-entry-k { font-size: 13px; font-weight: 700; letter-spacing: .12em; color: var(--wisteria); }
.book-entry strong { font-family: var(--serif); font-size: clamp(22px, 3.4vw, 30px); }
.book-entry-d { color: var(--muted); }
.book-entry-go { justify-self: start; margin-top: 8px; background: var(--wisteria); color: #fff; padding: 6px 16px; border-radius: 999px; font-weight: 700; font-size: 15px; }

.page-head .book-sub { font-family: var(--serif); font-size: clamp(18px, 2.6vw, 24px); margin-top: -4px; }
.page-head .book-by { font-size: 14px; opacity: .85; }
.book { max-width: 980px; margin: 0 auto; scroll-margin-top: 16px; }
.book-page {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: #fffdf8; border-radius: 18px; overflow: hidden;
  box-shadow: 0 18px 40px rgba(60, 30, 90, .16); border-top: 8px solid var(--c);
}
.book-art { margin: 0; background: color-mix(in srgb, var(--c) 14%, #fffdf8); display: grid; place-items: center; min-height: 340px; }
.book-art img { width: 100%; height: 100%; object-fit: cover; }
.book-art-empty { display: grid; justify-items: center; gap: 14px; }
.book-art-empty .seed {
  width: 96px; height: 120px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.7), transparent 40%), var(--c);
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--c) 18%, transparent), 0 0 40px color-mix(in srgb, var(--c) 45%, transparent);
}
.book-art-empty .no { font-family: var(--serif); font-weight: 700; color: var(--c); font-size: 18px; }
.book-text { padding: clamp(22px, 4vw, 40px); }
.book-no { font-size: 13px; font-weight: 700; letter-spacing: .1em; color: var(--c); }
.book-text h2 { font-family: var(--serif); font-size: clamp(24px, 3.2vw, 32px); margin: 4px 0 16px; line-height: 1.35; outline: none; }
.book-text p { margin: 0 0 10px; font-size: 17px; line-height: 1.95; }
.book-text p.gap { height: 6px; margin: 0; }
.book-motto { margin-top: 18px !important; padding: 12px 16px; border-radius: 12px; background: color-mix(in srgb, var(--c) 12%, #fff); font-family: var(--serif); font-weight: 700; }
.book-motto span { display: block; font-family: var(--sans, inherit); font-size: 12px; letter-spacing: .12em; color: var(--c); font-weight: 700; }
.book-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 8px; }
.book-nav .btn[disabled] { opacity: .35; pointer-events: none; }
.book-count { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 700; }
.book-toc { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.book-toc button {
  width: 100%; text-align: left; border: 1px solid var(--line, #e5ddef); background: #fff; border-left: 5px solid var(--c);
  border-radius: 10px; padding: 8px 12px; font: inherit; font-size: 14px; cursor: pointer; color: var(--ink);
}
.book-toc button span { display: block; font-size: 12px; color: var(--muted); }
.book-toc button[aria-current="true"] { background: color-mix(in srgb, var(--c) 12%, #fff); font-weight: 700; }
.book-back { margin-top: 28px; text-align: center; }
@media (max-width: 760px) {
  .book-page { grid-template-columns: minmax(0, 1fr); }
  .book-art { min-height: 200px; }
  .book-art-empty .seed { width: 64px; height: 80px; }
  .book-text p { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .book-entry { transition: none; } }

/* ---------- 草湖熊繪本：翻頁式閱讀 ---------- */
.fb { max-width: 1120px; margin: 0 auto; }
.fb-wide .fb-book {
  position: relative; aspect-ratio: 3 / 2; display: grid; grid-template-columns: 1fr 1fr; perspective: 2600px;
  background: #fffaee; border-radius: 6px; box-shadow: 0 24px 50px rgba(60, 30, 90, .22), 0 2px 0 rgba(0, 0, 0, .04);
}
.fb-half { border: 0; padding: 0; margin: 0; background: none; cursor: pointer; display: block; overflow: hidden; min-width: 0; }
.fb-half img, .fb-face img { width: 100%; height: 100%; display: block; object-fit: cover; }
.fb-left { border-radius: 6px 0 0 6px; }
.fb-right { border-radius: 0 6px 6px 0; }
.fb-half:focus-visible { outline: 3px solid var(--sun); outline-offset: -3px; }
.fb-spine {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 46px; margin-left: -23px; pointer-events: none; z-index: 2;
  background: linear-gradient(90deg, transparent 0, rgba(60, 40, 20, .08) 40%, rgba(60, 40, 20, .2) 50%, rgba(60, 40, 20, .08) 60%, transparent 100%);
}
.fb-leaf { position: absolute; top: 0; width: 50%; height: 100%; transform-style: preserve-3d; transition: transform .85s cubic-bezier(.45, .05, .3, 1); z-index: 3; pointer-events: none; }
.fb-leaf.go-next { left: 50%; transform-origin: left center; }
.fb-leaf.go-next.turning { transform: rotateY(-180deg); }
.fb-leaf.go-prev { left: 0; transform-origin: right center; }
.fb-leaf.go-prev.turning { transform: rotateY(180deg); }
.fb-face { position: absolute; inset: 0; overflow: hidden; background: #fffaee; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.fb-back { transform: rotateY(180deg); }
.fb-face::after { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .85s; pointer-events: none; }
.go-next .fb-front::after { background: linear-gradient(90deg, rgba(0, 0, 0, .28), transparent 60%); }
.go-prev .fb-front::after { background: linear-gradient(270deg, rgba(0, 0, 0, .28), transparent 60%); }
.turning .fb-front::after { opacity: 1; }

.fb-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.fb-bar .btn[disabled] { opacity: .35; pointer-events: none; }
.fb-where { display: grid; text-align: center; min-width: 0; }
.fb-label { font-family: var(--serif); font-size: 17px; }
.fb-count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fb-tools { text-align: center; margin-top: 10px; }
.fb-full { border: 0; background: none; color: var(--wisteria); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }
.fb-chapters { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; }
.fb-chapters button { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 14px; cursor: pointer; }
.fb-chapters button[aria-current="true"] { background: var(--wisteria); border-color: var(--wisteria); color: #fff; }

.fb:fullscreen { background: #2a2233; display: flex; flex-direction: column; justify-content: center; padding: 20px 24px; overflow: auto; }
.fb:fullscreen .fb-book { width: min(100%, calc((100vh - 170px) * 1.5)); margin: 0 auto; }
.fb:fullscreen .fb-label, .fb:fullscreen .fb-count, .fb:fullscreen .fb-full { color: #fff; }

.fb-narrow { perspective: 1400px; }
.fb-card { background: #fffaee; border-radius: 14px; overflow: hidden; box-shadow: 0 14px 32px rgba(60, 30, 90, .18); transition: transform .24s ease, opacity .24s ease; }
.fb-card.out-next, .fb-card.in-prev { transform: translateX(-36px) rotateY(14deg); opacity: 0; }
.fb-card.out-prev, .fb-card.in-next { transform: translateX(36px) rotateY(-14deg); opacity: 0; }
.fb-art { width: 100%; display: block; }
.fb-words { padding: 18px 18px 20px; }
.fb-words h2 { font-family: var(--serif); font-size: 26px; margin: 4px 0 6px; line-height: 1.35; }
.fb-words p { margin: 0 0 10px; font-size: 17px; line-height: 1.9; }
.fb-kicker { font-size: 13px !important; font-weight: 700; letter-spacing: .1em; color: var(--wisteria); margin-bottom: 6px !important; }
.fb-sub { font-family: var(--serif); font-size: 19px !important; }
.fb-pno { text-align: right; font-size: 13px !important; color: var(--muted); margin: 0 !important; }
.fb-note { font-size: 13px !important; color: var(--muted); line-height: 1.7 !important; }
.fb-card.is-back { background: #e8f2ec; text-align: center; }

.book-help { text-align: center; color: var(--muted); font-size: 14px; margin-top: 18px; }
@media (max-width: 899px) {
  .fb-bar { gap: 8px; }
  .fb-bar .btn { padding: 8px 12px; font-size: 15px; white-space: nowrap; flex: none; }
  .fb-label { font-size: 14px; line-height: 1.4; }
  .fb-tools { display: none; }
}

/* ---------- 繪本頁：七顆幸福種子 ---------- */
.seeds { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: clamp(20px, 5vw, 56px); align-items: center; }
.seeds-art { margin: 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.seeds-art img { width: 100%; height: auto; display: block; }
.seeds-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.seeds-list li { display: grid; grid-template-columns: 16px minmax(0, 1fr); column-gap: 12px; align-items: baseline; background: #fff; border-radius: 12px; padding: 10px 14px; color: var(--muted); }
.seeds-list li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--c); grid-row: 1 / span 2; align-self: center; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent); }
.seeds-list strong { display: block; color: var(--ink); font-family: var(--serif); font-size: 17px; }
@media (max-width: 760px) { .seeds { grid-template-columns: minmax(0, 1fr); } .seeds-art { max-width: 380px; margin: 0 auto; } }