.cds-wrap {
    --cds-blue: #1c50c8;
    --cds-blue-dark: #143a95;
    --cds-ink: #1d2740;
    --cds-soft: #f4f7ff;
    --cds-line: #d5e1ff;
    --cds-shadow: 0 18px 50px rgba(18, 48, 117, 0.12);
    color: var(--cds-ink);
    font-family: inherit;
    width: min(1180px, 100%);
    margin: 0 auto;
}

.cds-wrap * {
    box-sizing: border-box;
}

.cds-shell {
    width: 100%;
    padding: 18px;
    border: 1px solid var(--cds-line);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--cds-shadow);
}

.cds-head {
    margin-bottom: 14px;
}

.cds-options-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid var(--cds-line);
    border-radius: 16px;
    background: #fff;
}

.cds-option-group {
    min-width: 0;
}

.cds-option-group h3 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 700;
    color: #162948;
}

.cds-option-grid {
    display: grid;
    gap: 10px;
}

.cds-option-grid-3 {
    grid-template-columns: 1fr;
}

.cds-option-grid-2 {
    grid-template-columns: 1fr;
}

.cds-option-btn {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 4px;
    min-height: 52px;
    padding: 12px 14px;
    border: 1px solid #d8e0ef;
    border-radius: 10px;
    background: #fff;
    color: #0f1f3d;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.cds-option-btn.active {
    border-color: #1c7ed6;
    box-shadow: inset 0 0 0 1px #1c7ed6;
    color: #1c50c8;
    background: #f8fbff;
}

.cds-option-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

.cds-option-note {
    font-size: 11px;
    line-height: 1.2;
    color: #66758f;
}

.cds-kicker {
    display: inline-block;
    margin-bottom: 10px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #e9f0ff;
    color: var(--cds-blue);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cds-stage {
    display: grid;
    grid-template-columns: minmax(300px, 0.92fr) minmax(340px, 1.08fr);
    gap: 14px;
    align-items: start;
}

.cds-stage-left,
.cds-stage-right {
    min-width: 0;
}

.cds-dropzone-card,
.cds-controls,
.cds-preview,
.cds-cta {
    border: 1px solid var(--cds-line);
    border-radius: 16px;
    background: #fff;
}

.cds-dropzone-card,
.cds-controls,
.cds-preview {
    padding: 14px;
}

.cds-dropzone {
    position: relative;
    display: flex;
    min-height: 220px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px dashed var(--cds-blue);
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fbff 0%, #edf4ff 100%);
    text-align: center;
    cursor: pointer;
}

.cds-dropzone.is-dragover {
    background: #e9f1ff;
}

.cds-file-input {
    display: none;
}

.cds-dropzone-copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
    padding: 18px;
}

.cds-dropzone-preview-state {
    position: relative;
    z-index: 1;
    display: none;
    width: 100%;
    padding: 20px 18px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.cds-art-preview-label {
    display: block;
    margin-bottom: 6px;
    color: #1f2937;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.cds-dropzone-preview {
    display: block;
    max-width: 180px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.cds-art-preview {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.cds-art-change-text {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
}

.cds-dropzone.has-preview .cds-dropzone-copy {
    display: none;
}

.cds-dropzone.has-preview .cds-dropzone-preview-state {
    display: flex;
}

.cds-dropzone-icon {
    color: var(--cds-blue);
    font-size: 36px;
    line-height: 1;
}

.cds-file-name {
    margin-top: 8px;
    font-size: 14px;
    color: #51607c;
}

.cds-dropzone-card.has-artwork .cds-file-name {
    display: none;
}

.cds-controls {
    display: grid;
    gap: 14px;
    margin-top: 10px;
}

.cds-controls-simple .cds-controls-copy {
    display: grid;
    gap: 4px;
    font-size: 14px;
    color: #51607c;
}

.cds-button-row,
.cds-submit,
.cds-cta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cds-preview {
    margin-bottom: 0;
}

.cds-preview-head {
    margin-bottom: 16px;
}

.cds-preview-head h3,
.cds-preview-head span,
.cds-head h2,
.cds-head p,
.cds-modal-form h3,
.cds-modal-form p {
    margin: 0;
}

.cds-preview-head h3 {
    color: #0f2a57;
}

.cds-3d-container {
    height: 400px;
}

.cds-3d-canvas-wrap,
.cds-3d-canvas {
    width: 100%;
    height: 100%;
}

.cds-3d-canvas {
    display: block;
}

.cds-loading-spinner {
    width: 50px;
    height: 50px;
    margin-bottom: 16px;
    border: 4px solid #dbeafe;
    border-top-color: #0ea5e9;
    border-radius: 50%;
    animation: cds-spin 1s linear infinite;
}

@keyframes cds-spin {
    to {
        transform: rotate(360deg);
    }
}

.cds-btn {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 13px 20px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
}

.cds-btn:focus,
.cds-btn:active {
    outline: none;
}

.cds-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(28, 80, 200, 0.18);
}

.cds-btn-primary {
    background: linear-gradient(135deg, var(--cds-blue) 0%, #2a6af0 100%);
    color: #fff;
}

.cds-btn-primary:hover {
    background: linear-gradient(135deg, var(--cds-blue-dark) 0%, #235ce0 100%);
}

.cds-btn-secondary {
    background: #e8efff;
    color: var(--cds-blue);
}

.cds-btn-secondary:hover {
    background: #253555;
    color: #fff;
}

.cds-controls .cds-btn-secondary:focus-visible,
.cds-controls .cds-btn-secondary:hover {
    background: #253555;
    color: #fff;
}

.cds-btn-ghost {
    background: #253555;
    color: #fff;
}

.cds-btn-ghost:hover {
    background: #1d2942;
}

.cds-cta {
    justify-content: center;
    margin-top: 6px;
    padding: 0;
    border: 0;
    background: transparent;
}

.cds-cta .cds-btn {
    min-width: 210px;
}

.cds-file-name.is-error {
    color: #f9a008;
    font-weight: 600;
}

.cds-reset-view {
    padding: 0;
}

.cds-modal[hidden] {
    display: none;
}

.cds-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.cds-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 16, 36, 0.7);
}

.cds-confirm-modal[hidden] {
    display: none;
}

.cds-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cds-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 16, 36, 0.55);
}

.cds-confirm-dialog {
    position: relative;
    z-index: 1;
    width: min(420px, calc(100vw - 30px));
    padding: 24px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(22, 45, 107, 0.18);
}

.cds-confirm-dialog h3 {
    margin: 0 0 8px;
    color: #1c50c8;
    font-size: 22px;
    font-weight: 700;
}

.cds-confirm-dialog p {
    margin: 0;
    color: #5d6d8d;
    font-size: 14px;
    line-height: 1.5;
}

.cds-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 22px;
}

.cds-thankyou-modal[hidden] {
    display: none;
}

.cds-thankyou-modal {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cds-thankyou-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 33, 71, 0.32);
}

.cds-thankyou-dialog {
    position: relative;
    z-index: 1;
    width: min(600px, calc(100vw - 30px));
    padding: 60px 40px;
    overflow: hidden;
    border: 1px solid rgba(28, 80, 200, 0.2);
    border-radius: 20px;
    background: linear-gradient(145deg, #ffffff, #f0f4ff);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.cds-thankyou-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.cds-thankyou-orb-one {
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(28, 80, 200, 0.15) 0%, rgba(28, 80, 200, 0) 70%);
}

.cds-thankyou-orb-two {
    left: -80px;
    bottom: -80px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0) 70%);
}

.cds-thankyou-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1c50c8, #3b82f6);
    box-shadow: 0 10px 20px rgba(28, 80, 200, 0.3);
    color: #fff;
    animation: cds-scale-in 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.cds-thankyou-icon svg {
    width: 40px;
    height: 40px;
}

.cds-thankyou-title {
    margin: 0 0 15px;
    color: #1c50c8;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.5px;
    opacity: 0;
    animation: cds-fade-up 0.6s ease forwards 0.2s;
}

.cds-thankyou-copy {
    margin: 0;
    color: #1c50c8;
    font-size: 18px;
    line-height: 1.6;
    font-weight: 400;
    opacity: 0;
    animation: cds-fade-up 0.6s ease forwards 0.4s;
}

@keyframes cds-scale-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes cds-fade-up {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.cds-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(520px, calc(100vw - 30px));
    max-height: calc(100vh - 30px);
    margin: 15px auto;
    padding: 28px 24px 22px;
    overflow: auto;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(22, 45, 107, 0.18);
}

.cds-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: #eef3ff;
    color: var(--cds-blue);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.cds-modal-form {
    display: grid;
    gap: 16px;
}

.cds-modal-form h3 {
    color: #1c50c8;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px;
}

.cds-modal-form p {
    color: #5d6d8d;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.cds-field {
    position: relative;
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.cds-field label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
}

.cds-field input {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border: 1px solid #d8dee9;
    border-radius: 10px;
    color: #334155;
    background: #fff;
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cds-field input::placeholder {
    color: #94a3b8;
}

.cds-field input:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.cds-field.has-error input {
    border-color: #ffb74d;
    box-shadow: 0 0 0 4px rgba(255, 152, 0, 0.18);
}

.cds-error {
    position: absolute;
    bottom: -35px;
    left: 0;
    max-width: 250px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 4px;
    background: #ff9800;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 12px;
    color: #fff;
    font-weight: 500;
    z-index: 100;
}

.cds-error::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 15px;
    border-width: 0 6px 6px 6px;
    border-style: solid;
    border-color: transparent transparent #ff9800 transparent;
}

.cds-error .icon {
    font-weight: bold;
    background: #fff;
    color: #ff9800;
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 10px;
}

.cds-summary {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #d8e0ef;
    border-radius: 10px;
    background: #f8fbff;
    color: #334155;
}

.cds-summary-media {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e6edf9;
}

.cds-art-preview-label-modal {
    text-align: left;
    margin-bottom: 10px;
}

.cds-config-section {
    padding: 16px;
    border: 1px solid #d8e0ef;
    border-radius: 12px;
    background: #fff;
}

.cds-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.cds-checkbox-wrapper input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cds-checkbox-custom {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    margin-top: 2px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    position: relative;
}

.cds-checkbox-wrapper input:checked + .cds-checkbox-custom {
    background: #1c50c8;
    border-color: #1c50c8;
}

.cds-checkbox-wrapper input:checked + .cds-checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.cds-sample-info {
    display: grid;
    gap: 4px;
    flex: 1;
}

.cds-sample-info strong {
    color: #1f2937;
    font-size: 15px;
}

.cds-sample-info small {
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.cds-sample-price {
    color: #1c50c8;
    font-size: 15px;
    font-weight: 700;
}

.cds-summary-preview {
    display: block;
    max-width: 180px;
    max-height: 110px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.cds-status {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.6;
    color: #51607c;
}

.cds-status.is-success {
    color: #0d6a3e;
}

.cds-status.is-error {
    color: #b02a4a;
}

.cds-submit {
    display: block;
}

.cds-submit .cds-btn {
    width: 100%;
    min-height: 52px;
    border-radius: 10px;
}

@media (max-width: 991px) {
    .cds-options-panel {
        grid-template-columns: 1fr;
    }

    .cds-stage {
        grid-template-columns: 1fr;
    }

    .cds-3d-container {
        height: 380px;
    }
}

@media (max-width: 767px) {
    .cds-shell,
    .cds-modal-dialog {
        padding: 16px;
    }

    .cds-options-panel {
        padding: 14px;
    }

    .cds-3d-container {
        height: 320px;
    }

    .cds-modal-dialog {
        width: min(100vw - 12px, 100%);
        max-height: calc(100vh - 12px);
        margin: 6px auto;
        border-radius: 18px;
    }
}
