.wm-service-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid rgba(230, 233, 243, 0.9);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 36px rgba(31, 35, 65, 0.08);
  backdrop-filter: blur(18px);
}

.wm-service-header,
.wm-service-header * {
  box-sizing: border-box;
}

.wm-service-header a {
  text-decoration: none;
}

.wm-service-header__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  width: min(1180px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
}

.wm-service-header__brand {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  transition: opacity 160ms ease, transform 160ms ease;
}

.wm-service-header__brand:hover,
.wm-service-header__brand:focus-visible {
  opacity: 0.82;
  outline: none;
  transform: translateY(-1px);
}

.wm-service-header__brand img {
  display: block;
  width: 146px;
  height: auto;
}

.wm-service-header__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.wm-service-header__nav-link,
.wm-service-header__ghost-link,
.wm-service-header__primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 999px;
  padding: 9px 14px;
  color: #596176;
  font-family: Pretendard, Apple SD Gothic Neo, Noto Sans KR, sans-serif;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.wm-service-header__nav-link:hover,
.wm-service-header__nav-link:focus-visible,
.wm-service-header__ghost-link:hover,
.wm-service-header__ghost-link:focus-visible {
  background: #f6f3ff;
  color: var(--wm-theme-primary-dark, #4d3d99);
  outline: none;
  transform: translateY(-1px);
}

.wm-service-header__nav-link.is-active {
  background: linear-gradient(135deg, rgba(109, 74, 255, 0.13), rgba(24, 182, 167, 0.12));
  color: var(--wm-theme-primary, #6d4aff);
  box-shadow: inset 0 0 0 1px rgba(109, 74, 255, 0.13);
}

.wm-service-header__actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.wm-service-header__primary-link {
  border: 0;
  background: var(--wm-theme-primary-gradient, linear-gradient(135deg, #6d4aff, #4d3d99));
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(109, 74, 255, 0.2);
}

.wm-service-header__primary-link:hover,
.wm-service-header__primary-link:focus-visible {
  background: var(--wm-theme-primary-gradient-hover, linear-gradient(135deg, #5f3fff, #4d3d99));
  color: #ffffff;
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(109, 74, 255, 0.26);
}

.wm-service-header__ghost-link {
  border: 1px solid var(--wm-theme-line, #e6e9f3);
  background: rgba(255, 255, 255, 0.78);
}

.wm-service-header__profile {
  position: relative;
}

.wm-service-header__profile summary {
  list-style: none;
}

.wm-service-header__profile summary::-webkit-details-marker {
  display: none;
}

.wm-service-header__profile-trigger {
  position: relative;
  display: inline-grid;
  grid-template-columns: 52px;
  align-items: center;
  min-height: 58px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #30355f;
  padding: 3px;
  cursor: pointer;
  transition: box-shadow 0.5s ease;
}

.wm-service-header__profile-trigger::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(243, 240, 255, 0.96), rgba(232, 251, 247, 0.9));
  box-shadow: 0 10px 24px rgba(47, 42, 104, 0.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.wm-service-header__profile-trigger:hover,
.wm-service-header__profile-trigger:focus-visible {
  background: transparent;
  outline: none;
  transform: none;
}

.wm-service-header__profile-trigger:hover::before,
.wm-service-header__profile-trigger:focus-visible::before,
.wm-service-header__profile[open] .wm-service-header__profile-trigger::before {
  opacity: 1;
}

.wm-service-header__avatar {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border-radius: 17px;
  background: linear-gradient(135deg, #efe9ff, #e9f7ff);
  box-shadow: inset 0 0 0 1px rgba(109, 74, 255, 0.08);
  transition: border-radius 0.5s ease, box-shadow 0.5s ease;
}

.wm-service-header__profile-trigger:hover .wm-service-header__avatar,
.wm-service-header__profile-trigger:focus-visible .wm-service-header__avatar,
.wm-service-header__profile[open] .wm-service-header__avatar {
  border-radius: 50%;
}

.wm-service-header__avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wm-service-header__avatar img.wm-service-header__avatar-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.wm-service-header__account {
  display: grid;
  align-items: center;
  justify-items: start;
  min-width: 0;
  max-width: min(170px, 32vw);
  text-align: left;
}

.wm-service-header__account-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wm-service-header__account-name {
  color: #30355f;
  font-size: 14px;
  font-weight: 950;
}

.wm-service-header__chevron {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease;
}

.wm-service-header__profile[open] .wm-service-header__chevron {
  transform: rotate(180deg);
}

.wm-service-header__menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  left: auto;
  display: grid;
  width: max-content;
  max-width: calc(100vw - 28px);
  overflow: hidden;
  border: 1px solid var(--wm-theme-line, #e6e9f3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 60px rgba(31, 35, 65, 0.16);
  transform: none;
}

.wm-service-header__menu a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 52px;
  padding: 0 14px;
  color: #4f5580;
  font-size: 15px;
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
}

.wm-service-header__menu a svg {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wm-service-header__menu a:hover,
.wm-service-header__menu a:focus-visible {
  background: #f8f6ff;
  color: var(--wm-theme-primary, #6d4aff);
  outline: none;
}

@media (max-width: 1023px) {
  .wm-service-header__inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
    min-height: 72px;
    width: min(100% - 32px, 900px);
  }

  .wm-service-header__nav {
    justify-content: center;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .wm-service-header__nav::-webkit-scrollbar {
    display: none;
  }

  .wm-service-header__brand img {
    width: 132px;
  }
}

@media (max-width: 639px) {
  .wm-service-header__inner {
    gap: 8px;
    min-height: 64px;
    width: min(100% - 18px, 520px);
  }

  .wm-service-header__brand img {
    width: 112px;
  }

  .wm-service-header__profile-trigger {
    grid-template-columns: 38px;
    min-height: 44px;
    padding: 2px;
  }

  .wm-service-header__avatar {
    width: 38px;
    height: 38px;
  }

  .wm-service-header__avatar img.wm-service-header__avatar-logo {
    width: 25px;
    height: 25px;
  }

  .wm-service-header__account {
    display: none;
  }

  .wm-service-header__menu {
    right: 0;
    left: auto;
    transform: none;
  }

  .wm-service-header__nav-link {
    min-height: 36px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .wm-service-header__ghost-link,
  .wm-service-header__primary-link {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 13px;
  }
}
