header.main {
    overflow: visible;
}

header.main .header-right {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 50;
}

.header-auth-guest {
    display: flex;
    align-items: center;
    gap: 10px;
}

header.main .header-right .language-select {
    position: relative;
    top: auto;
    right: auto;
}

.header-auth-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 35px;
    padding: 0 14px;
    border: 2px solid #ec6530;
    border-radius: 10px;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
}

.header-auth-link.secondary {
    border-color: #888;
}

.header-auth-link:hover,
.header-auth-link.secondary:hover {
    background: #ec6530;
    border-color: #ec6530;
}

.header-user-menu {
    position: relative;
    display: none;
}

.header-user-menu.is-visible {
    display: block;
}

.header-user-trigger {
    display: inline-flex;
    align-items: center;
    max-width: 220px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 14px;
    line-height: 35px;
    cursor: pointer;
    white-space: nowrap;
}

.header-user-trigger strong {
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-user-trigger::after {
    content: "";
    display: inline-block;
    margin-left: 8px;
    border: 4px solid transparent;
    border-top-color: currentColor;
    transform: translateY(2px);
}

.header-user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 150px;
    padding-top: 8px;
    z-index: 30;
}

.header-user-menu:hover .header-user-dropdown,
.header-user-menu:focus-within .header-user-dropdown,
.header-user-menu.is-open .header-user-dropdown {
    display: block;
}

.header-user-dropdown-inner {
    overflow: hidden;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.header-user-dropdown a,
.header-user-dropdown button {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 0;
    background: none;
    color: #222;
    font: inherit;
    font-size: 14px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.header-user-dropdown a:hover,
.header-user-dropdown button:hover {
    background: #f4f5f6;
}

@media only screen and (max-width: 750px) {
    /* 原站 logo 负 margin 上抬，会盖住登录/用户名；先留出顶栏控件行 */
    header.main .main-section {
        padding-top: 52px;
    }

    header.main .logo svg {
        width: min(180px, 48vw) !important;
        margin-top: 0 !important;
    }

    header.main .header-right {
        top: 14px;
        right: 10px;
        left: auto;
        gap: 6px;
        z-index: 60;
        max-width: calc(100% - 64px);
    }

    header.main .menuHolder {
        z-index: 60;
    }

    .header-auth-link {
        padding: 0 10px;
        font-size: 13px;
    }

    .header-auth-link.secondary {
        display: none;
    }

    .header-user-trigger {
        max-width: 110px;
        font-size: 13px;
    }
}

@media only screen and (max-width: 400px) {
    header.main .header-right .language-select {
        display: none;
    }

    .header-user-trigger {
        max-width: 96px;
    }
}
