* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family:
    "Nunito",
    system-ui,
    -apple-system,
    Segoe UI,
    sans-serif;
  background: #fffaf0;
  color: #23312f;
  overflow-x: hidden;
}
a {
  text-decoration: none;
  color: inherit;
}
img {
  max-width: 100%;
  display: block;
}
.section {
  width: min(1120px, 92%);
  margin: 0 auto;
  padding: 86px 0;
}
.eyebrow {
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}
.muted {
  color: #66736f;
}
.btn {
  border: 0;
  border-radius: 999px;
  padding: 14px 24px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: 0.25s ease;
  font-family: inherit;
}
.btn.primary {
  background: linear-gradient(135deg, var(--primary), #14b8a6);
  color: #fff;
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.22);
}
.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(15, 118, 110, 0.32);
}
.btn.ghost {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}
.btn.full {
  width: 100%;
  font-size: 1rem;
}
.welcome-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(
    circle at 50% 20%,
    #fff 0,
    #fef3c7 32%,
    #ccfbf1 100%
  );
  display: grid;
  place-items: center;
  padding: 24px;
  transition: 0.75s ease;
}
.welcome-screen.hide {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.04);
}
.welcome-card {
  position: relative;
  width: min(520px, 100%);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 36px;
  padding: 40px 28px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(24, 78, 72, 0.22);
  overflow: hidden;
}
.welcome-card:before,
.welcome-card:after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  opacity: 0.65;
}
.welcome-card:before {
  width: 150px;
  height: 150px;
  left: -45px;
  top: -40px;
  background: #f59e0b;
}
.welcome-card:after {
  width: 120px;
  height: 120px;
  right: -40px;
  bottom: -38px;
  background: #14b8a6;
}
.welcome-card > * {
  position: relative;
}
.welcome-card h1,
.hero h1 {
  font-family: "Playfair Display", serif;
  line-height: 1.05;
}
.welcome-card h1 {
  font-size: clamp(2rem, 8vw, 4rem);
  margin: 12px 0;
  color: var(--primary);
}
.welcome-card h2 {
  font-size: clamp(1.25rem, 5vw, 2rem);
  margin: 0 0 18px;
  color: #4b3427;
}
.mini-title,
.bismillah {
  font-size: 1.08rem;
  color: #7c5a1d;
}
.moon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent);
  margin: 0 auto 10px;
  box-shadow: 18px 0 0 #fff7ed inset;
}
.floating-shapes span {
  position: absolute;
  border-radius: 50%;
  animation: float 5s ease-in-out infinite;
}
.floating-shapes span:nth-child(1) {
  width: 54px;
  height: 54px;
  background: #14b8a6;
  left: 8%;
  top: 16%;
}
.floating-shapes span:nth-child(2) {
  width: 34px;
  height: 34px;
  background: #f59e0b;
  right: 14%;
  top: 20%;
  animation-delay: 0.8s;
}
.floating-shapes span:nth-child(3) {
  width: 42px;
  height: 42px;
  background: #0ea5e9;
  left: 13%;
  bottom: 16%;
  animation-delay: 1.4s;
}
.floating-shapes span:nth-child(4) {
  width: 70px;
  height: 70px;
  background: #fff;
  right: 8%;
  bottom: 12%;
  animation-delay: 2s;
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-22px);
  }
}
.music-toggle {
  position: fixed;
  right: 18px;
  bottom: calc(98px + env(safe-area-inset-bottom));
  z-index: 80;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-size: 1.45rem;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}
.music-toggle.playing {
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55);
  }
  70% {
    box-shadow: 0 0 0 18px rgba(245, 158, 11, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}
.hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  padding: 82px 20px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
}
.hero:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 250, 240, 0.38),
    rgba(255, 250, 240, 0.94)
  );
  z-index: -1;
}
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 70;
  width: min(94%, 560px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 8px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    0 18px 50px rgba(15, 118, 110, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(18px);
}

.bottom-nav a {
  min-height: 58px;
  padding: 8px 6px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #40534f;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.1;
  transition: 0.22s ease;
}

.bottom-nav a:hover {
  background: #ffffff;
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.12);
}

.bottom-nav .nav-icon {
  font-size: 1.18rem;
  line-height: 1;
}
.hero-content {
  width: min(840px, 96%);
  text-align: center;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 80px rgba(15, 118, 110, 0.16);
  border-radius: 44px;
  padding: 52px 32px;
  backdrop-filter: blur(12px);
}
.pill {
  display: inline-flex;
  background: #fff4d6;
  color: #855d06;
  border: 1px solid #fde68a;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 900;
}
.hero h1 {
  font-size: clamp(2.5rem, 10vw, 6.6rem);
  margin: 14px 0 0;
  color: var(--primary);
}
.hero h2 {
  font-size: clamp(1.35rem, 5vw, 2.5rem);
  margin: 8px 0 16px;
  color: #43302a;
}
.opening {
  font-size: 1.08rem;
  line-height: 1.8;
  max-width: 700px;
  margin: 0 auto 26px;
  color: #42534f;
}
.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.child-section {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 54px;
  align-items: center;
}
.child-photo {
  border-radius: 44px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.1);
  transform: rotate(-2deg);
}
.child-photo img {
  border-radius: 34px;
}
.child-section h2,
.countdown h2,
.event-section h2,
.gallery-section h2,
.rsvp-section h2,
.wishes-section h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-family: "Playfair Display", serif;
  color: #2b413d;
  margin: 0 0 18px;
}
.child-section h3 {
  font-size: clamp(1.4rem, 4vw, 2.3rem);
  margin: 0 0 8px;
  color: var(--primary);
}
.parents {
  font-weight: 800;
  color: #52625e;
}
.soft-card {
  background: #fff;
  border-radius: 28px;
  padding: 22px;
  line-height: 1.8;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid #fff;
}
.countdown {
  text-align: center;
}
.count-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 28px;
}
.count-grid div {
  background: #fff;
  border-radius: 28px;
  padding: 25px 12px;
  box-shadow: 0 15px 42px rgba(0, 0, 0, 0.08);
  border: 1px solid #f1f5f9;
}
.count-grid strong {
  display: block;
  font-size: clamp(2rem, 7vw, 4.5rem);
  color: var(--primary);
  line-height: 1;
}
.count-grid span {
  font-weight: 900;
  color: #6b7280;
}
.event-section {
  text-align: center;
}
.event-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  text-align: center;
  margin: 28px 0;
}
.event-cards article {
  background: #fff;
  border-radius: 30px;
  padding: 28px 18px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.08);
}
.event-cards .icon {
  font-size: 2.2rem;
}
.event-cards h3 {
  color: var(--primary);
  margin-bottom: 8px;
}
.event-cards p {
  line-height: 1.7;
}
.map-btn {
  margin-top: 8px;
}
.gallery-section {
  text-align: center;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
}
.gallery-item {
  position: relative;
  border: 0;
  padding: 0;
  background: #fff;
  border-radius: 30px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.08);
}
.gallery-item img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: 0.35s;
}
.gallery-item:hover img {
  transform: scale(1.06);
}
.gallery-item span {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 12px;
  font-weight: 900;
  color: #1f3833;
}
.rsvp-section {
  display: grid;
  place-items: center;
}
.form-card {
  width: min(820px, 100%);
  background: #fff;
  border-radius: 36px;
  padding: 34px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.1);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
label {
  display: block;
  text-align: left;
  font-weight: 900;
  margin: 14px 0 6px;
  color: #33413f;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #dbe4e2;
  border-radius: 18px;
  padding: 14px 15px;
  font: inherit;
  background: #fbfdfc;
  outline: 0;
  transition: 0.2s;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
}
textarea {
  resize: vertical;
}
.form-status {
  font-weight: 900;
  min-height: 22px;
}
.form-status.ok {
  color: var(--primary);
}
.form-status.error {
  color: #dc2626;
}
.wishes-section {
  text-align: center;
}
.wish-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.wish-card {
  text-align: left;
  background: #fff;
  border-radius: 28px;
  padding: 22px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.08);
  border-left: 6px solid var(--accent);
}
.wish-card strong {
  color: var(--primary);
}
.wish-card p {
  line-height: 1.7;
  color: #4b5a56;
}
footer {
  text-align: center;
  background: #0f2f2b;
  color: #eafffb;
  padding: 20px 20px;
  line-height: 1.8;
}
footer a {
  color: #fde68a;
  font-weight: 900;
}
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(12, 24, 22, 0.86);
  z-index: 80;
  display: none;
  place-items: center;
  text-align: center;
  padding: 24px;
}
.lightbox.show {
  display: grid;
}
.lightbox img {
  max-width: min(900px, 94vw);
  max-height: 70vh;
  border-radius: 28px;
  box-shadow: 0 30px 80px #0008;
  background: #fff;
}
.lightbox h3 {
  color: #fff;
  margin: 16px 0 4px;
}
.lightbox p {
  color: #dff7f3;
  max-width: 680px;
}
.lightbox button {
  position: absolute;
  top: 20px;
  right: 22px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 2rem;
  border: 0;
  background: #fff;
  color: #102522;
  cursor: pointer;
}
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.75s ease,
    transform 0.75s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.confetti {
  position: fixed;
  top: -10px;
  width: 10px;
  height: 16px;
  background: var(--accent);
  z-index: 9999;
  animation: confettiFall 2.8s linear forwards;
}
@keyframes confettiFall {
  to {
    transform: translateY(105vh) rotate(720deg);
    opacity: 0;
  }
}
@media (max-width: 800px) {
  .bottom-nav {
    width: calc(100% - 24px);
    grid-template-columns: repeat(5, 1fr);
    border-radius: 24px;
  }

  .bottom-nav a {
    min-height: 56px;
    font-size: 0.72rem;
    padding: 8px 4px;
  }

  .bottom-nav .nav-icon {
    font-size: 1.08rem;
  }
  .hero-content {
    padding: 38px 20px;
    border-radius: 32px;
  }
  .section {
    padding: 64px 0;
  }
  .child-section {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }
  .child-photo {
    width: min(330px, 100%);
    margin: auto;
  }
  .count-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .event-cards,
  .gallery-grid,
  .wish-list {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .gallery-item img {
    height: 250px;
  }
  .welcome-card {
    padding: 34px 20px;
  }
}

@media (max-width: 430px) {
  .count-grid {
    gap: 10px;
  }

  .count-grid div {
    border-radius: 22px;
    padding: 20px 6px;
  }

  .btn {
    width: 100%;
  }

  .music-toggle {
    right: 14px;
    bottom: calc(94px + env(safe-area-inset-bottom));
    width: 50px;
    height: 50px;
    font-size: 1.35rem;
  }

  .bottom-nav {
    width: calc(100% - 18px);
    bottom: calc(10px + env(safe-area-inset-bottom));
    padding: 7px;
    gap: 4px;
  }

  .bottom-nav a {
    min-height: 52px;
    border-radius: 18px;
    font-size: 0.68rem;
  }

  .bottom-nav .nav-icon {
    font-size: 1rem;
  }

  .form-card {
    padding: 24px 18px;
    border-radius: 28px;
  }
}

/* nama tamu */
.guest-label {
  margin: 12px 0 4px;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7c5a1d;
}

.guest-name {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 18px;
  padding: 12px 20px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--primary);
  font-size: clamp(1.05rem, 4vw, 1.55rem);
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.12);
  border: 1px solid rgba(15, 118, 110, 0.12);
}

.open-envelope-btn {
  min-width: 220px;
}

.envelope-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  animation: envelopeFloat 2.4s ease-in-out infinite;
}

.music-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@keyframes envelopeFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }

  50% {
    transform: translateY(-3px) rotate(3deg);
  }
}

.envelope-screen {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at top left,
      rgba(245, 158, 11, 0.28),
      transparent 34%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(15, 118, 110, 0.26),
      transparent 38%
    ),
    linear-gradient(135deg, #fff7e6 0%, #f8ead0 45%, #e9f7f4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}

.envelope-wrapper {
  position: relative;
  width: min(92vw, 540px);
  animation: envelopeAppear 0.8s ease both;
}

.envelope-card {
  position: relative;
  min-height: 620px;
  border-radius: 34px;
  background:
    linear-gradient(
      150deg,
      rgba(255, 255, 255, 0.96),
      rgba(255, 250, 239, 0.96)
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(15, 118, 110, 0.06) 0,
      rgba(15, 118, 110, 0.06) 8px,
      transparent 8px,
      transparent 18px
    );
  box-shadow:
    0 30px 80px rgba(77, 52, 14, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  overflow: hidden;
  border: 1px solid rgba(124, 90, 29, 0.18);
}

.envelope-card::before,
.envelope-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  pointer-events: none;
  z-index: 1;
}

.envelope-card::before {
  clip-path: polygon(0 0, 50% 55%, 100% 0, 100% 100%, 0 100%);
  background: linear-gradient(
    135deg,
    rgba(15, 118, 110, 0.14),
    rgba(245, 158, 11, 0.16)
  );
}

.envelope-card::after {
  clip-path: polygon(0 18%, 50% 78%, 100% 18%, 100% 100%, 0 100%);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.52),
    rgba(255, 247, 230, 0.74)
  );
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 210px;
  background: linear-gradient(
    135deg,
    rgba(15, 118, 110, 0.18),
    rgba(245, 158, 11, 0.16)
  );
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  z-index: 1;
  border-top-left-radius: 34px;
  border-top-right-radius: 34px;
}

.envelope-inner {
  position: relative;
  z-index: 2;
  min-height: 620px;
  padding: 46px 32px 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
}

.bismillah-text {
  margin: 0;
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  color: #7c5a1d;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.stamp-badge {
  position: absolute;
  top: 28px;
  right: 26px;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  border: 2px dashed rgba(15, 118, 110, 0.55);
  background: rgba(255, 255, 255, 0.72);
  color: var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: rotate(8deg);
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.12);
}

.stamp-badge span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stamp-badge strong {
  font-size: 1.02rem;
  font-weight: 950;
}

.recipient-box {
  width: 100%;
  margin-top: 52px;
  padding: 28px 22px;
  border-radius: 28px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.92),
    rgba(255, 255, 255, 0.72)
  );
  border: 1px solid rgba(15, 118, 110, 0.14);
  box-shadow: 0 18px 42px rgba(15, 118, 110, 0.12);
}

.recipient-label {
  margin: 0 0 10px;
  color: #7c5a1d;
  font-size: 0.92rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.recipient-name {
  margin: 0;
  color: var(--primary);
  font-size: clamp(1.8rem, 7vw, 3rem);
  font-weight: 950;
  line-height: 1.15;
  text-wrap: balance;
}

.recipient-note {
  margin: 12px 0 0;
  color: #8a6b33;
  font-size: 0.98rem;
  font-weight: 700;
}

.event-summary {
  width: 100%;
  padding: 18px 20px;
  border-radius: 24px;
  background: rgba(255, 247, 230, 0.78);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.summary-title {
  margin: 0;
  color: #7c5a1d;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.summary-theme {
  margin: 8px 0 0;
  color: #24433f;
  font-size: 1.05rem;
  font-weight: 850;
}

.open-note {
  max-width: 410px;
  margin: 0;
  color: #56635f;
  font-size: 0.98rem;
  line-height: 1.7;
}

.open-envelope-btn {
  margin-top: 4px;
  min-width: 230px;
  border-radius: 999px;
  gap: 10px;
  box-shadow: 0 18px 34px rgba(15, 118, 110, 0.22);
}

.envelope-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  animation: envelopeFloat 2.4s ease-in-out infinite;
}

.envelope-shadow {
  width: 86%;
  height: 34px;
  margin: 24px auto 0;
  border-radius: 999px;
  background: rgba(77, 52, 14, 0.18);
  filter: blur(18px);
}

.envelope-floating span {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(15, 118, 110, 0.1);
}

@keyframes envelopeFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }

  50% {
    transform: translateY(-4px) rotate(3deg);
  }
}

@keyframes envelopeAppear {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 520px) {
  .envelope-screen {
    padding: 16px;
  }

  .envelope-card {
    min-height: 590px;
    border-radius: 28px;
  }

  .envelope-inner {
    min-height: 590px;
    padding: 40px 20px 34px;
  }

  .stamp-badge {
    top: 20px;
    right: 18px;
    width: 78px;
    height: 78px;
  }

  .stamp-badge span {
    font-size: 0.62rem;
  }

  .stamp-badge strong {
    font-size: 0.88rem;
  }

  .recipient-box {
    margin-top: 62px;
    padding: 24px 16px;
  }

  .recipient-name {
    font-size: clamp(1.65rem, 8vw, 2.35rem);
  }

  .open-note {
    font-size: 0.92rem;
  }
}

.envelope-screen {
  min-height: 100vh;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(
      circle at 12% 12%,
      rgba(245, 158, 11, 0.22),
      transparent 30%
    ),
    radial-gradient(
      circle at 88% 88%,
      rgba(15, 118, 110, 0.24),
      transparent 34%
    ),
    linear-gradient(135deg, #fff8e7 0%, #f6ead1 48%, #e8f7f4 100%);
  overflow: hidden;
}

.front-envelope-wrapper {
  position: relative;
  width: min(92vw, 560px);
  animation: frontEnvelopeIn 0.8s ease both;
}

.front-envelope-card {
  position: relative;
  min-height: 620px;
  padding: 18px;
  border-radius: 36px;
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.94),
      rgba(255, 247, 230, 0.94)
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(15, 118, 110, 0.055) 0,
      rgba(15, 118, 110, 0.055) 8px,
      transparent 8px,
      transparent 18px
    );
  box-shadow:
    0 35px 90px rgba(73, 50, 17, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(124, 90, 29, 0.16);
  overflow: hidden;
}

.front-envelope-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(150deg, rgba(245, 158, 11, 0.14), transparent 38%),
    linear-gradient(330deg, rgba(15, 118, 110, 0.16), transparent 42%);
  pointer-events: none;
}

.front-envelope-card::after {
  content: "";
  position: absolute;
  left: -15%;
  right: -15%;
  bottom: -22%;
  height: 48%;
  background: linear-gradient(
    135deg,
    rgba(15, 118, 110, 0.14),
    rgba(245, 158, 11, 0.13)
  );
  clip-path: polygon(0 0, 50% 55%, 100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}

.front-envelope-border {
  position: relative;
  z-index: 2;
  min-height: 584px;
  padding: 48px 32px 42px;
  border-radius: 28px;
  border: 2px solid rgba(15, 118, 110, 0.18);
  outline: 1px solid rgba(245, 158, 11, 0.28);
  outline-offset: -9px;
  background: rgba(255, 255, 255, 0.48);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  text-align: center;
  backdrop-filter: blur(3px);
}

.front-stamp {
  position: absolute;
  top: 26px;
  right: 28px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px dashed rgba(15, 118, 110, 0.55);
  background: rgba(255, 255, 255, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(8deg);
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.13);
}

.front-stamp span {
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.front-bismillah {
  margin: 0 0 8px;
  color: #7c5a1d;
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  font-weight: 850;
  letter-spacing: 0.02em;
}

.front-recipient {
  width: 100%;
  padding: 34px 24px;
  border-radius: 30px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.96),
    rgba(255, 255, 255, 0.72)
  );
  border: 1px solid rgba(15, 118, 110, 0.15);
  box-shadow:
    0 22px 48px rgba(15, 118, 110, 0.13),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.front-label {
  margin: 0 0 12px;
  color: #7c5a1d;
  font-size: 0.9rem;
  font-weight: 950;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.front-guest-name {
  margin: 0;
  color: var(--primary);
  font-size: clamp(2rem, 7vw, 3.25rem);
  font-weight: 950;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.front-location {
  margin: 14px 0 0;
  color: #8a6b33;
  font-size: 0.98rem;
  font-weight: 800;
}

.front-divider {
  width: min(72%, 320px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.front-divider span {
  display: block;
  height: 1px;
  flex: 1;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(124, 90, 29, 0.45),
    transparent
  );
}

.front-divider i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.16);
}

.front-event-type {
  margin: 0;
  color: #24433f;
  font-size: clamp(1.35rem, 5vw, 2.2rem);
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.open-envelope-btn {
  min-width: 230px;
  margin-top: 6px;
  border-radius: 999px;
  gap: 10px;
  box-shadow:
    0 18px 34px rgba(15, 118, 110, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.envelope-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  animation: envelopeFloat 2.4s ease-in-out infinite;
}

.front-envelope-shadow {
  width: 86%;
  height: 34px;
  margin: 24px auto 0;
  border-radius: 999px;
  background: rgba(77, 52, 14, 0.18);
  filter: blur(18px);
}

.corner-ornament {
  position: absolute;
  z-index: 3;
  width: 70px;
  height: 70px;
  border-color: rgba(15, 118, 110, 0.35);
  pointer-events: none;
}

.corner-ornament.top-left {
  top: 28px;
  left: 28px;
  border-top: 2px solid;
  border-left: 2px solid;
  border-top-left-radius: 20px;
}

.corner-ornament.top-right {
  top: 28px;
  right: 28px;
  border-top: 2px solid;
  border-right: 2px solid;
  border-top-right-radius: 20px;
}

.corner-ornament.bottom-left {
  bottom: 28px;
  left: 28px;
  border-bottom: 2px solid;
  border-left: 2px solid;
  border-bottom-left-radius: 20px;
}

.corner-ornament.bottom-right {
  bottom: 28px;
  right: 28px;
  border-bottom: 2px solid;
  border-right: 2px solid;
  border-bottom-right-radius: 20px;
}

.envelope-floating span {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(15, 118, 110, 0.1);
}

@keyframes envelopeFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }

  50% {
    transform: translateY(-4px) rotate(3deg);
  }
}

@keyframes frontEnvelopeIn {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 520px) {
  .envelope-screen {
    padding: 16px;
  }

  .front-envelope-card {
    min-height: 590px;
    padding: 14px;
    border-radius: 30px;
  }

  .front-envelope-border {
    min-height: 562px;
    padding: 44px 18px 34px;
    border-radius: 24px;
    gap: 18px;
  }

  .front-stamp {
    top: 20px;
    right: 20px;
    width: 76px;
    height: 76px;
  }

  .front-stamp span {
    font-size: 0.62rem;
  }

  .front-recipient {
    padding: 30px 16px;
  }

  .front-guest-name {
    font-size: clamp(1.85rem, 8vw, 2.45rem);
  }

  .front-event-type {
    font-size: clamp(1.15rem, 5.4vw, 1.65rem);
  }

  .corner-ornament {
    width: 50px;
    height: 50px;
  }

  .corner-ornament.top-left,
  .corner-ornament.top-right {
    top: 22px;
  }

  .corner-ornament.bottom-left,
  .corner-ornament.bottom-right {
    bottom: 22px;
  }

  .corner-ornament.top-left,
  .corner-ornament.bottom-left {
    left: 22px;
  }

  .corner-ornament.top-right,
  .corner-ornament.bottom-right {
    right: 22px;
  }
}

body {
  padding-bottom: 104px;
}

footer {
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

.wish-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.wish-head strong {
  color: var(--primary);
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.35;
}

.wish-head span {
  flex-shrink: 0;
  max-width: 180px;
  color: #8a6b33;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.4;
  text-align: right;
}

.wish-card p {
  margin-top: 6px;
}

@media (max-width: 520px) {
  .wish-head {
    flex-direction: column;
    gap: 4px;
  }

  .wish-head span {
    max-width: 100%;
    text-align: left;
    font-size: 0.74rem;
  }
}

.wish-load-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.wish-load-wrapper .btn {
  width: auto;
  min-width: 220px;
}

.empty-wish {
  text-align: center;
}
