:root {
  --paper: #F4EFE4;
  --paper-deep: #EAE2D0;
  --ink: #2C4A46;
  --ink-soft: #4A6B65;
  --rose: #C97064;
  --mustard: #D9A441;
  --text: #262421;
  --radius: 4px;
}

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

body {
  background: var(--paper);
  color: var(--text);
  font-family: 'Noto Sans KR', sans-serif;
  line-height: 1.7;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(0,0,0,0.02) 0%, transparent 40%),
    radial-gradient(circle at 80% 60%, rgba(0,0,0,0.02) 0%, transparent 40%);
}

h1, h2 { font-family: 'Gowun Batang', serif; }

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  text-align: center;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.section-desc {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}

section { padding: 5rem 1.5rem; max-width: 1000px; margin: 0 auto; }

/* ===== HERO ===== */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  position: relative;
  background: var(--paper-deep);
}
.hero-tape {
  position: absolute;
  top: 40px;
  width: 120px;
  height: 34px;
  background: rgba(217, 164, 65, 0.55);
  transform: rotate(-3deg);
}
.hero-eyebrow {
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  color: var(--rose);
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.hero-title {
  font-size: clamp(3rem, 10vw, 5.5rem);
  color: var(--ink);
}
.hero-subtitle {
  margin-top: 1rem;
  font-size: 1.1rem;
  color: var(--ink-soft);
}
.hero-desc {
  margin-top: 1.8rem;
  max-width: 480px;
  color: var(--text);
}
.hero-scroll {
  margin-top: 3rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  font-size: 0.9rem;
}

/* ===== TIMELINE ===== */
.timeline-track {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border-left: 2px solid var(--paper-deep);
  padding-left: 2rem;
}
.timeline-item { position: relative; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.4rem;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rose);
}
.timeline-year {
  font-family: 'Gowun Batang', serif;
  color: var(--ink);
  font-weight: 700;
  display: block;
  margin-bottom: 0.2rem;
}
.timeline-text { color: var(--ink-soft); }

/* ===== GALLERY ===== */
.gallery-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 0.5rem;
}
.photo-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-deep);
  cursor: pointer;
  transform: rotate(0deg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  aspect-ratio: 4/3;
}
.photo-card:nth-child(odd) { transform: rotate(-1.5deg); }
.photo-card:nth-child(even) { transform: rotate(1.5deg); }
.photo-card:hover {
  transform: rotate(0deg) scale(1.03);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.photo-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.photo-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.photo-card:nth-last-child(2),
.photo-card:nth-last-child(1) {
  grid-column: span 2 !important;
}

.photo-card:nth-last-child(2) img,
.photo-card:nth-last-child(1) img,
.photo-card:nth-last-child(2) video,
.photo-card:nth-last-child(1) video {
  aspect-ratio: 4/3;
}

.lightbox video {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 8px;
  outline: none;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(38,36,33,0.92);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius);
}
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--paper);
  font-size: 2rem;
  cursor: pointer;
}

/* ===== MESSAGES ===== */
.message-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.message-card {
  background: var(--paper-deep);
  border-radius: var(--radius);
  padding: 1.2rem;
  font-size: 0.95rem;
  border-left: 3px solid var(--mustard);
}
.message-name {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-align: right;
}

/* ===== FOOTER ===== */
.site-footer {
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.footer-signature { margin-top: 0.5rem; color: var(--rose); }

/* ===== MUSIC TOGGLE ===== */
.music-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--ink);
  color: var(--paper);
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 50;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.music-toggle.playing { background: var(--rose); }

.music-tooltip {
  position: absolute;
  bottom: 130%; 
  right: 0;
  left: auto;
  transform: none;
  
  background-color: #222222;
  color: #ffffff;
  
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  
  opacity: 1;
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  z-index: 10;
}

.music-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 15px;
  left: auto;
  transform: none;
  border-width: 8px;
  border-style: solid;
  border-color: #222222 transparent transparent transparent;
}

.music-tooltip.fade-out {
  opacity: 0;
  transform: translateY(6px);
}

@media (max-width: 600px) {
  section { padding: 3.5rem 1.2rem; }
}