/* =============================================================
   SWIPEA · KMIS  —  candy game aesthetic
   Chunky outlined typography · 3D candy buttons · bouncy motion
   Vibrant gradient mesh · sparkles · playful
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

body.pc-swipea-page { overflow: hidden; }
body.pc-swipea-page .pc-coins-wrap { display: none !important; }
/* Oculta el título de la página WP (que viene del nombre que le
   pusiste a la página al crearla — ej. "Swipea camisetas") y otras
   decoraciones que el theme inserta. La pregunta "¿Te gusta?" la
   muestra ya nuestro shortcode. */
body.pc-swipea-page .entry-title,
body.pc-swipea-page .page-title,
body.pc-swipea-page .entry-header,
body.pc-swipea-page .page-header,
body.pc-swipea-page header.page-header,
body.pc-swipea-page .woostify-entry-header,
body.pc-swipea-page .woostify-page-header,
body.pc-swipea-page .breadcrumbs,
body.pc-swipea-page .breadcrumb,
body.pc-swipea-page .woocommerce-breadcrumb { display: none !important; }

.pcr-app {
    /* Brand background — claros del logo */
    --brand-1:     #EFF5F9;
    --brand-2:     #F3F8FB;
    --brand-deep:  #DCE6EE;   /* sombra/sección de un nivel más oscuro */

    /* Acento único en azul brand para detalles muy puntuales */
    --brand-accent: #4A90B8;

    /* Verdes (positivos) — 2 tonos */
    --green:       oklch(72% 0.17 148);
    --green-deep:  oklch(55% 0.18 150);

    /* Rojos (negativos) — 2 tonos */
    --red:         oklch(67% 0.20 25);
    --red-deep:    oklch(50% 0.21 22);

    /* Tinta — texto oscuro sobre fondo claro */
    --navy:        #1D2A3A;
    --navy-soft:   #34475C;
    --navy-mute:   #6A7B8E;

    --paper:       #FFFFFF;
    --cream:       #F8FBFD;

    --display:  'Outfit', system-ui, sans-serif;       /* peso 600 máx — refinado */
    --display-2:'Outfit', system-ui, sans-serif;
    --sans:     'Manrope', system-ui, sans-serif;

    /* Sombras "candy soft" — depth offset en negro translúcido +
       blur ambient. Sin outline ring. */
    --shadow-card:
        0 8px 0 rgba(29, 17, 69, 0.18),
        0 20px 36px rgba(29, 17, 69, 0.28),
        0 1px 0 rgba(255, 255, 255, 0.6) inset;

    --shadow-button:
        0 5px 0 rgba(29, 17, 69, 0.28),
        0 9px 18px rgba(29, 17, 69, 0.30);

    --shadow-button-pressed:
        0 1px 0 rgba(29, 17, 69, 0.25),
        0 3px 8px rgba(29, 17, 69, 0.22);

    position: fixed;
    /* Empieza por debajo del header del tema. La altura real la
       detecta la JS (rate.js) y la expone en --pcr-header-offset.
       Si la JS falla, garantizamos un mínimo razonable (64px móvil,
       96px desktop) para que el header anclado del tema no tape
       las instrucciones. */
    top: max(var(--pcr-header-offset, 0px), 64px);
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    color: var(--navy);
    font-family: var(--sans);
    font-weight: 700;
    z-index: 50;
    overflow: hidden;
    /* Base lineal entre los dos tonos brand — capa estática */
    background: linear-gradient(160deg, var(--brand-1) 0%, var(--brand-2) 100%);
}

/* "Aguas" — blobs blureados drifteando suavemente sobre el fondo,
   en tonos brand. Animación transform-only (cheap, GPU). */
.pcr-app::before {
    content: '';
    position: absolute;
    inset: -20%;
    z-index: 0;
    background:
        radial-gradient(ellipse 55% 45% at 18% 22%, var(--brand-accent) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 82% 78%, var(--brand-accent) 0%, transparent 62%),
        radial-gradient(ellipse 45% 35% at 50% 95%, var(--brand-accent) 0%, transparent 65%),
        radial-gradient(ellipse 40% 30% at 95% 12%, var(--brand-accent) 0%, transparent 65%);
    filter: blur(72px);
    opacity: 0.35;
    pointer-events: none;
    animation: pcr-mesh-drift 32s ease-in-out infinite alternate;
}
@keyframes pcr-mesh-drift {
    0%   { transform: translate(0, 0)        scale(1); }
    50%  { transform: translate(-2%, 2%)     scale(1.06); }
    100% { transform: translate(2%, -1%)     scale(1.02); }
}

/* =============== HEAD — pregunta + instrucciones en 2 columnas ===== */
.pcr-head {
    flex: 0 0 auto;
    position: relative;
    z-index: 4;
    padding: 24px 20px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    text-align: left;
    animation: pcr-pop-in .6s cubic-bezier(.34,1.56,.64,1) backwards;
    animation-delay: .05s;
}
.pcr-title {
    display: inline-block;
    margin: 0;
    font-family: var(--display);
    font-weight: 700;
    font-size: 22px;
    line-height: 1;
    letter-spacing: -.01em;
    color: var(--navy);
}
.pcr-sub {
    display: inline-block;
    margin: 0;
    font-family: var(--sans);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: .14em;
    color: var(--navy-mute);
    text-transform: uppercase;
    border-left: 1.5px solid color-mix(in oklab, var(--navy) 20%, transparent);
    padding-left: 14px;
}
@media (min-width: 720px) {
    .pcr-head { padding-top: 64px; padding-bottom: 14px; gap: 18px; }
    .pcr-title { font-size: 26px; }
    .pcr-sub { font-size: 12px; }
    /* Mínimo robusto en .pcr-app para que el header del tema en
       desktop no tape la pregunta + instrucciones. */
    .pcr-app { top: max(var(--pcr-header-offset, 0px), 96px); }
}
@media (max-width: 480px) {
    /* Móviles muy estrechos: apilamos para que no se rompan las
       palabras y el subtítulo respire. */
    .pcr-head { gap: 6px; flex-direction: column; text-align: center; }
    .pcr-sub { border-left: 0; padding-left: 0; }
}

/* =============== STAGE =============== */
.pcr-stage {
    flex: 1 1 auto;
    position: relative;
    z-index: 1;
    padding: 14px 0 8px;
    /* Critical: gestos */
    touch-action: none;
}

/* =============== CARD =============== */
.pcr-card {
    position: absolute;
    top: 0; bottom: 0; left: 0; right: 0;
    margin: auto;
    width: calc(100% - 38px);
    max-width: 540px;
    max-height: calc(100% - 30px);
    aspect-ratio: var(--card-ar, 3 / 4);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--paper);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    opacity: 0;
    will-change: transform, opacity;
    transition: transform .2s cubic-bezier(.34,1.56,.64,1),
                opacity .4s ease;
    /* Gestos */
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    cursor: grab;
}
.pcr-card.is-top:active { cursor: grabbing; }
.pcr-card.is-ready      { opacity: 1; }
.pcr-card.is-throwing   { transition: transform .5s cubic-bezier(.34,1.56,.64,1), opacity .4s ease; }

/* Botón "Comprar" en la card de swipea. Vive en la esquina superior
   derecha — el meta inferior se reserva al avatar/tag del producto.
   Captura sus propios eventos para que el drag no lo robe. */
.pcr-buy {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    border: 0;
    background: #6366F1;
    color: #FFFFFF;
    font-family: var(--sans, system-ui);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
    padding: 9px 14px 8px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow:
        0 2px 0 rgba(67, 56, 202, .55),
        0 10px 22px rgba(99, 102, 241, .55);
    transition: background .15s ease, transform .12s ease, box-shadow .12s ease;
    /* Evita que el card "robe" el gesto: nuestro JS también
       stopPropagation, pero esto es defensa en profundidad. */
    touch-action: manipulation;
    pointer-events: auto;
}
.pcr-buy:hover {
    background: #4F46E5;
    transform: translateY(-1px);
    box-shadow: 0 3px 0 rgba(67, 56, 202, .6), 0 12px 26px rgba(99, 102, 241, .65);
}
.pcr-buy:active { transform: translateY(0); }
.pcr-card.is-zoomed .pcr-buy { opacity: 0; pointer-events: none; transition: opacity .2s ease; }
/* Onboarding wiggle — la primera card de la sesión balancea para
   sugerir el gesto de swipe. JS añade `.is-onboarding` solo al
   primer card y la quita cuando termina la animación. */
.pcr-card.is-onboarding {
    animation: pcr-wiggle 1.6s cubic-bezier(.32,.72,.32,1) .45s 1 both;
}
@keyframes pcr-wiggle {
    0%, 100% { transform: translateX(0)     rotate(0); }
    18%      { transform: translateX(-34px) rotate(-3deg); }
    36%      { transform: translateX(28px)  rotate(2.5deg); }
    54%      { transform: translateX(-18px) rotate(-1.5deg); }
    74%      { transform: translateX(12px)  rotate(1deg); }
}

/* Inner highlight ring inside card — the "candy glaze" effect */
.pcr-card::before {
    content: '';
    position: absolute;
    top: 6px; left: 6px; right: 6px;
    height: 35%;
    border-radius: 24px 24px 50% 50% / 24px 24px 35% 35%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 4;
}

/* Stack: back card sits behind, sligthly smaller */
.pcr-card.is-back {
    transform: scale(0.93) translateY(12px);
    z-index: 1;
    box-shadow:
        0 0 0 4px var(--navy),
        0 8px 0 var(--navy),
        0 12px 22px rgba(29, 17, 69, 0.3);
    pointer-events: none;
    opacity: 0.92;
}
.pcr-card.is-top { z-index: 2; }

/* Mockup wrapper */
.pcr-mockup {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.pcr-card-img {
    display: block;
    max-width: 90%;
    max-height: 88%;
    object-fit: contain;
}
.pcr-card-overlay {
    position: absolute;
    inset: 0;
    margin: auto;
    max-width: 90%;
    max-height: 88%;
    object-fit: contain;
    mix-blend-mode: multiply;
}
.pcr-card-design {
    position: absolute;
    object-fit: contain;
    pointer-events: none;
}
.pcr-card.is-negative .pcr-card-design { filter: invert(1); }

/* Smooth zoom transitions */
.pcr-card-design,
.pcr-card-img,
.pcr-card-overlay {
    transition: opacity .35s ease,
                left   .42s cubic-bezier(.34,1.56,.64,1),
                top    .42s cubic-bezier(.34,1.56,.64,1),
                width  .42s cubic-bezier(.34,1.56,.64,1),
                height .42s cubic-bezier(.34,1.56,.64,1);
}
.pcr-card.is-zoomed { cursor: zoom-out; }
.pcr-card.is-zoomed .pcr-card-img,
.pcr-card.is-zoomed .pcr-card-overlay { opacity: 0.05; }
.pcr-card.is-zoomed .pcr-card-design {
    left:   3% !important;
    top:    3% !important;
    width: 94% !important;
    height: 94% !important;
}
.pcr-card.is-zoomed.is-negative .pcr-card-design { filter: none !important; }
/* Al hacer zoom, el meta inferior oscuro se desvanece para no
   interferir con el diseño ampliado. */
.pcr-card-meta { transition: opacity .25s ease; }
.pcr-card.is-zoomed .pcr-card-meta {
    opacity: 0;
    pointer-events: none;
}

/* =============== SWIPE LABELS — game pop stamps =============== */
.pcr-card-label {
    position: absolute;
    padding: 9px 18px 8px;
    font-family: var(--display);
    font-weight: 700;
    font-size: 20px;
    line-height: 1;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #FFFFFF;
    border-radius: 18px;
    box-shadow:
        0 5px 0 rgba(29, 17, 69, 0.22),
        0 8px 16px rgba(29, 17, 69, 0.35),
        0 1px 0 rgba(255, 255, 255, 0.45) inset;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease, transform .25s cubic-bezier(.34,1.56,.64,1);
    z-index: 5;
    text-shadow: 0 2px 4px rgba(29, 17, 69, .25);
}
.pcr-card-label[data-show] { opacity: 1; }
/* Posición OPUESTA a la dirección del swipe — así el dedo/cursor no
   tapa el label cuando arrastras la card hacia esa dirección.
   Verde para positivos (like / love), rojo para negativos. */
.pcr-card-label.like { background: var(--green);      left:  22px; top: 22px;    transform: rotate(-8deg) scale(1.05); }
.pcr-card-label.nope { background: var(--red);        right: 22px; top: 22px;    transform: rotate(8deg)  scale(1.05); }
.pcr-card-label.love { background: var(--green-deep); left: 50%;   bottom: 70px; transform: translateX(-50%) rotate(-3deg) scale(1.05); }
.pcr-card-label.hate { background: var(--red-deep);   left: 50%;   top: 28px;    transform: translateX(-50%) rotate(2deg)  scale(1.05); }

/* =============== META =============== */
.pcr-card-meta {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 12px;
    padding: 70px 20px 18px;
    color: #FFFFFF;
    font-family: var(--sans);
    font-weight: 900;
    font-size: 12px;
    letter-spacing: .02em;
    background: linear-gradient(transparent, rgba(29, 17, 69, .55) 60%, rgba(29, 17, 69, .75));
    pointer-events: none;
    z-index: 3;
}
.pcr-meta-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: 19px;
    line-height: 1.05;
    letter-spacing: -.005em;
    text-transform: none;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #FFFFFF;
    text-shadow: 0 3px 8px rgba(29, 17, 69, 0.55);
}
.pcr-card-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 5px 10px;
    font-family: var(--sans);
    font-weight: 900;
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.92);
    color: var(--navy);
    border-radius: 999px;
    box-shadow:
        0 2px 0 rgba(29, 42, 58, 0.18),
        0 5px 12px rgba(29, 42, 58, 0.22);
    flex-shrink: 0;
}
.pcr-card-tag::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--navy);
}
.pcr-card-meta.is-avatar-only {
    justify-content: flex-end;
    padding: 28px 22px 20px;
    background: linear-gradient(transparent 30%, rgba(29, 17, 69, .55));
}

/* Móvil: el meta tenía un padding-top enorme (70px) que producía
   un gradiente oscuro casi hasta la mitad de la card. Lo reducimos
   y ajustamos el degradado para que solo cubra el último cuarto. */
@media (max-width: 720px) {
    .pcr-card-meta {
        padding: 36px 14px 12px;
        gap: 8px;
        background: linear-gradient(transparent, rgba(29, 17, 69, .55) 70%, rgba(29, 17, 69, .72));
    }
    .pcr-card-meta.is-avatar-only {
        padding: 18px 14px 12px;
    }
    .pcr-meta-title {
        font-size: 16px;
    }
    /* Pastilla del color — mucho más pequeña en móvil. */
    .pcr-card-tag {
        padding: 3px 8px 3px 7px;
        font-size: 9px;
        letter-spacing: .1em;
        gap: 4px;
    }
    .pcr-card-tag::before {
        width: 4px;
        height: 4px;
    }
}

/* Avatar — soft glaze pebble */
.pcr-avatar {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow:
        0 0 0 3px #FFFFFF,
        0 6px 0 rgba(29, 17, 69, 0.22),
        0 10px 18px rgba(29, 17, 69, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-family: var(--display);
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
}
.pcr-avatar-initials {
    position: relative; z-index: 0;
    font-size: 16px;
    letter-spacing: 0;
    text-shadow: 0 2px 0 rgba(0, 0, 0, .35);
}
.pcr-avatar-img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* =============== EMPTY / LOADING =============== */
.pcr-empty, .pcr-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--navy-soft);
    text-align: center;
    padding: 24px;
    gap: 18px;
    pointer-events: none;
    font-family: var(--sans);
    font-weight: 900;
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.pcr-loading {
    color: var(--navy-mute);
}
.pcr-loading::before {
    content: "";
    display: block;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background:
        conic-gradient(from 0deg, var(--green) 0%, var(--green-deep) 25%, var(--red) 50%, var(--red-deep) 75%, var(--green) 100%);
    -webkit-mask: radial-gradient(circle, transparent 54%, #000 56%);
            mask: radial-gradient(circle, transparent 54%, #000 56%);
    filter: drop-shadow(0 4px 0 rgba(29, 42, 58, 0.10)) drop-shadow(0 8px 14px rgba(29, 42, 58, 0.18));
    animation: pcr-spin 1.4s linear infinite;
}
@keyframes pcr-spin { to { transform: rotate(360deg); } }
.pcr-empty {
    pointer-events: auto;
}
.pcr-empty p {
    font-family: var(--display);
    font-weight: 700;
    font-size: 30px;
    line-height: 1.05;
    text-transform: none;
    letter-spacing: -.01em;
    color: var(--navy);
    max-width: 14ch;
    margin: 0;
}

.pcr-card { z-index: 2; }

/* =============== COLORS — candy pill swatches =============== */
.pcr-colors {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    padding: 14px 22px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    z-index: 3;
    position: relative;
    animation: pcr-slide-up .55s cubic-bezier(.34,1.56,.64,1) backwards;
    animation-delay: .15s;
}
.pcr-colors:empty { display: none; }
.pcr-color-swatch {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 0;
    background-size: cover;
    background-position: center;
    background-color: #FFFFFF;
    cursor: pointer;
    padding: 0;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.85),
        0 3px 0 rgba(29, 17, 69, 0.20),
        0 6px 12px rgba(29, 17, 69, 0.30);
    transition: transform .2s cubic-bezier(.34,1.56,.64,1),
                box-shadow .2s ease;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}
.pcr-color-swatch::before {
    /* Glossy candy highlight */
    content: '';
    position: absolute;
    top: 3px; left: 5px; right: 5px;
    height: 30%;
    border-radius: 50% / 100% 100% 0 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0));
    pointer-events: none;
}
.pcr-color-swatch:hover {
    transform: translateY(-3px);
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.95),
        0 6px 0 rgba(29, 17, 69, 0.22),
        0 10px 16px rgba(29, 17, 69, 0.40);
}
.pcr-color-swatch:active {
    transform: translateY(0);
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.85),
        0 1px 0 rgba(29, 17, 69, 0.20),
        0 3px 6px rgba(29, 17, 69, 0.25);
}
.pcr-color-swatch.is-active {
    transform: translateY(-4px);
    box-shadow:
        0 0 0 2px var(--brand-accent),
        0 0 0 5px rgba(255, 255, 255, 0.95),
        0 7px 0 rgba(29, 42, 58, 0.18),
        0 12px 18px rgba(29, 42, 58, 0.35);
}

/* =============== ACTIONS — chunky 3D candy buttons =============== */
.pcr-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 16px 22px calc(22px + env(safe-area-inset-bottom, 0px));
    z-index: 3;
    position: relative;
    animation: pcr-slide-up .55s cubic-bezier(.34,1.56,.64,1) backwards;
    animation-delay: .25s;
}
.pcr-act {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 0;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-button);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: transform .18s cubic-bezier(.34,1.56,.64,1),
                box-shadow .18s ease,
                background .25s ease;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
}
.pcr-act > * { position: relative; z-index: 2; }
.pcr-act:hover {
    transform: translateY(-2px);
    box-shadow:
        0 7px 0 rgba(29, 17, 69, 0.30),
        0 12px 22px rgba(29, 17, 69, 0.40);
}
.pcr-act:active {
    transform: translateY(4px);
    box-shadow: var(--shadow-button-pressed);
}

/* Hierarchy */
.pcr-act--left,
.pcr-act--right { width: 76px; height: 76px; font-size: 32px; }
.pcr-act--down,
.pcr-act--up    { width: 54px; height: 54px; font-size: 22px; }

/* Botones blancos planos — el color emocional viene del emoji y de
   los swipe labels que aparecen al arrastrar. Hovers/active solo
   cambian elevación, no color. */
.pcr-act,
.pcr-act--left,
.pcr-act--right,
.pcr-act--up,
.pcr-act--down {
    background: #FFFFFF;
}

/* Emoji on top of the candy buttons feels more "stamped" */
.pcr-act { color: #FFFFFF; }

/* =============== DESKTOP =============== */
@media (min-width: 720px) {
    .pcr-stage   { max-width: 600px; margin-left: auto; margin-right: auto; width: 100%; }
    .pcr-actions,
    .pcr-colors  { max-width: 600px; margin-left: auto; margin-right: auto; }
}

/* =============== SECONDARY BUTTON (e.g., "Volver a empezar") =============== */
.pcr-btn-secondary {
    padding: 14px 26px;
    border-radius: 999px;
    border: 0;
    background: var(--navy);
    color: #FFFFFF;
    font-family: var(--display);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .02em;
    text-transform: none;
    cursor: pointer;
    box-shadow:
        0 5px 0 rgba(29, 42, 58, 0.20),
        0 10px 20px rgba(29, 42, 58, 0.30),
        0 1px 0 rgba(255, 255, 255, 0.5) inset;
    transition: transform .18s cubic-bezier(.34,1.56,.64,1),
                box-shadow .18s ease;
    position: relative;
    overflow: hidden;
}
.pcr-btn-secondary::before {
    content: '';
    position: absolute;
    top: 4px; left: 14px; right: 14px;
    height: 38%;
    border-radius: 50% / 100% 100% 0 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0));
    pointer-events: none;
}
.pcr-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 7px 0 rgba(29, 17, 69, 0.30),
        0 12px 24px rgba(29, 17, 69, 0.40),
        0 1px 0 rgba(255, 255, 255, 0.6) inset;
}
.pcr-btn-secondary:active {
    transform: translateY(4px);
    box-shadow:
        0 1px 0 rgba(29, 17, 69, 0.25),
        0 3px 8px rgba(29, 17, 69, 0.28);
}

/* =============== SHARE BUTTON + MODAL =============== */
.pcr-share-btn {
    position: absolute;
    top: 22px;
    right: 18px;
    z-index: 6;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 0;
    background: #FFFFFF;
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow:
        0 1px 2px rgba(20, 18, 30, 0.06),
        0 4px 12px rgba(20, 18, 30, 0.14),
        0 0 0 1px rgba(20, 18, 30, 0.04);
    transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s ease;
    -webkit-tap-highlight-color: transparent;
}
.pcr-share-btn:hover  {
    transform: translateY(-2px);
    box-shadow:
        0 1px 2px rgba(20, 18, 30, 0.08),
        0 8px 18px rgba(20, 18, 30, 0.20),
        0 0 0 1px rgba(20, 18, 30, 0.06);
}
.pcr-share-btn:active { transform: translateY(0) scale(0.96); }
@media (min-width: 720px) {
    .pcr-share-btn { top: 64px; right: 22px; width: 46px; height: 46px; }
}

.pcr-share-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 18, 30, 0.55);
    padding: 16px;
    animation: pcr-modal-fade .2s ease-out;
}
.pcr-share-modal[hidden] { display: none; }
@keyframes pcr-modal-fade { from { opacity: 0; } to { opacity: 1; } }

.pcr-share-card {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: #FFFFFF;
    border-radius: 22px;
    padding: 26px 24px 22px;
    box-shadow:
        0 24px 60px rgba(20, 18, 30, 0.30),
        0 0 0 1px rgba(20, 18, 30, 0.04);
    animation: pcr-modal-pop .25s cubic-bezier(.34,1.56,.64,1);
}
@keyframes pcr-modal-pop {
    from { opacity: 0; transform: translateY(12px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.pcr-share-close {
    position: absolute;
    top: 12px; right: 12px;
    width: 34px; height: 34px;
    border: 0;
    background: transparent;
    color: var(--navy-mute);
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
}
.pcr-share-close:hover { background: rgba(20, 18, 30, 0.06); color: var(--navy); }
.pcr-share-card-title {
    margin: 0 0 6px;
    font-family: var(--display);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -.01em;
    color: var(--navy);
}
.pcr-share-desc {
    margin: 0 0 18px;
    font-family: var(--sans);
    font-weight: 500;
    font-size: 13px;
    color: var(--navy-soft);
    line-height: 1.4;
}
.pcr-share-url-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.pcr-share-url {
    flex: 1;
    padding: 10px 12px;
    font-family: var(--mono, var(--sans));
    font-size: 12px;
    color: var(--navy-soft);
    background: #F4F7FA;
    border: 1px solid #E2EAF1;
    border-radius: 10px;
    outline: none;
    min-width: 0;
}
.pcr-share-copy {
    padding: 10px 16px;
    font-family: var(--sans);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: var(--navy);
    color: #FFFFFF;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s ease, transform .15s ease;
}
.pcr-share-copy:hover  { background: oklch(28% 0.04 270); transform: translateY(-1px); }
.pcr-share-copy:active { transform: translateY(0); }

.pcr-share-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.pcr-share-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 14px 6px;
    border: 1px solid #E2EAF1;
    border-radius: 14px;
    background: #FFFFFF;
    color: var(--navy);
    text-decoration: none;
    font-family: var(--sans);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: transform .15s, border-color .15s, background .15s;
    -webkit-tap-highlight-color: transparent;
}
.pcr-share-item:hover {
    transform: translateY(-2px);
    border-color: var(--brand-accent, #4A90B8);
    background: color-mix(in oklab, var(--brand-accent, #4A90B8) 8%, white);
}
.pcr-share-ico { font-size: 22px; line-height: 1; }

/* =============== KEYFRAMES =============== */
@keyframes pcr-pop-in {
    from { opacity: 0; transform: scale(0.5); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes pcr-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =============== WELCOME MODAL (primera visita por sesión) =============== */
.pcr-welcome {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(20, 18, 30, 0.6);
    padding: 0;
    animation: pcr-modal-fade .25s ease-out;
}
.pcr-welcome[hidden] { display: none; }
@media (min-width: 720px) {
    .pcr-welcome { align-items: center; padding: 24px; }
}
.pcr-welcome-card {
    width: 100%;
    max-width: 460px;
    background: #FFFFFF;
    color: var(--navy, #1D1145);
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -12px 48px rgba(20, 18, 30, .35);
    padding: 22px 22px 26px;
    font-family: var(--sans, system-ui);
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
    animation: pcr-slide-up .28s cubic-bezier(.16,.84,.44,1);
}
@media (min-width: 720px) {
    .pcr-welcome-card { border-radius: 22px; padding: 26px 28px 28px; }
}
.pcr-welcome-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 0;
    background: rgba(20, 18, 30, .06);
    color: var(--navy, #1D1145);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pcr-welcome-close:hover { background: rgba(20, 18, 30, .12); }
.pcr-welcome-title {
    font-family: var(--display, var(--sans, system-ui));
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.01em;
    margin: 0 36px 6px 0;
}
.pcr-welcome-sub {
    color: rgba(20, 18, 30, .65);
    font-size: 14px;
    margin: 0 0 16px;
    line-height: 1.45;
}
.pcr-welcome-list {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pcr-welcome-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(99, 102, 241, .06);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.35;
}
.pcr-welcome-list li strong {
    color: var(--navy, #1D1145);
    font-weight: 700;
}
.pcr-welcome-ico {
    font-size: 20px;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(20, 18, 30, .1);
}
.pcr-welcome-cta {
    width: 100%;
    border: 0;
    background: #6366F1;
    color: #FFFFFF;
    padding: 14px 18px;
    border-radius: 14px;
    font-family: var(--sans, system-ui);
    font-size: 15.5px;
    font-weight: 900;
    letter-spacing: .02em;
    cursor: pointer;
    box-shadow:
        0 2px 0 rgba(67, 56, 202, .55),
        0 10px 22px rgba(99, 102, 241, .55);
    transition: background .15s ease, transform .12s ease, box-shadow .12s ease;
}
.pcr-welcome-cta:hover {
    background: #4F46E5;
    transform: translateY(-1px);
    box-shadow: 0 3px 0 rgba(67, 56, 202, .6), 0 12px 26px rgba(99, 102, 241, .65);
}
.pcr-welcome-cta:active { transform: translateY(0); }
