/* =========================================================================
   청춘IP 공통 상단 헤더 (include/yn_header.inc.php)
   index_new.php 와 같은 디자인. 기존 페이지(default.css / common.css)에서도 같게 보이도록
   토큰과 초기화를 헤더 안에만 둡니다. 페이지 본문에는 영향을 주지 않습니다.
   ========================================================================= */

.yn-header, .yn-skip {
  --yn-ink: #14171c;
  --yn-ink-2: #3d434d;
  --yn-ink-3: #5f6672;
  --yn-line: #e2e5ea;
  --yn-line-strong: #c9ced6;
  --yn-surface: #f2f4f7;
  --yn-white: #ffffff;
  --yn-blue: #1a64e0;
  --yn-shadow: 0 18px 40px -18px rgba(20, 23, 28, .22), 0 2px 6px rgba(20, 23, 28, .06);
  --yn-ease: cubic-bezier(.16, 1, .3, 1);
  --yn-gutter: clamp(16px, 4vw, 40px);
  --yn-max: 1260px;
  --yn-header-h: 76px;
}

/* ---------- 헤더 안 초기화 (기존 CSS 가 스며들지 않게) ---------- */
.yn-header {
  position: sticky; top: 0; z-index: 900;
  display: block; width: 100%; margin: 0; padding: 0;
  background: rgba(255, 255, 255, .97);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", sans-serif;
  font-size: 16px; line-height: 1.5; letter-spacing: -0.01em; color: var(--yn-ink);
  text-align: left; word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
.yn-header *, .yn-header *::before, .yn-header *::after { box-sizing: border-box; font-family: inherit; }
.yn-header ul, .yn-header li { margin: 0; padding: 0; list-style: none; background: none; border: 0; float: none; width: auto; height: auto; }
.yn-header a { color: inherit; text-decoration: none; background: none; text-indent: 0; }
.yn-header a:hover, .yn-header a:focus { text-decoration: none; }
.yn-header img { display: block; border: 0; max-width: none; }
.yn-header button { font: inherit; color: inherit; cursor: pointer; }
.yn-header :focus-visible, .yn-skip:focus-visible { outline: 3px solid var(--yn-blue); outline-offset: 3px; border-radius: 8px; }
.yn-header.is-scrolled { border-bottom-color: var(--yn-line); }
.yn-header [hidden] { display: none !important; }

.yn-header .yn-sr, .yn-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.yn-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.yn-header .yn-ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.yn-skip { position: absolute; left: 16px; top: -60px; z-index: 1000; padding: 10px 16px; border-radius: 999px; background: var(--yn-ink); color: #fff !important; font: 700 14px/1.2 "Pretendard Variable", Pretendard, "Malgun Gothic", sans-serif; text-decoration: none !important; }
.yn-skip:focus { top: 12px; }

.yn-header .yn-wrap { width: 100%; max-width: calc(var(--yn-max) + var(--yn-gutter) * 2); margin: 0 auto; padding-left: var(--yn-gutter); padding-right: var(--yn-gutter); }

/* ---------- 막대: 로고 · 주 메뉴 · 회원 메뉴 ---------- */
.yn-header__bar { display: flex; align-items: center; gap: 24px; height: var(--yn-header-h); }
.yn-logo { flex: none; display: block; }
.yn-header .yn-logo img { width: auto; height: 58px; }

.yn-gnb { flex: 1; display: flex; justify-content: center; }
.yn-header .yn-gnb__list { display: flex; gap: clamp(4px, 1vw, 14px); }
.yn-header .yn-gnb__item { position: relative; }
.yn-gnb__link { position: relative; display: flex; align-items: center; height: var(--yn-header-h); padding: 0 10px; font-size: 16px; font-weight: 650; letter-spacing: -0.02em; white-space: nowrap; color: var(--yn-ink); transition: color .15s; }
.yn-header .yn-gnb__link:hover, .yn-header .yn-gnb__item:hover > .yn-gnb__link, .yn-header .yn-gnb__item:focus-within > .yn-gnb__link { color: #EC4000; }
/* 마우스를 올리면 글자 밑 검은 바가 가운데부터 양옆으로 퍼짐 (지금 보고 있는 메뉴는 펼친 채로) */
.yn-gnb__bar { position: absolute; left: 10px; right: 10px; bottom: 18px; height: 3px; background: #000; transform: scaleX(0); transform-origin: center; transition: transform .25s ease-in-out; }
.yn-gnb__item:hover .yn-gnb__bar, .yn-gnb__item:focus-within .yn-gnb__bar, .yn-gnb__item.is-on .yn-gnb__bar { transform: scaleX(1); }
/* 결제 앞 카드 아이콘: 평소 CARD_OFF, 마우스 올리면 CARD_ON */
.yn-gnb__card { position: relative; display: inline-block; width: 24px; height: 18px; margin-right: 7px; flex: none; }
.yn-header .yn-gnb__card img { position: absolute; inset: 0; width: 24px; height: 18px; max-width: none; }
.yn-gnb__card .is-hover { opacity: 0; }
.yn-gnb__item:hover .yn-gnb__card .is-hover, .yn-gnb__item:focus-within .yn-gnb__card .is-hover { opacity: 1; }
.yn-header .yn-gnb__sub {
  position: absolute; left: 50%; top: calc(var(--yn-header-h) - 10px); z-index: 2; min-width: 180px;
  padding: 10px; border-radius: 18px; background: var(--yn-white); box-shadow: var(--yn-shadow);
  border: 1px solid var(--yn-line);
  opacity: 0; visibility: hidden; transform: translate(-50%, -6px);
  transition: opacity .18s var(--yn-ease), transform .25s var(--yn-ease), visibility 0s .2s;
}
.yn-gnb__item:hover .yn-gnb__sub, .yn-gnb__item:focus-within .yn-gnb__sub { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
.yn-gnb__sub a { display: block; padding: 10px 14px; border-radius: 10px; font-size: 15px; white-space: nowrap; color: var(--yn-ink-2); }
.yn-header .yn-gnb__sub a:hover { background: var(--yn-surface); color: var(--yn-ink); }

.yn-header .yn-util { display: flex; align-items: center; flex: none; }
.yn-util li + li::before { content: ""; display: inline-block; width: 1px; height: 12px; margin: 0 10px; background: var(--yn-line-strong); vertical-align: middle; }
.yn-util a { font-size: 14px; color: var(--yn-ink-2); }
.yn-header .yn-util li:last-child a { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--yn-ink); color: var(--yn-ink); font-weight: 700; transition: background-color .2s, color .2s; }
.yn-header .yn-util li:last-child a:hover { background: var(--yn-ink); color: #fff; }

.yn-menu-btn { display: none; margin-left: auto; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 14px; background: var(--yn-surface); align-items: center; justify-content: center; }
.yn-header .yn-menu-btn .yn-ico { width: 24px; height: 24px; }

/* 메뉴 버튼 옆 안내 ("숨은 메뉴는 여길 누르세요" + 손글씨 화살표). 메뉴 버튼이 보일 때만 */
.yn-menu-hint { display: none; align-items: center; gap: 2px; margin-left: auto; margin-right: -16px; /* 막대 gap(24px)을 줄여 버튼에 붙임 */ pointer-events: none; transition: opacity .2s; }
.yn-menu-hint__txt { position: relative; isolation: isolate; font-size: 13px; font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; color: var(--yn-ink-2); text-align: right; white-space: nowrap; }
.yn-menu-hint__txt::after { content: ""; position: absolute; left: -2px; right: -2px; bottom: 1px; height: 7px; border-radius: 4px; background: var(--yn-yellow, #ffd80a); opacity: .55; z-index: -1; }
.yn-menu-hint__br { display: none; }
.yn-menu-hint__arrow { flex: none; width: 38px; height: 24px; /* viewBox 44x28 비율, > 꼭짓점이 세로 가운데 = 메뉴 버튼 가운데 */ stroke: var(--yn-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; animation: yn-hint-nudge 1.6s ease-in-out infinite; }
@keyframes yn-hint-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }
.yn-header:has(.yn-menu-btn[aria-expanded="true"]) .yn-menu-hint { opacity: 0; } /* 메뉴를 펼치면 안내 숨김 */

/* ---------- 모바일 전체 메뉴 (화면 전체 덮개: 위 홈·닫기 / 로그인 안내 / 자주 찾는 메뉴 / 왼쪽 분류 탭 + 오른쪽 하위 메뉴) ---------- */
/* 헤더의 backdrop-filter 가 있으면 position:fixed 가 헤더 안에 갇히므로 메뉴가 열린 동안만 끔 */
.yn-header.is-menu-open { z-index: 1100; -webkit-backdrop-filter: none; backdrop-filter: none; }
html.yn-menu-lock, html.yn-menu-lock body { overflow: hidden !important; }

.yn-drawer { position: fixed; inset: 0; z-index: 1; display: flex; justify-content: flex-end; background: rgba(0, 0, 0, .5); /* 반투명 검정 */ animation: yn-dim-in .25s ease-out; }
.yn-drawer__panel {
  display: flex; flex-direction: column; width: calc(100% - 10px); /* 왼쪽 10px 은 뒤 화면이 보이게 남김 */ max-width: 480px; height: 100%;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--yn-white); box-shadow: -20px 0 50px -20px rgba(20, 23, 28, .35);
  animation: yn-panel-in .38s var(--yn-ease); /* 오른쪽에서 미끄러져 들어옴 */
}
@keyframes yn-dim-in { from { opacity: 0; } }
@keyframes yn-panel-in { from { transform: translateX(100%); } }

.yn-drawer__bar { flex: none; display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 8px; }
.yn-header .yn-drawer__icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 14px; background: none; color: var(--yn-ink); }
.yn-header .yn-drawer__icon:hover { background: var(--yn-surface); }
.yn-header .yn-drawer__icon .yn-ico { width: 26px; height: 26px; stroke-width: 1.6; }

.yn-drawer__me { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 20px 18px; }
.yn-header .yn-drawer__hello { display: inline-flex; align-items: center; gap: 2px; font-size: 20px; font-weight: 800; letter-spacing: -0.03em; color: var(--yn-ink); }
.yn-header .yn-drawer__hello .yn-ico { width: 20px; height: 20px; stroke-width: 2.2; }
.yn-header .yn-drawer__chips { display: flex; gap: 6px; flex: none; }
.yn-header .yn-drawer__chips a { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--yn-line-strong); font-size: 13px; font-weight: 600; color: var(--yn-ink-2); }

/* 자주 찾는 메뉴: 가로로 밀어서 보기 */
.yn-header .yn-drawer__quick {
  flex: none; display: flex; gap: 2px; padding: 2px 12px 18px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scrollbar-width: none; border-bottom: 1px solid var(--yn-line);
}
.yn-drawer__quick::-webkit-scrollbar { display: none; }
.yn-header .yn-drawer__quick li { flex: none; scroll-snap-align: start; }
.yn-header .yn-drawer__q { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 70px; padding: 4px 0; font-size: 13px; font-weight: 600; color: var(--yn-ink-2); white-space: nowrap; }
.yn-drawer__qi { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 18px; background: var(--yn-surface); color: var(--yn-ink); transition: transform .15s; }
.yn-header .yn-drawer__qi .yn-ico { width: 26px; height: 26px; stroke-width: 1.6; }
.yn-drawer__q.is-key .yn-drawer__qi { background: #fff0e8; color: #EC4000; }
.yn-header .yn-drawer__q:active .yn-drawer__qi { transform: scale(.94); }

/* 분류 탭 + 하위 메뉴 */
.yn-drawer__menu { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(118px, 34%) 1fr; }
.yn-drawer__tabs { overflow-y: auto; padding: 14px 0 calc(24px + env(safe-area-inset-bottom, 0px)); background: var(--yn-surface); }
.yn-header .yn-drawer__tab {
  display: block; width: 100%; padding: 15px 20px; border: 0; background: none; text-align: left;
  font-size: 16px; font-weight: 600; letter-spacing: -0.02em; color: var(--yn-ink-3); white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.yn-header .yn-drawer__tab:hover { color: var(--yn-ink); }
.yn-header .yn-drawer__tab[aria-selected="true"] { background: var(--yn-ink); color: #fff; font-weight: 700; }
.yn-drawer__panes { overflow-y: auto; padding: 14px 20px calc(24px + env(safe-area-inset-bottom, 0px)); }
.yn-header .yn-drawer__pane { animation: yn-dim-in .2s ease-out; }
.yn-header .yn-drawer__pane a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 15px 4px; font-size: 16px; font-weight: 600; letter-spacing: -0.02em; color: var(--yn-ink); }
.yn-header .yn-drawer__pane a .yn-ico { width: 16px; height: 16px; color: var(--yn-line-strong); stroke-width: 2.2; }
.yn-header .yn-drawer__pane a:hover, .yn-header .yn-drawer__pane a[aria-current] { color: #EC4000; }
.yn-header .yn-drawer__pane a[aria-current] .yn-ico { color: #EC4000; }

/* ---------- 반응형 ---------- */
@media (max-width: 1180px) {
  .yn-header .yn-gnb, .yn-header .yn-util { display: none; }
  .yn-header .yn-menu-btn { display: inline-flex; }
  .yn-header .yn-menu-hint { display: inline-flex; }
  .yn-header .yn-menu-hint + .yn-menu-btn { margin-left: 0; }
  .yn-header { --yn-header-h: 68px; }
  .yn-header .yn-logo img { height: 50px; }
}
@media (max-width: 480px) {
  .yn-menu-hint__br { display: inline; } /* 좁은 휴대폰에서는 두 줄 */
  .yn-menu-hint__txt { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .yn-menu-hint__arrow { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  .yn-header *, .yn-header *::before, .yn-header *::after { transition-duration: .01ms !important; }
}

/* [2026-11-27] PC: 맨 위에서는 헤더 95px · 로고 72px 로 크게, 스크롤하면 64px · 46px 로 작게 (.is-compact, js/yn_header.js)
   메뉴·회원 링크 구성은 그대로. 휴대폰·태블릿(1180px 이하)은 기존 68px · 50px 그대로 */
.yn-header .yn-logo img, .yn-header__bar, .yn-gnb__link, .yn-gnb__bar { transition: height .25s var(--yn-ease), bottom .25s var(--yn-ease); }
@media (min-width: 1181px) {
  .yn-header { --yn-header-h: 95px; }
  .yn-header .yn-logo img { height: 72px; }
  .yn-header .yn-gnb__bar { bottom: 26px; }
  .yn-header.is-compact { --yn-header-h: 64px; }
  .yn-header.is-compact .yn-logo img { height: 46px; }
  .yn-header.is-compact .yn-gnb__bar { bottom: 14px; }
}
