:root {
  --cocoa: #3a1f14;
  --gingerbread: #8b4518;
  --cookie: #c47a3a;
  --frosting: #fff7ec;
  --icing: #ffe8c8;
  --berry: #c23b3b;
  --mint: #2f7a5a;
  --gumdrop: #e8a03a;
  --snow: rgba(255, 247, 236, 0.85);
  --shadow: 0 18px 40px rgba(34, 14, 8, 0.28);
  --radius: 1.25rem;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Fredoka", "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--frosting);
  background:
    radial-gradient(circle at 15% 10%, rgba(232, 160, 58, 0.22), transparent 35%),
    radial-gradient(circle at 85% 0%, rgba(194, 59, 59, 0.18), transparent 30%),
    linear-gradient(165deg, #1d100c 0%, #3a1f14 42%, #5a3018 100%);
  background-attachment: fixed;
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(40rem, 100%);
  margin: 0 auto;
  padding: 1rem 1.1rem 2.5rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  gap: 0.9rem;
  font-size: 0.95rem;
}

.nav a {
  opacity: 0.85;
}

.nav a:hover,
.nav a:focus-visible {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.main {
  display: grid;
  gap: 1.25rem;
}

.hero,
.panel {
  position: relative;
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem 1.75rem;
  background:
    linear-gradient(180deg, rgba(255, 232, 200, 0.12), rgba(255, 247, 236, 0.05)),
    rgba(58, 31, 20, 0.55);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 232, 200, 0.18);
  backdrop-filter: blur(6px);
  overflow: hidden;
  animation: rise-in 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.eyebrow {
  margin: 0 0 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--gumdrop);
}

.display {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 9vw, 3.4rem);
  line-height: 1.05;
  font-weight: 700;
  color: var(--frosting);
  text-wrap: balance;
}

.display-sm {
  font-size: clamp(1.8rem, 7vw, 2.5rem);
}

.date-pill {
  display: inline-block;
  margin: 0.9rem 0 0.55rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(194, 59, 59, 0.9);
  color: #fff7ec;
  font-size: 0.92rem;
  animation: soft-pulse 2.8s ease-in-out infinite;
}

.address {
  margin: 0 0 0.75rem;
  color: rgba(255, 247, 236, 0.92);
  font-size: 1rem;
  font-weight: 550;
}

.lede {
  margin: 0;
  max-width: 34rem;
  color: rgba(255, 247, 236, 0.88);
  font-size: 1.05rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.2rem;
  font: inherit;
  font-weight: 550;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, background 160ms ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(180deg, #e8a03a, #c47a3a);
  color: #2a150d;
}

.btn-secondary {
  background: rgba(255, 247, 236, 0.92);
  color: var(--cocoa);
}

.btn-ghost {
  background: transparent;
  color: var(--frosting);
  border: 1px solid rgba(255, 247, 236, 0.35);
}

.btn-block {
  width: 100%;
}

.house-panel {
  display: grid;
  place-items: center;
  padding: 1.1rem 0.75rem 1.35rem;
}

.house-scene {
  width: min(22rem, 100%);
  animation: floaty 4.5s ease-in-out infinite;
}

.house-art {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.house-art .star {
  transform-origin: 160px 52px;
  animation: twinkle 2.4s ease-in-out infinite;
}

.house-art .lights circle {
  animation: light-twinkle 1.8s ease-in-out infinite;
}

.house-art .lights circle:nth-child(2) { animation-delay: 0.2s; }
.house-art .lights circle:nth-child(3) { animation-delay: 0.4s; }
.house-art .lights circle:nth-child(4) { animation-delay: 0.6s; }
.house-art .lights circle:nth-child(5) { animation-delay: 0.8s; }
.house-art .lights circle:nth-child(6) { animation-delay: 1s; }

.house-art .smoke circle {
  animation: smoke-rise 3.6s ease-in-out infinite;
}

.house-art .smoke circle:nth-child(2) { animation-delay: 0.6s; }
.house-art .smoke circle:nth-child(3) { animation-delay: 1.2s; }

.share-panel h2,
.section-title {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.share-panel p,
.admin-panel .lede {
  margin-bottom: 1rem;
}

.copy-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
}

.copy-row.compact {
  margin-top: 0.25rem;
}

.copy-input {
  width: 100%;
  border: 1px solid rgba(255, 232, 200, 0.28);
  border-radius: 0.9rem;
  padding: 0.75rem 0.9rem;
  background: rgba(29, 16, 12, 0.45);
  color: var(--frosting);
  font: inherit;
  font-size: 0.92rem;
}

.copy-status {
  min-height: 1.25rem;
  margin: 0.45rem 0 0;
  color: #9be0bf;
  font-size: 0.92rem;
}

.stack-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.1rem;
}

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

.field span {
  font-size: 0.92rem;
  color: rgba(255, 247, 236, 0.9);
}

.field input {
  width: 100%;
  border: 1px solid rgba(255, 232, 200, 0.28);
  border-radius: 0.9rem;
  padding: 0.85rem 0.95rem;
  background: rgba(29, 16, 12, 0.45);
  color: var(--frosting);
  font: inherit;
}

.field input:focus {
  outline: 2px solid rgba(232, 160, 58, 0.7);
  outline-offset: 1px;
}

.alert {
  margin-top: 1rem;
  padding: 0.8rem 0.95rem;
  border-radius: 0.9rem;
  background: rgba(194, 59, 59, 0.22);
  border: 1px solid rgba(194, 59, 59, 0.45);
}

.admin-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.summary-list,
.response-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.summary-list li,
.response-list li {
  padding: 0.85rem 0.95rem;
  border-radius: 0.95rem;
  background: rgba(29, 16, 12, 0.38);
  border: 1px solid rgba(255, 232, 200, 0.12);
}

.summary-main {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
}

.count {
  display: inline-grid;
  place-items: center;
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--berry);
  font-size: 0.85rem;
}

.people,
.response-list span,
.response-list time,
.empty {
  margin: 0.35rem 0 0;
  color: rgba(255, 247, 236, 0.75);
  font-size: 0.92rem;
}

.response-list li {
  display: grid;
  gap: 0.2rem;
}

.response-row {
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem;
}

.response-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.delete-form {
  margin: 0;
}

.btn-icon-danger {
  appearance: none;
  border: 0;
  background: rgba(194, 59, 59, 0.18);
  color: #ffb4b4;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.btn-icon-danger:hover,
.btn-icon-danger:focus-visible {
  background: rgba(194, 59, 59, 0.35);
  color: #fff;
  transform: translateY(-1px);
}

.section-title {
  margin-top: 1.5rem;
}

.contributions-panel .section-title {
  margin-top: 0;
}

.footer {
  margin-top: 1.5rem;
  text-align: center;
  color: rgba(255, 247, 236, 0.55);
  font-size: 0.85rem;
}

.footer p {
  margin: 0.2rem 0;
}

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

.snow span {
  position: absolute;
  top: -1rem;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--snow);
  opacity: 0.7;
  animation: fall linear infinite;
}

.snow span:nth-child(1) { left: 8%; animation-duration: 11s; animation-delay: 0s; }
.snow span:nth-child(2) { left: 18%; width: 0.45rem; height: 0.45rem; animation-duration: 14s; animation-delay: -2s; }
.snow span:nth-child(3) { left: 28%; animation-duration: 10s; animation-delay: -4s; }
.snow span:nth-child(4) { left: 38%; animation-duration: 16s; animation-delay: -1s; }
.snow span:nth-child(5) { left: 48%; width: 0.5rem; height: 0.5rem; animation-duration: 12s; animation-delay: -6s; }
.snow span:nth-child(6) { left: 58%; animation-duration: 15s; animation-delay: -3s; }
.snow span:nth-child(7) { left: 68%; animation-duration: 9s; animation-delay: -5s; }
.snow span:nth-child(8) { left: 78%; width: 0.4rem; height: 0.4rem; animation-duration: 13s; animation-delay: -7s; }
.snow span:nth-child(9) { left: 88%; animation-duration: 17s; animation-delay: -2.5s; }
.snow span:nth-child(10) { left: 95%; animation-duration: 11.5s; animation-delay: -8s; }

@keyframes fall {
  0% { transform: translateY(-10vh) translateX(0); opacity: 0; }
  10% { opacity: 0.8; }
  100% { transform: translateY(110vh) translateX(2rem); opacity: 0.15; }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes soft-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

@keyframes twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(1.12) rotate(8deg); opacity: 0.85; }
}

@keyframes light-twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

@keyframes smoke-rise {
  0%, 100% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(-6px); opacity: 0.55; }
}

@media (max-width: 420px) {
  .copy-row {
    grid-template-columns: 1fr;
  }

  .admin-head {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
