:root {
  color-scheme: light;
  --paper: #f4f2ed;
  --ink: #2b302d;
  --muted: #555e57;
  --line: #d4dad3;
  --accent: #46574d;
  --gutter: clamp(24px, 7vw, 108px);
  --serif: "Songti SC", "Noto Serif CJK SC", SimSun, serif;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, p, figure { margin: 0; }
a { color: inherit; }
button { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }

.cover {
  width: min(calc(100% - 2 * var(--gutter)), 560px);
  margin-inline: auto;
}

.cover-photo { display: block; width: 100%; height: auto; }

.preface {
  position: relative;
  padding: clamp(55px, 9vw, 108px) var(--gutter) 0;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0, #e4e6e5 0, transparent 70%);
}

.preface-inner { max-width: 640px; margin-inline: auto; }
.preface-rings { display: block; margin: 24px auto 22px; color: #87979e; stroke-width: .85; }
.preface h2 { font-size: clamp(25px, 3.5vw, 39px); letter-spacing: .12em; }
.preface-message {
  margin-top: 25px;
  color: var(--muted);
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 2.2;
  letter-spacing: .05em;
}
.preface-closing {
  margin-top: 20px;
  color: var(--accent);
  font: 15px/1.8 var(--serif);
  letter-spacing: .12em;
}
.preface-thread {
  display: block;
  width: 1px;
  height: clamp(42px, 6vw, 68px);
  margin: 29px auto 0;
  background: linear-gradient(var(--line), transparent);
}

body[data-boot-page="thanks"] .boot:not(.is-transition) {
  --boot-ink: #f2f1ec;
  --boot-gold: #c8cdc4;
  --boot-soft: rgba(242, 241, 236, 0.68);
  --boot-serif: var(--boot-sans);
  --boot-label: var(--boot-sans);
  background:
    radial-gradient(ellipse at 50% 25%, rgba(147, 166, 148, 0.24), transparent 65%),
    linear-gradient(165deg, #43534b 0%, #2c3833 100%);
}

body[data-boot-page="thanks"] .boot:not(.is-transition)::before { content: none; }

body[data-boot-page="thanks"] .boot.is-done:not(.is-transition) .boot-inner {
  visibility: hidden;
}

body[data-boot-page="thanks"] .boot:not(.is-transition) .boot-disc {
  border-color: rgba(242, 241, 236, 0.28);
  background: #4c5b52;
  box-shadow: none;
}

body[data-boot-page="thanks"] .boot:not(.is-transition) .boot-rule {
  background: rgba(242, 241, 236, 0.28);
  animation: none;
}

.entry-screen {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: clamp(1rem, 4vh, 2rem);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s;
}

.boot.is-ready .entry-screen {
  visibility: visible;
  opacity: 1;
}

.boot.is-ready > .entry-spacer { display: none; }

.entry-logo {
  display: block;
  width: min(68vw, 45vh, 20rem);
  height: auto;
  filter: grayscale(65%);
  opacity: 0.6;
}

.entry-screen .boot-enter {
  width: auto;
  height: auto;
  gap: 0.65rem;
  padding: 1.4rem 1.8rem;
  border: 1px solid rgba(242, 241, 236, 0.28);
}

.entry-title {
  font: 700 1.6rem/1.15 system-ui, sans-serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.entry-subtitle { font-size: 0.95rem; color: var(--boot-soft); }

@media (prefers-reduced-motion: reduce) {
  .entry-screen { transition: none; }
}

.music-btn {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  z-index: 10;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(242, 241, 236, 0.92);
  color: var(--ink);
  cursor: pointer;
}

.music-icon {
  position: relative;
  width: 1rem;
  height: 1rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  background:
    radial-gradient(circle, currentColor 16%, transparent 18%),
    repeating-radial-gradient(circle, transparent 0 2px, rgba(20, 20, 20, 0.4) 2px 3px);
}

.music-btn.is-off .music-icon::after {
  content: "";
  position: absolute;
  inset: 50% -3px auto;
  border-top: 1.5px solid currentColor;
  transform: rotate(-38deg);
}

body.is-booting .invitation,
body.is-booting .music-btn { visibility: hidden; }

h2 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
}

.panel { padding: clamp(38px, 6vw, 86px) var(--gutter); }
.frame { width: min(100%, 1040px); margin-inline: auto; }
.note { background: linear-gradient(var(--paper), transparent 140px); }

.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 19px;
  color: var(--accent);
  font: 500 12px/1.5 "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: .2em;
}

.section-label::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}

.note-photo, .reply-photo { background: #dce0d8; overflow: hidden; }
.note-photo img, .reply-photo img {
  display: block;
  width: 100%;
}

.note-photo img {
  height: 100%;
  object-fit: cover;
}

.note-photo { aspect-ratio: 2 / 1; }
.note-photo img { object-position: center 37%; }

.note-copy {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px 26px;
  padding-top: 21px;
}


.note-copy h2, .reply-copy h2 {
  font-size: clamp(31px, 4.6vw, 60px);
  letter-spacing: .04em;
}

.message {
  color: var(--muted);
  font-size: clamp(15px, 1.65vw, 18px);
  line-height: 1.85;
}

.signature {
  margin-top: 16px;
  color: var(--accent);
  font-family: var(--serif);
  white-space: nowrap;
}

.reception-mark {
  width: min(calc(100% - 2 * var(--gutter)), 25rem);
  max-width: 112svh;
  margin-inline: auto;
  text-align: center;
}

.reception-mark-stage {
  position: relative;
  aspect-ratio: 791 / 580;
  overflow: hidden;
}

.reception-mark-emblem {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72%;
  height: auto;
  transform: translate(-50%, -50%);
}

.reception-mark-stage .logo-anim {
  position: absolute;
  inset: 0;
  width: 100%;
  aspect-ratio: auto;
}

.reception-mark-stage .logo-anim__stage { background: transparent; }
.reception-mark-stage .logo-anim__sprite { width: 32%; }
.reception-mark-stage .logo-anim__sprite--logo { width: 56.25%; }

.reception-mark figcaption {
  margin-top: 14px;
  color: var(--accent);
  font: 500 15px/1.6 var(--serif);
  letter-spacing: .24em;
}

.calendar-photo {
  position: relative;
  width: min(calc(100% - 2 * var(--gutter)), 560px);
  margin-inline: auto;
  container-type: inline-size;
  background: #dbe3e7;
}

.calendar-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.photo-calendar {
  --calendar-unit: min(.86vw, 5.6px);
  position: absolute;
  inset: 8% 11% auto;
  padding: calc(3 * var(--calendar-unit)) calc(3 * var(--calendar-unit)) calc(2.5 * var(--calendar-unit));
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 4px;
  background: linear-gradient(155deg, rgba(252, 250, 246, .6), rgba(244, 242, 237, .46));
  box-shadow: 0 12px 28px rgba(27, 46, 56, .13);
  backdrop-filter: blur(2px);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

@supports (width: 1cqw) {
  .photo-calendar { --calendar-unit: 1cqw; }
}

.photo-calendar table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  text-align: center;
  font: 400 clamp(11px, calc(4.1 * var(--calendar-unit)), 19px)/1 system-ui, sans-serif;
  font-variant-numeric: inherit;
}

.photo-calendar caption {
  padding-bottom: calc(1.6 * var(--calendar-unit));
  color: var(--accent);
  font: 400 clamp(16px, calc(6.1 * var(--calendar-unit)), 29px)/1.2 var(--serif);
  letter-spacing: .07em;
}

.photo-calendar th, .photo-calendar td {
  height: calc(6.2 * var(--calendar-unit));
  padding: 0;
}

.photo-calendar th {
  border-bottom: 1px solid rgba(70, 87, 77, .28);
  color: var(--accent);
  font-weight: 500;
}

.calendar-date {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: calc(8.8 * var(--calendar-unit));
  vertical-align: middle;
}

.calendar-date svg {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  fill: none;
  stroke: #803a3e;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.venue {
  display: grid;
  grid-template-columns: .87fr 1.13fr;
  background: #fcfaf6;
  border: 1px solid var(--line);
}

.venue-copy { padding: clamp(22px, 4vw, 46px); }

.event-time {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 17px;
  padding-bottom: 21px;
  border-bottom: 1px solid var(--line);
}

.event-time time {
  font: 500 clamp(45px, 6.2vw, 78px)/.93 system-ui, sans-serif;
  letter-spacing: -.085em;
}

.event-time time span { color: var(--accent); }

.event-time p, .venue-address {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.venue-name { margin-top: 21px; font: clamp(27px, 3.6vw, 46px)/1.12 var(--serif); }
.venue-name span { margin-left: 11px; color: var(--accent); font: 13px/1.4 sans-serif; white-space: nowrap; }
.venue-address { margin-top: 10px; }

.map { position: relative; display: grid; background: #e2e7ea; }
.map-link { position: relative; display: block; min-height: 250px; }
.map-link img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.map-point {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-100% - 8px));
  padding: 5px 9px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
}
.map-point::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: var(--accent);
}
.map-credit {
  position: absolute;
  bottom: 0;
  right: 0;
  padding: 2px 5px;
  background: #fcfaf6;
  color: var(--ink);
  font-size: 10px;
}

.reply {
  display: grid;
  align-items: center;
}

.reply-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: clamp(30px, 7vw, 96px);
}

.reply-photo img { height: auto; }
.reply-copy .message { margin-top: 15px; }

.reply-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 27rem;
  margin-top: 24px;
}

.reply-link {
  display: flex;
  flex: 1 1 9rem;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 50px;
  padding: 10px 14px;
  border: 1px solid #6f8179;
  border-radius: 4px;
  color: #304139;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.reply-link:hover, .reply-link:active { background: #dbe4df; }



.reply-link:focus-visible { outline-color: #36483f; }
.reply-link span { font-size: 1rem; line-height: 1; }

.invitation {
  background: linear-gradient(var(--paper) 42%, #e9ede5);
}

@media (min-width: 761px) {
  .cover { max-width: calc(100svh * 4 / 9); }
}

@media (max-width: 760px) {
  .cover { width: 100%; }
  .panel { padding-block: clamp(28px, 7vw, 48px); }
  .note-photo { aspect-ratio: 1.23; }
  .note-copy { flex-wrap: wrap; padding-top: 17px; }
  .note-copy .message { flex-basis: 100%; }
  .venue, .reply-grid { grid-template-columns: minmax(0, 1fr); }
  .map-link { aspect-ratio: 1.48; min-height: 0; }
  .venue-copy { padding: 19px 17px 21px; }
  .event-time { padding-bottom: 16px; }
  .venue-name { margin-top: 16px; }
  .reply { align-items: stretch; padding-bottom: 44px; }
  .reply-grid { gap: 22px; }
}


.entry-title { letter-spacing: .12em; }
.music-btn.is-off { background: #f4f2ed; color: #555e57; }
.music-btn:not(.is-off) { background: var(--accent); color: #fff; }
.details { scroll-margin-top: 12px; }
.venue-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: transparent;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}

.action-primary { background: var(--accent); color: #fff; }
.copy-status { margin-top: 8px; color: var(--muted); font-size: 14px; }
.copy-status:empty { margin-top: 0; }

.reply-card {
  margin-top: 16px;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid var(--line);
  background: #fcfaf6;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.8;
}

.reply-card p + p { margin-top: 8px; }
.reply-example { color: var(--muted); }
.reply-link {
  flex: 0 1 auto;
  min-height: 48px;
  padding-inline: 0;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}
