/* QR layout only. Payment payloads, provider status and copy handlers stay intact. */
.modal-shell[data-modal="deposit-qr"] {
    align-items: center;
    padding-inline: 14px;
}

.modal-shell[data-modal="deposit-qr"] .modal-card--qr {
    width: min(100%, 420px);
    padding: 0 20px 20px;
    border-radius: 32px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.modal-shell[data-modal="deposit-qr"] .modal-close {
    --modal-close-size: 44px;
    --modal-close-inset: 5px;
    --modal-close-radius: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    padding: 0;
    background: #1b2421;
    touch-action: manipulation;
}

.modal-shell[data-modal="deposit-qr"] .modal-close svg { width: 20px; height: 20px; }

.modal-shell[data-modal="deposit-qr"] .home-qr-raffle-strip {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 56px;
    margin: 0 -20px 12px;
    padding: 3px 56px 3px 8px;
    overflow: hidden;
    border-bottom: 2px solid #c78a10;
    background:
        radial-gradient(ellipse at 18% 48%, #fff5b3 0, #fff5b300 46%),
        linear-gradient(115deg, #ffdf35, #ffea51 55%, #ffcd22);
    box-shadow: inset 0 1px 0 #fff8b0;
}

.modal-shell[data-modal="deposit-qr"] .home-qr-raffle-strip::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -50% auto -50% 0;
    width: 24%;
    background: linear-gradient(90deg, transparent, #ffffff8c, transparent);
    transform: translateX(-160%) skewX(-22deg);
    pointer-events: none;
}

.modal-shell[data-modal="deposit-qr"] .home-qr-raffle-prize {
    position: relative;
    min-width: 0;
    filter: drop-shadow(0 6px 5px #6042083d);
}

.modal-shell[data-modal="deposit-qr"] .home-qr-raffle-strip img {
    display: block;
    width: 68px;
    height: 46px;
    object-fit: contain;
    transform: rotate(-3deg);
}

.modal-shell[data-modal="deposit-qr"] .home-qr-raffle-sparkle {
    position: absolute;
    top: 1px;
    right: 2px;
    color: #fff;
    font: 16px/1 Arial, sans-serif;
    text-shadow: 0 1px 6px #bc7a23;
}

.modal-shell[data-modal="deposit-qr"] .home-qr-raffle-copy {
    display: block;
    min-width: 0;
}

.modal-shell[data-modal="deposit-qr"] .home-qr-raffle-strip p {
    min-width: 0;
    margin: 0;
    color: #19351d;
    font-size: clamp(12px, 3.8vw, 17px);
    line-height: 1.2;
    text-align: left;
    white-space: nowrap;
}

.modal-shell[data-modal="deposit-qr"] .home-qr-raffle-strip strong {
    display: inline;
    margin: 0;
    color: inherit;
    font-family: "Lilita One Local", Arial, sans-serif;
    font-size: 1.14em;
    font-weight: 400;
    letter-spacing: -.025em;
    text-shadow: 0 1px 0 #fff6b8, 0 2px 0 #bc8c2166;
    white-space: nowrap;
}

/* Brief, compositor-only motion. No timers or payment handlers are involved. */
.modal-shell[data-modal="deposit-qr"]:not([hidden]) .home-qr-raffle-strip::after {
    animation: qr-prize-sheen 3.6s ease-in-out .35s 2 both;
}

.modal-shell[data-modal="deposit-qr"]:not([hidden]) .home-qr-raffle-prize {
    animation: qr-prize-float 2.8s ease-in-out .1s 3;
}

.modal-shell[data-modal="deposit-qr"]:not([hidden]) .home-qr-raffle-sparkle {
    animation: qr-prize-sparkle 2.8s ease-in-out .1s 3;
}

@keyframes qr-prize-sheen {
    0%, 18% { transform: translateX(-160%) skewX(-22deg); opacity: 0; }
    24% { opacity: .8; }
    58%, 100% { transform: translateX(560%) skewX(-22deg); opacity: 0; }
}

@keyframes qr-prize-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-1px); }
}

@keyframes qr-prize-sparkle {
    0%, 100% { transform: scale(.8) rotate(-12deg); opacity: .55; }
    50% { transform: scale(1.12) rotate(12deg); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .modal-shell[data-modal="deposit-qr"]:not([hidden]) .home-qr-raffle-strip::after,
    .modal-shell[data-modal="deposit-qr"]:not([hidden]) .home-qr-raffle-prize,
    .modal-shell[data-modal="deposit-qr"]:not([hidden]) .home-qr-raffle-sparkle {
        animation: none;
    }
}

.modal-shell[data-modal="deposit-qr"] .modal-copy--compact {
    min-width: 0;
    padding: 0;
    margin: 0 0 16px;
    gap: 10px;
    text-align: center;
    justify-items: center;
}

.modal-shell[data-modal="deposit-qr"] .home-payment-status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 100%;
}

.modal-shell[data-modal="deposit-qr"] .home-payment-window {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 5px;
    min-height: 30px;
    padding: 5px 8px;
    border: 1px solid #d6c46d66;
    border-radius: 999px;
    background: #3a3219;
    color: #ffe46e;
    font: 800 13px/1.2 Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.modal-shell[data-modal="deposit-qr"] .home-payment-window[hidden] { display: none; }
.modal-shell[data-modal="deposit-qr"] .home-payment-window svg { width: 14px; height: 14px; }
.modal-shell[data-modal="deposit-qr"] .home-payment-window[data-state="elapsed"] { color: #d7dad7; background: #2b302b; border-color: #606860; }

.modal-shell[data-modal="deposit-qr"] .home-payment-state {
    min-height: 30px;
    max-width: 100%;
    margin: 0;
    padding: 6px 14px 8px;
    border: 1px solid rgba(255, 227, 108, 0.22);
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.16);
    font-size: 11px;
    line-height: 1.25;
    text-align: center;
}

.modal-shell[data-modal="deposit-qr"] .modal-copy--compact h3 {
    font-size: clamp(22px, 6.8vw, 28px);
    line-height: 1.12;
    white-space: normal;
    text-wrap: balance;
}

.modal-shell[data-modal="deposit-qr"] .modal-copy--compact p {
    max-width: 330px;
    font-size: 14px;
    line-height: 1.4;
    text-wrap: balance;
}

.modal-shell[data-modal="deposit-qr"] .home-qr-box {
    width: min(76%, 232px);
    max-width: 232px;
    aspect-ratio: 1;
    padding: 16px;
    margin: 0 auto 18px;
    border: 2px solid #667464;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 4px 0 #384335, 0 10px 20px rgba(0, 0, 0, 0.18);
}

.modal-shell[data-modal="deposit-qr"] .home-qr-mount {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 1;
}

.modal-shell[data-modal="deposit-qr"] .home-qr-box :is(canvas, img, table) {
    max-width: 100%;
    max-height: 100%;
    width: 100% !important;
    height: auto !important;
    object-fit: contain;
    image-rendering: pixelated;
}

.modal-shell[data-modal="deposit-qr"] .register-field--textarea {
    display: grid;
    gap: 7px;
    margin: 0;
}

.modal-shell[data-modal="deposit-qr"] .register-field--textarea span {
    margin: 0;
    font-size: 11px;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    opacity: 1;
}

.modal-shell[data-modal="deposit-qr"] #homePixCodeField {
    width: 100%;
    min-height: 48px;
    height: 48px;
    max-height: 48px;
    padding: 13px 14px;
    border: 1px solid #565b63;
    border-radius: 16px;
    background: #292c30;
    color: #f3f4f6;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    font-size: 13px;
    line-height: 20px;
    opacity: 1;
    resize: none;
    white-space: pre;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.modal-shell[data-modal="deposit-qr"] #homePixCodeField::-webkit-scrollbar { display: none; }

.modal-shell[data-modal="deposit-qr"] .modal-actions--qr { margin: 12px 0 0; }

.modal-shell[data-modal="deposit-qr"] #homeCopyPixButton {
    min-height: 54px;
    border: 0;
    border-radius: 18px;
    padding: 12px 14px 16px;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.03em;
    box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.2), 0 10px 20px rgba(0, 0, 0, 0.18);
    touch-action: manipulation;
}

.modal-shell[data-modal="deposit-qr"] :is(#homeCopyPixButton, #homePixCodeField, .modal-close):focus-visible {
    outline: 2px solid #9da6b1;
    outline-offset: 3px;
}

.modal-shell[data-modal="deposit-qr"] .home-payment-success { margin-bottom: 0; }
.modal-shell[data-modal="deposit-qr"] :is(.modal-copy--compact, .home-qr-box, .register-field--textarea, .modal-actions--qr)[hidden] { display: none; }

@media (max-width: 360px) {
    .modal-shell[data-modal="deposit-qr"] .modal-card--qr { padding-inline: 16px; }
    .modal-shell[data-modal="deposit-qr"] .home-qr-raffle-strip { margin-inline: -16px; grid-template-columns: 52px minmax(0, 1fr); gap: 6px; }
    .modal-shell[data-modal="deposit-qr"] .home-qr-raffle-strip img { width: 52px; }
    .modal-shell[data-modal="deposit-qr"] .home-payment-status-row { gap: 6px; }
    .modal-shell[data-modal="deposit-qr"] .home-payment-state { padding-inline: 8px; font-size: 9px; white-space: nowrap; }
    .modal-shell[data-modal="deposit-qr"] .home-payment-window { gap: 4px; padding-inline: 6px; font-size: 12px; }
    .modal-shell[data-modal="deposit-qr"] .modal-copy--compact p { font-size: 13px; }
    .modal-shell[data-modal="deposit-qr"] #homeCopyPixButton { font-size: 14px; }
}

@media (max-width: 300px) {
    .modal-shell[data-modal="deposit-qr"] .home-qr-raffle-strip { grid-template-columns: 42px minmax(0, 1fr); }
    .modal-shell[data-modal="deposit-qr"] .home-qr-raffle-strip img { width: 42px; }
}
