body.agent-bifang-host .agent-step-details[open] > summary {
  display: none;
}

body.agent-bifang-host .agent-step-collapse {
  display: block;
  min-height: 44px;
  padding: 8px 4px;
  margin: 4px 0 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.agent-nav-sessions,
.agent-side-home {
  display: none;
}

body.agent-bifang-host #agent-chat-composer #btn-agent-chat-send:not(.is-stop):not(.is-stopping) {
  background: #2879ec;
  border-radius: 50%;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 10px;
  color: #fff;
}

.agent-send-arrow {
  display: block;
  width: 24px;
  height: 24px;
}

@media (max-width: 960px), (hover: none) and (pointer: coarse) {
  body.agent-bifang-host #btn-agent-side-open,
  body.agent-bifang-host.agent-side-open #btn-agent-side-open {
    display: none !important;
  }

  body.agent-bifang-host .agent-side-title,
  body.agent-bifang-host .agent-bifang-home-link {
    display: none;
  }

  .agent-side-home {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 8px;
    min-height: 40px;
    color: #19262d;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
  }

  .agent-side-brand-mark {
    width: 18px;
    height: 18px;
    border-radius: 2px;
    background: currentColor;
  }

  .agent-nav-sessions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    padding: 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #202124;
    font: inherit;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
  }

  .agent-nav-sessions:hover {
    background: rgba(0, 0, 0, 0.06);
  }

  .agent-nav-sessions[aria-expanded="true"] {
    visibility: hidden;
    pointer-events: none;
  }

  .agent-nav-sessions:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
  }

  body.agent-bifang-host #agent-layout #agent-chat-composer {
    width: calc(100% - 20px);
  }

  body.agent-bifang-host #agent-chat-composer .agent-inspire-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0;
    padding: 4px 6px 4px 12px;
    min-height: 54px;
    border-radius: 27px;
    background: #fff;
    box-shadow: 0 3px 14px rgba(30, 35, 42, 0.07);
  }

  body.agent-bifang-host #agent-chat-composer #agent-general-grid {
    grid-column: 1 / -1;
  }

  body.agent-bifang-host #agent-chat-composer #agent-general-grid:empty {
    display: none;
  }

  body.agent-bifang-host #agent-chat-composer #agent-chat-input {
    grid-column: 1;
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 11px 4px;
    font-size: 16px;
    line-height: 22px;
  }

  body.agent-bifang-host #agent-chat-composer #agent-chat-input:placeholder-shown {
    height: 44px !important;
  }

  body.agent-bifang-host #agent-chat-composer .agent-inspire-bar {
    grid-column: 2;
    align-self: center;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
  }

  body.agent-bifang-host #agent-chat-composer #btn-agent-voice,
  body.agent-bifang-host #agent-chat-composer #btn-agent-chat-upload,
  body.agent-bifang-host #agent-chat-composer .agent-generation-options > summary,
  body.agent-bifang-host #agent-chat-composer #btn-agent-chat-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 10px;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #282b30;
  }

  body.agent-bifang-host #agent-chat-composer #btn-agent-voice,
  body.agent-bifang-host #agent-chat-composer #btn-agent-chat-upload,
  body.agent-bifang-host #agent-chat-composer .agent-generation-options > summary {
    border: 1px solid rgba(40, 43, 48, 0.22);
  }

  body.agent-bifang-host #agent-chat-composer #btn-agent-voice svg {
    display: block;
    flex-shrink: 0;
  }

  body.agent-bifang-host #agent-chat-composer #btn-agent-voice {
    order: -1;
  }

  body.agent-bifang-host #btn-agent-chat-upload > *,
  body.agent-bifang-host #agent-chat-composer .agent-generation-options > summary > span {
    display: none;
  }

  body.agent-bifang-host #btn-agent-chat-upload::after {
    content: "+";
    font: 30px/24px Arial, sans-serif;
    font-weight: 300;
  }

  body.agent-bifang-host #agent-chat-composer #btn-agent-chat-send {
    color: #fff;
    background: #30343a;
  }

  body.agent-bifang-host #agent-chat-composer #btn-agent-chat-send:disabled {
    display: inline-flex;
  }
  body.agent-bifang-host #agent-chat-composer #btn-agent-chat-send.is-processing-locked {
    background: #b9bec6 !important;
    color: #fff !important;
    opacity: 1;
  }

  body.agent-bifang-host #agent-chat-composer .agent-inspire-card:has(#agent-chat-input:placeholder-shown):has(#agent-general-grid:empty) #btn-agent-chat-send,
  body.agent-bifang-host #agent-chat-composer.is-voice-mode #btn-agent-chat-send {
    display: none;
  }

  body.agent-bifang-host #agent-chat-composer #agent-voice-bar {
    grid-column: 1;
    min-width: 0;
    width: 100%;
    min-height: 44px;
    height: 44px;
    margin: 0;
    padding: 0 4px;
    border: 0;
    border-radius: 22px;
    background: transparent;
    color: #30343a;
  }

  body.agent-bifang-host #agent-chat-composer #agent-voice-bar .agent-voice-bar-text {
    font-size: 15px;
  }

  body.agent-bifang-host #agent-chat-composer #agent-voice-bar.is-recording,
  body.agent-bifang-host #agent-chat-composer #agent-voice-bar.is-cancel {
    position: relative;
    z-index: 2;
    grid-column: 1 / -1;
  }

  body.agent-bifang-host #agent-chat-composer.is-voice-recording .agent-inspire-bar {
    display: none;
  }

  body.agent-bifang-host #agent-chat-composer.is-voice-recording {
    position: relative;
    z-index: 4;
    --voice-glow-core: rgba(61, 143, 250, 0.9);
    --voice-glow-edge: rgba(122, 219, 250, 0.68);
    --voice-hint-color: #315c83;
    --voice-wave-color: #fff;
    isolation: isolate;
    overflow: visible;
    background: transparent !important;
  }

  body.agent-bifang-host #agent-chat-composer.is-voice-cancel {
    --voice-glow-core: rgba(254, 166, 169, 0.86);
    --voice-glow-edge: rgba(255, 215, 213, 0.8);
    --voice-hint-color: #a43842;
    --voice-wave-color: #d83a4a;
  }

  body.agent-bifang-host #agent-chat-composer.is-voice-recording::before {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
    inset: auto -6px -12px;
    height: 25vh;
    height: 25dvh;
    border-radius: 48% 48% 24px 24px;
    background:
      radial-gradient(ellipse at 38% 85%, var(--voice-glow-core), transparent 65%),
      radial-gradient(ellipse at 75% 90%, var(--voice-glow-edge), transparent 75%);
    filter: blur(16px);
  }

  body.agent-bifang-host #agent-chat-composer.is-voice-recording .agent-inspire-card {
    overflow: visible;
    background: transparent !important;
    border-color: transparent;
    box-shadow: none;
    animation: none;
  }

  body.agent-bifang-host #agent-chat-composer.is-voice-recording .agent-voice-bar-text {
    position: absolute;
    bottom: calc(100% + 32px);
    left: 0;
    width: 100%;
    color: var(--voice-hint-color);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
    white-space: nowrap;
    pointer-events: none;
  }

  body.agent-bifang-host #agent-chat-composer.is-voice-recording .agent-voice-wave {
    position: absolute;
    bottom: 20px;
    height: 46px;
    pointer-events: none;
    filter: none;
  }

  body.agent-bifang-host #agent-chat-composer.is-voice-recording .agent-voice-wave i {
    width: 3px;
    height: 12px;
    background: var(--voice-wave-color);
    animation-name: agentVoiceGlowWave;
  }

  @keyframes agentVoiceGlowWave {
    0%, 100% { transform: scaleY(0.55); opacity: 0.65; }
    50% { transform: scaleY(2.8); opacity: 1; }
  }

  body.agent-bifang-host #agent-chat-composer .agent-voice-wave {
    height: 32px;
    width: 100%;
    gap: 3px;
    justify-content: center;
    overflow: hidden;
  }
}
