/* Werte 1:1 aus design/Einladung.dc.html */

html { background: #2A1C47; }
body { margin: 0; background: #2A1C47; }
a { color: #FFD166; }
a:hover { color: #FFE7A3; }
[hidden] { display: none !important; }

@keyframes ghostFloat { 0%,100% { transform: translateY(0) rotate(-4deg) } 50% { transform: translateY(-16px) rotate(4deg) } }
@keyframes batFly { 0% { left: -80px; transform: translateY(0) } 25% { transform: translateY(-24px) } 50% { transform: translateY(8px) } 75% { transform: translateY(-16px) } 100% { left: 105%; transform: translateY(0) } }
@keyframes flap { 0%,100% { transform: scaleY(1) } 50% { transform: scaleY(.45) } }
@keyframes twinkle { 0%,100% { opacity: .25 } 50% { opacity: 1 } }
@keyframes glow { 0%,100% { filter: drop-shadow(0 0 6px rgba(255,209,102,.35)) } 45% { filter: drop-shadow(0 0 18px rgba(255,209,102,.8)) } 55% { filter: drop-shadow(0 0 10px rgba(255,209,102,.5)) } }
@keyframes dangle { 0%,100% { transform: translateY(0) } 50% { transform: translateY(46px) } }
@keyframes wiggle { 0%,100% { transform: rotate(0) } 25% { transform: rotate(-8deg) scale(1.05) } 75% { transform: rotate(8deg) scale(1.05) } }

.ghost { animation: ghostFloat 3.6s ease-in-out infinite; }
.bat { position: absolute; animation: batFly 14s linear infinite; }
.bat svg { animation: flap .35s ease-in-out infinite; transform-origin: center; }
.bat2 { animation-duration: 19s; animation-delay: -7s; }
.bat3 { animation-duration: 23s; animation-delay: -15s; }
.star { animation: twinkle 2.8s ease-in-out infinite; }
.pumpkin { animation: glow 2.2s ease-in-out infinite; }
.spider { animation: dangle 5s ease-in-out infinite; }
.happy { animation: wiggle 1.2s ease-in-out infinite; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #FFD166; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .ghost, .bat, .bat svg, .star, .pumpkin, .spider, .happy { animation: none; }
}

/* Seite */
.page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: #2A1C47;
  color: #F6F1E7;
  font-family: 'Fredoka', system-ui, sans-serif;
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
}

/* Deko */
.moon {
  position: absolute; top: 48px; right: 8%;
  width: 120px; height: 120px; border-radius: 50%;
  background: #F3E6C4; box-shadow: 0 0 60px rgba(243,230,196,.35);
}
.star { position: absolute; border-radius: 50%; background: #F6F1E7; }
.spider {
  position: absolute; top: -40px; left: 9%;
  display: flex; flex-direction: column; align-items: center;
}
.spider-thread { width: 2px; height: 150px; background: rgba(246,241,231,.5); }

/* Inhalt */
.content {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  padding: calc(64px + env(safe-area-inset-top)) calc(20px + env(safe-area-inset-right)) calc(72px + env(safe-area-inset-bottom)) calc(20px + env(safe-area-inset-left));
  display: flex; flex-direction: column; gap: 32px;
}

.hero { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.hero .ghost { width: 110px; height: 132px; }
.kicker { margin: 8px 0 0; font-size: 18px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: #CDBEEB; }
.title {
  margin: 0; font-family: 'Creepster', 'Fredoka', cursive; font-weight: 400;
  font-size: clamp(64px, 16vw, 104px); line-height: .95; letter-spacing: .02em; color: #F28C28;
}
.subtitle { margin: 4px 0 0; font-size: 22px; font-weight: 500; line-height: 1.35; }

.card {
  background: #1B1230; border-radius: 24px; padding: 28px 24px;
  display: flex; flex-direction: column; gap: 20px; border: 2px solid #3D2C63;
}

.detail { display: flex; gap: 16px; align-items: flex-start; }
.detail-icon { flex-shrink: 0; margin-top: 2px; }
.detail-text { display: flex; flex-direction: column; gap: 2px; }
.detail-label { font-size: 14px; color: #CDBEEB; text-transform: uppercase; letter-spacing: .06em; }
.detail-value { font-size: 20px; font-weight: 600; }
.detail-note { font-size: 16px; color: #CDBEEB; }
.detail-long { font-size: 18px; line-height: 1.45; }
/* Optisch wie in der Vorlage (margin-top 4px), aber mind. 44px hohe Tippfläche */
.maps-link { font-size: 16px; align-self: flex-start; padding: 12px 0; margin: -8px 0 -12px; }

.deadline { display: flex; align-items: center; gap: 16px; justify-content: center; }
.deadline p { margin: 0; font-size: 18px; line-height: 1.4; }

/* Formular */
.form-title { margin: 0; font-size: 26px; font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 16px; color: #CDBEEB; }
.text-input {
  height: 52px; border-radius: 14px; border: 2px solid #4A3878; background: #2A1C47;
  color: #F6F1E7; font-family: inherit; font-size: 18px; padding: 0 16px; box-sizing: border-box;
  width: 100%;
}
.text-input[aria-invalid="true"] { border-color: #FFD166; }
.field-hint { margin: 0; font-size: 16px; color: #FFD166; }

.pills { display: flex; gap: 10px; }
.pill {
  min-width: 56px; height: 48px; padding: 0 20px; border-radius: 999px;
  border: 2px solid #4A3878; background: transparent; color: #F6F1E7;
  font-family: inherit; font-size: 18px; font-weight: 500; cursor: pointer;
}
.pill[aria-pressed="true"] { border-color: #FFD166; background: #FFD166; color: #1B1230; font-weight: 600; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.btn-yes, .btn-no {
  flex: 1 1 200px; height: 60px; border-radius: 18px;
  font-family: inherit; font-size: 20px; cursor: pointer;
}
.btn-yes {
  border: none; background: #F28C28; color: #1B1230; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-no { border: 2px solid #4A3878; background: transparent; color: #F6F1E7; font-weight: 500; }

/* Bestätigungen */
.confirm { padding: 36px 24px; gap: 12px; align-items: center; text-align: center; }
.confirm-yes { border-color: #F28C28; }
.confirm-title { margin: 0; font-size: 30px; font-weight: 600; outline: none; }
.confirm-text { margin: 0; font-size: 18px; line-height: 1.45; }
.btn-change {
  margin-top: 8px; height: 48px; padding: 0 20px; border-radius: 14px;
  border: 2px solid #4A3878; background: transparent; color: #F6F1E7;
  font-family: inherit; font-size: 16px; cursor: pointer;
}

.signoff { margin: 8px 0 0; text-align: center; font-size: 18px; color: #CDBEEB; }

button { -webkit-tap-highlight-color: transparent; }

/* Phase 2 */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.send-error { margin: 0; font-size: 16px; color: #FFD166; text-align: center; }
.actions button[disabled] { opacity: .6; cursor: wait; }
