/* Spooky Pals · support.css — supporting the project (support.js): header button, the card in "A little more",
 * the note after a download, and the thank-you / support dialog with its magic button.
 * Nothing here applies until support.js inserts its elements (only when SUPPORT_URL is set).
 * The card is a kraft coffee sleeve, Pip leans in with the cup; buttons carry Pip's to-go cup, drawn in the
 * site's 2 px line. Radii: dialog 26, card 22, note 18, pill 99, chip 50 %. Only transform/opacity animate. */

.sp-cup {
  --sp-kraft: #f3e5cf;
  --sp-kraft-edge: #d9c19c;
  --sp-ease: cubic-bezier(.23, 1, .32, 1);
  position: relative;
  margin: 40px 0 12px;
  padding: 18px 16px 16px;
  border: 1px solid var(--sp-kraft-edge);
  border-radius: 22px;
  background: var(--sp-kraft);
  color: var(--ink);
}
.sp-cup::after { content: ''; display: table; clear: both; }
/* Pip leans over the top edge of the sleeve, holding the cup. */
.sp-cup-pip {
  float: right;
  width: 124px;
  height: auto;
  margin: -46px -8px 2px 6px;
  transform: rotate(5deg);
  transform-origin: 50% 90%;
  filter: drop-shadow(0 8px 6px #4a2f1a1f);
  pointer-events: none;
}
.sp-cup-title {
  margin: 0 0 8px;
  font: 800 clamp(23px, 6.4vw, 30px)/1.08 var(--display);
  letter-spacing: -.03em;
  text-wrap: balance;
  color: var(--ink);
}
.sp-cup-body {
  margin: 0;
  max-width: 46ch;
  font-size: 16px;
  line-height: 1.55;
  color: #4a4152;
}
.sp-cup-actions { clear: both; padding-top: 16px; display: grid; gap: 8px; justify-items: start; }
.sp-cup-note { margin: 0; font-size: 13px; line-height: 1.4; color: #6a5340; }

/* ---------- the button (card and note share it) ---------- */
.sp-cup-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 22px 8px 8px;
  border: 1px solid var(--ink);
  border-radius: 99px;
  background: var(--ink);
  color: var(--paper);
  font: 700 15px/1.2 var(--body);
  text-decoration: none;
  touch-action: manipulation;
  transition: transform .14s cubic-bezier(.23, 1, .32, 1), background-color .16s, border-color .16s;
}
.sp-cup-btn:active { transform: scale(.97); }
.sp-cup-btn:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.sp-cup-ico {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--ink);
}
.sp-cup-svg { width: 24px; height: 24px; display: block; overflow: visible; }
.sp-cup-sleeve { fill: var(--paper); }
.sp-cup-steam { transition: transform .32s cubic-bezier(.23, 1, .32, 1); }
@media (hover: hover) and (pointer: fine) {
  .sp-cup-btn:hover { background: var(--purple); border-color: var(--purple); color: #fff; }
  .sp-cup-btn:hover .sp-cup-steam { transform: translateY(-1.5px); }
}

@media (max-width: 479px) {
  .sp-cup-btn-card { width: 100%; }
}
@media (max-width: 340px) {
  .sp-cup { padding-inline: 14px; }
  .sp-cup-pip { width: 108px; margin-top: -40px; }
  .sp-cup-btn { gap: 10px; padding-right: 16px; font-size: 14.5px; }
}

/* Wider screens: copy on the left, a bigger Pip standing on the right edge of the sleeve. */
@media (min-width: 768px) {
  .sp-cup {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(190px, 22vw, 250px);
    align-items: end;
    gap: 0 24px;
    margin-top: 56px;
    padding: 26px 24px 24px 28px;
  }
  .sp-cup::after { display: none; }
  .sp-cup-pip { float: none; grid-column: 2; grid-row: 1; width: 100%; margin: -70px 0 -6px; justify-self: end; }
  .sp-cup-copy { grid-column: 1; grid-row: 1; }
  .sp-cup-title { font-size: clamp(30px, 2.9vw, 38px); max-width: 22ch; }
  .sp-cup-actions { grid-auto-flow: column; justify-content: start; align-items: center; gap: 16px; padding-top: 20px; }
}

/* ---------- the note after a download ---------- */
.sp-toast {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 45;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
@media (max-width: 767px) {
  html.home-tabbar-on .sp-toast { bottom: calc(var(--home-tabbar-h, 56px) + env(safe-area-inset-bottom) + 10px); }
}
.sp-toast-card {
  pointer-events: auto;
  position: relative;
  width: min(420px, 100%);
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px 12px;
  padding: 12px 12px 12px 10px;
  border: 1px solid #5d4f70; /* keeps its edge over the night-time sticker table */
  border-radius: 18px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 14px 34px #1d15294d, 0 2px 6px #1d152933;
  opacity: 0;
  transform: translateY(18px) scale(.96);
  transition: opacity .22s cubic-bezier(.23, 1, .32, 1), transform .3s cubic-bezier(.23, 1, .32, 1);
}
.sp-toast-card.is-in { opacity: 1; transform: none; }
.sp-toast-card.is-out { opacity: 0; transform: translateY(12px); transition-duration: .18s, .24s; }
.sp-toast-pip {
  grid-column: 1;
  grid-row: 1;
  width: 68px;
  height: auto;
  margin: -26px 0 0 -6px;
  transform: rotate(-6deg);
  filter: drop-shadow(0 6px 5px #0000003d);
  align-self: start;
}
.sp-toast-msg {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  padding: 2px 44px 0 0;
  font: 500 15px/1.4 var(--body);
}
.sp-toast-msg strong { display: block; font: 700 17px/1.25 var(--display); letter-spacing: -.01em; margin-bottom: 2px; }
.sp-cup-btn-toast {
  grid-column: 1 / -1;
  justify-content: center;
  min-height: 48px;
  padding: 6px 18px 6px 6px;
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}
.sp-cup-btn-toast .sp-cup-ico { width: 34px; height: 34px; }
.sp-cup-btn-toast:focus-visible { outline-color: var(--orange); }
@media (hover: hover) and (pointer: fine) {
  .sp-cup-btn-toast:hover { background: var(--orange); border-color: var(--orange); color: var(--ink); }
  .sp-cup-btn-toast:hover .sp-cup-ico { background: var(--paper); }
}
.sp-toast-x {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--paper);
  touch-action: manipulation;
  transition: transform .14s cubic-bezier(.23, 1, .32, 1), background-color .16s;
}
.sp-toast-x:active { transform: scale(.94); }
.sp-toast-x:focus-visible { outline: 3px solid var(--orange); outline-offset: -4px; }
.sp-x-svg { width: 22px; height: 22px; }
@media (hover: hover) and (pointer: fine) {
  .sp-toast-x:hover { background: #ffffff1a; }
}

@media (prefers-reduced-motion: reduce) {
  .sp-dlg, .sp-dlg.is-in,
  .sp-toast-card, .sp-toast-card.is-out { transform: none; }
  .sp-cup-btn:active, .sp-toast-x:active, .sp-cup-btn:hover .sp-cup-steam { transform: none; }
}
@media (forced-colors: active) {
  .sp-cup, .sp-toast-card { border: 1px solid CanvasText; }
  .sp-cup-btn { border: 1px solid ButtonText; }
}

/* ---------- header button: "Support" with a drawn heart, part of the night sky ---------- */
.sp-head-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 48px;
  min-height: 48px;
  padding: 0 16px 0 13px;
  border: 1px solid #fffaf240;
  border-radius: 99px;
  background: #fffaf20f;
  color: var(--home-on-night, #fffaf2);
  font: 600 15px/1 var(--body);
  touch-action: manipulation;
  transition: transform .14s cubic-bezier(.23, 1, .32, 1), border-color .16s, background-color .16s;
}
.sp-head-heart { width: 18px; height: 18px; color: var(--orange); flex: 0 0 auto; }
.sp-head-btn:active { transform: scale(.96); }
.sp-head-btn:focus-visible { outline: 3px solid var(--home-on-night, #fffaf2); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .sp-head-btn:hover { border-color: #fffaf280; background: #fffaf21f; }
}
/* phones: the header is already full (wordmark + language), so the button keeps only its heart */
@media (max-width: 479px) {
  .sp-head-btn { padding: 0; width: 48px; margin-inline: -4px; } /* full 48 px target, eats a little of the gaps instead of the wordmark */
  .sp-head-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .sp-head-heart { width: 20px; height: 20px; }
}
/* the narrowest phones have no room left at all: the card and the note still offer support */
@media (max-width: 359px) {
  .sp-head-btn { display: none; }
}

/* ---------- the thank-you / support dialog ---------- */
body.sp-dlg-open { overflow: hidden; }
.sp-dlg {
  width: min(420px, calc(100% - 24px));
  max-width: 420px;
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid #5d4f70;
  border-radius: 26px;
  background:
    radial-gradient(120% 60% at 50% 0%, #3a2c55 0%, #1d1729 62%),
    #1d1729;
  color: #fffaf2;
  overflow: auto;
  overscroll-behavior: contain;
  opacity: 0;
  transform: translateY(14px) scale(.96);
  transition: opacity .24s cubic-bezier(.23, 1, .32, 1), transform .34s cubic-bezier(.23, 1, .32, 1);
}
.sp-dlg.is-in { opacity: 1; transform: none; }
.sp-dlg::backdrop { background: #120d1cc7; }
.sp-dlg-card { position: relative; padding: 14px 22px 22px; text-align: center; }
.sp-dlg-x {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ffffff12;
  color: #fffaf2;
  touch-action: manipulation;
  transition: transform .14s cubic-bezier(.23, 1, .32, 1), background-color .16s;
}
.sp-dlg-x:active { transform: scale(.94); }
.sp-dlg-x:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
/* 24-oct-2026: language switch on the thank-you page (top left, mirrors Close) */
.sp-dlg-lang {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px 0 12px;
  border: 0;
  border-radius: 99px;
  background: #ffffff12;
  color: #fffaf2;
  font: inherit;
  font-size: .95rem;
  font-weight: 700;
  touch-action: manipulation;
  transition: transform .14s cubic-bezier(.23, 1, .32, 1), background-color .16s;
}
.sp-dlg-lang:active { transform: scale(.96); }
.sp-dlg-lang:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
@media (hover: hover) { .sp-dlg-lang:hover { background: #ffffff22; } }
@media (prefers-reduced-motion: reduce) { .sp-dlg-lang { transition: none; } }
@media (hover: hover) and (pointer: fine) { .sp-dlg-x:hover { background: #ffffff24; } }

.sp-dlg-stage { position: relative; height: 176px; margin: 6px auto 4px; display: grid; place-items: end center; }
.sp-dlg-glow {
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 230px;
  height: 150px;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, #e99b6759, #66518b3d 60%, #66518b00);
}
.sp-dlg-pip { position: relative; display: block; width: 214px; height: auto; transform: rotate(-3deg); filter: drop-shadow(0 12px 14px #0000004d); }
.sp-dlg-twinkle { position: absolute; color: #f6d38b; animation: sp-twinkle 2.6s ease-in-out infinite; }
.sp-dlg-twinkle:nth-of-type(1) { left: 14%; top: 24%; }
.sp-dlg-twinkle:nth-of-type(2) { right: 16%; top: 10%; color: #cdb9f0; animation-delay: .9s; }
.sp-dlg-twinkle:nth-of-type(3) { right: 9%; top: 58%; animation-delay: 1.7s; }

.sp-dlg-kicker { margin: 8px 0 6px; font: 700 12px/1.3 var(--body); letter-spacing: 1.6px; text-transform: uppercase; color: var(--orange); }
.sp-dlg-title { margin: 6px auto 10px; max-width: 18ch; font: 800 clamp(25px, 7vw, 31px)/1.08 var(--display); letter-spacing: -.03em; text-wrap: balance; color: #fffaf2; }
.sp-dlg-body { margin: 0 auto; max-width: 34ch; font-size: 16px; line-height: 1.5; color: #efe6f5; }

/* the magic button: floats, a slow purple-orange halo turns around it, light passes across, sparkles blink */
.sp-magic-wrap { position: relative; display: flex; justify-content: center; margin: 22px 0 10px; animation: sp-float 3.6s ease-in-out infinite; }
.sp-magic {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  width: min(320px, 100%);
  padding: 3px;
  border-radius: 99px;
  overflow: hidden;
  text-decoration: none;
  color: #fffaf2;
  box-shadow: 0 12px 30px #e99b6738, 0 4px 10px #00000040;
  touch-action: manipulation;
  transition: transform .14s cubic-bezier(.23, 1, .32, 1);
}
.sp-magic-halo {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: 420px;
  height: 420px;
  margin: -210px 0 0 -210px;
  background: conic-gradient(var(--purple), var(--orange), #cdb9f0, var(--orange), var(--purple));
  animation: sp-spin 7s linear infinite;
}
.sp-magic-face {
  position: relative;
  overflow: hidden;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 24px 8px 10px;
  border-radius: 99px;
  background: linear-gradient(180deg, #33294a, #231b31);
  font: 700 17px/1.2 var(--display);
  letter-spacing: -.01em;
}
.sp-magic-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, #fff0 30%, #ffffff3d 48%, #fff0 66%);
  transform: translateX(-130%);
  animation: sp-sheen 4.4s ease-in-out 1s infinite;
  pointer-events: none;
}
.sp-magic .sp-cup-ico { position: relative; }
.sp-magic-label { position: relative; }
.sp-magic:active, .sp-magic.is-sent { transform: scale(.97); }
.sp-magic:focus-visible { outline: 3px solid #fffaf2; outline-offset: 4px; }
@media (hover: hover) and (pointer: fine) {
  .sp-magic:hover .sp-magic-face { background: linear-gradient(180deg, #3e3259, #2a2139); }
  .sp-magic:hover .sp-cup-steam { transform: translateY(-1.5px); }
}
.sp-magic-spark { position: absolute; z-index: 1; color: #f6d38b; pointer-events: none; animation: sp-twinkle 2.2s ease-in-out infinite; }
.sp-magic-spark svg { display: block; }
.sp-magic-spark:nth-of-type(1) { left: calc(50% - 168px); top: -12px; }
.sp-magic-spark:nth-of-type(2) { right: calc(50% - 166px); top: -10px; color: #cdb9f0; animation-delay: .7s; }
.sp-magic-spark:nth-of-type(3) { right: calc(50% - 150px); bottom: -12px; color: var(--orange); animation-delay: 1.4s; }

.sp-dlg-note { margin: 4px 0 0; display: grid; gap: 4px; font-size: 13px; line-height: 1.4; color: #cfc3dc; }
.sp-dlg-optional { font-size: 15px; color: #efe6f5; }
.sp-dlg-title:focus { outline: none; } /* focused only so reading starts here; it is not a control */
/* "or" sits on a thin rule; the two ways out share a line when they fit, otherwise one under the other */
.sp-dlg-more { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px; margin: 14px 0 0; font-size: 15px; color: #cfc3dc; }
.sp-dlg-or { flex: 1 0 100%; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.sp-dlg-or::before, .sp-dlg-or::after { content: ''; flex: 1 1 auto; height: 1px; background: #5d4f70; }
.sp-dlg-more a { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 4px 6px; white-space: nowrap; color: #fffaf2; font-weight: 600; text-decoration: underline; text-decoration-color: #fffaf266; text-underline-offset: 4px; }
.sp-dlg-more a:focus-visible { outline: 3px solid var(--orange); outline-offset: 0; border-radius: 8px; }
@media (hover: hover) and (pointer: fine) { .sp-dlg-more a:hover { text-decoration-color: var(--orange); } }

.sp-shower { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.sp-shower-star { position: absolute; color: #f6d38b; opacity: 0; }
.sp-shower-star.is-orange { color: var(--orange); }
.sp-shower-star svg { display: block; }

@media (max-width: 359px) {
  .sp-dlg-card { padding: 12px 16px 18px; }
  .sp-dlg-stage { height: 150px; }
  .sp-dlg-pip { width: 184px; }
  .sp-magic-face { font-size: 16px; padding-right: 18px; }
  .sp-magic-spark:nth-of-type(1) { left: 2px; }
  .sp-magic-spark:nth-of-type(2) { right: 4px; }
  .sp-magic-spark:nth-of-type(3) { right: 18px; }
}

@keyframes sp-spin { to { transform: rotate(1turn); } }
@keyframes sp-sheen { 0% { transform: translateX(-130%); } 42%, 100% { transform: translateX(130%); } }
@keyframes sp-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes sp-twinkle { 0%, 100% { opacity: .35; transform: scale(.7) rotate(0deg); } 50% { opacity: 1; transform: scale(1.1) rotate(20deg); } }

@media (prefers-reduced-motion: reduce) {
  .sp-magic-wrap, .sp-magic-halo, .sp-magic-sheen, .sp-magic-spark, .sp-dlg-twinkle { animation: none; }
  .sp-magic-sheen { display: none; }
  .sp-magic-spark, .sp-dlg-twinkle { opacity: .85; }
  .sp-magic:active, .sp-magic.is-sent, .sp-head-btn:active, .sp-dlg-x:active { transform: none; }
}

/* ---------- 5. the quiet pill: story cards, Vesper, guests (data-support-slot) and the home (24-oct-2026) ----------
 * Present, never loud: an outlined pill in the reading flow, the same weight as the other secondary pills of the card
 * ("Meet Moss"), with the orange chip of the support family (the cup button) holding a drawn heart. Not sticky, not
 * fixed: a full-screen game (kit.css .gp-full) hides it with the rest of the card. */
.sp-pal { margin: 14px 0 0; }
.sp-pal-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-height: 48px;
  padding: 6px 18px 6px 7px;
  border: 1.5px solid #c7b9d6;
  border-radius: 99px;
  background: transparent;
  color: var(--ink, #292333);
  font: 600 15px/1.2 var(--body, system-ui, sans-serif);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .14s cubic-bezier(.23, 1, .32, 1), background-color .16s, border-color .16s;
}
.sp-pal-ico {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--orange, #e99b67);
  color: var(--ink, #292333);
}
.sp-pal-heart { display: block; width: 16px; height: 16px; }
.sp-pal-btn:active { transform: scale(.97); }
.sp-pal-btn:focus-visible { outline: 3px solid var(--purple, #66518b); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .sp-pal-btn:hover { border-color: var(--purple, #66518b); background: #66518b0f; }
}
/* the home: beside "Send Spooky Pals to a friend" (home.css .home-share-row wraps it under on phones) */
.sp-home-btn { background: #fffdf7; }
@media (prefers-reduced-motion: reduce) {
  .sp-pal-btn { transition: background-color .16s, border-color .16s; }
  .sp-pal-btn:active { transform: none; }
}
@media (forced-colors: active) {
  .sp-pal-btn { border: 1px solid ButtonText; }
  .sp-pal-ico { border: 1px solid ButtonText; }
}

/* ---------- 6. the heartbeat (24-oct-2026, Arturo: «dale una animación sencilla al botón de donar como para que no
 * pase desapercibido») ----------
 * support.js adds .sp-beat for one beat when the pill (or the header heart) is on screen: three beats, then it rests
 * (never during a round, never under another dialog). Lub-dub of the heart chip and one soft orange ring that widens
 * and fades. Transform and opacity only. Reduced motion: nothing (and support.js never adds the class). */
.sp-pal-ico { position: relative; }
.sp-pal-ico::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--orange, #e99b67);
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .sp-pal-btn.sp-beat .sp-pal-ico { animation: sp-beat 1.05s cubic-bezier(.23, 1, .32, 1) both; }
  .sp-pal-btn.sp-beat .sp-pal-ico::after { animation: sp-ring 1.2s cubic-bezier(.23, 1, .32, 1) .08s both; }
  .sp-head-btn.sp-beat .sp-head-heart { animation: sp-beat 1.05s cubic-bezier(.23, 1, .32, 1) both; }
}
@keyframes sp-beat {
  0% { transform: scale(1); }
  14% { transform: scale(1.16); }
  28% { transform: scale(.97); }
  42% { transform: scale(1.1); }
  64%, 100% { transform: scale(1); }
}
@keyframes sp-ring {
  0% { opacity: .7; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.6); }
}
@media (forced-colors: active) { .sp-pal-ico::after { display: none; } }
/* Lupa M1 (24-oct): on narrow phones the art starts below the language pill (last, so it wins over the stage rules) */
@media (max-width: 380px) { .sp-dlg-stage { margin-top: 50px; } }

/* ---------- 7. the floating copy (24-oct-2026, Arturo: «El botón de apoyar también debe ser flotante por algunos segundos
 * antes de quedar estable… Igual al abrir los personajes.») ----------
 * support.js puts a copy of the pill on screen for a few seconds after the visitor scrolls (home: bottom left, above the
 * tab bar and left of Alma's button; story cards: the bottom of the card), then glides it into the pill it copies, or
 * fades it towards it. support.js measures the spot and sets `translate` and max-width; here only the look, the entrance
 * and the exit. The copy is the same pill lifted off the page: paper face, two shadows, and a small ink «x» on its top
 * right corner, the way Alma's button wears hers (24 px disc, 44 px target). Transform and opacity only. */
.sp-float {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 44; /* under the download note (45) and Alma's button (60), over the tab bar (20) */
  display: block;
  width: max-content;
  max-width: calc(100% - 44px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px) scale(.95); /* rises from just below its spot: never into what sits under it */
  transform-origin: 0 100%;
  transition: opacity .22s cubic-bezier(.23, 1, .32, 1), transform .34s cubic-bezier(.23, 1, .32, 1), visibility 0s linear .34s;
}
.sp-float.is-in { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition: opacity .22s cubic-bezier(.23, 1, .32, 1), transform .34s cubic-bezier(.23, 1, .32, 1), visibility 0s; }
.sp-float.is-leaving { pointer-events: none; }
/* the first 600 ms it lets taps through to what was under it (support.js adds .is-armed) */
.sp-float.is-in:not(.is-armed) { pointer-events: none; }
/* it had to go while a finger was down (support.js, Lupa M1): it only fades; what it takes or lets through stays the same
 * until the gesture is over, so the finger's click never lands on the card behind it */
.sp-float.is-in.is-fading { opacity: 0; transition: opacity .15s linear; }
/* Lupa B1: kit.css hides every child of a full-screen card; a copy held under a finger must stay in place (invisible) until its click */
dialog.sv.gp-full > .sp-float.sp-float-card.is-fading { display: block !important; }
/* in a card it lives inside the dialog (same top layer), placed in viewport pixels by support.js */
.sp-float-card { left: 0; top: 0; bottom: auto; z-index: 7; }
.sp-float-btn {
  position: relative;
  isolation: isolate;
  max-width: 100%;
  padding-right: 20px;
  background: #fffdf7;
}
.sp-float.is-landing .sp-float-btn { transition: none; } /* support.js moves it frame by frame onto the real pill */
.sp-float-btn .sp-pal-label { text-wrap: balance; }
/* the lift: its own layer, so it can fade while the pill lands */
.sp-float-btn::before {
  content: '';
  position: absolute;
  inset: -1.5px;
  z-index: -1;
  border-radius: inherit;
  box-shadow: 0 12px 26px #2923332e, 0 2px 6px #29233329;
  pointer-events: none;
  transition: opacity .2s cubic-bezier(.23, 1, .32, 1);
}
/* the «x»: a 24 px disc on the pill's top right corner; the button itself is 44 x 44 around it */
.sp-float-x {
  position: absolute;
  top: -20px;
  right: -20px;
  z-index: 1;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fffaf2;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .14s cubic-bezier(.23, 1, .32, 1);
}
.sp-float-x-disc {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink, #292333);
  box-shadow: 0 0 0 1.5px #fffdf7, 0 3px 8px #29233340;
  transition: transform .14s cubic-bezier(.23, 1, .32, 1), background-color .16s;
}
.sp-float-x-svg { display: block; width: 12px; height: 12px; }
.sp-float-x:active .sp-float-x-disc { transform: scale(.92); }
.sp-float-x:focus-visible { outline: none; }
.sp-float-x:focus-visible .sp-float-x-disc { outline: 3px solid var(--purple, #66518b); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .sp-float-x:hover .sp-float-x-disc { background: var(--purple, #66518b); }
  .sp-float-btn:hover { background: #f6f1fa; }
}
.sp-float.is-landing .sp-float-x,
.sp-float.is-landing .sp-float-btn::before { opacity: 0; }
@media (max-width: 359px) {
  .sp-float-btn { gap: 8px; padding-right: 16px; font-size: 14.5px; }
}
/* reduced motion, or the visitor chose a still porch: it only fades in and out (support.js never glides it either) */
@media (prefers-reduced-motion: reduce) {
  .sp-float, .sp-float.is-in { transform: none; transition: opacity .2s linear, visibility 0s linear .2s; }
  .sp-float.is-in { transition: opacity .2s linear, visibility 0s; }
  .sp-float-x:active .sp-float-x-disc { transform: none; }
}
html.still-porch .sp-float, html.still-porch .sp-float.is-in { transform: none; transition: opacity .2s linear, visibility 0s linear .2s; }
html.still-porch .sp-float.is-in { transition: opacity .2s linear, visibility 0s; }
@media (forced-colors: active) {
  .sp-float-btn::before { display: none; }
  .sp-float-x-disc { border: 1px solid ButtonText; }
}
