/* Chispa inherits the live theme, including its hover previews and account settings. */
.chispa-help {
  --chispa-body: var(--accent-strong);
  --chispa-hands: color-mix(in srgb, var(--accent-strong) 28%, var(--surface));
  --chispa-face: var(--on-accent);
  --chispa-smile: var(--chispa-face);
  --chispa-rays: color-mix(in srgb, var(--accent-strong) 48%, var(--surface));
  position: fixed; inset: 0; z-index: 180; pointer-events: none;
  padding-right: env(safe-area-inset-right, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
  color: var(--text); font: 14px/1.55 Inter, system-ui, sans-serif; text-align: left;
}
html[data-theme="dark"] .chispa-help { --chispa-hands: color-mix(in srgb, var(--accent) 65%, var(--surface)); --chispa-smile: var(--on-accent); }
.chispa-help *, .chispa-help *::before, .chispa-help *::after { box-sizing: border-box; }
.chispa-help[hidden], .chispa-help [hidden] { display: none !important; }
.chispa-help button { min-height: 44px; max-width: 100%; font: inherit; line-height: 1.4; cursor: pointer; color: inherit; letter-spacing: normal; text-transform: none; }
.chispa-help button:focus-visible, .chispa-help h2:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 3px; }
.chispa-help button:hover { filter: none; }
.chispa-dock { position: fixed; pointer-events: none; }
.chispa-help .chispa-launcher, .chispa-help .chispa-recover { pointer-events: auto; }
.chispa-launcher { display: flex; flex-direction: column; align-items: center; justify-content: end; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 22px; background: transparent; box-shadow: none; touch-action: none; user-select: none; -webkit-user-select: none; }
.chispa-help .chispa-launcher { cursor: grab; }
.chispa-character { display: block; width: 100%; line-height: 0; animation: chispa-float 5.6s ease-in-out infinite; pointer-events: none; transform-origin: 50% 80%; }
.chispa-help .chispa-mascot { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 4px 6px color-mix(in srgb, var(--text) 12%, transparent)); }
.chispa-label { position: relative; z-index: 1; display: grid; place-items: center; min-width: 74px; min-height: 26px; padding: 3px 12px; border: 1px solid var(--accent-line); border-radius: 20px; background: linear-gradient(var(--surface),var(--surface-soft)); box-shadow: 0 4px 16px color-mix(in srgb,var(--accent-strong) 12%,transparent), inset 0 1px var(--surface); color: var(--text-soft); font-size: 11px; font-weight: 500; line-height: 1.5; white-space: nowrap; }
.chispa-moving-label { display: none; }
.public-offer-nav .chispa-menu-help { display: none; }
@media (max-width: 600px) { .public-offer-nav .chispa-menu-help { display: flex; border-top: 1px solid var(--line); color: var(--accent-strong); } }
.chispa-recover { width: 80px; min-height: 44px; border: 1px solid var(--accent-line); border-radius: 24px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.chispa-body { transform-origin: 80px 120px; transition: transform .55s cubic-bezier(.2,.8,.25,1.25), opacity .3s ease; }
.chispa-eyes { transform-origin: 77px 71.5px; animation: chispa-blink 7s infinite; }
.chispa-left-hand { transform-origin: 27px 100px; animation: chispa-wave 1.8s ease-in-out .5s 1; transition: transform .3s ease; }
.chispa-right-hand { transform-origin: 126px 98px; transition: transform .3s ease; }
.chispa-face-happy, .chispa-hand-point, .chispa-wave-rays { display: none; }
.chispa-help[data-greeting="true"] .chispa-face-idle,
.chispa-help[data-landing="true"] .chispa-face-idle { display: none; }
.chispa-help[data-greeting="true"] .chispa-face-happy,
.chispa-help[data-landing="true"] .chispa-face-happy,
.chispa-help[data-greeting="true"] .chispa-wave-rays { display: inline; }
.chispa-help[data-greeting="true"] .chispa-salute { opacity: 0; }
.chispa-help[data-tour="true"] .chispa-hand-rest { display: none; }
.chispa-help[data-tour="true"] .chispa-hand-point { display: inline; }
.chispa-ground, .chispa-salute { transition: opacity .3s ease; }
.chispa-help[data-open="true"] .chispa-right-hand { transform: translate(5px,-18px) rotate(18deg); }
.chispa-help[data-tour="true"] .chispa-left-hand { animation: none; transform: translate(-2px,2px) rotate(-10deg); }
.chispa-help[data-tour="true"] .chispa-right-hand { transform: translate(1px,-8px); }
.chispa-help[data-tour="true"] .chispa-salute { opacity: 0; }
.chispa-help[data-tour="true"] .chispa-body { transform: rotate(-5deg); }
.chispa-panel { position: fixed; pointer-events: auto; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; border: 1px solid var(--accent-line); border-radius: 21px; background: var(--surface); box-shadow: var(--shadow-strong); }
.chispa-header { display: flex; align-items: center; gap: 12px; padding: 14px 14px 12px 20px; border-bottom: 1px solid var(--line); }
.chispa-header > div { min-width: 0; flex: 1; }
.chispa-header .chispa-character { width: 38px; flex: 0 0 38px; animation: none; }
.chispa-header p { margin: 0 0 3px; color: var(--muted); font-size: 11px; }
.chispa-help h2 { margin: 0; color: var(--text); font: 600 18px/1.3 Inter, system-ui, sans-serif; letter-spacing: -.3px; }
.chispa-help .chispa-close { flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--surface-soft); color: var(--text); font-size: 25px; }
.chispa-content { padding: 16px 20px; }
.chispa-content p { margin: 0 0 14px; font-size: 14px; line-height: 1.55; color: var(--text-soft); }
.chispa-content .chispa-question { font-weight: 500; color: var(--text); }
.chispa-options { display: grid; gap: 8px; }
.chispa-content button { padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); text-align: left; }
.chispa-options button { display: flex; align-items: center; gap: 12px; min-height: 54px; }
.chispa-options button::after { content: '↗'; margin-left: auto; color: var(--accent-strong); }
.chispa-content button:hover { background: var(--accent-soft); border-color: var(--accent-line); }
.chispa-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; padding: 8px 12px; border-top: 1px solid var(--line); }
.chispa-settings button { padding: 8px 4px; border: 0; border-radius: 8px; background: transparent; font-size: 11px; color: var(--muted); }
.chispa-settings button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-strong); }
.chispa-settings button[aria-pressed="true"]::before { content: '• '; }
.chispa-content .chispa-move-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; text-align: center; }
.chispa-settings button:hover { background: var(--surface-soft); color: var(--text); }
.chispa-content .chispa-progress { color: var(--accent-strong); font-size: 11px; font-weight: 600; margin-bottom: 8px; }
.chispa-tour-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chispa-tour-nav button { flex: 1; text-align: center; }
.chispa-content .chispa-primary { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.chispa-content .chispa-primary:hover { background: var(--accent-strong); }
.chispa-tour-nav [data-chispa-action="exit"] { border-color: transparent; color: var(--muted); font-size: 12px; }
.chispa-faq { margin-bottom: 12px; }
.chispa-faq > div { border-bottom: 1px solid var(--line); }
.chispa-faq > div > button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; border: 0; padding: 12px 0; font-weight: 500; }
.chispa-faq > div > button span { color: var(--accent-strong); }
.chispa-faq [id^="chispa-answer-"] { padding: 4px 0 14px; }
.chispa-highlight { position: fixed; pointer-events: none; border: 2px solid var(--accent-strong); border-radius: 12px; box-shadow: 0 0 0 4px var(--accent-ring); }
.chispa-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Reference F: the larger mittens rest on the help tab when Chispa is tucked away. */
.chispa-help[data-resting="true"] .chispa-launcher .chispa-character { animation: none; }
/* Tucked-away mobile Chispa only intercepts taps on its visible help tab/hands. */
.chispa-help[data-anchored="true"][data-resting="true"] .chispa-launcher { position: absolute; bottom: 0; height: 44px; }
.chispa-help[data-anchored="true"][data-resting="true"] .chispa-launcher .chispa-character { position: absolute; bottom: 26px; }
.chispa-help[data-resting="true"] .chispa-launcher .chispa-body { transform: translateY(100px) scale(.7); opacity: 0; }
.chispa-help[data-resting="true"] .chispa-launcher .chispa-left-hand { animation: none; transform: translate(7px,49px) rotate(-8deg); }
.chispa-help[data-resting="true"] .chispa-launcher .chispa-right-hand { transform: translate(-5px,51px) rotate(8deg); }
.chispa-help[data-resting="true"] .chispa-launcher :is(.chispa-ground,.chispa-salute) { opacity: 0; }
.chispa-help[data-greeting="true"] .chispa-left-hand { transform: translate(-3px,-22px) rotate(-16deg); animation: chispa-hello 1.5s ease-in-out .4s 1; }
.chispa-help[data-dragging="true"] .chispa-launcher { cursor: grabbing; }
.chispa-help[data-dragging="true"] .chispa-character { animation: none; transform: translateY(-8px) rotate(var(--chispa-tilt,0deg)) scaleY(var(--chispa-stretch,1)); transition: transform 90ms ease-out; }
.chispa-help[data-dragging="true"] .chispa-left-hand { animation: none; transform: translate(-8px,-22px) rotate(-25deg); }
.chispa-help[data-dragging="true"] .chispa-right-hand { transform: translate(8px,-22px) rotate(25deg); }
.chispa-help[data-dragging="true"] .chispa-label { opacity: .9; transform: scale(.94); }
.chispa-help[data-dragging="true"] .chispa-idle-label { display: none; }
.chispa-help[data-dragging="true"] .chispa-moving-label { display: inline; }
.chispa-dock::before { content: ''; position: absolute; width: 65%; height: 12px; left: 17.5%; bottom: 29px; border-radius: 50%; background: var(--accent-strong); filter: blur(6px); opacity: 0; pointer-events: none; }
.chispa-help[data-dragging="true"] .chispa-dock::before { opacity: .17; }
.chispa-help[data-landing="true"] .chispa-launcher .chispa-character { animation: chispa-land .8s cubic-bezier(.2,.7,.3,1) 1; }
.chispa-sparks { position: absolute; inset: 0; pointer-events: none; }
.chispa-sparks i { position: absolute; left: 50%; bottom: 35px; width: 5px; height: 5px; border-radius: 1px; background: var(--accent-strong); opacity: 0; --dx: -40px; --dy: -22px; }
.chispa-sparks i:nth-child(2) { --dx: 42px; --dy: -26px; width: 4px; height: 4px; }
.chispa-sparks i:nth-child(3) { --dx: -26px; --dy: -52px; background: var(--chispa-hands); }
.chispa-sparks i:nth-child(4) { --dx: 26px; --dy: -56px; background: var(--chispa-hands); }
.chispa-help[data-landing="true"] .chispa-sparks i { animation: chispa-spark .65s ease-out 1; }
@keyframes chispa-land { 0% { transform: translateY(-8px) scale(.97,1.05); } 24% { transform: translateY(3px) scale(1.09,.89); } 52% { transform: translateY(-9px) scale(.98,1.04); } 76% { transform: translateY(1px) scale(1.02,.98); } 100% { transform: none; } }
@keyframes chispa-spark { 0% { opacity: 0; transform: translate(0,0) rotate(45deg) scale(.3); } 20% { opacity: .75; } 100% { opacity: 0; transform: translate(var(--dx),var(--dy)) rotate(135deg) scale(.2); } }
@keyframes chispa-hello { 0%,100% { transform: translate(-2px,-10px) rotate(-10deg); } 20%,60% { transform: translate(-3px,-28px) rotate(-25deg); } 40%,80% { transform: translate(-1px,-23px) rotate(8deg); } }
@keyframes chispa-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes chispa-blink { 0%,43%,47%,100% { transform: scaleY(1); } 45% { transform: scaleY(.1); } }
@keyframes chispa-wave { 0%,100% { transform: none; } 25%,65% { transform: translate(-3px,-15px) rotate(-20deg); } 45%,85% { transform: translate(-3px,-10px) rotate(8deg); } }
.chispa-help[data-paused="true"] *, html[data-reduce-motion="true"] .chispa-help * { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { .chispa-help * { animation: none !important; transition: none !important; } }
@media (max-width: 600px) { .chispa-content { padding: 12px 16px; } .chispa-header { padding: 10px 10px 10px 16px; } .chispa-help h2 { font-size: 16px; } }
