:root {
  --bg1: #12372c;
  --bg2: #071a14;
  --gold: #ecce84;
  --gold-dim: #b99a52;
  --red: #b3262e;
  --red-hi: #cf3640;
  --ink: #f6f1e4;
  --muted: #a9bdb2;
  --card: rgba(255, 255, 255, .07);
  --line: rgba(236, 206, 132, .22);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(236, 206, 132, .14), transparent 60%),
    radial-gradient(900px 500px at 100% 100%, rgba(179, 38, 46, .22), transparent 60%),
    linear-gradient(160deg, var(--bg1), var(--bg2));
  background-attachment: fixed;
}

.snow { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.snow i {
  position: absolute; top: -12px; background: #fff; border-radius: 50%;
  animation: fall linear infinite;
}
@keyframes fall { to { transform: translate(40px, 108vh); } }

.wrap {
  position: relative; z-index: 1;
  width: 100%; max-width: 520px;
  margin: 0 auto; padding: 36px 18px 56px;
}
.admin .wrap { max-width: 720px; }
.center .wrap { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 30px 26px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.card + .card { margin-top: 18px; }

.eyebrow {
  margin: 0 0 6px; text-align: center;
  font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-dim);
}

h1 {
  margin: 0 0 6px; text-align: center;
  font-family: var(--serif); font-weight: 600; font-size: 2.1rem; line-height: 1.15; color: var(--gold);
}
h2 { margin: 0 0 14px; font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--gold); }

.lead { text-align: center; color: var(--muted); margin: 0 0 24px; }
.divider { height: 1px; border: 0; margin: 22px 0; background: linear-gradient(90deg, transparent, var(--line), transparent); }

label { display: block; margin: 0 0 6px; font-size: .88rem; color: var(--muted); }

input[type=text], input[type=password], textarea {
  width: 100%; padding: 13px 15px;
  font: inherit; color: var(--ink);
  background: rgba(0, 0, 0, .28);
  border: 1px solid var(--line); border-radius: 12px;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(236, 206, 132, .18); }
textarea { resize: vertical; min-height: 110px; }
.field { margin-bottom: 16px; }

.btn {
  display: inline-block; width: 100%;
  padding: 14px 20px; border: 0; border-radius: 12px; cursor: pointer;
  font: inherit; font-weight: 600; letter-spacing: .02em; color: #fff;
  background: linear-gradient(180deg, var(--red-hi), var(--red));
  box-shadow: 0 8px 20px rgba(179, 38, 46, .35);
  transition: transform .12s, filter .12s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn.gold { color: #3a2a05; background: linear-gradient(180deg, #f3d995, var(--gold)); box-shadow: 0 8px 20px rgba(236, 206, 132, .22); }
.btn.ghost { color: var(--ink); background: transparent; border: 1px solid var(--line); box-shadow: none; }
.btn.small { width: auto; padding: 9px 16px; font-size: .9rem; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }

.link {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: var(--muted); text-decoration: underline; text-underline-offset: 3px;
}
.link:hover { color: var(--gold); }

.msg { padding: 12px 15px; border-radius: 12px; margin-bottom: 16px; font-size: .95rem; }
.msg.err { background: rgba(179, 38, 46, .25); border: 1px solid rgba(207, 54, 64, .5); }
.msg.ok { background: rgba(236, 206, 132, .12); border: 1px solid var(--line); }

/* Teilnehmer-Seite */
.gift { display: block; width: 100%; background: none; border: 0; cursor: pointer; color: inherit; font: inherit; padding: 6px 0 0; }
.gift svg { display: block; margin: 0 auto 14px; animation: bob 2.6s ease-in-out infinite; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .4)); }
.gift span { color: var(--muted); }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-2deg); } }

.reveal { animation: pop .7s cubic-bezier(.2, .9, .3, 1.2) both; text-align: center; }
@keyframes pop { from { opacity: 0; transform: scale(.85) translateY(10px); } to { opacity: 1; transform: none; } }
.label { margin: 0; color: var(--muted); letter-spacing: .04em; }
.target {
  margin: 8px 0 4px; font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.4rem, 11vw, 3.4rem); line-height: 1.1; color: var(--gold);
  word-break: break-word;
}
.message { margin-top: 20px; color: var(--ink); opacity: .92; text-align: left; }
.hello { text-align: center; margin: 0 0 18px; color: var(--muted); }
.foot { margin-top: 22px; text-align: center; font-size: .88rem; color: var(--muted); }

/* Admin */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 4px; padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 8px 7px 14px; border-radius: 999px;
  background: rgba(0, 0, 0, .25); border: 1px solid var(--line);
}
.chip form { margin: 0; display: inline; }
.chip .x {
  width: 24px; height: 24px; line-height: 22px; padding: 0; border-radius: 50%;
  border: 0; cursor: pointer; font-size: 1rem; color: var(--muted); background: rgba(255, 255, 255, .08);
}
.chip .x:hover { background: var(--red); color: #fff; }
.chip.done { border-color: rgba(236, 206, 132, .6); }
.chip .tick { color: var(--gold); }
.chip .wait { color: var(--muted); opacity: .6; }

.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row .btn { flex: 1 1 200px; }
.hint { font-size: .85rem; color: var(--muted); margin: 8px 0 0; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .88rem; word-break: break-all; color: var(--gold); }

table { width: 100%; border-collapse: collapse; }
td { padding: 10px 6px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
td.arrow { color: var(--gold-dim); text-align: center; width: 36px; }

.topbar { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.topbar h1 { margin: 0; text-align: left; font-size: 1.7rem; }

@media (prefers-reduced-motion: reduce) {
  .gift svg, .reveal { animation: none; }
}

/* Persönliche Links (Admin) */
.links { list-style: none; margin: 0; padding: 0; }
.links li { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.links li:last-child { border-bottom: 0; }
.links .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.links .tick { color: var(--gold); }
.links .wait { color: var(--muted); opacity: .6; }
