:root {
    --primary: #F58220;          /* Laranja N2 - sobrescrito ao vivo pelo color picker */
    --secondary: #FFB067;
    --primary-hover: #D66D18;
    --primary-soft: rgba(245, 130, 32, 0.15);
    --bg-color: #0A0A0A;
    --container-bg: rgba(20, 20, 20, 0.6);
    --modal-bg: #141414;
    --text-main: #FFFFFF;
    --text-muted: #A3A3A3;
    --text-soft: #E0E0E0;
    --text-faint: #6B6B6B;
    --border-color: #2D2D2D;
    --input-bg: #1A1A1A;
    --placeholder: #555555;
    --container-border: rgba(255, 255, 255, 0.05);
    --hover-veil: rgba(255, 255, 255, 0.03);
    --preview-ink: #0A0A0A;
    --preview-tag-ink: rgba(0, 0, 0, 0.45);
    --cta-bg: #0A0A0A;
    --cta-text: #FFFFFF;
    --error: #FF4D4D;
    --success: #00CC66;
    --radius: 12px;
}

/* ===== Temas (cards "estilo visual" trocam ao vivo) ===== */
html[data-theme="clean"] {
    --bg-color: #EEF1F5;
    --container-bg: rgba(255, 255, 255, 0.75);
    --modal-bg: #FFFFFF;
    --text-main: #0F1115;
    --text-muted: #5A616B;
    --text-soft: #3A4049;
    --text-faint: #97A0AC;
    --border-color: #DDE2E9;
    --input-bg: #FFFFFF;
    --placeholder: #A7AEB8;
    --container-border: rgba(15, 17, 21, 0.06);
    --hover-veil: rgba(15, 17, 21, 0.03);
    --cta-bg: #FFFFFF;
    --cta-text: #0F1115;
    --preview-ink: #FFFFFF;
    --preview-tag-ink: rgba(255, 255, 255, 0.7);
}

html[data-theme="vibrante"] {
    --bg-color: #0B0614;
    --container-bg: rgba(28, 16, 48, 0.6);
    --modal-bg: #1A0F2E;
    --text-main: #FFFFFF;
    --text-muted: #B7A8D0;
    --text-soft: #E9E2F5;
    --text-faint: #7A6B95;
    --border-color: #3A2A5C;
    --input-bg: #170D28;
    --placeholder: #6B5A8A;
    --container-border: rgba(255, 255, 255, 0.08);
    --hover-veil: rgba(255, 255, 255, 0.05);
}

html[data-theme="corporativo"] {
    --bg-color: #08131F;
    --container-bg: rgba(15, 39, 67, 0.6);
    --modal-bg: #0F2743;
    --text-main: #F2F6FA;
    --text-muted: #8FA6BC;
    --text-soft: #DCE6F0;
    --text-faint: #5C7691;
    --border-color: #1E3A5F;
    --input-bg: #0C1D31;
    --placeholder: #4F6B85;
    --container-border: rgba(255, 255, 255, 0.07);
    --hover-veil: rgba(255, 255, 255, 0.04);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Efeitos de Fundo */
.background-elements {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-soft) 0%, transparent 70%);
    filter: blur(60px);
    transition: background 0.4s ease;
}

.glow-1 { top: -200px; left: -200px; }
.glow-2 { bottom: -200px; right: -200px; }

/* Container */
.container {
    width: 100%;
    max-width: 820px;
    background-color: var(--container-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--container-border);
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 1;
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

html[data-theme="clean"] .container {
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.15);
}

/* Duas versões da logo: a padrão é branca, a "fundo claro" tem o N preto.
   O :has garante que a escura permaneça caso logofundoclaro.png falhe e se remova. */
.logo-light { display: none; }

html[data-theme="clean"] .logo-light { display: inline-block; }

html[data-theme="clean"]:has(.logo-light) .logo-dark { display: none; }

html[data-theme="clean"] .logo-fallback h1,
html[data-theme="clean"] .logo-fallback small {
    color: var(--text-main);
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 36px;
}

.logo {
    max-height: 60px;
    margin-bottom: 20px;
    object-fit: contain;
}

.logo-fallback h1 {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 15px;
    color: var(--text-main);
}
.logo-fallback span { color: var(--primary); }
.logo-fallback small {
    display: block;
    font-size: 14px;
    letter-spacing: 4px;
    font-weight: 600;
    color: var(--text-main);
    margin-top: -5px;
}

.header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.header p {
    color: var(--text-muted);
    font-size: 15px;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Stepper ===== */
.stepper {
    position: relative;
    margin-bottom: 40px;
}

.stepper-track {
    position: absolute;
    top: 18px;
    left: 12%;
    right: 12%;
    height: 3px;
    background-color: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.stepper-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 10px;
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px var(--primary-soft);
}

.stepper-list {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    list-style: none;
}

.stepper-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: default;
}

.stepper-item[data-clickable="true"] { cursor: pointer; }

.stepper-dot {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--input-bg);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.stepper-item.active .stepper-dot {
    border-color: var(--primary);
    color: var(--primary);
    background-color: var(--input-bg);
    box-shadow: 0 0 0 5px var(--primary-soft);
}

.stepper-item.done .stepper-dot {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #000;
}

.stepper-item.done .stepper-dot::after {
    content: '✓';
    font-size: 16px;
}
.stepper-item.done .stepper-dot { font-size: 0; }

.stepper-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    transition: color 0.3s ease;
}

.stepper-item.active .stepper-label,
.stepper-item.done .stepper-label { color: var(--text-main); }

.stepper-label em {
    display: block;
    font-style: normal;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-faint);
}

/* ===== Steps ===== */
.form-step {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.form-step.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 26px;
    flex-wrap: wrap;
}

.form-step[data-step="1"] .step-head {
    justify-content: center;
    text-align: center;
}

h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.3px;
}

.step-time {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    background-color: var(--primary-soft);
    padding: 4px 12px;
    border-radius: 100px;
    white-space: nowrap;
}

.step-time-soft {
    color: var(--text-muted);
    background-color: var(--hover-veil);
}

/* ===== Inputs ===== */
.input-group {
    margin-bottom: 22px;
    display: flex;
    flex-direction: column;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.opt-tag {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-faint);
    margin-left: 6px;
    text-transform: lowercase;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
textarea {
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 14px 16px;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

input::placeholder,
textarea::placeholder { color: var(--placeholder); }

.reveal-input {
    margin-top: 12px;
    animation: fadeIn 0.25s ease;
}

.privacy-note {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 6px;
}

/* ===== Chips (radio/checkbox compactos) ===== */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip {
    position: relative;
    margin: 0;
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    transition: all 0.2s ease;
    user-select: none;
}

.chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.chip:hover { border-color: var(--primary); transform: translateY(-1px); }

.chip.is-selected {
    background-color: var(--primary-soft);
    border-color: var(--primary);
    color: var(--text-main);
    font-weight: 600;
}

/* ===== Cards de opção ===== */
.card-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.opt-card {
    position: relative;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 12px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    user-select: none;
}

.opt-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.opt-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.opt-card.is-selected {
    border-color: var(--primary);
    background-color: var(--primary-soft);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.opt-card.is-selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
}

.opt-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

/* Tamanho travado: mesmo viewBox 24x24 para ícone de linha e logo de marca */
.opt-icon .ico {
    width: 24px;
    height: 24px;
    display: block;
}

.opt-card:hover .opt-icon,
.opt-card.is-selected .opt-icon { color: var(--primary); }

.opt-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

/* ===== Cards de estilo visual ===== */
.style-group { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.style-card { padding: 14px; gap: 12px; }

.style-preview {
    width: 100%;
    height: 62px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    overflow: hidden;
}

.style-preview i { display: block; height: 6px; border-radius: 3px; }
.style-preview i:nth-child(1) { width: 70%; }
.style-preview i:nth-child(2) { width: 45%; }
.style-preview i:nth-child(3) { width: 32%; height: 14px; border-radius: 4px; }

.style-preview.premium { background: linear-gradient(135deg, #101010, #262626); }
.style-preview.premium i:nth-child(1) { background: #EDEDED; }
.style-preview.premium i:nth-child(2) { background: #5A5A5A; }
.style-preview.premium i:nth-child(3) { background: #D4AF37; }

.style-preview.clean { background: linear-gradient(135deg, #FFFFFF, #EFEFEF); }
.style-preview.clean i:nth-child(1) { background: #1A1A1A; }
.style-preview.clean i:nth-child(2) { background: #B4B4B4; }
.style-preview.clean i:nth-child(3) { background: #2563EB; }

.style-preview.vibrante { background: linear-gradient(135deg, #FF3D00, #8B5CF6); }
.style-preview.vibrante i:nth-child(1) { background: #FFFFFF; }
.style-preview.vibrante i:nth-child(2) { background: rgba(255,255,255,0.55); }
.style-preview.vibrante i:nth-child(3) { background: #FFE600; }

.style-preview.corporativo { background: linear-gradient(135deg, #0F2743, #1E3A5F); }
.style-preview.corporativo i:nth-child(1) { background: #E8EEF5; }
.style-preview.corporativo i:nth-child(2) { background: #7A93AD; }
.style-preview.corporativo i:nth-child(3) { background: #3B82F6; }

/* ===== Bloco de cores ===== */
.color-block {
    background-color: var(--hover-veil);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
}

.swatch-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.swatch {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--sw);
    border: 2px solid transparent;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
    cursor: pointer;
    padding: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.swatch:hover { transform: scale(1.12); }

.swatch.is-selected {
    border-color: var(--bg-color);
    box-shadow: 0 0 0 2px var(--sw);
    transform: scale(1.12);
}

.picker-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.picker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 8px 14px 8px 8px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.picker:hover { border-color: var(--primary); }

.picker input[type="color"] {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    padding: 0;
}
.picker input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.picker input[type="color"]::-webkit-color-swatch {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}
.picker input[type="color"]::-moz-color-swatch {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.picker-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin: 0;
}

.picker-text b {
    color: var(--text-main);
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    font-size: 12px;
    margin-left: 4px;
}

.btn-ghost {
    background: none;
    border: 1px dashed var(--border-color);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 100px;
}

.btn-ghost:hover { color: var(--text-main); border-color: var(--text-faint); }

/* Prévia ao vivo */
.color-preview {
    position: relative;
    border-radius: var(--radius);
    padding: 22px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    transition: background 0.3s ease;
    overflow: hidden;
}

.preview-tag {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--preview-tag-ink);
}

.preview-body { color: var(--preview-ink); }

.preview-body strong {
    display: block;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.preview-body p {
    font-size: 13px;
    opacity: 0.75;
    margin-bottom: 14px;
}

.preview-cta {
    display: inline-block;
    background-color: var(--cta-bg);
    color: var(--cta-text);
    font-size: 13px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 100px;
}

/* ===== Passo 3: banner + accordions ===== */
.skip-banner {
    background-color: var(--primary-soft);
    border-left: 4px solid var(--primary);
    padding: 14px 18px;
    border-radius: 4px var(--radius) var(--radius) 4px;
    margin-bottom: 22px;
    font-size: 14px;
    color: var(--text-soft);
}

.accordion {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 12px;
    background-color: var(--hover-veil);
    overflow: hidden;
}

.accordion summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background-color 0.2s ease;
}

.accordion summary::-webkit-details-marker { display: none; }

.accordion summary::after {
    content: '+';
    margin-left: auto;
    font-size: 20px;
    font-weight: 400;
    color: var(--primary);
    transition: transform 0.25s ease;
}

.accordion[open] summary::after { content: '−'; }

.accordion summary:hover { background-color: var(--hover-veil); }

.accordion[open] summary { border-bottom: 1px solid var(--border-color); }

.acc-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
}

.acc-meta {
    font-size: 12px;
    color: var(--text-faint);
}

.acc-body {
    padding: 22px 20px 4px;
    animation: fadeIn 0.3s ease;
}

.accordion.filled summary .acc-title::before {
    content: '✓ ';
    color: var(--primary);
}

.materials-alert {
    background-color: var(--hover-veil);
    border-left: 3px solid var(--primary);
    padding: 14px 18px;
    border-radius: 4px 8px 8px 4px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-soft);
}

/* ===== Botões ===== */
.form-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.nav-right { margin-left: auto; }

button {
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

button[hidden] { display: none; }

.btn-primary,
.btn-submit {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #000;
}

.btn-primary:hover,
.btn-submit:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--primary-soft);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--hover-veil);
    border-color: var(--text-faint);
}

/* Estado inválido */
input.touched:invalid,
textarea.touched:invalid { border-color: var(--error); }

.field-error {
    font-size: 12px;
    color: var(--error);
    margin-top: 6px;
    font-weight: 500;
}

.chip-group.has-error .chip,
.card-group.has-error .opt-card { border-color: var(--error); }

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 100;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.modal.show { display: flex; }
.modal-content {
    background-color: var(--modal-bg);
    padding: 50px;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    text-align: center;
    border: 1px solid var(--border-color);
    animation: fadeIn 0.4s ease;
}
.success-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(0, 204, 102, 0.1);
    color: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 20px;
}
.modal h2 { margin-bottom: 15px; }
.modal p { color: var(--text-muted); }

/* ===== Responsivo ===== */
@media (max-width: 768px) {
    body { padding: 20px 12px; }

    .container {
        padding: 28px 18px;
        border-radius: 16px;
    }

    .input-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .header h2 { font-size: 22px; }

    .stepper-track { left: 18%; right: 18%; }
    .stepper-label { font-size: 11px; }
    .stepper-label em { display: none; }

    .card-group { grid-template-columns: repeat(2, 1fr); }

    .picker-row { flex-direction: column; align-items: stretch; }
    .picker { justify-content: flex-start; }
    .btn-ghost { width: 100%; }

    .form-navigation { flex-direction: row; }
    button { padding: 13px 18px; font-size: 15px; }
    .modal-content { padding: 32px 22px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* ===== Seletor de cor proprio (picker.js) ===== */
.swatch-custom {
    background: conic-gradient(from 0deg, #ff3b3b, #ffd23b, #3bff6e, #3bd8ff, #4a3bff, #ff3bd8, #ff3b3b);
    /* Chrome nao arredonda conic-gradient durante o scale do hover: recorta o circulo explicitamente */
    clip-path: circle(50%);
    border: 0;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.swatch-custom span {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--modal-bg);
    color: var(--text-main);
    font-size: 16px;
    font-weight: 600;
    line-height: 22px;
    text-align: center;
}

.picker { user-select: none; }
.picker input[type="color"] { pointer-events: none; }

.cp-panel {
    margin-top: 14px;
    width: 100%;
    max-width: 340px;
    padding: 16px;
    background: var(--modal-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    animation: cpIn 0.16s ease-out;
}
.cp-panel[hidden] { display: none; }
@keyframes cpIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.cp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cp-title { font-size: 13px; font-weight: 600; color: var(--text-main); }
.cp-close {
    background: none; border: 0; color: var(--text-muted); font-size: 22px; line-height: 1;
    cursor: pointer; padding: 0 4px;
}
.cp-close:hover { color: var(--text-main); }

.cp-sv {
    position: relative;
    height: 160px;
    border-radius: 8px;
    background:
        linear-gradient(to top, #000, rgba(0, 0, 0, 0)),
        linear-gradient(to right, #fff, rgba(255, 255, 255, 0)),
        var(--cp-hue, #f00);
    cursor: crosshair;
    touch-action: none;
    outline: none;
}
.cp-sv:focus-visible { box-shadow: 0 0 0 2px var(--primary); }
.cp-sv-thumb {
    position: absolute;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.cp-hue {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    height: 12px;
    margin: 14px 0;
    border-radius: 999px;
    background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
    outline: none;
    cursor: pointer;
}
.cp-hue::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px; border-radius: 50%;
    background: #fff; border: 2px solid rgba(0, 0, 0, 0.25);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.cp-hue::-moz-range-thumb {
    width: 18px; height: 18px; border-radius: 50%;
    background: #fff; border: 2px solid rgba(0, 0, 0, 0.25);
}

.cp-row { display: flex; align-items: center; gap: 8px; }
.cp-chip {
    flex: 0 0 34px; height: 34px; border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}
.cp-hex {
    flex: 1; min-width: 0; height: 34px; padding: 0 10px;
    background: var(--input-bg); color: var(--text-main);
    border: 1px solid var(--border-color); border-radius: 8px;
    font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 14px; text-transform: uppercase;
}
.cp-hex:focus { outline: none; border-color: var(--primary); }
.cp-hex.is-invalid { border-color: var(--error); }
.cp-eye {
    flex: 0 0 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--input-bg); color: var(--text-muted);
    border: 1px solid var(--border-color); border-radius: 8px; cursor: pointer;
}
.cp-eye:hover { color: var(--text-main); border-color: var(--text-faint); }
.cp-eye[hidden] { display: none; }

.cp-hint { margin: 10px 0 12px; font-size: 12px; color: var(--text-faint); }
.cp-ok {
    width: 100%; height: 38px; border: 0; border-radius: 8px; cursor: pointer;
    background: var(--primary); color: var(--cta-text); font-weight: 600; font-family: inherit;
}
.cp-ok:hover { background: var(--primary-hover); }

@media (max-width: 600px) {
    .cp-panel { max-width: none; }
}
