.dental-viewer-canvas {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 320px;
    overflow: hidden;
    background: #f1f4f8;
    touch-action: none;
}

.dental-viewer-canvas canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

.dental-viewer-loading,
.dental-viewer-error {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(241, 244, 248, 0.96);
    color: #475569;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
}

.dental-viewer-loading[hidden],
.dental-viewer-error[hidden] {
    display: none !important;
}

.dental-viewer-error {
    color: #be123c;
}

.dental-viewer-layer-list,
.model-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dental-viewer-layer-toggle {
    min-height: 42px;
    padding: 9px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.dental-viewer-layer-toggle:hover {
    transform: translateY(-1px);
}

.dental-viewer-layer-toggle.active {
    border-color: #0f766e;
    background: #ecfdf5;
    color: #065f46;
}

.dental-viewer-layer-toggle.selected {
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
}

.dental-viewer-opacity-panel {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.88);
}

.dental-viewer-opacity-title {
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.dental-viewer-opacity-name {
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
}

.dental-viewer-opacity-slider {
    width: 100%;
}

.dental-viewer-help {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
    font-size: 13px;
    line-height: 1.55;
}

@media (max-width: 640px) {
    .dental-viewer-layer-toggle {
        min-height: 46px;
        padding: 10px 16px;
        font-size: 15px;
    }

    .dental-viewer-help {
        font-size: 12px;
    }
}
