:root {
  --bg: #F7F3EC;
  --paper: #FFFDF9;
  --ink: #3A3631;
  --muted: #7C746A;
  --line: #E4DBCD;
  --gold: #A08455;
  --gold-dark: #85693D;
  --ok: #5E7F5A;
  --err: #A2493F;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --script: 'Pinyon Script', 'Snell Roundhand', cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

/* ---------- Titel ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 48px 16px calc(48px + env(safe-area-inset-bottom));
  background: radial-gradient(ellipse at 50% 40%, #FFFDF9 0%, var(--bg) 70%);
  overflow: hidden;
}
/* Hintergrundfoto über die ganze Seite */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: center 45% / cover no-repeat;
  opacity: 0;
  will-change: opacity, transform;
  transform-origin: 50% 35%;
}
.bg::after {
  content: "";
  position: absolute; inset: 0;
  /* oben hell, damit die Gesichter frei bleiben – unten dunkler für die Schrift */
  background: linear-gradient(180deg, rgba(20,16,12,.05) 0%, rgba(20,16,12,.12) 40%, rgba(20,16,12,.62) 100%);
}
/* Mit Foto steht der Text unten, die Gesichter bleiben oben sichtbar */
.mit-foto .hero {
  background: transparent;
  color: #fff;
  place-items: end center;
  padding-bottom: calc(56px + env(safe-area-inset-bottom));
}
@media (min-width: 700px) {
  .mit-foto .hero .names {
    flex-direction: row;
    align-items: baseline;
    gap: .22em;
    font-size: clamp(56px, 7vw, 100px);
  }
  .mit-foto .hero .names .amp { margin: 0; }
}
.mit-foto .hero::after { display: none; }
.mit-foto .hero-inner { text-shadow: 0 1px 3px rgba(0,0,0,.45), 0 2px 22px rgba(0,0,0,.45); }
.hero-inner { position: relative; max-width: 900px; }
.hero::after {
  content: "";
  position: absolute; inset: 22px;
  border: 1px solid var(--line);
  pointer-events: none;
}

.kicker {
  margin: 0 0 8px;
  font-size: 15px;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--gold);
}
.mit-foto .hero .kicker { color: #F1E6D2; }

.names {
  margin: 0;
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(56px, 13vw, 132px);
  line-height: 1.05;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.names .amp {
  font-family: var(--serif);
  font-style: italic;
  font-size: .42em;
  color: var(--gold);
  margin: .05em 0 .1em;
}
.mit-foto .hero .names .amp { color: #F1E6D2; }

.date {
  margin: 28px 0 0;
  font-size: clamp(22px, 4.5vw, 30px);
  letter-spacing: .3em;
  font-weight: 500;
  padding-left: .3em; /* gleicht den Buchstabenabstand am Ende aus */
}
.mit-foto .hero .ort, .mit-foto .hero .countdown { color: #EDE5D8; }
.ort { margin: 2px 0 0; color: var(--muted); }
.countdown {
  margin: 22px 0 0;
  font-size: 15px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- Knöpfe ---------- */
.btn {
  appearance: none;
  display: inline-block;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #fff;
  font: 500 17px/1 var(--serif);
  letter-spacing: .08em;
  padding: 14px 22px;
  min-height: 48px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.btn:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.btn-hero {
  margin-top: 36px;
  background: transparent;
  color: var(--gold-dark);
}
.btn-hero:hover { background: var(--gold); color: #fff; }
.mit-foto .hero .btn-hero { color: #fff; border-color: #fff; }
.mit-foto .hero .btn-hero:hover { background: #fff; color: var(--ink); }
.btn-big { font-size: 19px; padding: 18px 30px; min-height: 58px; }
.btn-line { background: transparent; color: var(--gold-dark); margin-top: 16px; }
.btn-line:hover { color: #fff; }

/* ---------- Begrüßung ---------- */
main { padding: 0 16px; }
.intro, .teilen { max-width: 720px; margin: 0 auto; text-align: center; }
.intro { padding: 64px 0 24px; }
.ornament { color: var(--gold); width: min(280px, 80%); margin: 0 auto 22px; }
.ornament svg { display: block; width: 100%; height: auto; }
.begruessung { font-size: clamp(22px, 4vw, 28px); font-style: italic; margin: 0; }
.fotoreihe {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}
.fotoreihe img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
}

/* ---------- Hochladen ---------- */
.teilen { padding: 48px 0 72px; }
.teilen h2 {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(48px, 9vw, 72px);
  margin: 0;
  line-height: 1.1;
}
.lead { color: var(--muted); margin: 8px auto 28px; max-width: 540px; }

.banner {
  background: #FBF1DD;
  border: 1px solid #EAD6AE;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 16px;
  margin-bottom: 18px;
  text-align: left;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 22px;
  text-align: left;
  box-shadow: 0 10px 30px -18px rgba(80, 60, 30, .25);
}
label { display: block; font-weight: 600; font-size: 18px; }
.optional { font-weight: 400; color: var(--muted); font-size: 15px; }
.hint { margin: 2px 0 10px; color: var(--muted); font-size: 15px; line-height: 1.4; }
input[type=text] {
  width: 100%;
  font: 18px var(--serif);
  padding: 12px 14px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.row { display: flex; gap: 10px; }
.row input { flex: 1; min-width: 0; }
.error { color: var(--err); margin: 10px 0 0; font-size: 16px; }

.drop {
  margin-top: 22px;
  border: 1.5px dashed #D6C7AE;
  border-radius: 14px;
  padding: 28px 16px;
  text-align: center;
  transition: background .2s, border-color .2s;
}
.drop.over { background: #F8F0E2; border-color: var(--gold); }
.drop-hint { margin: 12px 0 0; }

.summary {
  margin: 22px 0 8px;
  font-size: 17px;
  text-align: center;
}
.summary.fertig { color: var(--ok); font-style: italic; font-size: 20px; }

.queue { list-style: none; margin: 0; padding: 0; }
.queue li {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.thumb {
  width: 52px; height: 52px;
  border-radius: 8px;
  object-fit: cover;
  background: #EFE7DA;
  display: grid; place-items: center;
  font-size: 12px; color: var(--muted);
  letter-spacing: .05em;
}
.qinfo { min-width: 0; }
.qname {
  font-size: 16px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.qstatus { font-size: 14px; color: var(--muted); }
.qstatus.ok { color: var(--ok); }
.qstatus.err { color: var(--err); }
.bar { height: 4px; background: #EFE7DA; border-radius: 4px; margin-top: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .2s; }
.ok .bar > i, li.done .bar > i { background: var(--ok); }
.unbestimmt .bar > i {
  width: 35% !important;
  animation: laeuft 1.3s ease-in-out infinite;
}
@keyframes laeuft {
  from { transform: translateX(-100%); }
  to { transform: translateX(290%); }
}

.footer {
  text-align: center;
  padding: 28px 16px calc(28px + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 16px;
  letter-spacing: .1em;
  border-top: 1px solid var(--line);
}
.footer p { margin: 0; }

@media (max-width: 480px) {
  body { font-size: 18px; }
  .hero::after { inset: 12px; }
  .card { padding: 22px 16px; }
  .row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .unbestimmt .bar > i { animation-duration: 4s; }
}
