:root {
  /* Palet: Shining Side, Light Scatter, Golden Gmor, Cobre, Ancient Bronze, Beauty Brass */
  --wine: #79380b; /* Ancient Bronze */
  --wine-dark: #fbf5d2; /* Beauty Brass */
  --wine-soft: #ad6d15; /* Cobre */

  --paper: #fbf5d2; /* Shining Side */
  --paper-deep: #fee39f; /* Light Scatter */
  --paper-light: #fffcf2;

  --gold: #efbb55; /* Golden Glamor */
  --gold-light: #fee39f; /* Light Scatter */
  --gold-dark: #ad6d15; /* Cobre */

  --brown: #79380b; /* Ancient Bronze */
  --brown-light: #ad6d15;

  --ink: #441004;
  --muted: #8f6b35;

  --line: rgba(173, 109, 21, 0.2);
  --shadow: rgba(68, 16, 4, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  color: var(--ink);

  background: #1c1c1e;

  background-attachment: fixed;
}

#passcodeInput {
  width: 100%;

  padding: 1.05rem 1rem;

  border: 1px solid #c9b79d;

  border-radius: 14px;

  background: #fffaf2;

  color: #2b1b16;

  font-family: "Inter", sans-serif;

  font-size: 1.35rem;

  letter-spacing: 0.65em;

  text-indent: 0.65em;

  text-align: center;

  outline: none;

  box-shadow: inset 0 2px 7px rgba(70, 38, 25, 0.05);

  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

#passcodeInput:focus {
  border-color: #b78945;

  box-shadow:
    0 0 0 3px rgba(201, 155, 82, 0.15),
    inset 0 2px 7px rgba(70, 38, 25, 0.04);

  transform: translateY(-1px);
}

#unlockBtn,
.primary-button {
  position: relative;

  display: inline-flex;

  justify-content: center;
  align-items: center;

  min-height: 50px;

  padding: 0.85rem 1.8rem;

  border: 1px solid #a97b3e;

  border-radius: 999px;

  background: #c99b52;

  color: #fffaf0;

  font-size: 0.76rem;
  font-weight: 700;

  letter-spacing: 0.13em;

  text-decoration: none;

  cursor: pointer;

  box-shadow: 0 10px 25px rgba(119, 76, 20, 0.22);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

#unlockBtn:hover,
.primary-button:hover {
  transform: translateY(-2px);

  background: #b88943;

  box-shadow: 0 15px 30px rgba(119, 76, 20, 0.28);
}

button,
input {
  font: inherit;
}

.hidden {
  display: none;
}

/* =========================================================
   LOCK SCREEN
========================================================= */

.lock-screen {
  position: fixed;
  inset: 0;

  display: grid;
  place-items: center;
  place-items: safe center; /* fallback aman saat konten lebih tinggi dari layar */

  padding: 1.5rem;
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));

  background: #1c1c1e;

  z-index: 10;

  opacity: 1;
  visibility: visible;

  overflow-y: auto;
  scrollbar-width: none;

  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
}

.lock-screen::-webkit-scrollbar {
  display: none;
}

.lock-screen.hidden {
  display: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* =========================================================
   LETTER SCREEN (BUKA SURAT)
========================================================= */

.letter-screen {
  position: fixed;
  inset: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;

  padding: 1.5rem;
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));

  background: #1c1c1e;

  z-index: 20;

  opacity: 1;
  visibility: visible;

  transition:
    opacity 0.8s ease,
    visibility 0.8s ease;
}

.letter-screen.hidden {
  display: none;
}

.letter-screen.fading-out {
  opacity: 0;
  pointer-events: none;
}

.letter-button {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;

  animation: letterFloat 3s ease-in-out infinite;
}

.letter-button img {
  display: block;
  width: min(72vw, 300px);
  height: auto;

  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.4));
  transition:
    transform 0.25s ease,
    filter 0.25s ease;
}

.letter-button:hover img {
  transform: scale(1.05);
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.5));
}

.letter-button:active img {
  transform: scale(0.94);
}

.letter-hint {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-light);

  margin-top: -8rem; /* TAMBAHKAN BARIS INI (ubah ke -2rem kalau mau lebih tinggi) */

  animation: hintPulse 2s ease-in-out infinite;
}

/* Di layar HP pendek, hint jangan menimpa gambar surat */
@media (max-width: 460px), (max-height: 700px) {
  .letter-button img {
    width: min(64vw, 240px);
  }

  .letter-hint {
    margin-top: -3rem;
    font-size: 0.9rem;
  }
}

@keyframes letterFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes hintPulse {
  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

/* Sparkles */

.lock-sparkle {
  position: absolute;

  color: var(--gold-light);

  text-shadow:
    0 0 8px rgba(232, 201, 130, 0.7),
    0 0 20px rgba(232, 201, 130, 0.35);

  animation: sparkleFloat 4s ease-in-out infinite;
}

.lock-sparkle.s1 {
  top: 17%;
  left: 18%;
  font-size: 1.3rem;
}

.lock-sparkle.s2 {
  top: 28%;
  right: 17%;
  font-size: 0.9rem;
  animation-delay: 1.2s;
}

.lock-sparkle.s3 {
  bottom: 21%;
  left: 23%;
  font-size: 0.8rem;
  animation-delay: 2.2s;
}

@keyframes sparkleFloat {
  0%,
  100% {
    opacity: 0.2;
    transform: translateY(0) scale(0.8);
  }

  50% {
    opacity: 1;
    transform: translateY(-9px) scale(1.15);
  }
}

.lock-card {
  width: min(100% - 32px, 360px);
  position: relative;
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--ink);
  background: #fbf5d2;

  /* INI PINGGIRAN YANG KAMU MAKSUD */
  border: 10px solid #441004;
  border-radius: 28px;

  box-shadow:
    0 35px 80px rgba(5, 1, 2, 0.6),
    0 10px 30px rgba(0, 0, 0, 0.25);

  overflow: hidden;
  animation: cardIn 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

/* FRAME LUAR 1 */
.lock-card::before {
  content: "";
  position: absolute;
  inset: -10px;
  border: 1px solid rgba(201, 155, 82, 0.75);
  border-radius: 29px;
  pointer-events: none;
}

/* FRAME LUAR 2 */
.lock-card::after {
  content: "";
  position: absolute;
  inset: -19px;
  border: 1px solid rgba(201, 155, 82, 0.55);
  border-radius: 34px;
  pointer-events: none;
}

.lock-card::before {
  content: "";

  position: absolute;
  inset: 11px;

  border: 1px solid rgba(139, 100, 45, 0.3);

  border-radius: 20px;

  pointer-events: none;
}

.lock-card::after {
  display: none;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
    filter: blur(7px);
  }

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

/* Monogram */

.lock-monogram {
  width: 76px;
  height: 76px;

  margin: 0 auto 1.2rem;

  display: grid;
  place-items: center;

  border-radius: 50%;

  font-family: "Cormorant Garamond", serif;
  font-size: 2.25rem;
  font-weight: 700;

  color: #4c2416;

  background: #d7ae67;

  border: 2px solid rgba(101, 64, 24, 0.5);

  box-shadow:
    inset 0 0 0 4px rgba(255, 242, 204, 0.3),
    0 12px 30px rgba(91, 56, 20, 0.22);
}

.eyebrow {
  margin: 0 0 0.5rem;

  text-transform: uppercase;
  letter-spacing: 0.24em;

  font-size: 0.66rem;
  font-weight: 700;

  color: #8b642d;
}

.lock-card h1 {
  margin: 0;

  font-family: "Cormorant Garamond", serif;

  font-size: clamp(1.35rem, 6vw, 2.15rem);

  line-height: 0.95;

  font-weight: 600;

  color: #553326;
}

.lock-divider {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 0.75rem;

  width: min(100%, 280px);

  margin: 1.1rem auto 0.9rem;
}

.lock-divider span {
  flex: 1;

  height: 1px;

  background: #b99a6a;
}

.lock-divider em {
  color: #8b642d;

  font-style: normal;

  font-size: 0.8rem;
}

.lock-subtitle {
  max-width: 320px;
  margin: 0 auto 1.6rem;
  color: #765f51;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.55;
}

/* Input */

.input-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

#passcodeInput {
  width: 100%;

  padding: 1rem 0.8rem;

  border: 1px solid rgba(82, 49, 34, 0.18);
  border-radius: 15px;

  background: #fcf7ef;

  color: var(--ink);

  font-size: 1.35rem;
  letter-spacing: 0.55em;
  text-indent: 0.55em;

  text-align: center;

  outline: none;

  box-shadow: inset 0 2px 7px rgba(70, 38, 25, 0.06);

  transition:
    border 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

#passcodeInput::placeholder {
  color: rgba(99, 69, 52, 0.35);

  letter-spacing: 0.4em;
  text-indent: 0.4em;
}

#passcodeInput:focus {
  border-color: rgba(180, 133, 54, 0.7);

  box-shadow:
    0 0 0 4px rgba(204, 160, 80, 0.13),
    inset 0 2px 7px rgba(70, 38, 25, 0.05);

  transform: translateY(-1px);
}

/* Buttons */

#unlockBtn,
.primary-button {
  position: relative;

  display: inline-flex;

  justify-content: center;
  align-items: center;

  min-height: 48px;

  padding: 0.85rem 1.6rem;

  border: none;
  border-radius: 999px;

  background: #c99b52;

  color: #fffaf0;

  font-size: 0.86rem;
  font-weight: 700;

  letter-spacing: 0.06em;

  text-decoration: none;

  cursor: pointer;

  box-shadow: 0 12px 28px rgba(119, 76, 20, 0.22);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

#unlockBtn:hover,
.primary-button:hover {
  transform: translateY(-2px);

  box-shadow: 0 16px 34px rgba(119, 76, 20, 0.28);
}

.helper {
  max-width: 300px;

  margin: 1.1rem auto 0;

  font-family: "Cormorant Garamond", serif;

  font-size: 0.92rem;

  line-height: 1.5;

  color: #765f51;
}

/* =========================================================
   INVITATION
========================================================= */

.invitation {
  width: min(100%, 1050px);

  margin: 0 auto;

  padding: 3rem 1rem 5rem;
}

/* Outer frame */

.royal-frame {
  position: relative;

  padding: 1.1rem;

  border-radius: 24px;

  background: #3e1b13;

  border: 1px solid rgba(221, 185, 110, 0.8);

  box-shadow:
    0 35px 80px rgba(10, 2, 3, 0.42),
    0 10px 30px rgba(0, 0, 0, 0.2);
}

.royal-frame::before {
  content: "";

  position: absolute;

  inset: 10px;

  border: 1px solid rgba(232, 201, 130, 0.55);

  border-radius: 17px;

  pointer-events: none;
}

.royal-frame::after {
  content: "";

  position: absolute;

  inset: 4px;

  border: 1px solid rgba(255, 231, 179, 0.12);

  border-radius: 21px;

  pointer-events: none;
}

/* Paper */

.inner-paper {
  position: relative;

  min-height: 880px;

  padding: 3rem 3.2rem 3.5rem;

  overflow: hidden;

  border-radius: 14px;

  border: 1px solid rgba(192, 145, 69, 0.8);

  background: #f7efdf;

  box-shadow: inset 0 0 80px rgba(141, 99, 36, 0.05);
}

.inner-paper::before {
  content: "";

  position: absolute;

  inset: 16px;

  border: 1px solid rgba(125, 84, 43, 0.16);

  border-radius: 9px;

  pointer-events: none;
}

.inner-paper::after {
  content: "";

  position: absolute;

  width: 300px;
  height: 300px;

  top: -160px;
  right: -150px;

  border-radius: 50%;

  background: rgba(205, 164, 88, 0.08);

  pointer-events: none;
}

/* Top decoration */

.top-sparkle {
  width: 100%;
  height: 1px;
  margin: 0 auto 2rem;
  background: rgba(139, 100, 45, 0.6);
  position: relative;
}

.top-sparkle::after {
  content: "❦";

  position: absolute;

  left: 50%;
  top: 50%;

  transform: translate(-50%, -50%);

  padding: 0 0.8rem;

  background: var(--paper);

  color: var(--gold-dark);

  font-size: 0.9rem;
}

/* =========================================================
   HERO
========================================================= */

.hero {
  position: relative;

  text-align: center;

  padding: 0.5rem 0 1rem;
}

.hero-kicker {
  margin: 0;

  text-transform: uppercase;

  letter-spacing: 0.22em;

  font-size: 0.72rem;
  font-weight: 700;

  color: var(--gold-dark);
}

.hero h1 {
  max-width: 750px;

  margin: 0.55rem auto 0;

  font-family: "Cormorant Garamond", serif;

  font-size: clamp(3rem, 7vw, 5.8rem);

  line-height: 0.9;

  font-weight: 600;

  letter-spacing: -0.02em;

  color: var(--brown);
}

.hero-name {
  margin: 1rem 0 0;

  font-family: "Cormorant Garamond", serif;

  font-size: clamp(1.9rem, 4vw, 3.2rem);

  font-style: italic;

  color: var(--wine-soft);
}

.divider {
  position: relative;
  width: 100%;
  height: 1px;
  margin: 1.5rem auto;
  background: rgba(104, 68, 40, 0.5);
}

.divider::after {
  content: "❦";

  position: absolute;

  left: 50%;
  top: 50%;

  transform: translate(-50%, -50%);

  padding: 0 0.8rem;

  background: var(--paper);

  color: var(--gold-dark);

  font-size: 0.45rem;
}

.hero-subtext {
  max-width: 650px;

  margin: 0 auto;

  color: var(--muted);

  font-size: 0.94rem;

  line-height: 1.9;
}

/* =========================================================
   SECTIONS
========================================================= */

.info-block,
.attire-block,
.timeline-block,
.rules-block {
  position: relative;

  margin-top: 3.8rem;
}

.section-heading {
  position: relative;

  width: 100%;

  margin-bottom: 1.4rem;

  text-align: center;

  font-family: "Cormorant Garamond", serif;

  font-size: clamp(2rem, 4vw, 2.8rem);

  line-height: 1;

  color: var(--brown);
}

.section-heading::before,
.section-heading::after {
  content: "❦";

  display: inline-block;

  margin: 0 0.8rem;

  color: var(--gold-dark);

  font-size: 0.8rem;

  vertical-align: middle;
}

/* =========================================================
   INFO CARDS
========================================================= */

.info-grid {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 1rem;

  margin-top: 1.3rem;
}

.info-item {
  position: relative;

  padding: 1.3rem 1.2rem;

  text-align: center;

  background: #ffffff !important;

  border: 1px solid var(--line);

  border-radius: 15px;

  box-shadow: 0 8px 20px rgba(74, 40, 23, 0.04);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.info-item:hover {
  transform: translateY(-3px);

  box-shadow: 0 12px 28px rgba(74, 40, 23, 0.08);
}

.info-item.wide {
  grid-column: 1 / -1;
}

.label {
  display: block;

  margin-bottom: 0.4rem;

  text-transform: uppercase;

  letter-spacing: 0.17em;

  font-size: 0.66rem;

  color: var(--gold-dark);

  font-weight: 700;
}

.info-item strong {
  font-family: "Cormorant Garamond", serif;

  font-size: 1.25rem;

  font-weight: 600;

  color: var(--ink);
}

/* =========================================================
   ATTIRE
========================================================= */

/* =========================================================
   ATTIRE
========================================================= */

.attire-text {
  max-width: 620px;
  margin: 0 auto 1.2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.8;
}

/* Dress Code Button */

.attire-button-wrap {
  display: flex;
  justify-content: center;
  margin: 1.2rem auto 0;
  
}

.attire-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  padding: 0.75rem 1.4rem;
  border: 1px solid var(--gold-dark);
  border-radius: 999px;
  background: #ffffff !important;
  color: #fffaf0;
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(58, 13, 18, 0.18);
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.attire-button:hover {
  background: var(--wine);
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(58, 13, 18, 0.25);
}

/* Attire Modal */

.attire-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  background: rgba(33, 7, 10, 0.72);
  backdrop-filter: blur(5px);
}

.attire-modal.show {
  display: flex;
}

.attire-modal-content {
  position: relative;
  width: min(100%, 430px);
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem 1.5rem;
  text-align: center;
  background: #ffffff !important;
  border: 8px solid #3e1b13;
  border-radius: 24px;
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(201, 155, 82, 0.7);
  animation: attireModalIn 0.35s ease;
}

.attire-modal-content::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(139, 100, 45, 0.3);
  border-radius: 15px;
  pointer-events: none;
}

.attire-modal-title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--brown);
}

.attire-modal-subtitle {
  margin: 0.5rem auto 1.5rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.attire-colors {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}

.attire-color {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem;
  text-align: left;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.attire-color-swatch {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(255, 250, 240, 0.9);
  box-shadow:
    0 0 0 1px rgba(69, 39, 26, 0.18),
    0 5px 12px rgba(48, 25, 17, 0.12);
}

.attire-color-swatch.maroon {
  background: #5d0e14;
}

.attire-color-swatch.brown {
  background: #8d5d2b;
}

.attire-color-swatch.deep-blue {
  background: #0d1c2e;
}

.attire-color-swatch.cream {
  background: #f7efe0;
}

.attire-color strong {
  display: block;
  margin-bottom: 0.15rem;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.05rem;
  color: var(--ink);
}

.attire-color span {
  font-size: 0.68rem;
  color: var(--muted);
}

.attire-note {
  margin: 1.3rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: "Cormorant Garamond", serif;
  font-size: 0.9rem;
  line-height: 1.6;
}

.attire-close {
  margin-top: 1.3rem;
  padding: 0.65rem 1.4rem;
  border: 1px solid #a97b3e;
  border-radius: 999px;
  background: #c99b52;
  color: #fffaf0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.attire-close:hover {
  background: #b88943;
  transform: translateY(-2px);
}

@keyframes attireModalIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

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

/* =========================================================
   TIMELINE
========================================================= */

.timeline {
  position: relative;

  list-style: none;

  margin: 1.4rem auto 0;

  padding: 0;

  max-width: 700px;

  display: grid;

  gap: 0.7rem;
}

.timeline::before {
  content: "";

  position: absolute;

  top: 18px;
  bottom: 18px;
  left: 27px;

  width: 1px;

  background: rgba(139, 100, 45, 0.3);
}

.timeline li {
  position: relative;

  display: grid;

  grid-template-columns: 56px 1fr;

  align-items: center;

  gap: 1rem;

  padding: 0.9rem 1rem;

  background: rgba(255, 255, 255, 0.28);

  border: 1px solid rgba(112, 68, 42, 0.11);

  border-radius: 14px;

  transition:
    transform 0.25s ease,
    background 0.25s ease;
}

.timeline li:hover {
  transform: translateX(4px);

  background: rgba(255, 255, 255, 0.42);
}

.time {
  position: relative;
  z-index: 1;

  width: 48px;
  height: 48px;

  display: inline-flex;

  justify-content: center;
  align-items: center;

  border-radius: 50%;

  background: #e4c380;

  border: 2px solid rgba(255, 242, 205, 0.8);

  color: #69451e;

  font-family: "Cormorant Garamond", serif;

  font-size: 1.1rem;

  font-weight: 700;

  box-shadow: 0 5px 12px rgba(94, 59, 23, 0.12);
}

.timeline strong {
  display: block;

  margin-bottom: 0.2rem;

  font-family: "Cormorant Garamond", serif;

  font-size: 1.25rem;

  font-weight: 600;

  color: var(--ink);
}

.timeline small {
  color: var(--muted);

  font-size: 0.78rem;

  line-height: 1.6;
}

/* =========================================================
   RULES
========================================================= */

.rules-block p {
  max-width: 680px;

  margin: 0 auto;

  text-align: center;

  color: var(--muted);

  font-size: 0.9rem;

  line-height: 1.9;
}

.rules-block ol {
  max-width: 620px;

  margin: 1.5rem auto 0;

  padding: 1.3rem 1.5rem 1.3rem 3rem;

  color: var(--muted);

  background: rgba(255, 255, 255, 0.2);

  border: 1px solid var(--line);

  border-radius: 15px;

  line-height: 2;
}

.rules-block li::marker {
  color: var(--gold-dark);

  font-family: "Cormorant Garamond", serif;

  font-weight: 700;
}

/* =========================================================
   COUNTDOWN MENUJU HARI-H (16 SEPTEMBER 2026)
========================================================= */

.countdown {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;

  max-width: 620px;

  margin: 1.8rem auto 0;
  padding: clamp(0.9rem, 3vw, 1.2rem) clamp(0.5rem, 2vw, 1rem);

  background: rgba(255, 255, 255, 0.28);
  border: 1px solid var(--line);
  border-radius: 15px;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: clamp(48px, 16vw, 64px);
}

.countdown-unit strong {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.55rem, 6vw, 2rem);
  font-weight: 700;
  color: var(--wine-soft);
  line-height: 1;

  font-variant-numeric: tabular-nums;
}

.countdown-unit span {
  margin-top: 0.35rem;

  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.countdown-sep {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.1rem, 4vw, 1.5rem);
  font-weight: 700;
  color: var(--gold-dark);

  padding-bottom: 1.1rem;
}

.countdown-caption {
  margin-top: 1.4rem !important;

  font-family: "Cormorant Garamond", serif !important;
  font-size: 2.15rem !important;
  font-style: italic;
  color: var(--wine-soft) !important;

  animation: hintPulse 2.4s ease-in-out infinite;
}

/* =========================================================
   SEAL
========================================================= */

.seal-wrap {
  display: flex;

  justify-content: center;

  margin: 3rem 0 1.3rem;
}

.seal {
  width: 88px;
  height: 88px;

  display: grid;

  place-items: center;

  border-radius: 50%;

  background: #d3a55d;

  color: #4c2416;

  font-family: "Cormorant Garamond", serif;

  font-size: 2.2rem;

  font-weight: 700;

  border: 2px solid rgba(83, 46, 18, 0.55);

  box-shadow:
    inset 0 0 0 4px rgba(255, 239, 195, 0.3),
    0 15px 30px rgba(105, 73, 25, 0.16);
}

.closing-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  margin-top: 2rem;
}

.closing-line {
  max-width: 600px;

  margin: 0 auto;

  text-align: center;

  font-family: "Cormorant Garamond", serif;

  font-size: clamp(1.8rem, 4vw, 2.5rem);

  line-height: 1.15;

  font-style: italic;

  color: var(--brown);
}

.cta-row {
  display: flex;

  justify-content: center;

  margin-top: 1.8rem;
}

.primary-button {
  min-width: 160px;
}

/* =========================================================
   REVEAL ANIMATION
========================================================= */

.reveal {
  opacity: 0;

  transform: translateY(var(--reveal-from, 30px)) scale(0.985);

  filter: blur(3px);

  transition:
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.85s cubic-bezier(0.22, 1, 0.36, 1);

  transition-delay: var(--reveal-delay, 0s);

  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;

  transform: translateY(0) scale(1);

  filter: blur(0);
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 700px) {
  .invitation {
    padding: 1.2rem 0.65rem 3rem;
  }

  .royal-frame {
    padding: 0.7rem;

    border-radius: 19px;
  }

  .inner-paper {
    padding: 2rem 1.1rem 2.5rem;

    border-radius: 11px;
  }

  .inner-paper::before {
    inset: 10px;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 12vw, 4rem);
  }

  .hero-name {
    font-size: 2rem;
  }

  .hero-subtext {
    font-size: 0.84rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .info-item.wide {
    grid-column: auto;
  }

  .palette {
    grid-template-columns: repeat(4, 1fr);

    gap: 0.4rem;
  }

  .timeline li {
    grid-template-columns: 52px 1fr;

    text-align: left;
  }

  .section-heading {
    font-size: 2.1rem;
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 460px) {
  .lock-card {
    padding: 2.5rem 1.3rem 2rem;

    border-radius: 24px;
  }

  .lock-card h1 {
    font-size: 2.35rem;
  }

  .lock-subtitle {
    font-size: 1.82rem;
  }

  .inner-paper {
    padding: 1.8rem 0.9rem 2.3rem;
  }

  .hero-kicker {
    font-size: 0.62rem;

    letter-spacing: 0.13em;
  }

  .hero h1 {
    font-size: 2.65rem;
  }

  .hero-name {
    font-size: 1.75rem;
  }

  .divider {
    width: 70%;
  }

  .section-heading {
    font-size: 1.9rem;
  }

  .section-heading::before,
  .section-heading::after {
    margin: 0 0.45rem;
  }

  .palette {
    grid-template-columns: repeat(2, 1fr);

    gap: 1rem;
  }

  .timeline li {
    padding: 0.8rem;

    gap: 0.7rem;
  }

  .time {
    width: 42px;
    height: 42px;

    font-size: 1rem;
  }

  .timeline strong {
    font-size: 1.1rem;
  }

  .timeline small {
    font-size: 0.72rem;
  }

  .rules-block ol {
    padding-left: 2.4rem;

    font-size: 0.8rem;
  }

  .closing-line {
    font-size: 1.8rem;
  }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;

    transform: none;

    filter: none;
  }
}

/* =========================
   CANDLE DECORATION
========================= */

.candle-icon {
  overflow: hidden;
  padding: 8px;
  background: radial-gradient(
    circle at 50% 40%,
    rgba(239, 205, 133, 0.35),
    transparent 65%
  );
}

.candle-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;

  filter: drop-shadow(0 5px 8px rgba(92, 48, 19, 0.25))
    drop-shadow(0 0 8px rgba(218, 171, 82, 0.18));
}

/* Candle di atas Join Group */

.candle-seal {
  width: 120px;
  height: 120px;

  padding: 8px;

  background: radial-gradient(
    circle at 50% 35%,
    rgba(245, 218, 164, 0.4),
    transparent 65%
  );

  border: none;

  box-shadow: none;

  border-radius: 0;
}

.candle-seal img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: contain;

  filter: drop-shadow(0 8px 12px rgba(76, 40, 19, 0.18))
    drop-shadow(0 0 10px rgba(212, 163, 76, 0.2));
}

.pin-display {
  display: flex;
  justify-content: center;
  gap: 0.8rem;

  margin: 0 auto 1.4rem;
}

.pin-display span {
  width: 13px;
  height: 13px;

  border-radius: 50%;

  background: #d8c9b3;

  border: 1px solid #c5b293;

  transition:
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.pin-display span.filled {
  background: #c99b52;

  border-color: #a97b3e;

  box-shadow: 0 0 8px rgba(201, 155, 82, 0.35);

  transform: scale(1.08);
}

.keypad {
  width: min(100%, 168px);
  margin: 0 auto 1.2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}

.key {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid #441004;
  border-radius: 11px;
  background: #efbb55;
  color: #fffaf0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.45rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    0 4px 10px rgba(197, 77, 29, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.key:hover {
  background: #441004;
  border-color: #c99b52;
  transform: translateY(-2px);
}

.key:active {
  background: #3a0d12;
  transform: scale(0.95);
}

.key-empty {
  visibility: hidden;
  cursor: default;
}

.key-delete {
  font-family: "Inter", sans-serif;
  font-size: 1.1rem;
}

#unlockBtn {
  width: min(100%, 300px);

  margin: 0 auto;

  display: flex;
}

.shake {
  animation: shakeX 0.4s ease;
}

@keyframes shakeX {
  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-8px);
  }

  40% {
    transform: translateX(7px);
  }

  60% {
    transform: translateX(-5px);
  }

  80% {
    transform: translateX(3px);
  }
}

.lock-photo {
  width: 85px;
  height: 85px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #d2c0a6;
  box-shadow: 0 4px 12px rgba(70, 38, 25, 0.12);
}

.lock-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =========================================================
   ATTIRE POPUP / DRESS CODE
========================================================= */

.attire-button-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.attire-button {
  min-height: 48px;
  padding: 0.8rem 1.5rem;
  border: 1px solid var(--gold-dark);
  border-radius: 999px;
  background: transparent;
  color: var(--brown);
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.25s ease;
}

.attire-button:hover {
  background: var(--gold);
  color: #fffaf0;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(119, 76, 20, 0.18);
}

/* POPUP BACKGROUND */

.attire-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 1.5rem;

  background: rgba(35, 10, 12, 0.58);
  backdrop-filter: blur(7px);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.attire-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* POPUP CARD */

.attire-modal-content {
  position: relative;

  width: min(100%, 500px);
  max-height: 85vh;
  overflow-y: auto;

  padding: 2.5rem 2rem;

  text-align: center;

  background: var(--paper);
  border: 1px solid rgba(192, 145, 69, 0.8);
  border-radius: 20px;

  box-shadow:
    0 30px 70px rgba(20, 5, 6, 0.4),
    inset 0 0 50px rgba(141, 99, 36, 0.05);

  transform: translateY(20px) scale(0.96);
  transition: transform 0.35s ease;
}

.attire-modal.active .attire-modal-content {
  transform: translateY(0) scale(1);
}

/* INNER BORDER */

.attire-modal-content::before {
  content: "";
  position: absolute;
  inset: 10px;

  border: 1px solid rgba(125, 84, 43, 0.16);
  border-radius: 14px;

  pointer-events: none;
}

/* CLOSE BUTTON */

.attire-close {
  position: absolute;
  top: 14px;
  right: 14px;

  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: none;
  border-radius: 50%;

  background: var(--gold);
  color: #fffaf0;

  font-size: 1rem;
  font-weight: 700;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.attire-close:hover {
  background: var(--gold-dark);
  transform: rotate(90deg);
}

/* MODAL ICON */

.attire-modal-icon {
  margin-bottom: 0.7rem;

  color: var(--gold-dark);
  font-size: 1.3rem;
}

/* TITLE */

.attire-modal-content h2 {
  margin: 0;

  font-family: "Cormorant Garamond", serif;
  font-size: 2.5rem;
  font-weight: 600;

  color: var(--brown);
}

/* SUBTITLE */

.attire-modal-subtitle {
  margin: 0.5rem auto 1.8rem;

  color: var(--muted);
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
  font-style: italic;
}

/* DRESS CODE LIST */

.attire-list {
  display: grid;
  gap: 0.8rem;

  margin: 0 auto;
  max-width: 400px;

  text-align: left;
}

.attire-item {
  display: flex;
  align-items: center;
  gap: 1rem;

  padding: 0.9rem 1rem;

  background: rgba(255, 255, 255, 0.3);
  border: 1px solid var(--line);
  border-radius: 12px;
}

/* COLOR CIRCLE */

.attire-color {
  flex: 0 0 auto;

  width: 42px;
  height: 42px;

  border-radius: 50%;

  border: 3px solid rgba(255, 250, 240, 0.9);

  box-shadow:
    0 0 0 1px rgba(69, 39, 26, 0.15),
    0 5px 12px rgba(48, 25, 17, 0.12);
}

.attire-color.maroon {
  background: #5d0e14;
}

.attire-color.brown {
  background: #8d5d2b;
}

.attire-color.deep-blue {
  background: #0d1c2e;
}

.attire-color.cream {
  background: #f7efe0;
}

/* TEXT */

.attire-item-text strong {
  display: block;

  margin-bottom: 0.15rem;

  font-family: "Cormorant Garamond", serif;
  font-size: 1.15rem;
  font-weight: 700;

  color: var(--ink);
}

.attire-item-text span {
  display: block;

  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

/* BOTTOM NOTE */

.attire-note {
  margin: 1.6rem auto 0;

  max-width: 390px;

  color: var(--muted);

  font-family: "Cormorant Garamond", serif;
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.6;
}

/* MOBILE */

@media (max-width: 460px) {
  .attire-modal {
    padding: 1rem;
  }

  .attire-modal-content {
    padding: 2.3rem 1.2rem 1.8rem;
  }

  .attire-modal-content h2 {
    font-size: 2.2rem;
  }

  .attire-item {
    padding: 0.8rem;
  }

  .attire-color {
    width: 38px;
    height: 38px;
  }
}

/* =========================================================
   RUNDOWN (HORIZONTAL SCROLL GALLERY WITH 3:4 IMAGES)
========================================================= */

.rundown-wrapper {
  position: relative;
}

.rundown-gallery {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.8rem 0.4rem 1.5rem;
  -webkit-overflow-scrolling: touch;

  /* Sembunyikan Scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE & Edge */
}

.rundown-gallery::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.rundown-card {
  flex: 0 0 220px;
  scroll-snap-align: center;
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 8px 20px rgba(74, 40, 23, 0.04);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.rundown-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 12px 28px rgba(74, 40, 23, 0.08);
}

/* KOTAK FOTO RASIO 3:4 */
.card-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.8rem;
  border: 1px solid rgba(139, 100, 45, 0.3);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.rundown-card:hover .card-image img {
  transform: scale(1.05);
}

.card-number {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--wine-soft);
  margin-bottom: 0.4rem;
  line-height: 1;
}

.card-content strong {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.card-content small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

/* TOMBOL NAVIGASI < > */
.rundown-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  color: var(--wine-soft);
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 3px; /* biar simbol < > pas di tengah secara visual */
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(74, 40, 23, 0.12);
  backdrop-filter: blur(4px);
  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease,
    opacity 0.25s ease;
}

.rundown-nav:hover {
  background: var(--wine-soft);
  color: #fff;
}

.rundown-nav.prev {
  left: -8px;
}

.rundown-nav.next {
  right: -8px;
}

.rundown-nav:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

/* Penyesuaian Ukuran di HP */
@media (max-width: 460px) {
  .rundown-card {
    flex: 0 0 180px;
    padding: 0.8rem;
  }

  .rundown-nav {
    width: 34px;
    height: 34px;
    font-size: 1.3rem;
  }

  .rundown-nav.prev {
    left: -4px;
  }

  .rundown-nav.next {
    right: -4px;
  }
}

/* =========================================================
   RESPONSIVE FIX TAMBAHAN (HP KECIL & LAYAR PENDEK)
========================================================= */

/* Modal attire: pakai tinggi viewport dinamis (address bar HP) */
@supports (height: 100dvh) {
  .attire-modal-content {
    max-height: 85dvh;
  }
}

/* Countdown di HP: disusun ke bawah (Days / Hours / Minutes / Seconds) */
@media (max-width: 460px) {
  .countdown {
    flex-direction: column;
    gap: 1rem;

    padding: 1.4rem 1rem;
  }

  /* Separator ":" tidak perlu kalau susunan vertikal */
  .countdown-sep {
    display: none;
  }

  .countdown-unit {
    min-width: 110px;

    padding: 0.55rem 1rem;

    background: rgba(255, 255, 255, 0.32);

    border: 1px solid var(--line);

    border-radius: 12px;
  }
}

/* Cegah teks meluap di layar sangat sempit (≤360px) */
@media (max-width: 360px) {
  .hero h1 {
    font-size: 2.3rem;
  }

  .hero-name {
    font-size: 1.5rem;
  }

  .section-heading {
    font-size: 1.7rem;
  }

  .countdown-unit strong {
    font-size: 1.45rem;
  }

  .countdown-unit span {
    font-size: 0.55rem;
  }

  .countdown-sep {
    padding-bottom: 0.9rem;
  }

  .keypad {
    width: min(100%, 148px);
    gap: 0.4rem;
  }

  .lock-subtitle {
    font-size: 1.6rem;
  }
}

/* HP landscape / layar pendek: pastikan lock screen bisa discroll */
@media (max-height: 640px) {
  .lock-screen {
    place-items: start center;
  }

  .lock-card {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 1.25rem 1.25rem 1.1rem;
  }

  .lock-photo {
    width: 60px;
    height: 60px;
    margin-bottom: 0.65rem;
  }

  .lock-subtitle {
    margin-bottom: 0.9rem;
    font-size: 1.35rem;
    line-height: 1.35;
  }

  .pin-display {
    margin-bottom: 1rem;
  }

  .pin-display span {
    width: 11px;
    height: 11px;
  }

  .keypad {
    width: min(100%, 140px);
    gap: 0.35rem;
    margin-bottom: 0.8rem;
  }

  .key {
    border-radius: 8px;
    font-size: 1.05rem;
  }

  .helper {
    margin-top: 0.7rem;
    font-size: 0.82rem;
  }
}

.attire-image-wrap {
  margin: 1.2rem 0;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.attire-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

