@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap');

:root {
  --color-bg: #f5f5f5;
  --color-bg-alt: #ffffff;
  --color-primary: #111111;
  --color-accent: #444444;
  --color-text: #1a1a1a;
  --color-muted: #666666;
  --radius-card: 16px;
  --shadow-card: 0 8px 20px rgba(0, 0, 0, 0.08);
  --font-title: "Playfair Display", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
}

html { scroll-behavior: smooth; }

.container {
  max-width: 480px;
  margin-inline: auto;
  padding-inline: 1.5rem;
  padding-block: 1.25rem;
}

.site-header {
  margin-bottom: 0.75rem;
}

.nav {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  max-width: 340px;
  margin-inline: auto;
}

.nav-link {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--color-text);
  background: var(--color-bg-alt);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 999px;
  padding: 0.6rem 0.9rem;
  font-weight: 600;
  transition: transform .2s ease, filter .2s ease;
}

.nav-link:hover { transform: translateY(-1px); filter: brightness(1.02); }
.nav-link:active { transform: translateY(0); filter: brightness(0.98); }
.nav-link:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.hero {
  text-align: center;
  padding-block: 1rem 1.25rem;
  animation: fadeUp .6s ease both;
}

.title {
  font-family: var(--font-title);
  font-size: 2rem;
  letter-spacing: 0.5px;
  margin: 0.5rem 0 0.25rem;
}

.subtitle {
  margin: 0 0 0.25rem;
  color: var(--color-muted);
}

.date {
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.photo-placeholder {
  background: linear-gradient(135deg, var(--color-bg-alt), #eeeeee);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  margin-top: 1rem;
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--color-muted);
  font-weight: 600;
}

h1, h2, h3 {
  font-family: var(--font-title);
}

h2 {
  font-size: 1.4rem;
  margin: 0.75rem 0 0.5rem;
}

h3 {
  font-size: 1.1rem;
  margin: 0.25rem 0 0.25rem;
}

.section {
  margin-block: 0.75rem 0.5rem;
  padding-block: 0.75rem;
  animation: fadeUp .6s ease both;
}

main .section:nth-of-type(1) { animation-delay: .05s; }
main .section:nth-of-type(2) { animation-delay: .10s; }
main .section:nth-of-type(3) { animation-delay: .15s; }
main .section:nth-of-type(4) { animation-delay: .20s; }

.card {
  background: var(--color-bg-alt);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1rem;
}

.quick-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.link-card {
  text-align: center;
}

.rsvp-form {
  display: grid;
  gap: 0.75rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.12);
  background: var(--color-bg-alt);
  color: var(--color-text);
}

textarea.form-control {
  resize: none;
}

.form-control:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.btn-block { width: 100%; }

.info-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
}

.info-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.info-list li:last-child { border-bottom: none; }

.section-title { text-align: center; }
.gifts-intro { text-align: center; margin-bottom: 1rem; }
.gifts-intro p { margin: 0; color: var(--color-muted); }
.gifts-intro-pgto {
  margin-top: 0.7rem !important;
  color: var(--color-text) !important;
  font-size: 0.86rem;
  background: #f1f1f1;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
  display: inline-block;
}

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

.gift-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--color-bg-alt);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.gift-card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(0,0,0,0.12); }
.gift-card.is-esgotado { opacity: 0.6; }

.gift-media {
  position: relative;
  height: 130px;
  background: #ffffff;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 10px;
}
.gift-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.gift-media-icon { background: linear-gradient(135deg, #fafafa, #eee); }
.gift-media-icon .gift-icon { width: 44%; height: 44%; object-fit: contain; opacity: 0.85; }

.gift-badge {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 0.35rem;
  background: rgba(17,17,17,0.82);
  color: #fff;
}

.gift-body { padding: 0.7rem 0.6rem 0.9rem; text-align: center; }
.gift-title { margin: 0 0 0.25rem; font-size: 0.98rem; line-height: 1.25; }
.gift-price { margin: 0; font-weight: 700; color: var(--color-primary); }
.gift-cotas { margin: 0.3rem 0 0; font-size: 0.78rem; color: var(--color-muted); }

.btn {
  display: inline-block;
  text-decoration: none;
  border: none;
  cursor: pointer;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  transition: transform .2s ease, filter .2s ease, background-color .2s ease, color .2s ease;
}

/* ---- Detalhe do presente ---- */
.back-link {
  display: inline-block;
  margin-bottom: 0.75rem;
  text-decoration: none;
  color: var(--color-muted);
  font-weight: 600;
}
.back-link:hover { color: var(--color-text); }

.gift-detail-media {
  width: 100%;
  height: 220px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  display: grid;
  place-items: center;
  margin-bottom: 0.9rem;
  padding: 12px;
}
.gift-detail-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.gift-detail-media.gift-media-icon { background: linear-gradient(135deg, #fafafa, #eee); }
.gift-detail-media.gift-media-icon .gift-icon { width: 38%; height: 38%; object-fit: contain; opacity: 0.85; }

.gift-detail-title { text-align: center; margin: 0 0 0.4rem; }
.gift-detail-desc { text-align: center; color: var(--color-muted); margin: 0 0 0.5rem; }
.gift-detail-price { text-align: center; font-size: 1.4rem; font-weight: 700; margin: 0 0 1rem; }

.gift-contribution-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.field-label { font-weight: 600; margin-bottom: -0.35rem; }

/* Seletor de cotas */
.cota-picker { border: none; padding: 0; margin: 0; }
.cota-picker legend { font-weight: 600; margin-bottom: 0.5rem; padding: 0; }
.cota-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.cota-option:has(input:checked) { border-color: var(--color-primary); background: #fafafa; }
.cota-option input { accent-color: var(--color-primary); }
.cota-option-label { display: flex; flex-direction: column; }
.cota-option-label strong { font-size: 1rem; }
.cota-option-label small { color: var(--color-muted); }

/* Stepper de quantidade */
.qtd-stepper { display: flex; align-items: stretch; gap: 0.5rem; max-width: 200px; }
.qtd-stepper .form-control { text-align: center; font-weight: 700; }
.stepper-btn {
  width: 48px;
  border: 1px solid rgba(0,0,0,0.12);
  background: var(--color-bg-alt);
  border-radius: 12px;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}
.stepper-btn:hover { background: #f0f0f0; }

.total-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  background: #111;
  color: #fff;
  border-radius: 12px;
}
.total-box strong { font-size: 1.2rem; }

.pagamento-nota { font-size: 0.78rem; color: var(--color-muted); text-align: center; margin: 0.25rem 0 0; }

.pgto-emoji { font-size: 3rem; line-height: 1; margin-bottom: 0.5rem; }

.btn-primary { background: var(--color-primary); color: #ffffff; }
.btn-accent { background: var(--color-accent); color: #ffffff; }
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary); color: #ffffff; }

.btn:hover { transform: translateY(-1px); filter: brightness(1.02); }
.btn:active { transform: translateY(0); filter: brightness(0.98); }
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.hero-names {
  font-family: 'Great Vibes', cursive;
  font-size: 3rem;
  font-weight: normal;
  color: var(--color-text);
  text-align: center;
  letter-spacing: 1px;
}

.footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-muted);
  padding-block: 1.25rem 0.5rem;
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.12);
  margin-bottom: 0.75rem;
}

.alert-success {
  background: #f0f0f0;
  color: var(--color-text);
}

.alert-error {
  background: #ffffff;
  color: #b00020;
  border-color: rgba(176,0,32,0.2);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 768px) {
  .container { max-width: 600px; padding-inline: 2rem; }
  .title { font-size: 2.4rem; }
  h2 { font-size: 1.6rem; }
  h3 { font-size: 1.2rem; }
  .card { padding: 1.25rem; }
  .photo-placeholder { min-height: 220px; }
  .form-control { padding: 1rem 1.1rem; }
  .gifts .gift-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
  .gift-media { height: 160px; }
  .gift-detail-media { height: 300px; }
}

@media (min-width: 1024px) {
  .container { max-width: 1100px; padding-inline: 2.5rem; }

  .hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 1.5rem;
    text-align: left;
  }

  .title { font-size: 3rem; }
  .subtitle { margin-bottom: 0.5rem; }
  .date { margin-bottom: 1rem; }
  .hero .btn { justify-self: start; }

  .photo-placeholder { min-height: 320px; grid-column: 2; grid-row: 1 / -1; }

  .event-info .card { padding: 1.5rem; }
  .event-info .info-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem; }
  .event-info .info-list li { border: none; padding: 0.25rem 0; }

  .gifts .gift-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
  .quick-links { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }

  .thanks { padding-block: 2rem; }
  .thanks .card { padding-block: 2rem; }

  .hero-names { font-size: 4rem; }
}

/* Dashboard / Painel da Noiva */
.dashboard-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.dashboard-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
  text-align: center;
}

.stat-number {
  font-family: var(--font-title);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
  margin: 0.5rem 0;
}

.stat-label {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin: 0;
}

.dashboard-section {
  margin-top: 2.5rem;
}

.dashboard-section h2 {
  margin-bottom: 1rem;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  background: var(--color-bg-alt);
  box-shadow: var(--shadow-card);
}

.dashboard-table {
  width: 100%;
  min-width: 600px; /* Force scroll on mobile */
  border-collapse: collapse;
  font-size: 0.95rem;
}

.dashboard-table th, 
.dashboard-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.dashboard-table th {
  background: rgba(0,0,0,0.02);
  font-weight: 600;
  color: var(--color-muted);
}

.dashboard-table tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 99px;
  background: #f0f0f0;
  color: var(--color-text);
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-success {
  background: #111;
  color: #fff;
}

.split-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.simple-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--color-bg-alt);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.simple-list li {
  padding: 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.simple-list li:last-child {
  border-bottom: none;
}

.item-name {
  font-weight: 500;
}

.item-meta {
  font-size: 0.85rem;
  color: var(--color-muted);
}

.column-title {
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

@media (min-width: 768px) {
  .dashboard-cards {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .split-columns {
    grid-template-columns: 1fr 1fr;
  }
}

.admin-access {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: #999;
  text-decoration: none;
  text-align: center;
}

.admin-access:hover {
  color: #666;
}

/* ---- Painel: cabeçalho, botões pequenos ---- */
.painel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.section-head h2 { margin: 0; }
.section-head-acoes { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.section-head-acoes .btn-mini { text-decoration: none; }

.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.9rem; }

.btn-mini {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.15);
  background: var(--color-bg-alt);
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.btn-mini:hover { background: #f2f2f2; }
.btn-mini-danger { color: #b00020; border-color: rgba(176,0,32,0.25); }
.btn-mini-danger:hover { background: #fbeaea; }

/* ---- Painel: lista de convidados (cartões) ---- */
.guest-list { display: grid; gap: 0.7rem; }

.guest-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 0.9rem 1rem;
}

.guest-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.guest-name { font-weight: 600; font-size: 1.02rem; }
.guest-meta { font-size: 0.85rem; color: var(--color-muted); margin-top: 0.25rem; }
.guest-msg { font-size: 0.88rem; color: var(--color-text); margin-top: 0.4rem; font-style: italic; }

.pill {
  display: inline-block;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: #f0f0f0;
  color: var(--color-text);
  white-space: nowrap;
}
.pill-yes { background: #e7f5ec; color: #1f7a3d; }
.pill-no { background: #fbeaea; color: #b00020; }

.guest-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; align-items: center; }
.guest-actions form { margin: 0; }

/* ---- Painel: formulários adicionar/editar ---- */
.guest-form { display: grid; gap: 0.6rem; }
.guest-add {
  background: var(--color-bg-alt);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1rem;
  margin-bottom: 1rem;
}
.guest-edit { margin-top: 0.25rem; }
.guest-form-title { margin: 0 0 0.25rem; font-size: 1.05rem; }
.guest-form-actions { display: flex; gap: 0.5rem; align-items: center; }

.mini-toggle { display: flex; gap: 1.2rem; font-weight: 600; font-size: 0.9rem; }
.mini-toggle label { display: flex; align-items: center; gap: 0.35rem; cursor: pointer; }
.mini-toggle input { accent-color: var(--color-primary); }

.empty-note { color: var(--color-muted); text-align: center; padding: 1.25rem; }

/* ---- Formulário de RSVP (convidado) ---- */
.rsvp-intro { color: var(--color-muted); margin-bottom: 1rem; }
.opt { color: var(--color-muted); font-weight: 400; font-size: 0.85em; }
.field-error { color: #b00020; font-size: 0.82rem; }

.rsvp-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.rsvp-choice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.85rem 0.6rem;
  border: 1.5px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.rsvp-choice input { position: absolute; opacity: 0; pointer-events: none; }
.rsvp-choice:has(input:checked) { border-color: var(--color-primary); background: #fafafa; }
.rsvp-choice:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* ---- Login ---- */
.login-section { max-width: 400px; margin-inline: auto; }
.login-card { text-align: center; }
.login-title { font-family: var(--font-title); margin: 0 0 0.35rem; }
.login-sub { color: var(--color-muted); margin: 0 0 1.25rem; font-size: 0.92rem; }
.login-card .rsvp-form { text-align: left; }

/* ---- Acompanhantes (formulários) ---- */
.field-hint { font-size: 0.82rem; color: var(--color-muted); margin: 0 0 0.5rem; }
.mini-label { font-size: 0.8rem; font-weight: 600; color: var(--color-muted); }

.acomp-lista { display: grid; gap: 0.85rem; }
.acomp-row { display: flex; gap: 0.6rem; align-items: center; }
.acomp-row .form-control { flex: 1; }
.acomp-remove {
  flex: 0 0 auto;
  width: 46px;
  align-self: stretch;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(176,0,32,0.3);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23b00020' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 6 5 6 21 6'/%3E%3Cpath d='M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6'/%3E%3Cline x1='10' y1='11' x2='10' y2='17'/%3E%3Cline x1='14' y1='11' x2='14' y2='17'/%3E%3Cpath d='M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3C/svg%3E") center / 20px no-repeat;
  cursor: pointer;
  transition: background-color .15s ease;
}
.acomp-remove:hover { background-color: #fbeaea; }

.btn-add-acomp { margin-top: 0.7rem; }

/* Lista de acompanhantes no cartão do painel */
.acomp-view-list { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; gap: 0.15rem; }
.acomp-view-list li {
  font-size: 0.9rem;
  color: var(--color-text);
  padding-left: 1rem;
  position: relative;
}
.acomp-view-list li::before { content: "•"; position: absolute; left: 0.2rem; color: var(--color-muted); }

/* ---- Popup de confirmação (RSVP) ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}
.modal-overlay[hidden] { display: none; }
.modal-box {
  background: var(--color-bg-alt);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  animation: fadeUp .25s ease both;
}
.modal-title { margin: 0 0 0.25rem; font-family: var(--font-title); font-size: 1.4rem; }
.modal-sub { color: var(--color-muted); margin: 0; font-size: 0.9rem; }
.modal-lista { list-style: none; padding: 0; margin: 0.75rem 0 1rem; display: grid; gap: 0.4rem; }
.modal-lista li { padding: 0.6rem 0.85rem; background: #f5f5f5; border-radius: 10px; font-weight: 600; }
.modal-question { font-weight: 600; margin: 0 0 1rem; text-align: center; }
.modal-actions { display: flex; gap: 0.6rem; }
.modal-actions .btn { flex: 1; }

/* ---- Painel: Presentes (Parte A) ---- */
.presentes-resumo {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}
.resumo-item {
  background: var(--color-bg-alt);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  padding: 0.75rem 0.4rem;
  text-align: center;
}
.resumo-num { display: block; font-family: var(--font-title); font-size: 1.6rem; font-weight: 700; color: var(--color-primary); line-height: 1; }
.resumo-lbl { display: block; font-size: 0.72rem; color: var(--color-muted); margin-top: 0.3rem; }

.presente-list { display: grid; gap: 0.7rem; }
.presente-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 0.9rem 1rem;
}
.presente-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}
.presente-nome { font-weight: 600; font-size: 0.98rem; }

.pill-andamento { background: #fff2d6; color: #9a6400; }

.progress-bar {
  height: 8px;
  background: #ececec;
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar span {
  display: block;
  height: 100%;
  background: var(--color-primary);
  border-radius: 999px;
  transition: width .4s ease;
}
.progress-info {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-top: 0.4rem;
}

.contrib-list { list-style: none; padding: 0; margin: 0.85rem 0 0; display: grid; gap: 0.6rem; }
.contrib-list li {
  border-top: 1px solid rgba(0,0,0,0.07);
  padding-top: 0.6rem;
}
.contrib-top { display: flex; justify-content: space-between; gap: 0.5rem; align-items: baseline; }
.contrib-nome { font-weight: 600; font-size: 0.92rem; }
.contrib-valor { font-weight: 700; white-space: nowrap; }
.contrib-meta { font-size: 0.8rem; color: var(--color-muted); margin-top: 0.15rem; }
.contrib-recado { font-size: 0.85rem; font-style: italic; margin-top: 0.3rem; }
.tag-manual {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #eee;
  color: var(--color-muted);
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  vertical-align: middle;
}
.contrib-list .btn-mini-danger { margin-top: 0.5rem; }

.btn-registrar { margin-top: 0.85rem; }
.reg-form { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px dashed rgba(0,0,0,0.15); }

@media (min-width: 768px) {
  .presentes-resumo { max-width: 520px; }
}

.route-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.route-buttons .btn {
  flex: 1;
  min-width: 110px;
  text-align: center;
  font-size: 0.9rem;
}

/* Botões de rota com logos oficiais */
.btn-route {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  background: #ffffff;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-route:hover { filter: none; background: var(--color-bg-alt); }

.route-logo {
  height: 22px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.route-logo-uber {
  height: 18px;
}

/* ============================================================
   INVITE CARD — Homepage
   ============================================================ */

.invite-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem 2.5rem;
  animation: fadeUp .6s ease both;
}

.monogram {
  color: var(--color-text);
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: center;
  animation: fadeUp .5s ease both;
}

.monogram-img {
  display: block;
  width: 64px;
  height: auto;
  max-width: 35%;
}

/* Monograma fixo no topo de todas as páginas (dentro do header, abaixo do menu) */
.site-monogram {
  margin-top: 0.9rem;
  margin-bottom: 0.25rem;
}

/* Tamanho fixo (o mesmo que tinha antes na home). Não depende da largura do pai,
   então fica idêntico em todas as páginas e em qualquer tela. */
.site-monogram .monogram-img {
  width: 22px;
  max-width: none;
}

/* ============================================================
   FOTOS POLAROID (home e nossa história)
   ============================================================ */

.polaroids {
  display: flex;
  justify-content: center;
  align-items: center;
  /* espaço extra nas laterais para os cantos girados não encostarem na borda */
  padding: 1.4rem 0.5rem 1.6rem;
  width: 100%;
}

.polaroid {
  flex: 0 0 auto;
  /* acompanha o tamanho da tela: nunca menor que 84px nem maior que 132px */
  width: clamp(84px, 25vw, 132px);
  background: #ffffff;
  padding: 6px 6px 20px;   /* moldura branca, mais larga embaixo (estilo polaroid) */
  border-radius: 2px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.polaroid img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #eeeeee;
}

/* Inclinações diferentes + leve sobreposição, como fotos jogadas na mesa */
.polaroid:nth-child(1) { transform: rotate(-8deg) translateY(4px); z-index: 1; }
.polaroid:nth-child(2) { transform: rotate(3deg)  translateY(-6px); z-index: 3; margin-inline: -12px; }
.polaroid:nth-child(3) { transform: rotate(7deg)  translateY(2px); z-index: 2; }

/* Par de fotos no topo da Nossa História — encosta por cima da borda do card */
.polaroids-topo {
  position: relative;
  z-index: 2;                /* fica na frente do card branco */
  padding-bottom: 0;
  margin-bottom: -2.2rem;    /* puxa o card para cima, criando a sobreposição */
}

.polaroids-topo .polaroid:nth-child(1) { transform: rotate(-6deg) translateY(3px); z-index: 1; }
.polaroids-topo .polaroid:nth-child(2) { transform: rotate(5deg) translateY(-3px); z-index: 2; margin-inline: -12px; }

/* O card ganha espaço no topo para o texto não ficar embaixo das fotos */
.polaroids-topo + .card {
  padding-top: 2.6rem;
}

@media (min-width: 768px) {
  .polaroid { width: 150px; }
  .polaroid:nth-child(2) { margin-inline: -16px; }
  .polaroids-topo { margin-bottom: -2.8rem; }
  .polaroids-topo + .card { padding-top: 3.2rem; }
}

.couple-names {
  font-family: 'Great Vibes', cursive;
  font-size: 3.2rem;
  font-weight: normal;
  color: var(--color-text);
  margin: 0 0 0.5rem;
  line-height: 1.2;
  animation: fadeUp .6s .05s ease both;
}

.invite-text {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0 0 1.75rem;
  animation: fadeUp .6s .1s ease both;
}

.date-section {
  width: 100%;
  max-width: 320px;
  margin-bottom: 1.5rem;
  animation: fadeUp .6s .15s ease both;
}

.date-year {
  font-family: var(--font-title);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  color: var(--color-muted);
  margin: 0 0 0.5rem;
}

.date-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  border-top: 1px solid rgba(0,0,0,0.14);
  border-bottom: 1px solid rgba(0,0,0,0.14);
  padding: 0.35rem 0;
  margin-bottom: 0.45rem;
}

.date-month,
.date-time {
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.date-day {
  font-family: var(--font-title);
  font-size: 3.8rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 0.82;
  display: inline-flex;
  align-items: center;
}

.date-weekday {
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0;
}

.venue-section {
  margin-bottom: 1.25rem;
  animation: fadeUp .6s .2s ease both;
}

.venue-name {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text);
  margin: 0 0 0.2rem;
}

.venue-address {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0;
}

.action-hint {
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0 0 1rem;
  animation: fadeUp .6s .25s ease both;
}

.action-buttons {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: flex-start;
  animation: fadeUp .6s .3s ease both;
}

.action-btn-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #ffffff;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

/* ============================================================
   LOCATION MODAL — Bottom sheet + Confirm dialog
   ============================================================ */

.loc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.loc-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.loc-sheet {
  background: var(--color-bg-alt);
  border-radius: 24px 24px 0 0;
  padding: 1.5rem 1.5rem 2.5rem;
  width: 100%;
  max-width: 480px;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.34, 1.1, 0.64, 1);
}
.loc-overlay.active .loc-sheet {
  transform: translateY(0);
}

.loc-sheet-title {
  font-family: var(--font-title);
  font-size: 1.1rem;
  text-align: center;
  margin: 0 0 1.25rem;
  color: var(--color-text);
}

.loc-options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.loc-option {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  background: var(--color-bg);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: left;
  width: 100%;
  transition: transform .15s ease, filter .15s ease;
}
.loc-option:hover  { transform: translateY(-1px); filter: brightness(0.97); }
.loc-option:active { transform: translateY(0); }

.loc-option-logo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.loc-option-logo img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.confirm-app-logo img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.loc-cancel {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.85rem;
  background: none;
  border: none;
  color: var(--color-muted);
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 12px;
  transition: background .15s ease;
}
.loc-cancel:hover { background: rgba(0,0,0,0.05); }

/* Confirm dialog */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.confirm-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.confirm-card {
  background: var(--color-bg-alt);
  border-radius: 20px;
  padding: 1.75rem 1.5rem 1.25rem;
  max-width: 300px;
  width: 88%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.22s cubic-bezier(0.34, 1.2, 0.64, 1);
  box-shadow: 0 16px 48px rgba(0,0,0,0.22);
}
.confirm-overlay.active .confirm-card { transform: scale(1); }

.confirm-app-logo {
  margin-bottom: 0.75rem;
}

.confirm-title {
  font-family: var(--font-title);
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}
.confirm-text {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-muted);
  margin: 0 0 1.25rem;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.confirm-no {
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.12);
  background: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-muted);
  cursor: pointer;
  transition: background .15s ease;
}
.confirm-no:hover { background: rgba(0,0,0,0.04); }

.confirm-yes {
  padding: 0.75rem;
  border-radius: 12px;
  border: none;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter .15s ease;
}
.confirm-yes:hover { filter: brightness(1.12); }

.action-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.22);
}

.action-btn:active {
  transform: translateY(0);
  filter: brightness(0.88);
  box-shadow: 0 4px 12px rgba(0,0,0,0.14);
}

.action-label {
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  text-align: center;
  line-height: 1.5;
}

@media (min-width: 400px) {
  .couple-names { font-size: 3.8rem; }
  .date-day { font-size: 4.2rem; }
  .action-btn { width: 74px; height: 74px; }
}

/* ============================================================
   INTRO — CONVITE / ENVELOPE
   ============================================================ */

#intro-overlay {
  position: fixed;
  inset: 0;
  background: #111111;
  z-index: 9999;
  display: none;              /* escondido por padrão — só a 1ª visita mostra */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: introAppear 0.5s ease both;
}
#intro-overlay.intro-show { display: flex; }

#intro-overlay.hiding {
  animation: introDisappear 0.85s ease forwards;
  pointer-events: none;
}

@keyframes introAppear {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes introDisappear {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* Cena — wrapper clicável */
.env-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  animation: envEntrance 0.9s 0.35s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

@keyframes envEntrance {
  from { opacity: 0; transform: scale(0.75) translateY(28px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

/* Envelope — container */
.envelope {
  position: relative;
  width: 300px;
  height: 200px;
}

/* Traseira/fundo do envelope */
.env-back {
  position: absolute;
  inset: 0;
  background: #ffffff;
  border-radius: 6px;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.6),
    0  6px 16px rgba(0, 0, 0, 0.35);
  z-index: 1;
}

/* Tampa do envelope — triângulo apontando para baixo */
/* Frente/bolso do envelope — cobre e esconde a carta quando fechado */
.env-front {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 66%;
  background: #f1f1f1;
  border-radius: 0 0 6px 6px;
  clip-path: polygon(0 8%, 50% 0, 100% 8%, 100% 100%, 0 100%);
  z-index: 3;
}
/* leve sombreado das dobras */
.env-front::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(0,0,0,0.05), transparent 42%),
    linear-gradient(225deg, rgba(0,0,0,0.05), transparent 42%);
}

/* Tampa (triângulo) por cima da frente */
.env-flap {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 54%;
  background: #e6e6e6;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition:
    transform 0.5s cubic-bezier(0.4, 0, 0.7, 1),
    opacity   0.3s 0.2s ease-in;
  z-index: 4;
}

/* Abertura da tampa: recolhe para cima e some (ease-in de saída) */
.envelope.opening .env-flap {
  transform: scaleY(0);
  opacity: 0;
}

/* Carta — cabe inteira dentro do envelope e fica escondida atrás da frente */
.env-letter {
  position: absolute;
  left: 18px; right: 18px;
  top: 68px;
  height: 126px;   /* 68 + 126 = 194 < 200 (não passa por baixo) */
  background: #ffffff;
  border: 1px solid #eaeaea;
  border-radius: 4px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.7rem 1.1rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  pointer-events: none;
  transform: translateY(0);
  transition:
    transform  0.9s 0.4s cubic-bezier(0.34, 1.12, 0.64, 1),
    box-shadow 0.9s 0.4s ease;
}

/* Carta desliza pra fora do envelope ao abrir (ease-out suave) */
.envelope.opening .env-letter {
  transform: translateY(-120px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.4);
}

/* Tipografia interna da carta */
.env-label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #aaaaaa;
  margin: 0 0 0.3rem;
}

.env-divider {
  width: 36px;
  height: 1px;
  background: #cccccc;
  margin: 0 auto 0.5rem;
}

.env-names {
  font-family: 'Great Vibes', cursive;
  font-size: 2.1rem;
  font-weight: normal;
  color: #111111;
  margin: 0 0 0.25rem;
  line-height: 1.2;
}

.env-subtitle {
  font-family: var(--font-title);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: #666666;
  margin: 0;
}

/* Texto "Clique para abrir" com pulso suave */
.env-hint {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: #d8d8d8;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0;
  animation: hintPulse 2.4s 1.2s ease-in-out infinite both;
}

.env-scene.opened .env-hint {
  animation: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* Telas muito pequenas (< 340px) */
@media (max-width: 339px) {
  .envelope                     { width: 264px; height: 176px; }
  .env-letter                   { top: 60px; height: 110px; }  /* 60 + 110 = 170 < 176 */
  .envelope.opening .env-letter { transform: translateY(-106px); }
  .env-names                    { font-size: 1.8rem; }
}

/* Acessibilidade: respeita quem prefere menos movimento */
@media (prefers-reduced-motion: reduce) {
  #intro-overlay,
  .env-scene,
  .env-flap,
  .env-letter,
  .env-hint {
    animation: none !important;
    transition: none !important;
  }
}
