:root {
  --bg: #f7eee6;
  --bg-strong: #f1dfd1;
  --panel: rgba(255, 250, 246, 0.82);
  --ink: #43271d;
  --muted: #8a695d;
  --accent: #b56246;
  --accent-deep: #8a4333;
  --line: rgba(96, 61, 43, 0.12);
  --gold: rgba(213, 168, 94, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.7), transparent 24%),
    linear-gradient(180deg, var(--bg), var(--bg-strong));
}

.global-music-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  backdrop-filter: blur(10px);
  background: rgba(247, 238, 230, 0.78);
  border-bottom: 1px solid var(--line);
}

.global-music-label {
  color: var(--muted);
  font-size: 13px;
}

.memory-page {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 20px 40px;
}

.ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0.3;
  pointer-events: none;
}

.ambient-a {
  width: 280px;
  height: 280px;
  top: 80px;
  right: -40px;
  background: rgba(213, 168, 94, 0.4);
  animation: drift 10s ease-in-out infinite alternate;
}

.ambient-b {
  width: 220px;
  height: 220px;
  left: -30px;
  bottom: 80px;
  background: rgba(181, 98, 70, 0.26);
  animation: drift 12s ease-in-out infinite alternate-reverse;
}

.memory-hero {
  text-align: center;
  margin-bottom: 28px;
}

.eyebrow,
.section-label {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "STKaiti", "Kaiti SC", "Songti SC", serif;
  font-weight: 400;
}

h1 {
  font-size: clamp(38px, 7vw, 70px);
  line-height: 1.05;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.music-embed {
  max-width: 360px;
  margin: 18px auto 0;
}

.music-embed iframe {
  width: 100%;
  height: 86px;
  border: 0;
  border-radius: 18px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 176px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 0;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  color: #fff8f3;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 18px 34px rgba(138, 67, 51, 0.25);
}

.ghost-button {
  color: var(--ink);
  background: rgba(255,255,255,0.52);
  border: 1px solid var(--line);
}

.memory-content {
  display: grid;
  gap: 24px;
}

.panel {
  position: relative;
  padding: 28px;
  border-radius: 30px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 22px 50px rgba(88, 47, 31, 0.1);
  backdrop-filter: blur(16px);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--gold);
  border-radius: 22px;
  pointer-events: none;
}

.timeline {
  display: grid;
  gap: 22px;
}

.memory-entry {
  padding: 14px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(96, 61, 43, 0.08);
  opacity: 0;
  transform: translateY(32px) scale(0.98);
  transition: opacity 700ms ease, transform 700ms ease;
}

.memory-entry.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.memory-photo {
  position: relative;
  min-height: 72vh;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.6), transparent 26%),
    linear-gradient(135deg, rgba(247, 229, 217, 0.95), rgba(228, 196, 176, 0.9));
}

.memory-photo::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255,255,255,0.48);
  border-radius: 16px;
}

.memory-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.memory-entry-1 .memory-photo img {
  object-position: center 32%;
}

.memory-entry-2 .memory-photo img {
  object-position: center 68%;
}

.album-ending {
  text-align: center;
  padding: 42px 24px;
  border-radius: 30px;
  background: rgba(255, 250, 245, 0.82);
  border: 1px solid rgba(96, 61, 43, 0.1);
  box-shadow: 0 22px 50px rgba(88, 47, 31, 0.1);
}

.album-ending h2 {
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.08;
}

.album-ending p {
  margin: 16px 0 26px;
  color: var(--muted);
  line-height: 1.8;
}

.gift-page {
  min-height: calc(100vh - 54px);
  display: grid;
  align-items: center;
}

.gift-panel {
  text-align: center;
  overflow: hidden;
}

.gift-orbit {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 28px auto 18px;
  border-radius: 50%;
  border: 1px solid rgba(213, 168, 94, 0.34);
}

.gift-orbit::before,
.gift-orbit::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px solid rgba(181, 98, 70, 0.2);
  animation: pulseRing 4s ease-in-out infinite;
}

.gift-orbit::after {
  inset: 44px;
  animation-delay: 1.2s;
}

.gift-core {
  position: absolute;
  inset: 50%;
  width: 112px;
  height: 112px;
  margin-left: -56px;
  margin-top: -56px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff8f3;
  box-shadow: 0 18px 36px rgba(138, 67, 51, 0.24);
  transform: rotate(8deg);
}

.gift-note {
  max-width: 520px;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.9;
}

@keyframes drift {
  from {
    transform: translateY(0) translateX(0);
  }
  to {
    transform: translateY(18px) translateX(-12px);
  }
}

@keyframes pulseRing {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.06);
    opacity: 0.8;
  }
}

@media (max-width: 820px) {
  .memory-photo {
    min-height: 56vh;
  }
}
