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

body {
  margin: 2px;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  color: #ffffff;
  background-color: #af614b
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
  padding: clamp(0.85rem, 2vw, 1rem) clamp(1.5rem, 8vw, 6rem);
  background-color: #af614b;
  border-bottom: 1px solid #DDD6C8;
  transform: translateY(0);
  transition: transform 0.3s ease;
  will-change: transform;
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

/* padding-top은 Header 숨김 상태와 상관없이 항상 고정한다.
   Header가 사라질 때 이 값을 0으로 줄이면 문서 전체 높이(scrollHeight)가
   즉시 바뀌면서, 브라우저가 현재 스크롤 위치를 새 최대치로 강제 보정(clamp)
   한다. 이 보정 자체가 큰 스크롤 이동처럼 감지되어 Header를 반대로 다시
   동작시키는 피드백 루프를 만들었다(콘텐츠가 짧은 화면일수록 두드러짐).
   padding을 고정해 문서 높이를 Header 상태와 무관하게 안정적으로 유지한다. */
#app {
  padding-top: var(--header-height, 10rem);
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.2rem, 2.6vw, 2.25rem);
  min-width: 0;
}

.header-top {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.search-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid #DDD6C8;
  border-radius: 999px;
  background-color: #FFFDFA;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.search-area:focus-within {
  border-color: #7A5C3E;
}

.search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: none;
  color: #111;
  cursor: pointer;
}

.search-icon {
  width: 16px;
  height: 16px;
}

.search-box {
  width: 120px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.8rem;
  color: #111;
  cursor: pointer;
}

.search-box::placeholder {
  color: #999;
}

.search-box:focus {
  outline: none;
}

.search-btn:focus-visible,
.search-box:focus-visible {
  outline: 2px solid #7A5C3E;
  outline-offset: 2px;
}

.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #111;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger-btn.is-active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.is-active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger-btn.is-active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hamburger-btn:focus-visible {
  outline: 2px solid #7A5C3E;
  outline-offset: 3px;
}

.logo {
  width: 100%;
  min-width: 0;
  text-align: center;
}

.brand-logo {
  display: inline-block;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: clamp(1.4rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #f7f4f4;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.25s ease;
}

.brand-logo:hover {
  color: #7A5C3E;
}

.brand-logo:focus-visible {
  outline: 2px solid #7A5C3E;
  outline-offset: 4px;
}

.main-nav ul {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(12px, 2vw, 20px);
  list-style: none;
}

.main-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  color: #FFF9F5;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  font-size: clamp(14px, 1.2vw, 17px);
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 4px 14px rgba(70, 35, 25, 0.10);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.main-nav a:hover {
  background: rgba(255, 255, 255, 0.20);
  border-color: rgba(255, 255, 255, 0.72);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.20),
    0 8px 20px rgba(70, 35, 25, 0.16);
}

.main-nav a[aria-current="page"] {
  background: #FFF8F2;
  border-color: #FFF8F2;
  color: #A95742;
  box-shadow:
    0 6px 18px rgba(70, 35, 25, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.main-nav a[aria-current="page"]:hover {
  background: #FFFFFF;
  color: #9C4E3C;
}

.main-nav a:active {
  transform: translateY(0) scale(0.98);
}

.main-nav a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 4px;
}

@media (min-width: 768px) and (max-width: 1199px) {
  .site-header {
    padding-left: clamp(1.5rem, 5vw, 3rem);
    padding-right: clamp(1.5rem, 5vw, 3rem);
  }

  .search-box {
    width: 90px;
  }
}

@media (max-width: 767px) {
  .site-header {
    padding-left: 20px;
    padding-right: 20px;
  }

  .header-inner {
    align-items: stretch;
  }

  .brand-logo {
    font-size: clamp(1.1rem, 7.5vw, 2.2rem);
  }

  .search-box {
    display: none;
  }

  .search-area {
    border-radius: 50%;
    padding: 0.55rem;
  }

  .hamburger-btn {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #F7F3EC;
    border-bottom: 1px solid #DDD6C8;
    box-shadow: 0 12px 24px rgba(17, 17, 17, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 50;
  }

  .main-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 0.75rem 20px 1.5rem;
  }

  .main-nav a {
    display: flex;
    width: min(88%, 360px);
    margin: 0 auto;
    min-height: 52px;
    padding: 0 20px;
    border-radius: 6px;
    background: rgba(169, 87, 66, 0.08);
    border-color: rgba(169, 87, 66, 0.25);
    color: #7A4636;
    font-size: 1rem;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
  }

  .main-nav a:active {
    background: rgba(169, 87, 66, 0.18);
    border-color: rgba(169, 87, 66, 0.4);
    color: #5B3226;
  }

  .main-nav a[aria-current="page"] {
    background: #A95742;
    border-color: #A95742;
    color: #FFF8F2;
    box-shadow: none;
  }

  .main-nav a[aria-current="page"]:hover {
    background: #93493A;
    color: #FFFFFF;
  }
}

@media (max-width: 390px) {
  .main-nav ul {
    gap: 8px;
  }

  .main-nav a {
    width: min(90%, 360px);
    min-height: 52px;
    padding: 0 16px;
    font-size: 0.9rem;
  }
}

body.no-scroll {
  overflow: hidden;
}

.ad-banner {
  width: 100%;
  padding: 2rem clamp(1.5rem, 8vw, 6rem) 0;
}

/* Title Bar와 슬라이드가 하나의 카드 그룹처럼 보이도록, 폭 기준을
   이 컨테이너 하나에만 둔다. 두 요소 모두 width:100%로 이 폭을
   그대로 따르므로 좌우 시작선이 항상 일치한다. */
.banner-content {
  max-width: 360px;
  margin: 0 auto;
}

.banner-content .section-title {
  width: 100%;
  margin: 0 0 0.875rem;
  padding: 0.85rem 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.banner-content .section-title h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.0125em;
  color: #222;
}

.banner-content .splide {
  width: 100%;
}

.ad-banner .splide__slide {
  aspect-ratio: 1036 / 1600;
  height: auto;
}

.banner-slide {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.banner-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem 1.25rem 1.25rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  color: #FFFDFA;
  text-align: left;
}

.banner-caption-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.banner-caption-desc {
  font-size: 0.85rem;
  line-height: 1.5;
  opacity: 0.9;
}

.section-title {
  width: 100%;
  background-color: #FFFDFA;
  border: 1px solid #DDD6C8;
  border-radius: 10px;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  text-align: left;
}

.section-title h2 {
  font-weight: 700;
  font-size: 1rem;
}

.site-footer {
  border-top: 1px solid #DDD6C8;
  padding: 2rem clamp(1.5rem, 8vw, 6rem);
  text-align: center;
  color: #8A8378;
  font-size: 0.85rem;
}


.page-section {
  padding: 2.5rem clamp(1.5rem, 8vw, 6rem) 4rem;
}

.iframe-page {
  width: 100%;
  /* Header의 테라코타와 끊김 없이 이어지도록 동일한 배경색을 쓴다. */
  background-color: #AF614B;
  padding-top: 52px;
  padding-left: clamp(1.5rem, 8vw, 2.75rem);
  padding-right: clamp(1.5rem, 8vw, 2.75rem);
  padding-bottom: 4rem;
  /* 카드가 고정 Header 아래로 자연스럽게 겹쳐 들어가도록 끌어올린다.
     Header는 z-index:1000의 고정 요소라 항상 카드보다 위에 그려지므로
     겹치는 구간에서도 Header 자체는 가려지지 않는다. 이 겹침 덕분에
     Header 바로 아래부터 Soft Linen 배경이 끊김 없이 이어진다. */
  margin-top: -60px;
}

@media (max-width: 1199px) {
  .iframe-page {
    margin-top: -40px;
  }
}

@media (max-width: 767px) {
  .iframe-page {
    margin-top: -30px;
  }
}

@keyframes embed-frame-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.embed-frame {
  display: block;
  width: 100%;
  /* iframe 문서가 postMessage로 실제 높이를 알려주면 js/pages.js가 바로 정확한
     값으로 맞춘다(체크리스트/결과지 모두, origin 무관하게 동작). 이 값은 그
     메시지가 도착하기 전 아주 짧은 순간에만 쓰이는 최소 기본값이라, 예전처럼
     결과지(내용이 짧음)에서 수백~수천 px의 빈 여백이 남지 않는다. */
  min-height: 400px;
  border: none;
  border-radius: 0;
  box-shadow: none;
  animation: embed-frame-enter 0.4s ease-out both;
  /* scrollIntoView()로 이 iframe을 화면에 보일 때, 고정 Header에
     가려지지 않도록 그만큼 위쪽 여유를 둔다. */
  scroll-margin-top: calc(var(--header-height, 10rem) + 20px);
}

@media (prefers-reduced-motion: reduce) {
  .embed-frame {
    animation: none;
  }
}

.app-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 480px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
}

.form-field input,
.form-field select,
.form-field textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid #DDD6C8;
  border-radius: 8px;
  background-color: #FFFDFA;
  color: #111;
}

.form-field textarea {
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: #7A5C3E;
}

.app-btn {
  align-self: flex-start;
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 999px;
  background-color: #7A5C3E;
  color: #FFFDFA;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.app-btn:hover {
  opacity: 0.85;
}

.app-btn:focus-visible {
  outline: 2px solid #7A5C3E;
  outline-offset: 3px;
}

.form-result {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid #DDD6C8;
  border-radius: 10px;
  background-color: #FFFDFA;
  font-size: 0.9rem;
  color: #333;
}

.point-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem 1.5rem;
}

.point-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}

.point-media {
  position: relative;
  width: 100%;
}

.point-media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  background-color: #EFE8DB;
  display: block;
}

.like-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background-color: rgba(255, 253, 250, 0.8);
  color: #7A5C3E;
  font-size: 1.05rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.like-btn:focus-visible {
  outline: 2px solid #7A5C3E;
  outline-offset: 2px;
}

@keyframes heart-pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

.like-btn.is-animating {
  animation: heart-pop 0.3s ease;
}

.point-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.like-count {
  font-size: 0.8rem;
  color: #ffffff;
}

.point-desc {
  font-size: 0.8rem;
  color: #ffffff;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .point-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── 프리미엄 랜딩 섹션 (홈 화면, Footer 위) ───────────────────── */

.landing {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 8vw, 6rem);
}

.landing-block {
  padding: clamp(3rem, 10vw, 6rem) 0;
  text-align: center;
}

.landing-block + .landing-block {
  border-top: 1px solid #DDD6C8;
}

.landing-title {
  font-size: clamp(1.6rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}

.landing-subtitle {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.landing-body {
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  line-height: 1.8;
  color: #ffffff;
  max-width: 560px;
  margin: 0 auto;
}

.recommend-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  text-align: left;
}

@media (min-width: 640px) {
  .recommend-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .recommend-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.recommend-card {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
  background-color: #FFFDFA;
  border: 1px solid #DDD6C8;
  border-radius: 14px;
}

.recommend-card p {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.0125em;
  color: #222;
}

.top-list {
  list-style: none;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
}

.top-list-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background-color: #FFFDFA;
  border: 1px solid #DDD6C8;
  border-radius: 12px;
}

.top-list-rank {
  width: 1.5rem;
  flex-shrink: 0;
  font-weight: 700;
  color: #7A5C3E;
  text-align: center;
}

.top-list-name {
  flex: 1;
  font-weight: 500;
  color: #222;
}

.top-list-count {
  font-size: 0.85rem;
  color: #8A8378;
}

.top-list-loading {
  padding: 1rem;
  text-align: center;
  color: #8A8378;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-width: 720px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .stat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat-card {
  padding: 2rem 1rem;
  background-color: #FFFDFA;
  border: 1px solid #DDD6C8;
  border-radius: 14px;
}

.stat-value {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #df7002;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.85rem;
  color: #8A8378;
}

.landing-cta-btn {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.9rem 2.25rem;
  background: #FFFFFF;
  border: 1px solid #D9D1C7;
  color: #1F1F1F;
  border-radius: 16px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.landing-cta-btn:hover {
  background: #FAF8F5;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.09);
  transform: translateY(-1px);
}

.landing-cta-btn:focus-visible {
  outline: 2px solid #7A5C3E;
  outline-offset: 3px;
}

@media (max-width: 767px) {
  .landing-cta-btn {
    width: 100%;
    text-align: center;
    padding: 1rem 1.5rem;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.scroll-top-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background-color: #3F3F3F;
  color: #FFFFFF;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, background-color 0.2s ease;
  z-index: 900;
}

.scroll-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background-color: #545454;
  transform: translateY(-2px);
}

.scroll-top-btn:focus-visible {
  outline: 2px solid #7A5C3E;
  outline-offset: 3px;
}

.scroll-top-icon {
  width: 20px;
  height: 20px;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-top-btn {
    transition: opacity 0.25s ease, visibility 0.25s;
  }
}

@media (max-width: 767px) {
  .scroll-top-btn {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }

  .scroll-top-icon {
    width: 18px;
    height: 18px;
  }
}

/* ===== Seminar signup (embedded external page) ===== */
.seminar-embed-page {
  width: 100%;
  min-height: calc(100vh - var(--header-height, 10rem));
  margin: 0;
  padding: 0 0 24px;
  background: #f8f6f2;
  overflow: hidden;
}

.seminar-signup-frame {
  display: block;
  width: 100%;
  min-height: 1100px;
  margin: 0;
  padding: 0;
  border: 0;
  background: #f8f6f2;
}

@media (max-width: 768px) {
  .seminar-embed-page {
    width: 100%;
    min-height: calc(100vh - 72px);
  }

  .seminar-signup-frame {
    width: 100%;
    min-height: 1200px;
  }
}

/* ===== Auth (Supabase) ===== */
.auth-area {
  display: flex;
  align-items: center;
  min-width: 0;
}

.auth-login-btn[hidden],
.auth-user[hidden] {
  display: none;
}

.auth-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 1.1rem;
  max-width: 100%;
  border: 1px solid #D9D1C7;
  border-radius: 16px;
  background: #FFFFFF;
  color: #1F1F1F;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.auth-login-btn:hover {
  background: #FAF8F5;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.09);
  transform: translateY(-1px);
}

.auth-login-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
}

.auth-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 100%;
  min-width: 0;
}

.auth-user-email {
  font-size: 0.8rem;
  color: #FFF9F5;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 0.9rem;
  max-width: 100%;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: transparent;
  color: #FFF9F5;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.auth-logout-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.auth-logout-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.auth-profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 0.9rem;
  max-width: 100%;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: transparent;
  color: #FFF9F5;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.auth-profile-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.auth-profile-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  /* 배경(뒷 페이지)은 고정하고, 모달 레이어 자체를 스크롤 컨테이너로 써서
     카드가 화면보다 길어져도 아래쪽까지 스크롤해서 볼 수 있게 한다. */
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 24px 16px;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.auth-modal-card {
  position: relative;
  width: min(100% - 16px, 360px);
  max-width: 100%;
  /* 카드 자체도 한 번 더 스크롤 가능하게 둬서, 아주 낮은 화면에서도
     회원가입 버튼과 하단 링크까지 항상 스크롤해서 도달할 수 있게 한다. */
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  padding: 2.75rem 1.75rem 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  text-align: center;
  color: #FFFDFA;
  opacity: 0;
  transform: translateY(8px);
  animation: auth-modal-in 0.2s ease both;
}

@keyframes auth-modal-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-modal-card {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.auth-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.65);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.auth-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.auth-modal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0 auto 1.1rem;
  color: #FFFDFA;
}

.auth-modal-icon svg {
  width: 100%;
  height: 100%;
}

.auth-modal-title {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #FFFDFA;
  margin-bottom: 0.6rem;
}

.auth-modal-desc {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.98);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  text-align: left;
}

.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.98);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 0 10px rgba(255, 255, 255, 0.12);
  margin-bottom: 0.5rem;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  color: #B0A99C;
  pointer-events: none;
}

.auth-field input,
.auth-field select {
  width: 100%;
  max-width: 100%;
  min-height: 54px;
  padding: 0 16px 0 46px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 17px;
  font: inherit;
  font-size: 15px;
  color: #2E2A26;
  background: #fff;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.auth-field select {
  cursor: pointer;
}

#auth-password {
  padding-right: 46px;
}

.auth-field input::placeholder {
  color: #B0A99C;
}

.auth-field input:focus,
.auth-field select:focus {
  outline: none;
  border-color: #7A5C3E;
  box-shadow: 0 0 0 3px rgba(122, 92, 62, 0.16);
}

.auth-field-error {
  font-size: 12.5px;
  color: #FFD9CC;
  margin-top: 0.5rem;
}

.auth-checkbox-field[hidden] {
  display: none;
}

.auth-checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.98);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 0 10px rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.auth-checkbox-field input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 0.1rem;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 4px;
  background: transparent;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.auth-checkbox-field input[type="checkbox"]:checked {
  background: #FFFFFF;
  border-color: #FFFFFF;
}

.auth-checkbox-field input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #AF614B;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.auth-checkbox-field input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.auth-required,
.auth-optional {
  color: #F4C6B2;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(244, 198, 178, 0.45);
}

.auth-field-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 0.4rem;
}

.auth-toggle-password {
  position: absolute;
  right: 14px;
  width: 22px;
  height: 22px;
  border: none;
  background: none;
  color: #B0A99C;
  cursor: pointer;
  padding: 0;
}

.auth-toggle-password svg {
  width: 100%;
  height: 100%;
}

.auth-toggle-password[aria-pressed="true"] {
  color: #7A5C3E;
}

.auth-error {
  font-size: 13px;
  color: #FFD9CC;
  text-align: center;
  margin: -0.35rem 0 0;
}

.auth-notice {
  font-size: 14px;
  font-weight: 600;
  color: #3A2E2A;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(175, 97, 75, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: center;
  line-height: 1.5;
  margin: -0.35rem 0 0;
}

.auth-resend-btn[hidden] {
  display: none;
}

.auth-resend-btn {
  display: block;
  width: 100%;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.98);
  font-weight: 700;
  font-size: 13px;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  padding: 0;
  margin: 0.15rem 0 0;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.auth-resend-btn:hover:not(:disabled),
.auth-resend-btn:focus-visible:not(:disabled) {
  color: #F4C6B2;
}

.auth-resend-btn:disabled {
  opacity: 0.65;
  cursor: default;
  text-decoration: none;
}

.auth-submit-btn {
  width: 100%;
  max-width: 100%;
  min-height: 52px;
  border: 1px solid #D9D1C7;
  border-radius: 16px;
  background: #FFFFFF;
  color: #1F1F1F;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.35rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.auth-submit-btn:hover:not(:disabled) {
  background: #FAF8F5;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.09);
  transform: translateY(-1px);
}

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.auth-switch-mode {
  margin-top: 1.5rem;
  font-size: 13.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.98);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.auth-switch-link {
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.98);
  font-weight: 700;
  font-size: 13.5px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  padding: 0;
  margin-left: 0.3rem;
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.auth-switch-link:hover,
.auth-switch-link:focus-visible {
  color: #F4C6B2;
  text-shadow: 0 0 10px rgba(244, 198, 178, 0.5);
  text-decoration: underline;
}

@media (max-width: 767px) {
  .auth-login-btn {
    min-height: 36px;
    padding: 0 0.85rem;
    font-size: 0.78rem;
  }

  .auth-user {
    gap: 0.4rem;
  }

  .auth-user-email {
    max-width: 60px;
  }

  .auth-profile-btn,
  .auth-logout-btn {
    min-height: 32px;
    padding: 0 0.6rem;
    font-size: 0.72rem;
  }

  .auth-modal-card {
    padding: 2.25rem 24px 1.75rem;
  }
}

/* ===== Products ===== */
.products-loading,
.products-empty {
  text-align: center;
  color: #ffffff;
  font-size: 0.9rem;
  padding: 2rem 0;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem 1.5rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}

.product-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background-color: #EFE8DB;
  overflow: hidden;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background-color: #7A5C3E;
  color: #FFFDFA;
  font-size: 0.7rem;
  font-weight: 700;
  z-index: 1;
}

.product-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
}

.product-summary {
  font-size: 0.8rem;
  color: #ffffff;
  line-height: 1.4;
}

.product-price {
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
}

.product-buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  padding: 0 1.25rem;
  margin-top: 0.25rem;
  border-radius: 16px;
  background: #FFFFFF;
  border: 1px solid #D9D1C7;
  color: #1F1F1F;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.product-buy-btn:hover {
  background: #FAF8F5;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.09);
  transform: translateY(-1px);
}

.product-buy-btn:focus-visible {
  outline: 2px solid #7A5C3E;
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1rem;
  }
}

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