
/* ═══════════════════════════════════════════════════════════════
   Canvas Rotation Slider (Vertical) — top-right of the viewport
   Transparent by default; becomes fully visible on hover.
   Default value 50 maps to 0° rotation.
   ═══════════════════════════════════════════════════════════════ */
#canvasRotateSliderWrap {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 230px;
    z-index: 12;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 4px;
    border-radius: 14px;
    background: rgba(15, 17, 20, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0.22;
    transition: opacity 0.22s ease, background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
    user-select: none;
}
#canvasRotateSliderWrap:hover,
#canvasRotateSliderWrap:focus-within,
#canvasRotateSliderWrap.is-active {
    opacity: 1;
    background: rgba(15, 17, 20, 0.88);
    border-color: rgba(139, 92, 246, 0.55);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22),
                0 0 0 1px rgba(139, 92, 246, 0.18);
}
#canvasRotateSlider {
    writing-mode: vertical-lr;
    direction: rtl;
    width: 18px;
    height: 165px;
    margin: 0;
    background: transparent;
    cursor: ns-resize;
    touch-action: none;
}
#canvasRotateSlider::-webkit-slider-runnable-track {
    width: 6px;
    height: 100%;
    background: linear-gradient(to bottom,
        rgba(139, 92, 246, 0.75) 0%,
        rgba(139, 92, 246, 0.35) 50%,
        rgba(34, 197, 94, 0.75) 100%);
    border-radius: 3px;
}
#canvasRotateSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #8b5cf6;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
    margin-left: -5px;
    cursor: ns-resize;
}
#canvasRotateSlider::-moz-range-track {
    width: 6px;
    background: linear-gradient(to bottom,
        rgba(139, 92, 246, 0.75) 0%,
        rgba(139, 92, 246, 0.35) 50%,
        rgba(34, 197, 94, 0.75) 100%);
    border-radius: 3px;
}
#canvasRotateSlider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #8b5cf6;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
    cursor: ns-resize;
}
#canvasRotateValue {
    font-size: 10px;
    color: #e5e7eb;
    font-family: monospace;
    background: rgba(0, 0, 0, 0.35);
    padding: 2px 5px;
    border-radius: 4px;
    min-width: 38px;
    text-align: center;
    pointer-events: none;
}
#canvasRotateReset {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.18);
    border: 1px solid rgba(139, 92, 246, 0.55);
    color: #e9d5ff;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.2s;
}
#canvasRotateReset:hover {
    background: rgba(139, 92, 246, 0.45);
    transform: rotate(-90deg);
}
