.spatial-style-editor {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 4px 0;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.spatial-style-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #3498db;
    border-radius: 4px;
}
.spatial-style-back-btn {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}
.spatial-style-back-btn:hover {
    background: rgba(255,255,255,0.3);
}
.spatial-style-header-content {
    flex: 1;
    min-width: 0;
}
.spatial-style-header-title {
    display: none;
}
.spatial-style-header-layer {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.spatial-style-header-geom {
    flex-shrink: 0;
}
.spatial-style-geom-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    background: rgba(255,255,255,0.25);
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.spatial-style-geom-badge svg {
    opacity: 0.9;
}
.spatial-style-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.spatial-style-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    padding: 5px 10px;
    background: #3498db;
    border-radius: 4px;
    margin: 0 -4px;
    letter-spacing: 0.3px;
}
.spatial-style-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.spatial-style-row label {
    font-size: 12px;
    color: #666;
    width: 60px;
    flex-shrink: 0;
}
.spatial-style-row input[type="color"] {
    width: 32px;
    height: 28px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px;
    cursor: pointer;
    flex-shrink: 0;
}
.spatial-style-row input[type="range"] {
    flex: 1;
    height: 4px;
    min-width: 0;
    position: relative;
}
.spatial-style-row input[type="range"]::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    -webkit-appearance: none;
    position: relative;
}
.spatial-style-row input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: none;
}
.spatial-style-row input[type="number"] {
    width: 60px;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
}
.spatial-style-row select {
    flex: 1;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    min-width: 0;
}
.spatial-style-range-wrapper {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.spatial-style-range-wrapper input[type="range"] {
    flex: 1;
}
.spatial-style-range-val {
    width: 28px;
    height: 28px;
    background: #3498db;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 600;
    pointer-events: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    flex-shrink: 0;
}
.spatial-style-preview {
    height: 60px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    overflow: hidden;
}
.spatial-style-preview canvas {
    max-width: 100%;
    max-height: 100%;
}
.spatial-style-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
    min-width: 0;
}
.spatial-style-palette-item {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.1s;
    flex-shrink: 0;
}
.spatial-style-palette-item:hover {
    transform: scale(1.15);
}
.spatial-style-palette-item.selected {
    border-color: #333;
}
.spatial-style-shapes {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.spatial-style-shape-btn {
    width: 32px;
    height: 32px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: border-color 0.15s, background 0.15s;
    flex-shrink: 0;
}
.spatial-style-shape-btn:hover {
    border-color: #3498db;
}
.spatial-style-shape-btn.selected {
    border-color: #3498db;
    background: #e3f2fd;
}
.spatial-style-footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding-top: 8px;
    border-top: 1px solid #eee;
}
.spatial-style-btn-back {
    padding: 8px 16px;
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.spatial-style-btn-back:hover {
    background: #f5f5f5;
}
.spatial-style-btn-apply {
    padding: 8px 20px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.spatial-style-btn-apply:hover {
    background: #2980b9;
}
.spatial-style-dash-options {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.spatial-style-dash-btn {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 11px;
    cursor: pointer;
    flex-shrink: 0;
}
.spatial-style-dash-btn.selected {
    border-color: #3498db;
    background: #e3f2fd;
    color: #2980b9;
}
.spatial-style-icon-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}
.spatial-style-icon-file {
    display: none;
}
.spatial-style-icon-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border: 1px dashed #ccc;
    border-radius: 4px;
    font-size: 11px;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s, background 0.2s;
}
.spatial-style-icon-label:hover {
    border-color: #3498db;
    background: #f0f8ff;
}
.spatial-style-icon-label.has-image {
    border-style: solid;
    border-color: #3498db;
    background: #f0f8ff;
    padding: 3px 10px;
}
.spatial-style-icon-preview {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 3px;
}
.spatial-style-icon-clear {
    width: 24px;
    height: 24px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
    color: #999;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.spatial-style-icon-clear:hover {
    background: #fee;
    color: #c00;
    border-color: #fcc;
}
