/* ==========================================================================
           1. Apple Style Design System & Variables
           ========================================================================== */
        :root {
            --color-background: #fbfbfd;
            --color-surface: #ffffff;
            --color-text-primary: #1d1d1f;
            --color-text-secondary: #86868b;
            --color-text-tertiary: #a1a1a6;
            --color-accent: #0071e3;
            --color-accent-hover: #0077ed;
            --color-border: #d2d2d7;
            --color-divider: rgba(0, 0, 0, 0.08);
            
            --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
            --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
            --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.04), 0 4px 6px rgba(0, 0, 0, 0.02);
            --shadow-dropdown: 0 12px 32px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
            
            --radius-sm: 8px;
            --radius-md: 12px;
            --radius-lg: 18px;
            
            --max-width: 1200px;
            --nav-height: 64px;
            
            --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
        }

        /* ==========================================================================
           2. Reset & Base Styles
           ========================================================================== */
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: var(--font-family);
            background-color: var(--color-background);
            color: var(--color-text-primary);
            line-height: 1.5;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        a {
            color: var(--color-text-primary);
            text-decoration: none;
            transition: color 0.2s ease;
        }

        a:hover {
            color: var(--color-accent);
        }

        ul {
            list-style: none;
        }

        button {
            font-family: inherit;
            cursor: pointer;
            border: none;
            background: none;
        }

        .container {
            max-width: var(--max-width);
            margin: 0 auto;
            padding: 0 20px;
        }

        .section-title {
            font-size: 28px;
            font-weight: 600;
            letter-spacing: -0.01em;
            margin-bottom: 24px;
            color: var(--color-text-primary);
        }

        /* ==========================================================================
           3. Global Navigation (Apple Global Nav Style)
           ========================================================================== */
        .global-nav {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: var(--nav-height);
            background-color: rgba(255, 255, 255, 0.8);
            backdrop-filter: saturate(180%) blur(20px);
            -webkit-backdrop-filter: saturate(180%) blur(20px);
            border-bottom: 1px solid var(--color-divider);
            z-index: 9999;
            display: flex;
            align-items: center;
        }

        .nav-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;
            max-width: var(--max-width);
            margin: 0 auto;
            padding: 0 20px;
            font-size: 15px;
            font-weight: 500;
            letter-spacing: -0.01em;
            height: 100%;
        }

        .nav-logo {
            font-size: 20px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .nav-logo svg {
            width: 24px;
            height: 24px;
            fill: var(--color-text-primary);
        }

        .site-logo-image {
            height: 34px;
            width: auto;
            max-width: 240px;
            display: block;
            object-fit: contain;
        }

        .site-logo-text {
            display: inline-block;
            line-height: 1;
            white-space: nowrap;
        }

        .nav-links {
            display: flex;
            gap: 32px;
            align-items: center;
            height: 100%;
        }

        .nav-links li {
            height: 100%;
            display: flex;
            align-items: center;
        }

        .nav-links a {
            color: rgba(0, 0, 0, 0.8);
            opacity: 0.8;
            transition: opacity 0.2s;
            display: flex;
            align-items: center;
            height: 100%;
        }

        .nav-links a:hover {
            opacity: 1;
            color: rgba(0, 0, 0, 0.8);
        }

        /* --- 下拉菜单专属样式 开始 --- */
        .dropdown-wrapper {
            position: relative;
        }

        .dropdown-trigger {
            gap: 4px;
        }

        .dropdown-wrapper::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 0;
            width: 100%;
            height: 16px;
        }

        .dropdown-menu {
            position: absolute;
            top: calc(100% + 4px);
            left: 50%;
            transform: translateX(-50%) translateY(10px) scale(0.98);
            background-color: rgba(255, 255, 255, 0.96);
            backdrop-filter: saturate(200%) blur(40px);
            -webkit-backdrop-filter: saturate(200%) blur(40px);
            border: 1px solid var(--color-divider);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-dropdown);
            padding: 24px 32px;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
            pointer-events: none;
        }

        .dropdown-wrapper:hover .dropdown-menu {
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) translateY(0) scale(1);
            pointer-events: auto;
        }

        .dropdown-grid {
            display: flex;
            gap: 48px;
            white-space: nowrap;
        }

        .dropdown-col {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .dropdown-heading {
            font-size: 12px;
            font-weight: 600;
            color: var(--color-text-tertiary);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 4px;
        }

        .dropdown-col a {
            font-size: 14px;
            font-weight: 400;
            color: var(--color-text-primary) !important;
            opacity: 0.8;
            transition: all 0.2s;
            height: auto;
        }

        .dropdown-col a:hover {
            opacity: 1;
            color: var(--color-accent) !important;
        }
        /* --- 下拉菜单专属样式 结束 --- */

        .nav-actions {
            display: flex;
            gap: 16px;
            align-items: center;
        }

        .nav-icon-btn {
            opacity: 0.8;
            transition: opacity 0.2s;
            display: flex;
            align-items: center;
        }

        .nav-icon-btn:hover {
            opacity: 1;
        }

        .nav-icon-btn svg {
            width: 18px;
            height: 18px;
        }

        .mobile-menu-btn {
            display: none;
        }

        .mobile-menu-btn svg {
            width: 24px;
            height: 24px;
        }

        /* ==========================================================================
           4. Hero / Search Section (The Starting Point)
           ========================================================================== */
        .hero {
            padding-top: calc(var(--nav-height) + 80px);
            padding-bottom: 60px;
            text-align: center;
        }

        .hero-title {
            font-size: 48px;
            font-weight: 600;
            letter-spacing: -0.02em;
            margin-bottom: 12px;
        }

        .hero-subtitle {
            font-size: 20px;
            color: var(--color-text-secondary);
            margin-bottom: 24px;
            font-weight: 400;
        }

        .hero-search-shell {
            max-width: 860px;
            margin: 0 auto 28px auto;
            background-color: rgba(255,255,255,0.9);
            border: 1px solid var(--color-divider);
            box-shadow: var(--shadow-md);
            border-radius: 20px;
            padding: 14px;
        }

        .hero-search {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 12px;
            align-items: center;
        }

        .hero-search-input {
            height: 52px;
            border-radius: 14px;
            border: 1px solid var(--color-border);
            padding: 0 18px;
            font-size: 16px;
            color: var(--color-text-primary);
            background: #fff;
            outline: none;
        }

        .hero-search-input:focus {
            border-color: rgba(0,113,227,0.45);
            box-shadow: 0 0 0 4px rgba(0,113,227,0.08);
        }

        .hero-search-btn {
            height: 52px;
            padding: 0 22px;
            border-radius: 14px;
            background: var(--color-text-primary);
            color: #fff;
            font-size: 15px;
            font-weight: 600;
        }

        .hero-search-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            padding: 10px 4px 2px 4px;
            flex-wrap: wrap;
        }

        .hero-search-note {
            font-size: 13px;
            color: var(--color-text-secondary);
        }

        .hero-shortcuts {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .hero-shortcuts a {
            font-size: 13px;
            color: var(--color-text-primary);
            background: #f5f5f7;
            border-radius: 999px;
            padding: 7px 12px;
        }

        .quick-tags {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
            max-width: 880px;
            margin: 0 auto;
        }

        .quick-tags-label {
            font-size: 14px;
            font-weight: 500;
            color: var(--color-text-secondary);
        }

        .tag {
            background-color: #e8e8ed;
            color: var(--color-text-primary);
            font-size: 14px;
            padding: 6px 16px;
            border-radius: 20px;
            transition: background-color 0.2s;
        }

        .tag:hover {
            background-color: #d2d2d7;
            color: var(--color-text-primary);
        }

        /* ==========================================================================
           5. Category Shelf (The Index System)
           ========================================================================== */
        .categories-section {
            padding: 20px 0 40px 0;
        }

        .category-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
            gap: 16px;
        }

        .category-card {
            background-color: var(--color-surface);
            border-radius: var(--radius-md);
            padding: 20px;
            display: flex;
            align-items: center;
            gap: 12px;
            border: 1px solid transparent;
            box-shadow: var(--shadow-sm);
            transition: all 0.2s ease;
            cursor: pointer;
        }

        .category-card:hover {
            box-shadow: var(--shadow-md);
            border-color: var(--color-border);
            transform: translateY(-2px);
        }

        .category-icon {
            width: 32px;
            height: 32px;
            background-color: #f5f5f7;
            border-radius: var(--radius-sm);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .category-icon svg {
            width: 18px;
            height: 18px;
            fill: var(--color-text-primary);
        }

        .category-info h3 {
            font-size: 15px;
            font-weight: 600;
            margin-bottom: 2px;
        }

        .category-info p {
            font-size: 12px;
            color: var(--color-text-secondary);
        }

        .section-head {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 16px;
            margin-bottom: 24px;
            flex-wrap: wrap;
        }

        .section-head p {
            font-size: 14px;
            color: var(--color-text-secondary);
        }

        .shelf-toolbar {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        .shelf-chip {
            padding: 8px 14px;
            border-radius: 999px;
            background: #f5f5f7;
            color: var(--color-text-primary);
            font-size: 13px;
            font-weight: 500;
            border: 1px solid transparent;
        }

        .shelf-chip.active {
            background: rgba(0,113,227,0.08);
            color: var(--color-accent);
            border-color: rgba(0,113,227,0.14);
        }

        /* ==========================================================================
           6. Product Grid (Image + Text Card Layout)
           ========================================================================== */
        .products-section {
            padding: 40px 0;
        }

        .product-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 24px;
        }

        .product-card {
            background-color: var(--color-surface);
            border-radius: var(--radius-lg);
            display: flex;
            flex-direction: column;
            box-shadow: var(--shadow-sm);
            border: 1px solid rgba(0, 0, 0, 0.05);
            transition: all 0.2s ease;
            height: 100%;
            overflow: hidden; /* 确保圆角能包裹住顶部的图片 */
            cursor: pointer;
        }

        .product-card:hover {
            box-shadow: var(--shadow-lg);
            border-color: rgba(0,0,0,0.08);
            transform: translateY(-4px);
        }

        /* 商品图片区 */
        .product-image {
            width: 100%;
            height: 160px;
            background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ed 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            border-bottom: 1px solid rgba(0, 0, 0, 0.04);
            position: relative;
        }

        /* 真实的图片样式 (留作后续替换使用) */
        .product-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: none; /* 当前使用图标作为占位，若有真实图片可移除此行并删掉 SVG */
        }

        .product-image svg {
            width: 48px;
            height: 48px;
            color: #a1a1a6;
            stroke-width: 1.5;
        }

        /* 商品文字内容区 */
        .product-content {
            padding: 20px 24px 24px 24px;
            display: flex;
            flex-direction: column;
            flex-grow: 1;
        }

        .product-badge {
            font-size: 11px;
            font-weight: 600;
            color: var(--color-text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 8px;
            display: block;
        }

        .product-title {
            font-size: 19px;
            font-weight: 600;
            line-height: 1.3;
            margin-bottom: 8px;
            color: var(--color-text-primary);
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .product-desc {
            font-size: 14px;
            color: var(--color-text-secondary);
            margin-bottom: 24px;
            flex-grow: 1;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .product-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: auto;
            padding-top: 16px;
            border-top: 1px solid var(--color-divider);
        }

        .product-price {
            font-size: 20px;
            font-weight: 600;
            color: var(--color-text-primary);
        }

        .product-price::before {
            content: "¥";
            font-size: 14px;
            margin-right: 2px;
            font-weight: 500;
        }

        .btn-buy {
            background-color: var(--color-background);
            color: var(--color-accent);
            font-size: 14px;
            font-weight: 600;
            padding: 6px 16px;
            border-radius: 20px;
            transition: all 0.2s;
        }

        .product-card:hover .btn-buy {
            background-color: var(--color-accent);
            color: white;
        }

        /* ==========================================================================
           7. Process Section (Information Blocks)
           ========================================================================== */
        .process-section {
            padding: 60px 0;
            background-color: var(--color-surface);
            margin-top: 40px;
            border-top: 1px solid var(--color-divider);
            border-bottom: 1px solid var(--color-divider);
        }

        .process-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 24px;
            text-align: center;
        }

        .process-item {
            padding: 0 12px;
        }

        .process-icon {
            width: 48px;
            height: 48px;
            margin: 0 auto 16px auto;
            color: var(--color-text-primary);
        }

        .process-icon svg {
            width: 100%;
            height: 100%;
            stroke-width: 1.5;
        }

        .process-item h4 {
            font-size: 17px;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .process-item p {
            font-size: 14px;
            color: var(--color-text-secondary);
        }

        /* ==========================================================================
           8. FAQ / Trust Section
           ========================================================================== */
        .faq-section {
            padding: 60px 0;
        }

        .faq-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 32px;
        }

        .faq-item h4 {
            font-size: 17px;
            font-weight: 600;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .faq-item h4::before {
            content: "";
            display: inline-block;
            width: 4px;
            height: 4px;
            background-color: var(--color-accent);
            border-radius: 50%;
        }

        .faq-item p {
            font-size: 14px;
            color: var(--color-text-secondary);
            padding-left: 12px;
            line-height: 1.6;
        }

        /* ==========================================================================
           9. Footer
           ========================================================================== */
        .global-footer {
            background-color: var(--color-background);
            padding: 40px 0 24px 0;
            border-top: 1px solid var(--color-divider);
            font-size: 12px;
            color: var(--color-text-secondary);
        }

        .footer-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 24px;
            margin-bottom: 40px;
        }

        .footer-column h5 {
            font-size: 12px;
            font-weight: 600;
            color: var(--color-text-primary);
            margin-bottom: 12px;
        }

        .footer-column ul {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .footer-column a {
            color: var(--color-text-secondary);
        }

        .footer-column a:hover {
            color: var(--color-text-primary);
            text-decoration: underline;
        }

        .footer-bottom {
            border-top: 1px solid var(--color-divider);
            padding-top: 16px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .footer-legal {
            display: flex;
            gap: 16px;
        }

        .footer-legal a {
            color: var(--color-text-secondary);
        }

        .footer-legal a:hover {
            color: var(--color-text-primary);
        }

        /* ==========================================================================
           10. Responsive Design
           ========================================================================== */
        @media (max-width: 992px) {
            .process-grid {
                grid-template-columns: repeat(2, 1fr);
                row-gap: 40px;
            }
        }

        @media (max-width: 768px) {
            .hero-title {
                font-size: 36px;
            }
            .hero-subtitle {
                font-size: 17px;
            }
            .hero-search {
                grid-template-columns: 1fr;
            }
            .hero-search-btn {
                width: 100%;
            }
            .nav-links {
                display: none; 
            }
            .mobile-menu-btn {
                display: block;
                opacity: 0.8;
            }
            .faq-grid {
                grid-template-columns: 1fr;
            }
            .footer-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            .footer-bottom {
                flex-direction: column;
                gap: 12px;
                text-align: center;
            }
        }

        @media (max-width: 480px) {
            .category-grid {
                grid-template-columns: 1fr;
            }
            .product-grid {
                grid-template-columns: 1fr;
            }
            .footer-grid {
                grid-template-columns: 1fr;
            }
        }

/* Django integration helper */
@media (max-width: 900px) {
  .nav-links.is-open {
    display: flex !important;
    position: absolute;
    top: calc(var(--nav-height) - 1px);
    left: 0;
    right: 0;
    background: rgba(255,255,255,.98);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid var(--color-divider);
    flex-direction: column;
    gap: 0;
    padding: 12px 20px 18px;
    z-index: 9998;
  }
  .nav-links.is-open > li > a,
  .nav-links.is-open .dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
  }
  .nav-links.is-open .dropdown-menu {
    position: static;
    width: 100%;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    background: transparent;
    margin-top: 0;
    padding: 0 0 8px;
  }
}

/* ==========================================================================
   v15 header hierarchy / mega menu refinements
   ========================================================================== */
.global-nav {
    min-height: var(--nav-height);
}

.dropdown-menu-categories {
    width: min(1080px, calc(100vw - 40px));
}

.dropdown-menu-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--color-text-secondary);
    font-size: 13px;
}

.dropdown-menu-topline-minimal {
    justify-content: flex-end;
}

.dropdown-menu-topline a {
    color: var(--color-accent) !important;
    height: auto;
}

.dropdown-grid-categories {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px 24px;
    white-space: normal;
}

.dropdown-col-category {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.dropdown-heading-link {
    color: var(--color-text-primary) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    height: auto !important;
}

.dropdown-group-meta {
    font-size: 12px;
    color: var(--color-text-tertiary);
}

.dropdown-child-list {
    display: grid;
    gap: 8px;
}

.dropdown-child-link-primary {
    background: rgba(245, 248, 255, 0.96);
    border-color: rgba(0, 113, 227, 0.14);
}

.dropdown-child-link {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 9px 10px;
    border-radius: 12px;
    background: rgba(245, 245, 247, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--color-text-primary) !important;
}

.dropdown-child-link span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-child-link small {
    flex: 0 0 auto;
    font-size: 11px;
    color: var(--color-text-tertiary);
}

.dropdown-child-link:hover {
    background: rgba(245, 248, 255, 0.96);
    border-color: rgba(0, 113, 227, 0.18);
}

@media (max-width: 1100px) {
    .dropdown-menu-categories {
        width: min(920px, calc(100vw - 28px));
    }

    .dropdown-grid-categories {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .dropdown-grid-categories {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* ==========================================================================
   v16 mobile drawer navigation fix
   ========================================================================== */
.nav-leading {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.nav-logo {
    min-width: 0;
}

.nav-logo-image {
    height: 34px;
    width: auto;
    max-width: 240px;
    display: block;
    object-fit: contain;
}

.nav-logo span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-nav-backdrop,
.mobile-nav-drawer,
.mobile-bottom-nav {
    display: none;
}

body.mobile-nav-open {
    overflow: hidden;
    touch-action: none;
}

@media (max-width: 768px) {
    .global-nav {
        z-index: 10000;
    }

    .nav-content {
        padding: 0 14px;
        gap: 12px;
    }

    .nav-logo {
        font-size: 18px;
        gap: 10px;
        flex: 1 1 auto;
        max-width: calc(100vw - 132px);
    }

    .nav-logo svg,
    .nav-logo-image {
        width: 22px;
        height: 22px;
        max-width: 22px;
        flex: 0 0 auto;
    }

    .nav-actions {
        gap: 0;
        margin-left: auto;
    }

    .nav-icon-btn {
        width: 38px;
        height: 38px;
        border-radius: 999px;
        justify-content: center;
        background: rgba(245, 245, 247, 0.86);
        border: 1px solid rgba(0, 0, 0, 0.05);
    }

    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border-radius: 999px;
        color: var(--color-text-primary);
        background: rgba(245, 245, 247, 0.9);
        border: 1px solid rgba(0, 0, 0, 0.05);
        opacity: 1;
        flex: 0 0 auto;
    }

    .mobile-menu-btn:hover {
        opacity: 1;
    }

    .mobile-menu-btn svg {
        width: 20px;
        height: 20px;
    }

    .mobile-nav-backdrop {
        position: fixed;
        inset: 0;
        display: block;
        z-index: 10010;
        background: rgba(15, 23, 42, 0.26);
    }

    .mobile-nav-backdrop[hidden] {
        display: none !important;
    }

    .mobile-nav-drawer {
        position: fixed;
        inset: 0;
        display: block;
        z-index: 10020;
        pointer-events: none;
    }

    .mobile-nav-drawer .mobile-nav-panel {
        position: absolute;
        top: 0;
        left: 0;
        width: min(88vw, 360px);
        max-width: calc(100vw - 20px);
        height: 100dvh;
        display: flex;
        flex-direction: column;
        background: #fff;
        border-right: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
        transform: translateX(-20px);
        opacity: 0;
        visibility: hidden;
        transition: transform .18s ease, opacity .18s ease, visibility .18s ease;
        overflow: hidden;
        will-change: transform, opacity;
    }

    .mobile-nav-drawer.is-open {
        pointer-events: auto;
    }

    .mobile-nav-drawer.is-open .mobile-nav-panel {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }

    .mobile-nav-panel-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px 14px;
        min-height: calc(var(--nav-height) + env(safe-area-inset-top, 0px));
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .mobile-nav-brand {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
        font-size: 17px;
        font-weight: 700;
    }

    .mobile-nav-brand svg,
    .mobile-nav-brand-image {
        width: 22px;
        height: 22px;
        max-width: 22px;
        flex: 0 0 auto;
    }

    .mobile-nav-brand span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-nav-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border-radius: 999px;
        background: rgba(245, 245, 247, 0.92);
        border: 1px solid rgba(0, 0, 0, 0.05);
        flex: 0 0 auto;
    }

    .mobile-nav-close svg {
        width: 20px;
        height: 20px;
    }

    .mobile-nav-scroll {
        flex: 1 1 auto;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 14px 12px calc(16px + env(safe-area-inset-bottom, 0px));
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .mobile-menu-group,
    .mobile-submenu {
        flex: 0 0 auto;
        border: 1px solid rgba(0, 0, 0, 0.06);
        background: rgba(251, 251, 253, 0.96);
        border-radius: 18px;
        overflow: hidden;
    }

    .mobile-menu-group > summary,
    .mobile-submenu > summary {
        list-style: none;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 16px 16px;
        cursor: pointer;
        user-select: none;
    }

    .mobile-menu-group > summary::-webkit-details-marker,
    .mobile-submenu > summary::-webkit-details-marker {
        display: none;
    }

    .mobile-menu-group-label {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        font-size: 17px;
        font-weight: 700;
        color: var(--color-text-primary);
        flex: 1 1 auto;
    }

    .mobile-menu-group-label svg {
        width: 18px;
        height: 18px;
        flex: 0 0 auto;
    }

    .mobile-menu-chevron {
        width: 18px;
        height: 18px;
        flex: 0 0 auto;
        color: var(--color-text-secondary);
        transition: transform .18s ease;
    }

    .mobile-menu-group[open] > summary .mobile-menu-chevron,
    .mobile-submenu[open] > summary .mobile-menu-chevron {
        transform: rotate(180deg);
    }

    .mobile-menu-group-body,
    .mobile-submenu-body {
        display: grid;
        gap: 8px;
        padding: 0 12px 12px;
    }

    .mobile-menu-link,
    .mobile-submenu-link {
        min-height: 48px;
        border-radius: 14px;
        padding: 12px 14px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        font-size: 16px;
        color: var(--color-text-primary);
        background: #fff;
        border: 1px solid rgba(0, 0, 0, 0.05);
    }

    .mobile-menu-link:hover,
    .mobile-submenu-link:hover {
        color: var(--color-accent);
        border-color: rgba(0, 113, 227, 0.18);
        background: rgba(246, 249, 255, 0.98);
    }

    .mobile-menu-link-primary {
        color: var(--color-accent);
        font-weight: 600;
        background: rgba(0, 113, 227, 0.08);
        border-color: rgba(0, 113, 227, 0.12);
    }

    .mobile-submenu > summary {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        align-items: center;
        column-gap: 10px;
        font-size: 16px;
        font-weight: 600;
        color: var(--color-text-primary);
    }

    .mobile-submenu-meta {
        font-size: 12px;
        color: var(--color-text-secondary);
        white-space: nowrap;
    }

    .mobile-submenu-link-parent {
        font-weight: 600;
        color: var(--color-accent);
    }

    .mobile-submenu-link small {
        font-size: 12px;
        color: var(--color-text-tertiary);
        flex: 0 0 auto;
    }

    .mobile-submenu-note,
    .mobile-submenu-empty {
        padding: 6px 2px 2px;
        font-size: 13px;
        line-height: 1.6;
        color: var(--color-text-secondary);
    }



    .mobile-bottom-nav {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(8px + env(safe-area-inset-bottom, 0px));
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        padding: 8px;
        border-radius: 18px;
        background: #fff;
        border: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.10);
        z-index: 9990;
        transform: translateZ(0);
    }

    .mobile-bottom-nav-link {
        min-height: 50px;
        border-radius: 14px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        color: var(--color-text-secondary);
        background: #f6f6f8;
        border: 1px solid transparent;
        font-size: 12px;
        font-weight: 600;
        transition: background-color .14s ease, color .14s ease, border-color .14s ease, transform .08s ease;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .mobile-bottom-nav-link svg {
        width: 20px;
        height: 20px;
        flex: 0 0 auto;
    }

    .mobile-bottom-nav-link.is-active {
        color: var(--color-accent);
        background: rgba(0, 113, 227, 0.08);
        border-color: rgba(0, 113, 227, 0.12);
    }

    .mobile-bottom-nav-link:hover {
        color: var(--color-accent);
    }

    .mobile-bottom-nav-link:active {
        transform: scale(0.985);
    }

    body.mobile-nav-open .mobile-bottom-nav {
        opacity: 0;
        pointer-events: none;
    }

    .v14-main {
        padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    }

    .nav-links.is-open {
        display: none !important;
    }
}
