/**
 * Nanban — scroll utilities (dark overrides removed; ivory theme in nanban-ivory-final.css)
 */

/* ═══ INTERNAL SCROLLPORT — mobile / coarse pointer only (desktop uses document scroll) ═══ */
@media (max-width: 768px), (pointer: coarse) {
    html.nanban-authed body.nanban-pro-app #mainApp .main-body-container,
    html.nanban-authed body.nanban-pro-app #mainApp .nb-app-body,
    html.nanban-authed body.nanban-pro-app #mainApp #nbAppBody {
        display: flex !important;
        flex-direction: row !important;
        flex: 1 1 auto !important;
        height: calc(100vh - 70px) !important;
        height: calc(100dvh - 70px) !important;
        max-height: calc(100dvh - 70px) !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    html.nanban-authed body.nanban-pro-app #mainApp #nbAppMain,
    html.nanban-authed body.nanban-pro-app #mainApp .nb-app-main,
    html.nanban-authed body.nanban-pro-app #mainApp .main-content,
    html.nanban-authed body.nanban-pro-app #mainApp .tab-pane,
    html.nanban-authed body.nanban-pro-app #mainApp .tab-content {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        height: 100% !important;
        max-height: 100% !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
        pointer-events: auto !important;
        touch-action: pan-y !important;
        padding-bottom: 50px !important;
        box-sizing: border-box !important;
        font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    }
}

body.nanban-pro-app:not(.esevai-mode) #nbAppMain,
body.nanban-pro-app:not(.esevai-mode) #nbAppMain * {
    font-family: inherit;
}

html.nanban-authed body.nanban-pro-app #mainApp #nbAppMain > .section-content,
html.nanban-authed body.nanban-pro-app #mainApp #nbAppMain > .section-content.active-section {
    overflow: visible !important;
    overflow-y: visible !important;
    height: auto !important;
    max-height: none !important;
    min-height: min-content !important;
    touch-action: pan-y !important;
    pointer-events: auto !important;
}

@media (max-width: 768px) {
    html.nanban-authed body.nanban-pro-app #mainApp .main-body-container,
    html.nanban-authed body.nanban-pro-app #mainApp .nb-app-body,
    html.nanban-authed body.nanban-pro-app #mainApp #nbAppBody {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    html.nanban-authed body.nanban-pro-app #mainApp #nbAppMain,
    html.nanban-authed body.nanban-pro-app #mainApp .nb-app-main,
    html.nanban-authed body.nanban-pro-app #mainApp .main-content {
        height: auto !important;
        max-height: none !important;
        min-height: calc(100dvh - 60px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-y !important;
    }
}

/* Ivory theme: scroll utilities only — dark overrides removed (see nanban-ivory-final.css) */
body.nanban-pro-app:not(.esevai-mode) #nbAppMain,
body.nanban-pro-app:not(.esevai-mode) #nbAppMain * {
    scrollbar-color: rgba(100, 116, 139, 0.35) transparent;
}

.nb-dash-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35em;
    height: 1.35em;
    margin-right: 0.35em;
    vertical-align: -0.2em;
    color: #64748b;
}

.nb-dash-ico svg {
    width: 100%;
    height: 100%;
}

/* Desktop scroll: defer to nanban-desktop-scroll-fix.css (native wheel on document) */
