:root {
  color-scheme: light;
  --ink: #22304a;
  --paper: #fff9ef;
  --sky: #8bd8ff;
  --blue: #1888d5;
  --deep-blue: #0f5f9a;
  --yellow: #ffd742;
  --coral: #ff7168;
  --pink: #ff9fbd;
  --green: #2fbf8f;
  --sea: #33b7c8;
  --shadow: rgba(30, 42, 68, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family:
    "Nunito", "Baloo 2", "PingFang SC", "Microsoft YaHei", system-ui,
    sans-serif;
  background:
    linear-gradient(180deg, #fff7d7 0%, #e6fbff 55%, #d7f6e8 100%);
}

button {
  font: inherit;
}

.party {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 28px;
}

.party::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 14% 18%, rgba(255, 216, 76, 0.34) 0 3px, transparent 4px),
    radial-gradient(circle at 78% 10%, rgba(255, 113, 104, 0.25) 0 4px, transparent 5px),
    radial-gradient(circle at 88% 72%, rgba(47, 191, 143, 0.25) 0 5px, transparent 6px),
    radial-gradient(circle at 22% 82%, rgba(24, 136, 213, 0.18) 0 4px, transparent 5px);
  background-size: 120px 120px, 180px 180px, 150px 150px, 210px 210px;
}

.intro,
.stage-wrap {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
}

.date-badge,
.wish-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 4px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

.title-block h1 {
  max-width: 740px;
  margin: 14px 0 10px;
  font-size: 3.35rem;
  line-height: 1.06;
  letter-spacing: 0;
}

.title-block p {
  max-width: 680px;
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.75;
}

.wish-card {
  display: grid;
  gap: 10px;
  align-content: center;
  min-height: 142px;
  padding: 20px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 8px 8px 0 rgba(34, 48, 74, 0.15);
}

.wish-card strong {
  font-size: 1.1rem;
  line-height: 1.55;
}

.stage-wrap {
  min-height: 620px;
  border: 4px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 12px 14px 0 rgba(34, 48, 74, 0.16);
}

.stage-sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, var(--sky) 0 56%, #fef6c8 56% 70%, #82d991 70% 100%);
  transition: background 400ms ease;
}

.stage-sky::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 78px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.38) 0 24px, transparent 24px 46px),
    #62cb79;
  opacity: 0.85;
}

.sea {
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: 78px;
  height: 132px;
  background:
    radial-gradient(ellipse at 18% 20%, rgba(255, 255, 255, 0.45) 0 16px, transparent 17px),
    radial-gradient(ellipse at 50% 34%, rgba(255, 255, 255, 0.34) 0 22px, transparent 23px),
    radial-gradient(ellipse at 82% 18%, rgba(255, 255, 255, 0.38) 0 18px, transparent 19px),
    var(--sea);
  border-top: 4px solid var(--ink);
  transform: skewY(-1deg);
  transition:
    background 400ms ease,
    height 400ms ease;
}

.sun {
  position: absolute;
  top: 38px;
  right: 64px;
  width: 86px;
  height: 86px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 10px rgba(255, 215, 66, 0.26);
}

.cloud {
  position: absolute;
  width: 132px;
  height: 44px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #fff;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  bottom: 16px;
  border: 3px solid var(--ink);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  background: #fff;
}

.cloud::before {
  left: 18px;
  width: 44px;
  height: 34px;
}

.cloud::after {
  right: 22px;
  width: 54px;
  height: 44px;
}

.cloud-one {
  top: 72px;
  left: 8%;
  animation: drift 12s ease-in-out infinite alternate;
}

.cloud-two {
  top: 142px;
  right: 18%;
  transform: scale(0.76);
  animation: drift 14s ease-in-out infinite alternate-reverse;
}

.rainbow {
  position: absolute;
  left: 8%;
  top: 212px;
  width: 280px;
  height: 140px;
  border-top: 16px solid var(--coral);
  border-right: 16px solid transparent;
  border-left: 16px solid transparent;
  border-radius: 280px 280px 0 0;
  box-shadow:
    inset 0 14px 0 #ffd742,
    inset 0 28px 0 #2fbf8f,
    inset 0 42px 0 #1888d5;
  opacity: 0.72;
}

.effects {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
}

.portal {
  position: absolute;
  left: 50%;
  top: 128px;
  z-index: 2;
  width: 150px;
  height: 214px;
  border: 6px solid var(--ink);
  border-radius: 82px 82px 10px 10px;
  background: #ff7ab3;
  box-shadow: 10px 10px 0 rgba(34, 48, 74, 0.17);
  transform: translateX(-50%);
  transition:
    transform 280ms ease,
    background 280ms ease;
}

.portal::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 4px solid var(--ink);
  border-radius: 60px 60px 6px 6px;
  background: #fff4ce;
}

.portal span {
  position: absolute;
  right: 26px;
  top: 102px;
  width: 14px;
  height: 14px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
}

.stage-characters {
  position: absolute;
  left: 50%;
  bottom: 148px;
  z-index: 4;
  display: grid;
  grid-template-columns: 180px 150px 180px;
  align-items: end;
  gap: 22px;
  transform: translateX(-50%);
}

.character {
  position: relative;
  display: grid;
  justify-items: center;
  filter: drop-shadow(8px 10px 0 rgba(34, 48, 74, 0.15));
}

.doraemon {
  width: 180px;
  height: 262px;
}

.dora-head {
  position: relative;
  width: 154px;
  height: 138px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: var(--blue);
}

.dora-face {
  position: absolute;
  left: 17px;
  bottom: 8px;
  width: 112px;
  height: 92px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #fff;
}

.dora-eye {
  position: absolute;
  top: 20px;
  z-index: 2;
  width: 34px;
  height: 44px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #fff;
}

.dora-eye::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 18px;
  width: 7px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
}

.dora-eye.eye-left {
  left: 43px;
}

.dora-eye.eye-right {
  right: 43px;
}

.dora-nose {
  position: absolute;
  left: 67px;
  top: 58px;
  z-index: 3;
  width: 20px;
  height: 20px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #e83232;
}

.dora-mouth {
  position: absolute;
  left: 75px;
  top: 78px;
  z-index: 3;
  width: 3px;
  height: 38px;
  background: var(--ink);
}

.dora-mouth::after {
  content: "";
  position: absolute;
  left: -24px;
  top: 20px;
  width: 48px;
  height: 26px;
  border-bottom: 3px solid var(--ink);
  border-radius: 0 0 50px 50px;
}

.whisker {
  position: absolute;
  z-index: 3;
  width: 42px;
  height: 3px;
  background: var(--ink);
}

.whisker-one {
  left: 20px;
  top: 76px;
  transform: rotate(9deg);
}

.whisker-two {
  left: 18px;
  top: 94px;
}

.whisker-three {
  right: 20px;
  top: 76px;
  transform: rotate(-9deg);
}

.whisker-four {
  right: 18px;
  top: 94px;
}

.dora-body {
  position: absolute;
  left: 29px;
  bottom: 0;
  width: 122px;
  height: 136px;
  border: 4px solid var(--ink);
  border-radius: 42px 42px 36px 36px;
  background: var(--blue);
}

.dora-body::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 20px;
  width: 86px;
  height: 84px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #fff;
}

.bell {
  position: absolute;
  left: 45px;
  top: 7px;
  z-index: 3;
  width: 30px;
  height: 30px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
}

.bell::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 8px;
  height: 3px;
  background: var(--ink);
}

.pocket {
  position: absolute;
  left: 33px;
  top: 61px;
  z-index: 3;
  width: 58px;
  height: 30px;
  border: 3px solid var(--ink);
  border-radius: 0 0 40px 40px;
  background: #fff;
}

.girl {
  width: 150px;
  height: 236px;
}

.name-tag {
  position: absolute;
  top: -38px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  min-height: 30px;
  padding: 3px 10px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  box-shadow: 4px 4px 0 rgba(34, 48, 74, 0.18);
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
}

.name-tag::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 14px;
  height: 14px;
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
}

.crown {
  position: absolute;
  top: 0;
  z-index: 3;
  display: flex;
  gap: 5px;
}

.crown span {
  width: 18px;
  height: 26px;
  border: 3px solid var(--ink);
  background: var(--yellow);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.crown span:nth-child(2) {
  height: 34px;
}

.girl-hair {
  position: absolute;
  top: 30px;
  width: 92px;
  height: 82px;
  border: 4px solid var(--ink);
  border-radius: 44px 44px 26px 26px;
  background: #57321f;
}

.girl-face {
  position: absolute;
  top: 47px;
  width: 72px;
  height: 72px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #ffd1a8;
}

.girl-eye {
  position: absolute;
  top: 28px;
  width: 8px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
}

.girl-eye.left {
  left: 22px;
}

.girl-eye.right {
  right: 22px;
}

.girl-smile {
  position: absolute;
  left: 26px;
  top: 42px;
  width: 20px;
  height: 10px;
  border-bottom: 3px solid var(--ink);
  border-radius: 0 0 20px 20px;
}

.girl-dress {
  position: absolute;
  top: 114px;
  width: 102px;
  height: 98px;
  border: 4px solid var(--ink);
  border-radius: 28px 28px 8px 8px;
  background: var(--pink);
  clip-path: polygon(16% 0, 84% 0, 100% 100%, 0 100%);
}

.dress-star {
  position: absolute;
  left: 41px;
  top: 35px;
  width: 20px;
  height: 20px;
  background: var(--yellow);
  clip-path: polygon(50% 0, 62% 35%, 100% 35%, 69% 56%, 80% 100%, 50% 72%, 20% 100%, 31% 56%, 0 35%, 38% 35%);
}

.girl-shoes {
  position: absolute;
  bottom: 0;
  width: 94px;
  height: 20px;
}

.girl-shoes::before,
.girl-shoes::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 38px;
  height: 18px;
  border: 3px solid var(--ink);
  border-radius: 20px 20px 8px 8px;
  background: var(--coral);
}

.girl-shoes::before {
  left: 8px;
}

.girl-shoes::after {
  right: 8px;
}

.sponge {
  width: 180px;
  height: 236px;
}

.sponge-body {
  position: absolute;
  bottom: 0;
  width: 132px;
  height: 188px;
  border: 4px solid var(--ink);
  border-radius: 8px;
  background: var(--yellow);
  transform: rotate(2deg);
}

.sponge-body::before {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: 44px;
  height: 36px;
  border-top: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
  background:
    repeating-linear-gradient(90deg, transparent 0 16px, rgba(34, 48, 74, 0.2) 16px 20px),
    #fff;
}

.pants {
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: -4px;
  height: 48px;
  border-top: 4px solid var(--ink);
  border-radius: 0 0 6px 6px;
  background: #8b5a32;
}

.sponge-eye {
  position: absolute;
  top: 42px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #fff;
}

.sponge-eye::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 9px;
  width: 10px;
  height: 12px;
  border-radius: 50%;
  background: #16a8d8;
  box-shadow: inset 0 0 0 3px var(--ink);
}

.sponge-eye.eye-left {
  left: 30px;
}

.sponge-eye.eye-right {
  right: 28px;
}

.sponge-smile {
  position: absolute;
  left: 42px;
  top: 88px;
  z-index: 2;
  width: 52px;
  height: 28px;
  border-bottom: 4px solid var(--ink);
  border-radius: 0 0 56px 56px;
}

.tie {
  position: absolute;
  left: 57px;
  bottom: 45px;
  z-index: 2;
  width: 18px;
  height: 34px;
  background: #e83232;
  clip-path: polygon(50% 0, 100% 44%, 66% 100%, 34% 100%, 0 44%);
}

.hole {
  position: absolute;
  border: 3px solid rgba(34, 48, 74, 0.4);
  border-radius: 50%;
  background: rgba(224, 180, 45, 0.5);
}

.hole-one {
  left: 16px;
  top: 20px;
  width: 20px;
  height: 16px;
}

.hole-two {
  right: 16px;
  top: 18px;
  width: 16px;
  height: 22px;
}

.hole-three {
  left: 18px;
  top: 122px;
  width: 17px;
  height: 14px;
}

.hole-four {
  right: 18px;
  top: 128px;
  width: 24px;
  height: 18px;
}

.party-table {
  position: absolute;
  left: 50%;
  bottom: 62px;
  z-index: 5;
  width: 420px;
  height: 116px;
  border: 4px solid var(--ink);
  border-radius: 8px 8px 20px 20px;
  background: #ffb35d;
  transform: translateX(-50%);
  box-shadow: 9px 12px 0 rgba(34, 48, 74, 0.18);
}

.party-table::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 3px dashed rgba(34, 48, 74, 0.36);
  border-radius: 6px;
}

.cake {
  position: absolute;
  left: 58px;
  top: -66px;
  width: 110px;
  height: 86px;
}

.cake-top,
.cake-base {
  position: absolute;
  left: 0;
  right: 0;
  border: 4px solid var(--ink);
  border-radius: 8px;
}

.cake-top {
  top: 18px;
  height: 34px;
  background: #fff;
}

.cake-base {
  bottom: 0;
  height: 46px;
  background: #ff8aa8;
}

.candle {
  position: absolute;
  left: 48px;
  top: 0;
  z-index: 2;
  width: 14px;
  height: 28px;
  border: 3px solid var(--ink);
  background: #8ee1ff;
}

.candle::before {
  content: "";
  position: absolute;
  left: 2px;
  top: -17px;
  width: 8px;
  height: 14px;
  border: 2px solid var(--ink);
  border-radius: 50% 50% 50% 0;
  background: var(--coral);
  transform: rotate(45deg);
}

.gift-box {
  position: absolute;
  right: 78px;
  top: -54px;
  width: 86px;
  height: 72px;
  border: 4px solid var(--ink);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 0 34px, #fff 34px 48px, transparent 48px),
    var(--green);
  transition:
    transform 220ms ease,
    background 220ms ease;
}

.gift-box::before {
  content: "";
  position: absolute;
  left: -8px;
  right: -8px;
  top: -18px;
  height: 22px;
  border: 4px solid var(--ink);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 0 40px, #fff 40px 55px, transparent 55px),
    var(--coral);
}

.gift-box span {
  position: absolute;
  left: 29px;
  top: -42px;
  width: 28px;
  height: 28px;
  border: 4px solid var(--ink);
  border-radius: 50% 50% 0 50%;
  background: #fff;
  transform: rotate(-45deg);
}

.controls {
  position: absolute;
  top: 22px;
  left: 24px;
  right: 24px;
  z-index: 7;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.magic-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 9px 14px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  font-weight: 850;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.magic-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
  background: #fff7c9;
}

.magic-btn:focus-visible {
  outline: 4px solid #fff;
  outline-offset: 3px;
}

.magic-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.btn-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
}

.icon-door {
  border: 3px solid var(--ink);
  border-radius: 12px 12px 4px 4px;
  background: #ff80b5;
}

.icon-door::after {
  content: "";
  position: absolute;
  right: 3px;
  top: 10px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink);
}

.icon-pocket {
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--blue);
}

.icon-pocket::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 10px;
  height: 7px;
  border: 3px solid #fff;
  border-top: 0;
  border-radius: 0 0 12px 12px;
}

.icon-bubble {
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: rgba(141, 225, 255, 0.55);
}

.icon-bubble::after {
  content: "";
  position: absolute;
  right: -5px;
  top: -4px;
  width: 10px;
  height: 10px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
}

.icon-star {
  background: var(--yellow);
  clip-path: polygon(50% 0, 62% 35%, 100% 35%, 69% 56%, 80% 100%, 50% 72%, 20% 100%, 31% 56%, 0 35%, 38% 35%);
}

.icon-camera {
  border: 3px solid var(--ink);
  border-radius: 5px;
  background: #fff;
}

.icon-camera::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 7px;
  width: 7px;
  height: 7px;
  border: 3px solid var(--ink);
  border-radius: 50%;
}

.icon-music {
  border-left: 4px solid var(--ink);
  border-top: 4px solid var(--ink);
  border-radius: 2px 0 0 2px;
}

.icon-music::before,
.icon-music::after {
  content: "";
  position: absolute;
  bottom: -2px;
  width: 11px;
  height: 11px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--pink);
}

.icon-music::before {
  left: -7px;
}

.icon-music::after {
  right: -2px;
}

.icon-music {
  background:
    linear-gradient(var(--ink), var(--ink)) 12px 2px / 14px 4px no-repeat;
}

.music-btn.is-playing {
  background: #fff2a6;
}

.surprise-text {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 7;
  width: min(620px, calc(100% - 40px));
  min-height: 42px;
  margin: 0;
  padding: 8px 14px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 5px 5px 0 rgba(34, 48, 74, 0.16);
  text-align: center;
  font-weight: 850;
  line-height: 1.35;
  transform: translateX(-50%);
}

.bubble,
.spark,
.confetti {
  position: absolute;
  left: var(--x);
  bottom: var(--start);
  display: block;
  pointer-events: none;
}

.bubble {
  width: var(--size);
  height: var(--size);
  border: 3px solid rgba(34, 48, 74, 0.72);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.48);
  animation: floatUp var(--duration) ease-out forwards;
}

.spark {
  width: var(--size);
  height: var(--size);
  background: var(--color);
  clip-path: polygon(50% 0, 62% 35%, 100% 35%, 69% 56%, 80% 100%, 50% 72%, 20% 100%, 31% 56%, 0 35%, 38% 35%);
  animation: sparkle var(--duration) ease-out forwards;
}

.confetti {
  width: 10px;
  height: 18px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: var(--color);
  animation: confettiFall var(--duration) ease-in forwards;
}

.party[data-scene="ocean"] .stage-sky {
  background:
    linear-gradient(180deg, #77d9ff 0 44%, #35bfd1 44% 71%, #ffe36b 71% 100%);
}

.party[data-scene="ocean"] .sea {
  height: 188px;
  background:
    radial-gradient(ellipse at 12% 24%, rgba(255, 255, 255, 0.56) 0 18px, transparent 19px),
    radial-gradient(ellipse at 48% 22%, rgba(255, 255, 255, 0.42) 0 24px, transparent 25px),
    radial-gradient(ellipse at 76% 30%, rgba(255, 255, 255, 0.44) 0 20px, transparent 21px),
    #22a9c1;
}

.party[data-scene="night"] .stage-sky {
  background:
    linear-gradient(180deg, #1f4374 0 56%, #315d85 56% 70%, #4fa86b 70% 100%);
}

.party[data-scene="night"] .title-block,
.party[data-scene="night"] .wish-card {
  color: #17233a;
}

.party[data-scene="night"] .sun {
  background: #f8f4d0;
  box-shadow: -14px 0 0 #1f4374 inset;
}

.party[data-scene="night"] .cloud {
  opacity: 0.55;
}

.party[data-scene="night"] .rainbow {
  opacity: 0.26;
}

.party[data-scene="candy"] .stage-sky {
  background:
    linear-gradient(180deg, #ffd4e5 0 48%, #fff4a8 48% 70%, #8bd991 70% 100%);
}

.party[data-scene="candy"] .sea {
  background:
    radial-gradient(ellipse at 20% 24%, rgba(255, 255, 255, 0.5) 0 18px, transparent 19px),
    radial-gradient(ellipse at 70% 32%, rgba(255, 255, 255, 0.45) 0 20px, transparent 21px),
    #ff9fbd;
}

.party.portal-open .portal {
  transform: translateX(-50%) scale(1.06) rotate(-1deg);
  background: #8ee1ff;
}

.party.portal-open .portal::before {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.68) 0 10px, rgba(255, 215, 66, 0.7) 10px 20px),
    #fff;
}

.party.gift-pop .gift-box {
  transform: translateY(-12px) rotate(-4deg);
  background:
    linear-gradient(90deg, transparent 0 34px, #fff 34px 48px, transparent 48px),
    var(--yellow);
}

.party.snapshot .stage-wrap {
  filter: saturate(1.12) contrast(1.04);
}

.party.snapshot .stage-wrap::after {
  content: "";
  position: absolute;
  inset: 18px;
  z-index: 8;
  pointer-events: none;
  border: 8px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  box-shadow: inset 0 0 0 3px rgba(34, 48, 74, 0.32);
  animation: flash 460ms ease-out;
}

@keyframes drift {
  from {
    translate: 0 0;
  }
  to {
    translate: 30px 8px;
  }
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.7);
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-360px) translateX(var(--sway)) scale(1.2);
  }
}

@keyframes sparkle {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0deg) scale(0.6);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-260px) rotate(190deg) scale(1.05);
  }
}

@keyframes confettiFall {
  0% {
    opacity: 0;
    transform: translateY(-420px) rotate(0deg);
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(90px) rotate(250deg);
  }
}

@keyframes flash {
  0%,
  100% {
    opacity: 0;
  }
  35% {
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .party {
    padding: 18px;
  }

  .intro {
    grid-template-columns: 1fr;
  }

  .title-block h1 {
    font-size: 2.45rem;
  }

  .stage-wrap {
    min-height: 760px;
  }

  .stage-characters {
    bottom: 188px;
    grid-template-columns: 135px 118px 135px;
    gap: 8px;
    transform: translateX(-50%) scale(0.86);
    transform-origin: bottom center;
  }

  .controls {
    gap: 9px;
  }

  .party-table {
    bottom: 86px;
    width: min(360px, calc(100% - 34px));
  }
}

@media (max-width: 620px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  body {
    min-height: 100dvh;
  }

  .party {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 6px;
    height: 100dvh;
    min-height: 0;
    padding: 8px;
  }

  .party::before {
    background-size: 86px 86px, 120px 120px, 104px 104px, 132px 132px;
  }

  .intro,
  .stage-wrap {
    width: 100%;
    margin: 0 auto;
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: stretch;
  }

  .date-badge,
  .wish-kicker {
    min-height: 22px;
    padding: 2px 8px;
    border-width: 2px;
    box-shadow: 2px 2px 0 var(--ink);
    font-size: 0.68rem;
  }

  .title-block h1 {
    margin: 4px 0 3px;
    font-size: clamp(1.28rem, 5.8vw, 1.62rem);
    line-height: 1.05;
  }

  .title-block p {
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .wish-card strong {
    font-size: 0.76rem;
    line-height: 1.28;
  }

  .wish-card {
    gap: 4px;
    min-height: 0;
    padding: 7px 9px;
    border-width: 2px;
    box-shadow: 3px 3px 0 rgba(34, 48, 74, 0.15);
  }

  .stage-wrap {
    height: 100%;
    min-height: 0;
    border-width: 3px;
    box-shadow: 5px 6px 0 rgba(34, 48, 74, 0.16);
  }

  .stage-sky::before {
    height: 44px;
  }

  .sea {
    bottom: 44px;
    height: 104px;
  }

  .portal {
    top: 104px;
    width: 106px;
    height: 150px;
    border-width: 4px;
  }

  .portal::before {
    inset: 13px;
    border-width: 3px;
  }

  .portal span {
    right: 20px;
    top: 70px;
    width: 11px;
    height: 11px;
    border-width: 2px;
  }

  .rainbow {
    left: -16px;
    top: 164px;
    transform: scale(0.58);
    transform-origin: left top;
  }

  .sun {
    top: 92px;
    right: 18px;
    width: 48px;
    height: 48px;
    border-width: 3px;
    box-shadow: 0 0 0 6px rgba(255, 215, 66, 0.24);
  }

  .cloud {
    transform: scale(0.62);
    transform-origin: center;
  }

  .cloud-one {
    top: 92px;
    left: -10px;
  }

  .cloud-two {
    top: 164px;
    right: -6px;
  }

  .stage-characters {
    bottom: 78px;
    gap: 0;
    transform: translateX(-50%) scale(0.54);
    transform-origin: bottom center;
  }

  .controls {
    top: 8px;
    left: 8px;
    right: 8px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .magic-btn {
    gap: 4px;
    min-height: 32px;
    padding: 4px 5px;
    border-width: 2px;
    box-shadow: 2px 2px 0 var(--ink);
    font-size: 0.72rem;
    line-height: 1.05;
  }

  .btn-icon {
    width: 16px;
    height: 16px;
  }

  .icon-pocket::after {
    left: 2px;
    top: 6px;
    width: 7px;
    height: 5px;
    border-width: 2px;
  }

  .icon-bubble::after {
    right: -4px;
    top: -4px;
    width: 8px;
    height: 8px;
    border-width: 2px;
  }

  .icon-camera::before {
    left: 4px;
    top: 4px;
    width: 5px;
    height: 5px;
    border-width: 2px;
  }

  .icon-music::before,
  .icon-music::after {
    width: 8px;
    height: 8px;
    border-width: 2px;
  }

  .icon-music::before {
    left: -5px;
  }

  .icon-music::after {
    right: 0;
  }

  .party-table {
    bottom: 38px;
    width: min(310px, calc(100% - 24px));
    height: 76px;
    border-width: 3px;
    border-radius: 7px 7px 14px 14px;
    box-shadow: 5px 6px 0 rgba(34, 48, 74, 0.17);
  }

  .party-table::before {
    inset: 8px;
    border-width: 2px;
  }

  .cake {
    left: 18px;
    top: -56px;
    transform: scale(0.66);
    transform-origin: bottom left;
  }

  .gift-box {
    right: 24px;
    top: -49px;
    transform: scale(0.7);
    transform-origin: bottom right;
  }

  .surprise-text {
    bottom: 5px;
    min-height: 28px;
    padding: 5px 8px;
    border-width: 2px;
    font-size: 0.74rem;
    line-height: 1.2;
    box-shadow: 3px 3px 0 rgba(34, 48, 74, 0.16);
  }
}

@media (max-width: 620px) and (max-height: 720px) {
  .party {
    gap: 4px;
    padding: 6px;
  }

  .title-block p {
    display: none;
  }

  .wish-card {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    padding: 5px 7px;
  }

  .stage-characters {
    bottom: 66px;
    transform: translateX(-50%) scale(0.48);
  }

  .portal {
    top: 88px;
    transform: translateX(-50%) scale(0.88);
  }

  .rainbow {
    top: 134px;
    transform: scale(0.5);
  }

  .party-table {
    bottom: 32px;
    height: 68px;
  }

  .surprise-text {
    min-height: 24px;
    font-size: 0.68rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
