[hidden] { display: none !important; }

.clr-card { padding: 28px; }
.clr-title-bar { background: linear-gradient(135deg, var(--site-dark) 0%, var(--site-dark-2) 100%); border-radius: 10px 10px 0 0; padding: 18px 24px; margin: -28px -28px 24px; }
.clr-title-bar h1 { color: #fff; margin: 0; font-size: 1.4em; text-align: center; }

.clr-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: end; margin-bottom: 18px; }
.clr-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.clr-field label { font-weight: 600; font-size: .9em; color: #374151; }
.clr-field input[type="text"], .clr-field input[type="number"], .clr-field select {
    border: 1px solid #ddd; border-radius: 8px; padding: 10px 12px; font-size: .95em; background: #fff; outline: none; transition: border-color .15s ease; width: 100%; box-sizing: border-box; color: #23272f;
}
.clr-field input[type="text"] { font-family: "Courier New", monospace; }
.clr-field input:focus, .clr-field select:focus { border-color: var(--site-light); }
.clr-field input:focus-visible, .clr-field select:focus-visible, .clr-copy:focus-visible { outline: 3px solid var(--site-light); outline-offset: 2px; }
.clr-field input[aria-invalid="true"] { border-color: #dc2626; background: #fef2f2; }
.clr-hint { font-size: .82em; color: #6b7280; margin: 0; }

.clr-swatch-wrap { border-radius: 12px; border: 1px solid #e5e7eb; height: 100%; min-height: 96px; overflow: hidden;
    background-image: linear-gradient(45deg, #d1d5db 25%, transparent 25%), linear-gradient(-45deg, #d1d5db 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #d1d5db 75%), linear-gradient(-45deg, transparent 75%, #d1d5db 75%);
    background-size: 18px 18px; background-position: 0 0, 0 9px, 9px -9px, -9px 0; background-color: #fff; }
.clr-swatch { width: 100%; height: 100%; min-height: 96px; }

.clr-panel { margin-bottom: 16px; }
.clr-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.clr-fields .clr-field[hidden] { display: none !important; }

.clr-error { color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 10px 14px; font-size: .9em; margin: 0 0 16px; }

.clr-outputs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.clr-out-row { display: flex; align-items: center; gap: 12px; background: #f7f8fa; border: 1px solid #eee; border-radius: 8px; padding: 9px 12px; }
.clr-out-label { flex: 0 0 58px; font-weight: 700; font-size: .82em; color: #374151; }
.clr-out-value { flex: 1 1 auto; font-family: "Courier New", monospace; font-size: .92em; color: #23272f; word-break: break-all; background: none; padding: 0; min-width: 0; }
.clr-copy { background: #fff; border: 1px solid var(--site-light); border-radius: 8px; padding: 6px 12px; flex-shrink: 0; color: var(--site-dark); font-weight: 600; font-size: .85em; cursor: pointer; transition: background .2s ease, color .2s ease; }
.clr-copy:hover { background: #f0fdfa; }
.clr-copy.copied { color: var(--site-success); border-color: var(--site-success); }

.clr-css { border-top: 1px dashed #d1d5db; padding-top: 18px; }
.clr-css-title { font-weight: 700; font-size: .95em; color: #23272f; margin: 0 0 12px; }
.clr-css .clr-field { margin-bottom: 12px; }

@media (max-width: 600px) {
    .clr-card { padding: 22px 18px; }
    .clr-title-bar { margin: -22px -18px 20px; }
    .clr-top { grid-template-columns: 1fr; }
    .clr-swatch-wrap { min-height: 72px; }
    .clr-swatch { min-height: 72px; }
    .clr-fields { grid-template-columns: 1fr 1fr; }
    .clr-out-label { flex-basis: 48px; }
    .clr-out-value { font-size: .84em; }
}
