.color-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: none;
  padding: 2px;
  border: 1px solid #dededd;
  border-radius: 4px;
  background: #fff;
  vertical-align: middle;
}
.color-trigger:hover,
.color-trigger[aria-expanded="true"] { background: #f2f3f2; }
.color-trigger[data-color-size="large"] { width: 36px; height: 36px; padding: 0; border-radius: 6px; }
.color-trigger > span,
.color-checker {
  background: conic-gradient(#ececeb 25%, #fff 0 50%, #ececeb 0 75%, #fff 0) 0 0 / 8px 8px;
}
.color-trigger > span { position: relative; width: 100%; height: 100%; overflow: hidden; border: 1px solid #dededd; border-radius: 3px; }
.color-trigger[data-color-size="large"] > span { border: 0; border-radius: 5px; }
.color-trigger > span::after,
.color-preview > span { position: absolute; inset: 0; background: var(--color-sample, var(--color-current-alpha)); content: ''; }
.color-picker {
  position: fixed;
  inset: auto;
  z-index: 100;
  width: min(282px, calc(100vw - 16px));
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 5px;
  overflow: visible;
  background: #fff;
  color: #1b1c1a;
  box-shadow: 0 3px 6px -4px rgb(0 0 0 / 12%), 0 6px 16px rgb(0 0 0 / 8%), 0 9px 28px 8px rgb(0 0 0 / 5%);
}
.color-picker::before {
  position: absolute;
  inset: -5px auto auto var(--color-arrow, 50%);
  width: 10px;
  height: 10px;
  transform: translateX(-50%) rotate(45deg);
  border-start-start-radius: 2px;
  background: #fff;
  content: '';
}
.color-picker[data-above]::before { inset-block: auto -5px; }
.color-picker-content {
  position: relative;
  max-height: calc(100dvh - 16px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 12px 16px;
  border-radius: 5px;
  background: #fff;
}
.color-spectrum {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, transparent), var(--color-hue);
  cursor: crosshair;
  touch-action: none;
}
.color-spectrum > span {
  position: absolute;
  left: var(--color-saturation);
  top: var(--color-value);
  width: 7px;
  height: 7px;
  transform: translate(-50%, -50%);
  border: 1px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 2px rgb(0 0 0 / 82%);
  pointer-events: none;
}
.color-sliders { display: grid; grid-template-columns: minmax(0, 1fr) 24px; gap: 4px; align-items: center; padding-block: 4px; }
.color-bars { display: grid; gap: 4px; min-width: 0; }
.color-picker input[type="range"] {
  display: block;
  width: 100%;
  height: 10px;
  min-height: 0;
  margin: 0;
  padding: 0;
  appearance: none;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}
.color-picker .color-hue { background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%); }
.color-picker .color-alpha { background: linear-gradient(to right, transparent, var(--color-current)); }
.color-picker input[type="range"]::-webkit-slider-thumb {
  width: 6px;
  height: 10px;
  appearance: none;
  border: 1px solid #fff;
  border-radius: 1px;
  background: #fff;
  box-shadow: 0 0 2px #0008;
}
.color-picker input[type="range"]::-moz-range-thumb {
  width: 4px;
  height: 8px;
  border: 1px solid #fff;
  border-radius: 1px;
  background: #fff;
  box-shadow: 0 0 2px #0008;
}
.color-preview { position: relative; width: 24px; height: 24px; border-radius: 2px; overflow: hidden; }
.color-preview::after { position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 13%); pointer-events: none; content: ''; }
.color-fields { display: grid; grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)); gap: 6px; padding-top: 4px; }
.color-fields label { min-width: 0; font-size: 11px; font-weight: 400; }
.color-fields label > span { display: block; height: 24px; color: #222; line-height: 24px; text-align: center; }
.color-fields input[type="text"] { width: 100%; min-width: 0; min-height: 0; height: 24.25px; padding: 3px 10%; border: 0; border-radius: 0; background: #fff; box-shadow: inset 0 0 0 1px #ccc; color: #1b1c1a; font-size: 11px; line-height: 17px; }
.color-fields input[type="text"]:focus-visible { outline: 1px solid #7c8278; outline-offset: -1px; }
.color-fields input[aria-invalid="true"] { outline: 1px solid #a52e42; outline-offset: -1px; }
.color-presets { display: flex; flex-wrap: wrap; gap: 0 10px; margin: 0 -10px; padding: 10px 10px 0; border-top: 1px solid #eee; }
.color-presets button { width: 16px; height: 16px; min-width: 0; min-height: 0; flex: none; margin: 0 0 10px; padding: 0; border: 0; border-radius: 3px; background: var(--color-sample); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 15%); }

.color-picker {width:250px;}
.color-picker-content {padding:10px;}
.color-picker {width:min(250px,calc(100vw - 16px));}.color-fields input[type="text"] {height:21px;line-height:15px;}.color-fields label>span {height:22.5px;line-height:22.5px;}
.color-fields label>span {height:21.5px;line-height:21.5px;}
