/* ===== IntelligentHost chat ===== */
.ihc-launch{position:fixed;right:20px;bottom:20px;z-index:60;width:60px;height:60px;border-radius:50%;border:0;cursor:pointer;background:var(--brand,#dc2626);color:#fff;display:grid;place-items:center;box-shadow:0 14px 34px -10px rgba(220,38,38,.7),0 4px 14px rgba(0,0,0,.5);transition:transform .2s ease,background .2s ease}
.ihc-launch:hover{transform:scale(1.06);background:#b91c1c}
.ihc-launch svg{width:28px;height:28px}
.ihc-launch .ihc-dot{position:absolute;top:6px;right:6px;width:12px;height:12px;border-radius:50%;background:#fff;border:2px solid var(--brand,#dc2626)}
.ihc-launch.open .ihc-dot{display:none}
.ihc-teaser{position:fixed;right:20px;bottom:92px;z-index:60;max-width:240px;background:#fff;color:#0a0a0a;border-radius:16px 16px 4px 16px;padding:12px 34px 12px 14px;font-size:14px;font-weight:600;box-shadow:0 14px 34px -12px rgba(0,0,0,.6);cursor:pointer;animation:ihcIn .4s ease both}
.ihc-teaser button{position:absolute;top:6px;right:8px;border:0;background:transparent;font-size:16px;line-height:1;cursor:pointer;color:#555}

.ihc-panel{position:fixed;right:20px;bottom:92px;z-index:61;width:380px;max-width:calc(100vw - 32px);height:min(600px,calc(100vh - 120px));display:flex;flex-direction:column;background:#111;border:1px solid #2a2a2a;border-radius:22px;overflow:hidden;box-shadow:0 30px 80px -20px rgba(0,0,0,.9),0 0 0 1px rgba(220,38,38,.08);color:var(--ink,#f5f5f5);font-family:inherit;opacity:0;transform:translateY(16px) scale(.98);pointer-events:none;transition:opacity .25s ease,transform .25s ease}
.ihc-panel.open{opacity:1;transform:none;pointer-events:auto}
.ihc-head{display:flex;align-items:center;gap:12px;padding:16px 16px 14px;background:linear-gradient(135deg,#0a0a0a,#3b0d0d);border-bottom:1px solid #2a2a2a}
.ihc-mark{width:36px;height:36px;flex:none;border-radius:10px;background:#fff;display:grid;place-items:center}
.ihc-mark{background:#fafafa}
.ihc-mark svg{width:28px;height:28px;display:block}
.ihc-head b{display:block;font-size:15px;letter-spacing:-.01em}
.ihc-head small{display:flex;align-items:center;gap:6px;color:#bdbdbd;font-size:12px}
.ihc-head small::before{content:"";width:7px;height:7px;border-radius:50%;background:#22c55e}
.ihc-close{margin-left:auto;border:0;background:rgba(255,255,255,.08);color:#fff;width:32px;height:32px;border-radius:50%;cursor:pointer;font-size:18px;line-height:1}
.ihc-close:hover{background:rgba(255,255,255,.16)}

.ihc-body{flex:1;overflow-y:auto;padding:16px 14px 8px;display:flex;flex-direction:column;gap:10px;scroll-behavior:smooth}
.ihc-msg{max-width:86%;padding:10px 13px;border-radius:16px;font-size:14.5px;line-height:1.5;white-space:pre-line;animation:ihcIn .3s ease both;overflow-wrap:anywhere}
.ihc-bot{align-self:flex-start;background:#1e1e1e;border:1px solid #2a2a2a;border-bottom-left-radius:4px}
.ihc-user{align-self:flex-end;background:var(--brand,#dc2626);color:#fff;border-bottom-right-radius:4px}
.ihc-msg b{color:#fff}
@keyframes ihcIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.ihc-chips{display:flex;flex-wrap:wrap;gap:8px;animation:ihcIn .3s ease both}
.ihc-chip{border:1px solid #3a3a3a;background:#161616;color:#f5f5f5;border-radius:999px;padding:8px 13px;font:inherit;font-size:13.5px;font-weight:600;cursor:pointer;text-decoration:none;transition:border-color .2s,background .2s}
.ihc-chip:hover{border-color:var(--brand,#dc2626);background:rgba(220,38,38,.12)}
.ihc-chip.primary{background:var(--brand,#dc2626);border-color:var(--brand,#dc2626);color:#fff}
.ihc-chip.primary:hover{background:#b91c1c}
.ihc-chip.on{background:var(--brand,#dc2626);border-color:var(--brand,#dc2626);color:#fff}
.ihc-chip:disabled{opacity:.45;cursor:default}
.ihc-note{font-size:12px;color:#a3a3a3;margin-top:-2px}
.ihc-typing{align-self:flex-start;display:flex;gap:4px;padding:12px 14px;background:#1e1e1e;border:1px solid #2a2a2a;border-radius:16px;border-bottom-left-radius:4px}
.ihc-typing i{width:7px;height:7px;border-radius:50%;background:#8a8a8a;animation:ihcDot 1s infinite}
.ihc-typing i:nth-child(2){animation-delay:.15s}.ihc-typing i:nth-child(3){animation-delay:.3s}
@keyframes ihcDot{50%{opacity:.25;transform:translateY(-3px)}}

.ihc-card{align-self:stretch;background:#1a1a1a;border:1px solid #2a2a2a;border-radius:16px;padding:14px;animation:ihcIn .3s ease both}
.ihc-card .ihc-sum{display:flex;gap:10px;align-items:center;padding:10px 12px;border-radius:12px;background:rgba(220,38,38,.12);border:1px solid rgba(220,38,38,.35);font-size:13.5px;margin-bottom:12px}
.ihc-card .ihc-sum b{display:block;font-size:14.5px}
.ihc-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.ihc-field{display:flex;flex-direction:column;gap:4px;margin-bottom:9px}
.ihc-field label{font-size:12px;font-weight:600;color:#bdbdbd}
.ihc-field input,.ihc-field textarea{width:100%;background:#0f0f0f;border:1px solid #333;border-radius:10px;color:#f5f5f5;padding:9px 11px;font:inherit;font-size:14px;outline:none}
.ihc-field textarea{resize:none;height:58px}
.ihc-field input:focus,.ihc-field textarea:focus{border-color:var(--brand,#dc2626)}
.ihc-field input.bad{border-color:#f87171}
.ihc-seg{display:flex;gap:6px}
.ihc-seg .ihc-chip{flex:1;text-align:center;padding:8px 6px}
.ihc-submit{width:100%;margin-top:4px;border:0;border-radius:999px;background:var(--brand,#dc2626);color:#fff;font:inherit;font-weight:700;font-size:15px;padding:12px;cursor:pointer}
.ihc-submit:disabled{opacity:.6;cursor:default}
.ihc-err{color:#fca5a5;font-size:13px;margin-top:8px}

.ihc-foot{display:flex;gap:8px;padding:10px 12px 12px;border-top:1px solid #222;background:#0e0e0e}
.ihc-foot input{flex:1;min-width:0;background:#1a1a1a;border:1px solid #2e2e2e;border-radius:999px;color:#f5f5f5;padding:11px 15px;font:inherit;font-size:14.5px;outline:none}
.ihc-foot input:focus{border-color:var(--brand,#dc2626)}
.ihc-send{flex:none;width:44px;height:44px;border-radius:50%;border:0;background:var(--brand,#dc2626);color:#fff;cursor:pointer;display:grid;place-items:center}
.ihc-send svg{width:18px;height:18px}

@media (max-width:520px){
  .ihc-panel{right:0;left:0;bottom:0;width:100%;max-width:none;height:min(88vh,calc(100vh - 40px));border-radius:22px 22px 0 0}
  .ihc-launch{right:16px;bottom:16px;width:56px;height:56px}
  .ihc-launch.open{display:none}
  .ihc-teaser{right:16px;bottom:84px}
  .ihc-row{grid-template-columns:1fr}
}
@media (prefers-reduced-motion:reduce){.ihc-panel,.ihc-msg,.ihc-chips,.ihc-card,.ihc-teaser{transition:none;animation:none}}