       /* --- 基础重置 --- */
        :root {
            --primary: #2563eb;       /* Blue 600 */
            --primary-hover: #1d4ed8; /* Blue 700 */
            --bg-body: #f9f9f9;       /* Gray 100 */
            --bg-white: #ffffff;
            --text-main: #1e293b;     /* Slate 800 */
            --text-sub: #64748b;      /* Slate 500 */
            --border: #e2e8f0;        /* Slate 200 */
            --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
            background-color: var(--bg-body);
            color: var(--text-main);
            height: 100vh;
            display: flex;
            flex-direction: column;
            overflow: hidden; /* 防止body滚动，由内部区域滚动 */
        }

        /* --- 通用工具 --- */
        .icon { width: 1em; height: 1em; fill: currentColor; display: inline-block; vertical-align: middle; }
        .hidden { display: none !important; }
        .flex { display: flex; }
        .flex-col { flex-direction: column; }
        .items-center { align-items: center; }
        .justify-between { justify-content: space-between; }
        .justify-center { justify-content: center; }
        .font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
        
        /* --- 导航栏 --- */
        header {
            background: var(--bg-white);
            border-bottom: 1px solid var(--border);
            height: 64px;
            flex-shrink: 0;
            z-index: 10;
        }
        .nav-container {
            max-width: 1280px;
            margin: 0 auto;
            padding: 0 16px;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .brand { display: flex; align-items: center; gap: 12px; }
        .brand-icon { 
            background: var(--primary); 
            color: white; 
            padding: 8px; 
            border-radius: 8px; 
            display: flex;
        }
        .brand-icon svg { width: 20px; height: 20px; }
        .brand-text h1 { font-size: 18px; font-weight: 700; line-height: 1.2; }
        .brand-text p { font-size: 12px; color: var(--text-sub); }
        .stats { font-size: 14px; color: var(--text-sub); }
        .stats span { color: var(--primary); font-weight: bold; }

        /* --- 主布局 --- */
        main {
            flex-grow: 1;
            max-width: 1280px;
            width: 100%;
            margin: 0 auto;
            padding: 24px 16px;
            display: flex;
            gap: 24px;
            overflow: hidden; /* 关键：防止主容器双重滚动 */
        }

        /* --- 侧边栏 --- */
        aside {
            width: 320px;
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
            gap: 24px;
            overflow-y: auto;
        }

        .panel {
            background: var(--bg-white);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 20px;
            box-shadow: var(--shadow);
        }
        .panel-title {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-sub);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        /* 搜索框 */
        .search-wrapper { position: relative; }
        .search-input {
            width: 100%;
            padding: 12px 16px;
            padding-right: 40px;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            font-size: 14px;
            font-family: inherit;
            outline: none;
            transition: border-color 0.2s;
        }
        .search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1); }
        .search-clear {
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: #94a3b8;
            cursor: pointer;
            padding: 4px;
        }
        .search-clear:hover { color: var(--text-sub); }
        .search-hint { font-size: 12px; color: #94a3b8; margin-top: 8px; }

        /* 选择器 */
        .zone-select {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            background-color: #f8fafc;
            font-size: 14px;
            outline: none;
        }
        .stats-grid {
            margin-top: 16px;
            padding-top: 16px;
            border-top: 1px solid var(--border);
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            text-align: center;
        }
        .stat-box { background: #f8fafc; padding: 8px; border-radius: 4px; }
        .stat-label { font-size: 12px; color: var(--text-sub); }
        .stat-value { font-weight: bold; color: var(--text-main); }

        /* 详情面板 */
        #detail-char-box {
            width: 96px;
            height: 96px;
            margin: 0 auto 24px;
            background: #eff6ff;
            border: 2px solid #dbeafe;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 48px;
            font-family: "Songti SC", "SimSun", serif; /* 宋体更适合展示字形 */
            color: var(--text-main);
        }
        .detail-row {
            display: flex;
            justify-content: space-between;
            padding: 8px;
            background: #f8fafc;
            border: 1px solid #f1f5f9;
            border-radius: 4px;
            margin-bottom: 8px;
        }
        .detail-label { font-size: 12px; color: var(--text-sub); }
        .detail-val { font-family: monospace; font-weight: bold; color: var(--text-main); }
        .detail-val.blue { color: var(--primary); }

        .btn-copy {
            width: 100%;
            margin-top: 16px;
            padding: 10px;
            background: var(--primary);
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: background 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }
        .btn-copy:hover { background: var(--primary-hover); }
        .btn-copy.success { background: #16a34a; }

        /* --- 网格区域 --- */
        .grid-section {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            background: var(--bg-white);
            border: 1px solid var(--border);
            border-radius: 12px;
            box-shadow: var(--shadow);
            overflow: hidden;
        }
        .grid-header {
            padding: 16px;
            border-bottom: 1px solid var(--border);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .grid-header h3 { font-size: 16px; font-weight: bold; color: var(--text-main); }
        .grid-hint { font-size: 12px; color: var(--text-sub); }

        #grid-container {
            flex-grow: 1;
            overflow-y: auto;
            padding: 16px;
            background: #fff;
        }
        
        /* 字符卡片网格 */
        #char-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
            gap: 12px;
        }

        .char-card {
            background: white;
            border: 1px solid var(--border);
            border-radius: 8px;
            height: 96px;
            padding: 8px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            position: relative;
            cursor: pointer;
            transition: all 0.2s;
        }
        .char-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            border-color: var(--primary);
        }
        .card-quwei { font-size: 10px; color: #cbd5e1; position: absolute; top: 4px; left: 8px; font-family: monospace;}
        .card-char { 
            font-size: 32px; 
            text-align: center; 
            margin-top: 8px; 
            font-family: "Songti SC", "SimSun", serif; 
        }
        .card-footer {
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            border-top: 1px solid #f1f5f9;
            padding-top: 4px;
        }
        .card-label { font-size: 10px; color: #94a3b8; }
        .card-hex { font-size: 12px; font-weight: bold; color: var(--primary); font-family: monospace; }

        /* Loading & Empty States */
        .state-container {
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: #94a3b8;
            text-align: center;
        }
        .spinner {
            width: 32px;
            height: 32px;
            border: 3px solid #e2e8f0;
            border-top-color: var(--primary);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 12px;
        }
        @keyframes spin { to { transform: rotate(360deg); } }

        /* --- 响应式 --- */
        @media (max-width: 1024px) {
            main { flex-direction: column; overflow-y: auto; }
            aside { width: 100%; overflow: visible; }
            .grid-section { min-height: 500px; }
            #preview-panel { display: none; } /* Mobile uses modal */
        }
        @media (min-width: 1025px) {
            #preview-panel { position: sticky; top: 0; }
        }

        /* Mobile Modal */
        .modal-overlay {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.5);
            z-index: 50;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 16px;
        }
        .modal-content {
            background: white;
            border-radius: 16px;
            width: 100%;
            max-width: 360px;
            padding: 24px;
            text-align: center;
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
        }
        .close-btn {
            position: absolute;
            top: 16px; right: 16px;
            background: none; border: none;
            font-size: 20px; color: #94a3b8;
            cursor: pointer;
        }

        /* 滚动条美化 */
        ::-webkit-scrollbar { width: 8px; height: 8px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
        ::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
        

       .breadcrumb_box { flex-grow: 1;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0 16px;
    margin-top: 90px;
       }