/* ==================== 본문 바로가기 (skip navigation) ==================== */
.skip-nav {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: var(--ds-number-5) var(--ds-number-10);
  background: var(--ds-color-gray-90);
  color: var(--ds-color-gray-0);
  font-size: var(--ds-pc-font-size-label-medium);
  font-weight: var(--ds-typo-font-weight-bold);
  border-radius: 0 0 var(--ds-radius-medium) var(--ds-radius-medium);
  text-decoration: none;
  white-space: nowrap;
}
.skip-nav:focus {
  top: 0;
}

/* ============================================================
   HEADER — #site-header
   sticky 헤더 (로고 + GNB + 검색/마이페이지/전체메뉴)
   ============================================================ */
.site-header {
  position: sticky;                                      /* 스크롤 시 상단 고정 — 메가메뉴(fixed)와 정렬 일관성 유지 */
  top: 0;
  z-index: 1000;
  width: 100%;
  height: 11rem;                                         /* 110px (80 + 상15 + 하15) */
  background: var(--ds-light-color-surface-white);
}
.site-header.is-scrolled {
  box-shadow: var(--ds-shadow-s);                       /* 헤더 스크롤 그림자 */
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1860px;
  margin: 0 auto;
  padding: 0 var(--ds-number-15);                       /* 0 30px */
}

.header-logo {
  flex: none;                                             /* 고정 너비 — GNB 수학적 가운데 */
  flex-shrink: 0;
  min-width: 165px;
}
.header-logo img {
  width: 165px;
  height: 41px;
  object-fit: contain;
}

/* ============================================================
   GNB — 1뎁스 메뉴
   ============================================================ */
.header-gnb {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  flex: 1;                                               /* 로고~액션 사이 공간 채우고 가운데 정렬 */
}

.gnb-list {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  height: 100%;
}

.gnb-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.gnb-link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 clamp(0.8rem, 1.3vw, 3.2rem);               /* 8px ~ 32px 유동 — 더 공격적 축소 */
  font-size: var(--ds-font-size-19);                     /* 1.9rem = 19px */
  font-weight: var(--ds-typo-font-weight-medium);       /* 500 */
  color: var(--ds-light-color-text-basic);              /* gray-90 ≈ #111 */
  letter-spacing: var(--ds-typo-letter-spacing);        /* -0.01em */
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--ease-base), padding 0.3s ease;
}
.gnb-link:hover,
.gnb-link:focus-visible {
  color: var(--ds-color-brand-dark);                    /* #343A48 */
  font-weight: var(--ds-typo-font-weight-bold);
}

/* ============================================================
   메가메뉴: 하나의 패널에 전체 2뎁스 표시
   ============================================================ */

/* 메가메뉴 패널: gnb-list 자체가 패널 역할 */
.gnb-list {
  position: relative;
}

/* 패널 배경: gnb-list::after — 서브메뉴 뒤에 깔림 */
.gnb-list::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% + 80px);
  background: var(--ds-light-color-surface-white);
  border: var(--ds-border-width-thin) solid var(--ds-color-brand-dark);
  border-radius: var(--ds-radius-large);                /* 12px */
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 199;
  padding: 0;
  /* 서브메뉴 콘텐츠 높이에 맞춤 (가장 긴 메뉴 기준) */
  top: calc(100% + 4px);
  height: var(--mega-panel-h, 260px);
}
.header-gnb:hover .gnb-list::after,
.header-gnb:focus-within .gnb-list::after {
  opacity: 1;
  pointer-events: auto;
}

/* 2뎁스: 개별 박스 제거 → 패널 안에서 각 1뎁스 아래 배치 */
.gnb-sub {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 140px;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 20px 0 16px;
  list-style: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 200;
  text-align: center;
}

/* hover 시 전체 노출 */
.header-gnb:hover .gnb-sub,
.header-gnb:focus-within .gnb-sub {
  opacity: 1;
  pointer-events: auto;
}

/* 메가메뉴 열림 시 1뎁스 패딩 넓힘 + 개별 hover 강조 */
.header-gnb:hover .gnb-link {
  color: var(--ds-light-color-text-basic);
  padding: 0 clamp(1.2rem, 1.9vw, 4rem);                /* hover 시 갭 1.5배 */
}
.header-gnb:hover .gnb-item:hover .gnb-link {
  color: var(--ds-color-brand-dark);
  font-weight: var(--ds-typo-font-weight-bold);
}

.gnb-sub-link {
  display: block;
  padding: var(--ds-number-4) var(--ds-number-10);     /* 8px 20px */
  font-size: var(--ds-font-size-17);                     /* 1.7rem = 17px */
  font-weight: var(--ds-typo-font-weight-regular);      /* 400 */
  color: var(--ds-color-brand-dark);                     /* #343A48 */
  text-decoration: none;
  white-space: nowrap;
  text-align: center;
  transition: background var(--ease-base), color var(--ease-base);
}
.gnb-sub-link:hover,
.gnb-sub-link:focus-visible {
  background: none;
  color: var(--ds-color-brand-dark);                    /* #343A48 */
  font-weight: var(--ds-typo-font-weight-bold);
  text-decoration: underline;
  text-underline-offset: 0.3rem;
  text-decoration-thickness: 2px;
}

/* 3뎁스 서브메뉴 — 아래 드롭다운 (고객문의 > FAQ/Q&A/분실물센터) */
.gnb-sub-item--has-depth3 {
  position: relative;
}
.gnb-sub-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  width: 100%;
}
.gnb-sub-item--has-depth3 > .gnb-sub-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.gnb-sub-item--has-depth3 > .gnb-sub-toggle::after {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
  flex-shrink: 0;
}
.gnb-sub-item--has-depth3.is-open > .gnb-sub-toggle::after {
  transform: rotate(-135deg);
  margin-top: 3px;
}
.gnb-sub-depth3 {
  display: none;
  padding: 0;
  margin: 0;
  list-style: none;
}
.gnb-sub-item--has-depth3.is-open > .gnb-sub-depth3 {
  display: block;
}
.gnb-sub-depth3 > li > a,
.gnb-sub-depth3 > li > .gnb-sub-link,
.gnb-sub-depth3 > li > .all-menu-gnb-sub-link {
  padding-left: var(--ds-number-14, 28px);
  font-size: var(--ds-pc-font-size-body-small, 1.4rem);
  color: var(--ds-light-color-text-gray-subtle, #888);
  position: relative;
}
.gnb-sub-depth3 > li > a:hover,
.gnb-sub-depth3 > li > .gnb-sub-link:hover,
.gnb-sub-depth3 > li > .all-menu-gnb-sub-link:hover {
  color: var(--ds-light-color-link-hover);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--ds-number-4);                              /* 8px */
  position: relative;
  flex: none;                                             /* 고정 너비 — GNB 수학적 가운데 */
}

/* Header buttons */
.header-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity var(--ease-base);
}
.header-btn:hover { opacity: 0.8; }

/* 비로그인: 텍스트 링크 (웨이브 스타일) */
.header-btn--login {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
  padding: 8px 16px;
  border: 1px solid #d0d5dd;
  border-radius: 20px;
  background: transparent;
  transition: border-color 0.2s, color 0.2s;
}
.header-btn--login:hover {
  background: #343A48;
  border-color: #343A48;
  color: #fff;
  opacity: 1;
}
/* PC: 텍스트 라벨만 노출, 아이콘 숨김 (모바일에서 반전) */
.header-btn--login .header-btn-icon { display: none; }
.header-btn--login .header-btn-label { display: inline; }

/* 후원하기 — 브랜드 블루 채움 pill (Figma node 14725:3210) */
.header-btn--donate {
  gap: 3px;                                              /* Figma gap-3 (텍스트↔아이콘) */
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  padding: 8px 16px;                                     /* Figma px-16 / py ~7.5 */
  border-radius: 20px;
  background: var(--ds-light-color-brand-primary);       /* #027BC1 주조색 */
  letter-spacing: -0.19px;
}
.header-btn--donate:hover { opacity: 0.88; }
.header-donate-icon { width: 15px; height: 14px; display: block; flex-shrink: 0; }

/* 로그인: 채움 원형 — 다크 배경 + 흰색 아이콘 */
.header-btn--mypage {
  width: var(--ds-number-17);                           /* 34px */
  height: var(--ds-number-17);                          /* 34px */
  border-radius: var(--ds-radius-max);                  /* 원형 */
  background: var(--ds-color-gray-70);                  /* #464c53 */
  color: var(--ds-light-color-icon-inverse);            /* white */
  font-size: var(--ds-number-8);                        /* 16px */
}
.header-btn--menu {
  width: var(--ds-size-height-12);                      /* 44px — 접근성 터치타겟 */
  height: var(--ds-size-height-12);                     /* 44px */
  border-radius: var(--ds-radius-max);                  /* 원형 */
  color: var(--ds-color-gray-70);                       /* #464c53 ≈ #494b57 */
  font-size: var(--ds-number-10);                       /* 20px */
}

/* Search bar (상시 노출) */
.search-wrapper { display: flex; align-items: center; }

.search-form {
  display: flex;
  align-items: center;
  border: 1px solid #d0d5dd;
  border-radius: 24px;
  background: transparent;
  height: 40px;
  padding: 0 4px 0 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-form:focus-within {
  border-color: var(--ds-color-brand-blue);
  box-shadow: 0 0 0 2px rgba(0,111,202,0.15);
}
.search-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: #333;
  width: clamp(100px, 12vw, 180px);
  min-width: 0;
}
.search-input::placeholder {
  color: #999;
}
.search-submit {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: #343A48;
  color: #fff;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.2s;
}
.search-submit:hover {
  background: #343A48;
  opacity: 0.85;
}

/* ============================================================
   전체메뉴 오버레이 (PC: 좌측 이미지 + 우측 수직 메뉴)
   ============================================================ */
/* 오버레이 열림 시 본문 스크롤 잠금 — 이중 스크롤바 방지(고정 오버레이 뒤 페이지가 함께 스크롤되던 문제) */
body.all-menu-open {
  overflow: hidden;
}

.all-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--ds-color-gray-5);                    /* #f4f5f6 — 연한 블루그레이 */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--ease-base), visibility var(--ease-base);
}
.all-menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.all-menu-panel {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  /* 열기 시 패널 전체(메뉴 글자 포함)가 translateY로 미끄러지면 "글자가 이동하는 게 다 보이는" 현상 발생.
     오버레이 opacity 페이드만으로 등장시키고 패널 자체는 이동시키지 않는다. (Refs GNB 모바일 결함 C) */
}

/* ============================================================
   좌측 비주얼 영역
   ============================================================ */
.all-menu-visual {
  position: relative;
  width: 35%;
  max-width: 580px;
  margin: var(--ds-number-20);                           /* 40px */
  border-radius: var(--ds-number-10);                    /* 20px */
  overflow: hidden;
  flex-shrink: 0;
}
.all-menu-visual-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* 마퀴 텍스트 — 이미지 우측 가장자리 밀착, 무한 스크롤 */
.all-menu-marquee {
  position: absolute;
  right: -4.2rem;                                        /* 오른쪽으로 42px 이동 */
  top: 0;
  bottom: 0;
  width: 10rem;                                          /* 100px — 60px 글자 + line-height 여유 */
  overflow: hidden;
  pointer-events: none;
  display: flex;
  align-items: center;                                   /* 가로 중앙 정렬 */
}
.all-menu-marquee-track {
  display: flex;
  flex-direction: column;
  gap: 6rem;                                             /* 60px — 반복 텍스트 간격 */
  transform: translateY(-16.666%);                       /* 시작점을 1카피분 올려서 빈 공간 제거 */
  animation: all-menu-marquee 80s linear infinite;
}
.all-menu-visual-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);                             /* 아래→위 방향 읽기 */
  white-space: nowrap;
  font-family: var(--ds-typo-font-type-body);
  font-size: var(--ds-font-size-60);                     /* 6rem = 60px */
  font-weight: var(--ds-typo-font-weight-medium);        /* 500 */
  color: var(--ds-color-alpha-white50);                  /* 흰색 50% */
  letter-spacing: 1rem;                                  /* 10px */
  line-height: 1.2;                                      /* vertical에서 글자 가로폭 결정 */
  flex-shrink: 0;
}
@keyframes all-menu-marquee {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-33.333%); }              /* 6카피 중 2카피분 이동 → 심리스 루프 */
}
/* 상단 바: 로고(좌) + 액션(우) — 세로 가운데 정렬 */
.all-menu-topbar {
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--ds-number-20);                        /* 0 40px */
  z-index: 2;
  pointer-events: none;
}
.all-menu-topbar > * {
  pointer-events: auto;
}
.all-menu-logo {
  flex-shrink: 0;
  margin-left: var(--ds-number-30);                      /* 60px — 오른쪽으로 이동 */
}
.all-menu-logo img {
  width: 200px;
  height: auto;
  object-fit: contain;
}
.all-menu-logo-color { display: none; }                  /* PC: 흰색 로고만 */

/* ============================================================
   우측 메뉴 영역
   ============================================================ */
.all-menu-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--ds-number-15) var(--ds-number-20);      /* 30px 40px */
  min-width: 0;
  position: relative;
}

/* 액션 버튼 (검색 + 로그인 + 닫기) */
.all-menu-actions {
  display: flex;
  align-items: center;
  gap: var(--ds-number-4);                               /* 8px */
}
.all-menu-btn {
  width: var(--ds-number-24);                            /* 48px */
  height: var(--ds-number-24);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ds-color-gray-70);
  cursor: pointer;
  border-radius: var(--ds-radius-max);
  transition: background var(--ease-base), color var(--ease-base);
  background: none;
  border: none;
  text-decoration: none;
}
.all-menu-btn--login {
  width: var(--ds-number-24);
  height: var(--ds-number-24);
  background: var(--ds-color-brand-dark);
  color: var(--ds-light-color-surface-white);
  border-radius: var(--ds-radius-max);
}
.all-menu-close {
  width: var(--ds-number-30);                            /* 60px */
  height: var(--ds-number-30);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ds-color-gray-70);
  cursor: pointer;
  border-radius: var(--ds-radius-max);
  background: none;
  border: none;
  transition: background var(--ease-base), color var(--ease-base);
}
.all-menu-btn--search {
  width: var(--ds-number-26);                            /* 52px */
  height: var(--ds-number-26);
  background: var(--ds-light-color-surface-white);
  border: var(--ds-border-width-thin) solid var(--ds-color-gray-20);
  color: var(--ds-color-gray-60);
}
.all-menu-btn:hover,
.all-menu-close:hover {
  background: var(--ds-color-gray-10);
}
.all-menu-btn--login:hover {
  background: var(--ds-color-gray-80);
  color: var(--ds-light-color-surface-white);
}
.all-menu-close:focus-visible,
.all-menu-btn:focus-visible {
  outline: 2px solid var(--ds-color-primary-50);
  outline-offset: 2px;
}

/* ============================================================
   메뉴 네비게이션
   ============================================================ */
.all-menu-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;                             /* 항상 하단 배치 */
  gap: clamp(var(--ds-number-5), 2.5vw, var(--ds-number-30)); /* 10px~60px — 뷰포트 따라 축소 */
  max-width: none;                                       /* 콘텐츠 영역 폭 활용 — 우측 여백 있는데 줄바꿈되던 문제 해결 */
  padding-bottom: var(--ds-number-20);                   /* 40px — 하단 여백 */
}

/* 카테고리 (1Depth + 2Depth 같은 줄) */
.all-menu-category {
  display: flex;
  align-items: flex-start;                               /* 상단 정렬 — 2depth를 최상단으로 */
  gap: var(--ds-number-4) clamp(var(--ds-number-10), 5vw, var(--ds-number-40)); /* row 8px, col 20~80px */
  transition: opacity var(--ease-base);
}
.all-menu-cat-header {
  display: flex;
  align-items: center;
  gap: var(--ds-number-8);                               /* 16px */
  flex-shrink: 0;
}
.all-menu-cat-link {
  display: inline-block;
  font-size: clamp(2.4rem, 2.5vw, 3.6rem);              /* 24px ~ 36px 유동 */
  font-weight: var(--ds-typo-font-weight-bold);
  color: var(--ds-color-brand-dark);                     /* #343A48 — 10.1:1 대비 */
  text-decoration: none;
  letter-spacing: var(--ds-typo-letter-spacing);
  line-height: var(--ds-typo-line-height-heading);
  transition: color var(--ease-base);
  min-width: 360px;                                      /* 가장 긴 제목(공연·전시·축제·행사) 기준 고정 → 모든 2depth 시작점 정렬 */
  white-space: nowrap;                                   /* 제목 자체는 한 줄 유지 */
}
.all-menu-cat-link:hover {
  text-decoration: none;
}
.all-menu-cat-link:focus-visible {
  outline: 2px solid var(--ds-color-primary-50);
  outline-offset: 2px;
  border-radius: var(--ds-radius-xsmall);
}

/* + 토글 버튼 (PC에서는 숨김, 모바일에서 노출) */
.all-menu-toggle {
  display: none;
  -webkit-tap-highlight-color: transparent;              /* 모바일 탭 하이라이트 제거 */
}
.all-menu-toggle,
.all-menu-toggle:hover,
.all-menu-toggle:focus,
.all-menu-toggle:active,
.all-menu-toggle:focus-visible {
  background: transparent;
  border: none;
  outline: none;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

/* 2Depth 서브메뉴 — PC: 가로 나열, 1Depth와 같은 줄 */
.all-menu-sub-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ds-number-12);                              /* 24px */
}
.all-menu-sub-link {
  display: inline-block;
  font-size: clamp(1.5rem, 1.4vw, 2rem);                /* 15px ~ 20px 유동 */
  font-weight: var(--ds-typo-font-weight-medium);
  color: var(--ds-color-brand-dark);                     /* #343A48 */
  text-decoration: none;
  letter-spacing: var(--ds-typo-letter-spacing);
  transition: color var(--ease-base);
  white-space: nowrap;
}
.all-menu-sub-link:hover {
  color: var(--ds-color-primary-50);
  text-decoration: none;
}
.all-menu-sub-link:focus-visible {
  outline: 2px solid var(--ds-color-primary-50);
  outline-offset: 2px;
  border-radius: var(--ds-radius-xsmall);
}

/* 2Depth > 3Depth (사이트맵: 고객문의·경영공시)
   부모(고객문의·경영공시) 클릭 시, 2depth 행 '아래'에 3depth를 한 줄로 펼침(토글).
   3depth 시작점은 부모 텍스트 시작점에 맞춤(JS가 padding-left 설정).
   display:contents로 부모 링크·3depth 목록을 sub-list 직속으로 승격시켜 정렬 제어 */
.all-menu-sub-depth3 {
  display: contents;
}
.all-menu-depth3-parent {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-number-1);                               /* 2px — 텍스트↔caret */
  cursor: pointer;
}
.all-menu-depth3-caret {
  flex-shrink: 0;
  opacity: 0.5;
  transition: transform var(--ease-base), opacity var(--ease-base);
}
.all-menu-sub-depth3.is-open .all-menu-depth3-caret {
  transform: rotate(180deg);
  opacity: 1;
}
.all-menu-depth3-list {
  display: flex;                                         /* 항상 렌더 — 부드러운 전환 위해 display 토글 대신 높이/투명도 애니메이션 */
  order: 1;                                              /* 2depth 항목 모두 뒤(다음 줄)로 */
  flex-basis: 100%;                                      /* 전체 폭 차지 → 2depth 아래 새 줄로 줄바꿈 */
  box-sizing: border-box;                                /* padding-left가 폭을 넘기지 않도록 */
  flex-wrap: wrap;
  gap: var(--ds-number-8);                               /* 16px — 3depth 항목 간격 */
  overflow: hidden;
  max-height: 0;                                         /* 접힘 */
  margin-top: 0;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: max-height 0.3s ease, opacity 0.25s ease, transform 0.25s ease, margin-top 0.3s ease;
}
.all-menu-sub-depth3.is-open .all-menu-depth3-list {
  max-height: 80px;                                      /* 펼침 (3depth 1~2줄 수용) */
  margin-top: var(--ds-number-2);                        /* 4px — 2depth 줄과 간격 */
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.all-menu-depth3-list .all-menu-sub-link {
  font-size: clamp(1.3rem, 1.1vw, 1.5rem);               /* 13~15px — 2depth보다 작게 */
  font-weight: var(--ds-typo-font-weight-regular);
  color: var(--ds-color-gray-50);                        /* 연하게 — 위계 표현 */
}

/* ============================================================
   PC Hover 인터랙션
   nav에 hover 중이면 전체 페이드, 활성 카테고리만 dark 유지
   ============================================================ */
.all-menu-nav.is-hovered .all-menu-category {
  opacity: 1;
}
.all-menu-nav.is-hovered .all-menu-category .all-menu-cat-link,
.all-menu-nav.is-hovered .all-menu-category .all-menu-sub-link {
  color: var(--ds-color-gray-30);                        /* #b1b8be — 디자인 우선, 대형텍스트 */
}
.all-menu-nav.is-hovered .all-menu-category.is-active .all-menu-cat-link,
.all-menu-nav.is-hovered .all-menu-category.is-active .all-menu-sub-link {
  color: var(--ds-color-brand-dark);                     /* 활성만 dark 유지 */
}

/* ============================================================
   반응형 — PC 좁은 구간 (1200px ~ 1399px)
   1Depth/2Depth 일괄 2줄 전환 + 텍스트 축소
   ============================================================ */
@media (max-width: 1399px) {
  .all-menu-nav {
    gap: clamp(var(--ds-number-3), 1.2vw, var(--ds-number-10)); /* 6px~20px — 타이트하게 */
  }
  .all-menu-category {
    flex-direction: column;                              /* 모든 카테고리 일괄 2줄 */
    align-items: flex-start;
    gap: var(--ds-number-3);                             /* 6px — 1Depth↔2Depth 간격 */
  }
  .all-menu-cat-link {
    min-width: auto;
  }
  .all-menu-sub-list {
    padding-left: var(--ds-number-1);                    /* 2px — 살짝 들여쓰기 */
  }
}

/* ============================================================
   반응형 — Tablet (768px ~ 1199px)
   세로 배치: 이미지 상단 + 아코디언 메뉴 하단
   ============================================================ */
@media (max-width: 1199px) {
  .site-header { height: var(--ds-number-32); }          /* 64px */
  .header-inner { padding: 0 var(--ds-number-12); }      /* 0 24px */
  .header-logo img { width: 140px; height: 35px; }

  /* GNB 숨김 — 햄버거 메뉴로 대체 */
  .header-gnb { display: none; }

  /* 검색 — 원형 아이콘 버튼만 노출 */
  .search-input { display: none; }
  .search-form {
    border: none;
    padding-left: 0;
    height: auto;
    background: transparent;
  }
  .search-submit {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #343A48;
    border: none;
    color: #fff;
    font-size: 14px;
  }
  .search-submit:hover {
    background: #343A48;
    color: #fff;
  }

  /* 후원하기 — 원형 아이콘 버튼(파란 배경, 텍스트 숨김 / 통합검색과 동일 패턴) */
  .header-btn--donate {
    width: 34px;
    height: 34px;
    padding: 0;
    gap: 0;
    border-radius: 50%;
    font-size: 0;                                        /* "후원하기" 텍스트 숨김 → 아이콘만 노출 */
  }
  .header-donate-icon { width: 18px; height: auto; }     /* 원형 중앙 시각 균형 */

  /* 로그인/로그아웃 — GNB 숨김 구간부터 후원·검색과 동일하게 원형 아이콘으로 전환(텍스트 숨김).
     로그인 시 추가되는 마이페이지 아이콘과 합쳐도 액션 영역이 모바일 폭을 넘기지 않도록 폭 축소. (Refs GNB 모바일 결함 A) */
  .header-btn--login {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
  }
  .header-btn--login .header-btn-label { display: none; }
  .header-btn--login .header-btn-icon { display: block; }

  /* 전체메뉴 패널 — 세로 배치 */
  .all-menu-panel {
    flex-direction: column;
    overflow-y: auto;
  }

  /* topbar — 상대 위치로 전환 (플로우 안) */
  .all-menu-topbar {
    position: relative;
    top: auto;
    padding: var(--ds-number-10) var(--ds-number-12);    /* 20px 24px */
  }
  .all-menu-logo {
    margin-left: 0;
  }
  .all-menu-logo img {
    width: 160px;
  }
  .all-menu-logo-white { display: none; }                /* 태블릿: 컬러 로고 */
  .all-menu-logo-color { display: block; }

  /* 액션 아이콘 — GNB 아이콘과 동일 사이즈 (34px) */
  .all-menu-btn {
    width: var(--ds-number-17);                          /* 34px */
    height: var(--ds-number-17);
  }
  .all-menu-btn--login {
    width: var(--ds-number-17);
    height: var(--ds-number-17);
  }
  .all-menu-btn--search {
    width: var(--ds-number-17);
    height: var(--ds-number-17);
  }
  .all-menu-close {
    width: var(--ds-number-20);                          /* 40px */
    height: var(--ds-number-20);
  }

  /* 이미지 → topbar 아래 배치 */
  .all-menu-visual {
    width: auto;
    max-width: none;
    height: 200px;
    margin: var(--ds-number-4) var(--ds-number-8) 0;     /* 8px 16px 0 — 상단 여백으로 겹침 방지 */
    flex-shrink: 0;
  }

  /* 마퀴 텍스트 — 가로 무한 스크롤 */
  .all-menu-marquee {
    width: 100%;
    height: auto;
    right: auto;
    top: auto;
    bottom: -15px;                                        /* 아래로 15px */
    left: 0;
    display: block;
    overflow: hidden;
  }
  .all-menu-marquee-track {
    flex-direction: row;                                 /* 세로→가로 */
    gap: 4rem;                                           /* 40px */
    transform: none;                                     /* PC 시작 오프셋 제거 */
    animation: all-menu-marquee-h 30s linear infinite;
  }
  .all-menu-visual-text {
    writing-mode: horizontal-tb;                         /* 세로→가로 */
    transform: none;                                     /* 회전 제거 */
    font-size: clamp(1.5rem, 2vw, 2.2rem);              /* 15px~22px — 태블릿→모바일 유동 */
    letter-spacing: 0.3em;
    padding: var(--ds-number-4) 0;                       /* 8px 상하 패딩 */
  }
  @keyframes all-menu-marquee-h {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-33.333%); }            /* 6카피 중 2카피분 */
  }

  /* 메뉴 영역 */
  .all-menu-content {
    flex: 1;
    padding: var(--ds-number-8) var(--ds-number-12);     /* 16px 24px */
    overflow-y: auto;
  }

  /* 메뉴 네비게이션 — 세로 아코디언 */
  .all-menu-nav {
    gap: 0;
    justify-content: flex-start;
    max-width: none;                                     /* PC 900px 제거 → 100% */
  }
  .all-menu-category {
    flex-direction: column;                              /* 세로 배치: cat-header 위, sub-list 아래 */
    align-items: stretch;
    gap: 0;
    border-bottom: 1px solid var(--ds-color-gray-10);
  }
  .all-menu-category:last-child {
    border-bottom: none;
  }
  .all-menu-cat-header {
    width: 100%;
    justify-content: space-between;
    padding: var(--ds-number-10) 0;                      /* 20px 0 */
  }
  .all-menu-cat-link {
    font-size: var(--ds-font-size-22);                   /* 2.2rem = 22px */
    min-width: auto;
  }

  /* + 토글 버튼 — 모바일에서 노출 */
  .all-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--ds-number-20);                          /* 40px */
    height: var(--ds-number-20);
    background: none !important;                         /* 모든 상태에서 배경 없음 */
    border: none !important;
    outline: none;
    box-shadow: none;
    color: var(--ds-color-brand-dark);
    cursor: pointer;
    border-radius: 0;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    -webkit-appearance: none;
    appearance: none;
    padding: 0;
  }
  .all-menu-toggle:hover,
  .all-menu-toggle:focus,
  .all-menu-toggle:active {
    color: var(--ds-color-gray-60);
    background: none !important;
    outline: none;
    box-shadow: none;
  }
  .all-menu-toggle:focus-visible {
    outline: 2px solid var(--ds-color-primary-50);
    outline-offset: 2px;
  }
  .all-menu-category.is-open .all-menu-toggle {
    transform: rotate(45deg);                            /* + → × 회전 */
    color: var(--ds-color-gray-60);
    background: none !important;
  }

  /* 2Depth — 접힌 상태.
     +버튼으로 펼침/접힘 시 max-height(0↔500px) 애니메이션은 글자가 펴지고 접히는 모션이 보이고
     실제 높이<500px이라 닫힐 때 "지연 후 급접힘"으로 어색하게 보였다 → transition 제거(즉시 토글). (Refs GNB 모바일 결함 C-2) */
  .all-menu-sub-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding-top: 0;
    max-height: 0;
    overflow: hidden;
  }
  .all-menu-category.is-open .all-menu-sub-list {
    max-height: 500px;
    padding-top: 0;
    padding-bottom: var(--ds-number-10);                 /* 20px */
  }
  .all-menu-sub-link {
    font-size: var(--ds-font-size-17);                   /* 1.7rem = 17px */
    padding: var(--ds-number-4) 0;                       /* 8px 0 */
    color: var(--ds-color-gray-60);
  }
  .all-menu-sub-link:hover {
    color: var(--ds-color-brand-dark);
    font-weight: var(--ds-typo-font-weight-bold);
    text-decoration: underline;
    text-underline-offset: 0.3rem;
    text-decoration-thickness: 2px;
  }

  /* 3Depth — 세로 아코디언에선 부모 바로 뒤(아래)에 들여쓰기로 노출 */
  .all-menu-depth3-list {
    order: 0;                                            /* 부모(고객문의) 바로 다음 */
    flex-basis: auto;                                    /* 세로 레이아웃에서 100% 높이 방지 */
    padding-left: 0;                                     /* 좌측 들여쓰기 제거 — 2depth와 좌측 정렬 */
    column-gap: var(--ds-number-12);                     /* 24px — 3depth 항목 간 가로 간격 확대 */
    margin-top: 0;
  }

  /* PC hover 인터랙션 비활성화 */
  .all-menu-nav.is-hovered .all-menu-category .all-menu-cat-link,
  .all-menu-nav.is-hovered .all-menu-category .all-menu-sub-link {
    color: var(--ds-color-brand-dark);
  }
}

/* ============================================================
   반응형 — Mobile (~767px)
   ============================================================ */
@media (max-width: 767px) {
  .site-header { height: var(--ds-number-28); }          /* 56px */
  .header-inner { padding: 0 var(--ds-number-8); }       /* 0 16px */
  .header-logo img { width: 120px; height: 30px; }

  /* 검색 — 원형 아이콘 버튼만 노출 */
  .search-input { display: none; }
  .search-form {
    border: none;
    padding-left: 0;
    height: auto;
    background: transparent;
  }
  .search-submit {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #343A48;
    border: none;
    color: #fff;
    font-size: 14px;
  }
  .search-submit:hover {
    background: #343A48;
    color: #fff;
  }

  /* 로그인/로그아웃 — 원형 아이콘 유지(≤1199 규칙과 동일, 모바일에서 패딩 재주입 방지) */
  .header-btn--login {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
  }
  /* 후원하기 — 원형 아이콘 버튼(파란 배경, 텍스트 숨김 / 통합검색과 동일 패턴) */
  .header-btn--donate {
    width: 34px;
    height: 34px;
    padding: 0;
    gap: 0;
    border-radius: 50%;
    font-size: 0;                                        /* "후원하기" 텍스트 숨김 → 아이콘만 노출 */
  }
  .header-donate-icon { width: 18px; height: auto; }     /* 원형 중앙 시각 균형 */

  /* 버튼 축소 */
  .header-btn--menu { width: var(--ds-number-19); height: var(--ds-number-19); font-size: var(--ds-number-9); }
  .header-actions { gap: var(--ds-number-2); }           /* 4px */

  /* 전체메뉴 — 모바일 축소 */
  .all-menu-visual {
    height: 150px;
    margin: var(--ds-number-16) var(--ds-number-5) 0;    /* 32px 10px 0 — 이미지 32px 내림 */
    border-radius: var(--ds-number-8);                   /* 16px */
  }
  .all-menu-marquee {
    bottom: -7px;                                        /* 태블릿 -15px 대비 8px 위로 */
  }
  .all-menu-topbar {
    top: var(--ds-number-10);                            /* 20px */
    padding: 0 var(--ds-number-8);                       /* 0 16px */
  }
  .all-menu-logo img {
    width: 140px;
  }
  .all-menu-content {
    padding: 0 var(--ds-number-8) var(--ds-number-8);    /* 0 16px 16px */
  }
  .all-menu-btn {
    width: var(--ds-number-15);                          /* 30px — GNB 아이콘과 동일 */
    height: var(--ds-number-15);
  }
  .all-menu-btn--login {
    width: var(--ds-number-15);
    height: var(--ds-number-15);
  }
  .all-menu-btn--search {
    width: var(--ds-number-15);
    height: var(--ds-number-15);
  }
  .all-menu-close {
    width: var(--ds-number-17);                          /* 34px */
    height: var(--ds-number-17);
  }
  .all-menu-cat-header {
    padding: var(--ds-number-8) 0;                       /* 16px 0 */
  }
  .all-menu-cat-link {
    font-size: var(--ds-font-size-19);                   /* 1.9rem = 19px */
  }
  .all-menu-toggle {
    width: var(--ds-number-17);                          /* 34px */
    height: var(--ds-number-17);
  }
  .all-menu-sub-link {
    font-size: var(--ds-font-size-15);                   /* 1.5rem = 15px */
    padding: var(--ds-number-3) 0;                       /* 6px 0 */
  }
}
