/* ══════════════════════════════════════════════════════════════
   108佛子募集 — 靜思／日式水墨
   ══════════════════════════════════════════════════════════════ */

:root {
  /* 紙 */
  --paper:      #FBF8F1;
  --paper-2:    #F3EEE3;
  --paper-3:    #ECE5D6;

  /* 墨 —— 內文與次要文字都刻意壓深，淺色宣紙底上才讀得清楚 */
  --ink:        #2A2622;
  --ink-2:      #443E36;
  --ink-3:      #857E71;
  --ink-line:   rgba(46, 42, 38, .16);

  /* 竹 */
  --bamboo:     #6E8B6A;
  --bamboo-d:   #425C46;

  /* 點綴 */
  --gold:       #B08D57;
  --gold-soft:  rgba(176, 141, 87, .32);
  --blue:       #1B3A5B;
  --blue-d:     #12293F;

  --serif: "Noto Serif TC", "Songti TC", "PingFang TC", serif;
  --sans:  "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;

  /* 願心格：圓圈直徑 + 姓名列高度，兩軸用同一個 pitch 才不會把愛心拉變形 */
  --cell:   clamp(15px, 3.0vw, 31px);
  --name-h: clamp(12px, 1.4vw, 16px);
  --pitch:  calc(var(--cell) + var(--name-h));
  --gap:    clamp(3px, .8vw, 7px);

  --ease: cubic-bezier(.22, .9, .3, 1);
  --shadow-soft: 0 18px 50px -28px rgba(46, 42, 38, .45);
}

*, *::before, *::after { box-sizing: border-box; }

/* 作者端的 display 會蓋掉 UA 的 [hidden]{display:none}，這裡統一擋住 */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink-2);
  background: var(--paper);
  line-height: 1.95;
  letter-spacing: .06em;
  overflow-x: hidden;
}

/* 宣紙暈染底 */
body::before {
  content: "";
  position: fixed; inset: 0;
  z-index: -2;
  background:
    radial-gradient(58% 40% at 18% 8%,  rgba(176, 141, 87, .07), transparent 70%),
    radial-gradient(50% 44% at 88% 26%, rgba(110, 139, 106, .09), transparent 72%),
    radial-gradient(70% 50% at 50% 100%, rgba(46, 42, 38, .05), transparent 70%),
    var(--paper);
}
/* 紙纖維 —— 用預先點陣化的 SVG 雜訊圖平鋪，
   不要用 filter: url(#...) 直接掛在固定層上，那會讓瀏覽器每次重繪都重跑濾鏡。 */
body::after {
  content: "";
  position: fixed; inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

img { max-width: 100%; display: block; }

::selection { background: var(--gold-soft); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── 進場淡入 ──────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity 1.15s var(--ease), transform 1.15s var(--ease);
  transition-delay: calc(var(--d, 0) * 140ms);
}

/* ══ 音樂開關 ═══════════════════════════════════════════════ */
.music-toggle {
  position: fixed;
  top: clamp(14px, 2.4vw, 28px);
  right: clamp(14px, 2.4vw, 28px);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .6em 1.25em .6em .7em;
  font-family: var(--serif);
  font-size: clamp(14px, 1.6vw, 16px);
  font-weight: 500;
  letter-spacing: .14em;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  box-shadow: 0 6px 20px -8px rgba(46, 42, 38, .3);
  cursor: pointer;
  transition: color .4s, border-color .4s, background .4s, transform .3s var(--ease);
}
.music-toggle:hover { transform: translateY(-2px); background: #fff; }
.music-glyph {
  position: relative; z-index: 1;
  width: 1.7em; height: 1.7em;
  display: grid; place-items: center;
  font-size: 1.05em; line-height: 1;
  color: var(--paper);
  border-radius: 50%;
  background: var(--gold);
}
.music-ring {
  position: absolute;
  left: .7em; top: 50%;
  width: 1.7em; height: 1.7em;
  margin-top: -.85em;
  border-radius: 50%;
  border: 1.5px solid transparent;
  border-top-color: var(--blue);
  opacity: 0;
}
.music-toggle[aria-pressed="true"] .music-ring {
  opacity: 1;
  animation: spin 3.2s linear infinite;
}
.music-toggle[aria-pressed="true"] { border-color: var(--blue); }
.music-toggle[aria-pressed="true"] .music-glyph { background: var(--blue); }
@keyframes spin { to { transform: rotate(360deg); } }

/* 網頁開啟時是靜音的：按鈕持續輕輕呼吸，直到使用者按過一次為止 */
.music-toggle.is-hint { animation: musicHint 2.6s var(--ease) infinite; }
@keyframes musicHint {
  0%, 100% { box-shadow: 0 6px 20px -8px rgba(46,42,38,.3), 0 0 0 0 rgba(176, 141, 87, .5); }
  60%      { box-shadow: 0 6px 20px -8px rgba(46,42,38,.3), 0 0 0 11px rgba(176, 141, 87, 0); }
}

.yt-host {
  position: fixed; left: -9999px; top: 0;
  width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}

@media (max-width: 480px) {
  .music-toggle { font-size: 13px; padding: .5em .9em .5em .55em; letter-spacing: .08em; }
}

/* ══ Hero ═══════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(72px, 12vh, 130px) clamp(20px, 5vw, 64px) clamp(56px, 9vh, 90px);
  overflow: hidden;
  isolation: isolate;
}
.hero__photo {
  position: absolute; inset: 0;
  z-index: -2;
  background: url("../assets/img/Heading.jpg") center 34% / cover no-repeat;
  filter: sepia(.3) contrast(1.04) brightness(1.02);
  opacity: .62;
}
.hero__veil {
  position: absolute; inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(251,248,241,.5) 0%, rgba(251,248,241,.12) 24%, rgba(251,248,241,.74) 72%, var(--paper) 100%),
    radial-gradient(58% 48% at 50% 44%, rgba(251,248,241,.42), transparent 78%);
}
.hero__inner {
  position: relative;
  width: min(980px, 100%);
  text-align: center;
}

.hero__eyebrow {
  margin: 0 0 clamp(14px, 2.4vh, 26px);
  font-family: var(--serif);
  font-size: clamp(15px, 2.1vw, 19px);
  font-weight: 500;
  letter-spacing: .5em;
  text-indent: .5em;
  color: var(--ink);
}
.hero__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 200;
  font-size: clamp(46px, 10vw, 108px);
  line-height: 1.08;
  letter-spacing: .1em;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .12em;
  flex-wrap: wrap;
}
.hero__title-cjk { font-size: .74em; letter-spacing: .16em; }
.hero__sub {
  margin: clamp(16px, 2.6vh, 28px) 0 0;
  font-family: var(--serif);
  font-size: clamp(17px, 2.5vw, 23px);
  font-weight: 400;
  letter-spacing: .3em;
  text-indent: .3em;
  color: var(--ink);
}

/* 歌詞 — 桌機直書（區塊沿著 block 軸由右至左排列） */
.lyrics {
  margin: clamp(34px, 5.4vh, 62px) auto 0;
  writing-mode: vertical-rl;
  display: block;
  width: fit-content;
  max-width: 100%;
  text-align: start;   /* 直書時 inline 軸是垂直的：靠上對齊＝古典直排 */
}
.lyrics__line {
  margin: 0;
  /* vertical-rl 的 block-end 就是左側 */
  padding-block-end: clamp(9px, 1.2vw, 15px);
  margin-block-end: clamp(9px, 1.2vw, 15px);
  border-block-end: 1px solid var(--ink-line);
  white-space: nowrap;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(16px, 1.8vw, 22px);
  letter-spacing: .3em;
  line-height: 1.5;
  color: var(--ink);
}
.lyrics__line:last-child { border-block-end: 0; margin-block-end: 0; padding-block-end: 0; }
/* 續行（我的爹娘／親愛的 上人）依古法降一格起排 */
.lyrics__line--soft {
  color: var(--ink-2);
  font-size: clamp(15px, 1.6vw, 19px);
  padding-inline-start: 2.6em;
}

.scroll-cue {
  display: inline-block;
  margin-top: clamp(34px, 5vh, 60px);
  color: var(--ink-3);
}
.scroll-cue svg {
  width: 18px; height: 40px;
  fill: none; stroke: currentColor; stroke-width: 1.1;
  stroke-linecap: round; stroke-linejoin: round;
  animation: breathe 3.4s var(--ease) infinite;
}
@keyframes breathe {
  0%, 100% { opacity: .35; transform: translateY(0); }
  50%      { opacity: .9;  transform: translateY(7px); }
}

/* 窄畫面才改橫書；一般筆電視窗（≥700px）維持直式 */
@media (max-width: 700px) {
  .lyrics { writing-mode: horizontal-tb; width: auto; text-align: center; }
  .lyrics__line {
    padding-block-end: 0;
    margin-block-end: 0;
    border-block-end: 0;
    padding: .16em 0;
    letter-spacing: .3em;
    text-indent: .3em;
    font-size: clamp(15px, 4.4vw, 20px);
  }
}

/* ══ 共用元件 ═══════════════════════════════════════════════ */
.section-kicker {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(15px, 2.1vw, 18px);
  font-weight: 500;
  letter-spacing: .42em;
  text-indent: .42em;
  color: var(--ink-2);
}
.section-title {
  margin: .5em 0 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(28px, 5.4vw, 46px);
  letter-spacing: .22em;
  text-indent: .22em;
  color: var(--ink);
}
.ink-rule { margin: clamp(18px, 3vh, 30px) auto clamp(26px, 4vh, 44px); width: min(220px, 46%); }
.ink-rule svg { width: 100%; height: 8px; fill: none; stroke: var(--ink-3); stroke-width: 1.1; stroke-linecap: round; opacity: .7; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  min-height: 52px;
  padding: 0 clamp(28px, 4.5vw, 46px);
  font-family: var(--serif);
  font-size: clamp(16px, 2.1vw, 19px);
  font-weight: 500;
  letter-spacing: .26em;
  text-indent: .26em;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background .45s var(--ease), color .45s, border-color .45s, transform .3s var(--ease), box-shadow .45s;
}
.btn--primary { background: var(--blue); color: #F7F3EA; box-shadow: 0 14px 34px -20px rgba(27, 58, 91, .9); }
.btn--primary:hover:not(:disabled) { background: var(--blue-d); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink-2); border-color: var(--ink-line); }
.btn--ghost:hover { color: var(--ink); border-color: var(--ink-3); }
.btn:disabled { opacity: .38; cursor: not-allowed; box-shadow: none; }

.btn__spinner { display: none; width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.3); border-top-color: #fff; }
.btn.is-busy .btn__spinner { display: block; animation: spin .8s linear infinite; }
.btn.is-busy { pointer-events: none; opacity: .7; }

.linkbtn {
  background: none; border: 0; padding: 0;
  font: inherit; font-size: 14px; font-weight: 500;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ══ 願心區 ═════════════════════════════════════════════════ */
.wishes {
  position: relative;
  padding: clamp(56px, 10vh, 110px) clamp(18px, 4vw, 56px) clamp(70px, 11vh, 130px);
  overflow: hidden;
}
.wishes__inner {
  position: relative;
  z-index: 2;
  width: min(880px, 100%);
  margin: 0 auto;
  text-align: center;
}

/* 竹子 */
/* 竹子的「地面」對齊願心區底緣，也就是頁尾米色背景的上緣 */
.bamboo-layer {
  position: absolute;
  bottom: 0;
  right: -6%;
  z-index: 1;
  width: min(32vw, 400px);
  height: min(100%, 900px);
  pointer-events: none;
}
.bamboo-sticky { height: 100%; }
.bamboo-layer svg { width: 100%; height: 100%; display: block; }
.bamboo-clip-rect {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  /* 實際的 scaleY 由 bamboo.js 逐支寫在 inline style（--g0 / --g1 / --g2） */
  transition: transform 1.6s var(--ease);
}
.bamboo-stalk { fill: none; stroke: var(--bamboo); stroke-linecap: round; }
.bamboo-node  { fill: none; stroke: var(--bamboo-d); stroke-linecap: round; opacity: .75; }
.bamboo-leaf  { fill: var(--bamboo); transform-box: fill-box; transform-origin: 0% 50%; }
.bamboo-leaf-group { animation: sway 9s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes sway {
  0%, 100% { transform: rotate(-1.1deg); }
  50%      { transform: rotate(1.4deg); }
}
.bamboo-layer.is-full .bamboo-stalk { stroke: var(--bamboo-d); }
.bamboo-layer.is-full { filter: drop-shadow(0 0 22px rgba(176, 141, 87, .35)); }

/* 窄畫面時愛心幾乎佔滿寬度，竹子退成整幅淡墨底景，不與願心搶位置 */
@media (max-width: 900px) {
  .bamboo-layer { width: 100%; right: 0; opacity: .3; }
}
@media (max-width: 600px) {
  .bamboo-layer { opacity: .22; }
}

/* 尚未接後端／示範資料的警示 */
.notice {
  max-width: 30em;
  margin: 0 auto clamp(20px, 3vh, 32px);
  padding: .9em 1.2em;
  font-size: 14.5px;
  line-height: 1.9;
  letter-spacing: .04em;
  color: #6B4E24;
  background: rgba(176, 141, 87, .1);
  border: 1px solid var(--gold-soft);
  border-radius: 3px;
}
.notice b { font-weight: 500; }

/* 計數 */
.counter {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .28em;
  font-family: var(--serif);
  font-weight: 200;
  color: var(--ink);
  line-height: 1;
  margin-bottom: clamp(28px, 4.6vh, 48px);
}
.counter__now   { font-size: clamp(44px, 9vw, 78px); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.counter__slash { font-size: clamp(26px, 5vw, 44px); color: var(--ink-3); }
.counter__total { font-size: clamp(26px, 5vw, 44px); color: var(--ink-2); letter-spacing: .04em; }

/* ── 108 愛心陣列 ─────────────────────────────────────────── */
.heart-wrap { position: relative; display: flex; justify-content: center; }

.heart-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 16), var(--pitch));
  grid-auto-rows: var(--pitch);
  gap: var(--gap);
  justify-content: center;
}

.cell {
  width: var(--pitch);
  height: var(--pitch);
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateY(var(--ty, 0));
  cursor: default;
}

.cell__disc {
  width: var(--cell);
  height: var(--cell);
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(46, 42, 38, .045);
  border: 1px solid var(--ink-3);
  opacity: .34;
  filter: grayscale(1);
  transition: opacity .8s var(--ease), filter .8s var(--ease), box-shadow .9s var(--ease), border-color .8s;
}

.cell__img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  opacity: 0;
  transition: opacity .7s var(--ease);
}
.cell__initial {
  font-family: var(--serif);
  font-size: calc(var(--cell) * .46);
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
  opacity: 0;
  transition: opacity .7s var(--ease);
  user-select: none;
}

/* 圓圈下方的大名 */
.cell__name {
  width: calc(var(--pitch) + var(--gap) * .9);
  margin-top: 1px;
  font-family: var(--serif);
  font-size: clamp(10px, 1.15vw, 13px);
  font-weight: 500;
  line-height: var(--name-h);
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
  opacity: 0;
  transition: opacity .8s var(--ease);
}

.cell.is-filled .cell__disc {
  opacity: 1;
  filter: none;
  border-color: var(--gold);
  background: var(--paper-2);
  box-shadow: 0 0 0 1px var(--gold-soft), 0 0 14px -2px var(--gold-soft);
}
.cell.is-filled .cell__img,
.cell.is-filled .cell__initial { opacity: 1; }
.cell.is-filled .cell__name { opacity: 1; }

/* 點亮的一瞬 */
@keyframes lightUp {
  0%   { transform: scale(.55); box-shadow: 0 0 0 0 rgba(176,141,87,0); }
  55%  { transform: scale(1.16); box-shadow: 0 0 0 4px rgba(176,141,87,.42), 0 0 30px 6px rgba(176,141,87,.5); }
  100% { transform: scale(1); box-shadow: 0 0 0 1px var(--gold-soft), 0 0 14px -2px var(--gold-soft); }
}
.cell.is-lighting .cell__disc { animation: lightUp .95s var(--ease) both; }

/* 剛報名的自己 */
@keyframes pulseMine {
  0%, 100% { box-shadow: 0 0 0 1px var(--gold), 0 0 16px 0 var(--gold-soft); }
  50%      { box-shadow: 0 0 0 3px var(--gold), 0 0 30px 6px rgba(176,141,87,.55); }
}
.cell.is-mine .cell__disc { animation: pulseMine 2.2s var(--ease) infinite; }
.cell.is-mine .cell__name { color: var(--gold); font-weight: 500; }

/* 窄畫面時 16 欄擠不下可讀的姓名，改由點按圓圈顯示 */
@media (max-width: 760px) {
  :root { --name-h: 0px; --cell: clamp(15px, 4.2vw, 30px); }
  .cell__name { display: none; }
}

/* tooltip */
.tip {
  position: absolute;
  z-index: 20;
  transform: translate(-50%, -100%);
  margin-top: -10px;
  padding: .42em .9em;
  white-space: nowrap;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: .1em;
  color: var(--paper);
  background: rgba(46, 42, 38, .92);
  border-radius: 3px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .22s;
}
.tip.is-on { opacity: 1; }
.tip::after {
  content: "";
  position: absolute;
  left: 50%; top: 100%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(46, 42, 38, .92);
}

/* CTA */
.cta-zone { margin-top: clamp(40px, 6.5vh, 74px); }
.cta-note {
  margin: 1.2em 0 0;
  font-family: var(--serif);
  font-size: clamp(15px, 2.1vw, 18px);
  font-weight: 500;
  letter-spacing: .22em;
  text-indent: .22em;
  color: var(--ink-2);
}

/* ══ 頁尾 ═══════════════════════════════════════════════════ */
.footer {
  position: relative;
  padding: clamp(56px, 9vh, 100px) clamp(20px, 5vw, 56px) clamp(48px, 7vh, 80px);
  background: var(--paper-2);
  border-top: 1px solid var(--ink-line);
}
.footer__inner { width: min(760px, 100%); margin: 0 auto; text-align: center; }
.footer__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(20px, 3.2vw, 27px);
  letter-spacing: .3em;
  text-indent: .3em;
  color: var(--ink);
}
.footer__lead { margin: 1em 0 clamp(26px, 4vh, 40px); font-size: 15px; color: var(--ink-2); }

.contacts {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(12px, 2vw, 20px);
  text-align: left;
}
.contact {
  padding: clamp(14px, 2vw, 20px);
  background: var(--paper);
  border: 1px solid var(--ink-line);
  border-radius: 3px;
}
.contact__area {
  display: inline-block;
  margin-bottom: .35em;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .26em;
  color: #8F6E38;
}
.contact__name {
  display: block;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: .12em;
  color: var(--ink);
}
.contact__mail {
  display: inline-block;
  margin-top: .3em;
  font-size: 14px;
  letter-spacing: .02em;
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  word-break: break-all;
}
.contact__mail:hover { border-bottom-color: var(--blue); }

.footer__sign {
  margin: clamp(34px, 5vh, 56px) 0 0;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: .2em;
  color: var(--ink-2);
}

/* ══ 彈窗 ═══════════════════════════════════════════════════ */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: clamp(12px, 3vw, 32px); }
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(30, 27, 24, .46);
  backdrop-filter: blur(4px);
  animation: fadeIn .4s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal__panel {
  position: relative;
  width: min(680px, 100%);
  max-height: min(88svh, 900px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(30px, 5vw, 52px) clamp(22px, 4.5vw, 54px) clamp(28px, 4.5vw, 46px);
  background: var(--paper);
  border-radius: 4px;
  box-shadow: var(--shadow-soft), 0 0 0 1px rgba(46,42,38,.06);
  animation: rise .5s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

.modal__close {
  position: absolute;
  top: 10px; right: 12px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  font-size: 26px; line-height: 1;
  color: var(--ink-3);
  background: none; border: 0;
  cursor: pointer;
  transition: color .3s;
}
.modal__close:hover { color: var(--ink); }

/* 宣導文與表單之間不放分隔線，改用留白區隔 */
#signupForm { margin-top: clamp(28px, 4.4vh, 44px); }

.modal__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(21px, 3.6vw, 29px);
  letter-spacing: .16em;
  color: var(--ink);
  text-align: center;
}
.modal__lead {
  margin: .9em 0 clamp(20px, 3vh, 30px);
  font-size: 15px;
  color: var(--ink-2);
  text-align: center;
}

.pledge {
  margin: clamp(22px, 3.4vh, 34px) 0;
  padding: .1em 0 .1em 1.1em;
  border-left: 2px solid var(--gold);
  font-family: var(--serif);
  font-size: clamp(17px, 2.7vw, 22px);
  font-weight: 500;
  letter-spacing: .12em;
  line-height: 1.85;
  color: var(--ink);
}
.prose p { margin: 0 0 1.1em; font-size: clamp(15px, 2vw, 17px); line-height: 2.05; }
.prose b { font-weight: 500; color: var(--ink); }

.highlight {
  margin: clamp(20px, 3vh, 30px) 0 clamp(26px, 4vh, 38px);
  padding: clamp(14px, 2.2vw, 20px);
  background: var(--paper-2);
  border-radius: 3px;
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--ink);
}
.highlight b { font-weight: 500; }

/* 表單 */
.field { margin: 0 0 clamp(20px, 3vh, 28px); border: 0; padding: 0; text-align: left; }
.field__label {
  display: block;
  margin-bottom: .5em;
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--ink);
}
.req { font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: .1em; color: #8F6E38; }
.field__hint { margin: 0 0 .8em; font-size: 13.5px; line-height: 1.85; color: var(--ink-2); }

.input {
  width: 100%;
  min-height: 48px;
  padding: .6em .9em;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--ink-line);
  border-radius: 3px;
  transition: border-color .3s, box-shadow .3s;
}
.input:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(176,141,87,.14); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 14px) 22px; background-size: 6px 6px; background-repeat: no-repeat; }
.input.is-bad { border-color: #B4553F; }

.radio {
  display: flex;
  align-items: flex-start;
  gap: .7em;
  padding: .55em .1em;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-2);
  cursor: pointer;
}
.radio input { margin-top: .42em; accent-color: var(--blue); width: 16px; height: 16px; flex: none; }
.radio:hover { color: var(--ink); }

.err { margin: .5em 0 0; font-size: 13.5px; letter-spacing: .04em; color: #A0442F; }
.err--form { margin: 0 0 1em; text-align: center; }

.modal__actions { margin-top: clamp(24px, 3.6vh, 34px); display: flex; justify-content: center; }
.modal__actions .btn { flex: 1; max-width: 280px; }
.submit-note {
  margin: .9em 0 0;
  font-size: 13.5px;
  text-align: center;
  color: var(--ink-2);
}

/* Google 登入 */
.gsi-slot { min-height: 44px; display: flex; flex-direction: column; align-items: center; gap: .6em; }
.gsi-fallback { margin: 0; font-size: 14px; color: #A0442F; }

/* 登入後只確認是哪個帳號要收信 —— 頭貼直接採用，不另做確認 */
.account-line {
  display: flex;
  align-items: center;
  gap: .7em;
  padding: .8em 1em;
  background: var(--paper-2);
  border: 1px solid var(--gold-soft);
  border-radius: 3px;
  font-size: 14.5px;
}
.account-line__tick {
  flex: none;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  font-size: 12px;
  color: var(--paper);
  background: var(--gold);
  border-radius: 50%;
}
.account-line__mail {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}

/* 完成 */
.step--done { text-align: center; }
.done-mark { width: 62px; height: 62px; margin: 0 auto clamp(18px, 3vh, 26px); }
.done-mark svg { width: 100%; height: 100%; fill: none; stroke: var(--gold); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .85s var(--ease) .18s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
#doneIndex { font-weight: 500; color: var(--gold); }
.done-note { margin: 1.4em 0 clamp(26px, 4vh, 38px); font-size: 15.5px; color: var(--ink-2); }
.done-contacts { text-align: left; }
.done-contacts h3 {
  margin: 0 0 1em;
  font-family: var(--serif);
  font-weight: 300;
  font-size: 17px;
  letter-spacing: .26em;
  text-align: center;
  color: var(--ink);
}
.done-contacts .contacts { grid-template-columns: 1fr; gap: 8px; }
.done-contacts .contact { padding: 12px 14px; }

/* ══ 手機 sticky CTA ════════════════════════════════════════ */
@media (max-width: 700px) {
  .cta-zone {
    position: sticky;
    bottom: 0;
    z-index: 40;
    margin-left: calc(clamp(18px, 4vw, 56px) * -1);
    margin-right: calc(clamp(18px, 4vw, 56px) * -1);
    padding: 14px clamp(18px, 4vw, 56px) max(14px, env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(251,248,241,0), var(--paper) 34%);
  }
  .cta-zone .btn { width: 100%; }
  .cta-note { margin-top: .8em; }
}

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