[data-seo-referral-promo] {
  --seo-referral-size: min(480px, calc(100vw - 32px), calc(100vh - 88px));
  --seo-referral-size: min(480px, calc(100vw - 32px), calc(100dvh - 88px));
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: var(--seo-referral-size);
  max-width: none;
  max-height: none;
  height: max-content;
  margin: auto;
  padding: 48px 0 0;
  border: 0;
  background: transparent;
  color: #fff;
  overflow: visible;
}

[data-seo-referral-promo][hidden] { display: none; }
[data-seo-referral-promo] .seo-referral-continue-note { margin: 14px 0 0; padding: 0 12px; color: #fff; font: 500 14px/1.5 'Instrument Sans', sans-serif; text-align: center; }
[data-seo-referral-promo] .seo-referral-continue-note[hidden] { display: none; }

[data-seo-referral-promo]::backdrop {
  background: rgb(0 0 0 / 76%);
}

[data-seo-referral-promo] .seo-referral-card,
[data-seo-referral-promo] [data-seo-referral-frame] {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}

[data-seo-referral-promo] [data-seo-referral-art] {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

/* Real controls align to the accepted artwork without redrawing its lettering. */
[data-seo-referral-promo] [data-seo-referral-apk],
[data-seo-referral-promo] [data-seo-referral-pwa] {
  position: absolute;
  top: 79.745%;
  height: 8.373%;
  min-height: 44px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: transparent;
  cursor: pointer;
  touch-action: manipulation;
}

[data-seo-referral-promo] [data-seo-referral-apk] {
  left: 6.539%;
  width: 41.946%;
}

[data-seo-referral-promo] [data-seo-referral-pwa] {
  left: 50%;
  width: 43.461%;
}

[data-seo-referral-promo] [data-seo-referral-close] {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: 1px solid rgb(245 213 125 / 65%);
  border-radius: 50%;
  background: #15110b;
  color: #f5d57d;
  font: 28px/1 sans-serif;
  cursor: pointer;
  touch-action: manipulation;
}

[data-seo-referral-promo] a:focus-visible,
[data-seo-referral-promo] button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

[data-seo-referral-promo] [data-seo-referral-close] svg {
  width: 20px;
  height: 20px;
  pointer-events: none;
}

[data-seo-referral-promo] .seo-referral-label,
[data-seo-referral-promo] [data-seo-referral-label] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

[data-seo-referral-promo][data-presentation="corner"] {
  inset: auto max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) auto;
  width: min(216px, calc(100vw - 32px));
  margin: 0;
  padding: 0;
  border: 1px solid rgb(245 213 125 / 45%);
  border-radius: 14px;
  background: #15110b;
  box-shadow: 0 8px 28px rgb(0 0 0 / 35%);
  z-index: 80;
}

[data-seo-referral-promo][data-presentation="corner"] [data-seo-referral-frame] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  aspect-ratio: auto;
}

[data-seo-referral-promo][data-presentation="corner"] [data-seo-referral-art] {
  grid-column: 1 / -1;
  aspect-ratio: 1.25;
  object-fit: cover;
  object-position: top;
  border-radius: 13px 13px 0 0;
}

[data-seo-referral-promo][data-presentation="corner"] [data-seo-referral-apk],
[data-seo-referral-promo][data-presentation="corner"] [data-seo-referral-pwa] {
  box-sizing: border-box;
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  min-height: 44px;
  padding: 8px 5px;
  border-radius: 0 0 0 13px;
  border-top: 1px solid rgb(245 213 125 / 30%);
  color: #f5d57d;
  font: 500 13px/1.25 'Instrument Sans', sans-serif;
  text-align: center;
  text-decoration: none;
}

[data-seo-referral-promo][data-presentation="corner"] [data-seo-referral-pwa] {
  border-left: 1px solid rgb(245 213 125 / 30%);
  border-radius: 0 0 13px 0;
}

[data-seo-referral-promo][data-presentation="corner"] [data-seo-referral-label] {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip-path: none;
  white-space: normal;
}

[data-seo-referral-promo][data-presentation="corner"] [data-seo-referral-close] {
  top: -14px;
  right: -8px;
  z-index: 1;
}

@media (max-width: 600px) {
  [data-seo-referral-promo][data-presentation="corner"] {
    inset: auto max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) auto;
    width: min(148px, calc(100vw - 24px));
  }
  [data-seo-referral-promo][data-presentation="corner"] [data-seo-referral-apk],
  [data-seo-referral-promo][data-presentation="corner"] [data-seo-referral-pwa] {
    font-size: 12px;
  }
}
