/* ============================================================
   #10 图片模糊处理 · 暗房灯箱设计系统（ibl-）
   冷雾蓝白 + 墨蓝 + 冰青 + 暖橙警示；浅色为默认主题
   深色由 :root[data-theme="dark"] 整套覆盖，跟随导航 #themeToggle
   ============================================================ */
.ibl-page, .ibl-modal, .ibl-toast {
    --ibl-bg: #edf4f7;
    --ibl-bg2: #e2edf2;
    --ibl-panel: #ffffff;
    --ibl-panel2: #f5fafc;
    --ibl-ink: #122c42;
    --ibl-sub: #5b7385;
    --ibl-line: #d5e4ec;
    --ibl-line2: #b9d0dd;
    --ibl-brand: #123a5c;
    --ibl-brand2: #0c2942;
    --ibl-cyan: #0aa6a6;
    --ibl-cyan-soft: #e0f5f4;
    --ibl-warn: #c2602f;
    --ibl-warn-soft: #fbece3;
    --ibl-ok: #1f7a6b;
    --ibl-shadow: 0 14px 34px rgba(18, 58, 92, .11);
    --ibl-shadow-sm: 0 4px 14px rgba(18, 58, 92, .09);
    --ibl-r: 14px;
    --ibl-font: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
}
:root[data-theme="dark"] .ibl-page,
:root[data-theme="dark"] .ibl-modal,
:root[data-theme="dark"] .ibl-toast {
    --ibl-bg: #0e1720;
    --ibl-bg2: #14212c;
    --ibl-panel: #172633;
    --ibl-panel2: #1c2e3c;
    --ibl-ink: #e5f1f8;
    --ibl-sub: #9cb6c7;
    --ibl-line: #2b4152;
    --ibl-line2: #3b586c;
    --ibl-brand: #7cc4e8;
    --ibl-brand2: #a6dcf6;
    --ibl-cyan: #4fd1cd;
    --ibl-cyan-soft: #163d40;
    --ibl-warn: #ffa978;
    --ibl-warn-soft: #3a2a21;
    --ibl-ok: #6fd3ae;
    --ibl-shadow: 0 14px 34px rgba(0, 0, 0, .34);
    --ibl-shadow-sm: 0 4px 14px rgba(0, 0, 0, .28);
}
.ibl-page {
    background: var(--ibl-bg); color: var(--ibl-ink);
    font-family: var(--ibl-font); padding: 0 0 64px; min-height: 62vh;
    font-size: 14px; line-height: 1.75;
}
.ibl-wrap { max-width: 1180px; margin: 0 auto; padding: 18px 18px 0; }
.ibl-page .detail-breadcrumb { font-size: 12.5px; color: var(--ibl-sub); margin: 8px 0 18px; }
.ibl-page .detail-breadcrumb a { color: var(--ibl-sub); text-decoration: none; }
.ibl-page .detail-breadcrumb a:hover { color: var(--ibl-cyan); }
.ibl-page .detail-breadcrumb .current { color: var(--ibl-brand); font-weight: 700; }

/* ---------- 首屏 ---------- */
.ibl-hero {
    display: grid; grid-template-columns: 1.16fr .84fr; gap: 26px;
    align-items: stretch; margin-bottom: 26px;
}
.ibl-hero-copy { padding: 4px 0; }
.ibl-kicker {
    display: inline-flex; align-items: center; gap: 9px; font-size: 11px; letter-spacing: 1.6px;
    font-weight: 800; color: var(--ibl-brand); background: var(--ibl-cyan-soft);
    border: 1px solid var(--ibl-line2); border-radius: 999px; padding: 5px 14px; margin-bottom: 14px;
}
.ibl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ibl-cyan); box-shadow: 0 0 0 4px rgba(10,166,166,.16); }
.ibl-page h1 { font-size: 39px; line-height: 1.16; letter-spacing: -.5px; font-weight: 850; margin: 0 0 12px; color: var(--ibl-ink); }
.ibl-sub { font-size: 15px; line-height: 1.95; color: var(--ibl-sub); margin: 0 0 18px; max-width: 620px; }
.ibl-sub b { color: var(--ibl-ink); font-weight: 750; }
.ibl-facts { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.ibl-fact {
    background: var(--ibl-panel); border: 1px solid var(--ibl-line); border-radius: 12px;
    padding: 10px 17px; min-width: 116px; box-shadow: var(--ibl-shadow-sm);
}
.ibl-fact b { display: block; font-size: 20px; line-height: 1.25; font-weight: 800; letter-spacing: .3px; }
.ibl-fact span { font-size: 11.5px; color: var(--ibl-sub); }
.ibl-fact-hot { border-color: var(--ibl-cyan); background: var(--ibl-cyan-soft); }
.ibl-fact-hot b { color: var(--ibl-cyan); }
.ibl-points { list-style: none; padding: 0; margin: 0; }
.ibl-points li { font-size: 12.5px; color: var(--ibl-sub); line-height: 2.05; }

/* 上传卡：灯箱外形 */
.ibl-drop {
    background: linear-gradient(160deg, var(--ibl-panel), var(--ibl-panel2));
    border: 2px dashed var(--ibl-line2); border-radius: 18px; padding: 20px 22px 22px;
    text-align: center; box-shadow: var(--ibl-shadow); display: flex; flex-direction: column;
    align-items: center; justify-content: center; transition: border-color .16s, background .16s;
    position: relative; overflow: hidden;
}
.ibl-drop::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: repeating-linear-gradient(90deg, transparent 0 38px, rgba(10,166,166,.05) 38px 39px);
}
.ibl-drop.is-over { border-color: var(--ibl-cyan); background: var(--ibl-cyan-soft); }
.ibl-drop-head { display: flex; align-items: center; gap: 8px; align-self: stretch; justify-content: flex-start;
    font-size: 10.5px; letter-spacing: 1.4px; color: var(--ibl-sub); font-weight: 700; margin-bottom: 6px; }
.ibl-drop-lens { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ibl-cyan); box-shadow: inset 0 0 0 2px var(--ibl-panel); }
.ibl-drop-icon { font-size: 42px; margin: 2px 0 6px; filter: saturate(.85); }
.ibl-drop-title { font-size: 16px; font-weight: 750; margin: 0 0 4px; }
.ibl-drop-sub { font-size: 11.5px; color: var(--ibl-sub); margin: 0 0 14px; }
.ibl-drop-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: center; position: relative; z-index: 1; }
.ibl-drop-note { font-size: 11.5px; line-height: 1.7; color: var(--ibl-sub); margin: 14px 0 0; max-width: 330px; position: relative; z-index: 1; }

/* ---------- 通用件 ---------- */
.ibl-btn {
    border: 1px solid var(--ibl-line2); background: var(--ibl-panel); color: var(--ibl-ink);
    border-radius: 10px; padding: 9px 16px; font-size: 13.5px; font-weight: 700; cursor: pointer;
    font-family: inherit; transition: transform .12s, box-shadow .12s, background .12s;
}
.ibl-btn:hover { transform: translateY(-1px); box-shadow: var(--ibl-shadow-sm); }
.ibl-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.ibl-btn-main { background: var(--ibl-brand); border-color: var(--ibl-brand2); color: #fff; }
:root[data-theme="dark"] .ibl-btn-main { color: #0d1a24; }
.ibl-btn-main:hover { background: var(--ibl-brand2); }
.ibl-mini {
    border: 1px solid var(--ibl-line2); background: var(--ibl-panel2); color: var(--ibl-sub);
    border-radius: 7px; padding: 5px 10px; font-size: 11.5px; font-weight: 650; cursor: pointer; font-family: inherit;
}
.ibl-mini:hover { color: var(--ibl-brand); border-color: var(--ibl-cyan); }
.ibl-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; flex-wrap: wrap; }
.ibl-section-head h2 { font-size: 19px; font-weight: 800; margin: 0; letter-spacing: .2px; }
.ibl-section-head h2 span { font-size: 12.5px; font-weight: 500; color: var(--ibl-sub); }
.ibl-section-tag { font-size: 11.5px; color: var(--ibl-cyan); background: var(--ibl-cyan-soft); border-radius: 999px; padding: 3px 12px; font-weight: 700; }
.ibl-card { background: var(--ibl-panel); border: 1px solid var(--ibl-line); border-radius: var(--ibl-r); box-shadow: var(--ibl-shadow-sm); padding: 16px; min-width: 0; }
.ibl-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ibl-card-head h3 { font-size: 14.5px; font-weight: 800; margin: 0; }
.ibl-badge { font-size: 11px; color: var(--ibl-sub); background: var(--ibl-panel2); border: 1px solid var(--ibl-line); border-radius: 999px; padding: 2px 10px; }
.ibl-empty { font-size: 12px; color: var(--ibl-sub); line-height: 1.8; margin: 0; }

/* ---------- 工具条 ---------- */
.ibl-toolbar {
    display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: flex-end;
    background: var(--ibl-panel); border: 1px solid var(--ibl-line); border-radius: var(--ibl-r);
    padding: 15px 18px; margin-bottom: 16px; box-shadow: var(--ibl-shadow-sm);
}
.ibl-tgroup { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ibl-tgrow { flex: 1 1 260px; }
.ibl-tlabel { font-size: 11.5px; color: var(--ibl-sub); font-weight: 650; }
.ibl-tlabel b { color: var(--ibl-cyan); font-size: 13px; }
.ibl-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.ibl-pill {
    border: 1px solid var(--ibl-line2); background: var(--ibl-panel2); color: var(--ibl-sub);
    border-radius: 8px; padding: 6px 11px; font-size: 12px; font-weight: 650; cursor: pointer; font-family: inherit;
}
.ibl-pill.is-on { background: var(--ibl-brand); border-color: var(--ibl-brand2); color: #fff; }
:root[data-theme="dark"] .ibl-pill.is-on { color: #0d1a24; }
.ibl-tgrow input[type=range] { width: 100%; accent-color: var(--ibl-cyan); margin: 0; }
.ibl-colors { display: flex; gap: 6px; }
.ibl-color { width: 25px; height: 25px; border-radius: 7px; border: 2px solid var(--ibl-line2); background: var(--c); cursor: pointer; }
.ibl-color.is-on { border-color: var(--ibl-cyan); box-shadow: 0 0 0 3px var(--ibl-cyan-soft); }

/* ---------- 画布 ---------- */
.ibl-grid { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(0, .78fr); gap: 16px; align-items: start; }
.ibl-stage-card { background: var(--ibl-panel); border: 1px solid var(--ibl-line); border-radius: var(--ibl-r); padding: 16px; box-shadow: var(--ibl-shadow-sm); min-width: 0; }
.ibl-stage-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ibl-stage-title { font-size: 14.5px; font-weight: 800; }
.ibl-stage-title small { font-size: 11.5px; font-weight: 500; color: var(--ibl-sub); margin-left: 6px; }
.ibl-stage-actions { display: flex; gap: 6px; }
.ibl-canvas-box {
    position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden;
    background: repeating-conic-gradient(var(--ibl-bg2) 0 25%, var(--ibl-panel) 0 50%) 0 0 / 20px 20px;
    border: 1px solid var(--ibl-line2); touch-action: none; cursor: crosshair;
}
.ibl-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ibl-canvas-top { clip-path: inset(0 0 0 var(--split, 52%)); }
.ibl-sel { position: absolute; border: 2px dashed var(--ibl-cyan); background: rgba(10,166,166,.16); pointer-events: none; border-radius: 3px; }
.ibl-split-line { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ibl-cyan); left: var(--split, 52%); pointer-events: none; box-shadow: 0 0 8px rgba(10,166,166,.5); }
.ibl-split-line span { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: var(--ibl-cyan); color: #fff; border-radius: 999px; width: 26px; height: 26px; display: grid; place-items: center; font-size: 13px; }
.ibl-stage-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; font-size: 13px; color: var(--ibl-sub); background: var(--ibl-panel2); }
.ibl-stage-empty[hidden], .ibl-sel[hidden], .ibl-split-line[hidden] { display: none !important; }
.ibl-stage-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 11.5px; color: var(--ibl-sub); }
.ibl-check { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.ibl-check input { accent-color: var(--ibl-cyan); }
.ibl-range-label { display: inline-flex; align-items: center; gap: 6px; }
.ibl-range-label input { width: 110px; accent-color: var(--ibl-cyan); }
.ibl-stage-hint { margin-left: auto; color: var(--ibl-cyan); font-weight: 700; }
.ibl-apply-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--ibl-line); }
.ibl-apply-note { font-size: 11.5px; color: var(--ibl-sub); flex: 1 1 200px; line-height: 1.6; }

/* ---------- 侧栏 ---------- */
.ibl-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ibl-rect-list { list-style: none; padding: 0; margin: 0; max-height: 176px; overflow: auto; }
.ibl-rect-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; padding: 7px 8px; border-bottom: 1px dashed var(--ibl-line); }
.ibl-rect-list li:last-child { border-bottom: 0; }
.ibl-rect-list .ibl-rx { color: var(--ibl-brand); font-weight: 750; }
.ibl-rect-list .ibl-rx small { color: var(--ibl-sub); font-weight: 500; }
.ibl-card-foot { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.ibl-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.ibl-thumbs .ibl-empty { grid-column: 1 / -1; }
.ibl-thumb { position: relative; border: 2px solid transparent; border-radius: 8px; overflow: hidden; padding: 0; background: var(--ibl-panel2); cursor: pointer; aspect-ratio: 1; }
.ibl-thumb.is-on { border-color: var(--ibl-cyan); }
.ibl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ibl-thumb span { position: absolute; bottom: 0; left: 0; right: 0; font-size: 9px; background: rgba(10,20,30,.72); color: #fff; text-align: center; }
.ibl-export-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.ibl-export-row label { font-size: 11.5px; color: var(--ibl-sub); display: flex; flex-direction: column; gap: 4px; flex: 1 1 110px; }
.ibl-export-row select, .ibl-export-row input[type=range] { font-family: inherit; }
.ibl-export-row select { border: 1px solid var(--ibl-line2); border-radius: 7px; padding: 5px 7px; background: var(--ibl-panel2); color: var(--ibl-ink); font-size: 12px; }
.ibl-export-row input[type=range] { width: 100%; accent-color: var(--ibl-cyan); }
.ibl-export-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 8px; }
.ibl-bill { list-style: none; padding: 0; margin: 0; font-size: 11.5px; color: var(--ibl-sub); max-height: 120px; overflow: auto; }
.ibl-bill li { padding: 4px 0; border-bottom: 1px dashed var(--ibl-line); }

/* ---------- 下方两卡 ---------- */
.ibl-lower { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 16px; margin-top: 20px; align-items: start; }
.ibl-table-scroll { overflow-x: auto; }
.ibl-table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 440px; }
.ibl-table th, .ibl-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--ibl-line); }
.ibl-table th { font-size: 11.5px; color: var(--ibl-sub); font-weight: 700; background: var(--ibl-panel2); }
.ibl-table td b { color: var(--ibl-cyan); }
.ibl-risk { font-weight: 700; }
.ibl-risk.low { color: var(--ibl-ok); }
.ibl-risk.mid { color: var(--ibl-warn); }
.ibl-check-list { list-style: none; padding: 0; margin: 0; }
.ibl-check-list li { font-size: 12.5px; line-height: 1.8; padding: 7px 0 7px 24px; position: relative; border-bottom: 1px dashed var(--ibl-line); color: var(--ibl-sub); }
.ibl-check-list li::before { content: "✓"; position: absolute; left: 4px; color: var(--ibl-cyan); font-weight: 800; }
.ibl-check-list li.is-warn::before { content: "!"; color: var(--ibl-warn); }
.ibl-check-list li b { color: var(--ibl-ink); }
.ibl-check-note { font-size: 11.5px; color: var(--ibl-sub); line-height: 1.75; margin: 12px 0 0; }

/* ---------- 弹窗 / toast（仅操作后出现） ---------- */
.ibl-modal[hidden] { display: none !important; }
.ibl-modal {
    position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center;
    background: rgba(8, 20, 30, .62); padding: 18px; font-family: var(--ibl-font); color: var(--ibl-ink);
}
.ibl-modal-card { background: var(--ibl-panel); border: 1px solid var(--ibl-line); border-radius: 16px; padding: 24px; width: min(460px, 100%); box-shadow: var(--ibl-shadow); position: relative; }
.ibl-modal-card h3 { font-size: 19px; margin: 0 0 12px; font-weight: 800; }
.ibl-modal-card p { font-size: 13px; line-height: 1.85; color: var(--ibl-sub); margin: 0 0 10px; }
.ibl-modal-card .ibl-modal-stat { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 18px; }
.ibl-modal-stat b { background: var(--ibl-cyan-soft); color: var(--ibl-brand); border-radius: 9px; padding: 7px 12px; font-size: 12px; }
.ibl-modal-x { position: absolute; right: 12px; top: 10px; border: 0; background: transparent; color: var(--ibl-sub); font-size: 24px; cursor: pointer; line-height: 1; }
.ibl-toast {
    position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(12px);
    background: var(--ibl-brand); color: #fff; padding: 10px 20px; border-radius: 999px;
    font-size: 13px; font-weight: 650; box-shadow: var(--ibl-shadow); z-index: 950;
    opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; font-family: var(--ibl-font);
}
:root[data-theme="dark"] .ibl-toast { color: #0d1a24; }
.ibl-toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
    .ibl-hero, .ibl-grid, .ibl-lower { grid-template-columns: minmax(0, 1fr); }
    .ibl-hero-copy { padding-bottom: 4px; }
    .ibl-page h1 { font-size: 32px; }
}
@media (max-width: 560px) {
    .ibl-wrap { padding: 12px 12px 0; }
    .ibl-page h1 { font-size: 27px; }
    .ibl-sub { font-size: 14px; line-height: 1.85; }
    .ibl-fact { min-width: 96px; padding: 8px 12px; }
    .ibl-canvas-box { aspect-ratio: 4 / 3; }
    .ibl-toolbar { padding: 12px; gap: 12px; }
    .ibl-stage-hint { margin-left: 0; }
}
