/* === Remeet Common Styles === */

/* ── Base ── */
body {
  font-family: var(--font-main);
  color: var(--color-text);
  background-color: var(--color-bg-main);
  letter-spacing: var(--letter-spacing);
  line-height: var(--line-height-normal);
}

.container {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}

/* ── Section Header ── */
.section-header {
  text-align: center;
  margin-bottom: var(--gap-large);
}

.section-header__label {
  display: inline-block;
  font-size: var(--text-caption);
  font-weight: var(--weight-semibold);
  color: var(--color-accent-warm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--gap-xs);
}

.section-header__title {
  font-size: var(--text-section-title);
  font-weight: var(--weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
}

.section-header__divider {
  width: 60px;
  height: 2px;
  background: var(--gradient-divider);
  margin: var(--gap-small) auto 0;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-button);
  transition: all var(--transition-default);
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 16px 40px;
  font-size: var(--text-body);
  box-shadow: var(--shadow-button);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-button-hover);
  transform: translateY(-2px);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--small {
  padding: 10px 24px;
  font-size: var(--text-caption);
}

.btn--full {
  width: 100%;
}

/* ── Badge ── */
.badge--coming {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(201, 169, 110, 0.15);
  color: var(--color-accent-warm);
  font-size: 13px;
  font-weight: var(--weight-semibold);
}

/* ── Required ── */
.required {
  color: var(--color-accent-rose);
}

/* ═══════════════════════════════ */
/* HEADER                          */
/* ═══════════════════════════════ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  padding: 16px 0;
  transition: all var(--transition-default);
}

.header--scrolled {
  background: rgba(26, 35, 64, 0.95);
  backdrop-filter: blur(12px);
  padding: 12px 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.header__inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  display: flex;
  align-items: center;
}

.header__logo-text {
  font-size: 24px;
  font-weight: var(--weight-bold);
  color: var(--color-white);
  letter-spacing: 0.02em;
}

.header__nav {
  display: none;
}

.header__nav-list {
  display: flex;
  gap: 32px;
}

.header__nav-link {
  font-size: 15px;
  font-weight: var(--weight-regular);
  color: rgba(255, 255, 255, 0.8);
  transition: color var(--transition-fast);
}

.header__nav-link:hover {
  color: var(--color-white);
}

.header__cta {
  display: none;
}

/* ───────────────────────────────── */
/* 인증 버튼 (헤더 우측, 어두운 배경용) */
/* ───────────────────────────────── */
.header__auth-wrap {
  position: relative;
  margin-left: 8px;
  /* 모바일에선 헤더에서 숨기고 모바일 메뉴 안에서 보임 */
  display: none;
}

@media (min-width: 1024px) {
  .header__auth-wrap {
    display: block;
  }
}

.header__auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  min-height: 38px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: inherit;
}

.header__auth-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.7);
  color: #ffffff;
}

.header__auth-btn--logged-in {
  background: rgba(245, 180, 0, 0.12);
  border-color: rgba(245, 180, 0, 0.6);
  color: #f5c66e;
}

.header__auth-btn--logged-in:hover {
  background: rgba(245, 180, 0, 0.22);
  border-color: #f5b400;
  color: #ffd687;
}

.header__auth-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 260px;
  background: #ffffff;
  border: 1px solid #eae3d2;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  padding: 8px 0;
  z-index: 1000;
  font-size: 14px;
  overflow: hidden;
  display: none;
}

.header__auth-dropdown--open { display: block; }

.header__auth-dd-user {
  padding: 14px 18px;
  border-bottom: 1px solid #f3ebd9;
}

.header__auth-dd-user strong {
  display: block;
  font-weight: 700;
  color: #3a3530;
  font-size: 15px;
}

.header__auth-dd-user span {
  display: block;
  font-size: 12px;
  color: #8a7b5c;
  margin-top: 3px;
  word-break: break-all;
}

.header__auth-dd-section {
  padding: 8px 0;
  border-bottom: 1px solid #f3ebd9;
}

.header__auth-dd-title {
  padding: 6px 18px;
  font-size: 11px;
  color: #8a7b5c;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.header__auth-dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 18px;
  color: #3a3530;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  text-align: left;
  transition: background 0.15s ease;
}

.header__auth-dd-item:hover {
  background: #faf7f0;
}

.header__auth-dd-item--danger {
  color: #c0392b;
}

.header__auth-dd-item--danger:hover {
  background: #fff1ee;
}

.header__auth-fav-thumb {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  background: #f3ebd9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a7b5c;
  font-weight: 600;
  overflow: hidden;
}

.header__auth-fav-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header__auth-fav-info {
  flex: 1;
  min-width: 0;
}

.header__auth-fav-name {
  font-size: 13px;
  font-weight: 600;
  color: #3a3530;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header__auth-fav-date {
  font-size: 11px;
  color: #8a7b5c;
}

.header__auth-fav-empty {
  padding: 8px 18px;
  color: #8a7b5c;
  font-size: 12px;
}

/* Hamburger */
.header__menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  position: relative;
}

.header__menu-icon,
.header__menu-icon::before,
.header__menu-icon::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.header__menu-icon::before,
.header__menu-icon::after {
  content: '';
  position: absolute;
}

.header__menu-icon::before {
  transform: translateY(-7px);
}

.header__menu-icon::after {
  transform: translateY(7px);
}

/* Menu open state */
.header__menu-btn[aria-expanded="true"] .header__menu-icon {
  background: transparent;
}

.header__menu-btn[aria-expanded="true"] .header__menu-icon::before {
  transform: rotate(45deg);
}

.header__menu-btn[aria-expanded="true"] .header__menu-icon::after {
  transform: rotate(-45deg);
}

/* 메뉴 안 닫기 버튼 (X) */
.header__nav-close {
  display: none;
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 102;
}

.header__nav-close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
  transform: rotate(90deg);
}

.header__nav--open .header__nav-close {
  display: inline-flex;
}

@media (min-width: 1024px) {
  /* 데스크탑에선 메뉴 자체가 없으니 닫기 버튼도 항상 숨김 */
  .header__nav-close {
    display: none !important;
  }
}

/* Mobile nav overlay */
.header__nav--open {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 35, 64, 0.98);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99;
}

.header__nav--open .header__nav-list {
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.header__nav--open .header__nav-link {
  font-size: 20px;
  color: var(--color-white);
}

/* ───────────────────────────────── */
/* 모바일 메뉴 안 액션 영역 (CTA + 인증) */
/* ───────────────────────────────── */
.header__nav-actions {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  width: 100%;
  max-width: 280px;
}

.header__nav--open .header__nav-actions {
  display: flex;
}

@media (min-width: 1024px) {
  /* 데스크탑에선 햄버거 자체가 안 보이고 헤더에 직접 있으니 액션 영역 숨김 */
  .header__nav-actions {
    display: none !important;
  }
}

.header__nav-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  text-decoration: none;
  text-align: center;
}

.header__nav-action-btn--primary {
  background: var(--color-accent-warm, #c8a060);
  color: #fff;
  border: 1.5px solid var(--color-accent-warm, #c8a060);
}

.header__nav-action-btn--primary:hover {
  filter: brightness(1.1);
}

.header__nav-action-btn--outline {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
}

.header__nav-action-btn--outline:hover {
  background: rgba(255, 255, 255, 0.18);
}

.header__nav-user {
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  font-size: 14px;
  margin-bottom: -4px;
}

.header__nav-user strong {
  display: block;
  font-size: 18px;
  color: #f5c66e;
  margin-bottom: 2px;
}

/* Desktop header */
@media (min-width: 1024px) {
  .header__nav {
    display: flex;
  }

  .header__cta {
    display: inline-flex;
  }

  .header__menu-btn {
    display: none;
  }
}

/* ═══════════════════════════════ */
/* FOOTER                          */
/* ═══════════════════════════════ */
.footer {
  background: var(--color-bg-deep);
  color: rgba(255, 255, 255, 0.6);
  padding: 60px 0 32px;
  font-size: var(--text-caption);
  line-height: 1.8;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--gap-medium);
  padding-bottom: var(--gap-medium);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__logo {
  font-size: 20px;
  font-weight: var(--weight-bold);
  color: var(--color-white);
}

.footer__tagline {
  margin-top: 8px;
  font-family: var(--font-serif);
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__link {
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--color-white);
}

.footer__info p {
  margin-bottom: 4px;
}

.footer__copyright {
  padding-top: 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 12px;
}

@media (min-width: 768px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

/* ═══════════════════════════════ */
/* STICKY CTA (Mobile)              */
/* ═══════════════════════════════ */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky-cta);
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: rgba(26, 35, 64, 0.95);
  backdrop-filter: blur(12px);
  transform: translateY(100%);
  transition: transform var(--transition-default);
}

.sticky-cta--visible {
  transform: translateY(0);
}

.sticky-cta__btn {
  padding: 14px 24px;
}

@media (min-width: 1024px) {
  .sticky-cta {
    display: none;
  }
}

/* ═══════════════════════════════ */
/* TOAST                            */
/* ═══════════════════════════════ */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: var(--z-toast);
  padding: 14px 28px;
  border-radius: var(--radius-small);
  font-size: var(--text-caption);
  font-weight: var(--weight-semibold);
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-default);
}

.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast--success {
  background: var(--color-primary);
  color: var(--color-white);
}

.toast--error {
  background: #C0392B;
  color: var(--color-white);
}

/* ═══════════════════════════════ */
/* SCROLL REVEAL                    */
/* ═══════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-reveal), transform var(--transition-reveal);
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══ 약관 재동의 모달 (common.js가 모든 페이지에서 띄움 — 공통에 둬야 함) ═══ */
.consent-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.consent-modal {
  background: #fff;
  max-width: 480px;
  width: 100%;
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.consent-modal__title {
  font-size: 18px;
  font-weight: 800;
  color: #2a2622;
  margin: 0 0 8px;
}

.consent-modal__desc {
  font-size: 13px;
  color: #6b6158;
  margin: 0 0 20px;
  line-height: 1.6;
}

.consent-modal__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: #faf7f0;
  border-radius: 10px;
}

.consent-modal__submit {
  width: 100%;
  padding: 14px;
  background: #c8a060;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.consent-modal__submit:hover { background: #b08850; }
.consent-modal__submit:disabled { background: #c8baa6; cursor: not-allowed; }

.consent-modal__skip {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: none;
  border: none;
  color: #8a7b5c;
  font-size: 12px;
  cursor: pointer;
  padding: 8px;
  font-family: inherit;
}
.consent-modal__skip:hover { color: #3a3530; }
