/* =========================================================
   rouge-ink（胭脂墨韻，原 orbit-demo） — 良辰帖識別（第一批，2026-11-18）
   色彩：米白 #f6f5ec＋墨 #2d2b25（日）／墨夜 #1d1b17＋米白字（夜）；邀請轉場起整頁翻面：日間深墨 #26241e、夜間深胭脂 #4b2229（--invert-bg）
         胭脂點綴只用在紅線、太空梭、紅印與翻面區的小標（--thread、--seal-ink、--rouge-fill）
   標題：中文直排（.vt），英文改成旁邊的小字
   動效：畫面釘住用 sticky；釘住期間的進度 --p 由 CSS 捲動動畫驅動（不支援時 JS 代算）
   ========================================================= */

@property --p { syntax: "<number>"; inherits: true; initial-value: 0; }

:root {
  color-scheme: light dark;
  &:has(> head > meta[name="color-scheme"][content="dark"]) { color-scheme: dark; }
  &:has(> head > meta[name="color-scheme"][content="light"]) { color-scheme: light; }

  /* 墨（取代原本的鈷藍）、米白、胭脂 */
  --sumi: #2d2b25;
  --sumi-2: #4a463d;      /* 墨色按鈕的 hover、夜間的小標底 */
  --sumi-deep: #26241e;   /* 深墨區塊（日期與會場、注意事項） */
  --sumi-ink: #151410;
  --cream: #f6f5ec;
  /* 翻面區塊（邀請轉場起）：日間深墨；夜間底色本來就是墨夜，深墨貼上去只有 1.1:1 看不出翻面，所以改成深胭脂 */
  --invert-bg: light-dark(var(--sumi-deep), #4b2229);
  --invert-orb: light-dark(var(--sumi-ink), #2c1317);
  --rouge-fill: #9e3b45;  /* 胭脂底＋米白字（深墨區的小標） */
  --thread: #c4505b;      /* 紅線、太空梭 */

  --page: light-dark(#f6f5ec, #1d1b17);
  --ink: light-dark(#2d2b25, #f6f5ec);
  --ink-soft: light-dark(#48443c, #ded6c7); /* 2026-11-25 小字對比（b4r2）：只加深到壓在光球上的次要字剛好 ≥4.5:1（倒數單位另計，見 --cd-unit）；原 #6b6559／#cdc1ab，同色相只改明度 */
  --cd-unit: light-dark(#3e3b34, #ede9e1); /* 倒數的「天／時／分」：光球最深處底色更深，要 ≥4.5:1 只能再往主文字靠（日 1.27:1、夜 1.11:1 對 --ink），取捨待使用者決定 */
  /* 實心元件（選取的選項、送出鈕）：日間墨底米白字；夜間反過來，墨底在夜色上會看不出來 */
  --fill: light-dark(var(--sumi), var(--cream));
  --on-fill: light-dark(var(--cream), var(--sumi));
  --fill-hover: light-dark(var(--sumi-2), #e2dac9);
  /* 小標與強調底色（.tag、.hl）：夜間改用較亮的墨，才看得出底色塊 */
  --chip: light-dark(var(--sumi), var(--sumi-2));
  --accent-fill: light-dark(#ffffff, #7a6d5a); /* 首屏名字：夜間的填色對夜色 3.4:1，外框米白 */
  --accent-stroke: light-dark(#2d2b25, #f6f5ec);
  --orb: light-dark(#7f7668, #a19581);
  --orb-glow: light-dark(#ffffff, #3b352c);
  --dot: light-dark(#b29079, #cdc1ab);
  --card: light-dark(rgb(250 248 241 / .82), rgb(38 36 30 / .8));
  --field: light-dark(#efe7da, #2a2722);
  --field-line: #8a8172;
  --err: light-dark(#c8102e, #ff8a9b);
  --chrome: var(--ink);
  --om-line: light-dark(#000000, #f6f5ec); /* OpenMoji 線條：日間原本的黑、夜間米白 */

  /* 字體：沿用 CY_Wedding 的設定（第 11 輪）。--f-disp＝CY 的 --serif（英文標題）、--f-didot＝日期與數字、
     --f-script＝名字與 See you Soon!、--f-sans／--f-zh＝CY 的 --sans／--serif-tc（內文與中文，英文是等寬、中文是 Noto Sans TC） */
  --f-script: "canvas-script", cursive;
  --f-disp: "Cormorant Garamond", "Noto Sans TC", serif;
  --f-didot: "GFS Didot", "Cormorant Garamond", "Noto Sans TC", serif;
  --f-sans: "Roboto Mono", "Noto Sans TC", monospace;
  --f-zh: "Roboto Mono", "Noto Sans TC", monospace;

  --rail: 44px;
  /* 第 12 輪（A1）：參照站的緩動語彙。ease-out＝絕大多數「出現」；sweep＝線條掃過；in-out＝遮罩擦過、位置交換；back＝小物件彈出（尾端過衝）。
     時長只有三檔（快 .2s／基本 .4s／慢 .8s），首屏與致詞這類大場面另用 .8–1.1s。--ease 改指向 ease-out（原本 .22,.8,.2,1） */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-sweep: cubic-bezier(.33, 1, .68, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-back: cubic-bezier(.34, 1.46, .64, 1);
  --dur-fast: .2s;
  --dur: .4s;
  --dur-slow: .8s;
  --ease: var(--ease-out);

  /* 顆粒：黑點（日）、白點（夜／深墨底）、遮罩用 */
  --noise-k: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2.6 0 0 0 -1.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --noise-w: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 2.6 0 0 0 -1.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --noise-m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='1' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.9 0 0 0 -.45'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain: var(--noise-k);
}

/* 夜間時換成白色顆粒（非顏色值，不能用 light-dark） */
@media (prefers-color-scheme: dark) {
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) { --grain: var(--noise-w); }
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) { --grain: var(--noise-w); }

/* 進入深墨底區塊（JS 加上 .is-invert）：外框改米白 */
:root.is-invert { --chrome: var(--cream); }

/* ---------- 基本 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
:root.motion { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 14px/1.9 var(--f-zh);
  overflow-x: clip;
  transition: background-color .6s, color .6s;
}
/* 各區塊自己裁掉溢出的裝飾（只裁 body 擋不住手機版版面變寬；clip 不會讓 sticky 失效） */
main > section, .footer { overflow-x: clip; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden:where(:not(:focus-within, :active)) {
  font-weight: 400;
  position: absolute !important; clip-path: inset(50%) !important; overflow: hidden !important;
  width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important;
  border: 0 !important; white-space: nowrap !important;
}
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--sumi); color: var(--cream); padding: 8px 14px; font: 500 12px var(--f-sans); }
.skip:focus { top: 12px; }

svg use { fill: currentColor; }
/* OpenMoji 圖示（內嵌圖示集 #om-*）：線條跟著 --om-line，深墨底與夜間自動換成米白 */
.om { display: inline-block; width: 1.25em; height: 1.25em; vertical-align: -.28em; flex: none; overflow: visible; }
:is(.om, .hero__daisy, .hero__spark, .menu__daisy, .message__tick, .message__clovers svg, .about__thread-star,
  .story__ring-ship, .story__moon, .dv__stars svg, .dv__venue-star, .dv__ext) { color: var(--om-line); }
.is-invert .chrome, .menu, .message__card, .preloader, .about__panel { --om-line: var(--cream); }
/* 致詞卡片上下那兩排星星畫在卡片外的頁面底色上，線條要跟一般頁面一樣 */
.message__stars { --om-line: light-dark(#000000, #f6f5ec); }

.hl { background: var(--chip); color: var(--cream); font: 500 9px/1.32 var(--f-sans); letter-spacing: .04em; text-transform: uppercase; padding: 1px 3px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hl--inv { background: var(--cream); color: var(--sumi); }
.tag { display: inline-block; background: var(--chip); color: var(--cream); font: 500 9px/1.5 var(--f-sans); letter-spacing: .06em; padding: 0 6px; text-transform: uppercase; }
.tag--bright { background: var(--rouge-fill); font: 500 11px/1.6 var(--f-zh); letter-spacing: .1em; padding: 2px 10px; }
.pill { display: inline-block; border: 1px solid currentColor; border-radius: 99px; padding: 0 14px; font: 400 10px/1.8 var(--f-sans); }

/* ---------- 中文直排標題（良辰帖識別，2026-11-18）：英文改成旁邊的橫排小字 ---------- */
.vt {
  writing-mode: vertical-rl;
  font: 500 var(--vt-size, clamp(2.25rem, 5vw, 4.5rem))/1.1 var(--f-zh);
  letter-spacing: .16em;
  white-space: nowrap;
}
.vt-cap { font: 500 .75rem/1.5 var(--f-sans); letter-spacing: .12em; }

/* ---------- 佔位圖（暖灰、茶褐色調） ---------- */
.ph { position: relative; overflow: hidden; background-color: #b3a690; isolation: isolate; }
.ph::after { content: ""; position: absolute; inset: 0; background-image: var(--noise-k); opacity: .35; mix-blend-mode: multiply; pointer-events: none; }
.ph__tag { position: absolute; left: 10px; bottom: 8px; z-index: 1; font: 500 9px/1 var(--f-sans); letter-spacing: .12em; color: rgb(255 255 255 / .85); }
.ph--sky { background:
  radial-gradient(ellipse 15% 34% at 56% 76%, #2f2a23 0 70%, transparent 72%),
  radial-gradient(ellipse 12% 30% at 44% 80%, #4a4237 0 70%, transparent 72%),
  radial-gradient(circle at 50% 46%, #fffaf0 0 9%, transparent 10%),
  linear-gradient(180deg, #c9b597 0%, #e2d5bd 55%, #f1e9da 100%); }
.ph--wall { background:
  radial-gradient(ellipse 7% 26% at 36% 64%, #2c2721 0 70%, transparent 72%),
  radial-gradient(ellipse 9% 28% at 62% 64%, #f3eee3 0 70%, transparent 72%),
  linear-gradient(180deg, #a29683 0%, #857968 62%, #5d5546 63%, #4a4338 100%); }
.ph--c1 { background: radial-gradient(circle at 30% 30%, #e4d2b2 0 6%, transparent 7%), radial-gradient(circle at 70% 40%, #efe4cf 0 4%, transparent 5%), radial-gradient(ellipse 20% 36% at 50% 80%, #15120e 0 70%, transparent 72%), linear-gradient(160deg, #2e2720, #5e4f3f); }
.ph--c2 { background: radial-gradient(ellipse 40% 20% at 50% 85%, #dbd2c3 0 70%, transparent 72%), linear-gradient(170deg, #c3b49c, #7a6b58); }
.ph--c3 { background: radial-gradient(ellipse 16% 30% at 40% 62%, #2b261f 0 70%, transparent 72%), radial-gradient(ellipse 16% 30% at 60% 62%, #473f35 0 70%, transparent 72%), linear-gradient(180deg, #e3dacb, #988b77); }
.ph--c4 { background: radial-gradient(circle at 50% 42%, #3b342b 0 16%, transparent 17%), linear-gradient(180deg, #f1ebe0, #c1b49e 70%, #8b7e6a); }
.ph--c5 { background: radial-gradient(ellipse 30% 14% at 50% 90%, #545437 0 70%, transparent 72%), linear-gradient(180deg, #d5c3a2, #efe6d4 70%, #a09a74 71%, #737050); }
.ph--c6 { background: radial-gradient(ellipse 10% 26% at 48% 60%, #251f19 0 70%, transparent 72%), linear-gradient(180deg, #e1d3bc 0%, #c2b092 45%, #7f6e58 46%, #56493b 100%); }

/* =========================================================
   背景：霧狀光球＋顆粒＋浮點（固定在畫面後方）
   ========================================================= */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg__layer { position: absolute; inset: 0; transition: opacity .9s var(--ease); }
.bg__layer--day { background: var(--page); }
.bg__layer--invert { background: var(--invert-bg); opacity: 0; }
.is-invert .bg__layer--invert { opacity: 1; }
.orb {
  position: absolute; width: 38vmax; aspect-ratio: 1; border-radius: 50%;
  background: var(--orb);
  -webkit-mask-image: var(--noise-m), radial-gradient(closest-side, #000 25%, rgb(0 0 0 / .55) 60%, transparent 100%);
  mask-image: var(--noise-m), radial-gradient(closest-side, #000 25%, rgb(0 0 0 / .55) 60%, transparent 100%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.orb--1 { left: 6vw; top: -14vmax; }
.orb--2 { right: 8vw; top: 2vmax; width: 32vmax; }
.orb--3 { left: 40vw; bottom: -22vmax; width: 34vmax; background: var(--orb-glow); }
.bg__layer--invert .orb { background: var(--invert-orb); opacity: .85; }
.bg__layer--invert .orb--3 { background: #6e5e4b; opacity: .5; }
:root.motion {
  .orb { animation: orb-drift 26s ease-in-out infinite alternate; }
  .orb--2 { animation-duration: 32s; animation-direction: alternate-reverse; }
  .orb--3 { animation-duration: 38s; }
}
@keyframes orb-drift { to { translate: 5vw 6vh; } }
.bg__grain { position: absolute; inset: 0; background-image: var(--grain); opacity: .3; }
.is-invert .bg__grain { background-image: var(--noise-w); opacity: .35; }
.bg__dots i { position: absolute; width: var(--s, 3px); height: var(--s, 3px); background: var(--dot); border-radius: 1px; opacity: .8; transition: background-color .9s; }
.is-invert .bg__dots i { background: var(--cream); }
:root.motion {
  .bg__dots i { animation: dot-float var(--t, 14s) ease-in-out infinite alternate; }
}
@keyframes dot-float { to { translate: var(--dx, 10px) var(--dy, -16px); } }

/* =========================================================
   載入畫面
   ========================================================= */
.preloader { display: none; }
.js .preloader {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 120;
  background: var(--sumi); color: var(--cream);
  transition: opacity .7s var(--ease), visibility 0s .7s;
}
.is-ready .preloader { opacity: 0; visibility: hidden; }
.preloader__dial { width: 180px; height: 180px; grid-area: 1 / 1; overflow: visible; }
.preloader__ring { fill: none; stroke: var(--cream); stroke-width: 1.4; }
.preloader__pie { fill: none; stroke: var(--cream); stroke-width: 68; stroke-dasharray: var(--pct, 0) 100; transform: rotate(-90deg); transform-origin: 100px 100px; }
/* 太空梭沿轉盤繞行：機頭朝飛行方向（轉盤的切線）。梭在轉盤最上方（時鐘 12 點）時向右飛，所以先自轉 90°，之後跟著轉盤一起轉，機頭永遠貼著切線 */
.preloader__orbit { transform-origin: 100px 100px; transform: rotate(calc(var(--pct, 0) * 3.6deg)); }
.preloader__mark { color: var(--thread); transform-origin: 100px 22px; transform: rotate(90deg); } /* (100, 22)＝梭的中心，在圓環上 */
.preloader__num { grid-area: 1 / 1; font: 400 30px/1 var(--f-didot); color: var(--sumi); -webkit-text-stroke: 3px var(--cream); paint-order: stroke fill; }
.preloader__num small { font-size: 12px; }
/* 第 12 輪（B1）：結尾改成「開洞」揭幕：轉盤與數字先收掉（.4s），再從中央開一個圓洞擴大到整個畫面（1.2s），總長約 1.9 秒（含到 100% 後的 .25s）。
   只是一次由暗到亮的揭開，不會閃爍。.pre-hole 由 script.js 在「動效版＋支援 @property」時才加；不支援時維持原本的整層淡出 */
@property --open { syntax: "<length-percentage>"; inherits: false; initial-value: 0%; }
:root.motion .preloader.pre-hole {
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent var(--open), #000 calc(var(--open) + 1px));
  mask-image: radial-gradient(circle at 50% 50%, transparent var(--open), #000 calc(var(--open) + 1px));
  & :is(.preloader__dial, .preloader__num) { transition: scale var(--dur) var(--ease-in-out), opacity var(--dur) var(--ease-in-out); }
}
:root.motion.is-ready .preloader.pre-hole {
  opacity: 1; visibility: visible; pointer-events: none; --open: 101%;
  transition: --open 1.2s var(--ease-in-out) var(--dur);
  & :is(.preloader__dial, .preloader__num) { scale: 0; opacity: 0; }
}

/* =========================================================
   外框：上方選單、左右側欄、日夜切換
   ========================================================= */
.chrome { color: var(--chrome); transition: color .6s; }
.nav { position: fixed; top: 10px; right: 64px; z-index: 50; }
.nav ul { display: flex; gap: 26px; align-items: center; }
.nav a { font: 400 10px/1.6 var(--f-sans); letter-spacing: .04em; text-decoration: none; color: var(--chrome); transition: color .6s; }
.nav a[aria-current="true"] { text-decoration: line-through; }
.nav__pill { border: 1px solid currentColor; border-radius: 99px; padding: 1px 16px; }
.menu-trigger { display: none; }
.rail { position: fixed; top: 0; bottom: 0; width: var(--rail); z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6svh; padding-top: 18svh; color: var(--chrome); transition: color .6s; }
.rail--left { left: 0; }
.rail--right { right: 0; }
.rail__plus { width: 18px; height: 18px; }
.rail__label { writing-mode: vertical-rl; font: 400 10px/1 var(--f-zh); letter-spacing: .5em; min-height: 9em; }
.theme-toggle { position: fixed; left: 0; bottom: 18px; width: var(--rail); z-index: 41; display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--chrome); transition: color .6s; }
.theme-toggle__opt { writing-mode: vertical-rl; rotate: 180deg; display: flex; align-items: center; gap: 4px; padding: 6px 12px; font: 400 9px/1 var(--f-sans); letter-spacing: .06em; color: inherit; }
.theme-toggle__opt .om { width: 18px; height: 18px; rotate: 180deg; vertical-align: 0; }
.theme-toggle__opt[aria-pressed="false"] .om { opacity: .45; filter: grayscale(1); }

/* 手機選單（全螢幕 dialog） */
.menu { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--sumi); color: var(--cream); }
.menu:modal { overscroll-behavior: contain; }
.menu::backdrop { background: transparent; overflow: hidden; overscroll-behavior: contain; }
.menu__inner { min-height: 100%; padding: 14px 22px 40px; display: grid; justify-items: center; align-content: start; gap: 22px; position: relative; }
.menu__close-wrap { justify-self: end; }
.menu__close { font: 400 11px/1 var(--f-sans); letter-spacing: .06em; display: inline-flex; gap: 6px; align-items: center; border-bottom: 1px solid currentColor; padding-bottom: 3px; }
.menu__emblem { position: relative; width: 240px; height: 140px; display: grid; place-items: center; margin-top: 6px; }
.menu__orbit { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--cream); stroke-width: 1.2; }
.menu__daisy { width: 52px; height: 52px; }
.menu__t1, .menu__t2 { position: absolute; font: 400 12px/1 var(--f-zh); letter-spacing: .2em; }
.menu__t1 { top: 6px; }
.menu__t2 { bottom: 10px; right: 30px; }
.menu__list { display: grid; gap: 14px; width: min(260px, 100%); border-left: 1px solid rgb(246 245 236 / .6); padding-left: 22px; }
.menu__list a { display: block; text-align: center; text-decoration: none; font: 400 13px/2.1 var(--f-sans); letter-spacing: .06em; border-bottom: 1px solid rgb(246 245 236 / .6); position: relative; }
.menu__bullet { position: absolute; left: -36px; top: 50%; translate: 0 -50%; width: 20px; height: 20px; }
.menu-trigger .om, .menu__close .om { width: 18px; height: 18px; }
.menu__list a[aria-current="true"] { border: 1px solid var(--cream); }
.theme-toggle--menu { position: absolute; left: 6px; bottom: 30px; width: 44px; gap: 4px; color: var(--cream); }
/* 第 12 輪：「暫停動態」按鈕。側欄：放在 DAY/NIGHT 上方（.rail-tools 把兩者疊成一欄，DAY/NIGHT 的位置不變）；
   手機選單：放在 DAY/NIGHT 右邊（.menu__tools，底部對齊；選單清單在它上方，不重疊）。
   中文直排、字正立（不像 DAY/NIGHT 轉 180°，否則中文會倒過來）。文字在「暫停動態／播放動態」之間切換，不另設 aria-pressed */
.rail-tools { position: fixed; left: 0; bottom: 18px; width: var(--rail); z-index: 41; display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--chrome); transition: color .6s; }
.rail-tools > .theme-toggle { position: static; width: auto; align-self: stretch; }
.menu__tools { position: absolute; left: 6px; bottom: 30px; display: flex; align-items: flex-end; gap: 2px; color: var(--cream); }
.menu__tools > .theme-toggle--menu { position: static; }
.motion-toggle { writing-mode: vertical-rl; display: flex; align-items: center; gap: 6px; padding: 8px 12px; font: 400 10px/1 var(--f-zh); letter-spacing: .3em; color: inherit; }
.motion-toggle .om { width: 16px; height: 16px; vertical-align: 0; }

.rotate-notice { display: none; }
@media (orientation: landscape) and (max-height: 480px) and (pointer: coarse) {
  .rotate-notice { display: grid; place-content: center; text-align: center; position: fixed; inset: 0; z-index: 150; background: var(--sumi); color: var(--cream); font: 400 14px/2 var(--f-zh); }
  .rotate-notice small { font: 400 10px var(--f-sans); letter-spacing: .1em; }
}

/* =========================================================
   進場：捲動進入畫面時淡入（只在願意接受動態時）
   ========================================================= */
/* 第 12 輪（A2）：參照站的進場是「淡入＋模糊＋短位移」：位移 28px → 12px，加模糊 5px → 0，時長 1s → .8s（--dur-slow） */
:root.motion.js .rv {
  opacity: 0; translate: 0 12px; filter: blur(5px);
  transition: opacity var(--dur-slow) var(--ease-out), translate var(--dur-slow) var(--ease-out), filter var(--dur-slow) var(--ease-out); transition-delay: var(--rv-delay, 0s);
}
:root.motion.js .rv.is-in { opacity: 1; translate: 0 0; filter: none; }
:root.motion.js [data-split] .ch { display: inline-block; translate: 0 110%; transition: translate .9s var(--ease); transition-delay: calc(var(--i) * 55ms); }
:root.motion.js [data-split].is-in .ch,
:root.motion.is-ready .hero__wedding .ch { translate: 0 0; }
[data-split] .ch { display: inline-block; }
[data-split] .line { display: inline-block; overflow: clip; overflow-clip-margin: .2em; padding-inline: .06em; }

/* 畫面釘住的進度：僅在桌機精準指標裝置由 CSS 捲動動畫驅動 --p；手機／觸控與不支援瀏覽器一律由 JS 代算，確保 100% 穩定執行 */
@keyframes pin-progress { from { --p: 0; } to { --p: 1; } }
@media (pointer: fine) and (width >= 900px) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    :root.motion .pin { view-timeline: --pin block; }
    :root.motion .pin > .pin__stage { animation: pin-progress linear both; animation-timeline: --pin; animation-range: contain 0% contain 100%; }
  }
}
.pin__stage { position: sticky; top: 0; height: 100svh; overflow: clip; }

/* =========================================================
   首屏
   ========================================================= */
/* 第 10 輪：122svh → 110svh（英文段落與座標由 104svh 移到 100svh，剛好在第一個畫面下緣） */
.hero { position: relative; height: 110svh; min-height: 560px; }
.hero > * { position: absolute; }
.hero__title { left: 0; right: 0; top: 0; height: 100svh; pointer-events: none; }
/* 直排「婚禮邀請」放在照片右側、上下置中對齊照片（照片：寬 min(21vw, 36svh)、水平置中、上緣 52svh）；英文小字在標題下方 */
.hero__heading {
  --ph-w: min(21vw, 36svh);
  position: absolute; left: calc(50% + var(--ph-w) / 2 + 2.6vw); top: calc(52svh + var(--ph-w) / 2); translate: 0 -50%;
  display: grid; justify-items: start; gap: 10px; color: var(--ink);
}
.hero__wedding { --vt-size: clamp(2.5rem, min(5.4vw, 9.4svh), 5.5rem); }
.hero__names {
  position: absolute; left: calc(var(--rail) + 3vw); right: auto; top: min(9vw, 13svh);
  display: flex; align-items: center; gap: .08em;
  font: 200 min(7.2vw, 12svh)/1 var(--f-script); letter-spacing: 0;
  color: var(--accent-fill); -webkit-text-stroke: .05em var(--accent-stroke); paint-order: stroke fill;
}
.hero__daisy { width: 1.3em; height: 1.3em; flex: none; }
:root.motion { .hero__daisy { animation: spin 24s linear infinite; } }
@keyframes spin { to { rotate: 1turn; } }

.hero__stage { left: 50%; top: 52svh; width: min(46vw, 82svh); translate: -50% 0; aspect-ratio: 2 / 1; }
.hero__photo { position: absolute; left: 50%; top: 0; translate: -50% 0; width: min(21vw, 36svh); aspect-ratio: 1; }
.hero__photo .ph { position: absolute; inset: 0; }
/* 第 12 輪（C4）：首屏照片輪播（4 張）。沒有 JS、靜態版：只顯示第 1 張（其他 display: none）。
   動效版：目前這張（.is-current）在最上層，由一個點用圓形遮罩（clip-path: circle）擴張蓋過上一張（.is-prev），約 5 秒換一張（script.js）。
   正式照片放 img/mj/hero-01.webp～hero-04.webp 時，把 <div class="ph … hero__slide"> 換成 <img class="hero__slide" …>（README 第 12 節） */
.hero__slide:not(:first-of-type) { display: none; }
img.hero__slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph--h2 { background: radial-gradient(circle at 72% 30%, #f3d9a8 0 5%, transparent 6%), radial-gradient(ellipse 13% 30% at 42% 78%, #1b1713 0 70%, transparent 72%), radial-gradient(ellipse 12% 28% at 58% 80%, #3a3128 0 70%, transparent 72%), linear-gradient(180deg, #2c2620 0%, #4b3d30 60%, #6b5844 100%); }
.ph--h3 { background: repeating-linear-gradient(90deg, #6d5a45 0 14px, #5a4938 14px 18px, #7d6850 18px 30px), linear-gradient(180deg, #3d3228, #2a231c); background-blend-mode: multiply; }
.ph--h4 { background: radial-gradient(ellipse 34% 12% at 50% 84%, #efe6d4 0 70%, transparent 72%), radial-gradient(ellipse 10% 22% at 46% 70%, #2d2822 0 70%, transparent 72%), linear-gradient(180deg, #c9d3d6 0%, #e4e6dc 52%, #a7a77c 53%, #7e7d58 100%); }
:root.motion.js .hero__slide { display: block; opacity: 0; clip-path: circle(0% at var(--cx, 50%) var(--cy, 50%)); transition: opacity .8s var(--ease-out); }
:root.motion.js .hero__slide.is-prev { opacity: 0; clip-path: none; z-index: 1; }
:root.motion.js .hero__slide.is-current { opacity: 1; clip-path: circle(75% at var(--cx, 50%) var(--cy, 50%)); z-index: 2; }
:root.motion.js .hero__slide.is-current.is-entering { transition: clip-path 1s var(--ease-out), opacity .65s var(--ease-out); }
.hero__slide:nth-of-type(2) { --cx: 30%; --cy: 62%; }
.hero__slide:nth-of-type(3) { --cx: 68%; --cy: 34%; }
.hero__slide:nth-of-type(4) { --cx: 50%; --cy: 70%; }
/* 首屏照片右上角的小暫停鈕（與側欄、選單裡的「暫停動態」同步）：疊在照片上，不占版面；靜態版沒有自動播放，不顯示 */
.hero__pause {
  position: absolute; right: 6px; top: 6px; z-index: 3; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: rgb(21 20 16 / .62); color: var(--cream); --om-line: var(--cream); pointer-events: auto;
}
.hero__pause .om { width: 14px; height: 14px; vertical-align: 0; }
.hero__pause:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
:root:not(.motion) [data-motion-toggle] { display: none; }
.hero__photo::before, .hero__photo::after { content: ""; position: absolute; width: 22px; height: 22px; border: 1.5px solid var(--ink); z-index: 1; }
.hero__photo::before { left: -12px; top: -12px; border-right: 0; border-bottom: 0; }
.hero__photo::after { right: -12px; bottom: -12px; border-left: 0; border-top: 0; }
.hero__spark { position: absolute; width: 28px; height: 28px; }
.hero__spark--a { left: 6%; bottom: -26%; }
.hero__spark--b { right: -4%; top: 30%; width: 22px; height: 22px; }

.hero__date { left: 0; top: 0; width: 34vw; height: 100svh; pointer-events: none; font: 400 11px/1.25 var(--f-didot); color: var(--ink); }
.hd { position: absolute; }
.hd--y { left: calc(var(--rail) + 1.4vw); top: 46svh; }
.hd--md { left: calc(var(--rail) + 4.6vw); top: 57svh; }
.hd--w { left: calc(var(--rail) + 9vw); top: 65svh; }
.hd--in { left: calc(var(--rail) + 11.6vw); top: 77svh; }
.hd--city { left: calc(var(--rail) + 15vw); top: 82svh; }
.hero__span { right: calc(var(--rail) + 3vw); top: 72svh; display: flex; align-items: center; gap: 0; color: var(--ink); }
.hero__span i { width: 9vw; height: 1px; background: currentColor; }
.hero__lead { left: calc(var(--rail) + 1.4vw); top: 100svh; width: 230px; line-height: 1.32; }
.hero__geo { right: calc(var(--rail) + 3vw); top: 100svh; font: 400 9px var(--f-sans); letter-spacing: .1em; color: var(--ink); }
.hero__scroll { left: calc(var(--rail) + 1.4vw); top: 82svh; font: 400 9px/1.4 var(--f-sans); letter-spacing: .06em; color: var(--ink); }

/* 首屏入場（載入完成後，.is-ready 起算）——第 12 輪（C1、C2、C3）改成參照站的「依序進場」：
   標題 .45s → 英文小字 .75s → 名字 .8s → 主圖 .9s → 小星星 1.25s → 小字逐個 1.15s 起每個錯開 60ms → 細線 1.4s；整段約 2.4 秒 */
:root.motion.js .hero__wedding .ch { translate: 110% 0; filter: blur(6px);
  transition: translate var(--dur-slow) var(--ease-back), filter var(--dur-slow) var(--ease-out); transition-delay: calc(.45s + var(--i) * 60ms); }
:root.motion.is-ready .hero__wedding .ch { translate: 0 0; filter: none; }
:root.motion.js .hero__nm { opacity: 0; translate: var(--nx, 0) 0; filter: blur(5px); transition: opacity .9s var(--ease-out) .8s, translate .9s var(--ease-out) .8s, filter .9s var(--ease-out) .8s; }
:root.motion.is-ready .hero__nm { opacity: 1; translate: 0 0; filter: none; }
:root.motion.js .hero__names .hero__daisy { opacity: 0; scale: .4; transition: opacity var(--dur) var(--ease-out) 1s, scale .6s var(--ease-back) 1s; }
:root.motion.is-ready .hero__names .hero__daisy { opacity: 1; scale: 1; }
:root.motion.js .hero__photo { opacity: 0; scale: 1.08; filter: blur(12px); transition: opacity 1.1s var(--ease-out) .9s, scale 1.1s var(--ease-out) .9s, filter 1.1s var(--ease-out) .9s; }
:root.motion.is-ready .hero__photo { opacity: 1; scale: 1; filter: none; }
:root.motion.js .hero__spark { opacity: 0; scale: .5; rotate: -40deg; transition: opacity var(--dur) var(--ease-out) 1.25s, scale .6s var(--ease-back) 1.25s, rotate var(--dur-slow) var(--ease-out) 1.25s; }
:root.motion.is-ready .hero__spark { opacity: 1; scale: 1; rotate: 0deg; }
:root.motion.js :is(.hero__en, .hd, .hero__span .pill, .hero__lead, .hero__geo, .hero__scroll) { opacity: 0; filter: blur(4px);
  transition: opacity .5s var(--ease-out), filter .5s var(--ease-out); transition-delay: calc(1.15s + var(--hi, 0) * 60ms); }
:root.motion.is-ready :is(.hero__en, .hd, .hero__span .pill, .hero__lead, .hero__geo, .hero__scroll) { opacity: 1; filter: none; }
:root.motion.js .hero__en { transition-delay: .75s; }
:root.motion.js .hero__span i { scale: 0 1; transform-origin: left center; transition: scale var(--dur-slow) var(--ease-sweep) 1.4s; }
:root.motion.is-ready .hero__span i { scale: 1 1; }
.hero__nm:first-child { --nx: -64px; } .hero__nm:last-child { --nx: 64px; }
.hd--y { --hi: 0; } .hd--md { --hi: 1; } .hd--w { --hi: 2; } .hd--in { --hi: 3; } .hd--city { --hi: 4; }
.hero__span .pill:first-child { --hi: 5; } .hero__span .pill:last-child { --hi: 6; }
.hero__cta { --hi: 7; } .hero__lead { --hi: 8; } .hero__geo, .hero__scroll { --hi: 9; }

/* =========================================================
   致詞（釘住：先問候，再升起墨色卡片）
   ========================================================= */
/* 第 10 輪：釘住期間由 230svh 縮成 78svh（區塊 330svh → 178svh），全頁長度的待改清單第 1 項。
   釘住後問候先完整停留約 33svh（p 0→.423），再於 33→53svh 淡出並略往上移；
   卡片一開始就從畫面下緣露出一截（往下 70svh），38→68svh 升起，之後停留約 10svh。
   （第 2 輪「問候顯示時間加倍」的停留仍比原本短：原本約 16svh 才開始淡出、116svh 才消失） */
.message { height: 178svh; position: relative; }
.message__stage { --cp: clamp(0, (var(--p) - .487) * 2.6, 1); }
.message__greet { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; text-align: center; gap: 6px; color: var(--ink);
  opacity: calc(1 - clamp(0, (var(--p) - .423) * 3.9, 1)); translate: 0 calc(clamp(0, (var(--p) - .423) * 3.9, 1) * -6svh); }
.message__welcome { font: italic 400 min(11vw, 20svh)/1 var(--f-disp); }
.message__glad { font: 400 11px/1.6 var(--f-sans); letter-spacing: .12em; }
.message__to { font: 400 9px/1.6 var(--f-sans); letter-spacing: .1em; }
.message__card {
  position: absolute; z-index: 2; inset: 14svh calc(var(--rail) + 4vw) 8svh;
  background: var(--sumi); color: var(--cream);
  /* 夜間墨色卡片與夜色太接近：加一圈淡米白細框，卡片升起時看得出邊界 */
  border: 1px solid light-dark(transparent, rgb(246 245 236 / .22));
  border-radius: 2.4vw 16vw 2.4vw 2.4vw;
  display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 4vw; padding: 6svh 6vw 6svh 6vw;
  translate: 0 calc((1 - var(--cp)) * 70svh);
}
.message__stars { position: absolute; left: -2px; top: -30px; display: flex; gap: 2px; line-height: 1; }
.message__stars .om { width: 22px; height: 22px; }
.message__stars--end { left: auto; right: 0; top: auto; bottom: -30px; }
.message__clovers { position: absolute; inset: 0; pointer-events: none; }
/* 幸運草放在文字下層，避開標題與內文 */
.message__clovers { z-index: 0; }
.message__head, .message__body { position: relative; z-index: 1; }
.message__clovers svg { position: absolute; width: 22px; height: 22px; }
.message__clovers svg:nth-child(1) { left: 34%; top: 7%; }
.message__clovers svg:nth-child(2) { left: 52%; top: 4%; }
.message__clovers svg:nth-child(3) { left: 50%; top: 30%; }
.message__clovers svg:nth-child(4) { left: 49%; top: 50%; }
.message__clovers svg:nth-child(5) { left: 76%; top: 15%; }
.message__clovers svg:nth-child(6) { left: 82%; top: 64%; }
.message__clovers svg:nth-child(7) { left: 33%; top: 83%; }
/* 直排「致詞」在左，右側是英文小字與英文段落（底部對齊） */
.message__head { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "bar bar" "title text"; align-items: end; gap: 22px 26px; }
.message__bar { grid-area: bar; width: 34%; height: 9px; background: var(--cream); }
.message__title { grid-area: title; --vt-size: clamp(2.75rem, min(6vw, 11svh), 6rem); }
.message__text { grid-area: text; display: grid; gap: 12px; justify-items: start; }
.message__en { max-width: 200px; line-height: 1.3; }
.message__body { position: relative; display: grid; gap: 1.6em; padding-left: 28px; font: 300 13px/2.15 var(--f-zh); border-left: 1px solid rgb(246 245 236 / .7); }
.message__tick { position: absolute; left: -11px; top: -18px; width: 22px; height: 22px; }
.message__sign { display: grid; justify-items: start; gap: 0; margin-top: 10px; }
.message__sign span { border: 1px solid var(--cream); padding: 0 8px; font: 500 9px/1.6 var(--f-sans); letter-spacing: .08em; }
.message__sign span + span { border-top: 0; }

/* =========================================================
   新人介紹
   ========================================================= */
.about { position: relative; }
/* 第 10 輪：標題原本單獨釘住 300svh、照片面板再升起蓋過去（共約 2 個畫面只看得到標題）。
   改成一般區塊：標題置中、動效版淡入（.rv），照片面板接在後面，不再重疊 */
.about__intro { padding: 5svh 0 3svh; }
/* 直排「新人介紹」置中，英文小字在上方 */
.about__intro-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: var(--ink); }
.about__title { --vt-size: clamp(3rem, min(7.4vw, 12.5svh), 7rem); }
/* overflow: clip：釘住的照片（margin-bottom 負一個畫面）會一路移到區塊底部，要在區塊邊界裁掉，否則會蓋到下一段。
   第 10 輪：寬螢幕新郎、新娘左右並排，面板約一個畫面高（至少 100svh，照片才會鋪滿） */
.about__panel { position: relative; margin: 0 calc(var(--rail) - 14px); min-height: 100svh; color: var(--cream); padding-bottom: 10svh; overflow: clip; }
.about__cast { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.about__photo { position: sticky; top: 0; height: 100svh; margin-bottom: -100svh; }
img.about__photo { width: 100%; object-fit: cover; filter: brightness(.58) contrast(.96); } /* 2026-11-25：.62 → .58（米白小字壓在照片上 4.3–4.4:1 → 約 5:1） */
/* 紅線：2.1px，外加一圈米白光暈，放在任何照片上都看得到。
   不要加 vector-effect: non-scaling-stroke：它會讓 pathLength="1" 的虛線長度和拉伸後的 svg 對不上，窄螢幕時線頭會和同心結脫開 */
.about__thread { position: absolute; left: 36%; top: 30svh; width: 28%; height: calc(100% - 50svh); overflow: visible; fill: none; stroke: var(--thread); stroke-width: 2.1; pointer-events: none; z-index: 1;
  filter: drop-shadow(0 0 1.5px rgb(246 245 236 / .9)); }
.about__thread-star { position: absolute; left: 47%; top: 22svh; width: 44px; height: 44px; z-index: 2; }
/* 太空梭的位置與方向由 script.js 依捲動同步：機尾接在紅線前端，機頭朝線前進的方向（完全跟著線的切線轉）。
   沒有 JS 時線條畫滿、梭留在原本的固定位置，機頭朝下 */
.about__thread-ship { position: absolute; left: 52%; top: 64svh; width: 64px; height: 64px; z-index: 2; color: var(--thread);
  transform-origin: 50% 96%; rotate: 180deg; }
.js .about__thread-ship { left: 0; top: 0; rotate: none; }
.about__thread path { stroke-dasharray: 1; }
.cast { position: relative; z-index: 2; width: min(34vw, 420px); padding: 0 0 0 6vw; text-shadow: 0 1px 12px rgb(21 20 16 / .35); }
/* 並排時新娘往下錯開一段，保留原本「左上新郎、右下新娘」的節奏；紅線從兩人中間穿過 */
.cast--groom { padding-top: 14svh; }
.cast--bride { justify-self: end; padding: 30svh 6vw 0 0; }
.cast__role { margin-bottom: 6px; }
.cast__role .tag { background: var(--cream); color: var(--sumi); }
.cast__name { font: 400 min(6.4vw, 12svh)/.92 var(--f-disp); letter-spacing: .02em; }
.cast__name span { display: block; }
.cast__name span + span { padding-left: 1.4em; font-size: .5em; letter-spacing: .1em; }
.cast__label { margin-top: 26px; }
.cast__text { margin-top: 10px; font: 400 12px/2 var(--f-zh); }
.cast__list { margin-top: 10px; display: grid; gap: 8px; font: 400 12px/1.8 var(--f-zh); }
.cast__list li { position: relative; padding-left: 26px; }
.cast__list li .om { position: absolute; left: 0; top: .15em; width: 18px; height: 18px; }
/* 第 10 輪：原本 130svh 的空白轉場只放兩段小字，改成一條左右對開的橫帶（左「THE NEXT IS OUR STORY」、右「FROM 2020 TO TODAY」） */
.about__next { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 3svh 4vw; padding: 7svh calc(var(--rail) + 4vw) 6svh; color: var(--ink); }
.about__next-text { display: grid; font: 400 10px/1.3 var(--f-sans); letter-spacing: .08em; }
.about__next-span { margin-left: auto; display: grid; justify-items: end; font: 400 10px/1.3 var(--f-sans); letter-spacing: .08em; }
.about__next .big { font: 400 min(6.5vw, 12svh)/1 var(--f-disp); letter-spacing: 0; }

/* =========================================================
   我們的故事（釘住，依捲動切換章節）
   ========================================================= */
.story { height: calc(var(--chapters) * 170svh + 100svh); position: relative; }
.story__stage { color: var(--ink); }
/* 直排「我們的故事」在左上：寬度只有一個字，年份清單（rail＋15vw）與照片都在它右邊 */
.story__head { position: absolute; left: calc(var(--rail) + 2vw); top: 6svh; display: grid; justify-items: start; gap: 12px; }
.story__title { --vt-size: clamp(2.25rem, min(4.4vw, 7.6svh), 4.75rem); }
.story__ym { position: absolute; right: calc(var(--rail) + 2vw); top: 7svh; font: 400 min(7.6vw, 14svh)/1 var(--f-didot); letter-spacing: .01em; }
.story__rule { position: absolute; left: 28vw; right: 0; top: 27svh; height: 1px; background: var(--ink); opacity: .6; }
.story__ctrl { position: absolute; right: calc(var(--rail) + 2vw); top: 29svh; display: flex; gap: 14px; }
.story__ctrl button { border: 1px solid currentColor; font: 400 9px/1.6 var(--f-sans); letter-spacing: .06em; padding: 0 10px; min-height: 24px; }
.story__ctrl button { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.story__ctrl .om { width: 16px; height: 16px; }
.story__ctrl button[aria-disabled="true"] { opacity: .35; cursor: default; }
.story__years { position: absolute; left: calc(var(--rail) + 15vw); top: 44svh; display: grid; gap: 1.5svh; font: 400 9px/1.2 var(--f-sans); text-align: center; }
/* 第 11 輪：寬度 900–1099px 時衛星繞到照片左側，外緣會碰到年份清單（rail + 15vw），清單往左移 */
@media (900px <= width < 1100px) { .story__years { left: calc(var(--rail) + 8.5vw); } }
.story__years button { position: relative; min-width: 34px; min-height: 24px; opacity: .8; } /* 2026-11-25：.7 → .8（9px 年份字壓在光球上只有約 3.9:1） */
.story__years button[aria-current="step"] { opacity: 1; font-weight: 500; }
.story__mark { display: none; position: absolute; left: -26px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; }
.story__years button[aria-current="step"] .story__mark { display: block; }
.story__shot { position: absolute; left: 24vw; top: 30svh; width: min(31vw, 56svh); aspect-ratio: 1; }
.story__ring { position: absolute; inset: -20px; border-radius: 50%; rotate: calc(var(--p) * 540deg + 90deg); z-index: 2; }
.story__ring-ship { position: absolute; left: 85.355%; top: 14.645%; translate: -50% -50%; width: 30px; height: 30px; overflow: visible; }
/* 月亮（OpenMoji 🌙 弦月）固定在照片右上角、躲在照片後面，露出一彎清楚的弦月 */
.story__orbit-back { position: absolute; inset: 0; z-index: 0; }
.story__moon { position: absolute; left: 72%; top: -22%; width: 54%; height: 54%; overflow: visible; }
.story__photos { position: absolute; inset: 0; border: 2px solid var(--ink); border-radius: 50%; overflow: hidden; z-index: 1; }
.story__photo { position: absolute; inset: 0; opacity: 0; transition: opacity .7s var(--ease), scale 1.2s var(--ease); scale: 1.32; }
img.story__photo { width: 100%; height: 100%; object-fit: cover; }
.story__photo:nth-child(1) { object-position: 72% 35%; }
.story__photo:nth-child(2) { object-position: 28% 35%; }
.story__photo:nth-child(3) { object-position: 70% 38%; }
.story__photo:nth-child(4) { object-position: 28% 38%; }
.story__photo:nth-child(5) { object-position: 68% 58%; }
.story__photo:nth-child(6) { object-position: 30% 42%; }
.story__photo.is-active { opacity: 1; scale: 1.24; }
/* 說明文字置中在圓環與衛星掃掠外緣下方 */
.story__photo .ph__tag { left: 50%; top: 50%; bottom: auto; translate: -50% -50%; white-space: nowrap; }
.story__caption { position: absolute; left: 50%; translate: -50% 0; top: calc(100% + 42px); width: max-content; max-width: min(300px, 30vw); text-align: center; font: 9px/1.4 var(--f-sans); z-index: 3; }
.story__caption span { display: inline; background: var(--chip); color: var(--cream); font: 500 9px/1.35 var(--f-sans); letter-spacing: .04em; padding: 1px 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.story__ch { position: absolute; inset: 0; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility 0s .6s; }
/* 章節容器在桌機是 inset: 0 蓋滿整個舞台，容器本身不能接點擊，否則會擋住 PREV／NEXT／SKIP 和年份按鈕；只讓裡面的文字可選取 */
.story__ch.is-active { opacity: 1; visibility: visible; transition-delay: 0s; }
.story__ch.is-active > * { pointer-events: auto; }
.story__ch-title { position: absolute; left: 60vw; top: 38svh; font: 500 9px/1 var(--f-sans); letter-spacing: .06em; }
.story__ch-title span { margin-right: 8px; }
.story__zh { position: absolute; left: 60vw; top: 44svh; font: 400 13px/2.15 var(--f-zh); }
.story__en { position: absolute; left: 60vw; right: calc(var(--rail) + 3vw); top: 70svh; font: 500 9px/1.45 var(--f-sans); letter-spacing: .05em; max-width: 330px; }
/* 小知識放在右欄英文段落下方：照片下方是月球繞行經過的範圍，夜間米白字壓在黃色月面上會看不見 */
.story__dyk { position: absolute; left: 60vw; top: 82svh; display: grid; gap: 8px; justify-items: start; font: 400 12px/1.8 var(--f-zh); }
.story__barcode { position: absolute; right: calc(var(--rail) + 3vw); bottom: 7svh; width: 66px; height: 14px; background: repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 4px, currentColor 4px 5px, transparent 5px 7px); }

/* =========================================================
   邀請轉場、日期與會場、注意事項（深墨底）
   沒有 JS 時這兩個區塊自己就是深墨底；有 JS 時改由固定背景交叉淡入
   ========================================================= */
/* 2026-11-24 修正：翻面配色只在「真的翻面」時套用。沒有 JS 時區塊自己畫深墨底，一律套用；
   有 JS 時只在整個畫面都落在翻面區塊內（script.js 加上 .is-invert）才套用。區塊剛捲進來、快捲出去（畫面上還看得到一般區塊）時用一般配色，
   跟著固定背景走，文字不會壓在同色的底上（原本米白字對米白底 1.0:1）。
   細線、hover 底、月曆卡底色改成跟著字色／頁面走：翻面時字色是米白，算出來和原本的米白半透明、深墨底相同 */
.date-venue, .guidance {
  position: relative; color: var(--ink); --panel: var(--page);
  --invert-line: color-mix(in srgb, var(--ink) 45%, transparent);
  --invert-line-soft: color-mix(in srgb, var(--ink) 20%, transparent);
  --invert-hover: color-mix(in srgb, var(--ink) 10%, transparent);
}
:root:not(.js) :is(.date-venue, .guidance), :root.is-invert :is(.date-venue, .guidance) {
  --ink: var(--cream); --ink-soft: var(--invert-soft); --accent-fill: var(--sumi); --om-line: var(--cream); --panel: var(--invert-bg);
}
:root:not(.js) :is(.date-venue, .guidance) { background: var(--invert-bg); }
.interlude { position: relative; }
/* 第 10 輪：兩段各自一整個畫面（90svh＋100svh）縮成約一個畫面：上半「Six winters,」、下半「And now, we invite you…」 */
.interlude__invite { position: relative; z-index: 1; min-height: 44svh; display: grid; align-content: center; padding-left: 26vw; font: 400 min(6.4vw, 12svh)/1.12 var(--f-disp); }
.interlude__invite::before { content: ""; position: absolute; left: 0; width: 22vw; top: calc(50% - .55em); height: 1px; background: currentColor; }
/* 流星雨：捲到邀請文字時（JS 加上 .is-raining）在文字後方斜向劃過，往下延伸並柔化邊緣避免截斷 */
.meteors { position: absolute; left: 0; right: 0; top: 0; bottom: -10svh; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .8s; -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 76%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 76%, transparent 100%); }
.interlude.is-raining .meteors { opacity: 1; }
.meteors i { position: absolute; left: var(--x); top: var(--y); width: 2px; height: var(--len); border-radius: 2px; rotate: 45deg; transform-origin: 50% 0; opacity: 0;
  background: linear-gradient(to bottom, rgb(246 245 236 / 0), rgb(246 245 236 / .95)); box-shadow: 0 0 6px rgb(246 245 236 / .45); }
:root.motion .interlude.is-raining .meteors i { animation: meteor var(--dur) linear var(--delay) infinite; }
@keyframes meteor {
  0% { opacity: 0; translate: 0 0; }
  12% { opacity: 1; }
  70% { opacity: .9; }
  100% { opacity: 0; translate: -38vw 38vw; }
}

/* 第 10 輪：寬螢幕時直排標題與大日期並排（原本上下疊、日期區另佔 80svh）；兩個時段左右並排；會場與停車左右並排 */
.dv {
  position: relative; padding: 4svh calc(var(--rail) + 3vw) 6svh;
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "head date" "times times" "venue venue"; column-gap: 4vw;
}
/* 直排「婚禮資訊」在左上，英文小字在上方 */
.dv__head { grid-area: head; align-self: start; display: grid; justify-items: start; gap: 12px; }
.dv__title { --vt-size: clamp(2.25rem, min(4.2vw, 7.4svh), 4.5rem); }
.dv__date { grid-area: date; position: relative; padding-top: 2svh; display: grid; place-content: center; }
/* 背景星星改用 OpenMoji ⭐，調淡（2026-11-18 使用者要求） */
.dv__stars svg { position: absolute; left: var(--x); top: var(--y); width: calc(16vw * var(--s)); aspect-ratio: 1; opacity: .24; filter: grayscale(1) brightness(2.4); overflow: visible; }
/* 黃色星星調淡後疊在深色底上會混濁，所以改成白色的淡星星（形狀仍是 OpenMoji ⭐） */
:root.motion {
  .dv__stars svg { animation: twinkle 5s ease-in-out var(--d) infinite alternate; }
}
@keyframes twinkle { to { scale: .82; opacity: .12; } }
.dv__big { position: relative; display: grid; justify-items: end; text-align: right; }
.dv__num { font: 400 min(15.5vw, 28svh)/.9 var(--f-didot); letter-spacing: -.01em; }
.dv__dow { font: 400 min(6vw, 11svh)/1 var(--f-disp); }
.dv__big small { position: absolute; left: .4em; bottom: 0; font: 400 9px var(--f-zh); }
.dv__times { grid-area: times; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4svh 5vw; padding: 6svh 0 7svh; }
.dv__time { display: flex; flex-direction: column; align-items: flex-start; gap: 1svh; border-bottom: 1px solid color-mix(in srgb, currentColor 35%, transparent); padding-bottom: 2.4svh; }
.dv__time .dv__clock { align-self: flex-end; }
.dv__time h3, .dv__venue h3 { display: grid; }
.dv__en { font: 400 min(6.2vw, 11svh)/1 var(--f-disp); letter-spacing: .01em; }
.dv__time small, .dv__venue h3 small { font: 400 10px/1.6 var(--f-zh); letter-spacing: .1em; }
.dv__clock { font: 400 min(10vw, 18svh)/1 var(--f-didot); }
/* 會場（左：名稱在上、地址交通在下）與停車資訊（右）並排；原本 min-height 100svh、停車再往下接一段 */
.dv__venue {
  grid-area: venue; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr);
  grid-template-areas: "bubbles bubbles" "main parking" "info parking"; grid-template-rows: auto auto 1fr;
  gap: 3svh 5vw; align-items: start;
}
.dv__bubbles { grid-area: bubbles; display: flex; align-items: center; gap: 4px; }
.dv__venue-main { grid-area: main; }
.dv__venue-info { grid-area: info; }
.dv__bubbles i { width: 9px; height: 9px; border: 1px solid currentColor; border-radius: 50%; }
.dv__venue-star { width: 34px; height: 34px; margin-right: 8px; }
.dv__venue-name { margin-top: 3svh; font: 300 min(5.2vw, 10svh)/1.25 var(--f-zh); letter-spacing: .06em; }
.dv__venue-name a { text-decoration: none; }
.dv__ext { width: .62em; height: .62em; margin-left: .2em; vertical-align: .02em; }
.dv__ext--s { width: 18px; height: 18px; vertical-align: -.3em; }
.dv__venue-info { display: grid; gap: 16px; font: 400 12px/1.9 var(--f-zh); border-left: 1px solid color-mix(in srgb, currentColor 50%, transparent); padding-left: 22px; }
.copy { margin-left: 8px; font: 400 10px/1 var(--f-zh); border-bottom: 1px solid currentColor; padding: 4px 0; }
.copy__done { margin-left: 6px; font-size: 10px; }
.dv__map { text-decoration: underline; text-underline-offset: 4px; }

/* 第 10 輪：上下留白 18／24svh → 8／8svh，項目間距 14svh → 6svh */
.guidance { display: grid; grid-template-columns: 1fr 1fr; gap: 5vw; padding: 8svh calc(var(--rail) + 4vw) 8svh; }
/* 直排「注意事項」釘在左欄，英文小字在上方（欄內 sticky，不增加長度） */
.guidance__head { position: sticky; top: 26svh; align-self: start; display: grid; justify-items: start; gap: 12px; }
.guidance__title { --vt-size: clamp(2.5rem, min(4.8vw, 8.4svh), 5rem); }
.guidance__items { display: grid; gap: 6svh; padding-top: 2svh; }
.guidance__item { display: grid; gap: 18px; font: 400 12.5px/2.05 var(--f-zh); }

/* =========================================================
   出席回覆
   ========================================================= */
/* 第 10 輪：標題原本獨佔 80svh；改成標題與說明疊在左欄、表單在右欄，表單從區塊頂端就開始（首屏「回覆出席」跳過來直接看到表單） */
.rsvp {
  position: relative; padding: 7svh calc(var(--rail) + 4vw) 8svh; color: var(--ink);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); grid-template-rows: auto 1fr;
  grid-template-areas: "head form" "lead form"; gap: 5svh 6vw; align-items: start;
}
/* 直排「出席回覆」置中，英文小字在上方 */
.rsvp__head { grid-area: head; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.rsvp__title { --vt-size: clamp(2.75rem, min(6vw, 10.5svh), 6rem); }
/* 說明與表單直接當 .rsvp 的格線項目，才能和標題排在同一張格線上 */
.rsvp__grid { display: contents; }
.rsvp__lead { grid-area: lead; position: sticky; top: 22svh; background: var(--card); border-radius: 18px; padding: 36px 40px; display: grid; gap: 1.4em; font: 400 12.5px/2.05 var(--f-zh); color: var(--ink-soft); backdrop-filter: blur(6px); }
.rsvp__lead u { text-underline-offset: 4px; color: var(--ink); }

.form { grid-area: form; display: grid; gap: 26px; }
.form__note { font: 400 11px/1.6 var(--f-zh); color: var(--ink-soft); }
.form [hidden] { display: none !important; }
.rsvp-conditional { border: 0; padding: 0; min-width: 0; margin-inline: 0; }
.rsvp-conditional[data-rsvp-invitation-address] { display: grid; gap: 26px; }
.rsvp-conditional[data-rsvp-attending] { display: grid; gap: 14px; }
.rsvp-conditional:disabled .input { opacity: .56; cursor: not-allowed; }
.field { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 10px; }
.field__label { position: relative; display: block; width: 78%; padding: 0 0 6px; border-bottom: 1px solid var(--ink); font: 400 12px/1.6 var(--f-zh); color: var(--ink); }
.field__label::after { content: ""; position: absolute; right: -4px; bottom: -4px; width: 7px; height: 7px; border: 1px solid var(--ink); rotate: 45deg; background: var(--page); }
.field__label small { margin-left: 6px; font-size: 10px; color: var(--ink-soft); }
.field__label--sub { width: 60%; font-size: 11px; }
/* legend 不算 grid 子項，吃不到 .field 的 gap → 自己補間距，選項才不會貼在題目底線（和菱形）上 */
legend.field__label { float: none; margin-bottom: 16px; }
.input { width: 100%; font: 400 14px/1.6 var(--f-zh); color: var(--ink); background: var(--field); border: 1px solid var(--field-line); border-radius: 0; padding: 9px 12px; }
.input::placeholder { color: var(--ink-soft); } /* 提示字對輸入框底色：日 4.7:1、夜 8.4:1（原本調淡後只有 2.1:1） */
.input--short { width: 10em; }
textarea.input { resize: vertical; min-height: 4.5em; }
.field__err { display: none; font: 400 11px/1.6 var(--f-zh); color: var(--err); }
.form .field__err.-show { display: block; }
.form .input[aria-invalid="true"] { border-color: var(--err); }
.om--err { width: 16px; height: 16px; vertical-align: -.3em; margin-right: 2px; }
.input:is(:user-invalid, .user-invalid-fallback) { border-color: var(--err); }
.field:has(> .input:is(:user-invalid, .user-invalid-fallback)) > .field__err,
.field:has(> :is(.attend, .chips) > :is(:user-invalid, .user-invalid-fallback)) > .field__err,
.field--consent:has(> input:is(:user-invalid, .user-invalid-fallback)) > .field__err,
.allergy:has(> .input:is(:user-invalid, .user-invalid-fallback)) > .field__err { display: block; }

.attend { display: flex; gap: 26px; padding: 6px 0 0 24px; }
.attend input, .chips input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.attend label { width: 92px; aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--ink); display: grid; place-content: center; text-align: center; gap: 4px; cursor: pointer; font: 400 13px/1.2 var(--f-zh); transition: background-color .3s, color .3s; }
.attend label b { font: 500 8px/1.2 var(--f-sans); background: var(--chip); color: var(--cream); padding: 1px 3px; }
/* 選取：日間墨底米白字、夜間米白底墨字（--fill／--on-fill） */
.attend input:checked + label { background: var(--fill); color: var(--on-fill); border-color: var(--fill); }
.attend input:checked + label b { background: var(--on-fill); color: var(--fill); }
.attend input:focus-visible + label, .chips input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips label { border: 1px solid var(--ink); border-radius: 99px; padding: 4px 16px; min-height: 32px; font: 400 12px/1.8 var(--f-zh); cursor: pointer; }
.chips input:checked + label { background: var(--fill); color: var(--on-fill); border-color: var(--fill); }
.allergy { display: grid; gap: 10px; margin-top: 6px; }
.allergy[hidden] { display: none; }
.companions { display: grid; gap: 22px; }
.companions:empty { display: none; }
.companion { border: 1px dashed var(--field-line); padding: 14px 16px 16px; margin: 0; display: grid; gap: 14px; }
.companion legend { width: auto; border: 0; padding: 0 6px; }
.companion legend::after { display: none; }
.btn-add, .btn-remove { justify-self: start; display: inline-flex; align-items: center; gap: 6px; font: 400 12px/1.6 var(--f-zh); border: 1px solid var(--ink); padding: 4px 16px; min-height: 32px; color: var(--ink); }
.btn-add .om, .btn-remove .om { width: 18px; height: 18px; }
.btn-remove { font-size: 11px; border-style: dashed; }
.field--consent { grid-template-columns: auto 1fr; align-items: start; gap: 8px 10px; font: 400 12px/1.8 var(--f-zh); }
.field--consent input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--fill); }
.field--consent .field__err { grid-column: 1 / -1; }
.linkish { text-decoration: underline; text-underline-offset: 3px; }
.btn-submit { justify-self: stretch; min-height: 50px; background: var(--fill); color: var(--on-fill); font: 500 14px/1 var(--f-zh); letter-spacing: .3em; border-radius: 6px 6px 24px 6px; }
.btn-submit:hover { background: var(--fill-hover); }
.form__demo { font: 400 11px/1.8 var(--f-zh); color: var(--ink-soft); }
.form__status { font: 400 11px/1.8 var(--f-zh); color: var(--ink-soft); }
.form__status[data-state="error"] { color: var(--err); }
.form__status:empty { display: none; }

/* =========================================================
   頁尾
   ========================================================= */
.footer { position: relative; padding: 14svh calc(var(--rail) + 3vw) 30px; color: var(--ink); }
.footer__top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 3vw; }
/* 紅印「良辰帖製」（白文：胭脂底、米白字）在上，按鈕文字當小字放在印的下方，不壓在印文上。
   良辰帖的品牌名只出現在製作名單，所以紅印只用在這顆「製作名單」按鈕，其他地方不用。
   印色夜間略提亮：#9e3b45 在夜色上只有 2.6:1，#b84955 有 3.4:1，米白印文仍有 4.7:1 */
.footer__credits {
  grid-column: 2; grid-row: 1; width: clamp(128px, 12vw, 172px);
  display: grid; justify-items: center; gap: 14px;
  color: var(--ink); font: 500 .75rem/1.4 var(--f-sans); letter-spacing: .08em;
  --seal-ink: light-dark(#9e3b45, #b84955); --seal-paper: var(--cream);
}
.footer__seal { display: block; width: 100%; height: auto; aspect-ratio: 1; overflow: visible; transition: rotate .5s var(--ease), scale .5s var(--ease); }
.footer__credits-label { display: inline-flex; align-items: center; gap: 4px; }
.footer__credits .om { width: 16px; height: 16px; }
/* 滑過時像蓋章：微微轉、往下壓 */
:root.motion { .footer__credits:is(:hover, :focus-visible) .footer__seal { rotate: -4deg; scale: .97; } }
.footer__thanks { grid-column: 1; grid-row: 1; font: 400 12px/2 var(--f-zh); }
.footer__en { grid-column: 3; grid-row: 1; justify-self: end; max-width: 240px; line-height: 1.32; }
.footer__names { margin-top: 6svh; font: 400 min(8vw, 15svh)/1 var(--f-disp); letter-spacing: -.01em; }
.footer__year { position: absolute; right: calc(var(--rail) + 3vw); bottom: 70px; font: 400 min(8vw, 15svh)/1 var(--f-didot); color: transparent; -webkit-text-stroke: 1.4px var(--ink); }

/* =========================================================
   視窗
   ========================================================= */
.modal { width: min(640px, calc(100% - 32px)); max-height: 86svh; padding: 0; border: 1px solid var(--field-line); border-radius: 14px; background: var(--page); color: var(--ink-soft); }
.modal:modal { overscroll-behavior: contain; }
.modal::backdrop { background: rgb(21 20 16 / .55); backdrop-filter: blur(3px); overflow: hidden; overscroll-behavior: contain; }
.modal__body { padding: 34px 36px 28px; display: grid; gap: 12px; font: 400 13px/1.9 var(--f-zh); }
#privacy [data-rsvp-privacy] { display: grid; gap: 0.65em; }
.modal__body h3 { margin-top: 10px; font: 500 13px/1.6 var(--f-zh); color: var(--ink); border-left: 3px solid var(--ink); padding-left: 10px; }
.modal__body ul { display: grid; gap: 4px; padding-left: 1.2em; list-style: disc; }
.modal__sub { font: 400 10px var(--f-sans); letter-spacing: .1em; color: var(--ink); }
.modal__title { font: 400 22px/1.4 var(--f-zh); color: var(--ink); }
.modal__title:focus { outline: none; }
.modal--credits .modal__title { font: 400 40px/1 var(--f-disp); }
.credits { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.modal__close { justify-self: center; margin-top: 14px; border: 1px solid var(--ink); color: var(--ink); padding: 6px 30px; min-height: 36px; font: 400 13px/1 var(--f-zh); }
.modal--small { width: min(420px, calc(100% - 32px)); text-align: center; }
/* 第 12 輪（H2）：對齊參照站：視窗由下方 8px 淡入、背景遮罩同時淡入，約 .3 秒；製作名單視窗面板上移 16px、.45 秒（power3.out ≈ ease-out） */
:root.motion {
  .modal[open] { animation: pop .3s var(--ease-out); }
  .modal[open]::backdrop { animation: fade-in .3s var(--ease-out); }
  .modal--credits[open] { animation: pop-lg .45s var(--ease-out); }
  .modal--credits[open]::backdrop { animation-duration: .45s; }
}
@keyframes pop { from { opacity: 0; translate: 0 8px; } }
@keyframes pop-lg { from { opacity: 0; translate: 0 16px; } }
@keyframes fade-in { from { opacity: 0; } }

/* =========================================================
   減少動態：取消釘住的過場，直接呈現完成狀態
   ========================================================= */
:root:not(.motion) {
  .message { height: auto; }
  .message .pin__stage { --p: 1; position: relative; height: 100svh; }
  .story .pin__stage { --p: 0; }
}

/* =========================================================
   手機與窄螢幕
   ========================================================= */
@media (width < 900px) {
  :root { --rail: 0px; }
  .nav, .rail, .chrome > .rail-tools { display: none; }
  .menu-trigger { display: inline-flex; gap: 5px; align-items: center; position: fixed; top: 10px; right: 14px; z-index: 50; font: 400 11px/1 var(--f-sans); letter-spacing: .06em; border-bottom: 1px solid currentColor; padding: 6px 0 3px; color: var(--chrome); }

  .hero { height: 101svh; } /* 第 10 輪：118svh → 101svh（最下面的英文段落約在 97svh 結束） */
  /* 直排標題靠右（照片 40vw 置中，右側留 24vw），英文小字靠右對齊放在標題下方，才不會超出畫面 */
  .hero__heading { --ph-w: 40vw; left: auto; right: 6vw; top: calc(38svh + 20vw); justify-items: end; }
  .hero__wedding { --vt-size: clamp(2.25rem, 12.5vw, 5rem); }
  .hero__names { top: calc(6svh + 8vw); left: 6vw; right: auto; font-size: 7.4vw; }
  .hero__stage { top: 38svh; width: 86vw; }
  .hero__photo { width: 40vw; }
  .hero__spark--b { right: auto; left: 14%; top: -12%; } /* 原位置（照片右側）會壓到直排標題 */
  .hero__span { top: calc(6svh + 27vw); left: 8vw; right: 8vw; justify-content: space-between; }
  .hero__span i { flex: 1; }
  .hero__date { width: 18vw; }
  .hd { writing-mode: vertical-rl; }
  .hd--y, .hd--md, .hd--w, .hd--in, .hd--city { left: 4vw; }
  .hd--y { top: 82svh; } .hd--md { top: 70svh; } .hd--w { top: 60svh; } .hd--in { top: 55svh; } .hd--city { top: 44svh; }
  .hd br { display: none; }
  .hero__lead { left: 16vw; top: 82svh; width: 56vw; }
  .hero__scroll, .hero__geo { display: none; }

  .message__card { inset: 9svh 5vw 7svh; grid-template-columns: 1fr; align-content: center; gap: 4svh; padding: 6svh 8vw; border-radius: 6vw 26vw 6vw 6vw; }
  .message__title { --vt-size: clamp(2.5rem, 12vw, 4.5rem); }
  .message__body { gap: 1em; font-size: 12.5px; line-height: 2; }

  /* 窄螢幕：新郎、新娘上下排；第 10 輪收緊上方留白（18／30svh → 10／9svh） */
  .about__intro { padding: 4svh 0 3svh; }
  .about__panel { margin-inline: 0; padding-bottom: 8svh; }
  .about__cast { grid-template-columns: minmax(0, 1fr); }
  .cast { width: auto; padding: 10svh 7vw 0; }
  .cast--bride { justify-self: stretch; padding: 9svh 7vw 0; }
  .cast__name { font-size: 13vw; }
  /* 線條終點拉到區塊底部留白處（距底約 6svh），太空梭停在尾端時才不會蓋到新娘介紹的文字 */
  /* 窄螢幕整條紅線移到右側空白（文字都靠左），太空梭停在起點時才不會蓋到名字 */
  .about__thread { left: 60%; width: 34%; height: calc(100% - 36svh); }
  .about__thread-star { left: 70%; top: 19svh; width: 36px; height: 36px; } /* 避開「SIYUAN」 */
  /* 介紹文字與清單只占左側，紅線與太空梭在右側經過時不壓字 */
  .cast__text, .cast__list { max-width: 52vw; }
  .about__thread-ship { width: 52px; height: 52px; }
  .about__title { --vt-size: clamp(2.75rem, 14vw, 6rem); }
  .message__clovers svg:nth-child(3), .message__clovers svg:nth-child(4) { display: none; } /* 窄螢幕會壓到內文 */
  /* 左右兩段要能排在同一列：大字設上限（原本 12vw，768 寬時 92px 會擠成上下兩列） */
  .about__next { padding: 5svh 6vw 4svh; column-gap: 2vw; }
  .about__next .big { font-size: min(11vw, 56px); }

  .story { height: calc(var(--chapters) * 140svh + 100svh); }
  /* 窄螢幕改成由上而下排（不用絕對定位），標題、年月、內文才不會互相壓到（2026-11-18） */
  .story__stage {
    display: grid; grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "head ym" "rule rule" "years shot" "text text" "ctrl ctrl";
    /* 第 11 輪：內文列用 minmax(auto, 1fr)：高度至少等於最高那一章的內容，PREV／NEXT／SKIP 永遠在內文下方，不管視窗多矮都不會被內文壓到；
       多出來的空間才留給內文列（按鈕貼在畫面底部）。能不能放進視窗，由下面的照片寬 --S 連續縮放來保證（沒有高度門檻） */
    grid-template-rows: auto auto auto minmax(auto, 1fr) auto;
    --pt: clamp(8px, 3.5svh, 48px); --rg: clamp(6px, 1.3svh, 14px); --mt: clamp(6px, 2svh, 26px); --mb: clamp(4px, .9svh, 10px);
    align-content: start; row-gap: var(--rg); column-gap: 4vw; padding: var(--pt) 6vw clamp(6px, 1.5svh, 16px);
  }
  .story__head, .story__ym, .story__rule, .story__years, .story__ctrl,
  .story__ch-title, .story__zh, .story__en, .story__dyk { position: static; }
  /* 直排標題放在年月同一列的左側，寬度只有一個字，不會把下面的年份欄撐寬；英文小字貼在標題底端右邊 */
  .story__head { grid-area: head; position: relative; inset: auto; display: block; }
  .story__title { --vt-size: clamp(1.25rem, min(7vw, 3.6svh), 2.25rem); }
  .story__sub { position: absolute; left: calc(100% + 10px); bottom: 0; white-space: nowrap; }
  .story__ym { grid-area: ym; justify-self: end; align-self: start; font-size: 10vw; margin-top: max(0px, calc(46px - var(--pt))); } /* 年月要離開固定在右上角的 MENU 鈕（約 46px 以內），超出的部分算在直排標題那一列的高度內，不增加高度 */
  .story__rule { grid-area: rule; margin-inline: -6vw; }
  .story__years { grid-area: years; align-self: center; gap: 0; }
  .story__years button { min-height: 22px; }
  .story__mark { left: auto; right: -24px; rotate: 180deg; }
  /* 第 11 輪：照片寬 --S 連續縮放（原本 min(50vw, 27svh)）：不超過 46vw、25svh，也不超過「(視窗高 − 其餘固定高度約 535px) ÷ 1.465」。
     1.465 ＝ 照片本身 1 + 下方說明文字與內文留白隨照片放大的 0.465 倍；其餘固定高度是直排標題列、內文（最高一章）與按鈕。
     高度越矮照片越小，所以任何高度都放得進視窗，不需要高度門檻；最小 60px */
  /* 第 12 輪：矮手機（高度約 700px 以下）時，左邊的年份清單（6 × 22px = 132px）比照片列高，照片列多出一段空白，
     原本照片貼在列頂、說明文字跟著照片走，多出來的空白就落在「說明文字」與「章節文字」之間（375×667 約 23px、360×640 約 41px）。
     改成：照片貼齊列底（align-self: end，空白移到照片上方），再讓照片長大把那段空白吃回來——
     年份清單比較高時，照片每大 1px，只有說明文字以下的內文要往下移 0.465px（照片列高度不變），
     所以上限另算：(67.2svh − 386px) ÷ .465（依 360–430 寬、600–700 高實測的剩餘高度擬合，留約 4px 餘裕），且不超過「年份清單高 − 上下外距」。
     年份清單不比照片高時（較高的視窗）沿用原本的 (100svh − 535px) ÷ 1.465，結果不變 */
  .story__stage { --S: clamp(60px, min(58vw, 32svh, max(132px - var(--mt) - var(--mb), 100svh - 470px)), 999px); }
  .story__shot { grid-area: shot; position: relative; left: auto; top: auto; justify-self: center; align-self: end; width: var(--S); margin-block: var(--mt) var(--mb); }
  .story__ring { inset: -14px; }
  .story__ring-ship { width: 22px; height: 22px; }
  .story__chapters { grid-area: text; display: grid; padding-top: 8px; }
  .story__ch { position: relative; inset: auto; grid-area: 1 / 1; display: grid; align-content: start; gap: clamp(4px, 1svh, 10px); }
  .story__zh { font-size: 12px; line-height: 1.9; }
  .story__en { max-width: none; }
  .story__dyk { grid-template-columns: auto 1fr; align-items: start; gap: 10px; font-size: 11px; line-height: 1.7; }
  .story__ctrl { grid-area: ctrl; justify-content: center; margin-top: clamp(4px, 1svh, 12px); }
  .story__barcode { display: none; }
  /* 邀請轉場：窄螢幕高度與流星延伸 */
  .interlude__invite { min-height: 30svh; padding-left: 14vw; font-size: 9vw; }
  .interlude__invite::before { width: 10vw; }
  .dv { padding: 4svh 6vw 5svh; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "date" "times" "venue"; }
  .dv__title { --vt-size: clamp(2.25rem, 10vw, 4rem); }
  .dv__date { padding-top: 3svh; }
  /* 第 11 輪：GFS Didot 的數字比 Cormorant 寬（2027.04.17 約 4.6 倍字級），原本 21vw 會貼到螢幕邊（390 寬左右只剩 3–7px）；
     手機 18.5vw、平板 16.3vw，左右墨跡留白約 24px 以上／接近第 10 輪 */
  .dv__num { font-size: 18.5vw; }
  .dv__dow { font-size: 10vw; }
  .dv__stars svg { width: calc(30vw * var(--s)); }
  .dv__times { grid-template-columns: minmax(0, 1fr); gap: 3svh; padding: 4svh 0 4svh; }
  .dv__en { font-size: 11vw; }
  .dv__clock { font-size: 17vw; }
  .dv__venue { grid-template-columns: minmax(0, 1fr); grid-template-areas: "bubbles" "main" "info" "parking"; grid-template-rows: none; gap: 3svh; }
  .dv__venue-name { font-size: 10vw; }

  .guidance { grid-template-columns: 1fr; gap: 4svh; padding: 6svh 6vw 6svh; }
  .guidance__head { position: relative; top: 0; }
  .guidance__title { --vt-size: clamp(2.25rem, 10vw, 4rem); }
  .guidance__items { gap: 5svh; padding-top: 0; }

  /* 出席回覆：直排標題與說明卡左右並排（和祝福區同一種排法），表單接在下面 */
  .rsvp { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; grid-template-areas: "head lead" "form form"; gap: 5svh 4vw; padding: 6svh 6vw 6svh; }
  .rsvp__title { --vt-size: clamp(2.5rem, 12vw, 5rem); }
  .rsvp__head { align-self: center; }
  .rsvp__lead { position: relative; top: 0; padding: 20px 18px; gap: 1em; }
  .form { gap: 22px; }
  .attend { padding-left: 10px; }

  .footer { padding: 12svh 6vw 24px; }
  .footer__top { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 20px; }
  .footer__credits { grid-column: 1; grid-row: auto; width: clamp(132px, 36vw, 172px); }
  .footer__thanks, .footer__en { grid-column: 1; grid-row: auto; justify-self: center; }
  .footer__names { font-size: 12vw; }
  .footer__year { position: static; font-size: 12vw; text-align: right; margin-top: 1.2svh; }
  .credits { grid-template-columns: 1fr; }
  .modal__body { padding: 28px 22px 22px; }
}

/* =========================================================
   第 9 輪（2026-11-19）：搬入良辰帖模板的功能
   首屏倒數＋回覆入口、月曆＋Google 日曆、停車地圖、LINE 小幫手、祝福泡泡牆、頁尾版權行
   規則：顏色一律用變數或 light-dark()；新動畫只寫在 :root.motion 底下；不新增釘住畫面（sticky）的區塊
   ========================================================= */
:root {
  /* 翻面區塊（深墨／深胭脂底）上的輔助文字與細線：#cdc1ab 對 #26241e 8.7:1、對 #4b2229 7.6:1 */
  --invert-soft: #cdc1ab;
  --invert-line: rgb(246 245 236 / .45);
  --invert-hover: rgb(246 245 236 / .1);
  --invert-line-soft: rgb(246 245 236 / .2);
  --hover-tint: light-dark(rgb(45 43 37 / .07), rgb(246 245 236 / .09));
  /* 停車地圖：日夜都是米白紙卡（翻面區塊日夜都是深色底），夜間略暗一點不刺眼；墨字對各底色至少 8:1 */
  --map-paper: light-dark(#f6f5ec, #ebe4d4);
  --map-block: light-dark(#ebe4d6, #ddd4c2);
  --map-road: light-dark(#d9cfbc, #cbbfa8);
  --map-green: light-dark(#d4d6b8, #c3c6a5);
  --map-lot: light-dark(#cdbfa6, #bfb196);
  --map-ink: var(--sumi);
  /* P 圖釘與月曆的紅印：胭脂底＋米白字 6.1:1 */
  --pin: var(--rouge-fill);
  --on-pin: var(--cream);
  /* 祝福泡泡 */
  --wish-bg: var(--field);
  --wish-line: light-dark(#d6ccb9, #3d3830);
}
/* 翻面區塊的 --ink-soft 改在「翻面配色」規則裡設定（只在翻面時用 --invert-soft），見「邀請轉場、日期與會場、注意事項」段（2026-11-24） */

/* ---------- 首屏：倒數＋回覆出席 ---------- */
/* 桌機放在左上的空白處（年月日欄 46svh 以上、名字左緣 41vw 以內）；手機放在照片與英文段落之間 */
.hero__cta {
  left: calc(var(--rail) + 3vw); top: min(23vw, 31svh); z-index: 2; max-width: 34vw;
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 28px; color: var(--ink);
}
.cd { display: grid; gap: 4px; }
.cd[hidden], .cd__done[hidden] { display: none; }
.cd__lead { font: 500 .8125rem/1.5 var(--f-zh); letter-spacing: .12em; color: var(--ink-soft); }
.cd__time { display: flex; align-items: baseline; gap: 12px; }
.cd__cell { display: inline-flex; align-items: baseline; gap: 4px; }
.cd__cell b { font: 400 clamp(2rem, 3vw, 2.75rem)/1 var(--f-didot); font-variant-numeric: lining-nums tabular-nums; }
.cd__cell small { font: 400 .8125rem/1 var(--f-zh); color: var(--cd-unit); }
.cd__done { font: 500 1rem/1.7 var(--f-zh); letter-spacing: .08em; }
.hero__rsvp {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px 0 22px;
  background: var(--fill); color: var(--on-fill); text-decoration: none; border-radius: 6px 6px 22px 6px;
  font: 500 1rem/1 var(--f-zh); letter-spacing: .16em; white-space: nowrap; transition: background-color .3s;
}
.hero__rsvp:hover { background: var(--fill-hover); }
.hero__rsvp-en { font: 500 .75rem/1 var(--f-sans); letter-spacing: .1em; }
.hero__rsvp .om { width: 18px; height: 18px; }
/* 第 12 輪（C2）：倒數＋回覆鈕整塊跟小字同一套（模糊 4px 淡入，順序 --hi: 7） */
:root.motion.js .hero__cta { opacity: 0; filter: blur(4px); transition: opacity .5s var(--ease-out), filter .5s var(--ease-out); transition-delay: calc(1.15s + var(--hi, 0) * 60ms); }
:root.motion.is-ready .hero__cta { opacity: 1; filter: none; }

/* ---------- 婚禮資訊：月曆＋加入 Google 日曆 ---------- */
/* 放在大日期下方（同一個 80svh 區塊裡），桌機不增加高度 */
/* 月曆卡：底色和翻面區塊相同、外加一圈淡線，擋住背景的淡星星，數字才不會壓在星星的線條上 */
.dv__cal { position: relative; justify-self: end; margin-top: 4svh; padding: 14px 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--invert-line-soft); display: flex; align-items: flex-end; gap: 16px 36px; flex-wrap: wrap; justify-content: flex-end; }
.dv__cal[hidden] { display: none; }
.cal { border-collapse: collapse; color: var(--ink); font: 400 1rem/1 var(--f-didot); }
.cal caption { caption-side: top; text-align: start; padding-bottom: 12px; font: 500 1rem/1.4 var(--f-zh); letter-spacing: .12em; }
.cal__cap-en { margin-left: 12px; font: 500 .75rem/1 var(--f-sans); letter-spacing: .14em; color: var(--ink-soft); }
.cal th { width: 44px; height: 34px; font: 500 .8125rem/1 var(--f-zh); color: var(--ink-soft); border-bottom: 1px solid var(--invert-line); }
.cal td { height: 42px; text-align: center; font-variant-numeric: lining-nums tabular-nums; }
.cal tbody tr:first-child td { padding-top: 6px; }
/* 婚禮當天：良辰帖紅印（胭脂底、米白字、內圈米白細框）；紅印對深色底只有 2:1，內圈米白框讓它在日夜都看得出來 */
.cal__seal { position: relative; isolation: isolate; display: inline-grid; place-items: center; width: 36px; height: 36px; color: var(--cream); font-weight: 400; }
.cal__seal::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--pin); border-radius: 4px;
  outline: 1.5px solid var(--cream); outline-offset: -4px; rotate: -6deg; filter: url(#lc-rough);
}
.cal__gcal {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 1px solid var(--ink); border-radius: 99px;
  color: var(--ink); text-decoration: none; font: 500 1rem/1 var(--f-zh); letter-spacing: .08em; transition: background-color .3s;
}
.cal__gcal:hover { background: var(--invert-hover); }
.cal__gcal .om { width: 18px; height: 18px; }

/* ---------- 婚禮資訊：停車地圖（會場底下） ---------- */
/* 第 10 輪：停車資訊在會場右側（.dv__venue 的 parking 欄）；地圖收在 <details>（.pk__fold）裡，寬螢幕預設展開 */
.dv__parking { grid-area: parking; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-areas: "title title" "fold list"; gap: 18px 3vw; align-items: start; }
.pk__title { grid-area: title; display: grid; }
.pk__title .dv__en { font-size: min(4vw, 7svh); }
.pk__title small { font: 500 1rem/1.6 var(--f-zh); letter-spacing: .1em; }
.pk__fold { grid-area: fold; }
/* 展開列：summary 改成 flex 後瀏覽器不畫預設的三角形，所以自己畫一個 ▸／▾（.pk__chev），外框做成按鈕的樣子，
   一看就知道可以點；收合時提示「點此展開」，展開後才提示「點 P 圖釘」。點擊範圍高 44px，鍵盤用 Enter／空白鍵開合（summary 原生行為） */
.pk__toggle {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; min-height: 44px; padding: 6px 18px 6px 14px; cursor: pointer;
  border: 1px solid var(--ink); border-radius: 12px; list-style: none; transition: background-color .3s;
  font: 500 1rem/1.5 var(--f-zh); letter-spacing: .08em; color: var(--ink);
}
.pk__toggle::-webkit-details-marker { display: none; }
.pk__toggle:hover { background: var(--invert-hover); }
.pk__chev { flex: none; width: 9px; height: 9px; margin-right: 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: -45deg; translate: -2px 0; }
.pk__fold[open] .pk__chev { rotate: 45deg; translate: 0 -2px; }
:root.motion .pk__chev { transition: rotate .25s var(--ease), translate .25s var(--ease); }
.pk__toggle small { font: 400 .8125rem/1.5 var(--f-zh); letter-spacing: .04em; color: var(--ink-soft); }
.pk__fold[open] .pk__hint--closed, .pk__fold:not([open]) .pk__hint--open { display: none; }
.pk__fold[open] > .pk__toggle { margin-bottom: 12px; }
.pk { margin: 0; display: grid; gap: 10px; }
/* 地圖框的長寬比＝svg 的 viewBox（400×300）；圖釘依資料的百分比定位，任何寬度都對準地圖上的停車場 */
.pk__map { position: relative; aspect-ratio: 4 / 3; }
.pk__art { display: block; width: 100%; height: 100%; border-radius: 10px; }
.pk__paper { fill: var(--map-paper); }
.pk__block { fill: var(--map-block); }
.pk__green { fill: var(--map-green); }
.pk__road { fill: var(--map-road); }
.pk__lot { fill: var(--map-lot); }
.pk__venue rect { fill: var(--pin); }
.pk__venue text { fill: var(--on-pin); font: 500 15px var(--f-zh); letter-spacing: .1em; }
.pk__label { fill: var(--map-ink); font: 500 15px var(--f-zh); letter-spacing: .12em; }
.pk__pin {
  position: absolute; left: var(--x); top: var(--y); translate: -50% -50%;
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--pin); color: var(--on-pin); border: 2px solid var(--cream); box-shadow: 0 2px 6px rgb(21 20 16 / .35);
  font: 500 .8125rem/1 var(--f-sans); letter-spacing: .02em; text-decoration: none; transition: scale .25s var(--ease);
}
/* 圖釘在米白地圖上：焦點框用墨色，米白框會看不見 */
.pk__pin:focus-visible { outline: 3px solid var(--map-ink); outline-offset: 2px; }
:root.motion { .pk__pin:hover { scale: 1.12; } }
.pk__cap { font: 400 .8125rem/1.6 var(--f-zh); color: var(--ink-soft); }
.pk__list { grid-area: list; display: grid; gap: 14px; font: 400 1rem/1.7 var(--f-zh); }
.pk__list li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--invert-line); }
.pk__no { grid-row: span 2; align-self: start; display: grid; place-items: center; min-width: 36px; height: 36px; border-radius: 50%; background: var(--pin); color: var(--on-pin); border: 2px solid var(--cream); font: 500 .8125rem/1 var(--f-sans); }
.pk__name { font-weight: 500; }

/* ---------- 注意事項：LINE 小幫手 ---------- */
/* 新元素的輔助文字至少 12px（既有的 .tag--bright 是 11px） */
.guidance__item--line .tag--bright { font-size: .75rem; }
.line-help { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.line-help__text { font: 400 1rem/1.9 var(--f-zh); }
.line-help__qr { margin: 0; display: grid; justify-items: center; gap: 6px; }
.line-help__qr svg { display: block; width: 112px; height: 112px; }
.line-help__paper { fill: var(--cream); }
.line-help__finder { fill: var(--sumi); }
.line-help__stamp rect { fill: var(--rouge-fill); }
.line-help__stamp text { fill: var(--cream); font: 500 20px var(--f-zh); letter-spacing: .1em; }
.line-help__qr figcaption { font: 400 .8125rem/1.4 var(--f-zh); color: var(--ink-soft); white-space: nowrap; }

/* ---------- 親友祝福：泡泡牆 ---------- */
/* 桌機：直排標題在左，說明與按鈕、泡泡牆在右；不釘住 */
.wishes {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "head intro" "head wall";
  align-items: start; gap: 28px 5vw; padding: 4svh calc(var(--rail) + 4vw) 2svh; color: var(--ink);
}
.wishes__head { grid-area: head; display: grid; justify-items: start; gap: 12px; }
.wishes__title { --vt-size: clamp(2.5rem, min(4.8vw, 8.4svh), 5rem); }
.wishes__intro { grid-area: intro; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; }
.wishes__lead { font: 400 1rem/1.9 var(--f-zh); color: var(--ink); }
.wishes__bar { display: flex; flex-wrap: wrap; gap: 12px; }
.wishes__btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  border: 1px solid var(--ink); border-radius: 99px; color: var(--ink); font: 500 1rem/1 var(--f-zh); letter-spacing: .08em;
  transition: background-color .3s;
}
.wishes__btn[hidden] { display: none; }
.wishes__btn:not(.wishes__btn--fill):hover { background: var(--hover-tint); }
.wishes__btn--fill { background: var(--fill); color: var(--on-fill); border-color: var(--fill); }
.wishes__btn--fill:hover { background: var(--fill-hover); border-color: var(--fill-hover); }
/* 泡泡牆：寬度夠時 JS 加上 .is-scatter 改成碰撞檢查後的散佈排版；
   窄螢幕（與沒有 JS 時）第 10 輪改成三列、可左右滑動的橫條（content-first：橫向輪播取代長列表），原本一顆一行、一左一右，要一個多畫面。
   上下左右各留 8px（漂浮時最多移動 8px，不會超出區塊）；橫條的泡泡間距 14px，漂浮幅度 5px */
.wishes__wall { grid-area: wall; position: relative; padding: 8px 8px 0; }
.wishes__wall:not(.is-scatter) {
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(3, auto); grid-auto-columns: max-content;
  justify-content: start; align-items: start; gap: 14px; padding-bottom: 14px;
  overflow: auto hidden; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: 8px;
}
.wishes__wall:not(.is-scatter) > .wish { max-width: min(15em, 78vw); scroll-snap-align: start; }
.wishes__wall.is-scatter { display: block; height: var(--wall-h, auto); }
.wishes__wall.is-scatter > .wish { position: absolute; left: var(--x, 0); top: var(--y, 0); }
.wish {
  max-width: min(18em, 100%); padding: 8px 15px 9px; background: var(--wish-bg); color: var(--ink);
  border: 1px solid var(--wish-line); border-radius: 20px 20px 20px 6px; font: 400 1rem/1.55 var(--f-zh); overflow-wrap: anywhere;
}
.wish:nth-child(even) { border-radius: 20px 20px 6px 20px; }
.wish--mine { border: 1.5px solid var(--thread); }
.wish__tag { display: inline-block; margin-right: 8px; padding: 0 9px; border-radius: 99px; background: var(--rouge-fill); color: var(--cream); font: 500 .75rem/1.75 var(--f-zh); letter-spacing: .06em; vertical-align: .08em; }
/* 進場＋漂浮（第 11 輪）：只在動效版，由 script.js 在祝福牆至少 25% 進入畫面時才加上 .is-run 開始播（.is-pre 先把泡泡藏起來，也是 JS 加的，沒有 JS 時泡泡直接顯示）。
   進場：依 --edel 錯開，每顆 .6 秒（透明度、由 .85 倍放大、由下方 --rise 升上來），全部 ≤ 1.5 秒。
   漂浮：進場結束後每顆來回兩趟（--fd 1.2–1.6 秒），幅度 --amp，方向由 --kx／--ky 決定。每顆總長 ≤ 0.9 + .6 + 2 × 1.6 = 4.7 秒 < 5 秒（WCAG 2.2.2，不需要暫停鈕）。
   幅度與間距：散佈排版泡泡間至少 20px（GAP，上下或左右至少一個方向），每顆每個方向最多 8px，相向 16px 碰不到；手機橫條間距 14px，每顆最多 5px，相向 10px。進場上升的距離也小於這個幅度 */
@keyframes wish-in { from { opacity: 0; scale: .85; transform: translateY(var(--rise)); } }
@keyframes wish-float { to { translate: calc(var(--kx) * var(--amp)) calc(var(--ky) * var(--amp)); } }
:root.motion {
  .wishes__wall { --amp: 5px; --rise: 5px; }
  .wishes__wall.is-scatter { --amp: 8px; --rise: 8px; }
  .wishes__wall.is-pre > .wish { opacity: 0; }
  .wishes__wall.is-run > .wish {
    animation:
      wish-in .6s var(--ease) var(--edel, 0s) backwards,
      wish-float var(--fd, 1.4s) ease-in-out calc(var(--edel, 0s) + .6s) 2 alternate backwards;
  }
  /* 換一批：先淡出再換上新的一批（沒有動效時直接換） */
  .wishes__wall { transition: opacity .3s; }
  .wishes__wall.is-swapping { opacity: 0; }
}

/* 寫下祝福的視窗 */
.wish-form__hint { font: 400 .875rem/1.8 var(--f-zh); color: var(--ink-soft); }
.wish-form__input { font-size: 1rem; }
.wish-form__count { justify-self: end; margin-top: -4px; font: 400 .8125rem/1 var(--f-sans); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.wish-form .field__err { font-size: .75rem; }
.wish-form__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-top: 8px; }

/* ---------- 頁尾：See you Soon!、新人版權行、製作者 ---------- */
/* 第 11 輪：See you Soon! 前後的間隔加大（上方 6svh → 12svh、下方 4svh → 7svh；手機上方 5svh → 11svh、下方 3svh → 5.5svh） */
.footer { padding-top: 12svh; }
.footer__seeyou { margin-bottom: 7svh; text-align: center; font: 200 min(10vw, 17svh)/1 var(--f-script); letter-spacing: 0; }
.footer__copy { margin-top: 22px; display: grid; gap: 2px; font: 400 .8125rem/1.7 var(--f-sans); color: var(--ink-soft); }

@media (width < 900px) {
  /* 手機：照片與英文段落之間；英文段落往下移 6svh 讓出位置（原 82svh），倒數＋按鈕貼在段落上方 12px */
  .hero__lead { top: 88svh; }
  .hero__cta { left: 16vw; right: 6vw; max-width: none; top: calc(88svh - 12px); translate: 0 -100%; gap: 10px 18px; }
  .cd__cell b { font-size: 1.875rem; }
  .cd__time { gap: 10px; }

  .dv__cal { justify-self: center; justify-content: center; margin-top: 3svh; padding: 12px 10px; }
  /* 手機：清單在前、地圖（預設收合）在後 */
  .dv__parking { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "list" "fold"; }
  .pk__title .dv__en { font-size: 9vw; }
  .pk__list { gap: 10px; }
  .pk__list li { padding-bottom: 10px; }

  .wishes { grid-template-areas: "head intro" "wall wall"; padding: 2svh 6vw 2svh; gap: 22px 6vw; }
  .wishes__title { --vt-size: clamp(2.25rem, 8vw, 3rem); }
  .wishes__intro { flex-direction: column; align-items: flex-start; align-self: center; }

  .footer { padding-top: 11svh; }
  .footer__seeyou { font-size: 15vw; margin-bottom: 5.5svh; }
  /* LINE 小幫手：QR 放在文字右邊，不另起一行 */
  .line-help { flex-wrap: nowrap; gap: 16px; }
  .line-help__qr svg { width: 96px; height: 96px; }
}

/* 平板直向（600–899px）：停車地圖與文字清單左右並排，少佔一段高度 */
@media (600px <= width < 900px) {
  .dv__parking { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-areas: "title title" "fold list"; }
  /* 第 10 輪：平板直向寬度夠，兩個時段左右並排、會場名稱與地址交通左右並排；
     時段的大字原本跟著 vw 放大（768 寬時 84px／130px），並排時設上限才放得下 */
  .dv__times { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3svh 5vw; }
  .dv__times .dv__en { font-size: min(11vw, 56px); }
  .dv__clock { font-size: min(17vw, 88px); }
  .dv__num { font-size: 16.3vw; }
  .dv__venue { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "bubbles bubbles" "main info" "parking parking"; }
  /* 注意事項：和桌機一樣，直排標題在左欄（欄內 sticky）、三個項目在右欄；標題欄只有標題寬，項目有足夠寬度 */
  .guidance { grid-template-columns: auto minmax(0, 1fr); gap: 4svh 7vw; }
  .guidance__head { position: sticky; top: 22svh; }
}
/* 第 10 輪：手機的月曆格子略矮一點（只是顯示用的表格，不能點） */
@media (width < 600px) {
  .cal th { height: 30px; }
  .cal td { height: 36px; }
}

/* =========================================================
   第 12 輪（使用者 2026-11-20）：融合參照站的動畫呈現方式（版面、字體、配色不變，只加動態語彙）
   全部只在 :root.motion 下生效；先藏起來的狀態都要 .js（head 內聯腳本加）＋ script.js 才會加的 .is-in／.is-ready 才會顯示，
   所以沒有 JS、靜態版（減少動態效果）都直接是最終狀態
   ========================================================= */

/* ---------- A3：無限循環的動畫離開畫面就暫停；「暫停動態」按鈕把所有自動播放的動態停住 ---------- */
/* .is-offscreen 由 script.js 加在 .hero、.interlude、.dv__date 上（IntersectionObserver，上下外擴 25%）。
   背景光球與浮點固定在畫面後方，永遠在畫面內，只由暫停鈕控制。
   捲動驅動的效果（釘住進度 --p、紅線、太空梭、衛星）是使用者自己捲才動，不受暫停影響 */
:root.motion .is-offscreen :is(.hero__daisy, .meteors i, .dv__stars svg) { animation-play-state: paused; }
:root.motion.is-paused :is(.orb, .bg__dots i, .hero__daisy, .meteors i, .dv__stars svg) { animation-play-state: paused; }
:root.motion.is-paused .wishes__wall.is-run > .wish { animation-play-state: running, paused; }
/* 暫停／播放的圖示：兩個都放在按鈕裡，依狀態只顯示一個 */
:is(.motion-toggle, .hero__pause) .is-play { display: none; }
:root.is-paused :is(.motion-toggle, .hero__pause) .is-play { display: inline-block; }
:root.is-paused :is(.motion-toggle, .hero__pause) .is-pause { display: none; }

/* ---------- H1：手機選單由 MENU 鈕的位置以圓形展開（@starting-style）；關閉時縮回（Chrome 才有關閉動畫，其他瀏覽器直接關） ---------- */
:root.motion .menu {
  clip-path: circle(0% at calc(100% - 44px) 24px);
  transition: clip-path .6s var(--ease-in-out), display .6s, overlay .6s;
  transition-behavior: allow-discrete;
  &[open] {
    clip-path: circle(150% at calc(100% - 44px) 24px);
    @starting-style { clip-path: circle(0% at calc(100% - 44px) 24px); }
  }
}

/* ---------- D1：致詞卡片升起後，內文逐行浮現（--p 驅動，往回捲會倒放） ---------- */
/* 量過的時間表（script.js 的 --p 與 CSS 捲動動畫相同）：卡片在 p .487 → .872 升起（--cp 0 → 1，捲動 38 → 68svh），之後停到 p 1。
   標頭（色條、「致詞」、MESSAGE、英文段落、小星星，--li 0–4）從 p .834（卡片已升起約 90%，整張卡都在畫面內）開始；
   內文每一行（script.js 依 <br> 拆成 .ln，--li 5–13）與署名（--li 14）接在後面：每項錯開 .009、各用 .025 淡入，最後一項在 p ≈ .985 完成。
   每一項：透明度 0 → 1、模糊 5px → 0、由下方 10px 升上來（參照站的逐行浮現）；色條改成由左往右掃出 */
:root.motion.js .message__card { --la: .834; --ls: .009; --lk: 40; }
:root.motion.js :is(.message__bar, .message__title, .message__sub, .message__en, .message__tick, .message__body .ln, .message__sign) {
  --o: clamp(0, (var(--p) - var(--la) - var(--li, 0) * var(--ls)) * var(--lk), 1);
  opacity: var(--o);
  filter: blur(calc((1 - var(--o)) * 5px));
}
:root.motion.js :is(.message__title, .message__sub, .message__en, .message__body .ln, .message__sign) { translate: 0 calc((1 - var(--o)) * 10px); }
:root.motion.js .message__bar { scale: var(--o) 1; transform-origin: left center; }
.message__bar { --li: 0; } .message__title { --li: 1; } .message__sub { --li: 2; } .message__en { --li: 3; } .message__tick { --li: 4; }
.message__body .ln { display: inline-block; }

/* ---------- E1、E2：新人介紹——角色膠囊彈入、名字兩段遮罩上滑、PROFILE／PERSONALITY 標籤掃出 ---------- */
/* .is-in 由 script.js 在 .cast__head、.cast__label 進入畫面（視窗底往內 12%）時加上。紅線與太空梭仍隨捲動計算，不在這裡 */
:root.motion.js .cast__name > span { overflow: visible clip; overflow-clip-margin: .12em; }
:root.motion.js .cast__name .cast__nm { transition: translate var(--dur-slow) var(--ease-out) .12s; }
:root.motion.js .cast__name > span + span .cast__nm { transition-delay: .22s; }
:root.motion.js .cast__head:not(.is-in) .cast__name .cast__nm { translate: 0 105%; }
:root.motion.js .cast__role .tag { transition: opacity var(--dur) var(--ease-out), scale .5s var(--ease-back); }
:root.motion.js .cast__head:not(.is-in) .cast__role .tag { opacity: 0; scale: .8; }
:root.motion.js .cast__label .tag { transition: clip-path .6s var(--ease-sweep); }
:root.motion.js .cast__label:not(.is-in) .tag { clip-path: inset(0 100% 0 0); }
/* 名字的內層（遮罩上滑用）：.cast__name span 會把它變成 block，這裡改回 inline-block，才能在外層的框裡上下移動；排版與原本相同 */
.cast__name .cast__nm { display: inline-block; }

/* ---------- F1：故事區的年月像翻頁機：每個字元各自上捲，新字由下方進來並略過衝；同位置相同的字不動 ---------- */
/* script.js 把年月拆成字元格（.flip__slot，aria-hidden；讀屏念的是旁邊 visually-hidden 的原文字）。
   字元只在自己的格子裡移動（overflow: clip），不會離開年月的位置 */
.flip { white-space: nowrap; }
.flip__slot { position: relative; display: inline-block; overflow: clip; vertical-align: top; }
.flip__c { display: inline-block; }
.flip__c.is-out { position: absolute; left: 0; top: 0; }

/* ---------- F2：換章時文字「上送」：舊的往上送出（-18px、縮 .94、模糊 4px、淡出），新的由下方 18px 進來 ---------- */
/* 位移只有 18px：桌機的章節文字在照片右側（60vw 起），衛星繞行帶最遠到約 57vw，上下移動不會進入；上方 PREV／NEXT 離章節標題至少 30px。
   手機的章節文字在 .story__chapters 裡移動，換章的那 .9 秒把它裁在自己的框內（.is-swapping），不會滑到下方按鈕或上方說明文字。
   照片下的說明文字：舊的整行往上送出、新的由下方進來，只在說明文字自己的框內（換章時上下裁切），不會進入衛星繞行帶 */
:root.motion .story__ch > * { transition: translate .7s var(--ease-out), scale .7s var(--ease-out), filter .7s var(--ease-out); transform-origin: left top; }
:root.motion .story__ch:not(.is-active) > * { translate: 0 18px; filter: blur(4px); }
:root.motion .story__ch.is-leaving > * { translate: 0 -18px; scale: .94; transition-duration: .6s; transition-timing-function: var(--ease-in-out); }
:root.motion .story__caption.is-swapping { overflow: visible clip; overflow-clip-margin: 2px; }
@media (width < 900px) { :root.motion .story__chapters.is-swapping { overflow: clip; } }
.story__cap-in { display: block; }
.story__cap-in.is-out { position: absolute; left: 0; right: 0; top: 0; }

/* ---------- G1、G3：婚禮資訊——大日期逐字淡入（只淡入、不位移）、分隔線由左往右掃出 ---------- */
/* 大日期用既有的拆字機制（data-split="fade"）：字維持行內排列（不裁切、不加左右留白），字寬與原本相同 */
[data-split="fade"] .line { display: inline; overflow: visible; padding-inline: 0; }
[data-split="fade"] .ch { display: inline; }
:root.motion.js [data-split="fade"] .ch { display: inline; translate: none; transition: opacity var(--dur) var(--ease-out); transition-delay: calc(var(--i) * 30ms); }
:root.motion.js .dv__big {
  & :is(.dv__dow, small) { transition: opacity var(--dur) var(--ease-out) .35s; }
  &:not(.is-in) :is(.dv__num .ch, .dv__dow, small) { opacity: 0; }
}
/* 證婚／婚宴下方的分隔線：原本是 border-bottom，動效版把線改畫在 ::after（同一個位置、同一個顏色），才能用 scale 掃出；border 保留透明，高度不變 */
:root.motion.js .dv__time { position: relative; border-bottom-color: transparent; }
:root.motion.js .dv__time::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: color-mix(in srgb, currentColor 35%, transparent);
  scale: 0 1; transform-origin: left center; transition: scale var(--dur-slow) var(--ease-sweep) .3s; }
:root.motion.js .dv__time.is-in::after { scale: 1 1; }
:root.motion.js .interlude__invite::before { scale: 0 1; transform-origin: left center; transition: scale var(--dur-slow) var(--ease-sweep) .2s; }
:root.motion.js .interlude__invite.is-in::before { scale: 1 1; }

/* ---------- G2：捲回「婚禮資訊」「注意事項」時重播：元素整個離開到畫面上方後，script.js 先加 .fx-reset（暫停過渡）再拿掉 .is-in，回來時再播一次 ---------- */
:is(.fx-reset, .fx-reset *), :is(.fx-reset, .fx-reset *)::before, :is(.fx-reset, .fx-reset *)::after { transition: none !important; }

/* ---------- 第 13 輪（使用者 2026-11-20）：四個直排大標題先移除 ----------
   「婚禮邀請」「新人介紹」「我們的故事」「婚禮資訊」與上方的英文小字（ABOUT US／OUR STORY／DATE & VENUE）畫面上不顯示。
   首屏的「WEDDING INVITATION」保留。
   新人介紹、故事、婚禮資訊的 h2 仍留在頁面裡、只是看不到（同 .visually-hidden 的做法），讀屏軟體照樣讀得到，各區段 aria-labelledby 也照常指向它們。
   首屏的「婚禮邀請」本來就是 aria-hidden 的裝飾字（h1 另有隱藏文字），直接不顯示。
   要恢復：刪掉這一段即可，HTML 沒動。 */
.hero__wedding { display: none; }
/* 手機：原本英文小字靠右、跟標題一起以照片中心上下置中；標題拿掉後它會滑進照片底下被蓋住（390 寬只剩 INVITATION），
   改放在照片正下方、右緣對齊照片（照片 40vw 置中、上緣 38svh；22px 讓開照片右下角的框線） */
@media (width < 900px) { .hero__heading { top: calc(38svh + 40vw + 22px); right: 30vw; translate: none; } }
/* 故事區：桌機的標題本來就是絕對定位，直接隱藏不影響版面。
   手機與平板（900px 以下）的標題佔著「標題｜年月」那一列的高度，若收掉，整個釘住畫面會往上移，768／820 寬時衛星會碰到年月數字（第 13 輪實測），
   所以 900px 以下只把標題變透明、保留原本的位置，第 11、12 輪量過的版面全部不變 */
@media (width < 900px) { .story__head { opacity: 0 !important; pointer-events: none; user-select: none; } }
@media (width >= 900px) {
  .story__head {
    position: absolute !important; clip-path: inset(50%) !important; overflow: hidden !important;
    width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important;
    border: 0 !important; white-space: nowrap !important;
  }
}
.about__intro, .dv__head {
  position: absolute !important; clip-path: inset(50%) !important; overflow: hidden !important;
  width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important;
  border: 0 !important; white-space: nowrap !important;
}
