@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/fraunces-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 500; font-display: swap; src: url(fonts/fraunces-latin-500-italic.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/inter-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/inter-latin-600-normal.woff2) format('woff2'); }

:root {
  --night: #0d2018;
  --night-2: #12301f;
  --on-night: #f3ecdf;
  --on-night-muted: #a9b8ab;
  --paper: #fbf7ef;
  --paper-2: #f3ecdf;
  --ink: #1f1b16;
  --muted: #6e665b;
  --line: #e4d9c6;
  --red: #b3262c;
  --red-dark: #921d22;
  --gold: #c99a3e;
  --gold-soft: #f1e2c0;
  --green: #2a6045;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius: 18px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font: 400 16px/1.5 var(--sans);
  color: var(--on-night);
  background: var(--night);
  background-image:
    radial-gradient(120% 60% at 50% -10%, #1d4a33 0%, rgba(29, 74, 51, 0) 60%),
    radial-gradient(80% 50% at 100% 100%, rgba(179, 38, 44, .10) 0%, rgba(179, 38, 44, 0) 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
#snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.top, main, .foot, #toast { position: relative; z-index: 1; }

a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---- Kopf und Fuß ---- */
.top { padding: 18px 20px 0; max-width: 640px; width: 100%; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; }
.navlink { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 4px; border-radius: 999px; background: rgba(243, 236, 223, .1); text-decoration: none; font-size: 15px; font-weight: 500; max-width: 60vw; }
.navlink:only-child:not(:has(.avatar)) { padding: 0 16px; }
.navlink span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navlink .avatar { width: 32px; height: 32px; font-size: 14px; }
.navlink:hover { background: rgba(243, 236, 223, .18); }
.mark { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font: italic 500 22px/1 var(--serif); letter-spacing: -.01em; }
.mark svg { width: 18px; height: 18px; fill: var(--gold); }
main { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 8px 16px 40px; outline: none; }
.foot { max-width: 640px; width: 100%; margin: 0 auto; padding: 18px 20px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between; font-size: 13px; color: var(--on-night-muted); }
.foot a { color: var(--on-night-muted); }

/* ---- Titelbereich ---- */
.hero { padding: 36px 4px 28px; position: relative; }
.eyebrow { font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin: 0 0 10px; }
h1 { font: 600 40px/1.08 var(--serif); letter-spacing: -.02em; margin: 0; text-wrap: balance; overflow-wrap: anywhere; }
.hero .meta { margin: 14px 0 0; color: var(--on-night-muted); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: rgba(201, 154, 62, .16); color: var(--gold-soft); font-size: 14px; font-weight: 500; }

.home-hero { padding: 150px 4px 36px; }
.home-hero.small { padding-top: 110px; }
.home-hero.small h1 { font-size: clamp(56px, 16vw, 88px); margin-bottom: 26px; }
.home-hero.small .eyebrow { margin-bottom: 6px; }
.hero-actions .btn { flex: 0 1 auto; }
.home-hero h1 { font: italic 500 clamp(64px, 19vw, 112px)/.95 var(--serif); letter-spacing: -.035em; }
.home-hero p { font-size: 19px; color: var(--on-night-muted); margin: 18px 0 28px; max-width: 30ch; }
.baubles { position: absolute; top: 0; right: 6px; width: 120px; height: 190px; pointer-events: none; }
.baubles g { transform-origin: top center; animation: sway 6s ease-in-out infinite; }
.baubles g:nth-child(2) { animation-duration: 7.4s; animation-delay: -2s; }
.baubles g:nth-child(3) { animation-duration: 5.6s; animation-delay: -4s; }
@keyframes sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

/* ---- Karten ---- */
.card { background: var(--paper); color: var(--ink); border-radius: var(--radius); padding: 22px 20px; margin: 0 0 14px; box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 12px 30px -18px rgba(0, 0, 0, .6); }
.card h2 { font: 600 22px/1.2 var(--serif); letter-spacing: -.01em; margin: 0 0 6px; }
.card h2 .count { font: 500 15px var(--sans); color: var(--muted); margin-left: 6px; }
.card p { margin: 0 0 14px; }
.card .lead { color: var(--muted); }
.card > :last-child { margin-bottom: 0; }
.card.note { background: var(--paper-2); }
.card.note .from { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.card.note .body { font: italic 500 19px/1.45 var(--serif); white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
form.card h2 { margin-bottom: 16px; }
.card.flash { box-shadow: 0 0 0 3px var(--gold), 0 12px 30px -18px rgba(0, 0, 0, .6); }

/* ---- Knöpfe ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--red); color: #fff; font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; transition: background .15s, transform .1s; -webkit-tap-highlight-color: transparent; }
.btn:hover { background: var(--red-dark); }
.btn:active { transform: scale(.98); }
.btn[disabled] { background: #c9bfae; color: #fff; cursor: not-allowed; transform: none; }
.btn.wide { width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { background: var(--paper-2); }
.btn.light { background: var(--paper); color: var(--ink); }
.btn.light:hover { background: #fff; }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.row .btn { flex: 1 1 auto; }
.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 15px; }
.link.danger { color: var(--red); }
.iconbtn { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.iconbtn:hover { background: var(--paper-2); color: var(--ink); }
.iconbtn svg { width: 20px; height: 20px; }

/* ---- Formulare ---- */
label.field { display: block; margin: 0 0 16px; }
label.field > span { display: block; font-size: 14px; font-weight: 600; margin: 0 0 6px; }
label.field > span small { font-weight: 400; color: var(--muted); }
.input, textarea.input, select.input { display: block; width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-size: 16px; }
textarea.input { min-height: 110px; resize: vertical; line-height: 1.45; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 154, 62, .25); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 20px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--red); flex: none; }
.hint { font-size: 14px; color: var(--muted); }
.inline { display: flex; gap: 8px; margin: 0 0 12px; }
.inline .input { flex: 1; min-width: 0; }
.inline .btn { flex: none; }

/* ---- Link-Kasten ---- */
.linkbox { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 12px; background: var(--paper-2); margin: 0 0 12px; }
.linkbox code { flex: 1; min-width: 0; font: 500 14px/1.3 var(--sans); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Leute ---- */
.people { list-style: none; margin: 0 0 16px; padding: 0; }
.people li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.people li:first-child { border-top: 0; }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 600 17px var(--serif); color: #fff; }
.avatar.c0 { background: var(--red); } .avatar.c1 { background: var(--green); } .avatar.c2 { background: #a27a2c; } .avatar.c3 { background: #6b3a5a; } .avatar.c4 { background: #2f5a78; }
.people .who { flex: 1; min-width: 0; }
.people .name { font-weight: 600; overflow-wrap: anywhere; }
.people .sub { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 2px 10px; }
.ok { color: var(--green); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 4px; padding: 0; list-style: none; }
.chips li { padding: 6px 12px; border-radius: 999px; background: var(--paper-2); font-size: 15px; overflow-wrap: anywhere; }
.pairs { list-style: none; margin: 0 0 14px; padding: 0; }
.pairs li { display: flex; align-items: center; gap: 8px; padding: 4px 0 4px 14px; border-radius: 12px; background: var(--paper-2); margin: 0 0 8px; }
.pairs li span { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* ---- Schritte ---- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 14px; align-items: baseline; }
.steps b { font: italic 500 26px/1 var(--serif); color: var(--gold); width: 22px; flex: none; }
.steps strong { display: block; }
.steps span { color: var(--muted); font-size: 15px; }
.progress { display: flex; gap: 6px; margin: 18px 0 0; }
.progress span { flex: 1; height: 4px; border-radius: 2px; background: rgba(243, 236, 223, .18); }
.progress span.on { background: var(--gold); }
.progress-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--on-night-muted); margin-top: 6px; }

/* ---- Runden-Liste ---- */
.rounds { list-style: none; padding: 0; margin: 0; }
.rounds a { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; }
.rounds li:first-child a { border-top: 0; }
.rounds .t { flex: 1; min-width: 0; }
.rounds .t strong { display: block; overflow-wrap: anywhere; }
.rounds .t span { font-size: 13px; color: var(--muted); }
.rounds svg { width: 18px; height: 18px; color: var(--muted); flex: none; }

/* ---- Auspacken ---- */
.reveal { text-align: center; padding: 30px 20px 26px; overflow: hidden; }
.reveal .tap { color: var(--muted); margin: 0 0 18px; }
.gift { position: relative; width: 150px; height: 150px; margin: 18px auto 8px; border: 0; padding: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.gift .box { position: absolute; left: 14px; right: 14px; bottom: 0; height: 100px; background: var(--red); border-radius: 6px; box-shadow: inset 0 -10px 0 rgba(0, 0, 0, .12); }
.gift .box::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 18px; margin-left: -9px; background: var(--gold); }
.gift .lid { position: absolute; left: 6px; right: 6px; top: 26px; height: 30px; background: #c42e35; border-radius: 6px; box-shadow: 0 4px 0 rgba(0, 0, 0, .12); transition: transform .7s cubic-bezier(.3, 1.4, .5, 1), opacity .5s .35s; transform-origin: 20% 100%; }
.gift .lid::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 18px; margin-left: -9px; background: var(--gold); }
.gift .bow { position: absolute; left: 50%; top: -24px; width: 64px; height: 30px; margin-left: -32px; }
.gift .bow::before, .gift .bow::after { content: ''; position: absolute; top: 2px; width: 30px; height: 24px; border: 6px solid var(--gold); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
.gift .bow::before { left: 0; transform: rotate(-18deg); }
.gift .bow::after { right: 0; transform: rotate(18deg); }
.gift:not(.open) { animation: wiggle 3.2s ease-in-out infinite; }
@keyframes wiggle { 0%, 82%, 100% { transform: rotate(0); } 86% { transform: rotate(-4deg); } 90% { transform: rotate(4deg); } 94% { transform: rotate(-2deg); } }
.gift.open .lid { transform: translate(40px, -70px) rotate(28deg); opacity: 0; }
.gift.open .box { animation: drop .6s .3s forwards; }
@keyframes drop { to { transform: translateY(14px) scale(.9); opacity: 0; } }
.result { animation: rise .7s cubic-bezier(.2, .9, .3, 1.2) both; }
.result .label { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin: 0 0 6px; }
.result .who { font: italic 500 clamp(44px, 12vw, 64px)/1.05 var(--serif); letter-spacing: -.02em; margin: 0 0 18px; overflow-wrap: anywhere; color: var(--red); }
.wishes { text-align: left; background: var(--paper-2); border-radius: 14px; padding: 16px 18px; margin: 0; }
.wishes h3 { font: 600 15px var(--sans); margin: 0 0 6px; }
.wishes p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.wishes .empty { color: var(--muted); }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
.sparks { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.sparks i { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); opacity: 0; animation: spark 1s ease-out forwards; }
@keyframes spark { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(.3); } }

/* ---- Dialog, Hinweise ---- */
.modal { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; background: rgba(5, 12, 9, .55); padding: 16px; animation: fade .15s; }
.modal .sheet { width: 100%; max-width: 440px; background: var(--paper); color: var(--ink); border-radius: 22px; padding: 22px 20px 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); animation: up .2s ease-out; margin-bottom: env(safe-area-inset-bottom); }
.modal h3 { font: 600 20px/1.25 var(--serif); margin: 0 0 8px; overflow-wrap: anywhere; }
.modal p { margin: 0 0 16px; color: var(--muted); }
.modal .actions { display: grid; gap: 10px; }
@media (min-width: 560px) { .modal { align-items: center; } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(20px); opacity: 0; } }
#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 15px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 30; max-width: calc(100% - 32px); text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.error { background: #fbe9e8; color: var(--red-dark); border-radius: 12px; padding: 10px 14px; font-size: 15px; margin: 0 0 14px; }
.center { text-align: center; }
.switch { color: var(--on-night-muted); margin: 6px 0 18px; }
.switch a { color: var(--on-night); font-weight: 600; }
.alt { margin: 16px 0 0; }
.spaced { margin-bottom: 12px; }
.spaced-top { margin-top: 12px; }
.card.danger h2 { font-size: 18px; }
.card.danger form { margin-top: 10px; }
.card.danger .lead { font-size: 15px; }
.invite-more { margin-top: 14px; }
details summary { cursor: pointer; list-style-position: inside; }
.empty-state { text-align: center; padding: 60px 10px; color: var(--on-night-muted); }
.empty-state h1 { margin-bottom: 12px; color: var(--on-night); }
.loading { text-align: center; padding: 80px 0; color: var(--on-night-muted); }
.prose h2 { margin-top: 18px; }
.prose ul { padding-left: 20px; margin: 0 0 14px; }
.danger-zone { text-align: center; padding: 6px 0 0; }
.danger-zone .link { color: var(--on-night-muted); }

@media (min-width: 560px) {
  h1 { font-size: 48px; }
  .card { padding: 26px 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
