#bottomBar {
    display: none !important;
}

@media (max-width: 768px),
(display-mode: standalone) {
    body.work-screen-active #bottomBar {
        display: block !important;
        position: fixed;
        inset: auto 0 0 0;
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
        z-index: 20000;
        font-family: 'Inter', sans-serif;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
        border-top: 1px solid #e2e8f0;
        box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
        backdrop-filter: blur(14px) saturate(140%);
        -webkit-backdrop-filter: blur(14px) saturate(140%);
    }
}

#bottomBar::-webkit-scrollbar {
    display: none;
}

body.keyboard-open #bottomBar {
    display: none !important;
}

.bb-shell {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.bb-progress-area {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.bb-progress-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0 4px;
}

.bb-progress-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-bottom: 2px;
}

.bb-progress-value {
    color: #191c1e;
    font-size: 9px;
    line-height: 13.5px;
    font-weight: 700;
    letter-spacing: 0;
    white-space: nowrap;
}

.bb-progress-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 12px;
    height: 12px;
    padding: 0 4px;
    border-radius: 2px;
    background: rgba(46, 125, 50, 0.1);
    color: #2e7d32;
    font-size: 8px;
    line-height: 12px;
    font-weight: 700;
}

.bb-progress-track {
    display: block;
    width: 100%;
    height: 4px;
    margin-bottom: 2px;
    overflow: hidden;
    border-radius: 12px;
    background: #f1f5f9;
}

.bb-progress-track>span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: rgba(46, 125, 50, 0.78);
}

.bb-progress-label {
    overflow: hidden;
    color: #94a3b8;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 8px;
    line-height: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.bb-progress-card.is-me .bb-progress-label {
    color: #64748b;
}

.bb-progress-card-total .bb-progress-badge {
    display: none;
}

.bb-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    padding-left: 4px;
}

.bb-pages-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.bb-pages-btn svg {
    width: 18px;
    height: 18px;
}

.bb-pages-btn:active {
    transform: translateY(1px);
}

.bb-pages-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.bb-list-btn.is-active {
    background: #eef6ff;
    border-color: #bfdbfe;
    color: #2563eb;
}

body.dark #bottomBar {
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(17, 24, 39, 0.94) 100%);
    border-top-color: rgba(71, 85, 105, 0.8);
    box-shadow: 0 -6px 24px rgba(2, 6, 23, 0.45);
}

body.dark .bb-progress-value {
    color: #e5e7eb;
}

body.dark .bb-progress-track {
    background: rgba(100, 116, 139, 0.28);
}

body.dark .bb-progress-track>span {
    background: rgba(74, 222, 128, 0.76);
}

body.dark .bb-progress-label {
    color: #94a3b8;
}

body.dark .bb-pages-btn {
    background: rgba(30, 41, 59, 0.92);
    border-color: rgba(71, 85, 105, 0.8);
    color: #dbe4ee;
}

body.dark .bb-pages-btn:hover {
    background: rgba(51, 65, 85, 0.94);
}

body.dark .bb-list-btn.is-active {
    background: rgba(37, 99, 235, 0.18);
    border-color: rgba(96, 165, 250, 0.6);
    color: #93c5fd;
}
