*, *::before, *::after {
  box-sizing: border-box;
}


.mmpx-widget {
  background: #ffffff;
  border-radius: 20px;
  padding: 36px 40px;
  width: 100%;
  max-width: 680px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 24px rgba(0,0,0,0.09);
  margin:0 auto;
}

.mmpx-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.mmpx-h1 {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.mmpx-reset-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  background: #f3f4f6;
  border: 1.5px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
  font-family: inherit;
  white-space: nowrap;
}

.mmpx-reset-btn:hover {
  color: #ef4444;
  background: #fef2f2;
  border-color: #fecaca;
}

.mmpx-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mmpx-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mmpx-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #6b7280;
}

.mmpx-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.mmpx-input {
  width: 100%;
  padding: 13px 96px 13px 18px;
  font-size: 22px;
  font-weight: 500;
  color: #111827;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  -moz-appearance: textfield;
  appearance: textfield;
  font-family: inherit;
}

.mmpx-input::-webkit-outer-spin-button,
.mmpx-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.mmpx-input:focus {
  border-color: #3b82f6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

.mmpx-input.mmpx-input--result {
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.mmpx-unit {
  position: absolute;
  right: 44px;
  font-size: 14px;
  font-weight: 600;
  color: #9ca3af;
  pointer-events: none;
  user-select: none;
}

.mmpx-input.mmpx-input--result + .mmpx-unit {
  color: #93c5fd;
}

.mmpx-copy-btn {
  position: absolute;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #9ca3af;
  background: transparent;
  border: 1.5px solid #e5e7eb;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
  padding: 0;
}

.mmpx-copy-btn:hover {
  color: #374151;
  background: #f3f4f6;
  border-color: #d1d5db;
}

.mmpx-copy-btn.mmpx-copy-btn--copied {
  color: #16a34a;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.mmpx-result-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mmpx-result-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.mmpx-result-chip--precise {
  background: #eff6ff;
  color: #2563eb;
}

.mmpx-result-chip--rounded {
  background: #f0fdf4;
  color: #16a34a;
}

.mmpx-result-chip-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.6;
}

.mmpx-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 0;
  color: #d1d5db;
}

.mmpx-arrow svg {
  display: block;
}

.mmpx-divider {
  height: 1.5px;
  background: #f3f4f6;
  border: none;
  margin: 24px 0;
}

.mmpx-dpi-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mmpx-dpi-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #6b7280;
}

.mmpx-dpi-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mmpx-dpi-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 8px 14px;
  background: #f3f4f6;
  border: 1.5px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
  font-family: inherit;
  min-width: 72px;
}

.mmpx-dpi-btn:hover {
  background: #e5e7eb;
}

.mmpx-dpi-btn.mmpx-dpi-btn--active {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.mmpx-dpi-btn-name {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  line-height: 1.2;
}

.mmpx-dpi-btn.mmpx-dpi-btn--active .mmpx-dpi-btn-name {
  color: #2563eb;
}

.mmpx-dpi-btn-sub {
  font-size: 11px;
  font-weight: 500;
  color: #9ca3af;
  line-height: 1.4;
}

.mmpx-dpi-btn.mmpx-dpi-btn--active .mmpx-dpi-btn-sub {
  color: #93c5fd;
}

.mmpx-dpi-custom-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mmpx-dpi-custom-label {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 500;
  white-space: nowrap;
}

.mmpx-dpi-custom-input {
  width: 90px;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -moz-appearance: textfield;
  appearance: textfield;
  font-family: inherit;
}

.mmpx-dpi-custom-input::-webkit-outer-spin-button,
.mmpx-dpi-custom-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.mmpx-dpi-custom-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
  background: #fff;
}

.mmpx-presets-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mmpx-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
}

.mmpx-preset-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 8px 12px;
  background: #f9fafb;
  border: 1.5px solid #f3f4f6;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
  font-family: inherit;
  text-align: left;
}

.mmpx-preset-btn:hover {
  background: #f3f4f6;
  border-color: #e5e7eb;
}

.mmpx-preset-btn.mmpx-preset-btn--active {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.mmpx-preset-btn-label {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  line-height: 1.3;
}

.mmpx-preset-btn.mmpx-preset-btn--active .mmpx-preset-btn-label {
  color: #2563eb;
}

.mmpx-preset-btn-val {
  font-size: 11px;
  font-weight: 500;
  color: #9ca3af;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.mmpx-preset-btn.mmpx-preset-btn--active .mmpx-preset-btn-val {
  color: #93c5fd;
}

.mmpx-formula {
  font-size: 11px;
  color: #9ca3af;
  text-align: center;
  margin-top: 20px;
  margin-bottom: 0;
  font-variant-numeric: tabular-nums;
}

.mmpx-formula span {
  color: #6b7280;
  font-weight: 600;
}
