/* ─────────────────────────────────────────────────────────────
 * 当前文件：全局样式（暗色 cyber-lab 主题）
 * 用 Tailwind 兜底常规布局；这里只放：
 *   1) 图标字体的防 FOUC
 *   2) 点阵背景 / 滚动条 / 通用工具类
 *   3) Sidebar 折叠态
 *   4) Stepper（核心视觉：纵向时间轴 + glow + 呼吸动画）
 *   5) 反应卡 / 分子卡 / 分页 / 占位页
 * ───────────────────────────────────────────────────────────── */

/* ── 字体防 FOUC ───────────────────────────────────────────── */
.material-symbols-outlined { visibility: hidden; }
html.icons-loaded .material-symbols-outlined { visibility: visible; }

/* ── 暗色对比度微调 ───────────────────────────────────────── */
html:not(.light-theme) .text-slate-500  { color: #aab4c8 !important; }
html:not(.light-theme) .text-slate-600  { color: #97a3ba !important; }
html:not(.light-theme) .text-slate-700  { color: #8b97af !important; }
html:not(.light-theme) .border-white\/5  { border-color: rgba(255,255,255,0.10) !important; }
html:not(.light-theme) .border-white\/10 { border-color: rgba(255,255,255,0.14) !important; }

/* ── 点阵背景（化学网格感）─────────────────────────────────── */
.grid-texture {
    background-color: #0b1326;
    background-image:
        radial-gradient(900px 420px at 50% -8%, rgba(128,153,255,0.12), transparent 72%),
        radial-gradient(rgba(128,153,255,0.08) 1px, transparent 1px);
    background-size: 100% 100%, 24px 24px;
    background-repeat: no-repeat, repeat;
}

/* ── 卡片发光描边 ─────────────────────────────────────────── */
.glow-border {
    border: 1px solid rgba(128,153,255,0.10);
    transition: all 0.3s ease;
}
.glow-border:hover {
    border-color: rgba(128,153,255,0.40);
    box-shadow: 0 0 30px rgba(128,153,255,0.15);
}

/* ── 滚动条 ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0b1326; }
::-webkit-scrollbar-thumb { background: rgba(128,153,255,0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(128,153,255,0.45); }

/* ── Sidebar 折叠态 ───────────────────────────────────────── */
#sidebar.collapsed { width: 64px; }
#sidebar.collapsed .nav-label,
#sidebar.collapsed .nav-label-block { display: none; }
#sidebar.collapsed .nav-item        { justify-content: center; padding-left: 0; padding-right: 0; }
#sidebar.collapsed .nav-divider     { margin-left: 10px; margin-right: 10px; }
#main-content.sidebar-collapsed     { margin-left: 64px; }
#header.sidebar-collapsed           { left: 64px; }
#icp-footer.sidebar-collapsed       { margin-left: 64px; }

/* ── 模式切换：分子设计平台 / 分子管理与上传平台 ─────────────
 * 顶级入口；中文长名挤不下水平 toggle，所以改成上下两张卡：
 *   ┌──────────────────────────────┐
 *   │ ▣  分子设计平台              │   ← 卡片 1（active 时实色渐变 + glow）
 *   │    Design Platform           │
 *   ├──────────────────────────────┤
 *   │ ▣  分子管理与上传平台        │   ← 卡片 2
 *   │    Manage & Upload           │
 *   └──────────────────────────────┘
 * 折叠态退化为两个独立的图标按钮（右侧 .mode-toggle-text 整块隐藏）。
 * ───────────────────────────────────────────────────────────── */
.mode-toggle {
    margin: 10px 14px 10px;
    padding: 6px;
    display: flex;
    flex-direction: column;          /* 关键：竖向堆叠 */
    gap: 6px;
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.40);
}
.mode-toggle-btn {
    display: flex;
    flex-direction: row;             /* 单卡片内部：左 icon + 右文字 */
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: #8b97af;
    text-align: left;
    cursor: pointer;
    transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    width: 100%;
}
.mode-toggle-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.mode-toggle-icon .material-symbols-outlined {
    font-size: 22px;
    color: inherit;
}
.mode-toggle-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.2;
}
.mode-toggle-zh {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: inherit;
    /* 长名硬截断防止挤出卡片 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mode-toggle-en {
    font-family: 'Geist Mono', monospace;
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #5a6478;
}
.mode-toggle-btn:hover:not(.active) {
    color: #cbd5e1;
    background: rgba(255,255,255,0.03);
}
.mode-toggle-btn:hover:not(.active) .mode-toggle-icon {
    background: rgba(128,153,255,0.10);
    border-color: rgba(128,153,255,0.20);
}
.mode-toggle-btn.active {
    background: linear-gradient(135deg, rgba(128,153,255,0.95), rgba(100,120,230,0.95));
    color: #0b1326;
    box-shadow: 0 4px 18px rgba(128,153,255,0.45), inset 0 1px 0 rgba(255,255,255,0.30);
    transform: translateY(-1px);
}
.mode-toggle-btn.active .mode-toggle-icon {
    background: rgba(11,19,38,0.18);
    border-color: rgba(11,19,38,0.20);
    transform: scale(1.04);
}
.mode-toggle-btn.active .mode-toggle-en {
    color: rgba(11,19,38,0.65);
}

/* 折叠态：右侧文字隐藏，只留 icon；卡片变方块 */
#sidebar.collapsed .mode-toggle {
    margin: 8px 8px 8px;
    padding: 4px;
    border-radius: 12px;
}
#sidebar.collapsed .mode-toggle-btn {
    padding: 6px;
    justify-content: center;
    gap: 0;
}
#sidebar.collapsed .mode-toggle-text { display: none; }
#sidebar.collapsed .mode-toggle-icon {
    width: 36px;
    height: 36px;
}

/* ── 公用菜单与模式专属菜单之间的明显分隔线 ───────────────────
   渐变实线 + 居中渐隐，比普通 nav-divider 更醒目，一眼能看出分组。 */
.nav-common-divider {
    height: 2px;
    border: 0;
    border-radius: 2px;
    background: linear-gradient(90deg,
        rgba(128,153,255,0) 0%,
        rgba(128,153,255,0.55) 50%,
        rgba(128,153,255,0) 100%);
    box-shadow: 0 0 10px rgba(128,153,255,0.35);
}
#sidebar.collapsed .nav-common-divider { margin-left: 10px; margin-right: 10px; }

/* ── nav-item 选中态 ─────────────────────────────────────── */
.nav-item.active {
    color: #8099FF !important;
    background: linear-gradient(90deg, rgba(128,153,255,0.18), rgba(128,153,255,0.04));
    box-shadow: inset 3px 0 0 #8099FF;
}

/* ── 通用按钮：主按钮 / 次按钮 ───────────────────────────── */
.btn-primary {
    background: linear-gradient(135deg, #8099FF, #6478e6);
    color: #0b1326;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(128,153,255,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-primary:hover:not(:disabled) {
    filter: brightness(1.10);
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(128,153,255,0.5), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
    background: rgba(251,174,234,0.10);
    color: #fbaeea;
    border: 1px solid rgba(251,174,234,0.30);
}
.btn-secondary:hover { background: rgba(251,174,234,0.18); border-color: rgba(251,174,234,0.55); }

/* ── 反应筛选单步正合成：反应类型选择 chip ─────────────────── */
.screen-type-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px 7px 10px;
    border-radius: 12px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #c7d0e8;
    background: linear-gradient(135deg, rgba(128,153,255,0.07), rgba(128,153,255,0.02));
    border: 1px solid rgba(128,153,255,0.18);
    cursor: pointer;
    user-select: none;
    transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease, color .16s ease;
}
.screen-type-chip .chip-ico {
    font-size: 17px;
    line-height: 1;
    color: #8099FF;
    transition: color .16s ease, transform .16s ease;
}
.screen-type-chip .chip-name { white-space: nowrap; }
.screen-type-chip .chip-count {
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10.5px;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    border-radius: 999px;
    color: #aab6e8;
    background: rgba(128,153,255,0.16);
    transition: color .16s ease, background .16s ease;
}
.screen-type-chip:hover {
    transform: translateY(-1px);
    color: #fff;
    border-color: rgba(128,153,255,0.5);
    background: linear-gradient(135deg, rgba(128,153,255,0.16), rgba(128,153,255,0.05));
    box-shadow: 0 4px 16px rgba(128,153,255,0.18);
}
.screen-type-chip:hover .chip-ico { transform: scale(1.08); }
.screen-type-chip:active { transform: translateY(0); }
/* 选中态：主色实底 + 光晕 + 图标变勾（与 btn-primary 同款深字配色）*/
.screen-type-chip.selected {
    color: #0b1326;
    background: linear-gradient(135deg, #8099FF, #6478e6);
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(128,153,255,0.45), inset 0 1px 0 rgba(255,255,255,0.25);
}
.screen-type-chip.selected .chip-ico { color: #0b1326; transform: none; }
.screen-type-chip.selected .chip-count {
    color: #2740b8;
    background: rgba(255,255,255,0.88);
}

html.light-theme .screen-type-chip {
    color: #475569;
    background: rgba(128,153,255,0.07);
    border-color: rgba(128,153,255,0.25);
}
html.light-theme .screen-type-chip:hover { color: #1e293b; }
html.light-theme .screen-type-chip .chip-count { color: #5b6bd6; background: rgba(128,153,255,0.16); }
html.light-theme .screen-type-chip.selected { color: #0b1326; }
html.light-theme .screen-type-chip.selected .chip-count { color: #2740b8; background: rgba(255,255,255,0.92); }

.btn-ghost {
    background: rgba(255,255,255,0.04);
    color: #cbd5e1;
    border: 1px solid rgba(255,255,255,0.10);
}
.btn-ghost:hover:not(:disabled) { background: rgba(128,153,255,0.10); color: #8099FF; border-color: rgba(128,153,255,0.30); }
.btn-ghost:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── 拖拽 drop-zone 高亮 ─────────────────────────────────── */
.drag-over {
    border-color: rgba(128,153,255,0.6) !important;
    background-color: rgba(128,153,255,0.05) !important;
}

/* ═══════════════════════════════════════════════════════════════
 *   STEPPER（核心视觉：纵向时间轴 + glow 卡片）
 * 三步：专家规则生成 / 校验专家规则 / 批量正合成
 * 每步一张卡，左侧是 36px 圆形 indicator，下方接一条 connector
 * 状态：pending / active / done / failed
 * ═══════════════════════════════════════════════════════════════ */

.stepper {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.step-node {
    position: relative;
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 16px;
    align-items: stretch;
    padding: 0;
    transition: all 0.35s cubic-bezier(.2,.8,.2,1);
}

/* 左侧 indicator 列：圆 + 下方 connector */
.step-indicator-col {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}
/* indicator 圆 */
.step-indicator {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Geist Mono', monospace;
    font-size: 14px;
    flex-shrink: 0;
    background: #0b1326;
    border: 1.5px solid rgba(255,255,255,0.10);
    color: #6b7a99;
    transition: all 0.3s ease;
    z-index: 1;
}
/* 连接线：connector 高度撑满到下一步圆心 */
.step-connector {
    flex: 1;
    width: 2px;
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    margin-top: 2px;
    min-height: 24px;
}
.step-connector.completed {
    background: linear-gradient(180deg, #8099FF, rgba(128,153,255,0.2));
    box-shadow: 0 0 8px rgba(128,153,255,0.3);
}
.step-connector.failed {
    background: linear-gradient(180deg, #f87171, rgba(248,113,113,0.2));
}

/* 卡片本体 */
.step-card {
    background: linear-gradient(135deg, rgba(19,27,46,0.85), rgba(11,19,38,0.85));
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 14px 16px;
    transition: all 0.35s ease;
    backdrop-filter: blur(6px);
}
.step-card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #cbd5e1;
    letter-spacing: 0.02em;
}
.step-card-subtitle {
    margin-top: 4px;
    font-family: 'Geist Mono', monospace;
    font-size: 11.5px;
    color: #94a3b8;
    line-height: 1.55;
    word-break: break-all;
}

/* ── 状态：pending（默认）── */
.step-node.status-pending .step-card        { opacity: 0.7; }
.step-node.status-pending .step-card-title  { color: #94a3b8; }

/* ── 状态：active（呼吸 + 描边渐变）── */
.step-node.status-active .step-indicator {
    border-color: #8099FF;
    color: #8099FF;
    box-shadow: 0 0 0 4px rgba(128,153,255,0.18), 0 0 18px rgba(128,153,255,0.6);
    background: radial-gradient(circle at center, rgba(128,153,255,0.25), #0b1326 70%);
}
.step-node.status-active .step-card {
    border-color: rgba(128,153,255,0.45);
    box-shadow: 0 0 32px rgba(128,153,255,0.18), inset 0 0 20px rgba(128,153,255,0.05);
    background: linear-gradient(135deg, rgba(128,153,255,0.10), rgba(11,19,38,0.92));
    animation: step-breathe 2.4s ease-in-out infinite;
}
.step-node.status-active .step-card-title { color: #c7d2fe; }
.step-node.status-active .step-card-subtitle { color: #b4c0e0; }
@keyframes step-breathe {
    0%, 100% { box-shadow: 0 0 24px rgba(128,153,255,0.18), inset 0 0 18px rgba(128,153,255,0.04); }
    50%      { box-shadow: 0 0 38px rgba(128,153,255,0.35), inset 0 0 28px rgba(128,153,255,0.08); }
}

/* active indicator 内部转圈 spinner */
.step-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(128,153,255,0.25);
    border-top-color: #8099FF;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 状态：done ── */
.step-node.status-done .step-indicator {
    border-color: #34d399;
    color: #0b1326;
    background: linear-gradient(135deg, #34d399, #10b981);
    box-shadow: 0 0 0 3px rgba(52,211,153,0.15), 0 0 14px rgba(52,211,153,0.45);
}
.step-node.status-done .step-card {
    border-color: rgba(52,211,153,0.30);
    background: linear-gradient(135deg, rgba(52,211,153,0.06), rgba(11,19,38,0.85));
}
.step-node.status-done .step-card-title { color: #d1fae5; }
.step-node.status-done .step-card-subtitle { color: #a7f3d0; }

/* ── 状态：failed ── */
.step-node.status-failed .step-indicator {
    border-color: #f87171;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    box-shadow: 0 0 0 3px rgba(248,113,113,0.15), 0 0 14px rgba(248,113,113,0.45);
}
.step-node.status-failed .step-card {
    border-color: rgba(248,113,113,0.40);
    background: linear-gradient(135deg, rgba(248,113,113,0.08), rgba(11,19,38,0.85));
}
.step-node.status-failed .step-card-title { color: #fecaca; }
.step-node.status-failed .step-card-subtitle { color: #fda4af; }

/* 已停止：琥珀色，区别于失败的红色 */
.step-node.status-stopped .step-indicator {
    border-color: #fbbf24;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 0 0 3px rgba(251,191,36,0.15), 0 0 14px rgba(251,191,36,0.40);
}
.step-node.status-stopped .step-card {
    border-color: rgba(251,191,36,0.40);
    background: linear-gradient(135deg, rgba(251,191,36,0.08), rgba(11,19,38,0.85));
}
.step-node.status-stopped .step-card-title { color: #fde68a; }
.step-node.status-stopped .step-card-subtitle { color: #fcd34d; }

/* ── pipeline banner（在 stepper 上方的总体状态条） ── */
.pipeline-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    font-family: 'Geist Mono', monospace;
    font-size: 13px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}
.pipeline-banner.banner-running {
    background: linear-gradient(90deg, rgba(128,153,255,0.10), rgba(128,153,255,0.02));
    border-color: rgba(128,153,255,0.30);
    color: #c7d2fe;
}
.pipeline-banner.banner-done {
    background: linear-gradient(90deg, rgba(52,211,153,0.12), rgba(52,211,153,0.02));
    border-color: rgba(52,211,153,0.40);
    color: #d1fae5;
}
.pipeline-banner.banner-failed {
    background: linear-gradient(90deg, rgba(248,113,113,0.12), rgba(248,113,113,0.02));
    border-color: rgba(248,113,113,0.40);
    color: #fecaca;
}
.pipeline-banner.banner-stopped {
    background: linear-gradient(90deg, rgba(251,191,36,0.12), rgba(251,191,36,0.02));
    border-color: rgba(251,191,36,0.40);
    color: #fde68a;
}
.banner-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(199,210,254,0.30);
    border-top-color: #c7d2fe;
    border-radius: 50%;
    display: inline-block;
    animation: spin 0.9s linear infinite;
}

/* ── 合成进度条（在 synthesis step 内部展示）── */
.synth-progress {
    margin-top: 10px;
    padding: 10px 12px;
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(128,153,255,0.20);
    border-radius: 10px;
}
.synth-progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}
.synth-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8099FF, #fbaeea);
    transition: width 0.5s ease;
    box-shadow: 0 0 8px rgba(128,153,255,0.5);
}
.synth-progress-text {
    margin-top: 6px;
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    color: #b4c0e0;
    text-align: right;
}

/* ═══════════════════════════════════════════════════════════════
 *   反应卡 / 分子卡（结果展示）
 * ═══════════════════════════════════════════════════════════════ */

.reaction-card {
    background: linear-gradient(135deg, rgba(19,27,46,0.85), rgba(11,19,38,0.85));
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
}
.reaction-card:hover {
    border-color: rgba(128,153,255,0.30);
    box-shadow: 0 0 30px rgba(128,153,255,0.10);
}

/* 反应整行：反应物 + → + 产物，wrap 后换行 */
.reaction-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 8px 0;
}
.reaction-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}
.reaction-arrow {
    color: #8099FF;
    font-size: 28px;
    user-select: none;
}
.reaction-plus {
    color: #fbaeea;
    font-size: 22px;
    font-weight: bold;
    user-select: none;
}

/* ─── 反应底部「可能用到的试剂」栏 ─── */
.rxn-reagents {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(128,153,255,0.18);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rxn-reagents-toggle {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 14px;
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    color: #7fd4c1;
    background: rgba(64,196,170,0.07);
    border: 1px solid rgba(64,196,170,0.28);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.rxn-reagents-toggle:hover { color: #a6efdd; border-color: rgba(64,196,170,0.55); background: rgba(64,196,170,0.14); }
.rxn-reagents-caret { font-size: 9px; transition: transform 0.15s ease; }
.rxn-reagents.collapsed .rxn-reagents-caret { transform: rotate(-90deg); }
.rxn-reagents.collapsed .rxn-reagents-body { display: none; }

.rxn-reagents-body {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}
.reagent-empty { font-size: 11px; color: #6b7a99; padding: 2px 0; }

/* 单个试剂卡：结构图 + 名称 + CAS/SMILES + 供应商/委托找货 */
.reagent-card {
    width: 156px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 9px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
}
.reagent-svg {
    width: 116px;
    height: 116px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}
.reagent-svg img { width: 100%; height: 100%; object-fit: contain; }
.reagent-svg.is-empty { background: rgba(255,255,255,0.04); color: #6b7a99; font-size: 22px; }
.reagent-name {
    font-size: 11px;
    color: #e6ebf5;
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
}
.reagent-meta {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-family: 'Geist Mono', monospace;
}
.reagent-meta .rg-row { display: flex; gap: 4px; font-size: 9px; line-height: 1.4; }
.reagent-meta .rg-label { color: #6b7a99; flex: none; }
.reagent-meta .rg-val { color: #aab6d4; word-break: break-all; min-width: 0; }
.reagent-sup { margin-top: 2px; width: 100%; display: flex; justify-content: center; }
.reagent-sup-loading { font-size: 9px; color: #6b7a99; }

/* 供应商小按钮 / 委托找货——委托找货也用于分子卡（无供应商时） */
.reagent-sup-btn, .reagent-entrust, .mol-sup-entrust {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-family: 'Geist Mono', monospace;
    cursor: pointer;
    transition: all 0.15s ease;
}
.reagent-sup-btn, .reagent-entrust {
    padding: 2px 10px;
    font-size: 9px;
    border-radius: 999px;
}
.reagent-sup-btn { color: #c9a85f; background: rgba(245,196,81,0.08); border: 1px solid rgba(245,196,81,0.3); }
.reagent-sup-btn:hover { color: #ffd778; background: rgba(245,196,81,0.16); border-color: rgba(245,196,81,0.55); }
.reagent-entrust { color: #7fb0ff; background: rgba(96,165,250,0.1); border: 1px solid rgba(96,165,250,0.32); }
.reagent-entrust:hover { color: #a9caff; background: rgba(96,165,250,0.18); border-color: rgba(96,165,250,0.55); }

/* 分子卡上「无供应商 → 委托找货」（替换原来的「供应商 · 0」按钮，整宽） */
.mol-sup-entrust {
    width: 100%;
    padding: 4px 0;
    font-size: 10px;
    border-radius: 8px;
    color: #7fb0ff;
    background: rgba(96,165,250,0.08);
    border: 1px solid rgba(96,165,250,0.3);
}
.mol-sup-entrust:hover { color: #a9caff; background: rgba(96,165,250,0.16); border-color: rgba(96,165,250,0.5); }

/* ─── 兼容性：常见反应条件 & 可能不兼容基团（快速正合成页，试剂下方）─── */
.rxn-incompat {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.rxn-incompat-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 14px;
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    color: #f0a868;
    background: rgba(240,140,60,0.08);
    border: 1px solid rgba(240,140,60,0.32);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.rxn-incompat-toggle:hover { color: #ffc089; border-color: rgba(240,140,60,0.6); background: rgba(240,140,60,0.16); }
.rxn-incompat-caret { font-size: 9px; transition: transform 0.15s ease; }
.rxn-incompat.collapsed .rxn-incompat-caret { transform: rotate(-90deg); }
.rxn-incompat.collapsed .rxn-incompat-body { display: none; }

.rxn-incompat-body { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.incompat-hint { font-size: 11px; color: #6b7a99; text-align: center; padding: 4px 0; }

/* 每个「条件 + 其不兼容基团」是一个整体，整宽一行 */
.incompat-cond {
    width: 100%;
    padding: 8px 11px;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-left: 3px solid rgba(240,140,60,0.6);
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.incompat-cond-name { font-size: 11px; font-weight: 600; color: #e6ebf5; font-family: 'Geist Mono', monospace; }
.incompat-clean { font-size: 10px; color: #5fcf9e; font-family: 'Geist Mono', monospace; }

/* 高/中/低风险高亮按钮：水平排列；点击在反应物结构图上按色高亮，再点取消 */
.incompat-hl-row { display: flex; flex-wrap: wrap; gap: 8px; }
.incompat-hl-btn {
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.7;
    white-space: nowrap;
    cursor: pointer;
    background: transparent;
    border: 1px solid;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.incompat-hl-btn.tier-high { color: #fca5a5; border-color: rgba(248,113,113,0.5); }
.incompat-hl-btn.tier-mid  { color: #fdba74; border-color: rgba(251,146,60,0.5); }
.incompat-hl-btn.tier-low  { color: #93c5fd; border-color: rgba(59,130,246,0.5); }
.incompat-hl-btn.tier-high:hover { background: rgba(248,113,113,0.14); }
.incompat-hl-btn.tier-mid:hover  { background: rgba(251,146,60,0.14); }
.incompat-hl-btn.tier-low:hover  { background: rgba(59,130,246,0.14); }
/* 选中（高亮生效中）：实心底色 + 白字 */
.incompat-hl-btn.tier-high.active { background: #ef4444; color: #fff; border-color: #ef4444; }
.incompat-hl-btn.tier-mid.active  { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.incompat-hl-btn.tier-low.active  { background: #3b82f6; color: #fff; border-color: #3b82f6; }
/* 亮色主题：未选中文字加深以保证对比 */
html.light-theme .incompat-hl-btn.tier-high { color: #dc2626; border-color: rgba(220,38,38,0.45); }
html.light-theme .incompat-hl-btn.tier-mid  { color: #d97706; border-color: rgba(217,119,6,0.45); }
html.light-theme .incompat-hl-btn.tier-low  { color: #2563eb; border-color: rgba(37,99,235,0.45); }

/* 兼容性栏未解锁：毛玻璃遮盖 + 解锁提示 */
.incompat-locked { position: relative; width: 100%; border-radius: 10px; overflow: hidden; min-height: 104px; }
.incompat-lock-skeleton {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    filter: blur(1px);
}
.incompat-lock-skeleton .ils-bar { height: 12px; border-radius: 6px; background: rgba(255,255,255,0.08); }
.incompat-lock-skeleton .ils-bar.w50 { width: 50%; }
.incompat-lock-skeleton .ils-bar.w70 { width: 70%; }
.incompat-lock-skeleton .ils-bar.w80 { width: 80%; }
.incompat-lock-skeleton .ils-bar.w90 { width: 90%; }
.incompat-lock-mask {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    padding: 12px 16px;
    background: rgba(18,20,30,0.42);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}
.incompat-lock-icon { font-size: 22px; color: #ffc089; }
.incompat-lock-text { font-size: 12px; color: #e6ebf5; line-height: 1.6; max-width: 320px; }
.incompat-lock-btn {
    padding: 5px 16px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: var(--color-primary, #6d83ff);
    border: none;
    cursor: pointer;
    transition: filter 0.15s ease;
}
.incompat-lock-btn:hover { filter: brightness(1.1); }
html.light-theme .incompat-lock-skeleton .ils-bar { background: rgba(15,23,42,0.08); }
html.light-theme .incompat-lock-mask { background: rgba(245,247,252,0.5); }
html.light-theme .incompat-lock-text { color: #1e293b; }

/* ───────────── 管制品拦截（controlled.js）───────────── */
/* 命中管制品的分子卡 / 反应卡：直接不展示 */
.ctrl-hidden { display: none !important; }

/* 危化品：不隐藏，分子卡右上角打一个醒目的红色感叹号 */
.ctrl-has-hazard { position: relative; }
.ctrl-hazard-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 5;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.22), 0 2px 6px rgba(0,0,0,0.3);
    pointer-events: auto;
    cursor: default;
    user-select: none;
}
/* 试剂卡较小，感叹号也小一号 */
.reagent-card.ctrl-has-hazard .ctrl-hazard-badge { width: 15px; height: 15px; font-size: 11px; line-height: 15px; top: 4px; right: 4px; }

/* 输入命中管制品时的红色警示弹层 */
.ctrl-mask {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(8,10,18,0.62);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.ctrl-mask.hidden { display: none; }
.ctrl-modal {
    width: min(440px, 92vw);
    background: #1b1420;
    border: 1px solid rgba(248,113,113,0.55);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 0 0 4px rgba(248,113,113,0.10);
    padding: 26px 24px 22px;
    text-align: center;
}
.ctrl-modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 36px;
    font-weight: 900;
    line-height: 56px;
    box-shadow: 0 0 0 6px rgba(239,68,68,0.18);
}
.ctrl-modal-title {
    font-size: 17px;
    font-weight: 800;
    color: #fca5a5;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}
.ctrl-modal-body {
    font-size: 13px;
    line-height: 1.7;
    color: #e6d6da;
}
.ctrl-modal-ok {
    margin-top: 20px;
    padding: 9px 26px;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
}
.ctrl-modal-ok:hover { background: #dc2626; }

/* 亮色主题 */
html.light-theme .ctrl-modal { background: #fff5f5; border-color: rgba(220,38,38,0.45); }
html.light-theme .ctrl-modal-title { color: #dc2626; }
html.light-theme .ctrl-modal-body { color: #7f1d1d; }

/* ───────────── 高级版本试用申请（trial-apply.js）───────────── */
/* 侧栏入口配色：自带颜色（不走 slate 那套），暗色暖金、亮色深琥珀都够对比 */
#trial-apply-entry { color: #fbbf24; }
#trial-apply-entry:hover { color: #fcd34d; }
html.light-theme #trial-apply-entry { color: #b45309; }
html.light-theme #trial-apply-entry:hover { color: #92400e; }

/* 试用申请弹层 */
.trial-mask {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(8,10,18,0.62);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.trial-mask.hidden { display: none; }
.trial-modal {
    position: relative;
    width: min(440px, 94vw);
    max-height: 90vh;
    overflow-y: auto;
    background: #161a24;
    border: 1px solid rgba(128,153,255,0.28);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5);
    padding: 24px 24px 22px;
}
.trial-close {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #6b7a99;
    background: transparent;
    border: none;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s ease;
}
.trial-close:hover { color: #e6ebf5; }
.trial-close .material-symbols-outlined { font-size: 20px; }
.trial-modal-head { text-align: center; margin-bottom: 18px; }
.trial-modal-ico {
    font-size: 34px;
    color: #ffcf6b;
    display: block;
    margin: 0 auto 6px;
}
.trial-modal-title { font-size: 17px; font-weight: 800; color: #e6ebf5; letter-spacing: 0.5px; }
.trial-modal-sub { font-size: 12px; color: #8b97af; margin-top: 5px; }
.trial-form { display: flex; flex-direction: column; gap: 14px; }
.trial-field { display: flex; flex-direction: column; gap: 6px; }
.trial-label { font-size: 12px; font-weight: 600; color: #c2cbe0; letter-spacing: 0.2px; }

/* 输入框：用 #trial-apply-mask 抬高优先级，盖过 Tailwind forms 插件给 [type=text]/textarea
   的默认白底 + 蓝色 focus ring（同为属性选择器/0,1,0，注入更晚会赢，故必须提权）。 */
#trial-apply-mask .trial-input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 13px;
    border-radius: 11px;
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.13);
    color: #e8edf7;
    font-size: 13px;
    font-family: inherit;
    line-height: 1.5;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
#trial-apply-mask .trial-input::placeholder { color: #6b7a99; opacity: 1; }
#trial-apply-mask .trial-input:hover { border-color: rgba(255,255,255,0.22); }
#trial-apply-mask .trial-input:focus {
    outline: none;
    border-color: #8099ff;
    background: rgba(128,153,255,0.09);
    box-shadow: 0 0 0 3px rgba(128,153,255,0.18);
}
#trial-apply-mask .trial-textarea { resize: vertical; min-height: 78px; }

.trial-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.trial-btn-cancel, .trial-btn-submit {
    padding: 9px 22px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: filter 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.trial-btn-cancel { background: rgba(255,255,255,0.06); color: #c2cbe0; border-color: rgba(255,255,255,0.13); }
.trial-btn-cancel:hover { background: rgba(255,255,255,0.11); }
.trial-btn-submit { background: #6d83ff; color: #fff; box-shadow: 0 4px 14px rgba(128,153,255,0.3); }
.trial-btn-submit:hover { filter: brightness(1.08); }

/* 亮色主题 */
html.light-theme .trial-modal { background: #ffffff; border-color: rgba(75,95,212,0.22); }
html.light-theme .trial-modal-title { color: #0f172a; }
html.light-theme .trial-modal-sub { color: #64748b; }
html.light-theme .trial-label { color: #334155; }
html.light-theme #trial-apply-mask .trial-input {
    background: #f5f7fb;
    border-color: rgba(15,23,42,0.14);
    color: #0f172a;
}
html.light-theme #trial-apply-mask .trial-input::placeholder { color: #94a3b8; }
html.light-theme #trial-apply-mask .trial-input:hover { border-color: rgba(15,23,42,0.24); }
html.light-theme #trial-apply-mask .trial-input:focus {
    border-color: #4b5fd4;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(75,95,212,0.15);
}
html.light-theme .trial-btn-cancel { background: #f1f5f9; color: #334155; border-color: rgba(15,23,42,0.12); }
html.light-theme .trial-btn-cancel:hover { background: #e7edf5; }

/* ───────────── 禁毒净网倡议（proposal.js）───────────── */
/* 页面右侧竖排标签：加载时展开，首次操作后收起留一条边，点边再唤出 */
.proposal-tag {
    position: fixed;
    right: 0;
    top: 80%;
    transform: translateY(-50%);
    z-index: 70;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    padding: 15px 8px 17px;
    border-radius: 14px 0 0 14px;
    background: linear-gradient(160deg, #b91c1c 0%, #dc2626 55%, #ef4444 100%);
    border: 1px solid rgba(255,255,255,0.2);
    border-right: none;
    box-shadow: -4px 6px 22px rgba(220,38,38,0.4);
    color: #fff;
    cursor: pointer;
    user-select: none;
    transition: transform 0.32s cubic-bezier(.4,0,.2,1), box-shadow 0.2s ease, filter 0.15s ease;
}
.proposal-tag:hover { filter: brightness(1.06); }
.proposal-tag-ico { font-size: 22px; color: #fff; }
/* 文字两列并排（竖排），整体更矮 */
.proposal-tag-text { display: flex; flex-direction: row; gap: 5px; }
.ptt-col {
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 2px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}
/* 收起：滑到右边只留约 16px 可点的边，内容淡出，露出向左的小箭头提示可拉出 */
.proposal-tag-grip {
    position: absolute;
    left: 1px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}
.proposal-tag.collapsed { transform: translateY(-50%) translateX(calc(100% - 16px)); }
.proposal-tag.collapsed:hover { transform: translateY(-50%) translateX(calc(100% - 22px)); }
.proposal-tag.collapsed .proposal-tag-ico,
.proposal-tag.collapsed .proposal-tag-text { opacity: 0; transition: opacity 0.18s ease; }
.proposal-tag.collapsed .proposal-tag-grip { opacity: 0.95; }

/* 弹层 */
.proposal-mask {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(8,10,18,0.66);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.proposal-mask.hidden { display: none; }
.proposal-modal {
    position: relative;
    width: min(760px, 94vw);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
}
.proposal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15,23,42,0.08);
    color: #64748b;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.proposal-close:hover { background: rgba(15,23,42,0.16); color: #0f172a; }
.proposal-close .material-symbols-outlined { font-size: 20px; }

/* 白色「纸张」：还原公文版式（黑字、宋体、居中标题、首行缩进正文、右侧落款），暗/亮主题都保持纸张观感 */
.proposal-paper {
    overflow-y: auto;
    max-height: 88vh;
    background: #ffffff;
    color: #1a1a1a;
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5);
    padding: 48px 52px 40px;
    font-family: "Songti SC", "SimSun", "STSong", "Noto Serif CJK SC", serif;
}
.proposal-loading { text-align: center; color: #94a3b8; font-size: 14px; padding: 40px 0; }
.proposal-paper .ip-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.7;
    color: #c0392b;
    margin: 0;
}
.proposal-paper .ip-title + .ip-body { margin-top: 18px; }
.proposal-paper .ip-body {
    text-align: justify;
    text-indent: 2em;
    font-size: 16px;
    line-height: 1.95;
    margin: 0 0 4px;
    color: #1a1a1a;
}
.proposal-paper .ip-sign-block { margin-top: 30px; }
.proposal-paper .ip-sign {
    text-align: right;
    font-size: 16px;
    line-height: 1.95;
    margin: 0;
    color: #1a1a1a;
}
@media (max-width: 640px) {
    .proposal-paper { padding: 32px 24px 28px; }
    .proposal-paper .ip-title { font-size: 19px; }
    .proposal-paper .ip-body, .proposal-paper .ip-sign { font-size: 15px; }
}

/* 单个分子卡 */
.mol-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 208px;
}
.mol-svg-box {
    width: 208px;
    height: 156px;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.04);
    transition: all 0.2s ease;
}
.mol-svg-box img { width: 100%; height: 100%; object-fit: contain; }
.mol-svg-box:hover { box-shadow: 0 0 22px rgba(128,153,255,0.20); }

.mol-smiles {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    color: #94a3b8;
    text-align: center;
    max-width: 208px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: break-all;
}
.mol-info {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    color: #6b7a99;
    text-align: center;
    line-height: 1.5;
}
.mol-info .label { color: #475569; margin-right: 4px; }
.mol-info .mw    { color: #fbbf24; }
.mol-info .price { color: #34d399; }
.mol-info .cas   { color: #c7d2fe; }
.mol-info .missing { color: #475569; font-style: italic; }

.mol-fav-btn {
    margin-top: 4px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 0;
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    color: #6b7a99;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.mol-fav-btn:hover {
    color: #fbaeea;
    border-color: rgba(251,174,234,0.30);
    background: rgba(251,174,234,0.05);
}
.mol-fav-btn .material-symbols-outlined { font-size: 14px; }

/* ─── 供应商广告位（卡片底部：「供应商」开关 + 默认展开的广告） ─── */
.mol-sup {
    width: 100%;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
/* 「供应商」开关按钮：和「收藏分子」同尺寸，置于其下 */
.mol-sup-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 0;
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    color: #c9a85f;
    background: rgba(245,196,81,0.06);
    border: 1px solid rgba(245,196,81,0.28);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.mol-sup-toggle:hover { color: #ffd778; border-color: rgba(245,196,81,0.55); background: rgba(245,196,81,0.12); }
.sup-caret { font-size: 9px; transition: transform 0.15s ease; }
.mol-sup.collapsed .sup-caret { transform: rotate(-90deg); }
.mol-sup.collapsed .mol-sup-ad { display: none; }
/* 没有供应商（0）时按钮走中性灰，不抢眼 */
.mol-sup.is-empty .mol-sup-toggle { color: #6b7a99; background: rgba(107,122,153,0.08); border-color: rgba(107,122,153,0.25); }
.mol-sup.is-empty .mol-sup-toggle:hover { color: #9aa7c4; background: rgba(107,122,153,0.14); border-color: rgba(107,122,153,0.4); }
.mol-sup.is-empty .mol-sup-ad { border-color: rgba(107,122,153,0.22); background: rgba(107,122,153,0.05); }
.sup-empty { font-size: 10px; color: #6b7a99; text-align: center; padding: 2px 0; }

.mol-sup-ad {
    width: 100%;
    padding: 6px 7px;
    border-radius: 9px;
    border: 1px solid rgba(245,196,81,0.22);
    background: linear-gradient(180deg, rgba(245,196,81,0.08), rgba(245,196,81,0.02));
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-family: 'Geist Mono', monospace;
}
.sup-ad-head { display: flex; align-items: center; gap: 5px; min-width: 0; }
.sup-ad-name {
    font-size: 10px;
    color: #e7d7b0;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}
a.sup-ad-name:hover { color: #ffd778; text-decoration: underline; }

/* 档位徽章：top1 顶级最亮，往下递减 */
.sup-tier {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex: none;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.6;
    white-space: nowrap;
}
/* 顶级→一级→二级 都是实心背景，亮度递减；三级(gold)/普通 用描边 */
.sup-tier.t1   { background: linear-gradient(135deg,#ffe08a,#f5a623); color: #4a2f00; box-shadow: 0 0 10px rgba(245,166,35,0.5); }
.sup-tier.t2   { background: linear-gradient(135deg,#ffd36b,#e8a13a); color: #4a2f00; }
.sup-tier.t3   { background: linear-gradient(135deg,#e6ecf5,#aab6c8); color: #1e293b; }
.sup-tier.gold { background: rgba(184,146,74,0.18); color: #c9a85f; border: 1px solid rgba(184,146,74,0.5); }
.sup-tier.plain{ background: rgba(107,122,153,0.16); color: #8a99c0; border: 1px solid rgba(107,122,153,0.35); }

.sup-ad-contact { display: flex; flex-wrap: wrap; gap: 4px; }
.sup-chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 1px 6px;
    font-family: 'Geist Mono', monospace;
    font-size: 9px;
    color: #b9c4dd;
    background: rgba(128,153,255,0.08);
    border: 1px solid rgba(128,153,255,0.18);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.sup-chip:hover { color: #cdd7ff; background: rgba(128,153,255,0.16); border-color: rgba(128,153,255,0.4); }
.sup-ad-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    padding: 2px 0;
    font-family: 'Geist Mono', monospace;
    font-size: 9px;
    color: #9aa7c4;
    background: transparent;
    border: none;
    border-top: 1px dashed rgba(245,196,81,0.22);
    cursor: pointer;
}
.sup-ad-more:hover { color: #ffd778; }

/* ─── popover：列出某分子全部供应商 ─── */
#sup-pop {
    position: fixed;
    z-index: 9999;
    width: 320px;
    max-width: calc(100vw - 16px);
    max-height: 62vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #11162a;
    border: 1px solid rgba(128,153,255,0.22);
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.55), 0 0 0 1px rgba(0,0,0,0.3);
    font-family: 'Geist Mono', monospace;
}
#sup-pop.hidden { display: none; }
.sup-pop-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #cdd7ff;
    border-bottom: 1px solid rgba(128,153,255,0.14);
    flex: none;
}
.sup-pop-close {
    display: inline-flex;
    background: transparent;
    border: none;
    color: #6b7a99;
    cursor: pointer;
    padding: 2px;
    border-radius: 6px;
}
.sup-pop-close:hover { color: #fbaeea; background: rgba(251,174,234,0.08); }
.sup-pop-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 0; }
.sup-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(128,153,255,0.07);
    border-left: 2px solid transparent;
}
.sup-row:last-child { border-bottom: none; }
.sup-row.t1   { border-left-color: #f5a623; background: rgba(245,166,35,0.05); }
.sup-row.t2   { border-left-color: #f5c451; }
.sup-row.t3   { border-left-color: #cbd5e1; }
.sup-row.gold { border-left-color: #b8924a; }
.sup-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.sup-name { font-size: 11px; color: #e2e8f0; text-decoration: none; word-break: break-all; }
a.sup-name:hover { color: #8099ff; text-decoration: underline; }
.sup-meta { display: flex; flex-wrap: wrap; gap: 4px; }
.sup-pc {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    font-size: 9px;
    color: #6b7a99;
    background: rgba(107,122,153,0.1);
    border-radius: 6px;
}
.sup-pop-foot { padding: 6px 12px; font-size: 9px; color: #6b7a99; text-align: center; border-top: 1px solid rgba(128,153,255,0.1); }

/* 移动端：popover 转底部抽屉 */
#sup-pop.as-sheet {
    left: 0 !important;
    right: 0;
    bottom: 0;
    top: auto !important;
    width: 100%;
    max-width: 100%;
    max-height: 72vh;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
}

/* 反应索引 + smiles 头 */
.reaction-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.reaction-index-pill {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: #fbaeea;
}
.reaction-smiles-pill {
    flex: 1;
    min-width: 0;
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    color: #94a3b8;
    background: rgba(11,19,38,0.6);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 6px 10px;
    border-radius: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.reaction-copy-btn {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
    transition: all 0.2s ease;
}
.reaction-copy-btn:hover { color: #8099FF; border-color: rgba(128,153,255,0.30); }

/* 反应头右侧操作按钮：参考反应 / 反应条件 / 收藏反应（带文字的胶囊按钮）*/
.reaction-action-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    padding: 0 10px;
    border-radius: 6px;
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    white-space: nowrap;
    color: #94a3b8;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
    transition: all 0.2s ease;
}
.reaction-action-btn .material-symbols-outlined { font-size: 14px; }
.reaction-ref-btn:hover  { color: #8099FF; border-color: rgba(128,153,255,0.30); background: rgba(128,153,255,0.06); }
.reaction-cond-btn:hover { color: #5eead4; border-color: rgba(94,234,212,0.30);  background: rgba(94,234,212,0.06); }
.reaction-fav-btn:hover  { color: #fbaeea; border-color: rgba(251,174,234,0.30); background: rgba(251,174,234,0.06); }
/* 已收藏：实心粉色心 */
.reaction-fav-btn.faved {
    color: #fbaeea;
    border-color: rgba(251,174,234,0.35);
    background: rgba(251,174,234,0.10);
}
.reaction-fav-btn.faved .material-symbols-outlined { font-variation-settings: 'FILL' 1; }

/* 分子卡收藏按钮的已收藏态 */
.mol-fav-btn.faved {
    color: #fbaeea;
    border-color: rgba(251,174,234,0.30);
    background: rgba(251,174,234,0.08);
}
.mol-fav-btn.faved .material-symbols-outlined { font-variation-settings: 'FILL' 1; }

/* ═══════════════════════════════════════════════════════════════
 *   收藏清单页
 * ═══════════════════════════════════════════════════════════════ */
.fav-tab-btn {
    color: #6b7a99;
    border: 1px solid transparent;
}
.fav-tab-btn:hover { color: #cbd5e1; }
.fav-tab-btn.active {
    color: #fbaeea;
    background: rgba(251,174,234,0.10);
    border-color: rgba(251,174,234,0.30);
}
.fav-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 10px;
    border-radius: 9px;
    background: rgba(255,255,255,0.06);
    color: inherit;
}
.fav-time {
    flex-shrink: 0;
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    color: #475569;
    white-space: nowrap;
}
.fav-del-btn {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
    transition: all 0.2s ease;
}
.fav-del-btn:hover { color: #f87171; border-color: rgba(248,113,113,0.35); background: rgba(248,113,113,0.08); }
/* 收藏清单页里分子卡不再显示「添加收藏」按钮（卡片本身就是收藏项）*/
.fav-card-mol { max-width: 200px; }

/* 各功能页「今日剩余」徽章：次数用完时变红提示 */
.js-quota-badge.quota-empty {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.4);
}

/* ═══════════════════════════════════════════════════════════════
 *   图片识别预览 / Ketcher 面板
 * ═══════════════════════════════════════════════════════════════ */
.drop-zone {
    border: 2px dashed rgba(251,174,234,0.20);
    transition: all 0.25s ease;
    cursor: pointer;
}
.drop-zone:hover { border-color: rgba(251,174,234,0.50); background: rgba(251,174,234,0.03); }

.recognize-item {
    margin-top: 8px;
    padding: 10px 12px;
    background: rgba(11,19,38,0.6);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px;
    transition: all 0.2s ease;
}
.recognize-item.selectable { cursor: pointer; }
.recognize-item.selectable:hover { border-color: rgba(128,153,255,0.30); }
.recognize-item-label {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    color: #8099FF;
    margin-bottom: 4px;
}
.recognize-item-smiles {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    color: #cbd5e1;
    word-break: break-all;
}

/* ═══════════════════════════════════════════════════════════════
 *   分页控件
 * ═══════════════════════════════════════════════════════════════ */
.pager-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    color: #94a3b8;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pager-btn:hover:not(:disabled) {
    color: #8099FF;
    border-color: rgba(128,153,255,0.30);
    background: rgba(128,153,255,0.06);
}
.pager-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.pager-btn.active {
    background: #8099FF;
    color: #0b1326;
    border-color: #8099FF;
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════
 *   占位页（其他 5 个 section 共用样式）
 * ═══════════════════════════════════════════════════════════════ */
.placeholder-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 16px;
    text-align: center;
}
.placeholder-page .ph-icon {
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(128,153,255,0.10), rgba(251,174,234,0.06));
    border: 1px solid rgba(128,153,255,0.20);
    box-shadow: 0 0 40px rgba(128,153,255,0.10);
}
.placeholder-page .ph-icon .material-symbols-outlined {
    font-size: 48px;
    color: #8099FF;
}
.placeholder-page .ph-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: #cbd5e1;
}
.placeholder-page .ph-hint {
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    color: #6b7a99;
    max-width: 480px;
    line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════════════
 *   Chemeye 页：上方 tab 切换（图片 / PDF）
 * ═══════════════════════════════════════════════════════════════ */
.chemeye-tab {
    color: #6b7a99;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
}
.chemeye-tab:hover { color: #c7d2fe; }
.chemeye-tab.active {
    color: #ffffff;
    background: rgba(128,153,255,0.16);
    border-color: rgba(128,153,255,0.35);
    box-shadow: 0 0 14px rgba(128,153,255,0.18);
}
.chemeye-tab .material-symbols-outlined { font-size: 16px; }

/* PDF 单页分组标题（识别结果区） */
.chemeye-page-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(15,23,42,0.55);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    color: #c7d2fe;
}
.chemeye-page-group-head .meta { color: #6b7a99; font-size: 10px; }
.chemeye-page-empty {
    padding: 12px 14px;
    background: rgba(15,23,42,0.35);
    border: 1px dashed rgba(255,255,255,0.08);
    border-radius: 10px;
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    color: #6b7a99;
    text-align: center;
}
.chemeye-page-error {
    padding: 10px 14px;
    background: rgba(239,68,68,0.10);
    border: 1px solid rgba(239,68,68,0.30);
    border-radius: 10px;
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    color: #fca5a5;
}

/* ═══════════════════════════════════════════════════════════════
 *   分子库（上传分子 / 分子库）：中等卡 + 详情弹窗
 * ═══════════════════════════════════════════════════════════════ */

/* 网格：自适应，最少 1 列、最多 3 列（中等卡 ≈ 400px） */
.lib-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
}

/* 中等卡：左 SVG（160）+ 右字段表，整体可自适应 */
.lib-card {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 16px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(19,27,46,0.85), rgba(11,19,38,0.85));
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    transition: all 0.25s ease;
}
.lib-card:hover {
    border-color: rgba(128,153,255,0.30);
    box-shadow: 0 0 24px rgba(128,153,255,0.10);
}
.lib-card-svg-box {
    width: 160px;
    height: 160px;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.05);
}
.lib-card-svg-box img { width: 100%; height: 100%; object-fit: contain; }
.lib-card-svg-empty {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    color: #94a3b8;
}

.lib-card-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.lib-card-row {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 8px;
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    line-height: 1.5;
    align-items: start;
}
.lib-card-key {
    color: #6b7a99;
    text-align: right;
    padding-top: 1px;
}
.lib-card-val {
    color: #cbd5e1;
    word-break: break-word;
    /* 长字段最多两行省略 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.lib-card-smiles {
    color: #c7d2fe;
    word-break: break-all;       /* SMILES：硬换行，不截断 */
    line-height: 1.4;
}

.lib-card-actions {
    margin-top: auto;
    display: flex;
    gap: 6px;
    padding-top: 6px;
}
.lib-card-detail-btn,
.lib-card-fav-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 0;
    font-family: 'Geist Mono', monospace;
    font-size: 10.5px;
    color: #94a3b8;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.lib-card-detail-btn:hover {
    color: #8099FF;
    border-color: rgba(128,153,255,0.30);
    background: rgba(128,153,255,0.05);
}
.lib-card-detail-btn .material-symbols-outlined,
.lib-card-fav-btn .material-symbols-outlined { font-size: 14px; }

/* 上传状态条 */
.lib-status-loading {
    background: rgba(128,153,255,0.10);
    border: 1px solid rgba(128,153,255,0.30);
    color: #c7d2fe;
}
.lib-status-success {
    background: rgba(52,211,153,0.10);
    border: 1px solid rgba(52,211,153,0.30);
    color: #a7f3d0;
}
.lib-status-error {
    background: rgba(248,113,113,0.10);
    border: 1px solid rgba(248,113,113,0.30);
    color: #fda4af;
}

/* ── 详情弹窗 ─────────────────────────────────────────────── */
.lib-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.lib-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(4px);
}
.lib-modal-panel {
    position: relative;
    width: min(720px, 100%);
    max-height: 88vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(19,27,46,0.98), rgba(11,19,38,0.98));
    border: 1px solid rgba(128,153,255,0.35);
    box-shadow: 0 24px 60px rgba(0,0,0,0.6), 0 0 40px rgba(128,153,255,0.18);
    border-radius: 16px;
}
.lib-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.lib-modal-close {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 8px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
}
.lib-modal-close:hover { color: #8099FF; border-color: rgba(128,153,255,0.30); }
.lib-modal-close .material-symbols-outlined { font-size: 18px; }

.lib-modal-body {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
    padding: 18px;
    overflow-y: auto;
}
.lib-modal-svg {
    width: 220px;
    height: 220px;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}
.lib-modal-svg img { width: 100%; height: 100%; object-fit: contain; }

.lib-modal-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
}
.lib-modal-field {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 10px;
    font-family: 'Geist Mono', monospace;
    font-size: 11.5px;
    line-height: 1.55;
}
.lib-modal-field dt {
    color: #6b7a99;
    text-align: right;
    padding-top: 2px;
}
.lib-modal-field dd {
    color: #cbd5e1;
    margin: 0;
    word-break: break-word;
}
.lib-modal-field dd.is-smiles {
    color: #c7d2fe;
    word-break: break-all;
    background: rgba(11,19,38,0.6);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 4px 8px;
    border-radius: 6px;
}

/* 移动端：卡片改单列、弹窗内容堆叠 */
@media (max-width: 640px) {
    .lib-card { grid-template-columns: 1fr; }
    .lib-card-svg-box { width: 100%; height: 200px; }
    .lib-modal-body { grid-template-columns: 1fr; }
    .lib-modal-svg { width: 100%; height: 200px; }
}

/* ═══════════════════════════════════════════════════════════════
 *   响应式
 * ═══════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
    #sidebar {
        width: 240px;
        transform: translateX(-100%);
    }
    #sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 12px 0 48px rgba(0,0,0,0.6);
    }
    #sidebar.collapsed { width: 240px; }
    #sidebar.collapsed .nav-label,
    #sidebar.collapsed .nav-label-block { display: revert; }
    #main-content, #icp-footer { margin-left: 0 !important; }
    #header { left: 0 !important; }
}
@media (pointer: coarse) { button { min-height: 38px; } }

/* 键盘焦点可见 */
*:focus-visible { outline: 2px solid #8099FF !important; outline-offset: 2px; border-radius: 3px; }

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
 *   样式化悬浮卡片（.hx-tip + .hx-tip-pop）—— 替代丑陋的原生 title，
 *   分标题 / 说明 / 高级·普通两栏 / 脚注，排版清爽。
 * ═══════════════════════════════════════════════════════════════ */
.hx-tip { position: relative; }
.hx-tip-pop {
    position: absolute;
    top: calc(100% + 11px);
    right: 0;
    width: 300px;
    text-align: left;
    background: #131b2e;
    border: 1px solid rgba(128,153,255,0.30);
    border-radius: 14px;
    padding: 14px 15px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.97);
    transform-origin: top right;
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
    z-index: 200;
    pointer-events: none;
}
.hx-tip-pop::before {           /* 小箭头 */
    content: "";
    position: absolute;
    top: -6px; right: 14px;
    width: 10px; height: 10px;
    background: #131b2e;
    border-left: 1px solid rgba(128,153,255,0.30);
    border-top: 1px solid rgba(128,153,255,0.30);
    transform: rotate(45deg);
}
.hx-tip:hover .hx-tip-pop,
.hx-tip:focus-within .hx-tip-pop { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.hx-tip-title {
    display: flex; align-items: center; gap: 6px;
    font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 13px;
    color: #ffffff; margin-bottom: 5px;
}
.hx-tip-title .material-symbols-outlined { color: #fbaeea; }
.hx-tip-sub { font-size: 11px; color: #aab4c8; line-height: 1.6; margin-bottom: 8px; }
.hx-tip-sub b { color: #fbaeea; font-weight: 700; }
.hx-tip-row { padding: 8px 0; border-top: 1px solid rgba(255,255,255,0.08); }
.hx-tip-tag {
    display: inline-block; font-size: 10px; font-weight: 700;
    padding: 1px 9px; border-radius: 999px; margin-bottom: 5px;
}
.hx-tip-tag.adv  { background: rgba(128,153,255,0.16); color: #aebbff; border: 1px solid rgba(128,153,255,0.30); }
.hx-tip-tag.norm { background: rgba(251,174,234,0.14); color: #fbaeea; border: 1px solid rgba(251,174,234,0.30); }
.hx-tip-names { display: block; font-size: 10.5px; color: #8b97af; line-height: 1.5; margin: 1px 0 3px; }
.hx-tip-num   { display: block; font-family: 'Geist Mono', monospace; font-size: 11px; color: #dbe2f3; font-weight: 600; }
.hx-tip-foot  { margin-top: 9px; padding-top: 9px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 10px; color: #6b7a99; }

/* ═══════════════════════════════════════════════════════════════
 *   分子卡片右键菜单（.mol-ctx-menu）—— 全站通用，js/mol-context-menu.js 注入
 * ═══════════════════════════════════════════════════════════════ */
.mol-ctx-menu {
    position: fixed;
    z-index: 1000;
    min-width: 196px;
    background: #131b2e;
    border: 1px solid rgba(128,153,255,0.30);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.55);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.97);
    transform-origin: top left;
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
    pointer-events: none;
}
.mol-ctx-menu.open { opacity: 1; visibility: visible; transform: scale(1); pointer-events: auto; }
.mol-ctx-title {
    font-family: 'Space Grotesk', sans-serif; font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.12em;
    color: #6b7a99; padding: 5px 9px 6px;
}
.mol-ctx-item {
    display: flex; align-items: center; gap: 9px; width: 100%;
    padding: 9px 10px; border-radius: 8px;
    font-family: 'Space Grotesk', sans-serif; font-size: 13px; font-weight: 600;
    color: #dbe2f3; background: transparent; border: 0; cursor: pointer;
    text-align: left; transition: background 0.12s ease, color 0.12s ease;
}
.mol-ctx-item:hover { background: rgba(128,153,255,0.16); color: #ffffff; }
.mol-ctx-item .material-symbols-outlined { font-size: 18px; color: #8099ff; }
.mol-ctx-item:hover .material-symbols-outlined { color: #aebbff; }
.mol-ctx-foot {
    margin-top: 4px; padding: 6px 9px 3px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 10px; color: #6b7a99; line-height: 1.4;
}
html.light-theme .mol-ctx-menu { background: #ffffff; border-color: rgba(75,95,212,0.28); box-shadow: 0 16px 40px rgba(15,23,42,0.18); }
html.light-theme .mol-ctx-title { color: #94a3b8; }
html.light-theme .mol-ctx-item { color: #1e293b; }
html.light-theme .mol-ctx-item:hover { background: rgba(75,95,212,0.10); color: #0f172a; }
html.light-theme .mol-ctx-item .material-symbols-outlined { color: #4b5fd4; }
html.light-theme .mol-ctx-foot { color: #94a3b8; border-top-color: rgba(15,23,42,0.08); }

/* ═══════════════════════════════════════════════════════════════
 *   亮色主题（html.light-theme）—— 覆盖暗色 token / 字面色 / 组件
 *   首屏由 config.js 在样式表加载前打上 .light-theme（避免闪黑底）。
 * ═══════════════════════════════════════════════════════════════ */
html.light-theme body { background: #f5f7fb !important; color: #0f172a !important; }

/* —— 命名 token（tailwind.config 里定义的）—— */
html.light-theme .bg-surface          { background-color: #f5f7fb !important; }
html.light-theme .bg-surface\/80      { background-color: rgba(255,255,255,0.88) !important; }
html.light-theme .bg-surface-card     { background-color: #ffffff !important; }
html.light-theme .bg-surface-side     { background-color: #eef1f7 !important; }
html.light-theme .bg-surface-high     { background-color: #f1f5f9 !important; }
html.light-theme .text-primary        { color: #4b5fd4 !important; }
html.light-theme .text-primary\/30    { color: rgba(75,95,212,0.45) !important; }
html.light-theme .bg-primary          { background-color: #4b5fd4 !important; }
html.light-theme .bg-primary\/5       { background-color: rgba(75,95,212,0.07) !important; }
html.light-theme .bg-primary\/10      { background-color: rgba(75,95,212,0.12) !important; }
html.light-theme .bg-primary\/15      { background-color: rgba(75,95,212,0.16) !important; }
html.light-theme .bg-primary\/30      { background-color: rgba(75,95,212,0.26) !important; }
html.light-theme .border-primary\/15  { border-color: rgba(75,95,212,0.22) !important; }
html.light-theme .border-primary\/20  { border-color: rgba(75,95,212,0.30) !important; }
html.light-theme .border-primary\/30  { border-color: rgba(75,95,212,0.40) !important; }
html.light-theme .border-primary\/40  { border-color: rgba(75,95,212,0.50) !important; }
html.light-theme .border-primary\/50  { border-color: rgba(75,95,212,0.60) !important; }
html.light-theme .text-secondary      { color: #d946ef !important; }
html.light-theme .text-secondary\/40  { color: rgba(217,70,239,0.55) !important; }
html.light-theme .text-secondary\/70  { color: rgba(217,70,239,0.82) !important; }
html.light-theme .border-secondary\/20 { border-color: rgba(217,70,239,0.30) !important; }

/* —— slate 文字（暗底浅字 → 亮底深字）—— */
html.light-theme .text-slate-200      { color: #0f172a !important; }
html.light-theme .text-slate-300      { color: #1e293b !important; }
html.light-theme .text-slate-400      { color: #334155 !important; }
html.light-theme .text-slate-500      { color: #3b4658 !important; }
html.light-theme .text-slate-600      { color: #4a5568 !important; }
html.light-theme .text-slate-700      { color: #5c6878 !important; }
html.light-theme .text-white          { color: #0f172a !important; }

/* —— white/black 半透明 —— */
html.light-theme .bg-white\/5         { background-color: rgba(15,23,42,0.04) !important; }
html.light-theme .border-white\/5     { border-color: rgba(15,23,42,0.12) !important; }
html.light-theme .border-white\/10    { border-color: rgba(15,23,42,0.16) !important; }
html.light-theme .bg-black\/50        { background-color: rgba(15,23,42,0.35) !important; }
html.light-theme .bg-black\/70        { background-color: rgba(15,23,42,0.5) !important; }

/* —— 字面 hex —— */
html.light-theme .bg-\[\#0b1326\]        { background-color: #f5f7fb !important; }
html.light-theme .bg-\[\#0b1326\]\/50    { background-color: rgba(245,247,251,0.6) !important; }
html.light-theme .bg-\[\#131b2e\]        { background-color: #ffffff !important; }
html.light-theme .bg-\[\#1a1430\]        { background-color: #fff5fb !important; }   /* 邀请卡 */
html.light-theme .bg-\[\#8099FF\]        { background-color: #4b5fd4 !important; }
html.light-theme .bg-\[\#8099FF\]\/5     { background-color: rgba(75,95,212,0.07) !important; }
html.light-theme .bg-\[\#8099FF\]\/10    { background-color: rgba(75,95,212,0.12) !important; }
html.light-theme .bg-\[\#8099FF\]\/15    { background-color: rgba(75,95,212,0.16) !important; }
html.light-theme .text-\[\#8099FF\]      { color: #4b5fd4 !important; }
html.light-theme .border-\[\#8099FF\]    { border-color: #4b5fd4 !important; }
html.light-theme .border-\[\#8099FF\]\/20 { border-color: rgba(75,95,212,0.30) !important; }
html.light-theme .border-\[\#8099FF\]\/30 { border-color: rgba(75,95,212,0.40) !important; }
html.light-theme .border-\[\#8099FF\]\/40 { border-color: rgba(75,95,212,0.50) !important; }
html.light-theme .border-\[\#8099FF\]\/50 { border-color: rgba(75,95,212,0.60) !important; }
html.light-theme .border-\[\#8099FF\]\/60 { border-color: rgba(75,95,212,0.70) !important; }
html.light-theme .text-\[\#fbaeea\]      { color: #d946ef !important; }
html.light-theme .text-\[\#fbaeea\]\/80  { color: rgba(217,70,239,0.85) !important; }
html.light-theme .bg-\[\#fbaeea\]\/5     { background-color: rgba(217,70,239,0.06) !important; }
html.light-theme .bg-\[\#fbaeea\]\/10    { background-color: rgba(217,70,239,0.10) !important; }
html.light-theme .bg-\[\#fbaeea\]\/20    { background-color: rgba(217,70,239,0.18) !important; }
html.light-theme .border-\[\#fbaeea\]\/30 { border-color: rgba(217,70,239,0.40) !important; }
html.light-theme .border-\[\#fbaeea\]\/40 { border-color: rgba(217,70,239,0.50) !important; }
html.light-theme .border-\[\#fbaeea\]\/60 { border-color: rgba(217,70,239,0.65) !important; }

/* —— hover 变体 —— */
html.light-theme .hover\:text-primary:hover      { color: #4b5fd4 !important; }
html.light-theme .hover\:text-white:hover        { color: #0f172a !important; }
html.light-theme .hover\:text-slate-200:hover    { color: #0f172a !important; }
html.light-theme .hover\:text-slate-300:hover    { color: #1e293b !important; }
html.light-theme .hover\:text-\[\#8099FF\]:hover { color: #4b5fd4 !important; }
html.light-theme .hover\:text-\[\#fbaeea\]:hover { color: #d946ef !important; }
html.light-theme .hover\:text-\[\#fbaeea\]\/80:hover { color: rgba(217,70,239,0.85) !important; }
html.light-theme .hover\:bg-primary\/10:hover    { background-color: rgba(75,95,212,0.12) !important; }
html.light-theme .hover\:bg-surface-card:hover   { background-color: rgba(75,95,212,0.07) !important; }
html.light-theme .hover\:bg-\[\#8099FF\]\/10:hover { background-color: rgba(75,95,212,0.12) !important; }
html.light-theme .hover\:bg-\[\#fbaeea\]\/10:hover { background-color: rgba(217,70,239,0.12) !important; }
html.light-theme .hover\:bg-\[\#fbaeea\]\/20:hover { background-color: rgba(217,70,239,0.20) !important; }
html.light-theme .hover\:border-primary\/30:hover  { border-color: rgba(75,95,212,0.40) !important; }
html.light-theme .hover\:border-\[\#8099FF\]\/20:hover { border-color: rgba(75,95,212,0.30) !important; }
html.light-theme .hover\:border-\[\#8099FF\]\/30:hover { border-color: rgba(75,95,212,0.40) !important; }
html.light-theme .hover\:border-\[\#fbaeea\]\/40:hover { border-color: rgba(217,70,239,0.50) !important; }
/* 危险/退出色在亮底保持可读 */
html.light-theme .text-red-400           { color: #dc2626 !important; }
html.light-theme .hover\:text-red-400:hover { color: #dc2626 !important; }

/* —— 选区 —— */
html.light-theme ::selection { background-color: rgba(75,95,212,0.22) !important; color: #0f172a !important; }

/* —— 大阴影 / 发光：亮底收敛或转蓝 —— */
html.light-theme .shadow-\[0_0_40px_rgba\(128\,153\,255\,0\.1\)\]  { box-shadow: 0 1px 12px rgba(75,95,212,0.08) !important; }
html.light-theme .shadow-\[4px_0_15px_rgba\(0\,0\,0\,0\.5\)\]      { box-shadow: 4px 0 12px rgba(75,95,212,0.06) !important; }
html.light-theme .shadow-\[0_10px_40px_rgba\(0\,0\,0\,0\.5\)\]     { box-shadow: 0 10px 30px rgba(15,23,42,0.14) !important; }
html.light-theme .shadow-\[0_8px_32px_rgba\(128\,153\,255\,0\.25\)\] { box-shadow: 0 8px 24px rgba(75,95,212,0.16) !important; }
html.light-theme .shadow-\[0_0_30px_rgba\(251\,174\,234\,0\.12\)\] { box-shadow: 0 4px 20px rgba(217,70,239,0.12) !important; }
html.light-theme .drop-shadow-\[0_0_8px_rgba\(128\,153\,255\,0\.5\)\] { filter: drop-shadow(0 0 5px rgba(75,95,212,0.25)) !important; }
html.light-theme .drop-shadow-\[0_0_10px_rgba\(128\,153\,255\,0\.4\)\] { filter: drop-shadow(0 0 5px rgba(75,95,212,0.22)) !important; }
html.light-theme .drop-shadow-\[0_0_10px_rgba\(128\,153\,255\,0\.35\)\] { filter: drop-shadow(0 0 5px rgba(75,95,212,0.20)) !important; }

/* —— 组件级 —— */
html.light-theme .grid-texture {
    background-color: transparent !important;
    background-image:
        radial-gradient(900px 420px at 50% -8%, rgba(75,95,212,0.10), transparent 72%),
        radial-gradient(rgba(75,95,212,0.10) 1px, transparent 1px) !important;
    background-size: 100% 100%, 24px 24px !important;
    background-repeat: no-repeat, repeat !important;
}
html.light-theme .glow-border        { border-color: rgba(75,95,212,0.18) !important; }
html.light-theme .glow-border:hover  { border-color: rgba(75,95,212,0.40) !important; box-shadow: 0 6px 22px rgba(75,95,212,0.12) !important; }
html.light-theme ::-webkit-scrollbar-track { background: #eef1f7 !important; }
html.light-theme ::-webkit-scrollbar-thumb { background: rgba(75,95,212,0.28) !important; }
html.light-theme ::-webkit-scrollbar-thumb:hover { background: rgba(75,95,212,0.5) !important; }
/* 侧栏选中态：白底 + 深蓝字 + 阴影，浅蓝 sidebar 上更清晰 */
html.light-theme .nav-item.active {
    color: #4b5fd4 !important;
    background: linear-gradient(90deg, rgba(75,95,212,0.16), rgba(75,95,212,0.04)) !important;
    box-shadow: inset 3px 0 0 #4b5fd4 !important;
}
html.light-theme .mode-toggle-btn        { color: #5a6478 !important; }
html.light-theme .mode-toggle-en         { color: #94a3b8 !important; }
html.light-theme .nav-common-divider     { box-shadow: 0 0 6px rgba(75,95,212,0.25) !important; }
/* 卡片：暗渐变 → 白底 + 立体阴影 */
html.light-theme .step-card,
html.light-theme .reaction-card {
    background: #ffffff !important;
    border-color: rgba(75,95,212,0.15) !important;
    box-shadow: 0 1px 3px rgba(15,23,42,0.06), 0 8px 22px rgba(15,23,42,0.05) !important;
}
html.light-theme .reaction-card:hover { border-color: rgba(75,95,212,0.40) !important; box-shadow: 0 6px 24px rgba(75,95,212,0.12) !important; }
html.light-theme .recognize-item { background: #f8fafc !important; border-color: rgba(15,23,42,0.08) !important; }
html.light-theme .recognize-item-smiles { color: #334155 !important; }
html.light-theme .pager-btn { color: #64748b !important; background: rgba(15,23,42,0.04) !important; border-color: rgba(15,23,42,0.12) !important; }
html.light-theme .pager-btn:hover:not(:disabled) { color: #4b5fd4 !important; border-color: rgba(75,95,212,0.4) !important; background: rgba(75,95,212,0.08) !important; }
html.light-theme .pager-btn.active { background: #4b5fd4 !important; color: #ffffff !important; border-color: #4b5fd4 !important; }
html.light-theme .drop-zone { border-color: rgba(217,70,239,0.30) !important; }
html.light-theme .drop-zone:hover { border-color: rgba(217,70,239,0.55) !important; background: rgba(217,70,239,0.04) !important; }
html.light-theme .placeholder-page .ph-title { color: #1e293b !important; }
html.light-theme .placeholder-page .ph-hint  { color: #64748b !important; }
html.light-theme .placeholder-page .ph-icon  { box-shadow: 0 4px 20px rgba(75,95,212,0.10) !important; }
/* mol-svg-box 在两个主题下都保持白底（分子结构图本身是黑线白底），不覆盖 */

/* —— stepper 各状态卡片：暗底 → 浅色 tint + 深字（亮色下也清晰）—— */
html.light-theme .step-node.status-active .step-indicator { background: radial-gradient(circle at center, rgba(75,95,212,0.22), #ffffff 70%) !important; }
html.light-theme .step-node.status-active .step-card  { background: linear-gradient(135deg, rgba(75,95,212,0.10), #ffffff) !important; }
html.light-theme .step-node.status-active .step-card-title    { color: #3b4fc4 !important; }
html.light-theme .step-node.status-active .step-card-subtitle { color: #5b6b9a !important; }
html.light-theme .step-node.status-done .step-card   { background: linear-gradient(135deg, rgba(16,185,129,0.12), #ffffff) !important; }
html.light-theme .step-node.status-done .step-card-title      { color: #047857 !important; }
html.light-theme .step-node.status-done .step-card-subtitle   { color: #059669 !important; }
html.light-theme .step-node.status-failed .step-card { background: linear-gradient(135deg, rgba(239,68,68,0.10), #ffffff) !important; }
html.light-theme .step-node.status-failed .step-card-title    { color: #b91c1c !important; }
html.light-theme .step-node.status-failed .step-card-subtitle { color: #dc2626 !important; }
html.light-theme .step-node.status-stopped .step-card { background: linear-gradient(135deg, rgba(245,158,11,0.12), #ffffff) !important; }
html.light-theme .step-node.status-stopped .step-card-title    { color: #b45309 !important; }
html.light-theme .step-node.status-stopped .step-card-subtitle { color: #d97706 !important; }
html.light-theme .step-node.status-pending .step-card-title    { color: #64748b !important; }

/* —— 左上 4 个功能模块卡（mode-toggle 容器 + 图标盒）：暗底 → 浅底 —— */
html.light-theme .mode-toggle {
    background: rgba(75,95,212,0.05) !important;
    border-color: rgba(75,95,212,0.15) !important;
    box-shadow: inset 0 1px 2px rgba(75,95,212,0.06) !important;
}
html.light-theme .mode-toggle-icon { background: rgba(75,95,212,0.07) !important; border-color: rgba(75,95,212,0.14) !important; }
html.light-theme .mode-toggle-btn  { color: #5a6478 !important; }
html.light-theme .mode-toggle-en   { color: #94a3b8 !important; }
html.light-theme .mode-toggle-btn:hover:not(.active) { color: #334155 !important; background: rgba(255,255,255,0.7) !important; }

/* —— 自动分析进度：标号 1/2/3 圆圈（pending）+ 连接线 + 进度条底 —— */
html.light-theme .step-indicator {
    background: #ffffff !important;
    border-color: rgba(75,95,212,0.30) !important;
    color: #64748b !important;
}
html.light-theme .step-connector { background: linear-gradient(180deg, rgba(75,95,212,0.25), rgba(75,95,212,0.08)) !important; }
html.light-theme .synth-progress { background: rgba(75,95,212,0.08) !important; }

/* —— SMILES 文本展示框：暗底 → 浅底深字 —— */
html.light-theme .reaction-smiles-pill {
    background: #f1f5f9 !important;
    border-color: rgba(15,23,42,0.10) !important;
    color: #475569 !important;
}
html.light-theme .mol-smiles            { color: #64748b !important; }
html.light-theme .lib-card-smiles       { color: #3b4fc4 !important; }
html.light-theme .lib-modal-field dd.is-smiles {
    background: #f1f5f9 !important;
    border-color: rgba(15,23,42,0.10) !important;
    color: #3b4fc4 !important;
}

/* —— Chemeye PDF 分页头 / 空态：暗底 → 浅底 —— */
html.light-theme .chemeye-page-group-head { background: rgba(75,95,212,0.06) !important; }
html.light-theme .chemeye-page-empty       { background: rgba(15,23,42,0.03) !important; }

/* —— 组件里写死的浅灰文字（#cbd5e1 在白底近乎看不见、#94a3b8 偏淡）统一调深 —— */
html.light-theme .btn-ghost                 { color: #475569 !important; }
html.light-theme .fav-tab-btn:hover         { color: #0f172a !important; }
html.light-theme .lib-card-val              { color: #1e293b !important; }
html.light-theme .lib-modal-field dd        { color: #1e293b !important; }
html.light-theme .synth-progress-text       { color: #475569 !important; }
html.light-theme .reaction-copy-btn,
html.light-theme .reaction-action-btn,
html.light-theme .fav-del-btn,
html.light-theme .lib-card-fav-btn,
html.light-theme .lib-modal-close,
html.light-theme .lib-card-svg-empty        { color: #64748b !important; }

/* —— 组件里写死的白色边框（白底上会消失）统一改成浅描边 —— */
html.light-theme .btn-ghost,
html.light-theme .mol-fav-btn,
html.light-theme .mol-svg-box,
html.light-theme .reaction-copy-btn,
html.light-theme .reaction-action-btn,
html.light-theme .fav-del-btn,
html.light-theme .lib-card-fav-btn,
html.light-theme .lib-modal-close,
html.light-theme .lib-modal-head,
html.light-theme .lib-modal-svg             { border-color: rgba(15,23,42,0.14) !important; }
html.light-theme .lib-card,
html.light-theme .lib-card-svg-box          { border-color: rgba(75,95,212,0.15) !important; }
html.light-theme .lib-card { background: #ffffff !important; box-shadow: 0 1px 3px rgba(15,23,42,0.06), 0 6px 18px rgba(15,23,42,0.05) !important; }

/* —— 供应商广告 / popover 亮色适配 —— */
html.light-theme .mol-sup-ad {
    border-color: rgba(214,158,46,0.45);
    background: linear-gradient(180deg, rgba(245,196,81,0.16), rgba(245,196,81,0.05));
}
html.light-theme .mol-sup-toggle { color: #8a6a2a; background: rgba(245,196,81,0.14); border-color: rgba(214,158,46,0.45); }
html.light-theme .mol-sup-toggle:hover { color: #b8860b; background: rgba(245,196,81,0.24); }
html.light-theme .sup-ad-name { color: #8a5a00; }
html.light-theme a.sup-ad-name:hover { color: #b8860b; }
html.light-theme .sup-chip { color: #3f4b66; background: rgba(75,95,212,0.08); border-color: rgba(75,95,212,0.2); }
html.light-theme .sup-chip:hover { color: #1e293b; background: rgba(75,95,212,0.16); }
html.light-theme .sup-ad-more { color: #6b7a99; border-top-color: rgba(214,158,46,0.4); }
html.light-theme .sup-ad-more:hover { color: #b8860b; }
html.light-theme .sup-tier.t2   { color: #4a2f00; background: linear-gradient(135deg,#ffd36b,#e8a13a); border: none; }
html.light-theme .sup-tier.t3   { color: #1e293b; background: linear-gradient(135deg,#e6ecf5,#aab6c8); border: none; }
html.light-theme .sup-tier.gold { color: #8a6a2a; background: rgba(184,146,74,0.2); }
html.light-theme .sup-tier.plain{ color: #475569; background: rgba(100,116,139,0.14); }
html.light-theme .mol-sup.is-empty .mol-sup-toggle { color: #64748b; background: rgba(100,116,139,0.08); border-color: rgba(100,116,139,0.22); }
html.light-theme .sup-empty { color: #94a3b8; }
html.light-theme #sup-pop {
    background: #ffffff;
    border-color: rgba(75,95,212,0.25);
    box-shadow: 0 18px 50px rgba(15,23,42,0.18);
}
html.light-theme .sup-pop-head { color: #1e293b; border-bottom-color: rgba(15,23,42,0.1); }
html.light-theme .sup-row { border-bottom-color: rgba(15,23,42,0.06); }
html.light-theme .sup-row.t1 { background: rgba(245,166,35,0.08); }
html.light-theme .sup-name { color: #1e293b; }
html.light-theme a.sup-name:hover { color: #4b5fd4; }
html.light-theme .sup-pc { color: #64748b; background: rgba(100,116,139,0.12); }
html.light-theme .sup-pop-close { color: #94a3b8; }
html.light-theme .sup-pop-foot { color: #94a3b8; border-top-color: rgba(15,23,42,0.08); }

/* —— 反应底部试剂栏 亮色适配 —— */
html.light-theme .rxn-reagents { border-top-color: rgba(75,95,212,0.15); }
html.light-theme .rxn-reagents-toggle { color: #0d9488; background: rgba(13,148,136,0.08); border-color: rgba(13,148,136,0.3); }
html.light-theme .rxn-reagents-toggle:hover { color: #0f766e; background: rgba(13,148,136,0.16); }
html.light-theme .reagent-card { background: #ffffff; border-color: rgba(15,23,42,0.1); }
html.light-theme .reagent-name { color: #1e293b; }
html.light-theme .reagent-meta .rg-label { color: #94a3b8; }
html.light-theme .reagent-meta .rg-val { color: #475569; }
html.light-theme .reagent-empty { color: #94a3b8; }
html.light-theme .reagent-sup-loading { color: #94a3b8; }
html.light-theme .reagent-sup-btn { color: #8a6a2a; background: rgba(245,196,81,0.16); border-color: rgba(214,158,46,0.45); }
html.light-theme .reagent-sup-btn:hover { color: #b8860b; background: rgba(245,196,81,0.26); }
html.light-theme .reagent-entrust,
html.light-theme .mol-sup-entrust { color: #2563eb; background: rgba(37,99,235,0.08); border-color: rgba(37,99,235,0.3); }
html.light-theme .reagent-entrust:hover,
html.light-theme .mol-sup-entrust:hover { color: #1d4ed8; background: rgba(37,99,235,0.16); }
/* 兼容性栏 亮色适配 */
html.light-theme .rxn-incompat-toggle { color: #c2410c; background: rgba(234,88,12,0.08); border-color: rgba(234,88,12,0.32); }
html.light-theme .rxn-incompat-toggle:hover { color: #9a3412; background: rgba(234,88,12,0.16); }
html.light-theme .incompat-hint { color: #94a3b8; }
html.light-theme .incompat-cond { background: #ffffff; border-color: rgba(15,23,42,0.1); border-left-color: rgba(234,88,12,0.55); }
html.light-theme .incompat-cond-name { color: #1e293b; }
html.light-theme .incompat-clean { color: #059669; }
html.light-theme .incompat-tier.high .incompat-tier-label { color: #dc2626; background: rgba(220,38,38,0.1); border-color: rgba(220,38,38,0.35); }
html.light-theme .incompat-tier.mid  .incompat-tier-label { color: #ea580c; background: rgba(234,88,12,0.1); border-color: rgba(234,88,12,0.35); }
html.light-theme .incompat-tier.low  .incompat-tier-label { color: #b45309; background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.35); }
html.light-theme .incompat-group { color: #475569; background: rgba(15,23,42,0.04); border-color: rgba(15,23,42,0.12); }

/* —— 焦点环 / 悬浮卡片 在亮色下 —— */
html.light-theme *:focus-visible { outline-color: #4b5fd4 !important; }
html.light-theme .hx-tip-pop {
    background: #ffffff;
    border-color: rgba(75,95,212,0.28);
    box-shadow: 0 16px 40px rgba(15,23,42,0.16);
}
html.light-theme .hx-tip-pop::before { background: #ffffff; border-left-color: rgba(75,95,212,0.28); border-top-color: rgba(75,95,212,0.28); }
html.light-theme .hx-tip-title { color: #0f172a; }
html.light-theme .hx-tip-sub   { color: #475569; }
html.light-theme .hx-tip-tag.adv  { background: rgba(75,95,212,0.12); color: #4b5fd4; border-color: rgba(75,95,212,0.30); }
html.light-theme .hx-tip-tag.norm { background: rgba(217,70,239,0.10); color: #c026d3; border-color: rgba(217,70,239,0.30); }
html.light-theme .hx-tip-names { color: #64748b; }
html.light-theme .hx-tip-num   { color: #334155; }
html.light-theme .hx-tip-foot  { color: #94a3b8; border-top-color: rgba(15,23,42,0.08); }
html.light-theme .hx-tip-row   { border-top-color: rgba(15,23,42,0.08); }
html.light-theme .hx-tip-sub b { color: #c026d3; }

/* ── 平台锁定遮罩（毛玻璃「内测中」）：暗/亮主题分别适配 ──
   背景毛玻璃 veil + 中央提示卡，不能用 Tailwind 的 /opacity 变体（亮色主题不会被覆盖），
   故用独立 class 控制底色。卡内文字仍用 text-white / text-slate-* —— 已有亮色覆盖。 */
.platform-lock-veil { background: rgba(11,19,38,0.45); }
.platform-lock-card { background: rgba(19,27,46,0.92); border: 1px solid rgba(255,255,255,0.10); box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
html.light-theme .platform-lock-veil { background: rgba(226,232,240,0.55); }
html.light-theme .platform-lock-card { background: rgba(255,255,255,0.95); border-color: rgba(15,23,42,0.12); box-shadow: 0 20px 60px rgba(15,23,42,0.18); }

/* ── 识别误差提示条（反应图片 / PDF / 分子识别页通用）：暗/亮主题分别适配 ── */
.recog-notice      { background: rgba(251,191,36,0.10); border: 1px solid rgba(251,191,36,0.25); }
.recog-notice-icon { color: #fcd34d; }
.recog-notice-text { color: rgba(253,230,138,0.92); }
html.light-theme .recog-notice      { background: rgba(245,158,11,0.14); border-color: rgba(180,83,9,0.40); }
html.light-theme .recog-notice-icon { color: #b45309; }
html.light-theme .recog-notice-text { color: #92400e; }
