#gtchat{--gtchat-color:#f58220;position:fixed;right:18px;bottom:18px;z-index:10000;font:15px/1.5 system-ui,sans-serif;color:#222}#gtchat *{box-sizing:border-box}#gtchat [hidden]{display:none!important}#gtchat button{cursor:pointer;border:0;border-radius:8px;padding:10px;background:var(--gtchat-color);color:#111;font:inherit}#gtchat section{width:380px;max-width:calc(100vw - 36px);height:min(640px,85dvh);background:#fff;border:1px solid #bbb;border-radius:12px;box-shadow:0 6px 35px #0004;display:flex;flex-direction:column;overflow:hidden}#gtchat header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px;background:var(--gtchat-color);font-weight:bold}#gtchat header button{flex-shrink:0;margin:0 0 0 auto;padding:4px 10px;font-size:28px;font-weight:700;line-height:1;background:transparent}#gtchat .gtchat-messages{flex:1;overflow:auto;padding:12px;min-height:0;background:#f6f6f6}#gtchat article{padding:8px 12px;border-radius:8px;background:#fff;border:1px solid #ddd;margin:8px 0;white-space:pre-wrap;overflow-wrap:anywhere}#gtchat article.gtchat-user{margin-left:20px;background:#fff2df}#gtchat article p{margin:0}#gtchat .gtchat-card{display:block;border:1px solid #ccc;margin-top:8px;padding:10px;color:#164b7b}#gtchat .gtchat-card span,#gtchat .gtchat-card small{display:block}#gtchat section>small,#gtchat section>p{padding:4px 12px;margin:0;font-size:12px}#gtchat form{padding:10px}#gtchat label{display:block}#gtchat textarea{display:block;width:100%;font:16px system-ui;padding:8px}#gtchat button:disabled{opacity:.5}#gtchat :focus-visible{outline:3px solid #1559a0;outline-offset:2px}@media(max-width:600px){#gtchat{right:10px;bottom:10px}#gtchat section{width:calc(100vw - 20px);max-width:none;height:85dvh}}@media print{#gtchat{display:none}}
#gtchat textarea:focus,
#gtchat textarea:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
}
#gtchat .gtchat-messages > button { margin: 0 8px 8px 0; }
#gtchat .gtchat-cards { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin-top: 8px; }
#gtchat .gtchat-card { width: 150px; max-width: 100%; margin-top: 0; padding: 8px; border: 1px solid #ccc; border-radius: 6px; white-space: normal; }
#gtchat .gtchat-card img { display: block; width: 100%; max-width: 100%; height: auto; margin-bottom: 8px; }
#gtchat .gtchat-card strong { display: block; font-weight: 700; }
#gtchat .gtchat-messages { position: relative; }
#gtchat .gtchat-status[data-busy="true"]::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    border: 3px solid var(--gtchat-color);
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: middle;
    animation: gtchat-spin 0.8s linear infinite;
}
@keyframes gtchat-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #gtchat .gtchat-status[data-busy="true"]::before { animation: none; } }
