/* Wichtelbot 9000 – weihnachtliches Design: Tannengrün + Kerzenrot, mobil zuerst. */

:root {
  --pine: #0b5b34;
  --pine-dark: #05401f;
  --holly: #157f4c;
  --red: #c0243c;
  --red-dark: #8f1226;
  --gold: #d19a26;
  --snow: #f2f9f4;
  --ink: #16241c;
  --muted: #5e7268;
  --line: rgba(11, 91, 52, 0.16);
  --radius: 20px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background-color: var(--snow);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.9) 0 3px, transparent 4px),
    radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.85) 0 2px, transparent 3px),
    radial-gradient(circle at 45% 65%, rgba(255, 255, 255, 0.8) 0 2px, transparent 3px),
    linear-gradient(180deg, #eaf5ee 0%, var(--snow) 45%, #eaf3ee 100%);
  background-size: 340px 340px, 260px 260px, 200px 200px, 100% 100%;
  font-family: ui-rounded, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

p, li, h1, h2, h3 { overflow-wrap: anywhere; }

.wrap {
  width: 100%;
  max-width: 1040px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

/* ---------- Schnee (nur Deko) ---------- */

.snow {
  position: fixed;
  inset: 0;
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
}

.snow span {
  position: absolute;
  top: -10vh;
  left: var(--left, 10%);
  width: var(--size, 8px);
  height: var(--size, 8px);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0 45%, #dbeafe 100%);
  border: 1px solid rgba(96, 140, 190, 0.35);
  opacity: 0.75;
  animation: fall var(--duration, 18s) linear infinite;
  animation-delay: var(--delay, 0s);
}

.snow span:nth-child(odd) { --drift: 7vw; }
.snow span:nth-child(even) { --drift: -7vw; }

@keyframes fall {
  from { transform: translate3d(0, -12vh, 0); }
  to { transform: translate3d(var(--drift, 4vw), 118vh, 0); }
}

/* ---------- Kopfzeile ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(115deg, var(--pine-dark) 0%, var(--pine) 45%, var(--holly) 100%);
  color: #fff;
  border-top: 6px solid var(--red);
  padding-block: 0.6rem 0.75rem;
  box-shadow: 0 6px 18px rgba(5, 64, 31, 0.25);
}

/* Schnee am unteren Rand des Headers */
.site-header::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -10px;
  height: 12px;
  background-image: radial-gradient(circle at 10px -3px, #fff 9px, transparent 10px);
  background-size: 22px 12px;
  background-repeat: repeat-x;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}

.brand-icon { font-size: 1.5rem; line-height: 1; }
.brand-text strong { color: #ffe9a8; }

.signed-in {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.82);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.nav-link:hover { background: rgba(255, 255, 255, 0.24); }

.nav-link.is-active {
  background: #fff;
  color: var(--pine-dark);
  border-color: #fff;
}

.nav-form { margin: 0; }

.nav-submit { font: inherit; }

/* ---------- Inhalt ---------- */

.main {
  position: relative;
  z-index: 2;
  flex: 1 0 auto;
  padding-block: clamp(20px, 4vw, 40px) 12px;
}

.card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 7px solid var(--holly);
  border-radius: var(--radius);
  padding: clamp(18px, 4.2vw, 30px);
  margin-bottom: clamp(14px, 2.4vw, 20px);
  box-shadow: 0 10px 26px rgba(5, 64, 31, 0.09);
}

.gift-card,
.login-card { border-top-color: var(--red); }

.gift-card {
  background-image:
    radial-gradient(circle at 92% 6%, rgba(192, 36, 60, 0.1) 0 26px, transparent 27px),
    radial-gradient(circle at 4% 92%, rgba(21, 127, 76, 0.1) 0 20px, transparent 21px);
}

h1 {
  margin: 0.1em 0 0.2em;
  font-size: clamp(1.5rem, 1.05rem + 2.4vw, 2.25rem);
  line-height: 1.15;
  color: var(--pine-dark);
}

h2 {
  margin: 0 0 0.35em;
  font-size: clamp(1.2rem, 1rem + 1.3vw, 1.55rem);
  color: var(--pine-dark);
}

h3 {
  margin: 1.4em 0 0.2em;
  font-size: 1.05rem;
  color: var(--pine);
}

.kicker {
  margin: 0 0 0.35em;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--red);
}

.lead { margin: 0 0 0.6em; font-size: 1.075rem; }

.gift-name {
  margin: 0 0 0.1em;
  font-size: clamp(1.6rem, 1.1rem + 2.8vw, 2.4rem);
  color: var(--red-dark);
}

.meta,
.hint,
.footnote {
  color: var(--muted);
  font-size: 0.94rem;
}

.footnote {
  margin: 1.1em 0 0;
  padding-top: 0.75em;
  border-top: 1px dashed var(--line);
}

.notice {
  margin: 0.6em 0 0;
  padding: 0.9rem 1rem;
  border: 2px dashed rgba(209, 154, 38, 0.65);
  border-radius: 16px;
  background: #fff8e8;
  color: #6c4a0b;
  font-weight: 550;
}

/* ---------- Wünsche ---------- */

.wish-list {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  margin: 0.6em 0;
  padding: 0;
}

.wish-list li { position: relative; padding-left: 1.6rem; }

.wish-list li::before {
  content: "❄";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--holly);
}

.wish-single { margin: 0.6em 0; font-weight: 600; }

.wish-empty {
  margin: 0.6em 0;
  color: var(--muted);
  font-style: italic;
}

/* ---------- Formulare ---------- */

.stack { display: grid; gap: 1.1rem; }

.field { display: grid; gap: 0.4rem; }

label {
  font-weight: 650;
  color: var(--pine-dark);
}

input,
textarea {
  width: 100%;
  font: inherit;
  font-size: 1.075rem;
  color: var(--ink);
  background: #fff;
  border: 2px solid rgba(11, 91, 52, 0.22);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
}

textarea { min-height: 200px; resize: vertical; }

input:focus,
textarea:focus { border-color: var(--pine); outline: none; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

::placeholder { color: #8ba093; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ---------- Knöpfe ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.14s ease, box-shadow 0.14s ease, transform 0.06s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(180deg, #d92f45, #a8112a);
  color: #fff;
  box-shadow: 0 8px 18px rgba(168, 17, 42, 0.26);
}

.btn-primary:hover { background: linear-gradient(180deg, #c8203a, #8f1226); }

.btn-draft {
  width: 100%;
  max-width: 440px;
  min-height: 66px;
  font-size: clamp(1.05rem, 0.95rem + 1vw, 1.3rem);
  background: linear-gradient(180deg, #e0314a, #a8112a);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 14px 28px rgba(168, 17, 42, 0.3);
  animation: pulse 2.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 14px 28px rgba(168, 17, 42, 0.3), 0 0 0 0 rgba(192, 36, 60, 0.32); }
  55% { box-shadow: 0 14px 28px rgba(168, 17, 42, 0.3), 0 0 0 14px rgba(192, 36, 60, 0); }
}

.btn-ghost {
  background: #fff;
  color: var(--pine-dark);
  border-color: rgba(11, 91, 52, 0.3);
}

.btn-ghost:hover { background: #eef7f1; }

.btn-link {
  background: none;
  color: var(--pine);
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 44px;
  padding-inline: 0.4rem;
}

/* ---------- Meldungen ---------- */

.flashes { margin-bottom: clamp(14px, 2.4vw, 20px); }

.flash {
  margin: 0 0 0.6rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 2px solid var(--line);
  background: #fff;
  font-weight: 600;
}

.flash-success { background: #e9f8ef; border-color: rgba(21, 127, 76, 0.45); color: var(--pine-dark); }
.flash-error { background: #fdecef; border-color: rgba(192, 36, 60, 0.45); color: var(--red-dark); }
.flash-info { background: #f1f6f3; color: var(--pine-dark); }

/* ---------- Fortschritt ---------- */

.grid { display: grid; gap: clamp(14px, 2.4vw, 20px); }

.bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(11, 91, 52, 0.12);
  overflow: hidden;
  margin-top: 0.9rem;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--holly), var(--red));
}

/* ---------- Fußzeile ---------- */

.site-footer {
  position: relative;
  z-index: 2;
  padding: 2rem 0 2.4rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: #eef4f0;
  border-radius: 6px;
  padding: 0.05em 0.3em;
}

/* ---------- Ab hier: Tablet und größere Bildschirme ---------- */

@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main { padding-block-start: 44px; }
}

@media (min-width: 980px) {
  body { font-size: 1.125rem; }
  .login-card { max-width: 520px; margin-inline: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .snow { display: none; }
  .btn-draft { animation: none; }
  .btn { transition: none; }
}
