.site-language {
    position: relative;
    flex: 0 0 auto;
    color: inherit;
}

.site-language summary {
    display: flex;
    min-width: 38px;
    min-height: 40px;
    padding: 0 8px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
}

.site-language summary::-webkit-details-marker { display: none; }
.site-language summary span { font-size: .75rem; }
.site-language summary:hover { opacity: .78; }

.site-language ul {
    position: absolute;
    z-index: 20;
    inset: 100% 0 auto auto;
    min-width: max-content;
    margin: 4px 0 0;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 12px;
    color: #1d1d1f;
    background: #fff;
    list-style: none;
    box-shadow: 0 8px 24px #0002;
}

:root[data-theme="dark"] .site-language ul {
    border-color: #424242;
    color: #f6f6f6;
    background: #222;
}

.site-language a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    color: inherit;
    font-size: .875rem;
    text-decoration: none;
}

.site-language a:hover,
.site-language a:focus-visible,
.site-language a[aria-current] {
    background: #8882;
}

.site-language a[aria-current] { font-weight: 700; }

.shop-header .nav-inner {
    column-gap: clamp(12px, 1.5vw, 24px);
}

.shop-header .nav-actions {
    gap: clamp(4px, .6vw, 9px);
}

.shop-header .nav-actions > .shop-icon-button {
    flex-shrink: 0;
}

.shop-header .branch-trigger {
    min-inline-size: 40px;
    justify-content: center;
    padding-inline: 8px;
}

@media (min-width: 1201px) {
    html:not([lang="zh-Hant"]) .shop-header .nav-inner { max-width: 1360px; }

    .shop-header .shop-nav {
        gap: clamp(8px, 1vw, 16px);
    }

    .shop-header .shop-nav > a {
        white-space: normal;
        text-align: center;
        text-wrap: balance;
        line-height: 1.25;
    }

    .shop-header .nav-actions { flex-shrink: 0; }
    .shop-header .branch-trigger > span { max-inline-size: 15em; }
}

@media (max-width: 600px) {
    .shop-header .branch-trigger {
        min-inline-size: 36px;
        min-block-size: 36px;
        padding-inline: 6px;
    }

    .shop-header .branch-trigger > i:last-child { display: none; }
    .site-language summary { min-width: 34px; padding: 0 5px; }
    .site-language summary span { display: none; }
}

@media (max-width: 360px) {
    .shop-header .branch-trigger > span { display: none; }
}
