.machine-1-wrap {
    display: flex;
    flex-direction: row;
    gap: 30px;
    align-items: flex-start;
}

/* ===== ЛЕВАЯ КОЛОНКА - картинка с кнопками (УМЕНЬШЕНА) ===== */
.screenshot-area {
    position: relative;
    flex: 0 0 auto;
    border-radius: 12px;
    border: 1px solid #dce3ec;
    overflow: visible;
    background: #e9edf3;
    display: inline-block;
    padding: 10px;           /* Внутренние отступы */
}

.screenshot-area img.screenshot-img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    pointer-events: none;
    user-select: none;
}

.overlay-controls {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.overlay-controls > * {
    pointer-events: auto;
}

/* ===== ПРАВАЯ КОЛОНКА - бревно и фрезы (БОЛЬШАЯ) ===== */
.svg-block {
    flex: 1;
    background: #fafbfc;
    border-radius: 12px;
    border: 1px solid #dce3ec;
    padding: 20px;
    text-align: center;
    min-width: 500px;
    min-height: 500px;
}

.svg-block svg {
    display: block;
    width: 100%;
    max-width: 800px;
    height: auto;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 8px;
}

.current-value-label {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a3e5c;
    position: absolute;
    left: 600px;         /* ← твоя координата по X */
    top: 160px;          /* ← твоя координата по Y */
}

.current-value-label span {
    background: #1a3e5c;
    color: #fff;
    padding: 2px 16px;
    border-radius: 20px;
    display: inline-block;
    min-width: 60px;
}

.current-value-label2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a3e5c;
    position: center;
}

/* ===== ПОЛЕ СО ЗНАЧЕНИЕМ ===== */
.value-display {
    position: absolute;
    background: #ffffff;
    color: #000000;
    font-size: 14px;
    font-weight: 900;
    padding: 5px 0px;
    border: 1px solid #000000;
    border-radius: 0px;
    min-width: 80px;
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    left: 135px;
    top: 112px;
}

/* ===== КНОПКИ ===== */
.ctrl-btn {
    position: absolute;
    padding: 10px 23px;
    background: #ffffff;
    color: #000000;
    border: 1px solid #000000;
    border-radius: 0px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

.ctrl-btn:hover {
    background: #f0f0f0;
    transform: scale(1.02);
}

.ctrl-btn:active {
    transform: scale(0.98);
}

.btn-correction {
    left: 69px;
    top: 300px;
}

.btn-manual {
    left: 51px;
    top: 145px;
}

/* ===== МЕНЮ КОРРЕКЦИИ ===== */
.correction-menu {
    display: none;
    position: absolute;
    left: 45px;
    top: 330px;
    background: #ffffff;
    border-radius: 4px;
    padding: 15px 20px;
    border: 2px solid #000000;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    flex-direction: column;
    gap: 10px;
    min-width: 160px;
    z-index: 20;
}

.correction-menu.open {
    display: flex;
}

.correction-menu button {
    border: 2px solid #000000;
    border-radius: 4px;
    padding: 10px 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.15s;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.correction-menu button:hover {
    transform: scale(1.02);
}

.correction-menu button:active {
    transform: scale(0.98);
}

.correction-menu .btn-plus {
    background: #2e7d32;
    color: #ffffff;
    border-color: #1b5e20;
}

.correction-menu .btn-minus {
    background: #c62828;
    color: #ffffff;
    border-color: #b71c1c;
}

.correction-menu .close-menu {
    background: #757575;
    color: #ffffff;
    border-color: #616161;
    font-size: 14px;
    padding: 6px 12px;
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.modal-overlay.open {
    display: flex;
}

.modal-box {
    background: #ffffff;
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.4);
    text-align: center;
    max-width: 360px;
    width: 90%;
    border: 2px solid #000000;
}

.modal-box h3 {
    margin-top: 0;
    color: #000000;
    font-weight: 700;
}

.modal-box input {
    width: 100%;
    padding: 12px 16px;
    font-size: 18px;
    font-weight: 700;
    border: 2px solid #000000;
    border-radius: 4px;
    margin: 15px 0;
    text-align: center;
    outline: none;
    transition: 0.2s;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.modal-box input:focus {
    border-color: #1a3e5c;
    box-shadow: 0 0 0 3px rgba(26, 62, 92, 0.2);
}

.modal-box .modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-box .modal-actions button {
    padding: 10px 28px;
    border: 2px solid #000000;
    border-radius: 4px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: 0.15s;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.modal-box .modal-actions .btn-ok {
    background: #1a3e5c;
    color: #ffffff;
    border-color: #1a3e5c;
}

.modal-box .modal-actions .btn-ok:hover {
    background: #0f2a3f;
}

.modal-box .modal-actions .btn-cancel {
    background: #ffffff;
    color: #000000;
}

.modal-box .modal-actions .btn-cancel:hover {
    background: #f5f5f5;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1024px) {
    .machine-1-wrap {
        flex-direction: column;
        align-items: center;
    }
    .screenshot-area {
        width: 100%;
        max-width: 600px;
    }
    .screenshot-area img.screenshot-img {
        width: 100%;
        height: auto;
    }
    .svg-block {
        width: 100%;
        max-width: 800px;
        min-width: auto;
        min-height: 400px;
    }
}

@media (max-width: 800px) {
    .window-container {
        padding: 15px;
    }
    .screenshot-area {
        padding: 5px;
    }
    .value-display {
        font-size: 18px;
        padding: 6px 14px;
        left: 50px;
        top: 60px;
    }
    .ctrl-btn {
        font-size: 14px;
        padding: 8px 14px;
    }
    .btn-correction {
        left: 20px;
        top: 200px;
    }
    .btn-manual {
        left: 20px;
        top: 100px;
    }
    .correction-menu {
        left: 20px;
        top: 240px;
    }
    .svg-block {
        min-height: 300px;
        padding: 10px;
    }
}