.ss-help-launcher, .ss-help-panel {
  box-sizing: border-box;
  color: #30253d;
  font: 14px/1.5 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.ss-help-launcher {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 10010;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: #664087;
  color: #fff;
  box-shadow: 0 5px 20px #28153930;
  padding: 11px 20px;
  font-weight: 650;
  cursor: pointer;
}
.ss-help-panel {
  --ss-help-keyboard: 0px;
  --ss-help-viewport: 100vh;
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: calc(76px + env(safe-area-inset-bottom) + var(--ss-help-keyboard));
  z-index: 10011;
  display: flex;
  flex-direction: column;
  width: min(380px, calc(100vw - 40px));
  height: 520px;
  max-height: calc(var(--ss-help-viewport) - 92px - env(safe-area-inset-bottom));
  border: 1px solid #e5ddeb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 45px #28153930;
  overflow: hidden;
  text-align: left;
}
.ss-help-panel [hidden], .ss-help-panel[hidden] { display: none !important; }
.ss-help-panel * { box-sizing: border-box; }
.ss-help-heading, .ss-help-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ss-help-heading {
  flex: none;
  padding: 8px 12px 8px 16px;
  background: #f6f1fa;
  border-bottom: 1px solid #e9e1ef;
}
.ss-help-heading h2 { margin: 0; color: inherit; font: 650 17px/1.4 system-ui, sans-serif; }
.ss-help-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #624775;
  font: 26px/1 system-ui, sans-serif;
  cursor: pointer;
}
.ss-help-close:hover { background: #ece2f3; }
.ss-help-content {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px 16px;
  overflow: auto;
  overscroll-behavior: contain;
}
.ss-help-prompt { margin: 0 0 10px; color: #30253d; font-size: 15px; font-weight: 650; }
.ss-help-suggestions, .ss-help-sources { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.ss-help-suggestions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ss-help-topic, .ss-help-retry {
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #e4d8ec;
  border-radius: 8px;
  background: #faf7fc;
  color: #553674;
  font: inherit;
  cursor: pointer;
}
.ss-help-panel .ss-help-topic { display: flex; align-items: center; width: 100%; text-align: left; text-decoration: none; }
.ss-help-topic:hover, .ss-help-retry:hover { background: #eee3f5; }
.ss-help-messages:not(:empty) { margin-top: 14px; }
.ss-help-turn { margin: 0 0 14px; }
.ss-help-message {
  margin: 0 0 8px;
  padding: 9px 11px;
  border-radius: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ss-help-question { background: #eee4f6; margin-left: 20px; }
.ss-help-answer { background: #f8f6fa; }
.ss-help-answer p { margin: 0; color: inherit; }
.ss-help-ai-label { display: block; margin-bottom: 4px; color: #59496a; font-size: 12px; font-weight: 650; }
.ss-help-sources { margin-top: 9px; }
.ss-help-panel a { color: #593779; text-decoration: underline; }
.ss-help-source { display: block; padding: 6px 8px; border-radius: 6px; background: #fff; }
.ss-help-retry { margin-top: 8px; }
.ss-help-composer { flex: none; padding: 10px 14px 6px; border-top: 1px solid #eee7f3; background: #fff; }
.ss-help-form { display: flex; align-items: flex-end; gap: 8px; margin: 0; }
.ss-help-form textarea {
  flex: 1;
  min-width: 0;
  resize: none;
  margin: 0;
  padding: 8px;
  border: 1px solid #c9bbd5;
  border-radius: 8px;
  background: #fff;
  color: #30253d;
  font: inherit;
  line-height: 1.4;
}
.ss-help-send {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 9px 12px;
  background: #664087;
  color: #fff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.ss-help-send:disabled { background: #eee8f3; color: #594b65; cursor: default; }
.ss-help-footer a { display: inline-flex; align-items: center; min-height: 32px; font-size: 12px; }
.ss-help-launcher:focus-visible, .ss-help-panel :is(button, textarea, a):focus-visible {
  outline: 3px solid #9165b3;
  outline-offset: 2px;
}
@media (max-width: 480px), (max-height: 550px) {
  .ss-help-panel {
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(68px + env(safe-area-inset-bottom) + var(--ss-help-keyboard));
    width: min(380px, calc(100vw - 24px));
    max-height: calc(var(--ss-help-viewport) - 80px - env(safe-area-inset-bottom));
  }
  .ss-help-launcher { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); }
  .ss-help-form textarea { font-size: 16px; }
}

.ss-help-panel[data-keyboard-open] {
  bottom: calc(8px + var(--ss-help-keyboard));
  max-height: calc(var(--ss-help-viewport) - 16px);
}
.ss-help-panel[data-keyboard-open] .ss-help-heading { padding-block: 3px; }
.ss-help-panel[data-keyboard-open] .ss-help-form textarea { max-height: 58px; }
/* Only rendered after the authenticated owned support form announces readiness. */
.ss-help-handoff { border:0; padding:0; margin-left:12px; background:transparent; color:inherit; font:inherit; cursor:pointer; text-decoration:underline; }
.ss-help-handoff:focus-visible { outline:2px solid #8654ad; outline-offset:3px; }
