.image-tool {
  gap: 14px;
}

.image-tool-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #edf0ef;
  padding-bottom: 11px;
}

.image-tool-heading h2 {
  margin: 0;
  color: #253330;
  font-size: 18px;
  line-height: 1.4;
}

.image-tool-local-badge {
  border: 1px solid #b8e5dd;
  background: #f3fbfa;
  color: #168d80;
  font-size: 12px;
  line-height: 1;
  padding: 6px 8px;
}

.image-file-field {
  max-width: 100%;
}

.image-tool .browser-field > span {
  font-size: 14px;
}

.image-tool input[type="file"] {
  padding: 9px;
  background: #fff;
}

.image-tool input[type="range"] {
  accent-color: #16baaa;
}

.image-tool-toolbar,
.image-editor-toolbar,
.image-tool-controls {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.image-tool-toolbar {
  align-items: center;
  border: 1px solid #e3ebe9;
  background: #fbfdfd;
  padding: 10px 12px;
}

.image-tool-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
  color: #455650;
  font-size: 13px;
}

.image-tool-toolbar input[type="range"] {
  width: 150px;
}

.image-viewer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 18px;
  border: 1px solid #e3ebe9;
  background: #fbfdfd;
  padding: 10px 12px;
}

.image-viewer-zoom {
  display: flex;
  align-items: center;
  flex: 1 1 510px;
  gap: 8px;
  min-width: 0;
  color: #455650;
  font-size: 13px;
}

.image-viewer-zoom input[type="range"] {
  flex: 1 1 180px;
  min-width: 120px;
}

.image-viewer-zoom output {
  flex: 0 0 116px;
  color: #687a74;
  font-size: 12px;
  text-align: center;
}

.image-viewer-zoom button,
.image-viewer-icon-button {
  min-height: 36px;
  border: 1px solid #d9e4e1;
  background: #fff;
  color: #33443f;
  padding: 7px 11px;
  cursor: pointer;
}

.image-viewer-zoom button:hover,
.image-viewer-zoom button:focus-visible,
.image-viewer-icon-button:hover,
.image-viewer-icon-button:focus-visible {
  border-color: #16baaa;
  color: #117b70;
}

.image-viewer-icon-button {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  padding: 0;
}

.image-viewer-backgrounds {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.image-viewer-backgrounds legend {
  float: left;
  margin-right: 4px;
  color: #455650;
  font-size: 13px;
}

.image-viewer-swatch {
  position: relative;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border: 1px solid #cfdad7;
  background: var(--viewer-swatch, #fff);
  padding: 0;
  cursor: pointer;
}

.image-viewer-swatch::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid transparent;
  pointer-events: none;
}

.image-viewer-swatch[aria-pressed="true"]::after {
  border-color: #16baaa;
}

.image-viewer-swatch.is-checker {
  background-color: #f7faf9;
  background-image: linear-gradient(45deg, #dce5e2 25%, transparent 25%), linear-gradient(-45deg, #dce5e2 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #dce5e2 75%), linear-gradient(-45deg, transparent 75%, #dce5e2 75%);
  background-position: 0 0, 0 7px, 7px -7px, -7px 0;
  background-size: 14px 14px;
}

.image-viewer-swatch.is-light {
  --viewer-swatch: #eef1f0;
}

.image-viewer-swatch.is-dark {
  --viewer-swatch: #505957;
}

.image-viewer-swatch.is-black {
  --viewer-swatch: #111514;
}

.image-viewer-custom-color {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #687a74;
  font-size: 12px;
}

.image-viewer-custom-color input[type="color"] {
  width: 34px;
  height: 30px;
  border: 1px solid #cfdad7;
  background: #fff;
  padding: 2px;
  cursor: pointer;
}

.image-viewer-custom-color.is-active input[type="color"] {
  outline: 2px solid #16baaa;
  outline-offset: 2px;
}

.image-tool-toolbar button,
.image-size-presets button {
  min-height: 40px;
  border: 1px solid #d9e4e1;
  background: #fff;
  color: #33443f;
  padding: 8px 13px;
  cursor: pointer;
}

.image-tool-toolbar button:hover,
.image-size-presets button:hover {
  border-color: #16baaa;
  color: #117b70;
}

.image-viewer-stage,
.image-crop-stage,
.image-single-preview,
.image-result-preview {
  background-color: #f7faf9;
  background-image: linear-gradient(45deg, #edf2f0 25%, transparent 25%), linear-gradient(-45deg, #edf2f0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #edf2f0 75%), linear-gradient(-45deg, transparent 75%, #edf2f0 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}

.image-viewer-stage {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(360px, 58vh, 620px);
  overflow: hidden;
  border: 1px solid #dce6e3;
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  touch-action: none;
}

.image-viewer-stage[data-background="white"] {
  background: #fff;
}

.image-viewer-stage[data-background="light"] {
  background: #eef1f0;
}

.image-viewer-stage[data-background="dark"] {
  background: #505957;
}

.image-viewer-stage[data-background="black"] {
  background: #111514;
}

.image-viewer-stage[data-background="custom"] {
  background: var(--image-viewer-background, #d8dfdc);
}

.image-viewer-stage canvas {
  display: block;
  max-width: none;
  max-height: none;
  cursor: default;
  transform-origin: center center;
  user-select: none;
}

.image-viewer-stage canvas.is-pannable {
  cursor: grab;
}

.image-viewer-stage canvas.is-pannable:active {
  cursor: grabbing;
}

.image-viewer-stage:focus-visible {
  outline: 2px solid #16baaa;
  outline-offset: 2px;
}

.image-viewer-stage p,
.image-crop-stage p {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: #8a9994;
}

.image-viewer-stage p[hidden],
.image-crop-stage p[hidden] {
  display: none;
}

.image-file-summary {
  min-height: 20px;
  color: #687a74;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.image-viewer-info {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid #e3ebe9;
  background: #edf0ef;
}

.image-viewer-info[hidden] {
  display: none;
}

.image-viewer-info > div {
  min-width: 0;
  padding: 10px 12px;
  background: #fff;
}

.image-viewer-info > div.is-wide {
  grid-column: span 2;
}

.image-viewer-info span,
.image-viewer-info strong {
  display: block;
  min-width: 0;
}

.image-viewer-info span {
  margin-bottom: 2px;
  color: #85938f;
  font-size: 11px;
}

.image-viewer-info strong {
  color: #33443f;
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.image-viewer-metadata {
  border: 1px solid #dfe8e5;
  background: #fff;
}

.image-viewer-metadata[hidden] {
  display: none;
}

.image-viewer-metadata > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid #e7ecea;
  background: #fbfdfd;
}

.image-viewer-metadata h3,
.image-viewer-metadata p {
  margin: 0;
}

.image-viewer-metadata h3 {
  color: #253330;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.image-viewer-metadata header p {
  margin-top: 2px;
  color: #75847f;
  font-size: 12px;
  line-height: 1.5;
}

.image-viewer-metadata-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.image-viewer-metadata-tools label {
  display: flex;
  align-items: center;
  width: min(240px, 32vw);
  min-height: 40px;
  border: 1px solid #d9e4e1;
  background: #fff;
  color: #7a8a85;
  padding-left: 11px;
}

.image-viewer-metadata-tools label:focus-within {
  border-color: #16baaa;
  outline: 2px solid rgba(22, 186, 170, 0.14);
}

.image-viewer-metadata-tools input {
  min-width: 0;
  width: 100%;
  height: 38px;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px 10px;
  color: #33443f;
  font-size: 13px;
}

.image-viewer-metadata-tools button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  border: 1px solid #d9e4e1;
  background: #fff;
  color: #33443f;
  padding: 8px 12px;
  white-space: nowrap;
  cursor: pointer;
}

.image-viewer-metadata-tools button:hover,
.image-viewer-metadata-tools button:focus-visible {
  border-color: #16baaa;
  color: #117b70;
}

.image-viewer-metadata-tools button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.image-viewer-metadata-group + .image-viewer-metadata-group {
  border-top: 1px solid #edf0ef;
}

.image-viewer-metadata-group > summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 10px 14px 10px 38px;
  color: #33443f;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.image-viewer-metadata-group > summary::-webkit-details-marker {
  display: none;
}

.image-viewer-metadata-group > summary::before {
  content: "+";
  position: absolute;
  left: 14px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid #b9c9c4;
  color: #517069;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
}

.image-viewer-metadata-group[open] > summary::before {
  content: "−";
}

.image-viewer-metadata-group > summary:hover,
.image-viewer-metadata-group > summary:focus-visible {
  background: #f5faf8;
  color: #117b70;
}

.image-viewer-metadata-group > summary strong {
  color: #788781;
  font-size: 12px;
  font-weight: 400;
}

.image-viewer-metadata-group dl {
  margin: 0;
  border-top: 1px solid #edf0ef;
}

.image-viewer-metadata-group dl > div {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(0, 2.3fr);
  min-height: 40px;
}

.image-viewer-metadata-group dl > div + div {
  border-top: 1px solid #f0f3f2;
}

.image-viewer-metadata-group dt,
.image-viewer-metadata-group dd {
  min-width: 0;
  margin: 0;
  padding: 9px 14px;
  font-size: 12px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.image-viewer-metadata-group dt {
  border-right: 1px solid #edf0ef;
  background: #fafcfb;
  color: #60706b;
}

.image-viewer-metadata-group dd {
  color: #283834;
}

.image-viewer-metadata-empty {
  padding: 22px 14px;
  color: #71817c;
  font-size: 13px;
  text-align: center;
}

.image-viewer-actions {
  justify-content: flex-end;
}

.image-viewer-actions button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.image-crop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  border: 1px solid #e3ebe9;
  background: #fbfdfd;
  padding: 10px 12px;
}

.image-crop-ratios {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.image-crop-ratios legend {
  float: left;
  margin-right: 3px;
  color: #455650;
  font-size: 13px;
}

.image-crop-ratios button {
  min-width: 54px;
  min-height: 38px;
  border: 1px solid #d9e4e1;
  background: #fff;
  color: #33443f;
  padding: 7px 12px;
  cursor: pointer;
}

.image-crop-ratios button:hover,
.image-crop-ratios button:focus-visible {
  border-color: #16baaa;
  color: #117b70;
}

.image-crop-ratios button[aria-pressed="true"] {
  border-color: #16baaa;
  background: #eaf8f6;
  color: #117b70;
  font-weight: 600;
}

.image-crop-custom-ratio {
  display: flex;
  align-items: flex-end;
  gap: 7px;
}

.image-crop-custom-ratio[hidden] {
  display: none;
}

.image-crop-custom-ratio label {
  display: grid;
  gap: 3px;
  color: #687a74;
  font-size: 12px;
}

.image-crop-custom-ratio input {
  width: 72px;
  box-sizing: border-box;
  border: 1px solid #d9e4e1;
  background: #fff;
  padding: 7px 9px;
}

.image-crop-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: 14px;
  align-items: stretch;
}

.image-crop-editor,
.image-crop-preview-panel {
  min-width: 0;
}

.image-crop-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 43px;
  box-sizing: border-box;
  border: 1px solid #e3ebe9;
  border-bottom: 0;
  background: #fbfdfd;
  padding: 9px 11px;
}

.image-crop-panel-heading h3 {
  flex: 0 0 auto;
  margin: 0;
  color: #33443f;
  font-size: 14px;
  font-weight: 600;
}

.image-crop-panel-heading span {
  min-width: 0;
  overflow: hidden;
  color: #788983;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-crop-editor-surface {
  display: grid;
  place-items: center;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid #dce6e3;
  background-color: #f7faf9;
  background-image: linear-gradient(45deg, #edf2f0 25%, transparent 25%), linear-gradient(-45deg, #edf2f0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #edf2f0 75%), linear-gradient(-45deg, transparent 75%, #edf2f0 75%);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.image-crop-stage {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 358px;
  margin: 0 auto;
  overflow: hidden;
  cursor: crosshair;
  touch-action: none;
}

.image-crop-stage[data-ready="true"] {
  min-height: 0;
}

.image-crop-stage canvas {
  display: block;
  max-width: 100%;
  height: auto;
  pointer-events: none;
}

.image-crop-box {
  display: none;
  position: absolute;
  box-sizing: border-box;
  border: 2px solid #16baaa;
  box-shadow: 0 0 0 9999px rgba(26, 45, 41, .38);
  pointer-events: none;
  outline: 0;
  touch-action: none;
}

.image-crop-box:focus-visible {
  border-color: #fff;
  outline: 2px solid #16baaa;
  outline-offset: 2px;
}

.image-crop-box::after {
  content: "";
  position: absolute;
  inset: 33% 0;
  border-top: 1px solid rgba(255, 255, 255, .7);
  border-bottom: 1px solid rgba(255, 255, 255, .7);
  pointer-events: none;
}

.image-crop-box::before {
  content: "";
  position: absolute;
  inset: 0 33%;
  border-left: 1px solid rgba(255, 255, 255, .7);
  border-right: 1px solid rgba(255, 255, 255, .7);
  pointer-events: none;
}

.image-crop-handle {
  position: absolute;
  z-index: 2;
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  background: #16baaa;
  padding: 0;
  pointer-events: auto;
  touch-action: none;
}

.image-crop-handle::after {
  content: "";
  position: absolute;
  inset: -12px;
}

.image-crop-move {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .9);
  background: rgba(22, 186, 170, .9);
  color: #fff;
  padding: 0;
  cursor: move;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  touch-action: none;
}

.image-crop-move:hover,
.image-crop-move:focus-visible {
  background: #117b70;
}

.image-crop-handle.is-nw {
  top: -11px;
  left: -11px;
  cursor: nwse-resize;
}

.image-crop-handle.is-ne {
  top: -11px;
  right: -11px;
  cursor: nesw-resize;
}

.image-crop-handle.is-sw {
  bottom: -11px;
  left: -11px;
  cursor: nesw-resize;
}

.image-crop-handle.is-se {
  right: -11px;
  bottom: -11px;
  cursor: nwse-resize;
}

.image-crop-preview-panel {
  display: grid;
  grid-template-rows: auto minmax(240px, 1fr) auto;
}

.image-crop-preview-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid #dce6e3;
  background-color: #f7faf9;
  background-image: linear-gradient(45deg, #e6edeb 25%, transparent 25%), linear-gradient(-45deg, #e6edeb 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e6edeb 75%), linear-gradient(-45deg, transparent 75%, #e6edeb 75%);
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  background-size: 18px 18px;
  padding: 12px;
}

.image-crop-preview-stage canvas {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
}

.image-crop-preview-stage canvas[hidden],
.image-crop-preview-stage p[hidden] {
  display: none;
}

.image-crop-preview-stage p {
  margin: 0;
  color: #8a9994;
  font-size: 13px;
  text-align: center;
}

.image-crop-metrics {
  display: grid;
  grid-template-columns: 1fr;
  margin: 0;
  border: 1px solid #e3ebe9;
  border-top: 0;
  background: #fff;
}

.image-crop-metrics > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 9px 11px;
  border-top: 1px solid #edf0ef;
}

.image-crop-metrics dt {
  flex: 0 0 auto;
  color: #85938f;
  font-size: 12px;
}

.image-crop-metrics dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #33443f;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-crop-actions {
  justify-content: flex-end;
}

.image-crop-actions button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.image-size-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.image-resize-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.image-resize-controls .browser-field {
  min-width: 0;
}

.image-resize-ratio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  color: #455650;
  font-size: 13px;
  white-space: nowrap;
}

.image-resize-ratio input {
  width: 16px;
  height: 16px;
  accent-color: #16baaa;
}

.image-resize-presets {
  border: 1px solid #e3ebe9;
  background: #fbfdfd;
  padding: 9px 11px;
}

.image-resize-presets button {
  min-width: 76px;
  min-height: 38px;
}

.image-resize-workspace,
.image-compress-workspace,
.image-result-workspace,
.image-effect-workspace,
.image-flip-workspace {
  min-width: 0;
}

.image-workspace-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 43px;
  box-sizing: border-box;
  border: 1px solid #e3ebe9;
  border-bottom: 0;
  background: #fbfdfd;
  padding: 9px 11px;
}

.image-workspace-heading h3 {
  margin: 0;
  color: #33443f;
  font-size: 14px;
  font-weight: 600;
}

.image-workspace-heading span {
  min-width: 0;
  overflow: hidden;
  color: #687a74;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-resize-preview-stage,
.image-result-preview-stage,
.image-effect-preview-stage,
.image-flip-preview-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 380px;
  overflow: hidden;
  border: 1px solid #dce6e3;
  background-color: #f7faf9;
  background-image: linear-gradient(45deg, #e7efed 25%, transparent 25%), linear-gradient(-45deg, #e7efed 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e7efed 75%), linear-gradient(-45deg, transparent 75%, #e7efed 75%);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
  padding: 12px;
}

.image-resize-preview-stage canvas,
.image-result-preview-stage canvas,
.image-effect-preview-stage canvas,
.image-flip-preview-stage canvas {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
}

.image-resize-preview-stage canvas[hidden],
.image-result-preview-stage canvas[hidden],
.image-effect-preview-stage canvas[hidden],
.image-flip-preview-stage canvas[hidden],
.image-resize-preview-stage p[hidden],
.image-result-preview-stage p[hidden],
.image-effect-preview-stage p[hidden],
.image-flip-preview-stage p[hidden] {
  display: none;
}

.image-resize-preview-stage p,
.image-result-preview-stage p,
.image-effect-preview-stage p,
.image-flip-preview-stage p {
  margin: 0;
  color: #8a9994;
  font-size: 13px;
  text-align: center;
}

.image-resize-metrics,
.image-compress-metrics,
.image-result-metrics,
.image-effect-metrics,
.image-flip-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border: 1px solid #e3ebe9;
  border-top: 0;
  background: #fff;
}

.image-resize-metrics > div,
.image-compress-metrics > div,
.image-result-metrics > div,
.image-effect-metrics > div,
.image-flip-metrics > div {
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid #edf0ef;
}

.image-resize-metrics > div:last-child,
.image-compress-metrics > div:last-child,
.image-result-metrics > div:last-child,
.image-effect-metrics > div:last-child,
.image-flip-metrics > div:last-child {
  border-right: 0;
}

.image-resize-metrics dt,
.image-compress-metrics dt,
.image-result-metrics dt,
.image-effect-metrics dt,
.image-flip-metrics dt {
  margin-bottom: 3px;
  color: #85938f;
  font-size: 11px;
}

.image-resize-metrics dd,
.image-compress-metrics dd,
.image-result-metrics dd,
.image-effect-metrics dd,
.image-flip-metrics dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #33443f;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-resize-actions,
.image-compress-actions,
.image-result-actions,
.image-effect-actions,
.image-flip-actions {
  justify-content: flex-end;
}

.image-resize-actions button,
.image-compress-actions button,
.image-result-actions button,
.image-effect-actions button,
.image-flip-actions button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.image-flip-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 260px);
  gap: 14px;
  align-items: end;
  border: 1px solid #e3ebe9;
  background: #fbfdfd;
  padding: 10px 12px;
}

.image-flip-directions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.image-flip-directions legend {
  float: left;
  margin-right: 3px;
  color: #455650;
  font-size: 13px;
}

.image-flip-directions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 126px;
  min-height: 40px;
  border: 1px solid #d9e4e1;
  background: #fff;
  color: #33443f;
  padding: 8px 13px;
  cursor: pointer;
}

.image-flip-directions button:hover,
.image-flip-directions button:focus-visible {
  border-color: #16baaa;
  color: #117b70;
}

.image-flip-directions button[aria-pressed="true"] {
  border-color: #16baaa;
  background: #eaf8f6;
  color: #117b70;
  font-weight: 600;
}

.image-flip-directions button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.image-flip-format {
  min-width: 0;
}

.image-flip-preview-stage {
  min-height: 420px;
}

.image-bw-toolbar,
.image-rounded-toolbar {
  display: grid;
  gap: 14px;
  align-items: end;
  border: 1px solid #e3ebe9;
  background: #fbfdfd;
  padding: 12px;
}

.image-bw-toolbar {
  grid-template-columns: minmax(220px, 1.4fr) minmax(220px, 1fr) auto minmax(150px, .65fr);
}

.image-bw-threshold,
.image-bw-format,
.image-rounded-radius,
.image-rounded-output {
  min-width: 0;
}

.image-bw-threshold input[type="range"],
.image-rounded-radius input[type="range"] {
  width: 100%;
}

.image-bw-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.image-bw-modes legend,
.image-corner-selector legend {
  grid-column: 1 / -1;
  margin-bottom: 1px;
  color: #455650;
  font-size: 13px;
}

.image-bw-modes button,
.image-rounded-presets button,
.image-corner-selector button {
  min-width: 0;
  min-height: 40px;
  border: 1px solid #d9e4e1;
  background: #fff;
  color: #33443f;
  cursor: pointer;
}

.image-bw-modes button:hover,
.image-bw-modes button:focus-visible,
.image-rounded-presets button:hover,
.image-rounded-presets button:focus-visible,
.image-corner-selector button:hover,
.image-corner-selector button:focus-visible {
  border-color: #16baaa;
  color: #117b70;
}

.image-bw-modes button[aria-pressed="true"],
.image-rounded-presets button[aria-pressed="true"],
.image-corner-selector button[aria-pressed="true"] {
  border-color: #16baaa;
  background: #eaf8f6;
  color: #117b70;
  font-weight: 600;
}

.image-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  color: #455650;
  font-size: 13px;
  white-space: nowrap;
}

.image-switch input {
  width: 17px;
  height: 17px;
  accent-color: #16baaa;
}

.image-rounded-toolbar {
  grid-template-columns: minmax(240px, 1.2fr) minmax(250px, 1fr) minmax(170px, .75fr);
}

.image-rounded-radius {
  display: grid;
  gap: 9px;
}

.image-rounded-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.image-rounded-presets button {
  min-height: 36px;
  padding: 6px;
  font-size: 12px;
}

.image-corner-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.image-corner-selector button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 9px;
}

.image-corner-selector button > span {
  width: 15px;
  height: 15px;
  box-sizing: border-box;
  border: 2px solid currentColor;
}

.image-corner-selector button > .is-top-left {
  border-radius: 7px 0 0;
}

.image-corner-selector button > .is-top-right {
  border-radius: 0 7px 0 0;
}

.image-corner-selector button > .is-bottom-left {
  border-radius: 0 0 0 7px;
}

.image-corner-selector button > .is-bottom-right {
  border-radius: 0 0 7px;
}

.image-rounded-output {
  display: grid;
  gap: 10px;
}

.image-effect-preview-stage {
  min-height: 420px;
}

.image-pixel-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) minmax(210px, .85fr) minmax(150px, .6fr);
  gap: 14px;
  align-items: end;
  border: 1px solid #e3ebe9;
  background: #fbfdfd;
  padding: 12px;
}

.image-pixel-strength,
.image-pixel-format {
  min-width: 0;
}

.image-pixel-strength {
  display: grid;
  gap: 9px;
}

.image-pixel-strength input[type="range"] {
  width: 100%;
}

.image-pixel-presets,
.image-pixel-scope {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.image-pixel-scope {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.image-pixel-scope legend {
  grid-column: 1 / -1;
  margin-bottom: 1px;
  color: #455650;
  font-size: 13px;
}

.image-pixel-presets button,
.image-pixel-scope button {
  min-width: 0;
  min-height: 38px;
  border: 1px solid #d9e4e1;
  background: #fff;
  color: #33443f;
  padding: 7px 9px;
  cursor: pointer;
}

.image-pixel-presets button:hover,
.image-pixel-presets button:focus-visible,
.image-pixel-scope button:hover,
.image-pixel-scope button:focus-visible {
  border-color: #16baaa;
  color: #117b70;
}

.image-pixel-presets button[aria-pressed="true"],
.image-pixel-scope button[aria-pressed="true"] {
  border-color: #16baaa;
  background: #eaf8f6;
  color: #117b70;
  font-weight: 600;
}

.image-pixel-preview-surface {
  display: grid;
  place-items: center;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid #dce6e3;
  background-color: #f7faf9;
  background-image: linear-gradient(45deg, #e7efed 25%, transparent 25%), linear-gradient(-45deg, #e7efed 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e7efed 75%), linear-gradient(-45deg, transparent 75%, #e7efed 75%);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.image-pixel-stage {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 418px;
  margin: 0 auto;
  overflow: hidden;
  cursor: crosshair;
  touch-action: none;
}

.image-pixel-stage[data-ready="true"] {
  min-height: 0;
}

.image-pixel-stage canvas {
  display: block;
  max-width: 100%;
  height: auto;
  pointer-events: none;
}

.image-pixel-stage canvas[hidden],
.image-pixel-stage p[hidden] {
  display: none;
}

.image-pixel-stage p {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: #8a9994;
  font-size: 13px;
  text-align: center;
}

.image-pixel-box {
  display: none;
  position: absolute;
  box-sizing: border-box;
  border: 2px solid #16baaa;
  box-shadow: 0 0 0 9999px rgba(26, 45, 41, .16);
  cursor: move;
  pointer-events: auto;
  outline: 0;
  touch-action: none;
}

.image-pixel-box:focus-visible {
  border-color: #fff;
  outline: 2px solid #16baaa;
  outline-offset: 2px;
}

.image-pixel-box[data-locked="true"] {
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}

.image-pixel-box[data-locked="true"] button {
  display: none;
}

.image-pixel-box[data-compact="true"] button {
  display: none;
}

.image-pixel-handle {
  position: absolute;
  z-index: 2;
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  background: #16baaa;
  padding: 0;
  pointer-events: auto;
  touch-action: none;
}

.image-pixel-handle::after {
  content: "";
  position: absolute;
  inset: -12px;
}

.image-pixel-handle.is-nw {
  top: -11px;
  left: -11px;
  cursor: nwse-resize;
}

.image-pixel-handle.is-ne {
  top: -11px;
  right: -11px;
  cursor: nesw-resize;
}

.image-pixel-handle.is-sw {
  bottom: -11px;
  left: -11px;
  cursor: nesw-resize;
}

.image-pixel-handle.is-se {
  right: -11px;
  bottom: -11px;
  cursor: nwse-resize;
}

.image-pixel-move {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .92);
  background: rgba(22, 186, 170, .94);
  color: #fff;
  padding: 0;
  cursor: move;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  touch-action: none;
}

.image-pixel-move:hover,
.image-pixel-move:focus-visible {
  background: #117b70;
}

.image-pixel-inspector {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 1.25fr);
  border: 1px solid #e3ebe9;
  border-top: 0;
  background: #fff;
}

.image-pixel-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  margin: 0;
}

.image-pixel-metrics > div {
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid #edf0ef;
}

.image-pixel-metrics dt,
.image-pixel-metrics dd {
  min-width: 0;
}

.image-pixel-metrics dt {
  margin-bottom: 3px;
  color: #85938f;
  font-size: 11px;
}

.image-pixel-metrics dd {
  margin: 0;
  overflow: hidden;
  color: #33443f;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-pixel-region-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  margin: 0;
  border: 0;
  border-left: 1px solid #edf0ef;
  padding: 8px 10px 10px;
}

.image-pixel-region-fields legend {
  grid-column: 1 / -1;
  padding: 0 2px;
  color: #687a74;
  font-size: 11px;
}

.image-pixel-region-fields label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #687a74;
  font-size: 12px;
}

.image-pixel-region-fields input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 6px 7px;
}

.image-pixel-region-fields input:disabled {
  background: #f4f6f5;
  color: #8a9994;
}

.image-ratio-check {
  align-self: end;
}

.image-preview-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.image-preview-pair > div,
.image-single-preview {
  min-width: 0;
  border: 1px solid #e3ebe9;
  background: #fbfdfd;
  padding: 10px;
}

.image-preview-pair strong {
  display: block;
  margin-bottom: 8px;
  color: #687a74;
  font-size: 13px;
}

.image-preview-pair canvas,
.image-single-preview canvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: 440px;
  object-fit: contain;
  margin: auto;
}

.image-single-preview {
  display: grid;
  place-items: center;
  min-height: 280px;
}

.image-output-stats {
  min-height: 20px;
  margin: 0;
  color: #4d625b;
  font-size: 13px;
}

.image-result-preview {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 300px;
  margin: 0 auto;
  border: 1px solid #dce6e3;
}

.image-result-preview:not([src]) {
  display: none;
}

.image-tool.is-processing {
  opacity: .92;
}

.image-tool.is-processing .image-preview-pair,
.image-tool.is-processing .image-result-preview-stage,
.image-tool.is-processing .image-effect-preview-stage,
.image-tool.is-processing .image-pixel-preview-surface,
.image-tool.is-processing .image-single-preview {
  cursor: wait;
}

.image-tool .browser-message.is-success {
  color: #168d80 !important;
}

.image-tool select,
.image-tool input[type="number"] {
  min-height: 40px;
}

.image-tool-controls > .browser-field {
  min-width: 170px;
  flex: 1;
}

.image-tool-controls > .browser-check {
  flex: 0 0 auto;
}

.image-tool .browser-actions {
  margin-top: 2px;
}

.image-filter-grid,
.image-watermark-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.image-filter-grid .browser-field,
.image-watermark-grid .browser-field,
.image-filter-grid .browser-check,
.image-watermark-grid .browser-check {
  min-width: 0;
}

.image-filter-grid input[type="range"],
.image-watermark-grid input[type="range"] {
  width: 100%;
}

.image-corner-options {
  min-width: 0;
  min-height: 40px;
  margin: 0;
  border: 1px solid #dce6e3;
  padding: 8px 10px 9px;
}

.image-corner-options legend {
  padding: 0 4px;
  color: #687a74;
  font-size: 12px;
}

.image-corner-options label {
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
  color: #455650;
  font-size: 13px;
}

.image-watermark-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 300px;
  max-height: 620px;
  overflow: hidden;
  border: 1px solid #dce6e3;
  background-color: #f7faf9;
  background-image: linear-gradient(45deg, #edf2f0 25%, transparent 25%), linear-gradient(-45deg, #edf2f0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #edf2f0 75%), linear-gradient(-45deg, transparent 75%, #edf2f0 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  touch-action: none;
}

.image-watermark-stage canvas {
  display: block;
  max-width: 100%;
  max-height: 580px;
  cursor: grab;
  touch-action: none;
}

.image-watermark-stage canvas:active {
  cursor: grabbing;
}

.image-watermark-stage p {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: #8a9994;
  pointer-events: none;
}

.image-watermark-stage p[hidden] {
  display: none;
}

.image-metadata-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 42px;
  border: 1px solid #dce6e3;
  background: #fbfdfd;
  padding: 9px 11px;
  color: #687a74;
  font-size: 13px;
}

.image-metadata-status strong {
  color: #455650;
  font-weight: 600;
}

.image-metadata-status span {
  border-left: 1px solid #dce6e3;
  padding-left: 8px;
}

.image-icon-grid,
.image-gif-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 12px;
  min-height: 128px;
  border: 1px solid #dce6e3;
  background: #f7faf9;
  padding: 12px;
}

.image-icon-grid figure,
.image-gif-grid figure {
  display: grid;
  grid-template-rows: 128px auto auto;
  align-content: start;
  gap: 7px;
  min-width: 0;
  margin: 0;
  border: 1px solid #e3ebe9;
  background: #fff;
  padding: 9px;
}

.image-icon-grid img,
.image-gif-grid img {
  display: block;
  width: 100%;
  height: 128px;
  border: 1px solid #edf2f0;
  background-color: #f7faf9;
  background-image: linear-gradient(45deg, #edf2f0 25%, transparent 25%), linear-gradient(-45deg, #edf2f0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #edf2f0 75%), linear-gradient(-45deg, transparent 75%, #edf2f0 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  object-fit: contain;
}

.image-icon-grid figcaption,
.image-gif-grid figcaption {
  min-width: 0;
  overflow: hidden;
  color: #687a74;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-icon-grid > p,
.image-gif-grid > p {
  display: grid;
  grid-column: 1 / -1;
  place-items: center;
  min-height: 104px;
  margin: 0;
  color: #8a9994;
  text-align: center;
}

.image-gif-grid figure button {
  min-width: 0;
  min-height: 34px;
  border: 1px solid #d9e4e1;
  background: #fff;
  color: #33443f;
  padding: 6px 8px;
  cursor: pointer;
}

.image-gif-grid figure button:hover,
.image-gif-grid figure button:focus-visible {
  border-color: #16baaa;
  color: #117b70;
}

@media (max-width: 780px) {
  .image-crop-workspace {
    grid-template-columns: 1fr;
  }

  .image-pixel-toolbar,
  .image-pixel-inspector {
    grid-template-columns: 1fr;
  }

  .image-pixel-region-fields {
    border-top: 1px solid #edf0ef;
    border-left: 0;
  }

  .image-crop-preview-panel {
    grid-template-rows: auto minmax(220px, auto) auto;
  }

  .image-crop-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .image-crop-metrics > div {
    display: block;
    border-top: 0;
    border-right: 1px solid #edf0ef;
  }

  .image-crop-metrics > div:last-child {
    border-right: 0;
  }

  .image-crop-metrics dd {
    margin-top: 3px;
    text-align: left;
  }
}

@media (max-width: 650px) {
  .image-tool-heading {
    align-items: flex-start;
  }

  .image-tool-toolbar,
  .image-editor-toolbar,
  .image-tool-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .image-tool-toolbar label {
    min-width: 0;
    justify-content: space-between;
  }

  .image-tool-toolbar input[type="range"] {
    flex: 1;
  }

  .image-viewer-stage {
    height: clamp(280px, 52vh, 520px);
  }

  .image-viewer-controls,
  .image-viewer-zoom {
    align-items: stretch;
  }

  .image-viewer-zoom {
    display: grid;
    grid-template-columns: auto 44px minmax(80px, 1fr) 44px;
    flex-basis: 100%;
  }

  .image-viewer-icon-button,
  .image-viewer-swatch,
  .image-viewer-custom-color input[type="color"] {
    min-width: 44px;
    width: 44px;
    min-height: 44px;
    height: 44px;
  }

  .image-viewer-zoom button {
    min-height: 44px;
  }

  .image-viewer-zoom > span,
  .image-viewer-zoom output {
    align-self: center;
  }

  .image-viewer-zoom output {
    grid-column: 1 / 3;
    width: auto;
    text-align: left;
  }

  .image-viewer-zoom [data-fit],
  .image-viewer-zoom [data-one] {
    min-width: 0;
  }

  .image-viewer-backgrounds {
    flex: 1 1 100%;
    flex-wrap: wrap;
  }

  .image-viewer-info {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .image-viewer-info > div.is-wide {
    grid-column: span 2;
  }

  .image-viewer-metadata > header {
    align-items: stretch;
    flex-direction: column;
  }

  .image-viewer-metadata-tools {
    align-items: stretch;
  }

  .image-viewer-metadata-tools label {
    flex: 1 1 auto;
    width: auto;
    min-height: 44px;
  }

  .image-viewer-metadata-tools input {
    height: 42px;
  }

  .image-viewer-metadata-tools button {
    min-height: 44px;
  }

  .image-viewer-metadata-group dl > div {
    grid-template-columns: minmax(105px, 0.8fr) minmax(0, 1.7fr);
  }

  .image-preview-pair {
    grid-template-columns: 1fr;
  }

  .image-crop-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .image-crop-ratios {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .image-crop-ratios legend {
    grid-column: 1 / -1;
    margin-bottom: 1px;
  }

  .image-crop-ratios button {
    min-width: 0;
    min-height: 44px;
    padding-inline: 7px;
  }

  .image-crop-custom-ratio {
    justify-content: flex-end;
  }

  .image-crop-custom-ratio label {
    flex: 1 1 0;
  }

  .image-crop-custom-ratio input {
    width: 100%;
  }

  .image-crop-editor-surface {
    min-height: 260px;
  }

  .image-crop-stage {
    min-height: 258px;
  }

  .image-crop-preview-stage {
    min-height: 220px;
  }

  .image-pixel-preview-surface {
    min-height: 260px;
  }

  .image-pixel-stage {
    min-height: 258px;
  }

  .image-crop-metrics {
    grid-template-columns: 1fr;
  }

  .image-crop-metrics > div {
    display: flex;
    border-top: 1px solid #edf0ef;
    border-right: 0;
  }

  .image-crop-metrics dd {
    margin-top: 0;
    text-align: right;
  }

  .image-crop-actions button {
    flex: 1 1 100%;
    justify-content: center;
    min-height: 44px;
  }

  .image-crop-move {
    width: 44px;
    height: 44px;
  }

  .image-tool-controls > .browser-field {
    min-width: 0;
  }

  .image-size-presets button {
    flex: 1;
  }

  .image-resize-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .image-resize-controls .image-resize-ratio {
    align-self: center;
    min-height: 44px;
  }

  .image-resize-presets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .image-resize-presets button,
  .image-flip-directions button {
    min-height: 44px;
  }

  .image-flip-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .image-flip-directions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .image-flip-directions legend {
    grid-column: 1 / -1;
    margin-bottom: 1px;
  }

  .image-flip-directions button {
    min-width: 0;
  }

  .image-resize-preview-stage,
  .image-result-preview-stage,
  .image-effect-preview-stage,
  .image-flip-preview-stage {
    min-height: 260px;
  }

  .image-resize-metrics,
  .image-compress-metrics,
  .image-result-metrics,
  .image-effect-metrics,
  .image-flip-metrics {
    grid-template-columns: 1fr;
  }

  .image-resize-metrics > div,
  .image-compress-metrics > div,
  .image-result-metrics > div,
  .image-effect-metrics > div,
  .image-flip-metrics > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid #edf0ef;
    border-right: 0;
  }

  .image-resize-metrics dd,
  .image-compress-metrics dd,
  .image-result-metrics dd,
  .image-effect-metrics dd,
  .image-flip-metrics dd {
    text-align: right;
  }

  .image-resize-actions button,
  .image-compress-actions button,
  .image-result-actions button,
  .image-effect-actions button,
  .image-flip-actions button {
    flex: 1 1 100%;
    justify-content: center;
    min-height: 44px;
  }

  .image-filter-grid,
  .image-watermark-grid {
    grid-template-columns: 1fr;
  }

  .image-bw-toolbar,
  .image-rounded-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .image-pixel-presets button,
  .image-pixel-scope button {
    min-height: 44px;
  }

  .image-pixel-region-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .image-pixel-region-fields input {
    min-height: 44px;
    font-size: 16px;
  }

  .image-pixel-metrics {
    grid-template-columns: 1fr;
  }

  .image-pixel-metrics > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid #edf0ef;
    border-right: 0;
  }

  .image-pixel-metrics > div:first-child {
    border-top: 0;
  }

  .image-pixel-metrics dt {
    margin-bottom: 0;
  }

  .image-pixel-metrics dd {
    text-align: right;
  }

  .image-effect-workspace .image-workspace-heading {
    display: grid;
    justify-items: start;
    gap: 4px;
    min-height: 0;
  }

  .image-effect-workspace .image-workspace-heading h3 {
    white-space: nowrap;
  }

  .image-effect-workspace .image-workspace-heading span {
    width: 100%;
    overflow: visible;
    line-height: 1.5;
    text-overflow: clip;
    white-space: normal;
  }

  .image-bw-modes button,
  .image-rounded-presets button,
  .image-corner-selector button {
    min-height: 44px;
  }

  .image-bw-invert {
    min-height: 44px;
  }

  .image-rounded-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .image-watermark-stage {
    min-height: 240px;
  }

  .image-icon-grid,
  .image-gif-grid {
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 8px;
    padding: 8px;
  }

  .image-icon-grid figure,
  .image-gif-grid figure {
    grid-template-rows: 96px auto auto;
    gap: 6px;
    padding: 7px;
  }

  .image-icon-grid img,
  .image-gif-grid img {
    height: 96px;
  }
}
