.website-app-qr {
    position: fixed;
    inset: auto 20px calc(env(safe-area-inset-bottom, 0px) + var(--app-qr-offset)) auto;
    --app-qr-offset: 20px;
    z-index: 1030;
    width: 184px;
    padding: 5px;
    border: 1px solid #ffffff40;
    border-radius: 18px;
    background: linear-gradient(145deg, #702454, #321a38);
    box-shadow: 0 12px 32px #32192e55;
    animation: website-app-qr-enter .55s .2s cubic-bezier(.2, .75, .3, 1) both;
}

.website-app-qr summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 10px 8px 10px 10px;
    border-radius: 12px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.website-app-qr summary::-webkit-details-marker { display: none; }
.website-app-qr summary:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.website-app-qr-chevron {
    box-sizing: content-box;
    width: 7px;
    height: 7px;
    margin-right: 4px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}
.website-app-qr[open] .website-app-qr-chevron { transform: rotate(225deg); }
.website-app-qr-frame {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 7px;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
}
.website-app-qr img {
    display: block;
    width: min(100%, 144px);
    height: auto;
    margin: 0 auto;
}
.website-app-qr-scan {
    position: absolute;
    inset: 8px 8px auto;
    height: calc(100% - 18px);
    opacity: 0;
    pointer-events: none;
}
.website-app-qr-scan::before {
    content: '';
    display: block;
    height: 3px;
    border-radius: 3px;
    background: #c82b8a;
    box-shadow: 0 0 10px 2px #ef80c5;
}
.website-app-qr[open] .website-app-qr-scan {
    animation: website-app-qr-sweep 1.35s .55s ease-in-out 3;
}

@keyframes website-app-qr-enter {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes website-app-qr-sweep {
    0% { opacity: 0; transform: translateY(0); }
    12%, 80% { opacity: .85; }
    100% { opacity: 0; transform: translateY(100%); }
}

@media (max-width: 480px) {
    .website-app-qr { right: 14px; width: 158px; }
    .website-app-qr summary { font-size: 12px; }
    .website-app-qr img { width: min(100%, 120px); }
}

@media (prefers-reduced-motion: reduce) {
    .website-app-qr,
    .website-app-qr[open] .website-app-qr-scan { animation: none; }
}

body:has(#tour-chat) .website-app-qr { --app-qr-offset: 80px; }
body:has(.whatsapp-link, a.whatsapp) .website-app-qr { --app-qr-offset: 162px; }

@media (max-width: 480px) {
    body:has(#tour-chat) .website-app-qr { --app-qr-offset: 72px; }
}
