/* 調色盤・配色產生器 */
.cp-main { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: end; }
.cp-main input[type=color] { width: 64px; height: 48px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.cp-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 10px; }
.cp-trio .qr-field input[type=number] { text-align: center; }
.cp-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0; }
.cp-btns .btn { width: 100%; }
.cp-swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 12px 0; }
.cp-sw { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.cp-sw.is-locked { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand) inset; }
.cp-chip { height: 96px; display: flex; flex-direction: column; justify-content: space-between; padding: 8px 12px; font-weight: 600; }
.cp-aa { font-size: 1.6rem; align-self: flex-end; line-height: 1; }
.cp-vals { display: grid; gap: 4px; padding: 8px; }
.cp-copy { min-height: 40px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); font: inherit; font-size: .95rem; font-family: ui-monospace, Consolas, monospace; color: var(--fg); cursor: pointer; padding: 0 6px; overflow-wrap: anywhere; }
.cp-copy:hover { border-color: var(--brand); }
.cp-ct { margin: 0; padding: 0 10px 8px; font-size: .9rem; color: var(--muted); display: grid; gap: 2px; }
.cp-lock { margin: 0 8px 8px; width: calc(100% - 16px); }
.cp-sample { padding: 16px; border-radius: 10px; border: 1px solid var(--line); margin: 10px 0; font-size: 1.1rem; }
.cp-sample strong { font-size: 1.5rem; display: block; }
.cp-ratio { font-size: 1.8rem; font-weight: 700; margin: .25rem 0; }
.cp-grades { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 8px 0; }
.cp-grades div { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; display: flex; justify-content: space-between; gap: 8px; }
.cp-pass { color: var(--ok); font-weight: 700; }
.cp-fail { color: var(--bad); font-weight: 700; }
.cp-css { width: 100%; min-height: 120px; font-family: ui-monospace, Consolas, monospace; font-size: .95rem; border: 1px solid var(--line); border-radius: 8px; padding: 8px; box-sizing: border-box; background: var(--soft); }
@media (max-width: 480px) { .cp-trio { grid-template-columns: repeat(3, 1fr); } .cp-grades { grid-template-columns: 1fr; } }
