:root {
  --paper: #fffaf0;
  --ink: #222222;
  --teal: #1aa8b8;
  --pink: #ec4d8f;
  --orange: #ff8b2b;
  --yellow: #ffd34d;
  --blue: #3b70ff;
  --green: #7bcf52;
  --cream: rgba(255, 250, 240, 0.82);
  --shadow: 0 20px 50px rgba(44, 34, 18, 0.16);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Fredoka", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(26, 168, 184, 0.22), transparent 24%),
    radial-gradient(circle at top right, rgba(236, 77, 143, 0.24), transparent 22%),
    radial-gradient(circle at bottom left, rgba(255, 139, 43, 0.23), transparent 20%),
    linear-gradient(180deg, #fcfdff 0%, #fff4e8 48%, #fff9f1 100%);
  overflow-x: hidden;
}

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

.sky-confetti span {
  position: absolute;
  top: -12%;
  width: 14px;
  height: 28px;
  border-radius: 999px;
  opacity: 0.85;
  animation: confetti-fall linear infinite;
}

.sky-confetti span:nth-child(1) { left: 4%; background: var(--pink); animation-duration: 9s; animation-delay: -1s; }
.sky-confetti span:nth-child(2) { left: 12%; background: var(--teal); animation-duration: 8s; animation-delay: -5s; }
.sky-confetti span:nth-child(3) { left: 19%; background: var(--orange); animation-duration: 11s; animation-delay: -2s; }
.sky-confetti span:nth-child(4) { left: 27%; background: var(--yellow); animation-duration: 10s; animation-delay: -6s; }
.sky-confetti span:nth-child(5) { left: 36%; background: var(--blue); animation-duration: 9.5s; animation-delay: -4s; }
.sky-confetti span:nth-child(6) { left: 47%; background: var(--green); animation-duration: 8.5s; animation-delay: -3s; }
.sky-confetti span:nth-child(7) { left: 58%; background: var(--pink); animation-duration: 12s; animation-delay: -8s; }
.sky-confetti span:nth-child(8) { left: 66%; background: var(--orange); animation-duration: 10.5s; animation-delay: -7s; }
.sky-confetti span:nth-child(9) { left: 75%; background: var(--yellow); animation-duration: 8.8s; animation-delay: -2.5s; }
.sky-confetti span:nth-child(10) { left: 84%; background: var(--teal); animation-duration: 11.2s; animation-delay: -5.5s; }
.sky-confetti span:nth-child(11) { left: 91%; background: var(--blue); animation-duration: 9.3s; animation-delay: -7.5s; }
.sky-confetti span:nth-child(12) { left: 96%; background: var(--pink); animation-duration: 12.5s; animation-delay: -3.5s; }

@keyframes confetti-fall {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  100% {
    transform: translate3d(-30px, 115vh, 0) rotate(280deg);
  }
}

.page-shell,
.admin-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 60px;
}

.page-shell {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: start;
}

.hero-card,
.rsvp-card,
.admin-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--cream);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.hero-card {
  padding: 36px;
  min-height: 780px;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.94), rgba(255, 245, 235, 0.88)),
    var(--cream);
}

.rsvp-card,
.admin-card {
  padding: 28px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--pink);
}

.hero-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.tag-pill {
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 211, 77, 0.85), rgba(255, 139, 43, 0.9));
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(255, 139, 43, 0.18);
}

.headline-wrap {
  max-width: 44rem;
}

.countdown-card {
  display: grid;
  gap: 14px;
  margin: 24px 0 18px;
  padding: 18px 20px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 248, 224, 0.96), rgba(255, 236, 242, 0.92));
  border: 2px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 14px 30px rgba(236, 77, 143, 0.1);
}

.countdown-card strong {
  display: block;
  margin-top: 4px;
  font-family: "Baloo 2", sans-serif;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.countdown-tile {
  padding: 16px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.count-number {
  display: block;
  font-family: "Baloo 2", sans-serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1;
}

.count-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  color: rgba(34, 34, 34, 0.65);
}

h1,
h2 {
  margin: 0;
  font-family: "Baloo 2", sans-serif;
  line-height: 0.95;
}

h1 {
  font-size: clamp(3.2rem, 7vw, 5.6rem);
}

h1 span {
  display: block;
}

h1 span:first-child {
  color: var(--ink);
}

h1 span:last-child {
  background: linear-gradient(90deg, var(--pink), var(--orange), var(--yellow), var(--teal), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-size: clamp(2.2rem, 4vw, 3rem);
}

.hero-copy,
.section-copy {
  font-size: 1.06rem;
  line-height: 1.6;
  max-width: 40rem;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0 24px;
}

.event-grid article,
.summary-tile,
.result-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  border: 2px solid rgba(0, 0, 0, 0.05);
}

.event-card p {
  margin: 8px 0 0;
  color: rgba(34, 34, 34, 0.72);
  line-height: 1.5;
}

.event-card.wide {
  grid-column: 1 / -1;
}

.label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(34, 34, 34, 0.7);
}

.celebration-strip {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
}

.celebration-strip span {
  height: 14px;
  flex: 1;
  border-radius: 999px;
}

.celebration-strip span:nth-child(1) { background: var(--pink); }
.celebration-strip span:nth-child(2) { background: var(--orange); }
.celebration-strip span:nth-child(3) { background: var(--yellow); }
.celebration-strip span:nth-child(4) { background: var(--green); }
.celebration-strip span:nth-child(5) { background: var(--teal); }
.celebration-strip span:nth-child(6) { background: var(--blue); }

.hero-artstage {
  display: grid;
  gap: 18px;
}

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 320px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 241, 225, 0.88));
  border: 3px dashed rgba(34, 34, 34, 0.15);
}

.ribbon {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid rgba(34, 34, 34, 0.1);
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(34, 34, 34, 0.08);
}

.cake-card {
  position: relative;
  width: 230px;
  height: 165px;
}

.cake-top,
.cake-body,
.cake-base {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid rgba(34, 34, 34, 0.85);
}

.cake-top {
  top: 18px;
  width: 170px;
  height: 34px;
  border-radius: 22px 22px 12px 12px;
  background: linear-gradient(90deg, var(--teal), var(--yellow), var(--pink));
}

.cake-body {
  top: 42px;
  width: 190px;
  height: 88px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 20% 30%, var(--pink) 0 12px, transparent 13px),
    radial-gradient(circle at 72% 24%, var(--orange) 0 12px, transparent 13px),
    radial-gradient(circle at 62% 66%, var(--teal) 0 11px, transparent 12px),
    linear-gradient(180deg, #fff6d0, #fffdf5);
}

.cake-base {
  top: 132px;
  width: 220px;
  height: 16px;
  border-radius: 999px;
  background: #f3f7ff;
}

.palette {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: flex;
  gap: 10px;
}

.palette span {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px solid rgba(34, 34, 34, 0.7);
}

.palette span:nth-child(1) { background: var(--pink); }
.palette span:nth-child(2) { background: var(--orange); }
.palette span:nth-child(3) { background: var(--yellow); }
.palette span:nth-child(4) { background: var(--teal); }
.palette span:nth-child(5) { background: var(--blue); }

.paint {
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.95;
}

.paint-a {
  width: 180px;
  height: 80px;
  top: -16px;
  right: -26px;
  background: radial-gradient(circle at 30% 40%, var(--yellow), var(--orange));
  transform: rotate(20deg);
}

.paint-b {
  width: 110px;
  height: 56px;
  left: -24px;
  bottom: 120px;
  background: radial-gradient(circle at 30% 40%, #7f64ff, var(--pink));
  transform: rotate(-18deg);
}

.paint-c {
  width: 160px;
  height: 64px;
  left: 50%;
  bottom: -22px;
  background: radial-gradient(circle at 30% 40%, var(--teal), #a4f4ff);
  transform: translateX(-50%) rotate(-8deg);
}

.paint-d {
  width: 140px;
  height: 58px;
  right: 24%;
  top: 160px;
  background: radial-gradient(circle at 30% 40%, var(--green), var(--yellow));
  transform: rotate(-24deg);
}

.balloon-cluster {
  position: absolute;
  display: flex;
  gap: 10px;
  z-index: 0;
}

.balloon-left {
  top: 80px;
  left: -6px;
}

.balloon-right {
  top: 96px;
  right: 10px;
}

.balloon {
  position: relative;
  width: 54px;
  height: 68px;
  border-radius: 50% 50% 45% 45%;
  animation: floaty 4.8s ease-in-out infinite;
  box-shadow: inset -12px -10px 0 rgba(255, 255, 255, 0.18);
}

.balloon::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 78px;
  left: 50%;
  top: 66px;
  background: rgba(34, 34, 34, 0.28);
}

.balloon::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  background: inherit;
}

.balloon.pink { background: linear-gradient(180deg, #ff79ac, #ec4d8f); }
.balloon.yellow { background: linear-gradient(180deg, #ffe577, #ffd34d); animation-delay: -1.4s; }
.balloon.blue { background: linear-gradient(180deg, #68a0ff, #3b70ff); animation-delay: -2.2s; }
.balloon.orange { background: linear-gradient(180deg, #ffb46f, #ff8b2b); }
.balloon.teal { background: linear-gradient(180deg, #67e7f0, #1aa8b8); animation-delay: -1.7s; }

@keyframes floaty {
  0%, 100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-12px) rotate(3deg);
  }
}

.party-pop {
  position: absolute;
  bottom: 28px;
  width: 84px;
  height: 84px;
}

.pop-left {
  left: 22px;
}

.pop-right {
  right: 22px;
}

.party-pop i {
  position: absolute;
  width: 10px;
  height: 34px;
  border-radius: 999px;
  transform-origin: bottom center;
  animation: popper 1.8s ease-in-out infinite;
}

.party-pop i:nth-child(1) { left: 30px; top: 6px; background: var(--pink); transform: rotate(-45deg); }
.party-pop i:nth-child(2) { left: 40px; top: 2px; background: var(--yellow); transform: rotate(-12deg); animation-delay: -0.4s; }
.party-pop i:nth-child(3) { left: 48px; top: 6px; background: var(--teal); transform: rotate(18deg); animation-delay: -0.8s; }
.party-pop i:nth-child(4) { left: 58px; top: 12px; background: var(--orange); transform: rotate(48deg); animation-delay: -1.2s; }

@keyframes popper {
  0%, 100% {
    transform: translateY(0) scaleY(0.85);
    opacity: 0.75;
  }
  50% {
    transform: translateY(-8px) scaleY(1.08);
    opacity: 1;
  }
}

.details-ribbon {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.details-ribbon div {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  border: 2px solid rgba(0, 0, 0, 0.05);
}

.party-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.party-features article {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(0, 0, 0, 0.05);
}

.party-friend {
  position: absolute;
  right: 18px;
  bottom: 24px;
  width: 170px;
  opacity: 0;
  transform: translateX(140px);
}

.party-friend.is-live {
  animation: friend-enter 0.95s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.party-friend.is-pop .friend-popper {
  animation: friend-pop 0.5s ease-out 1;
}

.party-friend.is-pop .friend-arm.right {
  animation: arm-pop 0.5s ease-out 1;
}

.friend-bubble {
  margin-left: 10px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border-radius: 18px 18px 18px 6px;
  background: rgba(255, 255, 255, 0.96);
  border: 2px solid rgba(34, 34, 34, 0.08);
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(34, 34, 34, 0.08);
}

.friend-body {
  position: relative;
  width: 100px;
  margin-left: auto;
  margin-right: 20px;
  height: 154px;
}

.friend-hat {
  position: absolute;
  top: 0;
  left: 28px;
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-bottom: 34px solid var(--pink);
}

.friend-hat::after {
  content: "";
  position: absolute;
  top: 28px;
  left: -4px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--yellow);
}

.friend-head {
  position: absolute;
  top: 24px;
  left: 18px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: #ffe2bf;
  border: 3px solid rgba(34, 34, 34, 0.8);
}

.friend-head .eye {
  position: absolute;
  top: 20px;
  width: 6px;
  height: 10px;
  border-radius: 999px;
  background: rgba(34, 34, 34, 0.9);
}

.friend-head .eye.left { left: 16px; }
.friend-head .eye.right { right: 16px; }

.friend-head .smile {
  position: absolute;
  left: 19px;
  bottom: 12px;
  width: 16px;
  height: 8px;
  border-bottom: 3px solid rgba(34, 34, 34, 0.9);
  border-radius: 0 0 16px 16px;
}

.friend-torso {
  position: absolute;
  top: 76px;
  left: 24px;
  width: 48px;
  height: 42px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--teal), var(--blue));
  border: 3px solid rgba(34, 34, 34, 0.8);
}

.friend-arm,
.friend-leg {
  position: absolute;
  background: rgba(34, 34, 34, 0.85);
  border-radius: 999px;
}

.friend-arm {
  top: 84px;
  width: 10px;
  height: 44px;
}

.friend-arm.left {
  left: 16px;
  transform: rotate(18deg);
}

.friend-arm.right {
  left: 70px;
  transform: rotate(-28deg);
  transform-origin: top center;
}

.friend-leg {
  top: 116px;
  width: 10px;
  height: 36px;
}

.friend-leg.left {
  left: 34px;
  transform: rotate(8deg);
}

.friend-leg.right {
  left: 54px;
  transform: rotate(-8deg);
}

.friend-popper {
  position: absolute;
  top: 74px;
  left: 84px;
  width: 54px;
  height: 54px;
}

.friend-popper i {
  position: absolute;
  width: 8px;
  height: 22px;
  border-radius: 999px;
  transform-origin: bottom center;
}

.friend-popper i:nth-child(1) { left: 10px; top: 4px; background: var(--pink); transform: rotate(-36deg); }
.friend-popper i:nth-child(2) { left: 18px; top: 0; background: var(--yellow); transform: rotate(-6deg); }
.friend-popper i:nth-child(3) { left: 28px; top: 3px; background: var(--teal); transform: rotate(18deg); }
.friend-popper i:nth-child(4) { left: 38px; top: 10px; background: var(--orange); transform: rotate(42deg); }

@keyframes friend-enter {
  0% {
    opacity: 0;
    transform: translateX(140px);
  }
  70% {
    opacity: 1;
    transform: translateX(-8px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes friend-pop {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.16);
  }
}

@keyframes arm-pop {
  0%, 100% {
    transform: rotate(-28deg);
  }
  50% {
    transform: rotate(-56deg);
  }
}

.rsvp-header {
  position: relative;
}

.rsvp-form,
.admin-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 2px solid rgba(34, 34, 34, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(26, 168, 184, 0.16);
}

.inline-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.attending-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
}

.attending-toggle input {
  width: 18px;
  height: 18px;
}

button {
  padding: 14px 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pink), var(--orange));
  color: white;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(236, 77, 143, 0.24);
}

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

.form-status {
  min-height: 1.4em;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.mini-note {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 228, 238, 0.9), rgba(235, 248, 255, 0.9));
  border: 2px dashed rgba(34, 34, 34, 0.12);
  line-height: 1.5;
}

.confetti-burst-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 3;
}

.burst-piece {
  position: absolute;
  width: 12px;
  height: 18px;
  border-radius: 999px;
  animation: burst-pop 1.4s ease-out forwards;
}

@keyframes burst-pop {
  0% {
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--x), var(--y), 0) scale(0.75) rotate(var(--r));
    opacity: 0;
  }
}

.admin-body {
  background:
    radial-gradient(circle at top left, rgba(236, 77, 143, 0.18), transparent 24%),
    radial-gradient(circle at bottom right, rgba(26, 168, 184, 0.18), transparent 24%),
    linear-gradient(180deg, #fffef9 0%, #f7fbff 100%);
}

.summary-grid,
.results {
  margin-top: 24px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.summary-tile strong {
  display: block;
  font-family: "Baloo 2", sans-serif;
  font-size: 2rem;
}

.results {
  display: grid;
  gap: 14px;
}

.result-card p {
  margin: 0 0 8px;
  line-height: 1.5;
}

.hidden {
  display: none;
}

@media (max-width: 900px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .hero-card {
    min-height: auto;
  }

  .balloon-left,
  .balloon-right {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    margin-bottom: 14px;
  }

  .hero-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .party-friend {
    position: relative;
    right: auto;
    bottom: auto;
    margin-left: auto;
    margin-top: 18px;
    transform: none;
    opacity: 1;
  }

  .party-friend.is-live {
    animation: none;
  }
}

@media (max-width: 640px) {
  .page-shell,
  .admin-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 16px;
  }

  .hero-card,
  .rsvp-card,
  .admin-card {
    padding: 22px;
    border-radius: 22px;
  }

  .inline-fields,
  .summary-grid,
  .event-grid,
  .details-ribbon,
  .countdown-grid,
  .party-features {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.9rem;
    line-height: 0.98;
  }

  .event-card.wide {
    grid-column: auto;
  }

  .palette,
  .party-pop {
    display: none;
  }
}
