/* src/public/css/color-palette.css … カラーパレット・ジェネレーター ＆ カラーコード変換
   ダークモードは theme-dark.css の末尾（=== カラーパレット ===）にあります。
   💡 色の見本（.cp-preview・.cp-swatch）は、選んだ色そのものなので、ダークモードでも変えません */

.cp-box { background: #fff; border: 1px solid #e3e8ef; border-radius: 12px; padding: 18px; margin-top: 18px; }
.cp-box [hidden] { display: none; }
.cp-base { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.cp-h2 { font-size: 1.05rem; color: #2a5298; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.cp-label { display: block; font-weight: bold; color: #2a5298; margin-bottom: 6px; }
.cp-hint { font-size: 0.8rem; color: #64748b; margin: 8px 0 0; line-height: 1.6; }
.cp-input-row { display: flex; gap: 8px; flex-wrap: wrap; }
.cp-picker { width: 52px; height: 44px; padding: 2px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; cursor: pointer; flex: 0 0 auto; }
.cp-text { flex: 1; min-width: 140px; padding: 10px 12px; border: 2px solid #cbd5e1; border-radius: 8px; font-family: 'SFMono-Regular', Consolas, monospace; font-size: 1rem; }
.cp-text:focus { outline: none; border-color: #3498db; }
.cp-error { margin: 6px 0 0; color: #b91c1c; font-size: 0.85rem; }
.cp-preview { margin-top: 12px; height: 120px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-family: 'SFMono-Regular', Consolas, monospace; font-size: 1.4rem; font-weight: bold; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.cp-btn { padding: 9px 14px; border: 1px solid #2a5298; border-radius: 8px; background: #2a5298; color: #fff; font-weight: bold; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.cp-mini { padding: 5px 9px; border: 1px solid #cbd5e1; border-radius: 6px; background: #f8fafc; color: #475569; cursor: pointer; }
.cp-code-list { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.cp-code-row { display: grid; grid-template-columns: 6.5em minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: #f8fafc; }
.cp-code-row dt { font-weight: bold; color: #475569; font-size: 0.85rem; }
.cp-code-row dd { margin: 0; min-width: 0; }
.cp-code-row code { font-size: 0.9rem; color: #1e293b; overflow-wrap: anywhere; }
.cp-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 0.85rem; font-weight: bold; color: #2563eb; text-decoration: none; }
.cp-link:hover { text-decoration: underline; }
.cp-status { min-height: 1.2em; font-size: 0.85rem; color: #16a34a; margin: 8px 0 0; }
.cp-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.cp-head .cp-h2 { margin: 0; }
.cp-select { padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; font-size: 0.95rem; }
.cp-swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.cp-shades { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; }
.cp-swatch-wrap { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cp-swatch { height: 96px; border: none; border-radius: 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-family: 'SFMono-Regular', Consolas, monospace; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); transition: transform 0.1s; padding: 4px; }
.cp-swatch:hover { transform: translateY(-2px); }
.cp-swatch-hex { font-weight: bold; font-size: 0.85rem; }
.cp-swatch-label { font-size: 0.72rem; opacity: 0.85; }
.cp-shades .cp-swatch { height: 72px; }
.cp-shades .cp-swatch-hex { font-size: 0.7rem; }
.cp-swatch-use { border: none; background: none; color: #64748b; font-size: 0.72rem; cursor: pointer; padding: 2px; }
.cp-swatch-use:hover { color: #2a5298; }
.cp-export { margin: 0; padding: 14px; border-radius: 8px; background: #0f172a; color: #e2e8f0; font-size: 0.85rem; line-height: 1.6; overflow-x: auto; }

@media (max-width: 760px) {
    .cp-base { grid-template-columns: minmax(0, 1fr); }
    .cp-shades { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
