.n6-mobile-guide-menu {
    display: none;
}

@media (max-width: 820px) {
    html body .n6-header.site-chrome-header[data-site-chrome-header] {
        --site-chrome-mobile-guide: 1;
        --site-chrome-mobile-account: 1;
        grid-template-columns: minmax(60px, max-content) 68px minmax(0, 1fr) 44px 50px;
        gap: 4px;
        min-height: 76px;
        height: auto;
        padding-inline: 8px;
    }

    html body .site-chrome-header[data-site-chrome-header] .n6-top-nav,
    html body .site-chrome-header[data-site-chrome-header] .n6-utilities {
        display: contents;
    }

    html body .site-chrome-header[data-site-chrome-header] .n6-nav-links,
    html body .site-chrome-header[data-site-chrome-header] .n6-mobile-menu,
    html body .site-chrome-header[data-site-chrome-header] .n6-utilities > * {
        display: none;
    }

    html body .site-chrome-header[data-site-chrome-header] .n6-brand {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
        max-width: min(22vw, 130px);
        justify-content: center;
    }

    html body .site-chrome-header[data-site-chrome-header] .n6-brand img {
        width: auto;
        max-width: 100%;
        height: 32px;
        object-fit: contain;
        flex-shrink: 0;
    }

    html body .site-chrome-header[data-site-chrome-header] .n6-mobile-guide-menu {
        position: relative;
        z-index: 140;
        display: block;
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
    }

    .n6-mobile-guide-menu > summary {
        display: flex;
        min-height: 44px;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 0;
        border: 0;
        border-radius: 0;
        color: var(--site-chrome-purple);
        background: transparent;
        font-size: 14px;
        list-style: none;
        cursor: pointer;
    }

    .n6-mobile-guide-menu > summary::-webkit-details-marker {
        display: none;
    }

    .n6-mobile-guide-menu > summary::after {
        width: 6px;
        height: 6px;
        border-right: 1.5px solid currentColor;
        border-bottom: 1.5px solid currentColor;
        content: '';
        transform: translateY(-2px) rotate(45deg);
    }

    .n6-mobile-guide-menu > summary:focus-visible,
    .n6-mobile-guide-dropdown > a:focus-visible {
        outline: 2px solid var(--site-chrome-purple);
        outline-offset: 2px;
    }

    .n6-mobile-guide-dropdown {
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        display: grid;
        width: min(220px, calc(100vw - 80px));
        max-height: 60dvh;
        padding: 6px;
        overflow: auto;
        overscroll-behavior: contain;
        border: 1px solid var(--site-chrome-line);
        border-radius: 12px;
        background: #fff;
        box-shadow: var(--site-chrome-shadow);
    }

    .n6-mobile-guide-menu:not([open]) .n6-mobile-guide-dropdown {
        display: none;
    }

    .n6-mobile-guide-dropdown > a {
        display: flex;
        min-height: 44px;
        align-items: center;
        padding: 10px;
        color: #4a4460;
        font-size: 15px;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    html body .site-chrome-header[data-site-chrome-header] .n6-search {
        position: static;
        grid-column: 3;
        grid-row: 1;
        width: 100%;
        justify-self: center;
        min-width: 0;
        max-width: none;
        height: 46px;
        transform: none;
    }

    html body .site-chrome-header[data-site-chrome-header] .n6-search input {
        min-width: 0;
        padding-inline: 8px;
        font-size: 16px;
    }

    html body .site-chrome-header[data-site-chrome-header] .n6-search button {
        flex: 0 0 44px;
        width: 44px;
        min-width: 44px;
        height: 44px;
        align-self: center;
    }

    html body .site-chrome-header[data-site-chrome-header] .n6-utilities > .n6-user-menu,
    html body .site-chrome-header[data-site-chrome-header] .n6-utilities > a[aria-label="注册/登录"] {
        display: block;
        grid-column: 5;
        grid-row: 1;
        width: 50px;
        height: 50px;
    }

    html body .site-chrome-header[data-site-chrome-header] .n6-user-menu > .n6-utility,
    html body .site-chrome-header[data-site-chrome-header] .n6-utilities > a[aria-label="注册/登录"] {
        display: grid;
        width: 50px;
        min-width: 50px;
        height: 50px;
        min-height: 50px;
        aspect-ratio: 1;
        flex-shrink: 0;
        padding: 0;
        place-items: center;
        border: 0;
        border-radius: 50%;
        color: #fff;
        background: var(--site-chrome-gradient);
    }

    html body .site-chrome-header[data-site-chrome-header] .n6-user-menu > .n6-utility > span:not(.n6-icon),
    html body .site-chrome-header[data-site-chrome-header] a[aria-label="注册/登录"] > span:not(.n6-icon) {
        display: none;
    }

    html body .site-chrome-header[data-site-chrome-header] .n6-user-dropdown {
        right: 0;
        left: auto;
        width: 220px;
        max-width: calc(100vw - 24px);
        max-height: 60dvh;
        overflow: auto;
        transform: none;
    }

    html body .site-chrome-header[data-site-chrome-header] .n6-utilities > .n6-cart-widget {
        display: block;
        grid-column: 4;
        grid-row: 1;
        width: 44px;
        min-width: 0;
        height: 50px;
        min-height: 50px;
        padding: 0;
        border: 0;
        background: transparent;
    }

    html body .site-chrome-header[data-site-chrome-header] .n6-cart-widget .cart-link {
        display: flex;
        width: 44px;
        min-width: 0;
        height: 50px;
        min-height: 50px;
        padding: 0;
        align-items: center;
        justify-content: center;
        border: 0;
        color: var(--site-chrome-purple);
    }

    html body .site-chrome-header[data-site-chrome-header] .n6-cart-widget .n6-icon {
        display: grid;
        width: 24px;
        height: 24px;
        place-items: center;
    }

    html body .site-chrome-header[data-site-chrome-header] .n6-cart-widget .n6-icon svg {
        width: 24px;
        height: 24px;
    }

    html body .site-chrome-header[data-site-chrome-header] .n6-user-menu > .n6-utility > .n6-icon,
    html body .site-chrome-header[data-site-chrome-header] a[aria-label="注册/登录"] > .n6-icon {
        display: grid;
        flex: none;
        width: 24px;
        height: 24px;
        place-items: center;
    }

    html body .site-chrome-header[data-site-chrome-header] .n6-user-menu > .n6-utility > .n6-icon svg,
    html body .site-chrome-header[data-site-chrome-header] a[aria-label="注册/登录"] > .n6-icon svg {
        width: 24px;
        height: 24px;
    }

    html body .site-chrome-header[data-site-chrome-header] .n6-cart-widget .n6-badge {
        top: -6px;
        right: -4px;
        min-width: 16px;
        height: 16px;
        font-size: 10px;
        line-height: 16px;
    }

    html body .site-chrome-header[data-site-chrome-header] .n6-cart-widget .cart-link > span:not(.n6-badge-wrap):not(.n6-icon),
    html body .site-chrome-header[data-site-chrome-header] .n6-cart-widget .cart_content,
    html body .site-chrome-header[data-site-chrome-header] .n6-cart-widget .cart-block {
        display: none;
    }

    html[data-yys-theme="dark"] .n6-mobile-guide-menu > summary {
        color: #e6e0d5;
        background: transparent;
    }

    html[data-yys-theme="dark"] .n6-mobile-guide-dropdown {
        color: #e6e0d5;
        background: #303334;
        border-color: rgba(235, 224, 201, .16);
    }

    html[data-yys-theme="dark"] .n6-mobile-guide-dropdown > a {
        color: #e6e0d5;
    }
}

@media (max-width: 410px) {
    html body .n6-header.site-chrome-header[data-site-chrome-header] {
        grid-template-columns: minmax(60px, max-content) minmax(68px, 1fr) 44px 50px;
        padding-block: 8px;
        row-gap: 6px;
    }

    html body .site-chrome-header[data-site-chrome-header] .n6-search {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 75%;
    }

    html body .site-chrome-header[data-site-chrome-header] .n6-utilities > .n6-cart-widget {
        grid-column: 3;
    }

    html body .site-chrome-header[data-site-chrome-header] .n6-utilities > .n6-user-menu,
    html body .site-chrome-header[data-site-chrome-header] .n6-utilities > a[aria-label="注册/登录"] {
        grid-column: 4;
    }
}
