.claude-symbol-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

html[data-site="juhua"] .message.assistant .claude-message-avatar,
html[data-site="sunflower"] .message.assistant .claude-message-avatar {
  color: #d97757;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.claude-message-avatar svg {
  width: 28px;
  height: 28px;
  display: block;
  fill: currentColor;
}

.claude-thinking-summary {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 20px 0;
  padding: 0;
  color: var(--claude-secondary, #5e5d59);
  background: transparent;
  border: 0;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 22px;
  text-align: left;
  cursor: pointer;
}

.claude-thinking-summary[hidden] {
  display: none;
}

.claude-thinking-clock {
  width: 22px;
  height: 22px;
  flex: none;
}

.claude-thinking-summary-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.claude-thinking-spacer {
  flex: 1;
}

.claude-thinking-chevron {
  width: 16px;
  height: 16px;
  flex: none;
  opacity: 0.62;
}

.claude-thinking-summary.is-live .claude-thinking-clock {
  animation: claude-clock-pulse 1.25s ease-in-out infinite;
}

.claude-trail-logo {
  width: 26px;
  height: 26px;
  position: relative;
  overflow: hidden;
  display: block;
  margin: 13px 0 0;
  color: #d97757;
}

.claude-logo-inner {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: block;
}

.claude-logo-track {
  width: 100%;
  display: block;
  will-change: transform;
}

.claude-logo-track svg {
  width: 100%;
  height: auto;
  display: block;
  fill: currentColor;
}

@keyframes claude-clock-pulse {
  0%, 100% { opacity: 0.52; }
  50% { opacity: 1; }
}

.claude-thinking-dialog {
  width: min(640px, calc(100vw - 32px));
  max-width: none;
  max-height: min(720px, calc(100dvh - 48px));
  margin: auto;
  padding: 0;
  color: var(--claude-foreground, #141413);
  background: var(--claude-surface, #faf9f5);
  border: 1px solid var(--claude-border, rgba(20, 20, 19, 0.12));
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(20, 20, 19, 0.2);
}

.claude-thinking-dialog::backdrop {
  background: rgba(20, 20, 19, 0.24);
}

.claude-thinking-sheet {
  display: flex;
  max-height: inherit;
  flex-direction: column;
}

.claude-thinking-handle {
  display: none;
}

.claude-thinking-sheet header {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  padding: 14px 16px 8px;
}

.claude-thinking-sheet h2 {
  margin: 0;
  font: 500 17px/1.4 var(--sans);
  text-align: center;
}

.claude-thinking-close {
  width: 36px;
  height: 36px;
  color: inherit;
  background: var(--claude-surface, #faf9f5);
  border: 1px solid var(--claude-border, rgba(20, 20, 19, 0.12));
  border-radius: 10px;
  box-shadow: 0 5px 18px rgba(20, 20, 19, 0.08);
  font: 300 23px/1 var(--sans);
  cursor: pointer;
}

.claude-thinking-content {
  min-width: 0;
  overflow: auto;
  padding: 20px 28px 34px;
  color: var(--claude-foreground, #141413);
  font: 17px/1.58 var(--serif);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 720px) {
  .claude-thinking-dialog {
    position: fixed;
    top: var(--mobile-viewport-top, 0px);
    right: auto;
    bottom: auto;
    left: var(--mobile-viewport-left, 0px);
    width: var(--mobile-viewport-width, 100vw);
    height: var(--mobile-viewport-height, 100dvh);
    max-width: none;
    max-height: none;
    margin: 0;
    overflow: hidden;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  html.mobile-standalone:not(.mobile-keyboard-open) .claude-thinking-dialog {
    top: 0;
    height: 100vh;
  }

  .claude-thinking-dialog {
    --claude-thinking-expanded-top: 59px;
  }

  .claude-thinking-dialog::backdrop {
    background: rgba(20, 20, 19, 0.28);
  }

  .claude-thinking-sheet {
    position: absolute;
    right: 8px;
    bottom: 0;
    left: 8px;
    height: 53%;
    max-height: none;
    overflow: hidden;
    background: var(--claude-surface, #faf9f5);
    border: 1px solid var(--claude-border, rgba(20, 20, 19, 0.12));
    border-radius: 36px 36px 0 0;
    box-shadow: 0 -14px 42px rgba(20, 20, 19, 0.16);
    opacity: 0;
    transform: translate3d(0, 12px, 0);
    transition:
      transform 220ms cubic-bezier(.22, 1, .36, 1),
      height 300ms cubic-bezier(.2, .8, .2, 1),
      opacity 180ms ease-out;
    will-change: transform, height, opacity;
  }

  .claude-thinking-dialog.is-open .claude-thinking-sheet {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  .claude-thinking-dialog.is-expanded .claude-thinking-sheet {
    height: calc(100% - var(--claude-thinking-expanded-top));
  }

  .claude-thinking-dialog.is-dragging .claude-thinking-sheet {
    transition: none;
  }

  .claude-thinking-handle {
    position: relative;
    z-index: 2;
    width: 120px;
    height: 28px;
    display: block;
    margin: 0 auto -15px;
    background: transparent;
    cursor: ns-resize;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
  }

  .claude-thinking-handle::before {
    position: absolute;
    top: 7px;
    left: 50%;
    width: 32px;
    height: 4px;
    content: "";
    background: var(--claude-border-strong, rgba(20, 20, 19, 0.2));
    border-radius: 3px;
    transform: translateX(-50%);
  }

  .claude-thinking-sheet header {
    grid-template-columns: 32px 1fr 32px;
    padding: 3px 12px 7px;
    cursor: ns-resize;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
  }

  .claude-thinking-sheet h2 {
    font-size: 16px;
  }

  .claude-thinking-close {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    box-shadow: none;
    font-size: 21px;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    touch-action: manipulation;
  }

  .claude-thinking-close:focus {
    outline: none;
  }

  .claude-thinking-content {
    flex: 1;
    max-width: 100%;
    padding: 14px 18px calc(20px + env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    font-size: 16px;
    line-height: 1.2;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .claude-thinking-summary.is-live .claude-thinking-clock {
    animation: none;
  }

  .claude-thinking-sheet {
    transition: none;
  }
}
