/* =========================================================
   石門國小 第103屆畢業典禮 宣傳網站
   Mobile-first RWD ・ 啟程・感恩・祝福
   ========================================================= */

:root {
  --navy-900: #141d3b;
  --navy-800: #1d2a52;
  --navy-700: #283a72;
  --navy-600: #34488c;
  --gold: #f5b942;
  --gold-deep: #e09a1a;
  --coral: #ff7a6b;
  --paper: #fbf7ef;
  --paper-2: #f3ecdd;
  --ink: #20253a;
  --ink-soft: #4a5169;
  --white: #ffffff;
  --rainbow: linear-gradient(90deg, #ff5e6c, #ff9f43, #ffd23f, #2ecc71, #45aaf2, #7d5fff);

  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 4px 16px rgba(20, 29, 59, 0.08);
  --shadow-md: 0 12px 32px rgba(20, 29, 59, 0.12);
  --shadow-lg: 0 24px 60px rgba(20, 29, 59, 0.20);
  --maxw: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-sans: "Noto Sans TC", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-serif: "Noto Serif TC", "Noto Sans TC", serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
  font-size: clamp(15px, 0.9rem + 0.3vw, 17px);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; } /* 確保 hidden 屬性永遠生效（勝過元素自身的 display 設定） */
a { color: inherit; }
h1, h2, h3 { line-height: 1.3; margin: 0; font-weight: 900; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(18px, 5vw, 40px); }

/* 無障礙跳轉 */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--navy-800); color: #fff; padding: 10px 16px; border-radius: 10px;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* =========================================================
   導覽列
   ========================================================= */
.nav {
  position: sticky; top: 46px; z-index: 100; /* 緊貼常駐跑馬燈(46px)下方，一起固定 */
  background: rgba(20, 29, 59, 0.86);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
/* 沒有公開祝福、跑馬燈隱藏時，導覽列回到最頂端不留空隙 */
.topticker[hidden] + .nav { top: 0; }
.nav__inner {
  max-width: var(--maxw); margin-inline: auto;
  padding: 10px clamp(14px, 4vw, 28px);
  display: flex; align-items: center; gap: 12px;
}
.nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; flex-shrink: 0; }
.nav__logo { width: 40px; height: auto; flex-shrink: 0; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.nav__brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.nav__brand-school { font-weight: 900; font-size: 1.02rem; letter-spacing: .5px; }
.nav__brand-sub { font-size: .72rem; color: var(--gold); font-weight: 700; }

.nav__links {
  display: flex; gap: 2px; align-items: center;
  flex: 1 1 auto; min-width: 0;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav__links::-webkit-scrollbar { display: none; }

/* 導覽列常駐直播鈕（固定在右側，不隨連結捲動） */
.nav__live {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  background: #e8392f; color: #fff; text-decoration: none; white-space: nowrap;
  padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: .82rem;
  letter-spacing: .6px; box-shadow: 0 4px 14px rgba(232,57,47,.42);
  transition: background .2s, transform .2s;
}
.nav__live:hover { background: #d22b22; transform: translateY(-1px); }
.nav__live .btn__live-dot { width: 8px; height: 8px; }

/* 漢堡按鈕（手機顯示） */
.nav__toggle {
  display: none; flex-shrink: 0; width: 44px; height: 44px; padding: 0;
  border: 0; background: transparent; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav__toggle span { display: block; width: 24px; height: 2.5px; border-radius: 2px; background: #fff; transition: transform .3s var(--ease), opacity .2s; }
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.nav__links a {
  text-decoration: none; color: rgba(255, 255, 255, 0.82);
  font-size: .9rem; font-weight: 500; white-space: nowrap;
  padding: 8px 12px; border-radius: 999px; transition: background .2s, color .2s;
}
.nav__links a:hover, .nav__links a.is-active { background: rgba(245, 185, 66, 0.18); color: var(--gold); }

/* === 手機：漢堡下拉選單（取代橫向捲動，放在基礎 .nav__links 規則之後以正確覆蓋） === */
@media (max-width: 900px) {
  .nav__toggle { display: flex; }
  .nav__live { margin-left: auto; } /* 把 LIVE + 漢堡推到右側 */
  .nav__links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex: none; flex-direction: column; align-items: stretch; gap: 4px;
    background: rgba(20, 29, 59, 0.98);
    -webkit-backdrop-filter: saturate(150%) blur(12px); backdrop-filter: saturate(150%) blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.32);
    padding: 10px 14px 16px; max-height: 80vh; overflow-y: auto;
  }
  .nav.is-open .nav__links { display: flex; animation: navDrop .26s var(--ease); }
  .nav__links a {
    width: 100%; white-space: normal; padding: 14px 16px; border-radius: 12px; font-size: 1.02rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }
  .nav__links a:last-child { border-bottom: 0; }
}
@keyframes navDrop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative; isolation: isolate;
  min-height: min(100svh, 860px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: #fff; overflow: hidden;
  padding: clamp(70px, 12vh, 130px) clamp(18px, 5vw, 40px) clamp(90px, 14vh, 150px);
}
.hero__sky {
  position: absolute; inset: 0; z-index: -3;
  background:
    radial-gradient(120% 90% at 50% -10%, #3a4f9e 0%, #233268 38%, #16204a 72%, #101733 100%);
}
/* 星點 */
.hero__sky::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(255,255,255,.9), transparent),
    radial-gradient(1.5px 1.5px at 70% 20%, rgba(255,255,255,.7), transparent),
    radial-gradient(2px 2px at 40% 70%, rgba(255,255,255,.6), transparent),
    radial-gradient(1.5px 1.5px at 85% 60%, rgba(255,255,255,.8), transparent),
    radial-gradient(1.5px 1.5px at 10% 80%, rgba(255,255,255,.6), transparent),
    radial-gradient(2px 2px at 60% 85%, rgba(255,255,255,.5), transparent);
  opacity: .55; animation: twinkle 5s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .35; } to { opacity: .7; } }

/* 彩虹光弧（彩虹走廊意象） */
.hero__rainbow {
  position: absolute; left: 50%; bottom: -58%; transform: translateX(-50%);
  width: 160%; aspect-ratio: 1 / 1; max-width: 1400px; z-index: -2;
  border-radius: 50%;
  background:
    radial-gradient(closest-side,
      transparent 67%,
      rgba(125,95,255,.0) 67%,
      #7d5fff 70%, #45aaf2 74%, #2ecc71 78%, #ffd23f 82%, #ff9f43 86%, #ff5e6c 90%,
      transparent 92%);
  opacity: .28; filter: blur(2px);
}

/* 紙花 confetti */
.hero__confetti { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero__confetti span {
  position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px;
  opacity: .85; animation: fall linear infinite;
}
@keyframes fall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 0; }
  10% { opacity: .9; }
  100% { transform: translateY(108vh) rotate(540deg); opacity: 0; }
}

.hero__content { position: relative; max-width: 760px; animation: heroRise 1s var(--ease) both; }
@keyframes heroRise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

.hero__logo {
  width: clamp(84px, 22vw, 116px); height: auto; margin: 0 auto 18px;
  filter: drop-shadow(0 8px 22px rgba(0,0,0,.4));
  animation: logoPop 1s var(--ease) .15s both;
}
@keyframes logoPop { from { opacity: 0; transform: scale(.6) translateY(10px); } to { opacity: 1; transform: none; } }

.hero__school { font-size: clamp(.85rem, 2.6vw, 1.05rem); letter-spacing: 3px; color: rgba(255,255,255,.82); margin-bottom: 14px; font-weight: 500; }
.hero__eyebrow {
  display: inline-block; font-weight: 700; color: var(--navy-900);
  background: var(--gold); padding: 5px 16px; border-radius: 999px;
  font-size: clamp(.78rem, 2.4vw, .95rem); letter-spacing: 1px; margin-bottom: 18px;
}
.hero__title {
  font-family: var(--font-serif); font-weight: 900;
  font-size: clamp(3.2rem, 17vw, 7.5rem); letter-spacing: clamp(4px, 3vw, 18px);
  margin: 0; text-indent: clamp(4px, 3vw, 18px);
  background: linear-gradient(180deg, #fff 0%, #ffe9b8 60%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 24px rgba(0,0,0,.35));
}
.hero__slogan {
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(1.1rem, 5vw, 1.9rem); letter-spacing: 2px; margin-top: 6px;
  color: #fff;
}
.hero__lede { margin-top: 20px; color: rgba(255,255,255,.92); font-size: clamp(.95rem, 3.4vw, 1.12rem); line-height: 1.9; }

.hero__pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 26px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  padding: 8px 16px; border-radius: 999px; font-size: clamp(.82rem, 2.8vw, .95rem); font-weight: 500;
  backdrop-filter: blur(4px);
}
.pill__ico { font-size: 1.05em; }

/* 倒數 */
.countdown { margin-top: 32px; }
.countdown__label { font-size: .85rem; letter-spacing: 2px; color: rgba(255,255,255,.78); margin-bottom: 12px; }
.countdown__grid { display: flex; gap: clamp(8px, 2.5vw, 16px); justify-content: center; }
.countdown__box {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  border-radius: 16px; padding: clamp(10px, 3vw, 18px) clamp(8px, 3.5vw, 22px);
  min-width: clamp(58px, 18vw, 88px); backdrop-filter: blur(6px);
}
.countdown__num {
  display: block; font-family: var(--font-serif); font-weight: 900;
  font-size: clamp(1.8rem, 9vw, 3rem); color: var(--gold); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.countdown__unit { display: block; font-size: clamp(.72rem, 2.6vw, .85rem); color: rgba(255,255,255,.8); margin-top: 6px; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 34px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 28px; border-radius: 999px; font-weight: 700; text-decoration: none;
  font-size: clamp(.92rem, 3vw, 1.02rem); transition: transform .2s var(--ease), box-shadow .2s, background .2s;
  min-height: 48px;
}
.btn--primary { background: var(--gold); color: var(--navy-900); box-shadow: 0 10px 26px rgba(245,185,66,.4); }
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(245,185,66,.5); }
.btn--ghost { background: rgba(255,255,255,.1); color: #fff; border: 1.5px solid rgba(255,255,255,.5); }
.btn--ghost:hover { background: rgba(255,255,255,.2); transform: translateY(-3px); }
.btn--live { background: #e8392f; color: #fff; box-shadow: 0 10px 26px rgba(232,57,47,.45); gap: 9px; }
.btn--live:hover { background: #d22b22; transform: translateY(-3px); box-shadow: 0 16px 34px rgba(232,57,47,.55); }
.btn--wish { background: var(--coral); color: #fff; box-shadow: 0 10px 26px rgba(255,122,107,.42); }
.btn--wish:hover { background: #ff6450; transform: translateY(-3px); box-shadow: 0 16px 34px rgba(255,122,107,.52); }
.btn__live-dot {
  width: 10px; height: 10px; border-radius: 50%; background: #fff; flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(255,255,255,.7); animation: livePulse 1.4s ease-out infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,.7); }
  70% { box-shadow: 0 0 0 10px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

.hero__scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.55); border-radius: 14px;
  display: flex; justify-content: center;
}
.hero__scroll span {
  width: 4px; height: 8px; background: #fff; border-radius: 2px; margin-top: 7px;
  animation: scrollDot 1.6s ease-in-out infinite;
}
@keyframes scrollDot { 0%,100% { opacity: 0; transform: translateY(0); } 50% { opacity: 1; transform: translateY(8px); } }

/* =========================================================
   通用 Section
   ========================================================= */
.section { padding: clamp(56px, 9vw, 110px) 0; position: relative; scroll-margin-top: 110px; }
.section__title {
  font-family: var(--font-serif); font-size: clamp(1.7rem, 6vw, 2.8rem); text-align: center;
  color: var(--navy-800); position: relative; padding-bottom: 18px;
}
.section__title::after {
  content: ""; display: block; width: 64px; height: 5px; border-radius: 99px;
  background: var(--rainbow); margin: 16px auto 0;
}
.section__intro { text-align: center; color: var(--ink-soft); max-width: 620px; margin: 14px auto 0; }

/* =========================================================
   典禮資訊卡
   ========================================================= */
.section--info { background: var(--white); }
.info-cards {
  margin-top: clamp(34px, 6vw, 56px);
  display: grid; gap: clamp(14px, 3vw, 24px);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.info-card {
  background: linear-gradient(160deg, var(--paper) 0%, var(--white) 100%);
  border: 1px solid var(--paper-2); border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 34px) 22px; text-align: center; box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.info-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.info-card__ico {
  font-size: 2.4rem; width: 70px; height: 70px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: rgba(245,185,66,.16);
}
.info-card h3 { color: var(--gold-deep); font-size: 1rem; letter-spacing: 1px; }
.info-card__big { font-family: var(--font-serif); font-size: clamp(1.5rem, 5vw, 2rem); color: var(--navy-800); margin: 8px 0 6px; }
.info-card__sub { font-size: .88rem; color: var(--ink-soft); line-height: 1.6; }

/* 行事曆 / 分享 動作列 */
.action-bar {
  margin-top: clamp(24px, 4vw, 36px);
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
}
.action-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 18px; border-radius: 999px; min-height: 44px;
  font-size: .92rem; font-weight: 700; font-family: inherit; cursor: pointer;
  text-decoration: none; border: 1.5px solid var(--paper-2);
  background: var(--white); color: var(--navy-800);
  box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s, background .2s;
}
.action-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.action-btn--primary { background: var(--gold); border-color: var(--gold); color: var(--navy-900); }
.action-btn--primary:hover { background: #ffca5a; }
.action-btn--line { background: #06c755; border-color: #06c755; color: #fff; }
.action-btn--line:hover { background: #05b34c; }
.action-btn--fb { background: #1877f2; border-color: #1877f2; color: #fff; }
.action-btn--fb:hover { background: #1467d8; }

/* 複製 / 分享 toast */
.toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%) translateY(16px);
  z-index: 210; background: var(--navy-900); color: #fff;
  padding: 12px 22px; border-radius: 999px; font-size: .9rem; font-weight: 500;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; max-width: calc(100vw - 32px);
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =========================================================
   活動意義
   ========================================================= */
.section--meaning { background: var(--paper); }
.meaning-grid {
  margin-top: clamp(34px, 6vw, 54px); display: grid; gap: clamp(16px, 3vw, 28px);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.meaning-card {
  position: relative; background: var(--white); border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 44px) clamp(24px, 4vw, 38px); box-shadow: var(--shadow-sm);
  border: 1px solid var(--paper-2); overflow: hidden;
}
.meaning-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--rainbow);
}
.meaning-card__num {
  font-family: var(--font-serif); font-size: 3rem; font-weight: 900;
  color: rgba(52,72,140,.14); line-height: 1; margin-bottom: 6px;
}
.meaning-card h3 { color: var(--navy-800); font-size: clamp(1.15rem, 4vw, 1.5rem); margin-bottom: 12px; }
.meaning-card p { color: var(--ink-soft); }

/* =========================================================
   畢業週
   ========================================================= */
.section--week { background: var(--navy-800); color: #fff; }
.section--week .section__title { color: #fff; }
.section--week .section__intro { color: rgba(255,255,255,.78); }
.week-list { margin-top: clamp(34px, 6vw, 54px); display: flex; flex-direction: column; gap: 14px; }
.week-item {
  display: flex; gap: clamp(14px, 3vw, 26px); align-items: stretch;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); padding: clamp(16px, 3vw, 22px) clamp(16px, 3.5vw, 26px);
  transition: transform .25s var(--ease), background .25s;
}
.week-item:hover { transform: translateX(6px); background: rgba(255,255,255,.1); }
.week-item__date {
  flex-shrink: 0; display: flex; flex-direction: column; justify-content: center; align-items: center;
  min-width: clamp(82px, 24vw, 120px); text-align: center;
  border-right: 1px solid rgba(255,255,255,.15); padding-right: clamp(12px, 3vw, 22px);
}
.week-item__md { font-family: var(--font-serif); font-weight: 900; font-size: clamp(1.15rem, 5vw, 1.7rem); color: var(--gold); }
.week-item__md small { font-size: .7em; opacity: .8; }
.week-item__dow { font-size: .78rem; color: rgba(255,255,255,.7); margin-top: 2px; }
.week-item__body h3 { font-size: clamp(1rem, 4vw, 1.25rem); margin-bottom: 4px; }
.week-item__time { display: inline-block; font-size: .78rem; font-weight: 500; color: var(--navy-900); background: var(--gold); padding: 2px 10px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
.week-item__body p { color: rgba(255,255,255,.78); font-size: .9rem; }
.week-item--highlight { background: linear-gradient(120deg, rgba(245,185,66,.22), rgba(255,122,107,.18)); border-color: rgba(245,185,66,.5); }
.week-item--highlight .week-item__dow { color: rgba(255,255,255,.85); }

/* =========================================================
   典禮流程 timeline
   ========================================================= */
.section--program { background: var(--paper); }
.timeline { margin-top: clamp(36px, 6vw, 60px); position: relative; }
/* 中央線 */
.timeline::before {
  content: ""; position: absolute; left: 26px; top: 6px; bottom: 6px; width: 3px;
  background: linear-gradient(180deg, var(--gold), var(--coral), #45aaf2); border-radius: 99px;
}
.timeline__item { position: relative; padding-left: 64px; margin-bottom: 22px; }
.timeline__time {
  position: absolute; left: 0; top: 0; z-index: 2;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .76rem; color: var(--navy-800); box-shadow: var(--shadow-sm);
  font-variant-numeric: tabular-nums;
}
.timeline__card {
  background: var(--white); border: 1px solid var(--paper-2); border-radius: var(--radius);
  padding: 18px 22px; box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s;
}
.timeline__card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.timeline__card h3 { color: var(--navy-800); font-size: clamp(1.02rem, 4vw, 1.2rem); }
.timeline__card p { color: var(--ink-soft); margin-top: 6px; font-size: .92rem; }
.timeline__sub { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.timeline__sub li { position: relative; padding-left: 18px; color: var(--ink-soft); font-size: .9rem; }
.timeline__sub li::before { content: "•"; position: absolute; left: 2px; color: var(--gold-deep); font-weight: 900; }
.timeline__item--accent .timeline__time { background: var(--navy-800); border-color: var(--gold); color: var(--gold); }
.timeline__item--accent .timeline__card { border-color: var(--gold); background: linear-gradient(150deg, #fff 0%, #fff7e6 100%); }

/* 典禮當天：目前進行中的環節（由 script.js 依當下時間標記） */
.timeline__item--now .timeline__time {
  background: #e8392f; border-color: #e8392f; color: #fff;
  box-shadow: 0 0 0 0 rgba(232,57,47,.5); animation: nowPulse 1.6s ease-out infinite;
}
.timeline__item--now .timeline__card {
  border-color: #e8392f; background: linear-gradient(150deg, #fff 0%, #fff0ee 100%);
  box-shadow: 0 12px 30px rgba(232,57,47,.22);
}
.timeline__now-badge {
  display: inline-flex; align-items: center; gap: 6px; vertical-align: middle;
  margin-left: 8px; background: #e8392f; color: #fff; font-size: .68rem; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; letter-spacing: .5px;
}
.timeline__now-badge::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff;
  animation: livePulse 1.4s ease-out infinite;
}
@keyframes nowPulse {
  0% { box-shadow: 0 0 0 0 rgba(232,57,47,.5); }
  70% { box-shadow: 0 0 0 12px rgba(232,57,47,0); }
  100% { box-shadow: 0 0 0 0 rgba(232,57,47,0); }
}

/* 直播按鈕「回放」狀態（典禮結束後，去掉脈動、轉沉穩色） */
.btn--live.is-replay { background: var(--navy-700); box-shadow: 0 10px 26px rgba(40,58,114,.4); }
.btn--live.is-replay:hover { background: var(--navy-600); }
.nav__live.is-replay { background: var(--navy-700); box-shadow: 0 4px 14px rgba(40,58,114,.4); }
.btn--live.is-replay .btn__live-dot,
.nav__live.is-replay .btn__live-dot { animation: none; background: var(--gold); box-shadow: none; }

/* =========================================================
   校園巡禮路線
   ========================================================= */
.section--route { background: var(--white); }
/* 互動連線路線圖 */
.route-map {
  margin: clamp(34px, 6vw, 56px) auto 0; max-width: 580px; position: relative;
}
.route-map::before {
  content: ""; position: absolute; left: 27px; top: 18px; bottom: 18px; width: 4px;
  border-radius: 99px;
  background:
    repeating-linear-gradient(180deg, var(--navy-600) 0 10px, transparent 10px 20px);
  background-size: 100% 40px; animation: routeFlow 1.4s linear infinite;
}
@keyframes routeFlow { from { background-position: 0 0; } to { background-position: 0 40px; } }
.route-map__stop {
  display: flex; align-items: center; gap: 16px; padding: 7px 0; position: relative;
}
.route-map__node {
  flex-shrink: 0; width: 54px; height: 54px; border-radius: 50%;
  background: var(--navy-800); color: var(--gold); font-weight: 700; font-size: 1rem;
  display: flex; align-items: center; justify-content: center; z-index: 1;
  border: 4px solid var(--white); box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), background .25s;
}
.route-map__label {
  flex: 1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--paper); border: 1px solid var(--paper-2); border-radius: var(--radius);
  padding: 13px 18px; font-weight: 500; color: var(--ink); font-size: .96rem;
  box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s;
}
.route-map__stop:hover .route-map__node { transform: scale(1.12); }
.route-map__stop:hover .route-map__label { transform: translateX(6px); box-shadow: var(--shadow-md); }
.route-map__tag {
  font-size: .72rem; font-weight: 700; color: #fff; background: var(--navy-600);
  padding: 2px 10px; border-radius: 999px; letter-spacing: .5px;
}
.route-map__tag--end { background: var(--gold); color: var(--navy-900); }
.route-map__stop--start .route-map__node { background: var(--navy-600); }
.route-map__stop--end .route-map__node { background: var(--gold); color: var(--navy-900); font-size: 1.3rem; }
.route-map__stop--end .route-map__label {
  background: linear-gradient(120deg, rgba(245,185,66,.22), rgba(255,122,107,.16));
  border-color: rgba(245,185,66,.5); font-weight: 700; color: var(--navy-800);
}

/* 校園平面圖（可放大） */
.campus-map { margin: clamp(34px, 6vw, 52px) auto 0; max-width: 720px; text-align: center; }
.campus-map__btn {
  display: block; width: 100%; padding: 0; border: 1px solid var(--paper-2); cursor: zoom-in;
  background: var(--white); border-radius: var(--radius-lg); overflow: hidden; position: relative;
  box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s;
}
.campus-map__btn:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.campus-map__btn img { width: 100%; height: auto; display: block; }
.campus-map__zoom {
  position: absolute; right: 12px; bottom: 12px;
  background: rgba(20, 29, 59, .82); color: #fff; font-size: .82rem; font-weight: 700;
  padding: 7px 14px; border-radius: 999px; backdrop-filter: blur(4px);
}
.campus-map__cap { margin-top: 12px; font-size: .85rem; color: var(--ink-soft); }

/* Lightbox 放大檢視 */
.lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(10, 14, 30, .92);
  display: flex; align-items: flex-start; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox__scroll { width: 100%; height: 100%; overflow: auto; -webkit-overflow-scrolling: touch; padding: 56px 12px 24px; text-align: center; scrollbar-gutter: stable both-edges; }
.lightbox__img { display: block; max-width: none; width: min(1100px, 96%); height: auto; margin: 0 auto; border-radius: 10px; box-shadow: var(--shadow-lg); }
.lightbox__close {
  position: fixed; top: 14px; right: 16px; z-index: 2;
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.16); color: #fff; font-size: 1.7rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.lightbox__close:hover { background: rgba(255,255,255,.3); }

/* =========================================================
   典禮直播（站內嵌入）
   ========================================================= */
.section--live-embed { background: var(--navy-800); color: #fff; }
.section--live-embed .section__title { color: #fff; }
.section--live-embed .section__intro { color: rgba(255,255,255,.78); }
.live-stage { max-width: 860px; margin: clamp(30px, 5vw, 48px) auto 0; }
.live-stage__status {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 18px; font-size: clamp(.92rem, 3.2vw, 1.05rem); font-weight: 500;
  color: rgba(255,255,255,.92); text-align: center;
}
.live-stage__badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: #e8392f; color: #fff; font-weight: 700; font-size: .82rem; letter-spacing: 1px;
  padding: 5px 14px; border-radius: 999px;
}
.live-stage__badge::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff;
  animation: livePulse 1.4s ease-out infinite;
}
.live-stage__badge.is-replay { background: var(--navy-600); }
.live-stage__badge.is-replay::before { animation: none; background: var(--gold); }
.live-embed {
  position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-lg); background: var(--navy-900);
}
.live-embed__poster { width: 100%; height: 100%; object-fit: cover; }
.live-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.live-embed__play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(16, 23, 51, .42); border: 0; cursor: pointer; transition: background .25s;
}
.live-embed__play:hover { background: rgba(16, 23, 51, .25); }
.live-embed__play-ico {
  width: 84px; height: 84px; border-radius: 50%;
  background: rgba(232, 57, 47, .95); color: #fff; font-size: 2rem;
  display: flex; align-items: center; justify-content: center; padding-left: 6px;
  box-shadow: 0 10px 30px rgba(232,57,47,.5); transition: transform .25s var(--ease);
}
.live-embed__play:hover .live-embed__play-ico { transform: scale(1.08); }
.live-stage__external {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 18px;
  color: rgba(255,255,255,.85); text-decoration: none; font-weight: 500; font-size: .92rem;
  border-bottom: 1px dotted rgba(255,255,255,.5); padding-bottom: 1px;
}
.live-stage__external:hover { color: var(--gold); border-bottom-color: var(--gold); }
.live-stage { text-align: center; }

/* =========================================================
   畢業歌〈風箏〉MV 嵌入
   ========================================================= */
.section--song { background: var(--paper); }
.song-stage { max-width: 860px; margin: clamp(30px, 5vw, 48px) auto 0; text-align: center; }
.song-stage__external {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 18px;
  color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: .92rem;
  border-bottom: 1px dotted currentColor; padding-bottom: 1px; transition: color .2s, border-color .2s;
}
.song-stage__external:hover { color: var(--gold-deep); border-bottom-color: var(--gold-deep); }

/* =========================================================
   家長線上回條
   ========================================================= */
.section--rsvp { background: var(--white); }
.rsvp-wrap {
  max-width: 620px; margin: clamp(30px, 5vw, 46px) auto 0;
  background: var(--paper); border: 1px solid var(--paper-2); border-radius: var(--radius-lg);
  padding: clamp(24px, 5vw, 40px); box-shadow: var(--shadow-sm);
}
.rsvp-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.rsvp-field { display: flex; flex-direction: column; gap: 7px; }
.rsvp-field--full { grid-column: 1 / -1; }
.rsvp-field label { font-weight: 700; color: var(--navy-800); font-size: .92rem; }
.rsvp-req { color: #e8392f; }
.rsvp-field input,
.rsvp-field select,
.rsvp-field textarea {
  font-family: inherit; font-size: 1rem; color: var(--ink);
  background: var(--white); border: 1.5px solid var(--paper-2); border-radius: 12px;
  padding: 12px 14px; width: 100%; transition: border-color .2s, box-shadow .2s;
}
.rsvp-field input:focus,
.rsvp-field select:focus,
.rsvp-field textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245,185,66,.25);
}
.rsvp-field textarea { resize: vertical; min-height: 76px; }
.rsvp-submit {
  width: 100%; background: var(--gold); color: var(--navy-900); border: 0; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 1.05rem; padding: 15px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 10px 26px rgba(245,185,66,.4); transition: transform .2s var(--ease), box-shadow .2s, background .2s;
}
.rsvp-submit:hover:not(:disabled) { transform: translateY(-2px); background: #ffca5a; }
.rsvp-submit:disabled { opacity: .75; cursor: progress; }
.rsvp-submit:disabled::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2.5px solid rgba(20,29,59,.3); border-top-color: var(--navy-900);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.rsvp-note { margin-top: 10px; font-size: .8rem; color: var(--ink-soft); text-align: center; }
.rsvp-pending, .rsvp-done { text-align: center; padding: 18px 8px; }
.rsvp-pending__ico, .rsvp-done__ico { font-size: 2.6rem; display: block; margin-bottom: 10px; }
.rsvp-pending h3, .rsvp-done h3 { color: var(--navy-800); font-size: 1.2rem; margin-bottom: 8px; }
.rsvp-pending p, .rsvp-done p { color: var(--ink-soft); font-size: .95rem; }
.rsvp-again {
  margin-top: 18px; background: transparent; color: var(--navy-700); cursor: pointer;
  border: 1.5px solid var(--navy-600); border-radius: 999px; padding: 10px 22px;
  font-family: inherit; font-weight: 700; font-size: .95rem; transition: background .2s, color .2s;
}
.rsvp-again:hover { background: var(--navy-700); color: #fff; }

/* 畢業祝福置頂跑馬燈 */
.topticker {
  position: sticky; top: 0; z-index: 101; /* 常駐置頂，疊在導覽列上方 */
  display: flex; align-items: stretch; width: 100%; height: 46px; overflow: hidden;
  background: linear-gradient(90deg, var(--navy-900), var(--navy-700));
  color: #fff; text-decoration: none; border-bottom: 1px solid rgba(245, 185, 66, 0.3);
}
.topticker__label {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  background: var(--gold); color: var(--navy-900); font-weight: 900; font-size: .85rem;
  padding: 0 16px; letter-spacing: .5px; white-space: nowrap;
}
.topticker__viewport {
  flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 3%, #000 96%, transparent);
}
.topticker__track { display: inline-flex; gap: 30px; white-space: nowrap; padding-left: 30px; will-change: transform; animation: wishMarquee 80s linear infinite; }
.topticker:hover .topticker__track { animation-play-state: paused; }
@keyframes wishMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tw { font-size: .9rem; color: rgba(255, 255, 255, 0.92); }
.tw b { color: var(--gold); font-weight: 700; }

/* 畢業祝福牆（卡片） */
.wish-form-title { text-align: center; color: var(--navy-800); font-size: clamp(1.1rem, 4vw, 1.45rem); margin: clamp(40px, 7vw, 64px) 0 18px; scroll-margin-top: 126px; }
.wishwall { margin-top: clamp(26px, 5vw, 40px); }
.wishwall__filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 4px 0 22px; }
.wish-chip {
  font-family: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
  padding: 7px 16px; border-radius: 999px; white-space: nowrap;
  background: var(--white); color: var(--navy-700); border: 1px solid var(--paper-2);
  transition: background .2s, color .2s, border-color .2s;
}
.wish-chip:hover { border-color: var(--gold); color: var(--navy-900); }
.wish-chip.is-active { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }
.wish-like {
  margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: var(--paper); border: 1px solid var(--paper-2); border-radius: 999px;
  padding: 6px 14px; font-family: inherit; font-size: .9rem; font-weight: 700; color: var(--ink-soft);
  transition: transform .15s var(--ease), background .2s, color .2s, border-color .2s;
}
.wish-like:hover { border-color: var(--coral); color: var(--coral); }
.wish-like:active { transform: scale(1.14); }
.wish-like.is-liked { background: #ffe9e6; border-color: var(--coral); color: var(--coral); cursor: default; }
.wish-like__heart { font-size: 1rem; line-height: 1; }
.wish-like__n { min-width: 1ch; text-align: left; }

/* 放大看完整祝福牆 — 入口按鈕 */
.wishwall__more { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin-top: clamp(20px, 4vw, 32px); }
.btn-wallzoom {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: inherit; font-size: 1rem; font-weight: 700;
  padding: 12px 26px; border-radius: 999px; border: 1.5px solid var(--navy-700);
  background: var(--white); color: var(--navy-700); box-shadow: var(--shadow-sm);
  transition: transform .15s var(--ease), background .2s, color .2s;
}
.btn-wallzoom:hover { background: var(--navy-700); color: #fff; transform: translateY(-2px); }
/* 第二種版本入口：現場星空投影頁（stage.html），星空藍紫漸層以區別放大牆 */
.btn-wallzoom--stage {
  background: linear-gradient(120deg, #2e2a6b, #1b2768); color: #fff; text-decoration: none;
  border-color: rgba(125, 95, 255, .55);
}
.btn-wallzoom--stage:hover { background: linear-gradient(120deg, #3d3890, #273594); color: #fff; }

/* 放大看完整祝福牆 — 全螢幕 overlay */
.wallbox { position: fixed; inset: 0; z-index: 320; display: flex; flex-direction: column; }
.wallbox[hidden] { display: none; }
.wallbox__sky { position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(120% 90% at 50% -10%, #3a4f9e 0%, #233268 38%, #16204a 72%, #101733 100%); }
/* 底部各班導師完整肖像（彩色半透明、底部淡出融入夜空，捲動祝福時固定在後方守護） */
.wallbox__teachers {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 0;
  display: flex; align-items: flex-end; justify-content: center;
  gap: clamp(0px, 1.2vw, 22px); padding: 0 clamp(8px, 3vw, 40px);
  pointer-events: none;
}
.wallbox__teachers img {
  height: clamp(170px, 34vh, 380px); width: auto;
  opacity: .38;   /* 完整彩色導師肖像、半透明融入夜空背景 */
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
}
@media (max-width: 720px) {
  .wallbox__teachers { gap: 1px; padding: 0 3px; }
  .wallbox__teachers img { width: calc((100vw - 22px) / 6); height: auto; opacity: .34; } /* 平分寬度，確保六位導師全進手機畫面 */
}
.wallbox__bar {
  position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: clamp(14px, 2.5vw, 22px) clamp(16px, 4vw, 40px);
  background: rgba(20, 29, 59, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(245, 185, 66, .3);
}
.wallbox__title { font-family: var(--font-serif); font-weight: 900; color: #fff; font-size: clamp(1.1rem, 2.4vw, 1.7rem); flex-shrink: 0; }
.wallbox__title b { color: var(--gold); font-weight: 700; font-size: .8em; }
.wallbox__filters { display: flex; flex-wrap: wrap; gap: 7px; flex: 1; min-width: 0; }
.wallbox__filters[hidden] { display: none; }
.wall-chip {
  font-family: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; white-space: nowrap;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .85); border: 1px solid rgba(255, 255, 255, .22);
  transition: background .2s, color .2s, border-color .2s;
}
.wall-chip:hover { border-color: var(--gold); color: var(--gold); }
.wall-chip.is-active { background: var(--gold); color: var(--navy-900); border-color: var(--gold); }
.wallbox__close {
  flex-shrink: 0; margin-left: auto; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .16); color: #fff; font-size: 1.7rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.wallbox__close:hover { background: rgba(255, 255, 255, .3); }
.wallbox__scroll { position: relative; z-index: 1; flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: clamp(18px, 3vw, 36px) clamp(16px, 4vw, 40px);
  padding-bottom: clamp(210px, 40vh, 440px); /* 底部大留白：捲到最底可完整看到六班導師合影 */ }
.wallbox__grid {
  max-width: 1200px; margin: 0 auto; display: grid; gap: clamp(14px, 2vw, 24px);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  align-items: start; /* 卡片自然高度，長祝福不強制撐高整列 */
}
.wallbox__grid .wish-card { padding: clamp(22px, 2.5vw, 32px);
  background: rgba(255, 255, 255, .72); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  border-color: rgba(255, 255, 255, .45); box-shadow: 0 12px 32px rgba(8, 14, 34, .32); }
.wallbox__grid .wish-card__to { font-size: clamp(1rem, 1.6vw, 1.25rem); }
.wallbox__grid .wish-card__msg { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: #1a2036; }
/* 切換班級標籤後：卡片交錯淡入上升（配合捲動回頂，從最上面開始閱讀，絲滑進場） */
.wallbox__grid.is-entering > .wish-card { animation: wallCardIn .52s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes wallCardIn { from { opacity: 0; transform: translateY(26px) scale(.97); } to { opacity: 1; transform: none; } }
.wallbox__grid.is-entering > .wish-card:nth-child(1) { animation-delay: .02s; }
.wallbox__grid.is-entering > .wish-card:nth-child(2) { animation-delay: .06s; }
.wallbox__grid.is-entering > .wish-card:nth-child(3) { animation-delay: .10s; }
.wallbox__grid.is-entering > .wish-card:nth-child(4) { animation-delay: .14s; }
.wallbox__grid.is-entering > .wish-card:nth-child(5) { animation-delay: .18s; }
.wallbox__grid.is-entering > .wish-card:nth-child(6) { animation-delay: .22s; }
.wallbox__grid.is-entering > .wish-card:nth-child(7) { animation-delay: .26s; }
.wallbox__grid.is-entering > .wish-card:nth-child(8) { animation-delay: .30s; }
.wallbox__grid.is-entering > .wish-card:nth-child(9) { animation-delay: .34s; }
.wallbox__grid.is-entering > .wish-card:nth-child(n+10) { animation-delay: .38s; }  /* 第10張之後同延遲，避免長清單尾端拖太久 */
@media (prefers-reduced-motion: reduce) {
  .wallbox__grid.is-entering > .wish-card { animation: none; }
}
/* 手機端放大牆 RWD：單欄、卡片留白縮放、底部留白讓六導師合影可見（放最後以覆寫桌機 padding） */
@media (max-width: 720px) {
  .wallbox__scroll { padding: 16px 14px; padding-bottom: clamp(150px, 26vh, 250px); }
  .wallbox__grid { gap: 13px; grid-template-columns: 1fr; }
  .wallbox__grid .wish-card { padding: 18px 18px; }
  .wallbox__grid .wish-card__to { font-size: 1rem; }
  .wallbox__grid .wish-card__msg { font-size: 1.02rem; }
  /* 頂部 bar：標題＋關閉鈕同一行、篩選 chips 獨立成一行可橫向滑動，不再擠成一團 */
  .wallbox__bar { gap: 10px; padding: 11px 14px; }
  .wallbox__title { font-size: 1.02rem; flex: 1; min-width: 0; }
  .wallbox__close { width: 38px; height: 38px; font-size: 1.4rem; }
  .wallbox__filters { order: 3; flex: 0 0 100%; flex-wrap: nowrap; overflow-x: auto;
    -webkit-overflow-scrolling: touch; gap: 7px; padding-bottom: 3px; scrollbar-width: none; }
  .wallbox__filters::-webkit-scrollbar { display: none; }
  .wall-chip { flex-shrink: 0; }
}

/* 愛心飛心特效 + 數字彈跳（卡片牆 / 放大牆共用） */
.fxlayer { position: fixed; inset: 0; z-index: 330; pointer-events: none; overflow: hidden; }
.flyheart { position: fixed; font-size: 1.5rem; pointer-events: none; will-change: transform, opacity; animation: flyup 1.3s ease-out forwards; }
@keyframes flyup {
  0% { transform: translate(-50%, -50%) scale(.5); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.2) rotate(var(--rot)); opacity: 0; }
}
.wish-like__n.bump { display: inline-block; animation: numbump .5s ease; }
.wish-like.is-liked .wish-like__heart { display: inline-block; animation: heartpop .5s ease; }
@keyframes numbump { 0% { transform: scale(1); } 40% { transform: scale(1.7); } 100% { transform: scale(1); } }
@keyframes heartpop { 0% { transform: scale(1); } 30% { transform: scale(1.5); } 60% { transform: scale(.85); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .flyheart { display: none; }
  .wish-like__n.bump, .wish-like.is-liked .wish-like__heart { animation: none; }
}
.wishwall__count { text-align: center; color: var(--gold-deep); font-weight: 700; margin-bottom: 18px; }
.wishwall__cards {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.wish-card {
  background: var(--white); border: 1px solid var(--paper-2); border-left: 5px solid var(--gold);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.wish-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.wish-card__to { font-size: .82rem; color: var(--gold-deep); font-weight: 700; margin-bottom: 8px; }
.wish-card__msg { color: var(--ink); line-height: 1.7; word-break: break-word; }
/* 主頁祝福牆分頁（左右切換，避免一次顯示全部越拉越長） */
.wish-pager { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 2.5vw, 20px);
  margin-top: clamp(22px, 3.5vw, 32px); }
.wish-pager[hidden] { display: none; }
.wish-pager__btn { font-family: inherit; font-size: .92rem; font-weight: 700; cursor: pointer;
  padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--navy-700);
  background: var(--white); color: var(--navy-700); box-shadow: var(--shadow-sm);
  transition: transform .15s var(--ease), background .2s, color .2s, opacity .2s; }
.wish-pager__btn:hover:not(:disabled) { background: var(--navy-700); color: #fff; transform: translateY(-2px); }
.wish-pager__btn:disabled { opacity: .4; cursor: not-allowed; }
.wish-pager__info { font-weight: 700; color: var(--ink-soft); font-size: .92rem; white-space: nowrap; }

/* 換頁 / 切班級轉場：舊頁淡出滑走 → 換內容 → 新卡片交錯滑入（方向感知，提升絲滑感） */
.wishwall__cards { overflow-x: clip; }   /* 滑入時不外溢出現橫向捲軸；仍保留垂直 hover 浮起陰影 */
.wishwall__cards.is-leaving { opacity: 0; transition: opacity .2s ease, transform .2s ease; }
.wishwall__cards.is-leaving.lv-next { transform: translateX(-26px); }
.wishwall__cards.is-leaving.lv-prev { transform: translateX(26px); }
.wishwall__cards.is-entering > .wish-card { animation: wishCardIn .5s cubic-bezier(.22, 1, .36, 1) both; }
.wishwall__cards.is-entering.en-next > .wish-card { animation-name: wishCardInNext; }
.wishwall__cards.is-entering.en-prev > .wish-card { animation-name: wishCardInPrev; }
@keyframes wishCardIn     { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes wishCardInNext { from { opacity: 0; transform: translateX(42px) translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes wishCardInPrev { from { opacity: 0; transform: translateX(-42px) translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.wishwall__cards.is-entering > .wish-card:nth-child(1) { animation-delay: 0s; }
.wishwall__cards.is-entering > .wish-card:nth-child(2) { animation-delay: .06s; }
.wishwall__cards.is-entering > .wish-card:nth-child(3) { animation-delay: .12s; }
.wishwall__cards.is-entering > .wish-card:nth-child(4) { animation-delay: .18s; }
.wishwall__cards.is-entering > .wish-card:nth-child(5) { animation-delay: .24s; }
.wishwall__cards.is-entering > .wish-card:nth-child(6) { animation-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
  .wishwall__cards.is-leaving { opacity: 1; transform: none; transition: none; }
  .wishwall__cards.is-entering > .wish-card { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  .topticker__track { animation: none; }
}

@media (max-width: 520px) {
  .rsvp-form { grid-template-columns: 1fr; }
}

/* =========================================================
   給家長的話
   ========================================================= */
.section--parents { background: var(--paper); }

/* 畢業班導師 — 卡片式呈現 */
.section--teachers { background: linear-gradient(180deg, var(--paper), var(--paper-2)); }
.teacher-grid {
  margin-top: clamp(34px, 6vw, 54px);
  display: grid; gap: clamp(13px, 2vw, 24px);
  grid-template-columns: repeat(6, 1fr);
}
@media (max-width: 1100px) { .teacher-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .teacher-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.teacher {
  margin: 0; background: var(--white);
  border: 1px solid var(--paper-2); border-radius: 18px; overflow: hidden;
  box-shadow: 0 8px 22px rgba(20, 29, 59, .1);
  display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.teacher:hover { transform: translateY(-6px); box-shadow: 0 18px 38px rgba(20, 29, 59, .2); }
.teacher__photo {
  position: relative; height: clamp(176px, 46vw, 256px);
  background: linear-gradient(180deg, #eef3fc 0%, #dde6f6 100%);
  display: flex; align-items: flex-end; justify-content: center; overflow: hidden;
}
.teacher__photo::after {
  content: ""; position: absolute; bottom: 7px; left: 50%; transform: translateX(-50%);
  width: 68%; height: 20px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(245, 185, 66, .55), transparent 70%);
  opacity: .8; transition: width .3s, opacity .3s; z-index: 0;
}
.teacher:hover .teacher__photo::after { width: 86%; opacity: 1; }
.teacher__photo img {
  position: relative; z-index: 1; height: 95%; width: auto; max-width: 90%;
  object-fit: contain; object-position: bottom;
  filter: drop-shadow(0 8px 14px rgba(20, 29, 59, .22));
}
.teacher__cap {
  background: linear-gradient(90deg, var(--navy-800), var(--navy-700));
  color: #fff; padding: 10px 6px; font-weight: 700; letter-spacing: .5px;
  font-size: clamp(.88rem, 1.4vw, 1rem); text-align: center;
}
.teacher__cap b { color: var(--gold); font-size: 1.18em; margin: 0 2px; }
.notice-grid {
  margin-top: clamp(34px, 6vw, 54px);
  display: flex; flex-wrap: wrap; justify-content: center; gap: 16px;
}
.notice {
  flex: 1 1 280px; max-width: 380px;   /* 置中排列，最後一張不再孤零靠左、也不撐滿整排 */
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--white); border: 1px solid var(--paper-2); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow-sm);
}
.notice__ico {
  flex-shrink: 0; font-size: 1.5rem; width: 50px; height: 50px; border-radius: 14px;
  background: rgba(52,72,140,.1); display: flex; align-items: center; justify-content: center;
}
.notice h3 { color: var(--navy-800); font-size: 1.08rem; margin-bottom: 4px; }
.notice p { color: var(--ink-soft); font-size: .92rem; }

/* 新祝福即時通知 toast（背景輪詢偵測到審核通過的新祝福時淡入，點擊前往祝福牆） */
.newwish-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  z-index: 360; display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  font-family: inherit; font-size: clamp(.92rem, 2.6vw, 1.05rem); font-weight: 700; white-space: nowrap;
  padding: 13px 22px; border-radius: 999px; border: 1.5px solid var(--gold);
  background: linear-gradient(120deg, var(--navy-800), var(--navy-700)); color: #fff;
  box-shadow: 0 14px 38px rgba(16,23,51,.5); opacity: 0; pointer-events: none;
  transition: opacity .35s ease, transform .35s var(--ease);
}
.newwish-toast[hidden] { display: none; }
.newwish-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.newwish-toast__ico { font-size: 1.2em; }
.newwish-toast__n { color: var(--gold); font-size: 1.15em; margin: 0 2px; }
.newwish-toast__cta { color: var(--gold); font-weight: 800; margin-left: 4px; }
@media (max-width: 520px) { .newwish-toast { bottom: 16px; padding: 11px 18px; white-space: normal; max-width: 92vw; text-align: center; } }

/* 校歌 BGM 開關（主頁左下角浮動鈕；播放中金色脈動光環） */
.bgm-toggle {
  position: fixed; left: 18px; bottom: 18px; z-index: 350;
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font-family: inherit; font-size: .9rem; font-weight: 800; color: #fff;
  padding: 10px 16px; border-radius: 999px; border: 1.5px solid rgba(245, 196, 81, .6);
  background: linear-gradient(120deg, var(--navy-800), var(--navy-700));
  box-shadow: 0 8px 24px rgba(16, 23, 51, .4);
  transition: transform .15s ease, border-color .2s ease, bottom .4s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.bgm-toggle:hover { transform: translateY(-2px); border-color: var(--gold); }
.bgm-toggle:active { transform: scale(.96); }
.bgm-toggle__ico { font-size: 1.15em; line-height: 1; }
.bgm-toggle.is-playing { border-color: var(--gold); animation: bgmpulse 2.2s ease-out infinite; }
@keyframes bgmpulse {
  0%   { box-shadow: 0 8px 24px rgba(16, 23, 51, .4), 0 0 0 0 rgba(245, 196, 81, .55); }
  70%  { box-shadow: 0 8px 24px rgba(16, 23, 51, .4), 0 0 0 13px rgba(245, 196, 81, 0); }
  100% { box-shadow: 0 8px 24px rgba(16, 23, 51, .4), 0 0 0 0 rgba(245, 196, 81, 0); }
}
@media (max-width: 520px) { .bgm-toggle { left: 12px; bottom: 12px; padding: 9px 13px; font-size: .82rem; } }
@media (prefers-reduced-motion: reduce) { .bgm-toggle.is-playing { animation: none; } }

.blessing {
  margin-top: clamp(34px, 6vw, 54px); text-align: center;
  background: linear-gradient(150deg, var(--navy-800), var(--navy-700));
  color: #fff; border-radius: var(--radius-lg); padding: clamp(36px, 7vw, 64px) clamp(24px, 5vw, 48px);
  box-shadow: var(--shadow-md); position: relative; overflow: hidden;
}
.blessing::before {
  content: "”"; position: absolute; top: -10px; left: 24px; font-family: var(--font-serif);
  font-size: 8rem; color: rgba(245,185,66,.18); line-height: 1;
}
.blessing__quote { font-family: var(--font-serif); font-size: clamp(1.2rem, 5vw, 1.9rem); font-weight: 700; line-height: 1.8; position: relative; }
.blessing__sign { margin-top: 20px; color: var(--gold); font-weight: 500; letter-spacing: 1px; }

/* =========================================================
   頁尾
   ========================================================= */
.site-footer { background: var(--navy-900); color: #fff; padding: clamp(40px, 7vw, 64px) 0 28px; text-align: center; }
.site-footer__logo { width: 72px; height: auto; margin: 0 auto 16px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.4)); }
.site-footer__school { font-family: var(--font-serif); font-weight: 700; font-size: 1.15rem; }
.site-footer__sub { color: rgba(255,255,255,.7); font-size: .88rem; margin-top: 6px; }
.site-footer__feature { color: var(--gold); font-size: .85rem; margin-top: 10px; letter-spacing: 1px; }
.site-credit {
  margin-top: 22px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12);
  font-size: 13px; color: rgba(255,255,255,.6); font-family: var(--font-sans);
}
.site-credit__heart { display: inline-block; margin: 0 2px; filter: saturate(1.15); }
.site-credit__author {
  color: rgba(255,255,255,.85); text-decoration: none;
  border-bottom: 1px dotted currentColor; padding-bottom: 1px;
  transition: color .2s, border-color .2s;
}
.site-credit__author:hover { color: var(--gold); border-bottom-color: var(--gold); }

/* =========================================================
   回到頂端
   ========================================================= */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--navy-800); color: var(--gold); font-size: 1.3rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; text-decoration: none;
  box-shadow: var(--shadow-md); opacity: 0; transform: translateY(16px) scale(.8);
  transition: opacity .3s, transform .3s; pointer-events: none;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--gold); color: var(--navy-900); }

/* =========================================================
   捲動進場動畫
   ========================================================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* =========================================================
   直播提示卡（給家長區）
   ========================================================= */
.live-callout {
  display: flex; align-items: center; gap: 18px; text-decoration: none;
  margin: 0 auto clamp(24px, 5vw, 40px); max-width: 760px;
  background: linear-gradient(120deg, #e8392f, #ff6a3d);
  color: #fff; border-radius: var(--radius); padding: 18px 24px;
  box-shadow: 0 14px 32px rgba(232,57,47,.32); transition: transform .25s var(--ease), box-shadow .25s;
}
.live-callout:hover { transform: translateY(-4px); box-shadow: 0 20px 42px rgba(232,57,47,.42); }
.live-callout__badge {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,.22); padding: 8px 14px; border-radius: 999px;
  font-weight: 900; letter-spacing: 1px; font-size: .9rem;
}
.live-callout__text { display: flex; flex-direction: column; line-height: 1.55; font-size: .95rem; }
.live-callout__text strong { font-size: 1.08rem; font-weight: 900; margin-bottom: 2px; }

/* =========================================================
   版本更新提示 banner
   ========================================================= */
.update-banner {
  position: fixed; left: 50%; bottom: -160px; transform: translateX(-50%);
  z-index: 360; display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700)); color: #fff;
  padding: 14px 16px 14px 20px; border-radius: 16px;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(245,185,66,.45);
  max-width: calc(100vw - 24px); transition: bottom .45s var(--ease), opacity .3s;
  opacity: 0; font-size: .95rem;
  pointer-events: none; /* 隱藏時不可攔截點擊，否則會蓋住「回到頂端」按鈕 */
}
.update-banner.is-visible { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); opacity: 1; pointer-events: auto; }
.update-banner__msg { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.update-banner__ico { font-size: 1.4rem; flex-shrink: 0; }
.update-banner__text { line-height: 1.5; }
.update-banner__actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.update-banner__btn {
  flex-shrink: 0; background: var(--gold); color: var(--navy-900);
  border: none; border-radius: 999px; padding: 10px 20px; font-weight: 800;
  font-size: .95rem; cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: background .2s, transform .2s;
}
.update-banner__btn:hover { background: #ffca5a; transform: translateY(-1px); }
.update-banner__btn:active { transform: scale(.97); }
.update-banner__close {
  flex-shrink: 0; background: transparent; color: rgba(255,255,255,.7);
  border: none; font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 6px;
}
.update-banner__close:hover { color: #fff; }

@media (max-width: 520px) {
  .update-banner {
    left: 12px; right: 12px; transform: none;
    flex-direction: column; align-items: stretch; gap: 12px; padding: 16px;
  }
  .update-banner.is-visible { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .update-banner__actions { gap: 8px; }
  .update-banner__btn { flex: 1; padding: 13px 18px; font-size: 1.02rem; }
  .update-banner__close { font-size: 1.6rem; padding: 0 10px; }
  /* banner 顯示時把左下角「校歌重編版」鈕抬到 banner 上方，避免重疊（高度由 script.js 量測寫入 --bgm-lift） */
  body.has-update-banner .bgm-toggle { bottom: var(--bgm-lift, 130px); }
}

/* =========================================================
   響應式斷點
   ========================================================= */

/* 平板以上：流程時間軸改為左右交錯 */
@media (min-width: 760px) {
  .timeline::before { left: 50%; transform: translateX(-50%); }
  .timeline__item { width: 50%; padding-left: 0; margin-bottom: 30px; }
  .timeline__item:nth-child(odd) { left: 0; padding-right: 48px; text-align: right; }
  .timeline__item:nth-child(even) { left: 50%; padding-left: 48px; }
  .timeline__time { left: auto; }
  .timeline__item:nth-child(odd) .timeline__time { right: -27px; left: auto; }
  .timeline__item:nth-child(even) .timeline__time { left: -27px; }
  .timeline__item:nth-child(odd) .timeline__sub { align-items: flex-end; }
  .timeline__item:nth-child(odd) .timeline__sub li { padding-left: 0; padding-right: 18px; }
  .timeline__item:nth-child(odd) .timeline__sub li::before { left: auto; right: 2px; }
}

/* 桌機：導覽列字距加大 */
@media (min-width: 1024px) {
  .nav__links a { font-size: .92rem; padding: 9px 15px; }
}

/* 小手機微調 */
@media (max-width: 380px) {
  .countdown__box { min-width: 0; flex: 1; padding: 10px 4px; }
  .nav__brand-sub { display: none; }
  .pill { padding: 7px 12px; }
}

/* 桌機隱藏行動版換行 */
.br-mobile { display: none; }
@media (max-width: 560px) { .br-mobile { display: inline; } }

/* =========================================================
   減少動態偏好 / 列印
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .nav, .hero__scroll, .to-top, .hero__confetti, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  .section, .hero { padding: 20px 0; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
