/* ---------- Tokens ---------- */
:root {
  --cream: #FBF6F3;
  --rose-100: #F7E3E6;
  --rose-300: #E9B9C1;
  --rose-600: #B84A62;
  --rose-800: #7E2E42;
  --ink: #3A2A2F;
  --ink-soft: #8D767C;
  --white: #FFFFFF;

  --serif: "Playfair Display", Georgia, serif;
  --sans: "Nunito", system-ui, -apple-system, sans-serif;
  --script: "Great Vibes", cursive;

  --radius: 22px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body { overflow-x: hidden; }

/* ---------- Hintergrund ---------- */
.bg {
  position: fixed; inset: 0; z-index: -1;
  overflow: hidden;
  background: linear-gradient(180deg, #FDFAF8 0%, var(--cream) 45%, var(--rose-100) 100%);
}
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(70px); opacity: .55;
}
.b1 { width: 60vw; height: 60vw; background: var(--rose-300); top: -20vw; right: -20vw; }
.b2 { width: 50vw; height: 50vw; background: #F5D6CC; bottom: -15vw; left: -15vw; }

/* ---------- Screens ---------- */
.screen {
  display: none;
  min-height: 100dvh;
  padding: max(24px, env(safe-area-inset-top)) 24px max(32px, env(safe-area-inset-bottom));
  flex-direction: column;
  animation: screen-in .6s var(--ease) both;
}
.screen.is-active { display: flex; }
@keyframes screen-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.stack {
  margin: auto;
  width: 100%; max-width: 440px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 18px;
}

/* ---------- Typografie ---------- */
.kicker { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 15vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -.01em;
  color: var(--rose-800);
}
.name.small { font-size: 2rem; }
.lead { margin: 0; font-size: 1.05rem; max-width: 34ch; color: var(--ink); }
.muted { margin: 4px 0 0; color: var(--ink-soft); font-size: .95rem; }
.question {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 6vw, 1.9rem);
  line-height: 1.3;
  color: var(--ink);
}

/* ---------- Buttons ---------- */
.btn {
  margin-top: 8px;
  padding: 15px 34px;
  border: 0; border-radius: 999px;
  background: var(--rose-600); color: var(--white);
  font: 600 1rem var(--sans);
  cursor: pointer;
  box-shadow: 0 10px 24px -12px rgba(184, 74, 98, .7);
  transition: transform .2s var(--ease), background .2s;
}
.btn:hover { background: var(--rose-800); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; color: var(--rose-600); box-shadow: none; border: 1.5px solid var(--rose-300); }
.btn:focus-visible, .answer:focus-visible, .tab:focus-visible, .day:focus-visible {
  outline: 2px solid var(--rose-600); outline-offset: 3px;
}
.link { background: none; border: 0; color: var(--ink-soft); font: inherit; font-size: .9rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Quiz ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  background: rgba(184, 74, 98, .12);
}
.progress span {
  display: block; height: 100%; width: 0;
  background: var(--rose-600);
  transition: width .5s var(--ease);
}
.answers { display: grid; gap: 10px; width: 100%; margin-top: 6px; }
.answer {
  padding: 15px 18px;
  border: 1.5px solid var(--rose-300);
  background: rgba(255,255,255,.7);
  border-radius: 16px;
  font: 600 1rem var(--sans); color: var(--ink);
  text-align: left; cursor: pointer;
  transition: transform .15s var(--ease), background .2s, border-color .2s;
}
.answer:hover { background: var(--white); }
.answer:active { transform: scale(.98); }
.answer.right { background: var(--rose-600); border-color: var(--rose-600); color: var(--white); }
.answer.wrong { opacity: .45; }
.answers.locked .answer { pointer-events: none; }
.reaction {
  margin: 0; min-height: 1.6em;
  font-family: var(--serif); font-style: italic;
  color: var(--rose-800);
  animation: screen-in .4s var(--ease) both;
}

.interlude img, .interlude video {
  width: 100%; max-height: 52vh; object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 24px 40px -24px rgba(126, 46, 66, .45);
}
.interlude .kicker { font-family: var(--serif); font-style: italic; }

/* ---------- Finale ---------- */
.script { width: 100%; max-width: 520px; overflow: visible; }
.script text {
  font-family: var(--script);
  font-size: 96px;
  fill: var(--rose-800);
  fill-opacity: 0;
  stroke: var(--rose-800);
  stroke-width: 1.2;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
}
.is-active .script text {
  animation:
    draw 3.6s .4s var(--ease) forwards,
    ink  1.2s 3.4s ease forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes ink  { to { fill-opacity: 1; stroke-width: 0; } }

.fade { opacity: 0; transition: opacity 1s ease, transform 1s var(--ease); transform: translateY(8px); }
.fade.show { opacity: 1; transform: none; }

.video-wrap { width: 100%; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.video-wrap video {
  width: 100%; border-radius: var(--radius);
  background: #000;
  box-shadow: 0 24px 40px -24px rgba(126, 46, 66, .5);
}

/* Herzen */
#hearts { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.heart {
  position: absolute; bottom: -30px;
  font-size: var(--s, 22px);
  color: var(--rose-600);
  opacity: 0;
  animation: rise var(--d, 5s) linear forwards;
}
@keyframes rise {
  0%   { transform: translateY(0) rotate(0); opacity: 0; }
  10%  { opacity: .9; }
  100% { transform: translateY(-110vh) translateX(var(--x, 0)) rotate(25deg); opacity: 0; }
}
.confetti {
  position: absolute; width: 7px; height: 11px; border-radius: 2px;
  background: var(--c); left: var(--l); top: var(--t);
  animation: pop .9s var(--ease) forwards;
}
@keyframes pop {
  0%   { transform: translate(0,0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(260deg); opacity: 0; }
}

/* ---------- Menü ---------- */
.menu-head { text-align: center; padding: 18px 0 6px; }
.tabs {
  display: flex; gap: 6px; justify-content: center;
  margin: 14px auto 22px;
  padding: 4px;
  background: rgba(255,255,255,.65);
  border-radius: 999px;
  max-width: 440px; width: 100%;
}
.tab {
  flex: 1; padding: 9px 6px;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-soft);
  font: 600 .82rem var(--sans); line-height: 1.2; cursor: pointer;
  transition: background .2s, color .2s;
}
.tab.is-active { background: var(--rose-600); color: var(--white); }
.panel { display: none; max-width: 440px; width: 100%; margin: 0 auto; }
.panel.is-active { display: block; animation: screen-in .4s var(--ease) both; }
.menu-foot { margin-top: auto; padding-top: 28px; text-align: center; }

/* Tages-Grid */
.days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.day {
  aspect-ratio: 1;
  border: 0; border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font: 600 .95rem var(--sans);
  cursor: pointer;
  transition: transform .15s var(--ease);
}
.day:active { transform: scale(.95); }
.day.open { background: var(--white); color: var(--rose-800); box-shadow: 0 8px 20px -14px rgba(126,46,66,.6); }
.day.today { background: var(--rose-600); color: var(--white); }
.day.locked { background: rgba(255,255,255,.35); color: var(--rose-300); cursor: default; }
.day.locked .lock { font-size: .8rem; }
.day.last { border: 1.5px dashed var(--rose-300); }
.day .n { font-family: var(--serif); font-size: 1.15rem; line-height: 1; }
.day .d { font-size: .62rem; opacity: .75; }
.countdown { text-align: center; margin: 0 0 16px; color: var(--ink-soft); font-size: .95rem; }

/* Momente */
.moment { margin-bottom: 26px; }
.moment img, .moment video { width: 100%; border-radius: var(--radius); display: block; box-shadow: 0 20px 36px -24px rgba(126,46,66,.45); }
.moment p { margin: 10px 4px 0; }
.moment small { color: var(--ink-soft); }

/* Sheet */
.sheet {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(58, 42, 47, .35);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadein .25s ease both;
}
.sheet[hidden] { display: none; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.sheet-inner {
  position: relative;
  width: 100%; max-width: 420px; max-height: 85dvh; overflow: auto;
  background: var(--cream);
  border-radius: 28px;
  padding: 32px 22px 26px;
  text-align: center;
  box-shadow: 0 30px 60px -20px rgba(126, 46, 66, .45);
  animation: pop-in .4s var(--ease) both;
}
@keyframes pop-in {
  from { transform: scale(.92) translateY(12px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.close {
  position: absolute; top: 12px; right: 14px;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(184,74,98,.1); color: var(--rose-800);
  font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.sheet-inner h3 { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; margin: 6px 0 4px; color: var(--rose-800); }
.sheet-inner img, .sheet-inner video { width: 100%; border-radius: var(--radius); margin: 14px 0 6px; }
.sheet-inner audio { width: 100%; margin: 14px 0 6px; }
.sheet-inner .missing { color: var(--ink-soft); font-size: .9rem; }

/* ---------- Motion respektieren ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .script text { stroke-dashoffset: 0; fill-opacity: 1; stroke-width: 0; }
  .fade { opacity: 1; transform: none; }
}
