.assistant { --assistant-green: #176444; font-family: 'Inter', system-ui, sans-serif; }
.assistant-launcher { position: fixed; z-index: 45; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: .55rem; min-height: 48px; padding: .75rem 1rem; border: 1px solid #c5decf; border-radius: 999px; background: #f8fbf8; color: #12432e; box-shadow: 0 4px 24px #123c2920; cursor: pointer; font: inherit; font-size: .85rem; font-weight: 650; }
.assistant-launcher > span:first-child { font-size: 1.35rem; }
.assistant-launcher:hover { border-color: var(--assistant-green); background: #ecf5ef; }
.assistant-launcher.is-near-form { visibility: hidden; }
.assistant-panel { position: fixed; z-index: 1003; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); display: flex; flex-direction: column; width: min(410px, calc(100vw - 2rem)); max-height: min(740px, calc(100dvh - 2rem)); overflow: hidden; overscroll-behavior: contain; border: 1px solid #b9d3c3; border-radius: 1.25rem; background: #fffcf7; box-shadow: 0 18px 70px #092c2933; }
.assistant [hidden] { display: none !important; }
.assistant-header { position: relative; flex-shrink: 0; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: start; gap: .7rem; padding: 1.15rem 1.15rem .85rem; border-bottom: 1px solid #dfe8de; background: #eef5ed; }
/* Decorative liquid glass: a complete static shape before motion enhancement. */
.assistant-header::before { content: ''; width: 42px; height: 44px; margin-top: .15rem; border-radius: 44% 56% 60% 40% / 42% 40% 60% 58%; background: radial-gradient(ellipse at 24% 22%, #fffde9 0%, #d6efda 8%, transparent 29%), radial-gradient(ellipse at 80% 68%, #dfffe5 0%, #8dd5b4 13%, transparent 36%), radial-gradient(ellipse at 28% 80%, #63bd96 0%, transparent 42%), linear-gradient(135deg, #2b8b6d, #083c35 55%, #398569); background-size: 140% 130%, 135% 145%, 130% 125%, 100% 100%; background-position: 20% 10%, 80% 70%, 30% 80%, 0 0; box-shadow: inset 1px 1px 2px #efffedb0, inset -3px -4px 6px #052b3270, 0 4px 9px #14583d26; animation: assistant-flow 4.8s ease-in-out infinite; }
.assistant-header::after { content: ''; position: absolute; pointer-events: none; left: 1.65rem; top: 1.65rem; width: 23px; height: 10px; border-radius: 60% 40% 50% 50%; background: linear-gradient(155deg, #fffff3a6, #d5ffe320 55%, transparent); filter: blur(.35px); transform: rotate(-24deg); animation: assistant-reflection 4.8s ease-in-out infinite; }
.assistant.is-motion-paused .assistant-header::before, .assistant.is-motion-paused .assistant-header::after { animation-play-state: paused; }
@keyframes assistant-flow {
  0%, 100% { transform: translateY(1px) scale(.94, 1); border-radius: 44% 56% 60% 40% / 42% 40% 60% 58%; background-position: 20% 10%, 80% 70%, 30% 80%, 0 0; }
  35% { transform: translateY(-1px) scale(1.04, .94); border-radius: 60% 40% 43% 57% / 52% 62% 38% 48%; background-position: 85% 25%, 10% 95%, 90% 35%, 0 0; }
  70% { transform: translateY(1px) scale(.96, 1.03); border-radius: 40% 60% 54% 46% / 60% 42% 58% 40%; background-position: 45% 90%, 95% 20%, 10% 10%, 0 0; }
}
@keyframes assistant-reflection { 0%, 100% { transform: translate(0, 0) rotate(-24deg) scale(1); opacity: .9; } 35% { transform: translate(8px, 7px) rotate(16deg) scale(.7, 1.3); opacity: .55; } 70% { transform: translate(1px, 15px) rotate(-14deg) scale(1.1, .7); opacity: .8; } }
@media (prefers-reduced-motion: reduce) { .assistant-header::before, .assistant-header::after { animation: none; } }
.assistant-header h2 { margin: 0 0 .3rem; font-size: 1rem; line-height: 1.4; }
.assistant-header p { margin: 0; color: #4d6657; font-size: .8rem; line-height: 1.6; }
.assistant-header button { flex-shrink: 0; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: #174831; cursor: pointer; font-size: 1.7rem; }
.assistant-body { padding: 1rem 1.15rem 1.25rem; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.assistant-body > :not(.assistant-messages) { flex-shrink: 0; }
.assistant-notice { margin: 0 0 .8rem; color: #506257; font-size: .78rem; line-height: 1.6; }
.assistant-quick { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1rem; }
.assistant-quick a, .assistant-message-links a { padding: .4rem .6rem; border: 1px solid #c8dccf; border-radius: .55rem; color: #145434; font-size: .78rem; line-height: 1.5; background: #f5f9f4; }
.assistant-messages { display: grid; gap: .75rem; min-height: 0; overflow-y: auto; overscroll-behavior: contain; flex-shrink: 1; }
.assistant-message { margin: 0; padding: .7rem .8rem; border-radius: .75rem; background: #edf4eb; font-size: .88rem; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; }
.assistant-message--user { background: #f0ede6; }
.assistant-message p { margin: 0; }
.assistant-message p + p, .assistant-message ul + p { margin-top: .65rem; }
.assistant-message ul { margin: .65rem 0; padding-left: 1.2rem; white-space: normal; }
.assistant-message li + li { margin-top: .35rem; }
.assistant-message .assistant-message-links { margin-top: .7rem; white-space: normal; }
.assistant-message-links { display: flex; flex-wrap: wrap; gap: .45rem; }
.assistant-status { font-size: .82rem; line-height: 1.6; color: #4c604f; margin: .8rem 0; }
.assistant label { display: block; margin: .65rem 0 .35rem; font-size: .82rem; font-weight: 600; }
.assistant textarea { display: block; width: 100%; min-width: 0; padding: .7rem; border: 1px solid #b9cbbc; border-radius: .6rem; background: #fffefb; color: #163b27; font: inherit; font-size: 1rem; }
.assistant textarea { resize: vertical; max-height: 180px; }
.assistant .btn { min-height: 44px; margin-top: .6rem; padding: .65rem .9rem; font-size: .85rem; }
.assistant :focus-visible { outline: 3px solid #28764e; outline-offset: 3px; }
.assistant [disabled] { opacity: .7; cursor: wait; }
@media (max-width: 600px) {
 .assistant-launcher { padding: .6rem .85rem; }
 .assistant-panel { right: max(.5rem, env(safe-area-inset-right)); bottom: max(.5rem, env(safe-area-inset-bottom)); width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); }
}
