* {
    box-sizing: border-box;
}

html, body, #react-entry-point {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: white;
}

body {
    overflow: hidden;
}

#app-layout {
    display: flex;
    flex-direction: row;
    width: 100vw;
    height: 100vh;
    gap: 12px;
    padding: 12px;
    background: white;
    overflow: hidden;
}

#app-layout-scatter {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    background: white;
}

.scatter-graph {
    width: 100%;
    height: 100%;
}

#name-scatter,
#name-scatter .js-plotly-plot,
#name-scatter .plot-container,
#name-scatter .svg-container {
    width: 100% !important;
    height: 100% !important;
}

#app-layout-controls {
    flex: 0 0 460px;
    width: 460px;
    min-width: 460px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    overflow-x: hidden;
}

#name-info-box {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
    font-size: 17px;
    line-height: 1.5;
}

#name-info-content {
    overflow: visible;
    word-break: break-word;
}


#name-info-content > *:last-child {
    margin-bottom: 0;
}


.panel {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 12px;
    background: #f9f9f9;
    flex: 0 0 auto;
}

#footer-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

@media (max-width: 900px) {
    body {
        overflow: auto;
    }

    #app-layout {
        flex-direction: column;
        width: 100%;
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    #app-layout-controls {
        width: 100%;
        min-width: 0;
        flex: 0 0 auto;
        order: 1;
    }

    #app-layout-scatter {
        width: 100%;
        min-height: 55vh;
        order: 2;
    }
}

@media (max-width: 640px) {
    #app-layout {
        padding: 8px;
        gap: 8px;
    }

    #app-layout-scatter {
        display: none;
    }

    #app-layout-controls {
        width: 100%;
    }

    #name-info-box {
        min-height: 0;
        font-size: 16px;
    }
}
