:root {
        --container-bg: #23262D;
}

.container {
        background-color: var(--container-bg);
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
}

.win-box {
        width: 100%;
        max-width: 750px;
        height: 100%;
        /* Добавлено: занимает всю высоту контейнера */
        display: flex;
        flex-direction: column;
        /* Изменено: вертикальное расположение */
        background-color: #474A51;
        border-radius: 0.4rem;
}

.menu-box {
        width: 100%;
        height: 40px;
        flex-shrink: 0;
        /* Добавлено: не сжимается */
}

.note-box {
        width: 100%;
        flex: 1;
        min-height: 0;
        max-height: calc(100vh - 45px);
        overflow-y: scroll;
        overflow-x: hidden;
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
        padding: 5px 10px 15px 15px;
        box-sizing: border-box;
}

.copy-box {
        width: 100%;
        height: 3rem;
        min-height: 3rem;
        background-color: #13171C;
        border-radius: 0.3rem;
        color: #BFBFBF;
        padding: 4px 8px;
        font-family: Consolas;
        font-size: 0.9rem;
        border: 0.1rem solid #13171C;
}

.copy-box:focus {
        outline: 0;
        box-shadow: 0px 0px 6px 1px #00a9ff;
}

/* Один элемент - занимает всю высоту */
.note-box .copy-box:first-child:last-child {
        flex: 1;
}

/* Два и более элементов - последний растягивается */
.note-box .copy-box:not(:only-child):last-child {
        flex: 1;
}

::-webkit-scrollbar {
        width: 5px
}

::-webkit-scrollbar-thumb {
        background: #4A6488;
        border-radius: 5px;
}

::-webkit-scrollbar-track {
        background: #474A51;
}