/* Figma 384:5939 TOP — polished */

.sl-v2-hd {
  --sl-v2-hd-blue: #3247fa;
  --sl-v2-hd-text: #333333;
  --sl-v2-hd-muted: #667d8d;
  --sl-v2-hd-border: #ecf1f5;
  --sl-v2-hd-shadow: 0 1px 0 rgba(50, 71, 250, 0.06);
  --sl-v2-hd-progress: 0;
  --sl-v2-hd-h: calc(90px - 18px * var(--sl-v2-hd-progress));
  --sl-v2-hd-logo-w: calc(120px - 20px * var(--sl-v2-hd-progress));
  --sl-v2-hd-logo-h: calc(51px - 9px * var(--sl-v2-hd-progress));
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  height: var(--sl-v2-hd-h);
  background: #fff;
  box-shadow: var(--sl-v2-hd-shadow);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.sl-v2-hd.is-scrolled {
  box-shadow: 0 2px 14px rgba(17, 24, 39, 0.08);
}

.sl-v2-hd *,
.sl-v2-hd *::before,
.sl-v2-hd *::after {
  box-sizing: border-box;
  font-family: inherit;
}

.sl-v2-hd__inner {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
  align-items: center;
  width: 100%;
  max-width: 1920px;
  height: var(--sl-v2-hd-h);
  margin: 0 auto;
  padding: 0 50px;
}

.sl-v2-hd--full-inner .sl-v2-hd__inner {
  max-width: none;
}

/* logo — sparkle 잘림 방지 */
.sl-v2-hd__logo {
  justify-self: start;
  flex-shrink: 0;
  width: var(--sl-v2-hd-logo-w);
  height: var(--sl-v2-hd-logo-h);
  overflow: visible;
}

.sl-v2-hd__logo-link {
  display: block;
  width: var(--sl-v2-hd-logo-w);
  height: var(--sl-v2-hd-logo-h);
  line-height: 0;
  transition: opacity 0.2s ease;
}

.sl-v2-hd__logo-link:hover {
  opacity: 0.88;
}

.sl-v2-hd__logo-img {
  display: block;
  width: var(--sl-v2-hd-logo-w);
  height: var(--sl-v2-hd-logo-h);
  object-fit: contain;
  object-position: left center;
}

/* nav — 화면 중앙 정렬 + 슬라이딩 밑줄 */
.sl-v2-hd__nav {
  position: relative;
  justify-self: center;
  display: flex;
  align-items: stretch;
  gap: 30px;
  height: var(--sl-v2-hd-h);
}

.sl-v2-hd__nav-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  border-radius: 1px;
  background: var(--sl-v2-hd-blue);
  pointer-events: none;
  opacity: 0;
  z-index: 2;
  transition:
    left 0.34s cubic-bezier(0.25, 0.8, 0.25, 1),
    width 0.34s cubic-bezier(0.25, 0.8, 0.25, 1),
    opacity 0.22s ease;
}

.sl-v2-hd__nav-item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  height: 100%;
  text-decoration: none;
  color: var(--sl-v2-hd-text);
  transition: color 0.22s ease;
}

.sl-v2-hd__nav-item:hover,
.sl-v2-hd__nav-item:focus-visible {
  color: var(--sl-v2-hd-blue);
}

.sl-v2-hd__nav-item.is-active {
  color: var(--sl-v2-hd-blue);
  font-weight: 600;
}

.sl-v2-hd__nav-text {
  display: flex;
  flex: 1 0 0;
  align-items: center;
  justify-content: flex-start;
  min-height: 1px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* tools */
.sl-v2-hd__tools {
  position: relative;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* icon buttons — 40px 터치 영역 + 호버 */
.sl-v2-hd__icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #333;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.25s ease, transform 0.15s ease;
}

.sl-v2-hd__icon-btn::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: var(--sl-v2-hd-blue);
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
  z-index: 0;
}

.sl-v2-hd__icon-btn:hover,
.sl-v2-hd #sl2LangWrap.open .sl2-lang-btn {
  color: #fff;
}

.sl-v2-hd__icon-btn:hover::after,
.sl-v2-hd #sl2LangWrap.open .sl2-lang-btn::after {
  width: 100%;
  height: 100%;
}

.sl-v2-hd__icon-btn:active {
  transform: scale(0.94);
}

.sl-v2-hd__icon-svg {
  position: relative;
  z-index: 1;
  display: block;
  width: 24px;
  height: 24px;
  pointer-events: none;
}

/* mymenu popup */
.sl-v2-hd #sl2_mymenu_popup.sl2-popup {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  width: 148px;
  min-width: 136px;
  padding: 8px;
  border: 1px solid var(--sl-v2-hd-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.12);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 120;
}

.sl-v2-hd #sl2_mymenu_popup.sl2-popup.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.sl-v2-hd #sl2_mymenu_popup::before {
  display: none;
}

.sl-v2-hd__menulist-wrap {
  position: relative;
}

.sl-v2-hd #sl2_mymenu_popup .menulist {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sl-v2-hd__menu-indicator {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 0;
  border-radius: 8px;
  background: #f5f7fa;
  pointer-events: none;
  opacity: 0;
  z-index: 0;
  transition:
    top 0.34s cubic-bezier(0.25, 0.8, 0.25, 1),
    height 0.34s cubic-bezier(0.25, 0.8, 0.25, 1),
    opacity 0.22s ease,
    background 0.22s ease;
}

.sl-v2-hd__menu-indicator.is-withdraw {
  background: #f0f5f9;
}

.sl-v2-hd #sl2_mymenu_popup .menulist > li {
  position: relative;
  z-index: 1;
  width: 100%;
}

.sl-v2-hd #sl2_mymenu_popup .menulist > li .link {
  position: relative;
  z-index: 1;
  display: block;
  padding: 10px 8px;
  border-radius: 8px;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.03em;
  text-align: center;
  color: #1a1a1a;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease, font-weight 0.18s ease;
}

.sl-v2-hd #sl2_mymenu_popup .menulist > li .link:hover,
.sl-v2-hd #sl2_mymenu_popup .menulist > li .link:focus-visible {
  color: var(--sl-v2-hd-blue);
  font-weight: 600;
}

.sl-v2-hd #sl2_mymenu_popup .menulist > li .link.is-active {
  color: var(--sl-v2-hd-blue);
  font-weight: 600;
}

/* .sl-v2-hd #sl2_mymenu_popup .menulist > li.sl-v2-hd__menu-withdraw .link {
  color: var(--sl-v2-hd-blue);
  font-weight: 600;
} */

/* profile chip */
.sl-v2-hd__profile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 4px 5px;
  border: 1px solid var(--sl-v2-hd-border);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sl-v2-hd__profile:hover {
  border-color: #d8e2ea;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.06);
}

.sl-v2-hd__profile.on {
  border-color: rgba(50, 71, 250, 0.35);
  box-shadow: 0 0 0 3px rgba(50, 71, 250, 0.08);
}

.sl-v2-hd__avatar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #3247fa 0%, #7557eb 100%);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}

.sl-v2-hd__avatar--photo {
  background: #f0f5f9;
}

.sl-v2-hd__avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sl-v2-hd__nick-wrap {
  max-width: 108px;
  padding: 0 2px;
  overflow: hidden;
}

.sl-v2-hd__nick {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #212121;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sl-v2-hd__pointbox {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: stretch;
  padding: 0 12px 0 10px;
  border-radius: 999px;
  background: #f0f5f9;
}

.sl-v2-hd__coin {
  display: block;
  width: 15px;
  height: 15px;
  object-fit: contain;
}

.sl-v2-hd__point {
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--sl-v2-hd-muted);
  white-space: nowrap;
}

/* guest */
.sl-v2-hd__guest {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sl-v2-hd__join-anchor {
  position: relative;
  display: inline-flex;
  vertical-align: top;
}

.sl-v2-hd__guest-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 18px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.sl-v2-hd__guest-btn:hover {
  border-color: var(--sl-v2-hd-blue);
  color: var(--sl-v2-hd-blue);
}

.sl-v2-hd__guest-btn--primary {
  border-color: var(--sl-v2-hd-blue);
  background: var(--sl-v2-hd-blue);
  color: #fff;
}

.sl-v2-hd__guest-btn--primary:hover {
  background: #2a3cd4;
  border-color: #2a3cd4;
  color: #fff;
}

/* 회원가입 팝업 — 헤더·버튼 기준 즉시 배치 (로드 시 점프 방지) */
.sl-v2-hd .sl-v2-hd__join-anchor #sl2_join_popup.sl2-popup {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  right: auto;
  margin: 0;
  transform: translateX(-50%);
  z-index: 150;
  transition: opacity 0.25s ease;
}

.sl-v2-hd .sl-v2-hd__join-anchor #sl2_join_popup.sl2-popup.show {
  opacity: 1;
  pointer-events: auto;
}

.sl-v2-hd .sl-v2-hd__join-anchor #sl2_join_popup.sl2-popup::before {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

@media (max-width: 1200px) {
  .sl-v2-hd__inner {
    grid-template-columns: auto 1fr auto;
    gap: 16px;
  }

  .sl-v2-hd__nav {
    justify-self: end;
    gap: 20px;
  }
}

@media (max-width: 1100px) {
  .sl-v2-hd__nav-text {
    font-size: 14px;
  }

  .sl-v2-hd__nick-wrap {
    max-width: 72px;
  }
}

@media (max-width: 900px) {
  .sl-v2-hd__nav {
    display: none;
  }
}
