#canvas-container {
    position: relative; /* ensure absolute children are relative to this */
    flex: 1;
    max-width: 400%;
    min-height: 0; /* Allow flex item to shrink */
    overflow: hidden;
}
#visit_div {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 88px); /* Subtract header (48px) and topnav (40px) heights */
    min-height: 0;
    overflow: hidden;
}
.canvas-container {
    display:flex;
    position: relative;
    box-sizing: border-box;
    flex-direction: column;
    margin: 16 32px;
    max-width: calc(100vw - 32px);
    width: calc(100vw - 12px); /* full viewport width minus margins */
    padding: 10px 10px;
    -webkit-box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.5);
    -moz-box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.5);
    box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.5);
    border-radius: 5px;

}
#info {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px;
    border-radius: 5px;
    font-size: 14px;
    max-width: 300px;
    z-index: 10;           /* above the canvas */
    pointer-events: none;  /* don't block OrbitControls by default */
}

/* Allow pointer events on interactive elements inside #info */
#info .toggle-label,
#info .switch {
    pointer-events: auto;
}

#loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 40px;
    border-radius: 10px;
    font-size: 18px;
    z-index: 1000;
}
.hidden {
    display: none;
}
#controls {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px;
    border-radius: 5px;
    font-size: 12px;
}
#click-label {
    position: absolute;
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 30;
    transform: translate(-50%, -120%);
    display: none;
    pointer-events: auto; /* was none */
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    user-select: none;
}

/* Toggle switch container */
.switch {
    position: relative;
    display: inline-block;
    width: 25px;
    height: 12px;
}

/* Hide default checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #1b1b1b;
    transition: .4s;
    border-radius: 12px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 9px;
    width: 9px;
    left: 1px;
    bottom: 1.5px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #cccccc;
}

input:focus + .slider {
    box-shadow: 0 0 1px #cccccc;
}

input:checked + .slider:before {
    transform: translateX(13px);
}