#crs-root, #crs-root * { box-sizing: border-box; }
#crs-launch {
  position: fixed; right: 22px; bottom: 22px; z-index: 2147483000;
  width: 60px; height: 60px; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; cursor: pointer;
  background: linear-gradient(135deg,#b8862b,#e8c874); color: #10141c;
  box-shadow: 0 8px 28px rgba(0,0,0,.38);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease, visibility .18s ease;
}
#crs-launch:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 12px 34px rgba(0,0,0,.44); }
#crs-launch:focus-visible, #crs-panel button:focus-visible, #crs-panel textarea:focus-visible, #crs-panel a:focus-visible { outline: 2px solid #e8c874; outline-offset: 3px; }
#crs-launch svg { width: 28px; height: 28px; }
#crs-panel {
  position: fixed; right: 22px; bottom: 92px; z-index: 2147483000;
  width: 372px; max-width: calc(100vw - 32px); height: 540px; max-height: calc(100dvh - 130px);
  display: none; flex-direction: column; overflow: hidden;
  border: 1px solid rgba(232,200,116,.22); border-radius: 16px;
  background: #0e1219; color: #e9edf4; box-shadow: 0 24px 60px rgba(0,0,0,.5);
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
#crs-panel.crs-open { display: flex; }
#crs-head { min-height: 67px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 14px 18px; border-bottom: 1px solid rgba(232,200,116,.18); background: linear-gradient(135deg,#161c27,#0e1219); }
#crs-head .crs-title { font-size: 15px; font-weight: 650; letter-spacing: .2px; }
#crs-head .crs-sub { margin-top: 3px; color: #9aa6b8; font-size: 11.5px; }
#crs-dot { width: 7px; height: 7px; display: inline-block; margin-right: 6px; border-radius: 50%; background: #3fbf6a; vertical-align: middle; }
#crs-close { flex: 0 0 auto; padding: 4px 6px; border: 0; border-radius: 8px; background: transparent; color: #9aa6b8; cursor: pointer; font-size: 22px; line-height: 1; }
#crs-close:hover { background: rgba(255,255,255,.06); color: #e9edf4; }
#crs-msgs { flex: 1; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding: 16px; }
.crs-msg { max-width: 82%; padding: 10px 13px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.crs-ai { align-self: flex-start; border: 1px solid rgba(255,255,255,.06); border-bottom-left-radius: 4px; background: #1b2230; }
.crs-user { align-self: flex-end; border-bottom-right-radius: 4px; background: linear-gradient(135deg,#b8862b,#d9b45f); color: #12151c; }
.crs-typing { align-self: flex-start; padding: 4px 6px; color: #9aa6b8; font-size: 13px; font-style: italic; }
#crs-inputbar { display: flex; gap: 8px; padding: 12px; border-top: 1px solid rgba(255,255,255,.07); background: #0b0f15; }
#crs-input { min-height: 42px; flex: 1; resize: none; max-height: 90px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: #141a24; color: #e9edf4; font: inherit; font-size: 16px; line-height: 1.4; }
#crs-input:focus { outline: 0; border-color: rgba(232,200,116,.5); }
#crs-send { min-width: 66px; border: 0; border-radius: 10px; padding: 0 15px; cursor: pointer; background: linear-gradient(135deg,#b8862b,#e8c874); color: #12151c; font-weight: 650; }
#crs-send:disabled { cursor: default; opacity: .5; }
#crs-foot { padding: 7px 10px 10px; background: #0b0f15; color: #7f8999; text-align: center; font-size: 10.5px; }
#crs-foot a { color: #d5b96f; }
body.menu-open #crs-root { visibility: hidden; pointer-events: none; }
@media (max-width: 520px) {
  #crs-launch { right: 16px; bottom: 16px; width: 56px; height: 56px; }
  #crs-panel { right: 16px; bottom: 82px; width: calc(100vw - 32px); height: min(570px, calc(100dvh - 104px)); max-height: none; }
}
@media (prefers-reduced-motion: reduce) {
  #crs-launch { transition: none; }
}
