:root {
  --bg: #FFF9F2;
  --paper: #FFFDF9;
  --pink: #F8C8D4;
  --pink-deep: #EFA9BB;
  --blue: #C8DCF0;
  --sage: #D4E3D0;
  --brown: #6B5B4F;
  --brown-soft: #8B7A6D;
  --muted: #B8A99B;
  --line: #EFE4D6;
  --shadow: 0 10px 30px rgba(107, 91, 79, 0.08);
  --shadow-lg: 0 20px 45px rgba(107, 91, 79, 0.12);
  --radius: 28px;
  --radius-sm: 16px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(248, 200, 212, 0.35) 0, transparent 40%),
    radial-gradient(circle at 90% 30%, rgba(200, 220, 240, 0.4) 0, transparent 40%),
    radial-gradient(circle at 20% 80%, rgba(212, 227, 208, 0.35) 0, transparent 42%),
    var(--bg);
  min-height: 100vh;
  color: var(--brown);
  font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
button { font-family: inherit; }

/* 페이퍼 컨테이너 */
.paper {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 18px 60px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* 진입 애니메이션 */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 히어로 */
.hero {
  text-align: center;
  padding: 40px 20px 34px;
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.9) 0%, rgba(255, 253, 249, 0.5) 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.hero__ornaments {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero__ornaments .dot {
  position: absolute;
  border-radius: 50%;
  opacity: 0.55;
  filter: blur(1px);
}
.dot--pink  { width: 68px; height: 68px; background: var(--pink); top: 10px; left: -22px; }
.dot--blue  { width: 90px; height: 90px; background: var(--blue); top: 24%; right: -30px; opacity: 0.4; }
.dot--sage  { width: 54px; height: 54px; background: var(--sage); bottom: 20px; left: 30px; }

.hero__eyebrow {
  font-family: "Gaegu", cursive;
  font-size: 22px;
  color: var(--pink-deep);
  margin: 0 0 6px;
  letter-spacing: 2px;
}
.hero__name {
  font-family: "Gowun Batang", serif;
  font-size: 64px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--brown);
  letter-spacing: 4px;
}
.hero__sub {
  color: var(--brown-soft);
  margin: 0 0 26px;
  font-size: 14.5px;
  line-height: 1.75;
}

.hero__photo {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto 24px;
  border-radius: 50%;
  overflow: visible;
  background: var(--paper);
  padding: 8px;
  box-shadow: var(--shadow-lg);
}
.hero__photo svg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid var(--paper);
  outline: 2px dashed rgba(248, 200, 212, 0.6);
  outline-offset: 6px;
}
.hero__badge {
  position: absolute;
  right: -6px;
  bottom: 4px;
  width: 62px;
  height: 62px;
  background: var(--pink);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: "Gowun Batang", serif;
  font-weight: 700;
  font-size: 26px;
  box-shadow: 0 6px 16px rgba(239, 169, 187, 0.5);
  border: 4px solid var(--paper);
}
.hero__badge span {
  font-size: 12px;
  margin-left: 2px;
  align-self: flex-start;
  margin-top: 8px;
}

.hero__date {
  font-family: "Gowun Batang", serif;
  font-size: 22px;
  margin: 0;
  letter-spacing: 3px;
  color: var(--brown);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  display: inline-block;
}
.hero__date span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 5px;
  margin-top: 4px;
}

/* 공용 카드 */
.card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 24px;
}
.section-title {
  font-family: "Gowun Batang", serif;
  text-align: center;
  font-size: 22px;
  margin: 0 0 6px;
  color: var(--brown);
  letter-spacing: 2px;
}
.section-title::after {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  background: var(--pink);
  margin: 10px auto 0;
  border-radius: 2px;
}
.section-sub {
  text-align: center;
  color: var(--brown-soft);
  font-size: 13.5px;
  margin: 0 0 26px;
}

/* 초대 정보 */
.info__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.info__list li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 14px;
  background: linear-gradient(90deg, rgba(248, 200, 212, 0.08), rgba(200, 220, 240, 0.08));
  border-radius: var(--radius-sm);
}
.info__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--paper);
  display: grid;
  place-items: center;
  color: var(--pink-deep);
  box-shadow: 0 4px 10px rgba(239, 169, 187, 0.18);
}
.info__icon svg { width: 22px; height: 22px; }
.info__label {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 4px;
  letter-spacing: 1.5px;
}
.info__value {
  margin: 0;
  font-weight: 500;
  color: var(--brown);
  font-size: 15px;
}
.muted { color: var(--brown-soft); font-weight: 400; font-size: 13.5px; display: block; margin-top: 2px; }

/* 부모님 인사말 */
.greeting {
  text-align: center;
  background: linear-gradient(180deg, #FFFDF9 0%, #FDF4EA 100%);
  position: relative;
  padding-top: 44px;
}
.greeting__ribbon {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--pink);
  color: #fff;
  padding: 8px 20px;
  border-radius: 999px;
  font-family: "Gaegu", cursive;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(239, 169, 187, 0.35);
  letter-spacing: 1px;
}
.greeting__text {
  font-family: "Gowun Batang", serif;
  font-size: 15.5px;
  line-height: 2.1;
  color: var(--brown);
  margin: 8px 0 20px;
}
.greeting__sign {
  font-family: "Gaegu", cursive;
  font-size: 18px;
  color: var(--brown-soft);
  margin: 0;
}
.greeting__sign span {
  font-size: 12px;
  color: var(--muted);
  margin: 0 4px 0 8px;
}

/* 오시는 길 */
.map {
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(107, 91, 79, 0.08);
  margin-bottom: 18px;
}
.map svg { width: 100%; height: auto; display: block; }

.address {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: rgba(200, 220, 240, 0.18);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.address p {
  margin: 0;
  font-size: 14.5px;
  color: var(--brown);
  font-weight: 500;
  text-align: center;
}

.transit {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.transit li {
  font-size: 14px;
  color: var(--brown-soft);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--brown);
  flex-shrink: 0;
}
.badge--pink { background: var(--pink); color: #fff; }
.badge--blue { background: var(--blue); }
.badge--sage { background: var(--sage); }

/* 버튼 */
.btn {
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 500;
  font-size: 14.5px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn--pink {
  background: var(--pink);
  color: #fff;
  align-self: center;
  box-shadow: 0 6px 14px rgba(239, 169, 187, 0.35);
}
.btn--pink:hover { background: var(--pink-deep); }
.btn--primary {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--pink) 0%, var(--pink-deep) 100%);
  color: #fff;
  padding: 14px 24px;
  font-size: 15px;
  letter-spacing: 1px;
  margin-top: 6px;
  box-shadow: 0 8px 20px rgba(239, 169, 187, 0.4);
}
.btn--primary:hover { transform: translateY(-1px); }
.btn--primary:disabled { opacity: 0.6; cursor: wait; }

/* RSVP 폼 */
.rsvp__form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 12px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label,
.field__label {
  font-size: 13px;
  color: var(--brown-soft);
  font-weight: 500;
  letter-spacing: 0.5px;
}
.field input[type="text"],
.field input[type="number"],
.field select,
.field textarea {
  border: 1px solid var(--line);
  background: #FDFBF6;
  border-radius: 14px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--brown);
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(248, 200, 212, 0.25);
}
.field textarea { resize: vertical; min-height: 90px; }

@media (max-width: 420px) {
  .rsvp__form { grid-template-columns: 1fr; }
  .field--half { grid-column: 1 / -1; }
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  position: relative;
  flex: 1;
  min-width: 90px;
}
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: block;
  text-align: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #FDFBF6;
  font-size: 14px;
  color: var(--brown-soft);
  transition: all 0.15s ease;
}
.chip input:checked + span {
  background: var(--pink);
  color: #fff;
  border-color: var(--pink);
  box-shadow: 0 4px 10px rgba(239, 169, 187, 0.35);
}
.chip:hover span { border-color: var(--pink); }

.form-status {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  min-height: 18px;
  text-align: center;
  font-size: 13px;
}
.form-status.is-success { color: #6BA170; }
.form-status.is-error   { color: #C97170; }

/* 방명록 */
.guestbook__stats {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}
.guestbook__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gb-item {
  background: #FDFBF6;
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  border-left: 4px solid var(--pink);
  animation: bounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.gb-item:nth-child(3n) { border-left-color: var(--blue); }
.gb-item:nth-child(3n+1) { border-left-color: var(--sage); }
.gb-item__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.gb-item__name {
  font-weight: 700;
  color: var(--brown);
  font-size: 14.5px;
}
.gb-item__meta {
  font-size: 12px;
  color: var(--muted);
}
.gb-item__body {
  font-family: "Gowun Batang", serif;
  color: var(--brown);
  font-size: 14.5px;
  line-height: 1.75;
  margin: 0;
  word-break: break-word;
}
.gb-item__tag {
  display: inline-block;
  font-size: 11px;
  background: rgba(212, 227, 208, 0.45);
  color: var(--brown);
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 6px;
}
.gb-item__tag--no { background: rgba(184, 169, 155, 0.25); color: var(--brown-soft); }

.guestbook__empty {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 30px 10px;
  background: rgba(255, 249, 242, 0.6);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line);
}

/* 푸터 */
.foot {
  text-align: center;
  color: var(--brown-soft);
  padding: 20px 10px;
  font-size: 13px;
}
.foot__heart {
  font-size: 30px;
  color: var(--pink);
  margin: 0 0 8px;
  animation: heartbeat 2s infinite ease-in-out;
}
.foot p { margin: 4px 0; }
.foot__copy { color: var(--muted); font-size: 11.5px; margin-top: 12px; letter-spacing: 1px; }

/* 토스트 */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: var(--brown);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 999;
  max-width: calc(100% - 40px);
  text-align: center;
}
.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 애니메이션 */
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  10%, 30% { transform: scale(1.15); }
  20% { transform: scale(0.95); }
}
@keyframes bounceIn {
  0%   { opacity: 0; transform: scale(0.85) translateY(10px); }
  60%  { opacity: 1; transform: scale(1.03) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-2deg); }
  75% { transform: rotate(2deg); }
}

/* 아주 작은 화면 */
@media (max-width: 360px) {
  .hero__name { font-size: 52px; }
  .hero__photo { width: 190px; height: 190px; }
  .card { padding: 26px 18px; }
}
