.ls-main-header {
    position: sticky;
    top: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    width: 100%;
    height: 50px;
    padding: 0 50px;
    overflow: visible;
    background: #fff;
    border-bottom: 1px solid #d9d9d9;
}

.ls-main-header *,
.ls-main-header *::before,
.ls-main-header *::after {
    box-sizing: border-box;
    font-family: "Microsoft JhengHei", sans-serif;
}

.ls-main-header__brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    width: 180px;
    height: 50px;
}

.ls-main-header__logo {
    display: block;
    max-width: none;
}

.ls-main-header__logo--wide {
    width: 180px;
    height: 40px;
}

.ls-main-header__logo--small {
    display: none;
    width: 50px;
    height: 50px;
}

.ls-main-header__actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    height: 50px;
    margin-left: auto;
    white-space: nowrap;
}

.ls-main-header__actions--guest,
.ls-main-header__actions--member {
    gap: 10px;
}

.ls-header-dropdown {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    height: 50px;
}

.ls-header-icon-btn,
.ls-header-lang-btn,
.ls-account-btn {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.ls-header-icon-btn img,
.ls-account-btn img {
    display: block;
    flex: 0 0 auto;
    width: 50px;
    height: 50px;
    max-width: none;
}

.ls-header-lang-btn {
    width: 32px;
}

.ls-header-lang-btn img {
    display: block;
    flex: 0 0 auto;
    width: 32px;
    height: 24px;
    max-width: none;
}

.ls-login-btn {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 50px;
    color: #fff;
    background: url("../images/common/btn_login_normal.svg") center / contain no-repeat;
    border: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .45em;
    text-indent: .45em;
    text-decoration: none;
}

.ls-login-btn:hover {
    color: #fff;
    background-image: url("../images/common/btn_login_hover.svg");
}

.ls-login-btn:active {
    background-image: url("../images/common/btn_login_active.svg");
}

.ls-header-medals {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
    height: 50px;
}

.ls-header-medals__item {
    display: grid;
    flex: 0 0 40px;
    grid-template-rows: 28px 18px;
    justify-items: center;
    width: 40px;
    height: 50px;
    color: #000;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.ls-header-medals__item img {
    width: 40px;
    height: 28px;
    max-width: none;
}

.ls-dropdown-panel {
    position: fixed;
    top: 50px;
    z-index: 2200;
    max-width: calc(100vw - 20px);
    overflow-x: hidden;
    background: #fff;
    box-shadow: 0 10px 18px rgba(0, 0, 0, .14);
}

.ls-dropdown-panel[hidden] {
    display: none !important;
}

.ls-dropdown-panel--course {
    right: 0;
    width: max-content;
    min-width: 210px;
    max-height: calc(100vh - 50px);
    padding: 20px 0;
    overflow-y: auto;
    border: 3px solid #ed4c7c;
    border-radius: 0 0 40px 40px;
}

.ls-course-home-link,
.ls-course-group__button,
.ls-course-lessons a {
    color: #000;
    font-size: 20px;
    line-height: 1.2;
    text-decoration: none;
}

.ls-course-home-link {
    display: flex;
    align-items: center;
    width: 100%;
    height: 60px;
    padding: 0 30px;
    white-space: nowrap;
}

.ls-course-divider,
.ls-language-divider {
    display: block;
    height: 2px;
    margin: 0 25px;
    background: #b8b8b8;
}

.ls-course-group__button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    height: 60px;
    padding: 0 30px;
    border: 0;
    background: transparent;
    white-space: nowrap;
    cursor: pointer;
}

.ls-course-group__icon {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    max-width: none;
}

.ls-course-group__icon--open,
.ls-course-group__button.is-open .ls-course-group__icon--closed {
    display: none;
}

.ls-course-group__button.is-open .ls-course-group__icon--open {
    display: block;
}

.ls-course-lessons {
    max-height: 350px;
    margin: 0 0 8px;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.ls-course-lessons li,
.ls-course-lessons a {
    height: 35px;
}

.ls-course-lessons a {
    display: flex;
    align-items: center;
    padding: 0 30px 0 calc(30px + .5em);
    white-space: nowrap;
}

.ls-course-home-link:hover,
.ls-course-group__button:hover,
.ls-course-lessons a:hover,
.ls-account-menu a:hover,
.ls-account-menu button:hover,
.ls-language-item:hover {
    color: #6464ff;
}

.ls-course-home-link:active,
.ls-course-group__button:active,
.ls-course-lessons a:active,
.ls-account-menu a:active,
.ls-account-menu button:active,
.ls-language-item:active {
    color: #000;
}

.ls-language-item:disabled,
.ls-language-item:disabled:hover,
.ls-language-item:disabled:active {
    color: #9b9b9b;
    cursor: not-allowed;
    opacity: .65;
}

.ls-dropdown-panel--language {
    left: 0;
    width: max-content;
    min-width: 195px;
    padding: 20px 0;
    border: 3px solid #b8b8b8;
    border-radius: 0 0 40px 40px;
}

.ls-language-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    height: 60px;
    padding: 0 30px;
    color: #000;
    background: transparent;
    border: 0;
    font-size: 20px;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
}

.ls-language-item.is-current {
    color: #6464ff;
}

.ls-language-item img {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    max-width: none;
}

.ls-dropdown-panel--account {
    right: 0;
    width: max-content;
    min-width: 240px;
    padding: 20px 0;
    border: 3px solid #b8b8b8;
    border-radius: 0 0 40px 40px;
}

.ls-account-name {
    display: flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    min-width: 200px;
    min-height: 60px;
    margin: 0 20px 8px;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.ls-main-header[data-role-key="admin"] .ls-account-name {
    color: #c00000;
    background: rgba(192, 0, 0, .15);
}

.ls-main-header[data-role-key="school"] .ls-account-name {
    color: #c55a11;
    background: rgba(197, 90, 17, .15);
}

.ls-main-header[data-role-key="teacher"] .ls-account-name {
    color: #2e75b6;
    background: rgba(46, 117, 182, .15);
}

.ls-main-header[data-role-key="student"] .ls-account-name {
    color: #70ad47;
    background: rgba(112, 173, 71, .15);
}

.ls-main-header[data-role-key="service"] .ls-account-name {
    color: #ff9c00;
    background: rgba(255, 156, 0, .15);
}

.ls-account-menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ls-account-menu li + li::before {
    content: "";
    display: block;
    height: 2px;
    margin: 0 20px 0 80px;
    background: #b8b8b8;
}

.ls-account-menu a,
.ls-account-menu button {
    display: flex;
    align-items: center;
    width: 100%;
    height: 60px;
    padding: 0 20px;
    color: #000;
    background: transparent;
    border: 0;
    font-size: 20px;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.ls-account-menu form {
    margin: 0;
}

.ls-account-menu img {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    padding: 0;
    margin: 0;
    max-width: none;
}

@media (max-width: 1023px) {
    .ls-main-header {
        padding: 0 20px;
    }
}

@media (max-width: 639px) {
    .ls-main-header {
        padding: 0 10px;
    }

    .ls-main-header__brand {
        width: 50px;
    }

    .ls-main-header__logo--wide {
        display: none;
    }

    .ls-main-header__logo--small {
        display: block;
    }

    .ls-main-header__actions--member {
        gap: 4px;
    }
}
