*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; }
body {
  margin: 0; min-height: 100vh;
  background: #f7e3e8;
  color: #5a2236;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  overflow-x: hidden;
}
button, a { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #9e1f4e; outline-offset: 4px; }

.mesa { min-height: 100vh; display: grid; place-items: center; padding: 3rem 1.25rem; }
.tarjeta {
  width: min(440px, 100%);
  background: #fffaf8;
  padding: 3rem 2.5rem 2.25rem;
  text-align: center;
  box-shadow: 0 1px 0 #ecc9d2, 0 18px 40px rgba(140, 40, 75, .12);
  position: relative;
}
.tarjeta::before {
  content: ""; position: absolute; inset: 10px;
  border: 1px solid #edc3cf; pointer-events: none;
}
.titulo { margin: 0; font-weight: 400; font-size: 2.3rem; letter-spacing: .02em; color: #9e1f4e; }
.dedicatoria { margin: .3rem 0 0; font-style: italic; font-size: 1.05rem; color: #8a4a5e; }

.sobre { position: relative; margin: 2.2rem auto 1.6rem; width: min(230px, 70%); }
.sobre img { display: block; width: 100%; height: auto; user-select: none; }
.sobre.abriendo picture { display: block; animation: temblor .5s ease-in-out; }
@keyframes temblor {
  0%, 100% { transform: rotate(0); }
  30% { transform: rotate(-4deg); }
  70% { transform: rotate(3deg); }
}
.corazones { position: absolute; inset: 0; pointer-events: none; }
.corazon {
  position: absolute; top: 20%; font-size: 1.3rem; color: #c43a6c; opacity: 0;
  font-family: system-ui, sans-serif;
  animation: subir 1.4s ease-out forwards;
}
@keyframes subir {
  0% { transform: translateY(0) scale(.6); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(-110px) scale(1.1); opacity: 0; }
}

.nota { margin: 0 0 1.4rem; min-height: 1.5em; font-size: 1.05rem; }
.enviar {
  background: #9e1f4e; color: #fffaf8; border: 0; border-radius: 2px;
  padding: .8rem 1.8rem; min-height: 46px;
  font-style: italic; font-size: 1.05rem; letter-spacing: .02em;
  cursor: pointer; transition: background-color .2s ease;
}
.enviar:hover { background: #831540; }
.enviar:disabled { background: #c9798f; cursor: default; }
.volver { color: #9e1f4e; text-underline-offset: 4px; padding: .3rem 0; display: inline-block; }

.firma {
  font-style: normal; margin-top: 2.4rem; padding-top: 1.2rem;
  border-top: 1px solid #f0d3db;
  display: flex; flex-direction: column; align-items: center; gap: .15rem;
  font-size: .9rem;
}
.firma-label { font-style: italic; color: #a46a7c; margin-bottom: .15rem; }
.firma a { color: #7c2443; text-decoration-color: #e2a3b6; text-underline-offset: 3px; padding: .15rem 0; min-height: 26px; overflow-wrap: anywhere; }
.firma a:hover { text-decoration-color: currentColor; }

@media (max-width: 400px) {
  .mesa { padding: 1.5rem .9rem; }
  .tarjeta { padding: 2.4rem 1.4rem 1.8rem; }
  .titulo { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .corazones { display: none; }
}
