* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: #fff;
    color: #000;
    line-height: 1.6;
}

.main-content {
    display: flex;
    gap: 24px;
    align-items: stretch;
    margin-top: 10px;
}

.controls-panel {
    width: 300px;
    border: 1px solid #ddd;
    padding: 20px;
    background: #fff;
    flex-shrink: 0;
}

.config-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #111;
}

.control-group input,
.control-group select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 30px;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
}

.control-group select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23000' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px 6px;
}

.section-title {
    font-size: 13px;
    font-weight: 600;
    color: #000;
}

.full-row {
    grid-column: 1 / -1;
}

.status-text {
    margin-top: 16px;
    font-size: 13px;
    color: #1a56db;
}

.hint-text {
    margin-top: 6px;
    font-size: 12px;
    color: #666;
}

.preview-panel {
    flex: 1;
    border: 1px solid #ddd;
    background: #fff;
    padding: 20px;
    min-height: 520px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.preview-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.preview-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #000;
}

.preview-header p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #555;
}


.three-wrapper {
    border: 2px dashed #ccc;
    background: #f9f9f9;
    height: 420px;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
}

#threeContainer,
#threeContainer canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.hidden {
    display: none !important;
}

@media (max-width: 960px) {
    .main-content {
        flex-direction: column;
        gap: 16px;
    }

    .controls-panel {
        width: 100%;
    }

    .preview-panel {
        min-height: 420px;
    }
}


/* FAQ */
.container {
    padding-bottom: 0;
}


/* Standard select chevron with breathing room from the right edge */
.control-group select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 30px;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
}


/* Override the shared select layer: chevron with 8px right inset */
body:not(.ui-editor) .control-group select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 30px;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
}
