@font-face {
  font-family: "Golden Hopes";
  src: url("../assets/fonts/GoldenHopes.woff2") format("woff2");
  font-display: swap;
}

:root {
  --ivory: #F8F0EC;      /* 背景 淡粉 */
  --paper: #FFFAF7;      /* 交錯區塊底色 */
  --ink: #4A3431;        /* 主標 深可可 */
  --text: #5E4A46;       /* 中文內文 可可 */
  --ink-soft: #9A8480;   /* 次要說明 */
  --gold: #B0706B;       /* 強調／按鈕 乾燥玫瑰 */
  --gold-deep: #8E9C84;  /* 標籤、花紋 鼠尾草綠 */
  --jade: #B0706B;
  --rose: #B0706B;
  --tint: #F6E6E2;       /* 選取底色 */
  --line: #EBDDD7;
  --serif-en: "Noto Serif TC", "Songti TC", serif;
  --serif-tc: "Noto Serif TC", "Songti TC", serif;
  --sans-tc: "Noto Serif TC", "Songti TC", serif;
  --script: "Golden Hopes", cursive;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--text);
  font-family: var(--sans-tc);
  font-size: 18px;
  line-height: 1.8;
  overflow-x: hidden;
  font-variant-numeric: lining-nums;
}
img, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
figure { margin: 0; }
h1, h2 { font-weight: 600; margin: 0; }
p { margin: 0 0 .75em; }
a { color: inherit; }
[hidden] { display: none !important; }

.eyebrow {
  font-family: var(--script);
  font-size: 1.7rem;
  line-height: 1.3;
  color: var(--gold-deep);
  margin-bottom: .2rem;
}
.script { font-family: var(--script); font-weight: 400; }
.display {
  font-family: var(--script);
  font-weight: 400;
  font-size: 3.2rem;
  line-height: 1.3;
  color: var(--gold);
  margin-bottom: 1.8rem;
}

.sec-sub { font-family: var(--serif-tc); font-size: 1.15rem; letter-spacing: .3em; color: var(--gold-deep); margin: -1.4rem auto 1.6rem; }

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 1.5rem;
  border-radius: 999px; border: 1.5px solid var(--gold);
  font: 500 1.05rem/1 var(--sans-tc); letter-spacing: .08em;
  text-decoration: none; cursor: pointer;
  background: transparent; color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:active { background: var(--gold-deep); }
.btn-outline:active { background: var(--tint); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }

/* ---------- 區塊共用 ---------- */
.sec { padding: 72px 20px; text-align: center; }
.sec > * { max-width: 1040px; margin-left: auto; margin-right: auto; }

/* ---------- 1 開場 ---------- */
.hero { display: grid; background: var(--paper); }
.hero-media { position: relative; background: #1F1813; }
.hero-media video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; }
.sound-btn, .replay-btn {
  position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px;
  background: rgba(31,24,19,.55); color: #fff;
  font: 500 .95rem var(--sans-tc); letter-spacing: .05em; cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.sound-btn svg { width: 22px; height: 22px; }
.sound-btn .wave { display: none; }
.sound-btn.on .wave { display: inline; }
.sound-btn.on .mute { display: none; }
.replay-btn { right: auto; left: 50%; top: 50%; transform: translate(-50%, -50%); min-height: 56px; padding: 0 1.6rem; font-size: 1.1rem; }
.scroll-hint {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: grid; justify-items: center;
  color: #fff; text-decoration: none; font-size: .95rem; letter-spacing: .3em;
  text-shadow: 0 1px 6px rgba(0,0,0,.45);
}
.scroll-hint span { padding-left: .3em; }
.scroll-hint svg { width: 28px; height: 28px; animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) { .scroll-hint svg { animation: none; } }

.hero-text { padding: 48px 20px 56px; text-align: center; }
.hero h1 { font-weight: 400; font-size: clamp(3.8rem, 17vw, 5.8rem); line-height: 1.25; color: var(--ink); margin: .1em 0 .15em; }
.hero h1 span { color: var(--gold); }
.hero-names { font-family: var(--serif-tc); font-size: 1.25rem; letter-spacing: .2em; }
.hero-date { display: flex; align-items: center; justify-content: center; gap: .6rem; margin: 1rem 0 .6rem; font-family: var(--serif-en); }
.hero-date .num { font-size: 2.1rem; font-weight: 400; letter-spacing: .06em; }
.hero-date .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.hero-date .dow { font-size: 1rem; letter-spacing: .3em; color: var(--gold-deep); margin-left: .4rem; }
.hero-meta { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }
.replied {
  display: inline-flex; align-items: center; gap: .8rem;
  margin-top: 1.4rem; padding: .55rem 1.1rem;
  border-radius: 12px; background: var(--tint); color: var(--jade); font-weight: 500;
}
.replied a { color: var(--jade); font-weight: 700; }

@media (min-width: 900px) {
  .hero { grid-template-columns: 1fr 1fr; min-height: 100vh; }
  .hero-media { height: 100vh; position: sticky; top: 0; }
  .hero-media video { height: 100%; aspect-ratio: auto; object-fit: contain; }
  .scroll-hint { display: none; }
  .hero-text { align-self: center; padding: 48px 56px; }
}

/* ---------- 開場：新郎新娘與主婚人 ---------- */
.hero-text .ornament { margin: 1.8rem auto 1.6rem; }
.hero-couple { display: grid; grid-template-columns: 1fr 1fr; max-width: 420px; margin: 0 auto; }
.hero-couple .person + .person { border-left: 1px solid var(--line); }
.person .role { font-size: .95rem; color: var(--gold-deep); letter-spacing: .3em; margin-bottom: .1rem; }
.person .name { font-family: var(--serif-tc); font-size: 1.7rem; letter-spacing: .18em; margin-bottom: .5rem; }
.person .parents { color: var(--ink-soft); margin: 0; line-height: 1.7; }
.person .label { display: block; font-size: .85rem; letter-spacing: .3em; color: var(--gold-deep); }

/* ---------- 3 邀請詞 ---------- */
.invite { background: var(--ivory); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-top: 56px; padding-bottom: 56px; }
.invite-card {
  max-width: 560px; padding: 40px 22px;
  border: 1px solid #D9B9B2; border-radius: 18px;
  background: var(--paper);
}
.ornament { display: block; width: 150px; height: 14px; margin: 0 auto; color: var(--gold-deep); }
.quote { font-family: var(--script); font-size: 1.9rem; line-height: 1.5; color: var(--gold-deep); margin: 1.4rem 0 1.8rem; }
.invite-body p { text-wrap: pretty; font-family: var(--serif-tc); font-size: 1.08rem; line-height: 2.1; color: var(--text); margin-bottom: 1.1em; }
.invite-date { font-family: var(--serif-en); font-size: 1.6rem; letter-spacing: .2em; margin: 1.6rem 0 0; }
.invite-married { font-size: 2.4rem; line-height: 1.3; color: var(--gold); margin: .2rem 0 0; }
.rsvp-note {
  margin: 1.8rem auto 1.4rem; padding-top: 1.4rem; max-width: 22em;
  border-top: 1px solid var(--line);
  font-family: var(--serif-tc); font-size: 1.08rem; line-height: 2;
}
.rsvp-note strong { color: var(--gold); font-weight: 600; }
.rsvp-note span { font-family: var(--sans-tc); font-size: .95rem; color: var(--ink-soft); }
.sign { font-family: var(--serif-tc); letter-spacing: .25em; color: var(--ink-soft); margin-bottom: 1.4rem; }

/* ---------- 4 日期與地點 ---------- */
.when { background: var(--paper); }
.when-grid { display: grid; gap: 36px; align-items: start; text-align: left; }
.calendar { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 22px 18px; max-width: 420px; width: 100%; margin: 0 auto; }
.cal-title { text-align: center; font-family: var(--serif-tc); font-size: 1.35rem; line-height: 1.4; letter-spacing: .08em; color: var(--ink); }
.cal-title span { font-family: var(--script); font-size: 2.1rem; letter-spacing: 0; color: var(--gold); margin-right: .3rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; font-family: var(--serif-en); font-size: 1.2rem; position: relative; z-index: 0; }
.cal-grid .dow { font-size: .8rem; letter-spacing: .1em; color: var(--ink-soft); padding-bottom: 6px; }
.cal-grid .day { aspect-ratio: 1; display: grid; place-items: center; position: relative; }
.cal-grid .day.sun { color: var(--rose); }
.cal-grid .day.big { color: #fff; font-weight: 500; }
.cal-grid .day.big::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; background: var(--gold); z-index: -1; }
.cal-grid .day.big::after { content: "♥"; position: absolute; top: -4px; right: -2px; font-size: .75rem; color: var(--rose); }
.when-info { max-width: 420px; width: 100%; margin: 0 auto; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { display: flex; gap: 1.2rem; padding: 0 0 1.2rem 1.4rem; position: relative; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: .55em; width: 12px; height: 12px; border-radius: 50%; background: var(--ivory); border: 2px solid var(--gold); }
.timeline li.main::before { background: var(--gold); }
.timeline .t { font-family: var(--serif-en); font-size: 1.6rem; line-height: 1.2; min-width: 3.4ch; }
.timeline .d { font-size: 1.2rem; font-weight: 500; line-height: 1.5; }
.timeline .d small { display: block; font-size: .95rem; font-weight: 400; color: var(--ink-soft); }
.timeline li.main .d { color: var(--gold); font-size: 1.3rem; }
.add-cal { margin: 1.2rem 0 0; font-size: 1rem; color: var(--ink-soft); }
.add-cal a, .add-cal button {
  display: inline-flex; align-items: center; min-height: 44px; margin-left: .3rem; padding: 0 .8rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper);
  font: 500 .95rem var(--sans-tc); color: var(--ink); text-decoration: none; cursor: pointer;
}
.venue-block { margin-top: 2rem; padding-top: 1.8rem; border-top: 1px solid var(--line); }
.venue { font-family: var(--serif-tc); font-size: 1.6rem; letter-spacing: .1em; margin-bottom: .1rem; }
.addr { color: var(--ink-soft); margin-bottom: .2rem; }
.parking { color: var(--jade); font-weight: 500; }
.map-icons { display: flex; gap: 28px; margin-top: 1rem; }
.icon-btn { display: grid; justify-items: center; gap: 6px; text-decoration: none; font-size: .95rem; color: var(--ink); }
.icon-btn svg {
  width: 64px; height: 64px; padding: 16px; border-radius: 50%;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(59,42,32,.08);
}
.icon-btn:active svg { background: var(--tint); }
@media (min-width: 820px) {
  .when-grid { grid-template-columns: 420px 420px; justify-content: center; gap: 64px; }
}

/* ---------- 5 RSVP ---------- */
.rsvp { background: var(--ivory); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rsvp-card {
  max-width: 560px;
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 28px 20px 24px; text-align: left;
  box-shadow: 0 10px 30px rgba(59,42,32,.07);
}
.privacy { margin-top: 1rem; font-size: .9rem; color: var(--ink-soft); }
.progress { display: flex; align-items: center; gap: .8rem; font-size: 1rem; color: var(--ink-soft); margin-bottom: 1rem; }
.progress .bar { flex: 1; height: 6px; border-radius: 3px; background: #F0E3DE; overflow: hidden; }
.progress .bar i { display: block; height: 100%; background: var(--gold); border-radius: 3px; transition: width .25s; }
.q-hello { font-family: var(--serif-tc); color: var(--jade); font-size: 1.2rem; margin-bottom: .3rem; }
.q-title { font-family: var(--serif-tc); font-size: 1.5rem; line-height: 1.5; margin-bottom: .4rem; }
.q-hint { color: var(--ink-soft); font-size: 1.05rem; margin-bottom: 1rem; }
.q-note { margin: .2rem 0 .4rem; padding: 12px 14px; border-radius: 12px; background: var(--tint); font-size: 1rem; line-height: 1.7; color: var(--ink-soft); }
.q-note b { color: var(--ink); font-weight: 500; }
.choices { display: grid; gap: 12px; margin-top: 1rem; }
.choice {
  width: 100%; min-height: 64px; padding: 12px 20px;
  border: 1.5px solid var(--line); border-radius: 14px; background: var(--paper);
  font: 500 1.25rem/1.4 var(--sans-tc); color: var(--ink); text-align: left;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.choice small { display: block; font-size: .95rem; font-weight: 400; color: var(--ink-soft); margin-top: 2px; }
.choice.selected { border-color: var(--gold); background: var(--tint); box-shadow: inset 0 0 0 1.5px var(--gold); }
.stepper-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid #F3E7E3; }
.stepper-row:last-of-type { border-bottom: 0; }
.stepper-row .lbl { font-size: 1.25rem; font-weight: 500; }
.stepper-row .lbl small { display: block; font-size: .95rem; font-weight: 400; color: var(--ink-soft); }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button {
  width: 56px; height: 56px; border-radius: 50%;
  border: 1.5px solid var(--gold); background: #fff; color: var(--gold-deep);
  font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.stepper button:disabled { border-color: var(--line); color: #CFC4B4; }
.stepper output { min-width: 2ch; text-align: center; font-size: 1.7rem; font-weight: 500; }
.field { width: 100%; min-height: 60px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); font: 400 1.25rem/1.5 var(--sans-tc); color: var(--ink); }
.field:focus { outline: none; border-color: var(--gold); }
textarea.field { min-height: 150px; resize: vertical; }
.masked { font-size: 1.3rem; font-weight: 500; letter-spacing: .04em; padding: 14px 16px; background: var(--tint); border-radius: 12px; }
.err { color: #A34A3F; font-size: 1rem; margin-top: .5rem; }
.nav { display: flex; gap: 12px; margin-top: 1.5rem; }
.nav .btn { flex: 1; min-height: 60px; font-size: 1.2rem; border-radius: 14px; }
.nav .back { flex: 0 0 auto; padding: 0 1.2rem; border-color: var(--line); color: var(--ink-soft); }
.summary { list-style: none; padding: 0; margin: 1rem 0 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.summary li { display: flex; justify-content: space-between; gap: 1rem; padding: 14px 16px; font-size: 1.15rem; border-bottom: 1px solid #F3E7E3; }
.summary li:last-child { border-bottom: 0; }
.summary .k { color: var(--ink-soft); flex: 0 0 auto; }
.summary .v { font-weight: 500; text-align: right; word-break: break-all; }
.done { text-align: center; padding: 8px 0; }
.done .script { font-size: 3rem; color: var(--gold); line-height: 1.2; }
.done .q-title { margin: .4rem 0 .8rem; }
.done .btn-row { justify-content: center; }
.done .btn { min-height: 58px; font-size: 1.1rem; }
.link-btn { background: none; border: 0; color: var(--gold-deep); font: 500 1.05rem var(--sans-tc); text-decoration: underline; cursor: pointer; margin-top: 1.2rem; min-height: 44px; }

/* ---------- 6 藝廊 ---------- */
.gallery { background: var(--paper); }
.tabs { display: inline-flex; gap: 6px; padding: 5px; border-radius: 999px; background: #F3E4E0; margin-bottom: 1.5rem; }
.tabs button { min-height: 48px; min-width: 96px; padding: 0 1.2rem; border: 0; border-radius: 999px; background: transparent; font: 500 1.05rem var(--sans-tc); color: var(--ink-soft); cursor: pointer; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(59,42,32,.1); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-flow: dense; gap: 8px; }
.grid button { padding: 0; border: 0; background: #EFE3DF; cursor: zoom-in; aspect-ratio: 3 / 4; overflow: hidden; }
.grid button.wide { grid-column: span 2; aspect-ratio: 3 / 2; }
.grid img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 12px; } }

.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(20,14,10,.94); display: grid; place-items: center; touch-action: pan-y; }
.lightbox img { max-width: 100vw; max-height: 86svh; object-fit: contain; }
.lightbox button { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 56px; height: 56px; border-radius: 50%; font-size: 2rem; line-height: 1; cursor: pointer; }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #D8CBB5; font-family: var(--serif-en); letter-spacing: .2em; margin: 0; }

/* ---------- 7 感謝 ---------- */
.thanks { display: grid; padding: 0; background: var(--ink); color: #F8F6F1; }
.thanks > * { max-width: none; margin: 0; }
.thanks-photo { height: min(70svh, 120vw); overflow: hidden; }
.thanks-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.thanks-text { padding: 56px 24px 60px; }
.thanks-text .script { font-size: 3.8rem; color: #F2C9C2; line-height: 1.2; margin-bottom: .6rem; }
.thanks-line { font-family: var(--serif-tc); font-size: 1.35rem; line-height: 2; letter-spacing: .15em; margin-bottom: 2.2rem; }
.contact-box { max-width: 360px; margin: 0 auto; padding-top: 1.8rem; border-top: 1px solid rgba(242,201,194,.25); }
.contact-lead { font-size: .95rem; color: #D9C0BA; margin-bottom: 1.1rem; }
.contacts { display: grid; gap: 14px; }
.contacts .role { font-family: var(--serif-tc); font-size: 1.05rem; letter-spacing: .15em; color: #E8C3BC; margin: 0 0 .2rem; }
.contacts .tel {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; min-width: 220px; padding: 0 1.2rem;
  border: 1px solid rgba(242,201,194,.5); border-radius: 999px;
  color: #F8F6F1; text-decoration: none; font-size: 1.1rem; letter-spacing: .06em;
}
.contacts .tel::before { content: "☎"; margin-right: .5rem; color: #F2C9C2; }
@media (min-width: 900px) {
  .thanks { grid-template-columns: 1fr 1fr; }
  .thanks-photo { height: auto; min-height: 640px; }
  .thanks-text { align-self: center; }
}

/* ---------- 頁尾 ---------- */
.footer {
  text-align: center; padding: 36px 20px calc(40px + env(safe-area-inset-bottom));
  background: #3A2825; color: #C9ADA7; border-top: 1px solid rgba(255,255,255,.06);
}
.f-names { font-family: var(--script); font-size: 2.4rem; line-height: 1.4; color: #F2C9C2; margin-bottom: .3rem; }
.f-meta { display: flex; align-items: center; justify-content: center; gap: .8rem; margin: 0; font-size: .9rem; letter-spacing: .14em; white-space: nowrap; }
.f-meta i { width: 4px; height: 4px; border-radius: 50%; background: #9C7E78; }
