.imassist-launcher { position: fixed; z-index: 48; right: 24px; bottom: 28px; display: grid; box-sizing: border-box; width: 70px; height: 70px; min-height: 70px; padding: 0; place-items: center; overflow: visible; border: 0; border-radius: 0; background: transparent; color: #112b36; box-shadow: none; cursor: pointer; font: 700 1rem/1.15 var(--body-font); transition: transform 150ms ease, filter 150ms ease; }
.imassist-launcher::after { display: none; content: none; }
.imassist-launcher:hover { filter: drop-shadow(0 12px 18px rgba(4, 36, 47, .28)); transform: translateY(-3px); }
.imassist-launcher:active { transform: scale(.96); }
.imassist-bot-bubble { position: relative; display: grid; width: 100%; height: 100%; place-items: center; border: 0; border-radius: inherit; background: transparent; }
.imassist-logo-frame { display: grid; width: 100%; height: 100%; place-items: center; border-radius: 0; background: transparent; }
.imassist-logo-frame img { display: block; width: 68px; height: 68px; object-fit: contain; filter: drop-shadow(0 7px 11px rgba(6, 37, 49, .22)); }
.imassist-bot { position: relative; z-index: 1; display: block; width: 43px; height: 45px; margin-top: 3px; }
.imassist-bot-head { position: absolute; z-index: 3; top: 10px; left: 3px; width: 37px; height: 24px; border: 2px solid #182e3c; border-radius: 11px 11px 13px 13px; background: #102a39; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .14); }
.imassist-bot-head::before { content: ""; position: absolute; left: 4px; top: -9px; width: 25px; height: 10px; border: 3px solid #8796a3; border-bottom: 0; border-radius: 16px 16px 0 0; }
.imassist-bot-ear { position: absolute; z-index: 2; top: 16px; width: 7px; height: 15px; border-radius: 5px; background: #aab5c1; box-shadow: inset 0 -2px 0 rgba(63, 79, 94, .14); }
.imassist-bot-ear-left { left: 0; }
.imassist-bot-ear-right { right: 0; }
.imassist-bot-eye { position: absolute; top: 8px; width: 7px; height: 6px; border-radius: 7px 7px 4px 4px; background: #69dfe1; }
.imassist-bot-eye-left { left: 7px; }
.imassist-bot-eye-right { right: 7px; }
.imassist-bot-mouth { position: absolute; left: 50%; bottom: 4px; width: 7px; height: 3px; border-radius: 0 0 6px 6px; background: #69dfe1; transform: translateX(-50%); }
.imassist-bot-body { position: absolute; z-index: 1; left: 9px; bottom: 0; width: 25px; height: 16px; border-radius: 13px 13px 7px 7px; background: #e1e6ec; box-shadow: inset 0 -2px 0 #d1d8e0; }
.imassist-bot-body::before { content: ""; position: absolute; left: 8px; top: -5px; width: 9px; height: 7px; border-radius: 3px; background: #c9d1da; }
.imassist-launcher-label { position: absolute; right: calc(100% + 12px); bottom: 5px; width: max-content; min-width: 154px; padding: 9px 12px; border: 1px solid #3d5d6b; border-radius: 9px; background: #0c263b; color: #f1f8fb; box-shadow: 0 10px 26px rgba(3, 22, 31, .28); opacity: 0; visibility: hidden; transform: translateX(6px); transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease; pointer-events: none; text-align: left; }
.imassist-launcher-label::after { content: ""; position: absolute; right: -6px; bottom: 16px; width: 11px; height: 11px; border-top: 1px solid #3d5d6b; border-right: 1px solid #3d5d6b; background: #0c263b; transform: rotate(45deg); }
.imassist-launcher-label strong, .imassist-launcher-label small { display: block; }
.imassist-launcher-label strong { font-size: .9rem; line-height: 1.2; }
.imassist-launcher-label small { margin-top: 3px; color: #bfd2db; font-size: .72rem; font-weight: 600; }
.imassist-launcher:hover .imassist-launcher-label, .imassist-launcher:focus-visible .imassist-launcher-label { opacity: 1; visibility: visible; transform: translateX(0); }
.imassist-mark { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border-radius: 8px; background: #0c263b; color: #77e0e1; font: 600 1.1rem/1 var(--display-font); letter-spacing: -.02em; }
.imassist-mark img { display: block; width: 32px; height: 32px; object-fit: contain; }
.imassist-dialog { position: fixed; z-index: 70; inset: auto 24px 94px auto; width: min(420px, calc(100% - 32px)); height: min(680px, calc(100dvh - 120px)); max-width: none; max-height: none; margin: 0; padding: 0; overflow: hidden; border: 1px solid #436272; border-radius: 12px; background: #f6faf9; color: #102b39; box-shadow: 0 24px 80px rgba(2, 18, 27, .46); }
.imassist-dialog[open] { display: grid; grid-template-rows: auto auto minmax(150px, 1fr) auto auto auto; }
.imassist-dialog::backdrop { background: transparent; }
.imassist-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; background: #0c263b; color: #f1f8fb; }
.imassist-header > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.imassist-header strong, .imassist-header small { display: block; }
.imassist-header strong { font-size: 1.1rem; }
.imassist-header small { margin-top: 2px; color: #b9ced9; font-size: .75rem; }
.imassist-header .imassist-mark { border: 1px solid #426574; background: #15394a; }
.imassist-header > button { display: grid; flex: 0 0 40px; width: 40px; min-height: 40px; padding: 0; place-items: center; border: 1px solid #5d7886; border-radius: 7px; background: #15394a; color: #f1f8fb; cursor: pointer; font-size: 1.5rem; }
.imassist-emergency { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; background: #fff0e8; color: #8f2f27; border-bottom: 1px solid #ecc6b8; text-decoration: none; font-size: .875rem; }
.imassist-emergency:hover { text-decoration: underline; }
.imassist-messages { min-width: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 16px 10px; background: #edf3f2; scroll-behavior: smooth; }
.imassist-message { width: fit-content; max-width: 88%; margin: 0 0 14px; padding: 11px 13px; border-radius: 10px; background: #fff; border: 1px solid #cad7d8; box-shadow: 0 4px 16px rgba(20, 57, 68, .07); }
.imassist-message.user { margin-left: auto; background: #0d766f; border-color: #0d766f; color: #fff; }
.imassist-message.urgent { border-color: #c6473f; background: #fff1ef; }
.imassist-message p { margin: 0; color: inherit; font-size: .9375rem; line-height: 1.48; white-space: pre-wrap; overflow-wrap: anywhere; }
.imassist-message-label { display: block; margin-bottom: 6px; color: #49626b; font-size: .72rem; font-weight: 750; line-height: 1.3; text-transform: uppercase; letter-spacing: .045em; }
.imassist-message.user .imassist-message-label { color: #d7f4f0; }
.imassist-message.urgent .imassist-message-label { color: #9d2f28; }
.imassist-sources, .imassist-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.imassist-sources a, .imassist-actions a { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 9px; border-radius: 6px; color: #0a6964; background: #e8f4f1; font-size: .78rem; font-weight: 700; line-height: 1.25; text-decoration: none; }
.imassist-actions a { color: #fff; background: #0d766f; }
.imassist-actions a.emergency { background: #a9322b; }
.imassist-sources a:hover, .imassist-actions a:hover { text-decoration: underline; }
.imassist-quick { display: flex; gap: 7px; padding: 10px 16px; overflow-x: auto; background: #edf3f2; }
.imassist-quick button { flex: none; min-height: 36px; padding: 7px 10px; border: 1px solid #93aaae; border-radius: 6px; background: #fff; color: #244550; cursor: pointer; font: 650 .8rem/1.2 var(--body-font); }
.imassist-quick button:hover { border-color: #0d766f; color: #0d766f; }
.imassist-activity { min-height: 1.4em; margin: 0; padding: 2px 16px 6px; background: #edf3f2; color: #50666e; font-size: .8rem; }
.imassist-form { padding: 12px 16px 14px; border-top: 1px solid #c7d5d7; background: #fff; }
.imassist-form label { display: block; margin-bottom: 7px; font-size: .85rem; }
.imassist-form > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.imassist-form textarea { min-height: 48px; max-height: 120px; margin: 0; resize: vertical; font-size: 1rem; }
.imassist-form button { min-height: 48px; padding: 10px 15px; border: 0; border-radius: 7px; background: #0d766f; color: #fff; cursor: pointer; font: 700 .9375rem/1 var(--body-font); }
.imassist-form button:disabled { cursor: wait; opacity: .6; }
.imassist-form small { display: block; margin-top: 7px; color: #536971; font-size: .72rem; line-height: 1.35; }
.imassist-dialog button:focus-visible, .imassist-dialog a:focus-visible, .imassist-launcher:focus-visible, .imassist-dialog textarea:focus-visible { outline: 3px solid #f49b3e; outline-offset: 2px; }
.imassist-open .imassist-launcher { visibility: hidden; }
@media (max-width: 600px) {
  .imassist-launcher { right: 14px; bottom: 20px; width: 60px; height: 60px; min-height: 60px; border-radius: 0; }
  .imassist-logo-frame img { width: 58px; height: 58px; }
  .imassist-launcher-label { display: none; }
  .imassist-dialog { inset: 8px; width: auto; height: calc(100dvh - 16px); }
  .imassist-dialog[open] { grid-template-rows: auto auto minmax(120px, 1fr) auto auto auto; }
  .imassist-message { max-width: 92%; }
}
@media (prefers-reduced-motion: reduce) {
  .imassist-launcher, .imassist-launcher-label, .imassist-messages { transition: none; scroll-behavior: auto; }
}
