:root {
  color-scheme: light;
  --deep: #07541e;
  --green: #0d7c2f;
  --green-2: #3ea94e;
  --light: #efffdd;
  --cream: #fff8d4;
  --gold: #f6c64b;
  --gold-deep: #b77811;
  --ink: #14501d;
  --muted: #497842;
  --panel: rgba(251, 255, 230, 0.78);
  --line: rgba(24, 114, 39, 0.22);
  --shadow: 0 22px 55px rgba(24, 94, 26, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  background:
    radial-gradient(circle at 48% 15%, rgba(255, 255, 255, 0.92), transparent 24rem),
    radial-gradient(circle at 22% 30%, rgba(202, 255, 147, 0.8), transparent 26rem),
    radial-gradient(circle at 80% 42%, rgba(102, 188, 71, 0.28), transparent 24rem),
    linear-gradient(180deg, #f3ffdf 0%, #e4f7bb 47%, #cce889 78%, #ecffd5 100%);
}

body::before {
  position: fixed;
  inset: 60px 0 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent 32%),
    radial-gradient(ellipse at 50% 100%, rgba(56, 140, 41, 0.34), transparent 45%),
    repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.14) 0 2px, transparent 2px 130px);
}

#sparkCanvas {
  position: fixed;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: 220px 1fr 180px;
  align-items: center;
  height: 60px;
  padding: 0 30px;
  color: #f4ffe6;
  background: linear-gradient(90deg, #07541e, #0d742e 50%, #06511c);
  box-shadow: 0 12px 30px rgba(5, 61, 18, 0.25);
}

.brand,
.site-header nav,
.for-name {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  color: #f4ffe6;
  font-size: 0.95rem;
  letter-spacing: 0;
  text-decoration: none;
}

.horse-shoe {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 1.7rem;
  font-weight: 900;
}

.site-header nav {
  justify-content: center;
  gap: clamp(16px, 4vw, 58px);
}

.site-header a {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
  text-decoration: none;
}

.site-header nav a {
  position: relative;
  padding: 21px 0 18px;
}

.site-header nav a.active,
.site-header nav a:hover {
  color: #fff;
}

.site-header nav a.active::after {
  position: absolute;
  right: 0;
  bottom: 8px;
  left: 0;
  height: 3px;
  content: "";
  background: var(--gold);
  border-radius: 99px;
}

.for-name {
  justify-content: flex-end;
  color: #fff2b9;
  font-weight: 800;
}

main {
  position: relative;
  z-index: 2;
  width: min(1220px, calc(100% - 56px));
  margin: 0 auto;
}

.poster-section {
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 0.88fr) minmax(420px, 1.12fr);
  gap: 14px;
  min-height: 330px;
  margin-top: 10px;
  padding: 18px 32px 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 52% 15%, rgba(255, 255, 255, 0.9), transparent 24rem),
    linear-gradient(135deg, rgba(255, 255, 237, 0.92), rgba(211, 245, 154, 0.7) 54%, rgba(184, 225, 120, 0.85));
  border-radius: 0 0 18px 18px;
}

.hero::before,
.hero::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.hero::before {
  right: -8%;
  bottom: -18%;
  left: -8%;
  height: 43%;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.86), transparent 55%),
    linear-gradient(180deg, rgba(85, 165, 45, 0.16), rgba(20, 112, 35, 0.28));
  border-radius: 50% 50% 0 0;
}

.hero::after {
  inset: 0;
  background-image:
    linear-gradient(118deg, transparent 0 14%, rgba(255, 255, 255, 0.42) 15% 16%, transparent 17% 100%),
    linear-gradient(78deg, transparent 0 68%, rgba(255, 255, 255, 0.45) 69% 70%, transparent 71% 100%);
  opacity: 0.8;
}

.hero-copy,
.hero-art {
  position: relative;
  z-index: 2;
}

.tiny-script {
  margin: 20px 0 6px;
  color: #2d7a27;
  font-family: "Snell Roundhand", "Brush Script MT", cursive;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1;
}

h1 {
  margin: 0;
  color: #105c20;
  font-family: "STKaiti", "Kaiti SC", "KaiTi", "PingFang SC", serif;
  font-size: clamp(3rem, 4.6vw, 4.45rem);
  line-height: 1.06;
  letter-spacing: 0;
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.55), 0 14px 30px rgba(13, 112, 40, 0.16);
}

h1 span {
  display: block;
  white-space: nowrap;
}

.date-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin: 12px 0 0;
  padding: 0 16px;
  color: #255d18;
  font-size: clamp(0.86rem, 1.2vw, 0.98rem);
  font-weight: 900;
  line-height: 1.2;
  background: rgba(240, 255, 212, 0.76);
  border: 2px solid rgba(78, 146, 50, 0.56);
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(65, 138, 42, 0.17);
}

.wish-note {
  display: grid;
  gap: 4px;
  width: min(206px, 100%);
  margin-top: 16px;
  padding: 10px 14px;
  color: #214d1a;
  font-family: "STKaiti", "Kaiti SC", serif;
  font-size: 0.98rem;
  line-height: 1.32;
  text-align: center;
  background: rgba(255, 251, 220, 0.78);
  border: 1px solid rgba(181, 145, 51, 0.42);
  border-radius: 8px;
  transform: rotate(-5deg);
}

.wish-note::before {
  display: block;
  color: var(--gold-deep);
  font-size: 1.25rem;
  content: "✦";
}

.hero-center-decor .wish-note {
  width: 186px;
  margin: 0;
  transform: rotate(-4deg);
}

.hero-art {
  min-height: 292px;
  overflow: hidden;
}

.gold-666 {
  position: absolute;
  top: 20px;
  right: 0;
  z-index: 1;
  display: flex;
  letter-spacing: -12px;
  transform: rotate(-8deg);
}

.gold-666 span {
  color: #28872d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4.2rem, 6.5vw, 6rem);
  font-weight: 900;
  line-height: 0.85;
  -webkit-text-stroke: 7px var(--gold);
  text-shadow: 0 8px 0 #8b5e0a, 0 18px 35px rgba(103, 77, 0, 0.28);
  animation: sixShine 2.6s ease-in-out infinite;
}

.gold-666 span:nth-child(2) {
  animation-delay: -0.35s;
}

.gold-666 span:nth-child(3) {
  animation-delay: -0.7s;
}

.horse-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.running-horse {
  position: absolute;
  top: 8%;
  right: 5%;
  z-index: 2;
  width: 42%;
  max-width: 42%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 18px rgba(55, 91, 25, 0.2));
  animation: horseFloat 2.4s ease-in-out infinite;
}

.hero-center-decor {
  position: absolute;
  top: 28%;
  left: 7%;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 58%;
  min-height: 126px;
  pointer-events: none;
}

.cake-wrap {
  position: relative;
  z-index: 1;
  width: 140px;
  text-align: center;
}

.cake-number {
  margin-bottom: -18px;
  color: #fffdf2;
  font-family: Georgia, serif;
  font-size: 2.8rem;
  font-weight: 900;
  -webkit-text-stroke: 4px var(--gold-deep);
  text-shadow: 0 9px 20px rgba(86, 56, 0, 0.24);
}

.cake {
  position: relative;
  width: 118px;
  height: 76px;
  margin: 0 auto;
}

.layer,
.cream {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.layer {
  width: 116px;
  height: 32px;
  background: linear-gradient(180deg, #fbfff1, #c4e875);
  border: 2px solid rgba(102, 145, 43, 0.35);
  border-radius: 18px 18px 10px 10px;
}

.layer.top {
  top: 20px;
  width: 96px;
}

.layer.bottom {
  bottom: 0;
}

.cream {
  top: 32px;
  z-index: 2;
  width: 108px;
  height: 16px;
  background: radial-gradient(circle at 12px 8px, #fff 0 10px, transparent 11px), linear-gradient(90deg, #fff, #fff8d9);
  border-radius: 999px;
}

.candle {
  position: absolute;
  top: 3px;
  z-index: 3;
  width: 8px;
  height: 22px;
  background: linear-gradient(180deg, #fff, var(--gold));
  border-radius: 999px;
}

.candle::before {
  position: absolute;
  top: -15px;
  left: 50%;
  width: 14px;
  height: 18px;
  content: "";
  background: radial-gradient(circle at 50% 70%, #fff 0 3px, #ffd86a 4px 9px, #ff9d00 10px 13px, transparent 14px);
  transform: translateX(-50%);
  animation: flame 0.38s ease-in-out infinite alternate;
}

.candle-one {
  left: 52px;
}

.candle-two {
  left: 68px;
}

.blessing-panel {
  position: relative;
  z-index: 2;
  margin-top: 8px;
  padding: 10px 18px 12px;
  text-align: center;
  background: var(--panel);
  border-radius: 20px;
}

.blessing-panel h2,
.music-card h2 {
  margin: 0;
  color: #145b22;
  font-family: "STKaiti", "Kaiti SC", serif;
  font-size: clamp(1.25rem, 2.1vw, 1.65rem);
  letter-spacing: 0;
}

.blessing-panel > p {
  margin: 4px auto 8px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.25;
}

.wish-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.wish-grid article {
  min-height: 74px;
  padding: 7px 6px;
  background: linear-gradient(180deg, rgba(255, 255, 244, 0.82), rgba(231, 248, 192, 0.76));
  border: 1px solid rgba(90, 145, 48, 0.18);
  border-radius: 8px;
}

.wish-grid span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin: 0 auto 4px;
  color: #2f8e31;
  font-size: 1.08rem;
  font-weight: 900;
  background: rgba(246, 255, 224, 0.82);
  border: 2px solid rgba(117, 168, 65, 0.26);
  border-radius: 999px;
}

.wish-grid strong {
  display: block;
  color: #1b5e20;
  font-size: 0.82rem;
}

.wish-grid p {
  margin: 3px 0 0;
  color: #45653e;
  font-size: 0.7rem;
  line-height: 1.22;
}

.gift-row {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 10px;
  margin: 8px 0 0;
}

.music-card,
.letter-card {
  min-height: 122px;
  padding: 12px 16px;
  background: rgba(250, 255, 230, 0.8);
  border-radius: 18px;
}

.record-row {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

.record {
  display: grid;
  place-items: center;
  width: 80px;
  aspect-ratio: 1;
  background:
    repeating-radial-gradient(circle, #111 0 9px, #202020 10px 12px),
    radial-gradient(circle, #111, #000);
  border-radius: 999px;
  box-shadow: 0 18px 30px rgba(30, 58, 16, 0.22);
  animation: recordSpin 6s linear infinite;
}

.record-center {
  display: grid;
  place-items: center;
  width: 36px;
  aspect-ratio: 1;
  font-size: 1.1rem;
  background: radial-gradient(circle, #fff 0 18px, #ffe58b 19px 37px);
  border-radius: 999px;
}

.track-info {
  display: grid;
  gap: 4px;
  align-content: center;
  color: var(--ink);
}

.track-info strong {
  font-size: 0.96rem;
}

.track-info span {
  color: #1f401f;
}

.progress-line {
  width: 100%;
  height: 6px;
  overflow: hidden;
  background: rgba(97, 143, 60, 0.24);
  border-radius: 999px;
}

#progressFill {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #0c6c25, #7bbe3e);
  border-radius: inherit;
}

.track-info small {
  color: #365d2e;
  font-size: 0.72rem;
  text-align: right;
}

.music-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 34px;
  margin-top: 2px;
  padding: 0 16px;
  color: #fffced;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 900;
  background: linear-gradient(180deg, #148634, #08611f);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 14px 24px rgba(8, 97, 31, 0.28);
  cursor: pointer;
}

.music-button:hover,
.music-button:focus-visible {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #1b9e3e, #0d6f28);
}

.play-icon {
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid #fffced;
}

.music-button.is-playing .play-icon {
  width: 14px;
  height: 16px;
  border: 0;
  background: linear-gradient(90deg, #fffced 0 36%, transparent 36% 64%, #fffced 64%);
}

.letter-card {
  position: relative;
  overflow: hidden;
  color: #214d1a;
  font-size: 0.88rem;
  line-height: 1.35;
}

.letter-card::before {
  position: absolute;
  right: -28px;
  top: -28px;
  width: 82px;
  height: 82px;
  content: "";
  background:
    linear-gradient(45deg, transparent 43%, #0e6d29 44% 56%, transparent 57%),
    radial-gradient(ellipse at 50% 30%, #2c9d3f 0 32%, transparent 33%);
  transform: rotate(35deg);
}

.to-line {
  display: block;
  margin-bottom: 4px;
  color: #145b22;
  font-family: "Snell Roundhand", "Brush Script MT", cursive;
  font-size: 1.2rem;
  font-weight: 700;
}

.letter-card p {
  margin: 0 0 2px;
}

.letter-card strong {
  display: block;
  margin-top: 4px;
  color: #28762d;
  font-family: "Snell Roundhand", "Brush Script MT", cursive;
  font-size: 1.25rem;
  font-weight: 500;
}

.page-footer {
  display: none;
  position: relative;
  z-index: 2;
  gap: 4px;
  padding: 10px 20px 12px;
  color: #fff8ce;
  font-family: "STKaiti", "Kaiti SC", serif;
  font-size: clamp(1rem, 2vw, 1.45rem);
  text-align: center;
  background: linear-gradient(180deg, #11722d, #064f1d);
  box-shadow: inset 0 18px 30px rgba(255, 255, 255, 0.1);
}

.page-footer span:last-child {
  font-size: 1.05rem;
  font-family: inherit;
}

.balloon-field {
  position: fixed;
  inset: 60px 0 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.balloon {
  position: absolute;
  display: block;
  width: 84px;
  height: 108px;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.82), transparent 18%),
    linear-gradient(145deg, #d9ff8c, #4c9f3b 72%, #116126);
  border-radius: 52% 52% 48% 48%;
  box-shadow: inset -16px -18px 28px rgba(10, 65, 22, 0.22), 0 16px 30px rgba(17, 91, 27, 0.16);
  animation: balloonFloat 7.6s ease-in-out infinite;
}

.balloon::after {
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: 92px;
  content: "";
  background: rgba(35, 92, 30, 0.35);
}

.balloon::before {
  position: absolute;
  left: 50%;
  top: 96%;
  width: 16px;
  height: 13px;
  content: "";
  background: #2f7e2c;
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  transform: translateX(-50%);
}

.balloon-a {
  left: -18px;
  top: 74px;
}

.balloon-b {
  left: 0;
  top: 290px;
  width: 92px;
  height: 120px;
  animation-delay: -2.2s;
}

.balloon-c {
  left: 28px;
  bottom: 12%;
  width: 68px;
  height: 88px;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.82), transparent 18%),
    linear-gradient(145deg, #fffde7, #d4e69d 70%, #79a741);
  animation-delay: -4.6s;
}

.balloon-d {
  right: -30px;
  top: 82px;
  animation-delay: -1.3s;
}

.balloon-e {
  right: 16px;
  top: 310px;
  width: 70px;
  height: 94px;
  animation-delay: -3.7s;
}

.balloon-f {
  right: 62px;
  bottom: 18%;
  width: 54px;
  height: 72px;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.82), transparent 18%),
    linear-gradient(145deg, #fff8ce, #f6c64b 72%, #a86a0b);
  animation-delay: -5.2s;
}

@keyframes balloonFloat {
  0%,
  100% {
    transform: translate3d(0, 48px, 0) rotate(-4deg);
  }

  50% {
    transform: translate3d(12px, -70px, 0) rotate(5deg);
  }
}

@keyframes horseFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes flame {
  from {
    transform: translateX(-50%) scale(0.88) rotate(-6deg);
  }

  to {
    transform: translateX(-50%) scale(1.06) rotate(7deg);
  }
}

@keyframes sixShine {
  0%,
  100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.35);
  }
}

@keyframes recordSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1040px) {
  .site-header {
    grid-template-columns: 1fr;
    gap: 0;
    height: auto;
    padding: 10px 16px;
  }

  .brand,
  .for-name {
    justify-content: center;
  }

  .site-header nav {
    flex-wrap: wrap;
    gap: 18px;
  }

  .site-header nav a {
    padding: 10px 0 12px;
  }

  .for-name {
    display: none;
  }

  main {
    width: min(100% - 26px, 760px);
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 28px 18px 24px;
  }

  .tiny-script {
    margin-top: 18px;
  }

  .hero-art {
    min-height: 390px;
  }

  .gold-666 {
    top: 26px;
  }

  .horse-stage {
    inset: 0;
  }

  .wish-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gift-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  main {
    width: min(100% - 18px, 430px);
  }

  .site-header nav {
    gap: 14px;
    font-size: 0.88rem;
  }

  .hero {
    margin-top: 10px;
    border-radius: 0 0 14px 14px;
  }

  h1 {
    font-size: clamp(3.05rem, 16vw, 4.6rem);
  }

  .date-pill {
    width: 100%;
    justify-content: center;
    min-height: 48px;
    padding: 0 12px;
    font-size: 0.98rem;
    text-align: center;
  }

  .wish-note {
    margin-top: 24px;
  }

  .hero-art {
    min-height: 390px;
  }

  .gold-666 {
    top: 10px;
    right: 2px;
  }

  .gold-666 span {
    font-size: 5rem;
    -webkit-text-stroke-width: 4px;
  }

  .running-horse {
    top: 12%;
    right: 4%;
    width: 54%;
    max-width: 54%;
  }

  .cake-wrap {
    width: 150px;
    transform: scale(0.78);
    transform-origin: right bottom;
  }

  .blessing-panel {
    padding: 24px 12px 18px;
  }

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

  .wish-grid article {
    min-height: 112px;
  }

  .record-row {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .track-info {
    width: 100%;
  }

  .music-button {
    width: 100%;
  }

  .balloon {
    opacity: 0.78;
    transform: scale(0.82);
  }
}

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