/* 透明玻璃入口没有不透明底卡。底下的网页会通过实时 backdrop-filter 透出来。 */
#floating-assistant { position: fixed; z-index: 30; width: 84px; height: 106px; left: calc(100vw - 100px); top: calc(100dvh - 122px); color: var(--ink); }
.assistant-handle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 84px; height: 106px; min-width: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; color: inherit; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none; }
[data-dragging='true'] .assistant-handle { cursor: grabbing; }
.assistant-icon { display: grid; place-items: center; width: 84px; height: 84px; border: 0; background: transparent; transition: transform 320ms cubic-bezier(.23, 1, .32, 1); pointer-events: none; }
.assistant-glass-bubble { position: relative; display: block; width: 84px; height: 84px; border-radius: 50%; background: transparent; }
.assistant-glass-lens { position: absolute; inset: 0; border: 1px solid rgb(255 255 255 / .34); border-left-color: rgb(91 87 79 / .10); border-bottom-color: rgb(68 73 68 / .20); border-radius: inherit; background: rgb(255 255 255 / .012); -webkit-backdrop-filter: blur(1.6px) saturate(1.04); backdrop-filter: blur(1.6px) saturate(1.04); box-shadow: inset 0 1px 1px rgb(255 255 255 / .38), inset 0 -3px 5px rgb(63 67 62 / .10), 0 4px 7px rgb(51 51 42 / .055); }
/* 两张用户原图保持独立。SVG 只负责透明裁切，气泡高光不会携带黑底。 */
.assistant-glass-reflection { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; border-radius: inherit; opacity: .82; }
.assistant-smile-clove { position: absolute; left: 14%; top: 26%; width: 72%; height: 54%; overflow: hidden; }
.assistant-glass-bubble.is-compact .assistant-glass-reflection { opacity: .72; }
[data-assistant-label] { font-family: var(--sans); font-size: .8125rem; line-height: 1.5; transition: opacity 200ms ease, transform 320ms cubic-bezier(.23, 1, .32, 1); }
#floating-assistant[data-state='clove'] .assistant-icon { transform: translateY(9px) scale(.70); }
#floating-assistant[data-state='clove'] [data-assistant-label] { opacity: 0; transform: translateY(-4px) scale(.8); }
[data-assistant-welcome] { position: fixed; z-index: 33; width: max-content; max-width: 252px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px 12px 2px 12px; background: var(--paper); color: var(--muted); font: .875rem / 1.65 var(--sans); pointer-events: none; overflow-wrap: anywhere; }
[data-assistant-welcome][hidden] { display: none; }
.assistant-safe-probe { position: absolute; visibility: hidden; pointer-events: none; width: 0; height: 0; padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }

.floating-panel { position: fixed; z-index: 32; display: flex; flex-direction: column; width: 370px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); padding: 16px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #b9b2aa; border-radius: 13px 13px 3px 13px; background: var(--paper); color: var(--ink); }
.floating-panel[hidden] { display: none; }
.floating-panel-header { display: flex; flex: none; align-items: flex-start; justify-content: space-between; gap: 8px; padding-bottom: 11px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.floating-panel-header h2 { margin: 0; font: 650 .9375rem / 1.5 var(--sans); }
.floating-panel-header p { margin: 2px 0 0; color: var(--muted); font-size: .8125rem; line-height: 1.5; }
.floating-panel-actions { display: flex; align-items: center; gap: 2px; }
.floating-panel-actions button { min-width: 32px; min-height: 32px; padding: 3px 7px; border: 0; background: none; color: var(--muted); font-size: .8125rem; white-space: nowrap; }
.floating-panel-actions [data-floating-close] { font-size: 1.45rem; line-height: 1; }
.floating-panel-actions button:hover { color: var(--brown); }
.floating-panel [data-chat-view] { min-height: 0; }
.floating-panel .chat-scroller { height: clamp(150px, 30dvh, 250px); min-height: 90px; }
.floating-panel .message { max-width: 97%; }
.floating-panel .message-text { padding: 8px 10px; font-size: .875rem; }
.floating-panel .chat-form { margin-top: 10px; }
.floating-panel .composer textarea { font-size: .875rem; }
.floating-panel .send-button { padding-inline: 13px; }
.floating-new-chat { align-self: flex-start; flex: none; min-height: 32px; margin: 8px 0 -4px -6px; padding: 4px 6px; border: 0; background: none; color: var(--muted); font-size: .8125rem; }
.floating-new-chat:hover { color: var(--brown); }

@media (max-width: 480px) {
  .floating-panel { padding: 13px; }
  .floating-panel-header p { font-size: .75rem; }
  .floating-panel .chat-scroller { height: clamp(125px, 26dvh, 210px); }
}
@media (prefers-reduced-motion: reduce) {
  .assistant-icon, [data-assistant-label] { transition: none; }
}
