.cw {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 80;
    font-family: var(--sans);
  }

  .cw-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 20px;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-family: var(--sans);
    font-size: .93rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 22px rgba(0, 52, 46, .28);
  }

  .cw-btn:hover {
    background: var(--brand-600);
  }

  .cw-panel {
    position: absolute;
    right: 0;
    bottom: 60px;
    width: min(390px, calc(100vw - 40px));
    height: min(570px, calc(100vh - 110px));
    min-height: 460px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: 0 18px 50px rgba(0, 40, 36, .2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .cw-panel[hidden] {
    display: none;
  }

  .cw-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    padding: 14px 16px;
    background: var(--brand);
    color: #fff;
  }

  .cw-head strong {
    display: block;
    font-size: .96rem;
  }

  .cw-head span {
    display: block;
    margin-top: 2px;
    font-size: .76rem;
    color: #B9D8D2;
  }

  .cw-head button {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.55rem;
    line-height: 1;
    cursor: pointer;
    padding: 3px 5px;
  }

  .cw-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
    background: #f8fbfa;
    scroll-behavior: smooth;
  }

  .cw-row {
    display: flex;
    margin-bottom: 11px;
  }

  .cw-row-user {
    justify-content: flex-end;
  }

  .cw-row-assistant {
    justify-content: flex-start;
  }

  /* Clear visual separation between question and answer. */
  .cw-row-user + .cw-row-assistant {
    margin-top: 6px;
  }

  /* Slightly larger separation before the next question. */
  .cw-row-assistant + .cw-row-user {
    margin-top: 10px;
  }

  .cw-bubble {
    max-width: 86%;
    padding: 10px 12px;
    border-radius: 14px;
    font-size: .88rem;
    line-height: 1.48;
    overflow-wrap: anywhere;
  }

  .cw-bubble-user {
    color: #fff;
    background: var(--brand);
    border-bottom-right-radius: 5px;
  }

  .cw-bubble-assistant {
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-bottom-left-radius: 5px;
  }

  .cw-line + .cw-line {
    margin-top: 6px;
  }

  .cw-list-line {
    display: flex;
    gap: 7px;
  }

  .cw-list-dot {
    flex: 0 0 auto;
  }

  .cw-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 5px 0 4px;
  }

  .cw-quick button {
    padding: 7px 10px;
    border: 1px solid #bed8d3;
    border-radius: 999px;
    background: #fff;
    color: var(--brand);
    font-family: var(--sans);
    font-size: .76rem;
    font-weight: 600;
    cursor: pointer;
  }

  .cw-quick button:hover {
    background: var(--brand-tint);
  }


  /* BIOTECH_RICH_ANSWER_PRESENTATION_V1 */

  .cw-bubble-assistant {
    max-width: 91%;
    padding: 13px 14px;
    line-height: 1.55;
    box-shadow: 0 4px 14px rgba(13, 55, 49, .045);
  }

  .cw-bubble-assistant strong {
    color: #124f47;
    font-weight: 700;
  }

  .cw-bubble-assistant em {
    color: #53635f;
    font-style: italic;
  }

  .cw-answer-content {
    display: block;
  }

  .cw-answer-paragraph {
    margin: 0;
    color: var(--ink);
    font-weight: 400;
  }

  .cw-answer-paragraph + .cw-answer-paragraph {
    margin-top: 9px;
  }

  .cw-answer-heading {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 14px 0 8px;
    color: var(--brand);
    font-size: .88rem;
    font-weight: 600;
    line-height: 1.4;
  }

  .cw-answer-heading:first-child {
    margin-top: 1px;
  }

  .cw-answer-heading-mark {
    flex: 0 0 auto;
    color: var(--brand);
    font-size: .72rem;
    line-height: 1.65;
  }

  .cw-answer-list {
    display: grid;
    gap: 7px;
    margin: 8px 0 10px;
    padding: 0;
    list-style: none;
  }

  .cw-answer-list:last-child {
    margin-bottom: 0;
  }

  .cw-answer-list-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 5px;
    align-items: start;
    margin: 0;
  }

  .cw-answer-list-icon {
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    border-radius: 50%;
    background: var(--brand-tint);
    color: var(--brand);
    font-size: .66rem;
    font-weight: 700;
    line-height: 1;
  }

  .cw-answer-number {
    min-width: 17px;
    height: 17px;
    margin-top: 1px;
    padding: 0 3px;
    border-radius: 5px;
    background: var(--brand-tint);
    color: var(--brand);
    font-size: .65rem;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
  }

  .cw-answer-divider {
    height: 1px;
    margin: 12px 0;
    border: 0;
    background: var(--line);
  }

  .cw-answer-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    padding-top: 7px;
    border-top: 1px solid rgba(21, 85, 76, .08);
  }

  .cw-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 7px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-family: var(--sans);
    font-size: .68rem;
    font-weight: 600;
    cursor: pointer;
  }

  .cw-copy-btn:hover {
    background: var(--brand-tint);
    color: var(--brand);
  }

  .cw-copy-icon {
    font-size: .76rem;
    line-height: 1;
  }

  .cw-typing {
    width: max-content;
    margin: 4px 0 10px;
    padding: 9px 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 13px;
  }

  .cw-typing span {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 2px;
    border-radius: 50%;
    background: var(--muted);
    animation: cwPulse 1.15s infinite ease-in-out;
  }

  .cw-typing span:nth-child(2) {
    animation-delay: .14s;
  }

  .cw-typing span:nth-child(3) {
    animation-delay: .28s;
  }

  @keyframes cwPulse {
    0%, 60%, 100% {
      opacity: .3;
      transform: translateY(0);
    }

    30% {
      opacity: 1;
      transform: translateY(-3px);
    }
  }

  .cw-compose {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex: 0 0 auto;
    padding: 11px 12px;
    background: #fff;
    border-top: 1px solid var(--line);
  }

  .cw-compose textarea {
    flex: 1;
    min-width: 0;
    max-height: 112px;
    resize: none;
    overflow-y: auto;
    padding: 10px 11px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: .87rem;
    line-height: 1.4;
  }

  .cw-compose textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(0, 91, 78, .08);
  }

  .cw-send {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 11px;
    background: var(--brand);
    color: #fff;
    cursor: pointer;
  }

  .cw-send:hover {
    background: var(--brand-600);
  }

  .cw-send:disabled,
  .cw-quick button:disabled,
  .cw-compose textarea:disabled {
    opacity: .55;
    cursor: not-allowed;
  }

  .cw-foot {
    flex: 0 0 auto;
    padding: 7px 12px 9px;
    background: #fff;
    color: var(--muted);
    text-align: center;
    font-size: .7rem;
  }

  .cw-foot a {
    color: var(--brand);
    font-weight: 600;
  }

  @media (max-width: 560px) {
    .cw {
      right: 14px;
      bottom: 14px;
    }

    .cw-btn span {
      display: none;
    }

    .cw-btn {
      padding: 14px;
    }

    .cw-panel {
      position: fixed;
      right: 10px;
      bottom: 76px;
      width: calc(100vw - 20px);
      height: min(620px, calc(100vh - 92px));
      min-height: 0;
    }
  }
