/*
 * Wichtel – Scherenschnitt bei Kerzenlicht.
 * Nachtblauer Himmel, dunkle Silhouetten wie im Schwibbogen, warmes Kerzengold.
 */

@font-face {
  font-family: "Mountains of Christmas";
  src: url("/assets/MountainsofChristmas-Bold-c0f595c5.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("/assets/Nunito-3bae3d88.ttf") format("truetype");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --nacht: #0d1b33;
  --nacht-tief: #070f1f;
  --silhouette: #050b16;
  --tanne: #0f3d2e;
  --tanne-hell: #1d6b4f;
  --rot: #b3132b;
  --rot-dunkel: #8a0e21;
  --gold: #f2b33d;
  --gold-hell: #ffd77a;
  --schnee: #f7f9fc;
  --eis: #dfe7f2;
  --tinte: #1b2440;
  --tinte-sanft: #55607d;
  --lebkuchen: #8a4b24;

  --font-display: "Mountains of Christmas", "Comic Sans MS", cursive;
  --font-body: "Nunito", ui-rounded, system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: 2.2rem;
  --step-4: 3.2rem;

  --radius: 14px;
  --page: 44rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--schnee);
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff9 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 8%, #fff8 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 47% 22%, #fffa 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 12%, #fff7 50%, transparent 51%),
    radial-gradient(2px 2px at 81% 6%, #fffb 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 27%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 40%, #fff6 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 72% 38%, #fff7 50%, transparent 51%),
    linear-gradient(180deg, var(--nacht-tief) 0%, var(--nacht) 55%, #16294a 100%);
  background-attachment: fixed;
}

a {
  color: var(--gold-hell);
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 0.4em;
  letter-spacing: 0.01em;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }

p { margin: 0 0 1em; }

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Schnee ---------- */

.snow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

/* ---------- Kopf mit Lichterkette ---------- */

.topbar {
  position: relative;
  z-index: 10;
}

.fairy-lights {
  position: relative;
  height: 50px;
}

.fairy-lights svg {
  display: block;
  width: 100%;
  height: 46px;
}

.fairy-lights__wire {
  fill: none;
  stroke: #2b3a2e;
  stroke-width: 2;
}

.fairy-lights__bulb {
  position: absolute;
  width: 10px;
  height: 15px;
  margin-left: -5px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: var(--bulb);
  box-shadow: 0 0 10px 2px var(--bulb);
  animation: twinkle 2.4s ease-in-out infinite;
}

.fairy-lights__bulb::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 2px;
  width: 6px;
  height: 5px;
  border-radius: 1px;
  background: #2d3a2f;
}

.fairy-lights__bulb:nth-of-type(4n + 1) { --bulb: #ff4d5e; animation-delay: 0s; }
.fairy-lights__bulb:nth-of-type(4n + 2) { --bulb: var(--gold-hell); animation-delay: 0.6s; }
.fairy-lights__bulb:nth-of-type(4n + 3) { --bulb: #4fd18b; animation-delay: 1.2s; }
.fairy-lights__bulb:nth-of-type(4n + 4) { --bulb: #6db8ff; animation-delay: 1.8s; }

@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.topbar__inner {
  max-width: var(--page);
  margin: -6px auto 0;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 700;
  color: var(--schnee);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.brand svg {
  width: 1.6rem;
  height: 1.6rem;
}

.bell-toggle {
  font: inherit;
  font-size: 1.2rem;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 2px solid #ffffff2e;
  background: #ffffff10;
  cursor: pointer;
  filter: grayscale(1);
  opacity: 0.6;
  transition: filter 0.2s, opacity 0.2s, transform 0.2s;
}

.bell-toggle[aria-pressed="true"] {
  filter: none;
  opacity: 1;
  border-color: var(--gold);
  animation: ring 0.8s ease-in-out;
}

@keyframes ring {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(18deg); }
  40% { transform: rotate(-14deg); }
  60% { transform: rotate(9deg); }
  80% { transform: rotate(-5deg); }
}

/* ---------- Seite ---------- */

.page {
  position: relative;
  z-index: 5;
  flex: 1;
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 1rem 1rem 3rem;
}

.flash {
  margin: 0 0 1.25rem;
  padding: 0.8rem 1rem 0.8rem 3rem;
  border-radius: var(--radius);
  position: relative;
  font-weight: 700;
  color: var(--tinte);
  background: var(--schnee);
  box-shadow: 0 6px 0 -2px var(--tanne-hell);
}

.flash::before {
  content: "⭐";
  position: absolute;
  left: 1rem;
  top: 0.75rem;
}

.flash--alert {
  box-shadow: 0 6px 0 -2px var(--rot);
}

.flash--alert::before {
  content: "🧦";
}

/* ---------- Schwibbogen (Hero) ---------- */

.hero {
  text-align: center;
  margin: 0.5rem 0 2rem;
}

.schwibbogen {
  display: block;
  width: min(100%, 30rem);
  margin: 0 auto -0.5rem;
  overflow: visible;
}

.schwibbogen__glow-a { stop-color: var(--gold); stop-opacity: 0.55; }
.schwibbogen__glow-b { stop-color: var(--gold); stop-opacity: 0; }
.schwibbogen__wood { fill: var(--silhouette); }
.schwibbogen__window { fill: var(--gold-hell); }
.schwibbogen__candle { fill: #fff6e0; }

.schwibbogen__flame {
  fill: var(--gold-hell);
  filter: drop-shadow(0 0 4px var(--gold)) drop-shadow(0 0 10px #ff9d2e);
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: flicker 1.8s ease-in-out infinite;
}

.schwibbogen__flame:nth-of-type(2n) { animation-duration: 2.3s; }
.schwibbogen__flame:nth-of-type(3n) { animation-duration: 1.5s; animation-delay: 0.4s; }

@keyframes flicker {
  0%, 100% { transform: scale(1, 1) rotate(0); opacity: 1; }
  25% { transform: scale(0.92, 1.08) rotate(-3deg); }
  50% { transform: scale(1.05, 0.9) rotate(2deg); opacity: 0.85; }
  75% { transform: scale(0.96, 1.05) rotate(-1deg); }
}

.hero__title {
  font-size: clamp(2.6rem, 9vw, 4.2rem);
  color: var(--schnee);
  text-shadow: 0 0 24px #f2b33d66, 0 3px 0 var(--rot-dunkel);
  margin-bottom: 0.25em;
}

.hero__lead {
  max-width: 32rem;
  margin: 0 auto;
  font-size: var(--step-1);
  color: var(--eis);
}

/* ---------- Karten: Schneepapier mit Zuckerstangenrand ---------- */

.card {
  color-scheme: light;
  position: relative;
  margin: 0 0 1.75rem;
  padding: 1.75rem 1.25rem 1.4rem;
  border-radius: var(--radius);
  color: var(--tinte);
  background: var(--schnee);
  box-shadow: 0 18px 40px -18px #000c;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 10px;
  background: repeating-linear-gradient(-45deg, var(--rot) 0 12px, var(--schnee) 12px 24px);
}

.card h2 {
  color: var(--tanne);
  font-size: var(--step-3);
}

.card__hint {
  color: var(--tinte-sanft);
  font-size: var(--step--1);
}

@media (min-width: 40rem) {
  .card { padding: 2rem 2rem 1.6rem; }
}

/* Mistelzweig-Ecke */
.card--mistletoe::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 10px;
  width: 64px;
  height: 64px;
  background: url("/assets/mistletoe-aa45966e.svg") no-repeat center / contain;
  pointer-events: none;
}

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

.field {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 1rem;
}

.field label,
.label {
  font-weight: 800;
  font-size: var(--step--1);
  color: var(--tanne);
}

.field__optional {
  font-weight: 600;
  color: var(--tinte-sanft);
}

.input,
.field input[type="text"],
.field input[type="email"],
.field textarea,
.field select {
  width: 100%;
  font: inherit;
  color: var(--tinte);
  padding: 0.7rem 0.9rem;
  border: 2px solid var(--eis);
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus,
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px #f2b33d40;
}

.field textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.checkbox {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  font-weight: 700;
  margin: 0.25rem 0 1.25rem;
  cursor: pointer;
}

.checkbox input {
  width: 1.3rem;
  height: 1.3rem;
  accent-color: var(--rot);
}

.form-errors {
  margin: 0 0 1rem;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  background: #fde8eb;
  color: var(--rot-dunkel);
  font-weight: 700;
}

.form-errors ul {
  margin: 0;
  padding-left: 1.2rem;
}

.inline-form {
  display: grid;
  gap: 0.6rem;
}

@media (min-width: 40rem) {
  .inline-form {
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
  }

  .inline-form .field {
    margin: 0;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 800;
  font-size: var(--step-0);
  padding: 0.75rem 1.4rem;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--rot);
  box-shadow: inset 0 -4px 0 var(--rot-dunkel), 0 6px 14px -6px #b3132b99;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}

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

.btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 -1px 0 var(--rot-dunkel);
}

.btn--wide {
  width: 100%;
}

.btn--green {
  background: var(--tanne-hell);
  box-shadow: inset 0 -4px 0 var(--tanne), 0 6px 14px -6px #0f3d2e99;
}

.btn--gold {
  color: var(--tinte);
  background: linear-gradient(180deg, var(--gold-hell), var(--gold));
  box-shadow: inset 0 -5px 0 #b97f12, 0 0 30px -4px #f2b33daa;
  font-size: var(--step-1);
  padding: 1rem 2rem;
}

.btn--ghost {
  color: var(--tinte-sanft);
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--eis);
  font-size: var(--step--1);
  padding: 0.5rem 1rem;
}

.btn--icon {
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1rem;
  color: var(--tinte-sanft);
  background: transparent;
  box-shadow: none;
}

.btn--icon:hover {
  color: var(--rot);
}

/* ---------- Einladungslink ---------- */

.copy-link {
  display: flex;
  gap: 0.5rem;
}

.copy-link .input {
  font-size: var(--step--1);
  background: var(--eis);
  min-width: 0;
}

/* ---------- Teilnehmer als Geschenkanhänger ---------- */

.tags {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 0.6rem;
}

.tag {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.4rem 0.45rem 1.9rem;
  background: #f6e2c4;
  color: var(--lebkuchen);
  font-weight: 800;
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%);
  transform: rotate(var(--tilt, -1.5deg));
}

.tag:nth-child(2n) { --tilt: 1.5deg; background: #e6f2e9; color: var(--tanne); }
.tag:nth-child(3n) { --tilt: -0.5deg; background: #fbe3e6; color: var(--rot-dunkel); }

.tag::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--schnee);
  box-shadow: inset 0 0 0 2px currentColor;
}

.tag__email {
  font-weight: 600;
  font-size: 0.75rem;
  opacity: 0.75;
}

.tag form {
  display: contents;
}

/* ---------- Leere Zustände: Rentierspuren ---------- */

.empty {
  text-align: center;
  padding: 1.5rem 1rem 1rem;
  color: var(--tinte-sanft);
}

.empty__tracks {
  display: block;
  width: 180px;
  margin: 0 auto 0.5rem;
  color: #b7c3d6;
}

/* ---------- Ausschlüsse ---------- */

.pairs {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.pair {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem 0.5rem 1rem;
  border-radius: 10px;
  background: var(--eis);
  font-weight: 700;
}

.pair__sign {
  font-size: 1.1rem;
}

.pair form {
  margin-left: auto;
}

/* ---------- Auslosung: der Sack ---------- */

.draw {
  text-align: center;
  padding-top: 2.25rem;
}

.draw__sack {
  display: block;
  width: 150px;
  margin: 0 auto 1rem;
  transform-origin: 50% 90%;
}

.draw__sack.is-shaking {
  animation: shake 0.35s ease-in-out infinite;
}

@keyframes shake {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-8deg) translateY(-4px); }
  75% { transform: rotate(8deg) translateY(-2px); }
}

.draw__ticket {
  position: absolute;
  font-size: 1.6rem;
  opacity: 0;
  pointer-events: none;
  animation: fly 1.2s ease-out forwards;
}

@keyframes fly {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  100% { opacity: 0; transform: translate(var(--dx), -160px) rotate(var(--spin)); }
}

.draw__done {
  font-family: var(--font-display);
  font-size: var(--step-3);
  color: var(--tanne);
  margin-bottom: 0.25rem;
}

/* ---------- Teilnehmerseite ---------- */

.greeting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.greeting h1 {
  font-size: clamp(2.2rem, 8vw, 3.2rem);
  text-shadow: 0 3px 0 var(--rot-dunkel);
  margin: 0;
}

.greeting__group {
  margin: 0;
  color: var(--eis);
}

/* Christbaumkugel-Countdown */
.bauble {
  flex: none;
  position: relative;
  width: 6.2rem;
  text-align: center;
  padding-top: 1.6rem;
}

.bauble::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -1rem;
  width: 2px;
  height: 1.9rem;
  background: var(--gold);
}

.bauble__ball {
  position: relative;
  display: grid;
  place-items: center;
  width: 4.6rem;
  height: 4.6rem;
  margin: 0 auto;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  background: radial-gradient(circle at 32% 28%, #ff8a97 0 6%, var(--rot) 30%, var(--rot-dunkel) 100%);
  box-shadow: 0 10px 24px -8px #000;
  transform-origin: 50% -1.6rem;
  animation: swing 4s ease-in-out infinite;
}

.bauble__ball::before {
  content: "";
  position: absolute;
  top: -0.55rem;
  left: 50%;
  width: 1.2rem;
  height: 0.7rem;
  margin-left: -0.6rem;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, #b97f12, var(--gold-hell), #b97f12);
}

.bauble__label {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--eis);
}

@keyframes swing {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}

/* ---------- Das Geschenk ---------- */

.gift-stage {
  position: relative;
  height: 350px;
  margin-bottom: 1.5rem;
  text-align: center;
}

.gift {
  position: absolute;
  left: 50%;
  bottom: 44px;
  width: 190px;
  height: 200px;
  margin-left: -95px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  animation: wobble 3s ease-in-out infinite;
}

.gift:hover {
  animation-duration: 1s;
}

.gift__box,
.gift__lid {
  position: absolute;
  left: 50%;
  border-radius: 6px;
  background:
    linear-gradient(90deg, transparent 43%, var(--gold) 43% 57%, transparent 57%),
    repeating-linear-gradient(45deg, var(--rot) 0 14px, #c7203a 14px 28px);
  box-shadow: inset 0 -10px 18px -8px #0006;
}

.gift__box {
  bottom: 0;
  z-index: 3;
  width: 170px;
  height: 130px;
  margin-left: -85px;
}

.gift__lid {
  bottom: 124px;
  z-index: 4;
  width: 190px;
  height: 40px;
  margin-left: -95px;
  transition: transform 0.7s cubic-bezier(0.3, 1.4, 0.5, 1) 0.25s, opacity 0.5s 0.6s;
}

.gift__bow {
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 90px;
  height: 46px;
  margin-left: -45px;
  transition: transform 0.5s ease-in, opacity 0.5s;
}

.gift__bow::before,
.gift__bow::after {
  content: "";
  position: absolute;
  bottom: -4px;
  width: 44px;
  height: 34px;
  border: 8px 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__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  font-weight: 800;
  color: var(--gold-hell);
}

@keyframes wobble {
  0%, 88%, 100% { transform: rotate(0); }
  91% { transform: rotate(-4deg); }
  94% { transform: rotate(4deg); }
  97% { transform: rotate(-2deg); }
}

.gift.is-open {
  animation: none;
  cursor: default;
}

.gift.is-open .gift__bow {
  transform: translateY(-40px) scale(0.6) rotate(25deg);
  opacity: 0;
}

.gift.is-open .gift__lid {
  transform: translate(60px, -170px) rotate(28deg);
  opacity: 0;
}

.gift-stage.is-revealed .gift__hint {
  visibility: hidden;
}

/* Der Name steckt hinter der Vorderseite der Box und steigt heraus. */
.reveal {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 120px;
  z-index: 2;
  opacity: 0;
  transform: translateY(70px) scale(0.4);
  pointer-events: none;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(-62px) scale(1);
  transition: opacity 0.3s ease-out 0.55s, transform 1s cubic-bezier(0.2, 1.5, 0.4, 1) 0.55s;
}

.gift-stage.is-instant *,
.gift-stage.is-instant .reveal.is-visible {
  transition: none;
  animation: none;
}

.reveal__intro {
  margin: 0;
  font-weight: 800;
  color: var(--eis);
}

.reveal__name {
  display: inline-block;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 14vw, 4.6rem);
  line-height: 1;
  color: var(--gold-hell);
  text-shadow: 0 0 18px var(--gold), 0 0 46px #ff9d2e88, 0 4px 0 var(--lebkuchen);
}

.sparkle {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  color: var(--gold-hell);
  animation: sparkle 1.4s ease-out forwards;
}

@keyframes sparkle {
  0% { opacity: 0; transform: translate(0, 0) scale(0.2); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.2) rotate(180deg); }
}

.waiting {
  text-align: center;
}

.waiting__elf {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 1rem;
}

.waiting__elf svg {
  width: 100%;
  height: 100%;
}

.waiting__z {
  position: absolute;
  right: -18px;
  top: 4px;
  font-family: var(--font-display);
  font-size: var(--step-2);
  color: var(--tinte-sanft);
  animation: snooze 3s ease-in-out infinite;
}

.waiting__z + .waiting__z {
  right: -34px;
  top: -16px;
  animation-delay: 1s;
}

@keyframes snooze {
  0% { opacity: 0; transform: translate(0, 0); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: translate(8px, -16px); }
}

/* ---------- Chats: Wunschzettel ---------- */

.chats {
  display: grid;
  gap: 1.75rem;
}

.chat {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.chat h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--step-2);
}

.chat h2 svg {
  width: 2.6rem;
  height: 2.6rem;
  flex: none;
}

.chat__messages {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-height: 26rem;
  min-height: 7rem;
  overflow-y: auto;
  padding: 0.5rem 0.25rem 1rem;
  margin-bottom: 0.75rem;
  border-radius: 10px;
  background:
    repeating-linear-gradient(180deg, transparent 0 27px, #dfe7f2 27px 28px),
    #fbfcfe;
  scroll-behavior: smooth;
}

.chat__empty {
  margin: auto;
  padding: 1rem;
  text-align: center;
  color: var(--tinte-sanft);
  font-size: var(--step--1);
}

.chat__messages:has(.note) .chat__empty {
  display: none;
}

.chat__form {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.chat__form textarea {
  flex: 1;
  min-height: 2.9rem;
  max-height: 8rem;
  font: inherit;
  padding: 0.65rem 0.9rem;
  border: 2px solid var(--eis);
  border-radius: 10px;
  resize: vertical;
  color: var(--tinte);
  background: #fff;
}

.chat__form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px #f2b33d40;
}

.note {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  max-width: 88%;
}

.note--mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.note__avatar {
  flex: none;
  width: 2.2rem;
  height: 2.2rem;
}

.note__avatar svg {
  width: 100%;
  height: 100%;
}

.note__paper {
  position: relative;
  padding: 0.6rem 0.9rem 0.5rem;
  border-radius: 4px 14px 14px 14px;
  background: #fff4dc;
  color: #3b2a1a;
  box-shadow: 2px 3px 0 #e8d3a8, 0 6px 14px -8px #0005;
  transform: rotate(-0.8deg);
}

.note--mine .note__paper {
  border-radius: 14px 4px 14px 14px;
  background: #e5f4ea;
  color: #12352a;
  box-shadow: -2px 3px 0 #c3e2cd, 0 6px 14px -8px #0005;
  transform: rotate(0.8deg);
}

.note__author {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.1;
}

.note__body p {
  margin: 0.15rem 0 0;
  overflow-wrap: anywhere;
}

.note__time {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.7rem;
  opacity: 0.6;
}

@media (min-width: 52rem) {
  .chats {
    grid-template-columns: 1fr 1fr;
    width: min(56rem, calc(100vw - 2rem));
    margin-left: 50%;
    transform: translateX(-50%);
  }
}

/* ---------- Fußzeile: verschneiter Wald ---------- */

.forest {
  position: relative;
  z-index: 4;
  margin-top: auto;
  color: var(--eis);
  text-align: center;
  font-size: var(--step--1);
}

.forest svg {
  display: block;
  width: 100%;
  height: 110px;
}

.forest__trees { fill: var(--silhouette); }
.forest__snow { fill: var(--schnee); }

.forest__text {
  margin: 0;
  padding: 0.5rem 1rem 1.25rem;
  background: var(--schnee);
  color: var(--tinte-sanft);
}

.forest__text a {
  color: var(--tanne);
  font-weight: 700;
}

/* ---------- Lebkuchen-Cursor ---------- */

.btn,
.gift,
.bell-toggle {
  cursor: url("/assets/gingerbread-64f8e73d.svg") 12 4, pointer;
}

/* ---------- Konfetti ---------- */

.confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 60;
}

/* ---------- Weniger Bewegung ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
