/* Stock valuation / education Plotly: 모바일(≤768px)에서만 모드바 접기 — 화살표는 우측 고정 */
@media (max-width: 768px) {
    .stock-education-plotly-charts .js-plotly-plot .modebar-container.stock-edu-modebar-mobile-wrap {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-end !important;
        align-items: flex-start !important;
        gap: 6px !important;
        top: 4px !important;
        right: 4px !important;
        left: auto !important;
        z-index: 1002;
        isolation: isolate;
    }

    .stock-education-plotly-charts .js-plotly-plot .modebar-container.stock-edu-modebar-mobile-wrap:not(.stock-edu-modebar-mobile-expanded) .modebar {
        max-width: 0 !important;
        min-width: 0 !important;
        opacity: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
        border-width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        transition: max-width 0.22s ease, opacity 0.18s ease;
    }

    .stock-education-plotly-charts .js-plotly-plot .modebar-container.stock-edu-modebar-mobile-wrap .modebar {
        position: relative !important;
        z-index: 1 !important;
        flex: 0 1 auto;
    }

    .stock-education-plotly-charts .js-plotly-plot .modebar-container.stock-edu-modebar-mobile-wrap.stock-edu-modebar-mobile-expanded .modebar {
        max-width: min(calc(100vw - 52px), 520px) !important;
        opacity: 1 !important;
        overflow: visible !important;
        pointer-events: auto !important;
        transition: max-width 0.22s ease, opacity 0.18s ease;
    }

    .stock-education-plotly-charts .stock-edu-modebar-mobile-toggle {
        flex: 0 0 auto;
        order: 2;
        position: relative;
        z-index: 1006;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 32px;
        padding: 0;
        margin: 0;
        border: 1px solid rgba(0, 0, 0, 0.14);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
        color: #475569;
        cursor: pointer;
        pointer-events: auto;
        -webkit-tap-highlight-color: transparent;
    }

    .stock-education-plotly-charts .stock-edu-modebar-mobile-toggle .stock-edu-modebar-chevron {
        transition: transform 0.2s ease;
    }

    .stock-education-plotly-charts .modebar-container.stock-edu-modebar-mobile-wrap.stock-edu-modebar-mobile-expanded .stock-edu-modebar-mobile-toggle .stock-edu-modebar-chevron {
        transform: rotate(180deg);
    }

    .stock-education-plotly-charts .stock-edu-modebar-mobile-toggle:active {
        background: rgba(241, 245, 249, 1);
    }

    .main-content.dark-mode .stock-education-plotly-charts .stock-edu-modebar-mobile-toggle {
        background: rgba(45, 55, 72, 0.96);
        border-color: rgba(255, 255, 255, 0.12);
        color: #e2e8f0;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    }

    .main-content.dark-mode .stock-education-plotly-charts .stock-edu-modebar-mobile-toggle:active {
        background: rgba(51, 65, 85, 1);
    }
}
