/* hochzeit-upload - helle Gestaltung, angelehnt an klassische Papeterie.
   Schriften bewusst nur aus dem System: kein Google-Fonts-Abruf, damit auf
   der Gaesteseite kein einziger Fremd-Request und kein Consent-Banner noetig
   ist. */

*, *::before, *::after { box-sizing: border-box; }

/* display-Regeln der Komponenten wuerden das hidden-Attribut sonst
   ueberschreiben (z. B. .btn mit inline-block). */
[hidden] { display: none !important; }

:root {
  --paper: #fdfcf8;           /* warmes Weiss */
  --paper2: #ffffff;
  --ink: #2b2723;
  --muted: #8b8276;
  --line: #ebe3d3;
  /* Gold in zwei Staerken: --gold ist rein dekorativ, --accent traegt
     weisse Schrift und haelt dafuer 4,9:1 Kontrast ein. */
  --accent: #8a6d33;
  --accent-ink: #6d552a;
  --gold: #c3a25e;
  --ok: #5f7d52;
  --bad: #b4534a;
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html, body { margin: 0; padding: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-ink); }

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

/* ---------------------------------------------------------------- Kopf */

.head { text-align: center; padding: .5rem 0 1.5rem; }

.rule {
  width: 64px;
  height: 1px;
  margin: 1rem auto;
  background: var(--line);
  position: relative;
}
.rule::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -2px;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  background: var(--gold);
  transform: rotate(45deg);
}

.eyebrow {
  font: 400 .74rem/1 var(--sans);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  font: 400 clamp(1.9rem, 8vw, 2.8rem)/1.15 var(--serif);
  margin: .6rem 0 .2rem;
  letter-spacing: .01em;
}

.date { font: 400 1rem/1.4 var(--serif); color: var(--muted); font-style: italic; }

.lead {
  max-width: 34rem;
  margin: 1rem auto 0;
  color: #544d44;
}

/* ---------------------------------------------------------------- Karte */

.card {
  background: var(--paper2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 12px 32px rgba(120, 95, 40, .08);
}

.field { margin-bottom: 1.1rem; }

label {
  display: block;
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .4rem;
}

input[type="text"], input[type="password"], input[type="date"], textarea, select {
  width: 100%;
  padding: .7rem .85rem;
  font: inherit;
  color: inherit;
  background: var(--paper2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid rgba(138, 109, 51, .35);
  outline-offset: 1px;
  border-color: var(--accent);
}

.drop {
  border: 1px dashed #ddd0b0;
  border-radius: var(--radius);
  background: #fdfbf5;
  padding: 2.2rem 1.25rem;
  text-align: center;
  transition: background .15s, border-color .15s;
}
.drop.over { border-color: var(--accent); background: #f8f2e3; }

.drop-hint { color: var(--muted); font-size: .9rem; margin: .9rem 0 0; }

.btn {
  display: inline-block;
  padding: .85rem 1.6rem;
  font: inherit;
  font-weight: 500;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--accent-ink); }
.btn.ghost {
  background: transparent;
  color: var(--accent-ink);
  border: 1px solid var(--line);
}
.btn.ghost:hover { background: #f8f3e9; }

/* Dateifelder bleiben unsichtbar - bedient wird ueber das <label>. */
.filein { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

.btns { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Liste */

.summary {
  text-align: center;
  margin: 1.4rem 0 .4rem;
  font-size: .9rem;
  color: var(--muted);
}

.list { list-style: none; margin: 1rem 0 0; padding: 0; }

.item {
  padding: .8rem 0;
  border-top: 1px solid var(--line);
}
.item:first-child { border-top: 0; }

.item-head {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  font-size: .9rem;
}
.item-name { overflow-wrap: anywhere; }
.item-state { color: var(--muted); font-size: .8rem; white-space: nowrap; }

.bar {
  height: 3px;
  margin-top: .5rem;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .2s linear;
}
.item.ok .bar i { background: var(--ok); }
.item.ok .item-state { color: var(--ok); }
.item.bad .bar i { background: var(--bad); }
.item.bad .item-state { color: var(--bad); }

/* ---------------------------------------------------------------- Fuss */

.foot {
  margin-top: 2.5rem;
  text-align: center;
  font-size: .8rem;
  color: var(--muted);
}
.foot a { color: var(--muted); margin: 0 .4rem; }

.note {
  background: #f9f3e7;
  border: 1px solid #e9dcc2;
  border-radius: 10px;
  padding: .75rem .9rem;
  font-size: .88rem;
}
.err {
  background: #fbeeec;
  border: 1px solid #eccfca;
  color: #8f3f37;
  border-radius: 10px;
  padding: .75rem .9rem;
  font-size: .88rem;
}

/* ---------------------------------------------------------------- Backend */

.admin { max-width: 860px; }
.admin h2 {
  font: 400 1.35rem/1.3 var(--serif);
  margin: 2.2rem 0 .9rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--line);
}
.admin .card + .card { margin-top: 1rem; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 620px) { .grid2 { grid-template-columns: 1fr; } }

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }

.pill {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .75rem;
  background: #f3ead6;
  color: var(--accent-ink);
}
.pill.warn { background: #fbeeec; color: #8f3f37; }

.qr { text-align: center; }
.qr canvas { width: 220px; height: 220px; image-rendering: pixelated; }
.linkline {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: .85rem;
  word-break: break-all;
  color: var(--accent-ink);
}

/* ---------------------------------------------------------------- Rechtstexte */

.legal { max-width: 720px; }
.legal h1 { font-size: clamp(1.7rem, 6vw, 2.2rem); text-align: center; }
.legal h2 {
  font: 400 1.2rem/1.3 var(--serif);
  margin: 2.2rem 0 .6rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--line);
}
.legal h3 { font: 600 .95rem/1.4 var(--sans); margin: 1.4rem 0 .3rem; }
.legal p, .legal li { color: #4c453d; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin: .25rem 0; }
.legal address { font-style: normal; margin: .4rem 0; }
.legal .stand { text-align: center; color: var(--muted); font-size: .85rem; }
.legal .back { display: block; text-align: center; margin-top: 2.5rem; }
