:root {
  --red: #8f1020;
  --red-2: #b3172b;
  --green: #1f5f3a;
  --gold: #c9a227;
  --paper: #fffdf8;
  --ink: #2a1a1a;
  --muted: #7a6a66;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: radial-gradient(ellipse at top, #a8162a 0%, #6d0b17 60%, #4a0710 100%) fixed;
  min-height: 100vh;
  line-height: 1.5;
}
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; color: var(--red); margin: .2em 0 .5em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
.wrap { max-width: 860px; margin: 0 auto; padding: 24px 16px 40px; position: relative; z-index: 1; }
body > .wrap > h1 { color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.35); }
.card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 22px clamp(16px, 4vw, 32px);
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  border-top: 4px solid var(--gold);
}
.card.narrow { max-width: 420px; margin: 10vh auto; }
.card.danger { background: transparent; box-shadow: none; border: 0; padding: 0; text-align: right; }
.hero { text-align: center; padding-top: 16px; overflow: hidden; }
.hero-img { width: calc(100% + 2 * clamp(16px, 4vw, 32px)); margin: -16px calc(-1 * clamp(16px, 4vw, 32px)) 12px; display: block; }
.lead { font-size: 1.15rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.small-link { color: rgba(255,255,255,.7); font-size: .9rem; }
a { color: var(--red-2); }
code { background: #f1e8e0; padding: 1px 5px; border-radius: 4px; }

.flash {
  background: #fff6d6; border-left: 5px solid var(--gold); color: #5b4300;
  padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.topbar h1 { color: #fff; }
.topbar a { color: #fff; }

input, select, textarea {
  font: inherit; padding: 10px 12px; border: 1px solid #d9cfc6; border-radius: 10px;
  background: #fff; width: 100%;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); border-color: transparent; }
label { display: block; font-weight: 600; font-size: .92rem; }
label input, label textarea { margin-top: 4px; font-weight: 400; }
form .btn { margin-top: 10px; }
.row { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.row > input, .row > textarea { flex: 1 1 240px; }
.row > select { flex: 1 1 140px; width: auto; }
.row > span { align-self: center; }
.row .btn { margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; align-items: end; }
.grid .full { grid-column: 1 / -1; }
.grid .btn { justify-self: start; }
.inline { display: inline; }

.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  background: var(--green); color: #fff; font: inherit; font-weight: 600;
  padding: 10px 18px; border-radius: 999px; transition: transform .1s, filter .15s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--red-2); box-shadow: inset 0 0 0 2px currentColor; }
.topbar .btn.ghost, .card.danger .btn.ghost { color: #fff; }
.btn.small { padding: 6px 12px; font-size: .88rem; margin: 2px; }
.btn.big { font-size: 1.2rem; padding: 14px 28px; background: var(--red-2); }
.btn.wa { background: #1fa855; }

.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 10px 0; border-bottom: 1px dashed #e5d9cf; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.chips li { background: #f4ece4; border-radius: 999px; padding: 5px 8px 5px 14px; display: flex; align-items: center; gap: 4px; }
.chips li.plain { background: none; padding: 0; }
.x { border: 0; background: transparent; cursor: pointer; font-size: 1.2rem; line-height: 1; color: var(--red-2); padding: 0 4px; }

table.links { width: 100%; border-collapse: collapse; margin: 12px 0 18px; }
table.links th, table.links td { text-align: left; padding: 8px 6px; border-bottom: 1px dashed #e5d9cf; vertical-align: middle; }
table.links td.actions { white-space: nowrap; }
@media (max-width: 640px) {
  table.links thead { display: none; }
  table.links tr { display: block; padding: 8px 0; border-bottom: 1px dashed #e5d9cf; }
  table.links td { display: block; border: 0; padding: 2px 0; }
  table.links td.actions { white-space: normal; }
}

.facts { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 14px 0; }
.facts div { background: #f4ece4; padding: 10px 18px; border-radius: 12px; display: flex; flex-direction: column; min-width: 140px; }
.facts span { font-size: .85rem; color: var(--muted); }
.facts strong { font-size: 1.15rem; color: var(--green); }
.message { white-space: pre-wrap; font-style: italic; background: #fbf4e6; border-radius: 12px; padding: 12px 16px; }
.wishlist { white-space: pre-wrap; text-align: left; background: #fbf4e6; border-radius: 12px; padding: 14px 18px; border-left: 4px solid var(--green); }

/* Geschenk-Animation */
.reveal { margin: 10px 0 20px; min-height: 190px; display: flex; align-items: center; justify-content: center; }
.gift {
  background: none; border: 0; cursor: pointer; position: relative; display: flex; flex-direction: column; align-items: center;
  animation: wobble 2.2s ease-in-out infinite;
}
.gift .box { font-size: 110px; line-height: 1; }
.gift .lid { font-size: 44px; position: absolute; top: -18px; transition: transform .6s ease-in, opacity .6s; }
.gift .hint { color: var(--muted); margin-top: 6px; font-size: .95rem; }
.gift.open { animation: none; }
.gift.open .lid { transform: translateY(-120px) rotate(-40deg); opacity: 0; }
.gift.open .box { animation: pop .5s ease-in forwards; }
@keyframes wobble { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-6deg); } 90% { transform: rotate(6deg); } 95% { transform: rotate(-3deg); } }
@keyframes pop { to { transform: scale(1.6); opacity: 0; } }
.result { animation: appear .6s ease-out; }
.result p { margin: 0; }
.receiver { font-family: Georgia, serif; font-size: clamp(2.2rem, 8vw, 3.4rem); color: var(--red); font-weight: bold; margin: 6px 0 14px !important; }
@keyframes appear { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.result-extra { margin-top: 10px; }

/* Schnee */
.snow {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(3px 3px at 20px 30px, #fff, transparent),
    radial-gradient(2px 2px at 80px 120px, #fff, transparent),
    radial-gradient(3px 3px at 150px 60px, #fff, transparent),
    radial-gradient(2px 2px at 200px 180px, #fff, transparent),
    radial-gradient(2px 2px at 260px 90px, #fff, transparent);
  background-size: 300px 220px;
  opacity: .55;
  animation: snow 18s linear infinite;
}
@keyframes snow { from { background-position: 0 0; } to { background-position: 60px 220px; } }
@media (prefers-reduced-motion: reduce) { .snow, .gift { animation: none; } }

footer { text-align: center; color: rgba(255,255,255,.6); padding: 10px 0 30px; position: relative; z-index: 1; font-size: .9rem; }
