#wj-assistant {
  --wj-blue: #0067b1;
  --wj-ink: #142632;
  --wj-muted: #405968;
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(80px, calc(env(safe-area-inset-bottom) + 64px));
  z-index: 99999;
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Open Sans", "Segoe UI", sans-serif;
  color: var(--wj-ink); text-align: left; letter-spacing: 0;
}
#wj-assistant [hidden] { display: none !important; }
#wj-assistant *, #wj-assistant *::before, #wj-assistant *::after { box-sizing: border-box; }
#wj-assistant button {
  all: unset; box-sizing: border-box; font: inherit; letter-spacing: 0;
  cursor: pointer; text-transform: none; text-shadow: none;
}
#wj-assistant button:disabled { opacity: .65; cursor: wait; }
#wj-assistant button:focus-visible, #wj-assistant a:focus-visible {
  outline: 3px solid #0067b1; outline-offset: 3px;
}
#wj-assistant .wj-assistant__launcher {
  position: relative; display: flex; align-items: center; gap: 12px;
  width: 254px; height: 72px; padding: 12px 16px 12px 12px; border-radius: 25px;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(222,239,248,.96));
  border: 1px solid #aec9da; color: #143e59;
  -webkit-backdrop-filter: blur(24px) saturate(140%); backdrop-filter: blur(24px) saturate(140%);
  box-shadow: 0 12px 32px rgba(24,60,84,.19), inset 0 1px 0 #fff, inset 0 -1px 0 rgba(90,143,176,.16);
  transition: box-shadow 180ms ease, transform 180ms ease;
}
#wj-assistant .wj-assistant__launcher:hover {
  box-shadow: 0 16px 36px rgba(24,60,84,.24), inset 0 1px 0 #fff;
}
#wj-assistant .wj-assistant__launcher > span:last-child { min-width: 0; }
#wj-assistant .wj-assistant__launcher strong {
  display: block; font-size: 15px; font-weight: 700; line-height: 1.4; color: #143e59;
}
#wj-assistant .wj-assistant__launcher small {
  display: block; margin-top: 3px; font-size: 12px; line-height: 1.4; color: #405968;
}
#wj-assistant .wj-assistant__spark, #wj-assistant .wj-assistant__avatar {
  display: block; flex: 0 0 46px; width: 46px; height: 46px; border-radius: 16px;
  background: #fff url("https://wieland-jarasch.de/wp-content/uploads/2022/02/dieb-STOP-transparenter-Hintergrund-150x150.png") center/86% no-repeat;
  border: 1px solid #bdd1df; box-shadow: 0 3px 8px rgba(33,72,96,.08);
}
#wj-assistant .wj-assistant__edge-hint { display: none; }
#wj-assistant .wj-assistant__panel {
  display: grid; grid-template-rows: auto minmax(0,1fr) auto auto;
  width: min(408px, calc(100vw - 28px)); height: min(620px, calc(100dvh - 108px));
  overflow: hidden; isolation: isolate; border: 1px solid #b3c8d7; border-radius: 30px;
  background: rgba(234,241,245,.97);
  -webkit-backdrop-filter: blur(28px) saturate(135%); backdrop-filter: blur(28px) saturate(135%);
  box-shadow: 0 24px 64px rgba(22,48,68,.24), 0 4px 14px rgba(22,48,68,.08), inset 0 1px 0 #fff;
  transform-origin: right bottom;
  animation: wj-assistant-open 360ms cubic-bezier(.16,1,.3,1);
}
#wj-assistant .wj-assistant__header {
  display: flex; align-items: center; gap: 12px; padding: 17px 16px;
  background: linear-gradient(135deg, #fff, #e4eff6); border-bottom: 1px solid #bfd0dd;
}
#wj-assistant .wj-assistant__header > div { flex: 1; min-width: 0; }
#wj-assistant .wj-assistant__header strong {
  display: block; color: #143e59; font-size: 17px; font-weight: 700; line-height: 1.35;
}
#wj-assistant .wj-assistant__header div > span {
  display: block; margin-top: 3px; color: #405968; font-size: 12px; line-height: 1.4;
}
#wj-assistant .wj-assistant__close {
  display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px;
  border: 1px solid #a9bfce; border-radius: 50%; background: rgba(255,255,255,.94); color: #254c64;
  box-shadow: 0 2px 6px rgba(31,65,88,.07), inset 0 1px 0 #fff;
}
#wj-assistant .wj-assistant__close:hover { background: #d9e8f2; }
#wj-assistant .wj-assistant__close i {
  display: grid; place-items: center; width: 16px; height: 16px;
  font-size: 16px; line-height: 1; text-align: center;
}
#wj-assistant .wj-assistant__close i::before { display: block; line-height: 1; }
#wj-assistant .wj-assistant__messages {
  display: flex; flex-direction: column; gap: 14px; min-height: 0; padding: 20px 16px;
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #89a4b7 transparent;
}
#wj-assistant .wj-assistant__bubble {
  flex: 0 0 auto; max-width: 94%; padding: 13px 15px; border-radius: 20px;
  font-size: 15px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere;
  color: #142632;
}
#wj-assistant .wj-assistant__bubble--bot {
  align-self: flex-start; border: 1px solid #bdcfdb; border-bottom-left-radius: 7px;
  background: #fff; box-shadow: 0 3px 9px rgba(31,65,88,.05);
}
#wj-assistant .wj-assistant__bubble--user {
  align-self: flex-end; border: 1px solid #a8c7db; border-bottom-right-radius: 7px;
  background: #d5e8f4; color: #143e59;
}
#wj-assistant .wj-assistant__contact {
  display: block; margin-top: 12px; padding-top: 10px; border-top: 1px solid #c4d3de;
  color: #00558f; font-size: 13px; font-weight: 600; line-height: 1.5;
  text-decoration: underline; text-underline-offset: 3px; white-space: normal;
}
#wj-assistant .wj-assistant__contact:hover { color: #003855; }
#wj-assistant .wj-assistant__quick {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding: 0 16px 14px;
}
#wj-assistant .wj-assistant__quick button {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  height: 42px; padding: 8px 10px; border: 1px solid #a6bfce; border-radius: 14px;
  background: linear-gradient(150deg,#fff,#f0f6fa); color: #244d65;
  font-size: 13px; font-weight: 600; line-height: 1.4; text-align: center;
  box-shadow: inset 0 1px 0 #fff, 0 2px 4px rgba(31,65,88,.04);
}
#wj-assistant .wj-assistant__quick button i { font-size: 13px; line-height: 1; flex: 0 0 auto; }
#wj-assistant .wj-assistant__quick button:hover { background: #dcecf6; }
#wj-assistant .wj-assistant__form {
  display: flex; align-items: center; gap: 9px; margin: 0; padding: 13px;
  background: linear-gradient(145deg,#f9fbfd,#e4eff6); border-top: 1px solid #b9ccd9;
}
#wj-assistant .wj-assistant__form .screen-reader-text {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
#wj-assistant .wj-assistant__form input {
  appearance: none; -webkit-appearance: none; flex: 1 1 0; min-width: 0; width: 0;
  height: 48px; padding: 0 15px; margin: 0; border: 1px solid #7a9bb2; border-radius: 20px;
  background: #fff; color: #142632; font: inherit; font-size: 16px; line-height: normal;
  letter-spacing: 0; outline: none; box-shadow: inset 0 1px 3px rgba(28,61,82,.04);
}
#wj-assistant .wj-assistant__form input::placeholder { color: #405968; opacity: 1; }
#wj-assistant .wj-assistant__form input:focus { border-color: #0067b1; box-shadow: 0 0 0 3px rgba(0,103,177,.12); }
#wj-assistant .wj-assistant__form button {
  display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px;
  border: 1px solid #07568b; border-radius: 50%;
  background: linear-gradient(145deg,#0067b1,#00558f); color: #fff;
  box-shadow: 0 4px 10px rgba(0,89,145,.2), inset 0 1px 0 rgba(255,255,255,.3);
}
#wj-assistant .wj-assistant__form button i {
  display: grid; place-items: center; width: 18px; height: 18px; font-size: 18px; line-height: 1;
}
#wj-assistant .wj-assistant__form button:hover { background: #004b80; }
@media (max-width: 520px) {
  /* Stable small viewport height prevents Safari toolbar movement. */
  #wj-assistant {
    top: min(85vh, calc(100vh - 120px)); top: min(85svh, calc(100svh - 120px));
    right: max(12px, env(safe-area-inset-right)); bottom: auto;
  }
  #wj-assistant .wj-assistant__launcher {
    width: min(224px, calc(100vw - 28px)); height: 64px; padding: 9px 14px 9px 10px; gap: 10px;
    transform: translateX(calc(100% - 8px)); transition: transform 440ms cubic-bezier(.16,1,.3,1);
  }
  #wj-assistant.is-expanded .wj-assistant__launcher { transform: translateX(0); }
  #wj-assistant .wj-assistant__launcher > span:last-child, #wj-assistant .wj-assistant__spark {
    opacity: 0; transition: opacity 180ms ease;
  }
  #wj-assistant.is-expanded .wj-assistant__launcher > span:last-child, #wj-assistant.is-expanded .wj-assistant__spark { opacity: 1; }
  #wj-assistant .wj-assistant__launcher strong { font-size: 14px; }
  #wj-assistant .wj-assistant__launcher small { display: none; }
  #wj-assistant .wj-assistant__edge-hint {
    position: absolute; left: 4px; top: 50%; display: grid; place-items: center;
    width: 12px; height: 20px; margin-top: -10px; font-size: 11px; line-height: 1;
    color: #00558f; opacity: 1; transition: opacity 180ms ease;
  }
  #wj-assistant.is-expanded .wj-assistant__edge-hint { opacity: 0; }
  #wj-assistant .wj-assistant__panel {
    position: fixed; right: max(12px, env(safe-area-inset-right)); bottom: auto;
    top: max(72px, calc(100svh - 680px)); width: min(408px, calc(100vw - 28px));
    height: min(640px, calc(100vh - 108px)); height: min(640px, calc(100svh - 108px));
  }
  #wj-assistant .wj-assistant__header { gap: 10px; padding: 14px; }
  #wj-assistant .wj-assistant__header strong { font-size: 16px; }
  #wj-assistant .wj-assistant__header div > span { font-size: 11px; }
  #wj-assistant.is-keyboard-open .wj-assistant__panel { top: var(--wj-keyboard-top); height: var(--wj-keyboard-height); }
  #wj-assistant.is-keyboard-open .wj-assistant__quick { display: none; }
}
#wj-assistant.is-closing .wj-assistant__panel { animation: wj-assistant-close 220ms ease-in forwards; }
@keyframes wj-assistant-open { from { transform: translateY(12px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes wj-assistant-close { from { transform: none; opacity: 1; } to { transform: translateY(12px) scale(.96); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  #wj-assistant .wj-assistant__panel, #wj-assistant.is-closing .wj-assistant__panel { animation: none; }
  #wj-assistant .wj-assistant__launcher, #wj-assistant .wj-assistant__launcher > span:last-child,
  #wj-assistant .wj-assistant__spark, #wj-assistant .wj-assistant__edge-hint { transition: none; }
}

