:root {
    --dy-site-background: #ebf1fa;
    --dy-site-page-bg: #e5eef9;
    --dy-site-page-bg-start: #e5eef9;
    --dy-site-page-bg-end: #e5eef9;
    --dy-site-foreground: #131922;
    --dy-site-card: #fff;
    --dy-site-primary: #1d5fe2;
    --dy-site-primary-foreground: #fcfcfc;
    --dy-site-secondary: #dfe9f7;
    --dy-site-secondary-foreground: #262e3d;
    --dy-site-muted: #e7edf6;
    --dy-site-muted-foreground: #626975;
    --dy-site-accent: #e4efff;
    --dy-site-accent-foreground: #144097;
    --dy-site-destructive: #e7000b;
    --dy-site-price: #e9411f;
    --dy-site-border: #e1e5eb;
    --dy-site-footer: #0c121a;
}

@font-face {
    font-family: "siyuan";
    font-weight: 400;
    src: url("/web/dianle/font/siyuanhei.woff2") format("woff2");
    font-display: swap;
}

@font-face {
    font-family: "DINCond";
    font-weight: 400;
    src: url("/web/dianle/font/Mohave-Regular-2.otf") format("woff");
    font-display: swap;
}

.dianle-siyuan { font-family: "siyuan", "PingFang SC", sans-serif; }
.dianle-DINCond { font-family: "DINCond", sans-serif; }
.dl-headerbar { display: contents; border: 0; }
.dianle-header,
.dianle-header *,
.dianle-header *::before,
.dianle-header *::after { box-sizing: border-box; }

.dianle-header {
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    width: 100%;
    height: 65px;
    border-top: 0;
    border-bottom: 1px solid #e5ebf2;
    background: #ebf1fa;
}

.dianle-header .dianle-width {
    display: flex;
    width: 100%;
    max-width: 1152px;
    height: 64px;
    margin: 0 auto;
    padding: 0 24px;
    align-items: center;
    gap: 0;
}

.dianle-logo {
    flex: 0 0 auto;
    width: 115px;
    height: 32px;
}

.dianle-logo > a,
.dianle-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dianle-brand-mark {
    display: inline-flex;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--dy-site-primary-foreground);
    background: var(--dy-site-primary);
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
}

.dianle-brand-mark svg {
    width: 20px;
    height: 20px;
}

.dianle-brand-name {
    color: var(--dy-site-foreground);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0;
}

.dianle-brand-name span,
.dianle-footer-brand > span:last-child span {
    color: var(--dy-site-primary);
    font-weight: inherit;
}

.dianle-custom-logo {
    display: block;
    width: auto;
    max-width: 140px;
    height: auto;
    max-height: 36px;
    object-fit: contain;
}

.dianle-nav-wrap {
    margin-left: 32px;
}

.dianle-header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dianle-header-nav .dianle-item {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 999px;
    color: var(--dy-site-muted-foreground);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    white-space: nowrap;
}

.dianle-header-nav .dianle-item:hover {
    color: var(--dy-site-foreground);
    background: var(--dy-site-muted);
}

.dianle-header-nav .dianle-item.is-active {
    color: var(--dy-site-primary);
    background: var(--dy-site-accent);
}

.dianle-button,
.dianle-user-nav {
    position: static;
    display: flex;
    width: auto;
    max-width: none;
    height: auto;
    margin-left: auto;
    padding: 0;
    align-items: center;
    border-radius: 0;
    gap: 12px;
    color: inherit;
    background: transparent;
    font-size: 16px;
    line-height: normal;
    cursor: default;
}

.dianle-button::before,
.dianle-button::after { display: none; content: none; }

.dianle-button[hidden],
.dianle-user-nav[hidden] {
    display: none;
}

[data-guest-only][hidden],
[data-cart-guest-only][hidden] {
    display: none !important;
}

.dianle-user-nav {
    margin-left: 12px;
}

.dianle-language-wrap {
    position: relative;
    flex: 0 0 auto;
}

.dianle-language {
    font-family: inherit;
    display: inline-flex;
    width: 96px;
    height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 13px;
    border: 1px solid var(--dy-site-border);
    border-radius: 999px;
    color: var(--dy-site-muted-foreground);
    background: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}

.dianle-language svg {
    width: 17px;
    height: 17px;
}

.dianle-language i {
    width: 7px;
    height: 7px;
    margin: -4px 0 0 2px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.18s ease;
}

.dianle-language[aria-expanded="true"] i {
    margin-top: 3px;
    transform: rotate(225deg);
}

.dianle-language-menu {
    position: absolute;
    z-index: 1010;
    top: calc(100% + 8px);
    right: 0;
    width: 144px;
    padding: 6px;
    border: 1px solid var(--dy-site-border);
    border-radius: 10px;
    background: var(--dy-site-card);
    box-shadow: 0 12px 30px rgba(30, 44, 74, 0.14);
}

.dianle-language-menu[hidden] {
    display: none;
}

.dianle-language-menu button {
    width: 100%;
    height: 34px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border: 0;
    border-radius: 7px;
    color: var(--dy-site-muted-foreground);
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.dianle-language-menu button:hover,
.dianle-language-menu button.is-active {
    color: var(--dy-site-primary);
    background: var(--dy-site-accent);
}

.dianle-cart-link {
    position: relative;
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--dy-site-border);
    border-radius: 50%;
    color: var(--dy-site-foreground);
    background: rgba(255, 255, 255, 0.82);
}

.dianle-cart-link:hover {
    color: var(--dy-site-primary);
    border-color: rgba(29, 95, 226, 0.4);
    background: var(--dy-site-card);
}

.dianle-cart-link svg {
    width: 18px;
    height: 18px;
}

.dianle-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #f1f5fb;
    border-radius: 999px;
    color: #fff;
    background: var(--dy-site-price);
    font-size: 10px;
    line-height: 13px;
    font-weight: 700;
}

.dianle-cart-count[hidden] {
    display: none;
}

.dianle-login-link {
    display: inline-flex;
    height: 36px;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--dy-site-muted-foreground);
    font-size: 14px;
    font-weight: 500;
}

.dianle-login-link:hover {
    color: var(--dy-site-foreground);
    background: var(--dy-site-muted);
}

.dianle-login-link svg {
    width: 16px;
    height: 16px;
}

.dianle-register-link,
.dianle-console-btn {
    display: inline-flex;
    height: 32px;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border-radius: 999px;
    color: var(--dy-site-primary-foreground);
    background: var(--dy-site-primary);
    font-size: 14px;
    font-weight: 500;
}

.dianle-register-link:hover,
.dianle-console-btn:hover {
    color: var(--dy-site-primary-foreground);
    background: rgba(29, 95, 226, 0.8);
}

.dianle-avatar-link {
    display: inline-flex;
    width: 68px;
    height: 38px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 8px 0 4px;
    border: 1px solid var(--dy-site-border);
    border-radius: 999px;
    color: var(--dy-site-muted-foreground);
    background: rgba(255, 255, 255, 0.82);
}

.dianle-avatar-link:hover {
    color: var(--dy-site-primary);
    border-color: rgba(29, 95, 226, 0.4);
    background: var(--dy-site-card);
}

.dianle-avatar {
    position: relative;
    display: inline-flex;
    width: 32px;
    height: 32px;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--dy-site-primary-foreground);
    background: var(--dy-site-primary);
    font-size: 13px;
    font-weight: 600;
}

.dianle-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dianle-avatar-arrow {
    width: 7px;
    height: 7px;
    margin-top: -4px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
}

.dianle-menu-toggle {
    display: none;
}

@media screen and (max-width: 1023px) {
    .dianle-header .dianle-width {
        padding: 0 16px;
    }

    .dianle-nav-wrap {
        position: absolute;
        top: 64px;
        left: 0;
        width: 100%;
        max-height: 0;
        margin: 0;
        padding: 0 16px;
        overflow: hidden;
        opacity: 0;
        border-bottom: 1px solid var(--dy-site-border);
        background: rgba(234, 241, 250, 0.98);
        box-shadow: 0 14px 28px rgba(30, 44, 74, 0.1);
        transition: max-height 0.28s ease, opacity 0.2s ease, padding 0.28s ease;
    }

    .dianle-header.is-open .dianle-nav-wrap {
        max-height: 430px;
        padding: 12px 16px 16px;
        opacity: 1;
    }

    .dianle-header-nav {
        align-items: stretch;
        flex-direction: column;
        gap: 2px;
    }

    .dianle-header-nav .dianle-item {
        justify-content: flex-start;
        border-radius: 12px;
        padding: 10px 14px;
        color: var(--dy-site-foreground);
    }

    .dianle-button {
        margin-left: auto;
        gap: 8px;
    }

    .dianle-login-link {
        display: none;
    }

    .dianle-language {
        width: 48px;
        padding: 0;
        justify-content: center;
    }

    .dianle-language > span {
        display: none;
    }

    .dianle-register-link {
        min-width: 67px;
        height: 32px;
        padding: 0 18px;
    }

    .dianle-user-nav {
        margin-left: 0;
        gap: 8px;
    }

    .dianle-console-btn {
        display: none;
    }

    .dianle-avatar-link {
        width: 62px;
        height: 36px;
    }

    .dianle-menu-toggle {
        display: flex;
        width: 36px;
        height: 36px;
        margin-left: 8px;
        padding: 8px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 4px;
        border: 1px solid var(--dy-site-border);
        border-radius: 50%;
        background: var(--dy-site-card);
        cursor: pointer;
    }

    .dianle-menu-toggle span {
        display: block;
        width: 18px;
        height: 1.5px;
        border-radius: 2px;
        background: var(--dy-site-foreground);
        transition: transform 0.24s ease, opacity 0.18s ease;
    }

    .dianle-header.is-open .dianle-menu-toggle span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
    .dianle-header.is-open .dianle-menu-toggle span:nth-child(2) { opacity: 0; }
    .dianle-header.is-open .dianle-menu-toggle span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
}

@media screen and (max-width: 360px) {
    .dianle-brand-name {
        font-size: 16px;
    }

    .dianle-register-link {
        padding: 0 14px;
    }
}
