.flowi-root { position: fixed; right: 20px; bottom: 20px; z-index: 60; font-family: inherit; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.flowi-fab { width: 72px; height: 72px; border: 0; padding: 0; cursor: pointer; background: transparent; -webkit-tap-highlight-color: transparent; filter: drop-shadow(0 6px 10px rgba(40,40,120,.35)); animation: flowi-bob 4s ease-in-out infinite; }
.flowi-mascot { position: relative; display: block; width: 100%; height: 100%; animation: flowi-pulse 7s ease-in-out infinite; transform-origin: 50% 70%; }
.flowi-mascot img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* Two complementary soft masks: head stays still, lower tentacles sway like in water. */
.flowi-top { -webkit-mask-image: linear-gradient(#000 0 52%, transparent 66%); mask-image: linear-gradient(#000 0 52%, transparent 66%); }
.flowi-low { -webkit-mask-image: linear-gradient(transparent 36%, #000 66%); mask-image: linear-gradient(transparent 36%, #000 66%); transform-origin: 50% 50%; will-change: transform; animation: flowi-sway 5.5s ease-in-out infinite; }
@keyframes flowi-sway { 0%,100% { transform: skewX(0) rotate(0) scaleY(1); } 25% { transform: skewX(-2.6deg) rotate(.8deg) scaleY(1.015); } 50% { transform: skewX(0) rotate(0) scaleY(.99); } 75% { transform: skewX(2.6deg) rotate(-.8deg) scaleY(1.015); } }
.flowi-fab:hover { filter: drop-shadow(0 9px 14px rgba(40,40,120,.45)); }
.flowi-fab:focus-visible { outline: 3px solid #5b4ee8; outline-offset: 3px; border-radius: 50%; }
.flowi-fab.is-open { animation: none; }
@keyframes flowi-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes flowi-pulse { 0%,86%,100% { transform: scale(1); } 90% { transform: scale(1.08, .94); } 94% { transform: scale(.97, 1.04); } }
.flowi-hint { position: relative; max-width: 240px; background: #fff; color: #1c2130; border-radius: 16px 16px 4px 16px; padding: 11px 34px 11px 14px; font-size: 14px; font-weight: 600; box-shadow: 0 12px 30px -10px rgba(40,52,120,.35); border: 1px solid #e4e7f2; cursor: pointer; animation: flowi-in .35s ease-out; }
.flowi-hint[hidden] { display: none; }
.flowi-hint-x { position: absolute; top: 4px; right: 6px; width: 24px; height: 24px; border: 0; background: transparent; color: #7a8299; font-size: 18px; line-height: 1; cursor: pointer; border-radius: 50%; }
.flowi-hint-x:hover { background: #f0f2f8; }
@keyframes flowi-in { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
.flowi-panel { width: 360px; max-width: calc(100vw - 24px); height: 520px; max-height: calc(100vh - 120px); display: flex; flex-direction: column; background: #fff; color: #1c2130; border-radius: 22px; border: 1px solid #e4e7f2; box-shadow: 0 30px 70px -20px rgba(40,52,120,.45); overflow: hidden; animation: flowi-in .25s ease-out; }
.flowi-panel[hidden] { display: none; }
.flowi-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: linear-gradient(135deg, #5b4ee8, #8b5cf6); color: #fff; }
.flowi-head img { border-radius: 50%; background: #fff; padding: 2px; }
.flowi-head div { flex: 1; min-width: 0; } .flowi-head strong { display: block; font-size: 15px; } .flowi-head small { opacity: .85; font-size: 12px; }
.flowi-close { flex: none; border: 0; background: rgba(255,255,255,.18); color: #fff; width: 32px; height: 32px; border-radius: 50%; font-size: 20px; cursor: pointer; }
.flowi-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: #f7f8fc; }
.flowi-msg { max-width: 86%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.flowi-msg.bot { align-self: flex-start; background: #fff; border: 1px solid #e4e7f2; border-bottom-left-radius: 4px; }
.flowi-msg.user { align-self: flex-end; background: #5b4ee8; color: #fff; border-bottom-right-radius: 4px; }
.flowi-msg.pending { opacity: .6; font-style: italic; }
.flowi-offer { align-self: flex-start; border: 1px solid #5b4ee8; color: #5b4ee8; background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.flowi-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #e4e7f2; background: #fff; }
.flowi-form[hidden], .flowi-body[hidden], .flowi-leave[hidden], .flowi-leave-link[hidden] { display: none; }
.flowi-in { flex: 1; min-width: 0; border: 1px solid #d5d9e8; border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 14px; }
.flowi-in:focus, .flowi-leave input:focus, .flowi-leave textarea:focus { outline: 2px solid #5b4ee8; outline-offset: 1px; }
.flowi-send, .flowi-submit { border: 0; background: #5b4ee8; color: #fff; border-radius: 12px; padding: 0 16px; font-weight: 650; cursor: pointer; font: inherit; font-size: 14px; min-height: 40px; }
.flowi-leave-link { border: 0; border-top: 1px solid #eef0f7; background: #fff; color: #5b4ee8; padding: 8px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.flowi-leave { flex: 1; overflow-y: auto; display: grid; gap: 12px; padding: 16px; align-content: start; background: #f7f8fc; }
.flowi-leave label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; }
.flowi-leave input[type=email], .flowi-leave textarea { border: 1px solid #d5d9e8; border-radius: 10px; padding: 9px 11px; font: inherit; font-size: 14px; resize: vertical; }
.flowi-consent { display: flex !important; grid-template-columns: none; gap: 8px !important; font-weight: 400 !important; font-size: 12.5px !important; align-items: flex-start; }
.flowi-consent a { color: #5b4ee8; }
.flowi-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.flowi-row { display: flex; gap: 8px; justify-content: space-between; }
.flowi-back { border: 1px solid #d5d9e8; background: #fff; border-radius: 12px; padding: 0 14px; min-height: 40px; cursor: pointer; font: inherit; font-size: 14px; }
.flowi-status { margin: 0; min-height: 16px; font-size: 12.5px; color: #c0392b; }
@media (max-width: 600px) {
  .flowi-root { right: 8px; bottom: calc(10px + env(safe-area-inset-bottom)); max-width: calc(100vw - 16px); }
  .flowi-hint { max-width: min(240px, calc(100vw - 100px)); }
  .flowi-root.is-open { position: static; }
  .flowi-root.is-open .flowi-fab, .flowi-root.is-open .flowi-hint { display: none; }
  /* Full-screen sheet fitted to the visible viewport (iOS Safari safe). */
  .flowi-panel { position: fixed; top: 0; left: 0; right: 0; bottom: 0; width: 100%; max-width: 100%; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; border: 0; box-sizing: border-box; z-index: 70; }
  .flowi-panel * { box-sizing: border-box; }
  .flowi-head { padding: calc(10px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 10px calc(14px + env(safe-area-inset-left)); }
  .flowi-close { width: 44px; height: 44px; font-size: 26px; }
  .flowi-form { padding: 10px calc(12px + env(safe-area-inset-right)) 10px calc(12px + env(safe-area-inset-left)); }
  .flowi-leave-link { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .flowi-in, .flowi-leave input[type=email], .flowi-leave textarea { font-size: 16px; }
  .flowi-send { flex: none; }
}
@media (prefers-reduced-motion: reduce) { .flowi-fab, .flowi-mascot, .flowi-low, .flowi-hint, .flowi-panel { animation: none; } }
