.kobe-float {
  position: fixed;
  left: 12px;
  bottom: 20px;
  z-index: 997;
}

.kobe-trigger {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  background: linear-gradient(135deg, #2c5db4 0%, #1e3d6e 100%);
  box-shadow: 0 10px 24px rgba(30, 61, 110, 0.28);
}

#_kobe_panel {
  position: fixed;
  left: 12px;
  bottom: 94px;
  width: 330px;
  max-width: calc(100vw - 84px);
  max-height: 440px;
  z-index: 997;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
  display: none;
  overflow: hidden;
}

#_kobe_panel.is-open {
  display: flex;
  flex-direction: column;
}

#_kobe_panel .kobe-panel-header {
  padding: 12px 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  background: linear-gradient(135deg, #2c5db4 0%, #1e3d6e 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#_kobe_panel .kobe-panel-close {
  border: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

#_kobe_panel .kobe-panel-body {
  padding: 14px;
  overflow-y: auto;
  font-size: 14px;
  color: #1f2937;
  line-height: 1.6;
}

#_kobe_panel .kobe-panel-body p {
  margin: 0 0 0.5em 0;
}

#_kobe_panel .kobe-panel-body p:last-child {
  margin-bottom: 0;
}

#_kobe_panel .kobe-panel-cta {
  display: none;
  border-top: 1px solid #e5e7eb;
  padding: 12px 14px 14px;
}

#_kobe_panel .kobe-cta-btn {
  display: block;
  width: 100%;
  border-radius: 8px;
  text-decoration: none;
  text-align: center;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 12px;
  background: linear-gradient(135deg, #2c5db4 0%, #1e3d6e 100%);
}

#_kobe_panel .kobe-chart-area {
  display: none;
  border-top: 1px solid #e5e7eb;
  padding: 10px 14px;
}

#_kobe_panel .kobe-chart-title {
  font-size: 12px;
  color: #374151;
  font-weight: 700;
  margin-bottom: 8px;
}

#_kobe_panel .kobe-chart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

#_kobe_panel .kobe-chart-table th,
#_kobe_panel .kobe-chart-table td {
  border: 1px solid #e5e7eb;
  padding: 6px;
}

/* Inline summary cards (rendered from JSON in message text) */
#_kobe_panel .kobe-inline-cards {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0;
}
#_kobe_panel .kobe-inline-card {
  flex: 1 1 0;
  min-width: 80px;
  background: linear-gradient(135deg, #f0f5ff 0%, #e8eef9 100%);
  border: 1px solid #d4dff0;
  border-radius: 8px;
  padding: 10px 10px 8px;
  text-align: center;
}
#_kobe_panel .kobe-inline-card-label {
  display: block;
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 4px;
}
#_kobe_panel .kobe-inline-card-value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #1e3d6e;
}
/* Inline bar chart */
#_kobe_panel .kobe-inline-bars {
  margin: 8px 0;
}
#_kobe_panel .kobe-inline-bar-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}
#_kobe_panel .kobe-inline-bar-label {
  flex: 0 0 60px;
  font-size: 11px;
  color: #374151;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#_kobe_panel .kobe-inline-bar-track {
  flex: 1;
  height: 14px;
  background: #e5e7eb;
  border-radius: 7px;
  overflow: hidden;
}
#_kobe_panel .kobe-inline-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2c5db4, #4a7fd7);
  border-radius: 7px;
  transition: width 0.4s ease;
}
#_kobe_panel .kobe-inline-bar-val {
  flex: 0 0 32px;
  font-size: 11px;
  color: #374151;
  font-weight: 600;
}
/* Inline pie list */
#_kobe_panel .kobe-inline-pie-list {
  margin: 8px 0;
  padding-left: 18px;
  font-size: 12px;
  color: #374151;
}
#_kobe_panel .kobe-inline-pie-list li {
  margin-bottom: 3px;
}
/* Inline JSON fallback */
#_kobe_panel .kobe-inline-json {
  white-space: pre-wrap;
  font-size: 11px;
  color: #6b7280;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px 10px;
  margin: 8px 0;
  overflow-x: auto;
}

#_kobe_panel .kobe-panel-ruby-hint {
  border-top: 1px solid #e5e7eb;
  font-size: 12px;
  color: #6b7280;
  padding: 10px 14px 14px;
}

#_kobe_panel .kobe-ruby-link {
  color: #2c5db4;
  text-decoration: none;
  font-weight: 700;
}

@media (max-width: 1000px) {
  .kobe-float {
    left: 8px;
    bottom: 18px;
  }
  .kobe-trigger {
    width: 56px;
    height: 56px;
    font-size: 10px;
  }
  #_kobe_panel {
    left: 8px;
    bottom: 84px;
    width: 286px;
    max-width: calc(100vw - 64px);
  }
}

