.cyg-root,.cyg-root *{box-sizing:border-box}
.cyg-root{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:#f4eefc}
.cyg-fab{position:fixed;right:16px;bottom:calc(72px + env(safe-area-inset-bottom));z-index:88;display:flex;align-items:center;gap:7px;border:1px solid rgba(231,201,138,.58);border-radius:999px;padding:10px 14px 10px 10px;background:linear-gradient(135deg,#302343,#1f192e);color:#f4dfad;box-shadow:0 8px 26px rgba(23,15,35,.34);font:700 13px/1 inherit;letter-spacing:.2px;cursor:pointer;transition:transform .18s,opacity .18s}
.cyg-fab:active{transform:scale(.96)}
.cyg-fab.is-hidden{opacity:0;pointer-events:none;transform:translateY(8px)}
.cyg-fab-icon{display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:linear-gradient(135deg,#f1d89d,#c28c39);color:#2c1f3d;font-size:15px;box-shadow:0 0 0 3px rgba(231,201,138,.1)}
.cyg-panel{position:fixed;right:16px;bottom:calc(72px + env(safe-area-inset-bottom));z-index:89;display:flex;flex-direction:column;width:min(390px,calc(100vw - 24px));height:min(620px,calc(100dvh - 96px));overflow:hidden;border:1px solid rgba(231,201,138,.24);border-radius:20px;background:#181322;box-shadow:0 24px 80px rgba(12,8,20,.48);opacity:0;pointer-events:none;transform:translateY(18px) scale(.98);transform-origin:bottom right;transition:opacity .2s,transform .2s}
.cyg-panel.is-open{opacity:1;pointer-events:auto;transform:none}
.cyg-head{display:flex;align-items:center;gap:10px;min-height:62px;padding:10px 12px;background:linear-gradient(135deg,#2c203f,#241a34);border-bottom:1px solid rgba(231,201,138,.14)}
.cyg-avatar{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:13px;background:linear-gradient(135deg,#f1d89d,#bd8330);color:#2a1d3b;font-size:19px;font-weight:900}
.cyg-head-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px}
.cyg-head-copy strong{font-size:14.5px;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cyg-head-copy span{font-size:11.5px;color:#bdb0d0}
.cyg-head-copy i{display:inline-block;width:6px;height:6px;margin-right:5px;border-radius:50%;background:#75d49a;box-shadow:0 0 0 3px rgba(117,212,154,.12)}
.cyg-clear,.cyg-close{appearance:none;border:0;background:transparent;color:#bcaecf;cursor:pointer}
.cyg-clear{padding:7px 4px;font:500 11.5px/1 inherit}
.cyg-close{padding:3px 2px 5px;font:300 27px/1 inherit}
.cyg-messages{flex:1;overflow-y:auto;padding:16px 13px 10px;background:radial-gradient(circle at 100% 0,rgba(95,61,128,.16),transparent 42%),#181322;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.cyg-row{display:flex;margin:0 0 11px}
.cyg-row.is-user{justify-content:flex-end}
.cyg-bubble{max-width:86%;padding:10px 12px;border-radius:14px;background:#2a2237;color:#eee8f6;font-size:14px;line-height:1.68;word-break:break-word;white-space:normal;box-shadow:0 2px 10px rgba(0,0,0,.08)}
.cyg-row.is-agent .cyg-bubble{border-bottom-left-radius:4px}
.cyg-row.is-user .cyg-bubble{border-bottom-right-radius:4px;background:linear-gradient(135deg,#d7aa5e,#bc8131);color:#24182f}
.cyg-bubble.is-thinking{color:#a99dbb}
.cyg-row.is-agent .cyg-bubble p{margin:0 0 8px}
.cyg-row.is-agent .cyg-bubble p:last-child{margin-bottom:0}
.cyg-row.is-agent .cyg-bubble h1,.cyg-row.is-agent .cyg-bubble h2,.cyg-row.is-agent .cyg-bubble h3,.cyg-row.is-agent .cyg-bubble h4{margin:12px 0 6px;color:#fff;line-height:1.42}
.cyg-row.is-agent .cyg-bubble h1:first-child,.cyg-row.is-agent .cyg-bubble h2:first-child,.cyg-row.is-agent .cyg-bubble h3:first-child,.cyg-row.is-agent .cyg-bubble h4:first-child{margin-top:0}
.cyg-row.is-agent .cyg-bubble h1{font-size:17px}.cyg-row.is-agent .cyg-bubble h2{font-size:16px}.cyg-row.is-agent .cyg-bubble h3{font-size:15px}.cyg-row.is-agent .cyg-bubble h4{font-size:14px}
.cyg-row.is-agent .cyg-bubble strong{color:#f5d995;font-weight:800}
.cyg-row.is-agent .cyg-bubble em{color:#ded1e9}
.cyg-row.is-agent .cyg-bubble ul,.cyg-row.is-agent .cyg-bubble ol{margin:7px 0 9px;padding-left:20px}
.cyg-row.is-agent .cyg-bubble li{margin:4px 0;padding-left:1px}
.cyg-row.is-agent .cyg-bubble li::marker{color:#d4a955;font-weight:700}
.cyg-row.is-agent .cyg-bubble blockquote{margin:8px 0;padding:7px 9px;border-left:3px solid #d2a353;border-radius:0 7px 7px 0;background:rgba(231,201,138,.08);color:#dcd1e6}
.cyg-row.is-agent .cyg-bubble a{color:#f2d58f;text-decoration:underline;text-underline-offset:2px}
.cyg-row.is-agent .cyg-bubble code{padding:1px 4px;border-radius:4px;background:#17121f;color:#f3dba8;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.9em}
.cyg-row.is-agent .cyg-bubble del{color:#9e92aa}
.cyg-row.is-agent .cyg-bubble hr{margin:10px 0;border:0;border-top:1px solid rgba(231,201,138,.2)}
.cyg-card{margin:1px 0 13px;padding:13px;border:1px solid rgba(231,201,138,.28);border-radius:14px;background:linear-gradient(145deg,#30243f,#251c32);box-shadow:0 6px 22px rgba(0,0,0,.14)}
.cyg-card-top{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.cyg-card-top strong{font-size:14.5px;color:#fff}
.cyg-card-top span{flex:0 0 auto;font-size:17px;font-weight:800;color:#f0cf87}
.cyg-card p{margin:7px 0 11px;color:#c8bdd5;font-size:12.5px;line-height:1.55}
.cyg-card button{width:100%;border:0;border-radius:10px;padding:10px 12px;background:linear-gradient(135deg,#f0d28f,#c58d39);color:#2b1d39;font:800 13px/1 inherit;cursor:pointer}
.cyg-suggestions{display:flex;gap:7px;overflow-x:auto;padding:7px 12px 9px;background:#181322;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.cyg-suggestions::-webkit-scrollbar{display:none}
.cyg-suggestions button{flex:0 0 auto;max-width:220px;border:1px solid rgba(231,201,138,.28);border-radius:999px;padding:7px 10px;background:#241c31;color:#d9c9e8;font:500 12px/1.35 inherit;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
.cyg-form{display:flex;align-items:flex-end;gap:8px;padding:9px 11px 6px;border-top:1px solid rgba(231,201,138,.13);background:#21192d}
.cyg-form textarea{flex:1;min-height:39px;max-height:96px;resize:none;border:1px solid #453654;border-radius:12px;padding:9px 10px;background:#17121f;color:#f3edf8;outline:0;font:400 14px/1.45 inherit}
.cyg-form textarea:focus{border-color:#c39346;box-shadow:0 0 0 2px rgba(195,147,70,.12)}
.cyg-form textarea::placeholder{color:#80738f}
.cyg-form button{flex:0 0 auto;height:39px;border:0;border-radius:11px;padding:0 13px;background:#d0a052;color:#261a32;font:800 13px/1 inherit;cursor:pointer}
.cyg-form button:disabled{opacity:.48;cursor:not-allowed}
.cyg-note{padding:2px 12px calc(7px + env(safe-area-inset-bottom));background:#21192d;color:#776b84;text-align:center;font-size:9.5px;line-height:1.45}
@media(max-width:520px){
  .cyg-panel{right:7px;bottom:7px;width:calc(100vw - 14px);height:min(82dvh,720px);border-radius:19px;z-index:101}
  .cyg-fab{right:12px}
  .cyg-bubble{max-width:89%}
}
@media(prefers-reduced-motion:reduce){.cyg-panel,.cyg-fab{transition:none}}
