:root {
  --ink: #060909;
  --night: #101816;
  --jade-deep: #12392f;
  --jade: #8bc79a;
  --mint: #d4f0d6;
  --cream: #fff3df;
  --gold: #d8bb72;
  --rose: #e9a4a8;
  --line: rgba(255, 243, 223, 0.18);
  --shadow: rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--cream);
  background:
    linear-gradient(90deg, rgba(216, 187, 114, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, #050807 0%, var(--night) 42%, #150f12 100%);
  background-size: 132px 132px, 100% 100%;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  line-height: 1.7;
}

body.entry-locked {
  overflow: hidden;
}

body.entry-locked .site-header,
body.entry-locked main,
body.entry-locked .site-footer {
  opacity: 0;
  filter: blur(16px);
  pointer-events: none;
  transform: scale(1.018) translateY(10px);
}

body.entry-unlocked .site-header,
body.entry-unlocked main,
body.entry-unlocked .site-footer {
  animation: pageEnter 900ms cubic-bezier(0.2, 0.82, 0.22, 1) both;
}

.entry-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: clamp(22px, 5vw, 56px);
  overflow: hidden;
  color: var(--cream);
  background: #050807;
  transition: opacity 760ms ease, filter 760ms ease, transform 760ms ease;
}

.entry-gate.is-leaving {
  opacity: 0;
  filter: blur(18px);
  transform: scale(1.035);
  pointer-events: none;
}

.entry-gate[hidden] {
  display: none;
}

.entry-bg,
.entry-glow,
.entry-rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.entry-bg {
  object-fit: cover;
  opacity: 0.72;
  transform: scale(1.04);
}

.entry-glow {
  background:
    linear-gradient(90deg, rgba(5, 8, 7, 0.92), rgba(5, 8, 7, 0.4) 50%, rgba(5, 8, 7, 0.92)),
    linear-gradient(180deg, rgba(5, 8, 7, 0.48), rgba(18, 57, 47, 0.24) 46%, rgba(21, 15, 18, 0.86));
}

.entry-rings {
  opacity: 0.44;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(216, 187, 114, 0.18) 50%, transparent calc(50% + 1px)),
    repeating-linear-gradient(135deg, rgba(255, 243, 223, 0.045) 0 1px, transparent 1px 24px);
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
}

.entry-content {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  width: min(680px, 100%);
  text-align: center;
}

.entry-charm {
  width: clamp(154px, 24vw, 238px);
  aspect-ratio: 1;
  margin-bottom: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(216, 187, 114, 0.32);
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.4), 0 0 42px rgba(139, 199, 154, 0.2);
  animation: charmFloat 4200ms ease-in-out infinite;
}

.entry-content h1 {
  max-width: 680px;
  font-size: clamp(2.65rem, 7vw, 5.8rem);
}

.entry-content > p:last-of-type {
  max-width: 540px;
  margin: 22px 0 0;
  color: rgba(255, 243, 223, 0.82);
  font-size: clamp(1rem, 2vw, 1.16rem);
}

.entry-form {
  display: grid;
  gap: 12px;
  width: min(420px, 100%);
  margin-top: 30px;
}

.entry-form label {
  color: rgba(255, 243, 223, 0.76);
  font-size: 0.92rem;
}

.entry-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.entry-input-row input,
.entry-input-row button {
  min-height: 54px;
  border: 1px solid rgba(216, 187, 114, 0.34);
  border-radius: 999px;
  color: var(--cream);
  background: rgba(5, 8, 7, 0.66);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.entry-input-row input {
  width: 100%;
  padding: 0 22px;
  text-align: center;
  font-size: 1.35rem;
  letter-spacing: 0;
  outline: none;
}

.entry-input-row input:focus {
  border-color: rgba(216, 187, 114, 0.72);
  box-shadow: 0 0 0 4px rgba(216, 187, 114, 0.12), 0 18px 44px rgba(0, 0, 0, 0.28);
}

.entry-input-row button {
  min-width: 104px;
  padding: 0 24px;
  color: #101816;
  background: linear-gradient(135deg, var(--gold), #f3dc98);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.entry-input-row button:hover,
.entry-input-row button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.36), 0 0 24px rgba(216, 187, 114, 0.22);
  outline: none;
}

.entry-input-row button:disabled,
.entry-input-row input:disabled {
  cursor: default;
  opacity: 0.68;
}

.entry-message {
  min-height: 28px;
  margin: 0;
  color: rgba(255, 243, 223, 0.68);
  font-size: 0.92rem;
}

.entry-gate.is-wrong .entry-form {
  animation: entryShake 360ms ease;
}

img {
  display: block;
  max-width: 100%;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 56px);
  background: linear-gradient(180deg, rgba(5, 8, 7, 0.86), rgba(5, 8, 7, 0));
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 700;
}

.brand-dot {
  width: 18px;
  height: 18px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, var(--mint), var(--jade) 46%, var(--jade-deep) 78%);
  box-shadow: 0 0 28px rgba(139, 199, 154, 0.4);
}

.nav-links {
  gap: clamp(14px, 3vw, 30px);
  color: rgba(255, 243, 223, 0.82);
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--gold);
}

.yuling-hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(340px, 1.12fr);
  gap: clamp(28px, 6vw, 86px);
  align-items: center;
  padding: 110px clamp(18px, 6vw, 88px) 70px;
  overflow: hidden;
}

.hero-bg,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-bg {
  object-fit: cover;
  opacity: 0.78;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(5, 8, 7, 0.92), rgba(5, 8, 7, 0.55) 48%, rgba(5, 8, 7, 0.22)),
    linear-gradient(180deg, rgba(5, 8, 7, 0.35), rgba(5, 8, 7, 0.7));
}

.hero-copy,
.hero-portraits {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-label {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.95rem;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-family: "SimSun", "Songti SC", serif;
  font-size: clamp(3rem, 7.5vw, 6.8rem);
  line-height: 1.02;
  text-wrap: balance;
  text-shadow: 0 18px 44px var(--shadow);
}

.hero-copy p:last-child {
  max-width: 640px;
  color: rgba(255, 243, 223, 0.86);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.hero-portraits {
  min-height: 650px;
}

.hero-photo,
.photo-card {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.hero-photo {
  position: absolute;
  overflow: hidden;
  border: 1px solid rgba(216, 187, 114, 0.36);
  border-radius: 8px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.38);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.hero-photo:hover img {
  transform: scale(1.04);
}

.main-photo {
  right: 12%;
  bottom: 0;
  width: min(420px, 58vw);
  height: 620px;
}

.side-photo {
  width: 210px;
  height: 270px;
}

.side-photo.top {
  top: 26px;
  left: 0;
}

.side-photo.bottom {
  right: 0;
  top: 170px;
  width: 280px;
  height: 190px;
}

.nickname-panel,
.photo-story,
.memory-strip,
.surprise-boxes,
.memory-gallery {
  width: min(1120px, calc(100% - 36px));
  margin-inline: auto;
}

.nickname-panel {
  position: relative;
  display: grid;
  grid-template-columns: 0.85fr 1fr auto;
  gap: clamp(24px, 5vw, 68px);
  align-items: center;
  padding: clamp(72px, 10vw, 120px) 0 48px;
}

.nickname-panel h2,
.story-heading h2,
.memory-strip h2,
.surprise-heading h2,
.gallery-heading h2 {
  margin: 0;
  font-family: "SimSun", "Songti SC", serif;
  font-size: clamp(2rem, 4.8vw, 4.4rem);
  line-height: 1.14;
  text-wrap: balance;
}

.nickname-panel p:last-of-type,
.memory-strip p,
.surprise-heading p {
  color: rgba(255, 243, 223, 0.78);
  font-size: clamp(1rem, 2vw, 1.12rem);
}

.panzi-mascot {
  width: min(150px, 28vw);
  border-radius: 50%;
  filter: drop-shadow(0 22px 40px rgba(0, 0, 0, 0.34));
}

.jade-ornament {
  border: 1px solid rgba(216, 187, 114, 0.26);
  background: rgba(255, 243, 223, 0.04);
}

.photo-story {
  padding: 40px 0 clamp(74px, 10vw, 118px);
}

.story-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.story-card {
  min-height: 270px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(139, 199, 154, 0.12), rgba(233, 164, 168, 0.07)),
    rgba(8, 18, 15, 0.82);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.24);
}

.story-card span {
  color: var(--gold);
  font-family: Georgia, serif;
}

.story-card h3 {
  margin: 72px 0 12px;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.story-card p {
  margin: 0;
  color: rgba(255, 243, 223, 0.74);
}

.memory-strip {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(28px, 6vw, 78px);
  align-items: center;
  padding: clamp(40px, 7vw, 72px);
  border: 1px solid rgba(216, 187, 114, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(216, 187, 114, 0.12), transparent 36%),
    rgba(255, 243, 223, 0.045);
}

.jade-charm {
  width: 220px;
  border-radius: 8px;
}

.surprise-boxes {
  padding: clamp(72px, 10vw, 120px) 0 0;
}

.surprise-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.surprise-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.surprise-button {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 172px;
  padding: 18px 12px;
  border: 1px solid rgba(216, 187, 114, 0.24);
  border-radius: 8px;
  color: var(--cream);
  background:
    radial-gradient(circle at 50% 0%, rgba(233, 164, 168, 0.14), transparent 46%),
    linear-gradient(160deg, rgba(139, 199, 154, 0.14), rgba(255, 243, 223, 0.045)),
    rgba(8, 18, 15, 0.8);
  cursor: pointer;
  text-align: center;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.surprise-button:hover,
.surprise-button:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(216, 187, 114, 0.62);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.28);
  outline: none;
}

.surprise-button img {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
}

.surprise-button span {
  font-family: "SimSun", "Songti SC", serif;
  font-size: 1.05rem;
}

.memory-gallery {
  padding: clamp(76px, 11vw, 128px) 0;
}

.gallery-heading {
  margin-bottom: 28px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.photo-card {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  border: 1px solid rgba(216, 187, 114, 0.22);
  border-radius: 8px;
  background: rgba(255, 243, 223, 0.04);
}

.photo-card.wide {
  grid-column: span 2;
}

.photo-card img {
  width: 100%;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
  transition: transform 260ms ease, filter 260ms ease;
}

.photo-card:hover img,
.photo-card:focus-visible img {
  transform: scale(1.05);
  filter: saturate(1.08) brightness(1.05);
}

.photo-card span {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(216, 187, 114, 0.24);
  border-radius: 999px;
  background: rgba(5, 8, 7, 0.64);
  color: var(--cream);
  text-align: center;
  backdrop-filter: blur(8px);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 26px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: rgba(255, 243, 223, 0.68);
}

.portrait-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(3, 7, 6, 0.78);
  backdrop-filter: blur(8px);
}

.surprise-backdrop {
  position: fixed;
  inset: 0;
  z-index: 82;
  background: rgba(3, 7, 6, 0.74);
  backdrop-filter: blur(8px);
}

.portrait-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 90;
  width: min(900px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(216, 187, 114, 0.38);
  border-radius: 8px;
  background: rgba(7, 12, 11, 0.96);
  transform: translate(-50%, -50%);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.6);
}

.surprise-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 92;
  width: min(560px, calc(100% - 28px));
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid rgba(216, 187, 114, 0.42);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(233, 164, 168, 0.18), transparent 36%),
    linear-gradient(145deg, rgba(139, 199, 154, 0.14), rgba(255, 243, 223, 0.055)),
    #07100e;
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.62);
  text-align: center;
  transform: translate(-50%, -50%);
}

.surprise-panel[hidden],
.surprise-backdrop[hidden] {
  display: none;
}

.surprise-panel img {
  width: 142px;
  height: 142px;
  border: 1px solid rgba(216, 187, 114, 0.26);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
}

.surprise-panel h2 {
  margin: 0;
  max-width: 460px;
  font-family: "SimSun", "Songti SC", serif;
  font-size: clamp(1.55rem, 4vw, 2.55rem);
  line-height: 1.34;
  text-wrap: balance;
}

.surprise-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(216, 187, 114, 0.46);
  border-radius: 50%;
  color: var(--cream);
  background: rgba(6, 9, 9, 0.72);
  cursor: pointer;
  font-size: 1.55rem;
  line-height: 1;
}

.portrait-modal[hidden],
.portrait-backdrop[hidden] {
  display: none;
}

.portrait-modal img {
  width: 100%;
  max-height: calc(100vh - 138px);
  border-radius: 6px;
  object-fit: contain;
}

.portrait-modal p {
  margin: 0;
  color: rgba(255, 243, 223, 0.82);
  text-align: center;
}

.portrait-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(216, 187, 114, 0.46);
  border-radius: 50%;
  color: var(--cream);
  background: rgba(6, 9, 9, 0.74);
  cursor: pointer;
  font-size: 1.65rem;
  line-height: 1;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.modal-open {
  overflow: hidden;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    filter: blur(14px);
    transform: scale(1.018) translateY(10px);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: scale(1) translateY(0);
  }
}

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

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

@keyframes entryShake {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-7px);
  }

  75% {
    transform: translateX(7px);
  }
}

@media (max-width: 980px) {
  .site-header {
    position: absolute;
  }

  .nav-links {
    display: none;
  }

  .yuling-hero,
  .nickname-panel,
  .story-grid,
  .memory-strip,
  .surprise-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

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

  .yuling-hero {
    padding-top: 96px;
  }

  .entry-content h1 {
    max-width: 560px;
  }

  .hero-portraits {
    min-height: 620px;
  }

  .main-photo {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(390px, 78vw);
    height: 570px;
  }

  .side-photo.top {
    left: 2%;
  }

  .side-photo.bottom {
    right: 2%;
  }

  .panzi-mascot {
    width: 132px;
  }

  .photo-card.wide {
    grid-column: span 1;
  }
}

@media (max-width: 560px) {
  .yuling-hero {
    min-height: auto;
  }

  .entry-gate {
    padding: 20px 14px;
  }

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

  .entry-input-row button {
    width: 100%;
  }

  h1 {
    font-size: clamp(2.55rem, 14vw, 4rem);
  }

  .hero-portraits {
    min-height: 520px;
  }

  .main-photo {
    width: min(330px, 86vw);
    height: 490px;
  }

  .side-photo {
    width: 148px;
    height: 190px;
  }

  .side-photo.bottom {
    width: 188px;
    height: 132px;
    top: 210px;
  }

  .nickname-panel,
  .photo-story,
  .memory-strip,
  .surprise-boxes,
  .memory-gallery {
    width: min(100% - 28px, 1120px);
  }

  .surprise-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .surprise-button {
    min-height: 150px;
  }

  .memory-strip {
    padding: 24px;
  }

  .jade-charm {
    width: 150px;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-height: 760px) {
  .entry-gate {
    padding-block: 16px;
  }

  .entry-charm {
    width: clamp(128px, 22vh, 178px);
    margin-bottom: 14px;
  }

  .entry-content h1 {
    font-size: clamp(2.2rem, 8.2vh, 4.2rem);
  }

  .entry-content > p:last-of-type {
    margin-top: 14px;
    font-size: 1rem;
  }

  .entry-form {
    margin-top: 18px;
  }

  .entry-input-row input,
  .entry-input-row button {
    min-height: 48px;
  }
}
