/* Lễ Hằng Thuận · Địa Tạng Phi Lai Tự
   Built from hangthuan/docs/wireframe (5 boards). One golden system for the whole page:
   spacing 8 · 13 · 21 · 34 · 55 · 89 · 144 (Fibonacci, ×1.618)
   type    13 · 17 · 21 · 26 · 33 · 42 · 55 · 68 (×1.272 = √φ)
   phone < 900px: one column, 21 side margin; ≥ 900px: frame 1120, columns 407 | 55 | 658 (38.2 | 61.8). */

:root {
  --cream: #f6f1e7;
  --card: #fbf8f1;
  --field: #fffdf9;
  --sand: #ece3cf;
  --ph: #ebe2cf;
  --ink: #463f31;
  --ink-2: #6b6251;
  --ink-3: #8f8571;
  --olive: #6c6a4a;
  --olive-2: #56543a;
  --olive-ink: #f3eddf;
  --dusk: #34321f;
  --gold: #a98c5c;
  --line: rgba(70, 63, 49, 0.24);
  --danger: #9b3b2a;
  --sumi: #2c2823;
  --vermilion: #a8402e;
  --bamboo: #3d4a35;

  --f-script: "Pinyon Script", "Segoe Script", cursive;
  --f-display: "Cormorant Garamond", "Times New Roman", serif;
  --f-sc: "Cormorant SC", "Cormorant Garamond", serif;
  --f-body: "EB Garamond", Georgia, serif;
  --f-brush: "Mansalva", "Segoe Print", cursive;

  --s1: 8px;
  --s2: 13px;
  --s3: 21px;
  --s4: 34px;
  --s5: 55px;
  --s6: 89px;
  --s7: 144px;

  /* phone rhythm: 89 between beats, 55 inside a beat */
  --beat: var(--s6);
  --step: var(--s5);
  --gut: var(--s3);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (min-width: 900px) {
  :root {
    --beat: var(--s7);
    --step: var(--s6);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  font-variant-numeric: lining-nums;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--cream) url("/assets/paper.jpg") repeat;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 26px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(169, 140, 92, 0.28);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
  font-weight: 400;
}

p {
  text-wrap: pretty;
}

a:focus-visible,
button:focus-visible,
.cluster:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 3px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.br-wide {
  display: none;
}

/* the content column: phone 348 at 390 (max 560), desktop 1120 */
.frame {
  width: min(100% - 2 * var(--gut), 560px);
  margin-inline: auto;
}

@media (min-width: 900px) {
  .frame {
    width: min(100% - 2 * var(--s6), 1120px);
  }
}

/* ---------- type atoms ---------- */

/* small caps label, 13 — the smallest text on the page */
.label {
  font-family: var(--f-sc);
  font-weight: 600;
  font-size: 13px;
  line-height: 18px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.label--ink {
  color: var(--ink);
}

.label--light {
  color: var(--olive-ink);
}

.muted {
  color: var(--ink-2);
}

/* caps section title: 21 phone, 33 desktop */
.sec-title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 21px;
  line-height: 28px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  text-wrap: balance;
}

.sec-head {
  text-align: center;
}

.sec-head .sec-title {
  margin-top: var(--s1);
}

@media (min-width: 900px) {
  .sec-title {
    font-size: 33px;
    line-height: 42px;
  }
}

/* lowercase brush words, black ink: 26 phone, 33 desktop */
.brush {
  font-family: var(--f-brush);
  font-weight: 400;
  text-transform: lowercase;
  letter-spacing: 0.01em;
  color: var(--sumi);
}

.brush-title {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--s2);
  font-size: 26px;
  line-height: 34px;
  text-align: center;
  text-wrap: balance;
}

@media (min-width: 900px) {
  .brush-title {
    font-size: 33px;
    line-height: 42px;
    gap: var(--s3);
  }
}

/* buttons: 55 high, small caps */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 55px;
  padding: 0 var(--s3);
  border: 1px solid transparent;
  border-radius: 0;
  font-family: var(--f-sc);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn--line {
  border-color: var(--olive-2);
}

.btn--line:hover {
  background: rgba(86, 84, 58, 0.07);
}

.btn--solid {
  color: var(--olive-ink);
  background: var(--olive-2);
}

.btn--solid:hover {
  background: #4a4831;
}

/* ---------- logo, ensō mark, red chop ---------- */

/* the couple's L–A monogram, recoloured with currentColor (app.js may swap --logo) */
.logo {
  display: block;
  background: currentColor;
  -webkit-mask: var(--logo, url("/assets/logo.png")) center / contain no-repeat;
  mask: var(--logo, url("/assets/logo.png")) center / contain no-repeat;
}

.mark {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--size, 55px);
  height: var(--size, 55px);
  margin-inline: auto;
}

.mark-enso {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  rotate: -8deg;
}

.mark .logo {
  width: 46%;
  height: 50%;
  translate: 2% 1%;
}

.mark--ink {
  color: var(--ink);
}

.mark--ink .mark-enso {
  color: var(--sumi);
  opacity: 0.88;
}

.mark--light {
  color: #f6eedc;
}

.mark--light .mark-enso {
  color: #efe3c6;
  opacity: 0.8;
}

@media (min-width: 900px) {
  .mark {
    --size: 68px;
  }
}

/* small vermilion seal with the logo cut out: 21 phone, 26 desktop */
.chop {
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 2px;
  background: var(--vermilion);
  color: #fbf1e4;
  box-shadow: inset 0 0 0 1.5px var(--vermilion), inset 0 0 0 2.5px rgba(251, 241, 228, 0.5);
  rotate: 3deg;
}

.chop .logo {
  width: 64%;
  height: 72%;
}

@media (min-width: 900px) {
  .chop {
    width: 26px;
    height: 26px;
  }
}

/* temple pictures: soft paper-bleed edges until the watercolour painting arrives */
.wash img {
  filter: saturate(0.78) sepia(0.1) contrast(0.96) brightness(1.03);
}

/* ================= 01 Bìa ================= */

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto minmax(200px, 1fr) auto auto;
  min-height: 100vh;
  min-height: 100svh;
  padding-bottom: 33px;
  text-align: center;
}

.hero-text {
  padding: var(--s4) var(--s2) 0;
}

.kicker,
.hero .kicker {
  margin-top: var(--s2);
}

.hero .kicker {
  font-family: var(--f-sc);
  font-weight: 600;
  font-size: 13px;
  line-height: 16px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}

.hero-lead {
  margin-top: var(--s2);
  font-family: var(--f-display);
  font-style: italic;
  font-size: 17px;
  line-height: 21px;
  color: var(--ink-2);
  text-wrap: balance;
}

.names {
  margin-top: var(--s2);
  font-family: var(--f-script);
  font-weight: 400;
  font-size: 55px;
  line-height: 55px;
  color: var(--ink);
}

.names .name {
  display: block;
}

.names .amp {
  display: block;
  font-family: var(--f-display);
  font-style: italic;
  font-size: 17px;
  line-height: 21px;
  color: var(--ink-2);
}

/* 322 on a 390 × 844 phone: the painting runs edge to edge and bleeds into the paper */
.hero-art {
  position: relative;
  z-index: -1;
  min-height: 0;
  margin-top: var(--s2);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 72%, transparent 100%);
  animation: art-in 2.2s var(--ease) both;
}

.hero-art picture,
.hero-art img {
  width: 100%;
  height: 100%;
}

.hero-art img {
  object-fit: cover;
  object-position: 50% 62%;
}

/* the date card rides 89 up onto the painting */
.date-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  justify-self: center;
  width: min(100% - 84px, 360px);
  min-height: 178px;
  margin-top: calc(-1 * var(--s6));
  padding: var(--s2) var(--s1);
  background: var(--card);
  border: 1px solid var(--gold);
}

.date-num {
  font-family: var(--f-display);
  font-size: 33px;
  line-height: 42px;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.date-lunar {
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(15px, 4.3vw, 17px);
  line-height: 22px;
  color: var(--ink-2);
  white-space: nowrap;
}

.date-rule {
  display: block;
  width: min(264px, 86%);
  height: 1px;
  margin: 4px 0;
  background: var(--line);
}

.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: 128px;
  height: 44px;
  margin-top: var(--s4);
  text-decoration: none;
}

.scroll-cue svg {
  width: 10px;
  height: 15px;
  margin-top: 2px;
  animation: bob 2.6s ease-in-out infinite;
}

@media (min-width: 900px) {
  /* 1440 × 900: words 550 (38.2%) | painting 890 (61.8%), bleeding to the left */
  .hero {
    grid-template-columns: 38.2fr 61.8fr;
    grid-template-rows: auto auto 1fr;
    height: 100vh;
    min-height: 720px;
    max-height: 1100px;
    padding: 0;
  }

  .hero-text {
    grid-column: 1;
    padding: 76px var(--s5) 0;
  }

  .hero .kicker {
    margin-top: var(--s3);
  }

  .hero-lead {
    font-size: 21px;
    line-height: 24px;
  }

  .names {
    font-size: 68px;
    line-height: 68px;
  }

  .names .amp {
    font-size: 21px;
    line-height: 24px;
  }

  .hero-art {
    grid-column: 2;
    grid-row: 1 / -1;
    margin: 0;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 21%);
    mask-image: linear-gradient(to right, transparent 0, #000 21%);
  }

  .hero-art img {
    object-position: 50% 55%;
  }

  /* no box on desktop: an 89 rule under the names, then the date */
  .date-card {
    grid-column: 1;
    grid-row: 2;
    width: auto;
    min-height: 0;
    margin: var(--s5) var(--s5) 0;
    padding: 0;
    gap: 4px;
    background: none;
    border: 0;
  }

  .date-card::before {
    content: "";
    width: 89px;
    height: 1px;
    margin-bottom: var(--s5);
    background: var(--line);
  }

  .date-num {
    font-size: 42px;
    line-height: 55px;
  }

  .date-lunar {
    line-height: 24px;
  }

  .date-rule {
    display: none;
  }

  .date-at {
    margin-top: var(--s2);
    line-height: 22px;
  }

  .scroll-cue {
    grid-column: 1;
    grid-row: 3;
    align-self: end;
    margin: 0 0 var(--s6);
  }
}

/* ================= 02 Lời nguyện ================= */

.vow {
  padding: var(--beat) var(--s4) 0;
  text-align: center;
}

.vow-quote {
  max-width: 658px;
  margin: var(--s3) auto 0;
  font-family: var(--f-display);
  font-style: italic;
  font-size: 21px;
  line-height: 32px;
  color: var(--ink);
  text-wrap: pretty;
}

@media (min-width: 900px) {
  .vow-quote {
    font-size: 26px;
    line-height: 38px;
  }
}

/* ================= 03 Hai họ — 1 : 1 at every size ================= */

.families {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s2);
  width: min(100% - 2 * var(--s2), 560px);
  margin: var(--step) auto 0;
  text-align: center;
}

.fam {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s1);
}

.fam-names {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
}

.fam-names span {
  display: block;
}

.fam-rule {
  width: 34px;
  height: 1px;
  margin: 5px 0;
  background: var(--line);
}

.fam-child {
  font-family: var(--f-script);
  font-size: 26px;
  line-height: 34px;
  color: var(--ink);
}

@media (min-width: 900px) {
  .families {
    width: min(100% - 2 * var(--s6), 869px);
    gap: var(--s5);
  }

  .fam {
    gap: var(--s2);
  }

  .fam-names {
    font-size: 21px;
    line-height: 30px;
  }

  .fam-rule {
    width: 55px;
    margin: 0;
  }

  .fam-child {
    font-size: 42px;
    line-height: 55px;
  }
}

/* ================= 04 / 08 Khu ảnh — one cover cluster, the album opens on tap ================= */

.album {
  padding-block: var(--beat);
}

.album--b {
  padding-bottom: 0;
}

.album[hidden] {
  display: none;
}

.album-grid {
  display: grid;
}

/* phone: title, caption, cluster, button — one column */
.album-copy {
  display: contents;
}

.album-cap {
  margin-top: var(--s1);
  font-family: var(--f-display);
  font-style: italic;
  font-size: 21px;
  line-height: 28px;
  text-align: center;
}

.cluster {
  order: 2;
  margin-top: var(--s3);
}

.album-more {
  order: 3;
  margin-top: var(--s3);
}

/* cover 4 : 5 + two small squares, widths 61.8 | 38.2; the whole cluster is one tap target */
.cluster {
  display: grid;
  grid-template-columns: minmax(0, 1.618fr) minmax(0, 1fr);
  gap: var(--s2);
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.album--b .cluster {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.618fr);
}

.album--b .cl-side {
  order: -1;
}

.cl-cover,
.cl-a,
.cl-b {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--ph);
}

.cl-cover {
  aspect-ratio: 4 / 5;
}

.cl-side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: var(--s2);
}

.cl-a,
.cl-b {
  min-height: 0;
}

.cluster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.6s ease, scale 1.2s var(--ease);
}

.cluster img.is-loading {
  opacity: 0;
}

.cluster:hover img {
  scale: 1.03;
}

/* waiting for Drive */
.cluster[aria-busy="true"] .cl-cover,
.cluster[aria-busy="true"] .cl-a,
.cluster[aria-busy="true"] .cl-b {
  background: linear-gradient(100deg, var(--ph) 30%, #f3ecdd 50%, var(--ph) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.6s linear infinite;
}

/* only one or two photos: the cover takes the whole width */
.cluster.is-single {
  grid-template-columns: 1fr;
}

.cluster.is-single .cl-side {
  display: none;
}

.cluster.is-pair .cl-side {
  grid-template-rows: 1fr;
}

.cluster.is-pair .cl-b {
  display: none;
}

@media (min-width: 900px) {
  .album-grid {
    grid-template-columns: minmax(0, 407fr) minmax(0, 658fr);
    column-gap: var(--s5);
    align-items: center;
  }

  .album--b .album-grid {
    grid-template-columns: minmax(0, 658fr) minmax(0, 407fr);
  }

  .album--b .cluster {
    order: -1;
  }

  .album-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s2);
  }

  .album-copy .brush-title {
    justify-content: flex-start;
    text-align: left;
  }

  .album-cap {
    margin: 0;
    font-size: 26px;
    line-height: 38px;
    text-align: left;
  }

  .cluster {
    margin: 0;
  }

  .album-more {
    width: 252px;
    margin-top: var(--s3);
  }
}

/* ================= 05 Địa điểm — olive band ================= */

.venue {
  padding-block: var(--s6);
  color: var(--olive-ink);
  background: var(--olive-2);
  text-align: center;
}

.venue .frame {
  width: min(100% - 2 * 42px, 480px);
}

.venue-grid {
  display: grid;
}

.venue-copy {
  display: contents;
}

.venue-name {
  margin-top: var(--s1);
  font-family: var(--f-script);
  font-size: 33px;
  line-height: 42px;
  color: #fbf3df;
}

.venue-addr {
  margin-top: var(--s1);
  line-height: 24px;
}

/* golden rectangle 1.618 : 1, soft edges into the olive */
.venue-art {
  order: 1;
  margin-top: var(--s4);
  aspect-ratio: 1.618;
  overflow: hidden;
  -webkit-mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 58%, transparent 100%);
  mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 58%, transparent 100%);
}

.venue-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
}

.venue-story,
.stats,
.venue .btn--map,
.credit {
  order: 2;
}

.venue-story {
  margin-top: var(--s3);
  font-family: var(--f-display);
  font-style: italic;
  font-size: 21px;
  line-height: 30px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s2);
  margin-top: var(--s3);
}

.stat-num {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 26px;
  line-height: 34px;
  color: #fbf3df;
}

.stat-sub {
  line-height: 22px;
}

.venue .btn--map {
  margin-top: var(--s4);
  color: var(--ink);
  background: var(--cream);
}

.venue .btn--map:hover {
  background: #fffaf0;
}

.credit {
  margin-top: var(--s2);
  font-size: 13px;
  line-height: 18px;
  opacity: 0.7;
}

@media (min-width: 900px) {
  .venue {
    text-align: left;
  }

  .venue .frame {
    width: min(100% - 2 * var(--s6), 1120px);
  }

  .venue-grid {
    grid-template-columns: minmax(0, 658fr) minmax(0, 407fr);
    column-gap: var(--s5);
    align-items: center;
  }

  .venue-copy {
    display: block;
  }

  .venue-art {
    order: 0;
    margin: 0;
  }

  .venue-name {
    font-size: 42px;
    line-height: 55px;
  }

  .venue-story {
    margin-top: var(--s4);
  }

  .stats {
    margin-top: var(--s4);
    gap: var(--s3);
  }

  .stat-sub {
    line-height: 24px;
  }

  .venue .btn--map {
    width: 252px;
  }
}

/* ================= 06 Lịch trình ================= */

.schedule {
  padding-block: var(--beat);
}

.sched-head {
  text-align: center;
}

.sched-head .sec-title {
  margin-top: var(--s1);
}

.sched-sum {
  display: none;
}

.sched-body {
  margin-top: var(--s4);
}

/* columns: time 55 | axis 21 | text */
.tl {
  --tc: 55px;
  --ax: 21px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.tl::before,
.tl::after {
  content: "";
  position: absolute;
  left: calc(var(--tc) + var(--ax) / 2 - 0.5px);
  top: 13px;
  bottom: 13px;
  width: 1px;
  background: var(--line);
}

/* the axis fills in olive as the guest reads down (app.js sets --p) */
.tl::after {
  background: var(--olive);
  transform-origin: top;
  transform: scaleY(var(--p, 0));
}

.tl li {
  position: relative;
  display: grid;
  grid-template-columns: var(--tc) var(--ax) minmax(0, 1fr);
  align-items: start;
}

.tl li::before {
  content: "";
  grid-column: 2;
  grid-row: 1;
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  margin: 8.5px auto 0;
  border: 1.5px solid var(--olive);
  border-radius: 50%;
  background: var(--cream);
}

.tl time {
  grid-column: 1;
  grid-row: 1;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 17px;
  line-height: 26px;
}

.tl li > div {
  grid-column: 3;
  grid-row: 1;
}

.tl h3 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 21px;
  line-height: 26px;
  text-wrap: balance;
}

.tl li > div > p {
  font-style: italic;
  font-size: 17px;
  line-height: 24px;
  color: var(--ink-2);
}

/* the ceremony itself: larger, bold, a gold diamond */
.tl li.tl-key {
  margin-block: var(--s2);
}

.tl li.tl-key time {
  font-weight: 700;
  font-size: 21px;
  line-height: 32px;
}

.tl li.tl-key h3 {
  font-weight: 700;
  font-size: 26px;
  line-height: 32px;
}

.tl li.tl-key::before {
  width: 13px;
  height: 13px;
  margin-top: 9.5px;
  border-color: var(--gold);
  border-radius: 0;
  background: var(--gold);
  rotate: 45deg;
}

.tl li.tl-lantern::before {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(243, 196, 111, 0.25);
}

.tl-end {
  margin-top: var(--s4);
  padding-top: var(--s2);
  border-top: 1px solid var(--line);
  text-align: center;
}

@media (min-width: 900px) {
  .sched-grid {
    display: grid;
    grid-template-columns: minmax(0, 407fr) minmax(0, 658fr);
    column-gap: var(--s5);
    align-items: start;
  }

  .sched-head {
    display: flex;
    flex-direction: column;
    gap: var(--s2);
    text-align: left;
  }

  .sched-head .sec-title {
    margin: 0;
  }

  .sched-sum {
    display: flex;
    flex-direction: column;
    gap: var(--s2);
  }

  .sched-sum .rule {
    width: 89px;
    height: 1px;
    margin: var(--s3) 0 var(--s1);
    background: var(--line);
  }

  .sum-time {
    font-family: var(--f-display);
    font-weight: 500;
    font-size: 33px;
    line-height: 42px;
  }

  .sched-body {
    margin: 0;
  }

  .tl {
    --tc: 89px;
    --ax: 34px;
  }

  /* "13:45 – 14:00 · Quý khách tập trung tại chính điện" on one line */
  .tl li > div > p {
    display: inline;
  }

  .tl p.tl-desc::before {
    content: " · ";
  }

  .tl li.tl-key time {
    font-size: 26px;
    line-height: 38px;
  }

  .tl li.tl-key h3 {
    font-size: 33px;
    line-height: 38px;
  }

  .tl li.tl-key::before {
    width: 15px;
    height: 15px;
    margin-top: 11.5px;
  }

  .tl-end {
    margin-top: var(--s3);
    text-align: left;
  }
}

/* ================= 07 Lời nhắn — sand band ================= */

.notes {
  padding-block: var(--s6);
  background: var(--sand);
}

.notes-list {
  display: flex;
  flex-direction: column;
  margin: var(--s4) 0 0;
  padding: 0;
  list-style: none;
}

.notes-list h3 {
  font-family: var(--f-sc);
  font-weight: 600;
  font-size: 13px;
  line-height: 18px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}

/* icons sit in a 34 ring */
.notes-list .ico {
  display: block;
  width: 34px;
  height: 34px;
  padding: 5px;
  border: 1.5px solid var(--olive);
  border-radius: 50%;
  color: var(--ink);
}

/* the first note (dress code) is the card with the palette */
.notes-list > li:first-child {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s3);
  padding: var(--s3);
  text-align: center;
  background: var(--card);
  border: 1px solid var(--gold);
}

.notes-list > li:not(:first-child) {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: var(--s3);
  padding-block: var(--s3);
  border-bottom: 1px solid var(--line);
}

.notes-list > li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.notes-list > li:not(:first-child) .ico {
  grid-row: 1 / span 2;
}

.notes-list > li:not(:first-child) p {
  margin-top: 5px;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.swatches li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s1);
  font-family: var(--f-sc);
  font-weight: 600;
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-2);
}

.sw {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--gold);
}

@media (min-width: 900px) {
  /* card 658 | three notes 407, the notes centred against the card */
  .notes-list {
    display: grid;
    grid-template-columns: minmax(0, 658fr) minmax(0, 407fr);
    grid-template-rows: 1fr auto auto auto 1fr;
    column-gap: var(--s5);
    margin-top: var(--s5);
  }

  .notes-list > li:first-child {
    grid-column: 1;
    grid-row: 1 / -1;
    justify-content: center;
    gap: var(--s3);
    margin: 0;
    padding: var(--s4);
  }

  .notes-list > li:first-child p {
    font-size: 21px;
    line-height: 30px;
  }

  .notes-list > li:not(:first-child) {
    grid-column: 2;
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .notes-list > li:nth-child(2) {
    grid-row: 2;
    padding-top: 0;
  }

  .notes-list > li:nth-child(3) {
    grid-row: 3;
  }

  .notes-list > li:nth-child(4) {
    grid-row: 4;
  }

  .notes-list > li:not(:first-child) .ico {
    width: 42px;
    height: 42px;
    padding: 7px;
  }

  .swatches {
    gap: var(--s4);
  }
}

/* ================= 09 Hồi âm ================= */

.rsvp {
  padding-block: var(--beat);
}

/* phone: date · time · place repeated right above the form */
.rsvp-strip {
  padding-block: var(--s2);
  border-block: 1px solid var(--line);
  text-align: center;
}

.rsvp-intro {
  display: none;
}

.letter {
  position: relative;
  margin-top: var(--s5);
  padding: 47px var(--s3) var(--s3);
  background: var(--card);
  border: 1px solid var(--gold);
}

.seal {
  position: absolute;
  top: 0;
  left: 50%;
  display: grid;
  place-items: center;
  width: 55px;
  height: 55px;
  translate: -50% -50%;
  border-radius: 50%;
  color: var(--olive-ink);
  background: var(--olive-2);
  box-shadow: 0 0 0 4px var(--cream);
}

.seal .logo {
  width: 48%;
  height: 52%;
}

.letter-head {
  text-align: center;
}

.letter-head .sec-title {
  margin-top: var(--s1);
}

.letter-lead {
  margin-top: var(--s2);
  font-family: var(--f-display);
  font-style: italic;
  font-size: 21px;
  line-height: 28px;
  color: var(--ink-2);
  text-wrap: balance;
}

.letter-lead strong {
  font-style: normal;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

#register-form {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  margin-top: var(--s4);
}

.field-row {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field > legend {
  float: left;
  width: 100%;
  margin-bottom: var(--s1);
  padding: 0;
}

.side-field .side-options {
  clear: both;
}

.req {
  color: var(--vermilion);
}

.optional {
  font-family: var(--f-body);
  font-style: italic;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
}

input[type="text"],
input[type="tel"],
textarea {
  width: 100%;
  height: 48px;
  padding: 0 var(--s2);
  border: 1px solid var(--ink-3);
  border-radius: 0;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  background: var(--field);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea {
  height: 110px;
  padding: var(--s2);
  resize: vertical;
}

::placeholder {
  color: #a39a87;
  opacity: 1;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--olive);
  box-shadow: 0 0 0 3px rgba(108, 106, 74, 0.18);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.error {
  font-style: italic;
  font-size: 15px;
  line-height: 20px;
  color: var(--danger);
}

/* guest count: − | n | + */
.stepper {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  border: 1px solid var(--ink-3);
  background: var(--field);
}

.stepper:focus-within {
  border-color: var(--olive);
  box-shadow: 0 0 0 3px rgba(108, 106, 74, 0.18);
}

.stepper:has(input[aria-invalid="true"]) {
  border-color: var(--danger);
}

.stepper input[type="number"] {
  width: 100%;
  min-width: 0;
  height: 46px;
  border: 0;
  border-inline: 1px solid var(--line);
  font: inherit;
  font-size: 17px;
  text-align: center;
  color: var(--ink);
  background: transparent;
  -moz-appearance: textfield;
  appearance: textfield;
}

.stepper input[type="number"]:focus {
  box-shadow: none;
}

.stepper input::-webkit-inner-spin-button,
.stepper input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.step {
  height: 46px;
  padding: 0;
  border: 0;
  font: inherit;
  font-size: 19px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.step:hover {
  background: rgba(86, 84, 58, 0.07);
}

.step:disabled {
  color: var(--ink-3);
  opacity: 0.5;
  cursor: default;
}

/* nhà trai / nhà gái */
.side-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s2);
}

.side-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.side-option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.side-face {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  column-gap: var(--s1);
  align-items: start;
  min-height: 55px;
  padding: var(--s1);
  border: 1px solid var(--ink-3);
  background: var(--field);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.side-dot {
  grid-row: 1;
  position: relative;
  width: 15px;
  height: 15px;
  margin-top: 4px;
  border: 1.5px solid var(--ink-3);
  border-radius: 50%;
  background: #fff;
}

.side-dot::after {
  content: "";
  position: absolute;
  inset: 2.5px;
  border-radius: 50%;
  background: var(--olive-2);
  scale: 0;
  transition: scale 0.2s var(--ease);
}

.side-name {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 17px;
  line-height: 22px;
}

.side-sub {
  grid-column: 1 / -1;
  margin-top: 2px;
  font-style: italic;
  font-size: 15px;
  line-height: 18px;
  color: var(--ink-2);
  white-space: nowrap;
}

@media (min-width: 900px) {
  .side-sub {
    grid-column: 2;
    margin-top: 0;
  }
}

.side-option:hover .side-face {
  border-color: var(--olive);
}

.side-option input:checked + .side-face {
  border-color: var(--olive-2);
  background: #f3efe2;
  box-shadow: inset 0 0 0 1px var(--olive-2);
}

.side-option input:checked + .side-face .side-dot {
  border-color: var(--olive-2);
}

.side-option input:checked + .side-face .side-dot::after {
  scale: 1;
}

.side-option input:focus-visible + .side-face {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
}

.side-option input[aria-invalid="true"] + .side-face {
  border-color: var(--danger);
}

/* "Gia đình có xe đưa đón" — a 21 box, the whole row is the tap target */
.check {
  position: relative;
  display: grid;
  grid-template-columns: 21px minmax(0, 1fr);
  column-gap: var(--s2);
  align-items: start;
  min-height: 55px;
  padding: var(--s2);
  border: 1px solid var(--ink-3);
  background: var(--field);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.check input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.check-box,
.ev-box {
  position: relative;
  width: 21px;
  height: 21px;
  margin-top: 2px;
  border: 1.5px solid var(--ink-3);
  border-radius: 2px;
  background: #fff;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.check-box::after,
.ev-box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid var(--olive-ink);
  border-width: 0 2px 2px 0;
  rotate: 45deg;
  scale: 0;
  transition: scale 0.2s var(--ease);
}

.check-text {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 17px;
  line-height: 24px;
}

.check-sub {
  display: block;
  font-family: var(--f-body);
  font-style: italic;
  font-weight: 400;
  font-size: 15px;
  line-height: 18px;
  color: var(--ink-2);
}

.check:hover {
  border-color: var(--olive);
}

.check:has(input:checked) {
  border-color: var(--olive-2);
  background: #f3efe2;
  box-shadow: inset 0 0 0 1px var(--olive-2);
}

.ev-pick input:checked + .ev-box,
.check input:checked + .check-box {
  border-color: var(--olive-2);
  background: var(--olive-2);
}

.ev-pick input:checked + .ev-box::after,
.check input:checked + .check-box::after {
  scale: 1;
}

.check:has(input:focus-visible) {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
}

.wish-meta {
  display: flex;
  justify-content: space-between;
  gap: var(--s2);
}

.counter {
  margin-left: auto;
  font-size: 15px;
  line-height: 18px;
  color: var(--ink-2);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.banner {
  padding: var(--s1) var(--s2);
  border-left: 3px solid var(--danger);
  color: var(--danger);
  background: rgba(155, 59, 42, 0.06);
}

.submit {
  width: 100%;
  border: 0;
}

.submit:disabled {
  opacity: 0.7;
  cursor: progress;
}

/* after sending: the same letter, the same seal — the guest sees it was received */
.thanks {
  text-align: center;
}

.thanks-title {
  margin-top: var(--s1);
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 26px;
  line-height: 34px;
  text-wrap: balance;
}

.thanks-title:focus {
  outline: none;
}

.thanks-body {
  margin-top: var(--s2);
  font-family: var(--f-display);
  font-style: italic;
  font-size: 21px;
  line-height: 28px;
  color: var(--ink-2);
  text-wrap: balance;
}

.facts {
  display: grid;
  grid-template-columns: 89px minmax(0, 1fr);
  row-gap: var(--s1);
  text-align: left;
}

.facts dt {
  font-family: var(--f-sc);
  font-weight: 600;
  font-size: 13px;
  line-height: 26px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.facts--thanks {
  grid-template-columns: 110px minmax(0, 1fr);
  margin-top: var(--s3);
  padding-block: var(--s3);
  border-block: 1px solid var(--line);
}

.thanks-actions {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  margin-top: var(--s3);
}

.thanks .btn--map {
  color: var(--olive-ink);
  background: var(--olive-2);
}

.thanks .btn--map:hover {
  background: #4a4831;
}

@media (min-width: 900px) {
  .rsvp-grid {
    display: grid;
    grid-template-columns: minmax(0, 407fr) minmax(0, 658fr);
    column-gap: var(--s5);
    align-items: center;
  }

  .rsvp-strip,
  .letter-head {
    display: none;
  }

  .rsvp-intro {
    display: flex;
    flex-direction: column;
    gap: var(--s2);
  }

  .intro-lead {
    font-family: var(--f-display);
    font-style: italic;
    font-size: 21px;
    line-height: 30px;
    color: var(--ink-2);
  }

  .intro-deadline {
    font-family: var(--f-display);
    font-size: 33px;
    line-height: 42px;
    letter-spacing: 0.06em;
  }

  .rsvp-intro .facts {
    margin-top: var(--s3);
    padding-top: var(--s3);
    border-top: 1px solid var(--line);
  }

  .letter {
    margin: 0;
    padding: 68px var(--s5) var(--s5);
  }

  .seal {
    width: 68px;
    height: 68px;
  }

  #register-form {
    gap: var(--s4);
    margin: 0;
  }

  .field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s3);
  }

  .field-row--count {
    grid-template-columns: 160px minmax(0, 1fr);
  }

  .stepper input[type="number"],
  .step {
    height: 53px;
  }

  .side-face {
    padding: var(--s1) var(--s2);
  }

  .thanks-title {
    font-size: 33px;
    line-height: 42px;
  }

  .thanks-actions {
    flex-direction: row;
  }

  .thanks-actions > * {
    flex: 1;
  }
}

/* ================= 10 Lời cảm ơn — dusk, sky lanterns ================= */

.closing {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 522px;
  padding: var(--s6) var(--s4);
  overflow: hidden;
  text-align: center;
  color: var(--olive-ink);
  background:
    radial-gradient(90% 60% at 50% 100%, rgba(214, 150, 84, 0.2), rgba(214, 150, 84, 0) 70%),
    linear-gradient(180deg, #3f3d27 0%, var(--dusk) 55%, #2a2819 100%);
}

.closing-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s3);
}

.closing-text {
  max-width: 658px;
  font-family: var(--f-display);
  font-style: italic;
  font-size: 21px;
  line-height: 30px;
  text-wrap: balance;
}

.closing-names {
  font-family: var(--f-script);
  font-size: 42px;
  line-height: 46px;
  color: #fbf3df;
}

.closing-names span {
  display: block;
}

.closing-names .amp {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 17px;
  line-height: 21px;
  color: #e3cd9c;
}

.closing-date {
  color: var(--olive-ink);
  letter-spacing: 0.3em;
}

@media (min-width: 900px) {
  .closing {
    min-height: 556px;
  }

  .closing-text {
    font-size: 26px;
    line-height: 38px;
  }

  .br-wide {
    display: inline;
  }

  .closing-names {
    font-size: 55px;
    line-height: 68px;
  }

  .closing-names span {
    display: inline;
  }

  .closing-names .amp {
    font-size: 26px;
  }
}

.sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.lantern {
  --w: 26px;
  --x: 50%;
  --dur: 18s;
  --delay: 0s;
  --sway: 18px;
  --rest: -260px;
  position: absolute;
  left: var(--x);
  bottom: -70px;
  width: var(--w);
  height: calc(var(--w) * 58 / 40);
  fill: url(#lantern-glow);
  filter: drop-shadow(0 0 10px rgba(243, 190, 100, 0.6));
  opacity: 0;
  animation: drift var(--dur) var(--delay) linear infinite;
}

.l1 { --x: 8%;  --w: 20px; --dur: 21s; --delay: -3s;  --sway: 22px;  --rest: -300px; }
.l2 { --x: 22%; --w: 28px; --dur: 17s; --delay: -11s; --sway: -16px; --rest: -180px; }
.l3 { --x: 36%; --w: 16px; --dur: 24s; --delay: -6s;  --sway: 14px;  --rest: -420px; }
.l4 { --x: 63%; --w: 24px; --dur: 19s; --delay: -14s; --sway: -20px; --rest: -360px; }
.l5 { --x: 76%; --w: 18px; --dur: 23s; --delay: -1s;  --sway: 16px;  --rest: -240px; }
.l6 { --x: 90%; --w: 27px; --dur: 16s; --delay: -8s;  --sway: -14px; --rest: -400px; }
.l7 { --x: 50%; --w: 14px; --dur: 26s; --delay: -18s; --sway: 10px;  --rest: -470px; }

/* ---------- dock: music (always) + "Xác nhận tham dự" (from the vow to album 2) ---------- */

.dock {
  position: fixed;
  z-index: 40;
  right: max(var(--s3), env(safe-area-inset-right));
  bottom: max(33px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: var(--s1);
  pointer-events: none;
}

.dock > * {
  pointer-events: auto;
}

.dock-rsvp {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 var(--s3);
  font-family: var(--f-sc);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--olive-ink);
  background: var(--olive-2);
  box-shadow: 0 10px 24px -12px rgba(30, 28, 18, 0.6);
  transition: opacity 0.35s ease, translate 0.35s var(--ease);
}

.dock-rsvp.is-off {
  opacity: 0;
  translate: 0 12px;
  pointer-events: none;
}

.dock-music {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(251, 248, 241, 0.96);
  box-shadow: 0 10px 24px -14px rgba(30, 28, 18, 0.6);
  cursor: pointer;
}

.dock-music svg {
  width: 20px;
  height: 20px;
}

.dock-music .ico-on,
.dock-music[aria-pressed="true"] .ico-off {
  display: none;
}

.dock-music[aria-pressed="true"] .ico-on {
  display: block;
}

.dock-music::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  border-top-color: var(--gold);
  border-right-color: rgba(169, 140, 92, 0.4);
  opacity: 0;
}

.dock-music[aria-pressed="true"]::after {
  opacity: 1;
  animation: spin 6s linear infinite;
}

.dock-music.is-hint {
  animation: hint 2.4s ease-in-out infinite;
}

/* album or a photo open: both buttons step aside */
html.lb-open .dock {
  display: none;
}

@media (min-width: 900px) {
  .dock {
    right: max(var(--s4), env(safe-area-inset-right));
  }
}

/* ---------- round 44 buttons (close, back) ---------- */

.ring-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.ring-btn svg {
  width: 20px;
  height: 20px;
}

.ring-btn:hover {
  background: rgba(169, 140, 92, 0.12);
}

.ring-btn--dark {
  border-color: rgba(243, 237, 223, 0.55);
  color: var(--olive-ink);
}

.ring-btn--dark:hover {
  background: rgba(243, 237, 223, 0.12);
}

/* ---------- album sheet: grid 3 (phone) / 5 (desktop), tiles 4 : 5 ---------- */

.sheet {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: var(--cream) url("/assets/paper.jpg") repeat;
  overscroll-behavior: contain;
}

.sheet[open] {
  animation: sheet-in 0.45s var(--ease);
}

.sheet::backdrop {
  background: rgba(44, 40, 35, 0.4);
}

.sheet-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  padding: var(--s3);
  padding-top: max(var(--s3), env(safe-area-inset-top));
  border-bottom: 1px solid var(--line);
  background: rgba(246, 241, 231, 0.96);
}

.sheet-head h2 {
  font-size: 26px;
  line-height: 30px;
}

.sheet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s1);
  padding: var(--s2);
  padding-bottom: max(var(--s4), env(safe-area-inset-bottom));
}

.tile {
  position: relative;
  aspect-ratio: 4 / 5;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--ph);
  cursor: zoom-in;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease, scale 0.8s var(--ease);
}

.tile img.is-loading {
  opacity: 0;
}

.tile:hover img {
  scale: 1.04;
}

.tile:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
}

@media (min-width: 600px) {
  .sheet-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .sheet-head,
  .sheet-grid {
    width: min(100% - 2 * var(--s6), 1120px);
    margin-inline: auto;
    padding-inline: 0;
  }

  .sheet-head {
    padding-block: var(--s4) var(--s3);
  }

  .sheet-head h2 {
    font-size: 33px;
    line-height: 42px;
  }

  .sheet-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--s2);
    padding-top: var(--s4);
  }
}

/* ---------- single photo: dark, whole picture, never cropped ---------- */

.lb {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--olive-ink);
  background: #22201b;
  overscroll-behavior: contain;
}

.lb::backdrop {
  background: #22201b;
}

.lb-bar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) var(--s3);
  padding-top: max(var(--s2), env(safe-area-inset-top));
}

.lb-count {
  margin-left: auto;
  font-family: var(--f-display);
  font-size: 17px;
  letter-spacing: 0.06em;
}

.lb-stage {
  position: absolute;
  inset: var(--s6) 0;
  display: grid;
  place-items: center;
  touch-action: pan-y;
  user-select: none;
}

.lb-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.25s ease;
}

.lb-stage img.is-loading {
  opacity: 0.25;
}

.lb-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(var(--s4), env(safe-area-inset-bottom));
  text-align: center;
  opacity: 0.8;
}

.lb-btn {
  position: absolute;
  top: 50%;
  display: none;
  place-items: center;
  width: 55px;
  height: 55px;
  padding: 0;
  translate: 0 -50%;
  border: 1px solid rgba(243, 237, 223, 0.35);
  border-radius: 50%;
  color: inherit;
  background: rgba(243, 237, 223, 0.06);
  cursor: pointer;
}

.lb-btn svg {
  width: 24px;
  height: 24px;
}

.lb-btn:hover {
  background: rgba(243, 237, 223, 0.16);
}

.lb-btn:focus-visible,
.ring-btn--dark:focus-visible {
  outline: 2px solid var(--olive-ink);
  outline-offset: 2px;
}

.lb-prev {
  left: var(--s4);
}

.lb-next {
  right: var(--s4);
}

@media (min-width: 900px) {
  .lb-btn {
    display: grid;
  }

  .lb-stage {
    inset: var(--s6) var(--s7);
  }

  .lb-hint {
    display: none;
  }

  .lb-bar {
    padding: var(--s3) var(--s4);
  }
}

html.lb-open {
  overflow: hidden;
}

/* ---------- motion ---------- */

.rise {
  animation: rise-in 1.2s var(--ease) both;
}

.hero .mark.rise { animation-delay: 0.1s; }
.hero .kicker.rise { animation-delay: 0.28s; }
.hero .hero-lead.rise { animation-delay: 0.44s; }
.hero .names.rise { animation-delay: 0.6s; }
.hero .date-card.rise { animation-delay: 1.25s; }

html.js [data-reveal] {
  opacity: 0;
  translate: 0 21px;
  transition:
    opacity 1s ease,
    translate 1.1s var(--ease);
}

html.js [data-reveal].is-in {
  opacity: 1;
  translate: 0 0;
}

@keyframes rise-in {
  from {
    opacity: 0;
    translate: 0 13px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes art-in {
  from {
    opacity: 0;
    scale: 1.04;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}

@keyframes sheet-in {
  from {
    opacity: 0;
    translate: 0 21px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes bob {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 4px;
  }
}

@keyframes shimmer {
  to {
    background-position: -300% 0;
  }
}

@keyframes spin {
  to {
    rotate: 1turn;
  }
}

@keyframes hint {
  0%,
  100% {
    box-shadow: 0 10px 24px -14px rgba(30, 28, 18, 0.6), 0 0 0 0 rgba(169, 140, 92, 0.45);
  }
  50% {
    box-shadow: 0 10px 24px -14px rgba(30, 28, 18, 0.6), 0 0 0 9px rgba(169, 140, 92, 0);
  }
}

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0) rotate(-4deg);
    opacity: 0;
  }
  8% {
    opacity: 0.95;
  }
  50% {
    transform: translate3d(var(--sway), -420px, 0) rotate(4deg);
  }
  82% {
    opacity: 0.85;
  }
  100% {
    transform: translate3d(0, -860px, 0) rotate(-3deg);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html.js [data-reveal] {
    opacity: 1;
    translate: 0 0;
  }

  .lantern {
    animation: none;
    opacity: 0.9;
    transform: translateY(var(--rest));
  }
}



/* ================= thiệp 1 — bữa cơm thân mật, rồi lễ Hằng Thuận ================= */

/* cover: one date card, the two events in time order (phone: two rows; desktop: side by side 1 : 1) */
.date-card--two {
  position: relative;
  gap: var(--s2);
  align-items: stretch;
  padding: var(--s3) var(--s2) var(--s2);
}

.two-legend {
  position: absolute;
  top: -9px;
  left: 50%;
  translate: -50% 0;
  padding: 0 var(--s2);
  white-space: nowrap;
  background: var(--card);
}

.two-ev {
  display: grid;
  grid-template-columns: 89px minmax(0, 1fr);
  column-gap: var(--s2);
  align-items: center;
  text-align: left;
}

.two-ev + .two-ev {
  padding-top: var(--s2);
  border-top: 1px solid var(--line);
}

.two-day {
  text-align: center;
}

.two-dm {
  font-family: var(--f-display);
  font-size: 26px;
  line-height: 34px;
  color: var(--ink);
}

.two-at {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 17px;
  line-height: 22px;
  color: var(--ink-2);
}

.two-lunar {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 15px;
  line-height: 18px;
  color: var(--ink-2);
}

@media (min-width: 900px) {
  .date-card--two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 0;
    text-align: center;
  }

  .date-card--two::before {
    grid-column: 1 / -1;
    justify-self: center;
  }

  .two-legend {
    position: static;
    grid-column: 1 / -1;
    translate: none;
    margin-bottom: var(--s3);
    background: none;
  }

  .two-ev {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 var(--s2);
    text-align: center;
  }

  .two-ev + .two-ev {
    padding-top: 0;
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .two-dm {
    font-size: 33px;
    line-height: 42px;
    letter-spacing: 0.06em;
  }

  .two-what {
    display: flex;
    flex-direction: column;
    margin-top: var(--s1);
  }

  /* desktop: the short lunar date sits right under the day, then the event */
  .two-lunar {
    order: -1;
    margin-bottom: var(--s1);
  }
}

/* the meal card: right after the cover, before the ceremony day */
.meal {
  padding: var(--beat) var(--gut) 0;
}

.meal-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  width: min(100%, 560px);
  margin-inline: auto;
  padding: var(--s4) var(--s3);
  text-align: center;
  background: var(--card);
  border: 1px solid var(--gold);
}

.meal-lead {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 21px;
  line-height: 28px;
  text-wrap: balance;
}

.meal-rule {
  width: min(264px, 86%);
  height: 1px;
  margin: var(--s1) 0;
  background: var(--line);
}

.meal-facts {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
}

.meal-fact--date {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.meal-date {
  font-family: var(--f-display);
  font-size: 33px;
  line-height: 42px;
  letter-spacing: 0.06em;
}

.meal-lunar {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 17px;
  line-height: 22px;
  color: var(--ink-2);
}

.meal-addr {
  line-height: 24px;
}

.meal-card .btn {
  align-self: stretch;
  margin-top: var(--s1);
}

@media (max-width: 899px) {
  /* phone order (wireframe): weekday, date, lunar, then time + place, address, button */
  .meal-facts {
    display: contents;
  }

  .meal-fact--time,
  .meal-addr,
  .meal-card .btn {
    order: 1;
  }
}

@media (min-width: 900px) {
  .meal {
    padding-top: var(--s7);
  }

  .meal-card {
    width: min(100% - 2 * var(--s6), 658px);
    padding: var(--s5);
  }

  .meal-lead {
    font-size: 26px;
    line-height: 38px;
  }

  .meal-rule {
    width: 100%;
    margin: var(--s3) 0 var(--s1);
  }

  /* date | time + place, 1 : 1 */
  .meal-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    width: 100%;
    gap: var(--s3);
  }

  .meal-fact--date {
    border-right: 1px solid var(--line);
  }

  .meal-when {
    font-size: 17px;
    line-height: 26px;
  }

  .meal-lunar {
    font-size: 21px;
    line-height: 28px;
  }

  .meal-card .btn {
    align-self: center;
    width: 252px;
    margin-top: var(--s3);
  }
}

/* the ceremony day opens with its date and the full lunar date */
.day-head {
  margin-bottom: var(--s4);
}

.day-lunar {
  margin-top: 5px;
  font-family: var(--f-display);
  font-style: italic;
  font-size: 17px;
  line-height: 22px;
  color: var(--ink-2);
}

@media (min-width: 900px) {
  .day-head {
    margin-bottom: var(--s5);
  }

  .day-lunar {
    font-size: 21px;
    line-height: 28px;
  }
}

/* RSVP: "Quý khách tham dự" — each event its own tick + head count; the car rides with the ceremony */
.events > legend {
  float: left;
  width: 100%;
  margin-bottom: var(--s1);
  padding: 0;
}

.ev-list {
  clear: both;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.ev {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: var(--s1) var(--s2) var(--s2);
  border: 1px solid var(--ink-3);
  background: var(--field);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.ev:has(.ev-pick input:checked) {
  border-color: var(--olive-2);
  box-shadow: inset 0 0 0 1px var(--olive-2);
}

.ev-pick {
  position: relative;
  display: grid;
  grid-template-columns: 21px minmax(0, 1fr);
  column-gap: var(--s1);
  align-items: start;
  min-height: 44px;
  padding-top: 5px;
  cursor: pointer;
}

.ev-pick input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.ev-pick:has(input:focus-visible) {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
}

.ev-name {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 17px;
  line-height: 22px;
}

.ev-when {
  display: block;
  font-family: var(--f-body);
  font-style: italic;
  font-weight: 400;
  font-size: 15px;
  line-height: 18px;
  color: var(--ink-2);
}

.ev-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  margin-top: 5px;
  padding-left: 29px;
}

.stepper--sm {
  grid-template-columns: 44px 44px 44px;
}

.stepper--sm input[type="number"],
.stepper--sm .step {
  height: 42px;
}

.ev .error {
  padding-left: 29px;
}

.ev.is-off .ev-count,
.ev.is-off .check--nested {
  opacity: 0.4;
}

.check--nested {
  margin: var(--s2) 0 0 29px;
  padding: var(--s2) 0 0;
  min-height: 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
}

.check--nested:has(input:checked) {
  border-color: var(--line);
  background: none;
  box-shadow: none;
}

.check--nested input {
  inset: var(--s2) 0 0;
  height: auto;
}

.facts--events dd .muted {
  display: block;
}

.thanks-actions .btn--solid {
  border: 0;
}

@media (min-width: 900px) {
  .ev {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: var(--s3);
    align-items: center;
    padding: var(--s2) var(--s3);
  }

  .ev-count {
    margin: 0;
    padding: 0;
  }

  .ev .error,
  .check--nested {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  /* thiệp 1 has no single head count: nhà trai / nhà gái take the whole row */
  .field-row--count > .side-field:only-child {
    grid-column: 1 / -1;
  }
}


/* an album section whose Drive folder is still empty keeps its place in the design */
.album.is-empty .cluster {
  pointer-events: none;
  cursor: default;
}

.album.is-empty .album-more {
  visibility: hidden;
}

/* the legend of "Quý khách là khách mời của" sits 8 above its boxes, like every other label
   (the fieldset already spaces its children by 8) */
.field > legend {
  margin-bottom: 0;
}

@media (min-width: 900px) {
  /* "Số người" and nhà trai / nhà gái side by side: same top, same 55 height */
  .field-row--count .side-face {
    min-height: 55px;
    padding-block: 6px;
  }

  .field-row--count .side-option,
  .field-row--count .side-face {
    height: 100%;
  }
}
