/* Sahayak: GenCA's AI doubt solver (floating chat) */
#sy{font-family:Poppins,'Plus Jakarta Sans',Arial,sans-serif}
#sy-btn{position:fixed;right:24px;bottom:calc(24px + env(safe-area-inset-bottom,0px));width:62px;height:62px;border-radius:50%;background:linear-gradient(135deg,#6B1424,#4E0F1C);box-shadow:0 8px 24px rgba(78,15,28,.45);display:flex;align-items:center;justify-content:center;z-index:55;border:2px solid #D9B25A;cursor:pointer;padding:0;transition:transform .2s}
#sy-btn:hover{transform:scale(1.06)}#sy-btn span{font-size:30px;line-height:1}
#sy.open #sy-btn{transform:scale(.92)}
#sy-box{position:fixed;right:24px;bottom:calc(100px + env(safe-area-inset-bottom,0px));width:370px;max-width:calc(100vw - 32px);height:600px;max-height:calc(100vh - 130px);max-height:calc(100dvh - 130px);background:#FBF8F2;border-radius:18px;box-shadow:0 18px 50px rgba(43,16,21,.35);z-index:56;display:flex;flex-direction:column;overflow:hidden;border:1px solid #e8dcc4;animation:syin .2s ease-out}
#sy-box[hidden]{display:none}
@keyframes syin{from{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:none}}
#sy-h{background:linear-gradient(135deg,#6B1424,#4E0F1C);color:#fff;padding:14px 16px;display:flex;align-items:center;gap:10px;flex:none}
#sy-h .av{width:38px;height:38px;border-radius:50%;background:#D9B25A;display:flex;align-items:center;justify-content:center;font-size:20px;flex:none}
#sy-h b{font-size:16px;display:block;line-height:1.2}#sy-h small{color:#F2D488;font-size:11px}
#sy-h .x{margin-left:auto;font-size:20px;opacity:.8;background:none;border:0;color:#fff;cursor:pointer;padding:4px 6px;line-height:1}#sy-h .x:hover{opacity:1}
#sy-m{flex:1;padding:14px;overflow-y:auto;display:flex;flex-direction:column;gap:10px;font-size:13.5px;line-height:1.45;overscroll-behavior:contain}
#sy-m .u{align-self:flex-end;background:#6B1424;color:#fff;padding:9px 12px;border-radius:14px 14px 4px 14px;max-width:80%;white-space:pre-wrap;word-wrap:break-word}
#sy-m .a{align-self:flex-start;background:#fff;color:#2B1015;padding:10px 12px;border-radius:14px 14px 14px 4px;max-width:88%;border:1px solid #eadfca;word-wrap:break-word}
#sy-m .a ul{margin:4px 0 4px 18px;padding:0}#sy-m .a li{margin:2px 0}#sy-m .a b{color:#4E0F1C}
#sy-m .a.err{background:#fff8ec;border-color:#ecd7a8}
#sy-m .chips{display:flex;gap:6px;flex-wrap:wrap;flex-shrink:0}
#sy-m .chips button{font:inherit;font-size:11.5px;border:1px solid #D9B25A;color:#8C641E;border-radius:20px;padding:4px 10px;background:#fff;cursor:pointer}
#sy-m .chips button:hover{background:#F2D488;color:#4E0F1C}
#sy-m .dots{display:inline-flex;gap:4px;padding:4px 2px}#sy-m .dots i{width:7px;height:7px;border-radius:50%;background:#C9A24E;animation:sydot 1.2s infinite ease-in-out}
#sy-m .dots i:nth-child(2){animation-delay:.15s}#sy-m .dots i:nth-child(3){animation-delay:.3s}
@keyframes sydot{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
#sy-i{display:flex;gap:8px;padding:10px;border-top:1px solid #eadfca;background:#fff;flex:none;margin:0}
#sy-q{flex:1;min-width:0;border:1px solid #e3d6bd;border-radius:22px;padding:9px 14px;color:#2B1015;font:inherit;font-size:16px;outline:none;background:#fff;height:40px;box-sizing:border-box}
#sy-q:focus{border-color:#D9B25A}#sy-q::placeholder{color:#9a8a80}
@media (min-width:600px){#sy-q{font-size:13.5px}}
#sy-send{width:40px;height:40px;border-radius:50%;background:#6B1424;color:#fff;display:flex;align-items:center;justify-content:center;border:0;cursor:pointer;font-size:15px;flex:none}
#sy-send:disabled{opacity:.5;cursor:default}
#sy-f{font-size:10.5px;color:#8a7a70;text-align:center;padding:0 10px 8px;background:#fff;flex:none}
@media (max-width:599px){
 #sy-btn{right:16px;bottom:calc(16px + env(safe-area-inset-bottom,0px));width:58px;height:58px}
 #sy-box{right:8px;left:8px;width:auto;max-width:none;bottom:calc(84px + env(safe-area-inset-bottom,0px));height:calc(100vh - 150px);height:calc(100dvh - 150px);max-height:640px}
}
@media print{#sy{display:none}}
