/* Frag APIS - nutzt die Variablen aus /fm.css, mit Rueckfallwerten fuer Seiten ohne fm.css */
.fma-btn{position:fixed;right:16px;bottom:16px;z-index:9000;display:flex;align-items:center;gap:.5rem;height:52px;min-width:52px;
 padding:0 1.1rem 0 .9rem;border:0;border-radius:99rem;cursor:pointer;font:600 1rem/1 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
 background:var(--btn,#0067c7);color:var(--btntext,#fff);box-shadow:0 6px 22px rgba(2,26,67,.28)}
.fma-btn:hover{filter:brightness(1.1)}
.fma-btn:focus-visible,.fma-send:focus-visible,.fma-close:focus-visible{outline:3px solid var(--mint,#08a98b);outline-offset:2px}
.fma-btn .fma-x{font-size:1.5rem;font-weight:700}
.fma-btn.fma-off{display:none}
.fma-panel{position:fixed;right:16px;bottom:16px;z-index:9001;width:min(380px,calc(100vw - 32px));max-height:min(560px,calc(100vh - 32px));
 max-height:min(560px,calc(100dvh - 32px));display:flex;flex-direction:column;border:1px solid var(--lin,#d9e3f2);border-radius:1rem;overflow:hidden;
 background:var(--flaeche,#fff);color:var(--fg,#021a43);box-shadow:0 14px 44px rgba(2,26,67,.3);font:15px/1.5 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
.fma-panel[hidden]{display:none}
.fma-head{display:flex;align-items:center;justify-content:space-between;padding:.6rem .6rem .6rem 1rem;background:var(--band,#f3f7fd);border-bottom:1px solid var(--lin,#d9e3f2)}
.fma-close{width:44px;height:44px;border:0;background:none;color:inherit;font-size:1.7rem;cursor:pointer;border-radius:.6rem}
.fma-log{flex:1;overflow-y:auto;padding:.8rem 1rem;display:flex;flex-direction:column;gap:.6rem;min-height:120px;overscroll-behavior:contain}
.fma-msg{max-width:92%;padding:.5rem .8rem;border-radius:.9rem;white-space:pre-wrap;overflow-wrap:anywhere}
.fma-msg.bot{align-self:flex-start;background:var(--chip,#eaf1fb)}
.fma-msg.me{align-self:flex-end;background:var(--btn,#0067c7);color:var(--btntext,#fff)}
.fma-msg.wait{color:var(--mut,#475775);font-style:italic}
.fma-msg.err{border:1px solid var(--runter,#b3361f)}
.fma-msg a{color:var(--link,#0067c7);font-weight:600}
.fma-msg.me a{color:inherit}
.fma-ex{display:flex;flex-wrap:wrap;gap:.4rem}
.fma-ex button{font:inherit;font-size:.9rem;padding:.4rem .75rem;border:1px solid var(--lin,#d9e3f2);border-radius:99rem;background:var(--flaeche,#fff);color:inherit;cursor:pointer}
.fma-form{display:flex;gap:.5rem;padding:.6rem .8rem;border-top:1px solid var(--lin,#d9e3f2)}
.fma-form textarea{flex:1;resize:none;font:inherit;font-size:16px;padding:.5rem .7rem;border:1px solid var(--lin,#d9e3f2);border-radius:.7rem;background:var(--bg,#fff);color:inherit;min-height:44px}
.fma-send{font:inherit;font-weight:600;padding:0 1rem;border:0;border-radius:.7rem;background:var(--btn,#0067c7);color:var(--btntext,#fff);cursor:pointer;min-height:44px}
.fma-send:disabled{opacity:.5;cursor:wait}
.fma-hint{margin:0;padding:.4rem 1rem .7rem;font-size:.8rem;color:var(--mut,#475775)}
@media (max-width:520px){.fma-btn{right:12px;bottom:12px}.fma-panel{right:8px;bottom:8px;width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}}
@media (prefers-color-scheme:dark){
 .fma-btn,.fma-panel{--btn:#4f8cff;--btntext:#06102a;--flaeche:#16203d;--fg:#eef2ff;--lin:#26335c;--band:#101733;--chip:#1b2850;--mut:#a9b5d3;--link:#7db3ff;--bg:#0b1020}}
@media (prefers-reduced-motion:no-preference){.fma-panel{animation:fmaup .15s ease-out}@keyframes fmaup{from{transform:translateY(8px);opacity:0}}}
