/* v270: 모든 페이지 상단 메뉴를 첫 페이지와 같은 넓은 3단 배치로 통일 */
.site-header-v165.ip-topbar.v49-topbar,
.unified-home-header.ip-topbar.v49-topbar,
body.landing-v49 .site-header-v165.v49-topbar {
  width: 100% !important;
  max-width: none !important;
  min-height: 72px !important;
  height: 72px !important;
  margin: 0 !important;
  padding: 0 28px !important;
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: 280px minmax(0, 1fr) 360px !important;
  align-items: center !important;
  gap: 18px !important;
}

.site-header-v165 .site-header-brand,
.unified-home-header .site-header-brand {
  justify-self: start !important;
  min-width: 0 !important;
  white-space: nowrap !important;
}

.site-header-v165 .site-header-nav,
.unified-home-header .site-header-nav {
  justify-self: center !important;
  width: auto !important;
  min-width: 0 !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: clamp(20px, 2.15vw, 44px) !important;
  overflow: visible !important;
  padding: 0 !important;
}

.site-header-v165 .site-header-nav a,
.unified-home-header .site-header-nav a {
  flex: 0 0 auto !important;
  padding: 0 !important;
  font-size: 14px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.site-header-v165 .site-header-spacer,
.unified-home-header .site-header-spacer {
  display: block !important;
  justify-self: end !important;
  width: 360px !important;
  height: 1px !important;
}

.site-header-v165 .site-header-stats,
.unified-home-header .site-header-stats {
  display: none !important;
}

/* 중간 폭에서는 한 줄을 유지하되 메뉴가 겹치지 않도록 완만하게 축소 */
@media (max-width: 1540px) and (min-width: 1181px) {
  .site-header-v165.ip-topbar.v49-topbar,
  .unified-home-header.ip-topbar.v49-topbar,
  body.landing-v49 .site-header-v165.v49-topbar {
    grid-template-columns: 230px minmax(0, 1fr) 230px !important;
    gap: 12px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  .site-header-v165 .site-header-nav,
  .unified-home-header .site-header-nav {
    gap: clamp(10px, 1.25vw, 20px) !important;
  }
  .site-header-v165 .site-header-nav a,
  .unified-home-header .site-header-nav a {
    font-size: 12.5px !important;
  }
  .site-header-v165 .site-header-spacer,
  .unified-home-header .site-header-spacer {
    width: 230px !important;
  }
}

/* 태블릿은 기존처럼 가로 스크롤로 안전하게 표시 */
@media (max-width: 1180px) and (min-width: 821px) {
  .site-header-v165.ip-topbar.v49-topbar,
  .unified-home-header.ip-topbar.v49-topbar,
  body.landing-v49 .site-header-v165.v49-topbar {
    grid-template-columns: 205px minmax(0, 1fr) !important;
    grid-template-rows: 1fr !important;
    gap: 12px !important;
    padding: 0 18px !important;
  }
  .site-header-v165 .site-header-nav,
  .unified-home-header .site-header-nav {
    justify-self: stretch !important;
    justify-content: flex-start !important;
    width: 100% !important;
    gap: 14px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 8px 0 !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }
  .site-header-v165 .site-header-nav::-webkit-scrollbar,
  .unified-home-header .site-header-nav::-webkit-scrollbar {
    display: none !important;
  }
  .site-header-v165 .site-header-nav a,
  .unified-home-header .site-header-nav a {
    font-size: 12px !important;
  }
  .site-header-v165 .site-header-spacer,
  .unified-home-header .site-header-spacer {
    display: none !important;
  }
}
