.coin-photo-editor {
  box-sizing: border-box;
  width: min(430px, calc(100% - 16px));
  max-height: calc(100dvh - 16px);
  inset-block-start: 8px;
  inset-block-end: auto;
  margin-block: 0;
  padding: 12px;
  background: var(--record);
  color: var(--ink);
}

.coin-photo-editor::backdrop {
  background: #10161dcc;
}

.coin-photo-editor :is(.coin-photo-side, .mv-fit-status, .coin-photo-result) {
  margin: 4px 0;
}

.coin-photo-editor :is(.mv-fit-status, .coin-photo-result):empty {
  margin: 0;
}

.coin-photo-editor canvas {
  display: block;
  width: min(100%, 260px, 36dvh);
  margin: 8px auto;
  background: var(--bg);
  touch-action: none;
  cursor: grab;
}

.coin-photo-editor canvas:active {
  cursor: grabbing;
}

.coin-photo-editor [role="tabpanel"] {
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
}

.coin-photo-editor .mv-toolstrip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  margin-bottom: 10px;
  background: var(--bg);
}

.coin-photo-editor button {
  min-height: 44px;
}

.coin-photo-editor .mv-toolstrip button {
  min-width: 0;
  padding-inline: 2px;
  font-size: 12px;
}

.coin-photo-editor :is(button[aria-selected="true"], [data-crop-apply]) {
  background: var(--gold);
  color: var(--panel);
}

.coin-photo-editor .mv-crop-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.coin-photo-editor .mv-crop-controls label {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.coin-photo-editor .mv-crop-controls button {
  align-self: end;
}

.coin-photo-editor .mv-crop-controls input {
  width: 100%;
  min-height: 28px;
  margin: 0;
  padding: 0;
  accent-color: var(--crop-slider-color, var(--gold));
}

.coin-photo-editor [data-crop^="stretch"] {
  --crop-slider-color: #6fdf9e;
}

.coin-photo-editor :is([data-crop="tiltAmount"], [data-crop="stretchOne"], [data-crop="stretchTwo"]) {
  appearance: none;
  background: transparent;
  height: 28px;
}

.coin-photo-editor :is([data-crop="tiltAmount"], [data-crop="stretchOne"], [data-crop="stretchTwo"])::-webkit-slider-runnable-track {
  background: var(--field-border);
  border-radius: 4px;
  height: 4px;
}

.coin-photo-editor :is([data-crop="tiltAmount"], [data-crop="stretchOne"], [data-crop="stretchTwo"])::-moz-range-track {
  background: var(--field-border);
  border-radius: 4px;
  height: 4px;
}

.coin-photo-editor :is([data-crop="tiltAmount"], [data-crop="stretchOne"], [data-crop="stretchTwo"])::-webkit-slider-thumb {
  appearance: none;
  background: var(--crop-slider-color, var(--gold));
  border-radius: 50%;
  width: 18px;
  height: 18px;
  margin-top: -7px;
}

.coin-photo-editor :is([data-crop="tiltAmount"], [data-crop="stretchOne"], [data-crop="stretchTwo"])::-moz-range-thumb {
  background: var(--crop-slider-color, var(--gold));
  border: 0;
  border-radius: 50%;
  width: 18px;
  height: 18px;
}

.coin-photo-editor .mv-trim-option {
  display: flex;
  flex-direction: row;
  align-items: center;
  min-height: 44px;
  gap: 8px;
}

.coin-photo-editor .mv-trim-option input {
  width: auto;
  margin: 0;
  accent-color: var(--gold);
}

.coin-photo-editor :is(.mv-fit-actions, .mv-crop-actions) {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.coin-photo-editor .mv-crop-actions {
  justify-content: flex-end;
  margin-top: 12px;
}
