#buster-root{font-family:Arial,Helvetica,sans-serif;position:fixed;right:20px;bottom:20px;z-index:2147483000;color:#222}#buster-root *{box-sizing:border-box}#buster-root button,#buster-root input{font-family:inherit}#buster-toggle{display:flex;align-items:center;gap:10px;border:0;border-radius:50px;padding:8px 18px 8px 8px;background:#ba1f33;color:#fff;font-size:15px;font-weight:700;cursor:pointer;box-shadow:0 8px 24px #0004}#buster-toggle img{width:40px;height:40px;object-fit:cover;border-radius:50%;background:white}#buster-panel{width:min(390px,calc(100vw - 24px));height:min(620px,calc(100dvh - 105px));display:none;flex-direction:column;background:#fff;border:1px solid #e1e1e1;border-radius:16px;box-shadow:0 18px 55px #0004;overflow:hidden;margin-bottom:12px}#buster-root.open #buster-panel{display:flex}.buster-head{background:#242427;color:#fff;padding:12px 15px;display:flex;align-items:center;gap:11px;flex-shrink:0}.buster-head>img{width:42px;height:42px;object-fit:cover;border-radius:50%;background:#fff}.buster-head>div{flex:1}.buster-head strong{font-size:17px}.buster-head small{display:block;color:#ddd;font-size:11px;margin-top:3px}#buster-close{background:none;border:0;color:white;font-size:25px;cursor:pointer;padding:0 4px}#buster-messages{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:12px;padding:15px;background:#f6f6f7}.buster-welcome{align-self:center;background:#fff;border-radius:12px;padding:9px;border:1px solid #eee}.buster-welcome img{display:block;width:125px;max-width:100%;height:auto}.buster-row{display:flex;align-items:flex-end;gap:7px}.buster-row.user{justify-content:flex-end}.buster-row>img{width:28px;height:28px;object-fit:cover;border-radius:50%;background:#fff;flex-shrink:0}.buster-bubble{max-width:88%;border-radius:12px;padding:11px 12px;font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;background:#fff;border:1px solid #e4e4e4}.buster-row.user .buster-bubble{background:#ba1f33;color:#fff;border-color:#ba1f33}#buster-actions{display:flex;flex-wrap:wrap;gap:7px;padding:0 12px;background:#fff}#buster-actions:not(:empty){padding-top:10px;padding-bottom:10px;border-top:1px solid #eee}#buster-actions button{background:#ba1f33;border:1px solid #ba1f33;border-radius:20px;padding:9px 12px;color:white;font-size:12px;font-weight:600;cursor:pointer}#buster-actions button.buster-secondary{background:#fff;color:#333;border-color:#d6d6d6}#buster-form{display:flex;gap:8px;padding:12px;border-top:1px solid #eee;flex-shrink:0}#buster-input{flex:1;min-width:0;padding:11px;border:1px solid #c9c9c9;border-radius:9px;font-size:14px}#buster-send{background:#ba1f33;border:0;border-radius:9px;color:white;padding:0 15px;cursor:pointer;font-weight:700}#buster-send:disabled{opacity:.5}.buster-note{margin:0;padding:0 12px 12px;font-size:10px;color:#666;line-height:1.3}@media(max-width:500px){#buster-root{right:10px;bottom:10px}#buster-panel{height:min(650px,calc(100dvh - 88px))}}

/* Buster mobile layout - added November 2026 */
@media (max-width: 600px) {
  #buster-root { right: 12px; bottom: 12px; left: auto; }
  #buster-root.open #buster-panel {
    position: fixed;
    top: 8px; right: 8px; bottom: 8px; left: 8px;
    width: auto; max-width: none;
    height: calc(100dvh - 16px); max-height: none;
    margin: 0; border-radius: 14px;
    display: flex; flex-direction: column;
  }
  #buster-root.open #buster-toggle { display: none; }
  #buster-messages { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  #buster-actions { flex: 0 0 auto; max-height: 30dvh; overflow-y: auto; }
  #buster-form { flex: 0 0 auto; padding: 10px; }
  #buster-input { font-size: 16px; }
  .buster-note { flex: 0 0 auto; padding: 0 10px 10px; }
}

/* iPhone Chrome/Safari: size to the visual viewport, not the page viewport. */
@media (max-width: 600px) {
  #buster-root.open #buster-panel {
    position: fixed;
    top: calc(var(--buster-visible-top, 0px) + 8px);
    bottom: auto;
    left: 8px;
    right: 8px;
    width: auto;
    height: calc(var(--buster-visible-height, 100dvh) - 16px);
    max-height: calc(var(--buster-visible-height, 100dvh) - 16px);
    min-height: 0;
    margin: 0;
  }
  #buster-root.open #buster-messages { min-height: 0; overflow-y: auto; }
  #buster-root.open #buster-actions { max-height: 22%; overflow-y: auto; }
  #buster-root.open .buster-head { padding: 8px 12px; }
  #buster-root.open .buster-head > img { width: 34px; height: 34px; }
  #buster-root.open .buster-note { padding: 0 10px 7px; font-size: 9px; }
}
