/* ---------- Schriften (lokal, keine externen Anfragen) ---------- */
@font-face { font-family: "Fraunces"; font-weight: 400; font-display: swap; src: url("fonts/fraunces-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 600; font-display: swap; src: url("fonts/fraunces-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }

/* ---------- Farben ---------- */
:root {
  --paper: #f4f0e6;
  --surface: #fffdf7;
  --ink: #1b2420;
  --muted: #69716b;
  --line: #e2dbcb;
  --pine: #1f4c3b;
  --pine-deep: #12322a;
  --on-pine: #f6f1e4;
  --brass: #a8823a;
  --brass-bright: #d2ad66;
  --brass-soft: #f0e5cb;
  --berry: #9b2f3b;
  --ok-bg: #e3eee7;
  --ok-ink: #1f4c3b;
  --err-bg: #f6e2e2;
  --err-ink: #8a2733;
  --field: #f8f5ed;
  --radius: 18px;
  --shadow: 0 1px 1px rgba(18, 50, 42, .04), 0 10px 30px -12px rgba(18, 50, 42, .18);
  --serif: "Fraunces", ui-serif, Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d1411;
    --surface: #141e1a;
    --ink: #ecede5;
    --muted: #9ba49c;
    --line: #25322c;
    --pine: #2f6b55;
    --pine-deep: #0a211b;
    --on-pine: #f3eee0;
    --brass: #d3ae68;
    --brass-bright: #e4c584;
    --brass-soft: #2b271b;
    --berry: #e07a86;
    --ok-bg: #16302a;
    --ok-ink: #a9dcc3;
    --err-bg: #37191d;
    --err-ink: #f0aab3;
    --field: #0f1814;
    --shadow: none;
  }
}

/* ---------- Grundlagen ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
a { color: var(--pine); text-underline-offset: 3px; }
@media (prefers-color-scheme: dark) { a { color: var(--brass-bright); } }

/* ---------- Kopfzeile ---------- */
.top {
  background-color: var(--pine-deep);
  background-image:
    radial-gradient(rgba(255, 255, 255, .10) 1px, transparent 1.5px),
    radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1.5px);
  background-size: 46px 46px, 29px 29px;
  background-position: 0 0, 13px 17px;
  color: var(--on-pine);
  border-bottom: 3px solid var(--brass);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--on-pine); text-decoration: none;
  font-family: var(--serif); font-weight: 600; font-size: 1.25rem; letter-spacing: .01em;
}
.brand svg { width: 22px; height: 22px; color: var(--brass-bright); flex: none; }
.badge {
  font-family: var(--sans); font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--pine-deep); background: var(--brass-bright); border-radius: 999px; padding: 2px 8px;
}

/* ---------- Typografie ---------- */
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 7vw, 2.9rem); letter-spacing: -.01em; }
h2 { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; }
h3 { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-top: 1.4em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 .7em; color: var(--brass);
  font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.lead { font-size: 1.08rem; color: var(--muted); margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
code {
  font-size: .88em; background: var(--field); border: 1px solid var(--line); border-radius: 8px;
  padding: 2px 7px; overflow-wrap: anywhere;
}

/* ---------- Kopfbereich der Seiten ---------- */
.hero { position: relative; padding: 44px 0 14px; }
.hero.narrow { max-width: 480px; }
.ornament {
  position: absolute; right: 0; top: 30px; width: 120px; height: 120px;
  color: var(--brass); opacity: .55; pointer-events: none;
}
@media (max-width: 560px) { .ornament { width: 76px; height: 76px; top: 22px; opacity: .4; } }
.hero h1, .hero .lead, .hero .facts { position: relative; max-width: calc(100% - 90px); }
.facts { display: flex; flex-wrap: wrap; gap: 10px 34px; margin: 0 0 1em; }
.facts dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }

/* ---------- Karten ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin: 18px 0;
}
.card.subtle { background: transparent; box-shadow: none; border-style: dashed; }
.round-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 40px 0 6px; }
.round-head h2 { font-size: 1.6rem; margin: 0; }
.round-head + .card { margin-top: 10px; }
.round + .round .round-head { border-top: 1px solid var(--line); padding-top: 36px; margin-top: 44px; }

/* Gruppenliste */
.groups { display: grid; gap: 12px; margin: 18px 0; }
.group-link {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s;
}
.group-link:hover { border-color: var(--brass); transform: translateY(-1px); }
.group-link strong { display: block; font-family: var(--serif); font-size: 1.25rem; font-weight: 600; }
.group-link .arrow { color: var(--brass); font-size: 1.4rem; flex: none; }

/* ---------- Enthüllung als Geschenkanhänger ---------- */
.tag {
  position: relative;
  margin: 18px 0;
  padding: 34px 26px 26px 26px;
  color: var(--on-pine);
  background-color: var(--pine-deep);
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.5px);
  background-size: 22px 22px;
  border-radius: 6px 6px var(--radius) var(--radius);
  clip-path: polygon(34px 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 0 100%, 0 34px);
  box-shadow: var(--shadow);
}
.tag::before {
  content: ""; position: absolute; left: 50%; top: 14px; width: 12px; height: 12px; margin-left: -6px;
  border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 2px var(--brass-bright);
}
.tag::after {
  content: ""; position: absolute; inset: 8px; border: 1px solid rgba(210, 173, 102, .45);
  clip-path: polygon(30px 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 0 100%, 0 30px);
  border-radius: 4px 4px 12px 12px; pointer-events: none;
}
.tag .eyebrow { color: var(--brass-bright); justify-content: center; width: 100%; margin-top: 10px; }
.tag .eyebrow::before, .tag .eyebrow::after { content: ""; width: 18px; height: 1px; background: currentColor; }
.tag .name {
  text-align: center; font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.2rem, 10vw, 3.2rem); line-height: 1.05; color: var(--brass-bright); margin: 0 0 18px;
}
.tag h3 { color: rgba(246, 241, 228, .65); text-align: center; }
.tag .wish {
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px; padding: 14px 16px; overflow-wrap: anywhere;
}
.tag .wish a { color: var(--brass-bright); }
.tag .muted { color: rgba(246, 241, 228, .7); text-align: center; }

/* ---------- Formulare ---------- */
.form { display: grid; gap: 16px; }
.form.grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form.grid .full, .form.grid > button { grid-column: 1 / -1; }
.form.inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.form.inline input[type=email], .form.inline input[type=text] { flex: 1 1 220px; width: auto; }
label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
label .muted { font-weight: 400; }
input, textarea, select {
  font: inherit; font-weight: 400; color: var(--ink);
  background: var(--field); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 13px; width: 100%; min-width: 0;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 25%, transparent);
}
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 500;
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px 7px 11px;
  background: var(--field); cursor: pointer;
}
.check:has(input:checked) { border-color: var(--brass); background: var(--brass-soft); }
.check input { width: auto; margin: 0; accent-color: var(--pine); }

/* ---------- Knöpfe ---------- */
button, .button {
  font: inherit; font-weight: 600; font-size: .95rem;
  border: 1px solid var(--pine); background: var(--pine); color: var(--on-pine);
  border-radius: 999px; padding: 11px 22px; cursor: pointer;
  text-decoration: none; display: inline-block; justify-self: start;
  transition: background .15s, border-color .15s, transform .1s;
}
button:hover, .button:hover { background: var(--pine-deep); border-color: var(--pine-deep); }
button:active { transform: translateY(1px); }
button.secondary, .button.secondary { background: transparent; color: var(--ink); border-color: var(--line); }
button.secondary:hover, .button.secondary:hover { border-color: var(--brass); background: transparent; }
button.danger { background: transparent; color: var(--berry); border-color: color-mix(in srgb, var(--berry) 55%, transparent); }
button.danger:hover { background: var(--err-bg); }
button.small { padding: 6px 12px; font-size: .82rem; }
button.link { background: none; border: 0; color: var(--on-pine); opacity: .8; padding: 0; font-weight: 500; }
button.link:hover { opacity: 1; background: none; }
button:disabled { opacity: .45; cursor: not-allowed; }
button:focus-visible, .button:focus-visible, a:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.navform { margin: 0; }
@media (prefers-color-scheme: dark) {
  button, .button { color: #0d1411; background: var(--brass); border-color: var(--brass); }
  button:hover, .button:hover { background: var(--brass-bright); border-color: var(--brass-bright); }
}

/* ---------- Hinweise ---------- */
.alert { border-radius: 12px; padding: 11px 15px; margin: 14px 0; font-weight: 500; }
.alert.ok { background: var(--ok-bg); color: var(--ok-ink); }
.alert.error { background: var(--err-bg); color: var(--err-ink); }
.pill { font-size: .75rem; font-weight: 600; border-radius: 999px; padding: 3px 10px; background: var(--err-bg); color: var(--err-ink); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok-ink); }
.pill.neutral { background: var(--brass-soft); color: var(--brass); }

/* ---------- Admin ---------- */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 4px 0 20px 40px; border-left: 2px solid var(--line); margin-left: 13px; }
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  content: counter(s); position: absolute; left: -15px; top: 0;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 2px solid var(--line); color: var(--muted);
  font-size: .85rem; font-weight: 700;
}
.steps li.now::before { border-color: var(--brass); color: var(--brass); }
.steps li.done::before { content: "✓"; background: var(--pine); border-color: var(--pine); color: var(--on-pine); }
.steps strong { display: block; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.actions form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }

.table { overflow-x: auto; margin: 0 -4px; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.plain { margin: 0; padding-left: 18px; }
.back { display: inline-block; margin-top: 20px; color: var(--muted); text-decoration: none; font-size: .9rem; }
.back:hover { color: var(--ink); }

/* ---------- Fusszeile ---------- */
.foot { color: var(--muted); font-size: .8rem; padding-top: 28px; padding-bottom: 36px; display: flex; align-items: center; gap: 8px; }
.foot svg { width: 12px; height: 12px; color: var(--brass); }
