.aff-bubble-wrap { position: fixed; right: max(16px, env(safe-area-inset-right)); top: 50%; transform: translateY(-50%); z-index: 150; width: 80px; text-align: center; font-family: system-ui, sans-serif; animation: bubble-enter .22s ease both; }
.aff-bubble-wrap[hidden] { display: none; }
.aff-bubble { display: block; width: 80px; height: 80px; border-radius: 18px; outline-offset: 4px; transition: transform .18s ease; }
.aff-bubble:hover { transform: scale(1.06); }
.aff-bubble img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 10px #0005); }
.aff-bubble.is-bouncing img { animation: bubble-bounce 1.2s ease-in-out; }
.aff-bubble.is-wiggling img { animation: bubble-wiggle 1.2s ease-in-out; transform-origin: 50% 75%; }
.aff-close { position: absolute; left: -5px; top: -8px; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid #ffffff35; color: #fff; background: #19232eee; font: 18px/1 system-ui, sans-serif; cursor: pointer; }
.aff-close:hover { background: #354656; }
.aff-bubble-caption { display: block; margin-top: 3px; color: #c5d2da; background: #10171edb; border-radius: 5px; font-size: 9px; line-height: 17px; }
.aff-tooltip { position: absolute; right: calc(100% + 14px); top: 28px; padding: 9px 12px; border: 1px solid #40524a; border-radius: 9px; color: #d4f3e5; background: #15251ff5; font-size: 11px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .18s ease; }
.aff-bubble-wrap:hover .aff-tooltip, .aff-bubble-wrap:focus-within .aff-tooltip { opacity: 1; }
@keyframes bubble-enter { from { opacity: 0; } to { opacity: 1; } }
@keyframes bubble-bounce { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-10px) rotate(-4deg); } 45% { transform: translateY(0) rotate(3deg); } 65% { transform: translateY(-5px) rotate(-2deg); } 85% { transform: translateY(0) rotate(0); } }
@keyframes bubble-wiggle { 0%, 100% { transform: rotate(0); } 15%, 45% { transform: rotate(-9deg); } 30%, 60% { transform: rotate(9deg); } 75% { transform: rotate(-4deg); } 90% { transform: rotate(3deg); } }
@media (max-width: 640px) { .aff-bubble-wrap { right: max(12px, env(safe-area-inset-right)); width: 64px; } .aff-bubble { width: 64px; height: 64px; } .aff-tooltip { display: none; } }
@media (prefers-reduced-motion: reduce) { .aff-bubble-wrap, .aff-bubble img { animation: none !important; } .aff-bubble { transition: none; } }
