/**
 * @fileoverview 편지지 — 전면 디자인 개편 CSS
 * @generated 20260531_170000
 *
 * 적용 범위:
 *  1. 배경 종이 질감 + 커스텀 하트 커서
 *  2. 헤더 글라스모피즘
 *  3. 커버 섹션 강화 (높이, D+day 크기, wave divider)
 *  4. 피드 메이슨리 2열 레이아웃
 *  5. 로그인 페이지 풀스크린 glass card
 *  6. 꽃잎 파티클 스타일
 */

/* =========================================================================
   1. 배경 종이 질감 + 커스텀 하트 커서
   ========================================================================= */

/* 종이 질감 — 미세 도트 노이즈 패턴 */
body {
  background-color: #FFF5F0;
  background-image:
    radial-gradient(circle, rgba(201,168,76,0.07) 1px, transparent 1px),
    radial-gradient(circle, rgba(213,112,154,0.05) 1px, transparent 1px);
  background-size: 24px 24px, 48px 48px;
  background-position: 0 0, 12px 12px;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M14 24 C14 24 3 17 3 10 C3 6.5 5.5 4 8.5 4 C10.8 4 12.6 5.5 14 7.5 C15.4 5.5 17.2 4 19.5 4 C22.5 4 25 6.5 25 10 C25 17 14 24 14 24 Z' fill='%23FF69B4' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E") 14 14, auto;
}

/* 입력 요소는 text 커서 유지 */
input, textarea, [contenteditable] {
  cursor: text;
}
button, a, [role="button"], label[for] {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M14 24 C14 24 3 17 3 10 C3 6.5 5.5 4 8.5 4 C10.8 4 12.6 5.5 14 7.5 C15.4 5.5 17.2 4 19.5 4 C22.5 4 25 6.5 25 10 C25 17 14 24 14 24 Z' fill='%23FF1493' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E") 14 14, pointer;
}

/* =========================================================================
   2. 헤더 글라스모피즘
   ========================================================================= */

.site-header {
  background: rgba(255, 240, 245, 0.60) !important;
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid rgba(240, 184, 203, 0.40) !important;
}

.site-header--scrolled {
  background: rgba(255, 240, 245, 0.82) !important;
  box-shadow: 0 4px 20px rgba(123, 31, 58, 0.10) !important;
}

/* 로고 앞에 하트 추가 */
.site-header__logo::before {
  content: '🩷 ';
  font-size: 0.85em;
  -webkit-text-fill-color: initial;
  background: none;
}

/* =========================================================================
   3. 커버 섹션 강화
   ========================================================================= */

/* 높이 증가 */
.cover-section {
  height: 75vh !important;
  min-height: 420px !important;
}

/* 커버 배경 — overflow hidden 해제 (parallax용) */
.cover-section {
  overflow: hidden;
}

/* D+day — 더 크게 */
.cover-dday {
  font-size: clamp(4rem, 15vw, 9rem) !important;
  letter-spacing: -0.02em;
  line-height: 1;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.3));
}

/* 이름 */
.cover-names {
  font-size: clamp(1.6rem, 5vw, 3rem) !important;
  letter-spacing: 0.15em;
  opacity: 0.95;
}

/* 시작일 */
.cover-start-date {
  font-size: clamp(0.9rem, 2vw, 1.2rem) !important;
  letter-spacing: 0.2em;
  opacity: 0.75;
  margin-top: 0.5rem;
}

/* 커버 배경 parallax 대상 */
#cover-bg {
  will-change: transform;
  transform-origin: center top;
}

/* wave divider */
.cover-wave {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  z-index: 3;
  line-height: 0;
  pointer-events: none;
}
.cover-wave svg {
  display: block;
  width: 100%;
  height: clamp(40px, 6vw, 80px);
}

/* =========================================================================
   4. 피드 — 가로 스크롤 캐러셀
   ========================================================================= */

/* 피드 — 컨테이너 너비 제한 해제 */
section.feed.container {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  overflow: hidden;
  position: relative;
}

.feed__list {
  display: flex !important;
  flex-direction: row !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  scroll-snap-type: x mandatory !important;
  gap: 2rem !important;
  padding: 2.5rem 6vw !important;
  align-items: flex-start !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.feed__list::-webkit-scrollbar {
  display: none;
}

/* 카드 크기 */
.feed__list > .letter-card,
.feed__list > .polaroid {
  flex: 0 0 min(86vw, 340px) !important;
  width: min(86vw, 340px) !important;
  scroll-snap-align: center !important;
}

@media (min-width: 768px) {
  .feed__list > .letter-card,
  .feed__list > .polaroid {
    flex: 0 0 clamp(320px, 32vw, 460px) !important;
    width: clamp(320px, 32vw, 460px) !important;
  }
}

/* 카드 랜덤 회전 */
.feed__list > *:nth-child(3n+1) { --rotate: -2.5deg; }
.feed__list > *:nth-child(3n+2) { --rotate:  1.8deg; }
.feed__list > *:nth-child(3n+3) { --rotate: -1.2deg; }
.feed__list > *:nth-child(4n+1) { --rotate:  2.2deg; }
.feed__list > *:nth-child(4n+2) { --rotate: -1.5deg; }

/* 이전 / 다음 네비게이션 버튼 */
.feed-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 240, 245, 0.90);
  backdrop-filter: blur(8px);
  color: #B5476A;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(123,31,58,0.18);
  transition: background 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feed-nav:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.08);
}

.feed-nav--prev { left: 8px; }
.feed-nav--next { right: 8px; }

.feed-nav:disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* =========================================================================
   5. 로그인 페이지 — 풀스크린 glass card
   ========================================================================= */

.login-page {
  min-height: 100vh;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, #FFB7C5 0%, #FF69B4 35%, #DB7093 65%, #C2185B 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Ccircle cx='50' cy='50' r='40' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='1'/%3E%3C/svg%3E") !important;
  background-size: cover, 100px 100px !important;
  position: relative;
  overflow: hidden;
}

/* 배경 떠다니는 하트 장식들 */
.login-page::before {
  content: '❤️ 🩷 💕 💝 🌸 ✨ 💗 🌺';
  position: absolute;
  inset: 0;
  display: flex;
  flex-wrap: wrap;
  font-size: 2rem;
  opacity: 0.08;
  pointer-events: none;
  word-spacing: 3rem;
  line-height: 4rem;
  padding: 2rem;
  z-index: 0;
}

.login-card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.22) !important;
  backdrop-filter: blur(24px) saturate(1.5) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.45) !important;
  border-radius: 24px !important;
  padding: 3rem 2.5rem !important;
  width: 100%;
  max-width: 380px;
  box-shadow:
    0 20px 60px rgba(100, 0, 40, 0.30),
    0 0 0 1px rgba(255,255,255,0.15) !important;
  text-align: center;
  animation: login-card-in 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes login-card-in {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-card__icon {
  font-size: 3.5rem !important;
  display: block;
  margin-bottom: 0.75rem;
  animation: login-heart-beat 2s ease-in-out infinite;
}

@keyframes login-heart-beat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.login-card__title {
  font-family: 'Gaegu', 'Nanum Myeongjo', serif !important;
  font-size: 2rem !important;
  color: #fff !important;
  text-shadow: 0 2px 12px rgba(100,0,40,0.4);
  margin-bottom: 0.4rem;
}

.login-card__subtitle {
  color: rgba(255,255,255,0.80) !important;
  font-size: 1rem !important;
  margin-bottom: 1.8rem;
  font-family: 'Gaegu', cursive;
}

.login-card__input {
  width: 100%;
  background: rgba(255, 255, 255, 0.30) !important;
  border: 1px solid rgba(255, 255, 255, 0.50) !important;
  border-radius: 12px !important;
  padding: 0.85rem 1.2rem !important;
  color: #fff !important;
  font-size: 1.1rem !important;
  text-align: center;
  letter-spacing: 0.3em;
  transition: all 0.25s;
  font-family: inherit;
  box-sizing: border-box;
}

.login-card__input::placeholder {
  color: rgba(255,255,255,0.50);
  letter-spacing: 0.3em;
}

.login-card__input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.40) !important;
  border-color: rgba(255, 255, 255, 0.80) !important;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.15);
}

.login-card__btn {
  width: 100%;
  margin-top: 1rem;
  padding: 0.9rem !important;
  background: rgba(255, 255, 255, 0.90) !important;
  color: #B5476A !important;
  border: none !important;
  border-radius: 12px !important;
  font-size: 1.1rem !important;
  font-family: 'Gaegu', cursive !important;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: all 0.25s;
  cursor: pointer;
}

.login-card__btn:hover {
  background: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(100,0,40,0.25) !important;
}

.login-card__btn:active {
  transform: translateY(0);
}

.login-card__error {
  color: rgba(255, 220, 220, 0.95) !important;
  font-size: 0.9rem;
  margin-top: 0.75rem;
  min-height: 1.2em;
}

/* =========================================================================
   6. 꽃잎 파티클 스타일
   ========================================================================= */

.petal {
  position: fixed;
  top: -60px;
  pointer-events: none;
  user-select: none;
  z-index: 9;
  will-change: transform, opacity;
  font-size: 1.2rem;
  animation: petal-fall linear forwards;
}

@keyframes petal-fall {
  0% {
    transform: translateY(0) rotate(0deg) translateX(0);
    opacity: 0.9;
  }
  20% {
    transform: translateY(20vh) rotate(72deg) translateX(30px);
    opacity: 0.8;
  }
  40% {
    transform: translateY(40vh) rotate(144deg) translateX(-20px);
    opacity: 0.7;
  }
  60% {
    transform: translateY(60vh) rotate(216deg) translateX(25px);
    opacity: 0.5;
  }
  80% {
    transform: translateY(80vh) rotate(288deg) translateX(-15px);
    opacity: 0.3;
  }
  100% {
    transform: translateY(110vh) rotate(360deg) translateX(10px);
    opacity: 0;
  }
}

/* =========================================================================
   7. 기타 polish
   ========================================================================= */

/* 피드 컨테이너 여백 */
.feed {
  padding-top: var(--spacing-12, 3rem) !important;
}

/* 카드 hover — 살짝 들어올리기 강화 */
.polaroid:hover {
  transform: rotate(0deg) translateY(-6px) scale(1.02) !important;
  z-index: 10;
  position: relative;
}

/* 관리자 삭제 버튼 */
.polaroid__delete-btn {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #C0394B;
  color: #fff;
  border: 2px solid #fff;
  font-size: 0.75rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.polaroid:hover .polaroid__delete-btn {
  opacity: 1;
  transform: scale(1);
}

.polaroid__delete-btn:hover {
  background: #9b1c2e;
  transform: scale(1.15) !important;
}

/* 관리자 수정 버튼 */
.polaroid__edit-btn {
  position: absolute;
  top: -10px;
  right: 22px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #6979f8;
  color: #fff;
  border: 2px solid #fff;
  font-size: 0.75rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.polaroid:hover .polaroid__edit-btn {
  opacity: 1;
  transform: scale(1);
}

.polaroid__edit-btn:hover {
  background: #4e59d4;
  transform: scale(1.15) !important;
}

/* 수정 모달 */
.edit-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  align-items: center;
  justify-content: center;
}

.edit-modal--open {
  display: flex;
}

.edit-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.edit-modal__box {
  position: relative;
  z-index: 1;
  background: #fff9fc;
  border-radius: 20px;
  padding: 2rem 1.75rem;
  width: 92%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(100, 0, 40, 0.22);
  animation: edit-modal-in 0.3s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes edit-modal-in {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.edit-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(240,184,203,0.25);
  color: #B5476A;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.edit-modal__close:hover {
  background: rgba(240,184,203,0.55);
}

.edit-modal__title {
  font-family: 'Gaegu', 'Nanum Myeongjo', serif;
  font-size: 1.4rem;
  color: #B5476A;
  margin-bottom: 1.25rem;
  text-align: center;
}

.edit-modal__photo-section {
  text-align: center;
  margin-bottom: 1.25rem;
}

.edit-modal__photo-preview {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(240,184,203,0.4);
  background: #f8e8f0;
  display: block;
}

.edit-modal__photo-name {
  font-size: 0.8rem;
  color: var(--color-text-muted, #999);
  margin-top: 0.5rem;
}

.edit-modal__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

/* 앨범 필터 바 개선 */
.album-filter {
  background: rgba(255,240,245,0.8);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 0.75rem 1.25rem !important;
  border: 1px solid rgba(240,184,203,0.4);
}

/* =========================================================================
   카드 디테일 모달 (사진 + 편지 함께 보기)
   ========================================================================= */

.card-detail {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 8000;
  align-items: center;
  justify-content: center;
}

.card-detail--open {
  display: flex;
}

.card-detail__overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 0, 10, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.card-detail__inner {
  position: relative;
  z-index: 1;
  background: #fff9f5;
  border-radius: 20px;
  width: 92%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35);
  animation: card-detail-in 0.35s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  scrollbar-width: thin;
  scrollbar-color: rgba(181,71,106,0.3) transparent;
}

@keyframes card-detail-in {
  from { opacity: 0; transform: scale(0.93) translateY(24px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.card-detail__close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 5;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.40);
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.card-detail__close:hover {
  background: rgba(0, 0, 0, 0.65);
}

.card-detail__media {
  width: 100%;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  background: #1a0010;
  max-height: 58vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-detail__photo {
  width: 100%;
  max-height: 58vh;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.card-detail__video-iframe {
  width: 100%;
  aspect-ratio: 9 / 16;
  border: none;
  display: block;
  max-height: 58vh;
}

.card-detail__body {
  padding: 1.5rem 1.75rem 2rem;
  background:
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(181,71,106,0.08) 27px,
      rgba(181,71,106,0.08) 28px
    );
}

.card-detail__text {
  font-family: 'Gaegu', cursive;
  font-size: 1.15rem;
  line-height: 1.9;
  color: #3a1a2a;
  white-space: pre-wrap;
  margin-bottom: 1.25rem;
  word-break: break-word;
}

.card-detail__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.card-detail__date {
  font-family: 'Gaegu', cursive;
  font-size: 0.95rem;
  color: #B5476A;
  opacity: 0.85;
}

.card-detail__album-badge {
  font-family: 'Gaegu', cursive;
  font-size: 0.85rem;
  color: #B5476A;
  background: rgba(181, 71, 106, 0.10);
  border-radius: 20px;
  padding: 2px 10px;
}

/* =========================================================================
   업로드 — 사진/동영상 타입 토글
   ========================================================================= */

.upload-type-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background: rgba(240,184,203,0.15);
  border-radius: 12px;
  padding: 4px;
}

.upload-type-btn {
  flex: 1;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--color-text-muted, #888);
  font-family: 'Gaegu', cursive;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.upload-type-btn--active {
  background: #fff;
  color: #B5476A;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(181,71,106,0.12);
}

/* =========================================================================
   동영상 카드 — 플레이 버튼 오버레이
   ========================================================================= */

.polaroid__photo-wrap--video {
  position: relative;
}

.letter-card__play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 3;
  transition: background 0.2s, transform 0.2s;
  /* 플레이 아이콘 살짝 오른쪽 정렬 보정 */
  padding-left: 4px;
}

.polaroid__photo-wrap--video:hover .letter-card__play-btn {
  background: rgba(220, 50, 50, 0.85);
  transform: translate(-50%, -50%) scale(1.12);
}

/* 인라인 동영상 플레이어 */
.letter-card__video-iframe {
  width: 100%;
  aspect-ratio: 9 / 16;
  display: block;
  border: none;
  border-radius: 8px;
  background: #000;
}

/* 영상 재생 중 photo-wrap 높이 자동 확장 */
.polaroid__photo-wrap--video:has(.letter-card__video-iframe) {
  height: auto !important;
}

/* =========================================================================
   비디오 라이트박스
   ========================================================================= */

.lightbox__video-wrap {
  width: 100%;
  max-width: 860px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}

.lightbox__video {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .petal { animation: none; display: none; }
  #cover-bg { will-change: auto; }
  .login-card { animation: none; }
  .login-card__icon { animation: none; }
}

/* =========================================================================
   스켈레톤 UI
   ========================================================================= */

@keyframes skeleton-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}

.skeleton-block,
.skeleton-line {
  background: linear-gradient(
    90deg,
    #f0d0d8 25%,
    #fce8f0 50%,
    #f0d0d8 75%
  );
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: 4px;
}

.polaroid--skeleton {
  pointer-events: none;
  border: 2px solid rgba(201,168,76,0.15) !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06) !important;
}

.polaroid--skeleton .polaroid__photo-wrap.skeleton-block {
  height: 220px;
  border-radius: 2px;
  margin-bottom: 14px;
}

.skeleton-line {
  height: 12px;
  margin: 8px auto 0;
}
.skeleton-line--long  { width: 80%; }
.skeleton-line--short { width: 55%; }
.skeleton-line--date  { width: 35%; height: 10px; margin-top: 12px; }

/* =========================================================================
   스포트라이트 오버레이
   ========================================================================= */

.polaroid__spotlight {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  user-select: none;
  z-index: 4;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: radial-gradient(
    circle 120px at var(--sx, 50%) var(--sy, 50%),
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.06) 50%,
    transparent 100%
  );
}

/* polaroid overflow visible 유지 (tape 효과 때문에 이미 visible) */
.polaroid {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
}

/* =========================================================================
   모바일 햄버거 메뉴
   ========================================================================= */

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background 0.2s;
  z-index: 100;
}

.hamburger:hover {
  background: rgba(240,184,203,0.25);
}

.hamburger__line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-primary-700, #B5476A);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

/* 열린 상태 — X 모양 */
.hamburger--open .hamburger__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger--open .hamburger__line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger--open .hamburger__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 640px) {
  .hamburger {
    display: flex;
  }

  .site-header__nav {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 220px;
    height: 100vh;
    background: rgba(255, 240, 245, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 28px 32px;
    gap: 8px;
    box-shadow: -4px 0 24px rgba(123,31,58,0.14);
    z-index: 90;
    border-left: 1px solid rgba(240,184,203,0.4);
    transition: transform 0.35s cubic-bezier(0.22,0.61,0.36,1);
    transform: translateX(100%);
  }

  .site-header__nav.nav-open {
    display: flex;
    transform: translateX(0);
  }

  .site-header__nav-link {
    font-size: 1.3rem !important;
    padding: 10px 0 !important;
    width: 100%;
    border-bottom: 1px dashed rgba(240,184,203,0.5);
  }
}
