/* Floating progress stays below Filament modal overlays. */
.obe-progress-panel {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    width: min(24rem, calc(100vw - 2rem));
    max-height: min(36rem, 65dvh);
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 20;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 8px 32px rgb(0 0 0 / .16);
}
.obe-progress-panel .fi-section { box-shadow: none; border: 0; }
.obe-progress-panel .fi-section-header { padding: .625rem .875rem; }
.obe-progress-panel .fi-section-content { padding: .5rem .875rem; }
.obe-progress-panel .fi-section-header-description { font-size: .75rem; line-height: 1.5; overflow-wrap: anywhere; }
.dark .obe-progress-panel { background: #111827; border-color: #374151; }
.fi-page:has(.obe-progress-panel) { padding-bottom: min(38rem, 70dvh); }
@media (max-width: 639px) {
    .obe-progress-panel {
        right: max(.75rem, env(safe-area-inset-right));
        bottom: max(.75rem, env(safe-area-inset-bottom));
        width: calc(100vw - 1.5rem);
        max-height: 40dvh;
        border-radius: .875rem;
    }
    .fi-page:has(.obe-progress-panel) { padding-bottom: 45dvh; }
}

/* Chart.js measures its parent: give the progress track a compact, explicit height. */
.obe-progress-panel .fi-wi-chart-canvas-ctn {
    height: 10px !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    border-radius: 999px;
    overflow: hidden;
    background: #f3f4f6;
}
.obe-progress-panel .fi-wi-chart-canvas-ctn canvas { height: 10px !important; }
.obe-progress-panel .fi-wi-chart .fi-section-header { padding-bottom: .25rem; }
.obe-progress-panel .fi-wi-chart .fi-section-content { padding-top: .25rem; padding-bottom: .875rem; }
.obe-progress-panel .fi-wi-chart + .fi-wi-chart { border-top: 1px solid #e5e7eb; }
.dark .obe-progress-panel .fi-wi-chart-canvas-ctn { background: #1f2937; }

/* Empty states share the frame class, but are text rather than chart tracks. */
.obe-progress-panel .fi-wi-chart-frame:not(.fi-wi-chart-canvas-ctn) {
    height: auto;
    min-height: 0 !important;
    background: transparent;
    overflow: visible;
}
.obe-progress-panel .fi-empty-state { padding: .5rem 0; }
.obe-progress-panel .fi-empty-state-heading { font-size: .875rem; }
.obe-progress-panel .fi-empty-state-description { font-size: .75rem; line-height: 1.5; }

/* Map cells retain readable labels on narrow screens. */
.obe-alignment-map .fi-btn { min-height: 3rem; height: auto; }
.obe-alignment-map .fi-btn-label { white-space: normal; overflow-wrap: anywhere; text-align: left; }
.obe-alignment-map .fi-section-header-description { overflow-wrap: anywhere; }
