header {
  position: relative;
  width: 100%;
}

@media only screen and (max-width: 767px) {
  header {
    height: 56px;
    z-index: 1;
  }

  header > .mobile {
    display: block;
  }

  header > .desktop {
    display: none;
  }

  header > .menu-button {
    position: absolute;
    width: 20px;
    height: 16px;
    left: 20px;
    top: 20px;
  }

  header > .menu-button > a {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-image: url('/legacy/img/menu-button.svg');
    background-size: 20px 16px;
  }

  header > .menu-button > a:active {
    opacity: 0.7;
  }

  header > .title {
    position: absolute;
    width: calc(100% - 40px - 40px);
    height: 21px;
    left: 40px;
    top: 18px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
  }

  header > .notification-button {
    position: absolute;
    width: 20px;
    height: 20px;
    left: calc(100% - 39px);
    top: 18px;
  }

  header > .notification-button > a {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url('/legacy/img/notification-button.svg');
    background-size: 20px 20px;
  }

  header > .notification-button > a:active {
    opacity: 0.7;
  }

  header > .nav.on {
    left: 0;
  }

  header > .nav {
    width: 270px;
    height: 100vh;
    position: fixed;
    left: -271px;
    top: 0;
    box-shadow: 30px 0 30px 0 rgba(29, 4, 77, 0.3);
    background-image: -webkit-linear-gradient(293deg, #4c23b6, #8341e6);
    background-image: -o-linear-gradient(293deg, #4c23b6, #8341e6);
    background-image: linear-gradient(23deg, #4c23b6, #8341e6);
    z-index: 3;
    transition: left 0.3s;
  }

  header > .nav > .close-button {
    position: absolute;
    width: 20px;
    height: 20px;
    left: 30px;
    top: 30px;
  }

  header > .nav > .close-button > a {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    background-image: url('/legacy/img/close-button.svg');
  }

  header > .nav > .close-button > a:active {
    opacity: 0.7;
  }

  header > .nav > ul.list {
    position: absolute;
    width: calc(100% - 40px);
    left: 40px;
    top: 90px;
    list-style-type: none;
  }

  header > .nav > ul.list > li.profile {
    position: relative;
    height: 78px;
  }

  header > .nav > ul.list > li.profile > .picture {
    position: absolute;
    width: 52px;
    height: 52px;
    left: 0;
    top: 0;
    background-image: url('/legacy/img/default-profile-picture.svg');
  }

  header > .nav > ul.list > li.profile > .username {
    position: absolute;
    left: 66px;
    top: 19px;
    width: 150px;
    height: 14px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
  }

  header > .nav > ul.list > li.home,
  header > .nav > ul.list > li.royalty,
  header > .nav > ul.list > li.my-song-list,
  header > .nav > ul.list > li.song-registration,
  header > .nav > ul.list > li.my-info,
  header > .nav > ul.list > li.qna,
  header > .nav > ul.list > li.notifications {
    position: relative;
    height: 51px;
  }

  header > .nav > ul.list > li.royalty-sublist {
    position: relative;
    height: 72px;
    display: none;
  }

  header > .nav > ul.list > li > a {
    position: absolute;
    font-size: 22px;
    font-weight: bold;
    color: #ffffff;
    text-decoration: none;
  }

  header > .nav > .list > li > a:active {
    opacity: 0.7;
  }

  header > .nav > ul.list > li.royalty-sublist > ul {
    position: relative;
    width: 100%;
    height: 100%;
    list-style-type: none;
  }

  header > .nav > ul.list > li.royalty-sublist > ul > li {
    position: relative;
    height: 33px;
  }

  header > .nav > ul.list > li.royalty-sublist > ul > li > a {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 16px;
    color: #ffffff;
    text-decoration: none;
  }

  header > .nav > ul.list > li.royalty-sublist > ul > li > a:active {
    opacity: 0.7;
  }

  header > .nav > .log-out-form {
    position: absolute;
    width: 70px;
    height: 16px;
    left: 40px;
    top: calc(100vh - 56px);
  }

  header > .nav > .log-out-form > .log-out {
    position: absolute;
    left: 0;
    top: 0;
    background-color: transparent;
    color: #ffffff;
    outline: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
  }

  header > .nav > .log-out-form > .log-out:hover,
  header > .nav > .log-out-form > .log-out:active {
    cursor: pointer;
  }

  header > .nav > .log-out-form > .log-out:active {
    opacity: 0.7;
  }

  header > .nav > .sign-up {
    position: absolute;
    width: 55px;
    height: 16px;
    left: 40px;
    top: calc(100vh - 56px);
  }

  header > .nav > .bar {
    position: absolute;
    width: 2px;
    height: 12px;
    left: 105px;
    top: calc(100vh - 54px);
    background-color: #ffffff;
  }

  header > .nav > .log-in {
    position: absolute;
    width: 50px;
    height: 16px;
    left: 123px;
    top: calc(100vh - 56px);
  }

  header > .nav > .sign-up > a,
  header > .nav > .log-in > a {
    position: absolute;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    text-decoration: none;
  }

  header > .nav > .sign-up > a:active,
  header > .nav > .log-in > a:active {
    opacity: 0.7;
  }

  header > .dim {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 2;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
  }

  /* royalty-sublist 높이 수정 (Details 메뉴 추가를 위해) */
  header > .nav > ul.list > li.royalty-sublist {
    position: relative;
    height: 105px; /* 33px 추가 (72px -> 105px) */
    display: none;
  }
}

@media only screen and (min-width: 768px) {
  header {
    height: 140px;
    z-index: 1;
  }

  header > .mobile {
    display: none;
  }

  header > .desktop {
    display: block;
  }

  header > .nav {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
  }

  header > .nav > .logo {
    position: absolute;
    width: 135px;
    height: 33px;
    left: calc(50% - 590px);
    top: 54px;
    background-image: url('/legacy/img/logo2.svg');
    z-index: 1;
  }

  header > .nav > .royalty,
  header > .nav > .my-song-list,
  header > .nav > .song-registration,
  header > .nav > .my-info,
  header > .nav > .qna {
    position: absolute;
    height: 21px;
    top: 60px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    opacity: 0.7;
    text-decoration: none;
  }

  header > .nav > .sign-up,
  header > .nav > .log-in {
    position: absolute;
    height: 16px;
    top: 63px;
    color: #ffffff;
    font-size: 14px;
    opacity: 0.7;
    font-weight: 500;
    text-decoration: none;
    z-index: 1;
  }

  header > .nav > .royalty {
    left: calc(50% - 387px);
    z-index: 1;
  }

  header > .nav > .my-song-list {
    left: calc(50% - 291px);
    z-index: 1;
  }

  header > .nav > .song-registration {
    left: calc(50% - 150px);
    z-index: 1;
  }

  header > .nav > .my-info {
    left: calc(50% + 30px);
    z-index: 1;
  }

  header > .nav > .qna {
    left: calc(50% + 127px);
    z-index: 1;
  }

  header > .nav > .sign-up {
    left: calc(50% + 265px);
    z-index: 1;
  }

  header > .nav > .log-in {
    left: calc(50% + 348px);
    z-index: 1;
  }

  header > .nav > .bar {
    position: absolute;
    width: 2px;
    height: 12px;
    left: calc(50% + 330px);
    top: 65px;
    opacity: 0.7;
    background-color: #ffffff;
    z-index: 1;
  }

  header > .nav > .profile {
    position: absolute;
    width: 250px;
    height: 40px;
    left: calc(50% + 245px);
    top: 50px;
    z-index: 1;
  }

  header > .nav > .profile:hover {
    cursor: pointer;
  }

  header > .nav > .profile > .picture {
    position: absolute;
    width: 40px;
    height: 40px;
    z-index: 1;
  }

  header > .nav > .profile > .username {
    position: absolute;
    height: 19px;
    left: 54px;
    top: 11px;
    color: #ffffff;
    font-size: 16px;
    z-index: 1;
  }

  header > .nav > .royalty:hover,
  header > .nav > .my-song-list:hover,
  header > .nav > .song-registration:hover,
  header > .nav > .my-info:hover,
  header > .nav > .qna:hover,
  header > .nav > .sign-up:hover,
  header > .nav > .log-in:hover,
  header > .nav > .notification-button:hover,
  header > .nav > .menu-button:hover,
  header > .nav > .close-button:hover {
    opacity: 1;
  }

  header > .nav > .menu-button {
    position: absolute;
    width: 20px;
    height: 16px;
    left: calc(50% + 561px);
    top: 62px;
    opacity: 0.7;
    background-image: url('/legacy/img/menu-button.svg');
    z-index: 1;
  }

  header > .nav > .close-button {
    position: absolute;
    display: none;
    width: 20px;
    height: 20px;
    left: calc(50% + 561px);
    top: 60px;
    opacity: 0.7;
    background-image: url('/legacy/img/close-button.svg');
    z-index: 1;
  }

  header > .nav > .notification-button {
    position: absolute;
    width: 20px;
    height: 20px;
    left: calc(50% + 507px);
    top: 60px;
    opacity: 0.7;
    background-image: url('/legacy/img/notification-button.svg');
    z-index: 1;
  }

  header > .nav-extended {
    position: absolute;
    display: none;
    width: 100%;
    height: 248px;
    z-index: 0;
    background-image: -webkit-linear-gradient(353deg, #4c23b6, #8341e6 100%);
    background-image: -o-linear-gradient(353deg, #4c23b6, #8341e6 100%);
    background-image: linear-gradient(83deg, #4c23b6, #8341e6 100%);
    box-shadow: 0 30px 30px 0 rgba(29, 4, 77, 0.3);
  }

  header > .nav-extended > .log-out-form {
    position: absolute;
    left: calc(50% + 299px);
    top: 111px;
  }

  header > .nav-extended > .statement,
  header > .nav-extended > .get-paid {
    position: absolute;
    height: 19px;
    color: #ffffff;
    text-decoration: none;
    opacity: 0.7;
    font-size: 14px;
  }

  header > .nav-extended > .statement:hover,
  header > .nav-extended > .get-paid:hover {
    opacity: 1;
  }

  header > .nav-extended > .statement {
    left: calc(50% - 387px);
    top: 111px;
  }

  header > .nav-extended > .get-paid {
    left: calc(50% - 387px);
    top: 142px;
  }

  header > .nav-extended > .log-out-form > .log-out {
    position: absolute;
    left: 0;
    top: 0;
    background-color: transparent;
    color: #ffffff;
    border: none;
    opacity: 0.7;
    outline: none;
    font-size: 14px;
    font-weight: 500;
  }

  header > .nav-extended > .log-out-form > .log-out:hover {
    opacity: 1;
    cursor: pointer;
  }

  header > .nav-extended > .statement,
  header > .nav-extended > .details,  /* details 추가 */
  header > .nav-extended > .get-paid {
    position: absolute;
    height: 19px;
    color: #ffffff;
    text-decoration: none;
    opacity: 0.7;
    font-size: 14px;
  }

  header > .nav-extended > .statement:hover,
  header > .nav-extended > .details:hover,  /* details 추가 */
  header > .nav-extended > .get-paid:hover {
    opacity: 1;
  }

  header > .nav-extended > .statement {
    left: calc(50% - 387px);
    top: 111px;
  }

  header > .nav-extended > .details {
    /* details 위치 지정 */
    left: calc(50% - 387px);
    top: 142px;
  }

  header > .nav-extended > .get-paid {
    /* get-paid 위치 수정 */
    left: calc(50% - 387px);
    top: 173px;
  }
}
