.header {
  display: flex;
  justify-content: center;
  width: 100%;
  flex-shrink: 0;
}

.header-inner {
  width: 100%;
  max-width: 402px;
  height: 55px;
  padding: 0 21px 12px;

  display: flex;
  align-items: end;
  justify-content: space-between;

  border-bottom: 1px solid var(--color-bg-front);
}

.header-start {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-back-btn {
  width: 24px;
  height: 24px;
}

.header-logo-icon {
  display: none;
}

.header-logo {
  color: var(--color-primary-100);
  margin: 0;
}

.header-logo a {
  line-height: 24px;
}

.header-menu {
  display: flex;
  gap: 12px;
}

.header-link {
  text-decoration: none;
  color: var(--color-system-wt);
  font-size: 14px;
  font-weight: 500;
  line-height: 24px;
  display: inline-block;
}

.header-link.signup {
  background-color: var(--color-primary-400);
  color: var(--color-system-950);
  padding: 2px 12px;
  border-radius: 100px;
  font-weight: 600;
}

.header-link.login {
  background-color: var(--color-bg-front);
  color: var(--color-system-wt);
  padding: 2px 12px;
  border-radius: 100px;
}

.header-right {
  position: relative; /* 메뉴 위치 기준점 */
  display: inline-block; /* 버튼 너비에 맞춤 */
}

.option-icon {
  background-color: var(--color-primary-400);
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: #111;
  font-weight: 600;
}

.option-menu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(100% + 16px); /* 아이콘 아래 여백 */
  background-color: var(--color-bg-front);
  padding: 12px 0;
  border-radius: 12px;
  box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.25);

  width: 112px;

  display: none; /* 기본 숨김 */
  z-index: 10;
}

/* 메뉴 항목 */
.option-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.option-menu li a {
  width: 100%;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 400;
  line-height: 21px;
  color: var(--color-system-wt);
  text-decoration: none;
  text-align: center;
}

/* 토글 ON → 메뉴 보이기 */
.option-menu.is-active {
  display: block;
}

/* 즐겨찾기 버튼 */
.header-fav-btn {
  display: inline-flex;
  align-items: center;
  background: var(--color-bg-front);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  padding: 3px 4px;
}

.header-fav-icon {
  width: 18px;
  height: 18px;
}

.header-fav-text {
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  color: var(--color-primary-100);
}

/* 활성화 상태 */
.header-fav-btn.is-active {
  background: var(--color-primary-400);
}

.header-fav-btn.is-active .header-fav-text {
  color: var(--color-system-bk);
}

/* ========================================
   PC (1024px 이상)
   ======================================== */
@media (min-width: 1024px) {
  .header-inner {
    max-width: 1200px;
    height: 64px;
    padding: 20px;
  }

  .header-logo-icon {
    display: block;
  }

  .header-logo-icon img {
    width: 40px;
    height: 24px;
  }

  .header-menu {
    gap: 24px;
  }

  .header-back-btn {
    display: none;
  }

  .header .option-icon {
    font-size: 14px;
    font-weight: 500;
    line-height: 21px;
    color: var(--color-primary-100);
    padding: 1.5px 25.5px;
  }

  .header-fav-btn {
    border-radius: 99px;
    padding: 3px 8px;
  }
}
