/**
 * Estilos do convite virtual — Rebeca Dias Parente (tema Sol).
 *
 * Direcao visual: ceu claro + sol dourado/ambar, tipografia acolhedora.
 * Mobile-first (WhatsApp).
 */

:root {
    --cv-sun: #f5b942;
    --cv-sun-bright: #ffd56a;
    --cv-sun-deep: #e08a12;
    --cv-amber: #c56a0a;
    --cv-sky: #7ec8e8;
    --cv-sky-soft: #d6effa;
    --cv-ink: #2c3a45;
    --cv-muted: #5f7280;
    --cv-paper: #f7fbfe;
    --cv-paper-warm: #fff6e4;
    --cv-ok: #2f6b4f;
    --cv-erro: #9b2c2c;
    --cv-radius: 1.25rem;
    --cv-font-display: "Fraunces", Georgia, serif;
    --cv-font-body: "Nunito", system-ui, sans-serif;
    --cv-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* "clip" evita barra horizontal das animacoes sem criar novo scroll container */
    overflow-x: clip;
}

body.convite-body {
    margin: 0;
    min-height: 100dvh;
    font-family: var(--cv-font-body);
    font-weight: 400;
    color: var(--cv-ink);
    background:
        radial-gradient(ellipse 100% 70% at 80% -5%, rgba(255, 213, 106, 0.55), transparent 50%),
        radial-gradient(ellipse 90% 60% at 0% 20%, rgba(126, 200, 232, 0.4), transparent 55%),
        linear-gradient(180deg, var(--cv-sky-soft) 0%, var(--cv-paper) 38%, var(--cv-paper-warm) 100%);
    background-attachment: fixed;
    /* Animacoes de entrada lateral e elementos decorativos nao geram scroll lateral */
    overflow-x: hidden;
    overflow-x: clip;
    /* Safe areas (notch / home indicator do iPhone) */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* ---- Envelope realista (tela inicial) ---- */
.cv-envelope {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
    background:
        radial-gradient(circle at 50% 32%, rgba(255, 213, 106, 0.5), transparent 52%),
        linear-gradient(165deg, #9fd4f0 0%, #c8e8f7 35%, #ffe29a 100%);
    transition: opacity 0.55s var(--cv-ease), visibility 0.55s, transform 0.55s var(--cv-ease);
}

.cv-envelope.is-open {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(1.05);
}

.cv-envelope__glow {
    position: absolute;
    width: min(75vw, 300px);
    height: min(75vw, 300px);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 213, 106, 0.7), transparent 70%);
    animation: cv-pulse 3.2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes cv-pulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.12); opacity: 1; }
}

.cv-envelope__btn {
    position: relative;
    z-index: 1;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    -webkit-tap-highlight-color: transparent;
}

.cv-envelope__btn:disabled {
    cursor: default;
}

/*
 * Envelope SVG fechado — abas com contorno e contraste real.
 */
.cv-envelope__scene {
    --env-w: min(82vw, 320px);
    position: relative;
    display: block;
    width: var(--env-w);
    transition: transform 0.35s var(--cv-ease);
}

.cv-envelope__btn:hover .cv-envelope__scene,
.cv-envelope__btn:focus-visible .cv-envelope__scene {
    transform: translateY(-5px);
}

.cv-envelope.is-opening .cv-envelope__btn:hover .cv-envelope__scene {
    transform: none;
}

.cv-env-svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

/* Carta escondida sob as abas */
.cv-env-svg__letter {
    opacity: 0;
    transform: translateY(12px);
    transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}

.cv-envelope.is-opening .cv-env-svg__letter {
    opacity: 1;
    transform: translateY(-100px);
    transition-delay: 0.75s;
}

/* Aba superior abre para cima (escala/rota via CSS no grupo) */
.cv-env-svg__top {
    transform-origin: 160px 4px;
    transition: transform 0.9s cubic-bezier(0.4, 0.02, 0.2, 1);
}

.cv-envelope.is-opening .cv-env-svg__top {
    transform: translateY(-8px) scaleY(0.08);
    opacity: 0.35;
    transition-delay: 0.25s;
}

.cv-envelope.is-opening .cv-env-svg__left,
.cv-envelope.is-opening .cv-env-svg__right,
.cv-envelope.is-opening .cv-env-svg__bottom {
    opacity: 0.92;
}

/* Selo no centro do SVG */
.cv-selo {
    position: absolute;
    left: 50%;
    top: 48%;
    width: 72px;
    height: 72px;
    margin-left: -36px;
    margin-top: -36px;
    z-index: 7;
    display: grid;
    place-items: center;
    animation: cv-balanco 2.8s ease-in-out infinite;
    transition:
        transform 0.5s var(--cv-ease),
        opacity 0.4s ease,
        filter 0.4s ease;
    pointer-events: none;
}

.cv-selo__svg {
    width: 72px;
    height: 72px;
    display: block;
    filter: drop-shadow(0 6px 10px rgba(140, 70, 0, 0.4));
}

.cv-envelope.is-opening .cv-selo {
    animation: none;
    transform: translateY(-60px) scale(1.35);
    opacity: 0;
    filter: blur(3px);
}

@keyframes cv-balanco {
    0%, 100% { transform: rotate(-5deg) scale(1); }
    50% { transform: rotate(5deg) scale(1.05); }
}

.cv-envelope__brand {
    font-family: var(--cv-font-display);
    font-size: clamp(1.45rem, 5.5vw, 1.9rem);
    font-weight: 650;
    color: var(--cv-amber);
    letter-spacing: 0.02em;
    text-align: center;
    line-height: 1.15;
    position: relative;
    z-index: 1;
}

.cv-envelope__sub {
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cv-muted);
    font-weight: 700;
    position: relative;
    z-index: 1;
    animation: cv-pulse-txt 1.8s ease-in-out infinite;
}

@keyframes cv-pulse-txt {
    0%, 100% { opacity: 0.65; }
    50% { opacity: 1; }
}

.cv-envelope.is-opening .cv-envelope__sub,
.cv-envelope.is-opening .cv-envelope__hint {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cv-envelope__hint {
    position: relative;
    z-index: 1;
    text-align: center;
    margin: 0.35rem 0 0;
    padding: 0 1.25rem;
    max-width: 22rem;
    font-size: 0.95rem;
    color: rgba(44, 58, 69, 0.75);
    font-weight: 600;
    line-height: 1.35;
}

.cv-envelope.is-opening::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.8), transparent 55%);
    opacity: 0;
    pointer-events: none;
    animation: cv-flash 0.7s ease 1.45s both;
}

@keyframes cv-flash {
    0% { opacity: 0; }
    40% { opacity: 0.8; }
    100% { opacity: 0; }
}

/* ---- Conteudo aberto ---- */
.cv-main {
    max-width: 34rem;
    margin: 0 auto;
    padding: 1.5rem 1.25rem max(5.5rem, calc(3.5rem + env(safe-area-inset-bottom)));
    animation: cv-reveal 0.9s var(--cv-ease) both;
}

.cv-main[hidden] {
    display: none !important;
}

/* Folga no topo para o player fixo nao cobrir o inicio do texto */
.cv-main--convite {
    padding-top: 4rem;
}

.cv-main--obrigado {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    text-align: center;
}

@keyframes cv-reveal {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

.cv-saudacao {
    text-align: center;
    font-size: 1.05rem;
    color: var(--cv-muted);
    margin: 0 0 1rem;
}

.cv-eyebrow {
    text-align: center;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cv-sun-deep);
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.cv-nome {
    font-family: var(--cv-font-display);
    font-size: clamp(2.4rem, 10vw, 3.4rem);
    font-weight: 650;
    text-align: center;
    color: var(--cv-amber);
    line-height: 1.05;
    margin: 0 0 0.35rem;
}

/* Mobile: sobrenome na linha de baixo; desktop: nome inteiro em uma linha */
.cv-nome__linha {
    display: block;
}

.cv-tagline {
    text-align: center;
    font-family: var(--cv-font-display);
    font-style: italic;
    font-size: 1.35rem;
    color: var(--cv-ink);
    margin: 0 0 1.5rem;
}

.cv-hero__foto {
    margin: 0 auto 2rem;
    width: 100%;
    aspect-ratio: 4 / 5;
    max-height: 52vh;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 213, 106, 0.55) 0%, transparent 45%),
        linear-gradient(180deg, #7ec8e8 0%, #b8e0f5 42%, #ffe9a8 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 20px 40px rgba(224, 138, 18, 0.18);
    padding: 1rem;
}

.cv-hero__foto::before {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 28%;
    background: linear-gradient(180deg, transparent, rgba(255, 246, 228, 0.55));
    pointer-events: none;
}

/* Raios girando atras do solzinho do hero */
.cv-hero__raios {
    position: absolute;
    width: min(96vw, 420px);
    height: min(96vw, 420px);
    border-radius: 50%;
    background: repeating-conic-gradient(
        from 0deg,
        rgba(255, 255, 255, 0.42) 0deg 7deg,
        rgba(255, 255, 255, 0) 7deg 22deg
    );
    mask-image: radial-gradient(circle, transparent 22%, #000 42%, transparent 72%);
    -webkit-mask-image: radial-gradient(circle, transparent 22%, #000 42%, transparent 72%);
    animation: cv-gira 26s linear infinite;
    pointer-events: none;
}

@keyframes cv-gira {
    to { transform: rotate(360deg); }
}

.cv-hero__sol {
    width: min(48vw, 180px);
    height: min(48vw, 180px);
    z-index: 1;
    animation: cv-hero-sol 3.5s ease-in-out infinite;
    filter: drop-shadow(0 8px 24px rgba(224, 138, 18, 0.35));
}

@keyframes cv-hero-sol {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-10px) rotate(3deg); }
}

.cv-hero__fala {
    position: relative;
    z-index: 2;
    margin: 0;
    padding: 0.55rem 1rem;
    background: #fffdf8;
    border: 2px solid #e8940f;
    border-radius: 1.25rem 1.25rem 1.25rem 0.35rem;
    font-family: var(--cv-font-body);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--cv-amber);
    box-shadow: 0 6px 14px rgba(224, 138, 18, 0.15);
    animation: cv-fala 2.4s ease-in-out infinite;
}

@keyframes cv-fala {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

/* Amiguinhos solzinhos flutuando */
.cv-amiguinhos {
    pointer-events: none;
}

.cv-amiguinhos--envelope {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.cv-amiguinhos--hero {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.cv-amigo {
    position: absolute;
    display: block;
    animation: cv-flutua 3.6s ease-in-out infinite;
}

.cv-amigo__svg {
    width: 100%;
    height: 100%;
    display: block;
}

.cv-amigo--a { top: 12%; left: 6%; width: 56px; animation-delay: 0s; }
.cv-amigo--b { top: 18%; right: 8%; width: 48px; animation-delay: 0.6s; }
.cv-amigo--c { bottom: 18%; left: 12%; width: 52px; animation-delay: 1.1s; }
.cv-amigo--d { top: 10%; left: 8%; width: 52px; animation-delay: 0.3s; }
.cv-amigo--e { top: 14%; right: 6%; width: 44px; animation-delay: 0.9s; }

@keyframes cv-flutua {
    0%, 100% { transform: translateY(0) rotate(-8deg); }
    50% { transform: translateY(-14px) rotate(8deg); }
}

.cv-ato {
    margin-bottom: 2.75rem;
}

.cv-story {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.cv-capitulo {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

.cv-capitulo__ico {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    animation: cv-balanco 3s ease-in-out infinite;
}

.cv-capitulo__sol {
    width: 52px;
    height: 52px;
    display: block;
}

.cv-capitulo h2 {
    font-family: var(--cv-font-display);
    font-size: 1.65rem;
    font-weight: 600;
    color: var(--cv-amber);
    margin: 0 0 0.4rem;
}

.cv-capitulo p {
    margin: 0;
    line-height: 1.65;
    color: var(--cv-ink);
    font-weight: 400;
    font-size: 1.05rem;
}

.cv-detalhes h2,
.cv-rsvp h2 {
    font-family: var(--cv-font-display);
    font-size: 1.85rem;
    text-align: center;
    color: var(--cv-amber);
    margin: 0 0 1.25rem;
}

.cv-info {
    margin: 0 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cv-info dt {
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--cv-sun-deep);
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.cv-info dd {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.45;
}

.cv-muted {
    color: var(--cv-muted);
    font-size: 0.95rem;
}

.cv-countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.cv-countdown__item {
    text-align: center;
    padding: 0.75rem 0.25rem;
    background: rgba(255, 253, 248, 0.75);
    border-bottom: 2px solid var(--cv-sun);
}

.cv-countdown__item {
    border-radius: 0.6rem 0.6rem 0 0;
    transition: transform 0.25s var(--cv-ease);
}

.cv-countdown__item span {
    display: block;
    font-family: var(--cv-font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--cv-amber);
    line-height: 1;
}

/* Pulo curtinho a cada troca de numero (classe aplicada pelo JS) */
.cv-countdown__item span.is-tick {
    animation: cv-num-pop 0.4s var(--cv-ease);
}

@keyframes cv-num-pop {
    0% { transform: translateY(6px) scale(0.88); opacity: 0.35; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.cv-countdown__item small {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cv-muted);
    font-weight: 700;
}

.cv-link-mapa {
    display: block;
    text-align: center;
    color: var(--cv-amber);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cv-rsvp-aviso {
    text-align: center;
    margin: -0.5rem 0 1rem;
}

.cv-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cv-form-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.cv-campo label,
.cv-campo legend {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--cv-ink);
}

.cv-campo input,
.cv-campo textarea,
.cv-campo select {
    width: 100%;
    padding: 0.85rem 0.9rem;
    border: 1px solid rgba(224, 138, 18, 0.3);
    border-radius: 0.5rem;
    background: rgba(255, 253, 248, 0.95);
    font: inherit;
    /* 16px evita zoom automatico do iOS ao focar o campo */
    font-size: 16px;
    color: var(--cv-ink);
    min-height: 48px;
}

.cv-campo input:focus,
.cv-campo textarea:focus {
    outline: 2px solid var(--cv-sun);
    outline-offset: 1px;
    border-color: var(--cv-sun-deep);
}

.cv-campo input.invalido,
.cv-campo textarea.invalido {
    border-color: var(--cv-erro);
}

.cv-campo input[readonly] {
    background: rgba(255, 213, 106, 0.22);
}

.cv-erro {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: var(--cv-erro);
}

.cv-status {
    border: 0;
    padding: 0;
    margin: 0;
}

.cv-radios {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Especificidade maior que .cv-campo label/input — evita radio esticado e texto torto */
.cv-campo label.cv-radio,
.cv-radios .cv-radio {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 0.9rem;
    min-height: 48px;
    margin-bottom: 0;
    background: rgba(255, 253, 248, 0.8);
    border: 1px solid rgba(224, 138, 18, 0.22);
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    line-height: 1.35;
}

.cv-campo label.cv-radio:has(input:checked),
.cv-radios .cv-radio:has(input:checked) {
    border-color: var(--cv-sun-deep);
    background: rgba(255, 213, 106, 0.35);
}

.cv-campo label.cv-radio input[type="radio"],
.cv-radios .cv-radio input[type="radio"] {
    width: 1.15rem;
    height: 1.15rem;
    min-height: 0;
    min-width: 0;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    flex: 0 0 auto;
    accent-color: var(--cv-sun-deep);
    cursor: pointer;
}

.cv-campo label.cv-radio span,
.cv-radios .cv-radio span {
    flex: 1;
}

.cv-btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.5rem;
    padding: 0.95rem 1.5rem;
    min-height: 48px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cv-sun), var(--cv-sun-deep));
    color: #fffdf8;
    font: inherit;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(224, 138, 18, 0.35);
    transition: transform 0.2s var(--cv-ease), box-shadow 0.2s;
    width: 100%;
}

/* Brilho passando de tempo em tempo, chamando o toque */
.cv-btn::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 45%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    animation: cv-shine 4.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes cv-shine {
    0%, 62% { left: -60%; }
    92%, 100% { left: 115%; }
}

.cv-btn:hover,
.cv-btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(224, 138, 18, 0.42);
}

.cv-btn--ghost {
    background: transparent;
    color: var(--cv-amber);
    border: 1px solid var(--cv-sun-deep);
    box-shadow: none;
}

.cv-alerta {
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    font-size: 0.95rem;
}

.cv-alerta--ok { background: #e8f5ee; color: var(--cv-ok); }
.cv-alerta--erro { background: #fde8e8; color: var(--cv-erro); }
.cv-alerta--aviso { background: #fff4e0; color: #92400e; }
.cv-alerta--info { background: #e6f6fc; color: #0c4a6e; }

.app-toast-popup.swal2-popup {
    font-family: var(--cv-font-body);
    font-size: 0.9rem;
    padding: 0.65rem 1rem;
}

.cv-rodape {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(245, 185, 66, 0.45);
    font-family: var(--cv-font-display);
    font-style: italic;
    color: var(--cv-muted);
}

.cv-obrigado {
    padding: 2rem 1rem;
}

.cv-obrigado .cv-sol-mini {
    width: 96px;
    height: 96px;
    margin: 0 auto 1rem;
    display: block;
    animation: cv-balanco 2.5s ease-in-out infinite;
}

/* Banner PWA — instalar / adicionar a tela inicial */
.cv-pwa-banner {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    z-index: 50;
    padding: 0.9rem 1rem;
    background: rgba(255, 253, 248, 0.96);
    border: 1px solid rgba(224, 138, 18, 0.35);
    border-radius: 1rem;
    box-shadow: 0 12px 32px rgba(44, 58, 69, 0.18);
    backdrop-filter: blur(8px);
}

.cv-pwa-banner__txt {
    margin: 0 0 0.65rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--cv-ink);
    line-height: 1.35;
}

.cv-pwa-banner__acoes {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cv-pwa-banner__btn,
.cv-pwa-banner__fechar {
    flex: 1 1 auto;
    min-height: 44px;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.55rem 0.9rem;
}

.cv-pwa-banner__btn {
    border: 0;
    background: linear-gradient(135deg, var(--cv-sun), var(--cv-sun-deep));
    color: #fffdf8;
}

.cv-pwa-banner__fechar {
    border: 1px solid rgba(224, 138, 18, 0.4);
    background: transparent;
    color: var(--cv-amber);
}

.cv-pwa-banner__ios {
    margin: 0.65rem 0 0;
    font-size: 0.8rem;
    color: var(--cv-muted);
    line-height: 1.4;
}

.cv-btn--mapa {
    background: linear-gradient(135deg, #7ec8e8, #3a9fc4);
    box-shadow: 0 10px 24px rgba(58, 159, 196, 0.3);
    margin-top: 1rem;
}

.cv-btn--mapa:hover,
.cv-btn--mapa:focus-visible {
    box-shadow: 0 14px 28px rgba(58, 159, 196, 0.4);
}

/* ---- Linha do tempo: historia do primeiro ano ---- */
.cv-historia__intro {
    text-align: center;
    color: var(--cv-muted);
    margin: -0.5rem 0 1.75rem;
    font-size: 1rem;
}

.cv-timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 1.1rem;
    border-left: 3px solid rgba(245, 185, 66, 0.55);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.cv-timeline__item {
    position: relative;
    padding-left: 1.1rem;
}

.cv-timeline__dot {
    position: absolute;
    left: -1.1rem;
    top: 0.35rem;
    width: 14px;
    height: 14px;
    margin-left: -8.5px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cv-sun-bright), var(--cv-sun-deep));
    box-shadow: 0 0 0 4px rgba(255, 213, 106, 0.35);
}

.cv-timeline__idade {
    margin: 0 0 0.65rem;
    font-family: var(--cv-font-display);
    font-size: 1.45rem;
    font-weight: 650;
    color: var(--cv-amber);
}

.cv-timeline__foto {
    margin: 0 0 0.65rem;
    overflow: hidden;
    background: rgba(255, 248, 230, 0.6);
}

.cv-timeline__foto img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.cv-timeline__placeholder {
    aspect-ratio: 4 / 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background:
        radial-gradient(circle at 50% 40%, rgba(255, 213, 106, 0.45), transparent 55%),
        linear-gradient(180deg, #b8e0f5, #ffe9a8);
    color: var(--cv-amber);
    font-weight: 700;
    font-size: 0.9rem;
}

.cv-timeline__sol {
    width: 72px;
    height: 72px;
}

.cv-timeline__legenda {
    margin: 0;
    color: var(--cv-ink);
    line-height: 1.55;
    font-size: 1.02rem;
}

/* Reveal no scroll (com entrada lateral alternada) */
.cv-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--cv-ease), transform 0.7s var(--cv-ease);
}

.cv-reveal--esq {
    transform: translate3d(-26px, 20px, 0) rotate(-1.5deg);
}

.cv-reveal--dir {
    transform: translate3d(26px, 20px, 0) rotate(1.5deg);
}

.cv-reveal.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0deg);
}

/* Foto da linha do tempo entra com leve zoom */
.cv-timeline__item .cv-timeline__foto img,
.cv-timeline__item .cv-timeline__placeholder {
    transform: scale(1.06);
    transition: transform 1.1s var(--cv-ease);
}

.cv-timeline__item.is-visible .cv-timeline__foto img,
.cv-timeline__item.is-visible .cv-timeline__placeholder {
    transform: scale(1);
}

/* Dot da linha do tempo pulsa ao aparecer */
.cv-timeline__item.is-visible .cv-timeline__dot {
    animation: cv-dot-pop 0.6s var(--cv-ease) both;
}

@keyframes cv-dot-pop {
    0% { transform: scale(0.2); box-shadow: 0 0 0 0 rgba(255, 213, 106, 0.6); }
    60% { transform: scale(1.35); }
    100% { transform: scale(1); box-shadow: 0 0 0 4px rgba(255, 213, 106, 0.35); }
}

/* ---- Surpresa final ---- */
.cv-surpresa {
    text-align: center;
}

.cv-surpresa__btn {
    border: 0;
    background: transparent;
    padding: 0.5rem;
    cursor: pointer;
    margin: 0.5rem auto 0;
    display: block;
    -webkit-tap-highlight-color: transparent;
}

.cv-surpresa__envelope {
    display: block;
    width: min(70vw, 220px);
    margin: 0 auto;
    position: relative;
    filter: drop-shadow(0 12px 20px rgba(140, 80, 0, 0.28));
    transition: transform 0.35s var(--cv-ease);
}

.cv-surpresa__envelope svg {
    display: block;
    width: 100%;
    height: auto;
}

.cv-surpresa__selo-txt {
    position: absolute;
    left: 50%;
    top: 58%;
    transform: translate(-50%, -50%);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cv-amber);
    background: rgba(255, 253, 248, 0.9);
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
}

.cv-surpresa__btn:hover .cv-surpresa__envelope,
.cv-surpresa__btn:focus-visible .cv-surpresa__envelope {
    transform: translateY(-4px) scale(1.03);
}

.cv-surpresa__btn.is-open .cv-surpresa__envelope {
    transform: scale(0.92);
    opacity: 0.35;
}

.cv-surpresa__msg {
    margin-top: 1.25rem;
    padding: 1.25rem 1rem;
    background: rgba(255, 253, 248, 0.9);
    border: 1px solid rgba(224, 138, 18, 0.3);
    border-radius: 1rem;
    animation: cv-reveal 0.7s var(--cv-ease) both;
}

.cv-surpresa__texto {
    font-family: var(--cv-font-display);
    font-size: 1.35rem;
    font-style: italic;
    color: var(--cv-amber);
    line-height: 1.4;
    margin: 0 0 1rem;
}

.cv-surpresa__assinatura {
    margin: 0;
    color: var(--cv-muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

/* ---- Player de musica (nunca autoplay; escolha de faixa) ---- */
.cv-player {
    position: fixed;
    top: max(0.75rem, env(safe-area-inset-top));
    right: max(0.75rem, env(safe-area-inset-right));
    z-index: 45;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    max-width: min(78vw, 17rem);
}

.cv-player[hidden] {
    display: none;
}

.cv-player__barra {
    display: flex;
    align-items: stretch;
    border: 1px solid rgba(224, 138, 18, 0.4);
    border-radius: 999px;
    background: rgba(255, 253, 248, 0.94);
    box-shadow: 0 6px 16px rgba(44, 58, 69, 0.14);
    backdrop-filter: blur(6px);
    overflow: hidden;
    max-width: 100%;
}

.cv-player__play,
.cv-player__abrir {
    border: 0;
    background: transparent;
    color: var(--cv-amber);
    font: inherit;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    min-height: 44px;
}

.cv-player__play {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.5rem 0.4rem 0.85rem;
    min-width: 0;
}

.cv-player__txt {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 9.5rem;
}

.cv-player__abrir {
    padding: 0 0.8rem 0 0.55rem;
    border-left: 1px solid rgba(224, 138, 18, 0.25);
}

.cv-player__caret {
    display: inline-block;
    transition: transform 0.25s var(--cv-ease);
}

.cv-player__abrir[aria-expanded="true"] .cv-player__caret {
    transform: rotate(180deg);
}

/* Equalizador: barras animadas somente quando esta tocando */
.cv-player__eq {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.cv-player__eq i {
    display: block;
    width: 3px;
    height: 40%;
    border-radius: 2px;
    background: currentColor;
    transition: height 0.2s ease;
}

.cv-player__play[aria-pressed="true"] .cv-player__eq i {
    animation: cv-eq 0.9s ease-in-out infinite;
}

.cv-player__play[aria-pressed="true"] .cv-player__eq i:nth-child(2) { animation-delay: 0.15s; }
.cv-player__play[aria-pressed="true"] .cv-player__eq i:nth-child(3) { animation-delay: 0.3s; }

@keyframes cv-eq {
    0%, 100% { height: 30%; }
    50% { height: 100%; }
}

.cv-player.is-tocando .cv-player__barra {
    border-color: transparent;
    background: linear-gradient(135deg, var(--cv-sun), var(--cv-sun-deep));
}

.cv-player.is-tocando .cv-player__play,
.cv-player.is-tocando .cv-player__abrir {
    color: #fffdf8;
}

.cv-player.is-tocando .cv-player__abrir {
    border-left-color: rgba(255, 255, 255, 0.4);
}

/* Lista de faixas */
.cv-player__lista {
    list-style: none;
    margin: 0;
    padding: 0.4rem;
    width: max-content;
    max-width: 100%;
    background: rgba(255, 253, 248, 0.97);
    border: 1px solid rgba(224, 138, 18, 0.35);
    border-radius: 0.9rem;
    box-shadow: 0 12px 28px rgba(44, 58, 69, 0.18);
    backdrop-filter: blur(8px);
    animation: cv-lista-abre 0.28s var(--cv-ease) both;
}

.cv-player__lista[hidden] {
    display: none;
}

@keyframes cv-lista-abre {
    from { opacity: 0; transform: translateY(-8px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.cv-player__lista-titulo {
    padding: 0.3rem 0.6rem 0.45rem;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--cv-muted);
}

.cv-player__faixa {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem 0.65rem;
    min-height: 44px;
    border: 0;
    border-radius: 0.6rem;
    background: transparent;
    color: var(--cv-ink);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.cv-player__faixa:hover,
.cv-player__faixa:focus-visible {
    background: rgba(255, 213, 106, 0.3);
}

.cv-player__faixa.is-atual {
    background: rgba(255, 213, 106, 0.45);
    color: var(--cv-amber);
    font-weight: 700;
}

.cv-player__faixa-ico {
    flex: 0 0 auto;
    color: var(--cv-sun-deep);
}

.cv-player__faixa-nome {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 11rem;
}

/* Envelope fechado: player fica escondido */
.cv-envelope:not(.is-open) ~ .cv-player {
    display: none;
}

/* ---- Ceu vivo de fundo: nuvens e baloes ---- */
.cv-ceu {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.cv-nuvem {
    position: absolute;
    width: 120px;
    height: 42px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    filter: blur(0.5px);
    animation: cv-nuvem-passa linear infinite;
}

.cv-nuvem::before,
.cv-nuvem::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: inherit;
}

.cv-nuvem::before {
    width: 58px;
    height: 58px;
    left: 16px;
    top: -24px;
}

.cv-nuvem::after {
    width: 44px;
    height: 44px;
    right: 18px;
    top: -16px;
}

.cv-nuvem--1 { top: 8%; animation-duration: 58s; opacity: 0.75; }
.cv-nuvem--2 { top: 26%; transform: scale(0.7); animation-duration: 46s; animation-delay: -14s; opacity: 0.55; }
.cv-nuvem--3 { top: 58%; transform: scale(1.15); animation-duration: 72s; animation-delay: -30s; opacity: 0.42; }

@keyframes cv-nuvem-passa {
    from { left: -40%; }
    to { left: 115%; }
}

.cv-balao {
    position: absolute;
    bottom: -18%;
    width: 34px;
    height: 44px;
    border-radius: 50% 50% 46% 46%;
    background: linear-gradient(160deg, var(--cv-sun-bright), var(--cv-sun-deep));
    opacity: 0.5;
    animation: cv-balao-sobe linear infinite;
}

/* Barbante do balao */
.cv-balao::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    width: 1px;
    height: 26px;
    background: rgba(224, 138, 18, 0.5);
}

.cv-balao--1 { left: 12%; animation-duration: 26s; }
.cv-balao--2 { left: 62%; animation-duration: 34s; animation-delay: -12s; background: linear-gradient(160deg, #bfe7f7, #3a9fc4); }
.cv-balao--3 { left: 84%; animation-duration: 30s; animation-delay: -20s; background: linear-gradient(160deg, #ffd0d0, #f18f8f); }

@keyframes cv-balao-sobe {
    0% { transform: translateY(0) rotate(-4deg); opacity: 0; }
    12% { opacity: 0.55; }
    88% { opacity: 0.45; }
    100% { transform: translateY(-130vh) rotate(6deg); opacity: 0; }
}

/* Conteudo sempre acima do ceu decorativo (nao alterar o position do player) */
.cv-main {
    position: relative;
    z-index: 1;
}

/* ---- Confete (gerado por JS ao abrir os envelopes) ---- */
.cv-confete {
    position: fixed;
    inset: 0;
    z-index: 60;
    overflow: hidden;
    pointer-events: none;
}

.cv-confete__peca {
    position: absolute;
    top: -6vh;
    width: 10px;
    height: 14px;
    border-radius: 2px;
    opacity: 0;
    animation: cv-confete-cai cubic-bezier(0.3, 0.6, 0.5, 1) forwards;
}

@keyframes cv-confete-cai {
    0% { opacity: 0; transform: translate3d(0, -10vh, 0) rotate(0deg); }
    10% { opacity: 1; }
    100% { opacity: 0; transform: translate3d(var(--cv-x, 0), 108vh, 0) rotate(var(--cv-rot, 540deg)); }
}

/* ---- Brilhos ao redor do envelope inicial ---- */
.cv-brilhos {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.cv-brilho {
    position: absolute;
    bottom: 12%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle, #fffbe8, rgba(255, 213, 106, 0));
    animation: cv-brilho-sobe 5.5s ease-in-out infinite;
}

.cv-brilho--1 { left: 12%; animation-delay: 0s; }
.cv-brilho--2 { left: 24%; animation-delay: 1.4s; width: 6px; height: 6px; }
.cv-brilho--3 { left: 38%; animation-delay: 2.6s; }
.cv-brilho--4 { left: 50%; animation-delay: 0.7s; width: 11px; height: 11px; }
.cv-brilho--5 { left: 62%; animation-delay: 3.4s; }
.cv-brilho--6 { left: 74%; animation-delay: 1.9s; width: 6px; height: 6px; }
.cv-brilho--7 { left: 86%; animation-delay: 4.2s; }
.cv-brilho--8 { left: 6%; animation-delay: 3.1s; width: 5px; height: 5px; }

@keyframes cv-brilho-sobe {
    0% { transform: translateY(0) scale(0.6); opacity: 0; }
    25% { opacity: 0.95; }
    100% { transform: translateY(-58vh) scale(1.15); opacity: 0; }
}

@media (min-width: 640px) {
    .cv-main {
        padding-top: 2.5rem;
    }

    .cv-nome {
        white-space: nowrap;
    }

    .cv-nome__linha {
        display: inline;
    }

    .cv-nome__linha + .cv-nome__linha::before {
        content: '\00a0';
    }

    .cv-main--convite {
        padding-top: 4.5rem;
    }

    .cv-btn {
        width: auto;
        min-width: 220px;
        align-self: center;
    }

    .cv-form {
        align-items: stretch;
    }

    .cv-pwa-banner {
        left: 50%;
        right: auto;
        width: min(420px, calc(100% - 1.5rem));
        transform: translateX(-50%);
    }

    .cv-timeline {
        padding-left: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }

    .cv-envelope.is-opening .cv-env-svg__top,
    .cv-envelope.is-opening .cv-env-svg__letter,
    .cv-envelope.is-opening .cv-selo {
        transition: none !important;
        transition-delay: 0s !important;
    }

    .cv-reveal,
    .cv-reveal--esq,
    .cv-reveal--dir {
        opacity: 1;
        transform: none;
    }

    /* Elementos puramente decorativos saem de cena */
    .cv-ceu,
    .cv-confete,
    .cv-brilhos,
    .cv-hero__raios {
        display: none;
    }

    .cv-btn::after {
        display: none;
    }
}
