:root {
  --gold-dunkel: #6e5a2e;
  --gold-mittel: #9a8456;
  --gold-hell: #c5a463;
  --gold-akzent: #b8941f;
  --hintergrund: #efe7d7;
  --schrift: Georgia, "Times New Roman", serif;
  --schrift-klar: "Trebuchet MS", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  background: url("bg.jpg") center center / cover no-repeat fixed;
  font-family: var(--schrift);
  color: var(--gold-dunkel);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* Umschlag */
.umschlag-bereich {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  background: transparent;
  transition: opacity 0.8s ease;
}

.umschlag-bereich.weg {
  opacity: 0;
  pointer-events: none;
}

.rahmen {
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.buehne {
  position: relative;
  width: 100%;
  aspect-ratio: 941 / 1672;
  border-radius: 14px;
  overflow: hidden;
  background: #ede4d3;
  cursor: pointer;
  user-select: none;
  box-shadow:
    0 18px 45px rgba(110, 90, 46, 0.18),
    0 0 35px rgba(255, 255, 255, 0.45);
  perspective: 1600px;
}

.klappe {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  backface-visibility: hidden;
  transition: transform 1s cubic-bezier(0.65, 0, 0.35, 1);
}

.klappe img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.klappe-links {
  left: 0;
  transform-origin: left center;
}

.klappe-rechts {
  right: 0;
  transform-origin: right center;
}

.buehne.offen .klappe-links {
  transform: rotateY(-105deg);
}

.buehne.offen .klappe-rechts {
  transform: rotateY(105deg);
}

.hinweis {
  position: absolute;
  bottom: 7%;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--gold-mittel);
  letter-spacing: 0.5px;
  z-index: 3;
  transition: opacity 0.4s ease;
}

.buehne.offen .hinweis {
  opacity: 0;
}

/* Einladung */
.fenster-bereich {
  display: none;
  min-height: 100vh;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  background: transparent;
}

.fenster-bereich.sichtbar {
  display: flex;
  animation: auf 0.8s ease;
}

@keyframes auf {
  from {
    opacity: 0;
    transform: scale(0.97);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.fenster {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 941 / 1672;
  container-type: inline-size;
}

.fenster-bild {
  position: absolute;
  inset: 0;
  background-image: url("brief.png");
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 18px 45px rgba(110, 90, 46, 0.18),
    0 0 35px rgba(255, 255, 255, 0.45);
}

/* Panels */
.panel {
  position: absolute;
  top: 19%;
  bottom: 19%;
  left: 20%;
  right: 16%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow-y: auto;
  overflow-x: hidden;
}

.panel.aktiv {
  opacity: 1;
  pointer-events: auto;
}

.panel-inhalt {
  width: 100%;
  max-width: 100%;
}

.panel[data-panel="ablauf"] {
  justify-content: center;
}

/* Start */
.ueberschrift {
  font-size: 3cqw;
  letter-spacing: 0.8cqw;
  color: var(--gold-mittel);
  text-transform: uppercase;
  margin-bottom: 2cqw;
}

.paar {
  font-size: 6.6cqw;
  font-weight: normal;
  color: var(--gold-akzent);
  margin: 0 auto;
  line-height: 1.2;
  max-width: 100%;
  white-space: normal;
}

.paar br {
  display: block;
}

.datum-gross {
  font-family: var(--schrift-klar);
  font-size: 3.2cqw;
  letter-spacing: 0.6cqw;
  color: var(--gold-mittel);
  margin: 1.5cqw 0 4cqw;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 2.4cqw;
  flex-wrap: nowrap;
}

.cd-feld {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cd-zahl {
  font-size: 6cqw;
  color: var(--gold-akzent);
  line-height: 1;
}

.cd-label {
  font-family: var(--schrift-klar);
  font-size: 2.3cqw;
  letter-spacing: 0.3cqw;
  text-transform: uppercase;
  color: var(--gold-mittel);
  margin-top: 1cqw;
}

/* Ablauf */
.block-titel {
  font-size: 5.2cqw;
  font-weight: normal;
  color: var(--gold-akzent);
  margin-bottom: 3.5cqw;
  flex-shrink: 0;
}

.zeitstrahl {
  text-align: center;
  width: 100%;
}

.ablauf-punkt {
  margin-bottom: 2.4cqw;
}

.ablauf-zeit {
  color: var(--gold-akzent);
  font-size: 3.2cqw;
  margin-right: 1.4cqw;
}

.ablauf-titel {
  color: var(--gold-akzent);
  font-size: 3.6cqw;
}

.ablauf-text {
  color: var(--gold-mittel);
  font-size: 2.8cqw;
  display: block;
  margin: 0.5cqw 0 0;
  line-height: 1.25;
  max-width: 100%;
  overflow-wrap: break-word;
}

/* Rueckmeldung */
.panel[data-panel="rsvp"] {
  left: 24%;
  right: 22%;
}

.panel[data-panel="rsvp"] .panel-inhalt {
  width: 100%;
  max-width: 100%;
}

.feld-label {
  font-family: var(--schrift-klar);
  font-size: 2.1cqw;
  letter-spacing: 0.24cqw;
  text-transform: uppercase;
  color: var(--gold-mittel);
  margin: 2cqw 0 0.8cqw;
}

.komme-wahl {
  display: flex;
  gap: 1.2cqw;
  width: 100%;
}

.komme-btn {
  flex: 1;
  min-width: 0;
  font-family: var(--schrift);
  font-size: 2.3cqw;
  padding: 1.4cqw 0.6cqw;
  border: 1px solid #ddd2bc;
  background: rgba(255, 255, 255, 0.6);
  color: var(--gold-mittel);
  border-radius: 4px;
  cursor: pointer;
  line-height: 1.1;
}

.komme-btn.aktiv {
  border-color: var(--gold-akzent);
  color: var(--gold-akzent);
}

#rsvp-name,
#rsvp-anzahl,
#rsvp-nachricht {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  font-family: var(--schrift);
  font-size: 2.45cqw;
  padding: 1.35cqw;
  border: 1px solid #ddd2bc;
  border-radius: 4px;
  color: var(--gold-dunkel);
  background: rgba(255, 255, 255, 0.7);
  line-height: 1.15;
}

#rsvp-nachricht {
  resize: none;
}

.senden-btn {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 2.1cqw;
  padding: 1.8cqw 0.6cqw;
  text-align: center;
  text-decoration: none;
  background: var(--gold-akzent);
  color: #fff;
  font-family: var(--schrift-klar);
  letter-spacing: 0.22cqw;
  text-transform: uppercase;
  font-size: 2.1cqw;
  border-radius: 4px;
  line-height: 1.15;
}

/* Navigation */
.navi {
  position: absolute;
  top: 50%;
  right: -54px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.navi-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--gold-akzent);
  color: #fff;
  font-size: 1.05rem;
  cursor: pointer;
  line-height: 1;
  box-shadow: 0 3px 8px rgba(110, 90, 46, 0.25);
  transition: transform 0.2s ease, background 0.2s ease;
}

.navi-btn:hover {
  transform: scale(1.08);
}

.navi-btn.aktiv {
  background: var(--gold-dunkel);
}

.navi-zurueck {
  background: var(--gold-mittel);
  margin-top: 0.4rem;
}

/* Handy */
@media (max-width: 600px) {
  body {
    min-height: 100dvh;
  }

  .umschlag-bereich {
    min-height: 100dvh;
  }

  .fenster-bereich {
    min-height: 100dvh;
    padding: 1rem 3.4rem 1rem 1rem;
  }

  .rahmen {
    max-width: min(360px, calc(100vw - 2rem));
  }

  .fenster {
    max-width: min(360px, calc(100vw - 5.4rem));
  }

  .navi {
    right: -44px;
  }

  .navi-btn {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
    background: rgba(184, 148, 31, 0.85);
  }

  .panel[data-panel="rsvp"] {
    left: 25%;
    right: 23%;
  }
}
/* Musik-Knopf (Muschel-Note) als Navi-Knopf */
.musik-btn {
  position: relative;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.musik-btn svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* Schraegstrich = Musik aus (Standard) */
.musik-btn::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transform: rotate(45deg);
  opacity: 1;
  transition: opacity 0.2s ease;
  box-shadow: 0 0 0 1px var(--gold-akzent);
}

/* Musik an: kein Strich, sanftes Pulsieren */
.musik-btn.an::after {
  opacity: 0;
}

.musik-btn.an {
  background: var(--gold-dunkel);
  animation: musikpuls 1.6s ease-in-out infinite;
}

@keyframes musikpuls {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

@media (max-width: 600px) {
  .musik-btn svg { width: 20px; height: 20px; }
  .musik-btn::after { width: 22px; }
}
