.canvasPane {
    display: flex;
    position: relative; /* Важно! Для правильного позиционирования */
    flex-wrap: wrap;
    align-content: space-around;
    justify-content: space-around;
    padding: 0px;
    width: 100%;
    height: 100%;
}
@media all and (max-width: 10000px)     {.canvasPane {calc(99% - 29px); width: 69%;}}
@media all and (max-width: 2750px)      {.canvasPane {calc(99% - 29px);width: 67%;}}
@media all and (max-width: 2500px)      {.canvasPane {calc(99% - 29px);width: 65%;}}
@media all and (max-width: 2250px)      {.canvasPane {calc(99% - 29px);width: 63%;}}
@media all and (max-width: 2000px)      {.canvasPane {calc(99% - 29px);width: 60%;}}
@media all and (max-width: 1750px)      {.canvasPane {calc(99% - 29px);width: 56%;}}
@media all and (max-width: 1500px)      {.canvasPane {calc(99% - 29px);width: 52%;}}
@media all and (max-width: 1300px)      {.canvasPane {calc(99% - 29px);width: 99%;}}

#table-container {
    display: none;
    position: absolute;
    top: 80px; /* Начинаем сразу под headPane */
    bottom: 0; /* Нижняя граница рабочей области совпадает с верхом футбара. */
    left: 0;
    width: 100%; /* Теперь совпадает с canvasPane */
    height: auto;
    box-sizing: border-box;
    flex-direction: column;
    background: white;
    border: 1px solid #ccc;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    z-index: 1000; /* Должно быть выше других элементов */
    padding: 5px 5px 0;
/*    overflow: auto; /* Скролл при переполнении */*/
}

#example-table {
    flex: 1 1 0; /* Всё место под панелью кнопок, в том числе когда она скрыта. */
    min-height: 0;
/*	 margin-top: 10px;*/
}

#table-header-controls,
#restart-halt-banner {
    flex-shrink: 0;
}

/* Кнопка закрытия */
#close-table {
    cursor: pointer;
    font-weight: bold;
    position: absolute;
    top: 5px;
    right: 10px;
}

/* Экран лога расчёта */
#calculation-log {
    position: absolute;
    top: var(--table-content-top, 5px);
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    box-sizing: border-box;
    background: white;
    color: black;
    font-size: 24px;
    display: none; /* Изначально скрыт */
    justify-content: center;
    align-items: center;
    z-index: 1001; /* выше, чем у таблицы */
}

/* CSS переменные для динамического изменения ширины */
:root {
    --table-width: 50%;
    --log-width: 50%;
}

/* Адаптивный режим: лог рядом с таблицей на широких экранах */
@media (min-width: 1200px) {
    #calculation-log.side-by-side {
        width: var(--log-width);
        left: var(--table-width);
        top: var(--table-content-top, 5px);
        bottom: 0;
        height: auto;
        border: 1px solid #ccc;
        border-radius: 0px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        justify-content: flex-start;
        align-items: flex-start;
        padding: 7.5px;
        transition: width 0.3s ease, left 0.3s ease; /* плавная анимация изменения размера */
    }
    
    #example-table.with-log {
        width: var(--table-width);
        opacity: 1 !important; /* не затемняем таблицу */
        transition: width 0.3s ease; /* плавная анимация изменения размера */
    }
    
    /* Ползунок для изменения ширины */
    #width-slider-container {
        position: absolute;
        top: var(--table-content-top, 5px);
        bottom: 0;
        left: calc(var(--table-width) - 2px); /* позиционируем точно на границе */
        width: 4px;
        height: auto;
        background: transparent;
        cursor: col-resize;
        z-index: 1002;
        display: none; /* изначально скрыт */
        transition: left 0.3s ease;
    }
    
    #width-slider-container.visible {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    #width-slider-container:hover {
        background: rgba(0,0,0,0.1); /* слабая подсветка при наведении */
    }
    
    #width-slider-handle {
        width: 3px;
        height: 40px;
        background: #999;
        border-radius: 2px;
        cursor: col-resize;
        position: relative;
        opacity: 0.6;
        transition: all 0.2s ease;
    }
    
    #width-slider-handle:hover {
        background: #666;
        opacity: 1;
        width: 4px;
    }
    
    /* Индикатор процентов */
    #width-percentage {
        position: absolute;
        top: -25px;
        left: 50%;
        transform: translateX(-50%);
        background: #333;
        color: white;
        padding: 2px 6px;
        border-radius: 4px;
        font-size: 10px;
        white-space: nowrap;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    #width-slider-container:hover #width-percentage {
        opacity: 1;
    }
    
    /* Предотвращение выделения текста во время перетаскивания */
    body.dragging-slider {
        user-select: none !important;
        -webkit-user-select: none !important;
        -moz-user-select: none !important;
        -ms-user-select: none !important;
        cursor: col-resize !important;
    }
    
    body.dragging-slider * {
        user-select: none !important;
        -webkit-user-select: none !important;
        -moz-user-select: none !important;
        -ms-user-select: none !important;
        cursor: col-resize !important;
    }
    
    #calculation-log.side-by-side #calculation-log-text,
    #calculation-log.side-by-side #calculation-step-log-text {
        width: 100%;
        height: 100%;
        font-family: 'Courier New', monospace;
        font-size: 12px;
        line-height: 1.4;
        overflow-y: auto;
        overflow-x: auto;
        white-space: pre-wrap;
        word-wrap: break-word;
        background: #1e1e1e;
        color: #d4d4d4;
        padding: 10px;
        border-radius: 4px;
        border: 1px solid #333;
    }
}

/* На узких экранах - полноэкранный режим как раньше */
@media (max-width: 1199px) {
    #calculation-log.side-by-side {
        width: 100%;
        left: 0;
        top: var(--table-content-top, 5px);
        bottom: 0;
        height: auto;
        border: none;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        justify-content: center;
        align-items: center;
    }
    
    #calculation-log.side-by-side #calculation-log-text,
    #calculation-log.side-by-side #calculation-step-log-text {
        font-size: 24px;
    }
}

/*input[type=range]:focus::-webkit-slider-runnable-track {
  background: #dcdcdc;
}*/

/*input[type=range]::-moz-range-track {
  background: rgba(200, 200, 200, 0.7);
  border: 1px solid #000101;
  border-radius: 1px;
  width: 100%;
  height: 20px;
  cursor: pointer;
}*/
/*input[type=range]::-moz-range-thumb {
  width: 5px;
  height: 22px;
  background: #000000;
  border: 1px solid rgba(100, 100, 100, 0);
  cursor: pointer;
}*/
/*input[type=range]::-ms-track {
  background: transparent;
  border-color: transparent;
  border-width: 15.85px 0;
  color: transparent;
  width: 100%;
  height: 20px;
  cursor: pointer;
}*/
/*input[type=range]::-ms-fill-lower {
  background: #b4b2b2;
  border: 0.9px solid #000101;
}*/
/*input[type=range]::-ms-fill-upper {
  background: rgba(200, 200, 200, 0.0);
  border: 0.9px solid #000101;
}*/
/*input[type=range]::-ms-thumb {
  width: 5px;
  height: 28px;
  background: #000000;
  border: 1.3px solid rgba(102, 104, 104, 0);
  cursor: pointer;
  margin-top: 0px;
}*/
/*Needed to keep the Edge thumb centred*/

/*input[type=range]:focus::-ms-fill-lower {
  background: rgba(200, 200, 200, 0.7);
}*/
/*input[type=range]:focus::-ms-fill-upper {
  background: #dcdcdc;
}*/





/* Moz*/
/*input[type="range"]::-moz-range-progress {
	background:  #FF0000;
}*/
/*input[type="range"]::-moz-range-track {  
	background:  #0000FF;
}*/
/* IE*/
/*input[type="range"]::-ms-fill-lower {
	background:  #FF0000;
}*/
/*input[type="range"]::-ms-fill-upper {  
	background:  #0000FF;
}*/



