:root {
  color-scheme: light;
  --wine: #720c2d;
  --paper: #fff8ef;
  --gold: #cda273;
  --ink: #422d29;
  --accent: #77574b;
  --official-blue: #005ca9;
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", "Microsoft JhengHei", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --display: Georgia, "Times New Roman", var(--serif);
  font-family: var(--sans);
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--wine);
  overflow-wrap: anywhere;
  color: var(--ink);
}

a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--official-blue); outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
.cover, .letter { margin-inline: auto; max-width: 1120px; }
.cover { margin-inline: max(0px, calc((100% - 1120px) / 2)); }

.skip-link {
  position: fixed;
  z-index: 2;
  top: 0;
  left: .75rem;
  translate: 0 -110%;
  background: var(--paper);
  padding: .7rem 1rem;
}
.skip-link:focus { translate: 0 0; }

.masthead {
  background: var(--paper);
  border-bottom: 1px solid var(--gold);
}
.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1120px;
  margin-inline: auto;
  min-height: 4rem;
  padding: .6rem clamp(1rem, 4vw, 2.25rem);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--official-blue);
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.05rem, 2.8vw, 1.28rem);
  text-decoration: none;
}
.wordmark img {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
}
.wordmark b { font-family: var(--display); font-size: 1.12em; }
.masthead-action {
  padding-block: .65rem;
  color: var(--wine);
  font-size: .93rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.masthead-action span { margin-left: .2rem; }
.masthead-action:hover { text-decoration: underline; }

.cover {
  position: relative;
  background: var(--paper);
  border-bottom: 1px solid var(--gold);
  animation: arrive .75s ease-out both;
}
@keyframes arrive {
  from { opacity: .65; }
  to { opacity: 1; }
}
.cover-art img { width: 100%; height: auto; object-fit: contain; }
.cover-text {
  padding: clamp(1.7rem, 6vw, 4.4rem) clamp(1.1rem, 7vw, 5rem) 1.7rem;
  color: var(--wine);
}
.cover-text h1, .cover-text p { margin: 0; }
.cover-text h1 {
  font: 700 clamp(2.35rem, 8vw, 5.25rem)/1.2 var(--serif);
  letter-spacing: .055em;
}
.cover-text p {
  margin-top: .6rem;
  font: 600 clamp(1.1rem, 4vw, 2rem)/1.6 var(--serif);
  letter-spacing: .14em;
}
.cover-text time {
  display: inline-block;
  margin-top: 1rem;
  font: 500 clamp(1.35rem, 4vw, 2.25rem)/1 var(--display);
  letter-spacing: .07em;
  font-variant-numeric: lining-nums tabular-nums;
}
.printed-cover .cover-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
  clip-path: inset(50%);
  white-space: nowrap;
}
.artwork-crop .cover-art { aspect-ratio: 1672 / 460; overflow: hidden; }
.artwork-crop .cover-art img { height: 100%; object-fit: cover; object-position: bottom; }
.cover:not(.printed-cover, .artwork-crop) .cover-art img {
  max-height: 65vh;
  object-fit: contain;
  background: color-mix(in srgb, var(--gold) 21%, var(--paper));
}

.letter {
  position: relative;
  background: var(--paper);
  padding-inline: clamp(1.1rem, 7vw, 6rem);
}
.letter-section {
  padding-block: clamp(1.9rem, 5vw, 4rem);
}
.letter h2, .letter h3 {
  color: var(--wine);
  font-family: var(--serif);
  margin: 0;
}
.letter h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  letter-spacing: .085em;
}
.letter h3 {
  font-size: clamp(1.2rem, 2.8vw, 1.45rem);
  letter-spacing: .07em;
}
.letter p { margin: 0; line-height: 1.75; }
.details {
  display: grid;
  gap: clamp(1.65rem, 4vw, 3rem) clamp(1.5rem, 7vw, 6rem);
  align-items: center;
}
.note .invitation-note {
  margin-top: .85rem;
  max-width: 38ch;
  line-height: 1.9;
  white-space: pre-line;
}
.event-stamp {
  border-inline-start: 2px solid var(--gold);
  padding-inline-start: clamp(1rem, 3vw, 1.6rem);
}
.stamp-date {
  color: var(--wine);
  display: flex;
  flex-wrap: wrap;
  column-gap: .8rem;
  row-gap: .5rem;
  align-items: baseline;
  margin-bottom: .35rem;
}
.stamp-date time {
  font-family: var(--display);
  font-size: clamp(2rem, 7vw, 3.2rem);
  line-height: 1.05;
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
}
.stamp-date span { font-size: .94rem; font-weight: 700; }
.event-times { font-variant-numeric: tabular-nums; }
.event-stamp .venue { margin-top: .35rem; font-weight: 700; }
.preserve-lines { white-space: pre-line; }
.event-actions, .contact-links {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1rem;
  align-items: center;
}
.event-actions { margin-top: .55rem; }
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--wine);
  cursor: pointer;
  font-size: .92rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .21em;
}
.text-link:hover { text-decoration-thickness: 2px; }
.event-photo { margin: 0 auto 2rem; }
.event-photo img {
  margin-inline: auto;
  width: 100%;
  max-height: 38rem;
  object-fit: contain;
}
.program, .registration { border-block-start: 1px solid var(--gold); }
.schedule {
  list-style: none;
  display: grid;
  margin: 1.1rem 0 0;
  padding: 0;
}
.schedule li {
  display: grid;
  grid-template-columns: clamp(4rem, 16vw, 6rem) minmax(0, 1fr);
  column-gap: 1rem;
  align-items: baseline;
  padding: .7rem 0 .8rem;
  border-top: 1px solid color-mix(in srgb, var(--gold) 55%, var(--paper));
  line-height: 1.5;
}
.schedule li:last-child { border-bottom: 1px solid color-mix(in srgb, var(--gold) 55%, var(--paper)); }
.schedule time {
  color: var(--wine);
  font-family: var(--display);
  font-variant-numeric: lining-nums tabular-nums;
  font-size: 1.37rem;
}
.schedule span { font-weight: 700; }
.schedule small { display: block; color: var(--accent); margin-top: .24rem; font-size: .9rem; }

.registration { display: grid; gap: clamp(1.5rem, 4vw, 3rem); }
.registration:not(.with-details) > div:last-child { display: none; }
.registration h2 { margin-bottom: .6rem; }
.registration-pending {
  display: inline-block;
  color: var(--wine);
  border-bottom: 1px dashed var(--gold);
  padding-bottom: .3rem;
  font-weight: 700;
}
.rsvp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: .45rem;
  min-height: 48px;
  min-width: 9rem;
  padding: .55rem 1.2rem;
  background: var(--wine);
  color: #fff8ef;
  box-shadow: 3px 3px 0 var(--gold);
  text-decoration: none;
  font-weight: 700;
}
.rsvp:hover { box-shadow: 2px 2px 0 var(--gold); transform: translate(1px, 1px); }
.information-list { margin: .6rem 0; }
.information-list div {
  display: grid;
  grid-template-columns: minmax(3.35rem, max-content) minmax(0, 1fr);
  gap: .45rem .8rem;
  align-items: baseline;
  margin-top: .45rem;
}
.information-list dt { color: var(--accent); }
.information-list dd { margin: 0; }
.account-value { display: flex; flex-wrap: wrap; gap: .15rem .8rem; align-items: baseline; }
.account-value span { user-select: all; font-variant-numeric: tabular-nums; }
.copy-status { font-size: .92rem; color: var(--wine); }
.copy-status:empty { display: none; }
.copy-field { position: fixed; inset: 0 auto auto 0; opacity: 0; }
.payment:not([hidden]) + .contact { margin-top: 1.65rem; }
.contact h3 { margin-bottom: .4rem; }
.footer {
  max-width: 1120px;
  margin-inline: auto;
  color: var(--paper);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .5rem 1rem;
  padding: 1.3rem clamp(1.1rem, 7vw, 6rem);
  font-size: .88rem;
}
.footer a { text-underline-offset: .24em; }
.footer a:focus-visible { outline-color: var(--paper); }
.is-preview .cover { animation: none; }
.page-state { max-width: 1120px; margin: 0 auto; padding: clamp(2rem, 8vw, 5rem); background: var(--paper); color: var(--wine); min-height: 16rem; text-align: center; line-height: 1.8; }

@media (min-width: 700px) {
  .details { grid-template-columns: 1fr .93fr; }
  .registration.with-details { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .cover { animation: none; }
}

