/* ============================================================
   Armá tu pedido: juego para armar el pedido pegando stickers
   en un póster. Se abre desde el navbar y desde el hero.
   ============================================================ */

/* Asterisco de marca (se pinta del color del texto) */
.pd-star {
    display: inline-block;
    background: currentColor;
    -webkit-mask: url('./img-title/10.png') center / contain no-repeat;
            mask: url('./img-title/10.png') center / contain no-repeat;
    animation: pdSpin 9s linear infinite;
}
.hero-pedido:hover .pd-star { animation-duration: 1.6s; }
@keyframes pdSpin { to { transform: rotate(360deg); } }

/* ---------- Botones del hero: dos renglones prolijos, nunca un botón suelto abajo ---------- */
.hero-cta.has-pedido {
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 1.1rem;
}
.hero-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.75rem;
    max-width: 100%;
}
.hero-row > * { flex: none; white-space: nowrap; }
.hero-row-links { gap: 1.4rem; }

.hero-cta .hero-pedido {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.95rem 1.45rem 0.95rem 1.1rem;
    border: 0;
    border-radius: 999px;
    background: rgb(var(--fg-rgb));
    color: rgb(var(--bg-rgb));
    font-family: var(--font-display, sans-serif);
    font-size: 0.76rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s;
}
.hero-cta .hero-pedido .pd-star { width: 18px; height: 18px; }
.hero-cta .hero-pedido:hover { transform: rotate(-2deg) scale(1.04); box-shadow: 0 0 0 4px rgba(var(--fg-rgb), 0.18); }
.hero-cta .hero-pedido:focus-visible { outline: 2px solid rgb(var(--fg-rgb)); outline-offset: 4px; }
.hero-cta .hero-main.is-alt {
    background: transparent;
    color: rgb(var(--fg-rgb));
    border: 1px solid rgba(var(--fg-rgb), 0.55);
}
.hero-cta .hero-main.is-alt:hover { border-color: rgb(var(--fg-rgb)); opacity: 1; }

/* ---------- Pantalla del juego ---------- */
html.pd-lock, html.pd-lock body { overflow: hidden; }

.pd {
    --lime: #c6ff3d;
    --purple: #a45bff;
    --paper: #ececec;
    --ink: #0b0b0b;
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    flex-direction: column;
    background: #000;
    color: #fff;
    font-family: var(--font-display, sans-serif);
    overscroll-behavior: contain;
}
.pd[hidden] { display: none; }
.pd::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(60% 50% at 78% 40%, rgba(164, 91, 255, 0.16), transparent 70%),
        radial-gradient(40% 40% at 70% 80%, rgba(198, 255, 61, 0.08), transparent 70%);
}

/* Arriba queda el navbar real de la home (ticker, asterisco y menú) con "Volver" */
html.pd-open #navbar { z-index: 450; }
html.pd-confirming #navbar { z-index: 100; }
.pd-top {
    position: relative;
    flex: none;
    height: var(--nav-h, 66px);
}
.pd-bar {
    position: absolute;
    left: 4%;
    bottom: -2px;
    height: 2px;
    width: calc(92% * var(--pd-p, 0));
    background: var(--lime);
    z-index: 3;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.pd-close {
    position: absolute;
    left: max(12px, 2.6%);
    top: 50%;
    z-index: 5;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.95rem 0.55rem 0.75rem;
    border: 1px solid rgba(var(--fg-rgb, 255, 255, 255), 0.45);
    border-radius: 999px;
    background: var(--nav-bg, #000);
    box-shadow: 22px 0 16px 6px var(--nav-bg, #000);
    color: var(--nav-fg, #fff);
    font-family: var(--font-display, sans-serif);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}
@media (hover: hover) {
    .pd-close:hover { background: var(--nav-fg, #fff); color: var(--nav-bg, #000); }
}
.pd-close:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.pd-close svg { width: 14px; height: 14px; }
.pd-count {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.pd-body {
    position: relative;
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    align-items: center;
    width: min(1240px, 100%);
    margin: 0 auto;
    padding: clamp(1rem, 3vh, 2.5rem) max(20px, 5vw);
}

/* Pregunta */
.pd-q {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 560px;
    min-height: 0;
}
.pd-kicker {
    margin: 0;
    font-size: 0.62rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}
.pd-title:focus, .pd-title:focus-visible { outline: none; }
.pd-title {
    margin: 0;
    font-family: var(--font-display, sans-serif);
    font-weight: normal;
    font-size: clamp(1.7rem, 3.6vw, 3.1rem);
    line-height: 0.98;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    text-wrap: balance;
}
.pd-hint {
    margin: 0;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}
.pd-opts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.6rem;
}
.pd-opt {
    --c: var(--lime);
    position: relative;
    min-height: 48px;
    padding: 0.85rem 1.15rem;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    font: inherit;
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s, color 0.2s, border-color 0.2s;
}
.pd-opt:nth-child(3n + 2) { --c: var(--purple); }
.pd-opt:nth-child(3n + 3) { --c: #fff; }
.pd-opt:hover { border-color: #fff; transform: translateY(-2px); }
.pd-opt:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.pd-opt[aria-pressed="true"] {
    background: var(--c);
    border-color: var(--c);
    color: #000;
    transform: rotate(-2.5deg);
}
.pd-opt:nth-child(even)[aria-pressed="true"] { transform: rotate(2deg); }

/* Formulario del último paso */
.pd-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.75rem;
    margin-top: 0.4rem;
}
.pd-field { display: grid; gap: 0.4rem; }
.pd-field.is-wide { grid-column: 1 / -1; }
.pd-field span {
    font-size: 0.58rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}
.pd-field input,
.pd-field textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-family: var(--font-display, sans-serif);
    font-size: 16px;
    letter-spacing: 0.02em;
    resize: none;
}
.pd-field input::placeholder,
.pd-field textarea::placeholder { color: rgba(255, 255, 255, 0.35); }
.pd-field input:focus,
.pd-field textarea:focus { outline: none; border-color: var(--lime); background: rgba(255, 255, 255, 0.08); }
.pd-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pd-captcha:empty { display: none; }

.pd-status {
    min-height: 1.2em;
    margin: 0;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    line-height: 1.5;
    color: #ff8a8a;
}

/* Botones de abajo */
.pd-nav {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.8rem;
}
.pd-back,
.pd-next {
    min-height: 48px;
    padding: 0.9rem 1.4rem;
    border-radius: 999px;
    font: inherit;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
}
.pd-back {
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: none;
    color: #fff;
}
.pd-back:hover { border-color: #fff; }
.pd-back[hidden] { display: none; }
.pd-next {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    border: 0;
    background: #fff;
    color: #000;
    transition: opacity 0.2s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pd-next svg { width: 15px; height: 15px; }
.pd-next:disabled { opacity: 0.3; cursor: not-allowed; }
.pd-next:not(:disabled):hover { transform: translateX(3px); }
.pd-next.is-send { background: var(--lime); }
.pd-next.is-ready { animation: pdNudge 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes pdNudge { 40% { transform: scale(1.08) rotate(-2deg); } }
.pd-back:focus-visible,
.pd-next:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.pd-mail {
    margin: 0;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
}
.pd-mail a { color: #fff; }

/* ---------- La tarjeta del pedido ---------- */
.pd-stage {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 0;
    height: 100%;
    perspective: 1400px;
}
.pd-tilt {
    display: grid;
    place-items: center;
    width: 100%;
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.pd-poster {
    /* Ticket horizontal (2:1). Papel, ventana, tinta y cintas cambian según el estilo */
    --p-bg: #ecebe6;
    --p-ink: #0b0b0b;
    --w-bg: #8f4bff;
    --w-ink: #0b0b0b;
    --t1: var(--lime);  --k1: #0b0b0b;
    --t2: #fff;         --k2: #0b0b0b;
    --t3: #ffd23d;      --k3: #0b0b0b;
    --perf: 80%;
    position: relative;
    container-type: inline-size;
    grid-area: 1 / 1;
    width: min(100%, 760px, calc((100dvh - var(--nav-h, 66px) - 4rem) * 2));
    aspect-ratio: 2 / 1;
    border-radius: 2.2% / 4.4%;
    background-color: var(--p-bg);
    background-image:
        linear-gradient(105deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.24) 38%, rgba(255, 255, 255, 0) 46%),
        linear-gradient(170deg, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.06));
    color: var(--p-ink);
    overflow: hidden;
    rotate: -1.2deg;
    isolation: isolate;
    /* muescas arriba y abajo de la línea de corte y borde derecho dentado */
    -webkit-mask:
        radial-gradient(ellipse 2.2% 4.4% at var(--perf) 0%, transparent 96%, #000 100%),
        radial-gradient(ellipse 2.2% 4.4% at var(--perf) 100%, transparent 96%, #000 100%),
        radial-gradient(ellipse 1.1% 22% at 100% 50%, transparent 96%, #000 100%) 0 0 / 100% 8.333% repeat-y;
    -webkit-mask-composite: source-in, source-in;
            mask:
        radial-gradient(ellipse 2.2% 4.4% at var(--perf) 0%, transparent 96%, #000 100%),
        radial-gradient(ellipse 2.2% 4.4% at var(--perf) 100%, transparent 96%, #000 100%),
        radial-gradient(ellipse 1.1% 22% at 100% 50%, transparent 96%, #000 100%) 0 0 / 100% 8.333% repeat-y;
            mask-composite: intersect;
    transition: background-color 0.5s, color 0.5s;
}
/* Sombra en una capa aparte, quieta, para que no titile al animar */
.pd-shadow {
    grid-area: 1 / 1;
    width: min(100%, 760px, calc((100dvh - var(--nav-h, 66px) - 4rem) * 2));
    aspect-ratio: 2 / 1;
    border-radius: 3%;
    background: #000;
    opacity: 0.6;
    filter: blur(26px);
    transform: translate(8px, 20px) rotate(-1.2deg) scale(0.96);
    pointer-events: none;
}
.pd-glare {
    position: absolute;
    inset: 0;
    z-index: 6;
    pointer-events: none;
    background: radial-gradient(circle at var(--gx, 30%) var(--gy, 20%), rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 45%);
    mix-blend-mode: soft-light;
    opacity: 0;
    transition: opacity 0.4s;
}
.pd-poster.is-lit .pd-glare { opacity: 1; }

.pd-poster[data-theme="minimal"]   { --p-bg: #f4f4f2; --w-bg: #dcdcd8; --t1: #fff; --t3: #f0f0ee; --t2: #0b0b0b; --k2: #fff; }
.pd-poster[data-theme="colorido"]  { --p-bg: #2f62ff; --p-ink: #fff; --w-bg: #ecebe6; --t1: #ff6a3d; --t2: var(--lime); --t3: #ff3d8b; }
.pd-poster[data-theme="atrevido"]  { --p-bg: #0b0b0b; --p-ink: #fff; --w-bg: var(--lime); --t1: #0b0b0b; --k1: #fff; --t2: #fff; --t3: #ff3d6e; }
.pd-poster[data-theme="elegante"]  { --p-bg: #e6e5e1; --w-bg: #0b0b0b; --w-ink: #fff; --t1: #fff; --t2: #cfcfcb; --t3: #8d8d88; }
.pd-poster[data-theme="divertido"] { --p-bg: #8f4bff; --p-ink: #fff; --w-bg: var(--lime); --t1: #fff; --t2: #ffd23d; --t3: #ff6a3d; }
.pd-poster[data-theme="sorpresa"]  { --p-bg: #2f62ff; --p-ink: #fff; --w-bg: #ecebe6; --t1: var(--lime); --t2: #ffd23d; --t3: #fff; }

/* Logo de marca (imagen real, se pinta del color que toque) */
.pd-win-logo,
.pd-stub-logo {
    display: block;
    aspect-ratio: 900 / 228;
    background: currentColor;
    -webkit-mask: url('./brand/fck-logo.png') center / contain no-repeat;
            mask: url('./brand/fck-logo.png') center / contain no-repeat;
}

/* Ventana (la "foto" del ticket), a la izquierda */
.pd-win {
    position: absolute;
    left: 2.6cqw;
    top: 2.6cqw;
    width: 45cqw;
    height: 44.8cqw;
    border-radius: 2cqw;
    background-color: var(--w-bg);
    background-image:
        radial-gradient(120% 90% at 20% 0%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 55%),
        linear-gradient(200deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.12));
    overflow: hidden;
    transition: background-color 0.5s;
}
.pd-win-logo {
    position: absolute;
    left: 3.2cqw;
    top: 3.2cqw;
    z-index: 3;
    width: 15cqw;
    color: var(--w-ink);
    rotate: -4deg;
    transition: color 0.5s;
}
.pd-hole {
    position: absolute;
    z-index: 4;
    width: 1.8cqw;
    height: 1.8cqw;
    border-radius: 50%;
    background: var(--p-bg);
    box-shadow: inset 0 0.2cqw 0.4cqw rgba(0, 0, 0, 0.25);
}
.pd-hole.is-a { left: 43.6cqw; top: 5cqw; }
.pd-empty {
    position: absolute;
    left: 14%;
    right: 14%;
    top: 40%;
    padding: 3cqw 2cqw;
    border: 0.3cqw dashed var(--w-ink);
    border-radius: 2cqw;
    color: var(--w-ink);
    font-size: 1.6cqw;
    letter-spacing: 0.12em;
    line-height: 1.5;
    text-align: center;
    text-transform: uppercase;
    opacity: 0.45;
    transition: opacity 0.3s;
}
.pd-poster.has-items .pd-empty { opacity: 0; }

/* Columna del medio: fecha, objetivos y datos */
.pd-date {
    position: absolute;
    left: 51cqw;
    width: 27.5cqw;
    top: 4.2cqw;
    display: flex;
    align-items: center;
    gap: 1.4cqw;
    font-family: var(--font-display, sans-serif);
    font-size: 1.9cqw;
}
.pd-date b { font-weight: inherit; }
.pd-date i { flex: 1; height: 0.2cqw; background: currentColor; opacity: 0.85; }
.pd-date small { position: absolute; right: 0; top: 2.6cqw; font-size: 1cqw; letter-spacing: 0.1em; opacity: 0.7; }

/* Objetivos: uno por renglón, se achica solo hasta entrar */
.pd-head {
    position: absolute;
    left: 51cqw;
    width: 27.5cqw;
    top: 9.5cqw;
    height: 27cqw;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.32em;
    overflow: hidden;
    font-family: var(--font-display, sans-serif);
    font-size: var(--hs, 4cqw);
    line-height: 1;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    overflow-wrap: normal;
    word-break: keep-all;
}
.pd-g { position: relative; display: block; padding-left: 0.95em; }
.pd-head > .pd-g:first-child { margin-top: auto; }
.pd-head > .pd-g:last-child { margin-bottom: auto; }
.pd-g::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.08em;
    width: 0.62em;
    height: 0.62em;
    background: currentColor;
    -webkit-mask: url('./img-title/10.png') center / contain no-repeat;
            mask: url('./img-title/10.png') center / contain no-repeat;
}
.pd-g.is-empty { padding-left: 0; }
.pd-g.is-empty::before { display: none; }
.pd-sub {
    position: absolute;
    left: 51cqw;
    width: 27.5cqw;
    top: 38.5cqw;
    margin: 0;
    font-family: var(--font-display, sans-serif);
    font-size: 1.3cqw;
    line-height: 1.6;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
}
.pd-sub span { display: inline-block; }

/* Talón a la derecha, separado por la línea de corte */
.pd-stub {
    position: absolute;
    left: 82cqw;
    right: 3.2cqw;
    top: 3.4cqw;
    bottom: 3.4cqw;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.2cqw;
    min-width: 0;
}
.pd-stub::before {
    content: '';
    position: absolute;
    left: -2cqw;
    top: 1cqw;
    bottom: 1cqw;
    border-left: 0.25cqw dashed currentColor;
}
.pd-stub-l { display: grid; gap: 0.9cqw; align-content: start; min-width: 0; }
.pd-stub-logo { width: 11cqw; }
.pd-stub-k {
    display: flex;
    align-items: center;
    gap: 0.7cqw;
    font-family: var(--font-display, sans-serif);
    font-size: 1.25cqw;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.pd-stub-k::before { content: ''; width: 1cqw; height: 1cqw; border-radius: 50%; background: currentColor; }
.pd-stub-t { font-size: 1.05cqw; line-height: 1.4; letter-spacing: 0.03em; opacity: 0.75; }
.pd-code { display: grid; justify-items: stretch; gap: 0.6cqw; min-width: 0; }
.pd-code svg { width: 100%; height: 7cqw; fill: currentColor; }
.pd-code span { font-family: var(--font-display, sans-serif); font-size: 1.15cqw; letter-spacing: 0.08em; white-space: nowrap; }
.pd-code.has-qr { justify-items: start; }
.pd-code.has-qr svg { width: 12cqw; height: 12cqw; border-radius: 0.8cqw; }

/* Cintas (servicios y objetivos): papel con grano fino, brillo suave y
   puntas rasgadas dibujadas con máscara (bordes nítidos, sin serrucho). */
.pd-tape {
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
    --tear-l: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 100' preserveAspectRatio='none'%3E%3Cpath d='M10 0H3.2L4.6 7 1.8 13 3.9 21 .8 28 3.1 36 1.2 44 4 51 .9 59 3.3 66 1 74 3.8 81 1.6 89 3.4 95 2.4 100H10Z'/%3E%3C/svg%3E");
    --tear-r: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0H6.6L5.2 6 8.4 14 6.1 21 9.2 29 6.8 37 8.9 45 6 52 9.1 60 6.7 67 9 75 6.3 82 8.6 90 6.9 96 7.6 100H0Z'/%3E%3C/svg%3E");
    position: absolute;
    left: var(--x);
    top: var(--y);
    max-width: 88%;
    padding: 0.2em 0.62em 0.14em;
    background-color: var(--tc);
    background-image:
        var(--grain),
        linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 38%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.07)),
        linear-gradient(96deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 18%, rgba(0, 0, 0, 0.035) 42%, rgba(255, 255, 255, 0.1) 58%, rgba(0, 0, 0, 0.03) 82%, rgba(255, 255, 255, 0.08) 100%);
    background-size: 160px 160px, 100% 100%, 100% 100%;
    background-blend-mode: soft-light, normal, normal;
    color: var(--tk);
    font-family: var(--font-display, sans-serif);
    font-size: var(--fs);
    line-height: 1;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    white-space: nowrap;
    -webkit-font-smoothing: antialiased;
    transform: rotate(var(--r));
    -webkit-mask:
        var(--tear-l) left / 0.36em 100% no-repeat,
        linear-gradient(#000, #000) center / calc(100% - 0.7em) 100% no-repeat,
        var(--tear-r) right / 0.36em 100% no-repeat;
            mask:
        var(--tear-l) left / 0.36em 100% no-repeat,
        linear-gradient(#000, #000) center / calc(100% - 0.7em) 100% no-repeat,
        var(--tear-r) right / 0.36em 100% no-repeat;
    transition: left 0.45s cubic-bezier(0.16, 1, 0.3, 1), top 0.45s cubic-bezier(0.16, 1, 0.3, 1), font-size 0.45s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s, color 0.4s;
}
.pd-tape::after {
    /* sombra apoyada en el póster, por fuera de la máscara no se ve: va como sombra interna suave */
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 -0.08em 0.12em rgba(0, 0, 0, 0.12), inset 0 0.05em 0.06em rgba(255, 255, 255, 0.35);
}
.pd-tape.c1 { --tc: var(--t1); --tk: var(--k1); }
.pd-tape.c2 { --tc: var(--t2); --tk: var(--k2); }
.pd-tape.c3 { --tc: var(--t3); --tk: var(--k3); }
.pd-tape.is-goal { letter-spacing: 0.03em; }

/* Objetivos: stickers con forma e ícono */
.pd-goal {
    position: absolute;
    left: var(--x);
    top: var(--y);
    z-index: 2;
    width: var(--gs);
    height: var(--gs);
    display: grid;
    place-items: center;
    transform: rotate(var(--r));
    filter: drop-shadow(0 0.8cqw 1cqw rgba(0, 0, 0, 0.22));
    transition: left 0.5s cubic-bezier(0.16, 1, 0.3, 1), top 0.5s cubic-bezier(0.16, 1, 0.3, 1), width 0.5s, height 0.5s;
}
.pd-goal-in {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8cqw;
    width: calc(var(--gs) * 0.86);
    height: calc(var(--gs) * 0.86);
    padding: 0;
    background-color: var(--gc);
    background-image: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 55%);
    color: var(--gk);
    text-align: center;
    -webkit-font-smoothing: antialiased;
}
.pd-goal-in svg {
    flex: none;
    width: 46%;
    height: auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.pd-goal-in span { display: none; }
.pd-goal-in span.is-shown {
    display: block;
    width: 86%;
    font-size: calc(var(--gs) * 0.088);
    line-height: 1.02;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    text-wrap: balance;
    overflow-wrap: normal;
    word-break: keep-all;
}
.pd-goal.is-circle .pd-goal-in { border-radius: 50%; box-shadow: inset 0 0 0 0.5cqw rgba(255, 255, 255, 0.5); }
.pd-goal.is-squircle .pd-goal-in { border-radius: 26%; }
.pd-goal.is-burst .pd-goal-in {
    width: calc(var(--gs) * 0.98);
    height: calc(var(--gs) * 0.98);
    clip-path: polygon(50% 0%, 59% 13%, 75% 7%, 76% 23%, 93% 25%, 86% 40%, 100% 50%, 86% 60%, 93% 75%, 76% 77%, 75% 93%, 59% 87%, 50% 100%, 41% 87%, 25% 93%, 24% 77%, 7% 75%, 14% 60%, 0% 50%, 14% 40%, 7% 25%, 24% 23%, 25% 7%, 41% 13%);
}
.pd-goal.is-burst .pd-goal-in span { width: 68%; font-size: calc(var(--gs) * 0.08); }
.pd-goal.c1 { --gc: var(--t1); --gk: var(--k1); }
.pd-goal.c2 { --gc: var(--t2); --gk: var(--k2); }
.pd-goal.c3 { --gc: var(--t3); --gk: var(--k3); }

/* Sello de enviado */
.pd-stamp {
    position: absolute;
    left: 65%;
    top: 50%;
    z-index: 3;
    padding: 1.4cqw 3cqw;
    border: 0.7cqw solid #e0244d;
    border-radius: 1.8cqw;
    color: #e0244d;
    font-family: var(--font-title, sans-serif);
    font-size: 5.4cqw;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.04);
    transform: translate(-50%, -50%) rotate(-12deg);
    mix-blend-mode: multiply;
}
.pd-poster[data-theme="atrevido"] .pd-stamp,
.pd-poster[data-theme="divertido"] .pd-stamp { mix-blend-mode: normal; color: #fff; border-color: #fff; }

/* ---------- Aviso al salir sin mandar ---------- */
.pd-confirm {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.62);
    -webkit-backdrop-filter: blur(6px);
            backdrop-filter: blur(6px);
}
.pd-confirm[hidden] { display: none; }
.pd-confirm-box {
    width: min(420px, 100%);
    padding: 1.6rem 1.5rem 1.4rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;
    background: #111;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    text-align: left;
}
.pd-confirm-t {
    margin: 0 0 0.6rem;
    font-size: clamp(1.05rem, 3.6vw, 1.3rem);
    line-height: 1.15;
    text-transform: uppercase;
}
.pd-confirm-p {
    margin: 0 0 1.3rem;
    font-size: 0.72rem;
    line-height: 1.6;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
}
.pd-confirm-a { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.pd-confirm-a .pd-next { flex: 1 1 auto; justify-content: center; }
.pd-confirm-a .pd-back { flex: 1 1 auto; }

/* ---------- Final ---------- */
.pd-done .pd-title { color: var(--lime); font-family: var(--font-body, sans-serif); line-height: 1.6; }
.pd-view .pd-title { color: var(--lime); }
.pd-done-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 0.6rem; }
.pd-done-actions .pd-next:disabled { opacity: 0.6; }

/* ---------- Celular ---------- */
@media (max-width: 860px) {
    .pd-body {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        align-items: start;
        gap: 1rem;
        padding-top: 0.9rem;
        padding-bottom: 0;
    }
    .pd-stage { order: -1; height: auto; }
    .pd-poster, .pd-shadow { width: min(100%, 560px, calc(36dvh * 2)); }
    .pd-q {
        max-width: none;
        height: 100%;
        overflow-y: auto;
        padding-bottom: 1rem;
        gap: 0.75rem;
        scrollbar-width: none;
    }
    .pd-q::-webkit-scrollbar { display: none; }
    .pd-title { font-size: clamp(1.4rem, 6.6vw, 2rem); }
    .pd-opts { gap: 0.5rem; margin-top: 0.2rem; }
    .pd-opt { padding: 0.75rem 0.95rem; font-size: 0.66rem; min-height: 44px; }
    .pd-nav {
        position: sticky;
        bottom: 0;
        margin-top: 0.4rem;
        padding: 0.8rem 0 calc(0.6rem + env(safe-area-inset-bottom));
        background: linear-gradient(transparent, #000 30%);
    }
    .pd-next { flex: 1; justify-content: center; }
}
@media (max-width: 560px) {
    .pd-close span { display: none; }
    .pd-close { padding: 0.6rem; box-shadow: 14px 0 12px 4px var(--nav-bg, #000); }
    .pd-form { grid-template-columns: minmax(0, 1fr); }
}
@media (max-height: 640px) and (max-width: 860px) {
    .pd-poster, .pd-shadow { width: min(100%, calc(32dvh * 2)); }
}

@media (prefers-reduced-motion: reduce) {
    .pd-star { animation: none; }
    .pd-next.is-ready { animation: none; }
    .pd-tilt { transition: none; }
    .pd-tape { transition: none; }
}

/* Celular acostado: ticket al costado, pregunta al lado */
@media (max-width: 960px) and (orientation: landscape) and (max-height: 540px) {
    .pd-body {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: minmax(0, 1fr);
        align-items: center;
        padding-top: 0.6rem;
    }
    .pd-stage { order: 0; height: 100%; }
    .pd-poster, .pd-shadow { width: min(56vw, calc((100dvh - var(--nav-h, 66px) - 1.5rem) * 2)); }
}

/* Tablet parada: todo centrado en la pantalla */
@media (max-width: 860px) and (min-height: 900px) and (orientation: portrait) {
    .pd-body { grid-template-rows: auto auto; align-content: center; gap: 2rem; }
    .pd-q { height: auto; max-width: 560px; justify-self: center; width: 100%; }
}

/* Botones del hero en celulares (va al final para ganarle a los estilos base) */
@media (max-width: 460px) {
    .hero-cta .hero-pedido { padding: 0.85rem 1.05rem 0.85rem 0.85rem; font-size: 0.66rem; gap: 0.5rem; }
    .hero-cta .hero-pedido .pd-star { width: 15px; height: 15px; }
    .hero-cta.has-pedido .hero-main { padding: 0.85rem 1.05rem; font-size: 0.66rem; }
    .hero-row-links { gap: 1rem; }
    .hero-cta.has-pedido .hero-link { font-size: 0.56rem; letter-spacing: 0.09em; }
}
@media (max-width: 350px) {
    .hero-cta .hero-pedido, .hero-cta.has-pedido .hero-main { font-size: 0.56rem; padding: 0.8rem 0.75rem; letter-spacing: 0.08em; }
    .hero-row { gap: 0.5rem; }
    .hero-cta.has-pedido .hero-link { font-size: 0.5rem; letter-spacing: 0.06em; }
}
