:root {
  --bg-deep: #020f4d;
  --bg-mid: #081a74;
  --gold: #f5d572;
  --gold-soft: #f2c850;
  --ivory: #f6f7ff;
  --muted: #cad0f2;
  --card: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Noto Sans KR", sans-serif;
  color: var(--ivory);
  background: radial-gradient(circle at 20% 10%, #1130ab 0%, transparent 35%),
    radial-gradient(circle at 80% 15%, #2945c0 0%, transparent 30%),
    linear-gradient(180deg, var(--bg-mid) 0%, var(--bg-deep) 100%);
  padding: 2rem 7vw 3.5rem;
  overflow-x: hidden;
}

.sky::before,
.sky::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.sky::before {
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.75) 0 1px, transparent 1px);
  background-size: 120px 120px;
  opacity: 0.45;
}

.sky::after {
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.28) 100%);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.register-btn {
  text-decoration: none;
  color: #091348;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-soft) 100%);
  border-radius: 999px;
  padding: 0.68rem 1.05rem;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(242, 200, 80, 0.35);
}

.hero {
  margin-top: 2.6rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.4rem;
  align-items: stretch;
  position: relative;
  z-index: 1;
}

.hero-copy {
  padding: 1rem 0.2rem 1rem 0;
  animation: fade-up 0.9s ease both;
}

.hero-side {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.invite-frame {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 0.9rem;
  box-shadow: 0 20px 45px rgba(0, 6, 31, 0.42);
  backdrop-filter: blur(10px);
  animation: fade-up 0.9s ease 0.1s both;
}

.invite-frame img {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.year {
  font-family: "Playfair Display", serif;
  font-size: clamp(3.2rem, 9vw, 6.2rem);
  color: var(--gold);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.03em;
  text-shadow: 0 0 28px rgba(245, 213, 114, 0.36);
}

h1 {
  margin-top: 0.35rem;
  font-size: clamp(1.7rem, 3.8vw, 2.85rem);
  line-height: 1.2;
}

.lead {
  margin-top: 1rem;
  max-width: 52ch;
  color: var(--muted);
  line-height: 1.65;
}

.chips {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.chips span {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  font-size: 0.93rem;
}

.info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 1.6rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 45px rgba(0, 6, 31, 0.42);
  animation: fade-up 0.9s ease 0.2s both;
}

.info-card h2 {
  font-family: "Playfair Display", serif;
  color: var(--gold);
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.item-title {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.item-value {
  margin-top: 0.35rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.primary-btn {
  display: inline-block;
  margin-top: 0.3rem;
  text-decoration: none;
  color: #06103f;
  background: linear-gradient(90deg, #f7df94, var(--gold-soft));
  padding: 0.72rem 1rem;
  border-radius: 12px;
  font-weight: 700;
}

.timeline {
  position: relative;
  z-index: 1;
  margin-top: 2rem;
  animation: fade-up 0.9s ease 0.25s both;
}

.timeline h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

.line {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.line article {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
}

.line h3 {
  font-size: 1rem;
  margin-bottom: 0.55rem;
}

.line p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1000px) {
  body {
    padding: 1.2rem 1rem 2rem;
  }

  .hero {
    margin-top: 1.7rem;
    grid-template-columns: 1fr;
  }

  .line {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .line {
    grid-template-columns: 1fr;
  }

  .register-btn {
    font-size: 0.9rem;
  }
}

/* Guestbook Styles */
.guestbook {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  animation: fade-up 0.9s ease 0.3s both;
}

.guestbook h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.guestbook-lead {
  color: var(--muted);
  margin-bottom: 2rem;
}

.guestbook-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
  margin-bottom: 3rem;
  background: var(--card);
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.guestbook-form input,
.guestbook-form textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem;
  color: var(--ivory);
  font-family: inherit;
}

.guestbook-form textarea {
  min-height: 100px;
  resize: vertical;
}

.guestbook-form button {
  cursor: pointer;
  border: none;
  align-self: flex-start;
}

.messages-list {
  display: grid;
  gap: 1rem;
}

.message-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem;
}

.message-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
}

.message-name {
  color: var(--gold);
  font-weight: 700;
}

.message-date {
  color: var(--muted);
  font-size: 0.8rem;
}

.message-body {
  line-height: 1.5;
  color: var(--ivory);
}

.loading, .empty, .error {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
}

