:root {
  color-scheme: light;
  --ink: #1c1915;
  --muted: #5c564c;
  --paper: #f3efe6;
  --card: #fffdf8;
  --line: #e4d5c0;
  --pine: #1a5c3a;
  --pine-deep: #0f3d27;
  --berry: #9c2333;
  --gold: #a67c2d;
  --gold-soft: #e7d3a1;
  --shadow: 0 14px 34px rgba(48, 32, 18, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 0% -8%, rgba(26, 92, 58, 0.16), transparent 26rem),
    radial-gradient(circle at 100% 0%, rgba(156, 35, 51, 0.12), transparent 22rem),
    radial-gradient(circle at 80% 100%, rgba(166, 124, 45, 0.1), transparent 20rem),
    var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  line-height: 1.45;
}

.lights {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 1.15rem;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(var(--pine-deep), var(--pine-deep)) 0 0.28rem / 100% 2px no-repeat,
    radial-gradient(circle at 0.7rem 0.48rem, #e23b48 0 4px, rgba(226, 59, 72, 0.45) 5px, transparent 8px),
    radial-gradient(circle at 2.4rem 0.48rem, #2f9a55 0 4px, rgba(47, 154, 85, 0.4) 5px, transparent 8px),
    radial-gradient(circle at 4.1rem 0.48rem, #e0b34a 0 4px, rgba(224, 179, 74, 0.5) 5px, transparent 8px),
    radial-gradient(circle at 5.8rem 0.48rem, #3d7ec9 0 4px, rgba(61, 126, 201, 0.4) 5px, transparent 8px);
  background-size: 100% 2px, 6.8rem 1.15rem, 6.8rem 1.15rem, 6.8rem 1.15rem, 6.8rem 1.15rem;
  background-color: rgba(243, 239, 230, 0.94);
}

.lights::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0.7rem 0.48rem, #e23b48 0 4px, transparent 8px),
    radial-gradient(circle at 2.4rem 0.48rem, #2f9a55 0 4px, transparent 8px),
    radial-gradient(circle at 4.1rem 0.48rem, #e0b34a 0 4px, transparent 8px),
    radial-gradient(circle at 5.8rem 0.48rem, #3d7ec9 0 4px, transparent 8px);
  background-size: 6.8rem 1.15rem;
  animation: twinkle 2.8s ease-in-out infinite;
}

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

.snow span {
  position: absolute;
  top: -2.5rem;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(70, 90, 110, 0.28);
  animation: fall linear infinite;
  user-select: none;
}

.snow span::before { content: "❄"; }

.snow span:nth-child(3n)::before { content: "·"; font-size: 1.8em; }
.snow span:nth-child(5n)::before { content: "✦"; color: var(--gold-soft); }

.snow span:nth-child(1)  { left: 6%;  font-size: 0.85rem; animation-duration: 16s; animation-delay: -2s; }
.snow span:nth-child(2)  { left: 18%; font-size: 0.55rem; animation-duration: 22s; animation-delay: -9s; opacity: 0.75; }
.snow span:nth-child(3)  { left: 28%; font-size: 0.7rem;  animation-duration: 13s; animation-delay: -4s; }
.snow span:nth-child(4)  { left: 41%; font-size: 1rem;   animation-duration: 19s; animation-delay: -12s; }
.snow span:nth-child(5)  { left: 52%; font-size: 0.6rem; animation-duration: 24s; animation-delay: -6s; opacity: 0.8; }
.snow span:nth-child(6)  { left: 63%; font-size: 0.9rem; animation-duration: 15s; animation-delay: -11s; }
.snow span:nth-child(7)  { left: 74%; font-size: 0.5rem; animation-duration: 21s; animation-delay: -3s; }
.snow span:nth-child(8)  { left: 83%; font-size: 0.8rem; animation-duration: 17s; animation-delay: -8s; }
.snow span:nth-child(9)  { left: 91%; font-size: 0.65rem; animation-duration: 26s; animation-delay: -14s; opacity: 0.7; }
.snow span:nth-child(10) { left: 12%; font-size: 0.45rem; animation-duration: 28s; animation-delay: -16s; }
.snow span:nth-child(11) { left: 47%; font-size: 0.75rem; animation-duration: 18s; animation-delay: -7s; }
.snow span:nth-child(12) { left: 69%; font-size: 1.05rem; animation-duration: 23s; animation-delay: -1s; }

.wrap {
  position: relative;
  z-index: 1;
  width: min(40rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.mast { margin-bottom: 1.5rem; }

.mark {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.35rem;
  color: var(--berry);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sprig {
  width: 2rem;
  height: 1rem;
  flex: none;
}

h1, h2 { font-family: Palatino, "Iowan Old Style", Georgia, serif; font-weight: 600; }

h1 {
  margin: 0;
  font-size: 2.4rem;
  letter-spacing: -0.03em;
}

h1::after {
  content: "";
  display: block;
  width: 4.75rem;
  height: 3px;
  margin-top: 0.7rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--berry), var(--gold), transparent);
}

h2 { margin: 0; font-size: 1.35rem; }

.card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1.15rem 1.2rem 1.25rem;
  margin-bottom: 1rem;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pine), var(--gold) 48%, var(--berry));
}

label, .link-label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
}

input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 0.7rem 0.8rem;
}

textarea {
  resize: vertical;
  min-height: 7rem;
}

input:focus, textarea:focus {
  outline: 2px solid rgba(166, 124, 45, 0.45);
  border-color: var(--pine);
}

.row, .section-head, .actions form, .roster li {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.row input { flex: 1; }

.section-head { justify-content: space-between; margin-bottom: 0.8rem; }

.count {
  margin: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

button {
  border: 0;
  border-radius: 999px;
  background: var(--pine);
  color: #f7fbf8;
  font: inherit;
  font-weight: 600;
  padding: 0.7rem 1rem;
  cursor: pointer;
}

button:hover { background: var(--pine-deep); }

button:disabled {
  background: #cfc6b8;
  cursor: not-allowed;
}

button.danger { background: transparent; color: var(--berry); border: 1px solid #e7c4c8; }

button.danger:hover { background: #fdf4f5; }

button.quiet { background: transparent; color: var(--muted); }

form.card > button,
.card > form > button {
  margin-top: 0.85rem;
}

.actions > form > button { margin-top: 0; }

.roster { list-style: none; margin: 0; padding: 0; }

.roster li {
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
}

.person { flex: 1; min-width: 0; }

.name { margin: 0 0 0.45rem; font-weight: 700; }

.link { font-size: 0.82rem; color: var(--muted); }

.note { margin: 0; color: var(--muted); }

.actions { display: flex; flex-direction: column; align-items: flex-start; gap: 0.9rem; }

.actions form { margin: 0; }

.flashes { list-style: none; margin: 0 0 1rem; padding: 0; }

.flashes li {
  background: #eef6f1;
  border: 1px solid #c9dfd0;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.5rem;
}

.reveal { padding: 1.6rem 1.3rem 1.7rem; }

.kicker { margin: 0 0 0.4rem; color: var(--muted); }

.recipient {
  width: fit-content;
  max-width: 100%;
  margin: 0;
  font-family: Palatino, "Iowan Old Style", Georgia, serif;
  font-size: 2.2rem;
  letter-spacing: -0.03em;
  background: linear-gradient(transparent 68%, rgba(198, 161, 91, 0.5) 68% 86%, transparent 86%);
}

.hints-kicker { margin-top: 1.15rem; }

.hints {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.hint-empty { margin-top: 1rem; }

.hint-help { margin: 0.55rem 0 0.85rem; }

@keyframes fall {
  0% { transform: translate3d(0, -10vh, 0) rotate(0deg); }
  100% { transform: translate3d(1.4rem, 110vh, 0) rotate(180deg); }
}

@keyframes twinkle {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.35); }
}

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

@media (max-width: 640px) {
  .roster li { align-items: stretch; flex-direction: column; }
  .roster form { align-self: flex-start; }
}
