:root {
    --grad-1: #ff4dc6;
    /* pink */
    --grad-2: #ff8f6b;
    /* peach */
    --bg-1: #fff7fb;
    --ink: #111;
    --muted: #6b6b6b;
    --card: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, .15);
    --radius: 16px;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial;
    color: var(--ink);
    background: radial-gradient(120% 120% at 10% 0%, #ffe8f9 0%, #fff 45%, #fff7f0 100%);
    display: flex;
    justify-content: center;
    padding: 20px;
    min-height: 100svh;
    font-weight: 500;
}

.wrap {
    width: min(420px, 100%);
    margin-left: auto;
    margin-right: auto;
}

.card {
    background: var(--card);
    border-radius: 20px;
    padding: 22px 18px;
    box-shadow: var(--shadow);
}

.topcopy {
    text-align: center;
    margin-bottom: 14px;
    position: relative;
}

.topcopy .veil {
    position: absolute;
    inset: -6px -10px;
    border-radius: 12px;
    backdrop-filter: blur(6px);
    background: rgba(255, 255, 255, .4);
    z-index: 0;
}

.topcopy h1 {
    position: relative;
    z-index: 1;
    margin: 0;
    line-height: 1.1;
    font-weight: 900;
    font-size: clamp(26px, 8, 5vw, 42px);
    letter-spacing: .2px;
}

.topcopy em {
    font-style: normal;
    background: linear-gradient(139.44deg, #D9D9D9 0%, #7300E4 0.01%, #E300A4 34.23%, #FFB763 77.15%);
    ;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent
}

.topcopy p {
    position: relative;
    z-index: 1;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 15px
}

.topcopy p b {
    color: #000
}

.mirror {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: #ddd;
    aspect-ratio: 3/4;
    /* mobile first */
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}

.mirror img {
    position: absolute;
    inset: 0;
    width: 102%;
    height: 102%;
    object-fit: cover;
}

canvas#fog {
    position: absolute;
    inset: 0;
    touch-action: none;
    z-index: 1;
}

.label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #fff;
    border-radius: 20px;
    padding: 4px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
    z-index: 2;
}

.label .status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28c840;
}

.label .verified {
    color: #1d9bf0;
    font-size: 14px;
}

/* Progress bar */

.progress {
    margin: 14px 4px 2px;
    background: #eee;
    border-radius: 999px;
    height: 16px;
    position: relative;
    overflow: hidden;
}

.progress .fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    border-radius: 999px;
    transition: width .1s linear;
    background: linear-gradient(139.44deg, #D9D9D9 0%, #7300E4 0.01%, #E300A4 34.23%, #FFB763 77.15%);
    ;
}

.progress .knob {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

.progress .percent {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #222;
    mix-blend-mode: multiply
}

/* spark */

.progress .spark {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(.5px);
    background: radial-gradient(circle, #fff 0 30%, rgba(255, 255, 255, .6) 31% 60%, transparent 61%);
    animation: twinkle 1.2s infinite ease-in-out alternate;
}

@keyframes twinkle {
    from {
        transform: translate(-50%, -110%) scale(.8);
        opacity: .7
    }
    to {
        transform: translate(-50%, -130%) scale(1.2);
        opacity: 1
    }
}

/* Modal */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    display: flex;
    /* завжди у потоці */
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 9999;
    opacity: 0;
    /* сховано */
    visibility: hidden;
    pointer-events: none;
    transition: opacity .30s ease, visibility 0s linear .30s;
}

.modal-backdrop.show {
    opacity: 1;
    /* показ */
    visibility: visible;
    pointer-events: auto;
    transition: opacity .30s ease;
}

.modal {
    width: min(480px, 96vw);
    background: #fff;
    border-radius: 28px;
    padding: 34px 24px 38px;
    box-shadow: var(--shadow);
    transform: scale(.92);
    opacity: 0;
    transition: .28s ease;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
}

.modal .brand {
    font-weight: 800;
    letter-spacing: .2px;
    margin-bottom: 26px;
    color: #777;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.modal .brand img {
    width: 150px
}

.modal h2 {
    margin: 12px 0 10px;
    font-size: clamp(26px, 7vw, 36px);
    line-height: 1.2;
    font-weight: 900;
}

.modal h2 em {
    font-style: normal;
    background: linear-gradient(139.44deg, #D9D9D9 0%, #7300E4 0.01%, #E300A4 34.23%, #FFB763 77.15%);
    ;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent
}

.modal p span {
    background: linear-gradient(139.44deg, #D9D9D9 0%, #7300E4 0.01%, #E300A4 34.23%, #FFB763 77.15%);
    ;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent
}

.modal p {
    margin: 14px 0 26px;
    color: #444;
    font-size: 17px;
    line-height: 1.5;
}

.cta {
    display: block;
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 20px 24px;
    font-weight: 800;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    background: linear-gradient(139.44deg, #D9D9D9 0%, #7300E4 0.01%, #E300A4 34.23%, #FFB763 77.15%);
    ;
    box-shadow: 0 10px 22px rgba(255, 77, 198, .35);
    text-decoration: none;
}

.modal-backdrop.show {
    display: flex;
}

.modal-backdrop.show .modal {
    transform: scale(1);
    opacity: 1
}

/* Petals */

/* .petals{ pointer-events:none; position:absolute; inset:0; overflow:hidden; border-radius:inherit; z-index:0; }
  .petals span{ position:absolute; top:-10%; width:14px; height:10px; background: radial-gradient(65% 80% at 50% 50%, #ffc0d9 0%, #ff74a8 60%, #ff4dc6 100%);
    border-radius:60% 60% 60% 60% / 80% 80% 20% 20%; opacity:.85; filter:blur(.2px); animation: fall 4.5s linear infinite; }
  @keyframes fall{ 0%{ transform: translateY(-10%) rotate(0deg) } 100%{ transform: translateY(120vh) rotate(360deg) } } */

/* Petals — realistic fall */

.petals {
    pointer-events: none;
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    z-index: 0;
    --wind: 0px;
    animation: gust 6s ease-in-out infinite;
}

.petals span {
    position: absolute;
    top: -10%;
    left: var(--x, 50%);
    transform: translate3d(0, -10%, 0);
    animation: drop var(--dur, 4s) linear var(--delay, 0s) infinite;
    will-change: transform;
}

.petals span i {
    display: block;
    width: var(--w, 14px);
    height: var(--h, 10px);
    transform: translate3d(0, 0, 0);
    animation: sway var(--swayDur, 2.4s) ease-in-out var(--delay, 0s) infinite alternate;
    will-change: transform;
    filter: blur(var(--blur, .2px));
}

.petals span i b {
    display: block;
    width: 100%;
    height: 100%;
    background: radial-gradient(65% 80% at 50% 50%, #ffc0d9 0%, #ff74a8 60%, #ff4dc6 100%);
    border-radius: 60% 60% 60% 60% / 80% 80% 20% 20%;
    opacity: var(--op, .9);
    transform-origin: 60% 20%;
    transform: rotateZ(var(--rz, 0deg)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--scale, 1));
    animation: spin var(--spinDur, 2.2s) linear var(--delay, 0s) infinite, flip var(--flipDur, 3.4s) ease-in-out var(--delay, 0s) infinite alternate;
    will-change: transform, opacity;
}

@keyframes drop {
    0% {
        transform: translate3d(0, -10%, 0);
    }
    100% {
        transform: translate3d(0, calc(120vh), 0);
    }
}

@keyframes sway {
    from {
        transform: translate3d(calc(var(--wind) - var(--amp, 20px)), 0, 0);
    }
    to {
        transform: translate3d(calc(var(--wind) + var(--amp, 20px)), 0, 0);
    }
}

@keyframes gust {
    0% {
        --wind: -6px;
    }
    35% {
        --wind: 4px;
    }
    65% {
        --wind: -2px;
    }
    100% {
        --wind: 6px;
    }
}

@keyframes spin {
    to {
        transform: rotateZ(calc(var(--rz, 0deg) + 360deg)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--scale, 1));
    }
}

@keyframes flip {
    from {
        transform: rotateZ(var(--rz, 0deg)) rotateX(calc(var(--rx, 0deg) - 12deg)) rotateY(calc(var(--ry, 0deg) - 8deg)) scale(var(--scale, 1));
    }
    to {
        transform: rotateZ(var(--rz, 0deg)) rotateX(calc(var(--rx, 0deg) + 14deg)) rotateY(calc(var(--ry, 0deg) + 10deg)) scale(var(--scale, 1));
    }
}

@media (prefers-reduced-motion: reduce) {
    .petals,
    .petals span,
    .petals span i,
    .petals span i b {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
    }
}

.hint {
    position: absolute;
    inset: auto 0 14% 0;
    display: flex;
    justify-content: center;
    pointer-events: none;
    z-index: 3;
    opacity: .95;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .25));
    animation: hint-wiggle 1.6s ease-in-out infinite;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
}

.hint svg {
    width: 62px;
    height: auto;
}

@keyframes hint-wiggle {
    0% {
        transform: translateX(calc(-50% - 15px)) translateY(-50%);
    }
    50% {
        transform: translateX(calc(-50% + 15px)) translateY(-50%);
    }
    100% {
        transform: translateX(calc(-50% - 15px)) translateY(-50%);
    }
}

.hint.hide {
    animation-play-state: paused;
    opacity: 0;
    transform: scale(.92);
    transition: opacity .25s ease, transform .25s ease;
}

@media (prefers-reduced-motion: reduce) {
    .hint {
        animation: none;
    }
}

@media (min-width:600px) {
    body {
        padding: 32px
    }
}

@media (max-width: 767px) {
    body {
        padding: 0;
        display: flex;
        flex-direction: column;
    }
    .wrap {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
    }
    .card {
        flex-grow: 1;
        border-radius: 0;
    }
    .modal-backdrop {
        align-items: flex-end;
        padding: 0;
    }
    .modal {
        width: min(480px, 100vw);
        min-height: 70vh;
        display: flex;
        flex-direction: column;
        border-bottom-right-radius: 0;
        border-bottom-left-radius: 0;
        transform: translateY(100%);
        opacity: 1;
        transition: transform .35s cubic-bezier(.22, .61, .36, 1);
        will-change: transform;
    }
    .modal-backdrop.show .modal {
        transform: translateY(0);
    }
    #cta {
        margin-top: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .modal-backdrop,
    .modal {
        transition: none !important;
    }
}