/**
 * Chat vocacional v2 — espelha tokens e padrões visuais do protótipo em UIV0
 * (app/globals.css, ProgressHeader, QuestionCard, RatingScale).
 * Fonte: Geist (Google Fonts) como no layout.tsx do v0.
 */

body.teste-chat-page--v2 {
    margin: 0;
    min-height: 100vh;
    font-family: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;

    /* Tokens UIV0 (:root claro) — primary/ring vêm do inline Razor (cor da IES) */
    --background: oklch(0.98 0.005 280);
    --foreground: oklch(0.2 0.02 280);
    --card: oklch(1 0 0);
    --card-foreground: oklch(0.2 0.02 280);
    --popover: oklch(1 0 0);
    --popover-foreground: oklch(0.2 0.02 280);
    --secondary: oklch(0.95 0.02 280);
    --secondary-foreground: oklch(0.3 0.02 280);
    --muted: oklch(0.95 0.01 280);
    --muted-foreground: oklch(0.5 0.02 280);
    --accent: oklch(0.7 0.15 200);
    --accent-foreground: oklch(1 0 0);
    --border: oklch(0.9 0.01 280);
    --input: oklch(0.95 0.01 280);
    --radius: 1rem;
    --primary-foreground: oklch(1 0 0);

    background: var(--background);
    color: var(--foreground);
}

/* Shell do quiz (após intro / lead) */
body.teste-chat-page--v2 .teste-v0-quiz-shell.teste-v0-root {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background: linear-gradient(
        to bottom right,
        color-mix(in oklch, var(--primary) 12%, transparent),
        color-mix(in oklch, var(--accent) 6%, transparent),
        var(--background)
    );
}

@supports not (background: color-mix(in lch, red, blue)) {
    body.teste-chat-page--v2 .teste-v0-quiz-shell.teste-v0-root {
        background: var(--background);
    }
}

body.teste-chat-page--v2 .teste-v0-phase[hidden] {
    display: none !important;
}

/* ========== Fase intro (quiz-intro.tsx) ========== */
body.teste-chat-page--v2 .teste-v0-intro-page {
    min-height: 100vh;
    background: var(--background);
    color: var(--foreground);
}

body.teste-chat-page--v2 .teste-v0-intro-hero {
    position: relative;
    overflow: hidden;
}

body.teste-chat-page--v2 .teste-v0-intro-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom right,
        color-mix(in oklch, var(--primary) 14%, transparent),
        color-mix(in oklch, var(--accent) 8%, transparent),
        var(--background)
    );
}

@supports not (background: color-mix(in lch, red, blue)) {
    body.teste-chat-page--v2 .teste-v0-intro-hero-bg {
        background: linear-gradient(135deg, rgba(219, 39, 119, 0.08), var(--background));
    }
}

body.teste-chat-page--v2 .teste-v0-intro-hero-inner {
    position: relative;
    max-width: 56rem;
    margin: 0 auto;
    padding: 3rem 1rem 2.5rem;
    text-align: center;
}

@media (min-width: 768px) {
    body.teste-chat-page--v2 .teste-v0-intro-hero-inner {
        padding: 5rem 1rem 3rem;
    }
}

body.teste-chat-page--v2 .teste-v0-intro-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    background: color-mix(in oklch, var(--primary) 12%, transparent);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

body.teste-chat-page--v2 .teste-v0-intro-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0 0 1.25rem;
    text-wrap: balance;
}

body.teste-chat-page--v2 .teste-v0-intro-accent {
    color: var(--primary);
}

body.teste-chat-page--v2 .teste-v0-intro-lead {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--muted-foreground);
    max-width: 36rem;
    margin: 0 auto 2rem;
    line-height: 1.55;
    text-wrap: pretty;
}

body.teste-chat-page--v2 .teste-v0-intro-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

body.teste-chat-page--v2 .teste-v0-btn-primary-lg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.85rem;
    cursor: pointer;
    background: var(--primary);
    color: var(--primary-foreground);
    box-shadow: 0 8px 28px color-mix(in oklch, var(--primary) 35%, transparent);
    transition: filter 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

body.teste-chat-page--v2 .teste-v0-btn-primary-lg:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

body.teste-chat-page--v2 .teste-v0-btn-primary-lg:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

body.teste-chat-page--v2 .teste-v0-btn-arrow {
    font-size: 1.15rem;
    line-height: 1;
}

body.teste-chat-page--v2 .teste-v0-intro-cards {
    max-width: 56rem;
    margin: 0 auto;
    padding: 2rem 1rem 2.5rem;
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    body.teste-chat-page--v2 .teste-v0-intro-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

body.teste-chat-page--v2 .teste-v0-info-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

body.teste-chat-page--v2 .teste-v0-info-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

body.teste-chat-page--v2 .teste-v0-info-card p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    line-height: 1.45;
}

body.teste-chat-page--v2 .teste-v0-info-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

body.teste-chat-page--v2 .teste-v0-info-icon--primary {
    background: color-mix(in oklch, var(--primary) 14%, transparent);
}

body.teste-chat-page--v2 .teste-v0-info-icon--accent {
    background: color-mix(in oklch, var(--accent) 14%, transparent);
}

body.teste-chat-page--v2 .teste-v0-info-icon--chart {
    background: color-mix(in oklch, var(--accent) 10%, transparent);
}

body.teste-chat-page--v2 .teste-v0-intro-cats {
    max-width: 56rem;
    margin: 0 auto;
    padding: 0 1rem 4rem;
}

body.teste-chat-page--v2 .teste-v0-intro-cats h2 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 2rem;
    letter-spacing: -0.02em;
}

body.teste-chat-page--v2 .teste-v0-cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 768px) {
    body.teste-chat-page--v2 .teste-v0-cat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    body.teste-chat-page--v2 .teste-v0-cat-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

body.teste-chat-page--v2 .teste-v0-cat-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

body.teste-chat-page--v2 .teste-v0-cat-cell:hover {
    border-color: color-mix(in oklch, var(--primary) 45%, var(--border));
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

body.teste-chat-page--v2 .teste-v0-cat-emoji {
    font-size: 1.75rem;
    margin-bottom: 0.35rem;
}

body.teste-chat-page--v2 .teste-v0-cat-name {
    font-size: 0.8125rem;
    font-weight: 600;
    text-align: center;
}

body.teste-chat-page--v2 .teste-v0-intro-org {
    text-align: center;
    font-size: 0.8rem;
    color: var(--muted-foreground);
    padding: 0 1rem 2rem;
    margin: 0;
}

/* ========== Fase lead (card nome/e-mail) ========== */
body.teste-chat-page--v2 .teste-v0-lead-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background: oklch(0.94 0.01 280);
}

@supports not (background: oklch(0.5 0 0)) {
    body.teste-chat-page--v2 .teste-v0-lead-page {
        background: #ececf2;
    }
}

body.teste-chat-page--v2 .teste-v0-lead-card {
    width: 100%;
    max-width: 26rem;
    background: var(--card);
    border-radius: 1.25rem;
    padding: 2rem 1.75rem 1.75rem;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.1), 0 2px 8px rgba(15, 23, 42, 0.04);
    border: 1px solid var(--border);
}

body.teste-chat-page--v2 .teste-v0-lead-icon-wrap {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: color-mix(in oklch, var(--primary) 14%, transparent);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

body.teste-chat-page--v2 .teste-v0-lead-icon {
    width: 1.5rem;
    height: 1.5rem;
}

body.teste-chat-page--v2 .teste-v0-lead-title {
    margin: 0 0 0.5rem;
    font-size: 1.35rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.02em;
}

body.teste-chat-page--v2 .teste-v0-lead-sub {
    margin: 0 0 1.5rem;
    font-size: 0.9rem;
    color: var(--muted-foreground);
    text-align: center;
    line-height: 1.45;
}

body.teste-chat-page--v2 .teste-v0-lead-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

body.teste-chat-page--v2 .teste-v0-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

body.teste-chat-page--v2 .teste-v0-label {
    font-size: 0.9rem;
    font-weight: 600;
}

body.teste-chat-page--v2 .teste-v0-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.15rem 0.85rem 0.15rem 0.65rem;
    background: var(--card);
    transition: border-color 0.15s, box-shadow 0.15s;
}

body.teste-chat-page--v2 .teste-v0-input-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in oklch, var(--primary) 18%, transparent);
}

body.teste-chat-page--v2 .teste-v0-input-icon {
    flex-shrink: 0;
    width: 1.15rem;
    height: 1.15rem;
    color: var(--muted-foreground);
    opacity: 0.85;
}

body.teste-chat-page--v2 .teste-v0-input-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

body.teste-chat-page--v2 .teste-v0-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 1rem;
    padding: 0.65rem 0.25rem;
    color: var(--foreground);
    outline: none;
}

body.teste-chat-page--v2 .teste-v0-input::placeholder {
    color: var(--muted-foreground);
    opacity: 0.8;
}

body.teste-chat-page--v2 .teste-v0-input-wrap--readonly {
    background: color-mix(in oklch, var(--muted) 28%, var(--card));
}

body.teste-chat-page--v2 .teste-v0-input[readonly] {
    cursor: default;
}

body.teste-chat-page--v2 .teste-v0-cep-status {
    min-height: 1rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

body.teste-chat-page--v2 .teste-v0-cep-status--error {
    color: #b91c1c;
}

body.teste-chat-page--v2 .teste-v0-consent {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    font-size: 0.75rem;
    color: var(--muted-foreground);
    line-height: 1.4;
    cursor: pointer;
}

body.teste-chat-page--v2 .teste-v0-consent input {
    margin-top: 0.15rem;
    flex-shrink: 0;
    accent-color: var(--primary);
}

body.teste-chat-page--v2 .teste-v0-lead-privacy {
    margin: -0.35rem 0 0;
    font-size: 0.72rem;
    color: var(--muted-foreground);
    text-align: center;
    line-height: 1.35;
}

body.teste-chat-page--v2 .teste-v0-lead-error {
    margin: 0;
    font-size: 0.8rem;
    color: #b91c1c;
    text-align: center;
}

body.teste-chat-page--v2 .teste-v0-lead-submit {
    width: 100%;
    margin-top: 0.25rem;
}

/* Sticky header — progress-header.tsx */
body.teste-chat-page--v2 .teste-v0-sticky-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in oklch, var(--background) 82%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

@supports not (background: color-mix(in lch, red, blue)) {
    body.teste-chat-page--v2 .teste-v0-sticky-header {
        background: rgba(250, 250, 252, 0.92);
    }
}

body.teste-chat-page--v2 .teste-v0-header-inner {
    max-width: 42rem;
    margin: 0 auto;
    padding: 0.75rem 1rem 0.85rem;
}

body.teste-chat-page--v2 .teste-v0-brand-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.75rem;
}

body.teste-chat-page--v2 .teste-v0-brand-logo {
    height: 44px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    border-radius: 12px;
    background: var(--card);
    padding: 4px 8px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

body.teste-chat-page--v2 .teste-v0-brand-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

body.teste-chat-page--v2 .teste-v0-brand-name {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.teste-chat-page--v2 .teste-v0-brand-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary);
    background: color-mix(in oklch, var(--primary) 12%, transparent);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@supports not (background: color-mix(in lch, red, blue)) {
    body.teste-chat-page--v2 .teste-v0-brand-badge {
        background: rgba(6, 119, 247, 0.1);
    }
}

body.teste-chat-page--v2 .teste-v0-section-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

body.teste-chat-page--v2 .teste-v0-section-hint {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
}

/* Bloco de progresso — sobrescreve barra absoluta da v1 */
body.teste-chat-page--v2 .teste-v0-progress-wrap.teste-progress-wrap {
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    position: relative;
    height: auto !important;
    min-height: 0;
    background: transparent !important;
    overflow: visible !important;
    gap: 0.5rem;
    padding-bottom: 0.15rem;
}

body.teste-chat-page--v2 .teste-v0-progress-wrap .teste-progress-pct {
    display: none !important;
}

body.teste-chat-page--v2 .teste-v0-bar-track {
    height: 8px;
    border-radius: 999px;
    background: var(--secondary);
    overflow: hidden;
}

body.teste-chat-page--v2 .teste-v0-progress-wrap .teste-progress-bar {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    height: 100% !important;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: none;
    transition: width 0.45s ease-out;
}

body.teste-chat-page--v2 .teste-v0-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 2px;
}

body.teste-chat-page--v2 .teste-v0-q-line {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

body.teste-chat-page--v2 .teste-v0-pct-line {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

body.teste-chat-page--v2 .teste-v0-milestones {
    display: flex;
    justify-content: space-between;
    margin-top: 0.25rem;
    padding: 0 2px;
}

body.teste-chat-page--v2 .teste-v0-milestone {
    font-size: 0.85rem;
    line-height: 1;
    opacity: 0.35;
    filter: grayscale(0.8);
    transition: opacity 0.25s ease, transform 0.25s ease, filter 0.25s ease;
}

body.teste-chat-page--v2 .teste-v0-milestone--on {
    opacity: 1;
    filter: none;
    transform: scale(1.15);
}

/* Área principal */
body.teste-chat-page--v2 .teste-v0-chat-container.teste-chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 42rem;
    margin: 0 auto;
    width: 100%;
    min-height: 0;
    height: auto !important;
    box-sizing: border-box;
    overflow-x: clip;
}

body.teste-chat-page--v2 .teste-v0-main {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* Coluna: área central flexível + dots + nav (card centrado no meio) */
body.teste-chat-page--v2 .teste-v0-quiz-stack {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
    box-sizing: border-box;
}

body.teste-chat-page--v2 .teste-v0-question-center {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    padding: 0.35rem max(1.25rem, env(safe-area-inset-left, 0px)) 0.5rem max(1.25rem, env(safe-area-inset-right, 0px));
    overflow-x: clip;
}

body.teste-chat-page--v2 .teste-v0-phone-panel {
    width: 100%;
    max-width: 26rem;
    box-sizing: border-box;
    flex-shrink: 0;
}

body.teste-chat-page--v2 .teste-v0-lead-card--phone {
    margin: 0 auto;
}

body.teste-chat-page--v2 .teste-v0-quiz-nav {
    flex-shrink: 0;
}

body.teste-chat-page--v2 .teste-v0-keyboard-hint {
    flex-shrink: 0;
}

body.teste-chat-page--v2 .teste-v0-main .teste-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1rem 6.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scrollbar-width: thin;
}

body.teste-chat-page--v2 .teste-v0-main.teste-v0-main--no-footer .teste-chat-messages {
    padding-bottom: 1.5rem;
}

/* ========== Quiz horizontal: um card + dots + nav ========== */
/* [hidden] precisa ganhar do display:flex; senão a última pergunta fica visível atrás do painel de celular */
body.teste-chat-page--v2 .teste-v0-question-stage[hidden] {
    display: none !important;
}

body.teste-chat-page--v2 .teste-v0-question-stage {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    max-width: min(36rem, 100%);
    min-height: 0;
    flex: 0 1 auto;
    box-sizing: border-box;
}

body.teste-chat-page--v2 .teste-v0-question-track {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    will-change: transform, opacity;
}

body.teste-chat-page--v2 .teste-v0-question-track.teste-v0-track-leave {
    transform: translateX(-28px);
    opacity: 0;
}

body.teste-chat-page--v2 .teste-v0-question-track.teste-v0-track-enter {
    transform: translateX(32px);
    opacity: 0;
}

body.teste-chat-page--v2 .teste-v0-question-track.teste-v0-track-enter-active {
    transform: translateX(0);
    opacity: 1;
}

body.teste-chat-page--v2 .teste-v0-question-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 6px);
    box-shadow: 0 12px 40px -12px rgba(15, 23, 42, 0.15), 0 4px 16px rgba(15, 23, 42, 0.06);
    padding: 1.5rem 1.25rem 1.35rem;
}

body.teste-chat-page--v2 .teste-v0-qcard-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.1rem;
    flex-wrap: wrap;
}

body.teste-chat-page--v2 .teste-v0-qcard-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border-radius: 999px;
    background: var(--primary);
    color: var(--primary-foreground);
    font-weight: 700;
    font-size: 0.95rem;
}

body.teste-chat-page--v2 .teste-v0-qcard-section {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted-foreground);
    letter-spacing: 0.02em;
}

body.teste-chat-page--v2 .teste-v0-qcard-title {
    margin: 0 0 0.65rem;
    font-size: clamp(1.15rem, 3.5vw, 1.45rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

body.teste-chat-page--v2 .teste-v0-question-card .teste-v0-qhelper {
    margin: 0 0 0.85rem !important;
    font-size: 0.88rem !important;
}

body.teste-chat-page--v2 .teste-v0-question-card--motivational {
    text-align: center;
    padding: 1.6rem 1.15rem 1.4rem;
}

/* ===== Motivacional (layout igual ao anexo) ===== */
body.teste-chat-page--v2 .teste-v0-motiv-hero {
    position: relative;
    width: 100%;
    height: 78px;
    margin: 0 0 0.45rem;
}

body.teste-chat-page--v2 .teste-v0-motiv-blob {
    position: absolute;
    inset: 8px 0 0 0;
    width: 78px;
    height: 78px;
    margin: 0 auto;
    border-radius: 999px;
    background: rgba(210, 120, 210, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
}

body.teste-chat-page--v2 .teste-v0-motiv-target {
    width: 56px;
    height: 56px;
}

body.teste-chat-page--v2 .teste-v0-motiv-star {
    position: absolute;
    width: 26px;
    height: 26px;
}

body.teste-chat-page--v2 .teste-v0-motiv-star--top {
    top: 2px;
    left: 50%;
    transform: translateX(64px);
}

body.teste-chat-page--v2 .teste-v0-motiv-star--side {
    top: 42px;
    left: 50%;
    transform: translateX(-124px);
}

body.teste-chat-page--v2 .teste-v0-motiv-title {
    margin: 0 0 0.4rem;
    font-size: clamp(1.75rem, 5.4vw, 2.45rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.05;
    text-transform: none;
}

body.teste-chat-page--v2 .teste-v0-motiv-sub {
    margin: 0 0 0.95rem;
    font-size: 1.02rem;
    font-weight: 500;
    color: color-mix(in oklch, var(--foreground) 80%, var(--muted-foreground));
    line-height: 1.35;
    text-wrap: balance;
}

body.teste-chat-page--v2 .teste-v0-motiv-heartline {
    margin: 0 0 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--primary);
}

body.teste-chat-page--v2 .teste-v0-motiv-heart-icon svg {
    display: block;
}

body.teste-chat-page--v2 .teste-v0-motiv-dots {
    display: flex;
    justify-content: center;
    gap: 0.48rem;
    margin: 0 0 1.05rem;
}

body.teste-chat-page--v2 .teste-v0-motiv-dot {
    width: 0.56rem;
    height: 0.56rem;
    border-radius: 999px;
    background: #E3E4EA;
    box-shadow: none;
}

body.teste-chat-page--v2 .teste-v0-motiv-dot--on {
    background: var(--primary);
}

/* Botão "Continuar" do card motivacional (fúcsia como no anexo) */
body.teste-chat-page--v2 .teste-v0-question-card--motivational .teste-v0-continue-btn--wide {
    max-width: none !important;
    width: 100% !important;
    margin-top: 0.1rem;
}

body.teste-chat-page--v2 .teste-v0-question-card--motivational .teste-v0-continue-btn {
    background: var(--primary) !important;
    color: var(--primary-foreground) !important;
    border-radius: 999px !important;
    padding: 0.85rem 1.1rem !important;
    font-size: 1.05rem !important;
    box-shadow: 0 6px 18px color-mix(in oklch, var(--primary) 30%, transparent) !important;
}

body.teste-chat-page--v2 .teste-v0-question-card--motivational .teste-v0-continue-btn:hover:not(:disabled) {
    filter: brightness(1.05);
}


body.teste-chat-page--v2 .teste-v0-continue-btn--wide {
    width: 100%;
    max-width: 16rem;
    margin: 0 auto;
    display: flex !important;
    justify-content: center;
}

body.teste-chat-page--v2 .teste-v0-phone-title {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
    font-weight: 700;
}

body.teste-chat-page--v2 .teste-v0-phone-text {
    margin: 0;
    font-size: 0.95rem;
    color: var(--muted-foreground);
    line-height: 1.5;
}

/* Dots — indicadores */
body.teste-chat-page--v2 .teste-v0-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem max(1.25rem, env(safe-area-inset-left, 0px)) 0.5rem max(1.25rem, env(safe-area-inset-right, 0px));
    max-width: 36rem;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

body.teste-chat-page--v2 .teste-v0-dot {
    width: 0.45rem;
    height: 0.45rem;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: var(--border);
    cursor: default;
    transition: width 0.25s ease, background 0.2s ease, transform 0.2s ease;
}

body.teste-chat-page--v2 .teste-v0-dot--done {
    background: color-mix(in oklch, var(--primary) 45%, var(--border));
}

body.teste-chat-page--v2 .teste-v0-dot--current {
    width: 1.35rem;
    background: var(--primary);
}

/* Barra inferior Anterior | Salvar | Próxima */
body.teste-chat-page--v2 .teste-v0-quiz-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    max-width: 36rem;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem max(1.25rem, env(safe-area-inset-left, 0px)) 0.25rem max(1.25rem, env(safe-area-inset-right, 0px));
}

body.teste-chat-page--v2 .teste-v0-nav-btn {
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.55rem 0.85rem;
    border-radius: 0.65rem;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--foreground);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: background 0.15s, border-color 0.15s;
}

body.teste-chat-page--v2 .teste-v0-nav-btn:hover:not(:disabled) {
    background: var(--secondary);
}

body.teste-chat-page--v2 .teste-v0-nav-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

body.teste-chat-page--v2 .teste-v0-nav-next:not([hidden]) {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: transparent;
    box-shadow: 0 4px 14px color-mix(in oklch, var(--primary) 30%, transparent);
}

body.teste-chat-page--v2 .teste-v0-nav-save {
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted-foreground);
    background: none;
    border: none;
    cursor: default;
    pointer-events: none;
    padding: 0.45rem 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

body.teste-chat-page--v2 .teste-v0-nav-save:hover {
    color: var(--muted-foreground);
}

body.teste-chat-page--v2 .teste-v0-keyboard-hint {
    text-align: center;
    font-size: 0.68rem;
    color: var(--muted-foreground);
    margin: 0;
    padding: 0 1rem 0.35rem;
}

/* Toast */
body.teste-chat-page--v2 .teste-v0-toast {
    position: fixed;
    bottom: 5.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    max-width: min(22rem, 92vw);
    padding: 0.65rem 1rem;
    background: var(--foreground);
    color: var(--background);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 0.75rem;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.2);
    z-index: 80;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

body.teste-chat-page--v2 .teste-v0-toast.teste-v0-toast--in {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Bolhas — question-card vibe */
body.teste-chat-page--v2 .teste-bubble {
    font-size: 0.98rem;
    line-height: 1.55;
}

body.teste-chat-page--v2 .teste-bubble-v0-card.teste-bubble-assistant {
    max-width: 100%;
    background: var(--card);
    color: var(--card-foreground);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 4px);
    box-shadow: 0 10px 40px -10px rgba(15, 23, 42, 0.12);
    border-bottom-left-radius: 10px;
    padding: 1.35rem 1.35rem 1.15rem;
}

body.teste-chat-page--v2 .teste-v0-qtext {
    margin: 0 0 0.35rem 0 !important;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.45;
    text-wrap: balance;
}

body.teste-chat-page--v2 .teste-v0-qhelper.text-muted {
    color: var(--muted-foreground) !important;
    font-size: 0.9rem !important;
}

body.teste-chat-page--v2 .teste-bubble-user {
    max-width: 90%;
    align-self: flex-end;
    background: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: calc(var(--radius) + 4px);
    border-bottom-right-radius: 10px;
    box-shadow: 0 6px 22px color-mix(in oklch, var(--primary) 35%, transparent);
}

@supports not (color: color-mix(in lch, red, blue)) {
    body.teste-chat-page--v2 .teste-bubble-user {
        box-shadow: 0 6px 22px rgba(6, 119, 247, 0.28);
    }
}

/* Rating scale — rating-scale.tsx */
body.teste-chat-page--v2 .teste-v0-scale-wrap.teste-bubble-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 0.35rem;
    margin-top: 0.85rem;
    width: 100%;
}

body.teste-chat-page--v2 .teste-v0-scale-btn {
    flex: 1;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 0.35rem !important;
    min-height: 72px;
    border-radius: 0.85rem !important;
    border: 2px solid var(--border) !important;
    background: var(--card) !important;
    cursor: pointer;
    font: inherit;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s ease;
}

body.teste-chat-page--v2 .teste-v0-scale-btn:hover:not(:disabled) {
    border-color: color-mix(in oklch, var(--primary) 45%, var(--border)) !important;
    background: color-mix(in oklch, var(--primary) 6%, var(--card)) !important;
}

body.teste-chat-page--v2 .teste-v0-scale-btn.teste-scale-btn-selected {
    border-color: var(--primary) !important;
    background: color-mix(in oklch, var(--primary) 14%, var(--card)) !important;
    box-shadow: 0 8px 24px color-mix(in oklch, var(--primary) 22%, transparent);
}

body.teste-chat-page--v2 .teste-v0-scale-emoji {
    font-size: 1.5rem;
    line-height: 1;
}

body.teste-chat-page--v2 .teste-v0-scale-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--muted-foreground);
}

body.teste-chat-page--v2 .teste-v0-scale-btn.teste-scale-btn-selected .teste-v0-scale-label {
    color: var(--primary);
}

body.teste-chat-page--v2 .teste-v0-scale-foot {
    display: flex;
    justify-content: space-between;
    margin-top: 0.65rem;
    padding: 0 4px;
    font-size: 0.7rem;
    color: var(--muted-foreground);
}

/* Continuar — um botão largo */
body.teste-chat-page--v2 .teste-v0-scale-wrap:has(> button:only-of-type) {
    display: block;
    max-width: 14rem;
}

body.teste-chat-page--v2 .teste-v0-continue-btn {
    width: 100%;
    padding: 0.65rem 1.25rem !important;
    border-radius: 0.85rem !important;
    font-weight: 600 !important;
    background: var(--primary) !important;
    color: var(--primary-foreground) !important;
    border: none !important;
    box-shadow: 0 4px 16px color-mix(in oklch, var(--primary) 30%, transparent);
}

body.teste-chat-page--v2 .teste-v0-continue-btn:hover:not(:disabled) {
    filter: brightness(1.05);
}

/* Rodapé fixo — quiz-navigation */
body.teste-chat-page--v2 .teste-v0-footer.teste-chat-input-area {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    padding: 0.85rem 1rem 1rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    background: color-mix(in oklch, var(--card) 88%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

@supports not (background: color-mix(in lch, red, blue)) {
    body.teste-chat-page--v2 .teste-v0-footer.teste-chat-input-area {
        background: rgba(255, 255, 255, 0.94);
    }
}

body.teste-chat-page--v2 .teste-v0-input-row {
    max-width: none;
    gap: 0.5rem;
}

body.teste-chat-page--v2 .teste-v0-input-row input {
    flex: 1;
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid var(--border);
    background: var(--card);
    padding: 0.8rem 1rem;
    font-size: 1rem;
    color: var(--foreground);
}

body.teste-chat-page--v2 .teste-v0-input-row input::placeholder {
    color: var(--muted-foreground);
}

body.teste-chat-page--v2 .teste-v0-input-row input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in oklch, var(--primary) 22%, transparent);
}

body.teste-chat-page--v2 .teste-v0-send {
    border-radius: calc(var(--radius) - 2px);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.8rem 1.25rem;
    font-weight: 600;
    background: var(--primary);
    color: var(--primary-foreground);
    border: none;
    box-shadow: 0 4px 14px color-mix(in oklch, var(--primary) 28%, transparent);
}

body.teste-chat-page--v2 .teste-v0-send:hover:not(:disabled) {
    filter: brightness(1.06);
}

body.teste-chat-page--v2 .teste-v0-send:disabled {
    opacity: 0.55;
}

body.teste-chat-page--v2 .teste-v0-footnote {
    margin: 0.5rem 0 0;
    font-size: 0.7rem;
    color: var(--muted-foreground);
    text-align: center;
    line-height: 1.35;
}

@media (max-width: 640px) {
    body.teste-chat-page--v2 .teste-v0-scale-wrap.teste-bubble-buttons {
        flex-wrap: wrap;
        gap: 0.45rem;
    }

    body.teste-chat-page--v2 .teste-v0-scale-btn {
        flex: 1 1 calc(33.33% - 0.35rem);
        min-width: calc(48% - 4px);
        min-height: 76px;
    }

    body.teste-chat-page--v2 .teste-v0-send-text {
        display: none;
    }

    body.teste-chat-page--v2 .teste-v0-send {
        padding: 0.8rem 1rem;
    }
}

@media (min-width: 641px) {
    body.teste-chat-page--v2 .teste-v0-send-arrow {
        display: none;
    }
}
