.bonus-sticky {
  --bonus-accent: #d2f5a4;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  position: fixed;
  z-index: 9990;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(16px + env(safe-area-inset-bottom));
  width: min(580px, calc(100% - 32px));
  padding: 0;
  box-sizing: border-box;
  color: #fff;
  background: #203c2c;
  border-radius: 16px;
  box-shadow: 0 12px 36px rgb(13 36 22 / 24%);
  font-family: inherit;
  opacity: 0;
  transform: translateY(calc(100% + 40px));
  visibility: hidden;
  pointer-events: none;
  transition: transform 250ms var(--ease-out), opacity 250ms var(--ease-out), visibility 250ms;
}
.bonus-sticky *, .bonus-sticky *::before, .bonus-sticky *::after { box-sizing: border-box; }
.bonus-sticky__link:hover { color: #fff; }
.bonus-sticky[data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}
.bonus-sticky__link {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 22px 48px 22px 20px;
  color: inherit;
  text-decoration: none;
  border-radius: inherit;
  -webkit-tap-highlight-color: rgb(255 255 255 / 12%);
}
.bonus-sticky__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 66px;
  background: #101513;
  border-radius: 10px;
  overflow: hidden;
}
.bonus-sticky__logo img { width: 100%; height: 100%; object-fit: contain; }
.bonus-sticky__copy { min-width: 0; }
.bonus-sticky__title { display: block; font-size: 14px; font-weight: 500; line-height: 1.4; color: #e2eee5; }
.bonus-sticky__brand { display: block; margin-top: 3px; font-size: 14px; font-weight: 600; line-height: 1.35; }
.bonus-sticky__bonus { display: block; margin-top: 5px; font-size: 20px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.bonus-sticky__cta {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 56px;
  min-width: 128px;
  padding: 14px 22px;
  border-radius: 8px;
  background: var(--bonus-accent);
  color: #193321;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 160ms var(--ease-out);
}
.bonus-sticky__cta::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 2px solid var(--bonus-accent);
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
}
.bonus-sticky[data-visible="true"] .bonus-sticky__cta::after {
  animation: bonus-sticky-pulse 1800ms ease 500ms 2;
}
@keyframes bonus-sticky-pulse {
  0% { opacity: 0; transform: scale(.98); }
  35% { opacity: .6; }
  100% { opacity: 0; transform: scale(1.08); }
}
.bonus-sticky__close {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
}
.bonus-sticky__close svg { width: 20px; height: 20px; }
.bonus-sticky__link:focus-visible, .bonus-sticky__close:focus-visible { outline: 3px solid var(--bonus-accent); outline-offset: 3px; }
.bonus-sticky__link:active .bonus-sticky__cta { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .bonus-sticky__link:hover .bonus-sticky__cta { transform: translateY(-2px); }
  .bonus-sticky__close:hover { background: rgb(255 255 255 / 12%); }
}
@media (max-width: 600px) {
  .bonus-sticky { right: max(12px, env(safe-area-inset-right)); bottom: calc(12px + env(safe-area-inset-bottom)); width: calc(100% - 24px); }
  .bonus-sticky__link { grid-template-columns: 72px minmax(0, 1fr); gap: 10px 14px; padding: 16px 44px 16px 16px; }
  .bonus-sticky__logo { width: 72px; height: 60px; }
  .bonus-sticky__title { font-size: 12px; }
  .bonus-sticky__brand { font-size: 12px; }
  .bonus-sticky__bonus { font-size: 18px; }
  .bonus-sticky__cta { grid-column: 1 / -1; min-height: 54px; }
}
@media (prefers-reduced-motion: reduce) {
  .bonus-sticky, .bonus-sticky[data-visible="true"] { transform: none; transition: opacity 150ms ease, visibility 150ms; }
  .bonus-sticky .bonus-sticky__cta { transition: none; transform: none; }
  .bonus-sticky[data-visible="true"] .bonus-sticky__cta::after { animation: none; }
}

.bonus-sticky__back { display: block; width: calc(100% - 32px); margin: -6px 16px 12px; padding: 6px; border: 0; background: transparent; color: #e2eee5; font: inherit; font-size: 12px; line-height: 1.4; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 32px; }
.bonus-sticky__back:focus-visible { outline: 2px solid var(--bonus-accent); outline-offset: 0; }
@media (max-width:600px) { .bonus-sticky__back { min-height: 44px; margin-bottom: 4px; } }

.bonus-sticky[data-tone="followup"] { --bonus-accent: #ffe0a1; background: #24345a; }
.bonus-sticky[data-tone="followup"] .bonus-sticky__cta { color: #382800; }
.bonus-sticky[data-tone="followup"] .bonus-sticky__title,
.bonus-sticky[data-tone="followup"] .bonus-sticky__back { color: #e6ebff; }

.bonus-sticky[data-visible="true"] .bonus-sticky__logo {
  animation: bonus-sticky-logo 1600ms var(--ease-out) 350ms 2;
}
@keyframes bonus-sticky-logo {
  0%, 100% { transform: translateY(0) rotate(0); }
  25% { transform: translateY(-3px) rotate(-3deg); }
  60% { transform: translateY(0) rotate(3deg); }
  80% { transform: translateY(-1px) rotate(-1deg); }
}
@media (prefers-reduced-motion: reduce) {
  .bonus-sticky[data-visible="true"] .bonus-sticky__logo { animation: none; }
}

/* Compact mobile offer. The CTA remains a native link; the back button is separate. */
@media (max-width: 600px) {
  .bonus-sticky {
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-width: calc(100vw - 24px);
    border-radius: 14px;
  }
  .bonus-sticky__link {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 10px 12px;
    padding: 12px;
  }
  .bonus-sticky__logo { width: 56px; height: 56px; border-radius: 8px; }
  .bonus-sticky__copy { padding-right: 36px; }
  .bonus-sticky__title { display: none; }
  .bonus-sticky__brand { margin-top: 0; font-size: 13px; line-height: 1.35; }
  .bonus-sticky__bonus { margin-top: 4px; font-size: 18px; line-height: 1.2; }
  .bonus-sticky__cta { min-height: 50px; min-width: 0; margin-right: 96px; padding: 12px; font-size: 16px; }
  .bonus-sticky__back {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 88px;
    min-height: 50px;
    margin: 0;
    padding: 8px 4px;
    font-size: 12px;
    line-height: 1.3;
  }
  .bonus-sticky__close { top: 2px; right: 2px; width: 44px; height: 44px; }
}
.bonus-sticky__link, .bonus-sticky__back { touch-action: manipulation; }
.bonus-sticky__cta, .bonus-sticky__close, .bonus-sticky__back { -webkit-user-select: none; user-select: none; }
