:root {
  --cp-shadow: 0 10px 30px rgba(0, 0, 0, .15);
  --cp-radius: 14px;
  --cp-border: 1px solid rgba(0, 0, 0, .12);
  --cp-checker-size: 10px;
  --cp-back: #121212;
  --cp-border-card: #45475a;
  --cp-text-color: #ebebeb;

}

.cp-field {
  width: 160px;
  height: 36px;
  border-radius: 4px;
  border: 1px solid #282828;
  position: relative;
  cursor: pointer;
  overflow: hidden
}

.cp-field .cp-swatch {
  position: absolute;
  inset: 0;
  border-radius: inherit
}

.cp-field .cp-value {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 12px
}

.cp-picker {
  position: absolute;
  z-index: 50;
  width: 308px;
  padding: 12px;
  border-radius: var(--cp-radius);
  background: var(--cp-back);
  box-shadow: var(--cp-shadow);
  border: 1px solid var(--cp-border-card);
  display: none;
  color: #111
}

.cp-picker .cp-row {
  display: flex;
  gap: 12px
}

.cp-sv {
  position: relative;
  width: 220px;
  height: 230px;
  border-radius: 12px;
  overflow: hidden;
  border: var(--cp-border)
}

.cp-sv .cp-white {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0))
}

.cp-sv .cp-black {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #000, rgba(0, 0, 0, 0))
}

.cp-sv .cp-cursor {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35);
  transform: translate(-7px, -7px)
}

.cp-hue,
.cp-alpha {
  position: relative;
  width: 16px;
  height: 230px;
  border-radius: 12px;
  border: var(--cp-border)
}

.cp-hue {
  background: linear-gradient(to bottom, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%)
}

.cp-alpha {
  background-image: linear-gradient(45deg, #ddd 25%, transparent 25%), linear-gradient(-45deg, #ddd 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ddd 75%), linear-gradient(-45deg, transparent 75%, #ddd 75%);
  background-size: var(--cp-checker-size)var(--cp-checker-size)
}

.cp-alpha .cp-gradient {
  position: absolute;
  inset: 0;
  border-radius: inherit
}

.cp-hue .cp-handle,
.cp-alpha .cp-handle {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -6px);
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, .35);
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2)
}

.cp-inputs {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 0.9fr);
  gap: 8px;
  margin-top: 12px;
  align-items: end
}

.cp-input {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  align-items: stretch
}

.cp-input label {
  font-size: 10px;
  color: #6b7280;
  order: 2;
  text-align: left;
  margin-top: 4px;
  padding-left: 2px
}

.cp-input input {
  height: 34px;
  background: #171717;
  border: 1px solid #282828;
  color: #fff;
  border-radius: 8px;
  padding: 0 8px;
  font-size: 13px;
  width: 100%;
  min-width: 0;
  order: 1;
  text-align: center
}

.cp-swatches {
  margin-top: 12px;
  display: flex;
  gap: 6px 8px;
  flex-wrap: wrap;
  align-items: center
}

.cp-swatches .cp-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden
}

.cp-swatches .cp-dot.cp-add {
  background: #f3f4f6;
  color: #333;
  font-size: 20px;
  font-weight: 600;
  line-height: 1
}

.cp-swatches .cp-dot span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit
}

.cp-mode {
  display: flex;
  gap: 8px;
  margin-bottom: 10px
}

.cp-mode .cp-btn {
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in oklab, #cba6f7 20%, transparent);
  cursor: pointer;
  font-size: 12px;
  color: #b3b3b3cc;
  border: none;
}

.cp-mode .cp-btn.active {
  background: color-mix(in oklab, #cba6f7 50%, transparent);
  color: #fff;
  border-color: #111
}