.clr-wrapper { padding: 24px; background: var(--bg-surface); }
.clr-header { text-align: center; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border-color); }
.clr-title { margin: 0 0 10px 0; font-size: 1.8rem; color: var(--text-main); }
.clr-subtitle { margin: 0; color: var(--text-muted); font-size: 1rem; }

.clr-container { display: flex; gap: 24px; flex-wrap: wrap; }
.clr-panel { flex: 1; min-width: 300px; background: var(--bg-body); padding: 24px; border-radius: var(--radius-lg); border: 1px solid var(--border-color); box-shadow: 0 4px 12px rgba(0,0,0,0.02); }
.clr-panel-title { font-size: 1.1rem; font-weight: bold; color: var(--text-main); margin-bottom: 20px; border-bottom: 1px solid var(--border-color); padding-bottom: 12px; }

/* 左侧取色器 */
.clr-swatch-box { position: relative; width: 100%; height: 180px; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 24px; box-shadow: inset 0 2px 10px rgba(0,0,0,0.1); cursor: pointer; }
.clr-native-input { position: absolute; width: 200%; height: 200%; top: -50%; left: -50%; cursor: pointer; opacity: 0; }
.clr-swatch-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #3b82f6; transition: background 0.1s; pointer-events: none; }
.clr-swatch-hint { background: rgba(255,255,255,0.3); backdrop-filter: blur(4px); padding: 8px 16px; border-radius: 20px; color: #fff; font-weight: bold; font-size: 0.9rem; text-shadow: 0 1px 2px rgba(0,0,0,0.2); }

.clr-inputs { display: flex; flex-direction: column; gap: 12px; }
.clr-input-group { display: flex; align-items: center; gap: 12px; }
.clr-input-group label { width: 80px; font-weight: 600; color: var(--text-muted); font-size: 0.9rem; }
.clr-input { flex: 1; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border-color); background: var(--bg-surface); color: var(--text-main); font-family: monospace; font-size: 1.05rem; outline: none; transition: 0.2s; }
.clr-input:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(0,102,204,0.1); }

/* 右侧对比度 */
.clr-contrast-demo { padding: 32px 24px; border-radius: var(--radius-lg); background: #3b82f6; color: #ffffff; text-align: center; transition: 0.2s; margin-bottom: 24px; border: 1px solid rgba(0,0,0,0.1); }
.clr-contrast-ctrls { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; background: var(--bg-surface); padding: 16px; border-radius: var(--radius-md); border: 1px solid var(--border-color); }
.clr-ctrl-row { display: flex; justify-content: space-between; align-items: center; font-weight: 600; color: var(--text-main); }
.clr-mini-swatch { width: 40px; height: 24px; border-radius: 4px; background: #3b82f6; border: 1px solid rgba(0,0,0,0.1); }
.clr-mini-picker { width: 40px; height: 28px; padding: 0; border: none; background: transparent; cursor: pointer; border-radius: 4px; overflow: hidden; }

.clr-score-box { text-align: center; padding: 20px; background: #f8fafc; border-radius: var(--radius-md); border: 1px dashed var(--border-color); }
.clr-score-label { font-size: 0.9rem; color: var(--text-muted); font-weight: bold; text-transform: uppercase; margin-bottom: 8px; }
.clr-score-value { font-size: 2.8rem; font-weight: 900; color: var(--text-main); line-height: 1; margin-bottom: 12px; font-family: ui-monospace, monospace; }
.clr-score-badge { display: inline-block; padding: 6px 16px; border-radius: 20px; font-weight: bold; font-size: 0.95rem; }
.clr-score-badge.pass { background: #dcfce7; color: #166534; }
.clr-score-badge.fail { background: #fee2e2; color: #991b1b; }

[data-theme="dark"] .clr-panel, [data-theme="dark"] .clr-contrast-ctrls { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .clr-input { background: #0f172a; border-color: #475569; color: #f8fafc; }
[data-theme="dark"] .clr-score-box { background: #0f172a; border-color: #334155; }