.rhg-hourglass-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-family: inherit;
}

.rhg-stage {
    position: relative;
    max-width: 100%;
}

/* Responsive mode (rhg_render_markup 'responsive' => true): fill whatever
   sized/positioned parent container the embedding page provides, instead
   of the fixed pixel width/height used by the standalone shortcode. The
   canvas's internal drawing resolution still comes from width/height (data
   attributes) — this only changes its DISPLAYED size, same as scaling an
   image, which is fine at these dimensions. */
.rhg-hourglass-wrap.rhg-responsive,
.rhg-hourglass-wrap.rhg-responsive .rhg-stage {
    width: 100%;
    height: 100%;
}

.rhg-stage svg.rhg-glass-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}

.rhg-stage canvas.rhg-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.rhg-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.rhg-btn {
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: #fff;
    color: #222;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}
.rhg-btn:hover {
    background: #f2f2f2;
}
.rhg-btn:active {
    transform: scale(0.96);
}
.rhg-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

@media (prefers-color-scheme: dark) {
    .rhg-btn {
        background: #2a2a2a;
        color: #eee;
        border-color: rgba(255, 255, 255, 0.15);
    }
    .rhg-btn:hover {
        background: #363636;
    }
}
