/* Visual finish for the shared invitation; photo framing and motion stay in motion.css. */
:root {
  --serif: Georgia, "Songti SC", "STSong", "SimSun", serif;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.variant-mountain {
  --ink: #293f34;
  --forest: #304e3f;
  --paper: #f8f6f0;
  --soft: #e9eee6;
  --accent: #86654c;
  --line: #304e3f29;
  --form-paper: #fffdf8;
  --count-ink: #21382d;
}

/* Match the reference invitation's focused H5 canvas on larger screens. */
html, body { touch-action: pan-x pan-y; }
html {
  background: #242726;
}
body {
  min-height: 100vh;
  background: #242726;
}
#app {
  width: min(100%, 460px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: clip;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgb(255 255 255 / .06), 0 18px 70px rgb(0 0 0 / .24);
}
#app { background: var(--paper); }
#app ::selection { color: var(--paper); background: var(--forest); }
.section { padding: 112px max(24px, calc((100vw - 1140px) / 2)); }

/* The desktop preview is still a phone-shaped H5. Keep its rhythm based on
   the canvas width instead of the surrounding browser viewport. */
#app .section { padding-left: 24px; padding-right: 24px; }
#app .cover-copy { width: calc(100% - 48px); max-width: none; }
#app .manifesto,
#app .chapter,
#app .date,
#app .place,
#app .reply { grid-template-columns: minmax(0, 1fr); }
#app .manifesto { gap: 32px; }
#app .number { display: none; }
#app .manifesto-image { width: 100%; margin-top: 0; }
#app .chapter { gap: 26px; padding-block: 32px; }
#app .chapter:nth-child(even) .chapter-media { order: 0; }
#app .chapter-media { aspect-ratio: 3 / 2; }
#app .date { gap: 36px; }
#app .place { gap: 0; padding: 0 0 72px; }
#app .place-photo { width: 100%; min-height: 0; aspect-ratio: 16 / 11; }
#app .place-copy.section { padding: 56px 24px 0; }
#app .reply { gap: 30px; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--accent); font-size: 10px; line-height: 1.6; }
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: .6; }
.micro, .eyebrow, .poster > span, .cover-date, .reply-card-heading small { letter-spacing: .16em !important; }
.manifesto h2, .section-title h2, .date h2, .reply h2 { font-family: var(--serif); font-size: 44px; line-height: 1.48; }
.manifesto h2 em, .reply h2 em { color: var(--accent); }
.manifesto-copy > p, .section-title > p, .chapter p, .date-copy > p { margin-top: 24px; font-size: 14px; line-height: 2; opacity: .78; }

.music-player { position: fixed; z-index: 45; right: max(16px, calc((100vw - 460px) / 2 + 14px)); top: 16px; bottom: auto; display: block; padding: 0; color: #fff; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.music-toggle { width: 40px; height: 40px; flex-basis: 40px; color: #fff; background: rgb(255 255 255 / .18); border: 1px solid rgb(255 255 255 / .7); border-radius: 50%; box-shadow: 0 5px 15px rgb(11 29 22 / .18), inset 0 1px 0 rgb(255 255 255 / .42); backdrop-filter: blur(8px) saturate(115%); -webkit-backdrop-filter: blur(8px) saturate(115%); }
.music-toggle svg { width: 22px; height: 22px; filter: drop-shadow(0 1px 1px rgb(10 30 23 / .45)); }
.music-toggle .play-icon { display: none; }
.music-toggle .pause-icon { display: block; }
.music-toggle[data-state="playing"] .play-icon { display: block; animation: music-icon-spin 1.8s linear infinite; }
.music-toggle[data-state="playing"] .pause-icon { display: none; }
.music-toggle[data-state="paused"] { color: #fff; background: rgb(255 255 255 / .18); }
.music-toggle[data-state="loading"] .play-icon { display: block; opacity: .7; }
.music-toggle[data-state="loading"] .pause-icon { display: none; }
.music-toggle[data-state="error"] { color: #fff; background: rgb(255 255 255 / .18); }
@keyframes music-icon-spin { to { transform: rotate(360deg); } }

/* A photographic cover with the detail of a printed invitation. */
.cover-overlay { background: linear-gradient(180deg, #14291e08 35%, #14291e3d 60%, #14291ed4 100%); }
.cover-copy { padding-bottom: 82px; }
.cover-copy .micro { font-size: 10px; opacity: .9; }
.cover-copy .heart { display: grid; place-items: center; width: 44px; height: 44px; margin: 20px auto; border: 1px solid #ffffff66; border-radius: 50%; font-size: 23px; }
.cover h1 { font-family: var(--serif); font-size: 50px; line-height: 1.4; }
.cover h1 i { display: inline-block; padding: 0 5px; font-size: .85em; font-style: italic; }
.cover-copy p { margin: 18px 0 28px; font-size: 13px; color: #fffffff0; }
.cover-copy button { min-height: 50px; min-width: 170px; border: 1px solid #ffffff80; border-radius: 30px; background: #fbf6ec; color: #304536; font-size: 13px; box-shadow: 0 5px 22px #071a181f; }
.cover-date { left: 30px; bottom: 30px; font-size: 11px; }
.hero { min-height: 88svh; }
.hero.section { padding-top: 96px; padding-bottom: 72px; }
.hero h2 { font-family: var(--serif); font-size: 80px; line-height: 1.25; }
.hero h2 em { color: #e8cfb4; }
.hero p { font-size: 14px; }
.hero-next { gap: 14px; margin-top: 28px; padding: 0; text-decoration: none; }
.hero-next svg { width: 42px; height: 42px; padding: 11px; border: 1px solid #ffffff70; border-radius: 50%; }
.hero-next span { font-size: 11px; opacity: .85; }

/* Let the hero photo remain continuous beneath the copy. The readability
   treatment belongs to the full-width image vignette and a soft local glow,
   rather than a rectangular glass panel. */
.variant-mountain .hero::after {
  background: linear-gradient(180deg, rgb(10 28 22 / .04) 34%, rgb(10 28 22 / .12) 52%, rgb(10 28 22 / .58) 76%, rgb(10 28 22 / .86) 100%);
}
.variant-mountain .hero-copy {
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  text-shadow: 0 1px 10px rgb(8 22 17 / .42);
}
.variant-mountain .hero-copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -30px -42px -22px -44px;
  pointer-events: none;
  background: radial-gradient(ellipse at 52% 58%, rgb(8 22 17 / .28) 0%, rgb(8 22 17 / .14) 46%, transparent 78%);
  filter: blur(12px);
  opacity: .8;
}

/* Quiet backgrounds and consistent spacing connect the story and album. */
.variant-mountain .manifesto { background: linear-gradient(180deg, #f4f7f5 0%, #eef3ef 100%); }
.variant-mountain .chapters { background: linear-gradient(180deg, #e1eceb 0%, #d4e3e0 100%); }
.variant-mountain .album { background: linear-gradient(180deg, #fbfaf7 0%, #f5f3ed 100%); }
.variant-mountain .date { background: linear-gradient(135deg, #fbfaf7 0%, #eef3ef 100%); }
.variant-mountain .reply { background: linear-gradient(180deg, #f0dfdf 0%, #e6d0d2 100%); }

/* A nearly invisible paper grain gives the reading sections the calm texture
   of a printed invitation. It stays behind content and never covers photos or
   form controls, so it adds depth without introducing another decoration. */
.variant-mountain :is(.manifesto, .chapters, .album, .date, .reply) {
  position: relative;
  isolation: isolate;
}
.variant-mountain :is(.manifesto, .chapters, .album, .date, .reply)::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  opacity: .022;
  background-image:
    radial-gradient(circle at 17% 23%, rgb(41 63 52 / .65) 0 .45px, transparent .6px),
    radial-gradient(circle at 71% 64%, rgb(134 101 76 / .55) 0 .4px, transparent .55px);
  background-size: 19px 23px, 31px 29px;
}
.variant-mountain :is(.manifesto, .chapters, .album, .date, .reply) > * {
  position: relative;
  z-index: 1;
}
.manifesto { gap: 44px; }
.number { color: var(--accent); align-self: start; padding-top: 6px; }
.manifesto-image { box-shadow: 12px 12px 0 color-mix(in srgb, var(--forest) 7%, transparent); }
.chapter-list { max-width: 1060px; margin-top: 56px; }
.chapter-list { position: relative; }
.chapter { position: relative; z-index: 1; gap: 72px; padding: 40px 0; border-color: var(--line); transition: border-color 500ms ease, transform 500ms ease; }
.chapter h3 { margin: 14px 0 16px; font-family: var(--serif); font-size: 31px; }
.chapter time { display: inline-block; color: var(--accent); font-size: 13px; }
.chapter p { max-width: 330px; margin-top: 16px; }
.chapter-media { border-radius: 3px; }
.chapter.is-active { border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); transform: translateY(-2px); }
.chapter.is-active h3 { color: var(--forest); }
.chapter.is-active time { text-shadow: 0 0 14px color-mix(in srgb, var(--accent) 38%, transparent); }
.album-grid { gap: 24px; margin-top: 56px; }
.photo { box-shadow: 0 8px 26px #1830250b; }
.photo.p1 { grid-column: 1 / 8; }
.photo.p2 { grid-column: 9 / 13; margin-top: 64px; }
.photo.p3 { grid-column: 2 / 6; margin-top: 0; }
.photo.p4 { grid-column: 7 / 13; margin-top: 72px; }
.photo > svg { bottom: 12px; right: 12px; width: 34px; height: 34px; padding: 8px; border: 1px solid #ffffff70; border-radius: 50%; background: #18302545; backdrop-filter: blur(5px); filter: none; }

/* Venue, date and the reply follow one continuous reading order. */
.place { align-items: center; gap: 30px; padding: 72px 28px; }
.place-photo { width: 100%; box-shadow: none; }
.place-copy.section { padding: 12px 0; }
.place .eyebrow { color: #e2c4a0; }
.place h2 { font-family: var(--serif); font-size: 48px; }
.address { margin-top: 28px; font-size: 22px; line-height: 1.7; }
.address small { font-size: 12px; }
.place-copy > a { min-height: 46px; margin-top: 26px; padding: 0 18px; color: #fff7eb; font-size: 12px; border: 1px solid #ffffff59; border-radius: 4px; transition: background .2s; }
.place-copy .note { margin: 22px 0 0; font-size: 12px; opacity: .72; }
.date { grid-template-columns: minmax(0, 1fr); gap: 36px; }
.calendar-card { position: relative; padding: 26px 24px 22px; border: 1px solid var(--line); background: color-mix(in srgb, var(--forest) 4%, var(--paper)); box-shadow: 0 14px 30px -24px #243a3138; }
.calendar-card::before { content: ""; position: absolute; inset: 8px; border: 1px solid color-mix(in srgb, var(--line) 75%, transparent); pointer-events: none; }
.calendar-heading, .calendar-month, .calendar-weekdays, .calendar-grid, .calendar-lunar { position: relative; z-index: 1; }
.calendar-heading { display: flex; align-items: baseline; justify-content: space-between; color: var(--accent); }
.calendar-heading span { letter-spacing: .16em; font-size: 10px; }
.calendar-heading strong { color: var(--ink); font-family: var(--serif); font-size: 18px; font-weight: 400; }
.calendar-month { display: flex; align-items: baseline; gap: 10px; margin: 24px 0 18px; color: var(--forest); }
.calendar-month b { font-family: var(--serif); font-size: 27px; font-weight: 400; letter-spacing: .05em; }
.calendar-month small { color: var(--muted); font-size: 12px; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; }
.calendar-weekdays { padding-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--accent); font-size: 10px; }
.calendar-grid { gap: 4px 0; padding-top: 12px; color: var(--ink); font-size: 12px; }
.calendar-grid > span { position: relative; display: grid; place-items: center; min-height: 27px; }
.calendar-grid .calendar-empty { min-height: 0; }
.calendar-grid .is-wedding-day { color: #fff; font-weight: 700; }
.calendar-grid .is-wedding-day::before { content: ""; position: absolute; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); z-index: -1; }
.calendar-grid .is-wedding-day i { position: absolute; top: -8px; right: 7px; color: var(--accent); font-family: var(--serif); font-size: 10px; font-style: normal; }
.calendar-lunar { margin: 18px 0 0; color: var(--accent); font-size: 11px; letter-spacing: .08em; text-align: center; }
.poster { position: relative; padding: 30px; gap: 24px; background: color-mix(in srgb, var(--forest) 5%, var(--paper)); border-color: var(--line); }
.poster::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--line); pointer-events: none; }
.poster > span { color: var(--accent); font-size: 10px; }
.poster strong { font-size: 154px; line-height: .9; }
.poster small { padding-bottom: 8px; font-size: 12px; line-height: 1.9; }
.date h2 { font-size: 40px; }
.date-copy > p { max-width: none; margin-top: 18px; }
.count-label { display: block; margin-top: 30px; color: var(--accent); font-size: 11px; }
.count { width: min(100%, 390px); gap: 10px; margin-top: 14px; }
.count span { gap: 5px; min-height: 62px; padding: 9px 5px 7px; border: 0; border-radius: 5px; background: linear-gradient(145deg, #2d493b, var(--count-ink)); color: #fff; box-shadow: inset 0 1px 0 rgb(255 255 255 / .14), 0 7px 16px rgb(24 48 37 / .12); }
.count span:last-child { border-bottom: 0; }
.count b { font-size: 29px; line-height: 1; font-variant-numeric: tabular-nums; }
.count small { font-size: 10px; opacity: .86; }

.reply { grid-template-columns: minmax(0, 1fr); gap: 30px; align-items: start; }
.reply h2 { font-size: 44px; }
.reply-note { max-width: 300px; margin-top: 26px; font-size: 12px; line-height: 2; }
.reply-body { padding: 26px 20px; border: 1px solid var(--line); border-top: 3px solid var(--forest); border-radius: 3px; background: var(--form-paper); box-shadow: 0 18px 42px -28px #243a3138; }
.reply-card-heading { display: flex; align-items: center; gap: 10px; padding-bottom: 23px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.reply-card-heading > span { font-family: var(--serif); font-size: 19px; }
.reply-card-heading > svg { width: 21px; height: 21px; color: var(--accent); stroke-width: 1.4; }
.reply-card-heading small { margin-left: auto; color: var(--accent); font-family: Georgia, serif; font-size: 10px; }
.reply-form { gap: 22px 18px; }
.reply-form label { gap: 10px; font-size: 12px; }
.reply-form :is(input, select, textarea, button) { scroll-margin-block: 96px; }
.field-label { display: flex; align-items: center; justify-content: space-between; min-height: 18px; }
.field-label small { color: var(--accent); font-size: 10px; }
.reply-form input, .reply-form select, .reply-form textarea { min-height: 50px; padding: 12px; color: var(--ink); background: color-mix(in srgb, var(--forest) 3%, var(--form-paper)); border: 1px solid var(--line); border-radius: 4px; transition: background .2s, border-color .2s, box-shadow .2s; }
.select-wrap { position: relative; display: block; }
.select-wrap select { width: 100%; appearance: none; padding-right: 42px; cursor: pointer; }
.select-wrap > svg { position: absolute; top: 50%; right: 14px; width: 17px; height: 17px; color: var(--accent); pointer-events: none; transform: translateY(-50%); transition: transform .2s; }
.select-wrap:focus-within > svg { transform: translateY(-50%) rotate(180deg); }
.select-wrap select:hover { border-color: color-mix(in srgb, var(--forest) 50%, var(--line)); background: var(--form-paper); }
.reply-form input::placeholder, .reply-form textarea::placeholder { opacity: .52; }
.reply-form textarea { min-height: 132px; line-height: 1.8; }
.reply-form :is(input, select, textarea):focus-visible { border-color: var(--forest); outline: 2px solid color-mix(in srgb, var(--forest) 30%, transparent); outline-offset: 2px; background: var(--form-paper); }
.reply-form > button { min-height: 52px; border-radius: 4px; font-size: 14px; transition: box-shadow .2s, background .2s; }
.reply-form > button svg { width: 17px; height: 17px; }
.reply-status:empty { display: none; }
.reply-status { font-size: 12px; line-height: 1.8; }
.reply-body > .reply-success { padding: 24px 0; border: 0; font-family: var(--serif); font-size: 22px; }
.closing { padding: 80px 24px 104px; }
.closing > b { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto; border: 1px solid #d8a8645c; border-radius: 50%; font-size: 40px; }
.closing > p { margin-top: 28px; font-family: var(--serif); font-size: 24px; }
.closing > small { letter-spacing: .16em !important; }
.music-credit { margin: 30px auto 0; color: #ffffffa6; font-size: 10px; }
.music-credit a { text-decoration-color: #ffffff40; text-underline-offset: 4px; }

@media (hover: hover) {
  .cover-copy button:hover { background: #fff; }
  .place-copy > a:hover { background: #ffffff12; }
  .reply-form > button:not(:disabled):hover { background: color-mix(in srgb, var(--forest) 85%, #000); box-shadow: 0 5px 16px #243a3126; }
}
/* Keep taps tactile without adding another visible animation layer. */
.cover-copy button,
.hero-next,
.place-copy > a,
.reply-form > button { transition: transform .22s cubic-bezier(.22,.72,.18,1), box-shadow .22s ease, background .22s ease; }
.cover-copy button:active,
.hero-next:active,
.place-copy > a:active,
.reply-form > button:not(:disabled):active { transform: translateY(1px) scale(.985); }
@media (max-width: 1000px) {
  .manifesto { grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); gap: 32px; }
  .number { display: none; }
  .manifesto h2, .section-title h2, .reply h2 { font-size: 36px; }
  .chapter, .place, .date, .reply { gap: 36px; }
  .chapter h3 { font-size: 28px; }
  .date h2 { font-size: 34px; }
  .calendar-card { padding: 24px 20px 20px; }
  .poster strong { font-size: 128px; }
  .reply-body { padding: 24px; }
  .reply-form { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  html, body { background: var(--paper); }
  #app { width: 100%; box-shadow: none; }
  .section { padding: 72px 24px; }
  .music-player { right: 14px; top: max(12px, env(safe-area-inset-top)); }
  .cover-copy { width: calc(100% - 32px); padding: 20px 0 100px; }
  .cover-copy .micro { font-size: 8px; }
  .cover-copy .heart { width: 38px; height: 38px; margin: 16px auto; font-size: 21px; }
  .cover h1 { font-size: 32px; }
  .cover h1 i { padding: 0 2px; }
  .cover-copy p { margin: 16px 0 24px; font-size: 12px; }
  .cover-date { left: 24px; bottom: 30px; font-size: 10px; }
  .hero.section { padding-top: 80px; padding-bottom: 44px; }
  .hero h2 { font-size: 46px; line-height: 1.3; }
  .hero p { font-size: 12px; }
  .hero-next { margin-top: 24px; gap: 10px; }
  .hero-next svg { width: 36px; height: 36px; padding: 9px; }
  .hero-next span { font-size: 10px; }
  .manifesto, .date, .reply { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .manifesto h2, .section-title h2, .date h2, .reply h2 { font-size: 31px; line-height: 1.5; }
  .manifesto-image { width: calc(100% - 8px); box-shadow: 8px 8px 0 color-mix(in srgb, var(--forest) 7%, transparent); }
  .chapter-list { margin-top: 38px; }
  .chapter { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 30px 0; }
  .chapter h3 { margin-top: 10px; font-size: 27px; }
  .chapter p { margin-bottom: 0; }
  .album-grid { gap: 14px; margin-top: 36px; }
  .photo.p1, .photo.p4 { grid-column: 1 / -1; margin-top: 0; }
  .photo.p2 { grid-column: 1; margin-top: 0; }
  .photo.p3 { grid-column: 2; margin-top: 24px; }
  .photo > svg { width: 28px; height: 28px; padding: 6px; bottom: 8px; right: 8px; }
  .place { grid-template-columns: minmax(0, 1fr); gap: 30px; padding: 56px 24px; }
  .place-photo { width: calc(100% - 8px); box-shadow: 8px 8px 0 #ffffff0d; }
  .place-copy.section { padding: 0; }
  .place h2 { font-size: 40px; }
  .address { margin-top: 22px; font-size: 20px; }
  .calendar-card { padding: 24px 18px 20px; }
  .poster strong { font-size: 120px; }
  .poster small { font-size: 11px; }
  .date-copy > p { font-size: 13px; }
  .count { gap: 8px; }
  .count b { font-size: 30px; }
  .reply { gap: 30px; }
  .reply-body { padding: 24px 20px; }
  .reply-card-heading { margin-bottom: 22px; padding-bottom: 20px; }
  .reply-form { gap: 22px; }
  .reply-note { margin-top: 20px; }
  .closing { padding: 64px 24px 100px; }
  .closing > p { font-size: 22px; }
}
@media (max-width: 360px) {
  .cover h1 { font-size: 27px; }
  .hero h2 { font-size: 40px; }
  .manifesto h2, .section-title h2, .date h2, .reply h2 { font-size: 27px; }
  .chapter h3 { font-size: 24px; }
  .reply-body { padding: 22px 16px; }
  .poster strong { font-size: 100px; }
}
@media (prefers-reduced-motion: reduce) {
  .place-copy > a, .reply-form input, .reply-form select, .reply-form textarea, .reply-form > button,
  .cover-copy button, .hero-next { transition: none; }
}

/* Final H5 pacing pass: keep the invitation intimate and let the ending land. */
#app .section { padding-block: 88px; }
#app .hero.section { padding-top: 82px; padding-bottom: 54px; }
#app .chapter-list { margin-top: 42px; }
#app .chapter { padding-block: 26px; }
#app .album-grid { margin-top: 42px; }
#app .place-copy.section { padding-top: 46px; }
#app .reply-note { max-width: 330px; line-height: 1.85; }
#app .closing { padding-top: 76px; padding-bottom: 92px; }
#app .closing-lede { margin: 18px 0 8px; color: #e5c49d; font-family: var(--serif); font-size: 20px; line-height: 1.6; }
#app .closing > p:not(.closing-lede) { margin-top: 0; }

@media (max-width: 700px) {
  #app .section { padding-block: 64px; }
  #app .hero.section { padding-top: 72px; padding-bottom: 38px; }
  #app .chapter-list { margin-top: 32px; }
  #app .chapter { padding-block: 24px; }
  #app .album-grid { margin-top: 32px; }
  #app .place-copy.section { padding-top: 44px; }
  #app .closing { padding-top: 60px; padding-bottom: 84px; }
  #app .closing-lede { font-size: 19px; }
}

/* Keep motion quiet: one entrance per group, followed by a short reading sequence. */
.cover.is-opening { width: min(100%, 460px); margin-inline: auto; }
.hero-line { display: block; }
.lightbox { grid-template-columns: minmax(0, 1fr); }
.lightbox img { max-width: min(100%, 1400px); }
.reveal { transform: translateY(10px); transition: opacity 700ms ease, transform 700ms cubic-bezier(.22,.72,.18,1); }
.reveal.is-visible { transform: none; }
.reveal.reveal-group { opacity: 1; transform: none; transition: none; }
.reveal-group .reveal-item { opacity: 0; transform: translateY(10px); transition: opacity 650ms ease, transform 650ms cubic-bezier(.22,.72,.18,1); transition-delay: var(--reveal-delay, 0ms); }
.reveal-group.is-visible .reveal-item,
.reveal-group:focus-within .reveal-item { opacity: 1; transform: none; }
.reveal-group:focus-within .reveal-item { transition-delay: 0ms; }
.closing .reveal-item { transition-duration: 850ms; }
.calendar-ring { position: absolute; width: 36px; height: 36px; overflow: visible; fill: none; stroke: var(--accent); stroke-width: 1; transform: rotate(-90deg); pointer-events: none; }
.calendar-ring circle { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 700ms 300ms ease; }
.calendar-card.is-visible .calendar-ring circle { stroke-dashoffset: 0; }
.reply-body { display: flex; flex-direction: column; }
.reply-form .reply-status:empty { display: block; }
.reply-form .reply-status { min-height: 22px; }
.reply-body > .reply-success { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 20px; width: 100%; margin: 0; padding: 40px 12px; text-align: center; font-size: 20px; line-height: 1.8; }
.reply-success:not([hidden]) { animation: reply-arrive 450ms ease both; }
.reply-check { width: 48px; height: 48px; color: var(--forest); stroke: currentColor; stroke-width: 1.5; }
.reply-check circle { opacity: .3; }
.reply-check path { stroke-linecap: round; stroke-linejoin: round; }
.reply-success:not([hidden]) .reply-check path { animation: reply-check 550ms 100ms ease both; }
@keyframes reply-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes reply-check { from { stroke-dasharray: 1; stroke-dashoffset: 1; } to { stroke-dasharray: 1; stroke-dashoffset: 0; } }

/* The album enters like a small stack of printed photographs. The cards keep
   their existing hit areas and grid positions; only the entrance adds depth. */
.album-grid.reveal-group .photo.reveal-item { opacity: 0; transition: opacity 650ms ease, transform 750ms cubic-bezier(.22,.72,.18,1), box-shadow 500ms ease; }
.album-grid.reveal-group .photo.reveal-item:nth-child(1) { transform: translateY(18px) rotate(-1.6deg); }
.album-grid.reveal-group .photo.reveal-item:nth-child(2) { transform: translateY(22px) rotate(1.8deg); transition-delay: 90ms; }
.album-grid.reveal-group .photo.reveal-item:nth-child(3) { transform: translateY(20px) rotate(-1deg); transition-delay: 160ms; }
.album-grid.reveal-group .photo.reveal-item:nth-child(4) { transform: translateY(24px) rotate(1.2deg); transition-delay: 230ms; }
.album-grid.reveal-group.is-visible .photo.reveal-item { opacity: 1; }
.album-grid.reveal-group.is-visible .photo.reveal-item:nth-child(1) { transform: rotate(-.35deg); }
.album-grid.reveal-group.is-visible .photo.reveal-item:nth-child(2) { transform: rotate(.45deg); }
.album-grid.reveal-group.is-visible .photo.reveal-item:nth-child(3) { transform: rotate(-.25deg); }
.album-grid.reveal-group.is-visible .photo.reveal-item:nth-child(4) { transform: rotate(.3deg); }
.album-grid.reveal-group.is-visible .photo.reveal-item:focus-visible,
.album-grid.reveal-group.is-visible .photo.reveal-item:hover { box-shadow: 0 16px 34px rgb(24 48 37 / .14); }

/* Let each reading section settle into its own quiet colour as it reaches the
   reading line. The transition only moves the existing gradient; it does not
   change layout or take control of the user's scroll. */
.variant-mountain .manifesto,
.variant-mountain .chapters,
.variant-mountain .album,
.variant-mountain .date,
.variant-mountain .reply { background-size: 100% 140%; background-position: 0 0; transition: background-position 900ms ease; }
.variant-mountain .manifesto.is-tone-active,
.variant-mountain .chapters.is-tone-active,
.variant-mountain .album.is-tone-active,
.variant-mountain .date.is-tone-active,
.variant-mountain .reply.is-tone-active { background-position: 0 100%; }
@media (max-width: 700px) {
  .cover.is-opening { width: 100%; }
  /* Keep the ring hand visible in the mobile hero composition. */
  #app .hero-copy { width: min(76%, 300px); margin: 0 0 10px auto; padding: 14px 14px 12px 16px; border-left: 0; border-radius: 3px; }
  #app .hero h2 { margin: 12px 0 14px; font-size: 40px; line-height: 1.22; }
  #app .hero-copy p { font-size: 11px; }
  #app .hero-next { margin-top: 18px; }
}

@media (max-width: 360px) {
  #app .hero-copy { width: min(78%, 250px); margin-bottom: 8px; padding: 12px 10px 10px 12px; }
  #app .hero h2 { margin: 10px 0 12px; font-size: 36px; line-height: 1.18; }
  #app .hero-next { gap: 8px; margin-top: 14px; }
  #app .hero-next svg { width: 32px; height: 32px; padding: 8px; }
}

/* A muted vermilion keeps the reply action festive while staying inside the
   invitation's forest, paper and rose palette. */
.variant-mountain .reply-form > button { background: #98534c; color: #fffaf3; }
@media (hover: hover) {
  .variant-mountain .reply-form > button:not(:disabled):hover { background: #84443f; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-group .reveal-item { opacity: 1; transform: none; transition: none; }
  .calendar-ring circle { stroke-dashoffset: 0; transition: none; }
  .reply-success:not([hidden]), .reply-success:not([hidden]) .reply-check path,
  .music-toggle[data-state="playing"] .play-icon,
  .cover.is-opening .cover-copy button { animation: none; }
  .chapter { transition: none; }
  .variant-mountain .manifesto,
  .variant-mountain .chapters,
  .variant-mountain .album,
  .variant-mountain .date,
  .variant-mountain .reply { transition: none; background-position: 0 0; }
  .variant-mountain :is(.manifesto, .chapters, .album, .date, .reply)::before { opacity: .022; }
  .variant-mountain .hero-copy::before { filter: none; }
  .album-grid.reveal-group .photo.reveal-item,
  .album-grid.reveal-group.is-visible .photo.reveal-item { opacity: 1; transform: none; transition: none; }
}
