
#cafe-bottom-nav {
    position: fixed;
    bottom: 0; left: 0;
    width: 100%;
    height: 65px;
    background: #FFF8E9;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #eee;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(59, 34, 26, 0.07);
}

#cafe-bottom-nav .baritem {
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #999;
    font-size: 11px;
    cursor: pointer;
    gap: 4px;
    flex: 1;
    padding: 6px 0;
    text-decoration: none;
}

#cafe-bottom-nav .baritem i {
    font-size: 22px;
    color: #999;
    transition: color 0.2s;
}

#cafe-bottom-nav .bartext { font-size: 11px; color: #999; transition: color 0.2s; }

#cafe-bottom-nav .baritem.active i    { color: #3B221A; }
#cafe-bottom-nav .baritem.active .bartext { color: #3B221A; font-weight: 700; }

#cafe-bottom-nav .bar-badge {
    position: absolute;
    top: 2px;
    right: calc(50% - 18px);
    background: #ff3b30;
    color: #FFF8E9;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* Preserve the homepage's 65px row, adding only the device safe area beneath it. */
html[data-cafe-ui="user"] { --cafe-nav-height: calc(65px + env(safe-area-inset-bottom, 0px)); }
#cafe-bottom-nav {
    box-sizing: border-box;
    height: var(--cafe-nav-height, 65px);
    padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    bottom: var(--cafe-nav-keyboard-offset, 0px);
    font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
}
#cafe-bottom-nav .baritem { min-width: 0; box-sizing: border-box; line-height: normal; }
#cafe-bottom-nav .bartext { color: #8A7860; line-height: 14px; white-space: normal; overflow-wrap: anywhere; }
#cafe-bottom-nav .baritem:not(.active), #cafe-bottom-nav .baritem:not(.active) i { color: #8A7860; }
#cafe-bottom-nav .baritem.active .bartext { color: #3B221A; }
#cafe-bottom-nav .baritem:focus-visible { outline: 2px solid #3B221A; outline-offset: -3px; }
html[data-cafe-nav="global"] :is(.footer_menu,.app-footer:has(> .footer-nav-link),.bottom-menu-section,uni-tabbar),
html[data-cafe-nav="global"] .tabbar:has(> a.baritem):not(#cafe-bottom-nav) { display: none !important; }
html[data-cafe-nav="global"] body.cafe-with-bottom-nav {
    padding-bottom: max(var(--cafe-original-bottom-padding, 0px), calc(var(--cafe-nav-height) + var(--cafe-action-clearance, 0px) + 16px)) !important;
    scroll-padding-bottom: calc(var(--cafe-nav-height) + var(--cafe-action-clearance, 0px) + 16px);
}
html[data-cafe-nav="global"] [data-cafe-fixed-action] { bottom: calc(var(--cafe-nav-height) + var(--cafe-action-original-bottom, 0px) + var(--cafe-nav-keyboard-offset, 0px)) !important; }
html[data-cafe-nav="global"] :is(uni-page-body,.min-h-screen) { padding-bottom: calc(var(--cafe-nav-height) + var(--cafe-action-clearance, 0px) + 16px); }
