/* ??????????????????????????????????????????????????????????????????????????
   ESTILOS GERAIS
   ?????????????????????????????????????????????????????????????????????????? */
body {
  margin: 0;
  font-family: 'Great Vibes', cursive;
  font-style: normal;
  font-size: 1.35rem;
  background: #f9f6f2;
  color: #333;
  scroll-behavior: smooth;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

button, input, select, textarea,
.invite-date-badge, .blessing, #musicBtn,
.carousel-arrow,
.ornament, .directions-text ul li, .directions-text p,
.acompanhante-nome, .scroll-hint, .no-results {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1rem;
}

/* ??????????????????????????????????????????????????????????????????????????
   HEADER & VÍDEO
   ?????????????????????????????????????????????????????????????????????????? */
header {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

#headerVideo {
  position: absolute; top: 50%; left: 50%;
  width: 100%; height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover; object-position: center bottom; z-index: 0;
}

#headerVideoMobile {
  position: absolute; top: 50%; left: 50%;
  width: 100%; height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover; object-position: center center; z-index: 0; display: none;
}

@media (min-width: 769px) { #headerVideo { display: block; } #headerVideoMobile { display: none; } }
@media (max-width: 768px) { header { background: #000; } #headerVideo { display: none; } #headerVideoMobile { display: block; } }

header::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 1;
}

/* ??????????????????????????????????????????????????????????????????????????
   BOTÃO SCROLL
   ?????????????????????????????????????????????????????????????????????????? */
#scrollBtn {
  position: absolute;
  bottom: 30px;
  right: 30px;
  left: auto;
  transform: none;
  background: rgba(197,157,95,0.92);
  color: white;
  border: 2.5px solid rgba(255,255,255,0.55);
  padding: 0;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
  animation: scrollBtnPulse 2s ease-in-out infinite;
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;

  /* fonte sem serifa para o símbolo de seta ficar nítido */
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  font-style: normal;
}
#scrollBtn:hover {
  background: rgba(197,157,95,1);
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(197,157,95,0.55), 0 0 0 8px rgba(197,157,95,0.18);
}

/* Seta ? */
#scrollBtn .scroll-arrow {
  font-size: 1.6rem;
  line-height: 1;
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0;
}

/* Mini-label "rolar" */
#scrollBtn .scroll-label {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  font-style: normal;
  opacity: 0.9;
  line-height: 1;
}

/* Anel de pulso externo para chamar atenção */
#scrollBtn::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(197,157,95,0.45);
  animation: scrollRing 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes scrollBtnPulse {
  0%, 100% { transform: translateY(0);    box-shadow: 0 4px 18px rgba(0,0,0,0.35), 0 0 0 0   rgba(197,157,95,0.4); }
  50%       { transform: translateY(-12px); box-shadow: 0 12px 28px rgba(0,0,0,0.25), 0 0 0 10px rgba(197,157,95,0); }
}
@keyframes scrollRing {
  0%   { transform: scale(1);   opacity: 0.7; }
  70%  { transform: scale(1.45); opacity: 0; }
  100% { transform: scale(1.45); opacity: 0; }
}

/* ??????????????????????????????????????????????????????????????????????????
   ANIMAÇÕES
   ?????????????????????????????????????????????????????????????????????????? */
@keyframes floatUp {
  0% { bottom: -50px; opacity: 1; transform: translateX(0) rotate(0deg); }
  100% { bottom: 100vh; opacity: 0; transform: translateX(var(--randomX, 0)) rotate(360deg); }
}

/* ??????????????????????????????????????????????????????????????????????????
   SECTIONS
   ?????????????????????????????????????????????????????????????????????????? */
section {
  min-height: auto;
  padding: 60px 20px;
  opacity: 0;
  transform: translateY(60px);
  transition: all 1s ease;
  display: none;
}
section.visible { opacity: 1; transform: translateY(0); display: block; }
section.show    { display: block; }

.content { max-width: 900px; margin: auto; text-align: center; }
h2 {
  font-family: 'Playfair Display', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', serif;
  font-size: 2.5rem;
}
.divider { width: 80px; height: 2px; background: #c59d5f; margin: 20px auto; }

/* ??????????????????????????????????????????????????????????????????????????
   BOTÕES
   ?????????????????????????????????????????????????????????????????????????? */
.btn {
  display: inline-block; padding: 14px 26px; margin: 10px;
  background: #c59d5f; color: white; text-decoration: none;
  border-radius: 30px; transition: 0.3s; font-weight: bold;
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Montserrat', sans-serif;
  font-style: normal;
}
.btn:hover { background: #a67c3b; }

#musicBtnMain:hover {
  background: #f5f5f5 !important; transform: scale(1.05);
  user-select: none; -webkit-user-select: none;
}

/* ??????????????????????????????????????????????????????????????????????????
   GALERIA & CARROSSEL
   ?????????????????????????????????????????????????????????????????????????? */
.gallery { display: flex; flex-direction: column; gap: 20px; overflow: hidden; padding: 20px 0; }
.carousel-wrapper { position: relative; width: 100%; }
.carousel-container { width: 100%; overflow: hidden; position: relative; cursor: grab; }
.carousel-container.dragging { cursor: grabbing; }
.carousel-track { display: flex; gap: 15px; width: fit-content; animation: none; will-change: transform; }
.carousel-track.paused, .carousel-container:hover .carousel-track { animation-play-state: running; }

.carousel-item {
  flex-shrink: 0; width: 300px; height: 400px;
  border-radius: 15px; overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
@media (hover: hover) and (pointer: fine) {
  .carousel-item:hover { transform: scale(1.15); box-shadow: 0 8px 30px rgba(197,157,95,0.5); z-index: 10; }
}
.carousel-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 20;
  background: rgba(197,157,95,0.92); color: white; border: none;
  width: 44px; height: 44px; border-radius: 50%; font-size: 20px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 12px rgba(0,0,0,0.25); transition: background 0.2s ease, transform 0.2s ease;
  user-select: none; -webkit-user-select: none;
}
.carousel-arrow:hover { background: rgba(166,124,59,1); transform: translateY(-50%) scale(1.12); }
.carousel-arrow.prev { left: 8px; }
.carousel-arrow.next { right: 8px; }
@media (max-width: 480px) { .carousel-arrow { width: 36px; height: 36px; font-size: 16px; } }

.carousel-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: #c59d5f;
  text-align: center;
  margin: 30px 0 15px 0;
  font-weight: 400;
  letter-spacing: 1px;
  font-style: italic;
}

.carousel-title::before,
.carousel-title::after { content: '?'; margin: 0 10px; font-size: 1.2rem; }

/* ??????????????????????????????????????????????????????????????????????????
   FOOTER
   ?????????????????????????????????????????????????????????????????????????? */
footer { text-align: center; padding: 50px 20px; background: linear-gradient(135deg, #f9f6f2 0%, #f0ebe3 100%); display: none; }
footer.show { display: block; }
footer h3 { font-family: 'Playfair Display', serif; font-size: 2rem; color: #c59d5f; margin: 0 0 20px 0; }
footer p { font-family: 'Great Vibes', cursive; font-size: 1.5rem; line-height: 2.2; color: #555; max-width: 600px; margin: 15px auto; }

footer .heart {
  font-size: 4.5rem; color: #c59d5f; margin: 20px 0; cursor: pointer;
  transition: transform 0.3s ease; display: inline-flex; align-items: center; gap: 8px;
  filter: drop-shadow(0 4px 10px rgba(197,157,95,0.3));
  user-select: none; -webkit-user-select: none;
}
.heart-emoji { display: inline-block; position: relative; }
.heart-emoji::after {
  content: 'Mensagens do cora\00e7\00e3o'; position: absolute; bottom: -20px; left: 50%;
  transform: translateX(-50%); font-size: 0.9rem; color: #c59d5f;
  font-family: 'Montserrat', sans-serif; font-weight: 600; white-space: nowrap;
  opacity: 0.8; animation: pulseText 2s ease-in-out infinite; pointer-events: none;
}
footer .heart:hover .heart-emoji { transform: scale(1.3); filter: drop-shadow(0 6px 20px rgba(197,157,95,0.6)); }
footer .heart::after { content: none; }
.heart-finger { display: inline-block; animation: fingerPulse 0.8s ease-in-out infinite; }
.heart-finger.left  { animation-delay: 0s; }
.heart-finger.right { animation-name: fingerPulseRight; animation-delay: 0.4s; }
@keyframes fingerPulse { 0%, 100% { transform: scale(1) translateX(0); } 50% { transform: scale(1.4) translateX(4px); } }
@keyframes fingerPulseRight { 0%, 100% { transform: scale(1) translateX(0); } 50% { transform: scale(1.4) translateX(-4px); } }

/* ??????????????????????????????????????????????????????????????????????????
   BOTÃO DE MÚSICA
   ?????????????????????????????????????????????????????????????????????????? */
#musicBtn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: #c59d5f;
  color: white;
  border: none;
  padding: 0;
  border-radius: 50px;
  cursor: pointer;
  z-index: 100;
  user-select: none;
  -webkit-user-select: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, background 0.4s ease, transform 0.2s ease;
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Montserrat', sans-serif;
  font-style: normal;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(197,157,95,0.45);
}
#musicBtn.visible {
  opacity: 1;
  pointer-events: auto;
}
#musicBtn:hover {
  background: #a67c3b;
  transform: scale(1.06);
}
#musicBtn:active {
  transform: scale(0.97);
}

.music-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  font-size: 1.1rem;
  flex-shrink: 0;
  line-height: 1;
}

.music-btn-label {
  padding-right: 14px;
  padding-left: 2px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-family: 'Montserrat', sans-serif;
  font-style: normal;
  line-height: 42px;
}

/* Separador vertical entre ícone e label */
.music-btn-icon + .music-btn-label {
  border-left: 1px solid rgba(255,255,255,0.3);
  padding-left: 10px;
}

/* ??????????????????????????????????????????????????????????????????????????
   LISTA DE PRESENTES
   ?????????????????????????????????????????????????????????????????????????? */
.lista-presentes-wrapper { position: relative; margin-top: 20px; }

#listaPresentes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  max-height: calc(5 * 80px + 4 * 10px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
  text-align: left;
  transition: box-shadow 0.2s ease;
}

@media (max-width: 767px) {
  .lista-presentes-wrapper { margin-left: 21px; margin-right: 21px; }
  #listaPresentes { max-height: calc(4 * 96px + 3 * 10px); grid-template-columns: 1fr; }
  .presente-info .presente-nome { font-style: normal; font-family: 'Playfair Display', serif; }
  .presente-info .presente-disponivel {
    font-style: normal;
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Montserrat', sans-serif;
  }
  .presente-info .presente-valor {
    font-style: normal;
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Montserrat', sans-serif;
  }
  .presente-item-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .presente-stepper { align-self: flex-start; }
}

#listaPresentes::-webkit-scrollbar       { width: 8px; }
#listaPresentes::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
#listaPresentes::-webkit-scrollbar-thumb { background: #c59d5f; border-radius: 4px; }
#listaPresentes::-webkit-scrollbar-thumb:hover { background: #a67c3b; }

.lista-presentes-wrapper::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 32px;
  background: linear-gradient(to bottom, rgba(250,250,250,0.95), transparent);
  border-radius: 8px 8px 0 0; pointer-events: none; z-index: 2; opacity: 0; transition: opacity 0.25s ease;
}
.lista-presentes-wrapper::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 32px;
  background: linear-gradient(to top, rgba(250,250,250,0.95), transparent);
  border-radius: 0 0 8px 8px; pointer-events: none; z-index: 2; opacity: 1; transition: opacity 0.25s ease;
}
.lista-presentes-wrapper.no-scroll-top::before    { opacity: 0; }
.lista-presentes-wrapper.has-scroll-top::before   { opacity: 1; }
.lista-presentes-wrapper.no-scroll-bottom::after  { opacity: 0; }
.lista-presentes-wrapper.has-scroll-bottom::after { opacity: 1; }

.scroll-hint {
  display: none; text-align: center; font-size: 0.78rem; color: #c59d5f;
  margin-top: 6px; letter-spacing: 0.3px; animation: hintBounce 1.4s ease-in-out infinite;
}
.scroll-hint.visible { display: block; }
@keyframes hintBounce { 0%, 100% { transform: translateY(0); opacity: 0.8; } 50% { transform: translateY(3px); opacity: 1; } }

/* ??????????????????????????????????????????????????????????????????????????
   ITEM DE PRESENTE COM STEPPER
   ?????????????????????????????????????????????????????????????????????????? */
.presente-item { padding: 10px 14px; border: 1px solid #ddd; border-radius: 8px; background-color: #fff; transition: all 0.3s ease; }
.presente-item.hidden { display: none; }

.presente-item-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.presente-info { flex: 1; min-width: 0; }
.presente-info .presente-nome { font-family: 'Playfair Display', serif; font-size: 0.95rem; font-weight: 600; color: #444; word-break: break-word; }
.presente-info .presente-disponivel {
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Montserrat', sans-serif;
  font-style: normal;
  font-size: 0.75rem; color: #c59d5f; margin-top: 2px;
}
.presente-info .presente-valor {
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Montserrat', sans-serif;
  font-style: normal;
  font-size: 0.82rem; font-weight: 700; color: #7a5c2e; margin-top: 3px;
}

.presente-stepper {
  display: flex; align-items: center; gap: 0;
  border: 2px solid #e0d0b8; border-radius: 30px; overflow: hidden;
  flex-shrink: 0; transition: border-color 0.2s ease;
}
.presente-stepper.ativo { border-color: #c59d5f; }
.presente-stepper button {
  width: 32px; height: 32px; border: none; background: #f5f0e8; color: #c59d5f;
  font-size: 1.2rem; font-weight: bold: cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  display: flex; align-items: center; justify-content: center;
  user-select: none; -webkit-user-select: none;
  font-family: 'Montserrat', sans-serif !important; font-style: normal !important;
}
.presente-stepper button:hover:not(:disabled) { background: #c59d5f; color: #fff; }
.presente-stepper button:disabled { background: #f5f5f5; color: #ccc; cursor: default; }
.presente-stepper input {
  width: 40px; height: 32px; text-align: center; border: none;
  border-left: 1px solid #e0d0b8; border-right: 1px solid #e0d0b8;
  font-size: 0.95rem; font-weight: bold; color: #444; background: #fff;
  outline: none; -moz-appearance: textfield; pointer-events: none; font-family: 'Montserrat', sans-serif;
}
.presente-stepper input::-webkit-outer-spin-button, .presente-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ??????????????????????????????????????????????????????????????????????????
   RESUMO SELECIONADOS
   ?????????????????????????????????????????????????????????????????????????? */
#resumoSelecionados {
  display: none; background: #fdf6ec; border: 1px solid #e8c98a;
  border-radius: 8px; padding: 12px 16px; margin: 12px 0 4px 0; text-align: left;
}
#resumoSelecionados.visible { display: block; }
#resumoSelecionados .resumo-titulo { font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Playfair Display', serif; font-size: 0.9rem; font-weight: 700; color: #c59d5f; margin-bottom: 8px; }
#resumoSelecionados ul { list-style: none; padding: 0; margin: 0; }
#resumoSelecionados ul li { font-family: 'Montserrat', sans-serif; font-size: 0.82rem; color: #555; padding: 2px 0; }
#resumoSelecionados ul li::before { content: '?? '; font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif; }

.no-results { grid-column: 1 / -1; text-align: center; color: #999; padding: 20px; }

/* ??????????????????????????????????????????????????????????????????????????
   VÍDEO
   ?????????????????????????????????????????????????????????????????????????? */
.video-container { position: relative; width: 100%; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 10px; margin: 20px 0; }
.video-container iframe, .video-container video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; border-radius: 10px; }

/* ??????????????????????????????????????????????????????????????????????????
   DIREÇÕES / COMO CHEGAR
   ?????????????????????????????????????????????????????????????????????????? */
.directions-text { background: #fff; padding: 20px; border-radius: 10px; border-left: 4px solid #c59d5f; text-align: left; margin: 20px auto; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.directions-text h3 {
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Playfair Display', serif;
  font-style: normal; color: #c59d5f; margin-top: 0; margin-bottom: 15px;
}
.directions-text p  {
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Montserrat', sans-serif;
  font-size: 0.95rem; line-height: 1.8; margin: 10px 0;
}
.directions-text ul { list-style: none; padding-left: 0; }
.directions-text ul li { font-family: 'Montserrat', sans-serif; font-size: 0.95rem; line-height: 1.8; padding: 4px 0 4px 25px; position: relative; }
.directions-text ul li:before { content: "?"; position: absolute; left: 0; color: #c59d5f; font-weight: bold; font-family: 'Playfair Display', serif; font-size: 1rem; top: 10px; }

.location-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin: 20px 0; }
.location-photos img { width: 100%; height: 200px; object-fit: cover; border-radius: 10px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }

/* ??????????????????????????????????????????????????????????????????????????
   MODAL
   ?????????????????????????????????????????????????????????????????????????? */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); display: none; justify-content: center; align-items: center; z-index: 1000; animation: fadeIn 0.3s ease; }
.modal-overlay.show { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-content { background: white; padding: 40px; border-radius: 15px; max-width: 500px; width: 90%; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,0.3); animation: slideUp 0.3s ease; position: relative; }
@keyframes slideUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
  line-height: 1;
}
.modal-icon.success { color: #28a745; }
.modal-icon.error   { color: #dc3545; }
.modal-icon.warning { color: #ff9800; }
.modal-icon.heart   { color: #c59d5f; font-size: 4rem; }

/* Spinner CSS para loading — sem emoji, sem problema de fonte */
.modal-icon.loading {
  font-size: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.modal-icon.loading::after {
  content: '';
  display: block;
  width: 52px;
  height: 52px;
  border: 5px solid #f0e8d8;
  border-top-color: #c59d5f;
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.modal-title {
  font-family: 'Playfair Display', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', serif;
  font-size: 1.8rem; color: #333; margin-bottom: 15px; font-style: normal;
}
.modal-message { font-family: 'Montserrat', sans-serif; font-size: 1rem; color: #555; line-height: 1.6; margin-bottom: 25px; font-style: normal; }
.modal-close-btn { background: #c59d5f; color: white; border: none; padding: 12px 30px; border-radius: 30px; font-size: 1rem; font-weight: bold; cursor: pointer; transition: 0.3s; font-family: 'Montserrat', sans-serif; font-style: normal; }
.modal-close-btn:hover { background: #a67c3b; transform: scale(1.05); }
.modal-whatsapp-btn {
  background: #25D366; color: white; border: none; padding: 12px 30px; border-radius: 30px;
  font-size: 1rem; font-weight: bold; cursor: pointer; transition: 0.3s;
  box-shadow: 0 4px 15px rgba(37,211,102,0.3);
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Montserrat', sans-serif;
  font-style: normal;
}
.modal-whatsapp-btn:hover { background: #20BA5A; transform: scale(1.05); }

/* ??????????????????????????????????????????????????????????????????????????
   MODAL DE VÍDEO
   ?????????????????????????????????????????????????????????????????????????? */
.modal-video-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.85); display: none; justify-content: center; align-items: center; z-index: 1100; animation: fadeIn 0.3s ease; }
.modal-video-overlay.show { display: flex; }
.modal-video-content { position: relative; width: 90%; max-width: 800px; background: #000; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.6); animation: slideUp 0.3s ease; }
.modal-video-close { position: absolute; top: 10px; right: 14px; background: rgba(197,157,95,0.95); color: white; border: none; font-size: 1.5rem; font-weight: bold; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; z-index: 10; display: flex; align-items: center; justify-content: center; transition: background 0.2s ease; }
.modal-video-close:hover { background: #a67c3b; }
.modal-video-content .video-container { margin: 0; border-radius: 0; }

.btn-ver-video {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px;
  background: #c59d5f; color: white; border: none; border-radius: 30px;
  font-size: 0.95rem; font-weight: bold; cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease; margin: 14px 0 4px 0;
  font-family: 'Segue UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Montserrat', sans-serif;
}
.btn-ver-video:hover { background: #a67c3b; transform: scale(1.04); }

/* ??????????????????????????????????????????????????????????????????????????
   CONFIRMAÇÃO DE PRESENÇA
   ?????????????????????????????????????????????????????????????????????????? */
.presenca-vai-wrapper { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 20px 0 10px 0; flex-wrap: wrap; }
.presenca-vai-label { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: #555; font-weight: 600; }
.toggle-vai { display: flex; border-radius: 30px; overflow: hidden; border: 2px solid #c59d5f; box-shadow: 0 2px 8px rgba(197,157,95,0.2); }
.toggle-vai button {
  padding: 10px 28px; border: none; background: #fff; color: #c59d5f;
  font-size: 1rem; font-weight: bold; cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Montserrat', sans-serif;
  font-style: normal;
  user-select: none; -webkit-user-select: none;
}
.toggle-vai button.ativo-sim, .toggle-vai button.ativo-nao { background: #c59d5f; color: #fff; }

.acompanhantes-section { background: #fff; border: 1px solid #e8dfd0; border-radius: 12px; padding: 20px 24px; margin: 16px auto; max-width: 480px; box-shadow: 0 2px 10px rgba(197,157,95,0.1); transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.4s ease; }
.acompanhantes-section.oculto { opacity: 0; pointer-events: none; transform: translateY(-8px); max-height: 0; padding: 0 24px; margin: 0 auto; overflow: hidden; border: none; }
.acompanhantes-title {
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Playfair Display', serif;
  font-size: 1.1rem; color: #c59d5f; margin: 0 0 16px 0; text-align: center;
}
.acompanhantes-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.acompanhantes-row:last-child { margin-bottom: 0; }
.acompanhante-nome { font-size: 1rem; color: #444; font-weight: 500; text-align: left; flex: 1; }
.acompanhante-nome small { display: block; font-size: 0.75rem; color: #999; font-weight: 400; }

/* ??????????????????????????????????????????????????????????????????????????
   STEPPER DE ACOMPANHANTES
   ?????????????????????????????????????????????????????????????????????????? */
.stepper { display: flex; align-items: center; gap: 0; border: 2px solid #c59d5f; border-radius: 30px; overflow: hidden; }
.stepper button { width: 36px; height: 36px; border: none; background: #c59d5f; color: #fff; font-size: 1.3rem; font-weight: bold; cursor: pointer; line-height: 1; transition: background 0.2s ease; user-select: none; -webkit-user-select: none; display: flex; align-items: center; justify-content: center; font-family: 'Montserrat', sans-serif; font-style: normal; }
.stepper button:hover { background: #a67c3b; }
.stepper button:disabled { background: #ddd; cursor: default; color: #aaa; }
.stepper input { width: 36px; height: 28px; font-size: 0.85rem; }

/* ??????????????????????????????????????????????????????????????????????????
   CABEÇALHO DO CONVITE
   ?????????????????????????????????????????????????????????????????????????? */
.invite-header { text-align: center; padding: 48px 20px 20px; position: relative; }
.invite-header .blessing { font-family: 'Montserrat', sans-serif; font-size: 0.85rem; color: #a67c3b; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 6px; }
.invite-header .couple-names { font-family: 'Great Vibes', cursive; font-size: clamp(3rem, 8vw, 5.5rem); color: #c59d5f; line-height: 1.1; margin: 0 0 8px 0; text-shadow: 0 2px 8px rgba(197,157,95,0.2); }
.invite-header .invite-date-badge { display: inline-block; border: 1px solid #c59d5f; padding: 10px 32px; margin: 12px 0; font-family: 'Montserrat', sans-serif; font-size: 0.9rem; letter-spacing: 3px; color: #7a5c2e; text-transform: uppercase; }
.invite-header .invite-subtitle { font-family: 'Playfair Display', serif; font-size: 1rem; color: #999; font-style: italic; margin: 4px 0 0 0; }

.floral-corner { position: absolute; width: 130px; opacity: 0.55; pointer-events: none; }
.floral-corner.tl { top: 0; left: 0; transform: rotate(0deg); }
.floral-corner.tr { top: 0; right: 0; transform: scaleX(-1); }
.floral-corner.bl { bottom: 0; left: 0; transform: scaleY(-1); }
.floral-corner.br { bottom: 0; right: 0; transform: rotate(180deg); }
@media (max-width: 480px) { .floral-corner { width: 80px; } }

.invite-card { background: #fff; border: 1px solid #e5d5b5; border-radius: 4px; box-shadow: 0 4px 30px rgba(197,157,95,0.12), 0 1px 6px rgba(0,0,0,0.06); padding: 40px 36px 36px; position: relative; overflow: hidden; max-width: 860px; margin: 0 auto; }
.invite-card::before { content: ''; position: absolute; inset: 8px; border: 1px solid rgba(197,157,95,0.25); border-radius: 2px; pointer-events: none; }
.invite-card h2 {
  font-family: 'Great Vibes', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', cursive;
  font-size: clamp(2.2rem, 5vw, 3.4rem); color: #c59d5f; margin-bottom: 4px;
}

.ornament { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 6px 0 20px; color: #c59d5f; font-size: 1.1rem; }
.ornament::before, .ornament::after { content: ''; display: block; height: 1px; width: 60px; background: linear-gradient(to right, transparent, #c59d5f); }
.ornament::after { background: linear-gradient(to left, transparent, #c59d5f); }

.story-text { line-height: 2.2; font-size: 1.5rem; max-width: 700px; margin: 20px auto; color: #555; font-family: 'Great Vibes', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', cursive; }
.story-text em { color: #c59d5f; }

/* ??????????????????????????????????????????????????????????????????????????
   MURAL DE MENSAGENS
   ?????????????????????????????????????????????????????????????????????????? */
.mural-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
  perspective: 1000px;
}
@media (max-width: 480px) {
  .mural-grid { grid-template-columns: 1fr; }
}

.mural-card {
  background: #fff;
  border: 1px solid #e5d5b5;
  border-radius: 12px;
  padding: 24px 20px 20px;
  box-shadow: 0 4px 18px rgba(197,157,95,0.13);
  position: relative;
  overflow: hidden;
  text-align: left;
  animation: cardEntrance 0.5s ease both;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
@media (hover: hover) and (pointer: fine) {
  .mural-card:hover {
    transform: translateY(-6px) rotate(-0.5deg);
    box-shadow: 0 12px 32px rgba(197,157,95,0.25);
  }
}
@keyframes cardEntrance {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
.mural-card::before {
  content: '\201C';
  position: absolute;
  top: 8px;
  left: 14px;
  font-family: 'Great Vibes', cursive;
  font-size: 4rem;
  color: rgba(197,157,95,0.18);
  line-height: 1;
  pointer-events: none;
}
.mural-card-nome {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: #c59d5f;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mural-card-mensagem {
  font-family: 'Great Vibes', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', cursive;
  font-size: 1.35rem;
  line-height: 1.9;
  color: #555;
  word-break: break-word;
}
.mural-card-data {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  color: #bbb;
  margin-top: 12px;
  text-align: right;
  letter-spacing: 0.3px;
}
.mural-card-ribbon {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #e8c98a, #c59d5f, #a67c3b);
  border-radius: 12px 12px 0 0;
}

/* Skeleton loading */
.mural-skeleton {
  background: #f0ebe3;
  border-radius: 12px;
  padding: 24px 20px;
  animation: shimmer 1.4s infinite;
}
.mural-skeleton-line {
  height: 14px;
  background: linear-gradient(90deg, #e8dfd0 25%, #f5f0e8 50%, #e8dfd0 75%);
  background-size: 200% 100%;
  border-radius: 6px;
  margin-bottom: 10px;
  animation: shimmerSlide 1.4s infinite;
}
.mural-skeleton-line.short { width: 50%; }
.mural-skeleton-line.medium { width: 75%; }
@keyframes shimmerSlide {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Empty state */
.mural-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: #c59d5f;
}
.mural-empty-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
  animation: floatIcon 3s ease-in-out infinite;
  font-family: 'Segue UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
}
@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
.mural-empty p {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-style: italic;
  color: #999;
}

.mural-counter {
  display: inline-block;
  background: linear-gradient(135deg, #e8c98a, #c59d5f);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  margin-left: 8px;
  letter-spacing: 0.5px;
  vertical-align: middle;
}

/* ??????????????????????????????????????????????????????????????????????????
   SEÇÃO DE MÚSICA
   ?????????????????????????????????????????????????????????????????????????? */
.music-section {
  margin-top: 40px;
  padding: 30px 20px;
  background: linear-gradient(135deg, #d4a574 0%, #c59d5f 50%, #b8925a 100%);
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.music-section h3 { margin: 0 0 10px 0; font-family: 'Playfair Display', serif; font-size: 1.5rem; color: white; }
.music-section p  { margin-bottom: 20px; opacity: 0.9; font-size: 1rem; color: white; }
.music-section button {
  background: white; color: #c59d5f;
  border: none; padding: 12px 24px;
  border-radius: 30px; font-size: 1rem;
  font-weight: bold; cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: 0.3s;
}
.music-section button:hover { background: #f9f6f2; }

/* ??????????????????????????????????????????????????????????????????????????
   TOGGLE DE ENTREGA
   ?????????????????????????????????????????????????????????????????????????? */
.entrega-wrapper {
  display: flex; justify-content: center; align-items: center;
  gap: 12px; margin: 18px 0 10px 0; flex-wrap: wrap;
}
.entrega-label {
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Playfair Display', serif;
  font-size: 1.1rem; color: #555; font-weight: 600;
}
.toggle-entrega {
  display: flex; border-radius: 30px; overflow: hidden;
  border: 2px solid #c59d5f; box-shadow: 0 2px 8px rgba(197,157,95,0.2);
}
.toggle-entrega button {
  padding: 10px 22px; border: none; background: #fff; color: #c59d5f;
  font-size: 0.95rem; font-weight: bold; cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Montserrat', sans-serif;
  font-style: normal;
  user-select: none; -webkit-user-select: none;
}
.toggle-entrega button.ativo {
  background: #c59d5f; color: #fff;
}

/* ??????????????????????????????????????????????????????????????????????????
   RESPONSIVO – PRESENTES
   ?????????????????????????????????????????????????????????????????????????? */
@media (max-width: 767px) {
  .presente-info { font-size: 0.85rem; }
  .presente-info .presente-nome { font-size: 1rem; }
  .presente-info .presente-disponivel { font-size: 0.7rem; }
  .stepper button { width: 28px; height: 28px; font-size: 1rem; }
  .stepper input { width: 36px; height: 28px; font-size: 0.85rem; }
  #resumoSelecionados { padding: 10px 14px; }
  #resumoSelecionados .resumo-titulo { font-size: 0.8rem; }
  #resumoSelecionados ul li { font-size: 0.75rem; }
}

/* ??????????????????????????????????????????????????????????????????????????
   MODAL DE ACOMPANHANTES
   ?????????????????????????????????????????????????????????????????????????? */
.ma-overlay { z-index: 1050; }

.ma-content {
  max-width: 560px;
  width: 94%;
  max-height: 88vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 32px 28px 24px;
}

.ma-content::-webkit-scrollbar       { width: 6px; }
.ma-content::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; }
.ma-content::-webkit-scrollbar-thumb { background: #c59d5f; border-radius: 3px; }

.ma-header { text-align: center; margin-bottom: 10px; }
.ma-icone  {
  font-size: 3rem;
  display: block;
  margin-bottom: 8px;
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
}

.ma-aviso {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  color: #7a5c2e;
  font-style: normal;
  margin-bottom: 14px;
  line-height: 1.5;
}

.ma-lista {
  list-style: none;
  padding: 0;
  margin: 0 0 18px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ma-acomp-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fdf6ec;
  border: 1px solid #e8c98a;
  border-radius: 10px;
  padding: 12px 14px;
}

.ma-acomp-info { display: flex; align-items: center; gap: 8px; }
.ma-acomp-nome {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: #444;
  font-style: normal;
}

.ma-acomp-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ma-btn {
  flex: 1 1 auto;
  min-width: 80px;
  padding: 7px 12px;
  border: 2px solid #e0d0b8;
  border-radius: 20px;
  background: #fff;
  color: #888;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Montserrat', sans-serif;
  font-style: normal;
  user-select: none;
  -webkit-user-select: none;
  text-align: center;
}
.ma-btn:hover:not(:disabled) { transform: scale(1.04); }
.ma-btn:disabled { opacity: 0.4; cursor: default; }

.ma-btn-sim.ma-btn-ativo   { background: #c59d5f; color: #fff; border-color: #c59d5f; }
.ma-btn-nao.ma-btn-ativo   { background: #dc3545; color: #fff; border-color: #dc3545; }
.ma-btn-aconf.ma-btn-ativo { background: #ff9800; color: #fff; border-color: #ff9800; }

.ma-footer {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* ??? Botões "vai" do modal (SIM / NÃO / A CONFIRMAR) ????????????????????? */
.ma-vai-label {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  color: #555;
  margin: 0 0 8px 0;
  font-style: italic;
}
.ma-vai-toggle {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}
.toggle-vai-btn {
  padding: 8px 16px;
  border: 2px solid #e0d0b8;
  border-radius: 24px;
  background: #fff;
  color: #888;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Montserrat', sans-serif;
  font-style: normal;
}
.toggle-vai-btn:hover   { transform: scale(1.03); border-color: #c59d5f; }
.toggle-vai-btn.ativo-sim   { background: #c59d5f; color: #fff; border-color: #c59d5f; }
.toggle-vai-btn.ativo-nao   { background: #dc3545; color: #fff; border-color: #dc3545; }
.toggle-vai-btn.ativo-aconf { background: #ff9800; color: #fff; border-color: #ff9800; }

/* ??? Toggle Adulto / Criança (aparece quando acompanhante clica Sim) ??????? */
.ma-tipo-wrap {
  display: none; /* mostrado via JS quando ok = SIM */
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 0 2px 4px;
  border-top: 1px dashed #e8c98a;
  margin-top: 2px;
  animation: fadeIn 0.18s ease;
}
.ma-tipo-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  color: #aaa;
  font-style: normal;
  white-space: nowrap;
}
.ma-btn-tipo {
  flex: 1 1 auto;
  min-width: 80px;
  padding: 5px 10px;
  border: 2px solid #e0d0b8;
  border-radius: 20px;
  background: #fff;
  color: #888;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Montserrat', sans-serif;
  font-style: normal;
  user-select: none;
  -webkit-user-select: none;
  text-align: center;
}
.ma-btn-tipo:hover:not(:disabled) { transform: scale(1.04); }
.ma-btn-adulto.ma-btn-ativo  { background: #c59d5f; color: #fff; border-color: #c59d5f; }
.ma-btn-crianca.ma-btn-ativo { background: #7dab6e; color: #fff; border-color: #7dab6e; }

@media (max-width: 480px) {
  .ma-content  { padding: 22px 16px 18px; }
  .ma-btn      { font-size: 0.75rem; padding: 6px 8px; }
  .ma-btn-tipo { font-size: 0.7rem;  padding: 5px 7px; }
  .ma-acomp-nome { font-size: 0.9rem; }
}

/* ??????????????????????????????????????????????????????????????????????????
   BACKGROUND DE FLORES NOS CARDS
   ?????????????????????????????????????????????????????????????????????????? */

/*
 * flores.png       ? seções "Você é Nosso Convidado" e "Lista de Presentes"
 * flores_quadrada.png ? todas as demais seções com .invite-card + footer
 *
 * background-size: cover  ? imagem ocupa 100% da área do card, sem áreas vazias
 * background-position: center ? centraliza em qualquer proporção de card
 * Sem overlay – imagem totalmente opaca, sem transparência
 *
 * Todo o conteúdo fica elevado com z-index: 1 para ficar acima da imagem.
 * O .invite-card já tem  position: relative  e  overflow: hidden.
 */

.card-bg-horizontal {
  background-image: url('../fotos/flores.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

.card-bg-quadrada {
  background-image: url('../fotos/flores_quadrada.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

/* Eleva todo filho direto acima da imagem de fundo */
.card-bg-horizontal > *,
.card-bg-quadrada > * {
  position: relative;
  z-index: 1;
}

/* ??????????????????????????????????????????????????????????????????????????
   ENVELOPE INTRO
   ?????????????????????????????????????????????????????????????????????????? */

/* Tela de fundo do envelope */
#envelopeScreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #f5ede0 0%, #efe4d2 40%, #e8d8c0 100%);
  background-image: url('../fotos/flores_quadrada.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

#envelopeScreen.env-exit {
  opacity: 0;
  transform: scale(1.06);
  pointer-events: none;
}

/* Partículas decorativas */
.env-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.env-particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197,157,95,0.35), transparent 70%);
  animation: envParticleFloat linear infinite;
  pointer-events: none;
}

@keyframes envParticleFloat {
  0%   { transform: translateY(0) rotate(0deg);   opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-110vh) rotate(360deg); opacity: 0; }
}

/* Wrapper centralizado que contém envelope + dica */
.env-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

/* ?? Envelope ??????????????????????????????????????????????????????????? */
.envelope {
  position: relative;
  width: clamp(280px, 72vw, 480px);
  height: clamp(190px, 48vw, 320px);
  /* perspective aqui para que a aba superior faça o flip 3D visível */
  perspective: 900px;
  filter: drop-shadow(0 18px 48px rgba(120,80,20,0.22)) drop-shadow(0 4px 12px rgba(0,0,0,0.12));
  transition: filter 0.3s ease, transform 0.3s ease;
}

.env-wrapper:hover .envelope {
  filter: drop-shadow(0 24px 60px rgba(120,80,20,0.32)) drop-shadow(0 6px 16px rgba(0,0,0,0.16));
  transform: translateY(-4px);
}

/* Corpo do envelope (retângulo base) */
.env-body {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #f7f0e6 0%, #eedfc7 55%, #e6d0b0 100%);
  border-radius: 4px 4px 6px 6px;
  border: 1px solid #d4b880;
  background-image: url('../fotos/flores_quadrada.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* Sobreposição translúcida sobre a imagem de flores para manter tons creme */
.env-body::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(245, 235, 210, 0.55);
  border-radius: inherit;
}

/* Aba esquerda */
.env-flap-left {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 clamp(95px, 24vw, 160px) clamp(140px, 36vw, 240px);
  border-color: transparent transparent #e2cfac transparent;
  border-bottom-left-radius: 4px;
  z-index: 2;
  filter: brightness(0.96);
}

/* Aba direita */
.env-flap-right {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: clamp(95px, 24vw, 160px) 0 0 clamp(140px, 36vw, 240px);
  border-color: transparent transparent transparent #d9c8a0;
  border-bottom-right-radius: 4px;
  z-index: 2;
  filter: brightness(0.93);
}

/* Aba inferior */
.env-flap-bottom {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 clamp(140px, 36vw, 240px) clamp(95px, 24vw, 160px) clamp(140px, 36vw, 240px);
  border-color: transparent transparent #c9b68e transparent;
  z-index: 3;
  filter: brightness(0.98);
}

/* Aba superior (dobradiça que levanta) */
.env-flap-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 55%;
  z-index: 6;
  transform-origin: top center;
  transform: rotateX(0deg);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: visible;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.env-flap-top-inner {
  width: 0;
  height: 0;
  border-style: solid;
  margin: 0 auto;
  /* Triangle pointing DOWN ? — base at top, tip points toward center of envelope */
  border-width: clamp(95px, 24vw, 160px) clamp(140px, 36vw, 240px) 0 clamp(140px, 36vw, 240px);
  border-color: #ddc99e transparent transparent transparent;
  filter: brightness(1.04);
  transform-origin: top center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Estado: aba superior aberta — gira para cima (eixo no topo) */
.envelope.aberto .env-flap-top {
  transform: rotateX(-180deg);
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Lacre — selo de cera vermelho com monograma V & G */
.env-seal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(54px, 12vw, 72px);
  height: clamp(54px, 12vw, 72px);
  z-index: 7;           /* above the flap so it sits on top of the fold */
  cursor: pointer;
  transition: transform 0.35s ease, opacity 0.35s ease;
  animation: sealPulse 2.4s ease-in-out infinite;
}

/* Círculo principal – cera vermelha */
.env-seal::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #e85050, #c0392b 55%, #922b21);
  box-shadow:
    0 4px 14px rgba(144, 30, 22, 0.55),
    inset 0 2px 5px rgba(255,255,255,0.22),
    inset 0 -3px 6px rgba(0,0,0,0.25);
}

/* Anel serrilhado em volta (efeito cera derretida) */
.env-seal::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e85050, #c0392b 60%, #7b241c);
  z-index: -1;
  clip-path: polygon(
    50% 0%, 61% 3%, 70% 0%, 78% 5%, 87% 3%,
    93% 10%, 100% 13%, 100% 22%, 97% 30%, 100% 38%,
    97% 46%, 100% 54%, 97% 62%, 100% 70%, 95% 77%,
    90% 83%, 83% 87%, 76% 93%, 68% 96%, 60% 100%,
    50% 97%, 40% 100%, 32% 96%, 24% 93%, 17% 87%,
    10% 83%, 5% 77%, 0% 70%, 3% 62%, 0% 54%,
    3% 46%, 0% 38%, 3% 30%, 0% 22%, 0% 13%,
    7% 10%, 13% 3%, 22% 5%, 30% 0%, 39% 3%
  );
  box-shadow: 0 6px 18px rgba(144,30,22,0.4);
}

/* Monograma "V & G" */
.env-seal-monogram {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Great Vibes', cursive;
  font-size: clamp(0.75rem, 2.2vw, 1.05rem);
  color: rgba(255, 235, 220, 0.96);
  line-height: 1;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
  z-index: 1;
  white-space: nowrap;
  gap: 1px;
}

.env-seal-amp {
  font-family: 'Playfair Display', serif;
  font-size: 0.65em;
  vertical-align: middle;
  opacity: 0.85;
}

@keyframes sealPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1);    }
  50%       { transform: translate(-50%, -50%) scale(1.07); }
}

/* ?? Cartão convite dentro do envelope ????????????????????????????????? */
.env-card {
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  width: 72%;
  height: 76%;
  border-radius: 6px;
  border: 1px solid #ddc99e;
  box-shadow: 0 2px 16px rgba(120,80,20,0.18);
  z-index: 4;
  overflow: hidden;
  visibility: hidden;
  /* flores como fundo do cartão */
  background-image: url('../fotos/flores_quadrada.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Overlay translúcido para legibilidade */
.env-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 252, 245, 0.72);
  z-index: 0;
}

/* Borda interna decorativa */
.env-card::after {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(197,157,95,0.35);
  border-radius: 3px;
  pointer-events: none;
  z-index: 1;
}

/* Conteúdo textual do cartão */
.env-card-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 12px 10px;
  text-align: center;
  gap: 4px;
}

.env-card-blessing {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(0.45rem, 1.4vw, 0.7rem);
  color: #a67c3b;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0;
}

.env-card-names {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(1.3rem, 4.5vw, 2.6rem);
  color: #c59d5f;
  margin: 0;
  line-height: 1.15;
  text-shadow: 0 1px 4px rgba(197,157,95,0.2);
}

.env-card-divider {
  width: 50px;
  height: 1px;
  background: linear-gradient(to right, transparent, #c59d5f, transparent);
  margin: 2px auto;
}

.env-card-date {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(0.42rem, 1.3vw, 0.65rem);
  letter-spacing: 2.5px;
  color: #7a5c2e;
  text-transform: uppercase;
  border: 1px solid rgba(197,157,95,0.5);
  padding: 3px 10px;
  border-radius: 2px;
}

.env-card-subtitle {
  font-family: 'Playfair Display', serif;
  font-size: clamp(0.38rem, 1.1vw, 0.58rem);
  color: #aaa;
  font-style: italic;
  margin:  0;
}

.env-card-ornament {
  font-family: 'Playfair Display', serif;
  color: #c59d5f;
  font-size: clamp(0.5rem, 1.4vw, 0.75rem);
  margin: 1px 0;
}

.env-card-msg {
  font-family: 'Playfair Display', serif;
  font-size: clamp(0.42rem, 1.3vw, 0.65rem);
  color: #888;
  font-style: italic;
  margin: 0;
}

/* ?? Dica de interação ?????????????????????????????????????????????????? */
.env-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  animation: envHintBounce 1.6s ease-in-out infinite;
  transition: opacity 0.4s ease;
}

.env-hint.hidden {
  opacity: 0;
  pointer-events: none;
}

.env-hint-icon {
  font-size: 1.4rem;
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
}

.env-hint-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(0.85rem, 2.5vw, 1.05rem);
  color: #a67c3b;
  font-style: italic;
  letter-spacing: 0.3px;
}

@keyframes envHintBounce {
  0%, 100% { transform: translateY(0);    opacity: 0.85; }
  50%       { transform: translateY(-6px); opacity: 1; }
}

/* ?? Responsivo ????????????????????????????????????????????????????????? */
@media (max-width: 420px) {
  .envelope     { width: 90vw; height: 58vw; }
  .env-hint-text { font-size: 0.8rem; }

  /* On ?420px the envelope is 90vw wide ? each half = 45vw
     Height is 58vw ? triangle height ? 45% of that ? 26vw             */
  .env-flap-left {
    border-width: 0 0 26vw 45vw;
  }
  .env-flap-right {
    border-width: 26vw 0 0 45vw;
  }
  .env-flap-bottom {
    border-width: 0 45vw 26vw 45vw;
  }
  .env-flap-top-inner {
    border-width: 26vw 45vw 0 45vw;
  }
}

/* ??????????????????????????????????????????????????????????????????????????
   CONTAGEM REGRESSIVA
   ?????????????????????????????????????????????????????????????????????????? */
.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: nowrap;        /* nunca quebra linha */
  margin: 20px auto 4px;
  width: 100%;
}

.countdown-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(197,157,95,0.10);
  border: 1px solid rgba(197,157,95,0.55);
  border-radius: 10px;
  padding: 12px 16px;
  min-width: 62px;
  flex-shrink: 1;           /* permite encolher se necessário */
  box-shadow: 0 2px 10px rgba(197,157,95,0.12);
  transition: transform 0.15s ease;
}

.countdown-box:hover {
  transform: translateY(-2px);
}

.countdown-box span {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: #c59d5f;
  line-height: 1;
  font-style: normal;
  min-width: 2ch;
  text-align: center;
  display: block;
}

.countdown-box small {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #a67c3b;
  margin-top: 5px;
  font-style: normal;
}

.countdown-sep {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: rgba(197,157,95,0.5);
  line-height: 1;
  padding-bottom: 16px; /* alinha ao centro da parte numérica */
  font-style: normal;
  user-select: none;
  flex-shrink: 0;           /* separador nunca encolhe */
}

/* Pulso suave no segundo quando muda */
.countdown-box span.tick {
  animation: cdTick 0.25s ease;
}
@keyframes cdTick {
  0%   { transform: scale(1.25); color: #a67c3b; }
  100% { transform: scale(1);    color: #c59d5f; }
}

/* Estado: dia do casamento chegou */
.countdown.chegou .countdown-box {
  background: rgba(197,157,95,0.22);
  border-color: #c59d5f;
}
.countdown.chegou .countdown-box span {
  color: #a67c3b;
}

/* ?? Mobile: tela ? 480px ??????????????????????????????????????????????? */
@media (max-width: 480px) {
  .countdown      { gap: 4px; }

  .countdown-box  { min-width: 0; padding: 8px 10px; }
  .countdown-box span  { font-size: 1.45rem; min-width: 1.8ch; }
  .countdown-box small { font-size: 0.52rem; letter-spacing: 1px; margin-top: 4px; }

  .countdown-sep  { font-size: 1.2rem; padding-bottom: 14px; }
}

/* ?? Telas muito pequenas ? 360px ??????????????????????????????????????? */
@media (max-width: 360px) {
  .countdown      { gap: 3px; }

  .countdown-box  { padding: 7px 8px; }
  .countdown-box span  { font-size: 1.2rem; }
  .countdown-box small { font-size: 0.48rem; letter-spacing: 0.6px; }

  .countdown-sep  { font-size: 1rem; padding-bottom: 12px; }
}
