/* Ancho de la invitación: cambiar solo esta variable. */
:root {
  --invitation-width: 460px;
  /* Fuente de los títulos grandes. Para cambiarla, editar solo esta línea. */
  --font-titulos: "Coalhand Luke ES", "Amalfi Coast", "Gaegu ES", cursive;
  font-family: "Gaegu ES", "Patrick Hand", sans-serif;
  color: #223f3a;
  background: #f7f0e1;
  font-synthesis: none;
}

/* Fuentes de títulos. Pecita y las otras se usan si están instaladas;
   para que se vean en todos los dispositivos, subir los archivos a /fonts
   (ver README). Si no están, cae a Patrick Hand. */
@font-face { font-family: "Gaegu ES"; font-weight: 300; font-display: swap; src: url("fonts/GaeguES-Light.ttf") format("truetype"); }
@font-face { font-family: "Gaegu ES"; font-weight: 400; font-display: swap; src: url("fonts/GaeguES-Regular.ttf") format("truetype"); }
@font-face { font-family: "Gaegu ES"; font-weight: 700; font-display: swap; src: url("fonts/GaeguES-Bold.ttf") format("truetype"); }
@font-face {
  font-family: "Coalhand Luke ES";
  font-display: swap;
  src: url("fonts/CoalhandLukeES.otf") format("opentype");
}
@font-face {
  font-family: "Amalfi Coast";
  font-display: swap;
  src: local("Amalfi Coast"), url("fonts/AmalfiCoast.ttf") format("truetype");
}
@font-face {
  font-family: "Pecita";
  font-display: swap;
  src: local("Pecita"), url("fonts/Pecita.woff2") format("woff2");
}
@font-face {
  font-family: "Header Script";
  font-display: swap;
  src: local("Beautiful"), local("Billion Miracles"), url("fonts/HeaderScript.woff2") format("woff2");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: url("images/fondo-papel.jpg") 0 0 / 420px auto repeat, #f7f0e1;
  font-size: 22px;
  line-height: 1.22;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.page-shell { width: 100%; padding: 18px 8px; }

.invitation {
  container-type: inline-size;
  position: relative;
  isolation: isolate;
  width: min(var(--invitation-width), 100%);
  margin: 0 auto;
  padding: 100px 34px 215px;
  overflow: hidden;
  background: url("images/fondo-papel.jpg") 0 0 / 420px auto repeat, #f7f0e1;
  border-radius: 34px 28px 37px 31px;
}

.invitation > :not(.floating-flowers) { position: relative; z-index: 2; }

.floating-flowers {
  position: absolute; inset: 0; z-index: 1;
  pointer-events: none; overflow: hidden;
}
.frame, .bloom { position: absolute; height: auto; user-select: none; }
.frame-tl { top: 0; left: 0; width: 36%; }
.frame-tr { top: 0; right: 0; width: 36%; }
.frame-bottom { bottom: 14px; left: 50%; width: 94%; transform: translateX(-50%); }
.bloom { opacity: .95; }
.bloom-a { width: 30px; top: 36%; left: -6px; transform: rotate(-12deg); }
.bloom-b { width: 42px; top: 47%; right: -8px; transform: rotate(8deg); }
.bloom-c { width: 38px; top: 66%; left: -8px; transform: rotate(10deg); }
.bloom-d { width: 28px; top: 78%; right: -6px; transform: rotate(14deg); }
.bloom-e { width: 36px; top: 24%; right: -6px; transform: scaleX(-1) rotate(6deg); }

.hero { margin: 0 auto; text-align: center; }

.pecita-heading { font-family: "Gaegu ES", "Patrick Hand", cursive; }
h1.pecita-heading, h2.pecita-heading { font-family: var(--font-titulos); }
h3.pecita-heading { font-family: "Gaegu ES", "Patrick Hand", cursive; }
.patrick-hand-sc, .intro-copy { font-family: "Gaegu ES", "Patrick Hand", cursive; }
.intro-copy { letter-spacing: 0; }

.section-number {
  font-family: "Gaegu ES", cursive;
  font-weight: 700; color: #9a3f5c;
  font-size: 18px; letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 14px;
}

.save-the-date-art {
  display: block; width: 72%; max-width: 310px; height: auto;
  margin: 0 auto 22px;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  margin: 10px 0 12px; color: #174f4a; font-weight: 400;
  font-size: min(60px, calc((100vw - 84px) / 6.6));
  font-size: min(60px, calc(100cqw / 6.6));
  line-height: 1.25; white-space: nowrap;
  font-family: var(--font-titulos);
}
h2 {
  margin-bottom: 12px; color: #174f4a;
  font-size: 44px; line-height: 1.2; font-weight: 400;
  font-family: var(--font-titulos);
}
h3 {
  margin-bottom: 4px; color: #8e3654;
  font-size: 28px; line-height: 1.15; font-weight: 700;
  font-family: "Gaegu ES", "Patrick Hand", cursive;
}
.invitation h1.pecita-heading { font-weight: 400; }
p { margin-bottom: 15px; }
.hero > p { font-size: 23px; }

.divider { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 28px 0 23px; }
.divider img { height: 58px; width: auto; flex: none; }
.divider-line { flex: 1; border-top: 2.5px dotted #1b514b; opacity: .7; }

.detail-row {
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  padding: 18px 0;
  border-bottom: 2px dashed rgba(25,80,74,.35);
}
.detail-row p { margin-bottom: 0; }

.doodle-button {
  display: inline-flex; min-height: 50px;
  align-items: center; justify-content: center; gap: 8px;
  padding: 9px 18px;
  color: #174f4a; text-align: center; text-decoration: none;
  border: 2px solid currentColor;
  border-radius: 17px 12px 16px 10px / 12px 17px 10px 16px;
  background: rgba(255,251,242,.5); box-shadow: 3px 3px 0 #e3ae44;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
  font-family: "Gaegu ES", cursive;
  font-size: 20px; font-weight: 700; letter-spacing: .02em;
}
.doodle-button:hover, .doodle-button:focus-visible {
  transform: translate(-1px, -2px) rotate(-.4deg);
  background: rgba(238,228,208,.55);
  outline: 3px solid rgba(182,77,105,.25); outline-offset: 3px;
}
.doodle-button.selected { color: #fffaf0; background: #19504a; box-shadow: 3px 3px 0 #b64d69; }
.doodle-button:disabled { cursor: wait; opacity: .62; }
.doodle-button.is-pending { cursor: default; opacity: .68; }
.doodle-button.is-pending:hover { transform: none; background: rgba(255,251,242,.5); outline: none; }
.doodle-icon { width: 25px; height: 25px; flex: 0 0 25px; }
.compact { width: 100%; }

.mood-block { padding-top: 25px; }
.swatches { display: flex; gap: 17px; padding: 7px 5px; }
.swatch {
  display: block; width: 55px; height: 51px;
  border: 2px solid #274943; border-radius: 48% 52% 44% 56%;
  transform: rotate(-4deg);
  box-shadow: inset 2px -2px rgba(255,255,255,.35);
}
.swatch:nth-child(2) { transform: rotate(6deg); }
.swatch:nth-child(3) { transform: rotate(-7deg); }
.swatch-berry { background: #b64d69; }
.swatch-sage { background: #89a68a; }
.swatch-gold { background: #e4ad43; }
.pinterest-link { width: fit-content; margin-top: 18px; }
.ground-note { margin: 14px 0 0; }

.detail-status {
  color: #6f7972; font-family: "Gaegu ES", cursive;
  font-size: 13px; font-weight: 600; padding: 4px 0;
}

.calendar-card, .hand-note {
  border: 2px solid #19504a;
  border-radius: 20px 14px 24px 12px / 13px 24px 14px 21px;
  background: rgba(240,232,216,.65);
}
.calendar-card { margin: 20px auto 2px; padding: 18px; transform: rotate(-.5deg); }
.calendar-heading { display: flex; align-items: baseline; justify-content: space-between; }
.calendar-heading span { color: #8e3654; font-size: 31px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.calendar-grid span { min-height: 31px; display: grid; place-items: center; }
.calendar-grid.weekdays {
  margin-top: 10px; color: #8e3654;
  font-family: "Gaegu ES", cursive; font-size: 18px; font-weight: 700; letter-spacing: .04em;
}
.wedding-day { color: #fffaf0; background: #b64d69; border-radius: 53% 42% 48% 46%; transform: rotate(-6deg); }
.calendar-card > p { margin: 11px 0 0; text-align: center; }
.calendar-options { display: grid; gap: 8px; margin-top: 16px; }
.calendar-options a, .calendar-options button {
  padding: 9px 11px; color: #174f4a;
  border: 1.5px solid #19504a; border-radius: 9px 13px 8px 12px;
  background: rgba(255,253,246,.72);
  font-family: "Gaegu ES", cursive; font-size: 17px; font-weight: 700;
  text-align: center; text-decoration: none; cursor: pointer;
}
.calendar-options a:hover, .calendar-options a:focus-visible,
.calendar-options button:hover, .calendar-options button:focus-visible { color: #fffaf0; background: #19504a; }

label {
  display: block; margin: 12px 0 6px; color: #274943;
  font-family: "Gaegu ES", cursive; font-size: 19px; font-weight: 700; letter-spacing: .035em;
}
input, select, textarea {
  width: 100%; min-height: 50px; padding: 9px 13px;
  color: #223f3a; border: 0; border-bottom: 2px solid #19504a;
  border-radius: 5px 5px 11px 3px; outline: none;
  background: rgba(255,253,246,.72); font-size: 20px;
}
textarea { resize: vertical; border: 2px solid #19504a; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(228,173,67,.4); outline-offset: 2px; }
::placeholder { color: #6f7972; opacity: 1; }

.hand-note { margin-top: 22px; padding: 16px 20px; color: #704630; border-color: #e0a93d; background: #fff2ca; transform: rotate(.4deg); font-size: 22px; }

.kids-section { display: grid; align-items: center; gap: 30px; }
.kids-doodle { text-align: center; order: 2; }
.kids-doodle img { width: 78%; max-width: 280px; height: auto; }

.gifts { display: grid; gap: 28px; }
.bank-accounts { display: grid; gap: 14px; }
.account-card {
  padding: 20px; border: 2px solid #19504a;
  border-radius: 20px 14px 24px 12px / 13px 24px 14px 21px;
  background: #e8eee5; box-shadow: 4px 5px 0 rgba(25,80,74,.12);
}
.account-card:nth-child(2) { border-color: #9b405d; background: rgba(255,242,202,.62); box-shadow: 4px 5px 0 rgba(155,64,93,.14); }
.account-card h3 { margin-bottom: 8px; }
.account-card p:last-child { margin-bottom: 0; }

.contact-section .doodle-button { margin-top: 4px; }

/* ---- Confirmación ---- */
.demo-banner {
  margin: 0 0 18px; padding: 10px 14px; border: 2px dashed #9b405d;
  border-radius: 12px; background: rgba(255,242,202,.7);
  font-family: "Gaegu ES", cursive; font-size: 16px; font-weight: 700; color: #75412f;
}
.demo-banner b { color: #9b405d; }

.question { margin: 0 0 6px; color: #8e3654; font-size: 30px; font-weight: 700; font-family: "Gaegu ES", cursive; line-height: 1.2; }
.rsvp-intro { margin-bottom: 24px; }

.guest-search {
  padding: 20px; border: 2px solid #19504a;
  border-radius: 18px 13px 21px 12px / 13px 20px 14px 19px;
  background: rgba(240,232,216,.65); box-shadow: 4px 5px 0 rgba(25,80,74,.12);
}
.guest-search-row { display: grid; gap: 13px; }
.guest-search-row .doodle-button { width: 100%; }

.candidate-list { display: grid; gap: 10px; margin-top: 22px; }
.candidate-card {
  display: grid; gap: 3px; width: 100%; padding: 13px 15px;
  color: #174f4a; text-align: left; border: 2px solid #19504a;
  border-radius: 15px 10px 17px 11px;
  background: rgba(255,250,240,.82); box-shadow: 3px 3px 0 #e4ad43; cursor: pointer;
}
.candidate-card:hover, .candidate-card:focus-visible {
  background: #fff2ca; outline: 3px solid rgba(182,77,105,.25); outline-offset: 2px;
}
.candidate-card strong { font-family: "Gaegu ES", "Patrick Hand", cursive; font-size: 22px; font-weight: 400; }
.candidate-card span { color: #6f7972; font-family: "Gaegu ES", cursive; font-size: 16px; font-weight: 700; }

.invitation-match { margin-top: 26px; padding-top: 25px; border-top: 2px dashed rgba(25,80,74,.35); }
.match-heading {
  display: grid; align-items: center; gap: 18px; margin-bottom: 28px; padding: 20px;
  border: 2px solid #9b405d; border-radius: 16px 23px 13px 20px / 22px 14px 20px 15px;
  background: rgba(255,242,202,.62); box-shadow: 4px 5px 0 rgba(155,64,93,.14);
}
.match-heading h3 { margin-bottom: 6px; font-size: 32px; }
.match-heading p { margin-bottom: 0; }
.seat-count {
  display: grid; min-width: 112px; min-height: 102px; place-content: center; justify-self: start;
  color: #fffaf0; text-align: center; border-radius: 48% 52% 45% 55% / 54% 43% 57% 46%;
  background: #19504a; transform: rotate(2deg);
}
.seat-count strong { color: #f6d170; font-family: "Gaegu ES", "Patrick Hand", cursive; font-size: 47px; font-weight: 400; line-height: .75; }
.seat-count span {
  margin-top: 7px; font-family: "Gaegu ES", cursive; font-size: 15px;
  font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}

.rsvp-error, .rsvp-success, .rsvp-info {
  margin: 17px 0 0; padding: 12px 15px;
  border-left: 4px solid #b64d69; background: rgba(182,77,105,.08);
}
.rsvp-success { color: #174f4a; border-color: #19504a; background: rgba(137,166,138,.2); }
.rsvp-info { border-color: #e4ad43; background: rgba(255,242,202,.6); color: #75412f; }
.privacy-note { margin-top: 22px; color: #5f695f; font-size: 17px; }

.answer-buttons { display: grid; gap: 13px; }
.answer-card {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) 36px;
  min-height: 86px; align-items: center; gap: 12px; width: 100%; padding: 13px 15px;
  color: #174f4a; text-align: left; border: 2px solid #19504a;
  border-radius: 17px 11px 19px 13px / 13px 19px 12px 17px;
  background: rgba(255,250,240,.78); box-shadow: 3px 4px 0 rgba(25,80,74,.15);
  cursor: pointer; transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.answer-card:nth-child(2) { border-radius: 12px 19px 11px 18px / 19px 12px 18px 11px; }
.answer-card:nth-child(3) { border-radius: 20px 12px 17px 10px / 12px 18px 11px 19px; }
.answer-card:hover, .answer-card:focus-visible {
  z-index: 1; transform: translateY(-2px) rotate(-.2deg); background: rgba(255,251,242,.5);
  outline: 3px solid rgba(228,173,67,.4); outline-offset: 3px;
}
.answer-card.selected { color: #fffaf0; background: #19504a; box-shadow: 4px 5px 0 #e3ae44; transform: translate(-1px, -2px) rotate(-.25deg); }
.answer-number {
  display: grid; width: 34px; height: 34px; place-items: center;
  color: #8e3654; border: 1.5px solid currentColor; border-radius: 52% 48% 46% 54%;
  font-family: "Gaegu ES", cursive; font-size: 15px; font-weight: 700;
}
.selected .answer-number { color: #f6d170; }
.answer-copy { display: grid; gap: 1px; }
.answer-copy strong { font-size: 24px; font-weight: 400; line-height: 1; }
.answer-copy small { opacity: .76; font-size: 17px; line-height: 1.1; }
.answer-mark {
  display: grid; width: 34px; height: 34px; place-items: center; justify-self: end;
  color: #8e3654; border-radius: 50%; background: #f1dfb6;
  font-family: "Gaegu ES", "Patrick Hand", sans-serif; font-size: 21px;
}
.selected .answer-mark { color: #19504a; background: #e4ad43; }

.rsvp-response {
  display: grid; align-items: center; gap: 20px; margin-top: 18px; padding: 19px 20px;
  color: #223f3a; border: 2px solid #19504a;
  border-radius: 13px 21px 14px 19px / 20px 13px 18px 14px;
  background: rgba(232,238,229,.58); box-shadow: 4px 5px 0 rgba(182,77,105,.16);
}
.response-kicker {
  margin-bottom: 4px !important; color: #9a3f5c;
  font-family: "Gaegu ES", cursive; font-size: 15px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
.rsvp-action { width: 100%; font-size: 18px; }
.field-hint { margin: 4px 0 0; color: #6f7972; font-size: 16px; }

.inline-choice { display: flex; flex-wrap: wrap; gap: 9px; margin: 18px 0 4px; padding: 0; border: 0; }
.inline-choice legend { width: 100%; margin-bottom: 6px; color: #274943; font-family: "Gaegu ES", cursive; font-size: 19px; font-weight: 700; }
.inline-choice label { margin: 0; cursor: pointer; }
.inline-choice input { position: absolute; width: 1px; min-height: 1px; opacity: 0; }
.inline-choice span {
  display: block; min-width: 88px; padding: 9px 17px; color: #174f4a;
  border: 2px solid #19504a; border-radius: 14px 9px 15px 10px; background: rgba(255,251,242,.5); text-align: center;
}
.inline-choice input:checked + span { color: #fffaf0; background: #19504a; box-shadow: 3px 3px 0 #e4ad43; }
.inline-choice input:focus-visible + span { outline: 3px solid rgba(228,173,67,.4); outline-offset: 2px; }

.sub-block {
  margin: 22px 0 8px; padding: 20px; border: 2px solid #9b405d;
  border-radius: 18px 12px 20px 13px / 12px 20px 14px 18px; background: rgba(255,242,202,.52);
}
.sub-block > legend { padding: 0 8px; color: #8e3654; font-size: 28px; font-weight: 700; font-family: "Gaegu ES", cursive; }
.travel-dates { display: grid; gap: 10px; }

@media (max-width: 360px) {
  .invitation { padding-right: 24px; padding-left: 24px; }
  .answer-card { grid-template-columns: 32px minmax(0, 1fr) 30px; gap: 8px; padding-right: 11px; padding-left: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Bloques de viaje compactos */
.travel-info .account-card { padding: 6px 14px; margin-top: 8px; box-shadow: 3px 4px 0 rgba(25,80,74,.12); }
.travel-info .account-card h3 { margin: 0; font-size: 24px; }
/* Ejemplos de la demo */
.demo-examples { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.demo-examples button { font-family: "Gaegu ES", cursive; font-size: 16px; font-weight: 700; color: #19504a; background: rgba(255,252,245,.6); border: 2px solid #19504a; border-radius: 999px; padding: 6px 12px; cursor: pointer; }

/* Cajita de aportaciones en especie */
.inkind { margin-top: 22px; padding: 16px 18px; border: 2px solid #19504a; border-radius: 20px 14px 24px 12px / 13px 24px 14px 21px; background: transparent; }
.inkind h3 { margin-bottom: 4px; }
.inkind label { display: block; margin: 10px 0 4px; font-family: "Gaegu ES", cursive; font-size: 17px; font-weight: 700; color: #19504a; }
.inkind input, .inkind textarea { width: 100%; padding: 10px 12px; border: 2px solid #19504a; border-radius: 12px; background: rgba(255,252,245,.6); color: #223f3a; font-size: 17px; }
.inkind .doodle-button { margin-top: 12px; }
.inkind-ok { margin: 10px 0 0; color: #19504a; }
.inkind-error { margin: 10px 0 0; color: #8e3654; }

/* La fuente es muy delgada: se engrosa un poco para leerse bien */


/* Bloques desplegables de viaje */
.travel-info details.account-card { padding: 0; overflow: hidden; }
.travel-info summary { list-style: none; cursor: pointer; padding: 8px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.travel-info summary::-webkit-details-marker { display: none; }
.travel-info summary .toggle { font-family: "Gaegu ES", cursive; font-size: 15px; font-weight: 700; color: #19504a; border: 2px solid #19504a; border-radius: 999px; padding: 3px 10px; background: rgba(255,252,245,.6); white-space: nowrap; }
.travel-info details[open] summary .toggle { background: #19504a; color: #fff; }
.travel-info .more { padding: 2px 14px 12px; }
.travel-info .more ul { list-style: none; margin: 0; padding: 0; }
.travel-info .more, .travel-info .more li, .travel-info .more li span, .travel-info .more li div { font-family: "Gaegu ES", cursive; }
.travel-info .more li { margin: 0 0 10px; font-size: 20px; line-height: 1.2; }
.travel-info .more li b { color: #8e3654; font-weight: 700; font-family: "Gaegu ES", cursive; font-size: 21px; }
.travel-info .more a { color: #19504a; font-weight: 700; font-family: "Gaegu ES", cursive; font-size: 20px; word-break: break-all; }
.travel-info .more .more-note { font-size: 16px; opacity: .8; margin: 6px 0 0; }

/* Espacios prudentes entre textos */
.invitation h2 { margin-top: 2px; margin-bottom: 14px; }
.invitation h3 { margin-bottom: 6px; }
.details .detail-row, .mood-block { margin-top: 14px; }
.travel-info summary .intro { font-family: "Gaegu ES", cursive; flex-basis: 100%; margin: 4px 0 0; font-size: 19px; line-height: 1.2; font-weight: 400; color: #223f3a; }
.travel-info summary { flex-wrap: wrap; }

/* Iconos del viaje */
.travel-info h3 .doodle-icon { width: 22px; height: 22px; vertical-align: -4px; margin-right: 8px; color: #19504a; }
.travel-info .more li { display: flex; gap: 10px; align-items: flex-start; }
.travel-info .item-icon { flex: none; width: 30px; height: 30px; margin-top: 2px; border: 2px solid #19504a; border-radius: 50%; display: grid; place-items: center; color: #19504a; background: rgba(255,252,245,.6); }
.travel-info .item-icon .doodle-icon { width: 18px; height: 18px; }

.house-link { margin-top: 16px; }
.contact-section { text-align: center; }
.contact-section h2.closing { margin: 10px 0 0; font-size: min(48px, calc(100cqw / 7.2)); line-height: 1.25; }

.point-icon { display: inline-block; white-space: nowrap; }
.point-icon .doodle-icon { width: 24px; height: 24px; vertical-align: -6px; color: #8e3654; stroke-width: 2; }

/* Gaegu en todo el texto corrido, calendario y cajas de texto */
body, .invitation :where(p, span, strong, b, li, a, div, small, summary, label, input, textarea, select, button, option) { font-family: "Gaegu ES", "Patrick Hand", cursive; }

.travel-info summary .toggle::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 1px 3px 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.travel-info details[open] summary .toggle::after { transform: rotate(45deg); }
.travel-info, .travel-info details { overflow-anchor: none; }
