.header .container { position: relative; }
.header__core { display: flex; flex: 1; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.gnb-toggle { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--gray-100); transition: background .2s ease; }
.gnb-toggle:hover { background: var(--gray-200); }
.gnb-toggle__bars { position: relative; width: 18px; height: 14px; }
.gnb-toggle__bars span { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: var(--text-main); transition: transform .28s var(--mp-ease), opacity .2s ease, background .2s ease; }
.gnb-toggle__bars span:nth-child(1) { top: 0; }
.gnb-toggle__bars span:nth-child(2) { top: 6px; }
.gnb-toggle__bars span:nth-child(3) { top: 12px; }
.gnb-toggle[aria-expanded="true"] { background: var(--text-main); }
.gnb-toggle[aria-expanded="true"] .gnb-toggle__bars span { background: #fff; }
.gnb-toggle[aria-expanded="true"] .gnb-toggle__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.gnb-toggle[aria-expanded="true"] .gnb-toggle__bars span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.gnb-toggle[aria-expanded="true"] .gnb-toggle__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.gnb__search { display: none; }
.gnb { --_inset: max(var(--container-px), (100% - var(--container-max)) / 2 + var(--container-px)); position: absolute; z-index: 5; top: 100%; right: var(--_inset); left: var(--_inset); padding: 28px 36px 34px; border: 1px solid var(--gray-200); border-top: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); background: #fff; box-shadow: 0 24px 48px rgba(16, 49, 107, .14); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-8px); transition: opacity .22s ease, transform .3s var(--mp-ease), visibility 0s linear .3s; }
.gnb.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition-delay: 0s; }
.gnb__grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 36px; align-items: start; max-height: calc(100vh - var(--header-h) - 80px); overflow-y: auto; }
.gnb__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 28px; }
.gnb__head h2 { margin: 0; color: var(--mp-deep); font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.gnb__all { display: inline-flex; align-items: center; gap: 6px; color: var(--text-sub); font-size: 13px; font-weight: 600; transition: color .18s ease; }
.gnb__all:hover { color: var(--mp-accent); }
.gnb__all i { font-size: 11px; }
.gnb__tabs { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 20px; border-bottom: 1px solid var(--gray-200); }
.gnb__tabs .tab-pill { height: 34px; padding: 0 13px; font-size: 13px; }
.gnb__details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; padding-top: 22px; }
.gnb__group h3 { margin: 0; color: var(--mp-deep); font-size: 14px; font-weight: 700; }
.gnb__chips { display: flex; flex-wrap: wrap; gap: 7px; }
.gnb__chip { display: inline-flex; align-items: center; min-height: 30px; padding: 0 13px; border: 1px solid transparent; border-radius: var(--radius-full); background: var(--gray-50); color: var(--text-sub); font-size: 13px; font-weight: 500; transition: border-color .18s ease, color .18s ease, background .18s ease; }
.gnb__chip:hover { border-color: var(--mp-accent); background: #f7faff; color: var(--mp-accent); }
.gnb__cards { display: grid; gap: 12px; }
.gnb__card { display: grid; grid-template-columns: 52px minmax(0, 1fr) 12px; align-items: center; gap: 14px; min-height: 82px; padding: 13px 16px; border: 1px solid var(--mp-line-soft); border-radius: var(--r-sm); background: #fff; text-align: left; transition: border-color .18s ease, background .18s ease, transform .2s var(--mp-ease), box-shadow .2s ease; }
.gnb__card:hover { border-color: var(--mp-accent); background: #f7faff; transform: translateY(-2px); box-shadow: var(--sh-2); }
.gnb__card > img:first-child { width: 52px; height: 52px; border-radius: 50%; }
.gnb__card strong { display: block; font-size: 14px; font-weight: 700; }
.gnb__card small { display: block; color: var(--text-desc); font-size: 12px; line-height: 1.45; }
.gnb__card > img:last-child { width: 12px; height: 11.3px; }

.header { --mp-accent: var(--accent-blue); --mp-deep: var(--accent-navy); --mp-line-soft: var(--gray-200); --mp-ease: cubic-bezier(.32,.72,0,1); --r-sm: 12px; --r-md: 20px; --r-lg: 28px; --sh-2: 0 14px 34px rgba(16,49,107,.16); }
.gnb-toggle { border: 0; padding: 0; cursor: pointer; }
.gnb__explorer, .gnb__aside { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.gnb__details { padding-top: 6px; }
.gnb__details[hidden] { display: none; }
.gnb__group { display: flex; flex-direction: column; gap: 10px; }
.gnb__card > span { display: flex; flex-direction: column; gap: 3px; }
.gnb__card img { display: block; }
.gnb__primary-link { grid-column: 1 / -1; font-size: 13px; color: var(--mp-accent); }
.gnb .tab-pill { flex: none; border: 1px solid var(--mp-line-soft); border-radius: var(--radius-full); background: #fff; color: var(--gray-500); font-weight: 500; cursor: pointer; transition: border-color .3s, background .3s, color .3s; }
.gnb .tab-pill:hover { border-color: var(--gray-400); color: var(--text-main); }
.gnb .tab-pill[aria-selected="true"] { border-color: var(--mp-deep); background: var(--mp-deep); color: #fff; font-weight: 800; }
.gnb :focus-visible, .gnb-toggle:focus-visible { outline: 3px solid rgba(37,99,235,.3); outline-offset: 2px; }
/* ---- Header 확장 ---- */
.header__logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header__logo-image {
  height: 24px;
  width: auto;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header__auth-button {
  height: 40px;
  padding: 0 20px;
  font-size: 14px;
  white-space: nowrap;
  border-radius: var(--radius-full);
}

@media (max-width: 980px) {
  .gnb__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .gnb__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .header .container { gap: 10px; }
  .header__logo-image { height: 20px; }
  .header__core { justify-content: flex-end; }
  .header__core .header-search { display: none; }
  .header__auth-button { height: 36px; padding: 0 14px; font-size: 13px; }
  .gnb { display: flex; flex-direction: column; gap: 20px; right: 12px; left: 12px; padding: 20px 16px 24px; border-radius: 0 0 var(--r-md) var(--r-md); }
  .gnb__search { display: block; }
  .gnb__search:not(:has(*)) { display: none; }
  .gnb__search .header-search { max-width: none; }
  .gnb__search .search-bar { max-width: none; }
  .gnb__grid { max-height: calc(100vh - var(--header-h) - 44px); }
  .gnb__tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 16px; scrollbar-width: none; }
  .gnb__details { grid-template-columns: 1fr; gap: 18px; padding-top: 2px; }
  .gnb__cards { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
  .header__logo-image { height: 18px; }
  .header__auth-button { padding: 0 12px; font-size: 12px; }
}

/* ================================================
   공용 헤더/푸터 스타일
   - main-layout, default-layout, mypage-layout 공유
   - artisthub-base.css 토큰 의존
   ================================================ */

/* ---- default-layout.css 요소 선택자 충돌 리셋 ---- */
header.header {
  width: 100%;
  flex-direction: row;
  justify-content: center;
  box-shadow: none;
}

header.header > .container {
  width: 100%;
  max-width: var(--container-max, 1440px);
}

footer.site-footer {
  width: 100%;
  flex-direction: column;
  align-items: center;
}

footer.site-footer > .container {
  width: 100%;
  max-width: var(--container-max, 1440px);
}

/* ---- Header 기존 컴포넌트 통합 ---- */
.header .notification-bell {
  margin-left: 4px;
}

.header .login-menu-div {
  position: relative;
}

/* ================================================
   헤더 검색바 + 드롭다운
   ================================================ */
.header-search {
  position: relative;
  flex: 1;
  max-width: 480px;
  min-width: 0;
}

/* 드롭다운 컨테이너 */
.header-search__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--gray-200);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: calc(var(--z-header, 100) + 10);
  overflow: hidden;
}

.header-search__dropdown.is-open {
  display: block;
}

/* 추천 검색어 리스트 */
.header-search__suggestions {
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-search__suggestions:empty {
  display: none;
}

.header-search__suggestion-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-main);
  cursor: pointer;
  transition: background-color 0.15s;
}

.header-search__suggestion-item:hover,
.header-search__suggestion-item.is-active {
  background-color: var(--gray-50, #f8f9fa);
}

.header-search__suggestion-item i {
  color: var(--text-desc);
  font-size: 13px;
  flex-shrink: 0;
}

/* AI 검색 CTA — 연관 검색어보다 시각적 비중을 낮춘 보조 항목 */
.header-search__ai-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  border: none;
  border-top: 1px solid var(--gray-100, #f1f3f5);
  background: var(--gray-50, #f8f9fa);
  color: #6366f1;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s;
}

.header-search__ai-cta:hover {
  background: var(--gray-100, #f1f3f5);
  color: #6366f1;
}

.header-search__ai-cta i:first-child {
  font-size: 12px;
  opacity: 0.8;
}

.header-search__ai-cta i:last-child {
  font-size: 11px;
  opacity: 0.5;
  margin-left: auto;
}

/* ---- 추천 검색어 타입 배지 ---- */
.header-search__suggestion-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-search__badges {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}

.header-search__type-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.header-search__type-badge i {
  font-size: 10px;
}

.header-search__type-badge--program {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
}

.header-search__type-badge--partner {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

/* ---- 헤더 검색 다크모드 ---- */
body.theme-dark .header-search__dropdown {
  background: rgba(24, 24, 30, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

body.theme-dark .header-search__suggestion-item:hover,
body.theme-dark .header-search__suggestion-item.is-active {
  background-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .header-search__type-badge--program {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

body.theme-dark .header-search__type-badge--partner {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

body.theme-dark .header-search__ai-cta {
  border-top-color: rgba(255, 255, 255, 0.08);
  background: rgba(30, 30, 40, 0.95);
  color: #a5b4fc;
}

body.theme-dark .header-search__ai-cta:hover {
  background: rgba(40, 40, 52, 0.95);
  color: #a5b4fc;
}

/* ---- 헤더 검색 반응형 ---- */
@media (max-width: 768px) {
  .header-search {
    max-width: 240px;
  }
}


/* ================================================
   FOOTER
   ================================================ */
.site-footer {
  padding: 72px 0 64px;
  background: var(--bg-section-muted);
  border-top: 1px solid var(--gray-200);
}

.site-footer__top {
  padding-bottom: 32px;
}

.site-footer__logo {
  display: inline-block;
  margin-bottom: 20px;
}

.site-footer__logo-img {
  height: 24px;
  width: auto;
}

.site-footer__desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-sub);
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 32px;
  border-top: 1px solid var(--gray-200);
}

.site-footer__copy {
  font-size: 13px;
  color: var(--gray-500);
}

.site-footer__links {
  display: flex;
  gap: 20px;
}

.site-footer__links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  transition: color var(--ease-default);
}

.site-footer__links a:hover {
  color: var(--text-main);
}

/* ---- 푸터 회사 정보 ---- */
.site-footer__info {
  padding: 32px 0;
  border-top: 1px solid var(--gray-200);
}

.site-footer__info p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.site-footer__info p:last-child {
  margin-bottom: 0;
}

.site-footer__mail-link {
  text-decoration: underline;
  color: var(--gray-500);
}

body.theme-dark .site-footer__info {
  border-color: rgba(255, 255, 255, 0.06);
}

/* ---- 푸터 다크모드 ---- */
body.theme-dark .site-footer {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.06);
}

body.theme-dark .site-footer__bottom {
  border-color: rgba(255, 255, 255, 0.06);
}

/* ---- 푸터 반응형 ---- */
@media (max-width: 640px) {
  .site-footer {
    padding: 48px 0 40px;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}
