.frac-help-launch:not([hidden]) {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-inline-start: 12px;
}

.frac-help-launch[hidden] { display: none; }
.frac-help-launch img { object-fit: contain; }

.frac-help-portrait {
  position: fixed;
  right: 24px;
  bottom: 16px;
  z-index: 1040;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.frac-help-portrait.is-dragging { cursor: grabbing; }
.frac-help-portrait[hidden] { display: none; }
.frac-help-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom;
  pointer-events: none;
}

@media (max-width: 800px) {
  .frac-help-portrait { bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
}

.frac-tony.frac-help-chat {
  --frac-help-bottom: 16px;
  display: none;
  inset: auto 24px var(--frac-help-bottom) auto;
  margin: 0;
  padding: 0;
  border: 0;
  max-width: none;
  max-height: none;
  overflow: visible;
  background: transparent;
}

.frac-tony.frac-help-chat:is([open], :popover-open) { display: flex; }
.frac-help-chat .frac-tony-bubble {
  display: flex;
  flex-direction: column;
  max-height: min(670px, calc(100dvh - 194px));
  margin-bottom: 14px;
  overscroll-behavior: contain;
}

.frac-help-chat .frac-tony-bubble > :not(.frac-help-chat-content) { flex: none; }
.frac-help-chat-content { min-height: 0; overflow-y: auto; }
.frac-help-chat .frac-tony-heading { gap: 8px; }
.frac-help-chat .frac-tony-heading h2 { font: 700 1.4rem Georgia, serif; margin: 0; }
.frac-help-chat-actions { display: flex; gap: 4px; }
.frac-help-chat .frac-tony-heading button { min-width: 40px; min-height: 40px; }
.frac-help-chat .frac-tony-messages { max-height: min(35dvh, 310px); overscroll-behavior: auto; }
.frac-help-chat .frac-tony-message { padding: 8px 10px; }
.frac-help-chat .frac-tony-message--user { background: #fff; overflow-wrap: anywhere; }
.frac-help-chat .frac-tony-head, .frac-help-portrait { width: 172px; height: 165px; }
.frac-help-chat .frac-tony-head { pointer-events: none; }
.frac-help-chat .frac-tony-questions button { min-height: 36px; }
.frac-help-chat .frac-help-choices { max-height: min(22dvh, 165px); overflow: auto; }
.frac-help-chat .frac-help-choices button { width: 100%; text-align: left; white-space: normal; }
.frac-help-chat .frac-help-status { margin: 0 0 6px; }
.frac-help-chat textarea { font-size: 16px; }
.frac-help-chat form button[aria-disabled='true'],
.frac-help-chat button[aria-disabled='true'] { opacity: .65; }
.frac-help-chat-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.frac-help-chat-footer button { background: transparent; border: 0; padding: 5px; color: var(--frac-navy); white-space: nowrap; }

@media (max-width: 800px) {
  .frac-tony.frac-help-chat { --frac-help-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 700px) {
  .frac-tony.frac-help-chat { right: 12px; width: calc(100% - 24px); }
  .frac-help-chat .frac-tony-bubble { max-height: min(570px, calc(100dvh - 175px)); }
  .frac-help-chat .frac-tony-head, .frac-help-portrait { width: 124px; height: 90px; }
  .frac-help-portrait { right: 12px; }
  .frac-help-chat .frac-tony-bubble::after { right: 50px; }
}

@media (max-height: 500px) {
  .frac-help-chat .frac-tony-bubble { max-height: calc(100dvh - var(--frac-help-bottom) - 24px); }
  .frac-help-chat .frac-tony-head, .frac-help-chat .frac-tony-bubble::after { display: none; }
  .frac-help-portrait { width: 76px; height: 72px; }
}

.frac-tony.frac-help-chat.is-viewport-constrained {
  bottom: calc(var(--frac-help-viewport-inset) + 8px);
}

.frac-help-chat.is-viewport-constrained .frac-tony-bubble {
  max-height: min(670px, calc(var(--frac-help-viewport-height) - 16px));
  margin-bottom: 0;
  padding-block: 8px;
}

.frac-help-chat.is-viewport-constrained .frac-tony-head,
.frac-help-chat.is-viewport-constrained .frac-tony-bubble::after { display: none; }
