/* ==================================================================
   Support us — trigger button + window (sotoChemistry)
   Ported 2026-11-25 from ../camera_mirror_trainer/css/style.css
   (the "Support modal" section, copied as-is). Only the trigger is new:
   Mirror Trainer pins it to a sidebar; this site has none, so it floats
   in the bottom-right corner of every page. Markup is built by js/support.js.
   ================================================================== */
.sp-trigger {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;              /* under the element pop-up (#modal, 50) */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 10px 14px;
  border: none;
  border-radius: 999px;
  font: 700 16px/1 'Baloo 2', 'Trebuchet MS', system-ui, sans-serif;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #ff8f6b 0%, #ff5f8d 55%, #ff9a5c 100%);
  background-size: 200% 200%;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  box-shadow: 0 6px 20px rgba(255, 110, 130, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  animation: spGradient 6s ease-in-out infinite, spGlow 2.6s ease-in-out infinite;
  transition: transform 160ms ease;
}
.sp-trigger svg {
  width: 20px; height: 20px;
  fill: #fff; stroke: #fff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  animation: spHeartbeat 1.6s ease-in-out infinite;
  transform-origin: center;
}
.sp-trigger::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid rgba(255, 180, 160, 0.9);
  opacity: 0;
  pointer-events: none;
  animation: spRing 2.6s ease-out infinite;
}
.sp-trigger .sp-sparkle {
  position: absolute;
  font-size: 12px;
  font-style: normal;
  line-height: 1;
  pointer-events: none;
  opacity: 0;
  animation: spSparkle 2.6s ease-in-out infinite;
}
.sp-trigger .sp-sparkle:nth-of-type(1) { top: -6px;    right: 6px; animation-delay: 0s; }
.sp-trigger .sp-sparkle:nth-of-type(2) { top: -4px;    left: 10px; animation-delay: 0.9s; font-size: 10px; }
.sp-trigger .sp-sparkle:nth-of-type(3) { bottom: -6px; right: 22px; animation-delay: 1.7s; font-size: 9px; }
@media (hover: hover) {
  .sp-trigger:hover { transform: translateY(-2px) scale(1.04); }
  .sp-trigger:hover svg { animation-duration: 0.8s; }
}
.sp-trigger.active { filter: brightness(1.08); }
.sp-trigger:focus-visible { outline: 3px solid #2a2350; outline-offset: 3px; }
@media (max-width: 600px) {
  .sp-trigger { right: 12px; bottom: 12px; padding: 8px 14px 8px 11px; font-size: 14px; }
}
html.sp-open { overflow: hidden; }       /* no page scroll behind the window */

@keyframes spHeartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.22); } 28% { transform: scale(1); }
  42% { transform: scale(1.14); } 56% { transform: scale(1); }
}
@keyframes spGlow {
  0%, 100% { box-shadow: 0 6px 20px rgba(255, 110, 130, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
  50%      { box-shadow: 0 8px 30px rgba(255, 110, 130, 0.8), 0 0 0 3px rgba(255, 150, 150, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
}
@keyframes spGradient { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes spRing {
  0% { transform: scale(1); opacity: 0.8; } 70%, 100% { transform: scale(1.35); opacity: 0; }
}
@keyframes spSparkle {
  0%, 30%, 100% { opacity: 0; transform: scale(0.5) rotate(0deg); }
  10% { opacity: 1; transform: scale(1.2) rotate(20deg); }
  20% { opacity: 0.8; transform: scale(0.9) rotate(-10deg); }
}
@media (prefers-reduced-motion: reduce) {
  .sp-trigger, .sp-trigger svg, .sp-trigger::after, .sp-trigger .sp-sparkle { animation: none; }
}

/* Emphasis inside the letter (the p1 "that's") */
.support-lyric em { font-style: italic; }

/* ============================================================
   Support modal — letter + PayPal (left), feedback (right)
   ─────────────────────────────────────────────────────────────
   Screen-fit: the window fills the viewport minus a 15% margin
   left/right and 7% top/bottom (70vw × 86vh). One fluid base size (--fs),
   derived from the same viewport, drives ALL type and spacing in
   em, so the content scales with the window and fits without
   scrolling. Narrow / portrait screens switch to one column with
   smaller margins and scroll inside the window instead.
   ============================================================ */
#supportBackdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: rgba(8, 6, 10, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: supportFade 260ms ease-out;
}

#supportBackdrop.hidden,
#supportModal .hidden {
  display: none;
}

#supportModal {
  --fs: clamp(12px, min(1.15vw, 1.58vh), 34px);
  --serif: 'EB Garamond', 'Noto Serif SC', 'Iowan Old Style', Palatino, 'Songti SC', 'STSong', Georgia, serif;
  --display: 'Cormorant Garamond', 'Noto Serif SC', 'Iowan Old Style', Palatino, 'Songti SC', 'STSong', Georgia, serif;

  position: relative;
  box-sizing: border-box;
  width: 70vw;
  height: 86vh;
  height: 86dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  overflow: hidden;
  font-size: var(--fs);
  border-radius: 1.5em;
  color: #f4ece6;
  background: #17131a;
  border: 1px solid rgba(255, 220, 200, 0.12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.4);
  animation: supportRise 380ms cubic-bezier(0.16, 1, 0.3, 1);
}

#supportModal *,
#supportModal *::before { box-sizing: border-box; }

@keyframes supportFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes supportRise {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

.support-close {
  position: absolute;
  top: 1em;
  right: 1em;
  z-index: 2;
  width: 2.2em;
  height: 2.2em;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9em;
  cursor: pointer;
}

.support-close:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }

/* ── Left: the letter ───────────────────────────────────────── */
.support-letter {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding: 1.7em 2.8em;
  overflow: auto;
  background:
    radial-gradient(120% 70% at 0% 0%, rgba(255, 150, 120, 0.24), transparent 60%),
    radial-gradient(90% 60% at 100% 100%, rgba(255, 200, 120, 0.12), transparent 65%);
}

.support-eyebrow {
  font-size: 0.72em;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffb59c;
}

.support-letter h2 {
  margin: 0.3em 0 0.42em;
  font-family: var(--display);
  font-size: 2.55em;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: #fff6ef;
  text-wrap: balance;
}

.support-lyric {
  margin: 0 0 0.55em;
  font-family: var(--serif);
  font-size: 1.22em;
  line-height: 1.42;
  color: rgba(250, 238, 230, 0.86);
  text-wrap: pretty;
}

.support-grace {
  margin: 0.45em 0 0;
  padding-top: 0.7em;
  border-top: 1px solid rgba(255, 220, 200, 0.12);
  font-family: var(--display);
  font-style: italic;
  font-size: 1.24em;
  line-height: 1.35;
  color: rgba(255, 214, 196, 0.85);
  text-wrap: balance;
}

.support-privacy {
  margin: 0.8em 0 0;
  font-size: 0.72em;
  line-height: 1.45;
  color: rgba(244, 236, 230, 0.42);
}

/* Chinese: no italics (CJK has none), a touch smaller and airier. */
:lang(zh-CN) .support-letter h2 { font-size: 2.3em; line-height: 1.25; font-weight: 600; letter-spacing: 0.02em; }
:lang(zh-CN) .support-lyric    { font-size: 1.12em; line-height: 1.8; }
:lang(zh-CN) .support-grace    { font-style: normal; font-size: 1.1em; line-height: 1.7; text-wrap: wrap; }
:lang(zh-CN) .support-eyebrow  { letter-spacing: 0.24em; }

/* ── The gift: amounts + PayPal, inside the letter column ──── */
.support-give {
  margin-top: 0.5em;
  padding: 1em 1.1em;
  border-radius: 1.1em;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 220, 200, 0.1);
}

.support-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  margin-bottom: 0.8em;
}

.amount-chip,
.amount-custom {
  height: 2.4em;
  min-width: 3.1em;
  padding: 0 0.8em;
  border-radius: 1.25em;
  border: 1px solid rgba(255, 220, 200, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: #f7e9e0;
  font: inherit;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.amount-chip:hover { border-color: rgba(255, 200, 170, 0.5); }

.amount-chip.active,
.amount-custom.active {
  background: linear-gradient(135deg, #ffb48f, #ff8fa0);
  border-color: transparent;
  color: #2a1418;
}

.amount-custom {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  cursor: text;
}

.amount-custom input {
  width: 2.9em;
  border: none;
  outline: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  -moz-appearance: textfield;
}

.amount-custom input::placeholder { color: rgba(247, 233, 224, 0.55); font-weight: 500; }
.amount-custom input::-webkit-outer-spin-button,
.amount-custom input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.support-give-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6em;
  margin-bottom: 0.7em;
}

.support-give-label {
  font-family: var(--display);
  font-size: 1.35em;
  font-weight: 600;
  color: #fff6ef;
}

:lang(zh-CN) .support-give-label { font-size: 1.15em; }

.support-currency {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.78em;
  color: rgba(244, 236, 230, 0.6);
}

.support-currency select {
  padding: 0.35em 0.6em;
  border-radius: 0.9em;
  border: 1px solid rgba(255, 220, 200, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #f7e9e0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.support-currency select option { color: #111; }

.support-methods {
  display: flex;
  gap: 0.4em;
  margin-bottom: 0.8em;
  padding: 0.25em;
  border-radius: 1.2em;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 220, 200, 0.1);
}

.method-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  height: 2.3em;
  border-radius: 1em;
  border: none;
  background: transparent;
  color: rgba(244, 236, 230, 0.7);
  font: inherit;
  font-size: 0.95em;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.method-tab.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff6ef;
}

.wechat-dot {
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  background: #07c160;
  box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.25);
}

.method-panel.hidden { display: none; }

.wechat-row {
  display: flex;
  align-items: center;
  gap: 1.1em;
}

#wechatQr {
  flex: 0 0 auto;
  width: 11.5em;
  height: auto;
  border-radius: 0.8em;
  background: #fff;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
}

.wechat-text { min-width: 0; }

.wechat-text strong {
  display: block;
  font-family: var(--display);
  font-size: 1.3em;
  font-weight: 600;
  line-height: 1.2;
  color: #fff6ef;
  margin-bottom: 0.35em;
}

:lang(zh-CN) .wechat-text strong { font-size: 1.15em; }

.wechat-text p {
  margin: 0 0 0.45em;
  font-family: var(--serif);
  font-size: 1em;
  line-height: 1.45;
  color: rgba(250, 238, 230, 0.85);
}

.wechat-text .support-fine { margin-top: 0.3em; font-family: inherit; font-size: 0.76em; line-height: 1.45; color: rgba(244, 236, 230, 0.55); }

.support-give.wechat-active .support-currency { visibility: hidden; }

/* Which scanning instruction to show */
.wechat-how-mobile { display: none; }
html.sp-touch .wechat-how-mobile { display: block; }
html.sp-touch .wechat-how-desktop { display: none; }

#paypalButtons {
  min-height: 3em;
  position: relative;
}

#paypalButtons.loading::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 1.5em;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 20%, rgba(255,255,255,0.1) 20% 40%);
  background-size: 200% 100%;
  animation: paypalShimmer 1.2s linear infinite;
}

@keyframes paypalShimmer { from { background-position: 200% 0; } to { background-position: 0 0; } }

#paypalButtons.disabled { opacity: 0.45; pointer-events: none; }

.support-fine {
  margin: 0.6em 0 0;
  font-size: 0.76em;
  line-height: 1.45;
  color: rgba(244, 236, 230, 0.55);
}

.support-fine.warn { color: #ffb38a; }
.support-fine.ok   { color: #a8e6b4; }

/* ── Right: tell us how to make it better ───────────────────── */
.support-talk {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 3.4em 2.2em 2em 2em;
  overflow: auto;
  background: rgba(255, 255, 255, 0.028);
  border-left: 1px solid rgba(255, 220, 200, 0.08);
}

.support-talk h3 {
  margin: 0 0 0.5em;
  font-family: var(--display);
  font-size: 1.75em;
  font-weight: 600;
  line-height: 1.15;
  color: #fff6ef;
  text-wrap: balance;
}

:lang(zh-CN) .support-talk h3 { font-size: 1.4em; line-height: 1.4; }

.support-talk-lead {
  margin: 0 0 1em;
  font-family: var(--serif);
  font-size: 1.12em;
  line-height: 1.5;
  color: rgba(244, 236, 230, 0.72);
}

:lang(zh-CN) .support-talk-lead { font-size: 0.95em; line-height: 1.65; }

.support-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45em;
  margin-bottom: 0.9em;
}

.topic-chip {
  padding: 0.42em 0.8em;
  border-radius: 1.2em;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: rgba(244, 236, 230, 0.78);
  font: inherit;
  font-size: 0.9em;
  cursor: pointer;
}

.topic-chip.active {
  background: rgba(255, 180, 143, 0.16);
  border-color: rgba(255, 180, 143, 0.55);
  color: #ffd9c6;
}

#supportMessage {
  flex: 1;
  min-height: 3.6em;
  resize: none;
  padding: 0.8em 1em;
  border-radius: 0.9em;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  color: #f4ece6;
  font-family: var(--serif);
  font-size: 1.05em;
  line-height: 1.5;
  outline: none;
}

#supportMessage:focus { border-color: rgba(255, 180, 143, 0.6); }

.support-send {
  margin-top: 0.8em;
  height: 2.8em;
  border-radius: 1.4em;
  border: 1px solid rgba(255, 220, 200, 0.28);
  background: rgba(255, 255, 255, 0.07);
  color: #fff6ef;
  font: inherit;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
}

.support-send:hover { background: rgba(255, 255, 255, 0.13); }

.support-email-row #supportEmailText { color: rgba(244, 236, 230, 0.85); user-select: all; }

#supportCopyEmail {
  margin-left: 0.3em;
  padding: 0.15em 0.7em;
  border-radius: 1em;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: rgba(244, 236, 230, 0.8);
  font: inherit;
  cursor: pointer;
}

.support-close:focus-visible,
.amount-chip:focus-visible,
.topic-chip:focus-visible,
.support-send:focus-visible,
.sp-trigger:focus-visible {
  outline: 2px solid #ffb48f;
  outline-offset: 2px;
}

#supportReplyEmail {
  margin-top: 0.6em;
  padding: 0.65em 1em;
  border-radius: 0.9em;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  color: #f4ece6;
  font: inherit;
  font-size: 0.9em;
  outline: none;
  width: 100%;
}

#supportReplyEmail:focus { border-color: rgba(255, 180, 143, 0.6); }

.support-botcheck { position: absolute; left: -9999px; opacity: 0; }

#supportTalkForm { display: flex; flex-direction: column; flex: 1; min-height: 0; }

/* ── Thank-you panels (after a gift, after a message) ────────── */
.support-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 1.6em 1.4em;
  border-radius: 1.1em;
  text-align: center;
  animation: supportRise 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.support-give-done {
  margin-top: 0.5em;
  background: linear-gradient(160deg, rgba(255, 180, 143, 0.18), rgba(255, 143, 160, 0.1));
  border: 1px solid rgba(255, 190, 160, 0.3);
}

.support-talk-done {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 220, 200, 0.12);
}

.done-icon { font-size: 2.4em; line-height: 1; margin-bottom: 0.2em; }

.support-done strong {
  font-family: var(--display);
  font-size: 1.45em;
  font-weight: 600;
  line-height: 1.2;
  color: #fff6ef;
  text-wrap: balance;
}

:lang(zh-CN) .support-done strong { font-size: 1.25em; line-height: 1.4; }

.support-done p {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.08em;
  line-height: 1.5;
  color: rgba(250, 238, 230, 0.85);
  text-wrap: pretty;
}

.support-done .done-fine {
  font-size: 0.85em;
  color: rgba(244, 236, 230, 0.55);
}

.support-again {
  margin-top: 0.6em;
  padding: 0.5em 1.1em;
  border-radius: 1.2em;
  border: 1px solid rgba(255, 220, 200, 0.28);
  background: transparent;
  color: rgba(244, 236, 230, 0.85);
  font: inherit;
  font-size: 0.85em;
  cursor: pointer;
}

.support-again:hover { background: rgba(255, 255, 255, 0.08); }

/* ── Portrait / narrow: one column, the window scrolls inside ─ */
@media (max-width: 900px), (max-aspect-ratio: 1/1) {
  #supportModal {
    --fs: clamp(14px, min(2.1vw, 1.7vh), 26px);
    width: 80vw;
    height: 86vh;
    height: 86dvh;
    grid-template-columns: 1fr;
    grid-auto-rows: max-content;
    overflow-y: auto;
  }
  .support-letter,
  .support-talk { overflow: visible; }
  .support-letter  { padding: 2.6em 2.2em 2em; }
  .support-talk { padding: 2em 2.2em 2.2em; border-left: none; border-top: 1px solid rgba(255, 220, 200, 0.08); }
  #supportMessage  { min-height: 7em; }
  .wechat-row { flex-direction: column; text-align: center; }
  #wechatQr { width: min(60vw, 16em); }
}

/* ── Phones: a 15% margin would waste the screen ──────────── */
@media (max-width: 600px) {
  #supportModal {
    --fs: clamp(14px, 3.9vw, 18px);
    width: 92vw;
    height: 90vh;
    height: 90dvh;
  }
  .support-letter  { padding: 2.8em 1.5em 1.6em; }
  .support-talk { padding: 1.6em 1.5em 1.8em; }
}

/* ── Very short landscape windows: let the columns scroll ──── */
@media (max-height: 520px) and (min-width: 901px) {
  #supportModal { --fs: 12px; height: 84vh; height: 84dvh; }
  .support-letter { justify-content: flex-start; }
}



/* sotoChemistry: when the letter is taller than the window, scroll from the top
   instead of centring it off both edges (the eyebrow was being clipped). */
.support-letter { justify-content: safe center; }

/* ==================================================================
   Homepage hero version (added 2026-11-25): the button sits beside the
   big periodic table, between the tagline and the caption. js/support.js
   mounts it into #supportSlot and adds .sp-hero; pages without a slot keep
   the floating corner button above.
   ================================================================== */
.hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 22px 36px;
  margin: 22px auto 4px;
}
.hero-row .hero-table { margin: 0; }
.hero-support { position: relative; z-index: 2; }

.sp-trigger.sp-hero {
  position: relative;
  right: auto; bottom: auto;
  gap: 14px;
  padding: 16px 30px 16px 22px;
  border: 3px solid #fff;
  font-size: 1.5rem;
  text-align: left;
  /* layer 1 = a shine that sweeps across, layer 2 = the moving candy gradient */
  background:
    linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.6) 50%, transparent 62%) no-repeat,
    linear-gradient(120deg, #ff5d8f, #ff8c42, #ffd23f, #ff5d8f, #c77dff, #ff5d8f);
  background-size: 260% 100%, 400% 100%;
  background-position: 200% 0, 0% 50%;
  box-shadow: 0 10px 30px rgba(255, 93, 143, 0.55), 0 0 0 0 rgba(255, 210, 63, 0.7);
  animation:
    spHeroBg 7s linear infinite,
    spHeroGlow 2.2s ease-in-out infinite,
    spHeroBob 4.5s ease-in-out infinite;
}
.sp-trigger.sp-hero svg { width: 34px; height: 34px; flex: 0 0 auto; }
.sp-trigger.sp-hero::after { border-color: rgba(255, 255, 255, 0.95); border-width: 3px; }
.sp-words { display: flex; flex-direction: column; line-height: 1.05; }
.sp-trigger.sp-hero .sp-label { font-size: 1.5rem; font-weight: 800; letter-spacing: 0.01em; }
.sp-trigger.sp-hero .sp-sub   { margin-top: 4px; font-size: 0.95rem; font-weight: 700; opacity: 0.95; }

.sp-trigger.sp-hero .sp-sparkle { font-size: 18px; }
.sp-trigger.sp-hero .sp-sparkle:nth-of-type(1) { top: -14px;    right: 10px;  animation-delay: 0s; }
.sp-trigger.sp-hero .sp-sparkle:nth-of-type(2) { top: -10px;    left: 18px;   animation-delay: 0.6s; font-size: 14px; }
.sp-trigger.sp-hero .sp-sparkle:nth-of-type(3) { bottom: -14px; right: 34px;  animation-delay: 1.2s; }
.sp-trigger.sp-hero .sp-sparkle:nth-of-type(4) { top: 40%;      right: -20px; animation-delay: 1.8s; }
.sp-trigger.sp-hero .sp-sparkle:nth-of-type(5) { bottom: -8px;  left: -12px;  animation-delay: 2.2s; font-size: 14px; }

@media (hover: hover) {
  .sp-trigger.sp-hero:hover { animation-play-state: running, running, paused; transform: scale(1.07) rotate(-1.5deg); }
}

@keyframes spHeroBg {
  0%   { background-position: 200% 0, 0% 50%; }
  35%  { background-position: -100% 0, 50% 50%; }   /* shine crosses in the first third */
  100% { background-position: -100% 0, 100% 50%; }
}
@keyframes spHeroGlow {
  0%, 100% { box-shadow: 0 10px 30px rgba(255, 93, 143, 0.55), 0 0 0 0 rgba(255, 210, 63, 0.7); }
  50%      { box-shadow: 0 14px 42px rgba(255, 93, 143, 0.85), 0 0 0 10px rgba(255, 210, 63, 0); }
}
/* gentle float, with a little "look at me" wiggle once per cycle */
@keyframes spHeroBob {
  0%, 100% { transform: translateY(0) rotate(0); }
  40%      { transform: translateY(-6px) rotate(0); }
  70%      { transform: translateY(0) rotate(0); }
  74%      { transform: translateY(0) rotate(-4deg) scale(1.05); }
  78%      { transform: translateY(0) rotate(4deg) scale(1.05); }
  82%      { transform: translateY(0) rotate(-3deg) scale(1.03); }
  86%      { transform: translateY(0) rotate(0) scale(1); }
}
@media (max-width: 600px) {
  .sp-trigger.sp-hero { padding: 12px 22px 12px 16px; font-size: 1.2rem; }
  .sp-trigger.sp-hero .sp-label { font-size: 1.25rem; }
  .sp-trigger.sp-hero .sp-sub { font-size: 0.85rem; }
  .sp-trigger.sp-hero svg { width: 28px; height: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .sp-trigger.sp-hero { animation: none; }
}

/* ==================================================================
   sotoChemistry colour theme for the window (added 2026-11-25, parent's
   request: "similar colour tone to the homepage"). The package's dark
   Mirror Trainer palette above is left untouched for easy diffing; these
   rules come later in the file at equal or higher specificity and win.
   Palette = the site's :root (ink #2a2350, pink #ff5d8f, orange #ff8c42,
   yellow #ffd23f, purple #c77dff, blue #5b9dff) and its body gradient.
   ================================================================== */
#supportBackdrop { background: rgba(42, 35, 80, 0.38); }

#supportModal {
  color: #2a2350;
  background: linear-gradient(135deg, #e3efff 0%, #e9f6fd 30%, #fbe9f6 70%, #ffe3ee 100%);
  border: 3px solid #fff;
  box-shadow: 0 30px 80px rgba(42, 35, 80, 0.35), 0 0 0 1px rgba(255, 93, 143, 0.15);
}

.support-close { background: rgba(255, 255, 255, 0.75); color: #2a2350; }
.support-close:hover { background: #fff; color: #ff5d8f; }

.support-letter {
  background:
    radial-gradient(120% 70% at 0% 0%, rgba(161, 196, 253, 0.55), transparent 60%),
    radial-gradient(90% 60% at 100% 100%, rgba(253, 161, 196, 0.35), transparent 65%);
}
.support-eyebrow { color: #ff5d8f; }
.support-letter h2 { color: #2a2350; }
.support-lyric { color: rgba(42, 35, 80, 0.82); }
.support-grace { color: #b8336a; border-top-color: rgba(42, 35, 80, 0.12); }
.support-privacy { color: rgba(42, 35, 80, 0.55); }

/* the gift card */
.support-give {
  background: rgba(255, 255, 255, 0.72);
  border: 2px solid #fff;
  box-shadow: 0 8px 24px rgba(91, 157, 255, 0.15);
}
.support-give-label { color: #2a2350; }
.support-currency { color: rgba(42, 35, 80, 0.65); }
.support-currency select {
  border-color: rgba(42, 35, 80, 0.18);
  background: #fff;
  color: #2a2350;
}
.support-methods { background: rgba(91, 157, 255, 0.12); border-color: rgba(91, 157, 255, 0.2); }
.method-tab { color: rgba(42, 35, 80, 0.65); }
.method-tab.active {
  background: #fff;
  color: #2a2350;
  box-shadow: 0 2px 8px rgba(42, 35, 80, 0.12);
}

.amount-chip,
.amount-custom {
  border: 2px solid rgba(199, 125, 255, 0.35);
  background: #fff;
  color: #2a2350;
}
.amount-chip:hover { border-color: #c77dff; }
.amount-chip.active,
.amount-custom.active {
  background: linear-gradient(135deg, #ff5d8f, #ff8c42);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 93, 143, 0.35);
}
.amount-custom input::placeholder { color: rgba(42, 35, 80, 0.5); }
.amount-custom.active input::placeholder { color: rgba(255, 255, 255, 0.85); }

#paypalButtons.loading::after {
  background: repeating-linear-gradient(90deg, rgba(91,157,255,0.10) 0 20%, rgba(255,93,143,0.12) 20% 40%);
  background-size: 200% 100%;
}

#wechatQr { box-shadow: 0 6px 20px rgba(42, 35, 80, 0.18); }
.wechat-text strong { color: #2a2350; }
.wechat-text p { color: rgba(42, 35, 80, 0.82); }
.wechat-text .support-fine { color: rgba(42, 35, 80, 0.55); }

.support-fine { color: rgba(42, 35, 80, 0.6); }
.support-fine.warn { color: #d9480f; }
.support-fine.ok   { color: #1f9e68; }

/* the feedback side */
.support-talk {
  background: rgba(255, 255, 255, 0.55);
  border-left: 2px solid #fff;
}
.support-talk h3 { color: #2a2350; }
.support-talk-lead { color: rgba(42, 35, 80, 0.75); }
.topic-chip {
  border: 2px solid rgba(91, 157, 255, 0.3);
  background: #fff;
  color: rgba(42, 35, 80, 0.8);
}
.topic-chip.active {
  background: linear-gradient(135deg, #5b9dff, #c77dff);
  border-color: transparent;
  color: #fff;
}
#supportMessage,
#supportReplyEmail {
  border: 2px solid rgba(42, 35, 80, 0.1);
  background: #fff;
  color: #2a2350;
}
#supportMessage::placeholder,
#supportReplyEmail::placeholder { color: rgba(42, 35, 80, 0.45); }
#supportMessage:focus,
#supportReplyEmail:focus { border-color: #c77dff; }
.support-send {
  border: none;
  background: linear-gradient(135deg, #ff5d8f, #ff8c42);
  color: #fff;
  box-shadow: 0 6px 18px rgba(255, 93, 143, 0.35);
}
.support-send:hover { background: linear-gradient(135deg, #ff4a80, #ff7a2a); }
.support-send:disabled { opacity: 0.6; }
.support-email-row #supportEmailText { color: #2a2350; }
#supportCopyEmail { border-color: rgba(42, 35, 80, 0.2); background: #fff; color: #2a2350; }

.support-close:focus-visible,
.amount-chip:focus-visible,
.topic-chip:focus-visible,
.support-send:focus-visible { outline-color: #c77dff; }

/* thank-you panels */
.support-give-done {
  background: linear-gradient(160deg, rgba(255, 210, 63, 0.28), rgba(255, 93, 143, 0.16));
  border: 2px solid #fff;
}
.support-talk-done { background: rgba(255, 255, 255, 0.75); border: 2px solid #fff; }
.support-done strong { color: #2a2350; }
.support-done p { color: rgba(42, 35, 80, 0.82); }
.support-done .done-fine { color: rgba(42, 35, 80, 0.55); }
.support-again { border-color: rgba(42, 35, 80, 0.2); background: #fff; color: #2a2350; }
.support-again:hover { background: #fff0f5; }

@media (max-width: 900px), (max-aspect-ratio: 1/1) {
  .support-talk { border-left: none; border-top: 2px solid #fff; }
}

/* Wide screens: a touch tighter so the whole letter, PayPal buttons included,
   fits a 1400×900 window without scrolling. */
@media (min-width: 901px) and (min-aspect-ratio: 1/1) {
  .support-letter { padding-top: 1.2em; padding-bottom: 1.2em; }
  .support-lyric { font-size: 1.14em; margin-bottom: 0.45em; }
  .support-letter h2 { font-size: 2.35em; }
}
