/* ==========================================================
   Amigo Secreto · diseño
   ========================================================== */

:root {
    --bg: #f6f3ff;
    --bg-2: #ffeef3;
    --card: rgba(255, 255, 255, 0.78);
    --card-solid: #ffffff;
    --borde: rgba(91, 61, 160, 0.12);
    --texto: #1e1537;
    --suave: #6b6385;
    --primario: #ff3d6e;
    --primario-2: #ff8a3d;
    --morado: #7c4dff;
    --verde: #12b886;
    --verde-suave: #e3f9f1;
    --amarillo: #ffb020;
    --amarillo-suave: #fff4dc;
    --rojo-suave: #ffe5ea;
    --input: #ffffff;
    --sombra: 0 10px 40px -12px rgba(76, 42, 160, 0.25);
    --sombra-boton: 0 10px 24px -8px rgba(255, 61, 110, 0.6);
    --radio: 22px;
    --degradado: linear-gradient(135deg, var(--primario) 0%, var(--primario-2) 100%);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #120c24;
        --bg-2: #1f0f2e;
        --card: rgba(34, 25, 60, 0.72);
        --card-solid: #221a3c;
        --borde: rgba(200, 180, 255, 0.12);
        --texto: #f3efff;
        --suave: #a99fc6;
        --verde-suave: rgba(18, 184, 134, 0.16);
        --amarillo-suave: rgba(255, 176, 32, 0.15);
        --rojo-suave: rgba(255, 61, 110, 0.16);
        --input: rgba(255, 255, 255, 0.06);
        --sombra: 0 14px 40px -14px rgba(0, 0, 0, 0.6);
    }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--texto);
    line-height: 1.5;
    background:
        radial-gradient(900px 500px at 10% -10%, rgba(124, 77, 255, 0.22), transparent 60%),
        radial-gradient(800px 500px at 110% 10%, rgba(255, 61, 110, 0.20), transparent 60%),
        radial-gradient(700px 600px at 50% 120%, rgba(255, 138, 61, 0.18), transparent 60%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
    background-attachment: fixed;
}

/* Copos decorativos */
body::before {
    content: "";
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,.7), transparent 60%),
        radial-gradient(2px 2px at 70% 15%, rgba(255,255,255,.6), transparent 60%),
        radial-gradient(1.5px 1.5px at 40% 70%, rgba(255,255,255,.6), transparent 60%),
        radial-gradient(2px 2px at 85% 60%, rgba(255,255,255,.5), transparent 60%),
        radial-gradient(1.5px 1.5px at 10% 85%, rgba(255,255,255,.5), transparent 60%),
        radial-gradient(1.5px 1.5px at 60% 45%, rgba(255,255,255,.4), transparent 60%);
    opacity: .9;
}
@media (prefers-color-scheme: light) { body::before { opacity: 0; } }

a { color: var(--primario); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }

/* ---------- Barra superior ---------- */
.barra {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px max(16px, calc((100% - 960px) / 2));
    background: color-mix(in srgb, var(--card-solid) 70%, transparent);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border-bottom: 1px solid var(--borde);
}
.logo {
    display: flex; align-items: center; gap: 10px;
    color: var(--texto); font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em;
}
.logo:hover { text-decoration: none; }
.logo-icono {
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
    background: var(--degradado); box-shadow: var(--sombra-boton); font-size: 1.2rem;
}
.nav { display: flex; gap: 4px; }
.nav a {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 14px; border-radius: 999px;
    color: var(--suave); font-weight: 600; font-size: .95rem;
    transition: background .2s, color .2s;
}
.nav a:hover { background: var(--borde); color: var(--texto); text-decoration: none; }
.nav a.activo { background: var(--texto); color: var(--card-solid); }
.nav svg { width: 18px; height: 18px; flex: none; }

/* Barra inferior en celulares */
@media (max-width: 720px) {
    .barra .nav { display: none; }
    .tabbar {
        position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30;
        display: grid; grid-template-columns: repeat(5, 1fr);
        padding: 6px; border-radius: 22px;
        background: color-mix(in srgb, var(--card-solid) 82%, transparent);
        backdrop-filter: blur(18px) saturate(1.5);
        -webkit-backdrop-filter: blur(18px) saturate(1.5);
        border: 1px solid var(--borde); box-shadow: var(--sombra);
        padding-bottom: calc(6px + env(safe-area-inset-bottom) / 2);
    }
    .tabbar a {
        display: flex; flex-direction: column; align-items: center; gap: 2px;
        padding: 8px 4px; border-radius: 16px;
        color: var(--suave); font-size: .72rem; font-weight: 600;
    }
    .tabbar a:hover { text-decoration: none; }
    .tabbar a.activo { color: var(--primario); background: var(--rojo-suave); }
    .tabbar svg { width: 22px; height: 22px; }
    body.con-tabbar .contenedor { padding-bottom: 110px; }
}
@media (min-width: 721px) { .tabbar { display: none; } }

/* ---------- Contenedor y tarjetas ---------- */
.contenedor { position: relative; z-index: 1; max-width: 960px; margin: 0 auto; padding: 28px 16px 56px; }
.tarjeta {
    background: var(--card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    padding: 26px;
    margin-bottom: 20px;
    box-shadow: var(--sombra);
    animation: aparecer .45s ease both;
}
.tarjeta.angosta { max-width: 440px; margin: 20px auto; }
@media (max-width: 520px) { .tarjeta { padding: 20px; border-radius: 20px; } }
@keyframes aparecer { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.centrado { text-align: center; }
h1 { font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.15; margin: 0 0 8px; letter-spacing: -.02em; font-weight: 800; }
h2 { font-size: clamp(1.15rem, 3vw, 1.4rem); margin: 0 0 8px; letter-spacing: -.01em; font-weight: 700; }
.suave { color: var(--suave); }
.pequeno { font-size: .875rem; }
.oculto { display: none !important; }
.degradado-texto {
    background: var(--degradado); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Login (hero) ---------- */
.hero-login { text-align: center; margin: 12px auto 4px; max-width: 440px; }
.hero-login .regalo {
    display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 26px;
    background: var(--degradado); font-size: 2.6rem; box-shadow: var(--sombra-boton);
    animation: flotar 3s ease-in-out infinite;
}
.hero-login h1 { margin-top: 18px; }
@keyframes flotar { 50% { transform: translateY(-6px) rotate(-4deg); } }

/* Foto del grupo en el login */
.hero-foto {
    position: relative; z-index: 1; overflow: hidden;
    max-width: 760px; margin: 4px auto 0; border-radius: 28px;
    box-shadow: var(--sombra); animation: aparecer .5s ease both;
}
.hero-foto img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: center 35%; }
.hero-foto::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(18, 12, 36, 0) 35%, rgba(18, 12, 36, .88) 100%);
}
.hero-foto-texto { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 24px 26px; color: #fff; }
.hero-foto-texto h1 { margin: 10px 0 4px; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.4); }
.hero-foto-texto p { margin: 0; opacity: .9; }
.hero-foto + .tarjeta.angosta { margin-top: -36px; position: relative; z-index: 2; }
@media (max-width: 520px) {
    .hero-foto { border-radius: 22px; margin-left: -4px; margin-right: -4px; }
    .hero-foto img { aspect-ratio: 4 / 5; object-position: 40% center; }
    .hero-foto-texto { padding: 18px 18px 52px; }
    .hero-foto + .tarjeta.angosta { margin-top: -40px; }
}

/* ---------- Formularios ---------- */
label { display: block; margin: 14px 0; font-weight: 600; font-size: .92rem; }
.campo { position: relative; margin-top: 7px; }
.campo svg {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 20px; height: 20px; color: var(--suave); pointer-events: none;
}
input, select {
    display: block; width: 100%; margin-top: 7px;
    padding: 14px 16px; font: inherit; font-size: 1rem;
    color: var(--texto); background: var(--input);
    border: 1.5px solid var(--borde); border-radius: 14px;
    transition: border-color .2s, box-shadow .2s;
    appearance: none; -webkit-appearance: none;
}
.campo input, .campo select { margin-top: 0; padding-left: 46px; }
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23887fa6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; padding-right: 44px;
}
select option { color: #1e1537; }
input:focus, select:focus {
    outline: none; border-color: var(--morado);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--morado) 20%, transparent);
}
input.codigo { letter-spacing: .5em; font-weight: 700; font-size: 1.15rem; }
input.mini { margin: 0; padding: 9px 12px; font-size: .92rem; border-radius: 10px; min-width: 120px; }

/* Buscador de nombre (login) */
.grupo-campo { margin: 14px 0; font-weight: 600; font-size: .92rem; }
.grupo-campo .campo { margin-top: 7px; }
.buscador { z-index: 10; } /* la lista debe quedar encima de los campos siguientes */
.buscador svg { top: 26px; }
.buscador.elegido input { border-color: var(--verde); }
.buscador.elegido::after {
    content: "✓"; position: absolute; right: 16px; top: 26px; transform: translateY(-50%);
    color: var(--verde); font-weight: 800;
}
.buscador.error input { border-color: #e5384f; animation: sacudir .4s; }
@keyframes sacudir { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.opciones {
    position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 15;
    margin: 0; padding: 6px; list-style: none;
    max-height: 264px; overflow-y: auto; overscroll-behavior: contain;
    background: var(--card-solid); border: 1px solid var(--borde); border-radius: 16px;
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .45);
    animation: aparecer .15s ease both;
}
.opciones li {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 12px; cursor: pointer; font-weight: 600;
}
.opciones li.activa, .opciones li[data-i]:hover { background: color-mix(in srgb, var(--morado) 16%, transparent); }
.opciones .ini {
    display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; flex: none;
    background: var(--degradado); color: #fff; font-size: .9rem; font-weight: 800;
}
.opciones mark { background: none; color: var(--primario); }
.opciones .sin-resultados { color: var(--suave); cursor: default; justify-content: center; font-weight: 500; }

/* ---------- Botones ---------- */
.boton {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; margin-top: 10px; padding: 15px 22px;
    font: inherit; font-size: 1.02rem; font-weight: 700; color: #fff;
    background: var(--degradado); border: 0; border-radius: 14px; cursor: pointer;
    box-shadow: var(--sombra-boton);
    transition: transform .15s, box-shadow .2s, filter .2s;
}
.boton:hover { transform: translateY(-2px); filter: brightness(1.05); }
.boton:active { transform: translateY(0) scale(.98); }
.boton:disabled { opacity: .65; cursor: wait; transform: none; }
.boton-auto { width: auto; }
.boton-secundario {
    background: transparent; color: var(--texto); box-shadow: none; border: 1.5px solid var(--borde);
}
.boton-secundario:hover { background: var(--borde); filter: none; }
.boton-grande { width: auto; font-size: 1.2rem; padding: 17px 48px; border-radius: 999px; }
.boton-link {
    background: none; border: 0; padding: 6px 8px; border-radius: 8px;
    font: inherit; font-size: .85rem; font-weight: 600; color: var(--morado); cursor: pointer;
}
.boton-link:hover { background: var(--borde); }
.peligro { color: #e5384f; }
.peligro-fondo { background: linear-gradient(135deg, #e5384f, #b3123a); box-shadow: 0 10px 24px -10px rgba(229, 56, 79, .7); }

/* ---------- Alertas ---------- */
.alerta {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 13px 16px; border-radius: 14px; margin: 12px 0; font-weight: 500;
    animation: aparecer .3s ease both;
}
.alerta-ok { background: var(--verde-suave); color: var(--verde); }
.alerta-error { background: var(--rojo-suave); color: #e5384f; }
.alerta-info { background: color-mix(in srgb, var(--morado) 14%, transparent); color: var(--morado); }

/* Código de verificación mostrado en pantalla (modo sin correo) */
.codigo-dev {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    margin: 16px 0; padding: 18px 16px; border-radius: 18px; text-align: center;
    background: color-mix(in srgb, var(--morado) 14%, transparent);
    border: 1.5px dashed color-mix(in srgb, var(--morado) 45%, transparent);
}
.codigo-dev-titulo { font-size: .85rem; font-weight: 600; color: var(--suave); }
.codigo-dev-numero {
    font-size: clamp(2rem, 9vw, 2.6rem); font-weight: 800; letter-spacing: .3em; padding-left: .3em;
    color: var(--morado); font-variant-numeric: tabular-nums; line-height: 1.2;
}

/* ---------- Bienvenida ---------- */
.bienvenida { display: flex; gap: 18px; align-items: center; }
.avatar {
    flex: none; display: grid; place-items: center;
    width: 64px; height: 64px; border-radius: 20px;
    background: var(--degradado); color: #fff; font-weight: 800; font-size: 1.6rem;
    box-shadow: var(--sombra-boton);
}
.avatar.chico { width: 42px; height: 42px; border-radius: 14px; font-size: 1.05rem; box-shadow: none; }
.bienvenida h1 { margin: 6px 0 4px; }
.bienvenida p { margin: 0; }
@media (max-width: 520px) { .bienvenida { align-items: flex-start; } .avatar { width: 52px; height: 52px; font-size: 1.3rem; border-radius: 16px; } }

.etiqueta {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px; border-radius: 999px;
    background: var(--amarillo-suave); color: #c27c00; font-size: .78rem; font-weight: 700;
}
.etiqueta-gris { background: var(--borde); color: var(--suave); }

/* ---------- Estadísticas ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.stat {
    padding: 14px; border-radius: 16px; background: var(--input); border: 1px solid var(--borde); text-align: center;
}
.stat b { display: block; font-size: 1.6rem; line-height: 1.1; font-weight: 800; }
.stat span { font-size: .8rem; color: var(--suave); font-weight: 600; }

/* ---------- Ruleta ---------- */
.ruleta-caja {
    position: relative; width: min(420px, 100%); aspect-ratio: 1; margin: 26px auto 12px;
}
.ruleta-caja::before {
    content: ""; position: absolute; inset: -12px; border-radius: 50%;
    background: conic-gradient(from 0deg, var(--primario), var(--primario-2), var(--amarillo), var(--morado), var(--primario));
    filter: blur(22px); opacity: .45; z-index: 0;
}
.ruleta-caja canvas {
    position: relative; z-index: 1; width: 100%; height: 100%; display: block; border-radius: 50%;
    box-shadow: 0 0 0 8px var(--card-solid), 0 0 0 10px var(--borde), 0 20px 50px -10px rgba(0,0,0,.35);
}
.flecha {
    position: absolute; top: -18px; left: 50%; transform: translateX(-50%); z-index: 3;
    width: 0; height: 0;
    border-left: 18px solid transparent; border-right: 18px solid transparent;
    border-top: 34px solid var(--texto);
    filter: drop-shadow(0 4px 6px rgba(0,0,0,.3));
    font-size: 0;
}
.girando .flecha { animation: tic .12s linear infinite; }
@keyframes tic { 50% { transform: translateX(-50%) rotate(-8deg); } }

.resultado-caja {
    margin: 20px auto 8px; padding: 22px; max-width: 420px; border-radius: 22px;
    background: var(--degradado); color: #fff; box-shadow: var(--sombra-boton);
    animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) both;
}
.resultado-caja small { display: block; font-size: .95rem; font-weight: 600; opacity: .9; }
.resultado-caja strong { display: block; font-size: clamp(2rem, 8vw, 2.8rem); font-weight: 800; line-height: 1.15; margin-top: 4px; }
@keyframes pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }

/* ---------- Progreso ---------- */
.progreso { height: 12px; background: var(--borde); border-radius: 999px; overflow: hidden; margin: 14px 0 22px; }
.progreso div { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--verde), #38d9a9); transition: width .6s ease; }

/* ---------- Lista de participantes (panel) ---------- */
.lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.persona {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 14px; border-radius: 16px;
    background: var(--input); border: 1px solid var(--borde);
}
.persona .nombre { flex: 1; min-width: 0; font-weight: 700; }
.persona .nombre small { display: block; font-weight: 500; color: var(--suave); font-size: .8rem; }
.persona .chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.persona.listo .avatar { background: linear-gradient(135deg, var(--verde), #38d9a9); }
.persona.pendiente .avatar { background: var(--borde); color: var(--suave); }

/* ---------- Chips ---------- */
.chip {
    display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
    padding: 4px 11px; border-radius: 999px; font-size: .78rem; font-weight: 700;
    background: var(--borde); color: var(--suave);
}
.chip-ok { background: var(--verde-suave); color: var(--verde); }
.chip-pend { background: var(--amarillo-suave); color: #c27c00; }

/* ---------- Tabla (admin) ---------- */
.tabla-scroll { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
.tabla { width: 100%; border-collapse: separate; border-spacing: 0 8px; font-size: .95rem; }
.tabla th {
    text-align: left; padding: 4px 10px; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--suave);
}
.tabla td { padding: 10px; background: var(--input); border-top: 1px solid var(--borde); border-bottom: 1px solid var(--borde); vertical-align: middle; }
.tabla td:first-child { border-left: 1px solid var(--borde); border-radius: 14px 0 0 14px; }
.tabla td:last-child { border-right: 1px solid var(--borde); border-radius: 0 14px 14px 0; }
.acciones form { display: flex; flex-wrap: wrap; gap: 2px; }
code { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 1rem; font-weight: 700; letter-spacing: 3px; color: var(--morado); }

/* Tabla convertida en tarjetas en celulares */
@media (max-width: 720px) {
    .tabla thead { display: none; }
    .tabla, .tabla tbody, .tabla tr, .tabla td { display: block; width: 100%; }
    .tabla { border-spacing: 0; }
    .tabla tr {
        margin-bottom: 12px; padding: 12px; border-radius: 16px;
        background: var(--input); border: 1px solid var(--borde);
    }
    .tabla td, .tabla td:first-child, .tabla td:last-child {
        display: flex; align-items: center; justify-content: space-between; gap: 12px;
        padding: 6px 0; border: 0; border-radius: 0; background: none;
    }
    .tabla td::before { content: attr(data-label); font-size: .78rem; font-weight: 700; color: var(--suave); text-transform: uppercase; letter-spacing: .05em; }
    .tabla td input.mini { max-width: 62%; }
    .tabla td.acciones { justify-content: flex-end; padding-top: 10px; }
    .tabla td.acciones::before { display: none; }
}

.fila-titulo { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.fila-form { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.fila-form input { flex: 1 1 180px; margin: 0; }
.fila-form .boton { width: auto; margin: 0; }

/* ---------- Aviso del monto mínimo ---------- */
.aviso {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px; margin-bottom: 20px; border-radius: 18px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--amarillo) 22%, var(--card-solid)), color-mix(in srgb, var(--primario-2) 18%, var(--card-solid)));
    border: 1px solid color-mix(in srgb, var(--amarillo) 40%, transparent);
    box-shadow: var(--sombra);
    animation: aparecer .45s ease both;
}
.aviso-icono {
    flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
    background: var(--card-solid); font-size: 1.4rem;
}
.aviso strong { display: block; font-size: 1.02rem; }
.aviso span:not(.aviso-icono) { display: block; font-size: .85rem; color: var(--suave); }

/* ---------- Deseos ---------- */
.deseos-amigo { text-align: left; margin-top: 22px; }
.deseos-amigo h3 { margin: 0 0 12px; font-size: 1.05rem; }
.lista.deseos .avatar.chico { background: color-mix(in srgb, var(--morado) 16%, transparent); color: var(--morado); }
.vacio { text-align: center; padding: 26px 12px; border-radius: 16px; border: 2px dashed var(--borde); color: var(--suave); }
.vacio span { font-size: 2.2rem; display: block; }
.vacio p { margin: 6px 0 0; }

/* ---------- Modal de carga ---------- */
.cargando {
    position: fixed; inset: 0; z-index: 100;
    display: grid; place-items: center; padding: 16px;
    background: rgba(18, 12, 36, .55);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    animation: aparecer .15s ease both;
}
.cargando-caja {
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    min-width: 220px; max-width: 320px; padding: 26px 28px; border-radius: 22px; text-align: center;
    background: var(--card-solid); border: 1px solid var(--borde); box-shadow: var(--sombra);
}
.cargando-texto { margin: 0; font-weight: 600; }
.spinner {
    width: 46px; height: 46px; border-radius: 50%;
    border: 4px solid var(--borde); border-top-color: var(--primario); border-right-color: var(--primario-2);
    animation: girar-spinner .8s linear infinite;
}
@keyframes girar-spinner { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: girar-spinner 1.6s linear infinite !important; } }

/* ---------- Confeti ---------- */
.confeti {
    position: fixed; top: -14px; width: 10px; height: 16px; border-radius: 3px; z-index: 50; pointer-events: none;
    animation: caer 3.2s cubic-bezier(.3, .6, .6, 1) forwards;
}
@keyframes caer { to { top: 105vh; transform: translateX(var(--dx, 0)) rotate(900deg); } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
