@import url("https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400..700;1,6..96,400..700&family=Yellowtail&family=Nunito:wght@400;600;700;800&display=swap");

:root {
  --paper: #f8f7f3;
  --cream-card: #fffdf9;
  --rust: #a8553a;
  --rust-dark: #87412b;
  --ink: #3f2f27;
  --ink-soft: #7d6b5f;
  --peach: #e8a48c;
  --yellow: #efd28a;
  --sage: #b7cea6;
  --sky: #a8c3d8;
  --line: #eadfce;
  --shadow: 0 1px 2px rgba(120, 70, 40, 0.06), 0 12px 32px -8px rgba(120, 70, 40, 0.22);
  --shadow-lg: 0 2px 4px rgba(120, 70, 40, 0.06), 0 24px 60px -12px rgba(120, 70, 40, 0.32);
  --display: "Bodoni Moda", "Didot", Georgia, serif;
  --script: "Yellowtail", cursive;
  --body: "Nunito", system-ui, sans-serif;
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--paper);
  /* Aquarellpapier-Struktur aus der Einladung (nahtlose Kachel) */
  background-image: url("../img/paper.jpg");
  background-size: 256px 256px;
  font-family: var(--body);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

img {
  max-width: 100%;
}

/* ---------- Basis-Bausteine (auch für admin.html) ---------- */

main:not(.page) {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.title,
.section-title {
  font-family: var(--display);
  font-weight: 500;
  color: var(--rust);
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-align: center;
  margin: 0 0 0.75rem;
}

.script,
.title .script,
.section-title .script {
  font-family: var(--script);
  font-weight: 400;
  color: var(--rust);
  font-size: 1.05em;
  letter-spacing: 0;
  display: inline-block;
  transform: rotate(-4deg) translateY(-0.04em);
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.6rem;
  text-align: center;
}

.card {
  background: var(--cream-card);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 2rem;
}

input[type="password"],
input[type="text"],
input[type="url"] {
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  padding: 0.9rem 1.2rem;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: #fff;
  outline: none;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="password"]:focus,
input[type="text"]:focus,
input[type="url"]:focus {
  border-color: var(--peach);
  box-shadow: 0 0 0 5px rgba(232, 164, 140, 0.22);
}

button {
  font-family: var(--body);
  font-weight: 800;
  font-size: 1rem;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: var(--rust);
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 6px 0 var(--rust-dark), 0 10px 20px -6px rgba(135, 65, 43, 0.5);
  transition: transform 0.15s var(--ease-bounce), box-shadow 0.15s, background 0.15s;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--rust-dark), 0 14px 24px -6px rgba(135, 65, 43, 0.5);
}

button:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--rust-dark), 0 4px 10px -4px rgba(135, 65, 43, 0.5);
}

button:disabled {
  cursor: default;
  transform: none;
}

button.secondary {
  background: #fff;
  color: var(--ink-soft);
  box-shadow: 0 0 0 2px var(--line) inset;
}

button.secondary:hover,
button.secondary:active {
  background: #f6efe4;
  transform: none;
  box-shadow: 0 0 0 2px var(--line) inset;
}

.error {
  color: var(--rust-dark);
  font-weight: 700;
  font-size: 0.9rem;
  margin: 0.25rem 0 0;
}

.login-card {
  width: 100%;
  max-width: 420px;
  text-align: center;
  margin-top: 1rem;
}

.login-card h1,
.login-card h2 {
  font-family: var(--display);
  font-weight: 500;
  color: var(--rust);
  font-size: 2rem;
  margin: 0 0 1rem;
}

#login-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ---------- Hintergrund-Ballons ---------- */

.balloons {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.balloon {
  position: absolute;
  bottom: -160px;
  width: var(--w, 60px);
  opacity: 0.75;
  animation: rise var(--dur, 18s) linear var(--delay, 0s) infinite;
}

.balloon svg {
  display: block;
  width: 100%;
  overflow: visible;
  animation: sway 3.4s ease-in-out infinite alternate;
  transform-origin: 50% 100%;
}

@keyframes rise {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(calc(-100vh - 260px));
  }
}

@keyframes sway {
  from {
    transform: rotate(-6deg) translateX(-8px);
  }
  to {
    transform: rotate(6deg) translateX(8px);
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vh, 3.5rem) 1rem 5.5rem;
  overflow: hidden;
}

.hero-stage {
  position: relative;
  width: min(680px, 100%);
  aspect-ratio: 600 / 400;
  margin: 0 auto;
  --mx: 0;
  --my: 0;
}

.rainbow {
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  height: auto;
  overflow: visible;
}

.rainbow path {
  fill: none;
  stroke-width: 36;
  stroke-linecap: butt;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 1.6s cubic-bezier(0.65, 0, 0.35, 1) calc(0.15s + var(--i) * 0.18s) forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

.hero-title {
  position: absolute;
  left: 0;
  right: 0;
  top: 41%;
  margin: 0;
  text-align: center;
  color: var(--rust);
  line-height: 0.9;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

.hero-title .big {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.4rem, 15vw, 7.2rem);
  letter-spacing: 0.02em;
  display: flex;
}

.hero-title .big > span {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px) scale(0.6) rotate(-8deg);
  animation: pop-in 0.7s var(--ease-bounce) forwards;
}

.hero-title .big > span:nth-child(1) { animation-delay: 0.9s; }
.hero-title .big > span:nth-child(2) { animation-delay: 0.98s; }
.hero-title .big > span:nth-child(3) { animation-delay: 1.06s; }
.hero-title .big > span:nth-child(4) { animation-delay: 1.14s; }
.hero-title .big > span:nth-child(5) { animation-delay: 1.22s; }
.hero-title .eins > span:nth-child(1) { animation-delay: 1.75s; }
.hero-title .eins > span:nth-child(2) { animation-delay: 1.83s; }
.hero-title .eins > span:nth-child(3) { animation-delay: 1.91s; }
.hero-title .eins > span:nth-child(4) { animation-delay: 1.99s; }

.hero-title .letter {
  display: inline-block;
}

/* Wackeln auf der inneren Ebene, damit die Einblend-Animation außen unberührt bleibt */
.hero-title .big > span:hover .letter {
  animation: jiggle 0.6s ease;
}

@keyframes pop-in {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes jiggle {
  0% { transform: none; }
  30% { transform: translateY(-14px) rotate(-6deg); }
  60% { transform: translateY(2px) rotate(4deg); }
  100% { transform: none; }
}

.hero-title .wird {
  font-family: var(--script);
  font-size: clamp(2.2rem, 9vw, 4.4rem);
  margin: -0.12em 0 -0.05em;
  transform: rotate(-6deg);
  clip-path: inset(0 100% 0 0);
  animation: write 0.8s ease-out 1.4s forwards;
}

@keyframes write {
  to {
    clip-path: inset(0 -10% 0 0);
  }
}

.critter {
  position: absolute;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  z-index: 1;
}

.hero-stage .critter {
  translate: calc(var(--mx) * var(--depth, 10px)) calc(var(--my) * var(--depth, 10px));
  transition: translate 0.4s ease-out;
}

.monkey {
  width: 15%;
  left: 52%;
  top: -3.5%;
  --depth: 6px;
  transform-origin: 50% 100%;
  opacity: 0;
  animation: drop-in 0.9s var(--ease-bounce) 1.9s forwards, bob 2.6s ease-in-out 2.8s infinite;
}

.bear {
  width: 30.5%;
  left: -17%;
  top: 36%;
  --depth: 18px;
  transform-origin: 50% 100%;
  opacity: 0;
  animation: slide-left 1s var(--ease-bounce) 0.7s forwards, waddle 3.2s ease-in-out 1.8s infinite;
}

.lion {
  width: 30%;
  right: -13%;
  top: 30%;
  --depth: 14px;
  transform-origin: 50% 100%;
  opacity: 0;
  animation: slide-right 1s var(--ease-bounce) 0.9s forwards, waddle 3.6s ease-in-out 2s infinite reverse;
}

.giraffe {
  width: clamp(110px, 15vw, 200px);
  right: max(-30px, calc(50% - 640px));
  bottom: -50px;
  transform-origin: 50% 100%;
  transform: translateY(110%);
  animation: peek 1.2s var(--ease-bounce) 2.3s forwards, nod 5s ease-in-out 3.6s infinite;
}

@keyframes drop-in {
  from { opacity: 0; transform: translateY(-60px) rotate(-20deg); }
  to { opacity: 1; transform: none; }
}

@keyframes slide-left {
  from { opacity: 0; transform: translateX(-80px) rotate(-10deg); }
  to { opacity: 1; transform: none; }
}

@keyframes slide-right {
  from { opacity: 0; transform: translateX(80px) rotate(10deg); }
  to { opacity: 1; transform: none; }
}

@keyframes peek {
  to { transform: translateY(0); }
}

@keyframes bob {
  0%, 100% { opacity: 1; transform: translateY(0) rotate(0); }
  50% { opacity: 1; transform: translateY(-6px) rotate(-4deg); }
}

@keyframes waddle {
  0%, 100% { opacity: 1; transform: rotate(0); }
  25% { opacity: 1; transform: rotate(-3deg); }
  75% { opacity: 1; transform: rotate(3deg); }
}

@keyframes nod {
  0%, 100% { transform: translateY(0) rotate(0); }
  45% { transform: translateY(0) rotate(0); }
  55% { transform: translateY(6px) rotate(-3deg); }
  65% { transform: translateY(0) rotate(1deg); }
}

.hero-date {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem 0.8rem;
  margin: clamp(0.5rem, 3vw, 1.5rem) 0 1.25rem;
  font-weight: 800;
  font-size: clamp(1rem, 2.6vw, 1.25rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0;
  animation: fade-up 0.8s ease 2.2s forwards;
}

.hero-date .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--peach);
}

.hero-date .dot:nth-of-type(2) {
  background: var(--sky);
}

.countdown {
  position: relative;
  z-index: 2;
  display: flex;
  gap: clamp(0.4rem, 2vw, 0.8rem);
  opacity: 0;
  animation: fade-up 0.8s ease 2.4s forwards;
}

.countdown > div {
  background: var(--cream-card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  min-width: clamp(64px, 17vw, 84px);
  padding: 0.7rem 0.4rem 0.55rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.countdown > div::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: var(--c, var(--peach));
}

.countdown > div:nth-child(2) { --c: var(--yellow); }
.countdown > div:nth-child(3) { --c: var(--sage); }
.countdown > div:nth-child(4) { --c: var(--sky); }

.countdown b {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.7rem, 6vw, 2.3rem);
  line-height: 1.1;
  color: var(--rust);
  font-variant-numeric: tabular-nums;
}

.countdown span {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.countdown.done {
  font-family: var(--script);
  font-size: 2rem;
  color: var(--rust);
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.hero .login-card {
  position: relative;
  z-index: 3;
  margin-top: 1.75rem;
  padding: 1.6rem 1.6rem 1.4rem;
  background: rgba(255, 253, 249, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  animation: fade-up 0.8s ease 2.6s forwards;
}

.hero .login-card h2 {
  font-size: 1.7rem;
  margin-bottom: 0.9rem;
}

.input-row {
  display: flex;
  gap: 0.5rem;
}

.login-card.shake {
  animation: shake 0.45s ease;
  opacity: 1;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px) rotate(-1deg); }
  40% { transform: translateX(9px) rotate(1deg); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(4px); }
}

.scroll-cue {
  position: relative;
  z-index: 3;
  margin-top: 2rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: var(--rust);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  opacity: 0;
  animation: fade-up 0.8s ease 2.6s forwards;
}

.scroll-cue svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: nudge 1.6s ease-in-out infinite;
}

@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}

/* ---------- Inhaltsseite ---------- */

.page {
  position: relative;
  z-index: 1;
  width: 100%;
}

.page > section {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 6rem) 1.25rem 0;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s var(--ease-bounce);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.info-card {
  position: relative;
  background: var(--cream-card);
  border-radius: 26px;
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.35s var(--ease-bounce), box-shadow 0.35s;
}

.info-card.c1 { transform: rotate(-1.5deg); }
.info-card.c2 { transform: rotate(1deg) translateY(10px); }
.info-card.c3 { transform: rotate(-0.5deg); }

.info-card:hover {
  transform: rotate(0) translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.info-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: -3.2rem auto 0.8rem;
  font-size: 1.8rem;
  border-radius: 50% 46% 52% 48% / 48% 52% 46% 50%;
  background: var(--peach);
  box-shadow: var(--shadow);
}

.c2 .info-icon { background: var(--yellow); }
.c3 .info-icon { background: var(--sky); }

.info-card h3 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--rust);
  font-size: 1.5rem;
  margin: 0 0 0.35rem;
}

.info-card p {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.5;
}

.pill-link {
  display: inline-block;
  margin-top: 0.9rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: #f4ebde;
  color: var(--rust);
  font-weight: 800;
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.2s;
}

.pill-link:hover {
  background: #eedfcb;
}

/* ---------- Wunschliste ---------- */

.wishlist {
  position: relative;
}

.wishlist .critter.gifts {
  position: absolute;
  width: clamp(90px, 14vw, 150px);
  right: 1.25rem;
  top: clamp(1.5rem, 5vw, 3rem);
  transform: rotate(6deg);
  animation: bob 3s ease-in-out infinite;
}

.subtitle {
  text-align: center;
  color: var(--ink-soft);
  font-weight: 600;
  line-height: 1.6;
  margin: 0 auto 2rem;
  max-width: 52ch;
}

.subtitle strong {
  color: var(--rust);
}

.subtitle.small {
  font-size: 0.92rem;
  margin-top: -1.2rem;
}

.progress {
  max-width: 460px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.progress-track {
  height: 16px;
  border-radius: 999px;
  background: #efe5d6;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(120, 70, 40, 0.1);
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--peach), var(--yellow), var(--sage), var(--sky));
  background-size: 460px 100%;
  transition: width 1s var(--ease-bounce);
}

.progress p {
  margin: 0.6rem 0 0;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  padding-bottom: 1rem;
}

.item-card {
  --accent: var(--peach);
  position: relative;
  background: var(--cream-card);
  border-radius: 26px;
  padding: 1.4rem 1.4rem 1.3rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  overflow: hidden;
  isolation: isolate;
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.35s var(--ease-bounce), box-shadow 0.35s;
  animation: card-in 0.6s var(--ease-bounce) both;
  animation-delay: calc(var(--n, 0) * 70ms);
}

.item-card:nth-child(4n + 2) { --accent: var(--yellow); }
.item-card:nth-child(4n + 3) { --accent: var(--sage); }
.item-card:nth-child(4n + 4) { --accent: var(--sky); }
.item-card:nth-child(odd) { --tilt: -0.8deg; }
.item-card:nth-child(even) { --tilt: 0.8deg; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
}

.item-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 170px;
  height: 150px;
  right: -55px;
  top: -60px;
  background: var(--accent);
  opacity: 0.55;
  border-radius: 58% 42% 50% 50% / 45% 55% 45% 55%;
  filter: url(#watercolor);
  transition: transform 0.6s var(--ease-bounce);
}

.item-card:not(.claimed):hover {
  transform: rotate(0) translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.item-card:not(.claimed):hover::before {
  transform: scale(1.25) rotate(20deg);
}

.item-num {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: 1rem;
  color: var(--rust);
  opacity: 0.75;
}

.item-card h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1.2;
  color: var(--ink);
  padding-right: 1.5rem;
}

.item-card .note {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.93rem;
  margin: 0;
}

.item-card a.link {
  align-self: flex-start;
  margin-top: 0.15rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 35%, #fff);
  color: var(--rust-dark);
  font-weight: 800;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s var(--ease-bounce);
}

.item-card a.link:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.item-card .spacer {
  flex: 1;
}

.item-card button {
  margin-top: 0.6rem;
  width: 100%;
}

.item-card.claimed {
  background: #f8f2e9;
  box-shadow: 0 1px 2px rgba(120, 70, 40, 0.06);
}

.item-card.claimed > :not(.stamp) {
  opacity: 0.45;
}

.item-card.claimed::before {
  filter: url(#watercolor) grayscale(1);
  opacity: 0.25;
}

.item-card.claimed h3 {
  text-decoration: line-through;
  text-decoration-color: var(--rust);
  text-decoration-thickness: 2px;
}

.stamp {
  position: absolute;
  right: 1rem;
  bottom: 1.1rem;
  padding: 0.35rem 0.8rem;
  border: 3px solid var(--rust);
  border-radius: 10px;
  color: var(--rust);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: rotate(-12deg);
  opacity: 0.85;
  mix-blend-mode: multiply;
}

.item-card.just-claimed .stamp {
  animation: stamp 0.5s var(--ease-bounce);
}

@keyframes stamp {
  from { transform: rotate(-12deg) scale(2.4); opacity: 0; }
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--ink-soft);
  font-weight: 600;
}

/* ---------- Kuchenliste ---------- */

.cake-board {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.75rem;
  align-items: start;
}

.cake-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-content: flex-start;
}

.cake-item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.1rem 0.65rem 0.75rem;
  background: var(--cream-card);
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-weight: 700;
  transform: rotate(var(--tilt, 0deg));
  animation: card-in 0.5s var(--ease-bounce) both;
  animation-delay: calc(var(--n, 0) * 50ms);
}

.cake-item:nth-child(3n + 1) { --tilt: -1.2deg; }
.cake-item:nth-child(3n + 2) { --tilt: 0.8deg; }

.cake-item.new {
  animation: cake-pop 0.6s var(--ease-bounce) both;
  box-shadow: 0 0 0 3px var(--yellow), var(--shadow);
}

@keyframes cake-pop {
  from { transform: scale(0.3) rotate(-20deg); opacity: 0; }
}

.cake-emoji {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f6ecdc;
  font-size: 1.15rem;
}

.cake-item:nth-child(4n + 1) .cake-emoji { background: color-mix(in srgb, var(--peach) 45%, #fff); }
.cake-item:nth-child(4n + 2) .cake-emoji { background: color-mix(in srgb, var(--yellow) 50%, #fff); }
.cake-item:nth-child(4n + 3) .cake-emoji { background: color-mix(in srgb, var(--sage) 50%, #fff); }
.cake-item:nth-child(4n + 4) .cake-emoji { background: color-mix(in srgb, var(--sky) 50%, #fff); }

.cake-empty {
  color: var(--ink-soft);
  font-weight: 600;
  padding: 1rem 0;
}

.cake-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: var(--cream-card);
  border-radius: 26px;
  padding: 1.6rem 1.4rem 1.3rem;
  box-shadow: var(--shadow-lg);
  transform: rotate(1deg);
}

.cake-form-emoji {
  position: absolute;
  top: -22px;
  right: 18px;
  font-size: 2.4rem;
  animation: bob 2.4s ease-in-out infinite;
}

.cake-form h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--rust);
  margin: 0 0 0.2rem;
}

.cake-form .hint {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------- Footer ---------- */

.footer {
  position: relative;
  margin-top: 4rem;
  padding: 3rem 1.25rem 0;
  text-align: center;
  overflow: hidden;
}

.footer-text {
  font-family: var(--display);
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  color: var(--rust);
  margin: 0;
}

.footer .lion2 {
  position: static;
  display: block;
  margin: 0 auto 0.5rem;
  width: clamp(130px, 22vw, 200px);
  transform-origin: 50% 100%;
  animation: waddle 3.4s ease-in-out infinite;
}

.croc-lane {
  position: relative;
  height: 120px;
  margin-top: 1rem;
  overflow: hidden;
  pointer-events: none;
}

.hero .croc-lane {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  z-index: 2;
}

/* Krokodil als Gliederpuppe: Beine, Schwanz und Körper einzeln animiert */
.croc-rig {
  --step: 0.8s;
  position: absolute;
  left: 0;
  bottom: 6px;
  width: 260px;
  aspect-ratio: 447 / 188;
  transform: translateX(100vw);
  animation: crawl var(--crawl, 32s) linear var(--crawl-delay, 0s) infinite;
}

.hero .croc-rig {
  --crawl-delay: 2.5s;
}

.croc-rig .part {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
}

.croc-rig .body {
  transform-origin: 60% 70%;
  animation: croc-bob calc(var(--step) / 2) ease-in-out infinite alternate;
}

.croc-rig .leg-far {
  transform-origin: 35.6% 62.2%;
  animation: croc-step var(--step) linear infinite;
}

.croc-rig .leg-back {
  transform-origin: 78.5% 59%;
  animation: croc-step var(--step) linear infinite;
}

.croc-rig .leg-front {
  transform-origin: 47.2% 61.2%;
  animation: croc-step var(--step) linear calc(var(--step) / -2) infinite;
}

.croc-rig .tail {
  transform-origin: 91.9% 60.1%;
  animation: croc-tail calc(var(--step) * 2) ease-in-out infinite;
}

/* Schritt: Fuß am Boden von vorn nach hinten schieben, dann angehoben nach vorn schwingen */
@keyframes croc-step {
  0% { transform: rotate(16deg); }
  50% { transform: rotate(-16deg); }
  70% { transform: translateY(-5px) rotate(-4deg); }
  85% { transform: translateY(-4px) rotate(10deg); }
  100% { transform: rotate(16deg); }
}

@keyframes croc-bob {
  from { transform: translateY(0) rotate(0); }
  to { transform: translateY(-2px) rotate(-0.8deg); }
}

@keyframes croc-tail {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(5deg); }
}

@keyframes crawl {
  from { transform: translateX(100vw); }
  to { transform: translateX(-300px); }
}

/* ---------- Modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(63, 47, 39, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 50;
  animation: fade 0.2s ease;
}

@keyframes fade {
  from { opacity: 0; }
}

.modal-card {
  background: var(--cream-card);
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  padding: 2rem 1.75rem 1.75rem;
  max-width: 380px;
  width: 100%;
  text-align: center;
  animation: pop 0.45s var(--ease-bounce);
}

@keyframes pop {
  from { transform: scale(0.85) translateY(20px); opacity: 0; }
}

.modal-emoji {
  display: block;
  font-size: 2.6rem;
  margin-top: -0.5rem;
  animation: bob 2s ease-in-out infinite;
}

.modal-card h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 2rem;
  color: var(--rust);
  margin: 0.2rem 0 0.25rem;
}

#claim-item-name {
  color: var(--ink-soft);
  font-weight: 700;
  margin: 0 0 1.25rem;
}

#claim-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
}

.modal-actions button {
  flex: 1;
}

/* ---------- Toast & Konfetti ---------- */

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font-size: 0.95rem;
  box-shadow: var(--shadow-lg);
  z-index: 60;
  max-width: calc(100% - 2rem);
  text-align: center;
  animation: toast-in 0.4s var(--ease-bounce);
}

@keyframes toast-in {
  from { transform: translate(-50%, 30px); opacity: 0; }
}

#confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 70;
}

/* ---------- Responsiv ---------- */

@media (max-width: 760px) {
  .hero {
    padding-top: 2.5rem;
  }

  .hero-stage {
    width: min(520px, 100%);
  }

  .bear {
    width: 23%;
    left: -4%;
    top: 60%;
  }

  .lion {
    width: 25%;
    right: -4%;
    top: 56%;
  }

  .croc-rig {
    width: 180px;
  }

  .hero .croc-lane {
    height: 90px;
  }

  .giraffe {
    width: 92px;
    right: -18px;
    bottom: -40px;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    max-width: 380px;
    margin: 3rem auto 0;
  }

  .info-card.c2 {
    transform: rotate(1deg);
  }

  .cake-board {
    grid-template-columns: 1fr;
  }

  .cake-form {
    order: -1;
    transform: none;
  }

  .wishlist .critter.gifts {
    position: static;
    display: block;
    margin: 0 auto 0.5rem;
    width: 110px;
  }
}

@media (max-width: 420px) {
  .card,
  .modal-card {
    padding: 1.4rem;
  }

  .input-row {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }

  .balloons,
  .croc-lane {
    display: none;
  }
}
