#sgai-launcher,#sgai-dialog{font-family:Montserrat,Arial,sans-serif;box-sizing:border-box;color:#1f3329;line-height:1.5}
#sgai-dialog *{box-sizing:border-box}
#sgai-launcher{position:fixed;bottom:98px;right:20px;z-index:9500;display:flex;align-items:center;gap:9px;padding:12px 17px;background:#1f3329;color:#fff;border:1px solid #94751f;border-radius:28px;font-size:12px;font-weight:500;box-shadow:0 4px 18px #0002;cursor:pointer}
#sgai-launcher:hover{background:#2b4639}
#sgai-dialog{position:fixed;right:20px;bottom:146px;width:430px;max-width:calc(100vw - 32px);height:720px;max-height:calc(100dvh - 170px);z-index:9501;background:#f9f8f6;border:1px solid #94751f;border-radius:14px;box-shadow:0 12px 48px #0003;display:flex;flex-direction:column;overflow:hidden;font-size:13px}
#sgai-dialog[hidden],#sgai-review[hidden]{display:none!important}
#sgai-dialog header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 16px;background:#1f3329;color:#fff;flex-shrink:0}
#sgai-dialog h2{font-family:Montserrat,Arial,sans-serif;font-size:15px;line-height:1.4;color:inherit;margin:0;font-weight:600}
#sgai-close{border:0;background:transparent;color:#fff;font-size:27px;padding:0 7px;cursor:pointer}
#sgai-dialog a{color:#64500f;text-decoration:underline;text-underline-offset:2px}
.sgai-disclosure{padding:10px 15px;border-bottom:1px solid #ded9ce;font-size:11px;line-height:1.55;flex-shrink:0}
.sgai-disclosure strong{font-weight:600}
#sgai-messages{min-height:80px;flex:1;overflow:auto;padding:12px 15px;overscroll-behavior:contain}
.sgai-message{padding:10px 12px;margin:0 0 10px;background:#fff;border:1px solid #e4e0d6;border-radius:9px;overflow-wrap:anywhere}
.sgai-message p{margin:3px 0 0;font-size:12px;line-height:1.65;white-space:pre-wrap}
.sgai-user{background:#e9eee9;margin-left:22px}
.sgai-label{font-size:10px;font-weight:600;color:#526758}
.sgai-ack{display:flex;align-items:flex-start;gap:8px;font-size:11px;line-height:1.5;margin:10px 0;cursor:pointer}
.sgai-ack input{width:16px;height:16px;min-width:16px;margin-top:2px;accent-color:#1f3329}
#sgai-status{margin:0;padding:0 15px;font-size:11px;line-height:1.5;color:#654f15;overflow-wrap:anywhere}
.sgai-actions{display:flex;gap:6px;flex-wrap:wrap;padding:9px 12px;flex-shrink:0}
.sgai-actions button,#sgai-review button{font-family:inherit;font-size:10px;line-height:1.4;border:1px solid #b6a56a;background:#fff;color:#1f3329;border-radius:5px;padding:7px 9px;cursor:pointer}
#sgai-form{display:flex;align-items:stretch;gap:7px;margin:0;padding:0 12px 12px;flex-shrink:0}
#sgai-input{font-family:inherit;resize:none;min-height:42px;max-height:95px;width:100%;font-size:13px;line-height:1.5;border:1px solid #c7c6bb;border-radius:7px;background:#fff;color:#1f3329;padding:9px}
#sgai-send,#sgai-review #sgai-confirm{font-family:inherit;border:0;border-radius:6px;background:#1f3329;color:#fff;font-size:11px;padding:9px 11px;cursor:pointer}
#sgai-dialog button:disabled{opacity:.5;cursor:default}
#sgai-dialog :focus-visible,#sgai-launcher:focus-visible{outline:2px solid #94751f;outline-offset:2px}
#sgai-review{padding:12px 15px;overflow:auto;max-height:65%;flex-shrink:1;min-height:140px;border-top:1px solid #c7c6bb;background:#fff}
#sgai-review h3{font-family:inherit;font-size:13px;line-height:1.5;margin:0 0 9px}
#sgai-review dl{margin:0;font-size:11px}
#sgai-review dt{font-weight:600;margin-top:5px}
#sgai-review dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
#sgai-review p{font-size:11px;margin:9px 0}
#sgai-review button{margin:3px 5px 3px 0}
.sgai-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@media(max-width:600px){#sgai-launcher{right:16px;bottom:96px;padding:11px 14px}#sgai-dialog{right:10px;bottom:84px;max-width:calc(100vw - 20px);width:430px;height:calc(100dvh - 104px);max-height:calc(100dvh - 104px)}#sgai-input{font-size:16px}.sgai-disclosure{font-size:10px;line-height:1.5;padding:8px 12px}#sgai-dialog header{padding:10px 12px}#sgai-messages{padding:10px 12px;min-height:45px}.sgai-message p{font-size:12px}}
@media(prefers-reduced-motion:reduce){#sgai-dialog *{scroll-behavior:auto!important}}

@media(max-width:600px){.sgai-actions button,#sgai-review button{min-height:36px;font-size:11px}#sgai-close{min-width:36px;min-height:36px}}

@media(max-height:600px){#sgai-dialog{top:10px;bottom:10px;height:calc(100dvh - 20px);max-height:calc(100dvh - 20px);overflow-y:auto}.sgai-disclosure{max-height:70px;overflow-y:auto}#sgai-dialog header{padding-block:9px}#sgai-messages{min-height:45px}#sgai-review{min-height:120px}}
