:root {
  color-scheme: dark;
  --paper: #fff4f8;
  --soft: rgba(255, 244, 248, 0.82);
  --pink: #ff6a98;
  --peach: #ff9f7d;
  --blue-a: #041433;
  --blue-b: #132a56;
  --blue-c: #3f6ca8;
  --wine: #3b1326;
  --card: rgba(255, 255, 255, 0.18);
  --line: rgba(255, 255, 255, 0.32);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --font-cn: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #080d18;
  color: #fff;
  font-family: var(--font-cn);
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.26;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.024) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.08) 0 1px, transparent 1px 4px);
  mix-blend-mode: soft-light;
}

button,
input {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

#app,
.page {
  width: 100%;
  height: 100%;
  height: 100dvh;
}

@supports (-webkit-touch-callout: none) {
  html,
  body {
    min-height: -webkit-fill-available;
  }

  #app,
  .page {
    min-height: 100vh;
    min-height: -webkit-fill-available;
  }
}

.page {
  position: absolute;
  inset: 0;
  display: none;
  opacity: 0;
  overflow: hidden;
  transition: opacity 560ms ease;
}

.page.active,
.page.page-leaving {
  display: flex;
}

.page.active {
  z-index: 2;
  opacity: 1;
}

.page.page-entering,
.page.page-leaving {
  opacity: 0;
}

.page.page-leaving {
  z-index: 1;
  pointer-events: none;
}

.center-wrap {
  width: min(92vw, 520px);
  margin: auto;
  padding: 24px 20px 22px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 22px;
  background: var(--card);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

.page-login {
  position: relative;
  overflow: hidden;
  color: #5b2832;
  background:
    repeating-linear-gradient(7deg, rgba(255, 255, 255, 0.12) 0 2px, transparent 2px 14px),
    linear-gradient(135deg, #f9cf65 0%, #ff9eae 48%, #91d9e5 100%);
}

.page-login::before,
.page-login::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: 0.35;
  border: 5px solid rgba(255, 255, 255, 0.72);
  border-radius: 47% 53% 51% 49%;
  transform: rotate(-10deg);
}

.page-login::before {
  width: 180px;
  height: 84px;
  left: -30px;
  top: 12%;
}

.page-login::after {
  width: 240px;
  height: 112px;
  right: -74px;
  bottom: 13%;
  transform: rotate(14deg);
}

.page-login .center-wrap {
  position: relative;
  z-index: 1;
  border: 4px solid rgba(81, 34, 35, 0.84);
  border-radius: 28px 24px 32px 20px;
  background: rgba(255, 249, 226, 0.86);
  box-shadow: 0 24px 0 rgba(87, 40, 40, 0.12), 0 24px 70px rgba(81, 28, 38, 0.24);
  transform: rotate(-1deg);
}

.page-login .title {
  color: #7a2737;
  font-family: "Arial Rounded MT Bold", var(--font-cn);
  font-size: clamp(22px, 5vw, 31px);
}

.page-login .subtitle,
.page-login .music-note {
  color: #75484a;
}

.page-login .password {
  border: 3px solid #5d3035;
  border-radius: 16px;
  background: #fffdf4;
}

.page-login .btn {
  color: #fffdf0;
  border: 3px solid #5d3035;
  background: #e94846;
  box-shadow: 0 6px 0 #a92f3b, 0 12px 24px rgba(169, 47, 59, 0.23);
}

.page-login .error {
  color: #a92f3b;
}

.gift-avatar {
  display: block;
  width: 172px;
  height: 172px;
  margin: 0 auto 18px;
  border: 4px solid rgba(255, 253, 244, 0.94);
  border-radius: 28px;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 14px 30px rgba(93, 48, 53, 0.24);
}

.gift-avatar--ending {
  width: min(56vw, 290px);
  height: min(56vw, 290px);
  margin-top: 24px;
  margin-bottom: 8px;
  border-color: rgba(255, 255, 255, 0.72);
  border-radius: 8px;
}

.shin-avatar {
  position: relative;
  width: 170px;
  height: 186px;
  margin: 0 auto 15px;
  filter: drop-shadow(0 12px 8px rgba(82, 35, 35, 0.22));
}

.shin-avatar__shirt {
  position: absolute;
  z-index: 1;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 76px;
  display: grid;
  place-items: center;
  padding-top: 20px;
  border: 5px solid #241b1a;
  border-radius: 42% 42% 15% 15%;
  color: #fff7ce;
  background: #e8463f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  transform: rotate(1deg);
}

.shin-avatar__face {
  position: absolute;
  z-index: 3;
  left: 25px;
  top: 37px;
  width: 120px;
  height: 116px;
  border: 5px solid #241b1a;
  border-radius: 48% 48% 52% 52%;
  background: #ffd6aa;
  transform: rotate(-2deg);
}

.shin-avatar__hair {
  position: absolute;
  z-index: 4;
  left: 19px;
  top: 22px;
  width: 133px;
  height: 51px;
  border: 5px solid #241b1a;
  border-bottom: 0;
  border-radius: 58% 43% 26% 30%;
  background:
    linear-gradient(125deg, transparent 0 23%, #292220 24% 37%, transparent 38% 48%, #292220 49% 63%, transparent 64% 100%),
    #292220;
  transform: rotate(-2deg);
}

.shin-avatar__brow,
.shin-avatar__eye,
.shin-avatar__nose,
.shin-avatar__mouth,
.shin-avatar__cheek {
  position: absolute;
  display: block;
}

.shin-avatar__brow {
  z-index: 2;
  top: 27px;
  width: 31px;
  height: 9px;
  border-radius: 90% 30% 80% 35%;
  background: #241b1a;
}

.shin-avatar__brow--left {
  left: 19px;
  transform: rotate(-13deg);
}

.shin-avatar__brow--right {
  right: 19px;
  transform: rotate(13deg);
}

.shin-avatar__eye {
  z-index: 2;
  top: 41px;
  width: 25px;
  height: 29px;
  border: 4px solid #241b1a;
  border-radius: 50%;
  background: radial-gradient(circle at 45% 32%, #fff 0 15%, #241b1a 17% 58%, #f7f1cf 60% 100%);
}

.shin-avatar__eye--left {
  left: 24px;
}

.shin-avatar__eye--right {
  right: 24px;
}

.shin-avatar__nose {
  z-index: 2;
  left: 54px;
  top: 70px;
  width: 11px;
  height: 8px;
  border-radius: 50%;
  background: #d88d70;
}

.shin-avatar__mouth {
  z-index: 2;
  left: 43px;
  top: 85px;
  width: 34px;
  height: 17px;
  border: 4px solid #241b1a;
  border-top: 0;
  border-radius: 0 0 60% 60%;
  background: #f18c85;
}

.shin-avatar__cheek {
  z-index: 2;
  top: 77px;
  width: 15px;
  height: 7px;
  border-radius: 50%;
  background: rgba(242, 116, 116, 0.55);
}

.shin-avatar__cheek--left {
  left: 8px;
}

.shin-avatar__cheek--right {
  right: 8px;
}

.shin-avatar--ending {
  transform: scale(1.18);
  transform-origin: center bottom;
  margin-top: 12px;
  margin-bottom: 28px;
}

.title {
  margin: 0 0 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  line-height: 1.25;
}

.subtitle,
.music-note,
.hint {
  margin: 7px 0;
  color: var(--soft);
  line-height: 1.7;
  font-size: 14px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #ffe0a6;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.btn,
.ghost-btn,
.round-nav,
.lightbox-close {
  border: 0;
  transition:
    transform 180ms ease,
    filter 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.btn {
  margin-top: 16px;
  border-radius: 999px;
  padding: 10px 24px;
  color: #fff;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(120deg, var(--pink), var(--peach));
  box-shadow: 0 10px 24px rgba(255, 92, 146, 0.33);
}

.ghost-btn {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 0 18px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.btn:hover,
.ghost-btn:hover,
.round-nav:hover,
.lightbox-close:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn:disabled,
.ghost-btn:disabled {
  cursor: default;
  filter: saturate(0.6);
}

.delayed-btn {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.delayed-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.page-login {
  isolation: isolate;
}

.hero-img {
  width: 138px;
  height: 138px;
  margin: 4px 0 14px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 22px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.26);
}

.password {
  display: block;
  width: min(280px, 90%);
  margin: 8px auto 0;
  border: 0;
  border-radius: 12px;
  padding: 11px 14px;
  color: #47333c;
  text-align: center;
  outline: 0;
  font-size: 16px;
}

.error {
  min-height: 24px;
  margin-top: 8px;
  color: #ffe3ec;
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.page-meteor,
.page-final-fireworks {
  align-items: stretch;
  justify-content: stretch;
  background: linear-gradient(180deg, var(--blue-a) 0%, var(--blue-b) 55%, var(--blue-c) 100%);
}

.meteor-video,
.fireworks-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  background: linear-gradient(180deg, var(--blue-a) 0%, var(--blue-b) 55%, var(--blue-c) 100%);
}

.meteor-retouch {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: 15%;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 30%, rgba(255, 255, 255, 0.22) 0 1px, transparent 2px),
    radial-gradient(circle at 26% 62%, rgba(255, 255, 255, 0.16) 0 1px, transparent 2px),
    radial-gradient(circle at 48% 22%, rgba(255, 255, 255, 0.14) 0 1px, transparent 2px),
    radial-gradient(circle at 67% 58%, rgba(255, 255, 255, 0.12) 0 1px, transparent 2px),
    radial-gradient(circle at 86% 34%, rgba(255, 255, 255, 0.18) 0 1px, transparent 2px),
    linear-gradient(180deg, rgba(10, 34, 78, 0.04) 0%, rgba(17, 48, 99, 0.18) 45%, rgba(22, 61, 118, 0.52) 100%);
}

.meteor-dim,
.fireworks-dim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(3, 14, 38, 0.22) 0%, rgba(8, 21, 49, 0.18) 52%, rgba(12, 30, 68, 0.12) 100%);
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  text-align: center;
  pointer-events: none;
}

.overlay .inner {
  max-width: 760px;
  pointer-events: auto;
}

.glow-title {
  margin: 0;
  font-size: clamp(30px, 8vw, 58px);
  letter-spacing: 2px;
  text-shadow: 0 0 18px rgba(193, 222, 255, 0.62);
}

.meteor-title {
  color: #fff8fc;
  font-family: "Arial Rounded MT Bold", "Hiragino Maru Gothic ProN", var(--font-cn);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-shadow:
    0 0 14px rgba(255, 204, 226, 0.9),
    0 0 28px rgba(255, 168, 205, 0.45),
    0 6px 18px rgba(19, 18, 48, 0.32);
}

.meteor-title-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(16px) scale(0.84);
  filter: blur(1px);
}

.meteor-title-char.is-visible {
  animation: meteor-char-pop 900ms cubic-bezier(0.22, 0.9, 0.24, 1) forwards;
}

.glow-sub {
  margin-top: 12px;
  color: var(--paper);
  line-height: 1.8;
  font-size: clamp(14px, 3.8vw, 19px);
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.35);
}

.meteor-sub {
  opacity: 0;
  transform: translateY(10px);
}

.meteor-sub.is-visible {
  animation: meteor-sub-fade 1200ms ease forwards;
}

.page-countdown {
  position: relative;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  background:
    radial-gradient(circle at 50% 36%, rgba(67, 238, 255, 0.2), transparent 34%),
    radial-gradient(circle at 18% 20%, rgba(148, 115, 255, 0.18), transparent 30%),
    radial-gradient(circle at 82% 78%, rgba(111, 231, 255, 0.12), transparent 32%),
    linear-gradient(180deg, #020817, #06152a 58%, #03040a);
}

.countdown-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #020611;
}

.countdown-actions {
  position: absolute;
  z-index: 5;
  top: max(20px, env(safe-area-inset-top));
  right: max(20px, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  gap: 10px;
}

.countdown-actions .ghost-btn,
.countdown-actions .btn {
  min-width: 104px;
  border-color: rgba(148, 239, 255, 0.34);
  background: rgba(4, 18, 38, 0.62);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.countdown-actions .btn {
  color: #05202c;
  background: linear-gradient(120deg, #a8fbff, #b9b1ff);
}

.countdown-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 112, 186, 0.24), transparent 34%),
    radial-gradient(circle at 50% 72%, rgba(111, 226, 255, 0.16), transparent 40%),
    linear-gradient(180deg, #030715 0%, #08152d 56%, #08050d 100%);
}

.countdown-fallback[hidden] {
  display: none;
}

#fallbackCountdownCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.fallback-countdown-core {
  position: relative;
  z-index: 2;
  width: min(92vw, 520px);
  min-height: 520px;
  display: grid;
  place-items: center;
  text-align: center;
}

.fallback-ready,
.fallback-final {
  position: absolute;
  margin: 0;
  color: #fff8fc;
  font-weight: 900;
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  text-shadow:
    0 0 18px rgba(255, 159, 211, 0.9),
    0 0 42px rgba(111, 226, 255, 0.45);
  transition: opacity 520ms ease, transform 520ms ease;
}

.fallback-ready.visible,
.fallback-final.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.fallback-ready {
  top: 18%;
  font-size: clamp(24px, 8vw, 40px);
}

.fallback-number {
  position: absolute;
  top: 21%;
  width: 100%;
  color: #fffafd;
  font-family: var(--font-display);
  font-size: clamp(120px, 38vw, 190px);
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  transform: scale(0.75);
  text-shadow:
    0 0 20px rgba(255, 148, 205, 0.98),
    0 0 56px rgba(255, 79, 154, 0.58),
    0 0 90px rgba(123, 234, 255, 0.44);
}

.fallback-number.visible {
  opacity: 1;
}

.fallback-number.pop {
  animation: fallback-number-pop 1.05s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.fallback-cake {
  position: absolute;
  bottom: 8%;
  width: 230px;
  height: 220px;
  opacity: 0;
  transform: translateY(38px) scale(0.74);
  filter: drop-shadow(0 0 24px rgba(255, 132, 190, 0.48));
  transition: opacity 760ms ease, transform 760ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.fallback-cake.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: fallback-cake-float 2.4s ease-in-out infinite;
}

.fallback-tier,
.fallback-plate {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 2px solid rgba(255, 255, 255, 0.74);
  box-shadow:
    inset 0 0 20px rgba(255, 255, 255, 0.42),
    0 0 34px rgba(255, 126, 192, 0.38);
}

.fallback-tier-top {
  bottom: 72px;
  width: 138px;
  height: 62px;
  border-radius: 48% 48% 16px 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 176, 220, 0.82)),
    linear-gradient(90deg, rgba(135, 242, 255, 0.55), rgba(255, 150, 211, 0.44));
}

.fallback-tier-bottom {
  bottom: 18px;
  width: 206px;
  height: 76px;
  border-radius: 50% 50% 22px 22px;
  background:
    linear-gradient(180deg, rgba(255, 248, 253, 0.82), rgba(255, 122, 194, 0.86)),
    linear-gradient(90deg, rgba(122, 238, 255, 0.42), rgba(189, 162, 255, 0.4));
}

.fallback-plate {
  bottom: 0;
  width: 226px;
  height: 24px;
  border-radius: 50%;
  background: rgba(179, 246, 255, 0.54);
}

.fallback-candle {
  position: absolute;
  bottom: 135px;
  width: 8px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #88efff);
  box-shadow: 0 0 18px rgba(132, 239, 255, 0.62);
}

.fallback-candle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -20px;
  width: 15px;
  height: 22px;
  border-radius: 50% 50% 48% 48%;
  background: radial-gradient(circle at 48% 28%, #fff 0 20%, #fff0a8 21% 40%, #ff71ba 62%, rgba(255, 113, 186, 0) 70%);
  transform: translateX(-50%);
  animation: fallback-flame 760ms ease-in-out infinite alternate;
}

.fallback-candle:nth-child(1) {
  left: 72px;
}

.fallback-candle:nth-child(2) {
  left: 103px;
}

.fallback-candle:nth-child(3) {
  left: 134px;
}

.fallback-candle:nth-child(4) {
  left: 165px;
}

.fallback-candle:nth-child(5) {
  left: 196px;
}

.fallback-final {
  top: 17%;
  width: 100%;
  font-size: clamp(26px, 8vw, 42px);
}

#countdownCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.countdown-copy {
  position: relative;
  z-index: 2;
  text-align: center;
}

.crystal-panel {
  width: min(760px, 92vw);
  padding: clamp(22px, 4vw, 44px);
  border: 1px solid rgba(139, 246, 255, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(135, 245, 255, 0.13), rgba(140, 116, 255, 0.08)),
    rgba(4, 14, 35, 0.38);
  box-shadow:
    0 0 44px rgba(62, 228, 255, 0.18),
    inset 0 0 34px rgba(160, 246, 255, 0.08);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.crystal-title {
  margin: -4px 0 4px;
  color: #b8f8ff;
  font: 800 clamp(16px, 3vw, 24px) / 1.2 var(--font-cn);
  text-shadow:
    0 0 14px rgba(105, 238, 255, 0.6),
    0 0 32px rgba(142, 107, 255, 0.32);
}

.countdown-ready {
  min-height: 32px;
  margin: 12px 0 -4px;
  color: #f8feff;
  font-size: clamp(20px, 4vw, 30px);
  font-weight: 900;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  text-shadow: 0 0 18px rgba(153, 245, 255, 0.7);
}

.countdown-ready.visible {
  animation: ready-in 820ms cubic-bezier(0.22, 0.9, 0.24, 1) forwards;
}

.countdown-number {
  width: min(42vw, 360px);
  height: min(42vw, 360px);
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 50%;
  color: #fff5fb;
  font: 900 clamp(110px, 24vw, 250px) / 1 var(--font-display);
  text-shadow:
    0 0 24px rgba(115, 244, 255, 0.94),
    0 0 70px rgba(116, 148, 255, 0.52);
  animation: countdown-pulse 950ms ease-in-out infinite;
}

.countdown-number.final {
  width: min(58vw, 520px);
  font-size: clamp(42px, 10vw, 112px);
}

.countdown-number.ready {
  visibility: hidden;
  animation: none;
}

#countdownPhase {
  margin: 0;
  color: rgba(222, 251, 255, 0.86);
  font-weight: 700;
  text-shadow: 0 0 14px rgba(84, 237, 255, 0.38);
}

.gallery-shell,
.video-shell,
.message-shell {
  position: relative;
  z-index: 1;
  width: min(1220px, 94vw);
  margin: auto;
}

.page-gallery {
  position: relative;
  isolation: isolate;
  overflow-y: auto;
  background:
    radial-gradient(circle at 10% 18%, rgba(255, 106, 152, 0.18), transparent 32%),
    radial-gradient(circle at 84% 80%, rgba(255, 159, 125, 0.16), transparent 34%),
    linear-gradient(140deg, #090912, #1b1118 48%, #080d18);
}

.page-gallery::before,
.page-gallery::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.page-gallery::before {
  z-index: 0;
  opacity: 0.28;
  background: conic-gradient(from 164deg at 50% -12%, transparent 0 39%, rgba(255, 235, 196, 0.2) 43%, rgba(255, 245, 221, 0.07) 50%, transparent 55% 100%);
  animation: projector-breathe 2.8s steps(2, end) infinite;
}

.page-gallery::after {
  z-index: 2;
  opacity: 0.16;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, 0.025) 3px 4px);
  mix-blend-mode: screen;
  animation: projector-scan 1.4s linear infinite;
}

.section-head {
  max-width: 820px;
  margin: 0 auto 18px;
  padding-top: 28px;
  text-align: center;
}

.section-head h2,
.message-title h2,
.blessing-card h2,
.heart-copy h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
}

.section-head p:not(.eyebrow) {
  color: var(--soft);
  line-height: 1.8;
}

.dazz-stage {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 68px;
  align-items: center;
  gap: 16px;
}

.round-nav {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  font-size: 38px;
  line-height: 1;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.round-nav:disabled {
  cursor: default;
  opacity: 0.28;
  transform: none;
}

.dazz-card {
  position: relative;
  width: min(1060px, 82vw);
  margin: 0 auto;
  padding: 28px 28px 26px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0)),
    #111;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.46),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transform: rotate(-0.4deg);
}

.dazz-card::before,
.dazz-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.dazz-card::before {
  z-index: 3;
  background:
    radial-gradient(circle at 10% 12%, rgba(255, 107, 142, 0.44), transparent 22%),
    radial-gradient(circle at 86% 18%, rgba(255, 218, 156, 0.2), transparent 24%),
    linear-gradient(110deg, transparent 0 62%, rgba(255, 255, 255, 0.13) 64%, transparent 70%);
  mix-blend-mode: screen;
}

.dazz-card::after {
  z-index: 4;
  opacity: 0.34;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.026) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 5px);
}

.photo-window {
  position: relative;
  z-index: 2;
  height: min(72vh, 720px);
  min-height: 520px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
  background: #050505;
  perspective: 900px;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  contain: layout paint;
  touch-action: manipulation;
}

.photo-window img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: contrast(1.04) saturate(0.95) sepia(0.08);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform, opacity;
  transition: transform 760ms cubic-bezier(0.18, 0.76, 0.12, 1), opacity 520ms ease;
}

.photo-window::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.11;
  background: linear-gradient(105deg, transparent 0 38%, rgba(255, 244, 214, 0.3) 48%, transparent 58% 100%);
  transform: translateX(-120%);
}

.photo-window.is-projecting::after {
  animation: projector-shutter 780ms ease-out;
}

.photo-window.is-projecting {
  animation: film-gate-jolt 780ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.photo-window img.photo-enter-next {
  opacity: 0;
  transform: translateX(42%) rotateY(-58deg) scale(0.88);
  transform-origin: left center;
}

.photo-window img.photo-enter-previous {
  opacity: 0;
  transform: translateX(-42%) rotateY(58deg) scale(0.88);
  transform-origin: right center;
}

.photo-window img.photo-enter.is-active {
  opacity: 1;
  transform: translateX(0) rotateY(0) scale(1);
}

.photo-window img.photo-exit-next {
  opacity: 0;
  transform: translateX(-36%) rotateY(52deg) scale(0.9);
  transform-origin: right center;
}

.photo-window img.photo-exit-previous {
  opacity: 0;
  transform: translateX(36%) rotateY(-52deg) scale(0.9);
  transform-origin: left center;
}

.dazz-card figcaption {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 16px;
  color: #f7f1e9;
}

.dazz-card figcaption span {
  color: #ffc977;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.dazz-card figcaption strong {
  font-size: 22px;
}

.dazz-card figcaption small {
  grid-column: 1 / -1;
  color: rgba(247, 241, 233, 0.58);
  overflow-wrap: anywhere;
}

.dazz-date {
  position: absolute;
  right: 34px;
  top: 42px;
  z-index: 5;
  color: rgba(255, 204, 116, 0.9);
  font: 800 13px / 1 var(--font-cn);
  letter-spacing: 0.16em;
  text-shadow: 0 0 12px rgba(255, 142, 91, 0.5);
}

.film-perf {
  position: relative;
  z-index: 5;
  height: 13px;
  margin: 0 0 16px;
  background: repeating-linear-gradient(90deg, transparent 0 13px, rgba(255, 255, 255, 0.26) 13px 26px, transparent 26px 39px);
}

.film-perf-bottom {
  margin: 18px 0 0;
}

.film-strip-wrap {
  display: none;
  width: min(1040px, 92vw);
  margin: 14px auto 0;
  overflow-x: auto;
  padding: 8px 0 12px;
}

.film-strip {
  display: flex;
  gap: 8px;
  width: max-content;
  padding: 10px;
  border-radius: 8px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.2) 0 4px, transparent 5px) 0 6px / 28px 20px repeat-x,
    radial-gradient(circle, rgba(255, 255, 255, 0.16) 0 4px, transparent 5px) 0 calc(100% - 14px) / 28px 20px repeat-x,
    rgba(0, 0, 0, 0.46);
}

.film-thumb {
  width: 72px;
  height: 88px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 4px;
  padding: 0;
  overflow: hidden;
  background: #111;
  opacity: 0.54;
}

.film-thumb.active {
  opacity: 1;
  outline: 2px solid #ffc977;
}

.film-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-message {
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 106, 152, 0.16), transparent 32%),
    linear-gradient(155deg, #110912, #2a1220 62%, #0a0d18);
}

.message-shell {
  display: grid;
  grid-template-columns: minmax(230px, 0.6fr) minmax(0, 1.4fr);
  align-items: start;
  gap: clamp(24px, 5vw, 72px);
}

.message-title {
  padding-top: 22px;
}

.message-paper,
.blessing-card {
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 106, 152, 0.08) 0 1px, transparent 1px 100%),
    repeating-linear-gradient(180deg, transparent 0 35px, rgba(110, 34, 63, 0.08) 35px 36px),
    #fff6ed;
  color: #2d1a1b;
  box-shadow: var(--shadow);
}

.message-paper {
  min-height: 430px;
  padding: clamp(28px, 5vw, 56px);
}

.message-paper p {
  margin: 0 0 22px;
  color: #4b3832;
  font-size: 20px;
  line-height: 1.95;
}

.board-paper {
  min-height: auto;
}

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

.board-note {
  min-height: 190px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 20px;
  border: 1px solid rgba(138, 57, 70, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 232, 224, 0.72)),
    rgba(255, 246, 237, 0.92);
}

.board-note span {
  color: #c36c78;
  font-size: 12px;
  font-weight: 900;
}

.board-note strong {
  color: #2d1a1b;
  font-size: 20px;
}

.board-note p {
  margin: 0;
  font-size: 16px;
  line-height: 1.85;
  white-space: pre-line;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1.35em;
  margin-left: 3px;
  vertical-align: text-bottom;
  background: var(--pink);
  animation: blink 900ms steps(1) infinite;
}

.egg-btn {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.egg-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.page-videos {
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 0 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(198, 231, 255, 0.12), transparent 34%),
    linear-gradient(180deg, #071125, #160a18 70%, #250f1f);
}

.page-videos .video-shell {
  width: min(1080px, calc(100vw - 48px));
  padding: 14px 0 28px;
}

.page-videos .section-head {
  margin-bottom: 12px;
  padding-top: 0;
}

.video-grid {
  display: grid;
  grid-template-columns: minmax(0, 1040px);
  justify-content: center;
  gap: 16px;
}

.video-card {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.video-card h3 {
  margin: 0;
  font-size: 24px;
}

.video-card span {
  color: #ffc977;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.video-media {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: clamp(320px, calc(100vh - 300px), 620px);
  min-height: 0;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 106, 152, 0.17), transparent 38%),
    rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.video-media video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  background: #000;
}

.video-play-prompt {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: rgba(3, 10, 24, 0.56);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  transition: opacity 220ms ease;
}

.video-play-prompt i {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 50%;
  background: rgba(255, 106, 152, 0.84);
  box-shadow: 0 0 34px rgba(255, 106, 152, 0.4);
}

.video-play-prompt i::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 17px solid #fff;
}

.video-play-prompt b {
  font-size: 17px;
}

.video-play-prompt:hover i {
  transform: scale(1.06);
  filter: brightness(1.08);
}

.video-play-prompt.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.video-actions {
  position: fixed;
  top: 26px;
  right: 30px;
  z-index: 35;
  display: flex;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.video-actions.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.video-actions .btn {
  min-width: 112px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.34);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.video-actions .btn span {
  font-size: 18px;
  line-height: 1;
}

.video-placeholder {
  padding: 20px;
  color: var(--soft);
  text-align: center;
  line-height: 1.7;
}

.page-blessing {
  overflow-y: auto;
  align-items: flex-start;
  justify-content: center;
  padding: min(8vh, 70px) 20px min(18vh, 150px);
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 159, 125, 0.18), transparent 32%),
    radial-gradient(circle at 86% 22%, rgba(255, 106, 152, 0.16), transparent 30%),
    linear-gradient(145deg, #130a10, #2c1320 62%, #080d18);
}

.blessing-card {
  width: min(920px, 94vw);
  padding: clamp(28px, 5vw, 62px);
}

.blessing-card h2 {
  color: #2b1519;
}

.blessing-card .eyebrow {
  color: #9b4a54;
}

.blessing-card p {
  margin: 0 0 18px;
  color: #48312d;
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: var(--blessing-line, 1.88);
  text-align: justify;
}

.blessing-card p.short {
  text-align: left;
  font-weight: 700;
}

.blessing-card p.signature {
  text-align: right;
  font-weight: 800;
}

.blessing-cursor {
  margin-top: 4px;
}

.page-heart {
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 106, 152, 0.18), transparent 36%),
    linear-gradient(180deg, #18091a, #06060d);
}

.heart-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.heart-popup {
  position: absolute;
  width: 150px;
  height: 60px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(80, 20, 54, 0.16);
  border-radius: 4px;
  color: #32111f;
  font: 700 14px / 1.2 var(--font-cn);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
  opacity: 0;
  transform: translate3d(0, 0, 0);
  will-change: transform, opacity;
  animation: heart-popup-reveal 420ms ease-out var(--reveal-delay) forwards;
  transition: transform 980ms cubic-bezier(0.19, 1, 0.22, 1);
}

.heart-popup.scatter {
  transform: translate3d(var(--scatter-x), var(--scatter-y), 0) rotate(var(--tilt)) scale(0.96);
}

.heart-copy {
  position: relative;
  z-index: 2;
  text-align: center;
  pointer-events: none;
}

.heart-copy .btn {
  pointer-events: auto;
  opacity: 0;
  transform: translateY(10px);
}

.heart-copy .btn.visible {
  opacity: 1;
  transform: translateY(0);
}

.fireworks-text {
  min-height: 3em;
  max-width: min(92vw, 740px);
  margin: 12px auto 0;
  color: #ffeef5;
  font-size: clamp(16px, 3.8vw, 27px);
  font-weight: 700;
  line-height: 1.8;
  white-space: pre-line;
  text-shadow: 0 0 14px rgba(255, 151, 190, 0.56);
}

.next-note {
  margin-top: 18px;
  color: #fbefff;
  font-size: 14px;
  opacity: 0.9;
}

.lyrics-overlay {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 35;
  width: min(720px, calc(100vw - 34px));
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 10px 18px 12px;
  border-top: 1px solid rgba(255, 215, 230, 0.34);
  color: rgba(255, 246, 250, 0.92);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 14px);
  text-shadow: 0 2px 12px rgba(34, 8, 26, 0.72);
  transition: opacity 600ms ease, transform 600ms ease;
}

.lyrics-overlay::before {
  content: "";
  position: absolute;
  inset: -16px -15% -8px;
  z-index: -1;
  background: linear-gradient(180deg, transparent, rgba(25, 7, 24, 0.18));
  filter: blur(10px);
}

.lyrics-overlay.active {
  opacity: 1;
  transform: translate(-50%, 0);
}

.lyrics-kicker {
  color: rgba(255, 201, 221, 0.66);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.24em;
}

.lyrics-text {
  min-height: 1.5em;
  font-size: clamp(13px, 2.1vw, 17px);
  font-weight: 700;
  line-height: 1.5;
}

.page-ending {
  position: relative;
  isolation: isolate;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden auto;
  color: #9a5e58;
  background:
    radial-gradient(circle at 50% 15%, rgba(255, 246, 190, 0.42), transparent 34%),
    linear-gradient(160deg, #e99892 0%, #f2b381 45%, #8bcfd0 100%);
}

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

.ending-fall {
  position: absolute;
  left: var(--x);
  top: -12vh;
  color: var(--color);
  font-size: var(--size);
  line-height: 1;
  opacity: 0;
  filter: drop-shadow(0 0 5px currentColor) drop-shadow(0 0 12px currentColor);
  will-change: transform, opacity;
  animation: ending-sparkle-fall var(--duration) linear infinite;
  animation-delay: var(--delay);
}

.ending-fall--heart {
  filter: drop-shadow(0 0 6px currentColor) drop-shadow(0 0 16px currentColor);
}

.ending-fall--star {
  animation-timing-function: cubic-bezier(0.34, 0.05, 0.7, 0.94);
}

.ending-wrap {
  position: relative;
  z-index: 2;
  width: min(92vw, 760px);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 34px 16px 28px;
  text-align: center;
}

.cake {
  font-size: clamp(54px, 14vw, 84px);
  line-height: 1;
  animation: float-y 2.4s ease-in-out infinite;
}

.birthday-en {
  margin-top: 4px;
  color: #b56f67;
  font-size: clamp(28px, 8vw, 46px);
  font-style: italic;
  letter-spacing: 1.5px;
}

.birthday-cn {
  margin-top: 16px;
  color: #a45d56;
  font-size: clamp(17px, 4.1vw, 29px);
  line-height: 1.65;
  white-space: pre-line;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}

.meme {
  width: min(74vw, 345px);
  margin-top: 22px;
  border: 2px solid rgba(255, 255, 255, 0.66);
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 10px 22px rgba(75, 30, 27, 0.2);
}

.meme-caption {
  margin-top: 8px;
  color: #fff3f8;
  font-size: clamp(32px, 8.7vw, 58px);
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 2px 6px rgba(122, 64, 56, 0.45);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 52px;
  background: rgba(0, 0, 0, 0.88);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 0s linear 220ms;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.lightbox img {
  max-width: 92vw;
  max-height: 78vh;
  display: block;
  object-fit: contain;
  box-shadow: var(--shadow);
}

.lightbox p {
  margin: 16px 0 0;
  color: var(--soft);
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 22px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 28px;
}

@keyframes meteor-char-pop {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.84);
    filter: blur(1px);
  }
  72% {
    opacity: 1;
    transform: translateY(-2px) scale(1.04);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes meteor-sub-fade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ready-in {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  55% {
    opacity: 1;
    transform: translateY(-2px) scale(1.02);
  }
  100% {
    opacity: 0.9;
    transform: translateY(0) scale(1);
  }
}

@keyframes countdown-pulse {
  0%,
  100% {
    transform: scale(0.94);
    filter: brightness(0.96);
  }
  48% {
    transform: scale(1.06);
    filter: brightness(1.18);
  }
}

@keyframes fallback-number-pop {
  0% {
    opacity: 0;
    transform: scale(0.62);
    filter: blur(2px);
  }
  24% {
    opacity: 1;
    transform: scale(1.18);
    filter: blur(0);
  }
  52% {
    transform: scale(0.96);
  }
  100% {
    opacity: 0;
    transform: scale(1.08);
  }
}

@keyframes fallback-cake-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-8px) scale(1.01);
  }
}

@keyframes fallback-flame {
  from {
    transform: translateX(-50%) scale(0.9) rotate(-4deg);
  }
  to {
    transform: translateX(-50%) scale(1.08) rotate(5deg);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

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

@keyframes float-y {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes projector-breathe {
  0%,
  100% {
    opacity: 0.22;
  }
  48% {
    opacity: 0.3;
  }
  52% {
    opacity: 0.2;
  }
}

@keyframes projector-scan {
  from {
    transform: translateY(-8px);
  }
  to {
    transform: translateY(8px);
  }
}

@keyframes projector-shutter {
  0% {
    opacity: 0;
    transform: translateX(-120%);
  }
  35% {
    opacity: 0.72;
  }
  100% {
    opacity: 0;
    transform: translateX(120%);
  }
}

@keyframes film-gate-jolt {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    box-shadow: inset 0 0 0 rgba(255, 244, 214, 0);
  }
  14% {
    transform: translate3d(-4px, 1px, 0) scale(0.988);
    box-shadow: inset 0 0 48px rgba(255, 244, 214, 0.24);
  }
  28% {
    transform: translate3d(3px, -1px, 0) scale(0.994);
  }
  46% {
    transform: translate3d(-2px, 0, 0) scale(1);
  }
}

@keyframes ending-sparkle-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, -10vh, 0) rotate(0deg) scale(0.65);
  }
  9% {
    opacity: 0.98;
  }
  46% {
    opacity: 0.82;
    transform: translate3d(var(--drift-mid), 50vh, 0) rotate(120deg) scale(1.08);
  }
  82% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift), 116vh, 0) rotate(var(--spin)) scale(0.78);
  }
}

@keyframes heart-popup-reveal {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page,
  .photo-window img,
  .heart-popup,
  .lyrics-overlay {
    transition-duration: 1ms;
  }

  .heart-popup {
    animation-duration: 1ms;
  }

  .photo-window.is-projecting,
  .photo-window.is-projecting::after {
    animation-duration: 240ms;
  }
}

html.ios-performance .page {
  transition-duration: 280ms;
}

html.ios-performance body::after {
  opacity: 0.12;
  mix-blend-mode: normal;
}

html.ios-performance .center-wrap,
html.ios-performance .ghost-btn,
html.ios-performance .countdown-actions .ghost-btn,
html.ios-performance .countdown-actions .btn,
html.ios-performance .crystal-panel,
html.ios-performance .round-nav,
html.ios-performance .video-play-prompt,
html.ios-performance .video-actions .btn {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html.ios-performance .dazz-card::before {
  opacity: 0.38;
  mix-blend-mode: normal;
}

html.ios-performance .page-gallery::before,
html.ios-performance .page-gallery::after {
  animation: none;
}

html.ios-performance .photo-window img {
  filter: none;
  will-change: transform;
  transition-duration: 560ms, 420ms;
}

html.ios-performance .photo-window.is-projecting,
html.ios-performance .photo-window.is-projecting::after {
  animation-duration: 560ms;
}

html.ios-performance .heart-popup {
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.2);
  will-change: auto;
  transition-duration: 700ms;
}

html.ios-performance .lyrics-overlay::before {
  filter: none;
}

html.ios-performance .ending-fall,
html.ios-performance .ending-fall--heart {
  filter: drop-shadow(0 0 5px currentColor);
  will-change: transform;
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .page {
    position: relative;
    min-height: 100vh;
  }

  .page.page-leaving {
    position: fixed;
  }

  .dazz-stage {
    position: relative;
    grid-template-columns: 1fr;
  }

  .round-nav {
    position: absolute;
    top: 50%;
    z-index: 8;
    width: 46px;
    height: 46px;
    border-color: rgba(255, 255, 255, 0.42);
    background: rgba(5, 5, 8, 0.68);
    transform: translateY(-50%);
  }

  .round-nav:hover,
  .round-nav:disabled {
    transform: translateY(-50%);
  }

  #prevPhotoBtn {
    left: 14px;
  }

  #nextPhotoBtn {
    right: 14px;
  }

  .dazz-card {
    width: min(94vw, 680px);
  }

  .photo-window {
    min-height: 330px;
    height: min(58vh, 520px);
  }

  .message-shell,
  .video-grid {
    grid-template-columns: 1fr;
  }

  .message-title {
    padding-top: 0;
    text-align: center;
  }

  .video-shell {
    padding: 20px 0 40px;
  }

  .video-card {
    min-height: 0;
  }

  .video-media {
    height: clamp(300px, calc(100vh - 270px), 520px);
  }

  .video-actions {
    top: auto;
    right: auto;
    bottom: max(24px, env(safe-area-inset-bottom));
    left: 50%;
    transform: translate(-50%, 10px);
  }

  .video-actions.visible {
    transform: translate(-50%, 0);
  }
}

@media (max-width: 640px) {
  .glow-title {
    font-size: 34px;
  }

  .section-head {
    padding-top: 78px;
  }

  .dazz-card {
    padding: 18px;
  }

  .photo-window {
    min-height: 280px;
  }

  .video-media {
    height: min(56vh, 460px);
  }

  .dazz-card figcaption {
    grid-template-columns: 1fr;
  }

  .heart-popup {
    width: 118px;
    height: 48px;
    font-size: 12px;
  }

  .lightbox {
    padding: 20px;
  }
}
