/* Kabugami AI Dot (single-source, bottom-right) */
#kabugami-ai-dot{
  position: fixed !important;
  right: 24px !important;
  bottom: 24px !important;
  left: auto !important;
  top: auto !important;

  width: 42px !important;
  height: 42px !important;
  border-radius: 50% !important;

  background: radial-gradient(circle at 40% 40%, #5a8ee0, #0e1c3a 70%);
  border: 1px solid rgba(160, 200, 255, 0.25) !important;
  box-shadow: 0 0 18px rgba(90, 142, 224, 0.35), inset 0 2px 8px rgba(255,255,255,0.12);

  cursor: pointer !important;
  z-index: 2147483647 !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;

  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

#kabugami-ai-dot:hover{
  transform: scale(1.12) !important;
  box-shadow: 0 0 32px rgba(90, 142, 224, 0.55), inset 0 2px 8px rgba(255,255,255,0.12);
}

#kabugami-ai-dot.kabugami-mcp-ok{
  border-color: rgba(141, 240, 190, 0.75) !important;
}

#kabugami-ai-dot.kabugami-mcp-fail{
  border-color: rgba(255, 159, 167, 0.75) !important;
}

/* Center label */
#kabugami-ai-dot span{
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;

  color: #d0e0ff !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  font-family: 'Helvetica Neue', Arial, sans-serif !important;
  text-shadow: 0 0 6px rgba(208, 224, 255, 0.5) !important;

  pointer-events: none !important;
}

/* Construction panel */
#kabugami-ai-panel{
  position: fixed;
  right: 24px;
  bottom: 78px;
  width: min(360px, calc(100vw - 32px));
  background: linear-gradient(180deg, #172645, #101a31);
  color: #d9e6ff;
  border: 1px solid rgba(116, 155, 227, 0.42);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.36);
  padding: 12px;
  z-index: 2147483647;
  display: none;
}

#kabugami-ai-panel.is-open{
  display: block;
}

#kabugami-ai-panel .kbg-title{
  font-size: 13px;
  font-weight: 700;
  color: #b8ceff;
  margin: 0 0 8px 0;
}

#kabugami-ai-panel .kbg-body{
  font-size: 12px;
  line-height: 1.6;
  color: #d9e6ff;
  margin: 0 0 10px 0;
}

#kabugami-ai-panel .kbg-actions{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

#kabugami-ai-panel .kbg-btn{
  border: 1px solid rgba(155, 186, 245, 0.5);
  background: #1d2f58;
  color: #e1ebff;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1;
  padding: 8px 10px;
  text-decoration: none;
  cursor: pointer;
}

#kabugami-ai-panel .kbg-btn:hover{
  background: #24396b;
}

#kabugami-ai-panel .kbg-btn-primary{
  border-color: rgba(141, 240, 190, 0.7);
  background: #163a43;
}

#kabugami-ai-panel .kbg-btn-primary:hover{
  background: #1d4b57;
}

@media (max-width: 640px){
  #kabugami-ai-dot{
    right: 16px !important;
    bottom: 16px !important;
  }
  #kabugami-ai-panel{
    right: 16px;
    bottom: 66px;
  }
}

/* Mini mode (optional): add body class "kabugami-ai-dot-mini" */
body.kabugami-ai-dot-mini #kabugami-ai-dot{
  width: 24px !important;
  height: 24px !important;
  right: 20px !important;
  bottom: 20px !important;
}

body.kabugami-ai-dot-mini #kabugami-ai-dot span{
  font-size: 12px !important;
}