.bmc-image{--surface:#ffffff;--surface-muted:#f7f8fb;--border:#d9dfeb;--text-main:#111827;--text-muted:#6b7280;--primary:#276ad0;--primary-dark:#1f4d97;--accent:#0ea5e9;--shadow-soft:0 12px 32px rgba(16,24,40,.08);--gradient:linear-gradient(135deg,#276ad0,#0ea5e9);}
.ibf-shell{--ibf-rail:280px;--ibf-radius:20px;--ibf-pad:clamp(12px,3vw,20px);background:var(--surface-muted);border:1px solid var(--border);border-radius:var(--ibf-radius);padding:var(--ibf-pad);margin-bottom:2rem;box-shadow:var(--shadow-soft);}
.ibf-ingest{display:flex;flex-direction:column;gap:10px;margin-bottom:14px;}
.ibf-ingest-zone{position:relative;border:2px dashed var(--border);border-radius:16px;padding:clamp(18px,4vw,28px) 16px;text-align:center;background:var(--surface);transition:border-color .2s ease,background .2s ease;}
.ibf-ingest-zone.ibf-drag{border-color:var(--primary);background:color-mix(in srgb,var(--primary) 6%,var(--surface));}
.ibf-ingest-zone input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%;}
.ibf-ingest-hint{font-size:.8125rem;color:var(--text-muted);margin:6px 0 0;}
.ibf-ingest-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;align-items:center;}
.ibf-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 18px;border-radius:999px;border:none;font-weight:600;font-size:.875rem;cursor:pointer;transition:transform .15s ease,opacity .15s ease;}
.ibf-btn:active{transform:scale(.98);}
.ibf-btn-primary{background:var(--primary);color:#fff;}
.ibf-btn-primary:hover{opacity:.92;}
.ibf-btn-ghost{background:transparent;color:var(--primary);border:1px solid var(--border);}
.ibf-btn-ghost:hover{background:var(--surface-muted);}
.ibf-stage-grid{display:grid;gap:14px;grid-template-columns:1fr;}
@media (min-width:900px){.ibf-stage-grid{grid-template-columns:1fr var(--ibf-rail);align-items:start;}}
.ibf-viewport{position:relative;background:var(--surface);border-radius:16px;border:1px solid var(--border);overflow:hidden;min-height:min(52vh,420px);display:flex;flex-direction:column;}
.ibf-tabs{display:flex;gap:4px;padding:8px;background:color-mix(in srgb,var(--surface-muted) 80%,transparent);}
.ibf-tab{flex:1;padding:10px 12px;border-radius:12px;border:none;background:transparent;font-size:.8125rem;font-weight:600;color:var(--text-muted);cursor:pointer;}
.ibf-tab[aria-selected=true]{background:var(--surface);color:var(--text-main);box-shadow:0 1px 3px rgba(0,0,0,.08);}
.ibf-canvas-wrap{position:relative;flex:1;display:flex;align-items:center;justify-content:center;padding:12px;min-height:240px;}
.ibf-canvas-wrap img,.ibf-canvas-wrap canvas{max-width:100%;max-height:min(48vh,380px);width:auto;height:auto;object-fit:contain;border-radius:8px;}
.ibf-canvas-wrap canvas{display:block;}
.ibf-rail{display:flex;flex-direction:column;gap:12px;}
.ibf-rail-block{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:14px;}
.ibf-rail-title{font-size:.6875rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted);margin:0 0 10px;}
.ibf-moods{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;scrollbar-width:thin;flex-wrap: wrap;}
.ibf-moods::-webkit-scrollbar{height:4px;}
.ibf-moods::-webkit-scrollbar-thumb{background:var(--border);border-radius:4px;}
.ibf-mood{scroll-snap-align:start;flex:0 0 auto;padding:8px 14px;border-radius:999px;border:1px solid var(--border);background:var(--surface-muted);font-size:.8125rem;font-weight:600;color:var(--text-main);cursor:pointer;white-space:nowrap;transition:background .15s ease,border-color .15s ease;}
.ibf-mood[aria-pressed=true]{border-color:var(--primary);background:color-mix(in srgb,var(--primary) 12%,var(--surface));color:var(--primary-dark);}
.ibf-slider{margin-bottom:14px;}
.ibf-slider:last-child{margin-bottom:0;}
.ibf-slider-top{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:6px;}
.ibf-slider-top label{font-size:.8125rem;font-weight:600;color:var(--text-main);}
.ibf-slider-top output{font-variant-numeric:tabular-nums;font-size:.75rem;color:var(--text-muted);}
.ibf-range{width:100%;height:6px;border-radius:999px;-webkit-appearance:none;appearance:none;background:linear-gradient(to right,var(--primary) 0%,var(--primary) var(--ibf-pct,50%),var(--border) var(--ibf-pct,50%),var(--border) 100%);}
.ibf-range::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:18px;height:18px;border-radius:50%;background:var(--surface);border:2px solid var(--primary);cursor:pointer;box-shadow:0 2px 6px rgba(0,0,0,.12);}
.ibf-range::-moz-range-thumb{width:18px;height:18px;border-radius:50%;background:var(--surface);border:2px solid var(--primary);cursor:pointer;}
.ibf-quick{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
@media (min-width:900px){.ibf-quick{grid-template-columns:1fr;}}
.ibf-foot{display:flex;flex-wrap:wrap;gap:8px;padding-top:4px;}
.ibf-foot .ibf-btn{flex:1;min-width:120px;}
.ibf-empty-hint{font-size:.875rem;color:var(--text-muted);text-align:center;padding:24px 16px;}
.ibf-prose{margin-top:2.5rem;padding-top:2rem;border-top:1px solid var(--border);}
.ibf-prose h2{font-size:clamp(1.25rem,3vw,1.5rem);font-weight:700;margin:2rem 0 .75rem;}
.ibf-prose h2:first-child{margin-top:0;}
.ibf-prose h3{font-size:1.05rem;font-weight:600;margin:1.5rem 0 .5rem;}
.ibf-prose p{color:var(--text-main);line-height:1.65;margin:0 0 1rem;}
.ibf-prose ul{margin:0 0 1rem;padding-left:1.25rem;}
.ibf-prose li{margin-bottom:.35rem;}
.ibf-callout{border-left:4px solid var(--primary);padding:12px 16px;background:var(--surface-muted);border-radius:0 12px 12px 0;margin:1.25rem 0;font-size:.9375rem;}
.ibf-table-wrap{overflow-x:auto;margin:1rem 0;border:1px solid var(--border);border-radius:12px;}
.ibf-table{width:100%;border-collapse:collapse;font-size:.875rem;}
.ibf-table th,.ibf-table td{padding:10px 12px;text-align:left;border-bottom:1px solid var(--border);}
.ibf-table th{background:var(--surface-muted);font-weight:600;}
.ibf-table tr:last-child td{border-bottom:none;}
.ibf-prose a{color:var(--primary);font-weight:500;text-decoration:underline;text-underline-offset:2px;}
