.tucano-launch {
  position: fixed;
  z-index: 4;
  inset-inline-end: 1rem;
  inset-block-end: max(1rem, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: .55rem;
  border: 1px solid #597557;
  border-radius: 999px;
  padding: .25rem .9rem .25rem .35rem;
  background: #133227;
  color: #fff;
  box-shadow: 0 8px 30px #0b261b55;
  font-weight: 750;
}
.tucano-mascot {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  line-height: 0;
  transform-origin: 55% 84%;
  animation: tucano-idle 6s ease-in-out infinite;
}
.tucano-mascot img { display: block; width: auto; }
.tucano-mascot i {
  position: absolute;
  left: 26%;
  top: 24%;
  width: 10.7%;
  height: 15%;
  border-radius: 55% 48% 57% 49%;
  background: linear-gradient(#e99104 76%, #703911 80%, #703911 90%, #e99104 94%);
  transform-origin: center top;
  animation: tucano-blink 6.2s linear infinite;
}
@keyframes tucano-blink {
  0%, 39%, 43%, 76%, 80%, 100% { transform: scaleY(0); opacity: 0; }
  41%, 78% { transform: scaleY(1); opacity: 1; }
}
@keyframes tucano-idle {
  0%, 100% { transform: translateY(0) rotate(0); }
  42% { transform: translateY(-2px) rotate(-4deg); }
  72% { transform: translateY(0) rotate(2deg); }
}
@keyframes tucano-listen {
  0%, 100% { transform: rotate(0); }
  55% { transform: translateY(-2px) rotate(-9deg); }
}
#tucano-dialog[data-thinking] .tucano-mascot { animation: tucano-listen 1.3s ease-in-out infinite; }
#tucano-dialog {
  width: min(34rem, calc(100vw - 1rem));
  max-height: min(82dvh, 48rem);
  padding: 0;
  border: 1px solid #b9cdb7;
  border-radius: 1.2rem;
  color: var(--ink);
  background: #f7faf4;
  box-shadow: 0 22px 80px #0d281b50;
}
#tucano-dialog[open] { display: flex; flex-direction: column; }
#tucano-dialog::backdrop { background: #101d17a8; }
.tucano-header {
  position: static;
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .7rem 1rem;
  color: #fff;
  background: #153629;
}
.tucano-header h2 { font-size: 1.65rem; margin: 0; }
.tucano-header p { font-size: .9rem; margin: 0; color: #e3efd8; }
#tucano-close { margin-inline-start: auto; min-width: 44px; min-height: 44px; border: 0; background: none; color: white; font-size: 1.55rem; }
.tucano-body { min-height: 0; overflow: auto; padding: .85rem 1rem; }
.tucano-topics { display: flex; flex-wrap: wrap; gap: .4rem; }
.tucano-topics button { min-height: 44px; border: 1px solid #ccd9c8; border-radius: 999px; padding: .3rem .65rem; background: #fff; color: var(--ink); }
.tucano-topics button:hover { background: #e4efda; }
.tucano-result { margin-top: 1rem; padding: .8rem; border: 1px solid #dce8d8; border-radius: .7rem; background: white; }
.tucano-result h3 { font-size: 1rem; }
.tucano-query { font-weight: 750; }
.tucano-answer { white-space: pre-line; }
.tucano-result ol { padding-left: 1.4rem; margin-bottom: 0; }
.tucano-result li + li { margin-top: .55rem; }
.tucano-result li p { margin: .2rem 0 0; }
.tucano-result a { color: #245e37; text-underline-offset: .18em; font-weight: 650; }
#tucano-form { border: 0; border-top: 1px solid #dce8d8; border-radius: 0; padding: .7rem 1rem; gap: .3rem; }
.tucano-input { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: center; }
#tucano-form :is(button, textarea) { margin: 0; }
#tucano-form p { font-size: .85rem; margin: 0; }
#tucano-status:empty { display: none; }
@media (prefers-reduced-motion: reduce) {
  .tucano-mascot i { display: none; }
}

.tucano-topics button:disabled, #tucano-send:disabled { opacity: .6; cursor: wait; }
#tucano-question { font-size: 1rem; max-block-size: 7rem; }
