.voronoi-page {
    max-width: 1400px;
    margin: 0 auto;
}

.voronoi-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.toolbar-spacer {
    flex: 1 1 auto;
}

.zoom-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.zoom-label {
    min-width: 48px;
    text-align: center;
    font-size: 12px;
    color: #5b6472;
}

.canvas-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.canvas-wrap {
    position: relative;
    background: #eef1f5;
}

.canvas-wrap canvas {
    display: block;
    touch-action: pan-y;
    cursor: default;
}

.canvas-wrap canvas.add-mode {
    cursor: crosshair;
}

.canvas-wrap canvas.dragging {
    cursor: grabbing;
}

.canvas-wrap canvas.panning {
    cursor: move;
}

.canvas-wrap canvas:focus-visible {
    outline: 3px solid #0d6efd;
    outline-offset: -3px;
}

.status-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    padding: 8px 12px;
    border-top: 1px solid #eef1f5;
    font-size: 13px;
    color: #5b6472;
}

.status-bar strong {
    color: #1f2937;
    font-weight: 600;
}

.status-selected {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-selected label {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin: 0;
    font-size: 12px;
}

.coord-input {
    width: 76px;
    padding: 2px 4px;
    font-size: 12px;
    border: 1px solid #d6dbe2;
    border-radius: 6px;
    background: #fff;
}

.coord-input:disabled {
    background: #f4f6f8;
    color: #9aa3af;
}

.empty-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 80%;
    padding: 10px 16px;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    pointer-events: none;
}

.control-card {
    padding: 16px;
    margin-bottom: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.control-card h5 {
    margin-bottom: 12px;
    padding-bottom: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
}

.control-card h5 small {
    font-size: 12px;
    font-weight: 400;
    color: #8b95a1;
}

.control-card label {
    margin-bottom: 3px;
    font-size: 12px;
    color: #666;
}

.control-card .form-select-sm,
.control-card .form-control-sm {
    font-size: 13px;
    border-radius: 8px;
}

.form-range {
    height: 6px;
}

.count-display {
    display: inline-block;
    min-width: 32px;
    margin-left: 4px;
    font-size: 16px;
    font-weight: 700;
    color: #0d6efd;
    text-align: center;
}

.param-estimate {
    font-size: 12px;
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.06);
    border-radius: 6px;
    padding: 6px 8px;
}

.export-card {
    position: sticky;
    bottom: 16px;
}

.export-report {
    margin: 10px 0 0;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.5;
    color: #1f2937;
    background: #f8f9fb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    white-space: pre-wrap;
}

.export-help {
    line-height: 1.5;
}

.explanation {
    padding: 16px 20px;
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.explanation summary {
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
}

.explanation ul {
    padding-left: 20px;
    margin-bottom: 0;
}

.explanation ul li {
    margin-bottom: 4px;
}

.toast-bar {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1080;
    max-width: 380px;
    padding: 10px 16px;
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
    background: #212529;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
    white-space: pre-line;
}

.toast-bar.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-bar.error {
    background: #b02a37;
}

.toast-bar.warn {
    background: #8a6d3b;
}

@media (max-width: 1199.98px) {
    .export-card {
        position: static;
    }
}

@media (max-width: 575.98px) {
    .status-bar {
        font-size: 12px;
        gap: 4px 12px;
    }

    .coord-input {
        width: 64px;
    }

    .voronoi-toolbar {
        gap: 6px;
    }
}
