:root {
  --bg: #eef3ec;
  --card: #fffcf8;
  --sage: #6f9179;
  --sage-deep: #4f725c;
  --blush: #e7b7ae;
  --ink: #111;
  --muted: #8b948c;
  --line: #e3ebe2;
  --serif: "Noto Serif SC", "Songti SC", serif;
  --sans: "Noto Sans SC", "PingFang SC", sans-serif;
  --latin: "Cormorant Garamond", "Times New Roman", serif;
  --script: "Ma Shan Zheng", cursive;
  --invite: "ZCOOL XiaoWei", "Noto Serif SC", serif;
  --mark: #b70000;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100svh;
  background:
    radial-gradient(circle at 12% 0, rgba(231, 183, 174, 0.35), transparent 28%),
    radial-gradient(circle at 90% 12%, rgba(176, 204, 176, 0.45), transparent 26%),
    linear-gradient(180deg, #f7faf6, var(--bg));
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
}

button, input { font-family: inherit; }

.page {
  width: min(100%, 420px);
  margin: 0 auto;
  padding: 0 0 calc(36px + env(safe-area-inset-bottom));
}

.hello, .verse, .where, .end, .cal, .wait, .arrived, .cal-when {
  text-align: center;
}

.hello, .verse, .end, .wait, .cal-when {
  padding-left: 22px;
  padding-right: 22px;
}

.cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1024 / 1717;
  overflow: hidden;
  background: #ddd6cf;
}

.cover-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.kicker {
  position: absolute;
  top: 2%;
  height: 14px;
  width: auto;
  z-index: 2;
}

.kicker.left { left: 4%; }
.kicker.right { right: 14%; }

.cover-date,
.cover-en {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 3;
  margin: 0;
  text-align: center;
  color: #fff;
  font-family: var(--script);
  font-size: clamp(26px, 7.2vw, 32px);
  line-height: 1;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.28);
}

.cover-date { top: 46.5%; letter-spacing: 0.06em; }
.cover-en { top: 72%; font-size: clamp(22px, 6vw, 28px); }

.flourish {
  position: absolute;
  left: -34%;
  top: 54.5%;
  width: 163%;
  height: auto;
  z-index: 2;
  pointer-events: none;
}

.cover-title {
  position: absolute;
  left: 11%;
  top: 54.2%;
  width: 76%;
  height: auto;
  z-index: 3;
}

.cover-names {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 79.5%;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: 0;
  color: #fff;
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.14em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.cover-names span:first-child { text-align: right; }
.cover-names span:last-child { text-align: left; }

.cover-names img {
  width: 30px;
  height: auto;
  margin: 0 10px;
}

.rule {
  position: absolute;
  left: 11%;
  top: 86.5%;
  width: 78%;
  height: auto;
  z-index: 3;
}

.record {
  position: relative;
  width: 122px;
  height: 121px;
  margin: 36px auto 6px;
}

.record-disc {
  width: 122px;
  height: 121px;
  display: block;
  animation: spin 4s linear infinite;
}

.record-photo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 85px;
  height: 85px;
  margin: -42.5px 0 0 -42.5px;
  border-radius: 50%;
  object-fit: cover;
}

@keyframes spin {
  to { transform: rotate(1turn); }
}

.sprig { width: 122px; height: auto; display: block; margin: 8px auto 18px; }
.sprig.small { width: 96px; margin-bottom: 8px; }

.title-art {
  display: block;
  width: min(250px, 72%);
  height: auto;
  margin: 22px auto 2px;
}

.label {
  margin: 0;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  font-size: 12px;
  color: #111;
}

.dear {
  margin: 22px 0 0;
  font-family: var(--invite);
  font-size: 18px;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  color: var(--muted);
}

.hello h1 {
  margin: 6px 0 0;
  font-family: var(--invite);
  font-weight: 400;
  font-size: clamp(32px, 8.5vw, 42px);
  letter-spacing: 0.12em;
  color: #111;
  line-height: 1.2;
}

.note {
  margin: 12px auto 0;
  max-width: 16em;
  font-family: var(--invite);
  line-height: 1.85;
  letter-spacing: 0.06em;
  color: var(--ink);
  font-size: 17px;
  white-space: pre-line;
}

.seat[hidden] { display: none; }

.seat {
  display: inline-block;
  margin: 16px 0 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: #f4e7e3;
  color: #8d5f58;
  letter-spacing: 0.16em;
  font-size: 13px;
}

.couple {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.and, .sign {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.and {
  margin: 0;
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: 0.16em;
  color: var(--ink);
}

.join {
  width: 34px;
  height: auto;
  display: block;
}

.join.tiny { width: 18px; }

.sign {
  margin: 0;
  gap: 6px;
  letter-spacing: 0.12em;
}

.date {
  margin: 10px 0 0;
  font-family: var(--latin);
  font-size: 22px;
  letter-spacing: 0.22em;
  color: #111;
}

.when {
  margin: 6px 0 0;
  color: var(--muted);
  letter-spacing: 0.18em;
  font-size: 13px;
}

.verse {
  margin-top: 28px;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 2.15;
  letter-spacing: 0.14em;
}

.verse p { margin: 0; }
.verse:empty { display: none; }

.wait {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 52px;
  text-align: center;
}

.wait strong {
  display: block;
  font-family: var(--latin);
  font-weight: 500;
  font-size: 32px;
  color: rgb(183, 0, 0);
  font-variant-numeric: tabular-nums;
}

.wait span {
  font-size: 12px;
  letter-spacing: 0.16em;
  color: rgb(183, 0, 0);
}

.arrived {
  margin: 8px 0 0;
  text-align: center;
  letter-spacing: 0.24em;
  color: rgb(183, 0, 0);
}

.count-art {
  display: block;
  width: min(260px, 78%);
  height: auto;
  margin: 16px auto 0;
}

.cal {
  margin: 40px auto 0;
  width: min(300px, calc(100% - 44px));
  color: var(--mark);
}

.cal-md {
  margin: 0;
  font-family: var(--latin);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.cal-md span {
  font-size: 16px;
  margin: 0 2px;
  font-weight: 400;
}

.cal-week,
.cal-grid ul {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.cal-week {
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
}

.cal-grid {
  position: relative;
  margin-top: 4px;
}

.cal-year {
  position: absolute;
  left: 50%;
  top: 16%;
  transform: translateX(-50%);
  font-family: var(--latin);
  font-size: 76px;
  font-weight: 600;
  line-height: 1;
  color: var(--mark);
  opacity: 0.12;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

.cal-grid ul {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cal-grid li {
  position: relative;
  height: 28px;
  margin-top: 6px;
  color: #666;
  font-family: var(--latin);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.cal-grid li span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.cal-grid li.on span {
  color: #fff;
  z-index: 1;
}

.cal-grid li.on::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--mark);
  transform: translate(-50%, -50%);
  animation: pulse 0.8s ease infinite alternate;
}

@keyframes pulse {
  to { transform: translate(-50%, -50%) scale(1.18); }
}

.cal-when {
  margin: 18px 0 0;
  color: var(--ink);
  letter-spacing: 0.08em;
  font-size: 14px;
}

.where {
  margin-top: 48px;
  padding: 0 22px;
}

.where .label {
  font-family: var(--latin);
  font-style: italic;
  font-size: 20px;
  letter-spacing: 0.08em;
  text-indent: 0;
  color: #5c564f;
}

.nav {
  display: block;
  width: min(100%, 280px);
  margin: 14px auto 0;
  color: inherit;
  text-decoration: none;
}

.nav-map {
  position: relative;
  display: block;
}

.nav img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.nav-go {
  position: absolute;
  right: -4px;
  top: 50%;
  width: 42px;
  height: 42px;
  margin-top: -21px;
  border-radius: 50%;
  background: #2fbe4e;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.nav-go::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 13px;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent #fff;
}

.where h2 {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.06em;
}

.where p {
  margin: 8px 0 0;
  color: var(--muted);
  letter-spacing: 0.06em;
  font-size: 13px;
  line-height: 1.7;
}

.end {
  margin-top: 28px;
  color: var(--muted);
  letter-spacing: 0.18em;
  font-size: 13px;
}

.end p { margin: 0; }

@media (min-width: 520px) {
  body { padding: 32px 0; }
  .page {
    overflow: hidden;
    background: rgba(255, 252, 248, 0.55);
    border-radius: 28px;
    box-shadow: 0 20px 50px rgba(90, 110, 90, 0.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .record-disc,
  .cal-grid li.on::before { animation: none; }
}
