/* ============================================================
   月老祠 · Yue Lao Shrine
   ------------------------------------------------------------
   01 設計變數 / 基礎
   02 氛圍與通用元件
   03 頁首、導覽、語言選單
   04 首頁：主視覺
   05 首頁：心路、籤語、守祠人
   06 內頁：標題、步驟、表單
   07 姻緣燈 / 紅線 / 簽筒 / 籤文
   08 信封與三個告別遊戲
   09 關於、私隱、頁尾
   10 彈窗、提示
   11 響應式
   12 減少動態偏好
   ============================================================ */

/* ---------- 01 設計變數 / 基礎 ---------- */
:root {
  --ink: #0b0708;
  --ink-2: #100a0c;
  --ink-3: #171011;
  --crimson: #6e1220;
  --crimson-2: #8e1b2a;
  --crimson-3: #3a0a12;
  --gold: #c8a45c;
  --gold-2: #e7ce9b;
  --gold-3: #f2ddb2;
  --gold-dim: rgba(200, 164, 92, 0.28);
  --rose: #d9a7ae;
  --rose-2: #f0cdd1;
  --rice: #f4ecdf;
  --rice-2: #e8dcc8;
  --muted: rgba(244, 236, 223, 0.58);
  --muted-2: rgba(244, 236, 223, 0.36);
  --line: rgba(200, 164, 92, 0.18);
  --line-soft: rgba(200, 164, 92, 0.1);
  --header-h: 78px;
  --serif: "Noto Serif TC", "Songti TC", "STSong", "Yu Mincho", "Noto Serif JP", "Batang", "Noto Serif KR", "Noto Serif Thai", Georgia, serif;
  --serif-en: "Cormorant Garamond", "Noto Serif TC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Hiragino Sans", "Noto Sans TC", "Microsoft JhengHei", "Malgun Gothic", "Leelawadee UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* 日／韓／泰語標題使用對應字型，避免漢字字形錯位 */
html[lang="ja"] { --serif: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif TC", serif; }
html[lang="ko"] { --serif: "Noto Serif KR", "Batang", "Nanum Myeongjo", "Noto Serif TC", serif; }
html[lang="th"] { --serif: "Noto Serif Thai", "Noto Serif TC", Georgia, serif; --sans: "Leelawadee UI", "Tahoma", "Segoe UI", sans-serif; }

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: rgba(200, 164, 92, 0.35) #0b0708;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--rice);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.8;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
textarea { font: inherit; }
svg { display: block; }
img { max-width: 100%; }

::selection { background: rgba(200, 164, 92, 0.26); color: #fff; }

:focus-visible {
  outline: 1px solid var(--gold-2);
  outline-offset: 3px;
}

/* 自訂捲軸（桌面） */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0a0607; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(200, 164, 92, 0.4), rgba(110, 18, 32, 0.6));
  border: 2px solid #0a0607;
  border-radius: 10px;
}

.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(22px, 5vw, 64px);
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.icon { flex: none; }

/* ---------- 02 氛圍與通用元件 ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1100px 760px at 82% -8%, rgba(110, 18, 32, 0.45), transparent 62%),
    radial-gradient(900px 720px at -12% 18%, rgba(58, 10, 18, 0.55), transparent 66%),
    radial-gradient(1200px 900px at 50% 112%, rgba(46, 10, 18, 0.55), transparent 62%),
    linear-gradient(180deg, #0b0708 0%, #0d0809 46%, #090506 100%);
}

.ambient::after {
  content: "";
  position: absolute;
  top: -18%;
  right: -8%;
  width: 60vw;
  height: 60vw;
  max-width: 820px;
  max-height: 820px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 164, 92, 0.1), transparent 64%);
  filter: blur(30px);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.035;
  background-image: 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='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 140px 140px;
}

main, .site-footer, .site-header { position: relative; z-index: 1; }

.label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(200, 164, 92, 0.82);
}

.label__rule {
  display: block;
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 164, 92, 0.7));
}

.label__rule + span { transform: translateY(0.05em); }

.section { padding: clamp(72px, 9.5vw, 132px) 0; }
.section__head { margin-bottom: clamp(34px, 4vw, 56px); }
.section__head--center { text-align: center; display: grid; justify-items: center; gap: 14px; }
.section__head--center .label { justify-content: center; }
.section__title {
  margin-top: 18px;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: var(--rice);
}

/* 按鈕 */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 56px;
  padding: 0 30px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  transition: transform 0.45s var(--ease), background 0.45s var(--ease), border-color 0.45s var(--ease), color 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.btn__icon { font-size: 14px; transition: transform 0.45s var(--ease); }
.btn:hover .btn__icon { transform: translateX(4px); }

.btn--gold {
  background: linear-gradient(135deg, #f0d8a8 0%, #d8b87c 42%, #b78f4a 100%);
  color: #2a1208;
  box-shadow: 0 14px 40px -16px rgba(200, 164, 92, 0.55);
}
.btn--gold::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-18deg);
  transition: left 0.8s var(--ease);
}
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 20px 46px -18px rgba(200, 164, 92, 0.7); }
.btn--gold:hover::after { left: 130%; }

.btn--ghost {
  border-color: rgba(200, 164, 92, 0.34);
  color: var(--rice);
  background: rgba(255, 255, 255, 0.015);
}
.btn--ghost:hover {
  border-color: rgba(200, 164, 92, 0.75);
  background: rgba(200, 164, 92, 0.07);
  transform: translateY(-2px);
}

.btn--sm { height: 46px; padding: 0 22px; font-size: 10.5px; gap: 10px; }
.btn--link { color: var(--muted); border-color: transparent; }
.btn--link:hover { color: var(--gold-2); }

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 6px 0;
  font-size: 11.5px;
  letter-spacing: 0.18em;
  color: rgba(231, 206, 155, 0.9);
  border-bottom: 1px solid transparent;
  transition: color 0.35s, border-color 0.35s;
}
.link-btn:hover { color: var(--gold-3); border-color: rgba(200, 164, 92, 0.4); }
.link-btn__dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--crimson-2);
  box-shadow: 0 0 10px rgba(200, 53, 74, 0.8);
}
.link-btn__arrow { font-size: 11px; opacity: 0.6; transition: transform 0.35s var(--ease); }
.link-btn:hover .link-btn__arrow { transform: translate(2px, -2px); }
.link-btn--back { margin-top: 30px; color: var(--muted-2); }
.link-btn--back:hover { color: var(--gold-2); }

.fineprint { font-size: 11px; line-height: 1.9; color: rgba(244, 236, 223, 0.46); }

/* 進場動畫 */
@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 03 頁首、導覽、語言選單 ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  height: var(--header-h);
  background: rgba(9, 6, 7, 0.42);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  border-bottom: 1px solid transparent;
  transition: background 0.5s, border-color 0.5s;
}
.site-header.is-scrolled {
  background: rgba(8, 5, 6, 0.86);
  border-bottom-color: rgba(200, 164, 92, 0.12);
}

.header__inner {
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 52px);
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.brand__seal {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  background: linear-gradient(150deg, #8e1b2a, #5c0d18);
  border: 1px solid rgba(231, 206, 155, 0.35);
  color: var(--gold-3);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.35), 0 6px 18px rgba(0, 0, 0, 0.35);
}
.brand__text { display: flex; flex-direction: column; gap: 3px; }
.brand__text strong {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2em;
  line-height: 1.1;
  color: var(--rice);
}
.brand__text small {
  font-size: 8px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(231, 206, 155, 0.45);
  line-height: 1.2;
}

.site-nav { display: flex; align-items: center; gap: clamp(16px, 2vw, 30px); margin-left: auto; }
.site-nav a {
  position: relative;
  padding: 8px 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(244, 236, 223, 0.55);
  transition: color 0.35s;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: linear-gradient(90deg, rgba(200, 164, 92, 0.8), transparent);
  transition: width 0.45s var(--ease);
}
.site-nav a:hover { color: var(--rice); }
.site-nav a:hover::after { width: 100%; }
.site-nav a.is-active { color: var(--gold-2); }
.site-nav a.is-active::after { width: 100%; }

.header__tools { display: flex; align-items: center; gap: 10px; margin-left: 8px; flex: none; }

.lang { position: relative; }
.lang__btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(200, 164, 92, 0.22);
  border-radius: 40px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: rgba(244, 236, 223, 0.7);
  transition: border-color 0.35s, color 0.35s, background 0.35s;
}
.lang__btn:hover { border-color: rgba(200, 164, 92, 0.55); color: var(--rice); background: rgba(200, 164, 92, 0.05); }
.lang__globe {
  position: relative;
  width: 11px; height: 11px;
  border: 1px solid rgba(200, 164, 92, 0.6);
  border-radius: 50%;
}
.lang__globe::before {
  content: "";
  position: absolute;
  inset: 3px 0;
  border-top: 1px solid rgba(200, 164, 92, 0.45);
  border-bottom: 1px solid rgba(200, 164, 92, 0.45);
}
.lang__globe::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 1px;
  background: rgba(200, 164, 92, 0.4);
}
.lang__caret {
  width: 5px; height: 5px;
  border-right: 1px solid rgba(200, 164, 92, 0.7);
  border-bottom: 1px solid rgba(200, 164, 92, 0.7);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.35s;
}
.lang.is-open .lang__caret { transform: rotate(225deg) translateY(-1px); }

.lang__menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 206px;
  padding: 8px;
  background: rgba(15, 10, 11, 0.97);
  border: 1px solid rgba(200, 164, 92, 0.22);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: 0.3s var(--ease);
  z-index: 70;
}
.lang.is-open .lang__menu { opacity: 1; visibility: visible; transform: none; }
.lang__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  font-size: 12px;
  text-align: left;
  color: rgba(244, 236, 223, 0.66);
  transition: background 0.25s, color 0.25s;
}
.lang__item em {
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: rgba(200, 164, 92, 0.4);
}
.lang__item:hover { background: rgba(200, 164, 92, 0.07); color: var(--rice); }
.lang__item.is-active { color: var(--gold-2); }
.lang__item.is-active::before {
  content: "";
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--gold);
  margin-right: 8px;
}
.lang__item.is-active span { margin-right: auto; margin-left: 8px; }
.lang__item.is-active em { color: var(--gold); }

.burger {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid rgba(200, 164, 92, 0.22);
  border-radius: 50%;
  position: relative;
}
.burger span {
  position: absolute;
  left: 12px;
  width: 16px; height: 1px;
  background: rgba(244, 236, 223, 0.7);
  transition: transform 0.35s var(--ease), opacity 0.35s;
}
.burger span:first-child { top: 17px; }
.burger span:last-child { top: 22px; }
.burger.is-open span:first-child { transform: translateY(2.5px) rotate(45deg); }
.burger.is-open span:last-child { transform: translateY(-2.5px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  z-index: 55;
  background: rgba(9, 6, 7, 0.97);
  border-bottom: 1px solid rgba(200, 164, 92, 0.14);
  padding: 10px 24px 22px;
  transform: translateY(-110%);
  visibility: hidden;
  transition: transform 0.5s var(--ease), visibility 0.5s;
  backdrop-filter: blur(18px);
}
.mobile-nav.is-open { transform: none; visibility: visible; }
.mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 4px;
  border-bottom: 1px solid rgba(200, 164, 92, 0.09);
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.08em;
  color: rgba(244, 236, 223, 0.75);
}
.mobile-nav a em {
  font-family: var(--serif-en);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(200, 164, 92, 0.35);
}
.mobile-nav a.is-active { color: var(--gold-2); }

/* ---------- 04 首頁：主視覺 ---------- */
.view { display: none; padding-bottom: clamp(50px, 7vw, 90px); }
.view.is-active { display: block; animation: viewIn 0.7s var(--ease) both; }
.view[data-view="home"] { padding-bottom: 0; position: relative; }

.hero {
  position: relative;
  min-height: 100svh;
  max-width: 1400px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 56px) clamp(22px, 5vw, 64px) 90px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
  gap: clamp(20px, 4vw, 60px);
  overflow: hidden;
}

.hero__copy { position: relative; z-index: 3; max-width: 600px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(200, 164, 92, 0.78);
}
.eyebrow__rule {
  width: 46px;
  height: 1px;
  background: linear-gradient(90deg, rgba(200, 164, 92, 0.7), transparent);
}

.hero__title {
  margin-top: clamp(22px, 3vw, 34px);
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 5.4vw, 76px);
  line-height: 1.22;
  letter-spacing: 0.015em;
  padding-bottom: 0.1em;
  background: linear-gradient(170deg, #fbf6ec 6%, #f0e4cd 42%, #d8b87c 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-wrap: balance;
}
html[lang="zh-Hant"] .hero__title { letter-spacing: 0.05em; line-height: 1.3; }
html[lang="en"] .hero__title { font-size: clamp(36px, 4.3vw, 62px); line-height: 1.18; letter-spacing: 0; text-wrap: normal; }
html[lang="ja"] .hero__title,
html[lang="ko"] .hero__title { line-height: 1.34; letter-spacing: 0.01em; }
html[lang="th"] .hero__title { line-height: 1.58; letter-spacing: 0; font-size: clamp(32px, 4.4vw, 58px); }
html[lang="th"] .hero__sub { line-height: 2.1; }
html[lang="th"] .btn { letter-spacing: 0.03em; }
html[lang="th"] .label,
html[lang="th"] .eyebrow { letter-spacing: 0.18em; }
html[lang="th"] .guide { line-height: 1.9; letter-spacing: 0.04em; }
html[lang="th"] .path-card__body p { line-height: 2.05; }

/* 拉丁語系的標題改用 Cormorant Garamond，較符合高級編輯排版 */
body[data-lang="en"] :is(.hero__title, .section__title, .page-head h1, .oracle__copy h2, .path-card__body h3, .keeper-card__info h3, .slip__title, .slip__poem, .brand__text strong, .modal__head h2),
body[data-lang="id"] :is(.hero__title, .section__title, .page-head h1, .oracle__copy h2, .path-card__body h3, .keeper-card__info h3, .slip__title, .slip__poem, .brand__text strong, .modal__head h2),
body[data-lang="vi"] :is(.hero__title, .section__title, .page-head h1, .oracle__copy h2, .path-card__body h3, .keeper-card__info h3, .slip__title, .slip__poem, .brand__text strong, .modal__head h2) {
  font-family: var(--serif-en);
  letter-spacing: 0.005em;
}

.hero__sub {
  margin-top: 26px;
  max-width: 42ch;
  font-size: clamp(14px, 1.3vw, 16px);
  line-height: 2;
  font-weight: 300;
  color: rgba(244, 236, 223, 0.58);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(32px, 4vw, 46px); }

.hero__trust {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 34px;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: rgba(244, 236, 223, 0.44);
}
.hero__trust .icon { color: rgba(200, 164, 92, 0.55); }

/* 主視覺右側 */
.hero__art {
  position: relative;
  z-index: 1;
  height: clamp(460px, 62vh, 620px);
  margin-top: 10px;
}

.art-moon {
  position: absolute;
  top: 2%;
  right: -6%;
  width: clamp(300px, 34vw, 470px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 32%, rgba(255, 247, 230, 0.16), rgba(200, 164, 92, 0.06) 40%, transparent 68%),
    radial-gradient(circle at 50% 50%, rgba(231, 206, 155, 0.05), transparent 70%);
  border: 1px solid rgba(200, 164, 92, 0.1);
  box-shadow: inset 0 0 90px rgba(200, 164, 92, 0.06), 0 0 140px rgba(110, 18, 32, 0.25);
}
.art-moon::after {
  content: "";
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 164, 92, 0.07), transparent 66%);
  filter: blur(18px);
}

.thread-arcs {
  position: absolute;
  inset: -6% -4% 0 -4%;
  width: 108%;
  height: 106%;
  overflow: visible;
}
.thread-arcs path {
  fill: none;
  stroke: rgba(200, 164, 92, 0.28);
  stroke-width: 1;
  stroke-dasharray: 2 7;
  animation: dashDrift 42s linear infinite;
}
.thread-arcs path:nth-child(2) { stroke: rgba(200, 53, 74, 0.3); animation-duration: 56s; animation-direction: reverse; }
.thread-arcs path:nth-child(3) { stroke: rgba(231, 206, 155, 0.18); animation-duration: 48s; }

@keyframes dashDrift { to { stroke-dashoffset: -600; } }

.lantern {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: top center;
  animation: lanternSway 9s ease-in-out infinite;
}
.lantern svg { width: 100%; height: auto; filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.55)); }
.lantern__string {
  display: block;
  width: 1px;
  height: var(--h, 60px);
  background: linear-gradient(180deg, rgba(200, 164, 92, 0), rgba(200, 164, 92, 0.42));
}
.lantern--1 { left: 7%; width: clamp(88px, 9vw, 118px); }
.lantern--2 { right: 7%; width: clamp(60px, 6.4vw, 82px); animation-delay: -2.6s; animation-duration: 10.5s; }
.lantern--3 { left: 46%; width: clamp(42px, 4.4vw, 58px); opacity: 0.55; animation-delay: -4.4s; animation-duration: 12s; }

@keyframes lanternSway {
  0%, 100% { transform: rotate(-1.6deg); }
  50% { transform: rotate(1.8deg); }
}

.seal-vertical {
  position: absolute;
  right: 4%;
  bottom: 3%;
  padding: 18px 9px;
  writing-mode: vertical-rl;
  text-orientation: upright;
  background: linear-gradient(160deg, #8e1b2a, #5c0d18);
  border: 1px solid rgba(231, 206, 155, 0.42);
  box-shadow: inset 0 0 0 3px rgba(110, 18, 32, 0.9), inset 0 0 0 4px rgba(231, 206, 155, 0.25), 0 20px 40px -16px rgba(0, 0, 0, 0.7);
  color: #f6ecdc;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.34em;
  line-height: 1;
}

.hero__petals {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.petal {
  position: absolute;
  top: -8%;
  left: var(--x);
  width: 10px;
  height: 8px;
  border-radius: 62% 6% 62% 6%;
  background: linear-gradient(135deg, #f0cdd1, #c97c88);
  opacity: 0;
  transform: scale(var(--s, 1));
  animation: petalDrift var(--d, 28s) linear var(--delay, 0s) infinite;
}
@keyframes petalDrift {
  0% { opacity: 0; transform: translate3d(0, -4vh, 0) rotate(0deg) scale(var(--s, 1)); }
  8% { opacity: 0.5; }
  55% { transform: translate3d(34px, 38vh, 0) rotate(190deg) scale(var(--s, 1)); }
  92% { opacity: 0.35; }
  100% { opacity: 0; transform: translate3d(-26px, 84vh, 0) rotate(360deg) scale(var(--s, 1)); }
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 4;
}
.scroll-cue__line {
  width: 1px;
  height: 36px;
  background: linear-gradient(180deg, rgba(200, 164, 92, 0.5), transparent);
  position: relative;
}
.scroll-cue__line::after {
  content: "";
  position: absolute;
  top: 0; left: -1px;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--gold-2);
  animation: scrollDot 2.6s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(32px); opacity: 0; }
}
.scroll-cue em {
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(244, 236, 223, 0.28);
  writing-mode: vertical-rl;
}

/* ---------- 05 首頁：心路、籤語、守祠人 ---------- */
.section--paths { padding-top: clamp(44px, 6vw, 76px); }

.path-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 26px);
}

.path-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: clamp(300px, 30vw, 370px);
  padding: clamp(28px, 3.4vw, 48px);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(110, 18, 32, 0.22), transparent 58%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.005) 60%);
  overflow: hidden;
  transition: transform 0.6s var(--ease), border-color 0.6s, background 0.6s;
}
.path-card::before,
.path-card::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  border: 1px solid rgba(200, 164, 92, 0.3);
  transition: border-color 0.5s;
}
.path-card::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.path-card::after { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.path-card:hover {
  transform: translateY(-6px);
  border-color: rgba(200, 164, 92, 0.46);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(110, 18, 32, 0.34), transparent 58%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.008) 60%);
}
.path-card:hover::before,
.path-card:hover::after { border-color: rgba(200, 164, 92, 0.75); }

.path-card__num {
  position: absolute;
  top: 18px;
  right: clamp(24px, 3vw, 40px);
  font-family: var(--serif-en);
  font-size: clamp(52px, 6vw, 84px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(200, 164, 92, 0.32);
  transition: -webkit-text-stroke-color 0.5s;
}
.path-card:hover .path-card__num { -webkit-text-stroke-color: rgba(200, 164, 92, 0.52); }

.path-card__body { position: relative; z-index: 2; max-width: 66%; margin-top: 34px; }
.path-card__body h3 {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--rice);
}
.path-card__body p {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.95;
  color: rgba(244, 236, 223, 0.62);
}

.path-card__art {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  opacity: 0.42;
  transition: opacity 0.7s ease, transform 0.8s var(--ease);
}
.path-card__art svg { width: 100%; height: auto; }
.path-card__art--lantern {
  right: 3%;
  bottom: 7%;
  width: clamp(84px, 8.5vw, 112px);
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: rotate(4deg);
}
.path-card__art--lantern svg { filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.5)); }
.path-card__cord {
  width: 1px;
  height: 38px;
  background: linear-gradient(180deg, rgba(200, 164, 92, 0), rgba(200, 164, 92, 0.4));
}
.path-card__art--envelope {
  right: 3%;
  bottom: 9%;
  width: clamp(122px, 12.5vw, 172px);
  transform: rotate(-7deg);
  opacity: 0.68;
}
.path-card:hover .path-card__art--lantern { opacity: 0.72; transform: rotate(2deg) translateY(-4px); }
.path-card:hover .path-card__art--envelope { opacity: 0.85; transform: rotate(-3deg) translateY(-4px); }

.path-card__cta {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(231, 206, 155, 0.8);
}
.path-card__cta em { font-style: normal; transition: transform 0.5s var(--ease); }
.path-card:hover .path-card__cta em { transform: translateX(6px); }

.path-card__motif {
  position: absolute;
  left: 0; right: 0; bottom: 34px;
  width: 100%;
  height: 110px;
  opacity: 0.5;
  transition: opacity 0.6s;
}
.path-card__motif path {
  fill: none;
  stroke: rgba(200, 53, 74, 0.5);
  stroke-width: 1;
  stroke-dasharray: 3 6;
}
.path-card__motif circle { fill: rgba(231, 206, 155, 0.5); }
.path-card:hover .path-card__motif { opacity: 0.9; }

.path-card__lace {
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  opacity: 0.28;
  background-image: radial-gradient(circle at 8px 8px, rgba(217, 167, 174, 0.35) 1.1px, transparent 1.4px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 70%);
  mask-image: linear-gradient(180deg, transparent, #000 70%);
  transition: opacity 0.6s;
}
.path-card:hover .path-card__lace { opacity: 0.45; }

.section--oracle { padding-top: 0; }

.oracle {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(24px, 5vw, 70px);
  padding: clamp(32px, 5vw, 68px);
  border: 1px solid var(--line);
  background:
    radial-gradient(90% 120% at 88% 50%, rgba(110, 18, 32, 0.4), transparent 60%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.2));
  overflow: hidden;
}
.oracle::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(200, 164, 92, 0.08);
  pointer-events: none;
}
.oracle__copy { position: relative; z-index: 2; max-width: 560px; }
.oracle__copy h2 {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: clamp(24px, 2.7vw, 35px);
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-wrap: balance;
}
.oracle__copy > p:not(.label) {
  margin-top: 18px;
  max-width: 100%;
  font-size: 13px;
  line-height: 2;
  color: var(--muted);
}
.oracle__copy .btn { margin-top: 30px; }

.oracle__art { position: relative; height: clamp(300px, 30vw, 380px); }
.slip-back {
  position: absolute;
  top: 50%; left: 50%;
  width: clamp(170px, 17vw, 214px);
  height: clamp(230px, 23vw, 290px);
  margin: calc(clamp(230px, 23vw, 290px) / -2) 0 0 calc(clamp(170px, 17vw, 214px) / -2);
  border: 1px solid rgba(200, 164, 92, 0.45);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(200, 164, 92, 0.14), transparent 60%),
    linear-gradient(165deg, #5c0d18, #34070e);
  box-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.85);
  transform: rotate(-7deg);
  transition: transform 0.7s var(--ease);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: rgba(231, 206, 155, 0.55);
}
.oracle:hover .slip-back { transform: rotate(-3deg) translateY(-6px); }
.slip-back::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(231, 206, 155, 0.18);
}
.slip-back--shadow {
  transform: rotate(7deg) translate(14px, 16px);
  opacity: 0.4;
  box-shadow: none;
  pointer-events: none;
}
.oracle:hover .slip-back--shadow { transform: rotate(9deg) translate(18px, 20px); }
.slip-back--shadow span { font-family: var(--serif); font-size: 60px; color: rgba(231, 206, 155, 0.4); }
.slip-back__seal {
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  background: rgba(110, 18, 32, 0.8);
  border: 1px solid rgba(231, 206, 155, 0.4);
  color: var(--gold-2);
  font-family: var(--serif);
  font-size: 11px;
}
.slip-back__char {
  writing-mode: vertical-rl;
  font-family: var(--serif);
  font-size: clamp(46px, 5vw, 62px);
  line-height: 1;
  color: rgba(231, 206, 155, 0.72);
  letter-spacing: 0.1em;
}
.slip-back em {
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.4em;
  writing-mode: vertical-rl;
  color: rgba(200, 164, 92, 0.4);
}

.section--keepers { padding-top: 0; }

.keepers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.6vw, 34px);
}

.keeper-card { position: relative; transition: transform 0.6s var(--ease); }
.keeper-card:hover { transform: translateY(-6px); }

.keeper-card__figure {
  position: relative;
  aspect-ratio: 5 / 6;
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 108px, rgba(200, 164, 92, 0.13) 108px 109px, transparent 110px),
    radial-gradient(120% 90% at 26% 0%, rgba(255, 255, 255, 0.075), transparent 58%),
    linear-gradient(165deg, #141013, #090708 72%);
}
.keeper-card__figure::before {
  content: "";
  position: absolute;
  width: 76%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 164, 92, 0.13), transparent 64%);
  filter: blur(12px);
  opacity: 0.8;
  transition: opacity 0.8s;
}
.keeper-card:hover .keeper-card__figure::before { opacity: 1; }
.keeper-card__figure::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(200, 164, 92, 0.14);
  transition: border-color 0.6s;
}
.keeper-card:hover .keeper-card__figure::after { border-color: rgba(200, 164, 92, 0.35); }

.keeper-card--fei .keeper-card__figure {
  background:
    radial-gradient(circle at 50% 50%, transparent 0 108px, rgba(217, 167, 174, 0.16) 108px 109px, transparent 110px),
    radial-gradient(80% 60% at 76% 82%, rgba(217, 167, 174, 0.18), transparent 62%),
    radial-gradient(120% 90% at 26% 0%, rgba(255, 255, 255, 0.06), transparent 58%),
    linear-gradient(165deg, #150f12, #090708 74%);
}
.keeper-card--fei .keeper-card__figure::before {
  background: radial-gradient(circle, rgba(217, 167, 174, 0.16), transparent 64%);
  transform: translate(18%, 20%);
}

.keeper-card__glyph {
  position: relative;
  z-index: 2;
  font-family: var(--serif);
  font-size: clamp(76px, 10vw, 128px);
  line-height: 1;
  color: rgba(231, 206, 155, 0.23);
  letter-spacing: 0.06em;
  text-shadow: 0 0 60px rgba(200, 164, 92, 0.16);
  transition: color 0.7s, text-shadow 0.7s;
}
.keeper-card:hover .keeper-card__glyph {
  color: rgba(231, 206, 155, 0.4);
  text-shadow: 0 0 70px rgba(200, 164, 92, 0.3);
}

.keeper-card__label {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 3;
  font-family: var(--serif-en);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: rgba(200, 164, 92, 0.55);
}
.keeper-card__caption {
  position: absolute;
  left: 20px;
  bottom: 20px;
  z-index: 3;
  writing-mode: vertical-rl;
  font-size: 8.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(231, 206, 155, 0.55);
}

.keeper-card__thread {
  position: absolute;
  left: 70%;
  top: -10%;
  width: 1px;
  height: 120%;
  background: linear-gradient(180deg, transparent, rgba(214, 216, 226, 0.55), transparent);
  transform: rotate(12deg);
  opacity: 0.65;
}
.keeper-card__lace {
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background-image: radial-gradient(circle at 9px 9px, rgba(217, 167, 174, 0.34) 1.2px, transparent 1.5px);
  background-size: 20px 20px;
  -webkit-mask-image: radial-gradient(80% 70% at 70% 80%, #000, transparent 75%);
  mask-image: radial-gradient(80% 70% at 70% 80%, #000, transparent 75%);
}

.keeper-card__info { padding: 26px 2px 0; max-width: 46ch; }
.keeper-card__role {
  font-size: 9.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(200, 164, 92, 0.7);
}
.keeper-card__info h3 {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--rice);
}
.keeper-card__info p:last-child {
  margin-top: 12px;
  font-size: 13px;
  line-height: 2;
  color: var(--muted);
}

/* ---------- 06 內頁：標題、步驟、表單 ---------- */
.page-head {
  padding-top: calc(var(--header-h) + clamp(52px, 7vw, 90px));
  padding-bottom: clamp(28px, 4vw, 46px);
  max-width: 1240px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 34px;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: rgba(244, 236, 223, 0.4);
  transition: color 0.35s;
}
.back-link:hover { color: var(--gold-2); }
.back-link span:first-child { font-size: 13px; }

.page-head h1 {
  margin-top: 20px;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.35;
  letter-spacing: 0.03em;
  color: var(--rice);
}
.page-head__sub {
  margin-top: 18px;
  max-width: 64ch;
  font-size: 14px;
  line-height: 2;
  color: var(--muted);
}

.steps {
  display: flex;
  max-width: 820px;
  margin: 0 0 clamp(34px, 4.5vw, 54px);
  border-top: 1px solid rgba(200, 164, 92, 0.12);
}
.steps li {
  flex: 1;
  padding: 14px 18px 0 0;
  border-top: 1px solid transparent;
  margin-top: -1px;
  transition: border-color 0.5s;
}
.steps li em {
  display: block;
  font-family: var(--serif-en);
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: rgba(200, 164, 92, 0.34);
  transition: color 0.5s;
}
.steps li span {
  display: block;
  margin-top: 5px;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: rgba(244, 236, 223, 0.3);
  transition: color 0.5s;
}
.steps li.is-active { border-top-color: rgba(200, 164, 92, 0.7); }
.steps li.is-active em { color: var(--gold-2); }
.steps li.is-active span { color: rgba(244, 236, 223, 0.9); }
.steps li.is-done em { color: rgba(200, 164, 92, 0.55); }
.steps li.is-done span { color: rgba(244, 236, 223, 0.45); }

.ritual {
  position: relative;
  padding: clamp(24px, 4.4vw, 56px);
  border: 1px solid var(--line);
  background:
    radial-gradient(100% 80% at 50% 0%, rgba(110, 18, 32, 0.12), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(0, 0, 0, 0.16));
}
.ritual::before,
.ritual::after {
  content: "";
  position: absolute;
  width: 20px; height: 20px;
  border: 1px solid rgba(200, 164, 92, 0.35);
  pointer-events: none;
}
.ritual::before { top: 9px; left: 9px; border-right: 0; border-bottom: 0; }
.ritual::after { bottom: 9px; right: 9px; border-left: 0; border-top: 0; }

.panel { display: none; }
.panel.is-active { display: block; animation: panelIn 0.6s var(--ease) both; }

.wish-form { max-width: 720px; margin: 0 auto; }
.field { position: relative; display: block; }
.field__label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(231, 206, 155, 0.72);
}
.field__label em { font-style: normal; color: rgba(200, 164, 92, 0.4); }
.field textarea {
  width: 100%;
  min-height: 168px;
  padding: 20px 22px 34px;
  background: rgba(6, 4, 5, 0.34);
  border: 1px solid rgba(200, 164, 92, 0.16);
  border-radius: 2px;
  color: var(--rice);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 2;
  letter-spacing: 0.02em;
  resize: vertical;
  transition: border-color 0.4s, box-shadow 0.4s, background 0.4s;
}
.field textarea::placeholder { color: rgba(244, 236, 223, 0.26); }
.field textarea:focus {
  outline: none;
  border-color: rgba(200, 164, 92, 0.55);
  background: rgba(6, 4, 5, 0.5);
  box-shadow: 0 0 0 3px rgba(200, 164, 92, 0.06);
}
.field.is-invalid textarea { border-color: rgba(200, 53, 74, 0.7); animation: fieldShake 0.4s ease; }
@keyframes fieldShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
.field__counter {
  position: absolute;
  right: 16px;
  bottom: 12px;
  font-family: var(--serif-en);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: rgba(244, 236, 223, 0.34);
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  max-width: 62ch;
  font-size: 10.5px;
  line-height: 1.85;
  color: rgba(244, 236, 223, 0.44);
}
.privacy-note .icon { margin-top: 3px; color: rgba(200, 164, 92, 0.5); }

.form-actions { display: flex; justify-content: flex-end; margin-top: 30px; }

.guide {
  margin-bottom: 4px;
  font-family: var(--serif);
  font-size: clamp(13px, 1.5vw, 15px);
  letter-spacing: 0.1em;
  text-align: center;
  color: rgba(231, 206, 155, 0.88);
}
.guide--sub { margin-top: clamp(38px, 5vw, 58px); margin-bottom: 22px; }
.micro {
  margin-bottom: clamp(18px, 3vw, 30px);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-align: center;
  color: rgba(244, 236, 223, 0.32);
}

.ritual__disclaimer { max-width: 820px; margin: 26px auto 0; text-align: center; }

/* ---------- 07 姻緣燈 / 紅線 / 簽筒 / 籤文 ---------- */
.lamp-scene {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: clamp(380px, 52vh, 500px);
  padding: 30px 0 10px;
  overflow: hidden;
}

.lamp-scene__halo {
  position: absolute;
  top: 46%; left: 50%;
  width: min(560px, 92vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(0.6);
  background: radial-gradient(circle, rgba(255, 206, 138, 0.22), rgba(200, 164, 92, 0.08) 38%, transparent 66%);
  filter: blur(30px);
  opacity: 0;
  transition: opacity 1.6s ease, transform 1.6s var(--ease);
  pointer-events: none;
}
.lamp-scene.is-lit .lamp-scene__halo { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.lamp {
  position: relative;
  width: min(226px, 58vw);
  margin-top: 84px;
  animation: lampIdle 7s ease-in-out infinite;
  transform-origin: top center;
}
@keyframes lampIdle {
  0%, 100% { transform: rotate(-1deg); }
  50% { transform: rotate(1.2deg); }
}
.lamp__cord {
  position: absolute;
  left: 50%;
  top: -96px;
  width: 1px;
  height: 100px;
  background: linear-gradient(180deg, rgba(200, 164, 92, 0.05), rgba(200, 164, 92, 0.5));
}
.lamp__body-wrap { position: relative; }
.lamp__svg {
  position: relative;
  z-index: 2;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 26px 34px rgba(0, 0, 0, 0.6)) brightness(0.92);
  transition: filter 1.4s ease;
}
.lamp.is-lit .lamp__svg {
  filter: drop-shadow(0 26px 34px rgba(0, 0, 0, 0.5)) brightness(1.18) drop-shadow(0 0 34px rgba(231, 206, 155, 0.3));
}
.lamp__glow {
  position: absolute;
  left: 50%; top: 50%;
  width: 150%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(0.7);
  background: radial-gradient(circle, rgba(255, 196, 120, 0.26), transparent 62%);
  filter: blur(26px);
  opacity: 0;
  transition: opacity 1.6s ease, transform 1.6s var(--ease);
  z-index: 1;
  pointer-events: none;
}
.lamp.is-lit .lamp__glow { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.lamp__window {
  position: absolute;
  left: 50%; top: 53%;
  width: 74px; height: 96px;
  transform: translate(-50%, -50%) scale(0.85);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 236, 198, 0.95), rgba(255, 186, 104, 0.6) 45%, transparent 72%);
  filter: blur(9px);
  opacity: 0;
  transition: opacity 1.2s ease 0.2s, transform 1.4s var(--ease);
  mix-blend-mode: screen;
  z-index: 3;
  pointer-events: none;
}
.lamp.is-lit .lamp__window { opacity: 0.85; transform: translate(-50%, -50%) scale(1); }

.lamp__flame {
  position: absolute;
  left: 50%; top: 64%;
  width: 24px;
  height: 40px;
  transform: translate(-50%, -50%);
  z-index: 4;
  filter: drop-shadow(0 0 10px rgba(255, 180, 90, 0.55));
  animation: flamePulse 2.6s ease-in-out infinite;
  transition: transform 0.9s var(--ease), filter 0.9s, opacity 0.6s;
}
.lamp__flame svg { width: 100%; height: 100%; }
.lamp__flame:hover { filter: drop-shadow(0 0 18px rgba(255, 196, 120, 0.8)); }
.lamp.is-lit .lamp__flame {
  transform: translate(-50%, -50%) scale(1.3);
  filter: drop-shadow(0 0 24px rgba(255, 206, 138, 0.85));
  animation-play-state: paused;
}
@keyframes flamePulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
  50% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
}

.spark {
  position: absolute;
  left: 50%; top: 60%;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #ffe9bd;
  box-shadow: 0 0 6px rgba(255, 220, 160, 0.9);
  opacity: 0;
  z-index: 5;
  pointer-events: none;
}
.lamp.is-lit .spark { animation: sparkFly 1.8s ease-out forwards; }
.lamp.is-lit .spark:nth-of-type(2n) { animation-delay: 0.15s; }
.lamp.is-lit .spark:nth-of-type(3n) { animation-delay: 0.3s; }
@keyframes sparkFly {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--a)) translateY(0) scale(0.6); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--a)) translateY(-110px) scale(0.2); }
}

.wish-tag {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: min(540px, 90%);
  margin-top: 34px;
  padding: 14px 26px;
  border: 1px solid rgba(200, 164, 92, 0.16);
  border-radius: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.18));
  text-align: center;
}
.wish-tag__label {
  font-size: 8.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(200, 164, 92, 0.5);
}
.wish-tag__text {
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.9;
  color: rgba(244, 236, 223, 0.66);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.thread-scene { max-width: 840px; margin: 0 auto; padding: 6px 0 0; }
.thread-scene svg { width: 100%; height: auto; overflow: visible; }
.posts .post-shaft { fill: url(#gradPost); stroke: rgba(200, 164, 92, 0.16); stroke-width: 0.8; }
.posts .post-cap { fill: #3a1e16; stroke: rgba(200, 164, 92, 0.42); stroke-width: 0.8; }
.posts circle { fill: none; stroke: rgba(200, 164, 92, 0.3); stroke-width: 1; }
.posts .post-ring { fill: rgba(231, 206, 155, 0.75); stroke: none; }
.posts .post-base { fill: none; stroke: rgba(200, 164, 92, 0.16); stroke-width: 1; }

.thread-base {
  fill: none;
  stroke: rgba(200, 164, 92, 0.26);
  stroke-width: 1.4;
  stroke-dasharray: 2 7;
}
.thread-line {
  fill: none;
  stroke: url(#threadGrad);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 1.1s var(--ease);
  filter: drop-shadow(0 0 5px rgba(200, 53, 74, 0.45));
}

.knot {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  cursor: pointer;
}
.knot.is-next,
.knot.is-tied { opacity: 1; pointer-events: auto; }
.knot .knot-hit { fill: transparent; }
.knot .knot-halo {
  fill: none;
  stroke: rgba(231, 206, 155, 0.7);
  stroke-width: 1;
  transform-box: fill-box;
  transform-origin: center;
}
.knot.is-next .knot-halo { animation: knotPulse 2.4s ease-out infinite; }
.knot.is-tied .knot-halo { opacity: 0.22; animation: none; }
.knot .knot-core {
  fill: #e7ce9b;
  transition: fill 0.5s;
  transform-box: fill-box;
  transform-origin: center;
}
.knot.is-tied .knot-core { fill: #c8354a; }
.knot .knot-loop {
  fill: none;
  stroke: #c8354a;
  stroke-width: 1.5;
  opacity: 0;
  transition: opacity 0.5s;
}
.knot .knot-index {
  font-family: var(--serif-en), serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  fill: rgba(231, 206, 155, 0.85);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.knot.is-next .knot-index { opacity: 1; }
.knot.is-tied .knot-index { opacity: 0; }
.knot.is-tied .knot-loop { opacity: 1; }
.knot:focus-visible { outline: none; }
.knot:focus-visible .knot-halo { stroke: #fff; stroke-width: 1.6; }

@keyframes knotPulse {
  0% { transform: scale(1); opacity: 0.85; }
  70% { transform: scale(2); opacity: 0; }
  100% { transform: scale(2); opacity: 0; }
}

/* 簽筒與籤文 */
.fortune {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 8px;
}
.cylinder-wrap {
  position: relative;
  width: clamp(146px, 16vw, 182px);
  margin: 0 auto;
  padding-bottom: 12px;
}
.cylinder-wrap::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 54%;
  width: 160%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(200, 164, 92, 0.13), transparent 62%);
  filter: blur(22px);
  z-index: 0;
  pointer-events: none;
}
.cylinder { position: relative; z-index: 1; }
.cylinder {
  display: block;
  width: 100%;
  transition: transform 0.5s var(--ease);
  animation: cylinderIdle 6s ease-in-out infinite;
  transform-origin: 50% 88%;
}
.cylinder__svg { width: 100%; height: auto; filter: drop-shadow(0 30px 30px rgba(0, 0, 0, 0.55)); }
.cylinder:hover { transform: translateY(-4px); }
.cylinder.is-shaking { animation: cylinderShake 0.16s ease-in-out 6; }
.cylinder.is-drawn { animation: none; }
@keyframes cylinderIdle {
  0%, 100% { transform: rotate(-1deg); }
  50% { transform: rotate(1.2deg); }
}
@keyframes cylinderShake {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  25% { transform: rotate(-6deg) translateY(-2px); }
  75% { transform: rotate(6deg) translateY(-1px); }
}
.cylinder__shadow {
  position: absolute;
  left: 50%; bottom: 0;
  width: 76%;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.6), transparent 70%);
  filter: blur(4px);
}
.cylinder__loose {
  transform-box: view-box;
  transform-origin: 80px 150px;
  transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.cylinder.is-drawn .cylinder__loose { transform: translateY(-28px) rotate(5deg); }

.result { display: none; width: 100%; margin-top: 40px; }
.result.is-visible { display: block; animation: slipIn 0.9s var(--ease) both; }
@keyframes slipIn {
  from { opacity: 0; transform: translateY(26px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.slip {
  position: relative;
  max-width: 580px;
  margin: 0 auto;
  padding: clamp(26px, 4vw, 46px);
  background:
    radial-gradient(120% 80% at 10% 0%, rgba(255, 255, 255, 0.5), transparent 45%),
    linear-gradient(155deg, #f7f0e3, #ecdfc9 62%, #e2d1b6);
  color: #2b1a15;
  border: 1px solid rgba(200, 164, 92, 0.55);
  box-shadow: 0 46px 90px -34px rgba(0, 0, 0, 0.85);
}
.slip::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(110, 18, 32, 0.14);
  pointer-events: none;
}
.slip__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.slip__label {
  font-size: 9.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #8e1b2a;
}
.slip__seal {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  background: #8e1b2a;
  color: #f6ecdc;
  font-family: var(--serif);
  font-size: 12px;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(246, 236, 220, 0.35);
}
.slip__title {
  font-family: var(--serif);
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #3a1218;
}
.slip__poem {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: clamp(15px, 1.7vw, 18px);
  line-height: 2.15;
  letter-spacing: 0.02em;
  color: #4a231c;
}
.slip__rule {
  height: 1px;
  margin: 24px 0;
  background: linear-gradient(90deg, rgba(110, 18, 32, 0.3), rgba(110, 18, 32, 0.03));
}
.slip__desc {
  font-size: 13.5px;
  line-height: 2.05;
  color: #5c4238;
}
.slip__note {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px dashed rgba(110, 18, 32, 0.16);
  font-size: 10.5px;
  line-height: 1.85;
  color: #8a6b57;
}
.result__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}

/* ---------- 08 信封與三個告別遊戲 ---------- */
.env-scene {
  display: grid;
  place-items: center;
  min-height: 302px;
  padding: 76px 0 8px;
}

.envelope {
  position: relative;
  width: min(400px, 86vw);
  aspect-ratio: 1.5 / 1;
  transition: transform 0.6s var(--ease);
}
.envelope:hover { transform: translateY(-4px); }

.env__back {
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background: linear-gradient(160deg, #eadfc9, #d7c5a7);
  box-shadow: 0 36px 70px -24px rgba(0, 0, 0, 0.85);
}
.env__letter {
  position: absolute;
  left: 6%; right: 6%; bottom: 7%;
  height: 80%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 18px 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent 30%),
    linear-gradient(170deg, #f8f1e4, #eee1cc);
  border: 1px solid rgba(110, 18, 32, 0.12);
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.4);
  transition: transform 0.95s cubic-bezier(0.2, 0.8, 0.2, 1), z-index 0s 0.25s, height 0.8s var(--ease);
  overflow: hidden;
}
.env__letter::after {
  content: "放";
  position: absolute;
  right: 12px;
  bottom: -8px;
  font-family: var(--serif);
  font-size: 48px;
  line-height: 1;
  color: rgba(110, 18, 32, 0.08);
  pointer-events: none;
}
.env__letter-label {
  flex: none;
  display: block;
  align-self: stretch;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(110, 18, 32, 0.15);
  font-size: 8px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #8e1b2a;
}
.env__letter-text {
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.9;
  color: #3a241e;
  overflow: auto;
  scrollbar-width: thin;
  overscroll-behavior: contain;
}
.env__letter-text::-webkit-scrollbar { width: 4px; }

.env__front {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(200deg, #e6d8bf, #d2bfa0 70%, #c9b494);
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
  border-radius: 0 0 3px 3px;
  filter: drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.25));
}
.env__flap {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 55%;
  z-index: 3;
  background: linear-gradient(180deg, #eee3ce, #ddcbaa);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform 0.85s var(--ease), opacity 0.45s ease 0.25s, z-index 0s 0.4s;
}
.env__seal {
  position: absolute;
  left: 50%; top: 54%;
  transform: translate(-50%, -50%);
  z-index: 4;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, #9a2233, #6e1220);
  border: 1px solid rgba(231, 206, 155, 0.45);
  color: rgba(246, 236, 220, 0.9);
  font-family: var(--serif);
  font-size: 14px;
  box-shadow: 0 8px 18px -6px rgba(0, 0, 0, 0.6), inset 0 0 0 2px rgba(110, 18, 32, 0.6);
  transition: opacity 0.45s, transform 0.6s var(--ease);
}
.env__hit {
  position: absolute;
  inset: 0;
  z-index: 6;
  border-radius: 3px;
}
.env__hit:focus-visible { outline: 1px solid var(--gold-2); outline-offset: 5px; }

.env-scene.is-open .env__flap {
  transform: rotateX(180deg);
  opacity: 0;
  z-index: 0;
}
.env-scene.is-open .env__seal {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(24deg) scale(1.35);
}
.env-scene.is-open .env__letter {
  transform: translateY(-40%);
  height: 92%;
  z-index: 5;
}
.env-scene.is-open .env__hit { display: none; }
.env-scene.is-open .envelope { transform: none; }

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s var(--ease);
}
.game-grid.is-ready { opacity: 1; transform: none; pointer-events: auto; }
.game-grid:not(.is-ready) .game-card { opacity: 0.4; }

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 196px;
  padding: 24px 22px 26px;
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
  transition: transform 0.5s var(--ease), border-color 0.5s, background 0.5s;
}
.game-card:hover:not(:disabled) {
  transform: translateY(-4px);
  border-color: rgba(200, 164, 92, 0.48);
  background: rgba(200, 164, 92, 0.05);
}
.game-card:disabled { cursor: default; }
.game-card__index {
  position: absolute;
  top: 16px; right: 18px;
  font-family: var(--serif-en);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(200, 164, 92, 0.35);
}
.game-card__icon { width: 30px; height: 30px; color: rgba(231, 206, 155, 0.75); }
.game-card strong {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--rice);
}
.game-card span:not(.game-card__index) {
  font-size: 11.5px;
  line-height: 1.85;
  color: rgba(244, 236, 223, 0.54);
}

.release-stage { margin-top: 8px; }

.scene {
  position: relative;
  height: clamp(320px, 44vh, 430px);
  border: 1px solid var(--line);
  overflow: hidden;
  background: #0a0708;
  animation: panelIn 0.7s var(--ease) both;
}

/* 紙船 */
.scene--boat {
  background:
    radial-gradient(80% 60% at 72% 8%, rgba(231, 206, 155, 0.12), transparent 58%),
    linear-gradient(180deg, #0d0b10 0%, #0c1013 46%, #0a0f12 100%);
}
.scene__moon {
  position: absolute;
  top: 12%; right: 12%;
  width: 76px; height: 76px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #f8eed8, #ddc294 58%, #af8a55 100%);
  opacity: 0.55;
  box-shadow: 0 0 38px rgba(231, 206, 155, 0.22), 0 0 100px rgba(231, 206, 155, 0.1);
}
.scene__water {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 58%;
  background: linear-gradient(180deg, rgba(20, 34, 38, 0.2), rgba(10, 20, 24, 0.9));
  border-top: 1px solid rgba(200, 164, 92, 0.1);
}
.water-line {
  position: absolute;
  left: var(--l, 10%);
  width: var(--w, 22%);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(231, 206, 155, 0.28), transparent);
  animation: waterShift 9s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes waterShift {
  0%, 100% { transform: translateX(0); opacity: 0.45; }
  50% { transform: translateX(18px); opacity: 0.8; }
}

.boat {
  position: absolute;
  left: 9%; bottom: 16%;
  width: clamp(170px, 22vw, 236px);
  transition: transform 2.7s cubic-bezier(0.32, 0.06, 0.28, 0.98), opacity 2.7s ease;
  z-index: 3;
}
.boat svg { width: 100%; height: auto; animation: boatBob 4.8s ease-in-out infinite; filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.55)); }
.boat::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -2px;
  height: 14px;
  border: 1px solid rgba(231, 206, 155, 0.24);
  border-radius: 50%;
  opacity: 0;
  animation: boatHalo 3.4s ease-out infinite;
  pointer-events: none;
}
@keyframes boatHalo {
  0% { opacity: 0.55; transform: scale(0.9); }
  70% { opacity: 0; transform: scale(1.25); }
  100% { opacity: 0; transform: scale(1.25); }
}
@keyframes boatBob {
  0%, 100% { transform: translateY(0) rotate(-0.6deg); }
  50% { transform: translateY(-6px) rotate(0.8deg); }
}
.boat.is-sailing { transform: translateX(var(--drift, 40vw)) translateY(-14px); opacity: 0; }
.boat.is-sailing svg { animation-play-state: paused; }

.ripple {
  position: absolute;
  left: 14%; bottom: 15%;
  width: 120px; height: 18px;
  border: 1px solid rgba(231, 206, 155, 0.3);
  border-radius: 50%;
  opacity: 0;
  z-index: 2;
}
.boat.is-sailing ~ .ripple { animation: rippleOut 2.4s ease-out 0.2s 2; }
.ripple:nth-of-type(2) { animation-delay: 0.8s; }
@keyframes rippleOut {
  0% { opacity: 0; transform: scale(0.5); }
  30% { opacity: 0.5; }
  100% { opacity: 0; transform: scale(1.9); }
}

.scene__caption {
  position: absolute;
  left: 50%; bottom: 16px;
  transform: translateX(-50%);
  width: min(80%, 560px);
  font-family: var(--serif);
  font-size: 11.5px;
  line-height: 1.8;
  text-align: center;
  color: rgba(244, 236, 223, 0.5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 紙燈 */
.scene--sky {
  background:
    radial-gradient(60% 50% at 50% 100%, rgba(110, 18, 32, 0.18), transparent 60%),
    radial-gradient(100% 80% at 50% 0%, rgba(30, 24, 44, 0.5), transparent 70%),
    linear-gradient(180deg, #08060d, #0d0a13 60%, #100b0d);
}
.scene__moon--sky {
  top: 11%;
  left: 13%;
  right: auto;
  width: 58px;
  height: 58px;
  opacity: 0.34;
}

.stars {
  position: absolute;
  inset: 0;
  opacity: 0.6;
  background-image:
    radial-gradient(1px 1px at 18% 22%, rgba(255, 245, 224, 0.8), transparent),
    radial-gradient(1px 1px at 72% 16%, rgba(255, 245, 224, 0.6), transparent),
    radial-gradient(1.4px 1.4px at 42% 38%, rgba(255, 245, 224, 0.5), transparent),
    radial-gradient(1px 1px at 86% 44%, rgba(255, 245, 224, 0.55), transparent),
    radial-gradient(1px 1px at 26% 62%, rgba(255, 245, 224, 0.35), transparent),
    radial-gradient(1px 1px at 62% 72%, rgba(255, 245, 224, 0.3), transparent),
    radial-gradient(1.2px 1.2px at 9% 46%, rgba(255, 245, 224, 0.45), transparent),
    radial-gradient(1px 1px at 51% 12%, rgba(255, 245, 224, 0.5), transparent),
    radial-gradient(1px 1px at 93% 68%, rgba(255, 245, 224, 0.35), transparent),
    radial-gradient(1.3px 1.3px at 34% 86%, rgba(255, 245, 224, 0.3), transparent),
    radial-gradient(1px 1px at 78% 88%, rgba(255, 245, 224, 0.28), transparent);
}

.sky-lantern {
  position: absolute;
  left: 50%; bottom: 16%;
  width: clamp(108px, 13vw, 142px);
  transform: translateX(-50%);
  z-index: 3;
  transition: transform 1s var(--ease), opacity 1.2s ease;
  filter: drop-shadow(0 0 30px rgba(255, 190, 110, 0.22));
}
.sky-lantern svg { width: 100%; height: auto; animation: skyBob 5.5s ease-in-out infinite; }
@keyframes skyBob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(1.2deg); }
}
.sky-lantern.lift-1 { transform: translateX(-50%) translateY(-18px); }
.sky-lantern.lift-2 { transform: translateX(-50%) translateY(-42px) scale(0.99); }
.sky-lantern.lift-3 { transform: translateX(-50%) translateY(-70px) scale(0.98); }
.sky-lantern.is-gone {
  transform: translateX(-50%) translateY(-120%) scale(0.62);
  opacity: 0;
  transition: transform 2.4s cubic-bezier(0.3, 0.1, 0.4, 1), opacity 2.2s ease 0.3s;
}

.gust {
  position: absolute;
  left: 50%; bottom: 34%;
  width: 120px; height: 40px;
  transform: translateX(-50%);
  opacity: 0;
  z-index: 2;
  pointer-events: none;
}
.gust i {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(231, 206, 155, 0.5), transparent);
  border-radius: 50%;
}
.gust i:nth-child(1) { top: 6px; }
.gust i:nth-child(2) { top: 20px; width: 76%; left: 12%; }
.gust i:nth-child(3) { top: 32px; width: 54%; left: 24%; }
.gust.is-active { animation: gustMove 1.1s ease-out; }
@keyframes gustMove {
  0% { opacity: 0; transform: translateX(-50%) translateY(10px) scaleX(0.7); }
  35% { opacity: 0.8; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-26px) scaleX(1.15); }
}

/* 花瓣 */
.scene--garden {
  background:
    radial-gradient(70% 60% at 50% 100%, rgba(217, 167, 174, 0.1), transparent 70%),
    radial-gradient(90% 70% at 50% 0%, rgba(110, 18, 32, 0.24), transparent 62%),
    linear-gradient(180deg, #0b0709, #120c0e);
}
.petal-card {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, 84%);
  min-height: 210px;
  padding: 34px 30px;
  background: linear-gradient(160deg, #f5ecdd, #e6d7bf);
  border: 1px solid rgba(200, 164, 92, 0.5);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.8);
  text-align: center;
  z-index: 1;
  overflow: hidden;
}
.petal-card__label {
  font-size: 8.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #9b6a63;
}
.petal-card__text {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 2;
  color: #3f241e;
  transition: opacity 1.2s ease, filter 1.2s ease, transform 1.2s ease;
}
.petal-card.is-buried .petal-card__text { opacity: 0.14; filter: blur(1.6px); transform: translateY(4px); }
.petal-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.petal-hit {
  position: absolute;
  inset: 0;
  z-index: 4;
  cursor: pointer;
}
.petal-hit:focus-visible { outline: 1px solid var(--gold-2); outline-offset: -6px; }
.falling-petal {
  position: absolute;
  top: -16px;
  left: var(--x);
  width: 13px;
  height: 10px;
  border-radius: 68% 5% 68% 5%;
  background: linear-gradient(135deg, #fce6e9, #e2a5ae 58%, #c97c88);
  box-shadow: 0 1px 2px rgba(110, 18, 32, 0.14), inset 1px 1px 2px rgba(255, 255, 255, 0.35);
  opacity: 0;
  animation: petalFall var(--dur, 2.6s) cubic-bezier(0.3, 0.1, 0.5, 1) var(--delay, 0s) forwards;
}
.falling-petal::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 14%;
  width: 1px;
  height: 70%;
  background: rgba(150, 70, 84, 0.16);
  transform: rotate(6deg);
}
@keyframes petalFall {
  0% { opacity: 0; transform: translate3d(0, -12px, 0) rotate(0deg) scale(var(--scale, 1)); }
  12% { opacity: 0.95; }
  100% { opacity: 0.92; transform: translate3d(var(--dx, 10px), var(--fall, 240px), 0) rotate(var(--spin, 220deg)) scale(var(--scale, 1)); }
}

/* ---------- 09 關於、私隱、頁尾 ---------- */
.about-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(30px, 6vw, 80px);
  align-items: start;
}
.about-intro__text { max-width: 62ch; }
.about-intro__text p {
  font-family: var(--serif);
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 2.2;
  color: rgba(244, 236, 223, 0.72);
}
.about-intro__text p + p { margin-top: 24px; }

.values { border-left: 1px solid var(--line); padding-left: clamp(22px, 3vw, 40px); }
.value { padding: 24px 0; border-bottom: 1px solid rgba(200, 164, 92, 0.09); }
.value:last-child { border-bottom: 0; padding-bottom: 0; }
.value h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--gold-2);
}
.value p { margin-top: 9px; font-size: 12.5px; line-height: 1.95; color: var(--muted); }

.callout {
  margin-top: clamp(44px, 6vw, 76px);
  padding: clamp(24px, 3.4vw, 38px);
  border: 1px solid rgba(200, 164, 92, 0.18);
  background:
    radial-gradient(100% 120% at 0% 0%, rgba(110, 18, 32, 0.22), transparent 60%),
    rgba(255, 255, 255, 0.012);
}
.callout p { max-width: 92ch; font-size: 12px; line-height: 2; color: rgba(244, 236, 223, 0.56); }

.policy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 54px);
}
.policy {
  position: relative;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.policy__num {
  font-family: var(--serif-en);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(200, 164, 92, 0.4);
}
.policy h2 {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--rice);
}
.policy p { margin-top: 12px; font-size: 13px; line-height: 2; color: var(--muted); }

.data-tools {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: clamp(40px, 5vw, 62px);
  padding: 34px 20px;
  border: 1px dashed rgba(200, 164, 92, 0.2);
}
.data-tools .fineprint { text-align: center; max-width: 62ch; }

.site-footer {
  padding: clamp(44px, 6vw, 70px) 0 34px;
  border-top: 1px solid rgba(200, 164, 92, 0.12);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.38));
}
.footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.brand--footer .brand__seal { width: 34px; height: 34px; font-size: 15px; }
.brand--footer .brand__text strong { font-size: 13px; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 22px; }
.footer__nav a {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: rgba(244, 236, 223, 0.4);
  transition: color 0.35s;
}
.footer__nav a:hover { color: var(--gold-2); }
.footer__disclaimer {
  max-width: 96ch;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid rgba(200, 164, 92, 0.08);
  font-size: 10.5px;
  line-height: 1.95;
  color: rgba(244, 236, 223, 0.4);
}
.footer__bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: rgba(244, 236, 223, 0.32);
}
.footer__dot { opacity: 0.5; }

/* ---------- 10 彈窗、提示 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 3, 4, 0.82);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}
.modal__panel {
  position: relative;
  width: min(760px, 100%);
  max-height: 88vh;
  overflow: auto;
  padding: clamp(26px, 4vw, 48px);
  border: 1px solid rgba(200, 164, 92, 0.28);
  background:
    radial-gradient(90% 50% at 50% 0%, rgba(110, 18, 32, 0.3), transparent 60%),
    linear-gradient(180deg, #130e0f, #0a0708);
  box-shadow: 0 60px 120px -40px rgba(0, 0, 0, 0.9);
  transform: translateY(22px) scale(0.99);
  transition: transform 0.5s var(--ease);
}
.modal.is-open .modal__panel { transform: none; }
.modal__panel::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(200, 164, 92, 0.09);
  pointer-events: none;
}
.modal__close-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 0;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.modal__close {
  position: relative;
  top: 0; right: 0;
  width: 38px; height: 38px;
  margin-top: -4px;
  z-index: 3;
  border: 1px solid rgba(200, 164, 92, 0.32);
  border-radius: 50%;
  background: rgba(11, 7, 8, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
  transition: border-color 0.3s, background 0.3s;
}
.modal__close:hover { border-color: rgba(200, 164, 92, 0.6); background: rgba(200, 164, 92, 0.06); }
.modal__close span {
  position: absolute;
  left: 12px; top: 18px;
  width: 13px; height: 1px;
  background: rgba(244, 236, 223, 0.7);
}
.modal__close span:first-child { transform: rotate(45deg); }
.modal__close span:last-child { transform: rotate(-45deg); }

.modal__head { text-align: center; margin-bottom: 12px; }
.modal__head .label { justify-content: center; }
.modal__head h2 {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 300;
  letter-spacing: 0.04em;
}
.modal__head p:last-child {
  margin: 12px auto 0;
  max-width: 440px;
  font-size: 12px;
  line-height: 1.95;
  color: var(--muted);
}
.modal .fortune { padding-top: 26px; }
.modal .slip { max-width: 540px; }
.modal .cylinder-wrap { width: clamp(160px, 20vw, 200px); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  z-index: 130;
  max-width: calc(100vw - 40px);
  padding: 12px 22px;
  border: 1px solid rgba(200, 164, 92, 0.35);
  background: rgba(15, 10, 11, 0.96);
  color: rgba(244, 236, 223, 0.8);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, transform 0.4s var(--ease), visibility 0.4s;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.9);
}
.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

.noscript {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 200;
  padding: 14px 20px;
  background: #6e1220;
  color: #f4ecdf;
  font-size: 12px;
  text-align: center;
}

/* ---------- 11 響應式 ---------- */
@media (max-width: 1080px) {
  .hero { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); }
  .hero__title { font-size: clamp(38px, 5vw, 58px); }
  .seal-vertical { right: 2%; }
  .header__inner { gap: 16px; }
  .site-nav { gap: 16px; }
}

@media (max-width: 900px) {
  :root { --header-h: 66px; }

  .site-nav { display: none; }
  .burger { display: block; }
  .header__inner { padding: 0 18px; }
  .header__tools { margin-left: auto; }
  .lang__btn { height: 36px; padding: 0 12px; }
  .lang__current { max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: calc(var(--header-h) + 48px);
    padding-bottom: 70px;
    gap: 26px;
    overflow: visible;
  }
  .hero__copy { max-width: 640px; }
  .hero__art {
    order: 2;
    height: 380px;
    margin-top: 0;
    width: 100%;
    max-width: 560px;
    justify-self: center;
  }
  .art-moon { width: 320px; right: 0; top: 4%; }
  .lantern--1 { left: 12%; width: 84px; }
  .lantern--2 { right: 10%; width: 62px; }
  .lantern--3 { left: 42%; width: 44px; }
  .seal-vertical { bottom: 0; font-size: 12px; padding: 14px 7px; }
  .hero__petals { display: none; }
  .scroll-cue { display: none; }

  .path-grid { grid-template-columns: 1fr; }
  .path-card { min-height: 280px; }
  .oracle { grid-template-columns: 1fr; }
  .oracle__art { height: 300px; order: 2; }
  .oracle__copy { order: 1; }

  .keepers { gap: 18px; }
  .keeper-card__figure { aspect-ratio: 1 / 1.08; }

  .steps li { padding-right: 10px; }
  .steps li span { font-size: 10px; letter-spacing: 0.1em; }

  .about-intro { grid-template-columns: 1fr; gap: 40px; }
  .values { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 26px; }
  .policy-grid { grid-template-columns: 1fr; gap: 30px; }

  .footer__top { align-items: flex-start; flex-direction: column; }
  .footer__nav { gap: 16px 22px; }
}

@media (max-width: 640px) {
  body { font-size: 14.5px; }

  .wrap { padding: 0 20px; }
  .header__inner { gap: 10px; }
  .brand__seal { width: 34px; height: 34px; font-size: 15px; }
  .brand__text strong { font-size: 12.5px; }
  .brand__text small { font-size: 7px; letter-spacing: 0.22em; }
  .lang__btn { gap: 6px; padding: 0 10px; }
  .lang__globe { display: none; }
  .lang__menu { position: fixed; top: calc(var(--header-h) + 8px); right: 14px; left: auto; width: 200px; }

  .hero { padding-left: 20px; padding-right: 20px; padding-top: calc(var(--header-h) + 40px); }
  .eyebrow { font-size: 9px; letter-spacing: 0.22em; gap: 10px; }
  .eyebrow__rule { width: 30px; }
  .hero__title { font-size: clamp(34px, 9.6vw, 44px); line-height: 1.34; }
  html[lang="zh-Hant"] .hero__title { font-size: clamp(32px, 9vw, 42px); letter-spacing: 0.03em; }
  .hero__sub { margin-top: 18px; font-size: 13px; line-height: 1.95; }
  .hero__actions { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 28px; }
  .hero__actions .btn { width: 100%; height: 54px; }
  .hero__trust { margin-top: 22px; font-size: 9.5px; }
  .link-btn { margin-top: 20px; font-size: 11px; }
  .hero__art { height: 320px; }
  .art-moon { width: 260px; }
  .lantern--1 { width: 66px; left: 6%; }
  .lantern--2 { width: 50px; right: 6%; }
  .lantern--3 { width: 36px; left: 40%; }
  .seal-vertical { font-size: 11px; padding: 12px 6px; letter-spacing: 0.26em; }

  .section { padding: 64px 0; }
  .section--paths { padding-top: 26px; }
  .section__title { margin-top: 12px; font-size: 24px; }
  .label { font-size: 9px; letter-spacing: 0.24em; gap: 10px; }
  .label__rule { width: 24px; }
  .path-card { min-height: 250px; padding: 26px 22px; }
  .path-card__num { font-size: 46px; top: 14px; right: 22px; }
  .path-card__body { max-width: 68%; margin-top: 26px; }
  .path-card__body h3 { font-size: 21px; }
  .path-card__body p { font-size: 12.5px; line-height: 1.9; }
  .path-card__motif { height: 80px; bottom: 46px; }
  .path-card__art--lantern { width: 76px; right: 4%; bottom: 9%; }
  .path-card__art--envelope { width: 112px; right: 3%; bottom: 10%; }

  .oracle { padding: 26px 20px; }
  .oracle__copy h2 { font-size: 23px; }
  .oracle__copy > p:not(.label) { font-size: 12.5px; }
  .oracle__art { height: 250px; }
  .slip-back { width: 150px; height: 206px; margin: -103px 0 0 -75px; }
  .slip-back__char { font-size: 40px; }
  .oracle__copy .btn { width: 100%; }

  .keeper-card__figure { aspect-ratio: 1 / 1.05; }
  .keeper-card__glyph { font-size: 68px; }
  .keeper-card__info { padding-top: 16px; }
  .keeper-card__info h3 { font-size: 20px; }
  .keeper-card__info p:last-child { font-size: 12.5px; }
  .keepers { grid-template-columns: 1fr; gap: 34px; }

  .page-head { padding-top: calc(var(--header-h) + 34px); padding-bottom: 24px; }
  .back-link { margin-bottom: 24px; font-size: 10px; }
  .page-head h1 { font-size: 30px; margin-top: 14px; }
  .page-head__sub { font-size: 12.5px; margin-top: 12px; }

  .steps { margin-bottom: 26px; }
  .steps li { padding: 11px 8px 0 0; }
  .steps li em { font-size: 10px; }
  .steps li span { margin-top: 3px; font-size: 9px; letter-spacing: 0.04em; line-height: 1.4; }
  html[lang="th"] .steps li span,
  html[lang="vi"] .steps li span,
  html[lang="id"] .steps li span { font-size: 8px; }

  .ritual { padding: 26px 18px 30px; }
  .ritual::before, .ritual::after { width: 14px; height: 14px; }
  .field textarea { min-height: 150px; padding: 16px 16px 32px; font-size: 15px; }
  .form-actions { justify-content: stretch; }
  .form-actions .btn { width: 100%; height: 54px; }
  .privacy-note { font-size: 9.5px; line-height: 1.8; }
  .ritual__disclaimer { margin-top: 20px; text-align: left; }

  .guide { font-size: 12.5px; letter-spacing: 0.06em; }
  .micro { font-size: 9px; margin-bottom: 18px; }

  .lamp-scene { min-height: 360px; padding-top: 14px; }
  .lamp { width: 176px; margin-top: 74px; }
  .lamp__cord { height: 84px; top: -82px; }
  .wish-tag { margin-top: 26px; padding: 12px 18px; }
  .wish-tag__text { font-size: 12px; }

  .thread-scene { margin: 0 -8px; }
  .knot .knot-halo { stroke-width: 1.4; }

  .fortune { padding-top: 0; }
  .cylinder-wrap { width: 128px; }
  .result { margin-top: 30px; }
  .slip { padding: 26px 20px 24px; }
  .slip::before { inset: 6px; }
  .slip__label { font-size: 8.5px; letter-spacing: 0.22em; }
  .slip__title { font-size: 19px; }
  .slip__poem { font-size: 14.5px; line-height: 2.05; }
  .slip__desc { font-size: 12.5px; line-height: 1.95; }
  .slip__note { font-size: 9.5px; }
  .result__actions .btn { flex: 1 1 auto; min-width: 130px; }

  .env-scene { min-height: 266px; padding: 56px 0 8px; }
  .envelope { width: 88vw; aspect-ratio: 1.44 / 1; }
  .env__letter { padding: 14px 16px; }
  .env__letter-text { font-size: 12px; line-height: 1.85; }
  .env__letter-label { font-size: 7.5px; }
  .env__seal { width: 36px; height: 36px; font-size: 12px; }
  .env-scene.is-open .env__letter { transform: translateY(-36%); height: 90%; }

  .guide--sub { margin-top: 38px; margin-bottom: 16px; font-size: 12px; }
  .game-grid { grid-template-columns: 1fr; gap: 10px; }
  .game-card { min-height: 0; padding: 18px 18px 20px; display: grid; grid-template-columns: 34px 1fr; grid-template-areas: "icon title" "icon desc"; column-gap: 14px; row-gap: 4px; align-items: center; }
  .game-card__icon { grid-area: icon; width: 28px; height: 28px; }
  .game-card strong { grid-area: title; font-size: 15px; }
  .game-card span:not(.game-card__index) { grid-area: desc; font-size: 11px; }
  .game-card__index { top: 14px; right: 14px; }

  .scene { height: 330px; }
  .boat { width: 170px; left: 4%; bottom: 17%; }
  .scene__caption { font-size: 10.5px; bottom: 12px; }
  .sky-lantern { width: 100px; }
  .petal-card { width: 88%; padding: 26px 18px; min-height: 190px; }
  .petal-card__text { font-size: 13px; }

  .about-intro__text p { font-size: 14px; line-height: 2.1; }
  .value h3 { font-size: 17px; }
  .policy p { font-size: 12.5px; }
  .callout { padding: 22px 18px; }
  .callout p { font-size: 11px; }

  .data-tools { padding: 26px 16px; }
  .data-tools .btn { width: 100%; }

  .footer__disclaimer { font-size: 9.5px; line-height: 1.9; }
  .footer__nav { gap: 12px 18px; }
  .footer__nav a { font-size: 9.5px; }

  .modal { padding: 12px; }
  .modal__panel { max-height: 92vh; padding: 28px 18px 30px; }
  .modal__head h2 { font-size: 22px; }
  .modal__head p:last-child { font-size: 11px; }
  .modal .slip { max-width: none; }
}

@media (max-width: 380px) {
  .hero__title { font-size: 30px; }
  .steps li span { font-size: 8px; }
  .slip { padding: 22px 16px; }
}

/* 滑鼠裝置才使用 hover 位移，避免手機殘留狀態 */
@media (hover: none) {
  .path-card:hover, .game-card:hover:not(:disabled), .keeper-card:hover, .envelope:hover { transform: none; }
}

/* ---------- 12 減少動態偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .petal, .spark { display: none; }
  .hero__title { color: var(--rice); background: none; -webkit-text-fill-color: var(--rice); }
}

/* 拉丁語系的簽詩以斜體呈現，保留手抄籤紙的語氣 */
body[data-lang="en"] .slip__poem,
body[data-lang="id"] .slip__poem,
body[data-lang="vi"] .slip__poem {
  font-style: italic;
  letter-spacing: 0.01em;
}
