.cm-feedback-button {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 900;
  border: 0;
  border-radius: 8px;
  background: #4f46e5;
  color: #fff;
  font: 700 14px/1 system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  padding: 12px 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
  cursor: pointer;
}

.cm-feedback-button:hover { background: #4338ca; }

.cm-feedback-overlay {
  position: fixed;
  inset: 0;
  z-index: 901;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 22px;
  background: rgba(15, 23, 42, 0.36);
}

.cm-feedback-overlay[hidden] { display: none; }

.cm-feedback-dialog {
  width: min(100%, 420px);
  background: #fff;
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  padding: 18px;
  font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
}

.cm-feedback-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.cm-feedback-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.cm-feedback-close {
  width: 32px;
  height: 32px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font: 700 18px/1 system-ui, sans-serif;
  cursor: pointer;
}

.cm-feedback-form {
  display: grid;
  gap: 10px;
}

.cm-feedback-note {
  margin: 0;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  line-height: 1.55;
  padding: 8px 10px;
}

.cm-feedback-form label {
  display: grid;
  gap: 5px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.cm-feedback-form select,
.cm-feedback-form input,
.cm-feedback-form textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  padding: 9px 10px;
}

.cm-feedback-form textarea {
  min-height: 128px;
  resize: vertical;
}

.cm-feedback-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.cm-feedback-status {
  min-height: 18px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.cm-feedback-status.ok { color: #047857; }
.cm-feedback-status.err { color: #dc2626; }

.cm-feedback-submit {
  border: 0;
  border-radius: 8px;
  background: #4f46e5;
  color: #fff;
  font: 700 14px/1 system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  padding: 10px 14px;
  cursor: pointer;
}

.cm-feedback-submit:disabled {
  opacity: 0.62;
  cursor: default;
}

@media (max-width: 640px) {
  .cm-feedback-button {
    right: 14px;
    bottom: 14px;
  }

  .cm-feedback-overlay {
    align-items: flex-end;
    padding: 12px;
  }
}
