.mandy-control {
  position:fixed; top:max(9px,env(safe-area-inset-top)); left:max(8px,env(safe-area-inset-left));
  z-index:100001; --size:clamp(48px,2.9vw,62px); width:var(--size); height:var(--size);
}
.mandy-control button {
  appearance:none; position:relative; display:block; width:100%; height:100%; border:0;
  margin:0; padding:0; border-radius:50%; background:transparent; color:#727677; cursor:pointer;
}
.mandy-control button:focus-visible { outline:2px solid #28810b; outline-offset:3px; }
.mandy-control svg,.mandy-face { position:absolute; pointer-events:none; }
.mandy-ring { inset:0; width:100%; height:100%; fill:none; stroke:#63a615; }
.mandy-ring ellipse { vector-effect:non-scaling-stroke; stroke-width:1.06px; }
.mandy-face {
  inset:1.5%;
  background:transparent url(agent_sprache-mandy.webp) center bottom / contain no-repeat;
  border-radius:50%;
}
.mandy-wave { inset:33%; width:34%; height:34%; stroke:currentColor; stroke-width:2.3; fill:none; }
html[data-theme="dark"] .mandy-wave { color:#fff; }
@keyframes mandy-voice-wave {
  0%, 100% { transform:scaleY(.52); }
  36% { transform:scaleY(1); }
  68% { transform:scaleY(.72); }
}
@media (prefers-reduced-motion:no-preference) {
  .mandy-control button[data-sound="on"][data-speaking] .mandy-bar {
    transform-origin:12px 12px;
    animation:mandy-voice-wave .68s ease-in-out infinite;
    animation-delay:var(--mandy-beat);
  }
}
.mandy-control button[data-sound=off] .mandy-wave { opacity:0; }
.mandy-control button[data-sound=on] .mandy-face,.mandy-control button[data-sound=on] .mandy-slash,
.mandy-control button:focus-visible .mandy-face { opacity:0; }
.mandy-control button:focus-visible .mandy-wave { opacity:1; }
.mandy-control button:focus-visible + .mandy-bubble { visibility:hidden; }
@media(hover:hover) {
  .mandy-control button:hover .mandy-face { opacity:0; }
  .mandy-control button:hover .mandy-wave { opacity:1; }
  .mandy-control button:hover + .mandy-bubble { visibility:hidden; }
}
.mandy-bubble {
  position:absolute; top:20%; left:calc(100% + 10px); box-sizing:border-box;
  width:clamp(170px,10.2vw,210px); padding:14px 16px; border-radius:4px 15px 15px 15px;
  background:#686d70; color:white; font:500 14px/1.35 system-ui,sans-serif; pointer-events:none;
}
.mandy-bubble::before { content:""; position:absolute; right:100%; top:10px; border:6px solid transparent; border-right-color:#686d70; }
.mandy-bubble:empty { display:none; }
@media(max-width:900px) {
  .mandy-control { top:max(84px,calc(env(safe-area-inset-top) + 80px)); }
  .mandy-bubble { width:min(215px,calc(100vw - 85px)); }
}
@media(min-width:901px) and (max-width:1580px) {
  body:has(.mandy-control) #tri_header:not(.is-docked) .tri-site-bar { padding-left:36px; }
}
@media(min-width:901px) and (max-width:1780px) {
  body:has(#tri_header:not(.is-docked)) .mandy-bubble { top:calc(100% + 34px); left:3px; }
  body:has(#tri_header:not(.is-docked)) .mandy-bubble::before { right:auto; left:14px; top:-12px; border-color:transparent transparent #686d70; }
}
@media(min-width:1781px) and (max-width:2030px) {
  .mandy-bubble { width:clamp(96px,calc((100vw - 1500px) / 2 - 76px),184px); padding:12px; }
}

/* Material der angedockten Navigation, einschließlich ihrer adaptiven Desktop-Palette. */
html body .mandy-control .mandy-bubble {
  --bubble-glass: rgb(237 242 245 / .64);
  --bubble-edge: rgb(255 255 255 / .52);
  --bubble-solid: #edf2f5;
  --bubble-ink: #252a2e;
  --bubble-shadow: 0 2px 3px #1a282f15;
  --bubble-filter: blur(20px);
  background: var(--bubble-glass);
  border: 1px solid var(--bubble-edge);
  color: var(--bubble-ink);
  box-shadow: var(--bubble-shadow);
  -webkit-backdrop-filter: var(--bubble-filter);
  backdrop-filter: var(--bubble-filter);
}
@media (min-width: 56.251rem) {
  html body:has(#tri_header[data-navigation-tone="dark"]) .mandy-control .mandy-bubble,
  html[data-theme="dark"] body:not(:has(#tri_header[data-navigation-tone])) .mandy-control .mandy-bubble {
    --bubble-glass: rgb(43 49 57 / .64);
    --bubble-edge: rgb(235 245 255 / .16);
    --bubble-solid: #2b3139;
    --bubble-ink: #f4f7fa;
    --bubble-shadow: 0 2px 4px rgb(0 0 0 / .22);
  }
}
@media (max-width: 56.25rem) {
  html body .mandy-control .mandy-bubble {
    --bubble-glass: rgb(237 242 245 / .75);
    --bubble-filter: blur(20px) saturate(100%);
    --bubble-shadow: inset 0 .5px 0 var(--bubble-edge), 0 5px 18px rgb(20 35 48 / .10), 0 1px 3px rgb(20 35 48 / .08);
  }
  html[data-theme="dark"] body .mandy-control .mandy-bubble {
    --bubble-glass: rgb(43 49 57 / .76);
    --bubble-edge: rgb(235 245 255 / .16);
    --bubble-solid: #2b3139;
    --bubble-ink: #f4f7fa;
    --bubble-filter: blur(24px) saturate(105%);
    --bubble-shadow: inset 0 .5px 0 var(--bubble-edge), 0 7px 22px rgb(0 0 0 / .30), 0 1px 4px rgb(0 0 0 / .22);
  }
}
@media (prefers-reduced-transparency: reduce) {
  html body .mandy-control .mandy-bubble {
    background: var(--bubble-solid);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  html body .mandy-control .mandy-bubble::before { --bubble-glass: var(--bubble-solid); }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html body .mandy-control .mandy-bubble { background: var(--bubble-solid); }
  html body .mandy-control .mandy-bubble::before { --bubble-glass: var(--bubble-solid); }
}
@media (forced-colors: active) {
  html body .mandy-control .mandy-bubble {
    background: Canvas; color: CanvasText; border-color: CanvasText;
    box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
  }
}
