:root {
  color-scheme: light;
  --paper: #f7f3eb;
  --white: #fffcf7;
  --ink: #2f2923;
  --muted: #736557;
  --gold: #805d31;
  --line: #d9cbb4;
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --english: "Iowan Old Style", "Baskerville", "Palatino Linotype", Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 1rem; line-height: 1.8; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 2px; }
::selection { background: #e6d9bd; color: var(--ink); }
[hidden] { display: none !important; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; }
.skip-link { position: fixed; z-index: 20; top: -5rem; left: 1rem; padding: .8rem 1.2rem; background: var(--ink); color: white; }
.skip-link:focus { top: 1rem; }
.site-header { min-height: 6rem; max-width: 1440px; margin: auto; padding: 1rem 5%; display: flex; align-items: center; gap: 2rem; border-bottom: 1px solid var(--line); }
.monogram { font-family: var(--serif); font-size: 1.05rem; letter-spacing: .15em; line-height: 1; white-space: nowrap; }
.monogram span { color: var(--gold); font-family: var(--english); font-style: italic; font-size: 1rem; letter-spacing: 0; margin: 0 .3rem; }
.site-header nav { display: flex; gap: 2.2rem; align-items: center; margin-left: auto; font-size: .875rem; }
.site-header nav a { padding: .4rem 0; }
.site-header nav a:hover, .site-footer a:hover { color: var(--gold); }
.site-header .nav-rsvp { border-bottom: 1px solid var(--gold); }
.hero { max-width: 1440px; margin: auto; display: grid; grid-template-columns: 1fr 1fr; min-height: min(800px, calc(100svh - 6rem)); position: relative; border-bottom: 1px solid var(--line); }
.hero-content { padding: 4rem 3rem 5rem; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.eyebrow { color: var(--gold); font-family: var(--sans); font-size: .75rem; font-weight: 500; letter-spacing: .24em; line-height: 1.6; }
h1 { display: flex; align-items: center; flex-direction: column; font-size: clamp(2.2rem, 4vw, 3.8rem); line-height: 1.4; letter-spacing: .18em; margin: 1.5rem 0 0; }
h1 span { margin-right: -.18em; }
h1 i { display: block; font-family: var(--english); font-weight: 400; font-size: 2.2rem; line-height: 1.3; letter-spacing: 0; color: var(--gold); }
.hero-rule { width: 2rem; height: 1px; background: var(--gold); margin: 1.7rem auto; }
.hero-verse { font-family: var(--serif); font-size: 1.125rem; letter-spacing: .1em; }
.hero-date { margin: 1.7rem 0 1.8rem; display: flex; align-items: center; justify-content: center; gap: 1rem; font-size: .875rem; }
.hero-date span { color: var(--muted); padding-right: 1rem; border-right: 1px solid var(--line); }
.hero-date strong { font-weight: 400; letter-spacing: .12em; }
.button { min-height: 3.3rem; padding: .8rem 1.8rem; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ink); border-radius: 0; font-size: .9375rem; letter-spacing: .07em; transition: background .2s, border-color .2s; }
.primary { background: var(--ink); color: var(--white); }
.primary:hover { background: #574333; border-color: #574333; }
.hero-note { margin-top: 1rem; font-size: .875rem; color: var(--muted); }
.hero-visual { position: relative; min-height: 650px; overflow: hidden; }
.hero-visual img { display: block; position: absolute; height: 100%; width: 100%; object-fit: cover; object-position: center 58%; }
.hero-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 58%, rgb(50 31 15 / 25%)); }
.section-pad { padding: 6.5rem 9%; max-width: 1440px; margin: auto; }
h2 { font-size: clamp(1.8rem, 3vw, 2.75rem); line-height: 1.7; letter-spacing: .07em; }
.section-heading .eyebrow, .details-intro .eyebrow, .rsvp-intro .eyebrow { margin-bottom: 1.2rem; }
.invitation { text-align: center; background: var(--white); border-bottom: 1px solid var(--line); }
.invitation h2 { margin-bottom: 2.2rem; }
.couple-illustration { width: min(42rem, 100%); aspect-ratio: 1086 / 420; margin: 0 auto 3rem; overflow: hidden; border-radius: .2rem; box-shadow: 0 1.2rem 3.5rem rgb(86 62 40 / 7%); }
.couple-illustration img { display: block; width: 100%; height: auto; }
.letter { font-size: 1rem; line-height: 2.1; color: var(--muted); }
.letter p + p { margin-top: 1.3rem; }
.letter-salutation { color: var(--ink); }
.letter .signature { margin-top: 2.5rem; font-family: var(--serif); color: var(--ink); font-size: 1.1rem; letter-spacing: .08em; }
.signature span { font-family: var(--english); color: var(--gold); padding: 0 .4rem; }
.signature small { display: block; margin-top: .6rem; font-family: var(--sans); font-size: .875rem; color: var(--muted); letter-spacing: .25em; }
.mobile-break { display: none; }
.details { display: grid; grid-template-columns: .9fr 1.3fr; gap: 5rem; background: #efe8dc; border-bottom: 1px solid var(--line); }
.section-copy { margin-top: 1.4rem; font-size: 1rem; color: var(--muted); line-height: 1.9; }
.details-list { padding-top: .3rem; }
.detail-row { display: flex; align-items: center; gap: 1.6rem; padding: 1.7rem 0; border-bottom: 1px solid #cebea4; }
.detail-row:first-child { border-top: 1px solid #cebea4; }
.detail-number { color: var(--gold); font-family: var(--english); font-style: italic; font-size: 1.8rem; align-self: flex-start; padding-top: .2rem; }
.detail-row h3 { font-size: .875rem; font-weight: 400; color: var(--muted); }
.detail-row p { font-family: var(--serif); font-size: 1.35rem; letter-spacing: .08em; margin-top: .25rem; }
.venue-detail { flex: 1; }
.venue-detail address { margin-top: .55rem; color: var(--muted); font-size: .9rem; font-style: normal; letter-spacing: .04em; }
.map-link { display: inline-block; margin-top: .8rem; padding-bottom: .15rem; border-bottom: 1px solid currentColor; color: var(--ink); font-size: .82rem; letter-spacing: .05em; }
.detail-note { margin-left: auto; align-self: flex-start; padding-top: .45rem; color: var(--muted); letter-spacing: .12em; font-size: .75rem; white-space: nowrap; }
.venue-map { grid-column: 1 / -1; margin-top: .5rem; border: 1px solid #cebea4; background: var(--white); overflow: hidden; }
.venue-map iframe { display: block; width: 100%; height: 22rem; border: 0; filter: sepia(12%) saturate(75%) contrast(94%); }
.venue-map-caption { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 1.5rem 1.7rem; }
.venue-map-label { color: var(--gold); font-family: var(--english); font-size: .72rem; letter-spacing: .2em; }
.venue-map-caption h3 { margin-top: .25rem; font-family: var(--serif); font-size: 1.25rem; font-weight: 400; letter-spacing: .08em; }
.venue-map-caption div > p:last-child { margin-top: .35rem; color: var(--muted); font-size: .875rem; line-height: 1.7; }
.venue-map-button { min-width: 8.5rem; flex-shrink: 0; }
.rsvp { display: grid; grid-template-columns: .9fr 1.3fr; gap: 5rem; align-items: start; }
.rsvp-intro { padding-top: 2rem; }
.demo-note { margin-top: 2.5rem; font-size: .875rem; color: var(--muted); padding-left: 1rem; border-left: 1px solid var(--gold); line-height: 1.8; }
.rsvp-card { border: 1px solid var(--line); background: var(--white); padding: 2.4rem; min-width: 0; box-shadow: 0 10px 40px rgb(68 45 25 / 3%); }
.form-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.8rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.form-title h3 { font-family: var(--serif); font-size: 1.35rem; font-weight: 400; letter-spacing: .1em; }
.form-title span { color: var(--gold); font-size: .75rem; letter-spacing: .2em; }
.field { display: flex; flex-direction: column; gap: .55rem; margin-bottom: 1.4rem; min-width: 0; }
.field label, legend { font-size: .875rem; color: var(--ink); }
.field label small, .required { color: var(--muted); font-size: .75rem; font-weight: 400; margin-left: .35rem; }
input[type="text"], select, textarea { width: 100%; padding: .75rem .85rem; background: transparent; border: 1px solid #cbbba3; border-radius: 0; color: var(--ink); font-size: 1rem; line-height: 1.6; min-height: 3rem; }
textarea { resize: vertical; min-height: 6.5rem; }
::placeholder { color: #897967; opacity: 1; }
fieldset { border: none; margin: 0 0 1.4rem; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: .6rem; }
.attendance-options { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.choice { position: relative; display: flex; align-items: center; gap: .6rem; border: 1px solid #cbbba3; padding: .8rem; cursor: pointer; font-size: .875rem; min-height: 3.3rem; }
.choice:has(input:checked) { border-color: var(--gold); background: #f1e7d5; }
input[type="radio"] { accent-color: var(--gold); width: 1rem; height: 1rem; margin: 0; flex-shrink: 0; }
.attendance-details { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.notes-field { margin-bottom: 1.5rem; }
.submit-button, .rsvp-result .button { width: 100%; }
.form-error { color: #9b3d29; font-size: .875rem; margin-bottom: 1rem; }
.rsvp-result h3 { font-family: var(--serif); font-weight: 400; font-size: 1.75rem; line-height: 1.7; margin: .9rem 0 .5rem; }
.result-description { color: var(--muted); font-size: 1rem; }
.reply-summary { margin: 1.7rem 0; }
.reply-summary > div { display: grid; grid-template-columns: 6rem 1fr; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.reply-summary dt { font-size: .875rem; color: var(--muted); }
.reply-summary dd { margin: 0; font-size: 1rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.result-preview-note { color: var(--muted); font-size: .875rem; margin-bottom: 1.5rem; }
.text-button { display: block; margin: .7rem auto 0; padding: .5rem 1rem; background: none; border: 0; color: var(--muted); font-size: .875rem; text-decoration: underline; text-underline-offset: .3rem; }
.site-footer { max-width: 1440px; margin: auto; text-align: center; padding: 4rem 1.5rem 3rem; background: var(--ink); color: var(--white); }
.footer-script { font-family: var(--english); font-size: clamp(2.6rem, 6vw, 4.5rem); font-style: italic; font-weight: 400; line-height: 1.4; color: #ddc69b; }
.footer-names { margin-top: 1.2rem; font-family: var(--serif); font-size: 1.125rem; letter-spacing: .15em; }
.footer-names span { color: #ddc69b; font-family: var(--english); font-style: italic; margin: 0 .5rem; }
.footer-note { font-size: .875rem; margin: .9rem 0 2rem; color: #d2c7b8; }
.site-footer a { font-size: .875rem; color: #ddc69b; border-bottom: 1px solid #806e50; padding-bottom: .3rem; }
.mobile-dock { display: none; }
@media (min-width: 1600px) { body { background: #e9e1d3; } .site-header, .hero, .rsvp { background: var(--paper); } }
@media (max-width: 1050px) {
  .section-pad { padding: 5rem 6%; }
  .details, .rsvp { gap: 2.5rem; }
  .hero-content { padding: 3rem 1.5rem 4.5rem; }
  .hero-visual { min-height: 610px; }
  .rsvp-card { padding: 1.7rem; }
}
@media (max-width: 740px) {
  html { scroll-padding-top: 4.5rem; }
  .site-header { min-height: 4.5rem; padding: .7rem 6%; gap: 1rem; }
  .monogram { font-size: .95rem; letter-spacing: .1em; }
  .site-header nav { gap: 1.25rem; font-size: .875rem; }
  .site-header .desktop-link { display: none; }
  .hero { display: block; min-height: max(670px, calc(100svh - 4.5rem)); background: #ede6d6; isolation: isolate; }
  .hero-visual { position: absolute; z-index: -2; inset: 0; min-height: 0; }
  .hero-visual img { object-position: 62% 60%; }
  .hero-visual::after { background: linear-gradient(180deg, rgb(255 252 245 / 96%) 0%, rgb(255 252 245 / 89%) 37%, rgb(250 244 229 / 74%) 67%, rgb(250 244 229 / 46%) 100%); }
  .hero-content { min-height: inherit; padding: 2.8rem 1.25rem 4rem; justify-content: center; }
  .hero .eyebrow { font-size: .75rem; }
  h1 { font-size: 2.6rem; margin-top: 1.6rem; letter-spacing: .2em; line-height: 1.5; }
  h1 span { margin-right: -.2em; }
  h1 i { font-size: 2rem; line-height: 1.4; }
  .hero-rule { margin: 1.25rem auto; }
  .hero-verse { font-size: 1rem; }
  .hero-date { margin: 1.25rem 0 1.4rem; }
  .hero-note { font-size: .875rem; color: #594b3e; }
  .section-pad { padding: 4.5rem 7%; }
  h2 { font-size: 1.9rem; line-height: 1.7; letter-spacing: .05em; }
  .invitation h2 { margin-bottom: 1.8rem; }
  .couple-illustration { width: min(31rem, 100%); margin-bottom: 2.4rem; }
  .couple-illustration { box-shadow: 0 .8rem 2.2rem rgb(86 62 40 / 6%); }
  .letter { line-height: 2; }
  .letter .signature { font-size: 1.05rem; }
  .mobile-break { display: initial; }
  .details, .rsvp { grid-template-columns: 1fr; gap: 2rem; }
  .details-intro, .rsvp-intro { text-align: center; padding-top: 0; }
  .details-intro .section-copy { margin-top: 1rem; }
  .details-list { padding-top: 0; }
  .detail-row { padding: 1.5rem 0; gap: 1.2rem; }
  .detail-row p { font-size: 1.25rem; }
  .detail-note { font-size: .75rem; letter-spacing: .08em; }
  .venue-map { margin-top: 0; }
  .venue-map iframe { height: 18rem; }
  .venue-map-caption { align-items: stretch; flex-direction: column; gap: 1rem; padding: 1.25rem; }
  .venue-map-button { width: 100%; }
  .rsvp-intro .section-copy { margin-top: 1rem; }
  .demo-note { border: none; padding: 0; margin: 1.2rem auto 0; }
  .demo-note br { display: none; }
  .rsvp-card { padding: 1.5rem; }
  .choice { padding: .75rem .6rem; gap: .45rem; }
  .site-footer { padding: 3.5rem 1rem 7rem; }
  .footer-script { font-size: 2.9rem; }
  .footer-names { font-size: 1.05rem; }
  .mobile-dock { display: grid; grid-template-columns: 1fr 1fr; position: fixed; z-index: 10; bottom: 0; left: 0; width: 100%; box-shadow: 0 -4px 20px rgb(45 31 18 / 8%); border-top: 1px solid var(--line); background: rgb(255 252 247 / 96%); backdrop-filter: blur(10px); padding: .65rem 1rem calc(.65rem + env(safe-area-inset-bottom)); gap: .65rem; }
  .mobile-dock a { display: flex; justify-content: center; align-items: center; min-height: 2.8rem; font-size: .875rem; border: 1px solid var(--line); }
  .mobile-dock a:last-child { color: var(--white); background: var(--ink); border-color: var(--ink); }
}
@media (max-width: 360px) {
  .site-header nav { gap: .8rem; }
  h1 { font-size: 2.3rem; }
  h2 { font-size: 1.65rem; }
  .section-pad { padding-left: 6%; padding-right: 6%; }
  .rsvp-card { padding: 1.15rem; }
  .detail-note { display: none; }
  .letter .signature { letter-spacing: .04em; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
