:root {
  font-family: Georgia, "Times New Roman", serif;
  color: #432619;
  background: #342519;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-height: 100svh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 76px 17px 28px;
  isolation: isolate;
}
button, input, summary { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 3px solid #34543a; outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.scene { position: fixed; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; }
.photo {
  --x: 12%;
  --y: 61%;
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: max(100%, 75svh);
  height: auto;
  aspect-ratio: 3 / 4;
  transform: translate(calc(0% - var(--x)), calc(0% - var(--y)));
  background: url("/static/fondo-navidad.png") center / cover no-repeat;
  background-image: image-set(url("/static/fondo-navidad.webp") type("image/webp"), url("/static/fondo-navidad.png") type("image/png"));
}
.snow { position: absolute; inset: 0; clip-path: polygon(12% 0, 51% 0, 51% 9%, 12% 11%); }
.snow--middle-top { clip-path: polygon(56% 0, 87% 0, 87% 7.2%, 56% 8.8%); }
.snow--left { clip-path: polygon(13% 15%, 51% 12.5%, 51% 59%, 22.5% 59%, 22% 47%, 13% 38%); }
.snow--middle { clip-path: polygon(56% 12%, 87% 10.8%, 88% 59.5%, 56% 59%); }
.snow--right { clip-path: polygon(92.8% 10.5%, 100% 10%, 100% 60%, 93% 59.6%); }
.flake {
  position: absolute;
  top: -1%;
  width: clamp(1.5px, .25vw, 3px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #f5faff;
  opacity: .67;
  animation: fall linear infinite;
}
@keyframes fall {
  45% { transform: translate(6px, 44svh); }
  72% { transform: translate(1px, 72svh); }
  to { transform: translate(11px, 100svh); }
}
.flame {
  position: absolute;
  left: 10.25%;
  top: 58.7%;
  width: 2.9%;
  height: 4.7%;
  isolation: isolate;
}
.flame::before {
  content: "";
  position: absolute;
  inset: -23% -43%;
  background: radial-gradient(ellipse, #ffd28265, transparent 66%);
  animation: glow 3.4s ease-in-out infinite alternate;
}
.flame::after {
  content: "";
  position: absolute;
  left: 26%;
  top: 1%;
  width: 53%;
  height: 87%;
  background: radial-gradient(ellipse at 49% 70%, #fffdf0 20%, #fff3aa 62%, #ffaf4660 100%);
  border-radius: 49% 54% 43% 45% / 78% 83% 22% 22%;
  opacity: .82;
  mix-blend-mode: screen;
  transform-origin: 50% 95%;
  animation: sway 3.4s ease-in-out infinite;
}
@keyframes sway {
  0%,100% { transform: rotate(-6deg) scale(.91,.97); opacity: .72; }
  36% { transform: rotate(7deg) scale(1.06,1.04); opacity: .96; }
  68% { transform: rotate(-3deg) scale(.93,.94); opacity: .77; }
}
@keyframes glow { from { opacity: .22; } to { opacity: .75; } }
body.motion-paused .flake, body.motion-paused .flame::before, body.motion-paused .flame::after { animation-play-state: paused; }

.paper {
  position: relative;
  width: min(100%, 520px);
  padding: clamp(25px, 5vw, 41px) clamp(19px, 5vw, 38px) clamp(25px, 4vw, 34px);
  isolation: isolate;
  filter: drop-shadow(0 8px 18px #1f110da0);
}
.paper::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at center, #fff2d740 35%, #9b4f1a45), url("/static/textura-papel.jpg") repeat, #f5dfb7;
  box-shadow: inset 0 0 19px #94602b55;
  clip-path: polygon(.4% 2%,3% .7%,7% 1.1%,13% .2%,21% .9%,30% .1%,38% .9%,46% .3%,56% 1%,64% .3%,73% .8%,81% .2%,88% 1%,95% .4%,99% 1.6%,99.7% 8%,99.1% 17%,100% 26%,99.3% 37%,99.8% 49%,99.2% 61%,99.8% 74%,99.2% 87%,99.7% 97%,97% 99.2%,91% 98.8%,83% 100%,75% 99%,68% 99.6%,59% 99%,50% 100%,42% 99.1%,32% 99.7%,24% 99%,16% 100%,9% 99%,3% 99.6%,.6% 98%,1% 92%,.2% 84%,.7% 74%,.2% 63%,1% 51%,.2% 42%,.8% 31%,.2% 23%,.9% 15%,.1% 8%);
}
.holly { position: absolute; top: 11px; left: 12px; width: 42px; height: 35px; }
.holly::before,.holly::after { content:""; position:absolute; width:25px; height:14px; background:#385235; clip-path:polygon(0 50%,19% 29%,23% 7%,44% 19%,63% 0,70% 24%,100% 47%,76% 62%,66% 97%,44% 80%,24% 94%,18% 70%); }
.holly::before { transform:rotate(-32deg); left: 13px; top: 3px; }
.holly::after { transform:rotate(108deg); left: 3px; top: 14px; }
.holly i { position:absolute; z-index:1; left:12px; top:13px; width:8px;height:8px;border-radius:50%;background:#981b1c;box-shadow:6px 4px #740b13,-3px 5px #ab312a; }
h1 { color: #6f1416; font-size: clamp(29px, 8vw, 51px); font-style: italic; line-height: .99; margin: 5px 0 12px; text-align: center; }
h1 em { display: block; }
.ornament { display:flex; gap:13px; align-items:center; justify-content:center; margin: 0 auto 16px; width: 84%; }
.ornament::before,.ornament::after { content:""; height:1px; background:#853335; flex:1; }
.ornament i { width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 34% 29%,#de5750,#9f1c22 53%,#610c13); position:relative; }
.ornament i::before { content:""; position:absolute; width:8px; height:5px; background:#a67b3e; top:-4px; left:8px; border-radius: 2px 2px 0 0; }
form { display: grid; gap: 10px; }
input, .reveal { width: 100%; min-height: 46px; border-radius: 11px; }
input { padding: 0 14px; font-size: 16px; color: #432619; background: #fff6e7; border: 1px solid #b29067; }
input::placeholder { color: #725d4e; }
.reveal { border: 1px solid #7d1418; background: linear-gradient(#ab292e,#7c1118); color: #fff4e2; font-weight: bold; padding: 8px 10px; box-shadow: 0 4px 7px #54171445; }
.reveal:disabled { opacity: .65; }
.error { color: #841723; font-weight: bold; margin: 8px 0 0; }
.error:empty { display: none; }
.budget { text-align: center; color: #2e4228; padding: 10px 7px; background: #c8914430; border: 1px solid #b88d5765; border-radius: 12px; margin: 18px 0 13px; }
.budget h2 { margin: 0 0 5px; font-size: clamp(20px,5vw,29px); }
.budget p { margin: 0; font-style: italic; font-size: clamp(15px,4vw,19px); line-height: 1.3; }
.accordions { border: 1px solid #a67d5280; border-radius: 12px; background: #fff5df50; }
details + details { border-top: 1px solid #a67d5280; }
summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 7px 12px; font-weight: bold; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; width: 8px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); margin-right: 4px; }
details[open] summary::after { transform: rotate(225deg); }
.accordion-content { padding: 0 12px 12px; }
.accordion-content p { margin: 0; line-height: 1.45; }
.names { margin: 0; padding-left: 17px; columns: 2; column-gap: 19px; font-size: 14px; }
.names li { break-inside: avoid; margin-bottom: 5px; }
.result { background: #fff1d3; border: 1px solid #b18a5b; padding: 10px; text-align: center; border-radius: 10px; }
.result p { margin: 5px 0; }
.result h2 { margin: 6px 0; color: #6f1416; }
.back { min-height: 44px; background: #3d5238; color: #fff8ec; border: 0; border-radius: 8px; padding: 0 13px; }
.sound {
  position: fixed; z-index: 2; top: max(12px,env(safe-area-inset-top)); right: max(12px,env(safe-area-inset-right));
  display: grid; place-items: center; padding: 0; background: #7d1112; color: #fff0cc;
  border: 2px solid #f3d9a2; border-radius: 50%; width: 53px; height: 53px; box-shadow: 0 2px 10px #26140b70;
}
.sound svg { width: 27px; height: 27px; }
.sound .waves, .sound.on .cross { display:none; }
.sound.on .waves { display:block; }
@media (min-width: 760px) {
  body { padding: 34px 82px; }
  .photo { --x: 32%; --y: 63%; }
  .sound { top: 18px; right: 20px; width: 58px; height: 58px; }
}
@media (prefers-reduced-motion: reduce) {
  .flake, .flame::before, .flame::after { animation: none; }
  .flake { display: none; }
}

@media (max-width: 480px) {
  body { padding-inline: 42px 13px; }
  .paper { width: min(100%, 349px); padding-inline: 17px; }
  .photo { --x: 16%; }
  .snow { opacity: .7; }
  .flake { width: clamp(1.4px, .45vw, 2.2px); }
}
