/* ==========================================================================
   CYQUEEN — 공통 스타일. 모바일 390px 기준(피그마 1-1 Main 최종 수치), 900px 이상 PC 재배치.
   ========================================================================== */
:root {
  --ink: #222222;        /* 본문 */
  --ink-2: #525252;      /* 제목·보조 본문 */
  --muted: #767676;      /* 플레이스홀더·아이콘 */
  --menu-ink: #353535;
  --menu-sub: #6D6D6D;
  --line: #D4D4D4;
  --line-light: #E6E6E6;
  --line-faint: #F5F5F5;
  --rose: #FC437E;
  --rose-bg: #FFEFF4;
  --rose-bg-2: #FEF6F9;
  --gray-bg: #F5F5F5;
  --white: #fff;

  /* 단계 파스텔(심볼·카드) */
  --s1: #F5A3BE; --s2: #9CC9A2; --s3: #F3D35A; --s4: #C2A8E0; --s5: #A9D0F0;
  /* 단계 글자색 */
  --t1: #DA0656; --t2: #236631; --t3: #B28505; --t4: #632AC2; --t5: #0F6CB8;
  /* 카테고리 */
  --c-beauty: #D0356F; --c-joy: #C97A10; --c-health: #2E8B4A; --c-mind: #6A3FBF;

  --font: "Noto Sans KR", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --serif: "Times New Roman", Times, Georgia, serif;
  --font-hand: "Cafe24 Shiningstar", "Nanum Pen Script", cursive;

  --gutter: 16px;
  --max: 390px;
  --header-h: 78px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 17px/1.3 var(--font);
  letter-spacing: -0.02em;
  color: var(--ink);
  background: var(--white);
  word-break: keep-all;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { list-style: none; margin: 0; padding: 0; }
dl, dd, p, h1, h2, h3 { margin: 0; }

.page { min-height: 60vh; }
.container { max-width: var(--max); margin: 0 auto; padding: 20px var(--gutter) 40px; }
.muted { color: var(--muted); }
.chev { width: 24px; height: 24px; margin-left: auto; flex: 0 0 auto; }

/* 타이포 */
.wordmark { font-family: var(--serif); font-weight: 700; font-size: 24px; line-height: 1.15; letter-spacing: 0; color: #000; }
.h1 { font-size: 22px; font-weight: 700; line-height: 1.3; color: var(--ink-2); }
.h1 small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; letter-spacing: .06em; color: var(--muted); }
.h2 { display: flex; align-items: center; gap: 5px; font-size: 20px; font-weight: 700; line-height: 26px; color: var(--ink-2); }
.h2 img { width: 24px; height: 24px; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 14px; font-size: 15px; color: var(--ink-2); }

/* --------------------------------------------------------------------------
   헤더 (h78, 하단선 #E6E6E6)
   -------------------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line-light); }
.site-header__in {
  max-width: 1100px; margin: 0 auto; height: var(--header-h); padding: 10px var(--gutter);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
}
.brand-small { justify-self: start; }
.brand-small img { width: 106px; height: 27px; border-radius: 10px; }
.brand-center { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.symbol-row { display: flex; gap: 1px; }
.symbol-row img { width: 24px; height: 24px; }
/* 선 25×18, 오른쪽 끝이 화면 가장자리에서 25px (16 gutter + 3 margin + 6 padding) */
.menu-btn {
  justify-self: end; width: 25px; height: 18px; box-sizing: content-box; padding: 8px 6px; margin-right: 3px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.menu-btn span { display: block; height: 2px; width: 25px; background: var(--menu-ink); border-radius: 1px; }

/* --------------------------------------------------------------------------
   히어로: 핑크 바탕 + 흰 20px 테두리 카드 (배너 318×278 + 폼 318×306)
   -------------------------------------------------------------------------- */
.hero-wrap { background: var(--rose-bg); padding: 20px var(--gutter); }
.hero-card { max-width: 358px; margin: 0 auto; border: 20px solid var(--white); box-shadow: 0 0 10px rgba(0,0,0,.1); }
.hero { position: relative; height: 278px; }
/* 피그마 크롭(imageTransform x 0→0.7187): 원본 왼쪽 71.9% 만 노출 = cover + left */
.hero__photo {
  position: absolute; right: 0; top: -2px; width: 304px; height: 318px;
  object-fit: cover; object-position: left top;
}
.hero__copy { position: absolute; left: 18px; top: 21px; z-index: 1; }
.hero__title { font-size: 26px; line-height: 36.4px; letter-spacing: -0.04em; font-weight: 400; color: var(--ink); white-space: nowrap; }
.hero__title .hl { display: inline-block; vertical-align: top; margin-top: 2px; line-height: 32px; padding: 0 2px; background: var(--white); }
.hero__title em { font-style: normal; font-weight: 700; color: var(--rose); }
.hero__quote {
  position: absolute; left: 14px; top: 188px; z-index: 1;
  font: 400 30px/30px var(--font-hand); letter-spacing: -0.02em; color: var(--rose); white-space: nowrap;
}

.cycle-form { position: relative; z-index: 2; background: var(--white); padding: 20px 0; display: flex; flex-direction: column; gap: 20px; }
.fields { display: flex; flex-direction: column; gap: 10px; }
.field { display: grid; grid-template-columns: 145px 1fr; align-items: center; height: 45px; }
.field label { font-size: 17px; color: var(--ink); }
.input { position: relative; }
.input input, .input select {
  width: 100%; height: 45px; padding: 0 40px 0 10px;
  font: inherit; letter-spacing: inherit; color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-radius: 5px;
  appearance: none; -webkit-appearance: none;
}
.input input:focus, .input select:focus { outline: 2px solid var(--rose); outline-offset: -1px; border-color: var(--rose); }
.input select:invalid, .input select option[value=""] { color: var(--muted); }
.input__ico { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; pointer-events: none; }
/* date: 비어 있을 때 "날짜 선택" 표시 (Chrome/Safari) */
.input--date input:invalid::-webkit-datetime-edit { color: transparent; }
.input__ph { display: none; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input--date input:invalid + .input__ph { display: block; }
input[type="date"]::-webkit-calendar-picker-indicator { opacity: 0; position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.form-error { font-size: 14px; color: var(--rose); margin-top: -10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 45px; padding: 8px 40px 10px; border-radius: 30px;
  font-size: 17px; font-weight: 700; transition: filter .15s, transform .1s;
}
.btn:active { transform: scale(.985); }
.btn--rose { background: var(--rose); color: var(--white); }
.btn--rose:hover { filter: brightness(1.05); }
.btn--block { width: 100%; }

/* --------------------------------------------------------------------------
   여성주기 5단계 띠 (심볼 61, 이름 15/700, 태그 14)
   -------------------------------------------------------------------------- */
.stages-strip { max-width: var(--max); margin: 0 auto; padding: 30px var(--gutter); }
.section__title { display: flex; align-items: center; gap: 3px; font-size: 20px; font-weight: 700; line-height: 26px; color: var(--ink-2); margin-bottom: 20px; }
.section__title img { width: 24px; height: 24px; }
.section__title .chev { margin-left: 0; }
/* 열 폭은 피그마 프레임 폭(61·61·61·70·70), 나머지 여백을 균등 분배 */
.stages { position: relative; display: grid; grid-template-columns: 61px 61px 61px 70px 70px; justify-content: space-between; }
.stages::before { content: ""; position: absolute; top: 30px; left: 30px; right: 35px; height: 1px; background: var(--line); }
.stage a { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.stage__symbol { position: relative; z-index: 1; width: 61px; height: 61px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.12)); transition: transform .2s; }
.stage a:hover .stage__symbol { transform: translateY(-3px); }
.stage__name { font-size: 15px; font-weight: 700; line-height: 19.5px; letter-spacing: -0.04em; white-space: nowrap; color: var(--t); }
.stage__tag { font-size: 14px; line-height: 16.8px; letter-spacing: -0.04em; color: var(--ink-2); }

/* --------------------------------------------------------------------------
   3단: 오늘의 루틴 / 라이프 Q-MAP / 신간 (회색 바탕, 패널 r10)
   -------------------------------------------------------------------------- */
.section--gray { background: var(--gray-bg); padding: 30px var(--gutter); display: flex; flex-direction: column; gap: 20px; }
.section--gray > * { width: 100%; max-width: 358px; margin: 0 auto; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; gap: 15px; }
.panel--qmap { gap: 10px; }
.panel__head {
  display: flex; align-items: center; gap: 5px; padding-bottom: 15px; border-bottom: 1px solid var(--line);
  font-size: 20px; font-weight: 700; line-height: 26px; color: var(--ink-2);
}
.panel__head img { width: 24px; height: 24px; }
.routine-cats { display: flex; flex-direction: column; gap: 10px; }
.routine-cats div { display: flex; gap: 10px; line-height: 22px; }
.routine-cats dt { flex: 0 0 75px; color: var(--rose); }
.routine-cats dd { color: var(--ink-2); letter-spacing: -0.04em; }
.qmap-teaser { display: flex; align-items: center; gap: 30px; padding-left: 10px; }
.qmap-teaser img { width: 64px; height: 62px; flex: 0 0 auto; }
.qmap-teaser p { color: var(--ink-2); letter-spacing: -0.04em; line-height: 22px; }
.book-banner { display: flex; align-items: center; gap: 10px; background: var(--rose); border: 1px solid var(--line); border-radius: 10px; padding: 20px; color: var(--white); }
.book-banner > img { width: 24px; height: 24px; flex: 0 0 auto; }
.book-banner__txt { font-weight: 700; line-height: 22px; letter-spacing: -0.04em; }
.book-banner__txt small { display: block; font-size: 17px; font-weight: 400; }
.book-banner__more { display: flex; align-items: center; margin-left: auto; }
.book-banner__more .chev { margin-left: 0; }
.book-banner__more-txt { display: none; }

/* PC 전용 요소는 모바일에서 숨김 */
.gnb, .gnb-login, .footer-share { display: none; }
.site-footer__in { display: contents; }

/* --------------------------------------------------------------------------
   푸터 (로고 276, 글귀 13px)
   -------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line-faint); padding: 20px var(--gutter) 30px; display: flex; flex-direction: column; align-items: center; gap: 32px; text-align: center; }
.site-footer__logo { width: 276px; height: auto; }
.site-footer__lines { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.site-footer__site { display: flex; align-items: center; gap: 10px; font-size: 13px; line-height: 17px; letter-spacing: -0.04em; color: var(--ink-2); }
.site-footer__site strong { font-family: var(--serif); font-size: 15px; letter-spacing: 0; color: #000; }
.site-footer__site i { width: 1px; height: 9px; background: var(--line); }
.site-footer__biz { font-size: 13px; line-height: 19.5px; letter-spacing: -0.04em; color: var(--ink-2); }
.site-footer__biz a:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   ≡ 사이드 메뉴 (피그마 1-2 Menu)
   -------------------------------------------------------------------------- */
.menu { position: fixed; inset: 0; z-index: 100; }
.menu[hidden] { display: none; }
.menu__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.menu__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(336px, 86%);
  background: var(--white); overflow-y: auto; animation: slideIn .22s ease-out;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: none; } }
.menu__head { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--line-faint); }
.menu__head a { font-size: 17px; line-height: 22px; letter-spacing: -0.04em; color: var(--menu-sub); }
.menu__close { position: relative; width: 24px; height: 24px; }
.menu__close::before, .menu__close::after { content: ""; position: absolute; left: 0; top: 11px; width: 24px; height: 2px; background: var(--menu-ink); border-radius: 1px; }
.menu__close::before { transform: rotate(45deg); }
.menu__close::after { transform: rotate(-45deg); }
.menu__list > li > a, .menu__list > li > button {
  display: block; width: 100%; text-align: left; padding: 15px 20px;
  font-size: 17px; line-height: 22px; letter-spacing: -0.04em; color: var(--menu-ink); border-bottom: 1px solid var(--line);
}
.menu__sub { padding: 0 0 5px 20px; border-bottom: 1px solid var(--line); }
.menu__sub a { display: block; padding: 10px 20px; font-size: 17px; line-height: 22px; letter-spacing: -0.04em; color: var(--menu-sub); }
.menu__share { display: none; padding: 15px 20px 20px; border-bottom: 1px solid var(--line); }
.menu__share.is-open { display: block; }
.share-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.share-btns button { height: 40px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; color: var(--menu-ink); }
.share-btns button:hover { border-color: var(--rose); color: var(--rose); }
body.menu-open { overflow: hidden; }

.notice { padding: 12px 14px; margin-bottom: 14px; border-radius: 8px; background: var(--rose-bg-2); color: var(--rose); font-size: 15px; }
.error-page { text-align: center; padding-top: 60px; }
.error-page .btn { margin-top: 20px; }

/* --------------------------------------------------------------------------
   PC (≥900px) — 피그마에 PC 시안 없음, 자체 설계.
   헤더 GNB / 히어로 띠 + 떠 있는 폼 카드 / 5단계 카드 5장 / 3열 카드 / 푸터 가로
   -------------------------------------------------------------------------- */
@media (min-width: 900px) {
  /* 900~1099px(태블릿 가로): 본문은 PC 배치, 헤더는 ≡ 유지. 폭만 넓힘 */
  .site-header__in { max-width: 1200px; padding: 0 32px; }
  .menu-btn { margin-right: 0; }
  /* 히어로: 핑크 띠 전체폭, 카피 좌 + 모델 사진(띠 바닥에 서게, 원본 전체 폭 노출) + 오른쪽 떠 있는 폼 카드 */
  .hero-wrap { padding: 0; }
  .hero-card {
    max-width: 1200px; margin: 0 auto; padding: 0 32px; border: 0; box-shadow: none;
    display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: end;
  }
  .hero { height: 540px; }
  .hero__photo { top: auto; bottom: 0; right: 0; width: 640px; height: 540px; object-position: 60% top; }
  .hero__copy { left: 0; top: 96px; }
  .hero__title { font-size: 42px; line-height: 58px; }
  .hero__title .hl { line-height: 50px; margin-top: 4px; padding: 0 6px; }
  .hero__quote { left: 0; top: 356px; font-size: 40px; line-height: 44px; }
  .cycle-form { margin: 48px 0; padding: 32px; border-radius: 16px; box-shadow: 0 12px 32px rgba(252,67,126,.14); gap: 24px; }
  .cycle-form .h2 { font-size: 22px; }
  .fields { gap: 16px; }
  .field { grid-template-columns: 1fr; height: auto; gap: 6px; align-items: start; }
  .field label { font-size: 15px; color: var(--ink-2); }
  .input input, .input select { height: 48px; }
  .btn { height: 50px; }

  /* 5단계: 연결선 띠 대신 카드 5장 */
  .stages-strip { max-width: 1200px; padding: 56px 32px 48px; }
  .section__title { font-size: 24px; line-height: 32px; margin-bottom: 28px; }
  .section__title img { width: 28px; height: 28px; }
  .stages { grid-template-columns: repeat(5, 1fr); gap: 16px; justify-content: stretch; }
  .stages::before { display: none; }
  .stage a {
    gap: 10px; padding: 28px 12px 24px; background: var(--white); border: 1px solid var(--line); border-radius: 14px;
    transition: transform .2s, box-shadow .2s, border-color .2s;
  }
  .stage a:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.08); border-color: #F3CFDD; }
  .stage a:hover .stage__symbol { transform: none; }
  .stage__symbol { width: 96px; height: 96px; filter: none; }
  .stage__name { font-size: 18px; line-height: 24px; }
  .stage__tag { font-size: 15px; line-height: 20px; }
  .stage__tag br { display: none; }

  /* 3열 카드: 오늘의 루틴 / Q-MAP / 신간 */
  .section--gray { padding: 56px 32px; display: grid; grid-template-columns: repeat(3, minmax(0, 365px)); justify-content: center; gap: 20px; }
  .section--gray > * { max-width: none; margin: 0; }
  .panel { padding: 28px; gap: 20px; }
  .routine-cats { gap: 14px; }
  .qmap-teaser { flex-direction: column; align-items: flex-start; gap: 20px; padding-left: 0; }
  .qmap-teaser img { width: 88px; height: 85px; }
  .book-banner { flex-direction: column; align-items: flex-start; gap: 18px; padding: 28px; border-color: var(--rose); }
  .book-banner > img { width: 40px; height: 40px; }
  .book-banner__txt { font-size: 20px; line-height: 1.4; }
  .book-banner__txt small { font-size: 16px; margin-top: 6px; }
  .book-banner__more { margin-left: 0; margin-top: auto; gap: 2px; font-size: 15px; font-weight: 700; }
  .book-banner__more-txt { display: inline; }

  /* 푸터: 로고 좌 · 정보 우 + SNS 공유 버튼 */
  .site-footer { padding: 40px 32px 48px; gap: 0; }
  .site-footer__in { display: flex; width: 100%; max-width: 1200px; align-items: center; justify-content: space-between; gap: 32px; text-align: left; }
  .site-footer__lines { align-items: flex-start; gap: 8px; }
  .footer-share { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
  .footer-share span { font-size: 12px; font-weight: 700; color: var(--muted); margin-right: 6px; }
  .footer-share button { height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 14px; font-size: 12px; color: var(--ink-2); }
  .footer-share button:hover { border-color: var(--rose); color: var(--rose); }
}

/* 900~1099px: 히어로를 2열로 두기엔 좁음 → 카피+사진 한 줄, 폼은 아래 가로형 카드 */
@media (min-width: 900px) and (max-width: 1099px) {
  .hero-card { grid-template-columns: 1fr; gap: 0; }
  .hero { height: 480px; }
  .hero__photo { width: 580px; height: 490px; object-position: 55% top; }
  .hero__copy { top: 90px; }
  .hero__title { font-size: 38px; line-height: 54px; }
  .hero__title .hl { line-height: 46px; }
  .hero__quote { top: 330px; font-size: 36px; line-height: 40px; }
  .cycle-form { margin: 0 0 40px; padding: 28px 32px; flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 16px 20px; }
  .cycle-form .h2 { width: 100%; }
  .fields { flex: 1; flex-direction: row; gap: 16px; }
  .field { flex: 1; }
  .form-error { width: 100%; margin: 0; }
  .btn--block { width: auto; min-width: 200px; }
}

/* --------------------------------------------------------------------------
   PC 헤더 (≥1100px): 워드마크+5심볼 좌 / GNB 중앙(드롭다운) / 로그인 우. ≡·작은 로고 숨김
   -------------------------------------------------------------------------- */
@media (min-width: 1100px) {
  .site-header__in { height: 80px; grid-template-columns: auto 1fr auto; gap: 24px; }
  .brand-small, .menu-btn { display: none; }
  .brand-center { flex-direction: row; align-items: center; gap: 12px; }
  .wordmark { font-size: 26px; }
  .symbol-row img { width: 22px; height: 22px; }

  .gnb { display: block; justify-self: center; }
  .gnb > ul { display: flex; gap: 32px; }
  .gnb > ul > li { position: relative; }
  .gnb > ul > li > a {
    position: relative; display: block; padding: 28px 0; white-space: nowrap;
    font-size: 16px; font-weight: 700; line-height: 24px; letter-spacing: -0.02em; color: var(--menu-ink);
  }
  .gnb > ul > li > a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 20px; height: 2px; background: var(--rose);
    transform: scaleX(0); transition: transform .18s;
  }
  .gnb > ul > li:hover > a, .gnb > ul > li:focus-within > a { color: var(--rose); }
  .gnb > ul > li:hover > a::after { transform: scaleX(1); }
  .gnb__sub {
    position: absolute; top: 100%; left: 50%; transform: translate(-50%, -12px); min-width: 172px; padding: 8px 0;
    background: var(--white); border: 1px solid var(--line-light); border-radius: 10px; box-shadow: 0 10px 24px rgba(0,0,0,.08);
    opacity: 0; visibility: hidden; transition: opacity .15s, transform .15s;
  }
  .gnb > ul > li:hover > .gnb__sub, .gnb > ul > li:focus-within > .gnb__sub { opacity: 1; visibility: visible; transform: translate(-50%, -10px); }
  .gnb__sub a { display: block; padding: 10px 18px; font-size: 15px; color: var(--ink-2); white-space: nowrap; }
  .gnb__sub a:hover { background: var(--rose-bg-2); color: var(--rose); }
  .gnb-login { display: inline-flex; align-items: center; height: 38px; padding: 0 18px; border: 1px solid var(--line); border-radius: 19px; font-size: 14px; white-space: nowrap; color: var(--ink-2); }
  .gnb-login:hover { border-color: var(--rose); color: var(--rose); }
}
