html {
            -webkit-text-size-adjust: 100%;
            text-size-adjust: 100%;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Microsoft YaHei', Arial, sans-serif;
        }

        body {
            background-color: #F8F5F0;
            overflow-x: hidden;
        }

        /* 顶部标题和搜索 - 重新设计 */
        .header {
            background: linear-gradient(135deg, #0B3868 0%, #1E4F8A 100%);
            color: white;
            padding: 15px 20px 20px;
            box-shadow: 0 2px 10px rgba(11, 56, 104, 0.2);
            display: flex;
            flex-direction: column;
        }

        /* Logo和标题容器 */
        .header-top {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
        }

        .logo-container {
            width: 108px;
            height: 108px;
            margin-right: 15px;
            border-radius: 999px;
            overflow: hidden;
            background-color: transparent;
            border: none;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .site-logo {
            width: 100%;
            height: 100%;
            display: block;
            object-fit: contain;
            border-radius: 999px;
        }

        .header-title {
            flex: 1;
        }

        .header-title h1 {
            margin-bottom: 5px;
            font-size: 24px;
        }

        .header-subtitle {
            font-size: 14px;
            opacity: 0.9;
        }

        .lottery-section {
            padding: 18px 20px 0;
        }

        /* 折叠/展开切换按钮 */
        .lottery-toggle {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            padding: 10px 16px 10px 14px;
            background: rgba(255, 248, 240, 0.92);
            border: 1px solid rgba(184, 144, 118, 0.22);
            border-radius: 14px;
            cursor: pointer;
            color: inherit;
            font-family: inherit;
            text-align: left;
            transition: background 0.2s;
            margin-bottom: 2px;
        }
        .lottery-toggle:hover {
            background: rgba(247, 238, 227, 0.98);
        }
        .lottery-toggle-label {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .lottery-eyebrow-inline {
            display: inline-flex;
            align-items: center;
            padding: 4px 10px;
            border-radius: 999px;
            background: rgba(11, 56, 104, 0.08);
            color: #0B3868;
            font-size: 12px;
            font-weight: bold;
            letter-spacing: 0.08em;
            white-space: nowrap;
        }
        .lottery-toggle-hint {
            font-size: 14px;
            color: #7a5640;
            font-weight: 500;
        }
        .lottery-toggle-icon {
            width: 20px;
            height: 20px;
            color: #7a5640;
            flex-shrink: 0;
            transition: transform 0.3s ease;
        }
        .lottery-toggle[aria-expanded="true"] .lottery-toggle-icon {
            transform: rotate(180deg);
        }

        /* 折叠内容区 */
        .lottery-body {
            display: grid;
            grid-template-rows: 0fr;
            transition: grid-template-rows 0.35s ease;
        }
        .lottery-body.expanded {
            grid-template-rows: 1fr;
        }
        .lottery-body-inner {
            overflow: hidden;
        }
        .lottery-body-inner .lottery-card {
            margin-top: 8px;
        }

        .lottery-card {
            display: grid;
            grid-template-columns: minmax(280px, 1fr) 320px;
            gap: 24px;
            align-items: center;
            background: linear-gradient(135deg, rgba(255, 248, 240, 0.98) 0%, rgba(247, 238, 227, 0.96) 100%);
            border: 1px solid rgba(184, 144, 118, 0.24);
            border-radius: 22px;
            padding: 22px 24px;
            box-shadow: 0 10px 30px rgba(11, 56, 104, 0.08);
        }

        .lottery-eyebrow {
            display: inline-flex;
            align-items: center;
            padding: 6px 10px;
            border-radius: 999px;
            background: rgba(11, 56, 104, 0.08);
            color: #0B3868;
            font-size: 12px;
            font-weight: bold;
            letter-spacing: 0.08em;
            margin-bottom: 10px;
        }

        .lottery-copy h2 {
            color: #0B3868;
            font-size: 30px;
            margin-bottom: 10px;
        }

        .lottery-copy p {
            color: #555;
            line-height: 1.7;
            margin-bottom: 12px;
        }

        .lottery-prize-list {
            display: grid;
            gap: 8px;
            margin-bottom: 16px;
            color: #7a5640;
            font-size: 14px;
            font-weight: 600;
        }

        .lottery-form {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            align-items: center;
        }

        .lottery-form input {
            flex: 1;
            min-width: 220px;
            padding: 12px 14px;
            border: 1px solid rgba(11, 56, 104, 0.12);
            border-radius: 12px;
            background: white;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
        }

        .lottery-wheel-panel {
            display: flex;
            justify-content: center;
            position: relative;
            padding-top: 18px;
            min-width: 0;
        }

        .lottery-pointer {
            position: absolute;
            top: 0;
            left: 50%;
            width: 0;
            height: 0;
            border-left: 16px solid transparent;
            border-right: 16px solid transparent;
            border-top: 28px solid #b4463b;
            transform: translateX(-50%);
            z-index: 3;
            filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
        }

        .lottery-wheel {
            width: 280px;
            height: 280px;
            border-radius: 50%;
            position: relative;
            border: 10px solid #fff;
            box-shadow: 0 12px 30px rgba(11, 56, 104, 0.16);
            background:
                conic-gradient(
                    from -22.5deg,
                    #b4463b 0deg 45deg,
                    #f1dec7 45deg 90deg,
                    #d39c48 90deg 135deg,
                    #e9ccb2 135deg 180deg,
                    #896b45 180deg 225deg,
                    #f5e8d7 225deg 270deg,
                    #0B3868 270deg 315deg,
                    #d9bfa0 315deg 360deg
                );
            transition: transform 4.6s cubic-bezier(0.17, 0.88, 0.24, 1);
        }

        .lottery-wheel.spinning {
            pointer-events: none;
        }

        .lottery-segment-label {
            position: absolute;
            left: 50%;
            top: 50%;
            width: 86px;
            text-align: center;
            font-size: 13px;
            font-weight: bold;
            line-height: 1.35;
            transform-origin: center center;
            color: #fff;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
        }

        .lottery-segment-label.seg-0 { transform: translate(-50%, -50%) rotate(0deg) translateY(-104px) rotate(0deg); }
        .lottery-segment-label.seg-1 { transform: translate(-50%, -50%) rotate(45deg) translateY(-104px) rotate(-45deg); color: #6d513f; text-shadow: none; }
        .lottery-segment-label.seg-2 { transform: translate(-50%, -50%) rotate(90deg) translateY(-104px) rotate(-90deg); }
        .lottery-segment-label.seg-3 { transform: translate(-50%, -50%) rotate(135deg) translateY(-104px) rotate(-135deg); color: #6d513f; text-shadow: none; }
        .lottery-segment-label.seg-4 { transform: translate(-50%, -50%) rotate(180deg) translateY(-104px) rotate(-180deg); }
        .lottery-segment-label.seg-5 { transform: translate(-50%, -50%) rotate(225deg) translateY(-104px) rotate(-225deg); color: #6d513f; text-shadow: none; }
        .lottery-segment-label.seg-6 { transform: translate(-50%, -50%) rotate(270deg) translateY(-104px) rotate(-270deg); }
        .lottery-segment-label.seg-7 { transform: translate(-50%, -50%) rotate(315deg) translateY(-104px) rotate(-315deg); color: #6d513f; text-shadow: none; }

        .lottery-wheel-center {
            position: absolute;
            left: 50%;
            top: 50%;
            width: 84px;
            height: 84px;
            border-radius: 50%;
            transform: translate(-50%, -50%);
            background: radial-gradient(circle at 30% 30%, #fff7ed 0%, #c38b63 100%);
            color: #5d3d26;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            font-weight: bold;
            box-shadow: inset 0 2px 10px rgba(255, 255, 255, 0.4), 0 6px 18px rgba(0, 0, 0, 0.12);
        }

        /* 主内容区域 */
        .main-container {
            display: flex;
            min-height: calc(100dvh - 150px);
        }

        /* 左侧产品列表 */
        .product-list {
            width: 250px;
            background: white;
            border-right: 1px solid #ddd;
            display: flex;
            flex-direction: column;
            box-shadow: 2px 0 5px rgba(0,0,0,0.1);
        }

        .product-list-header {
            background-color: #0B3868;
            padding: 15px 16px 14px;
            color: white;
            border-bottom: 1px solid #ddd;
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .product-list h3 {
            margin: 0 0 12px;
            font-size: 16px;
        }

        .product-list-search {
            display: flex;
            gap: 8px;
        }

        .product-list-search input {
            flex: 1;
            min-width: 0;
            padding: 10px 12px;
            border: none;
            border-radius: 10px;
            font-size: 14px;
            background: rgba(255, 255, 255, 0.94);
            color: #333;
            box-shadow: 0 2px 5px rgba(0,0,0,0.12);
        }

        .product-list-search button {
            border: none;
            border-radius: 10px;
            padding: 0 16px;
            background: #B89076;
            color: white;
            font-size: 14px;
            font-weight: bold;
            cursor: pointer;
            white-space: nowrap;
        }

        .product-list-search button:hover {
            background: #A0785E;
        }

        #productListContainer {
            flex: 1;
            overflow-y: auto;
            max-height: calc(100vh - 200px);
            padding-bottom: 10px;
        }

        .product-item {
            padding: 15px 20px;
            border-bottom: 1px solid #eee;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 14px;
            color: #333;
        }

        .product-item:hover {
            background-color: #F5F0EB;
            padding-left: 25px;
            border-left: 4px solid #B89076;
        }

        .product-item.active {
            background-color: #0B3868;
            color: white;
            border-left: 4px solid #B89076;
        }

        /* 右侧内容区域 */
        .content-area {
            flex: 1;
            min-width: 0;
            padding: 20px;
            overflow-y: auto;
        }

        .product-detail-row {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
            margin-bottom: 20px;
            align-items: stretch;
        }

        .detail-card-compact {
            flex: 1 1 300px;
            min-width: 0;
        }

        .detail-card-wide {
            flex: 1.5 1 420px;
            min-width: 0;
        }

        /* 卡片样式 */
        .card {
            background: white;
            border-radius: 10px;
            box-shadow: 0 3px 10px rgba(11, 56, 104, 0.1);
            margin-bottom: 20px;
            overflow: hidden;
        }

        .card-header {
            background: linear-gradient(135deg, #0B3868 0%, #1E4F8A 100%);
            color: white;
            padding: 15px 20px;
        }

        .card-header h3 {
            margin: 0;
            font-size: 18px;
        }

        .card-body {
            padding: 20px;
        }

        /* 参数表格 */
        .param-table {
            width: 100%;
            border-collapse: collapse;
        }

        .param-table th {
            background-color: #F5F0EB;
            padding: 12px 15px;
            text-align: left;
            border-bottom: 2px solid #ddd;
            font-weight: 600;
            color: #333;
        }

        .param-table td {
            padding: 12px 15px;
            border-bottom: 1px solid #eee;
        }

        .param-table tr:hover {
            background-color: #F5F0EB;
        }

        /* 图表容器 */
        .chart-container {
            height: 300px;
            position: relative;
            margin-bottom: 20px;
        }

        /* 横向柱状图容器 - 优化宽度 */
        .bar-chart-container {
            height: 250px;
            position: relative;
            margin-top: 20px;
            width: 100%; /* 修改为100%宽度 */
        }

        /* 品质指标容器 - 重新设计 */
        .quality-metrics-container {
            display: flex;
            gap: 20px;
            margin-top: 20px;
        }

        .quality-chart {
            flex: 2; /* 增加比例 */
            min-width: 0;
        }

        .quality-explanation {
            flex: 1; /* 减少比例 */
            min-width: 0;
            background: #F8F5F0;
            border-radius: 8px;
            padding: 15px; /* 减小内边距 */
            border-left: 4px solid #B89076;
            max-height: 300px; /* 限制最大高度 */
            overflow-y: auto; /* 添加滚动条 */
        }

        .quality-explanation h4 {
            color: #0B3868;
            margin-bottom: 12px;
            font-size: 15px; /* 减小字体大小 */
        }

        .metric-item {
            margin-bottom: 12px; /* 减小间距 */
        }

        .metric-name {
            font-weight: bold;
            color: #333;
            margin-bottom: 3px; /* 减小间距 */
            font-size: 13px; /* 减小字体大小 */
        }

        .metric-description {
            font-size: 12px; /* 减小字体大小 */
            color: #666;
            line-height: 1.4; /* 减小行高 */
        }

        /* 按钮样式 */
        .btn {
            display: inline-block;
            padding: 10px 20px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            font-weight: bold;
            transition: all 0.3s;
            text-decoration: none;
            text-align: center;
        }

        .btn-primary {
            background: linear-gradient(135deg, #0B3868 0%, #1E4F8A 100%);
            color: white;
        }

        .btn-primary:hover {
            background: linear-gradient(135deg, #1E4F8A 0%, #2D66A3 100%);
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(11, 56, 104, 0.2);
        }

        @media (max-width: 920px) {
            .lottery-card {
                grid-template-columns: 1fr;
                padding: 18px;
            }

            .lottery-copy h2 {
                font-size: 24px;
            }

            .lottery-form {
                flex-direction: column;
                align-items: stretch;
            }

            .lottery-form input,
            .lottery-form button {
                width: 100%;
            }

            .main-container {
                flex-direction: column;
                min-height: auto;
            }

            .product-list {
                width: 100%;
                border-right: none;
                border-bottom: 1px solid #ddd;
            }

            #productListContainer {
                max-height: 320px;
            }

            .quality-metrics-container {
                flex-direction: column;
            }
        }

        .btn-outline {
            background: white;
            color: #0B3868;
            border: 2px solid #0B3868;
        }

        .btn-outline:hover {
            background: #0B3868;
            color: white;
        }

        /* 定制按钮 - 添加隐藏样式 */
        .custom-btn {
            position: fixed;
            bottom: 30px;
            right: 30px;
            background: linear-gradient(135deg, #0B3868 0%, #B89076 100%);
            color: white;
            padding: 12px 24px;
            border-radius: 50px;
            box-shadow: 0 5px 20px rgba(11, 56, 104, 0.4);
            z-index: 1000;
            font-size: 14px;
            font-weight: bold;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .custom-btn:hover {
            transform: scale(1.05) translateY(-3px);
            box-shadow: 0 8px 25px rgba(11, 56, 104, 0.6);
        }

        .custom-btn.hidden {
            display: none !important;
        }

        /* 风味标签容器 */
        .flavor-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 15px;
        }

        .flavor-tag {
            background-color: #F5F0EB;
            padding: 8px 15px;
            border-radius: 20px;
            font-size: 13px;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .flavor-tag .score {
            background-color: #0B3868;
            color: white;
            padding: 2px 8px;
            border-radius: 10px;
            font-weight: bold;
        }

        /* 初始提示 */
        .welcome-message {
            text-align: center;
            padding: 50px 20px;
            color: #666;
        }

        .welcome-message h2 {
            color: #0B3868;
            margin-bottom: 15px;
        }

        .welcome-message p {
            font-size: 16px;
            line-height: 1.6;
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .header {
                padding: 14px 14px 18px;
            }

            .header-top {
                flex-direction: column;
                text-align: center;
            }
            
            .logo-container {
                margin-right: 0;
                margin-bottom: 10px;
                width: 92px;
                height: 92px;
            }

            .header-actions {
                margin-left: 0;
                margin-top: 12px;
            }
            
            .header-title h1 {
                font-size: 20px;
            }
            
            .main-container {
                flex-direction: column;
                min-height: auto;
            }
            
            .product-list {
                width: 100%;
                height: auto;
                max-height: 50dvh;
                border-right: none;
                border-bottom: 1px solid #ddd;
            }
            
            #productListContainer {
                max-height: min(42dvh, 320px);
            }
            
            .product-item {
                padding: 12px 15px;
            }

            .content-area {
                padding: 14px;
                overflow: visible;
            }

            .product-detail-row {
                gap: 14px;
                margin-bottom: 14px;
            }

            .detail-card-compact,
            .detail-card-wide {
                flex-basis: 100%;
            }

            .card-header,
            .card-body {
                padding-left: 14px;
                padding-right: 14px;
            }

            .chart-container {
                height: 260px;
            }
            
            .custom-btn {
                bottom: 20px;
                right: 20px;
                padding: 10px 20px;
                font-size: 13px;
            }
            
            .bar-chart-container {
                width: 100%;
            }
            
            .quality-metrics-container {
                flex-direction: column;
            }
            
            .quality-chart,
            .quality-explanation {
                width: 100%;
            }
            
            .quality-explanation {
                max-height: none; /* 移动端取消高度限制 */
            }

            .param-table {
                table-layout: fixed;
            }

            .param-table th,
            .param-table td {
                padding: 10px 8px;
                font-size: 13px;
                word-break: break-word;
            }

            .balance-ratio-label,
            .balance-ratio-values,
            .balance-legend {
                gap: 8px;
                flex-wrap: wrap;
            }
        }

        /* 滚动条样式 */
        ::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }

        ::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb {
            background: #0B3868;
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: #1E4F8A;
        }

        /* 页面背景纹理 */
        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: 
                radial-gradient(#B89076 1px, transparent 1px),
                radial-gradient(#0B3868 1px, transparent 1px);
            background-size: 50px 50px;
            background-position: 0 0, 25px 25px;
            opacity: 0.05;
            z-index: -1;
        }

        /* 问号图标样式 */
        .help-icon {
            display: inline-block;
            width: 20px;
            height: 20px;
            background-color: rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            text-align: center;
            line-height: 20px;
            font-size: 12px;
            margin-left: 8px;
            cursor: pointer;
            transition: background-color 0.3s;
        }

        .help-icon:hover {
            background-color: rgba(255, 255, 255, 0.5);
        }

        /* 弹窗样式 */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 2000;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s, visibility 0.3s;
        }

        .modal-overlay.show {
            opacity: 1;
            visibility: visible;
        }

        .modal-content {
            background-color: white;
            border-radius: 10px;
            max-width: 500px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
            position: relative;
        }

        .modal-header {
            background: linear-gradient(135deg, #0B3868 0%, #1E4F8A 100%);
            color: white;
            padding: 15px 20px;
            border-radius: 10px 10px 0 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .modal-header h3 {
            margin: 0;
            font-size: 18px;
        }

        .modal-close {
            background: none;
            border: none;
            color: white;
            font-size: 24px;
            cursor: pointer;
            line-height: 1;
            padding: 0;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background-color 0.3s;
        }

        .modal-close:hover {
            background-color: rgba(255, 255, 255, 0.2);
        }

        .modal-body {
            padding: 20px;
        }

        .modal-body p {
            margin-bottom: 15px;
            line-height: 1.6;
            color: #333;
        }

        .modal-body h4 {
            color: #0B3868;
            margin: 20px 0 10px;
            font-size: 16px;
        }

        .modal-body ul {
            padding-left: 20px;
            margin-bottom: 15px;
        }

        .modal-body li {
            margin-bottom: 8px;
            line-height: 1.5;
        }

        /* 风味描述容器 */
        .flavor-description {
            margin-top: 15px;
            padding: 15px;
            background-color: #F8F5F0;
            border-radius: 8px;
            font-size: 14px;
            line-height: 1.6;
        }

        .flavor-description h4 {
            color: #0B3868;
            margin-bottom: 10px;
        }

        .flavor-description p {
            margin-bottom: 8px;
        }

        /* 超标箭头样式 */
        .arrow-up {
            color: #F44336;
            font-weight: bold;
            margin-left: 5px;
        }
        
        .arrow-down {
            color: #FF9800;
            font-weight: bold;
            margin-left: 5px;
        }
        
        /* 脚注说明 */
        .footnote {
            margin-top: 10px;
            font-size: 12px;
            color: #666;
            line-height: 1.4;
        }
        
        /* 评分标签样式 */
        .score-label {
            font-size: 12px;
            color: #666;
            margin-top: 5px;
        }

        /* 新增：平衡性图示样式 */
        .balance-visualization {
            margin-top: 30px;
            padding: 20px;
            background-color: #F8F5F0;
            border-radius: 10px;
            border-left: 4px solid #0B3868;
        }

        .balance-visualization h4 {
            color: #0B3868;
            margin-bottom: 20px;
            font-size: 16px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .balance-ratio-container {
            margin-bottom: 30px;
        }

        .balance-ratio-label {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
            font-weight: 600;
            color: #333;
        }

        .balance-ratio-bar {
            height: 40px;
            background-color: #E0E0E0;
            border-radius: 6px;
            overflow: hidden;
            position: relative;
            margin-bottom: 10px;
            border: none; /* 移除边框，去除黑色竖线 */
        }

        .balance-segment {
            height: 100%;
            float: left;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
            font-size: 13px;
            transition: all 0.3s;
            position: relative;
            border: none; /* 确保色块没有边框 */
        }

        .balance-segment.acid {
            background-color: #FF6B6B; /* 酸 - 红色 */
        }

        .balance-segment.ester {
            background-color: #4ECDC4; /* 酯 - 青色 */
        }

        .balance-segment.alcohol {
            background-color: #FFD166; /* 醇 - 黄色 */
        }

        .balance-segment.aldehyde {
            background-color: #06D6A0; /* 醛 - 绿色 */
        }

        .balance-legend {
            display: flex;
            justify-content: space-between;
            margin-top: 10px;
        }

        .balance-legend-item {
            display: flex;
            align-items: center;
            font-size: 12px;
            color: #555;
        }

        .balance-color-box {
            width: 15px;
            height: 15px;
            margin-right: 5px;
            border-radius: 3px;
        }

        .balance-ratio-values {
            display: flex;
            justify-content: space-between;
            margin-top: 15px;
            font-size: 13px;
        }

        .balance-ratio-value {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 25%;
        }

        .balance-ratio-value .value {
            font-weight: bold;
            font-size: 16px;
            margin-bottom: 5px;
        }

        .balance-ratio-value .label {
            font-size: 12px;
            color: #666;
        }

        .balance-ratio-value .deviation {
            font-size: 11px;
            margin-top: 3px;
            padding: 2px 6px;
            border-radius: 10px;
            font-weight: bold;
        }

        .balance-ratio-value .deviation.high {
            background-color: rgba(255, 107, 107, 0.2);
            color: #FF6B6B;
        }

        .balance-ratio-value .deviation.low {
            background-color: rgba(255, 209, 102, 0.3);
            color: #E6A800;
        }

        .balance-ideal-line {
            position: absolute;
            top: 0;
            height: 100%;
            width: 2px;
            background-color: #0B3868;
            z-index: 10;
        }

        .balance-ideal-line::after {
            content: '理想';
            position: absolute;
            top: -25px;
            left: -10px;
            background-color: #0B3868;
            color: white;
            padding: 3px 8px;
            border-radius: 4px;
            font-size: 10px;
            white-space: nowrap;
        }

        .balance-summary {
            margin-top: 20px;
            padding: 15px;
            background-color: white;
            border-radius: 8px;
            font-size: 13px;
            line-height: 1.5;
            border-left: 4px solid #B89076;
        }

        .balance-summary h5 {
            color: #0B3868;
            margin-bottom: 10px;
            font-size: 14px;
        }

        .balance-summary p {
            margin-bottom: 8px;
            color: #555;
        }

        .balance-summary .highlight {
            font-weight: bold;
            color: #0B3868;
        }

        .balance-tooltip {
            position: absolute;
            background-color: rgba(0, 0, 0, 0.8);
            color: white;
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 12px;
            z-index: 100;
            pointer-events: none;
            white-space: nowrap;
            transform: translateX(-50%);
            top: -40px;
        }

        @media (max-width: 768px) {
            .balance-visualization {
                padding: 15px;
            }
            
            .balance-ratio-value {
                width: 23%;
            }
            
            .balance-ratio-value .value {
                font-size: 14px;
            }
        }

        @media (max-width: 520px) {
            .lottery-section {
                padding: 14px 14px 0;
            }

            .lottery-card {
                padding: 16px 14px;
                border-radius: 18px;
            }

            .lottery-copy h2 {
                font-size: 22px;
                line-height: 1.35;
            }

            .lottery-copy p,
            .lottery-prize-list {
                font-size: 13px;
            }

            .lottery-form input {
                min-width: 0;
            }

            .lottery-wheel {
                width: min(78vw, 280px);
                height: min(78vw, 280px);
            }

            .lottery-segment-label {
                width: 72px;
                font-size: 11px;
            }

            .lottery-segment-label.seg-0 { transform: translate(-50%, -50%) rotate(0deg) translateY(calc(min(78vw, 280px) * -0.37)) rotate(0deg); }
            .lottery-segment-label.seg-1 { transform: translate(-50%, -50%) rotate(45deg) translateY(calc(min(78vw, 280px) * -0.37)) rotate(-45deg); color: #6d513f; text-shadow: none; }
            .lottery-segment-label.seg-2 { transform: translate(-50%, -50%) rotate(90deg) translateY(calc(min(78vw, 280px) * -0.37)) rotate(-90deg); }
            .lottery-segment-label.seg-3 { transform: translate(-50%, -50%) rotate(135deg) translateY(calc(min(78vw, 280px) * -0.37)) rotate(-135deg); color: #6d513f; text-shadow: none; }
            .lottery-segment-label.seg-4 { transform: translate(-50%, -50%) rotate(180deg) translateY(calc(min(78vw, 280px) * -0.37)) rotate(-180deg); }
            .lottery-segment-label.seg-5 { transform: translate(-50%, -50%) rotate(225deg) translateY(calc(min(78vw, 280px) * -0.37)) rotate(-225deg); color: #6d513f; text-shadow: none; }
            .lottery-segment-label.seg-6 { transform: translate(-50%, -50%) rotate(270deg) translateY(calc(min(78vw, 280px) * -0.37)) rotate(-270deg); }
            .lottery-segment-label.seg-7 { transform: translate(-50%, -50%) rotate(315deg) translateY(calc(min(78vw, 280px) * -0.37)) rotate(-315deg); color: #6d513f; text-shadow: none; }

            .lottery-wheel-center {
                width: 72px;
                height: 72px;
                font-size: 16px;
            }

            .custom-btn {
                left: 14px;
                right: 14px;
                bottom: 14px;
                justify-content: center;
            }

            .modal-content {
                width: calc(100% - 24px);
                max-height: 86dvh;
            }

            .modal-header,
            .modal-body {
                padding-left: 14px;
                padding-right: 14px;
            }

            .balance-ratio-value {
                width: calc(50% - 8px);
            }

            .balance-ratio-values {
                justify-content: flex-start;
            }
        }

        /* ========== H5 手机端专项优化 ========== */

        /* iOS 防止输入框缩放（字号 < 16px 会触发自动缩放） */
        @media (max-width: 768px) {
            input[type="text"],
            input[type="tel"],
            input[type="search"],
            select,
            textarea {
                font-size: 16px !important;
            }
        }

        /* 触摸点击反馈 & 消除 300ms 延迟 */
        button,
        .product-item,
        .custom-btn,
        .lottery-toggle,
        #lotterySpinBtn,
        #searchBtn {
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }

        /* 按钮按下触觉反馈 */
        .lottery-toggle:active {
            background: rgba(243, 234, 223, 1);
            transform: scale(0.99);
        }
        #lotterySpinBtn:active,
        #searchBtn:active {
            opacity: 0.82;
            transform: scale(0.97);
        }

        /* 底部 safe-area 适配（iPhone X+ 刘海屏） */
        @supports (padding-bottom: env(safe-area-inset-bottom)) {
            .custom-btn {
                bottom: calc(20px + env(safe-area-inset-bottom));
            }
            @media (max-width: 520px) {
                .custom-btn {
                    bottom: calc(14px + env(safe-area-inset-bottom));
                    padding-bottom: calc(12px + env(safe-area-inset-bottom) / 2);
                }
            }
        }

        /* 移动端抽奖 toggle 按钮最小点击高度 */
        @media (max-width: 768px) {
            .lottery-toggle {
                min-height: 52px;
                padding: 12px 16px;
            }
            .lottery-toggle-hint {
                display: none; /* 小屏只显示"互动抽奖"标签 */
            }
        }

        /* 产品列表项：手机上更大的触摸目标 */
        @media (max-width: 520px) {
            .product-item {
                padding: 14px 16px;
                min-height: 48px;
            }
            .product-item:active {
                background: rgba(11, 56, 104, 0.06);
            }
        }

        /* 参数表格横向滚动 */
        @media (max-width: 520px) {
            .param-table-wrapper {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }
        }
