.cp-container {
  width: auto;
  position: relative;
  box-sizing: border-box;
  font-family: sans-serif;
}

.cp-container .cp-slider,
.cp-container .cp-preview {
  height:28px;
  border: 1px solid #dadada;
  margin: 0 4px 8px;
  position: relative;
  box-sizing: border-box;
}

.cp-container .cp-slider {
  cursor: ew-resize;
  user-select: none;
  border-radius: 5px;
}

.cp-container .cp-preview {
  height: 39px;
}

.cp-container .cp-slider span,
.cp-container .cp-preview input {
  display: block;
  width: 100%;
  height: 100%;
  text-align: center;
  line-height: 28px;
  font-size: 14px;
  color: #fff; /* 文字色は常に白（必要ならJS側でコントラスト判定を追加できます） */
}

.cp-container .cp-preview input {
  padding: 0;
  outline: none;
  border: none;
  background: none;
  border-radius: 5px;
}

.cp-container .cp-marker {
  position: absolute;
  display: block;
  width: 11px;
  height: 10px;
  margin-left: -5px;
  top: -2px;
  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAMAAABVLlSxAAAAtFBMVEUAAAB1dXVsbGxwcHBqampoaGj+/v7r6+vw8PBmZmb6+vp/f39kZGTh4eGxsbHT09NlZWXX19dgYGBfX1/W1tb7+/vx8fHZ2dna2tqBgYFnZ2fg4ODe3t7j4+Pi4uL39/eampro6Ojl5eXy8vLt7e3p6emgoKCmpqatra1ra2v19fXm5ubz8/Pv7+9hYWFjY2N5eXlvb29zc3Ps7Ozd3d2ysrKCgoKDg4P9/f2zs7P4+Pj///83Bdu/AAAAAXRSTlMAQObYZgAAAGlJREFUeNo9ylcbgWAAhuG3ZZQoEkkhDe099P3//9Xg6j56Dh6cjkm623IsnTNIDsqlEsN1HBVI5evdDMtN0FOQKt14lWrArzLcnpZjvx9nshcA342jviO1hlHuTdlgVnzIt8VfNubiNwzmhAsoIAkssgAAAABJRU5ErkJggg==)
    no-repeat;
}

.color1,
.color2{
    margin-bottom: 30px;
}

/* ===== 2カラム ===== */
.cp-container .cp-sliders{
  display:flex;
  gap:12px;            /* 間のスペース */
  align-items:stretch;
}

/* 左：プレビュー（30% 正方形） */
.cp-container .cp-preview{
  flex:0 0 25%;
  aspect-ratio:2 / 1;
  height:auto;         /* 既存heightを無効化 */
  margin:0;
}

/* プレビュー入力を中央寄せ */
.cp-container .cp-preview input{
  height:100%;
  line-height:1.2;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: bolder;
}

/* 右：スライダー（70%） */
.cp-container .cp-right{
  flex:1 1 75%;
  display:flex;
  flex-direction:column;
  gap:8px;
}

/* スライダーの余計なmarginを消して右側gapに任せる */
.cp-container .cp-right .cp-slider{
  margin:0;
}



/* スウォッチ（右カラムの下） */
.cp-container .cp-swatches{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
}

.cp-container .cp-swatch{
  width:22px;
  height:22px;
  border:1px solid #bbb;
  border-radius:6px;
  cursor:pointer;
  padding:0;
  background:#fff;
}

.cp-container .cp-swatch.is-active{
  outline:2px solid #333;
  outline-offset:2px;
}
