#max-launcher {
  position: fixed; right: 1rem; bottom: max(1.25rem, calc(env(safe-area-inset-bottom) + .75rem));
  z-index: 20; min-height: 52px; display: inline-flex; align-items: center; gap: .6rem;
  border: 0; border-radius: 2rem; padding: .55rem 1.15rem .55rem .6rem;
  color: #fff; background: #095fa8; font-family: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2; box-shadow: 0 6px 22px #095fa859; cursor: pointer;
}
#max-launcher:hover, #max-launcher:focus-visible { background: #0a4f8a; }
.max-avatar {
  display: inline-flex; align-items: center; justify-content: center; width: 2.3rem; height: 2.3rem;
  border-radius: 50%; background: #fff; color: #095fa8; font-weight: 800; font-size: 1.15rem;
}
#max-launcher { animation: max-pulse 2.4s ease-out 1.2s 3; }
@keyframes max-pulse { 0% { box-shadow: 0 6px 22px #095fa859, 0 0 0 0 #095fa899; } 70% { box-shadow: 0 6px 22px #095fa859, 0 0 0 16px #095fa800; } 100% { box-shadow: 0 6px 22px #095fa859, 0 0 0 0 #095fa800; } }
#max-teaser {
  position: fixed; right: 1rem; bottom: calc(max(1.25rem, env(safe-area-inset-bottom) + .75rem) + 64px); z-index: 20;
  display: flex; align-items: flex-start; max-width: min(18rem, calc(100% - 2rem)); background: #fff; color: #142842;
  border: 1px solid #cfdae6; border-radius: 1rem; box-shadow: 0 8px 28px #18324d30;
}
.max-teaser-text { flex: 1; text-align: left; border: 0; background: transparent; color: inherit; font: inherit; font-size: .95rem; line-height: 1.4; padding: .8rem .4rem .8rem .95rem; cursor: pointer; }
.max-teaser-close { border: 0; background: transparent; color: #435a73; font-size: 1.3rem; line-height: 1; min-width: 40px; min-height: 40px; cursor: pointer; }
#max-send { background: #095fa8; color: #fff; border: 0; border-radius: .5rem; font-weight: 700; cursor: pointer; }
.max-inline { border: 0; background: transparent; padding: 0; font: inherit; font-weight: 700; color: #095fa8; text-decoration: underline; cursor: pointer; }
#max-chat {
  box-sizing: border-box; width: min(26rem, calc(100% - 1.5rem)); max-height: min(38rem, calc(100dvh - 1.5rem));
  padding: 0; border: 1px solid #cfdae6; border-radius: 1rem; background: #fff; color: #142842;
  margin: auto max(0.75rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) auto;
}
#max-chat[open] {display: flex; flex-direction: column;}
#max-chat::backdrop {background: #152a4355;}
.max-header {display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 1rem; background: #edf4fb;}
.max-header h2 {margin: 0; font-size: 1.1rem;}
#max-close {border: 0; background: transparent; min-width: 44px; min-height: 44px; cursor: pointer; font-size: 1.25rem;}
#max-log {overflow-y: auto; min-height: 6rem; padding: .85rem 1rem;}
.max-entry {margin-bottom: .85rem; font-size: .92rem; overflow-wrap: anywhere;}
.max-entry p, #max-chat .max-note {margin: .25rem 0; line-height: 1.45;}
.max-options {display: flex; flex-wrap: wrap; gap: .35rem; padding: .15rem 1rem;}
.max-action, .max-options button {color: #18324d; background: #edf4fb; border: 1px solid #cfdae6; border-radius: .5rem; cursor: pointer; padding: .48rem .6rem;}
#max-form {padding: .75rem 1rem;}
.max-input-row {display: flex; gap: .5rem;}
#max-question {min-width: 0; width: 100%; padding: .55rem; border: 1px solid #9bacc0; border-radius: .45rem; font-size: 1rem;}
#max-send {padding: .55rem .75rem;}
#max-chat .max-note {font-size: .75rem; color: #435a73;}

#max-launcher { transition: transform .2s ease, opacity .2s ease; }
#max-launcher.max-away { transform: translateY(calc(100% + 6rem)); opacity: 0; pointer-events: none; }
@media (max-width: 600px) {
  #max-launcher { right: .75rem; min-height: 48px; padding: .45rem 1rem .45rem .5rem; font-size: .92rem; }
  .max-avatar { width: 2rem; height: 2rem; font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) { #max-launcher { transition: none; animation: none; } }
