:root {
  --bg: #fff5f7;
  --panel: #fffafb;
  --panel-strong: #ffffff;
  --ink: #3f3136;
  --muted: #7f6870;
  --line: #f0cfd8;
  --rose: #d96b8b;
  --rose-dark: #ad4768;
  --green: #6f8f7b;
  --gold: #b78b4d;
  --shadow: 0 20px 60px rgba(160, 82, 104, 0.16);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 245, 247, 0.95), rgba(255, 250, 251, 0.96)),
    repeating-linear-gradient(0deg, transparent 0 30px, rgba(217, 107, 139, 0.05) 31px 32px);
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: rgba(255, 250, 251, 0.88);
  border-bottom: 1px solid rgba(240, 207, 216, 0.72);
  backdrop-filter: blur(14px);
}

.brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
}

.nav-links a, .link-button {
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.page-shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 80px;
}

.page-shell.narrow { width: min(760px, calc(100% - 32px)); }

.hero-panel, .auth-card, .form-card, .detail-card, .intro-card, .empty-state {
  background: rgba(255, 250, 251, 0.88);
  border: 1px solid rgba(240, 207, 216, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: clamp(28px, 6vw, 64px);
  margin-bottom: 34px;
}

.hero-panel h1, .auth-card h1, .intro-card h1, .form-card h1, .detail-card h1 {
  margin: 0;
  font-size: clamp(30px, 6vw, 56px);
  line-height: 1.18;
  letter-spacing: 0;
}

.hero-panel p, .intro-lead, .muted {
  color: var(--muted);
  line-height: 1.8;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--rose-dark);
  font-size: 13px;
  text-transform: uppercase;
}

.hero-actions, .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
}

.primary-button, .secondary-button, .danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
}

.primary-button {
  background: var(--rose);
  color: #fff;
}

.secondary-button {
  background: #fff;
  color: var(--rose-dark);
  border-color: var(--line);
}

.danger-button {
  background: #fff;
  color: #9b2f45;
  border-color: #ecc0ca;
}

.full { width: 100%; }

.timeline-list, .answer-list {
  display: grid;
  gap: 18px;
}

.moment-card {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 20px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(240, 207, 216, 0.8);
  border-radius: 8px;
}

.moment-card.pinned { border-color: rgba(183, 139, 77, 0.55); }
.moment-card time, .reveal-moment time { color: var(--gold); font-weight: 700; }
.moment-content h2, .reveal-moment h2 { margin: 6px 0 10px; font-size: 24px; }
.moment-content p, .reveal-moment p, .prose { color: var(--muted); line-height: 1.85; }

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--green);
  font-size: 13px;
}

.card-meta span {
  border: 1px solid rgba(111, 143, 123, 0.24);
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(255, 255, 255, 0.64);
}

.thumb-row, .image-grid, .reveal-images, .existing-images {
  display: grid;
  gap: 10px;
}

.thumb-row { grid-template-columns: repeat(3, 86px); margin-top: 14px; }
.thumb-row img, .existing-images img {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 8px;
}

.auth-shell, .intro-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card, .intro-card, .form-card, .detail-card {
  width: min(620px, 100%);
  padding: clamp(24px, 5vw, 44px);
}

.auth-card.wide { width: min(880px, 100%); }
.intro-card { width: min(860px, 100%); }

.stack-form, .form-grid {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.form-section h2 { font-size: 18px; margin: 0 0 12px; }

label { display: grid; gap: 8px; color: var(--muted); }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}

textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(217, 107, 139, 0.12); }

.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.checkbox-line { display: flex; align-items: center; gap: 10px; }
.checkbox-line input { width: auto; }
.form-error { color: #9b2f45; background: #fff0f3; border: 1px solid #f0c0cb; padding: 12px; border-radius: 8px; }
.form-success { color: #416b4d; background: #f0fbf3; border: 1px solid #bfdfc8; padding: 12px; border-radius: 8px; }

.intro-start {
  display: grid;
  gap: 18px;
}

.intro-start .primary-button {
  width: fit-content;
}

.question-step { display: none; margin-top: 28px; }
.question-step.active { display: block; animation: rise 360ms ease both; }
.step-count { color: var(--gold); font-weight: 700; }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.option-button {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.option-button:hover, .option-button.chosen { border-color: var(--rose); color: var(--rose-dark); background: #fff4f7; }

.reveal-stage { margin-top: 30px; }
.soft-line { color: var(--muted); }
.reveal-list { display: grid; gap: 18px; margin-top: 18px; }
.reveal-moment {
  padding: 22px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  animation: rise 540ms ease both;
}
.reveal-images { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 14px; }
.reveal-images img, .image-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
}
.closing-note { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.closing-note p { color: var(--muted); line-height: 1.9; }

.image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 22px 0; }
.existing-images { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.image-delete { align-items: start; }
.image-delete span { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.image-delete input { width: auto; }
.detail-meta { margin: 16px 0; }
.split { justify-content: space-between; }
.empty-state { padding: 28px; text-align: center; }

.answer-list { margin-top: 18px; }
.answer-card {
  padding: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(240, 207, 216, 0.8);
  border-radius: 8px;
}
.answer-item {
  padding: 14px 0;
  border-top: 1px solid rgba(240, 207, 216, 0.72);
}
.answer-item p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.7;
}
.answer-item strong {
  color: var(--rose-dark);
  font-size: 18px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .nav-links { width: 100%; overflow-x: auto; }
  .moment-card { grid-template-columns: 1fr; }
  .form-grid, .two-cols, .option-grid, .image-grid, .reveal-images { grid-template-columns: 1fr; }
  .hero-panel h1, .auth-card h1, .intro-card h1, .form-card h1, .detail-card h1 { font-size: 34px; }
}