/* =========================================================
   ZAR HELP CARD — FLOATING / DRAGGABLE / MOBILE SAFE
   Desktop:
   - wrapper is the floating draggable root
   - collapsed by default to lightbulb
   - card does not reserve workspace space
   Mobile:
   - original right slide drawer behavior
========================================================= */

/* =========================================================
   BASE
========================================================= */

.zar-help-wrapper {
  position: relative;
}

.zar-help-card {
  width: 340px;
  max-width: calc(100vw - 40px);
  max-height: calc(100dvh - 357px);

  overflow-y: auto;
  overflow-x: hidden;

  border-radius: 16px;
  background: linear-gradient(180deg, #0e0f14, #17181e);
  border: 1px solid rgba(131,131,140,0.24);

  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 -1px 0 rgba(0,0,0,0.5) inset,
    0 8px 20px rgba(0,0,0,0.45),
    0 0 0 1px rgba(70,90,180,0.15);

  scrollbar-width: none;
}

.zar-help-card::-webkit-scrollbar {
  width: 6px;
}

.zar-help-card::-webkit-scrollbar-thumb {
  background: rgba(120,160,255,0.3);
  border-radius: 10px;
}

/* Never reserve workspace/chat space */
.sanity-ai-workspace {
  padding-right: 0 !important;
}

/* =========================================================
   TITLE
========================================================= */

.zar-help-title {
  position: sticky;
  top: 0;
  z-index: 5;

  display: flex;
  align-items: center;
  gap: 0.5rem;

  padding: 12px 16px;

  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;

  color: #cfe1ff;
  background: linear-gradient(180deg, #1a1d33, #191c2f);

  border-radius: 16px 16px 0 0;

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.zar-help-title-text {
  flex: 1 1 auto;
}

.zar-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9db4ff;
}

/* =========================================================
   DESKTOP CLOSE / LAUNCHER
========================================================= */

.zar-help-desktop-collapse,
.zar-help-desktop-launcher {
  display: none;
}

.zar-help-desktop-collapse {
  place-items: center;

  width: 28px;
  height: 28px;
  margin-left: auto;

  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: #cfe1ff;

  cursor: pointer;
  font-size: 18px;
  line-height: 1;

  transition:
    background-color 160ms ease,
    transform 160ms ease,
    border-color 160ms ease;
}

.zar-help-desktop-collapse:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(157,180,255,0.35);
  transform: scale(1.04);
}

/* =========================================================
   CONTENT
========================================================= */

.zar-help-grid {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
}

.zar-help-section {
  width: 100%;
  min-width: 160px;
}

.zar-help-section-title {
  display: flex;
  align-items: center;
  gap: 6px;

  padding: 10px;

  font-size: 1rem;

  background: linear-gradient(45deg, rgba(52,52,52,0.4), transparent);
}

hr.zar-helpcard-separator {
  margin: 0;
  width: 100%;
  background: linear-gradient(45deg, rgba(61,61,61,0.8), transparent);
}

.zar-help-section ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;

  list-style: none;

  margin: 0.4rem 0.2rem;
  padding: 0;
}

.zar-help-section li {
  display: flex;
  flex-direction: row;

  background: #191c30;

  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;

  padding: 0.1rem 0.3rem;
  border-radius: 8px;

  cursor: pointer;
  opacity: 0.7;
  touch-action: manipulation;

  transition: all 0.2s ease;
}

.zar-help-section li:hover {
  background: linear-gradient(
    90deg,
    rgba(120,160,255,0.2),
    rgba(80,120,255,0.1)
  );

  transform: translateX(3px);
  opacity: 1;
}

.zar-help-section li.active {
  background: rgb(37,40,56);
  box-shadow: 0 0 5px rgba(120,160,255,0.2);
}

button.zar-help-expand.zar-help-expand--r-functions {
  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 -1px 0 rgba(0,0,0,0.5) inset,
    0 10px 30px rgba(0,0,0,0.6),
    0 0 0 1px rgba(70,90,180,0.15);

  border: 1px solid rgba(131,131,140,0.25);
  cursor: pointer;
  color: #8d91ac;
  font-size: 0.9rem;
  border-radius: 44px;
  background: rgba(120,140,255,0.25);
}

/* =========================================================
   DESKTOP FLOATING DRAG ROOT
========================================================= */
:root {
  --nav-height_new: 62px;
}
@media (min-width: 769px) {
  .zar-help-wrapper {
    --zar-help-drag-x: 0px;
    --zar-help-drag-y: 0px;

    position: fixed !important;
    /* Start inside the workspace, below nav/header area */
    top: calc(var(--nav-height_new, 0px) + 0px);
    right: 25px;
    z-index: 99990;

    width: 340px;
    max-width: calc(100vw - 40px);

    pointer-events: none;

    transform:
      translate(var(--zar-help-drag-x), var(--zar-help-drag-y));

   /*  contain: layout paint; */
    will-change: transform;
  }

  .zar-help-wrapper > * {
    pointer-events: auto;
  }

  .zar-help-card {
    position: relative !important;

    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;

    width: 100%;
/*     max-height: calc(100dvh - 120px); */

    transform: none !important;
  }

  .zar-help-desktop-collapse {
    display: inline-grid;
  }

  .zar-help-desktop-launcher {
    position: relative !important;

    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;

    width: 54px;
    height: 54px;

    place-items: center;

    border-radius: 999px;
    border: 1px solid rgba(131,131,140,0.24);

    background: linear-gradient(180deg, #1a1d33, #191c2f);
    color: #9db4ff;

  /*   cursor: grab; */

/*     box-shadow:
      0 1px 0 rgba(255,255,255,0.05) inset,
      0 -1px 0 rgba(0,0,0,0.5) inset,
      0 8px 20px rgba(0,0,0,0.45),
      0 0 0 1px rgba(70,90,180,0.15); */
  }

  .zar-help-wrapper.is-desktop-collapsed {
    width: 54px;
    height: 54px;
  }

  .zar-help-wrapper.is-desktop-collapsed .zar-help-card {
    display: none;
  }

  .zar-help-wrapper.is-desktop-collapsed .zar-help-desktop-launcher {
    display: grid;
  }

  .zar-help-wrapper:not(.is-desktop-collapsed) .zar-help-desktop-launcher {
    display: none;
  }

  .zar-help-drag-handle {
    /* cursor: grab; */
    touch-action: none;
    user-select: none;
  }

  .zar-help-wrapper.is-dragging,
  .zar-help-wrapper.is-dragging .zar-help-drag-handle {
    /* cursor: grabbing; */
    transition: none !important;
  }
}

/* =========================================================
   DESKTOP DRAG PERIMETER
========================================================= */

@media (min-width: 769px) {
  .zar-help-wrapper .zar-help-drag-perimeter {
    position: absolute !important;
    inset: 0 !important;

    width: auto !important;
    height: auto !important;

    display: block !important;
    box-sizing: border-box !important;

    pointer-events: none;
    z-index: 60;

    overflow: visible !important;
    transform: none !important;
  }

  .zar-help-wrapper .zar-help-drag-perimeter__edge {
    position: absolute !important;
    pointer-events: auto;
    touch-action: none;
    background: transparent !important;
  }

  .zar-help-wrapper .zar-help-drag-perimeter__edge--top {
    top: 0;
    left: 0;
    right: 0;
    height: 12px;
  }

  .zar-help-wrapper .zar-help-drag-perimeter__edge--right {
    top: 0;
    right: 0;
    bottom: 0;
    width: 12px;
  }

  .zar-help-wrapper .zar-help-drag-perimeter__edge--bottom {
    left: 0;
    right: 0;
    bottom: 0;
    height: 12px;
  }

  .zar-help-wrapper .zar-help-drag-perimeter__edge--left {
    top: 0;
    left: 0;
    bottom: 0;
    width: 12px;
  }
}

/* =========================================================
   MOBILE DRAWER
   Keeps original mobile behavior.
========================================================= */

button.zar-help-toggle {
  display: none;
}

@media (max-width: 768px) {
  .zar-help-wrapper {
    position: fixed !important;

    top: 0;
    right: 0;

    height: 100%;
    width: auto;

    z-index: 9999;

    display: flex;
    align-items: center;

    pointer-events: none;

    transform: none !important;
    contain: none !important;
  }

  .zar-help-toggle {
    display: flex !important;

    position: relative;

    width: 40px;
    height: 80px;

    align-items: center;
    justify-content: center;

    writing-mode: vertical-rl;
    text-orientation: mixed;

    font-size: 16px;
    color: #fff;

    border: none;
    border-radius: 8px 0 0 8px;

    cursor: pointer;

    background: linear-gradient(180deg, #191c2f52, #191c2f1a);

    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    box-shadow: -2px 0 8px rgba(0,0,0,0.3);

    pointer-events: auto;
  }

  .zar-help-card {
      position: fixed !important;
      /* top: 65px !important; */
      right: 0 !important;
      /* bottom: auto !important; */
      left: auto !important;
      width: 85vw;
      max-width: 340px;
      max-height: calc(100dvh - 65px);
      border-radius: 10px 0 0 10px !important;
      transform: translateX(100%) !important;
      transition: transform 0.3s ease;
      box-shadow: -4px 0 20px rgba(0,0,0,0.4);
      pointer-events: auto;
      will-change: transform;
  }

  .zar-help-wrapper.open .zar-help-card {
    transform: translateX(0) !important;
  }

  .zar-help-wrapper.open .zar-help-toggle {
    background: #222;
  }

  .zar-help-title {
    position: sticky;
    top: 0;

    justify-content: flex-start;

    font-size: 0.9rem;
    letter-spacing: 0.08em;

    border-radius: 0;

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  .zar-help-title-text {
    flex: 1 1 auto;
    min-width: 0;
  }
  .zar-help-desktop-collapse {
    display: inline-grid !important;
    place-items: center;

    flex: 0 0 auto;

    width: 30px;
    height: 30px;
    margin-left: auto;

    border-radius: 999px;
  }  
  .zar-help-desktop-launcher,
  .zar-help-drag-perimeter {
    display: none !important;
  }
  .zar-help-desktop-collapse {
    display: inline-grid !important;
  }
  .sanity-ai-workspace {
    padding-right: 0 !important;
  }
}

/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {
  .zar-help-card {
    width: 90vw;
  }

  .zar-help-section li {
    font-size: 0.85rem;
  }
}
.zar-help-wrapper.is-zar-help-hidden,
.zar-help-wrapper[hidden] {
  display: none !important;
}
/* =========================================================
   ZAR HELP — MOBILE RIGHT EDGE OPENER OVERRIDE
   Safe patch: overrides old full-height right rail behavior
========================================================= */

@media (max-width: 768px) {
  /*
    Neutralize the old mobile wrapper rail:
    old CSS made this a full-height flex column at the right edge.
  */
  .zar-help-wrapper {
    position: fixed !important;
    inset: 0 !important;

    width: 100vw !important;
    height: 100dvh !important;

    z-index: 9999;
    pointer-events: none;

    transform: none !important;
    contain: none !important;
  }

  .zar-help-toggle {
    display: inline-flex !important;
    position: fixed !important;

  /*   top: 50dvh !important; */
    right: 0 !important;

    transform: translateY(-50%) !important;

    width: 40px !important;
    height: 55px !important;

    align-items: center !important;
    justify-content: center !important;

    z-index: 10000;
    pointer-events: auto;
  }

  .zar-help-card {
    position: fixed !important;

    top: 0px;
    right: 0 !important;

    width: min(340px, 88vw) !important;
    max-height: calc(100dvh - var(--nav-height, 56px)) !important;

    transform: translateX(105%) !important;
    pointer-events: auto;
  }

  .zar-help-wrapper.open .zar-help-card {
    transform: translateX(0) !important;
  }
  .zar-help-toggle svg {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 auto;
  }

  /*
    Keep the drawer as an overlay, not layout space.
  */
  
.zar-help-card {
    position: fixed !important;
    /* top: var(--nav-height, 56px) !important; */
    right: 0 !important;
    bottom: auto !important;
    left: auto !important;
    width: min(340px, 88vw) !important;
    max-width: min(340px, 88vw) !important;
    max-height: calc(100dvh - var(--nav-height, 56px)) !important;
    transform: translateX(105%) !important;
    transition: transform 0.3s ease !important;
    pointer-events: auto;
    border-radius: 16px 0 0 16px !important;
    box-shadow: -4px 0 22px rgba(0, 0, 0, 0.42) !important;
}

  /*
    Open state.
  */
  .zar-help-wrapper.open .zar-help-card {
    transform: translateX(0) !important;
  }

  /*
    Hide opener while the drawer is open.
  */
  .zar-help-wrapper.open .zar-help-toggle {
    opacity: 0;
    pointer-events: none;
  }

  .zar-help-desktop-launcher,
  .zar-help-drag-perimeter {
    display: none !important;
  }
}

/* =========================================================
   OTHER ZAR STYLES OVERRIDE
   Safe patch: overrides old styles that interfere with the help card (e.g. padding on workspace, old mobile drawer behavior)
========================================================= */

/* =========================================================
   ZAR HELP CARD — PORTAL SYSTEM SKIN OVERRIDE
   Safe patch:
   - keeps draggable/mobile mechanics intact
   - upgrades surface, contrast, typography, and card identity
   - place at very bottom of zar help card CSS
========================================================= */

:root {
  --zar-help-bg-0: #05070d;
  --zar-help-bg-1: #080d19;
  --zar-help-bg-2: #10182b;
  --zar-help-bg-3: #18223a;

  --zar-help-line-soft: rgba(132, 160, 255, 0.14);
  --zar-help-line-mid: rgba(132, 160, 255, 0.24);
  --zar-help-line-focus: rgba(127, 181, 255, 0.38);

  --zar-help-text: rgba(238, 244, 255, 0.94);
  --zar-help-muted: rgba(194, 205, 236, 0.68);
  --zar-help-dim: rgba(160, 174, 214, 0.52);

  --zar-help-blue: #7fb5ff;
  --zar-help-violet: #8b7cff;
  --zar-help-green: #8fd4bd;
}

/* =========================================================
   CARD SURFACE
========================================================= */

.zar-help-card {
  background:
    radial-gradient(circle at 18% 0%, rgba(92, 128, 255, 0.12), transparent 38%),
    radial-gradient(circle at 86% 8%, rgba(143, 212, 189, 0.045), transparent 30%),
    linear-gradient(180deg, rgba(12, 17, 31, 0.985), rgba(5, 8, 17, 0.99));

  border-color: var(--zar-help-line-soft);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    inset 0 -1px 0 rgba(0, 0, 0, 0.58),
    0 18px 48px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(92, 128, 255, 0.07),
    0 0 34px rgba(92, 128, 255, 0.08);

  color: var(--zar-help-text);
  scrollbar-width: thin;
  scrollbar-color: rgba(127, 181, 255, 0.24) transparent;
}

.zar-help-card::-webkit-scrollbar {
  width: 7px;
}

.zar-help-card::-webkit-scrollbar-track {
  background: transparent;
}

.zar-help-card::-webkit-scrollbar-thumb {
  background:
    linear-gradient(180deg, rgba(127, 181, 255, 0.34), rgba(139, 124, 255, 0.22));
  border-radius: 999px;
}

/* Desktop-only subtle width polish */
@media (min-width: 769px) {
  .zar-help-wrapper {
    width: 300px;
    max-width: calc(100vw - 44px);
  }

  .zar-help-card {
    width: 100%;
    border-radius: 18px;
  }
}

/* =========================================================
   HEADER
========================================================= */

.zar-help-title {
  color: var(--zar-help-text);

  background:
    radial-gradient(circle at 18% 0%, rgba(127, 181, 255, 0.16), transparent 56%),
    linear-gradient(180deg, rgba(28, 36, 66, 0.94), rgba(17, 24, 45, 0.94));

  border-bottom: 1px solid rgba(132, 160, 255, 0.13);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 12px 28px rgba(0, 0, 0, 0.18);

  letter-spacing: 0.07em;
}

.zar-help-title-text {
  color: var(--zar-help-text);
}

.zar-help-icon {
  color: var(--zar-help-blue);
  filter:
    drop-shadow(0 0 8px rgba(127, 181, 255, 0.34))
    drop-shadow(0 0 14px rgba(139, 124, 255, 0.18));
}

/* =========================================================
   CLOSE / LAUNCHER
========================================================= */

.zar-help-desktop-collapse {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
  border-color: rgba(132, 160, 255, 0.18);
  color: rgba(226, 235, 255, 0.86);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 8px 20px rgba(0, 0, 0, 0.18);
}

.zar-help-desktop-collapse:hover {
  background:
    radial-gradient(circle at 50% 0%, rgba(127, 181, 255, 0.14), transparent 70%),
    rgba(112, 138, 255, 0.10);
  border-color: var(--zar-help-line-focus);
  color: #ffffff;
}

.zar-help-desktop-launcher {
  background:
    radial-gradient(circle at 50% 18%, rgba(127, 181, 255, 0.18), transparent 64%),
    linear-gradient(180deg, rgba(26, 36, 68, 0.96), rgba(8, 12, 24, 0.96)) !important;

  border-color: rgba(132, 160, 255, 0.22) !important;
  color: var(--zar-help-blue) !important;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 30px rgba(0, 0, 0, 0.34),
    0 0 28px rgba(92, 128, 255, 0.14) !important;
}

.zar-help-desktop-launcher:hover {
  color: #ffffff !important;
  border-color: rgba(143, 181, 255, 0.44) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 14px 34px rgba(0, 0, 0, 0.38),
    0 0 34px rgba(92, 128, 255, 0.2) !important;
}

/* =========================================================
   SECTION TITLES
========================================================= */

.zar-help-section-title {
  color: rgba(232, 239, 255, 0.9);

  background:
    linear-gradient(90deg, rgba(127, 181, 255, 0.08), transparent 72%);

  border-top: 1px solid rgba(132, 160, 255, 0.08);
  border-bottom: 1px solid rgba(132, 160, 255, 0.08);

  font-weight: 600;
}

.zar-help-section-title svg,
.zar-help-section-title i {
  color: var(--zar-help-blue);
}

hr.zar-helpcard-separator {
  border: 0;
  height: 1px;
  background:
    linear-gradient(90deg, rgba(127, 181, 255, 0.24), rgba(255, 255, 255, 0.08), transparent);
}

/* =========================================================
   PROMPT CHIPS
========================================================= */

.zar-help-section li {
  background:
    linear-gradient(180deg, rgba(22, 31, 55, 0.92), rgba(14, 20, 38, 0.92));

  border: 1px solid rgba(132, 160, 255, 0.10);

  color: rgba(218, 226, 252, 0.74);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035);

  opacity: 1;
}

.zar-help-section li:hover {
  background:
    radial-gradient(circle at 12% 0%, rgba(127, 181, 255, 0.16), transparent 70%),
    linear-gradient(180deg, rgba(35, 49, 88, 0.95), rgba(18, 27, 52, 0.95));

  border-color: rgba(132, 160, 255, 0.28);

  color: #ffffff;

  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);

  transform: translateY(-1px);
}

.zar-help-section li.active {
  background:
    radial-gradient(circle at 14% 0%, rgba(143, 212, 189, 0.14), transparent 68%),
    rgba(32, 48, 82, 0.9);

  border-color: rgba(143, 212, 189, 0.28);

  color: rgba(240, 255, 249, 0.96);

  box-shadow:
    0 0 0 1px rgba(143, 212, 189, 0.08),
    0 0 18px rgba(143, 212, 189, 0.12);
}

/* =========================================================
   EXPAND BUTTONS / SECONDARY ACTIONS
========================================================= */

button.zar-help-expand.zar-help-expand--r-functions {
  color: rgba(214, 224, 255, 0.78);

  background:
    linear-gradient(180deg, rgba(112, 138, 255, 0.16), rgba(112, 138, 255, 0.08));

  border-color: rgba(132, 160, 255, 0.22);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 10px 24px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(92, 128, 255, 0.05);
}

button.zar-help-expand.zar-help-expand--r-functions:hover {
  color: #ffffff;
  background:
    radial-gradient(circle at 50% 0%, rgba(127, 181, 255, 0.16), transparent 70%),
    rgba(112, 138, 255, 0.16);
  border-color: rgba(132, 160, 255, 0.34);
}

/* =========================================================
   MOBILE STYLE ONLY — keep mechanics unchanged
========================================================= */

@media (max-width: 768px) {
  .zar-help-toggle {
    color: rgba(226, 235, 255, 0.9) !important;

    background:
      radial-gradient(circle at 50% 18%, rgba(127, 181, 255, 0.16), transparent 64%),
      linear-gradient(180deg, rgba(26, 36, 68, 0.74), rgba(8, 12, 24, 0.72)) !important;

    border: 1px solid rgba(132, 160, 255, 0.18) !important;

    box-shadow:
      -4px 0 18px rgba(0, 0, 0, 0.26),
      0 0 24px rgba(92, 128, 255, 0.10) !important;
  }

  .zar-help-card {
    background:
      radial-gradient(circle at 18% 0%, rgba(92, 128, 255, 0.12), transparent 38%),
      linear-gradient(180deg, rgba(12, 17, 31, 0.985), rgba(5, 8, 17, 0.99)) !important;

    border-color: rgba(132, 160, 255, 0.16) !important;
  }

  .zar-help-title {
    background:
      radial-gradient(circle at 18% 0%, rgba(127, 181, 255, 0.14), transparent 56%),
      linear-gradient(180deg, rgba(28, 36, 66, 0.96), rgba(17, 24, 45, 0.96)) !important;
  }
}

/* =========================================================
   GLOBAL ZAR HELP — SAFE BUBBLE POP
   Does NOT animate .zar-help-wrapper transform,
   so draggable positioning remains untouched.
========================================================= */

/* Hidden/loading state: wrapper stays mounted for draggable logic */
body:not(.zar-global-launcher-ready) .zar-help-wrapper,
.zar-help-wrapper.is-zar-global-loading,
.zar-help-wrapper.is-zar-help-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Visible state */
body.zar-global-launcher-ready .zar-help-wrapper.is-zar-help-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Animate only the clickable bubble/launcher, not the draggable wrapper */
.zar-help-wrapper.is-zar-help-visible .zar-help-toggle,
.zar-help-wrapper.is-zar-help-visible .zar-help-desktop-launcher {
  animation: zar-help-bubble-pop-safe 420ms cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
  will-change: transform, opacity;
}

/* Optional: soft pop for the opened card itself */
.zar-help-wrapper.is-zar-help-visible.open .zar-help-card,
.zar-help-wrapper.is-zar-help-visible:not(.is-desktop-collapsed) .zar-help-card {
  animation: zar-help-card-pop-safe 360ms cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top right;
  will-change: transform, opacity;
}

@keyframes zar-help-bubble-pop-safe {
  0% {
    opacity: 0;
    transform: scale(0.62);
  }

  55% {
    opacity: 1;
    transform: scale(1.12);
  }

  78% {
    transform: scale(0.96);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes zar-help-card-pop-safe {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }

  70% {
    opacity: 1;
    transform: scale(1.025);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}