/* 图片取色工具 UI(中英页共用) */
.cx-toolbar {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: center;
  margin: 0 0 16px; font-size: 13px; color: var(--text2);
}
.cx-toolbar label { display: flex; align-items: center; gap: 8px; user-select: none; }
.cx-toolbar input[type="range"] { accent-color: var(--accent); width: 130px; }
.cx-count-val { font-variant-numeric: tabular-nums; min-width: 52px; }

.cx-dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center; color: var(--text2);
  cursor: pointer; transition: border-color .15s, background .15s;
  padding: 44px 20px;
}
.cx-dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.cx-dropzone .big { font-size: 16px; color: var(--text); font-weight: 500; }
.cx-dropzone kbd {
  background: var(--bg); border: 1px solid var(--border); border-bottom-width: 2px;
  border-radius: 5px; padding: 1px 6px; font-size: 12px;
}

.cx-actions { display: flex; justify-content: center; gap: 10px; margin: 16px 0 0; flex-wrap: wrap; }
.cx-actions button {
  font: inherit; font-size: 13px; font-weight: 500;
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  border-radius: 999px; padding: 8px 18px; cursor: pointer;
  transition: opacity .12s, transform .12s;
}
.cx-actions button:active { transform: scale(.97); }
.cx-actions button.primary { background: var(--dark-btn); border-color: var(--dark-btn); color: var(--bg); }
.cx-actions button.primary:hover { opacity: .88; }
.cx-actions button:disabled { opacity: .45; cursor: not-allowed; }

/* 预览图(吸管取色) */
.cx-preview-wrap { margin-top: 18px; text-align: center; }
#cxCanvas {
  max-width: 100%; max-height: 420px; border-radius: 12px;
  border: 1px solid var(--border); cursor: crosshair;
}

/* 占比条 */
.cx-strip {
  display: flex; height: 44px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border); margin-top: 18px;
}
.cx-strip:empty { display: none; }
.cx-strip-seg { min-width: 2px; }

/* 色板列表 */
.cx-list, .cx-picked { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.cx-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 8px 14px; box-shadow: var(--shadow);
  font: inherit; color: var(--text); cursor: copy; text-align: left;
  transition: border-color .12s;
}
.cx-row:hover { border-color: var(--accent); }
.cx-swatch {
  width: 44px; height: 44px; border-radius: 8px; flex: none;
  border: 1px solid rgba(0, 0, 0, .12);
}
.cx-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cx-hex { font-size: 14.5px; font-weight: 600; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.cx-badge {
  font-style: normal; font-size: 10.5px; font-weight: 600; margin-left: 8px;
  background: var(--accent-soft); color: var(--accent);
  border-radius: 999px; padding: 2px 8px; vertical-align: 2px;
}
.cx-badge.alt { background: var(--accent); color: var(--bg); }
.cx-sub { font-size: 12px; color: var(--text2); font-variant-numeric: tabular-nums; }
.cx-pct { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; flex: none; }

.cx-picked { margin-top: 16px; }
.cx-empty { text-align: center; font-size: 13px; color: var(--text2); padding: 14px 0 4px; }
.cx-status { text-align: center; font-size: 12.5px; color: var(--text2); margin-top: 12px; min-height: 18px; }
.cx-status.err { color: #d0726c; }
