/* ============================================================
   wedding-starlit｜一場星空夜宴
   概念：喜帖＝為你留了位子的星空夜宴。全站唯一深色模板。
   - 開場：一片夜幕，賓客親手向上拉開（純 CSS 跟手、可點跳過）
   - 深夜藍底 × 香檳金 accent × 米白正文；星空鋪在內容底下
   - Gallery 是懸星燈箱：照片像掛在星圖上的一列發光燈箱
   - 終章「連星成名」：按住夜空把星星連成賓客名字的星座
   動態語彙：星點顯影 ＋ 燈箱點燈 ＋ 螢火蟲 ＋ 星軌劃過
   色彩與間距 token 覆寫自 /shared/base.css。
   深色注意：--warn 必須調亮（base 的磚紅在夜藍底不可讀）、
   focus ring 一律香檳色、accent 自訂由 WKSTYLE.apply(C,{dark:true})
   走深色 clamp（shared/style.js DARK_PAPERS）。
   ============================================================ */

:root {
  --paper:        #101b30;              /* 深夜藍底 */
  --paper-raise:  #1a2740;              /* 浮起表面（夜藍亮半階） */
  --ink:          #ede8dd;              /* 米白（正文/標題） */
  --ink-soft:     #9aa4b8;              /* 次要文字（霧藍灰） */
  --accent:       #d4b483;              /* 香檳金（唯一強調色） */
  --accent-ink:   #1c2233;              /* 香檳金底上的文字色 */
  --hairline:     rgba(237, 232, 221, .16); /* 深底髮絲線要比淺底濃才看得見 */
  --sand:         #16223a;              /* RSVP 夜藍浮面 */
  --warn:         #e0916f;              /* 錯誤/警示：調亮的磚橘（深底可讀版） */
  --glow-rgb:     212, 180, 131;        /* 香檳微光（rgba 家族的單一來源） */
  --nebula-rgb:   58, 82, 130;          /* 星雲色暈（背景層次用，比 paper-raise 再亮一階） */
  --scratch-a:    #2e3b58;              /* 刮刮樂星雲塗層 */
  --scratch-b:    #1b2740;
  --font-sans-tc: "Noto Sans TC", "PingFang TC", sans-serif;

  --radius: 1.1rem;
  --shadow-soft: 0 24px 60px -24px rgba(0, 0, 0, .55);
}

/* ---------- 配色變體：暗酒紅夜（config.theme = "wine-night"）----------
   只覆寫色彩 token、版式一律不動（DESIGN.md §7）。
   基準深夜藍是冷調，這組走暖調酒紅夜＋玫瑰金作冷暖對比。 */
html[data-wk-theme="wine-night"] {
  --paper:        #221219;
  --paper-raise:  #2e1a23;
  --ink:          #f0e6e0;
  --ink-soft:     #b3a0a3;
  --accent:       #d69a8a;
  --accent-ink:   #2a151d;
  --hairline:     rgba(240, 230, 224, .16);
  --sand:         #291721;
  --glow-rgb:     214, 154, 138;
  --nebula-rgb:   104, 58, 76;
  --scratch-a:    #4a2b38;
  --scratch-b:    #2c1822;
}

/* ---------- 配色變體：墨綠夜（config.theme = "pine-night"）----------
   冷調墨綠夜＋月光銀綠，與暖炭夜互為冷暖。 */
html[data-wk-theme="pine-night"] {
  --paper:        #0f1d18;
  --paper-raise:  #182a23;
  --ink:          #e8ece4;
  --ink-soft:     #9cab9f;
  --accent:       #b7c8bb;
  --accent-ink:   #12211b;
  --hairline:     rgba(232, 236, 228, .16);
  --sand:         #152420;
  --glow-rgb:     183, 200, 187;
  --nebula-rgb:   52, 92, 74;
  --scratch-a:    #2b4038;
  --scratch-b:    #182a24;
}

/* ---------- 配色變體：暖炭夜（config.theme = "ember-night"）----------
   暖調炭黑夜＋琥珀金，燭光晚宴的溫度。 */
html[data-wk-theme="ember-night"] {
  --paper:        #1b1713;
  --paper-raise:  #27221c;
  --ink:          #efe9df;
  --ink-soft:     #ab9f90;
  --accent:       #d8a05f;
  --accent-ink:   #241a10;
  --hairline:     rgba(239, 233, 223, .16);
  --sand:         #231e17;
  --glow-rgb:     216, 160, 95;
  --nebula-rgb:   102, 82, 54;
  --scratch-a:    #46372a;
  --scratch-b:    #29211a;
}

/* 夜空鋪在 html（canvas 背景）：星點層（body 的 fixed pseudo、z-index:-1）
   在 root stacking context 會畫在「body 背景之下、canvas 背景之上」——
   漸層放 body 星星就被蓋掉（初版踩過的雷），所以底色堆疊必須放 html、
   body 保持透明。夜空由上而下疊五層（全部走 token，變體換色自動跟著走）：
   ① 頂部夜嵐（paper-raise 暈開）② 左上星雲團 ③ 右下星雲團
   ④ 一道 115° 的銀河斜帶（極淡）⑤ 頂部香檳微光。
   打散單一色底又不搶內容——每層透明度都壓在 .3 以下。 */
html {
  background:
    radial-gradient(130% 70% at 50% 0%, var(--paper-raise) 0%, transparent 58%) fixed,
    radial-gradient(72% 44% at 16% 26%, rgba(var(--nebula-rgb), .30) 0%, transparent 62%) fixed,
    radial-gradient(64% 40% at 86% 62%, rgba(var(--nebula-rgb), .22) 0%, transparent 64%) fixed,
    linear-gradient(115deg, transparent 34%, rgba(var(--nebula-rgb), .16) 47%, rgba(var(--glow-rgb), .05) 52%, rgba(var(--nebula-rgb), .12) 57%, transparent 70%) fixed,
    radial-gradient(56% 30% at 68% 6%, rgba(var(--glow-rgb), .07) 0%, transparent 55%) fixed,
    var(--paper);
}
body {
  font-family: var(--font-sans-tc);
  font-weight: 400;
  font-size: var(--text-body);
  line-height: 1.85;
  background: transparent;
  color: var(--ink);
}
.container { max-width: 34rem; }

/* ---------- 星空底（內容底下的兩層星點；視差變數由 fx.js 寫入）----------
   negative z-index 的 pseudo 疊在 body 背景之上、內容之下；
   inset 外擴讓視差位移不露邊（近層含捲動取模位移，外擴到 360px）。
   twinkle 只動 opacity（RM 通殺＝靜態星空）。 */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
  background-repeat: repeat;
}
/* 遠層：細碎小星（只吃陀螺儀 40%）——兩種亮度混排，密度是初版的兩倍 */
body::before {
  inset: -48px;
  opacity: .42; /* 手機基準值；桌機在下方 media query 提回 .55（有走廊遮罩護內容） */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cg fill='%23ede8dd'%3E%3Ccircle cx='18' cy='32' r='.9'/%3E%3Ccircle cx='74' cy='12' r='.7'/%3E%3Ccircle cx='128' cy='58' r='1'/%3E%3Ccircle cx='190' cy='24' r='.7'/%3E%3Ccircle cx='236' cy='74' r='.9'/%3E%3Ccircle cx='42' cy='104' r='.7'/%3E%3Ccircle cx='102' cy='140' r='.9'/%3E%3Ccircle cx='166' cy='112' r='.7'/%3E%3Ccircle cx='222' cy='158' r='1'/%3E%3Ccircle cx='26' cy='190' r='.9'/%3E%3Ccircle cx='88' cy='222' r='.7'/%3E%3Ccircle cx='150' cy='198' r='1'/%3E%3Ccircle cx='206' cy='238' r='.7'/%3E%3Ccircle cx='58' cy='250' r='.9'/%3E%3C/g%3E%3Cg fill='%23ede8dd' opacity='.45'%3E%3Ccircle cx='48' cy='18' r='.6'/%3E%3Ccircle cx='104' cy='36' r='.6'/%3E%3Ccircle cx='152' cy='16' r='.7'/%3E%3Ccircle cx='214' cy='50' r='.6'/%3E%3Ccircle cx='246' cy='120' r='.7'/%3E%3Ccircle cx='14' cy='72' r='.6'/%3E%3Ccircle cx='68' cy='84' r='.7'/%3E%3Ccircle cx='134' cy='96' r='.6'/%3E%3Ccircle cx='188' cy='84' r='.6'/%3E%3Ccircle cx='34' cy='142' r='.7'/%3E%3Ccircle cx='124' cy='168' r='.6'/%3E%3Ccircle cx='196' cy='142' r='.7'/%3E%3Ccircle cx='244' cy='196' r='.6'/%3E%3Ccircle cx='64' cy='176' r='.6'/%3E%3Ccircle cx='16' cy='232' r='.7'/%3E%3Ccircle cx='118' cy='236' r='.6'/%3E%3Ccircle cx='174' cy='222' r='.7'/%3E%3Ccircle cx='230' cy='252' r='.6'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 260px 260px;
  transform: translate3d(calc(var(--sky-x, 0px) * .4), calc(var(--sky-y, 0px) * .4), 0);
}
/* 近層：較大的星與四芒閃星（陀螺儀全速＋捲動 5% 取模微移）——
   香檳星加倍、四芒星加一顆帶光暈的主星，layer 整體提亮 */
body::after {
  inset: -360px;
  --tw-min: .18;  /* 手機基準（四芒星是最搶眼的元素，行動端壓最低） */
  --tw-max: .38;
  opacity: .3;    /* RM 下動畫被通殺時的靜態值 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='340' height='340'%3E%3Cg fill='%23d4b483'%3E%3Ccircle cx='52' cy='44' r='1.3'/%3E%3Ccircle cx='214' cy='92' r='1.1'/%3E%3Ccircle cx='120' cy='210' r='1.3'/%3E%3Ccircle cx='296' cy='250' r='1.1'/%3E%3Ccircle cx='150' cy='118' r='1'/%3E%3Ccircle cx='36' cy='226' r='1.1'/%3E%3Ccircle cx='230' cy='320' r='1'/%3E%3Ccircle cx='322' cy='60' r='1.2'/%3E%3Cpath d='M168 24 l1.6 4.4 4.4 1.6 -4.4 1.6 -1.6 4.4 -1.6 -4.4 -4.4 -1.6 4.4 -1.6z'/%3E%3Cpath d='M40 150 l1.4 3.8 3.8 1.4 -3.8 1.4 -1.4 3.8 -1.4 -3.8 -3.8 -1.4 3.8 -1.4z'/%3E%3Cpath d='M262 176 l1.4 3.8 3.8 1.4 -3.8 1.4 -1.4 3.8 -1.4 -3.8 -3.8 -1.4 3.8 -1.4z'/%3E%3Cpath d='M84 302 l1.4 3.8 3.8 1.4 -3.8 1.4 -1.4 3.8 -1.4 -3.8 -3.8 -1.4 3.8 -1.4z'/%3E%3C/g%3E%3Cg fill='%23d4b483' opacity='.18'%3E%3Ccircle cx='168' cy='30' r='5.5'/%3E%3C/g%3E%3Cg fill='%23ede8dd'%3E%3Ccircle cx='90' cy='120' r='1'/%3E%3Ccircle cx='250' cy='30' r='1'/%3E%3Ccircle cx='310' cy='140' r='1'/%3E%3Ccircle cx='30' cy='280' r='1'/%3E%3Ccircle cx='190' cy='300' r='1'/%3E%3Ccircle cx='134' cy='260' r='.9'/%3E%3Ccircle cx='276' cy='214' r='.9'/%3E%3Ccircle cx='16' cy='40' r='.9'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 340px 340px;
  transform: translate3d(var(--sky-x, 0px), calc(var(--sky-y, 0px) + var(--sky-s2, 0px)), 0);
  animation: sky-twinkle 9s ease-in-out infinite alternate;
}
@keyframes sky-twinkle {
  from { opacity: var(--tw-min, .18); }
  to   { opacity: var(--tw-max, .38); }
}
/* 內容走廊退讓（桌機）：中間內容欄（34rem＋餘裕）的星點淡到 15%，
   星空讓到兩側去——星星是氛圍，不能跟婚禮資訊搶眼睛。
   兩側有遮罩護著內容，星點亮度可以比手機高一階。
   手機內容滿版、走廊寬過視窗，媒體查詢外不套遮罩、用上面的暗基準值。 */
@media (min-width: 700px) {
  body::before { opacity: .55; }
  body::after { --tw-min: .3; --tw-max: .55; opacity: .46; }
  body::before,
  body::after {
    -webkit-mask-image: linear-gradient(90deg,
      #000 0%, #000 calc(50% - 32rem),
      rgba(0, 0, 0, .15) calc(50% - 23rem), rgba(0, 0, 0, .15) calc(50% + 23rem),
      #000 calc(50% + 32rem), #000 100%);
    mask-image: linear-gradient(90deg,
      #000 0%, #000 calc(50% - 32rem),
      rgba(0, 0, 0, .15) calc(50% - 23rem), rgba(0, 0, 0, .15) calc(50% + 23rem),
      #000 calc(50% + 32rem), #000 100%);
  }
}

/* ---------- 動態語彙：星點顯影（自遠而近浮現） ---------- */
.reveal {
  transform: translateY(22px) scale(.985);
  transition:
    opacity 1s var(--ease-out),
    transform 1s var(--ease-out);
}

/* ============ 開場：一片夜幕（html.has-intro 才顯示） ============
   基態＝夜幕閉合靜止（等 boot 讀 config 呼叫 apply()）：
   - .intro-play（auto）：純 CSS keyframes 自走完 ≤2s：星徽亮起 → 夜幕升起 →
     整層淡出，收場靠 animationend。
   - .intro-wait（manual）：拖曳進度 --wk-open（0~1）直接映射夜幕上拉，
     放手未過閾值由 transition 回彈（.is-dragging 時關 transition 跟手）。
   收場（點擊／手勢／跳過／保險 timeout）由 index.html 的同步 script 管，
   不依賴任何外部 JS。 */
.intro { display: none; }
html.has-intro .intro {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: block;
  cursor: pointer;
  touch-action: none;                 /* 手勢自己接管，垂直拖不觸發原生捲動 */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;        /* iOS 長按不跳選單 */
}
html.has-intro .intro-play { animation: intro-out .6s var(--ease-out) 1.5s forwards; }
@keyframes intro-out {
  to { opacity: 0; visibility: hidden; }
}
/* 夜嵐層：夜幕拉開過程中殘留的星霧，隨開啟散去 */
.intro-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 62% at 50% 0%, rgba(var(--glow-rgb), .07) 0%, transparent 55%),
    rgba(6, 11, 22, .38);
  opacity: calc(.9 - var(--wk-open, 0) * 1.3);
  pointer-events: none;
}
/* 夜幕本體：比頁底更深的夜，繡著星、底緣一道香檳地平線 */
.intro-veil {
  position: absolute;
  inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cg fill='%23ede8dd' opacity='.75'%3E%3Ccircle cx='30' cy='40' r='1'/%3E%3Ccircle cx='120' cy='24' r='.8'/%3E%3Ccircle cx='210' cy='60' r='1.1'/%3E%3Ccircle cx='276' cy='30' r='.8'/%3E%3Ccircle cx='66' cy='120' r='.8'/%3E%3Ccircle cx='160' cy='150' r='1'/%3E%3Ccircle cx='250' cy='128' r='.8'/%3E%3Ccircle cx='40' cy='210' r='1.1'/%3E%3Ccircle cx='130' cy='250' r='.8'/%3E%3Ccircle cx='226' cy='222' r='1'/%3E%3Ccircle cx='286' cy='274' r='.8'/%3E%3C/g%3E%3C/svg%3E") repeat,
    radial-gradient(130% 80% at 50% 10%, #17233c 0%, #0a1222 62%);
  background-size: 300px 300px, cover;
  box-shadow: 0 3px 0 rgba(var(--glow-rgb), .55), 0 26px 60px -12px rgba(0, 0, 0, .8);
  display: grid;
  place-items: center;
  will-change: transform;
}
html[data-wk-theme="wine-night"] .intro-veil { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cg fill='%23f0e6e0' opacity='.75'%3E%3Ccircle cx='30' cy='40' r='1'/%3E%3Ccircle cx='120' cy='24' r='.8'/%3E%3Ccircle cx='210' cy='60' r='1.1'/%3E%3Ccircle cx='276' cy='30' r='.8'/%3E%3Ccircle cx='66' cy='120' r='.8'/%3E%3Ccircle cx='160' cy='150' r='1'/%3E%3Ccircle cx='250' cy='128' r='.8'/%3E%3Ccircle cx='40' cy='210' r='1.1'/%3E%3Ccircle cx='130' cy='250' r='.8'/%3E%3Ccircle cx='226' cy='222' r='1'/%3E%3Ccircle cx='286' cy='274' r='.8'/%3E%3C/g%3E%3C/svg%3E"), radial-gradient(130% 80% at 50% 10%, #2c1720 0%, #150a0f 62%); }
html[data-wk-theme="pine-night"] .intro-veil { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cg fill='%23e8ece4' opacity='.75'%3E%3Ccircle cx='30' cy='40' r='1'/%3E%3Ccircle cx='120' cy='24' r='.8'/%3E%3Ccircle cx='210' cy='60' r='1.1'/%3E%3Ccircle cx='276' cy='30' r='.8'/%3E%3Ccircle cx='66' cy='120' r='.8'/%3E%3Ccircle cx='160' cy='150' r='1'/%3E%3Ccircle cx='250' cy='128' r='.8'/%3E%3Ccircle cx='40' cy='210' r='1.1'/%3E%3Ccircle cx='130' cy='250' r='.8'/%3E%3Ccircle cx='226' cy='222' r='1'/%3E%3Ccircle cx='286' cy='274' r='.8'/%3E%3C/g%3E%3C/svg%3E"), radial-gradient(130% 80% at 50% 10%, #16281f 0%, #09120d 62%); }
html[data-wk-theme="ember-night"] .intro-veil { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cg fill='%23efe9df' opacity='.75'%3E%3Ccircle cx='30' cy='40' r='1'/%3E%3Ccircle cx='120' cy='24' r='.8'/%3E%3Ccircle cx='210' cy='60' r='1.1'/%3E%3Ccircle cx='276' cy='30' r='.8'/%3E%3Ccircle cx='66' cy='120' r='.8'/%3E%3Ccircle cx='160' cy='150' r='1'/%3E%3Ccircle cx='250' cy='128' r='.8'/%3E%3Ccircle cx='40' cy='210' r='1.1'/%3E%3Ccircle cx='130' cy='250' r='.8'/%3E%3Ccircle cx='226' cy='222' r='1'/%3E%3Ccircle cx='286' cy='274' r='.8'/%3E%3C/g%3E%3C/svg%3E"), radial-gradient(130% 80% at 50% 10%, #262019 0%, #120e0a 62%); }
/* 北極星星徽（render.js 換新人縮寫）：繡在夜幕上、隨夜幕一起升走 */
.intro-star {
  position: relative;
  display: grid;
  place-items: center;
  width: 7.5rem;
  height: 7.5rem;
}
.star-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--glow-rgb), .3) 0%, transparent 68%);
  animation: star-breathe 3.2s ease-in-out infinite alternate;
}
@keyframes star-breathe {
  from { transform: scale(.86); opacity: .7; }
  to   { transform: scale(1.05); opacity: 1; }
}
.intro-initials {
  position: relative;
  font-family: var(--font-serif-latin);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-indent: .14em;
  color: var(--accent);
  text-shadow: 0 0 18px rgba(var(--glow-rgb), .65);
}
html.has-intro .intro-play .intro-veil { animation: intro-veil-up .9s cubic-bezier(.7, 0, .3, 1) .8s forwards; }
@keyframes intro-veil-up {
  to { transform: translateY(-103%); }
}
/* 手動開啟：拖曳進度即時映射（夜幕跟手上拉、星霧散去） */
html.has-intro .intro-wait .intro-veil {
  transform: translateY(calc(var(--wk-open, 0) * -103%));
  transition: transform .35s var(--ease-out);
}
html.has-intro .intro-wait.is-dragging .intro-veil { transition: none; }
/* 收場（點一下／拖曳過閾值放手）：JS 移除 is-dragging、掛 .intro-commit、
   setOpen(1)，夜幕用 ~0.95s 儀式 transition 升完（transitionend 收場）。 */
html.has-intro .intro-wait.intro-commit .intro-veil {
  transition: transform .95s cubic-bezier(.7, 0, .3, 1);
}
.intro-hint {
  position: absolute;
  left: 0; right: 0;
  top: clamp(4.5rem, 16vh, 8rem);
  text-align: center;
  font-family: var(--font-serif-latin);
  font-style: italic;
  font-size: clamp(1.15rem, 4vw, 1.45rem);
  letter-spacing: .16em;
  color: var(--accent);
  opacity: 0;
  animation: intro-hint .8s var(--ease-out) .45s forwards;
  pointer-events: none;
}
@keyframes intro-hint {
  to { opacity: calc(1 - var(--wk-open, 0) * 1.6); }
}
/* 手動模式引導（apply("manual") 後才顯示）：脈動吸引輕觸/上滑。
   不標 .rm-keep：RM 下動畫被通殺 → 停在預設 opacity（靜態可見），正確降級 */
.intro-guide {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: max(5.2rem, env(safe-area-inset-bottom, 0px) + 4.6rem);
  white-space: nowrap;
  font-size: .78rem;
  letter-spacing: .3em;
  text-indent: .3em;
  color: var(--ink-soft);
  opacity: .9;
  padding: .5rem 1rem;
}
html.has-intro .intro-wait .intro-guide {
  display: block;
  animation: intro-guide-pulse 2.4s ease-in-out infinite;
}
@keyframes intro-guide-pulse {
  0%, 100% { opacity: .45; }
  50%      { opacity: .95; }
}
.intro-skip {
  position: absolute;
  bottom: max(2rem, env(safe-area-inset-bottom, 0px) + 1.5rem);
  left: 50%;
  transform: translateX(-50%);
  font-size: .72rem;
  letter-spacing: .34em;
  text-indent: .34em;
  color: var(--ink-soft);
  padding: .6rem 1.2rem;
}

/* ---------- reduced-motion 簡化開場 ----------
   #intro 本身的 intro-out（整層淡出）只動 opacity、天生 RM 安全，
   標 .rm-keep 豁免 base.css 通殺後沿用原時程 → animationend 收場照舊。
   auto：夜幕上拉與星徽呼吸全取消（夜幕閉合靜止、星徽停留可見）。
   manual：拖曳跟手是使用者驅動的直接操作、非自動動畫 → RM 保留形變映射不砍；
   點一下／放手補完改播「縮短版儀式」~0.4s（覆寫 .intro-commit 的夜幕
   transform transition，仍保留 transition，transitionend 才會來收場），不再瞬跳。
   .intro-hint 的預設動畫本來就是純淡入，標 .rm-keep 讓它照常走。 */
@media (prefers-reduced-motion: reduce) {
  html.has-intro .intro-play .intro-veil { animation: none; }
  .star-glow { animation: none; }
  /* 縮短版儀式：夜幕用 ~0.4s 升完（非瞬跳）。
     !important 蓋過 base.css RM 通殺（*{transition-duration:.01ms!important}），
     這是 user 親手觸發的收場、刻意 opt-in 的短動作，僅限 .intro-commit 態。 */
  html.has-intro .intro-wait.intro-commit .intro-veil {
    transition: transform .4s ease-out !important;
  }
}

/* ---------- 通用 ---------- */
.section-title {
  font-family: var(--font-serif-tc);
  font-size: var(--text-h2);
  font-weight: 500;
  letter-spacing: .18em;
  text-align: center;
  margin-bottom: clamp(1.9rem, 5vw, 3rem);
}
/* 星座分隔線（SVG 連星）：進場時星光沿線點亮 */
.constell {
  display: block;
  width: 7.5rem;
  margin: calc(-1 * clamp(1.4rem, 4vw, 2.25rem)) auto clamp(1.75rem, 5vw, 2.75rem);
  color: var(--accent);
  overflow: visible;
  opacity: .8;
}
.constell path {
  stroke: currentColor;
  stroke-width: .8;
  stroke-linecap: round;
  opacity: .55;
  stroke-dasharray: 150;
  stroke-dashoffset: 150;
  transition: stroke-dashoffset 1.3s var(--ease-out) .25s;
}
.constell circle {
  fill: currentColor;
  opacity: 0;
  transition: opacity .8s var(--ease-out) .6s;
}
.constell.is-in path { stroke-dashoffset: 0; }
.constell.is-in circle { opacity: 1; }
/* 英文小標：Cormorant 斜體，星圖上的拉丁註記 */
.label-en {
  font-family: var(--font-serif-latin);
  font-style: italic;
  font-size: clamp(1.15rem, 3.6vw, 1.4rem);
  font-weight: 400;
  color: var(--accent);
  text-align: center;
  letter-spacing: .18em;
  margin-bottom: .6rem;
  line-height: 1.3;
}
.dot-sep::before { content: "\00B7"; margin-inline: .6em; opacity: .6; }

/* 區塊之間用髮絲線輕輕隔開 */
main .section + .section { border-top: 1px solid var(--hairline); }

/* ============ ① Hero：星空下的夜宴 ============ */
.hero {
  position: relative;
  overflow: hidden; /* 螢火蟲不外溢 */
  padding: clamp(4.5rem, 14vw, 7rem) var(--gutter) clamp(3.5rem, 10vw, 5rem);
  text-align: center;
}
.hero-content {
  position: relative;
  max-width: var(--content-max);
  margin-inline: auto;
}
/* 月牙印記：虛線圓環裡一彎新月（彩蛋①的錨點） */
.hero-moon {
  position: absolute;
  top: clamp(1.25rem, 4vw, 2.25rem);
  right: clamp(1rem, 5vw, 3rem);
  width: 5.1rem; height: 5.1rem;
  display: grid; place-items: center;
  border: 1px dashed rgba(var(--glow-rgb), .6);
  border-radius: 50%;
  transform: rotate(10deg);
  color: var(--accent);
  font-family: var(--font-serif-latin);
  font-style: italic;
  font-size: .92rem;
  line-height: 1.25;
  text-align: center;
  opacity: .85;
  pointer-events: none;
}
/* 新月本體：兩圓相疊的殘影，掛在文字後面 */
.hero-moon::before {
  content: "";
  position: absolute;
  top: -.55rem; right: -.35rem;
  width: 1.15rem; height: 1.15rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(var(--glow-rgb), .55);
  -webkit-mask-image: radial-gradient(circle at 30% 38%, transparent 55%, #000 56%);
  mask-image: radial-gradient(circle at 30% 38%, transparent 55%, #000 56%);
}
.hero-label {
  font-family: var(--font-serif-latin);
  font-style: italic;
  font-size: clamp(1.3rem, 4.6vw, 1.8rem);
  letter-spacing: .2em;
  line-height: 1.3;
  color: var(--accent);
  margin-bottom: clamp(1.25rem, 4vw, 2rem);
}
/* 窄螢幕：刊頭收斂、月牙縮小，兩者不相撞（430px 以下才需要） */
@media (max-width: 430px) {
  .hero-label { font-size: 1.05rem; letter-spacing: .12em; }
  .hero-moon { width: 4.3rem; height: 4.3rem; font-size: .78rem; top: 1rem; right: .9rem; }
}

/* 螢火蟲（render.js 注入 .wk-fireflies；緩慢升起的微光，關動畫時整組隱藏） */
.wk-fireflies { position: absolute; inset: 0; pointer-events: none; }
.wk-fireflies i {
  position: absolute;
  bottom: -2rem;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(var(--glow-rgb), .9);
  box-shadow: 0 0 10px rgba(var(--glow-rgb), .8), 0 0 22px rgba(var(--glow-rgb), .35);
  opacity: 0;
  animation: firefly-rise var(--fly, 18s) linear var(--wait, 0s) infinite;
}
@keyframes firefly-rise {
  0%   { opacity: 0; transform: translate3d(0, 0, 0) scale(.7); }
  10%  { opacity: .85; }
  50%  { transform: translate3d(var(--sway, 2rem), -55vh, 0) scale(1); }
  85%  { opacity: .5; }
  100% { opacity: 0; transform: translate3d(calc(var(--sway, 2rem) * -.6), -108vh, 0) scale(.8); }
}
/* 點按星塵（fx.js WKFX.tapBurst；層結構在 base.css .wk-burst-layer） */
.wk-star-p { border-radius: 50%; }
.wk-star-p1 { width: 6px; height: 6px; background: rgba(var(--glow-rgb), .95); box-shadow: 0 0 10px rgba(var(--glow-rgb), .8); }
.wk-star-p2 { width: 4px; height: 4px; background: rgba(237, 232, 221, .9); box-shadow: 0 0 8px rgba(237, 232, 221, .7); }
.wk-star-p3 { width: 5px; height: 5px; background: rgba(var(--glow-rgb), .75); box-shadow: 0 0 12px rgba(var(--glow-rgb), .55); }
@media (prefers-reduced-motion: reduce) {
  .wk-fireflies { display: none; }
}
.hero-greeting {
  font-size: clamp(.9rem, 2.6vw, 1rem);
  font-weight: 300;
  letter-spacing: .22em;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}
.hero-names {
  font-family: var(--font-serif-tc);
  font-size: clamp(2rem, 7vw, 3.4rem);
  font-weight: 500;
  letter-spacing: .14em;
  line-height: 1.3;
  text-wrap: balance;
  text-shadow: 0 0 30px rgba(var(--glow-rgb), .22);
}
.hero-names .amp {
  font-family: var(--font-serif-latin);
  font-style: italic;
  font-weight: 400;
  font-size: .58em;
  margin-inline: .3em;
  color: var(--accent);
}
.hero-names-en {
  font-family: var(--font-serif-latin);
  font-size: clamp(.95rem, 2.8vw, 1.15rem);
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: .6rem;
}
.hero-names-en:empty { display: none; }
.hero-date {
  margin-top: 1.1rem;
  font-size: clamp(.95rem, 2.8vw, 1.1rem);
  font-weight: 300;
  letter-spacing: .2em;
}

/* 主視覺：夜景照裱進香檳金細框，外圈一道微光（緩慢呼吸的漂浮） */
.hero-frame {
  position: relative;
  width: min(82%, 22rem);
  margin: clamp(2rem, 6vw, 3rem) auto 0;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  box-shadow:
    0 0 0 1px rgba(var(--glow-rgb), .5),
    0 0 34px rgba(var(--glow-rgb), .14),
    var(--shadow-soft);
  animation: frame-float 7s ease-in-out infinite alternate;
}
.hero-frame::after {
  content: "";
  position: absolute;
  inset: -.8rem;
  border: 1px solid rgba(var(--glow-rgb), .3);
  border-radius: calc(var(--radius) * 1.4);
  pointer-events: none;
}
/* 框角四芒星：右上一顆（金線框上的星飾） */
.hero-frame::before {
  content: "\2726";
  position: absolute;
  top: -1.25rem; right: -1.05rem;
  font-size: .95rem;
  line-height: 1;
  color: var(--accent);
  text-shadow: 0 0 12px rgba(var(--glow-rgb), .8);
  z-index: 1;
}
.hero-photo {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  border-radius: var(--radius);
}
@keyframes frame-float {
  from { transform: translateY(0); }
  to   { transform: translateY(-9px); }
}

/* fx 模式：GSAP 接手 hero 進場（等夜幕收場後開演）。
   CSS 基線動畫讓位，再把 GSAP 要演的元素藏起來。
   hero-frame 的 transform 屬於 frame-float CSS 動畫，GSAP 只碰 opacity/filter。 */
html.fx .hero .reveal { opacity: 1; transform: none; filter: none; transition: none; }
html.fx .hero-label,
html.fx .hero-greeting,
html.fx .hero-names,
html.fx .hero-names-en,
html.fx .hero-date,
html.fx .hero-frame,
html.fx .hero .countdown,
html.fx .hero-moon { opacity: 0; }

/* 倒數：夜卡＋星軌劃過（頂緣一道流光緩緩掃過；RM 通殺自動停） */
.countdown {
  position: relative;
  display: inline-flex;
  margin-top: clamp(2rem, 6vw, 2.75rem);
  padding: 1rem clamp(.4rem, 2vw, .9rem) .85rem;
  background: rgba(var(--glow-rgb), .05);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}
.countdown::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 34%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: star-trail 6s linear infinite;
}
@keyframes star-trail {
  from { transform: translateX(-110%); }
  to   { transform: translateX(400%); }
}
.cd-cell {
  display: grid;
  gap: .1rem;
  padding-inline: clamp(.9rem, 4vw, 1.6rem);
  text-align: center;
}
.cd-cell + .cd-cell { border-left: 1px solid var(--hairline); }
.cd-cell strong {
  font-family: var(--font-serif-latin);
  font-weight: 500;
  font-size: clamp(1.5rem, 5.5vw, 2.2rem);
  line-height: 1.1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.cd-cell span { font-size: var(--text-tiny); letter-spacing: .3em; color: var(--ink-soft); }
.countdown.is-past .cd-cell span { opacity: .5; }

/* ============ ② Our Story：星軌時間軸 ============ */
.story { position: relative; overflow: hidden; text-align: center; }
.timeline {
  display: grid;
  gap: clamp(2.75rem, 8vw, 4rem);
}
.timeline-item { display: grid; gap: .35rem; justify-items: center; }
/* 每則之間一顆發光星節點，進場時輕輕綻開 */
.timeline-item + .timeline-item::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(var(--glow-rgb), .7);
  opacity: .8;
  margin-bottom: clamp(1.5rem, 5vw, 2.25rem);
  transform: scale(0);
  transition: transform .7s var(--ease-out) .2s;
}
.timeline-item.is-in + .timeline-item::before,
.timeline-item.is-in::before { transform: scale(1); }
.tl-date {
  font-family: var(--font-serif-latin);
  font-style: italic;
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: .12em;
  color: var(--accent);
  line-height: 1.2;
}
.tl-title {
  font-family: var(--font-serif-tc);
  font-size: var(--text-h3);
  font-weight: 500;
  letter-spacing: .14em;
}
.tl-text {
  color: var(--ink-soft);
  font-weight: 300;
  max-width: 30em;
}
/* 彩蛋②：流星劃過（render.js 注入 .story-meteor；一次性，RM 通殺＝不演） */
.story-meteor {
  position: absolute;
  top: 14%;
  left: -18%;
  width: 96px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(var(--glow-rgb), .95));
  box-shadow: 0 0 12px rgba(var(--glow-rgb), .6);
  transform: rotate(16deg);
  pointer-events: none;
  animation: meteor-cross 1.1s ease-out forwards;
}
@keyframes meteor-cross {
  0%   { opacity: 0; transform: translate3d(0, 0, 0) rotate(16deg); }
  12%  { opacity: 1; }
  78%  { opacity: 1; }
  100% { opacity: 0; transform: translate3d(120vw, 34vw, 0) rotate(16deg); }
}
.story-echo {
  margin-top: clamp(1.75rem, 5vw, 2.5rem);
  font-family: var(--font-serif-tc);
  font-size: var(--text-small);
  letter-spacing: .1em;
  color: var(--accent);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .7s var(--ease-out) .5s, transform .7s var(--ease-out) .5s;
}
.story-echo.is-open { opacity: 1; transform: none; }

/* ============ ③ Gallery：懸星燈箱（縱向星圖＋點燈） ============ */
.photo-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.2rem, 6vw, 3rem) clamp(1.1rem, 4vw, 2rem);
  padding-top: 1.4rem;
  max-width: 46rem;
  margin-inline: auto;
}
/* 中央垂直星塵虛線：整列燈箱掛在這條星圖上 */
.photo-grid::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -.5rem; bottom: 1rem;
  width: 1px;
  background: repeating-linear-gradient(180deg, rgba(var(--glow-rgb), .4) 0 4px, transparent 4px 14px);
}
.photo-item {
  position: relative;
  margin: 0;
  background: var(--paper-raise);
  padding: .55rem;
  border-radius: calc(var(--radius) * .6);
  box-shadow:
    0 0 0 1px rgba(var(--glow-rgb), .3),
    0 0 24px rgba(var(--glow-rgb), .1),
    0 18px 44px -20px rgba(0, 0, 0, .75);
  transition: box-shadow .5s var(--ease-out);
}
/* 交錯下沉：zigzag 星圖（375px 也成立） */
.photo-item:nth-child(even) { margin-top: 2.4rem; }
/* 掛繩＋星節點：每個燈箱從星圖垂下 */
.photo-item::before {
  content: "";
  position: absolute;
  top: -1.05rem; left: 50%;
  width: 1px; height: 1.05rem;
  background: rgba(var(--glow-rgb), .45);
}
.photo-item::after {
  content: "";
  position: absolute;
  top: -1.35rem; left: 50%;
  translate: -50% 0;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(var(--glow-rgb), .8);
}
/* fx 模式：GSAP 接手點燈（transition 讓位，避免雙重 easing） */
html.fx .photo-item.reveal {
  transition: none;
  transform: none;
  opacity: 0;
}
.photo-item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: calc(var(--radius) * .42);
  cursor: pointer;
}
@media (hover: hover) {
  .photo-item:hover {
    box-shadow:
      0 0 0 1px rgba(var(--glow-rgb), .55),
      0 0 34px rgba(var(--glow-rgb), .2),
      0 22px 50px -20px rgba(0, 0, 0, .8);
  }
}
@media (min-width: 900px) {
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  /* 三欄時 zigzag 改成 中-低-中 的節奏 */
  .photo-item:nth-child(even) { margin-top: 0; }
  .photo-item:nth-child(3n + 2) { margin-top: 2.4rem; }
}

/* Lightbox（深夜版：更沉的底） */
.wk-lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(5, 9, 18, .95);
  padding: max(4vh, env(safe-area-inset-top, 0px)) max(4vw, env(safe-area-inset-right, 0px))
           max(4vh, env(safe-area-inset-bottom, 0px)) max(4vw, env(safe-area-inset-left, 0px));
  overscroll-behavior: contain;
}
.wk-lightbox.is-open { display: flex; }
.wk-lightbox img {
  max-width: 100%; max-height: 88dvh;
  border-radius: .5rem;
  margin-inline: auto;
}
.wk-lightbox button {
  position: absolute;
  color: #ede8dd;
  font-size: 2rem;
  line-height: 1;
  padding: .75rem 1rem;
  min-width: 44px; min-height: 44px;
  display: grid; place-items: center;
  opacity: .8;
  transition: opacity .3s var(--ease-out);
}
.wk-lightbox button:hover { opacity: 1; }
.wk-lightbox button:active { opacity: 1; scale: .92; }
.wk-lb-close { top: max(.5rem, env(safe-area-inset-top, 0px)); right: max(.75rem, env(safe-area-inset-right, 0px)); font-size: 2.4rem; }
.wk-lb-prev { left: max(.25rem, env(safe-area-inset-left, 0px)); top: 50%; transform: translateY(-50%); }
.wk-lb-next { right: max(.25rem, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); }

/* ============ ④ Event Details：全置中 ============ */
.details { text-align: center; }
.details-date {
  font-family: var(--font-serif-latin);
  font-size: var(--text-h3);
  letter-spacing: .18em;
}
.details-note { color: var(--ink-soft); font-weight: 300; font-size: var(--text-small); letter-spacing: .14em; margin-top: .25rem; }
.details-note:empty { display: none; }

.event-list {
  margin: clamp(2rem, 6vw, 3rem) auto 0;
  max-width: 22rem;
  display: grid;
  gap: clamp(1.75rem, 5vw, 2.25rem);
}
.event-row { display: grid; gap: .2rem; justify-items: center; }
.event-row dt {
  font-family: var(--font-serif-latin);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: .12em;
}
.event-row dd strong {
  font-family: var(--font-serif-tc);
  font-size: var(--text-h3);
  font-weight: 500;
  letter-spacing: .16em;
  display: block;
}
.event-row dd span { color: var(--ink-soft); font-weight: 300; font-size: var(--text-small); letter-spacing: .1em; }

.calendar-actions {
  display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center;
  margin-top: clamp(2rem, 6vw, 2.75rem);
}
.parents {
  margin-top: clamp(2.5rem, 7vw, 3.5rem);
  color: var(--ink-soft);
  font-weight: 300;
  font-size: var(--text-small);
  letter-spacing: .18em;
}
.parents:empty { display: none; }

/* ============ ④b Dress Code（色卡像夜空掛燈：奇偶錯位） ============ */
.dresscode { text-align: center; }
.dc-note { color: var(--ink-soft); font-weight: 300; font-size: var(--text-small); letter-spacing: .1em; max-width: 30em; margin-inline: auto; }
.dc-note:empty { display: none; }
.dc-swatches {
  list-style: none;
  display: flex; justify-content: center; align-items: flex-start; flex-wrap: wrap;
  gap: clamp(1.1rem, 5vw, 1.9rem);
  padding: 0;
  margin: clamp(2rem, 6vw, 2.75rem) 0 0;
}
.dc-swatch {
  width: clamp(2.4rem, 8vw, 2.9rem);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--hairline), 0 0 14px rgba(var(--glow-rgb), .12);
}
/* 錯位用 margin 不用 transform：避免跟 .reveal 進場動畫的 transform 打架 */
.dc-swatch:nth-child(even) { margin-top: 10px; }

/* ============ ⑤b 自訂區塊 ============ */
.custom { text-align: center; }
.custom-text {
  color: var(--ink-soft); font-weight: 300; white-space: pre-line;
  max-width: 30em; margin: clamp(1.5rem, 5vw, 2rem) auto 0;
}
.custom-text:empty { display: none; }

/* ============ ⑤c 刮刮樂悄悄話（結構在 base.css；這裡只給星夜的皮） ============
   夜卡＋星雲塗層（--scratch-a/b 給 utils.js initScratch 畫漸層用） */
.secret .scratch-card {
  background: var(--paper-raise);
  border: 1px solid rgba(var(--glow-rgb), .3);
  box-shadow: 0 0 26px rgba(var(--glow-rgb), .1), var(--shadow-soft);
}
.secret .scratch-text { color: var(--ink); font-weight: 300; }
.secret .scratch-hint { color: var(--ink-soft); }
.secret .scratch-open { color: var(--ink-soft); }

/* ============ ⑤ Venue ============ */
.venue { text-align: center; }
.venue .section-title { margin-bottom: clamp(1.9rem, 5vw, 3rem); }
.venue-hall { color: var(--accent); letter-spacing: .2em; font-weight: 300; }
.venue-hall:empty { display: none; }
.venue-address { color: var(--ink-soft); font-weight: 300; margin-top: .25rem; letter-spacing: .06em; }
/* 地圖 iframe 內容是亮的：夜藍裱框收住，不做濾鏡反轉（地圖色彩會失真） */
.map-frame {
  margin-top: clamp(1.5rem, 5vw, 2.5rem);
  border-radius: calc(var(--radius) * .5);
  overflow: hidden;
  border: 1px solid rgba(var(--glow-rgb), .32);
  box-shadow: 0 0 22px rgba(var(--glow-rgb), .08);
  aspect-ratio: 4 / 3;
}
@media (min-width: 700px) { .map-frame { aspect-ratio: 16 / 8; } }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.venue-bottom {
  margin-top: clamp(1.75rem, 5vw, 2.5rem);
  display: grid;
  gap: 1.5rem;
  text-align: left;
}
.transport { display: grid; gap: .9rem; }
.transport li { display: grid; grid-template-columns: 3.5rem 1fr; gap: 1rem; align-items: baseline; }
.transport strong { font-weight: 500; letter-spacing: .2em; color: var(--accent); }
.transport span { color: var(--ink-soft); font-weight: 300; }
@media (min-width: 700px) {
  .venue-bottom { grid-template-columns: 1fr auto; align-items: start; }
}

/* ============ ⑥ RSVP（夜藍浮面，比頁底亮半階） ============ */
.rsvp { background: var(--sand); }
.rsvp-intro { max-width: 30em; margin-inline: auto; text-align: center; font-weight: 300; }
.rsvp-deadline {
  font-size: var(--text-small);
  letter-spacing: .12em;
  color: var(--ink-soft);
  margin-top: .5rem;
  text-align: center;
}

.rsvp-form {
  margin-top: clamp(2rem, 6vw, 3rem);
  display: grid;
  gap: 1.5rem;
}
.rsvp .field label, .rsvp .field legend {
  font-size: var(--text-small);
  letter-spacing: .12em;
  color: var(--ink);
}
.rsvp .field input, .rsvp .field textarea, .rsvp .field select {
  background: var(--paper-raise);
  border-color: var(--hairline);
}
/* 深底 focus ring：香檳色（蓋掉 base.css 的森林綠 rgba） */
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--glow-rgb), .28);
}
/* 深底 select 的原生下拉箭頭在部分瀏覽器是黑的：自畫香檳箭頭 */
.rsvp .field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5 L6 6.5 L11 1.5' fill='none' stroke='%23d4b483' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.6rem;
}

.attend-field { border: 0; }
.attend-options { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: .5rem; }
.attend-pill input { position: absolute; opacity: 0; pointer-events: none; }
.attend-pill span {
  display: flex; align-items: center; justify-content: center;
  padding: .8rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--paper-raise);
  box-shadow: inset 0 0 0 1px var(--hairline);
  letter-spacing: .1em;
  transition: background .35s var(--ease-out), color .35s var(--ease-out), box-shadow .35s var(--ease-out), scale .2s var(--ease-out);
  user-select: none;
}
.attend-pill:active span { scale: .97; }
.attend-pill input:checked + span {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: none;
  font-weight: 500;
}
.attend-pill input:focus-visible + span { box-shadow: 0 0 0 3px rgba(var(--glow-rgb), .35); }

.rsvp-details { display: grid; gap: 1.5rem; }
.field-row { display: grid; gap: 1.5rem; }
@media (min-width: 520px) { .field-row { grid-template-columns: repeat(3, 1fr); } }

/* stepper：−/＋ 直覺加減（手機免打字）；容器帶框，input 置中無框 */
.stepper {
  display: grid;
  grid-template-columns: 3rem 1fr 3rem;
  align-items: stretch;
  border-radius: calc(var(--radius) * .6);
  background: var(--paper-raise);
  box-shadow: inset 0 0 0 1px var(--hairline);
  overflow: hidden;
}
.rsvp .field .stepper input {
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
  padding-inline: .25rem;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input[type="number"] { -moz-appearance: textfield; }
.rsvp .field .stepper input:focus-visible { box-shadow: none; border-color: transparent; }
.stepper:focus-within { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px rgba(var(--glow-rgb), .25); }
.stepper button {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1;
  transition: background .3s var(--ease-out), opacity .3s var(--ease-out);
}
.stepper button:active { background: rgba(var(--glow-rgb), .12); }
.stepper button[disabled] { opacity: .3; cursor: default; }
.cap-note { font-size: var(--text-small); color: var(--ink-soft); }

.rsvp-error { color: var(--warn); font-size: var(--text-small); }
.rsvp-submit { width: 100%; padding-block: 1.05rem; letter-spacing: .3em; }
@media (min-width: 700px) { .rsvp-submit { width: auto; justify-self: center; padding-inline: 3.5rem; } }

.rsvp-success, .rsvp-closed {
  margin-top: clamp(2rem, 6vw, 3rem);
  text-align: center;
  display: grid;
  gap: .75rem;
  justify-items: center;
  padding: clamp(2rem, 6vw, 3rem) var(--gutter);
  border-radius: var(--radius);
  background: var(--paper-raise);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.success-mark {
  width: 3rem; height: 3rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1.4rem;
}
.rsvp-success h3, .rsvp-closed h3 {
  font-family: var(--font-serif-tc);
  font-size: var(--text-h3);
  font-weight: 500;
  letter-spacing: .14em;
}
/* 紀念章：星章（落章動畫在 base.css wk-stamp-drop） */
.rsvp-success { position: relative; }
.rsvp-stamp {
  --stamp-rot: 8deg;
  position: absolute;
  top: .9rem; right: .9rem;
  width: 4.3rem; height: 4.3rem;
  display: grid;
  place-content: center;
  gap: .1rem;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(var(--glow-rgb), .45);
}
.rsvp-stamp i { font-style: normal; font-size: 1rem; line-height: 1; }
.rsvp-stamp em { font-family: var(--font-serif-latin); font-style: italic; font-size: .68rem; line-height: 1.1; letter-spacing: .04em; }
.success-note { font-size: var(--text-small); color: var(--ink-soft); }

/* ============ ⑦ Footer：夜空落款 ============ */
.footer {
  text-align: center;
  padding: clamp(3.5rem, 10vw, 5.5rem) 0;
  padding-bottom: calc(clamp(3.5rem, 10vw, 5.5rem) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--hairline);
}
.footer-yours {
  font-family: var(--font-serif-latin);
  font-style: italic;
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  letter-spacing: .18em;
  color: var(--accent);
  margin-bottom: 1.1rem;
}
.footer-message { color: var(--ink-soft); font-weight: 300; max-width: 28em; margin-inline: auto; }
.footer-names {
  margin-top: 1rem;
  font-family: var(--font-serif-tc);
  font-size: var(--text-h3);
  font-weight: 500;
  letter-spacing: .24em;
}
.footer-brand {
  display: inline-block;
  margin-top: 2.5rem;
  font-size: var(--text-tiny);
  letter-spacing: .12em;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: .15rem;
  transition: color .3s var(--ease-out), border-color .3s var(--ease-out);
}
.footer-brand:hover { color: var(--accent); border-color: var(--accent); }
/* ============ 彩蛋（隱藏小驚喜；render.js 在 eggs 開啟時接線） ============ */
/* ①：點 hero 月牙印記，旁邊落下一顆「for ◯◯」的小星 */
.hero-moon { pointer-events: auto; cursor: pointer; }
.moon-echo {
  position: absolute;
  left: -46%;
  bottom: -40%;
  padding: .3rem .7rem;
  border: 1px solid rgba(var(--glow-rgb), .7);
  border-radius: 999px;
  font-family: var(--font-serif-latin);
  font-style: italic;
  font-size: .74rem;
  letter-spacing: .08em;
  color: var(--accent);
  background: rgba(10, 16, 30, .82);
  box-shadow: 0 0 14px rgba(var(--glow-rgb), .3);
  white-space: nowrap;
  pointer-events: none;
  --stamp-rot: -9deg;
  animation: wk-stamp-drop .5s cubic-bezier(.2, 1.4, .4, 1) both;
}
/* ③：footer 的「✶ 附註」（極淡，點開浮出冠名一句話） */
.ps-egg {
  display: block;
  margin: 1.6rem auto 0;
  font-family: var(--font-serif-tc);
  font-size: .85rem;
  letter-spacing: .18em;
  color: var(--ink-soft);
  opacity: .5;
  padding: .4rem 1rem;
  transition: opacity .3s ease;
}
.ps-egg:hover { opacity: .85; }
.ps-egg-text {
  margin-top: 1.4rem;
  font-family: var(--font-serif-tc);
  font-size: var(--text-small);
  letter-spacing: .1em;
  color: var(--accent);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.ps-egg-text.is-open { opacity: 1; transform: none; }

/* ============ ⑦c 連星成名（招牌儀式） ============
   按住夜空：進度 --wk-press（0~1）由 shared/utils.js WK.press 寫入按鈕，
   星星依 --i 序逐顆亮起；鬆手（commit）星座連線畫出、賓客名浮現。
   無 GSAP 儀式照樣完整；RM：press 引擎改單點即成、transition 被通殺
   ＝瞬間完成態，正確降級。 */
.blessing {
  margin-top: 2.6rem;
  padding-top: 2.2rem;
  border-top: 1px dashed var(--hairline);
}
.blessing-lead {
  font-size: var(--text-small);
  color: var(--ink-soft);
  font-weight: 300;
  letter-spacing: .08em;
}
.blessing-seal {
  --wk-press: 0;
  position: relative;
  display: block;
  width: min(100%, 19rem);
  margin: 1.3rem auto .9rem;
  padding: .4rem;
  border-radius: var(--radius);
  background: radial-gradient(120% 90% at 50% 0%, rgba(var(--glow-rgb), .07) 0%, transparent 60%), var(--paper-raise);
  box-shadow: inset 0 0 0 1px var(--hairline);
  touch-action: none;                 /* 按住蓄力不觸發捲頁 */
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  transition: box-shadow .45s var(--ease-out);
}
/* 按住時整片夜空微微亮起 */
.blessing-seal::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(var(--glow-rgb), .5), 0 0 30px rgba(var(--glow-rgb), .22);
  opacity: var(--wk-press, 0);
  transition: opacity .45s var(--ease-out);
  pointer-events: none;
}
.bs-sky { width: 100%; height: auto; display: block; }
/* 星座連線：commit 前隱藏，commit 後沿線畫出 */
.bs-line {
  stroke: var(--accent);
  stroke-width: 1.3;
  stroke-linecap: round;
  opacity: .85;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
}
.blessing-seal.is-committed .bs-line {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.1s var(--ease-out) .15s;
}
/* 星星逐顆亮起：--i（0~4）＝點亮順位；opacity 由瀏覽器夾到 0~1 */
.bs-stars circle {
  fill: var(--accent);
  opacity: calc(var(--wk-press, 0) * 6 - var(--i, 0) * 1.1);
  transition: opacity .3s var(--ease-out);
}
.blessing-seal.is-pressing .bs-stars circle,
.blessing-seal.is-pressing::after { transition: none; }
.blessing-seal.is-committed .bs-stars circle { opacity: 1; }
/* 中央錨星：賓客名首字，隨蓄力發亮 */
.bs-initials {
  position: absolute;
  left: 50%;
  bottom: .85rem;
  translate: -50% 0;
  font-style: normal;
  font-family: var(--font-serif-tc);
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1;
  color: var(--accent);
  opacity: calc(.4 + var(--wk-press, 0) * .6);
  text-shadow: 0 0 14px rgba(var(--glow-rgb), calc(var(--wk-press, 0) * .8));
}
.blessing-seal.is-committed .bs-initials { opacity: 1; text-shadow: 0 0 16px rgba(var(--glow-rgb), .8); }
.blessing-hint {
  font-size: var(--text-tiny);
  letter-spacing: .22em;
  text-indent: .22em;
  color: var(--ink-soft);
  opacity: .75;
  transition: opacity .4s ease, color .4s ease;
}
/* 快點一下沒成：提示搖醒（引擎掛 .wants-hold 1.6s） */
.blessing-seal.wants-hold ~ .blessing-hint {
  color: var(--accent);
  opacity: 1;
  animation: bs-nudge .45s ease;
}
@keyframes bs-nudge {
  0%, 100% { transform: none; }
  30%      { transform: translateY(2px); }
  65%      { transform: translateY(-1px); }
}
/* 完成訊息：星座畫完後浮現（RM transition 被通殺＝瞬現，正確降級） */
.blessing-done {
  margin-top: .9rem;
  font-family: var(--font-serif-tc);
  font-size: var(--text-body);
  letter-spacing: .1em;
  color: var(--accent);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .7s var(--ease-out) .9s, transform .7s var(--ease-out) .9s;
}
.blessing.is-sealed .blessing-hint { opacity: 0; }
.blessing.is-sealed .blessing-done { opacity: 1; transform: none; }

/* 新人聯絡方式 icon 連結（頁尾；填了才由 render.js 生成，空則 [hidden]） */
.footer-contacts { margin-top: 1.75rem; display: flex; flex-direction: column; align-items: center; gap: .55rem; }
.footer-contacts[hidden] { display: none; }
.contact-row { display: inline-flex; align-items: center; gap: .7rem; }
.contact-who { font-size: var(--text-tiny); letter-spacing: .12em; color: var(--ink-soft); font-weight: 300; }
.contact-ico { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-block: -12px; color: var(--ink-soft); transition: color .3s var(--ease-out), transform .3s var(--ease-out); }
.contact-ico + .contact-ico { margin-left: -.7rem; }
.contact-ico svg { width: 20px; height: 20px; display: block; }
.contact-ico:hover { color: var(--accent); transform: translateY(-1px); }
