/* ============================================================
   MEMORY UNIVERSE · LITTLE THINGS · SONG · NEXT CHAPTER
   WEDDING DAY · RSVP · FOOTER · OVERLAYS
   ============================================================ */

/* ============================================================
   MEMORY UNIVERSE
   ============================================================ */

.memories {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(1rem, 0.5rem + 1.5vw, 2rem) var(--gutter);
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  /* Flex chứ không grid: quỹ đạo có mọi con nằm absolute nên bề rộng nội tại
     bằng 0. Trong grid, cột auto co theo max-content và kéo cả stage về ~0. */
  display: flex; flex-direction: column; justify-content: center;
}
.memories::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  /* Phủ đều thay vì radial: quỹ đạo nằm lệch phải, scrim theo tâm che sai chỗ. */
  background:
    linear-gradient(rgba(25,24,23,0.62), rgba(25,24,23,0.62)),
    radial-gradient(ellipse at 50% 45%, rgba(244,227,206,0.06), transparent 62%);
}

/* ---- Photo wall: nền là chính những kỷ niệm đó, làm mờ đi ---- */
.memories__wall {
  position: absolute; inset: -6% 0;
  pointer-events: none; z-index: 0;
  transform: translate3d(0, var(--wall-y, 0px), 0);
}
.wall-tile {
  position: absolute;
  background-size: cover; background-position: center;
  border-radius: 2px;
  border: 1px solid rgba(242,235,225,0.1);
  opacity: 0.5;
  filter: saturate(0.85);
  box-shadow: 0 24px 60px -34px rgba(0,0,0,0.95);
}

/* Tiêu đề và quỹ đạo nằm cùng một hàng, quỹ đạo chiếm phần lớn bề ngang. */
.memories__stage {
  position: relative; z-index: 2;
  max-width: 68rem; margin: 0 auto; width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 19rem) minmax(0, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
  align-items: center;
}

.memories__head { position: relative; }
.memories__title { font-size: clamp(2.2rem, 1rem + 3.4vw, 4.5rem); line-height: 0.98; }
.memories__hint {
  margin-top: 1.4rem; font-size: var(--text-label);
  letter-spacing: 0.16em; color: var(--ink-faint);
}

@media (max-width: 899px) {
  .memories__stage { grid-template-columns: 1fr; gap: clamp(1rem, 3vw, 2rem); }
  .memories__title { font-size: clamp(2.2rem, 1rem + 5vw, 4rem); }
}

/* ---- Orbit --------------------------------------------------- */
/* Kẹp theo svh nữa: màn hình thấp thì quỹ đạo tự nhỏ lại, không đội section
   cao quá một màn hình. */
.orbit {
  position: relative; z-index: 2;
  width: min(100%, 46rem, 76svh);
  aspect-ratio: 1;
  margin: 0 auto;
}

/* Xếp dọc thì tiêu đề ăn mất chiều cao, quỹ đạo phải nhường lại để cả
   section vẫn gói trong một màn hình. Phải đặt SAU rule gốc ở trên,
   không thì bị chính nó ghi đè. */
@media (max-width: 899px) {
  .orbit { width: min(100%, 46rem, 52svh); }
}

.orbit__core {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: grid; place-items: center; gap: 0.2rem;
  width: clamp(5rem, 13vw, 7.5rem); aspect-ratio: 1;
  border-radius: 50%;
  border: var(--hairline);
  background: radial-gradient(circle, rgba(244,227,206,0.14), transparent 70%);
  z-index: 3;
  /* Thuần trang trí. Không có dòng này thì lõi đè lên quả cầu đang bay qua
     và nuốt mất cú bấm. */
  pointer-events: none;
}
.orbit__heart {
  font-size: clamp(1.2rem, 3vw, 1.8rem); color: var(--accent);
  animation: heartbeat 3.2s var(--ease-in-out-soft) infinite;
}
.orbit__us {
  font-size: var(--text-micro); letter-spacing: 0.4em; color: var(--ink-faint);
}
@keyframes heartbeat {
  0%, 70%, 100% { transform: scale(1); }
  35% { transform: scale(1.18); }
}

.orbit__ring { position: absolute; inset: 0; }
/* Vòng quỹ đạo mảnh */
.orbit__ring::before, .orbit__ring::after {
  content: ""; position: absolute; border-radius: 50%;
  border: var(--hairline); opacity: 0.5; pointer-events: none;
}
.orbit__ring::before { inset: 10%; }
.orbit__ring::after  { inset: 28%; }

/* Kích thước tính theo chính quỹ đạo, KHÔNG theo bề ngang màn hình.
   Trước đây cầu cố định theo `vw` còn quỹ đạo co theo `svh`, nên màn hình
   laptop thấp là các cầu chồng lên nhau. Dùng % thì hình học luôn đúng:
   khe giữa hai vòng (0.42−0.20)×0.92 = 0.202 > 0.17 = đường kính cầu. */
.mem {
  position: absolute; left: 50%; top: 50%;
  width: 17%;
  margin: 0; padding: 0; border: 0; background: none; cursor: pointer;
  transform: translate(-50%, -50%) translate(var(--x, 0px), var(--y, 0px));
  transition: filter var(--dur-normal) var(--ease-out-expo);
}
.mem__thumb {
  position: relative;
  width: 100%; aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(216,199,184,0.55);
  box-shadow: 0 18px 40px -22px rgba(0,0,0,0.9);
  background-size: cover; background-position: center;
  filter: saturate(0.8) brightness(0.94);
  transform: scale(1);
  transition: transform var(--dur-normal) var(--ease-spring),
              filter var(--dur-normal) linear,
              border-color var(--dur-normal) linear;
}
/* Ẩn mặc định: 9 nhãn hiện cùng lúc trên quỹ đạo đang quay thì đè lên nhau,
   chữ bị cắt. Chỉ hiện khi hover — riêng quả cầu bí mật luôn hiện. */
.mem__tag {
  display: block; margin-top: 0.55rem; text-align: center;
  font-size: var(--text-micro); letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0; transform: translateY(-4px);
  transition: opacity var(--dur-normal) var(--ease-out-expo),
              transform var(--dur-normal) var(--ease-out-expo),
              color var(--dur-normal) linear;
}
.mem:hover .mem__thumb, .mem:focus-visible .mem__thumb {
  transform: scale(1.16);
  filter: saturate(1.05) brightness(1.06);
  border-color: var(--accent);
}
.mem:hover .mem__tag, .mem:focus-visible .mem__tag {
  opacity: 1; transform: none; color: var(--ink);
}

/* ---- Quả cầu tối: cửa vào phần kỷ niệm giấu kín ---- */
.mem--secret .mem__thumb {
  background: radial-gradient(circle at 38% 32%, #2C2926, #141312 72%);
  border-color: rgba(139,111,90,0.55);
  display: grid; place-items: center;
  filter: none;
}
.mem--secret .mem__mark {
  font-size: 1.15rem; color: var(--accent);
  animation: gatePulse 2.8s var(--ease-in-out-soft) infinite;
}
.mem--secret .mem__tag { opacity: 0.9; transform: none; color: var(--accent); }
.mem--secret:hover .mem__thumb, .mem--secret:focus-visible .mem__thumb {
  filter: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 6px rgba(139,111,90,0.12), 0 18px 40px -22px rgba(0,0,0,0.9);
}
.mem--secret.is-open .mem__thumb { border-color: var(--soft); }
.mem--secret.is-open .mem__mark { animation: none; color: var(--soft); }

@keyframes gatePulse {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50%      { transform: scale(1.22); opacity: 1; }
}

/* Mobile: orbit → rail vuốt ngang */
.orbit.is-rail {
  aspect-ratio: auto; width: auto;
  margin-inline: calc(var(--gutter) * -1);
  display: flex; gap: 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 1rem var(--gutter) 1.5rem;
  -webkit-overflow-scrolling: touch;
}
.orbit.is-rail::-webkit-scrollbar { display: none; }
.orbit.is-rail .orbit__core { display: none; }
.orbit.is-rail .orbit__ring { position: static; display: contents; }
.orbit.is-rail .orbit__ring::before, .orbit.is-rail .orbit__ring::after { display: none; }
.orbit.is-rail .mem {
  position: static; transform: none;
  flex: 0 0 auto; width: 60vw; max-width: 16rem; scroll-snap-align: center;
}
.orbit.is-rail .mem__thumb { border-radius: 3px; aspect-ratio: 4 / 5; filter: none; }
.orbit.is-rail .mem__tag { opacity: 1; transform: none; }

/* ---- Popup dùng chung (secrets) ------------------------------ */
.sheet {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: center; padding: var(--gutter);
}
.sheet__scrim {
  position: absolute; inset: 0;
  background: rgba(25,24,23,0.88);
  backdrop-filter: blur(10px);
  opacity: 0; transition: opacity var(--dur-normal) linear;
}
.sheet.is-open .sheet__scrim { opacity: 1; }

.sheet__card {
  position: relative;
  width: min(46rem, 100%); max-height: 88svh; overflow-y: auto;
  padding: clamp(1.8rem, 4vw, 3rem);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
  background: #191817; color: #F2EBE1;
  border: 1px solid rgba(242,235,225,0.14); border-radius: 4px;
  box-shadow: 0 40px 120px -40px rgba(0,0,0,0.9);
  transform: scale(0.92); opacity: 0;
  transition: transform var(--dur-slow) var(--ease-out-expo),
              opacity var(--dur-normal) linear;
}
.sheet.is-open .sheet__card { transform: none; opacity: 1; }

.sheet__close {
  position: absolute; top: 0.7rem; right: 0.9rem; z-index: 2;
  width: 2.4rem; height: 2.4rem; border: 0; border-radius: 50%;
  background: rgba(242,235,225,0.1); color: #F2EBE1;
  font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.sheet__close:hover { background: rgba(242,235,225,0.2); }

@media (max-width: 720px) {
  .sheet__card { grid-template-columns: 1fr; }
}
.secrets__head h3 {
  margin: 0 0 1rem;
  font-family: "Playfair Display", Georgia, serif; font-weight: 400;
  font-size: clamp(1.6rem, 1rem + 2vw, 2.6rem); line-height: 1.06;
}
.secrets__head h3 em { font-style: italic; color: var(--accent); }
.secrets__head p { margin: 0; color: #9A9089; font-size: var(--text-label); letter-spacing: 0.12em; }

.secrets__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }

.secret {
  position: relative; aspect-ratio: 3 / 4; border-radius: 3px; overflow: hidden;
  background-size: cover; background-position: center;
  border: var(--hairline);
  cursor: grab; touch-action: none;
}
.secret:active { cursor: grabbing; }
.secret__cover { position: absolute; inset: 0; width: 100%; height: 100%; }
.secret__hint {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 0.4rem;
  text-align: center; pointer-events: none;
  font-size: var(--text-micro); letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ink-soft);
  transition: opacity var(--dur-normal) linear;
}
.secret__body {
  position: absolute; inset: auto 0 0 0; padding: 1rem;
  background: linear-gradient(to top, rgba(25,24,23,0.9), transparent);
  color: #F2EBE1;
  opacity: 0; transform: translateY(10px);
  transition: opacity var(--dur-slow) var(--ease-out-expo),
              transform var(--dur-slow) var(--ease-out-expo);
}
.secret__body strong {
  display: block; font-size: var(--text-micro); letter-spacing: 0.24em;
  text-transform: uppercase; opacity: 0.7; margin-bottom: 0.3rem;
}
.secret__body p { margin: 0; font-family: Caveat, cursive; font-size: 1.25rem; line-height: 1.3; }
.secret.is-open .secret__hint { opacity: 0; }
.secret.is-open .secret__body { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .secret__body p { font-size: 1.15rem; }
}

/* ---- Memory detail overlay ---------------------------------- */
.memo {
  position: fixed; inset: 0; z-index: 120;
  display: flex; align-items: center; justify-content: center;
  gap: clamp(0.4rem, 1.5vw, 1.4rem);
  padding: var(--gutter);
}
.memo__scrim {
  position: absolute; inset: 0;
  background: rgba(25,24,23,0.86);
  backdrop-filter: blur(10px);
  opacity: 0; transition: opacity var(--dur-normal) linear;
}
.memo.is-open .memo__scrim { opacity: 1; }

.memo__card {
  position: relative; margin: 0;
  width: min(56rem, 100%);
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  background: #F7F3ED; color: #24211F;
  border-radius: 4px; overflow: hidden;
  box-shadow: 0 40px 120px -40px rgba(0,0,0,0.8);
  transform: scale(0.9); opacity: 0;
  transition: transform var(--dur-slow) var(--ease-out-expo),
              opacity var(--dur-normal) linear;
}
.memo.is-open .memo__card { transform: none; opacity: 1; }

.memo__img {
  aspect-ratio: 4 / 5;
  background-size: cover; background-position: center;
  touch-action: pan-y;
  transition: opacity var(--dur-normal) linear;
}
.memo__img.is-swapping { opacity: 0; }
.memo__card figcaption { padding: clamp(1.4rem, 3vw, 2.4rem); align-self: center; }
.memo__meta {
  margin: 0 0 0.8rem; font-size: var(--text-micro); letter-spacing: 0.22em;
  text-transform: uppercase; color: #9A9089;
}
.memo__title {
  margin: 0 0 1rem;
  font-family: "Playfair Display", Georgia, serif; font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.02;
}
.memo__caption { margin: 0; font-family: Caveat, cursive; font-size: 1.45rem; line-height: 1.4; color: #8B6F5A; }

.memo__count {
  margin: 1.6rem 0 0; padding-top: 1rem;
  border-top: 1px solid rgba(36,33,31,0.14);
  font-size: var(--text-micro); letter-spacing: 0.24em;
  color: #9A9089; font-variant-numeric: tabular-nums;
}
.memo__count i { font-style: normal; margin: 0 0.5em; opacity: 0.5; }

.memo__close {
  position: absolute; top: 0.6rem; right: 0.8rem; z-index: 2;
  width: 2.4rem; height: 2.4rem; border: 0; border-radius: 50%;
  background: rgba(247,243,237,0.9); color: #24211F;
  font-size: 1.4rem; line-height: 1; cursor: pointer;
}

/* ---- Điều hướng trái / phải ---- */
.memo__nav {
  position: relative; z-index: 2; flex: 0 0 auto;
  width: clamp(2.6rem, 4vw, 3.4rem); aspect-ratio: 1;
  display: grid; place-items: center;
  border: 1px solid rgba(242,235,225,0.28); border-radius: 50%;
  background: rgba(242,235,225,0.06); color: #F2EBE1;
  font-size: 1.7rem; line-height: 1; cursor: pointer;
  opacity: 0; transform: scale(0.8);
  transition: opacity var(--dur-normal) var(--ease-out-expo),
              transform var(--dur-normal) var(--ease-spring),
              background var(--dur-fast) linear;
}
.memo__nav span { transform: translateY(-0.12em); }
.memo__nav:hover { background: rgba(242,235,225,0.16); }
.memo.is-open .memo__nav { opacity: 1; transform: none; }

@media (max-width: 720px) {
  .memo { gap: 0; }
  .memo__card { grid-template-columns: 1fr; max-height: 82svh; overflow-y: auto; }
  .memo__img { aspect-ratio: 4 / 3; }
  /* Mobile: nút xuống đáy màn hình — không cắt vào ảnh, ngón cái với tới được */
  .memo__nav {
    position: fixed; top: auto; bottom: 1.4rem; z-index: 3;
    background: rgba(25,24,23,0.74);
    border-color: rgba(242,235,225,0.38);
    backdrop-filter: blur(8px);
    transform: scale(0.8);
  }
  .memo.is-open .memo__nav { transform: none; }
  .memo__nav--prev { left: calc(50% - 5.4rem); }
  .memo__nav--next { right: calc(50% - 5.4rem); }
}

/* ============================================================
   THE LITTLE THINGS
   ============================================================ */

/* Cùng khuôn với Memory Universe: hai cột một hàng, gói trong một màn hình. */
.little {
  padding: clamp(1rem, 0.5rem + 1.5vw, 2rem) var(--gutter);
  background: var(--paper-deep);
  position: relative; overflow: hidden;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
}

.little__stage {
  position: relative; z-index: 2;
  max-width: 68rem; margin: 0 auto; width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 19rem) minmax(0, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
  align-items: center;
}

.little__head { position: relative; }
.little__title { font-size: clamp(2.2rem, 1rem + 3.4vw, 4.5rem); line-height: 0.98; }
.little__hint {
  margin-top: 1.4rem; font-size: var(--text-label);
  letter-spacing: 0.14em; color: var(--ink-faint);
}

.little__field {
  position: relative;
  width: 100%;
  height: min(38rem, 76svh);
}

@media (max-width: 899px) {
  .little__stage { grid-template-columns: 1fr; gap: clamp(1rem, 3vw, 2rem); }
  .little__title { font-size: clamp(2.2rem, 1rem + 5vw, 4rem); }
  /* Xếp dọc: vùng thả thấp lại để gói trong một màn hình. */
  .little__field { height: min(26rem, 52svh); }
}

.thing {
  position: absolute; left: 0; top: 0;
  display: grid; place-items: center; gap: 0.4rem;
  padding: 0.85rem 1rem;
  min-width: 7rem; max-width: 10rem;
  text-align: center;
  background: var(--paper);
  border: var(--hairline); border-radius: 999px;
  box-shadow: var(--shadow-float);
  cursor: grab; touch-action: none; user-select: none;
  transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0) rotate(var(--rot, 0deg));
  transition: box-shadow var(--dur-normal) var(--ease-out-expo),
              border-color var(--dur-normal) linear;
}
.thing:hover { box-shadow: var(--shadow-lift); border-color: var(--accent); }
.thing.is-dragging { cursor: grabbing; box-shadow: var(--shadow-lift); z-index: 5; }
.thing__icon { font-size: 1.4rem; line-height: 1; }
.thing__text { font-family: Caveat, cursive; font-size: 1.02rem; line-height: 1.2; color: var(--ink-soft); }

/* Vùng thả thấp hơn khi xếp dọc, nên vật phải nhỏ theo — nếu không 6 cái
   trôi vào nhau. Phải đặt SAU `.thing` ở trên, không thì bị ghi đè. */
@media (max-width: 899px) {
  .thing { min-width: 6rem; max-width: 8.5rem; padding: 0.7rem 0.85rem; }
  .thing__icon { font-size: 1.2rem; }
  .thing__text { font-size: 0.92rem; }
}

/* ============================================================
   OUR SONG
   ============================================================ */

/* Nội dung nằm trong popup dùng chung `.sheet`, chỉ cần chỉnh tỉ lệ cột. */
.sheet--song .sheet__card {
  width: min(50rem, 100%);
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
}
.sheet--song .eyebrow { margin-bottom: 0.9rem; }
.sheet--song .h-chapter { font-size: clamp(1.5rem, 1rem + 2vw, 2.4rem); }

.vinyl { position: relative; width: min(100%, 26rem); aspect-ratio: 1; margin-inline: auto; }

.vinyl__disc {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    repeating-radial-gradient(circle at center, #201E1C 0 2px, #171615 2px 4px);
  box-shadow: inset 0 0 60px rgba(0,0,0,0.9), 0 30px 60px -30px rgba(0,0,0,0.9);
  display: grid; place-items: center;
  animation: spin 6s linear infinite;
  animation-play-state: paused;
}
.vinyl.is-playing .vinyl__disc { animation-play-state: running; }
.vinyl__disc::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, rgba(244,227,206,0.14), transparent 30%);
  opacity: 0.6;
}

.vinyl__label {
  position: relative; z-index: 2;
  width: 38%; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-content: center; gap: 0.2rem; text-align: center; padding: 0.5rem;
  background: var(--accent); color: #1B1917;
}
.vinyl__label span {
  font-family: "Playfair Display", Georgia, serif; font-size: clamp(0.85rem, 1.8vw, 1.1rem);
  line-height: 1.1;
}
.vinyl__label small { font-size: 0.55rem; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.75; }
.vinyl__label::after {
  content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 9%; aspect-ratio: 1; border-radius: 50%; background: var(--night);
}

.vinyl__arm {
  position: absolute; right: -4%; top: 6%;
  width: 34%; height: 4px; border-radius: 2px;
  background: linear-gradient(to left, #6C635C, #3A3532);
  transform-origin: right center; transform: rotate(-24deg);
  transition: transform var(--dur-slow) var(--ease-out-expo);
}
.vinyl.is-playing .vinyl__arm { transform: rotate(8deg); }

@keyframes spin { to { transform: rotate(360deg); } }

.song__side .btn--night {
  border-color: var(--ink); color: var(--ink); margin-top: 2rem;
}
.song__side .btn--night:hover { background: var(--ink); color: var(--night); }

.song__note {
  margin: 1rem 0 0; font-size: var(--text-label); color: var(--ink-faint);
  letter-spacing: 0.1em; min-height: 1.4em;
}

.wave { width: 100%; height: 64px; margin-top: 1.6rem; opacity: 0.85; }

@media (max-width: 720px) {
  .sheet--song .sheet__card { grid-template-columns: 1fr; }
  .vinyl { width: min(100%, 15rem); }
  .wave { height: 48px; margin-top: 1rem; }
}

/* ============================================================
   THE NEXT CHAPTER — climax
   ============================================================ */

.next { position: relative; height: 320svh; background: var(--paper); }

.next__sticky {
  position: sticky; top: 0;
  height: 100svh; overflow: hidden;
  display: grid; place-items: center;
}

.next__veil {
  position: absolute; inset: 0;
  background: var(--night);
  opacity: var(--veil, 0);
  transition: opacity 120ms linear;
}

.next__burst {
  position: absolute; left: 50%; top: 50%;
  width: 40vmax; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%) scale(var(--burst, 0));
  background: radial-gradient(circle, rgba(244,227,206,0.95), rgba(244,227,206,0.25) 42%, transparent 68%);
  opacity: var(--burst-o, 0);
  pointer-events: none;
}

.next__stage {
  position: relative; z-index: 2;
  grid-area: 1 / 1; align-self: start; margin-top: 13vh;
  display: flex; align-items: flex-end; justify-content: center;
  width: min(100%, 46rem);
  opacity: var(--stage-o, 1);
}
.next__char { width: clamp(80px, 12vw, 150px); }
.next__char--a { transform: translateX(calc(var(--apart, 1) * -34vw)); }
.next__char--b { transform: translateX(calc(var(--apart, 1) * 34vw)) scaleX(-1); }

.next__ring {
  position: absolute; left: 50%; top: 40%;
  transform: translate(-50%, -50%) scale(var(--ring, 0)) rotate(calc(var(--ring, 0) * 360deg));
  font-size: clamp(2rem, 6vw, 4rem);
  filter: drop-shadow(0 0 22px rgba(244,227,206,0.6));
}

/* Chừa chỗ dưới cho nút nổi, nếu không nút đè lên dòng ngày. */
.next__copy {
  grid-area: 1 / 1; align-self: end; margin-bottom: 20vh;
  position: relative; z-index: 3;
  text-align: center; color: #F2EBE1;
  pointer-events: none;
}
.next__line {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif; font-weight: 400;
  line-height: 1;
  opacity: 0; transform: translateY(20px);
  transition: opacity 700ms var(--ease-out-expo), transform 700ms var(--ease-out-expo);
}
.next__line--1 { font-size: clamp(1.6rem, 4vw, 2.6rem); font-style: italic; color: #C9BCAE; }
.next__line--2 { font-size: var(--text-mega); letter-spacing: -0.03em; }
.next__line.is-on { opacity: 1; transform: none; }

.next__date {
  margin: clamp(1.5rem, 4vw, 3rem) 0 0;
  display: flex; align-items: baseline; justify-content: center; gap: clamp(0.8rem, 2.5vw, 2rem);
  font-family: "Playfair Display", Georgia, serif; font-weight: 400;
  font-size: clamp(1.1rem, 2.6vw, 1.9rem); letter-spacing: 0.3em; text-transform: uppercase;
  color: #C9BCAE;
  opacity: 0; transform: translateY(16px);
  transition: opacity 700ms var(--ease-out-expo) 200ms, transform 700ms var(--ease-out-expo) 200ms;
}
.next__date.is-on { opacity: 1; transform: none; }

.next__petals { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; }

/* ============================================================
   NÚT NỔI — mở phần sau climax
   ============================================================ */

.reveal-cta {
  position: fixed; right: clamp(1rem, 2.5vw, 2.5rem); bottom: clamp(1.25rem, 3vh, 2.25rem);
  z-index: 100;
  transform: translateY(180%);
  display: grid; justify-items: center; gap: 0.25rem;
  padding: 0.9rem 1.8rem;
  border: 1px solid rgba(242,235,225,0.4); border-radius: 999px;
  background: rgba(25,24,23,0.82);
  backdrop-filter: blur(12px);
  color: #F2EBE1; cursor: pointer;
  box-shadow: 0 24px 60px -28px rgba(0,0,0,0.9);
  transition: transform var(--dur-slow) var(--ease-spring),
              background var(--dur-fast) linear,
              border-color var(--dur-fast) linear;
}
.reveal-cta.is-on { transform: none; }
.reveal-cta:hover { background: rgba(25,24,23,0.95); border-color: var(--soft); }

.reveal-cta__label {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.25rem; line-height: 1;
}
.reveal-cta__sub {
  font-size: var(--text-micro); letter-spacing: 0.2em;
  text-transform: uppercase; color: #9A9089;
}
.reveal-cta__arrow {
  font-size: 0.9rem; color: var(--accent);
  animation: ctaNudge 2s var(--ease-in-out-soft) infinite;
}

@keyframes ctaNudge {
  0%, 100% { transform: translateY(-2px); opacity: 0.6; }
  50%      { transform: translateY(3px); opacity: 1; }
}

/* Màn hẹp: bỏ phụ đề cho nút gọn lại, tránh đụng nút bài hát bên trái. */
@media (max-width: 560px) {
  .reveal-cta { padding: 0.75rem 1.25rem; }
  .reveal-cta__sub { display: none; }
  .reveal-cta__label { font-size: 1.05rem; }
}

/* ============================================================
   NÚT NỔI BÀI HÁT — luôn hiển thị, bấm mở popup đĩa than
   ============================================================ */

.song-fab {
  position: fixed; left: clamp(1rem, 2.5vw, 2.5rem); bottom: clamp(1.25rem, 3vh, 2.25rem);
  z-index: 100;
  display: inline-flex; align-items: center; gap: 0.65rem;
  padding: 0.6rem 1.1rem 0.6rem 0.6rem;
  border: 1px solid rgba(242,235,225,0.32); border-radius: 999px;
  background: rgba(25,24,23,0.82);
  backdrop-filter: blur(12px);
  color: #F2EBE1; cursor: pointer;
  box-shadow: 0 20px 50px -26px rgba(0,0,0,0.9);
  transition: background var(--dur-fast) linear,
              border-color var(--dur-fast) linear,
              transform var(--dur-fast) var(--ease-out-expo);
}
.song-fab:hover { background: rgba(25,24,23,0.95); border-color: var(--soft); transform: translateY(-2px); }

.song-fab__disc {
  width: 1.6rem; height: 1.6rem; border-radius: 50%; flex: 0 0 auto;
  background: repeating-radial-gradient(circle at center, #2A2725 0 1.5px, #171615 1.5px 3px);
  box-shadow: inset 0 0 0 1px rgba(242,235,225,0.18);
  position: relative;
  animation: spin 4s linear infinite;
  animation-play-state: paused;
}
.song-fab__disc::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 0.42rem; height: 0.42rem; border-radius: 50%; background: var(--accent);
}
.song-fab.is-playing .song-fab__disc { animation-play-state: running; }

.song-fab__label {
  font-size: var(--text-micro); letter-spacing: 0.22em; text-transform: uppercase;
}

@media (max-width: 560px) {
  .song-fab { padding: 0.5rem; gap: 0; }
  .song-fab__label { display: none; }
}

/* ============================================================
   WEDDING DAY
   ============================================================ */

.day { padding: var(--space-section) var(--gutter); }
.day__head { max-width: 68rem; margin: 0 auto clamp(2.5rem, 6vw, 4.5rem); }
.day__head .h-display em { font-style: normal; color: var(--accent); }
.day__sub {
  margin: 1.2rem 0 0; font-size: var(--text-label);
  letter-spacing: 0.26em; text-transform: uppercase; color: var(--ink-faint);
}

.day__cards {
  max-width: 68rem; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1px; background: rgba(36,33,31,0.14);
  border: var(--hairline);
}
.day__card { background: var(--paper); padding: clamp(1.6rem, 3.5vw, 2.6rem); }
.day__card h3 {
  margin: 0 0 1.2rem; font-size: var(--text-label);
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-faint); font-weight: 500;
}
.day__time {
  margin: 0; font-family: "Playfair Display", Georgia, serif; font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1;
}
.day__time small { font-size: 0.34em; letter-spacing: 0.2em; margin-left: 0.4rem; }
.day__desc { margin: 0.9rem 0 0; color: var(--ink-soft); font-size: 0.95rem; }

.day__lower {
  max-width: 68rem; margin: clamp(3rem, 7vw, 5rem) auto 0;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
}

.day__schedule ol { list-style: none; margin: 0; padding: 0; }
.day__row {
  display: grid; grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 1.2rem; align-items: baseline;
  padding: 1.1rem 0; border-bottom: var(--hairline);
}
.day__row time {
  font-variant-numeric: tabular-nums; letter-spacing: 0.1em;
  font-size: 0.95rem; color: var(--accent);
}
.day__row span { font-size: 0.98rem; }

.day__aside { display: grid; gap: 1.5rem; align-content: start; }
.day__panel { padding: clamp(1.4rem, 3vw, 2rem); border: var(--hairline); background: var(--paper-deep); }
.day__venue {
  margin: 0 0 0.4rem; font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 400;
}
.day__addr { margin: 0 0 1.5rem; color: var(--ink-soft); font-size: 0.95rem; }
.day__dress { margin: 0 0 1.2rem; color: var(--ink-soft); font-size: 0.95rem; }

.day__swatches { display: flex; gap: 0.6rem; }
.day__swatch {
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  border: 1px solid rgba(36,33,31,0.16);
}

@media (max-width: 860px) {
  .day__lower { grid-template-columns: 1fr; }
  .day__row { grid-template-columns: 4.5rem minmax(0, 1fr); gap: 0.8rem; }
}

/* ============================================================
   RSVP
   ============================================================ */

.rsvp {
  position: relative; overflow: hidden;
  padding: var(--space-section) var(--gutter);
  background: var(--paper-deep);
  text-align: center;
}
.rsvp__confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.rsvp__inner { position: relative; z-index: 2; max-width: 50rem; margin: 0 auto; }

.rsvp__chibi { width: clamp(110px, 18vw, 190px); margin: 0 auto 2rem; }
.rsvp .h-display { margin-bottom: clamp(2rem, 5vw, 3.5rem); }

.rsvp__actions { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; }

.rsvp__btn {
  display: grid; gap: 0.3rem; justify-items: center;
  padding: 1.8rem 2.4rem; min-width: 13rem;
  border: 1px solid var(--ink); border-radius: 4px;
  background: var(--paper); cursor: pointer;
  transition: transform var(--dur-normal) var(--ease-spring),
              background var(--dur-normal) linear, color var(--dur-normal) linear;
}
.rsvp__btn:hover { transform: translateY(-4px); }
.rsvp__btn strong {
  font-family: "Playfair Display", Georgia, serif; font-weight: 400;
  font-size: 2rem; line-height: 1;
}
.rsvp__btn small { font-size: var(--text-micro); letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-faint); }
.rsvp__emoji { font-size: 1.6rem; }
.rsvp__btn--yes:hover { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.rsvp__btn--yes:hover small { color: rgba(247,243,237,0.75); }
.rsvp__btn--no:hover { background: var(--soft); }

.rsvp__result { display: grid; gap: 0.8rem; justify-items: center; }
.rsvp__result-title {
  margin: 0; font-family: "Playfair Display", Georgia, serif; font-weight: 400;
  font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1;
}
.rsvp__result-sub { margin: 0 0 1rem; font-family: Caveat, cursive; font-size: 1.5rem; color: var(--accent); }
.rsvp__redo {
  border: 0; background: none; cursor: pointer;
  font-size: var(--text-micro); letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-faint); text-decoration: underline; text-underline-offset: 4px;
}

/* ============================================================
   FOOTER + TOAST
   ============================================================ */

.foot {
  background: var(--night); color: var(--ink);
  padding: clamp(4rem, 10vw, 7rem) var(--gutter);
  text-align: center;
}
.foot__initials {
  margin: 0 0 1.2rem; font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.2rem, 6vw, 3.4rem); letter-spacing: 0.14em; font-weight: 400;
}
.foot__initials i { color: var(--accent); font-style: normal; margin: 0 0.4em; font-size: 0.72em; }
.foot__line { margin: 0 0 2.4rem; font-family: Caveat, cursive; font-size: 1.5rem; color: var(--ink-soft); }
.foot__meta {
  margin: 0; font-size: var(--text-micro); letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--ink-faint);
}
.foot__star {
  border: 0; background: none; cursor: pointer; margin-left: 0.6rem;
  color: var(--ink-faint); font-size: 0.9rem;
  transition: color var(--dur-normal) linear, transform var(--dur-normal) var(--ease-spring);
}
.foot__star:hover { color: var(--accent); transform: scale(1.4) rotate(90deg); }

.toast {
  position: fixed; left: 50%; bottom: 2rem; z-index: 150;
  transform: translate(-50%, 140%);
  max-width: min(24rem, calc(100vw - 2rem));
  padding: 1rem 1.4rem;
  background: var(--night); color: #F2EBE1;
  border-radius: 3px; box-shadow: var(--shadow-lift);
  font-family: Caveat, cursive; font-size: 1.3rem; line-height: 1.35; text-align: center;
  transition: transform var(--dur-slow) var(--ease-spring);
}
.toast.is-on { transform: translate(-50%, 0); }

/* ============================================================
   REDUCED MOTION (cho các section ở file này)
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  /* Climax thành một cảnh tĩnh xếp dọc — không còn sticky, không chồng chữ lên nhân vật. */
  .next { height: auto; }
  .next__sticky {
    position: static; height: auto; display: block; text-align: center;
    padding: var(--space-section) var(--gutter); background: var(--night);
  }
  .next__stage {
    grid-area: auto; align-self: auto; margin: 0 auto clamp(2.5rem, 6vw, 4.5rem);
    --apart: 0.2; --stage-o: 1;
  }
  .next__copy { grid-area: auto; align-self: auto; margin: 0 auto; }
  .next__ring { --ring: 1; position: static; transform: none; align-self: center; }
  .next__line, .next__date { opacity: 1; transform: none; }
  .next__veil, .next__burst, .next__petals { display: none; }

  .mem__tag { opacity: 1; transform: none; }
  .mem--secret .mem__mark { animation: none; opacity: 1; }
  .reveal-cta__arrow { animation: none; }
  .sheet__card { transition: none; }
  .memories__wall { transform: none; }
  .memo__nav { opacity: 1; transform: none; }
  .memo__img.is-swapping { opacity: 1; }
  .orbit__heart { animation: none; }
  .vinyl__disc { animation: none; }
  .secret__hint { opacity: 1; }
  .thing { transition: none; }
}
