body{
    font-family: Arial, sans-serif;
    margin:20px;
}

/** 
* ------ toolbar ------ 
*/
.toolbar {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 10px;
    background: #f5f5f5;
    border-bottom: 1px solid #ccc;
}

.toolbar-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.toolbar input {
    width: 80px;
}

.toolbar button {
    cursor: pointer;
}
/** 
* ------ toolbar ------ 
*/

/** 
* ------ canvas ------ 
*/
html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#viewport {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/** 
* ------ canvas ------ 
*/

#log{
    margin-top:15px;
    height:200px;
    overflow:auto;
    border:1px solid #ccc;
    padding:10px;
    background:#f5f5f5;
    font-family:monospace;
}

/** 
* ------ Модальное окно ------ 
*/



.modal{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
    justify-content:center;
    align-items:center;
    z-index:9999;
}

.modal.show{
    display:flex;
}

.modal-content{
    width:380px;
    background:#fff;
    border-radius:8px;
    overflow:hidden;
    box-shadow:0 15px 40px rgba(0,0,0,.25);
}
/*
@media (pointer: coarse) {

    .modal {
        align-items: flex-start;
        padding: 16px;
        padding-top: max(20px, env(safe-area-inset-top));
    }

    .modal-content {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
        border-radius: 16px;
    }
}
*/
.modal-header{
    padding:15px;
    font-size:18px;
    font-weight:bold;
    border-bottom:1px solid #eee;
}

.modal-body{
    padding:20px;
}

.modal-body input{
    width:100%;
    padding:10px;
    box-sizing:border-box;
}

.modal-footer{
    padding:15px;
    display:flex;
    justify-content:flex-end;
    gap:10px;
    border-top:1px solid #eee;
}


.modal-content{
    width:360px;
    background:#fff;
    border-radius:12px;
    padding:30px;
    position:relative;
}

.modal-content h2{
    margin:0 0 15px;
    text-align:center;
}

.modal-description{
    text-align:center;
    color:#777;
    margin-bottom:20px;
}

.modal-content input{
    width:100%;
    padding:12px;
    font-size:16px;
    border:1px solid #ddd;
    border-radius:6px;
    box-sizing:border-box;
}

.modal-btn{
    margin-top:20px;
    width:100%;
    padding:12px;
    border:0;
    background:#2b7cff;
    color:#fff;
    font-size:16px;
    border-radius:6px;
    cursor:pointer;
}

.modal-btn:hover{
    background:#1664d6;
}

.modal-error{
    margin-top:12px;
    color:#d9534f;
    text-align:center;
    min-height:20px;
}

.modal-btn-close{

    position:absolute;
    right:15px;
    top:10px;
    border:0;
    background:none;
    font-size:24px;
    cursor:pointer;
}

.modal-loading{
    text-align:center;
    padding:40px 20px;
}

.spinner{
    width:42px;
    height:42px;
    margin:0 auto 20px;
    border:4px solid #ddd;
    border-top:4px solid #1976d2;
    border-radius:50%;
    animation:spin .8s linear infinite;
}

@keyframes spin{
    from{
        transform:rotate(0deg);
    }
    to{
        transform:rotate(360deg);
    }
}

.modal-content h2{
    margin:0 0 15px;
    text-align:center;
}

.modal-description{
    margin:0 0 20px;
    text-align:center;
    color:#666;
}

.modal-info{
    margin:20px 0;
    padding:15px;
    border:1px solid #e5e5e5;
    border-radius:10px;
    background:#f8f9fb;
}

.modal-info div{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:8px 0;
}

.modal-info div:not(:last-child){
    border-bottom:1px solid #ececec;
}

.modal-info strong{
    color:#444;
}

.modal-buttons{
    display:flex;
    justify-content:flex-end;
    gap:10px;
    margin-top:25px;
}

.modal-buttons button{
    min-width:140px;
    height:42px;
    border:none;
    border-radius:8px;
    font-size:14px;
    cursor:pointer;
    transition:.2s;
    flex: 1;
}

#modalBtnCancel{
    background:#f1f1f1;
    color:#444;
}

#modalBtnCancel:hover{
    background:#e4e4e4;
}

#modalBtnReserve{
    background:#2196f3;
    color:#fff;
}

#modalBtnReserve:hover{
    background:#1976d2;
}

#modalBtnReserve:disabled{
    opacity:.6;
    cursor:default;
}
/**
* ----- /Модальное окно ------ 
*/