.lab-page{
      --bg: #0b0f14;
      --panel: rgba(255,255,255,0.06);
      --panel2: rgba(255,255,255,0.08);
      --text: rgba(255,255,255,0.92);
      --muted: rgba(255,255,255,0.66);
      --faint: rgba(255,255,255,0.45);
      --border: rgba(255,255,255,0.12);
      --shadow: 0 18px 60px rgba(0,0,0,0.45);
      --accent: #7aa2ff;
      --accent2:#7df0c4;
      --danger:#ff6b6b;
      --ok:#39d98a;
      --warn:#ffd166;
      --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
      --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
      --radius: 16px;
    }
    
    *{ box-sizing:border-box; }
    .lab-page{
      margin:0;
      background: radial-gradient(1200px 700px at 80% -20%, rgba(122,162,255,0.22), transparent 60%),
                  radial-gradient(900px 550px at 20% 0%, rgba(125,240,196,0.18), transparent 55%),
                  var(--bg);
      color: var(--text);
      font-family: var(--sans);
      line-height: 1.5;
    }
    a{ color: var(--accent); text-decoration: none; }
    a:hover{ text-decoration: underline; }

    .wrap{ max-width: 1160px; margin: 0 auto; padding: 28px 18px 80px; 
    padding-top: 90px;
}
    .topbar{ display:flex; align-items:flex-start; justify-content:space-between; gap: 16px; margin-bottom: 18px; }
    .brand{ display:flex; gap:12px; align-items:center; }
    .brand-icon{ width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, rgba(122,162,255,0.95), rgba(125,240,196,0.85)); box-shadow: 0 10px 30px rgba(0,0,0,0.22); }
    h1{ font-size: 18px; margin:0; letter-spacing: 0.2px; }
    .subtitle{ margin:2px 0 0; color: var(--muted); font-size: 13px; }
    .pill{ display:inline-flex; gap:8px; align-items:center; border:1px solid var(--border); background: rgba(255,255,255,0.02); padding:8px 12px; border-radius: 999px; color: var(--muted); font-size: 12px; }

    .grid{ display:grid; grid-template-columns: 1.05fr 0.95fr; gap: 16px; }
    @media (max-width: 980px){ .grid{ grid-template-columns: 1fr; } }

    .card{ border: 1px solid var(--border); background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03)); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
    .card .hd{ padding: 16px 18px; border-bottom: 1px solid var(--border); display:flex; align-items:center; justify-content:space-between; gap:12px; }
    .card .hd h2{ font-size: 14px; margin:0; letter-spacing: 0.2px; }
    .card .bd{ padding: 16px 18px; }

    .section-title{ display:flex; align-items:center; gap:10px; }
    .dot{ width:10px;height:10px;border-radius:99px; background: var(--accent); box-shadow: 0 0 0 4px rgba(122,162,255,0.18); }
    .dot.green{ background: var(--accent2); box-shadow: 0 0 0 4px rgba(125,240,196,0.16); }

    .row{ display:grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
    @media (max-width: 640px){ .row{ grid-template-columns: 1fr; } }

    label{ display:block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
    input, select, button, textarea{ font-family: var(--sans); }
    input, select, textarea{ width:100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); outline: none; background: rgba(255,255,255,0.03); color: var(--text); }
    textarea{ min-height: 120px; resize: vertical; }
    input::placeholder, textarea::placeholder{ color: var(--faint); }
    input:focus, select:focus, textarea:focus{ border-color: rgba(122,162,255,0.6); box-shadow: 0 0 0 4px rgba(122,162,255,0.14); }

    .hint{ font-size: 12px; color: var(--faint); margin-top: 6px; }
    .toolbar{ display:flex; flex-wrap:wrap; gap:10px; margin-top: 10px; }
    button{ border: 1px solid var(--border); background: rgba(255,255,255,0.03); color: var(--text); padding: 10px 12px; border-radius: 12px; cursor: pointer; transition: transform .04s ease, background .2s ease, border-color .2s ease; }
    button:hover{ background: rgba(255,255,255,0.07); border-color: rgba(122,162,255,0.55); }
    button:active{ transform: translateY(1px); }
    .primary{ background: linear-gradient(135deg, rgba(122,162,255,0.95), rgba(125,240,196,0.75)); border: none; color: rgba(0,0,0,0.78); font-weight: 650; }
    .primary:hover{ filter: brightness(1.02); }
    .danger{ border-color: rgba(255,107,107,0.45); color: rgba(255,107,107,0.92); }
    .danger:hover{ background: rgba(255,107,107,0.08); }
    .mini{ padding: 7px 10px; border-radius: 10px; font-size: 12px; }

    .kpi{ display:grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    @media (max-width: 640px){ .kpi{ grid-template-columns: 1fr; } }
    .kpi .box{ border: 1px solid var(--border); border-radius: 14px; padding: 12px 12px; background: rgba(255,255,255,0.03); }
    .kpi .box .t{ font-size: 12px; color: var(--muted); margin-bottom: 6px; }
    .kpi .box .v{ font-size: 16px; font-weight: 700; letter-spacing: .2px; }
    .kpi .box .s{ font-size: 12px; color: var(--faint); margin-top: 4px; }

    .split{ height:1px; background: var(--border); margin: 14px 0; }

    .code{ font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: pre-wrap; word-break: break-word; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }

    .badge{ display:inline-flex; align-items:center; gap:6px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); font-size: 12px; color: var(--muted); background: rgba(255,255,255,0.02); }
    .badge .b{ width:7px;height:7px;border-radius:99px;background: var(--ok); }
    .badge.warn .b{ background: var(--warn); }

    /* ====== Theme override: manual light/dark ====== */
    
    

    /* ====== Smooth theme transition ====== */
    html {
      scrollbar-gutter: stable;
    }
    
    
    

    /* ====== iOS-like theme switch ====== */

    /* ====== Left sidebar + overlay ====== */
    
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    
    



    /* ====== App extra ====== */
    .mode-tabs{ display:flex; gap:10px; flex-wrap:wrap; }
    .tab{ display:inline-flex; gap:8px; align-items:center; border:1px solid var(--border); background: rgba(255,255,255,0.02);
      padding:8px 10px; border-radius: 999px; color: var(--muted); font-size: 12px; cursor:pointer; user-select:none;
      transition: background .16s ease, border-color .16s ease; }
    .tab:hover{ background: rgba(255,255,255,0.06); border-color: rgba(122,162,255,0.35); }
    .tab.is-active{ color: rgba(0,0,0,0.78); border: none; background: linear-gradient(135deg, rgba(122,162,255,0.95), rgba(125,240,196,0.75)); font-weight: 700; }

    .pick-display{ border: 1px solid var(--border); border-radius: 14px; padding: 14px 14px; background: rgba(255,255,255,0.03); position: relative; overflow:hidden; }
    .pick-display .label{ font-size: 12px; color: var(--muted); margin-bottom: 6px; }
    .pick-display .value{ font-size: 20px; font-weight: 800; letter-spacing: .2px; line-height: 1.35; word-break: break-word; white-space: pre-wrap; }
    #finalPick{ white-space: pre-wrap; word-break: break-word; }
    .pulse{ animation: pulseGlow .5s ease-in-out infinite alternate; }
    @keyframes pulseGlow{ 0%{ box-shadow: 0 0 0 0 rgba(122,162,255,0.0); } 100%{ box-shadow: 0 0 0 6px rgba(122,162,255,0.10); } }

    .list-mini{ max-height: 220px; overflow:auto; border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,0.02); padding: 8px 10px; font-size: 12px; color: var(--muted); }
    .list-mini code{ font-family: var(--mono); color: var(--text); background: transparent; }

    

/* ====== CSV 示例表格（行聚合/扁平拆分） ====== */
.demo-table{ width:100%; border-collapse: collapse; font-size: 12px; background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 12px; overflow:hidden; }
.demo-table th, .demo-table td{ padding: 6px 8px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); }
.demo-table th{ text-align:left; color: var(--muted); font-weight: 600; background: rgba(255,255,255,0.03); }
.demo-table th:last-child, .demo-table td:last-child{ border-right: none; }
.demo-table tr:last-child td{ border-bottom: none; }
/* ===== 修复：深色模式下 <select> 下拉选项白底白字 ===== */
    
    
    @media (prefers-color-scheme: dark){ html:not([data-theme]){ color-scheme: dark; } }
    

    
    
    @media (prefers-color-scheme: dark){ html:not([data-theme]) select option{ background-color: #0b0f14; color: rgba(255,255,255,0.92); } }
